mirror of
https://github.com/evroon/bracket.git
synced 2026-02-02 18:41:25 -05:00
Bumps [prettier](https://github.com/prettier/prettier) from 3.6.2 to 3.7.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/prettier/prettier/releases">prettier's releases</a>.</em></p> <blockquote> <h2>3.7.4</h2> <h2>What's Changed</h2> <ul> <li>Fix comment in union type gets duplicated by <a href="https://github.com/fisker"><code>@fisker</code></a> in <a href="https://redirect.github.com/prettier/prettier/pull/18393">prettier/prettier#18393</a></li> <li>Fix unstable comment print in union type by <a href="https://github.com/fisker"><code>@fisker</code></a> in <a href="https://redirect.github.com/prettier/prettier/pull/18395">prettier/prettier#18395</a></li> <li>Avoid quote around LWC interpolations by <a href="https://github.com/kovsu"><code>@kovsu</code></a> in <a href="https://redirect.github.com/prettier/prettier/pull/18383">prettier/prettier#18383</a></li> </ul> <p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#374">Changelog</a></p> <h2>3.7.3</h2> <h2>What's Changed</h2> <ul> <li>Fix <code>prettier.getFileInfo()</code> change that breaks VSCode extension by <a href="https://github.com/fisker"><code>@fisker</code></a> in <a href="https://redirect.github.com/prettier/prettier/pull/18375">prettier/prettier#18375</a></li> </ul> <p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#373">Changelog</a></p> <h2>3.7.2</h2> <h2>What's Changed</h2> <ul> <li>Fix string print when switching quotes by <a href="https://github.com/fisker"><code>@fisker</code></a> in <a href="https://redirect.github.com/prettier/prettier/pull/18351">prettier/prettier#18351</a></li> <li>Preserve quote for embedded HTML attribute values by <a href="https://github.com/kovsu"><code>@kovsu</code></a> in <a href="https://redirect.github.com/prettier/prettier/pull/18352">prettier/prettier#18352</a></li> <li>Fix comment in empty type literal by <a href="https://github.com/fisker"><code>@fisker</code></a> in <a href="https://redirect.github.com/prettier/prettier/pull/18364">prettier/prettier#18364</a></li> </ul> <p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#372">Changelog</a></p> <h2>3.7.1</h2> <ul> <li>Fix performance regression in doc printer (<a href="https://redirect.github.com/prettier/prettier/pull/18342">#18342</a> by <a href="https://github.com/fisker"><code>@fisker</code></a>)</li> </ul> <p>🔗 <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md#371">Changelog</a></p> <h2>3.7.0</h2> <p><a href="https://github.com/prettier/prettier/compare/3.6.2...3.7.0">diff</a></p> <p>🔗 <a href="https://prettier.io/blog/2025/11/27/3.7.0">Release note</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/prettier/prettier/blob/main/CHANGELOG.md">prettier's changelog</a>.</em></p> <blockquote> <h1>3.7.4</h1> <p><a href="https://github.com/prettier/prettier/compare/3.7.3...3.7.4">diff</a></p> <h4>LWC: Avoid quote around interpolations (<a href="https://redirect.github.com/prettier/prettier/pull/18383">#18383</a> by <a href="https://github.com/kovsu"><code>@kovsu</code></a>)</h4> <!-- raw HTML omitted --> <pre lang="html"><code><!-- Input --> <div foo={bar}> </div> <p><!-- Prettier 3.7.3 (--embedded-language-formatting off) --> <div foo="{bar}"></div></p> <p><!-- Prettier 3.7.4 (--embedded-language-formatting off) --> <div foo={bar}></div> </code></pre></p> <h4>TypeScript: Fix comment inside union type gets duplicated (<a href="https://redirect.github.com/prettier/prettier/pull/18393">#18393</a> by <a href="https://github.com/fisker"><code>@fisker</code></a>)</h4> <!-- raw HTML omitted --> <pre lang="tsx"><code>// Input type Foo = (/** comment */ a | b) | c; <p>// Prettier 3.7.3 type Foo = /** comment <em>/ (/</em>* comment */ a | b) | c;</p> <p>// Prettier 3.7.4 type Foo = /** comment */ (a | b) | c; </code></pre></p> <h4>TypeScript: Fix unstable comment print in union type comments (<a href="https://redirect.github.com/prettier/prettier/pull/18395">#18395</a> by <a href="https://github.com/fisker"><code>@fisker</code></a>)</h4> <!-- raw HTML omitted --> <pre lang="tsx"><code>// Input type X = (A | B) & ( // comment A | B ); <p>// Prettier 3.7.3 (first format) type X = (A | B) & (// comment A | B);</p> <p>// Prettier 3.7.3 (second format) type X = ( | A </tr></table> </code></pre></p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="7848357af6"><code>7848357</code></a> Release 3.7.4</li> <li><a href="7686c59d51"><code>7686c59</code></a> Release <code>@prettier/plugin-hermes</code> & <code>@prettier/plugin-oxc</code> v0.1.3</li> <li><a href="fe494348a0"><code>fe49434</code></a> Remove dead code checking union/intersection types length (<a href="https://redirect.github.com/prettier/prettier/issues/18396">#18396</a>)</li> <li><a href="ca02b37489"><code>ca02b37</code></a> Fix unstable comment print (<a href="https://redirect.github.com/prettier/prettier/issues/18395">#18395</a>)</li> <li><a href="7efb988c67"><code>7efb988</code></a> Fix comment in union type get duplicated (<a href="https://redirect.github.com/prettier/prettier/issues/18393">#18393</a>)</li> <li><a href="cfa92c1b6d"><code>cfa92c1</code></a> Update dependency <code>@angular/compiler</code> to v21.0.2 (<a href="https://redirect.github.com/prettier/prettier/issues/18392">#18392</a>)</li> <li><a href="1de273770b"><code>1de2737</code></a> Update dependency yaml to v2.8.2 (<a href="https://redirect.github.com/prettier/prettier/issues/18391">#18391</a>)</li> <li><a href="706aa4ef90"><code>706aa4e</code></a> Switch js parse postprocess to <code>onEnter</code> (<a href="https://redirect.github.com/prettier/prettier/issues/18382">#18382</a>)</li> <li><a href="d3eb2b2d08"><code>d3eb2b2</code></a> Reuse arrays in visitor keys (<a href="https://redirect.github.com/prettier/prettier/issues/18386">#18386</a>)</li> <li><a href="c45fef106e"><code>c45fef1</code></a> Fix LWC attribute with <code>--embedded-language-formatting off</code> (<a href="https://redirect.github.com/prettier/prettier/issues/18383">#18383</a>)</li> <li>Additional commits viewable in <a href="https://github.com/prettier/prettier/compare/3.6.2...3.7.4">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by [GitHub Actions](<a href="https://www.npmjs.com/~GitHub">https://www.npmjs.com/~GitHub</a> Actions), a new releaser for prettier since your current version.</p> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Erik Vroon <erik.vroon@channable.com>
58 lines
1.8 KiB
TypeScript
58 lines
1.8 KiB
TypeScript
import * as React from "react";
|
|
import { Slot } from "@radix-ui/react-slot";
|
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
|
|
import { cn } from "lib/utils";
|
|
|
|
const buttonVariants = cva(
|
|
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
{
|
|
variants: {
|
|
variant: {
|
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
destructive:
|
|
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
outline:
|
|
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
secondary:
|
|
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
link: "text-primary underline-offset-4 hover:underline",
|
|
},
|
|
size: {
|
|
default: "h-10 px-4 py-2",
|
|
sm: "h-9 rounded-md px-3",
|
|
lg: "h-11 rounded-md px-8",
|
|
icon: "h-10 w-10",
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
variant: "default",
|
|
size: "default",
|
|
},
|
|
},
|
|
);
|
|
|
|
export interface ButtonProps
|
|
extends
|
|
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
VariantProps<typeof buttonVariants> {
|
|
asChild?: boolean;
|
|
}
|
|
|
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
const Comp = asChild ? Slot : "button";
|
|
return (
|
|
<Comp
|
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
);
|
|
},
|
|
);
|
|
Button.displayName = "Button";
|
|
|
|
export { Button, buttonVariants };
|