@gears-frontx/ui-kit 0.3.0-alpha.1 → 0.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/badge.js +39 -19
- package/dist/badge.js.map +1 -1
- package/dist/button.js +40 -40
- package/dist/button.js.map +1 -1
- package/dist/checkbox.js +5 -5
- package/dist/chunks/badge.BcdxDzJ7.css +1 -0
- package/dist/chunks/button.DNo8DTR3.css +1 -0
- package/dist/chunks/checkbox.D3kdAalh.css +1 -0
- package/dist/chunks/input.C8RDCC-a.css +1 -0
- package/dist/chunks/radio-group.zAFY9yCF.css +1 -0
- package/dist/chunks/select.Dt0diN4P.css +1 -0
- package/dist/chunks/switch.CsaIRnCA.css +1 -0
- package/dist/chunks/{table.r8ppNt1W.css → table.BuWHXL6e.css} +1 -1
- package/dist/chunks/tabs.KEksCAxN.css +1 -0
- package/dist/chunks/{textarea.BKWvs6fD.css → textarea.N3iiWUuz.css} +1 -1
- package/dist/chunks/toast.DMUpK07T.css +1 -0
- package/dist/components/badge/badge.d.ts +14 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/input/input.d.ts +17 -1
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/docs/badge.md +22 -8
- package/dist/docs/button.md +43 -8
- package/dist/docs/input.md +32 -6
- package/dist/docs/select.md +13 -9
- package/dist/input.js +27 -21
- package/dist/input.js.map +1 -1
- package/dist/radio-group.js +8 -8
- package/dist/select.js +57 -65
- package/dist/select.js.map +1 -1
- package/dist/switch.js +8 -8
- package/dist/table.js +33 -33
- package/dist/tabs.js +20 -20
- package/dist/textarea.js +4 -4
- package/dist/theme.css +31 -6
- package/dist/toast.js +60 -60
- package/llms.txt +26 -17
- package/package.json +1 -1
- package/dist/chunks/badge.ej-3-Xs4.css +0 -1
- package/dist/chunks/button.CKfALaMe.css +0 -1
- package/dist/chunks/checkbox.Dd6YDr20.css +0 -1
- package/dist/chunks/input.CrRQ0OAn.css +0 -1
- package/dist/chunks/radio-group.1Y6B0lXt.css +0 -1
- package/dist/chunks/select.BmyP2S2q.css +0 -1
- package/dist/chunks/switch.B_ebMSxR.css +0 -1
- package/dist/chunks/tabs.DqJE9cX3.css +0 -1
- package/dist/chunks/toast.DMl31Mq4.css +0 -1
package/dist/badge.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsxs as d, Fragment as v, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { mergeProps as g } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender as m } from "@base-ui/react/use-render";
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
|
+
import { Children as h } from "react";
|
|
6
|
+
import './chunks/badge.BcdxDzJ7.css';const b = "_badge_rbq84_9", f = "_icon_rbq84_110", q = "_variantSuccess_rbq84_131", P = "_variantWarning_rbq84_136", I = "_variantInfo_rbq84_141", D = "_variantDanger_rbq84_146", M = "_variantMuted_rbq84_18", S = "_shapePill_rbq84_167", W = "_shapePlain_rbq84_172", a = {
|
|
7
|
+
badge: b,
|
|
8
|
+
icon: f,
|
|
9
|
+
variantSuccess: q,
|
|
10
|
+
variantWarning: P,
|
|
11
|
+
variantInfo: I,
|
|
12
|
+
variantDanger: D,
|
|
13
|
+
variantMuted: M,
|
|
14
|
+
shapePill: S,
|
|
15
|
+
shapePlain: W
|
|
16
|
+
}, x = u(a.badge, {
|
|
14
17
|
variants: {
|
|
15
18
|
variant: {
|
|
16
19
|
success: a.variantSuccess,
|
|
@@ -21,7 +24,7 @@ import './chunks/badge.ej-3-Xs4.css';const _ = "_badge_1qq28_8", c = "_variantSu
|
|
|
21
24
|
},
|
|
22
25
|
shape: {
|
|
23
26
|
pill: a.shapePill,
|
|
24
|
-
|
|
27
|
+
plain: a.shapePlain
|
|
25
28
|
}
|
|
26
29
|
},
|
|
27
30
|
defaultVariants: {
|
|
@@ -29,14 +32,31 @@ import './chunks/badge.ej-3-Xs4.css';const _ = "_badge_1qq28_8", c = "_variantSu
|
|
|
29
32
|
shape: "pill"
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
|
-
function
|
|
33
|
-
|
|
35
|
+
function A({ className: t, variant: i, shape: e, dot: s, icon: n, render: o, children: c, ..._ }) {
|
|
36
|
+
const r = h.toArray(n).some((l) => l !== "");
|
|
37
|
+
return m({
|
|
34
38
|
defaultTagName: "span",
|
|
35
|
-
render:
|
|
36
|
-
|
|
39
|
+
render: o,
|
|
40
|
+
/*
|
|
41
|
+
* The derived attribute and the composed children are layered on top of
|
|
42
|
+
* the merged props, NOT passed through mergeProps: they must win over a
|
|
43
|
+
* caller's own `data-dot` (same shadow-proofing as Button's
|
|
44
|
+
* `data-loading`), and mergeProps types its arguments as the closed DOM
|
|
45
|
+
* attribute set, which rejects a `data-*` key in an object literal.
|
|
46
|
+
* `useRender`'s own `props` takes `Record<string, unknown>`, so the
|
|
47
|
+
* spread below type-checks while keeping the ordering that matters.
|
|
48
|
+
*/
|
|
49
|
+
props: {
|
|
50
|
+
...g({ className: x({ variant: i, shape: e, className: t }) }, _),
|
|
51
|
+
"data-dot": s && !r || void 0,
|
|
52
|
+
children: /* @__PURE__ */ d(v, { children: [
|
|
53
|
+
r && /* @__PURE__ */ p("span", { className: a.icon, "aria-hidden": "true", children: n }),
|
|
54
|
+
c
|
|
55
|
+
] })
|
|
56
|
+
}
|
|
37
57
|
});
|
|
38
58
|
}
|
|
39
59
|
export {
|
|
40
|
-
|
|
60
|
+
A as Badge
|
|
41
61
|
};
|
|
42
62
|
//# sourceMappingURL=badge.js.map
|
package/dist/badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sources":["../src/components/badge/badge.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport styles from './badge.module.css';\n\n/*\n * Badge has no Base UI primitive component, but it still gets `render`-prop\n * polymorphism — from `useRender`/`mergeProps`, the same utilities Base UI's\n * primitives are built on. A status badge is usually static, but rendered as\n * a link via `render` it stays focusable and gets the focus ring below.\n *\n * The variant model follows the F-mockups' Badge/Status (\"pill or dot;\n * semantic intent only\"), which retires the shadcn-inherited\n * default/secondary/destructive/outline/ghost/link list: a badge states\n * *what kind* of thing it marks, not how to paint it. That semantic-only\n * rule is real, but it lives in badge.md and in the VALUE names — the prop\n * itself keeps the kit-wide `variant` name rather than an axis name of its\n * own, so every component in the kit is driven the same way.\n *\n * `shape`, not `size`: the two values are pill vs. bare
|
|
1
|
+
{"version":3,"file":"badge.js","sources":["../src/components/badge/badge.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './badge.module.css';\n\n/*\n * Badge has no Base UI primitive component, but it still gets `render`-prop\n * polymorphism — from `useRender`/`mergeProps`, the same utilities Base UI's\n * primitives are built on. A status badge is usually static, but rendered as\n * a link via `render` it stays focusable and gets the focus ring below.\n *\n * The variant model follows the F-mockups' Badge/Status (\"pill or dot;\n * semantic intent only\"), which retires the shadcn-inherited\n * default/secondary/destructive/outline/ghost/link list: a badge states\n * *what kind* of thing it marks, not how to paint it. That semantic-only\n * rule is real, but it lives in badge.md and in the VALUE names — the prop\n * itself keeps the kit-wide `variant` name rather than an axis name of its\n * own, so every component in the kit is driven the same way.\n *\n * `shape`, not `size`: the two values are pill vs. plain (bare text, no\n * fill), and Badge has no size axis at all (the pill is a fixed 24px).\n * Not `form` either — that is a real HTML attribute, so a styling prop by\n * that name would shadow it for anyone rendering a form-associated element\n * via `render`. The status dot and the icon slot are opt-in props, not\n * shape values — both shapes can carry either.\n */\nconst badgeVariants = cva(styles.badge, {\n variants: {\n variant: {\n success: styles.variantSuccess,\n warning: styles.variantWarning,\n info: styles.variantInfo,\n danger: styles.variantDanger,\n muted: styles.variantMuted,\n },\n shape: {\n pill: styles.shapePill,\n plain: styles.shapePlain,\n },\n },\n defaultVariants: {\n variant: 'muted',\n shape: 'pill',\n },\n});\n\nexport interface BadgeProps\n extends useRender.ComponentProps<'span'>, VariantProps<typeof badgeVariants> {\n /**\n * Show the status dot, painted in the variant's accent color. Off by\n * default; ignored when `icon` is present — the icon takes its place.\n */\n dot?: boolean;\n /**\n * Leading icon slot — decorative (`aria-hidden`), fixed 12px, painted in\n * the variant's accent color like the dot it replaces. Wins over `dot`\n * when both are set.\n */\n icon?: ReactNode;\n}\n\nexport function Badge({ className, variant, shape, dot, icon, render, children, ...props }: BadgeProps) {\n // `icon != null` is true for `icon={false}` — a valid ReactNode that\n // renders nothing — which is exactly what `icon={cond && <Icon/>}` passes\n // when `cond` is false. Same predicate as Button's `hasLabel`, applied to\n // a slot instead of children: it answers \"is this renderable\" rather than\n // \"is this set\".\n const hasIcon = Children.toArray(icon).some((child) => child !== '');\n return useRender({\n defaultTagName: 'span',\n render,\n /*\n * The derived attribute and the composed children are layered on top of\n * the merged props, NOT passed through mergeProps: they must win over a\n * caller's own `data-dot` (same shadow-proofing as Button's\n * `data-loading`), and mergeProps types its arguments as the closed DOM\n * attribute set, which rejects a `data-*` key in an object literal.\n * `useRender`'s own `props` takes `Record<string, unknown>`, so the\n * spread below type-checks while keeping the ordering that matters.\n */\n props: {\n ...mergeProps<'span'>({ className: badgeVariants({ variant, shape, className }) }, props),\n 'data-dot': (dot && !hasIcon) || undefined,\n children: (\n <>\n {hasIcon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {children}\n </>\n ),\n },\n });\n}\n"],"names":["badgeVariants","cva","styles","Badge","className","variant","shape","dot","icon","render","children","props","hasIcon","Children","child","useRender","mergeProps","jsxs","Fragment"],"mappings":";;;;;;;;;;;;;;;GA4BMA,IAAgBC,EAAIC,EAAO,OAAO;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,SAASA,EAAO;AAAA,MAChB,MAAMA,EAAO;AAAA,MACb,QAAQA,EAAO;AAAA,MACf,OAAOA,EAAO;AAAA,IAAA;AAAA,IAEhB,OAAO;AAAA,MACL,MAAMA,EAAO;AAAA,MACb,OAAOA,EAAO;AAAA,IAAA;AAAA,EAChB;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAEX,CAAC;AAiBM,SAASC,EAAM,EAAE,WAAAC,GAAW,SAAAC,GAAS,OAAAC,GAAO,KAAAC,GAAK,MAAAC,GAAM,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,KAAqB;AAMtG,QAAMC,IAAUC,EAAS,QAAQL,CAAI,EAAE,KAAK,CAACM,MAAUA,MAAU,EAAE;AACnE,SAAOC,EAAU;AAAA,IACf,gBAAgB;AAAA,IAChB,QAAAN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,OAAO;AAAA,MACL,GAAGO,EAAmB,EAAE,WAAWhB,EAAc,EAAE,SAAAK,GAAS,OAAAC,GAAO,WAAAF,EAAA,CAAW,EAAA,GAAKO,CAAK;AAAA,MACxF,YAAaJ,KAAO,CAACK,KAAY;AAAA,MACjC,UACE,gBAAAK,EAAAC,GAAA,EACG,UAAA;AAAA,QAAAN,uBACE,QAAA,EAAK,WAAWV,EAAO,MAAM,eAAY,QACvC,UAAAM,EAAA,CACH;AAAA,QAEDE;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAEJ,CACD;AACH;"}
|
package/dist/button.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { Children as
|
|
5
|
-
import './chunks/button.
|
|
6
|
-
button:
|
|
7
|
-
variantDefault:
|
|
8
|
-
variantDestructive:
|
|
9
|
-
variantOutline:
|
|
10
|
-
variantSecondary:
|
|
11
|
-
variantGhost:
|
|
12
|
-
variantLink:
|
|
13
|
-
sizeDefault:
|
|
14
|
-
sizeSm:
|
|
15
|
-
sizeLg:
|
|
16
|
-
icon:
|
|
17
|
-
label:
|
|
18
|
-
spinner:
|
|
19
|
-
},
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Button as b } from "@base-ui/react/button";
|
|
3
|
+
import { cva as D } from "class-variance-authority";
|
|
4
|
+
import { Children as c } from "react";
|
|
5
|
+
import './chunks/button.DNo8DTR3.css';const h = "_button_9fz15_6", p = "_variantDefault_9fz15_127", y = "_variantDestructive_9fz15_143", L = "_variantOutline_9fz15_169", S = "_variantSecondary_9fz15_180", k = "_variantGhost_9fz15_197", O = "_variantLink_9fz15_217", G = "_sizeDefault_9fz15_258", N = "_sizeSm_9fz15_263", g = "_sizeLg_9fz15_269", x = "_icon_9fz15_287", B = "_label_9fz15_309", j = "_spinner_9fz15_42", t = {
|
|
6
|
+
button: h,
|
|
7
|
+
variantDefault: p,
|
|
8
|
+
variantDestructive: y,
|
|
9
|
+
variantOutline: L,
|
|
10
|
+
variantSecondary: S,
|
|
11
|
+
variantGhost: k,
|
|
12
|
+
variantLink: O,
|
|
13
|
+
sizeDefault: G,
|
|
14
|
+
sizeSm: N,
|
|
15
|
+
sizeLg: g,
|
|
16
|
+
icon: x,
|
|
17
|
+
label: B,
|
|
18
|
+
spinner: j
|
|
19
|
+
}, A = D(t.button, {
|
|
20
20
|
variants: {
|
|
21
21
|
variant: {
|
|
22
22
|
default: t.variantDefault,
|
|
@@ -37,37 +37,37 @@ import './chunks/button.CKfALaMe.css';const q = "_button_1ts3q_6", D = "_variant
|
|
|
37
37
|
size: "default"
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
function
|
|
41
|
-
className:
|
|
42
|
-
variant:
|
|
43
|
-
size:
|
|
44
|
-
icon:
|
|
40
|
+
function $({
|
|
41
|
+
className: _,
|
|
42
|
+
variant: l,
|
|
43
|
+
size: u,
|
|
44
|
+
icon: s,
|
|
45
45
|
loading: a,
|
|
46
|
-
disabled:
|
|
47
|
-
focusableWhenDisabled:
|
|
48
|
-
children:
|
|
49
|
-
...
|
|
46
|
+
disabled: v,
|
|
47
|
+
focusableWhenDisabled: f,
|
|
48
|
+
children: e,
|
|
49
|
+
...z
|
|
50
50
|
}) {
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
51
|
+
const r = c.toArray(e).some((n) => n !== ""), o = c.toArray(s).some((n) => n !== ""), d = o && !r;
|
|
52
|
+
return /* @__PURE__ */ m(
|
|
53
|
+
b,
|
|
54
54
|
{
|
|
55
|
-
className:
|
|
56
|
-
...
|
|
57
|
-
focusableWhenDisabled: a ||
|
|
58
|
-
disabled:
|
|
59
|
-
"data-icon-only":
|
|
55
|
+
className: A({ variant: l, size: u, className: _ }),
|
|
56
|
+
...z,
|
|
57
|
+
focusableWhenDisabled: a || f,
|
|
58
|
+
disabled: v || a,
|
|
59
|
+
"data-icon-only": d || void 0,
|
|
60
60
|
"data-loading": a || void 0,
|
|
61
61
|
"aria-busy": a || void 0,
|
|
62
62
|
children: [
|
|
63
|
-
a && /* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
a && /* @__PURE__ */ i("span", { className: t.spinner, "aria-hidden": "true" }),
|
|
64
|
+
o && /* @__PURE__ */ i("span", { className: t.icon, "aria-hidden": "true", children: s }),
|
|
65
|
+
r && /* @__PURE__ */ i("span", { className: t.label, children: e })
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
export {
|
|
71
|
-
|
|
71
|
+
$ as Button
|
|
72
72
|
};
|
|
73
73
|
//# sourceMappingURL=button.js.map
|
package/dist/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../src/components/button/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './button.module.css';\n\nconst buttonVariants = cva(styles.button, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n outline: styles.variantOutline,\n secondary: styles.variantSecondary,\n ghost: styles.variantGhost,\n link: styles.variantLink,\n },\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\nexport interface ButtonProps\n extends Omit<ButtonPrimitive.Props, 'className'>, VariantProps<typeof buttonVariants> {\n className?: string;\n /**\n * Leading icon slot — the one right way to put an icon in a Button (never\n * via children; the slot is what gets sized, spaced, hidden during\n * `loading`, and marked decorative). With no children the button turns\n * square icon-only — pass `aria-label` then, the icon carries no\n * accessible name. Same prop shape as react-kit's AcvButton; a trailing\n * slot, if ever needed, takes AcvButton's `end` name.\n */\n icon?: ReactNode;\n /**\n * Shows a centered spinner and reports `aria-busy`. Content is hidden\n * with opacity, not visibility: it keeps painting the button's size (no\n * width jump) and, unlike visibility, stays in the accessibility tree —\n * the button keeps its name while `aria-busy` reports the state, with no\n * hardcoded \"Loading\" label the kit would otherwise have to translate.\n * Clicks are suppressed the same way `disabled` suppresses them, but the\n * button does NOT become natively `disabled` — it forces\n * `focusableWhenDisabled` (see below) instead, so it stays in the tab\n * order and reports `aria-disabled` rather than blurring itself the\n * instant a native `disabled` attribute would land. Consumer code\n * checking the native `disabled` property or a `:disabled` CSS selector\n * will NOT see a `loading` button the way it sees a plain `disabled`\n * one — check `aria-disabled`/`aria-busy` instead.\n */\n loading?: boolean;\n /**\n * Keep the button in the tab order (and reporting `aria-disabled`\n * instead of the native `disabled` attribute) while disabled — inherited\n * from Base UI's Button, re-declared here because `loading` above forces\n * this to `true` regardless of what's passed: a native `disabled`\n * attribute blurs the button the instant it lands, which `loading` can't\n * afford (it needs `aria-busy` to still be announced to something). An\n * explicit `focusableWhenDisabled={false}` is silently overridden while\n * `loading` is `true`.\n * @default false\n */\n focusableWhenDisabled?: boolean;\n}\n\nexport function Button({\n className,\n variant,\n size,\n icon,\n loading,\n disabled,\n focusableWhenDisabled,\n children,\n ...props\n}: ButtonProps) {\n // One predicate for \"does this button have a visible label\", driving\n // BOTH the icon-only derivation below and the label-render guard at the\n // bottom: `children == null` only catches a missing prop, not a falsy\n // one — `<Button icon={x}>{cond && 'Save'}</Button>` with cond=false\n // passes `false` as children, which is neither null nor renderable, so\n // checking each spot with its own logic could (and did) disagree about\n // whether the button has a label.\n //\n // Children.toArray drops `false`/`null`/`undefined`/`[]` but KEEPS the\n // empty string (`toArray('')` has length 1), so the array being non-empty\n // is not on its own the same question as \"renders something visible\" —\n // hence the explicit `!== ''` filter. `<Button icon={x}>{label}</Button>`\n // with an empty `label` is the case it covers: without the filter that\n // button stays a wide pill wrapping an empty label span instead of going\n // icon-only. `0` is deliberately NOT filtered — React renders it.\n const hasLabel = Children.toArray(children).some((child) => child !== '');\n
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../src/components/button/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Children, type ReactNode } from 'react';\n\nimport styles from './button.module.css';\n\nconst buttonVariants = cva(styles.button, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n outline: styles.variantOutline,\n secondary: styles.variantSecondary,\n ghost: styles.variantGhost,\n link: styles.variantLink,\n },\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n lg: styles.sizeLg,\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\nexport interface ButtonProps\n extends Omit<ButtonPrimitive.Props, 'className'>, VariantProps<typeof buttonVariants> {\n className?: string;\n /**\n * Leading icon slot — the one right way to put an icon in a Button (never\n * via children; the slot is what gets sized, spaced, hidden during\n * `loading`, and marked decorative). With no children the button turns\n * square icon-only — pass `aria-label` then, the icon carries no\n * accessible name. Same prop shape as react-kit's AcvButton; a trailing\n * slot, if ever needed, takes AcvButton's `end` name.\n */\n icon?: ReactNode;\n /**\n * Shows a centered spinner and reports `aria-busy`. Content is hidden\n * with opacity, not visibility: it keeps painting the button's size (no\n * width jump) and, unlike visibility, stays in the accessibility tree —\n * the button keeps its name while `aria-busy` reports the state, with no\n * hardcoded \"Loading\" label the kit would otherwise have to translate.\n * Clicks are suppressed the same way `disabled` suppresses them, but the\n * button does NOT become natively `disabled` — it forces\n * `focusableWhenDisabled` (see below) instead, so it stays in the tab\n * order and reports `aria-disabled` rather than blurring itself the\n * instant a native `disabled` attribute would land. Consumer code\n * checking the native `disabled` property or a `:disabled` CSS selector\n * will NOT see a `loading` button the way it sees a plain `disabled`\n * one — check `aria-disabled`/`aria-busy` instead.\n */\n loading?: boolean;\n /**\n * Keep the button in the tab order (and reporting `aria-disabled`\n * instead of the native `disabled` attribute) while disabled — inherited\n * from Base UI's Button, re-declared here because `loading` above forces\n * this to `true` regardless of what's passed: a native `disabled`\n * attribute blurs the button the instant it lands, which `loading` can't\n * afford (it needs `aria-busy` to still be announced to something). An\n * explicit `focusableWhenDisabled={false}` is silently overridden while\n * `loading` is `true`.\n * @default false\n */\n focusableWhenDisabled?: boolean;\n}\n\nexport function Button({\n className,\n variant,\n size,\n icon,\n loading,\n disabled,\n focusableWhenDisabled,\n children,\n ...props\n}: ButtonProps) {\n // One predicate for \"does this button have a visible label\", driving\n // BOTH the icon-only derivation below and the label-render guard at the\n // bottom: `children == null` only catches a missing prop, not a falsy\n // one — `<Button icon={x}>{cond && 'Save'}</Button>` with cond=false\n // passes `false` as children, which is neither null nor renderable, so\n // checking each spot with its own logic could (and did) disagree about\n // whether the button has a label.\n //\n // Children.toArray drops `false`/`null`/`undefined`/`[]` but KEEPS the\n // empty string (`toArray('')` has length 1), so the array being non-empty\n // is not on its own the same question as \"renders something visible\" —\n // hence the explicit `!== ''` filter. `<Button icon={x}>{label}</Button>`\n // with an empty `label` is the case it covers: without the filter that\n // button stays a wide pill wrapping an empty label span instead of going\n // icon-only. `0` is deliberately NOT filtered — React renders it.\n const hasLabel = Children.toArray(children).some((child) => child !== '');\n // Same predicate, applied to the icon slot: `icon != null` is true for\n // `icon={false}` — a valid ReactNode that renders nothing — which is\n // exactly what `icon={cond && <Icon/>}` passes when `cond` is false.\n // Without this, a false condition still forced the button icon-only and\n // rendered an empty square.\n const hasIcon = Children.toArray(icon).some((child) => child !== '');\n const iconOnly = hasIcon && !hasLabel;\n return (\n <ButtonPrimitive\n className={buttonVariants({ variant, size, className })}\n {...props}\n /*\n * Derived attributes are spread AFTER `...props` so a caller's own\n * conflicting `aria-busy`/`data-loading`/`data-icon-only` can never\n * shadow the state this component just computed — the button IS\n * loading/icon-only/not, regardless of what a stray prop says.\n *\n * `focusableWhenDisabled` while `loading`: a native `disabled`\n * attribute blurs the element the instant it lands, which would\n * silently steal focus off a button the user just clicked and make\n * `aria-busy` announce to no one. Base UI's `focusableWhenDisabled`\n * keeps it in the tab order and reports the state via\n * `aria-disabled` instead (see useFocusableWhenDisabled) — clicks\n * still get suppressed via `disabled` below either way. A plain\n * `disabled` with no `loading` keeps its ordinary native behavior\n * unless the caller opts into `focusableWhenDisabled` itself.\n */\n focusableWhenDisabled={loading || focusableWhenDisabled}\n disabled={disabled || loading}\n data-icon-only={iconOnly || undefined}\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n >\n {loading && <span className={styles.spinner} aria-hidden=\"true\" />}\n {hasIcon && (\n <span className={styles.icon} aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {hasLabel && <span className={styles.label}>{children}</span>}\n </ButtonPrimitive>\n );\n}\n"],"names":["buttonVariants","cva","styles","Button","className","variant","size","icon","loading","disabled","focusableWhenDisabled","children","props","hasLabel","Children","child","hasIcon","iconOnly","jsxs","ButtonPrimitive","jsx"],"mappings":";;;;;;;;;;;;;;;;;;GAMMA,IAAiBC,EAAIC,EAAO,QAAQ;AAAA,EACxC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,aAAaA,EAAO;AAAA,MACpB,SAASA,EAAO;AAAA,MAChB,WAAWA,EAAO;AAAA,MAClB,OAAOA,EAAO;AAAA,MACd,MAAMA,EAAO;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,SAASA,EAAO;AAAA,MAChB,IAAIA,EAAO;AAAA,MACX,IAAIA,EAAO;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV,CAAC;AA4CM,SAASC,EAAO;AAAA,EACrB,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AAgBd,QAAMC,IAAWC,EAAS,QAAQH,CAAQ,EAAE,KAAK,CAACI,MAAUA,MAAU,EAAE,GAMlEC,IAAUF,EAAS,QAAQP,CAAI,EAAE,KAAK,CAACQ,MAAUA,MAAU,EAAE,GAC7DE,IAAWD,KAAW,CAACH;AAC7B,SACE,gBAAAK;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAWnB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,GAAW;AAAA,MACrD,GAAGQ;AAAA,MAiBJ,uBAAuBJ,KAAWE;AAAA,MAClC,UAAUD,KAAYD;AAAA,MACtB,kBAAgBS,KAAY;AAAA,MAC5B,gBAAcT,KAAW;AAAA,MACzB,aAAWA,KAAW;AAAA,MAErB,UAAA;AAAA,QAAAA,uBAAY,QAAA,EAAK,WAAWN,EAAO,SAAS,eAAY,QAAO;AAAA,QAC/Dc,uBACE,QAAA,EAAK,WAAWd,EAAO,MAAM,eAAY,QACvC,UAAAK,EAAA,CACH;AAAA,QAEDM,KAAY,gBAAAO,EAAC,QAAA,EAAK,WAAWlB,EAAO,OAAQ,UAAAS,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5D;"}
|
package/dist/checkbox.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as c, jsxs as t } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox as e } from "@base-ui/react/checkbox";
|
|
3
3
|
import { cx as n } from "class-variance-authority";
|
|
4
|
-
import './chunks/checkbox.
|
|
4
|
+
import './chunks/checkbox.D3kdAalh.css';const s = "_checkbox_1ckpy_6", a = "_indicator_1ckpy_87", d = "_icon_1ckpy_93", k = "_iconIndeterminate_1ckpy_100", h = "_iconCheck_1ckpy_104", o = {
|
|
5
5
|
checkbox: s,
|
|
6
6
|
indicator: a,
|
|
7
7
|
icon: d,
|
|
8
|
-
iconIndeterminate:
|
|
9
|
-
iconCheck:
|
|
8
|
+
iconIndeterminate: k,
|
|
9
|
+
iconCheck: h
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function p({ className: i, ...r }) {
|
|
12
12
|
return /* @__PURE__ */ c(e.Root, { className: n(o.checkbox, i), ...r, children: /* @__PURE__ */ t(e.Indicator, { className: o.indicator, children: [
|
|
13
13
|
/* @__PURE__ */ c(
|
|
14
14
|
"svg",
|
|
@@ -41,6 +41,6 @@ function m({ className: i, ...r }) {
|
|
|
41
41
|
] }) });
|
|
42
42
|
}
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
p as Checkbox
|
|
45
45
|
};
|
|
46
46
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._badge_rbq84_9{--badge-accent: var(--muted-foreground);--badge-text: color-mix(in oklab, var(--muted-foreground) 80%, var(--foreground) 20%);box-sizing:border-box;display:inline-flex;height:1.5rem;width:fit-content;flex-shrink:0;align-items:center;justify-content:center;gap:var(--space-2);overflow:hidden;border:var(--border-width) solid transparent;border-radius:9999px;font-family:inherit;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-meta-weight);letter-spacing:var(--text-meta-tracking);white-space:nowrap;color:var(--badge-text);transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._badge_rbq84_9[data-dot]:before{content:"";flex-shrink:0;width:.375rem;height:.375rem;border-radius:50%;background-color:var(--badge-accent)}._badge_rbq84_9:focus-visible{outline:none;border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._badge_rbq84_9:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._badge_rbq84_9[aria-invalid=true]{border-color:var(--destructive);box-shadow:inset 0 0 0 var(--ring-inset) var(--destructive)}._badge_rbq84_9 ._icon_rbq84_110{display:inline-flex;flex-shrink:0;color:var(--badge-accent);pointer-events:none}._badge_rbq84_9 ._icon_rbq84_110 svg{width:var(--icon-size-xs);height:var(--icon-size-xs)}._badge_rbq84_9._variantSuccess_rbq84_131{--badge-accent: var(--success);--badge-text: color-mix(in oklab, var(--success) 80%, var(--foreground) 20%)}._badge_rbq84_9._variantWarning_rbq84_136{--badge-accent: var(--warning);--badge-text: color-mix(in oklab, var(--warning) 70%, var(--foreground) 30%)}._badge_rbq84_9._variantInfo_rbq84_141{--badge-accent: var(--info);--badge-text: color-mix(in oklab, var(--info) 80%, var(--foreground) 20%)}._badge_rbq84_9._variantDanger_rbq84_146{--badge-accent: var(--danger);--badge-text: color-mix(in oklab, var(--danger) 80%, var(--foreground) 20%)}._badge_rbq84_9._shapePill_rbq84_167{background-color:color-mix(in oklab,var(--foreground) 5%,transparent);padding:0 var(--space-2)}._badge_rbq84_9._shapePlain_rbq84_172{background-color:transparent;padding:0}a._badge_rbq84_9._shapePill_rbq84_167:hover{background-color:color-mix(in oklab,var(--foreground) 9%,transparent)}a._badge_rbq84_9._shapePlain_rbq84_172:hover{text-decoration:underline;text-underline-offset:4px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._button_9fz15_6{box-sizing:border-box;--button-focus-ring: var(--ring);position:relative;display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);white-space:nowrap;border:var(--border-width) solid var(--button-border, transparent);border-radius:var(--radius-md);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-label-tracking);cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._button_9fz15_6:focus-visible{outline:var(--border-width-focus) solid var(--button-focus-ring);outline-offset:2px}@media(forced-colors:active){._button_9fz15_6:focus-visible{outline-color:Highlight}}._button_9fz15_6:disabled{pointer-events:none;opacity:.42}._button_9fz15_6[data-loading]{pointer-events:none;opacity:.42}._variantDefault_9fz15_127{background-color:var(--button-bg, var(--primary));color:var(--button-fg, var(--primary-foreground))}._variantDefault_9fz15_127:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--primary-hover)));color:var(--button-fg-hover, var(--button-fg, var(--primary-foreground)))}._variantDestructive_9fz15_143{background-color:var(--button-bg, var(--destructive));color:var(--button-fg, var(--destructive-foreground))}._variantDestructive_9fz15_143:hover{background-color:var(--button-bg-hover, var(--button-bg, color-mix(in oklab, var(--destructive) 90%, var(--foreground) 10%)));color:var(--button-fg-hover, var(--button-fg, var(--destructive-foreground)))}._variantOutline_9fz15_169{border-color:var(--button-border, var(--border-strong));background-color:var(--button-bg, var(--surface-elevated));color:var(--button-fg, var(--foreground))}._variantOutline_9fz15_169:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--accent)));color:var(--button-fg-hover, var(--button-fg, var(--accent-foreground)))}._variantSecondary_9fz15_180{background-color:var(--button-bg, var(--secondary));color:var(--button-fg, var(--secondary-foreground))}._variantSecondary_9fz15_180:hover{background-color:var(--button-bg-hover, var(--button-bg, color-mix(in oklab, var(--secondary) 80%, transparent)));color:var(--button-fg-hover, var(--button-fg, var(--secondary-foreground)))}._variantGhost_9fz15_197{background-color:var(--button-bg, transparent);color:var(--button-fg, var(--muted-foreground))}._variantGhost_9fz15_197:hover{background-color:var(--button-bg-hover, var(--button-bg, var(--accent)));color:var(--button-fg-hover, var(--button-fg, var(--accent-foreground)))}._variantLink_9fz15_217{background-color:var(--button-bg, transparent);color:var(--button-fg, var(--link-foreground));text-underline-offset:4px}._variantLink_9fz15_217:hover{background-color:var(--button-bg-hover, var(--button-bg, transparent));color:var(--button-fg-hover, var(--button-fg, var(--link-foreground)));text-decoration:underline}._variantDefault_9fz15_127{--button-focus-ring: var(--primary-ring)}._variantDestructive_9fz15_143{--button-focus-ring: var(--destructive-ring)}._sizeDefault_9fz15_258{height:var(--control-height-md);padding:0 var(--space-4)}._sizeSm_9fz15_263{height:var(--control-height-sm);padding:0 var(--space-3);border-radius:var(--radius-sm)}._sizeLg_9fz15_269{height:var(--control-height-lg);padding:0 var(--space-6)}._button_9fz15_6[data-icon-only]{aspect-ratio:1;padding:0}._icon_9fz15_287{display:inline-flex}._icon_9fz15_287 svg{width:var(--icon-size-sm);height:var(--icon-size-sm)}._sizeLg_9fz15_269 ._icon_9fz15_287 svg{width:var(--icon-size-md);height:var(--icon-size-md)}._button_9fz15_6[data-loading] ._icon_9fz15_287,._button_9fz15_6[data-loading] ._label_9fz15_309{opacity:0}._spinner_9fz15_42{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;width:var(--icon-size-sm);height:var(--icon-size-sm);border:2px solid color-mix(in oklab,currentColor 25%,transparent);border-top-color:currentColor;border-radius:50%;animation:_button-spin_9fz15_1 .8s linear infinite}@keyframes _button-spin_9fz15_1{to{rotate:360deg}}@media(prefers-reduced-motion:reduce){._spinner_9fz15_42{animation-duration:2.4s}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._checkbox_1ckpy_6{box-sizing:border-box;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.25rem;height:1.25rem;padding:0;border:var(--border-width) solid var(--input);border-radius:var(--radius-sm);background-color:var(--surface-elevated);outline:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}._checkbox_1ckpy_6:after{content:"";position:absolute;inset:calc(-1 * var(--space-2)) calc(-1 * var(--space-3))}._checkbox_1ckpy_6[data-checked]{border-color:var(--primary);background-color:var(--primary);color:var(--primary-foreground)}._checkbox_1ckpy_6:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._checkbox_1ckpy_6:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._checkbox_1ckpy_6[data-disabled]{cursor:not-allowed;opacity:.42}._checkbox_1ckpy_6[aria-invalid=true]{border-color:var(--destructive)}._checkbox_1ckpy_6[aria-invalid=true][data-checked]{border-color:var(--primary)}._indicator_1ckpy_87{display:grid;place-content:center;color:currentcolor}._icon_1ckpy_93{width:.875rem;height:.875rem}._iconIndeterminate_1ckpy_100,._indicator_1ckpy_87[data-indeterminate] ._iconCheck_1ckpy_104{display:none}._indicator_1ckpy_87[data-indeterminate] ._iconIndeterminate_1ckpy_100{display:block}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._input_1v93o_6{box-sizing:border-box;display:block;width:100%;min-width:0;height:var(--control-height-lg);padding:var(--space-1) var(--space-3);border:var(--border-width) solid var(--input);border-radius:var(--radius-md);background-color:var(--surface-elevated);color:var(--foreground);font-family:inherit;font-size:1rem;line-height:1.5rem;outline:none;transition:color .15s ease,border-color .15s ease,box-shadow .15s ease}@media(min-width:768px){._input_1v93o_6{font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-body-weight);letter-spacing:var(--text-label-tracking)}}._input_1v93o_6::placeholder{color:var(--muted-foreground)}._input_1v93o_6::file-selector-button{display:inline-flex;height:1.75rem;border:0;background-color:transparent;color:var(--foreground);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-label-tracking)}._input_1v93o_6:focus-visible{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._input_1v93o_6:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._input_1v93o_6:disabled{cursor:not-allowed;opacity:.42}._input_1v93o_6[aria-invalid=true]{border-color:var(--destructive);box-shadow:inset 0 0 0 var(--ring-inset) var(--destructive)}._wrap_1v93o_122{position:relative;display:block;width:100%}._icon_1v93o_128{position:absolute;inset-inline-start:var(--space-3);top:50%;translate:0 -50%;display:inline-flex;color:var(--muted-foreground);pointer-events:none}._icon_1v93o_128 svg{width:var(--icon-size-sm);height:var(--icon-size-sm)}._end_1v93o_143{position:absolute;inset-inline-end:var(--space-2);top:50%;translate:0 -50%;display:inline-flex;align-items:center}._wrap_1v93o_122:has(._input_1v93o_6:disabled) ._icon_1v93o_128,._wrap_1v93o_122:has(._input_1v93o_6:disabled) ._end_1v93o_143{opacity:.42;pointer-events:none}._hasIcon_1v93o_172{padding-inline-start:calc(var(--space-3) + var(--icon-size-sm) + var(--space-2))}._hasEnd_1v93o_178{padding-inline-end:calc(var(--space-2) + var(--control-height-sm) + var(--space-1))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._group_19jni_6{display:grid;width:100%;gap:var(--space-3)}._item_19jni_12{box-sizing:border-box;position:relative;display:flex;flex-shrink:0;width:1.25rem;height:1.25rem;padding:0;border:var(--border-width) solid var(--input);border-radius:9999px;background-color:var(--surface-elevated);outline:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}._item_19jni_12:after{content:"";position:absolute;inset:calc(-1 * var(--space-2)) calc(-1 * var(--space-3))}._item_19jni_12[data-checked]{border-width:var(--border-width-focus);border-color:var(--primary)}._item_19jni_12:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._item_19jni_12:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._item_19jni_12[data-disabled]{cursor:not-allowed;opacity:.42}._item_19jni_12[aria-invalid=true]{border-color:var(--destructive)}._item_19jni_12[aria-invalid=true][data-checked]{border-color:var(--primary)}._indicator_19jni_93{display:flex;width:1rem;height:1rem;align-items:center;justify-content:center}._dot_19jni_101{position:absolute;top:50%;left:50%;width:.5rem;height:.5rem;transform:translate(-50%,-50%);border-radius:9999px;background-color:var(--primary)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._trigger_15wyz_6{box-sizing:border-box;display:flex;width:fit-content;align-items:center;justify-content:space-between;gap:var(--space-2);padding:var(--space-2) var(--space-2) var(--space-2) var(--space-3);border:var(--border-width) solid var(--input);border-radius:var(--radius-md);background-color:var(--surface-elevated);color:var(--foreground);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-body-weight);letter-spacing:var(--text-label-tracking);white-space:nowrap;outline:none;transition:color .15s ease,border-color .15s ease,box-shadow .15s ease}._trigger_15wyz_6[data-placeholder]{color:var(--muted-foreground)}._trigger_15wyz_6:focus-visible{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._trigger_15wyz_6:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._trigger_15wyz_6:disabled{cursor:not-allowed;opacity:.42}._trigger_15wyz_6[aria-invalid=true]{border-color:var(--destructive);box-shadow:inset 0 0 0 var(--ring-inset) var(--destructive)}._sizeDefault_15wyz_9{height:var(--control-height-lg)}._sizeSm_15wyz_9{height:var(--control-height-sm)}._variantFilter_15wyz_111{height:var(--control-height-md);color:var(--muted-foreground)}._triggerIcon_15wyz_116{pointer-events:none;flex-shrink:0;color:var(--muted-foreground)}._value_15wyz_122{display:flex;flex:1;align-items:center;gap:var(--space-2);overflow:hidden;text-align:start;text-overflow:ellipsis}._positioner_15wyz_132{isolation:isolate;z-index:50}._popup_15wyz_137{box-sizing:border-box;--select-scroll-arrow-height: calc(var(--icon-size-sm) + var(--space-1) * 2);display:flex;flex-direction:column;position:relative;isolation:isolate;z-index:50;max-height:var(--available-height);width:var(--anchor-width);min-width:9rem;overflow:hidden;border-radius:var(--radius-md);border:var(--border-width) solid var(--popover-border);background-color:var(--popover);color:var(--popover-foreground);box-shadow:var(--popover-shadow);transform-origin:var(--transform-origin);transition:opacity .1s ease,transform .1s ease}@media(prefers-reduced-motion:reduce){._popup_15wyz_137{transition:opacity .1s ease}}._popup_15wyz_137[data-starting-style],._popup_15wyz_137[data-ending-style]{opacity:0;transform:scale(.95)}._list_15wyz_151{overflow-x:hidden;overflow-y:auto;min-height:0;padding:var(--space-1)}._popup_15wyz_137 ._list_15wyz_151{scroll-padding-block:var(--select-scroll-arrow-height)}._group_15wyz_252{scroll-margin:var(--space-1) 0}._groupLabel_15wyz_256{padding:var(--space-1) var(--space-2);color:var(--muted-foreground);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height)}._item_15wyz_263{box-sizing:border-box;position:relative;display:flex;width:100%;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-8) var(--space-2) var(--space-2);border-radius:var(--radius-sm);cursor:default;-webkit-user-select:none;user-select:none;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);outline:none}._item_15wyz_263:focus,._item_15wyz_263[data-highlighted]{background-color:var(--accent);color:var(--accent-foreground)}._item_15wyz_263[data-disabled]{pointer-events:none;opacity:.42}._itemText_15wyz_306{display:flex;flex:1;flex-shrink:0;gap:var(--space-2);white-space:nowrap}._itemIndicator_15wyz_269{pointer-events:none;position:absolute;inset-inline-end:var(--space-2);display:flex;width:var(--icon-size-sm);height:var(--icon-size-sm);align-items:center;justify-content:center}._separator_15wyz_337{pointer-events:none;margin:var(--space-2) calc(-1 * var(--space-1));height:var(--border-width);background-color:var(--border)}._scrollArrow_15wyz_151{box-sizing:border-box;z-index:10;display:flex;width:100%;align-items:center;justify-content:center;padding:var(--space-1) 0;cursor:default;background-color:var(--popover)}._popup_15wyz_137 ._scrollArrow_15wyz_151{height:var(--select-scroll-arrow-height)}._scrollArrowUp_15wyz_377{top:0}._scrollArrowDown_15wyz_381{bottom:0}._svgIcon_15wyz_385{width:var(--icon-size-sm);height:var(--icon-size-sm);flex-shrink:0;pointer-events:none}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._switch_1baz9_6{box-sizing:border-box;position:relative;display:inline-flex;align-items:center;flex-shrink:0;padding:0;border:var(--border-width) solid transparent;border-radius:9999px;outline:none;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._switch_1baz9_6:after{content:"";position:absolute;inset:calc(-1 * var(--space-2)) calc(-1 * var(--space-3))}._switch_1baz9_6[data-checked]{background-color:var(--primary)}._switch_1baz9_6[data-unchecked]{background-color:var(--input)}._switch_1baz9_6:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._switch_1baz9_6:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._switch_1baz9_6[data-disabled]{cursor:not-allowed;opacity:.42}._switch_1baz9_6[aria-invalid=true]{border-color:var(--destructive)}._sizeDefault_1baz9_10{height:1.375rem;width:2.375rem}._sizeSm_1baz9_10{height:.875rem;width:1.5rem}._thumb_1baz9_87{pointer-events:none;display:block;border-radius:9999px;background-color:var(--primary-foreground);transition:transform .15s ease}@media(prefers-reduced-motion:reduce){._thumb_1baz9_87{transition:none}}._sizeDefault_1baz9_10 ._thumb_1baz9_87{width:1rem;height:1rem;margin-inline-start:2px}._sizeDefault_1baz9_10 ._thumb_1baz9_87[data-checked]{transform:translate(100%)}._sizeSm_1baz9_10 ._thumb_1baz9_87{width:.75rem;height:.75rem}._thumb_1baz9_87[data-checked]{transform:translate(calc(100% - 2px))}._thumb_1baz9_87[data-unchecked]{transform:translate(0)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._tableContainer_1j5xp_8{position:relative;width:100%;overflow-x:auto}._tableContainer_1j5xp_8:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._tableContainer_1j5xp_8:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._table_1j5xp_8{width:100%;border-collapse:separate;border-spacing:0 var(--space-2);caption-side:bottom;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-meta-weight);letter-spacing:var(--text-meta-tracking)}._tableRow_1j5xp_71{--table-row-ring: var(--border);--table-row-ring-inset: 0px;--table-row-fill: var(--surface-elevated)}._tableRow_1j5xp_71>:is(td,th){border-block:var(--border-width) solid var(--table-row-ring);background-color:var(--table-row-fill);box-shadow:inset 0 var(--table-row-ring-inset) 0 0 var(--table-row-ring),inset 0 calc(-1 * var(--table-row-ring-inset)) 0 0 var(--table-row-ring);transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._tableRow_1j5xp_71>:is(td,th):first-child{border-inline-start:var(--border-width) solid var(--table-row-ring);border-start-start-radius:var(--radius-md);border-end-start-radius:var(--radius-md);box-shadow:inset 0 var(--table-row-ring-inset) 0 0 var(--table-row-ring),inset 0 calc(-1 * var(--table-row-ring-inset)) 0 0 var(--table-row-ring),inset var(--table-row-ring-inset) 0 0 0 var(--table-row-ring)}._tableRow_1j5xp_71>:is(td,th):last-child{border-inline-end:var(--border-width) solid var(--table-row-ring);border-start-end-radius:var(--radius-md);border-end-end-radius:var(--radius-md);box-shadow:inset 0 var(--table-row-ring-inset) 0 0 var(--table-row-ring),inset 0 calc(-1 * var(--table-row-ring-inset)) 0 0 var(--table-row-ring),inset calc(-1 * var(--table-row-ring-inset)) 0 0 0 var(--table-row-ring)}._tableRow_1j5xp_71>:is(td,th):only-child{box-shadow:inset 0 0 0 var(--table-row-ring-inset) var(--table-row-ring)}._tableHeader_1j5xp_140 ._tableRow_1j5xp_71,._tableFooter_1j5xp_146 ._tableRow_1j5xp_71{--table-row-fill: var(--surface)}._tableFooter_1j5xp_146{font-weight:var(--text-label-weight)}._tableBody_1j5xp_163 ._tableRow_1j5xp_71:hover,._tableBody_1j5xp_163 ._tableRow_1j5xp_71:has([aria-expanded=true]){--table-row-fill: var(--card-hover)}._tableRow_1j5xp_71[data-state=selected]{--table-row-ring: var(--primary);--table-row-ring-inset: var(--ring-inset);--table-row-fill: var(--card-hover)}._tableRow_1j5xp_71[data-state=stale]{--table-row-ring: var(--warning)}._tableRow_1j5xp_71[data-state=restricted]{--table-row-ring: var(--danger)}._tableHead_1j5xp_59{box-sizing:border-box;height:var(--control-height-lg);padding:0 var(--space-4);text-align:start;vertical-align:middle;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-meta-tracking);text-transform:uppercase;white-space:nowrap;color:var(--subtle-foreground)}._tableHead_1j5xp_59:has([role=checkbox]){padding-inline-end:0}._tableCell_1j5xp_245{box-sizing:border-box;padding:var(--space-3) var(--space-4);vertical-align:middle;white-space:nowrap}._tableCell_1j5xp_245:has([role=checkbox]){padding-inline-end:0}._densityCompact_1j5xp_267 ._tableHead_1j5xp_59{height:var(--control-height-sm)}._densityCompact_1j5xp_267 ._tableCell_1j5xp_245{padding-block:var(--space-1)}._tableCaption_1j5xp_277{margin-top:var(--space-4);font-size:var(--text-body-size);line-height:var(--text-body-line-height);color:var(--muted-foreground)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tabs_17rkh_28,._list_17rkh_23,._trigger_17rkh_5,._content_17rkh_28{box-sizing:border-box}._tabs_17rkh_28{display:flex;gap:var(--space-2)}._tabs_17rkh_28[data-orientation=horizontal]{flex-direction:column}._list_17rkh_23{display:inline-flex;width:fit-content;align-items:center;justify-content:center;border-radius:var(--radius-lg);gap:var(--space-1);color:var(--muted-foreground)}._list_17rkh_23[data-orientation=horizontal]{height:var(--control-height-md)}._list_17rkh_23[data-orientation=vertical]{height:fit-content;flex-direction:column}._variantDefault_17rkh_84{background-color:transparent}._variantLine_17rkh_88{background-color:transparent;border-radius:0}._trigger_17rkh_5{position:relative;display:inline-flex;flex:1 1 0%;height:100%;align-items:center;justify-content:center;gap:var(--space-2);border:var(--border-width) solid transparent;border-radius:var(--radius-md);padding:var(--space-1) var(--space-3);background-color:transparent;color:var(--muted-foreground);font-family:inherit;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-label-tracking);white-space:nowrap;cursor:pointer;transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._trigger_17rkh_5[data-orientation=vertical]{width:100%;justify-content:flex-start}._trigger_17rkh_5:hover{color:var(--foreground)}._trigger_17rkh_5:focus-visible{outline:none;border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._trigger_17rkh_5:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._trigger_17rkh_5[data-disabled]{cursor:not-allowed;opacity:.42}._trigger_17rkh_5[data-active]{background-color:var(--surface-elevated);color:var(--foreground)}._trigger_17rkh_5:after{position:absolute;background-color:var(--foreground);opacity:0;transition:opacity .15s ease;content:""}._trigger_17rkh_5[data-orientation=horizontal]:after{inset-inline:0;bottom:calc(-1 * var(--space-1));height:.125rem}._trigger_17rkh_5[data-orientation=vertical]:after{inset-block:0;inset-inline-end:calc(-1 * var(--space-1));width:.125rem}._variantLine_17rkh_88 ._trigger_17rkh_5[data-active]{background-color:transparent;box-shadow:none}._variantLine_17rkh_88 ._trigger_17rkh_5[data-active]:after{opacity:1}._content_17rkh_28{flex:1 1 0%;font-size:var(--text-body-size);line-height:var(--text-body-line-height);outline:none}._content_17rkh_28:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._content_17rkh_28:focus-visible{outline:2px solid Highlight;outline-offset:2px}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._textarea_kwfxl_6{box-sizing:border-box;display:flex;field-sizing:content;min-height:4rem;width:100%;padding:var(--space-2) var(--space-3);border:var(--border-width) solid var(--input);border-radius:var(--radius-md);background-color:var(--surface-elevated);color:var(--foreground);font-family:inherit;font-size:1rem;line-height:1.5rem;outline:none;transition:color .15s ease,border-color .15s ease,box-shadow .15s ease}@media(min-width:768px){._textarea_kwfxl_6{font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-body-weight);letter-spacing:var(--text-label-tracking)}}._textarea_kwfxl_6::placeholder{color:var(--muted-foreground)}._textarea_kwfxl_6:focus-visible{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._textarea_kwfxl_6:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._textarea_kwfxl_6:disabled{cursor:not-allowed;opacity:.42}._textarea_kwfxl_6[aria-invalid=true]{border-color:var(--destructive);box-shadow:inset 0 0 0 var(--ring-inset) var(--destructive)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._viewport_1leeo_12{position:fixed;z-index:50;inset-inline:var(--space-4);bottom:var(--space-4);width:auto;max-width:24rem;margin-inline:auto;pointer-events:none;outline:none}@media(min-width:640px){._viewport_1leeo_12{right:var(--space-4);left:auto;width:100%;margin-inline:0}}._toast_1leeo_10{--gap: var(--space-3);--height: var(--toast-frontmost-height, var(--toast-height));--offset-y: calc( (var(--toast-offset-y) * -1) + (var(--toast-index) * var(--gap) * -1) + var(--toast-swipe-movement-y) );--peek: .75rem;--scale: max(0, 1 - (var(--toast-index) * .1)) ;--shrink: calc(1 - var(--scale));box-sizing:border-box;position:absolute;right:0;bottom:0;z-index:calc(1000 - var(--toast-index));width:100%;height:var(--height);border:var(--border-width) solid var(--popover-border);border-radius:var(--radius-xl);background-color:var(--popover);color:var(--popover-foreground);box-shadow:var(--popover-shadow);outline:none;-webkit-user-select:none;user-select:none;pointer-events:auto;transform-origin:bottom;transform:translate(var(--toast-swipe-movement-x)) translateY(calc(var(--toast-swipe-movement-y) - (var(--toast-index) * var(--peek)) - (var(--shrink) * var(--height)))) scale(var(--scale));will-change:transform;transition:transform .5s cubic-bezier(.22,1,.36,1),opacity .5s,height .15s}._toast_1leeo_10:focus-visible{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._toast_1leeo_10:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._toast_1leeo_10:after{content:"";position:absolute;top:100%;left:0;width:100%;height:calc(var(--gap) + 1px)}._toast_1leeo_10[data-expanded]{height:var(--toast-height);transform:translate(var(--toast-swipe-movement-x)) translateY(var(--offset-y))}._toast_1leeo_10[data-limited]{opacity:0}._toast_1leeo_10[data-starting-style]{transform:translateY(150%)}._toast_1leeo_10[data-ending-style]:not([data-limited]):not([data-swipe-direction]){transform:translateY(150%)}._toast_1leeo_10[data-ending-style][data-swipe-direction=down]{transform:translateY(calc(var(--toast-swipe-movement-y) + 150%))}._toast_1leeo_10[data-ending-style][data-swipe-direction=up]{transform:translateY(calc(var(--toast-swipe-movement-y) - 150%))}._toast_1leeo_10[data-ending-style][data-swipe-direction=left]{transform:translate(calc(var(--toast-swipe-movement-x) - 150%)) translateY(var(--offset-y))}._toast_1leeo_10[data-ending-style][data-swipe-direction=right]{transform:translate(calc(var(--toast-swipe-movement-x) + 150%)) translateY(var(--offset-y))}@media(prefers-reduced-motion:reduce){._toast_1leeo_10{transition:opacity .5s}}._content_1leeo_76{box-sizing:border-box;display:flex;align-items:center;height:100%;gap:var(--space-3);padding:var(--space-4);overflow:hidden;transition:opacity .25s cubic-bezier(.22,1,.36,1)}._content_1leeo_76[data-behind]{opacity:0}._content_1leeo_76[data-expanded]{opacity:1}._icon_1leeo_255{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm);pointer-events:none}._iconDestructive_1leeo_262{color:var(--destructive)}._iconSpin_1leeo_266{animation:_spin_1leeo_1 1s linear infinite}@media(prefers-reduced-motion:reduce){._iconSpin_1leeo_266{animation-duration:4s}}@keyframes _spin_1leeo_1{to{transform:rotate(360deg)}}._body_1leeo_291{display:flex;flex:1 1 0%;min-width:0;flex-direction:column;gap:var(--space-1)}._title_1leeo_303{margin:0;font-size:var(--text-body-size);line-height:var(--text-body-line-height);font-weight:var(--text-label-weight)}._description_1leeo_310{margin:0;color:var(--muted-foreground);font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._action_1leeo_318{flex-shrink:0}button._close_1leeo_325{position:relative;flex-shrink:0;color:var(--muted-foreground)}button._close_1leeo_325:hover{color:var(--foreground)}button._close_1leeo_325:after{content:"";position:absolute;inset:calc(-1 * var(--space-2))}._svgIcon_1leeo_348{width:var(--icon-size-sm);height:var(--icon-size-sm);flex-shrink:0;pointer-events:none}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
3
4
|
declare const badgeVariants: (props?: ({
|
|
4
5
|
variant?: "success" | "warning" | "info" | "danger" | "muted" | null | undefined;
|
|
5
|
-
shape?: "pill" | "
|
|
6
|
+
shape?: "pill" | "plain" | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
8
|
export interface BadgeProps extends useRender.ComponentProps<'span'>, VariantProps<typeof badgeVariants> {
|
|
9
|
+
/**
|
|
10
|
+
* Show the status dot, painted in the variant's accent color. Off by
|
|
11
|
+
* default; ignored when `icon` is present — the icon takes its place.
|
|
12
|
+
*/
|
|
13
|
+
dot?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Leading icon slot — decorative (`aria-hidden`), fixed 12px, painted in
|
|
16
|
+
* the variant's accent color like the dot it replaces. Wins over `dot`
|
|
17
|
+
* when both are set.
|
|
18
|
+
*/
|
|
19
|
+
icon?: ReactNode;
|
|
8
20
|
}
|
|
9
|
-
export declare function Badge({ className, variant, shape, render, ...props }: BadgeProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
21
|
+
export declare function Badge({ className, variant, shape, dot, icon, render, children, ...props }: BadgeProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
10
22
|
export {};
|
|
11
23
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAyBjD,QAAA,MAAM,aAAa;;;8EAkBjB,CAAC;AAEH,MAAM,WAAW,UACf,SAAQ,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC5E;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,8FAkCrG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,QAAA,M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,EACP,QAAQ,EACR,qBAAqB,EACrB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,+BA2Db"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { Input as InputPrimitive } from '@base-ui/react/input';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
export interface InputProps extends Omit<InputPrimitive.Props, 'className'> {
|
|
3
4
|
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Leading icon slot — decorative only: rendered aria-hidden with pointer
|
|
7
|
+
* events off, so it never carries the field's name or steals a click.
|
|
8
|
+
* Semantics stay on the input itself — a search field is `type="search"`
|
|
9
|
+
* plus a magnifier passed here.
|
|
10
|
+
*/
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Trailing slot for live content — an icon-button (clear, reveal
|
|
14
|
+
* password) or a small static adornment. Rendered after the <input> in
|
|
15
|
+
* the DOM, so tab order is field first, then slot. The input clears a
|
|
16
|
+
* compact icon-button's width (32px, size="sm") of end padding; anything
|
|
17
|
+
* wider is the consumer's padding to extend.
|
|
18
|
+
*/
|
|
19
|
+
end?: ReactNode;
|
|
4
20
|
}
|
|
5
|
-
export declare function Input({ className,
|
|
21
|
+
export declare function Input({ className, icon, end, disabled, ...props }: InputProps): import("react").JSX.Element;
|
|
6
22
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB;AAUD,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,+BA+C7E"}
|
|
@@ -22,7 +22,7 @@ export interface SelectTriggerProps extends Omit<SelectPrimitive.Trigger.Props,
|
|
|
22
22
|
className?: string;
|
|
23
23
|
}
|
|
24
24
|
export declare function SelectTrigger({ className, size, variant, children, ...props }: SelectTriggerProps): import("react").JSX.Element;
|
|
25
|
-
export interface SelectContentProps extends Omit<SelectPrimitive.Popup.Props, 'className'>, Pick<SelectPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | '
|
|
25
|
+
export interface SelectContentProps extends Omit<SelectPrimitive.Popup.Props, 'className'>, Pick<SelectPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'positionMethod' | 'collisionBoundary' | 'collisionPadding'> {
|
|
26
26
|
className?: string;
|
|
27
27
|
/**
|
|
28
28
|
* Where to portal the popup. Defaults to <body>. Pass a themed container
|
|
@@ -31,7 +31,7 @@ export interface SelectContentProps extends Omit<SelectPrimitive.Popup.Props, 'c
|
|
|
31
31
|
*/
|
|
32
32
|
container?: SelectPrimitive.Portal.Props['container'];
|
|
33
33
|
}
|
|
34
|
-
export declare function SelectContent({ className, children, container, side, sideOffset, align, alignOffset,
|
|
34
|
+
export declare function SelectContent({ className, children, container, side, sideOffset, align, alignOffset, positionMethod, collisionBoundary, collisionPadding, ...props }: SelectContentProps): import("react").JSX.Element;
|
|
35
35
|
export interface SelectGroupProps extends Omit<SelectPrimitive.Group.Props, 'className'> {
|
|
36
36
|
className?: string;
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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AK,EAAE,EAAE,oBAAoB,+BAE5E;AAED,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,WAAW,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,+BAStF;AAED,MAAM,WAAW,2BACf,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,eAAe,CAAC,EAAE,WAAW,CAAC;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,2BAA2B,+BAS1F"}
|
package/dist/docs/badge.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Badge
|
|
2
2
|
|
|
3
|
-
A status label:
|
|
4
|
-
pill or a bare
|
|
3
|
+
A status label: an intent-colored caption with an optional status dot or
|
|
4
|
+
icon, as a soft pill or a bare label. Badge has no Base UI primitive — it's a
|
|
5
5
|
styled `span`, plus a `render` prop (via Base UI's `useRender`/`mergeProps`
|
|
6
6
|
utilities) for the one case that needs it: rendering as a link.
|
|
7
7
|
|
|
@@ -19,10 +19,11 @@ orange is a misuse, not a style choice.
|
|
|
19
19
|
`beta`/`new` → `info`, anything neutral (`draft`, `archived`, a count,
|
|
20
20
|
a category) → `muted`.
|
|
21
21
|
- `shape="pill"` (default) on busy surfaces where the label needs its own
|
|
22
|
-
soft fill; `shape="
|
|
23
|
-
would be noise
|
|
22
|
+
soft fill; `shape="plain"` inline with text or in dense tables where a
|
|
23
|
+
fill would be noise. Add `dot` when the state deserves a colored marker,
|
|
24
|
+
or pass `icon` for a more specific one — neither renders by default.
|
|
24
25
|
- A clickable status filter — pass `render={<a href="..." />}`. The pill's
|
|
25
|
-
fill deepens on hover and the
|
|
26
|
+
fill deepens on hover and the plain shape underlines, but only when actually
|
|
26
27
|
rendered as a link; a plain badge stays visually inert and never looks
|
|
27
28
|
clickable when it isn't. The kit's focus ring appears automatically once
|
|
28
29
|
the anchor receives keyboard focus. Give it discernible text — a badge
|
|
@@ -41,7 +42,9 @@ orange is a misuse, not a style choice.
|
|
|
41
42
|
| Prop | Type | Default |
|
|
42
43
|
|------|------|---------|
|
|
43
44
|
| `variant` | `success` \| `warning` \| `info` \| `danger` \| `muted` | `muted` |
|
|
44
|
-
| `shape` | `pill` \| `
|
|
45
|
+
| `shape` | `pill` \| `plain` | `pill` |
|
|
46
|
+
| `dot` | `boolean` — show the status dot in the variant's accent color; ignored when `icon` is set | `false` |
|
|
47
|
+
| `icon` | `ReactNode` — leading icon, decorative (`aria-hidden`), 12px, accent-colored; replaces the dot | — |
|
|
45
48
|
| `render` | `ReactElement` — replaces the root `span`, e.g. with an `<a>` | — |
|
|
46
49
|
| `className` | `string` — merged after the variant/shape classes | — |
|
|
47
50
|
|
|
@@ -61,8 +64,14 @@ import { Badge } from '@gears-frontx/ui-kit';
|
|
|
61
64
|
<Badge variant="info">Beta</Badge>
|
|
62
65
|
<Badge>Draft</Badge> // muted is the default variant
|
|
63
66
|
|
|
64
|
-
//
|
|
65
|
-
<Badge variant="success"
|
|
67
|
+
// Status dot is opt-in
|
|
68
|
+
<Badge variant="success" dot>Running</Badge>
|
|
69
|
+
|
|
70
|
+
// Bare label for dense/inline placements (dot optional there too)
|
|
71
|
+
<Badge variant="success" shape="plain" dot>Online</Badge>
|
|
72
|
+
|
|
73
|
+
// A custom marker instead of the dot
|
|
74
|
+
<Badge variant="info" icon={<BetaIcon />}>Beta</Badge>
|
|
66
75
|
|
|
67
76
|
// A badge that is actually a link — hover feedback only applies here
|
|
68
77
|
<Badge variant="info" render={<a href="/filters/open" />}>
|
|
@@ -80,3 +89,8 @@ import { Badge } from '@gears-frontx/ui-kit';
|
|
|
80
89
|
appears when the badge actually renders as a link via `render`.
|
|
81
90
|
- Do not nest interactive controls inside a Badge — it is a label, not a
|
|
82
91
|
container.
|
|
92
|
+
- Do not pass both `icon` and `dot` expecting both to render — `icon`
|
|
93
|
+
replaces the dot by design.
|
|
94
|
+
- Do not drop an icon into Badge's children (`<Badge><Icon />label</Badge>`)
|
|
95
|
+
— the kit no longer sizes a bare svg child; use the `icon` prop, which is
|
|
96
|
+
sized and accent-colored automatically.
|