@gears-frontx/ui-kit 0.3.0-alpha.1
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/LICENSE +201 -0
- package/NOTICE +49 -0
- package/README.md +75 -0
- package/dist/badge.d.ts +1 -0
- package/dist/badge.js +42 -0
- package/dist/badge.js.map +1 -0
- package/dist/button.d.ts +1 -0
- package/dist/button.js +73 -0
- package/dist/button.js.map +1 -0
- package/dist/card.d.ts +1 -0
- package/dist/card.js +54 -0
- package/dist/card.js.map +1 -0
- package/dist/checkbox.d.ts +1 -0
- package/dist/checkbox.js +46 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/chunks/badge.ej-3-Xs4.css +1 -0
- package/dist/chunks/button.CKfALaMe.css +1 -0
- package/dist/chunks/card.B0AcyAT1.css +1 -0
- package/dist/chunks/checkbox.Dd6YDr20.css +1 -0
- package/dist/chunks/dialog.D6LS2vnG.css +1 -0
- package/dist/chunks/dropdown-menu.DmDZc5gB.css +1 -0
- package/dist/chunks/field.BNZx8HfN.css +1 -0
- package/dist/chunks/input.CrRQ0OAn.css +1 -0
- package/dist/chunks/label.jrB9zD_G.css +1 -0
- package/dist/chunks/radio-group.1Y6B0lXt.css +1 -0
- package/dist/chunks/select.BmyP2S2q.css +1 -0
- package/dist/chunks/separator.DdRRkJW4.css +1 -0
- package/dist/chunks/skeleton.BhWSzPnI.css +1 -0
- package/dist/chunks/switch.B_ebMSxR.css +1 -0
- package/dist/chunks/table.r8ppNt1W.css +1 -0
- package/dist/chunks/tabs.DqJE9cX3.css +1 -0
- package/dist/chunks/textarea.BKWvs6fD.css +1 -0
- package/dist/chunks/toast.DMl31Mq4.css +1 -0
- package/dist/chunks/tooltip.apA3VWHJ.css +1 -0
- package/dist/components/badge/badge.d.ts +11 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/public.d.ts +2 -0
- package/dist/components/badge/public.d.ts.map +1 -0
- package/dist/components/button/button.d.ts +50 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/public.d.ts +2 -0
- package/dist/components/button/public.d.ts.map +1 -0
- package/dist/components/card/card.d.ts +22 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/public.d.ts +2 -0
- package/dist/components/card/public.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +6 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/public.d.ts +2 -0
- package/dist/components/checkbox/public.d.ts.map +1 -0
- package/dist/components/dialog/dialog.d.ts +58 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -0
- package/dist/components/dialog/public.d.ts +2 -0
- package/dist/components/dialog/public.d.ts.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +70 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/public.d.ts +2 -0
- package/dist/components/dropdown-menu/public.d.ts.map +1 -0
- package/dist/components/field/field.d.ts +18 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/public.d.ts +2 -0
- package/dist/components/field/public.d.ts.map +1 -0
- package/dist/components/input/input.d.ts +6 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/public.d.ts +2 -0
- package/dist/components/input/public.d.ts.map +1 -0
- package/dist/components/label/label.d.ts +4 -0
- package/dist/components/label/label.d.ts.map +1 -0
- package/dist/components/label/public.d.ts +2 -0
- package/dist/components/label/public.d.ts.map +1 -0
- package/dist/components/radio-group/public.d.ts +2 -0
- package/dist/components/radio-group/public.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +11 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/select/public.d.ts +2 -0
- package/dist/components/select/public.d.ts.map +1 -0
- package/dist/components/select/select.d.ts +61 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/separator/public.d.ts +2 -0
- package/dist/components/separator/public.d.ts.map +1 -0
- package/dist/components/separator/separator.d.ts +6 -0
- package/dist/components/separator/separator.d.ts.map +1 -0
- package/dist/components/skeleton/public.d.ts +2 -0
- package/dist/components/skeleton/public.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/switch/public.d.ts +2 -0
- package/dist/components/switch/public.d.ts.map +1 -0
- package/dist/components/switch/switch.d.ts +11 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/table/public.d.ts +2 -0
- package/dist/components/table/public.d.ts.map +1 -0
- package/dist/components/table/table.d.ts +38 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/tabs/public.d.ts +2 -0
- package/dist/components/tabs/public.d.ts.map +1 -0
- package/dist/components/tabs/tabs.d.ts +23 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/textarea/public.d.ts +2 -0
- package/dist/components/textarea/public.d.ts.map +1 -0
- package/dist/components/textarea/textarea.d.ts +4 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/toast/public.d.ts +2 -0
- package/dist/components/toast/public.d.ts.map +1 -0
- package/dist/components/toast/toast.d.ts +85 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/tooltip/public.d.ts +2 -0
- package/dist/components/tooltip/public.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +41 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/dialog.d.ts +1 -0
- package/dist/dialog.js +84 -0
- package/dist/dialog.js.map +1 -0
- package/dist/docs/badge.md +82 -0
- package/dist/docs/button.md +102 -0
- package/dist/docs/card.md +131 -0
- package/dist/docs/checkbox.md +55 -0
- package/dist/docs/dialog.md +124 -0
- package/dist/docs/dropdown-menu.md +140 -0
- package/dist/docs/field.md +68 -0
- package/dist/docs/input.md +65 -0
- package/dist/docs/label.md +50 -0
- package/dist/docs/radio-group.md +59 -0
- package/dist/docs/select.md +99 -0
- package/dist/docs/separator.md +119 -0
- package/dist/docs/skeleton.md +143 -0
- package/dist/docs/switch.md +51 -0
- package/dist/docs/table.md +276 -0
- package/dist/docs/tabs.md +124 -0
- package/dist/docs/textarea.md +52 -0
- package/dist/docs/toast.md +153 -0
- package/dist/docs/tooltip.md +134 -0
- package/dist/dropdown-menu.d.ts +1 -0
- package/dist/dropdown-menu.js +183 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/field.d.ts +1 -0
- package/dist/field.js +28 -0
- package/dist/field.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -0
- package/dist/input.d.ts +1 -0
- package/dist/input.js +30 -0
- package/dist/input.js.map +1 -0
- package/dist/label.d.ts +1 -0
- package/dist/label.js +12 -0
- package/dist/label.js.map +1 -0
- package/dist/radio-group.d.ts +1 -0
- package/dist/radio-group.js +21 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/select.d.ts +1 -0
- package/dist/select.js +175 -0
- package/dist/select.js.map +1 -0
- package/dist/separator.d.ts +1 -0
- package/dist/separator.js +13 -0
- package/dist/separator.js.map +1 -0
- package/dist/skeleton.d.ts +1 -0
- package/dist/skeleton.js +12 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/switch.d.ts +1 -0
- package/dist/switch.js +26 -0
- package/dist/switch.js.map +1 -0
- package/dist/table.d.ts +1 -0
- package/dist/table.js +64 -0
- package/dist/table.js.map +1 -0
- package/dist/tabs.d.ts +1 -0
- package/dist/tabs.js +41 -0
- package/dist/tabs.js.map +1 -0
- package/dist/textarea.d.ts +1 -0
- package/dist/textarea.js +13 -0
- package/dist/textarea.js.map +1 -0
- package/dist/theme.css +485 -0
- package/dist/toast.d.ts +1 -0
- package/dist/toast.js +193 -0
- package/dist/toast.js.map +1 -0
- package/dist/tooltip.d.ts +1 -0
- package/dist/tooltip.js +49 -0
- package/dist/tooltip.js.map +1 -0
- package/llms.txt +148 -0
- package/package.json +85 -0
package/dist/select.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Select as n } from "@base-ui/react/select";
|
|
3
|
+
import { cx as a, cva as v } from "class-variance-authority";
|
|
4
|
+
import './chunks/select.BmyP2S2q.css';const w = "_trigger_982bm_6", S = "_sizeDefault_982bm_9", I = "_sizeSm_982bm_9", h = "_variantDefault_982bm_100", A = "_variantFilter_982bm_109", N = "_triggerIcon_982bm_114", D = "_value_982bm_120", x = "_positioner_982bm_130", L = "_popup_982bm_135", z = "_group_982bm_193", k = "_groupLabel_982bm_198", T = "_item_982bm_205", U = "_itemText_982bm_248", j = "_itemIndicator_982bm_211", B = "_separator_982bm_267", C = "_scrollArrow_982bm_274", F = "_scrollArrowUp_982bm_285", V = "_scrollArrowDown_982bm_289", G = "_svgIcon_982bm_293", e = {
|
|
5
|
+
trigger: w,
|
|
6
|
+
sizeDefault: S,
|
|
7
|
+
sizeSm: I,
|
|
8
|
+
variantDefault: h,
|
|
9
|
+
variantFilter: A,
|
|
10
|
+
triggerIcon: N,
|
|
11
|
+
value: D,
|
|
12
|
+
positioner: x,
|
|
13
|
+
popup: L,
|
|
14
|
+
group: z,
|
|
15
|
+
groupLabel: k,
|
|
16
|
+
item: T,
|
|
17
|
+
itemText: U,
|
|
18
|
+
itemIndicator: j,
|
|
19
|
+
separator: B,
|
|
20
|
+
scrollArrow: C,
|
|
21
|
+
scrollArrowUp: F,
|
|
22
|
+
scrollArrowDown: V,
|
|
23
|
+
svgIcon: G
|
|
24
|
+
};
|
|
25
|
+
function u({ direction: t, className: o }) {
|
|
26
|
+
return /* @__PURE__ */ r(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
className: a(e.svgIcon, o),
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
fill: "none",
|
|
32
|
+
stroke: "currentColor",
|
|
33
|
+
strokeWidth: "2",
|
|
34
|
+
strokeLinecap: "round",
|
|
35
|
+
strokeLinejoin: "round",
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
children: /* @__PURE__ */ r("path", { d: t === "down" ? "m6 9 6 6 6-6" : "m18 15-6-6-6 6" })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
const q = n.Root;
|
|
42
|
+
function E({ className: t, ...o }) {
|
|
43
|
+
return /* @__PURE__ */ r(n.Value, { className: a(e.value, t), ...o });
|
|
44
|
+
}
|
|
45
|
+
const P = v(e.trigger, {
|
|
46
|
+
variants: {
|
|
47
|
+
size: {
|
|
48
|
+
default: e.sizeDefault,
|
|
49
|
+
sm: e.sizeSm
|
|
50
|
+
},
|
|
51
|
+
/*
|
|
52
|
+
* `filter` is the mockups' Field/filter type (Figma frame 193:433): the
|
|
53
|
+
* same select, compacted into a toolbar filter chip — 36px, label in
|
|
54
|
+
* --muted-foreground even with a value chosen, because in a filter the
|
|
55
|
+
* enduring message is "this narrows the list", not the picked value.
|
|
56
|
+
*/
|
|
57
|
+
variant: {
|
|
58
|
+
default: e.variantDefault,
|
|
59
|
+
filter: e.variantFilter
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
defaultVariants: {
|
|
63
|
+
size: "default",
|
|
64
|
+
variant: "default"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
function H({ className: t, size: o, variant: c, children: i, ...s }) {
|
|
68
|
+
return /* @__PURE__ */ l(n.Trigger, { className: P({ size: o, variant: c, className: t }), ...s, children: [
|
|
69
|
+
i,
|
|
70
|
+
/* @__PURE__ */ r(n.Icon, { render: /* @__PURE__ */ r(u, { direction: "down", className: e.triggerIcon }) })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
function J({
|
|
74
|
+
className: t,
|
|
75
|
+
children: o,
|
|
76
|
+
container: c,
|
|
77
|
+
side: i = "bottom",
|
|
78
|
+
sideOffset: s = 4,
|
|
79
|
+
align: _ = "center",
|
|
80
|
+
alignOffset: p = 0,
|
|
81
|
+
alignItemWithTrigger: m = !0,
|
|
82
|
+
positionMethod: d,
|
|
83
|
+
collisionBoundary: g,
|
|
84
|
+
collisionPadding: f,
|
|
85
|
+
...b
|
|
86
|
+
}) {
|
|
87
|
+
return /* @__PURE__ */ r(n.Portal, { container: c, children: /* @__PURE__ */ r(
|
|
88
|
+
n.Positioner,
|
|
89
|
+
{
|
|
90
|
+
side: i,
|
|
91
|
+
sideOffset: s,
|
|
92
|
+
align: _,
|
|
93
|
+
alignOffset: p,
|
|
94
|
+
alignItemWithTrigger: m,
|
|
95
|
+
positionMethod: d,
|
|
96
|
+
collisionBoundary: g,
|
|
97
|
+
collisionPadding: f,
|
|
98
|
+
className: e.positioner,
|
|
99
|
+
children: /* @__PURE__ */ l(
|
|
100
|
+
n.Popup,
|
|
101
|
+
{
|
|
102
|
+
"data-align-trigger": m,
|
|
103
|
+
className: a(e.popup, t),
|
|
104
|
+
...b,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ r(y, {}),
|
|
107
|
+
/* @__PURE__ */ r(n.List, { children: o }),
|
|
108
|
+
/* @__PURE__ */ r(M, {})
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
) });
|
|
114
|
+
}
|
|
115
|
+
function K({ className: t, ...o }) {
|
|
116
|
+
return /* @__PURE__ */ r(n.Group, { className: a(e.group, t), ...o });
|
|
117
|
+
}
|
|
118
|
+
function O({ className: t, ...o }) {
|
|
119
|
+
return /* @__PURE__ */ r(n.GroupLabel, { className: a(e.groupLabel, t), ...o });
|
|
120
|
+
}
|
|
121
|
+
function Q({ className: t, children: o, ...c }) {
|
|
122
|
+
return /* @__PURE__ */ l(n.Item, { className: a(e.item, t), ...c, children: [
|
|
123
|
+
/* @__PURE__ */ r(n.ItemText, { className: e.itemText, children: o }),
|
|
124
|
+
/* @__PURE__ */ r(n.ItemIndicator, { render: /* @__PURE__ */ r("span", { className: e.itemIndicator }), children: /* @__PURE__ */ r(
|
|
125
|
+
"svg",
|
|
126
|
+
{
|
|
127
|
+
className: e.svgIcon,
|
|
128
|
+
viewBox: "0 0 24 24",
|
|
129
|
+
fill: "none",
|
|
130
|
+
stroke: "currentColor",
|
|
131
|
+
strokeWidth: "2",
|
|
132
|
+
strokeLinecap: "round",
|
|
133
|
+
strokeLinejoin: "round",
|
|
134
|
+
"aria-hidden": "true",
|
|
135
|
+
children: /* @__PURE__ */ r("path", { d: "M20 6 9 17l-5-5" })
|
|
136
|
+
}
|
|
137
|
+
) })
|
|
138
|
+
] });
|
|
139
|
+
}
|
|
140
|
+
function X({ className: t, ...o }) {
|
|
141
|
+
return /* @__PURE__ */ r(n.Separator, { className: a(e.separator, t), ...o });
|
|
142
|
+
}
|
|
143
|
+
function y({ className: t, ...o }) {
|
|
144
|
+
return /* @__PURE__ */ r(
|
|
145
|
+
n.ScrollUpArrow,
|
|
146
|
+
{
|
|
147
|
+
className: a(e.scrollArrow, e.scrollArrowUp, t),
|
|
148
|
+
...o,
|
|
149
|
+
children: /* @__PURE__ */ r(u, { direction: "up" })
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
function M({ className: t, ...o }) {
|
|
154
|
+
return /* @__PURE__ */ r(
|
|
155
|
+
n.ScrollDownArrow,
|
|
156
|
+
{
|
|
157
|
+
className: a(e.scrollArrow, e.scrollArrowDown, t),
|
|
158
|
+
...o,
|
|
159
|
+
children: /* @__PURE__ */ r(u, { direction: "down" })
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
export {
|
|
164
|
+
q as Select,
|
|
165
|
+
J as SelectContent,
|
|
166
|
+
K as SelectGroup,
|
|
167
|
+
Q as SelectItem,
|
|
168
|
+
O as SelectLabel,
|
|
169
|
+
M as SelectScrollDownButton,
|
|
170
|
+
y as SelectScrollUpButton,
|
|
171
|
+
X as SelectSeparator,
|
|
172
|
+
H as SelectTrigger,
|
|
173
|
+
E as SelectValue
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../src/components/select/select.tsx"],"sourcesContent":["import { Select as SelectPrimitive } from '@base-ui/react/select';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport styles from './select.module.css';\n\n/* Inline lucide paths (ISC) — the kit carries no icon dependency. */\nfunction Chevron({ direction, className }: { direction: 'up' | 'down'; className?: string }) {\n return (\n <svg\n className={cx(styles.svgIcon, className)}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d={direction === 'down' ? 'm6 9 6 6 6-6' : 'm18 15-6-6-6 6'} />\n </svg>\n );\n}\n\nexport const Select = SelectPrimitive.Root;\n/**\n * The root is a Base UI pass-through, but its props type is still exported:\n * a consumer writing a typed wrapper imports it from this kit — Base UI is\n * this package's dependency, not necessarily theirs. Generic like the root\n * itself: `Value` is the selected value's type, `Multiple` widens `value`/\n * `onValueChange` to arrays when true.\n */\nexport type SelectProps<\n Value,\n Multiple extends boolean | undefined = false,\n> = SelectPrimitive.Root.Props<Value, Multiple>;\n\nexport interface SelectValueProps extends Omit<SelectPrimitive.Value.Props, 'className'> {\n className?: string;\n}\n\nexport function SelectValue({ className, ...props }: SelectValueProps) {\n return <SelectPrimitive.Value className={cx(styles.value, className)} {...props} />;\n}\n\nconst triggerVariants = cva(styles.trigger, {\n variants: {\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n },\n /*\n * `filter` is the mockups' Field/filter type (Figma frame 193:433): the\n * same select, compacted into a toolbar filter chip — 36px, label in\n * --muted-foreground even with a value chosen, because in a filter the\n * enduring message is \"this narrows the list\", not the picked value.\n */\n variant: {\n default: styles.variantDefault,\n filter: styles.variantFilter,\n },\n },\n defaultVariants: {\n size: 'default',\n variant: 'default',\n },\n});\n\nexport interface SelectTriggerProps\n extends Omit<SelectPrimitive.Trigger.Props, 'className'>, VariantProps<typeof triggerVariants> {\n className?: string;\n}\n\nexport function SelectTrigger({ className, size, variant, children, ...props }: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger className={triggerVariants({ size, variant, className })} {...props}>\n {children}\n <SelectPrimitive.Icon render={<Chevron direction=\"down\" className={styles.triggerIcon} />} />\n </SelectPrimitive.Trigger>\n );\n}\n\nexport interface SelectContentProps\n extends Omit<SelectPrimitive.Popup.Props, 'className'>,\n Pick<\n SelectPrimitive.Positioner.Props,\n // positionMethod/collision*: see dropdown-menu.tsx — the escape hatch\n // for anchors inside a transform/filter container.\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'alignItemWithTrigger'\n | 'positionMethod'\n | 'collisionBoundary'\n | 'collisionPadding'\n > {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a section rather\n * than <html>) so the popup inherits its tokens and font.\n */\n container?: SelectPrimitive.Portal.Props['container'];\n}\n\nexport function SelectContent({\n className,\n children,\n container,\n side = 'bottom',\n sideOffset = 4,\n align = 'center',\n alignOffset = 0,\n alignItemWithTrigger = true,\n positionMethod,\n collisionBoundary,\n collisionPadding,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal container={container}>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n positionMethod={positionMethod}\n collisionBoundary={collisionBoundary}\n collisionPadding={collisionPadding}\n className={styles.positioner}\n >\n <SelectPrimitive.Popup\n data-align-trigger={alignItemWithTrigger}\n className={cx(styles.popup, className)}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n );\n}\n\nexport interface SelectGroupProps extends Omit<SelectPrimitive.Group.Props, 'className'> {\n className?: string;\n}\n\nexport function SelectGroup({ className, ...props }: SelectGroupProps) {\n return <SelectPrimitive.Group className={cx(styles.group, className)} {...props} />;\n}\n\nexport interface SelectLabelProps extends Omit<SelectPrimitive.GroupLabel.Props, 'className'> {\n className?: string;\n}\n\nexport function SelectLabel({ className, ...props }: SelectLabelProps) {\n return <SelectPrimitive.GroupLabel className={cx(styles.groupLabel, className)} {...props} />;\n}\n\nexport interface SelectItemProps extends Omit<SelectPrimitive.Item.Props, 'className'> {\n className?: string;\n children?: ReactNode;\n}\n\nexport function SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item className={cx(styles.item, className)} {...props}>\n <SelectPrimitive.ItemText className={styles.itemText}>{children}</SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator render={<span className={styles.itemIndicator} />}>\n <svg\n className={styles.svgIcon}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n}\n\nexport interface SelectSeparatorProps extends Omit<SelectPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\nexport function SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return <SelectPrimitive.Separator className={cx(styles.separator, className)} {...props} />;\n}\n\nexport interface SelectScrollUpButtonProps\n extends Omit<ComponentProps<typeof SelectPrimitive.ScrollUpArrow>, 'className'> {\n className?: string;\n}\n\nexport function SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpArrow\n className={cx(styles.scrollArrow, styles.scrollArrowUp, className)}\n {...props}\n >\n <Chevron direction=\"up\" />\n </SelectPrimitive.ScrollUpArrow>\n );\n}\n\nexport interface SelectScrollDownButtonProps\n extends Omit<ComponentProps<typeof SelectPrimitive.ScrollDownArrow>, 'className'> {\n className?: string;\n}\n\nexport function SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownArrow\n className={cx(styles.scrollArrow, styles.scrollArrowDown, className)}\n {...props}\n >\n <Chevron direction=\"down\" />\n </SelectPrimitive.ScrollDownArrow>\n );\n}\n"],"names":["Chevron","direction","className","jsx","cx","styles","Select","SelectPrimitive","SelectValue","props","triggerVariants","cva","SelectTrigger","size","variant","children","jsxs","SelectContent","container","side","sideOffset","align","alignOffset","alignItemWithTrigger","positionMethod","collisionBoundary","collisionPadding","SelectScrollUpButton","SelectScrollDownButton","SelectGroup","SelectLabel","SelectItem","SelectSeparator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAOA,SAASA,EAAQ,EAAE,WAAAC,GAAW,WAAAC,KAA+D;AAC3F,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAGC,EAAO,SAASH,CAAS;AAAA,MACvC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAY;AAAA,MAEZ,4BAAC,QAAA,EAAK,GAAGD,MAAc,SAAS,iBAAiB,iBAAA,CAAkB;AAAA,IAAA;AAAA,EAAA;AAGzE;AAEO,MAAMK,IAASC,EAAgB;AAiB/B,SAASC,EAAY,EAAE,WAAAN,GAAW,GAAGO,KAA2B;AACrE,SAAO,gBAAAN,EAACI,EAAgB,OAAhB,EAAsB,WAAWH,EAAGC,EAAO,OAAOH,CAAS,GAAI,GAAGO,EAAA,CAAO;AACnF;AAEA,MAAMC,IAAkBC,EAAIN,EAAO,SAAS;AAAA,EAC1C,UAAU;AAAA,IACR,MA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eAAc;AAAA,QACd,gBAAe;AAAA,QACf,eAAY;AAAA,QAEZ,UAAA,gBAAAF,EAAC,QAAA,EAAK,GAAE,kBAAA,CAAkB;AAAA,MAAA;AAAA,IAAA,EAC5B,CACF;AAAA,EAAA,GACF;AAEJ;AAMO,SAAS6B,EAAgB,EAAE,WAAA9B,GAAW,GAAGO,KAA+B;AAC7E,SAAO,gBAAAN,EAACI,EAAgB,WAAhB,EAA0B,WAAWH,EAAGC,EAAO,WAAWH,CAAS,GAAI,GAAGO,EAAA,CAAO;AAC3F;AAOO,SAASkB,EAAqB,EAAE,WAAAzB,GAAW,GAAGO,KAAoC;AACvF,SACE,gBAAAN;AAAA,IAACI,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWH,EAAGC,EAAO,aAAaA,EAAO,eAAeH,CAAS;AAAA,MAChE,GAAGO;AAAA,MAEJ,UAAA,gBAAAN,EAACH,GAAA,EAAQ,WAAU,KAAA,CAAK;AAAA,IAAA;AAAA,EAAA;AAG9B;AAOO,SAAS4B,EAAuB,EAAE,WAAA1B,GAAW,GAAGO,KAAsC;AAC3F,SACE,gBAAAN;AAAA,IAACI,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWH,EAAGC,EAAO,aAAaA,EAAO,iBAAiBH,CAAS;AAAA,MAClE,GAAGO;AAAA,MAEJ,UAAA,gBAAAN,EAACH,GAAA,EAAQ,WAAU,OAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGhC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/separator/public.js'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Separator as t } from "@base-ui/react/separator";
|
|
3
|
+
import { cx as e } from "class-variance-authority";
|
|
4
|
+
import './chunks/separator.DdRRkJW4.css';const s = "_separator_4embg_12", p = {
|
|
5
|
+
separator: s
|
|
6
|
+
};
|
|
7
|
+
function f({ className: r, ...a }) {
|
|
8
|
+
return /* @__PURE__ */ o(t, { className: e(p.separator, r), ...a });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
f as Separator
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","sources":["../src/components/separator/separator.tsx"],"sourcesContent":["import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';\nimport { cx } from 'class-variance-authority';\n\nimport styles from './separator.module.css';\n\n/*\n * base-vega's own Separator is a thin wrapper: orientation defaults to\n * 'horizontal' and every other prop passes through untouched — no variant\n * logic, hence no cva here (unlike Badge/Tabs). It also renders\n * `data-slot=\"separator\"` (base-vega's own devtools/testing-hook\n * convention); this kit drops `data-slot` everywhere (see card.tsx), so\n * its absence here is that same standing decision, not an oversight.\n *\n * Unlike Radix's Separator, Base UI's has no `decorative` boolean. Its\n * source (node_modules/@base-ui/react/separator/Separator.js) always sets\n * `role=\"separator\"` and `aria-orientation` from its internal props object,\n * merged *before* the consumer's own `elementProps`. Base UI's `mergeProps`\n * is rightmost-wins for plain attributes (see merge-props/mergeProps.js),\n * and `elementProps` is the rightmost entry in that merge — so a consumer\n * who passes `aria-hidden=\"true\"` directly gets that value on the DOM node\n * instead. That's the documented way to get a purely decorative divider:\n * per WAI-ARIA, `role=\"separator\"` announces a structural landmark, which\n * is wrong for a divider that conveys no structure of its own.\n * `role=\"none\"` alone is NOT an equivalent opt-out: `aria-orientation`\n * stays set regardless of `role` (Base UI applies it unconditionally,\n * independently of the role override), and `aria-orientation` on a role\n * that doesn't permit it is an `aria-allowed-attr` violation —\n * `aria-hidden=\"true\"` sidesteps this entirely by removing the element\n * from the accessibility tree, role and all. base-vega doesn't add a\n * `decorative` prop either, so this kit doesn't invent one — see\n * separator.md for the worked example. Note decorative is likely the more\n * common real-world case (shadcn's own Radix-based styles default their\n * wrapper's `decorative` to `true`); base-vega's own wrapper is\n * semantic-by-default only because Base UI has nothing else to default\n * to, and this kit stays faithful to that rather than restoring Radix's\n * default via its own logic.\n *\n * DropdownMenuSeparator (dropdown-menu.tsx) and SelectSeparator\n * (select.tsx) already wrap this exact same Base UI primitive\n * (@base-ui/react/menu and @base-ui/react/select both re-export it\n * verbatim — see menu/index.parts.d.ts and select/index.parts.d.ts) but\n * keep their own styling, and deliberately stay that way here too:\n * base-vega itself styles all three as independent registry items with\n * different classes (`-mx-1 my-1 h-px bg-border`, bleeding into the\n * popup's padding, vs. this component's `shrink-0` full-bleed divider with\n * no margin management) — the shared primitive is an implementation detail\n * of three separate visual roles, not a cue to unify them.\n */\nexport interface SeparatorProps extends Omit<SeparatorPrimitive.Props, 'className'> {\n className?: string;\n}\n\nexport function Separator({ className, ...props }: SeparatorProps) {\n return <SeparatorPrimitive className={cx(styles.separator, className)} {...props} />;\n}\n"],"names":["Separator","className","props","jsx","SeparatorPrimitive","cx","styles"],"mappings":";;;;;;AAoDO,SAASA,EAAU,EAAE,WAAAC,GAAW,GAAGC,KAAyB;AACjE,SAAO,gBAAAC,EAACC,KAAmB,WAAWC,EAAGC,EAAO,WAAWL,CAAS,GAAI,GAAGC,GAAO;AACpF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/skeleton/public.js'
|
package/dist/skeleton.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cx as s } from "class-variance-authority";
|
|
3
|
+
import './chunks/skeleton.BhWSzPnI.css';const n = "_skeleton_vj633_15", l = {
|
|
4
|
+
skeleton: n
|
|
5
|
+
};
|
|
6
|
+
function k({ className: e, ...o }) {
|
|
7
|
+
return /* @__PURE__ */ t("div", { className: s(l.skeleton, e), ...o });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
k as Skeleton
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","sources":["../src/components/skeleton/skeleton.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport styles from './skeleton.module.css';\n\n/*\n * Skeleton has no Base UI primitive (registry/base-vega ships a plain `div`\n * with a data-slot marker) — this is a pure styling translation over a\n * native element, same shape as Card (see card.tsx).\n *\n * No ARIA is added here. base-vega's own Skeleton carries none, and Base UI\n * has no primitive to defer to either — the same standing policy Separator\n * established: this kit does not invent an ARIA prop neither the source nor\n * a primitive supplies. A skeleton is a purely visual placeholder; the\n * loading semantics (`role=\"status\"`, `aria-busy`, an accessible loading\n * announcement) belong on the consumer's surrounding container, which knows\n * when the whole region starts and stops loading — a single Skeleton div\n * does not. See skeleton.md's Accessibility section for what to wire up\n * there, and for opting an individual instance out of the accessibility\n * tree via `aria-hidden` (forwarded like any other prop, no special\n * handling needed).\n */\nexport type SkeletonProps = ComponentProps<'div'>;\n\nexport function Skeleton({ className, ...props }: SkeletonProps) {\n return <div className={cx(styles.skeleton, className)} {...props} />;\n}\n"],"names":["Skeleton","className","props","jsx","cx","styles"],"mappings":";;;;;AAwBO,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAAwB;AAC/D,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,UAAUJ,CAAS,GAAI,GAAGC,GAAO;AACpE;"}
|
package/dist/switch.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/switch/public.js'
|
package/dist/switch.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Switch as i } from "@base-ui/react/switch";
|
|
3
|
+
import { cva as c } from "class-variance-authority";
|
|
4
|
+
import './chunks/switch.B_ebMSxR.css';const n = "_sizeDefault_n8bm9_10", o = "_sizeSm_n8bm9_10", u = "_thumb_n8bm9_84", t = {
|
|
5
|
+
switch: "_switch_n8bm9_6",
|
|
6
|
+
sizeDefault: n,
|
|
7
|
+
sizeSm: o,
|
|
8
|
+
thumb: u
|
|
9
|
+
}, h = c(t.switch, {
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
default: t.sizeDefault,
|
|
13
|
+
sm: t.sizeSm
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
size: "default"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
function l({ className: e, size: m, ...a }) {
|
|
21
|
+
return /* @__PURE__ */ s(i.Root, { className: h({ size: m, className: e }), ...a, children: /* @__PURE__ */ s(i.Thumb, { className: t.thumb }) });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
l as Switch
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["../src/components/switch/switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from '@base-ui/react/switch';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport styles from './switch.module.css';\n\nconst switchVariants = cva(styles.switch, {\n variants: {\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n },\n },\n defaultVariants: {\n size: 'default',\n },\n});\n\nexport interface SwitchProps\n extends Omit<SwitchPrimitive.Root.Props, 'className'>, VariantProps<typeof switchVariants> {\n className?: string;\n}\n\nexport function Switch({ className, size, ...props }: SwitchProps) {\n return (\n <SwitchPrimitive.Root className={switchVariants({ size, className })} {...props}>\n <SwitchPrimitive.Thumb className={styles.thumb} />\n </SwitchPrimitive.Root>\n );\n}\n"],"names":["switchVariants","cva","styles","Switch","className","size","props","jsx","SwitchPrimitive"],"mappings":";;;;;;;;GAKMA,IAAiBC,EAAIC,EAAO,QAAQ;AAAA,EACxC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,SAASA,EAAO;AAAA,MAChB,IAAIA,EAAO;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC;AAOM,SAASC,EAAO,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAAsB;AACjE,SACE,gBAAAC,EAACC,EAAgB,MAAhB,EAAqB,WAAWR,EAAe,EAAE,MAAAK,GAAM,WAAAD,GAAW,GAAI,GAAGE,GACxE,4BAACE,EAAgB,OAAhB,EAAsB,WAAWN,EAAO,OAAO,GAClD;AAEJ;"}
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/table/public.js'
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cx as l } from "class-variance-authority";
|
|
3
|
+
import './chunks/table.r8ppNt1W.css';const s = "_tableContainer_1s5o4_8", r = "_table_1s5o4_8", c = "_tableRow_1s5o4_68", i = "_tableHeader_1s5o4_137", _ = "_tableFooter_1s5o4_143", d = "_tableBody_1s5o4_160", m = "_tableHead_1s5o4_56", C = "_tableCell_1s5o4_242", u = "_densityCompact_1s5o4_264", p = "_tableCaption_1s5o4_274", a = {
|
|
4
|
+
tableContainer: s,
|
|
5
|
+
table: r,
|
|
6
|
+
tableRow: c,
|
|
7
|
+
tableHeader: i,
|
|
8
|
+
tableFooter: _,
|
|
9
|
+
tableBody: d,
|
|
10
|
+
tableHead: m,
|
|
11
|
+
tableCell: C,
|
|
12
|
+
densityCompact: u,
|
|
13
|
+
tableCaption: p
|
|
14
|
+
};
|
|
15
|
+
function H({ className: t, label: e, density: n, ...b }) {
|
|
16
|
+
return /* @__PURE__ */ o(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: a.tableContainer,
|
|
20
|
+
tabIndex: 0,
|
|
21
|
+
role: e === void 0 ? void 0 : "region",
|
|
22
|
+
"aria-label": e,
|
|
23
|
+
children: /* @__PURE__ */ o(
|
|
24
|
+
"table",
|
|
25
|
+
{
|
|
26
|
+
className: l(a.table, n === "compact" && a.densityCompact, t),
|
|
27
|
+
...b
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function N({ className: t, ...e }) {
|
|
34
|
+
return /* @__PURE__ */ o("thead", { className: l(a.tableHeader, t), ...e });
|
|
35
|
+
}
|
|
36
|
+
function T({ className: t, ...e }) {
|
|
37
|
+
return /* @__PURE__ */ o("tbody", { className: l(a.tableBody, t), ...e });
|
|
38
|
+
}
|
|
39
|
+
function w({ className: t, ...e }) {
|
|
40
|
+
return /* @__PURE__ */ o("tfoot", { className: l(a.tableFooter, t), ...e });
|
|
41
|
+
}
|
|
42
|
+
function B({ className: t, ...e }) {
|
|
43
|
+
return /* @__PURE__ */ o("tr", { className: l(a.tableRow, t), ...e });
|
|
44
|
+
}
|
|
45
|
+
function F({ className: t, ...e }) {
|
|
46
|
+
return /* @__PURE__ */ o("th", { className: l(a.tableHead, t), ...e });
|
|
47
|
+
}
|
|
48
|
+
function R({ className: t, ...e }) {
|
|
49
|
+
return /* @__PURE__ */ o("td", { className: l(a.tableCell, t), ...e });
|
|
50
|
+
}
|
|
51
|
+
function x({ className: t, ...e }) {
|
|
52
|
+
return /* @__PURE__ */ o("caption", { className: l(a.tableCaption, t), ...e });
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
H as Table,
|
|
56
|
+
T as TableBody,
|
|
57
|
+
x as TableCaption,
|
|
58
|
+
R as TableCell,
|
|
59
|
+
w as TableFooter,
|
|
60
|
+
F as TableHead,
|
|
61
|
+
N as TableHeader,
|
|
62
|
+
B as TableRow
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../src/components/table/table.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport styles from './table.module.css';\n\n/*\n * Table has no Base UI primitive (registry/base-vega ships plain native\n * elements with data-slot markers, this kit drops data-slot everywhere —\n * see card.tsx) — pure styling translation over native `<table>` markup,\n * per design-notes.md: a composite data-table (sorting, filtering,\n * pagination, virtualisation, column defs) is deliberately out of scope\n * here. This is styled markup, nothing more.\n *\n * Table renders two elements, matching the source exactly: its own\n * horizontal-scroll wrapper div around the <table>, rather than asking\n * every consumer to remember to add one. A consumer who also wants a\n * *vertical* scroll region (e.g. capping a long table's height) wraps\n * their own div with `overflow-y` around <Table> — it composes fine, since\n * the two wrappers scroll orthogonal axes (see table.md).\n *\n * That wrapper is `tabIndex={0}`, a deliberate addition over the source,\n * which has none. A horizontally-overflowing region with no scrollbar\n * dragging alternative is otherwise unreachable from the keyboard (WCAG\n * 2.1.1) — a mouse/touch user can drag or swipe it, a keyboard-only user\n * cannot Tab to it and press the arrow keys, since a plain `div` isn't in\n * the tab order by default. This is unconditional rather than toggled on\n * only when the table actually overflows: detecting that needs a\n * ResizeObserver, which is exactly the behavior layer this \"primitive\n * markup\" component intentionally does not have. The trade-off is a table\n * that never overflows still gets one extra, functionless tab stop — minor\n * next to the alternative of a table that does overflow being silently\n * unreachable.\n *\n * A focus stop should announce something: `label` names the wrapper\n * (`role=\"region\"` + `aria-label` — a bare div's aria-label is ignored\n * without a role, which is also why wrapping the Table yourself and\n * labelling that wrapper doesn't work: the name lands on a non-focusable\n * element while the focusable one stays nameless). Without `label` the\n * wrapper stays roleless and nameless as before — prefer passing it\n * whenever the surrounding page doesn't already make the table's purpose\n * obvious the moment focus lands.\n */\nexport interface TableProps extends ComponentProps<'table'> {\n /**\n * Accessible name for the focusable scroll wrapper around the table\n * (`role=\"region\"` + `aria-label`). Announced when keyboard focus lands\n * on the wrapper; without it the stop announces nothing.\n */\n label?: string;\n /**\n * Cell metrics only — `compact` tightens row padding for operational\n * views (the mockups' Data Table density axis). Not a data-table\n * feature: no virtualization, no row model, purely the cells' padding.\n */\n density?: 'default' | 'compact';\n}\n\nexport function Table({ className, label, density, ...props }: TableProps) {\n return (\n <div\n className={styles.tableContainer}\n tabIndex={0}\n role={label === undefined ? undefined : 'region'}\n aria-label={label}\n >\n <table\n className={cx(styles.table, density === 'compact' && styles.densityCompact, className)}\n {...props}\n />\n </div>\n );\n}\n\nexport type TableHeaderProps = ComponentProps<'thead'>;\n\nexport function TableHeader({ className, ...props }: TableHeaderProps) {\n return <thead className={cx(styles.tableHeader, className)} {...props} />;\n}\n\nexport type TableBodyProps = ComponentProps<'tbody'>;\n\nexport function TableBody({ className, ...props }: TableBodyProps) {\n return <tbody className={cx(styles.tableBody, className)} {...props} />;\n}\n\nexport type TableFooterProps = ComponentProps<'tfoot'>;\n\nexport function TableFooter({ className, ...props }: TableFooterProps) {\n return <tfoot className={cx(styles.tableFooter, className)} {...props} />;\n}\n\nexport type TableRowProps = ComponentProps<'tr'>;\n\nexport function TableRow({ className, ...props }: TableRowProps) {\n return <tr className={cx(styles.tableRow, className)} {...props} />;\n}\n\nexport type TableHeadProps = ComponentProps<'th'>;\n\nexport function TableHead({ className, ...props }: TableHeadProps) {\n return <th className={cx(styles.tableHead, className)} {...props} />;\n}\n\nexport type TableCellProps = ComponentProps<'td'>;\n\nexport function TableCell({ className, ...props }: TableCellProps) {\n return <td className={cx(styles.tableCell, className)} {...props} />;\n}\n\n/**\n * A table's accessible name/description, kept as a real semantic caption\n * regardless of where it's drawn — `.table`'s `caption-side: bottom` (see\n * table.module.css) only moves it visually below the rows; a `<caption>`\n * contributes to the table's accessibility tree the same way at either\n * position.\n */\nexport type TableCaptionProps = ComponentProps<'caption'>;\n\nexport function TableCaption({ className, ...props }: TableCaptionProps) {\n return <caption className={cx(styles.tableCaption, className)} {...props} />;\n}\n"],"names":["Table","className","label","density","props","jsx","styles","cx","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":";;;;;;;;;;;;;;AAyDO,SAASA,EAAM,EAAE,WAAAC,GAAW,OAAAC,GAAO,SAAAC,GAAS,GAAGC,KAAqB;AACzE,SACE,gBAAAC;AAAA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vE,SAAO,gBAAAC,EAAC,aAAQ,WAAWE,EAAGD,EAAO,cAAcL,CAAS,GAAI,GAAGG,GAAO;AAC5E;"}
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/tabs/public.js'
|
package/dist/tabs.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs as s } from "@base-ui/react/tabs";
|
|
3
|
+
import { cx as e, cva as o } from "class-variance-authority";
|
|
4
|
+
import './chunks/tabs.DqJE9cX3.css';const c = "_tabs_iiufe_28", u = "_list_iiufe_23", f = "_trigger_iiufe_5", l = "_content_iiufe_28", _ = "_variantDefault_iiufe_84", b = "_variantLine_iiufe_88", i = {
|
|
5
|
+
tabs: c,
|
|
6
|
+
list: u,
|
|
7
|
+
trigger: f,
|
|
8
|
+
content: l,
|
|
9
|
+
variantDefault: _,
|
|
10
|
+
variantLine: b
|
|
11
|
+
};
|
|
12
|
+
function L({ className: t, ...a }) {
|
|
13
|
+
return /* @__PURE__ */ n(s.Root, { className: e(i.tabs, t), ...a });
|
|
14
|
+
}
|
|
15
|
+
const v = o(i.list, {
|
|
16
|
+
variants: {
|
|
17
|
+
variant: {
|
|
18
|
+
default: i.variantDefault,
|
|
19
|
+
line: i.variantLine
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
function p({ className: t, variant: a, ...r }) {
|
|
27
|
+
return /* @__PURE__ */ n(s.List, { className: v({ variant: a, className: t }), ...r });
|
|
28
|
+
}
|
|
29
|
+
function D({ className: t, ...a }) {
|
|
30
|
+
return /* @__PURE__ */ n(s.Tab, { className: e(i.trigger, t), ...a });
|
|
31
|
+
}
|
|
32
|
+
function N({ className: t, ...a }) {
|
|
33
|
+
return /* @__PURE__ */ n(s.Panel, { className: e(i.content, t), ...a });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
L as Tabs,
|
|
37
|
+
N as TabsContent,
|
|
38
|
+
p as TabsList,
|
|
39
|
+
D as TabsTrigger
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=tabs.js.map
|
package/dist/tabs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\n\nimport styles from './tabs.module.css';\n\n/*\n * Base UI names these parts Root/List/Tab/Panel (see @base-ui/react/tabs);\n * the kit exposes the shadcn-registry's public names (Tabs/TabsList/\n * TabsTrigger/TabsContent) so consumers coming from shadcn's docs\n * recognize them. Every prop besides `className` is Base UI's own — see\n * each part's re-exported `Props` type below.\n *\n * base-vega's own translation renders every part as a styled div/button\n * with no Base UI `Indicator` part: the \"line\" variant's underline is a\n * static `::after` pseudo-element toggled per tab by `data-active`, not\n * one element sliding between tabs. Base UI's `Tabs.Indicator` (a `<span>`\n * whose position/size Base UI measures and writes as CSS variables at\n * runtime — see `TabsIndicatorCssVars`) would be a genuine upgrade for the\n * \"line\" variant, but it's deliberately left unexposed here: the source\n * this kit translates does not use it, adding it would be writing new UI\n * rather than curating the existing design, and it can be added later as\n * an additive, optional export without breaking this API.\n */\n\nexport interface TabsProps extends Omit<TabsPrimitive.Root.Props, 'className'> {\n className?: string;\n}\n\nexport function Tabs({ className, ...props }: TabsProps) {\n return <TabsPrimitive.Root className={cx(styles.tabs, className)} {...props} />;\n}\n\nconst tabsListVariants = cva(styles.list, {\n variants: {\n variant: {\n default: styles.variantDefault,\n line: styles.variantLine,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface TabsListProps\n extends Omit<TabsPrimitive.List.Props, 'className'>,\n VariantProps<typeof tabsListVariants> {\n className?: string;\n}\n\nexport function TabsList({ className, variant, ...props }: TabsListProps) {\n return <TabsPrimitive.List className={tabsListVariants({ variant, className })} {...props} />;\n}\n\nexport interface TabsTriggerProps extends Omit<TabsPrimitive.Tab.Props, 'className'> {\n className?: string;\n}\n\nexport function TabsTrigger({ className, ...props }: TabsTriggerProps) {\n return <TabsPrimitive.Tab className={cx(styles.trigger, className)} {...props} />;\n}\n\nexport interface TabsContentProps extends Omit<TabsPrimitive.Panel.Props, 'className'> {\n className?: string;\n}\n\nexport function TabsContent({ className, ...props }: TabsContentProps) {\n return <TabsPrimitive.Panel className={cx(styles.content, className)} {...props} />;\n}\n"],"names":["Tabs","className","props","jsx","TabsPrimitive","cx","styles","tabsListVariants","cva","TabsList","variant","TabsTrigger","TabsContent"],"mappings":";;;;;;;;;;;AA4BO,SAASA,EAAK,EAAE,WAAAC,GAAW,GAAGC,KAAoB;AACvD,SAAO,gBAAAC,EAACC,EAAc,MAAd,EAAmB,WAAWC,EAAGC,EAAO,MAAML,CAAS,GAAI,GAAGC,EAAA,CAAO;AAC/E;AAEA,MAAMK,IAAmBC,EAAIF,EAAO,MAAM;AAAA,EACxC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,MAAMA,EAAO;AAAA,IAAA;AAAA,EACf;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;AAQM,SAASG,EAAS,EAAE,WAAAR,GAAW,SAAAS,GAAS,GAAGR,KAAwB;AACxE,SAAO,gBAAAC,EAACC,EAAc,MAAd,EAAmB,WAAWG,EAAiB,EAAE,SAAAG,GAAS,WAAAT,EAAA,CAAW,GAAI,GAAGC,EAAA,CAAO;AAC7F;AAMO,SAASS,EAAY,EAAE,WAAAV,GAAW,GAAGC,KAA2B;AACrE,SAAO,gBAAAC,EAACC,EAAc,KAAd,EAAkB,WAAWC,EAAGC,EAAO,SAASL,CAAS,GAAI,GAAGC,EAAA,CAAO;AACjF;AAMO,SAASU,EAAY,EAAE,WAAAX,GAAW,GAAGC,KAA2B;AACrE,SAAO,gBAAAC,EAACC,EAAc,OAAd,EAAoB,WAAWC,EAAGC,EAAO,SAASL,CAAS,GAAI,GAAGC,EAAA,CAAO;AACnF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/textarea/public.js'
|
package/dist/textarea.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Field as a } from "@base-ui/react/field";
|
|
3
|
+
import { cx as o } from "class-variance-authority";
|
|
4
|
+
import './chunks/textarea.BKWvs6fD.css';const x = "_textarea_1gu2n_6", n = {
|
|
5
|
+
textarea: x
|
|
6
|
+
};
|
|
7
|
+
function i({ className: e, ...r }) {
|
|
8
|
+
return /* @__PURE__ */ t(a.Control, { render: /* @__PURE__ */ t("textarea", { className: o(n.textarea, e), ...r }) });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
i as Textarea
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","sources":["../src/components/textarea/textarea.tsx"],"sourcesContent":["import { Field as FieldPrimitive } from '@base-ui/react/field';\nimport { cx } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport styles from './textarea.module.css';\n\nexport type TextareaProps = ComponentProps<'textarea'>;\n\n/* Rendered through Field.Control so a surrounding Field wires the label,\n * aria-describedby, and validation state — same as Input. Outside a Field\n * the control falls back to Base UI's no-op context. */\nexport function Textarea({ className, ...props }: TextareaProps) {\n return (\n <FieldPrimitive.Control render={<textarea className={cx(styles.textarea, className)} {...props} />} />\n );\n}\n"],"names":["Textarea","className","props","jsx","FieldPrimitive","cx","styles"],"mappings":";;;;;;AAWO,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAAwB;AAC/D,SACE,gBAAAC,EAACC,EAAe,SAAf,EAAuB,QAAQ,gBAAAD,EAAC,YAAA,EAAS,WAAWE,EAAGC,EAAO,UAAUL,CAAS,GAAI,GAAGC,GAAO,GAAI;AAExG;"}
|