@bearmenu/ui 0.5.1 → 0.6.0
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/{chunk-ERMIA7NP.js → chunk-7PPCH42H.js} +3 -3
- package/dist/{chunk-HLQ2IRE7.js → chunk-BAZFVSSG.js} +3 -3
- package/dist/chunk-D5QHEHXJ.js +26 -0
- package/dist/{chunk-UISA4CIG.js → chunk-N2KNBPAQ.js} +2 -2
- package/dist/{chunk-7H54PTVH.js → chunk-PSR7N36A.js} +38 -10
- package/dist/chunk-RIDXFY6M.js +38 -0
- package/dist/chunk-UUJVXN2O.js +82 -0
- package/dist/chunk-WKMLZDUT.js +122 -0
- package/dist/chunk-XK2ZDQVE.js +122 -0
- package/dist/{chunk-4KOMHDZD.js → chunk-Y5D5LP4A.js} +18 -3
- package/dist/chunk-YJ6OBKZJ.js +32 -0
- package/dist/{chunk-ESO2EM3L.js → chunk-ZBBUKXM5.js} +2 -2
- package/dist/chunk-ZFNOCP6W.js +106 -0
- package/dist/components/accordion.js +11 -5
- package/dist/components/alert-dialog.js +5 -3
- package/dist/components/alert.d.ts +5 -2
- package/dist/components/alert.js +25 -9
- package/dist/components/avatar.d.ts +17 -2
- package/dist/components/avatar.js +91 -12
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/breadcrumb.js +5 -2
- package/dist/components/button-group.d.ts +14 -0
- package/dist/components/button-group.js +39 -0
- package/dist/components/button.d.ts +4 -2
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +3 -3
- package/dist/components/card.d.ts +13 -5
- package/dist/components/card.js +2 -2
- package/dist/components/carousel.d.ts +20 -3
- package/dist/components/carousel.js +72 -12
- package/dist/components/checkbox.js +1 -1
- package/dist/components/circular-progress.d.ts +16 -0
- package/dist/components/circular-progress.js +105 -0
- package/dist/components/combobox.d.ts +27 -0
- package/dist/components/combobox.js +102 -0
- package/dist/components/command.d.ts +29 -16
- package/dist/components/command.js +2 -2
- package/dist/components/currency-input.d.ts +1 -0
- package/dist/components/currency-input.js +73 -52
- package/dist/components/date-input.d.ts +10 -0
- package/dist/components/date-input.js +40 -0
- package/dist/components/description-list.d.ts +15 -0
- package/dist/components/description-list.js +67 -0
- package/dist/components/dialog.d.ts +13 -2
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +5 -2
- package/dist/components/drawer.js +47 -9
- package/dist/components/dropdown-menu.d.ts +7 -2
- package/dist/components/dropdown-menu.js +22 -6
- package/dist/components/empty-state.js +2 -2
- package/dist/components/field.d.ts +22 -0
- package/dist/components/field.js +130 -0
- package/dist/components/form.d.ts +2 -1
- package/dist/components/form.js +11 -1
- package/dist/components/haptic-button.js +3 -3
- package/dist/components/input-group.d.ts +18 -0
- package/dist/components/input-group.js +92 -0
- package/dist/components/input.d.ts +8 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.js +120 -0
- package/dist/components/kbd.d.ts +13 -0
- package/dist/components/kbd.js +49 -0
- package/dist/components/lazy-markdown.d.ts +3 -1
- package/dist/components/lazy-markdown.js +7 -7
- package/dist/components/link-button.js +1 -1
- package/dist/components/multi-select-combobox.js +92 -83
- package/dist/components/multi-select-menu.d.ts +0 -4
- package/dist/components/multi-select-menu.js +28 -17
- package/dist/components/native-select.d.ts +12 -0
- package/dist/components/native-select.js +49 -0
- package/dist/components/pagination.d.ts +5 -2
- package/dist/components/pagination.js +66 -7
- package/dist/components/place-about-tab.js +4 -4
- package/dist/components/place-card.js +1 -1
- package/dist/components/place-details-mobile.js +4 -4
- package/dist/components/popover.d.ts +7 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.d.ts +5 -1
- package/dist/components/progress.js +17 -3
- package/dist/components/radio-group.js +12 -3
- package/dist/components/rating.d.ts +2 -0
- package/dist/components/rating.js +88 -70
- package/dist/components/search-bar.d.ts +1 -2
- package/dist/components/search-bar.js +37 -60
- package/dist/components/searchable-select.js +76 -72
- package/dist/components/select.d.ts +5 -1
- package/dist/components/select.js +30 -14
- package/dist/components/selection-bar.d.ts +11 -0
- package/dist/components/selection-bar.js +65 -0
- package/dist/components/separator.js +3 -2
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/skeleton-card.js +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +21 -4
- package/dist/components/sliding-panels.js +15 -13
- package/dist/components/spinner.d.ts +17 -0
- package/dist/components/spinner.js +50 -0
- package/dist/components/stepper.d.ts +18 -0
- package/dist/components/stepper.js +199 -0
- package/dist/components/sticky-container.js +1 -0
- package/dist/components/switch.js +4 -3
- package/dist/components/table.d.ts +23 -5
- package/dist/components/table.js +121 -35
- package/dist/components/tabs.d.ts +3 -1
- package/dist/components/tabs.js +37 -9
- package/dist/components/tag-group.d.ts +9 -0
- package/dist/components/tag-group.js +26 -0
- package/dist/components/tag.d.ts +17 -0
- package/dist/components/tag.js +61 -0
- package/dist/components/text.d.ts +3 -3
- package/dist/components/text.js +1 -1
- package/dist/components/textarea.js +2 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toaster.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +3 -2
- package/dist/components/tooltip.js +16 -2
- package/package.json +44 -26
- package/src/components/accordion.tsx +11 -6
- package/src/components/alert-dialog.tsx +4 -2
- package/src/components/alert.tsx +20 -8
- package/src/components/avatar.tsx +106 -13
- package/src/components/badge.tsx +12 -11
- package/src/components/breadcrumb.tsx +5 -2
- package/src/components/button-group.stories.tsx +52 -0
- package/src/components/button-group.tsx +40 -0
- package/src/components/button.test.tsx +174 -0
- package/src/components/button.tsx +42 -19
- package/src/components/calendar.tsx +2 -2
- package/src/components/card.tsx +55 -13
- package/src/components/carousel.tsx +85 -13
- package/src/components/checkbox.test.tsx +58 -0
- package/src/components/checkbox.tsx +8 -3
- package/src/components/circular-progress.stories.tsx +39 -0
- package/src/components/circular-progress.tsx +102 -0
- package/src/components/collapsible.stories.tsx +7 -3
- package/src/components/combobox.stories.tsx +82 -0
- package/src/components/combobox.test.tsx +118 -0
- package/src/components/combobox.tsx +136 -0
- package/src/components/command.test.tsx +91 -0
- package/src/components/command.tsx +38 -15
- package/src/components/currency-input.test.tsx +63 -0
- package/src/components/currency-input.tsx +84 -66
- package/src/components/date-input.stories.tsx +31 -0
- package/src/components/date-input.tsx +43 -0
- package/src/components/description-list.stories.tsx +62 -0
- package/src/components/description-list.tsx +68 -0
- package/src/components/dialog.test.tsx +84 -0
- package/src/components/dialog.tsx +64 -24
- package/src/components/drawer.tsx +72 -23
- package/src/components/dropdown-menu.test.tsx +180 -0
- package/src/components/dropdown-menu.tsx +31 -6
- package/src/components/field.stories.tsx +36 -0
- package/src/components/field.test.tsx +157 -0
- package/src/components/field.tsx +146 -0
- package/src/components/form.stories.tsx +3 -2
- package/src/components/form.test.tsx +95 -0
- package/src/components/form.tsx +9 -0
- package/src/components/haptic-button.tsx +1 -1
- package/src/components/input-group.stories.tsx +61 -0
- package/src/components/input-group.tsx +99 -0
- package/src/components/input.test.tsx +103 -0
- package/src/components/input.tsx +24 -7
- package/src/components/item.stories.tsx +52 -0
- package/src/components/item.tsx +115 -0
- package/src/components/kbd.stories.tsx +33 -0
- package/src/components/kbd.tsx +46 -0
- package/src/components/lazy-markdown.tsx +10 -7
- package/src/components/multi-select-combobox.test.tsx +101 -0
- package/src/components/multi-select-combobox.tsx +85 -82
- package/src/components/multi-select-menu.tsx +49 -41
- package/src/components/native-select.stories.tsx +52 -0
- package/src/components/native-select.tsx +45 -0
- package/src/components/pagination.tsx +64 -5
- package/src/components/popover.tsx +66 -3
- package/src/components/progress.tsx +27 -4
- package/src/components/radio-group.test.tsx +64 -0
- package/src/components/radio-group.tsx +11 -3
- package/src/components/rating.test.tsx +112 -0
- package/src/components/rating.tsx +97 -82
- package/src/components/search-bar.stories.tsx +1 -32
- package/src/components/search-bar.tsx +22 -59
- package/src/components/searchable-select.tsx +69 -73
- package/src/components/select.tsx +34 -19
- package/src/components/selection-bar.stories.tsx +37 -0
- package/src/components/selection-bar.tsx +65 -0
- package/src/components/separator.tsx +5 -2
- package/src/components/sheet.tsx +1 -1
- package/src/components/skeleton.tsx +2 -2
- package/src/components/slider.test.tsx +45 -0
- package/src/components/slider.tsx +31 -12
- package/src/components/sliding-panels.tsx +14 -12
- package/src/components/spinner.stories.tsx +35 -0
- package/src/components/spinner.tsx +50 -0
- package/src/components/stepper.stories.tsx +71 -0
- package/src/components/stepper.tsx +220 -0
- package/src/components/sticky-container.tsx +1 -0
- package/src/components/switch.test.tsx +52 -0
- package/src/components/switch.tsx +4 -3
- package/src/components/table.tsx +140 -35
- package/src/components/tabs.test.tsx +107 -0
- package/src/components/tabs.tsx +70 -23
- package/src/components/tag-group.stories.tsx +39 -0
- package/src/components/tag-group.tsx +28 -0
- package/src/components/tag.stories.tsx +50 -0
- package/src/components/tag.tsx +63 -0
- package/src/components/text.test.tsx +1 -1
- package/src/components/text.tsx +19 -3
- package/src/components/textarea.test.tsx +48 -0
- package/src/components/textarea.tsx +2 -1
- package/src/components/toast.tsx +4 -3
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +12 -2
- package/src/globals.css +142 -90
- package/dist/chunk-2BMJRXQX.js +0 -80
- package/dist/chunk-4AVS6CV4.js +0 -89
- package/dist/chunk-4UO73SKC.js +0 -26
- package/dist/chunk-CW24PLDW.js +0 -24
- package/dist/chunk-IQASCH2V.js +0 -25
- package/dist/chunk-NKHH23YK.js +0 -31
- package/dist/chunk-QJ54Z7TC.js +0 -83
package/dist/components/table.js
CHANGED
|
@@ -1,23 +1,47 @@
|
|
|
1
1
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
-
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { ChevronUp, ChevronDown, ChevronsUpDown } from 'lucide-react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
|
-
var Table = React.forwardRef(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
var Table = React.forwardRef((_a, ref) => {
|
|
8
|
+
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
9
|
+
return /* @__PURE__ */ jsx("div", { className: cn("relative w-full overflow-auto rounded-xl border border-border", containerClassName), children: /* @__PURE__ */ jsx(
|
|
10
|
+
"table",
|
|
11
|
+
__spreadValues({
|
|
12
|
+
ref,
|
|
13
|
+
"data-slot": "table",
|
|
14
|
+
className: cn("w-full caption-bottom text-sm", className)
|
|
15
|
+
}, props)
|
|
16
|
+
) });
|
|
17
|
+
});
|
|
12
18
|
Table.displayName = "Table";
|
|
13
19
|
var TableHeader = React.forwardRef((_a, ref) => {
|
|
14
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
+
var _b = _a, { className, sticky } = _b, props = __objRest(_b, ["className", "sticky"]);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"thead",
|
|
23
|
+
__spreadValues({
|
|
24
|
+
ref,
|
|
25
|
+
"data-slot": "table-header",
|
|
26
|
+
className: cn(
|
|
27
|
+
"bg-muted/50 [&_tr]:border-b [&_tr]:border-border",
|
|
28
|
+
sticky && "sticky top-0 z-10",
|
|
29
|
+
className
|
|
30
|
+
)
|
|
31
|
+
}, props)
|
|
32
|
+
);
|
|
16
33
|
});
|
|
17
34
|
TableHeader.displayName = "TableHeader";
|
|
18
35
|
var TableBody = React.forwardRef((_a, ref) => {
|
|
19
36
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
20
|
-
return /* @__PURE__ */ jsx(
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"tbody",
|
|
39
|
+
__spreadValues({
|
|
40
|
+
ref,
|
|
41
|
+
"data-slot": "table-body",
|
|
42
|
+
className: cn("[&_tr:last-child]:border-0", className)
|
|
43
|
+
}, props)
|
|
44
|
+
);
|
|
21
45
|
});
|
|
22
46
|
TableBody.displayName = "TableBody";
|
|
23
47
|
var TableFooter = React.forwardRef((_a, ref) => {
|
|
@@ -26,40 +50,74 @@ var TableFooter = React.forwardRef((_a, ref) => {
|
|
|
26
50
|
"tfoot",
|
|
27
51
|
__spreadValues({
|
|
28
52
|
ref,
|
|
29
|
-
|
|
53
|
+
"data-slot": "table-footer",
|
|
54
|
+
className: cn("border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0", className)
|
|
30
55
|
}, props)
|
|
31
56
|
);
|
|
32
57
|
});
|
|
33
58
|
TableFooter.displayName = "TableFooter";
|
|
34
|
-
var TableRow = React.forwardRef(
|
|
35
|
-
|
|
36
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
"tr",
|
|
39
|
-
__spreadValues({
|
|
40
|
-
ref,
|
|
41
|
-
className: cn(
|
|
42
|
-
"border-b border-border/50 transition-all duration-300 hover:bg-muted/30 hover:backdrop-blur-sm data-[state=selected]:bg-muted/50",
|
|
43
|
-
className
|
|
44
|
-
)
|
|
45
|
-
}, props)
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
TableRow.displayName = "TableRow";
|
|
50
|
-
var TableHead = React.forwardRef((_a, ref) => {
|
|
51
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
59
|
+
var TableRow = React.forwardRef((_a, ref) => {
|
|
60
|
+
var _b = _a, { className, interactive } = _b, props = __objRest(_b, ["className", "interactive"]);
|
|
52
61
|
return /* @__PURE__ */ jsx(
|
|
53
|
-
"
|
|
62
|
+
"tr",
|
|
54
63
|
__spreadValues({
|
|
55
64
|
ref,
|
|
65
|
+
"data-slot": "table-row",
|
|
56
66
|
className: cn(
|
|
57
|
-
"
|
|
67
|
+
"border-b border-border transition-colors data-[state=selected]:bg-muted",
|
|
68
|
+
interactive && "cursor-pointer hover:bg-muted/50",
|
|
58
69
|
className
|
|
59
70
|
)
|
|
60
71
|
}, props)
|
|
61
72
|
);
|
|
62
73
|
});
|
|
74
|
+
TableRow.displayName = "TableRow";
|
|
75
|
+
var TableHead = React.forwardRef(
|
|
76
|
+
(_a, ref) => {
|
|
77
|
+
var _b = _a, { className, sortable, sortDirection = "none", onSort, children } = _b, props = __objRest(_b, ["className", "sortable", "sortDirection", "onSort", "children"]);
|
|
78
|
+
if (!sortable) {
|
|
79
|
+
return /* @__PURE__ */ jsx(
|
|
80
|
+
"th",
|
|
81
|
+
__spreadProps(__spreadValues({
|
|
82
|
+
ref,
|
|
83
|
+
"data-slot": "table-head",
|
|
84
|
+
className: cn(
|
|
85
|
+
"h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
86
|
+
className
|
|
87
|
+
)
|
|
88
|
+
}, props), {
|
|
89
|
+
children
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
const ariaSort = sortDirection === "asc" ? "ascending" : sortDirection === "desc" ? "descending" : "none";
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
"th",
|
|
96
|
+
__spreadProps(__spreadValues({
|
|
97
|
+
ref,
|
|
98
|
+
"data-slot": "table-head",
|
|
99
|
+
"aria-sort": ariaSort,
|
|
100
|
+
className: cn(
|
|
101
|
+
"h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
102
|
+
className
|
|
103
|
+
)
|
|
104
|
+
}, props), {
|
|
105
|
+
children: /* @__PURE__ */ jsxs(
|
|
106
|
+
"button",
|
|
107
|
+
{
|
|
108
|
+
type: "button",
|
|
109
|
+
onClick: onSort,
|
|
110
|
+
className: "inline-flex items-center gap-1 rounded-sm text-inherit transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
111
|
+
children: [
|
|
112
|
+
children,
|
|
113
|
+
sortDirection === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "size-3.5", "aria-hidden": true }) : sortDirection === "desc" ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5", "aria-hidden": true }) : /* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-3.5 opacity-50", "aria-hidden": true })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
})
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
);
|
|
63
121
|
TableHead.displayName = "TableHead";
|
|
64
122
|
var TableCell = React.forwardRef((_a, ref) => {
|
|
65
123
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
@@ -67,15 +125,43 @@ var TableCell = React.forwardRef((_a, ref) => {
|
|
|
67
125
|
"td",
|
|
68
126
|
__spreadValues({
|
|
69
127
|
ref,
|
|
70
|
-
|
|
128
|
+
"data-slot": "table-cell",
|
|
129
|
+
className: cn("p-4 align-middle text-sm [&:has([role=checkbox])]:pr-0", className)
|
|
71
130
|
}, props)
|
|
72
131
|
);
|
|
73
132
|
});
|
|
74
133
|
TableCell.displayName = "TableCell";
|
|
75
134
|
var TableCaption = React.forwardRef((_a, ref) => {
|
|
76
135
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
77
|
-
return /* @__PURE__ */ jsx(
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
"caption",
|
|
138
|
+
__spreadValues({
|
|
139
|
+
ref,
|
|
140
|
+
"data-slot": "table-caption",
|
|
141
|
+
className: cn("mt-4 text-sm text-muted-foreground", className)
|
|
142
|
+
}, props)
|
|
143
|
+
);
|
|
78
144
|
});
|
|
79
145
|
TableCaption.displayName = "TableCaption";
|
|
146
|
+
var TableEmpty = (_a) => {
|
|
147
|
+
var _b = _a, {
|
|
148
|
+
colSpan,
|
|
149
|
+
children = "No results.",
|
|
150
|
+
className
|
|
151
|
+
} = _b, props = __objRest(_b, [
|
|
152
|
+
"colSpan",
|
|
153
|
+
"children",
|
|
154
|
+
"className"
|
|
155
|
+
]);
|
|
156
|
+
return /* @__PURE__ */ jsx("tr", __spreadProps(__spreadValues({ "data-slot": "table-empty" }, props), { children: /* @__PURE__ */ jsx(
|
|
157
|
+
"td",
|
|
158
|
+
{
|
|
159
|
+
colSpan,
|
|
160
|
+
className: cn("h-24 text-center text-sm text-muted-foreground", className),
|
|
161
|
+
children
|
|
162
|
+
}
|
|
163
|
+
) }));
|
|
164
|
+
};
|
|
165
|
+
TableEmpty.displayName = "TableEmpty";
|
|
80
166
|
|
|
81
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
167
|
+
export { Table, TableBody, TableCaption, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -2,9 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
3
|
|
|
4
4
|
type TabsVariant = "pill" | "underline";
|
|
5
|
-
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7
7
|
variant?: TabsVariant;
|
|
8
|
+
/** Make horizontal lists scrollable when overflowing. Default true for underline, false for pill. */
|
|
9
|
+
scrollable?: boolean;
|
|
8
10
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
11
|
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
12
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,19 +1,42 @@
|
|
|
1
1
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
-
import { __objRest,
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
7
|
+
var TabsContext = React.createContext({
|
|
8
|
+
variant: "pill",
|
|
9
|
+
orientation: "horizontal"
|
|
10
|
+
});
|
|
11
|
+
var Tabs = React.forwardRef((_a, ref) => {
|
|
12
|
+
var _b = _a, { className, orientation = "horizontal" } = _b, props = __objRest(_b, ["className", "orientation"]);
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
TabsPrimitive.Root,
|
|
15
|
+
__spreadValues({
|
|
16
|
+
ref,
|
|
17
|
+
"data-slot": "tabs",
|
|
18
|
+
orientation,
|
|
19
|
+
className: cn(
|
|
20
|
+
"flex",
|
|
21
|
+
orientation === "vertical" ? "flex-row gap-4" : "flex-col gap-2",
|
|
22
|
+
className
|
|
23
|
+
)
|
|
24
|
+
}, props)
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
9
28
|
var TabsList = React.forwardRef((_a, ref) => {
|
|
10
|
-
var _b = _a, { className, variant = "pill", children } = _b, props = __objRest(_b, ["className", "variant", "children"]);
|
|
11
|
-
|
|
29
|
+
var _b = _a, { className, variant = "pill", scrollable, children } = _b, props = __objRest(_b, ["className", "variant", "scrollable", "children"]);
|
|
30
|
+
const orientation = props["aria-orientation"] === "vertical" ? "vertical" : "horizontal";
|
|
31
|
+
const allowScroll = scrollable != null ? scrollable : orientation === "horizontal";
|
|
32
|
+
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: { variant, orientation }, children: /* @__PURE__ */ jsx(
|
|
12
33
|
TabsPrimitive.List,
|
|
13
34
|
__spreadProps(__spreadValues({
|
|
14
35
|
ref,
|
|
36
|
+
"data-slot": "tabs-list",
|
|
15
37
|
className: cn(
|
|
16
|
-
variant === "pill" ? "inline-flex h-
|
|
38
|
+
variant === "pill" ? orientation === "vertical" ? "inline-flex flex-col items-stretch gap-1 rounded-2xl bg-muted p-1 text-muted-foreground" : "inline-flex h-11 max-w-full items-center justify-start gap-1 rounded-2xl bg-muted p-1 text-muted-foreground" : orientation === "vertical" ? "inline-flex flex-col items-stretch gap-0 border-r border-border bg-transparent text-muted-foreground" : "inline-flex h-auto max-w-full items-center gap-0 border-b border-border bg-transparent text-muted-foreground",
|
|
39
|
+
allowScroll && "overflow-x-auto overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&>*]:shrink-0",
|
|
17
40
|
className
|
|
18
41
|
)
|
|
19
42
|
}, props), {
|
|
@@ -24,13 +47,17 @@ var TabsList = React.forwardRef((_a, ref) => {
|
|
|
24
47
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
25
48
|
var TabsTrigger = React.forwardRef((_a, ref) => {
|
|
26
49
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
27
|
-
const variant = React.useContext(
|
|
50
|
+
const { variant, orientation } = React.useContext(TabsContext);
|
|
28
51
|
return /* @__PURE__ */ jsx(
|
|
29
52
|
TabsPrimitive.Trigger,
|
|
30
53
|
__spreadValues({
|
|
31
54
|
ref,
|
|
55
|
+
"data-slot": "tabs-trigger",
|
|
32
56
|
className: cn(
|
|
33
|
-
|
|
57
|
+
"inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
58
|
+
variant === "pill" && "rounded-xl px-4 py-1.5 text-muted-foreground hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
59
|
+
variant === "underline" && orientation === "horizontal" && "relative h-11 rounded-none border-b-2 border-transparent px-4 text-muted-foreground hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-foreground",
|
|
60
|
+
variant === "underline" && orientation === "vertical" && "relative rounded-none border-r-2 border-transparent px-4 py-2 -mr-px text-muted-foreground hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-foreground justify-start",
|
|
34
61
|
className
|
|
35
62
|
)
|
|
36
63
|
}, props)
|
|
@@ -43,8 +70,9 @@ var TabsContent = React.forwardRef((_a, ref) => {
|
|
|
43
70
|
TabsPrimitive.Content,
|
|
44
71
|
__spreadValues({
|
|
45
72
|
ref,
|
|
73
|
+
"data-slot": "tabs-content",
|
|
46
74
|
className: cn(
|
|
47
|
-
"
|
|
75
|
+
"flex-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-md",
|
|
48
76
|
className
|
|
49
77
|
)
|
|
50
78
|
}, props)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const TagGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Visually hide the label, keep accessible. */
|
|
6
|
+
srLabel?: boolean;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
|
|
9
|
+
export { TagGroup };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var TagGroup = React.forwardRef((_a, ref) => {
|
|
7
|
+
var _b = _a, { className, label, srLabel = true, children } = _b, props = __objRest(_b, ["className", "label", "srLabel", "children"]);
|
|
8
|
+
return /* @__PURE__ */ jsxs(
|
|
9
|
+
"div",
|
|
10
|
+
__spreadProps(__spreadValues({
|
|
11
|
+
ref,
|
|
12
|
+
role: "group",
|
|
13
|
+
"aria-label": label,
|
|
14
|
+
"data-slot": "tag-group",
|
|
15
|
+
className: cn("flex flex-wrap items-center gap-1.5", className)
|
|
16
|
+
}, props), {
|
|
17
|
+
children: [
|
|
18
|
+
label && !srLabel && /* @__PURE__ */ jsx("span", { className: "mr-1 text-xs font-medium text-muted-foreground", children: label }),
|
|
19
|
+
children
|
|
20
|
+
]
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
TagGroup.displayName = "TagGroup";
|
|
25
|
+
|
|
26
|
+
export { TagGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const tagVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "destructive" | "warning" | "success" | "primary" | "outline" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare const Tag: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
10
|
+
variant?: "default" | "destructive" | "warning" | "success" | "primary" | "outline" | null | undefined;
|
|
11
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
13
|
+
onRemove?: () => void;
|
|
14
|
+
removeLabel?: string;
|
|
15
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
|
|
17
|
+
export { Tag, tagVariants };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { X } from 'lucide-react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var tagVariants = cva(
|
|
9
|
+
"inline-flex items-center gap-1 rounded-full border text-xs font-medium transition-colors",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "border-border bg-muted text-foreground",
|
|
14
|
+
primary: "border-primary/30 bg-primary/10 text-primary",
|
|
15
|
+
success: "border-success/30 bg-success/10 text-success",
|
|
16
|
+
warning: "border-warning/30 bg-warning/10 text-warning",
|
|
17
|
+
destructive: "border-destructive/30 bg-destructive/10 text-destructive",
|
|
18
|
+
outline: "border-border bg-transparent text-foreground"
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
sm: "h-5 px-2 text-[10px]",
|
|
22
|
+
default: "h-6 px-2.5",
|
|
23
|
+
lg: "h-7 px-3 text-sm"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
var Tag = React.forwardRef(
|
|
33
|
+
(_a, ref) => {
|
|
34
|
+
var _b = _a, { className, variant, size, onRemove, removeLabel = "Remove", children } = _b, props = __objRest(_b, ["className", "variant", "size", "onRemove", "removeLabel", "children"]);
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
"span",
|
|
37
|
+
__spreadProps(__spreadValues({
|
|
38
|
+
ref,
|
|
39
|
+
"data-slot": "tag",
|
|
40
|
+
className: cn(tagVariants({ variant, size }), className)
|
|
41
|
+
}, props), {
|
|
42
|
+
children: [
|
|
43
|
+
children,
|
|
44
|
+
onRemove && /* @__PURE__ */ jsx(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
"aria-label": removeLabel,
|
|
49
|
+
onClick: onRemove,
|
|
50
|
+
className: "-mr-0.5 inline-flex size-3.5 items-center justify-center rounded-full transition-colors hover:bg-foreground/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
51
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
Tag.displayName = "Tag";
|
|
60
|
+
|
|
61
|
+
export { Tag, tagVariants };
|
|
@@ -4,9 +4,9 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const textVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
8
|
-
color?: "
|
|
9
|
-
weight?: "bold" | "
|
|
7
|
+
variant?: "small" | "display" | "h1" | "h2" | "h3" | "h4" | "body-lg" | "body" | "body-sm" | "caption" | "label" | "overline" | null | undefined;
|
|
8
|
+
color?: "default" | "destructive" | "inherit" | "muted" | "primary" | "primary-foreground" | null | undefined;
|
|
9
|
+
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
10
10
|
leading?: "none" | "normal" | "tight" | "snug" | "relaxed" | "loose" | null | undefined;
|
|
11
11
|
tracking?: "normal" | "tight" | "wide" | "wider" | null | undefined;
|
|
12
12
|
wrap?: "balance" | "pretty" | "nowrap" | null | undefined;
|
package/dist/components/text.js
CHANGED
|
@@ -9,8 +9,9 @@ var Textarea = React.forwardRef(
|
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
10
10
|
"textarea",
|
|
11
11
|
__spreadValues({
|
|
12
|
+
"data-slot": "textarea",
|
|
12
13
|
className: cn(
|
|
13
|
-
"flex min-h-
|
|
14
|
+
"flex min-h-20 w-full rounded-xl border border-border bg-input/50 px-4 py-3 text-base transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:bg-input disabled:cursor-not-allowed disabled:opacity-50 resize-y aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/40",
|
|
14
15
|
className
|
|
15
16
|
),
|
|
16
17
|
ref
|
package/dist/components/toast.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '../chunk-
|
|
1
|
+
export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '../chunk-7PPCH42H.js';
|
|
2
2
|
import '../chunk-FEK5XGZW.js';
|
|
3
3
|
import '../chunk-3GWWZKX7.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToastProvider, Toast, ToastTitle, ToastDescription, ToastClose, ToastViewport } from '../chunk-ERMIA7NP.js';
|
|
2
1
|
import { useToast } from '../chunk-EBAMCZDW.js';
|
|
2
|
+
import { ToastProvider, Toast, ToastTitle, ToastDescription, ToastClose, ToastViewport } from '../chunk-7PPCH42H.js';
|
|
3
3
|
import '../chunk-FEK5XGZW.js';
|
|
4
4
|
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toggleVariants } from '../chunk-
|
|
1
|
+
import { toggleVariants } from '../chunk-ZBBUKXM5.js';
|
|
2
2
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
3
|
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
4
|
|
|
4
|
-
declare const TooltipProvider: React.
|
|
5
|
-
declare const Tooltip: React.
|
|
5
|
+
declare const TooltipProvider: ({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) => react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare const Tooltip: ({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) => react_jsx_runtime.JSX.Element;
|
|
6
7
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
8
|
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
9
|
|
|
@@ -4,8 +4,22 @@ import * as React from 'react';
|
|
|
4
4
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var TooltipProvider =
|
|
8
|
-
var
|
|
7
|
+
var TooltipProvider = (_a) => {
|
|
8
|
+
var _b = _a, {
|
|
9
|
+
delayDuration = 200
|
|
10
|
+
} = _b, props = __objRest(_b, [
|
|
11
|
+
"delayDuration"
|
|
12
|
+
]);
|
|
13
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, __spreadValues({ delayDuration }, props));
|
|
14
|
+
};
|
|
15
|
+
var Tooltip = (_a) => {
|
|
16
|
+
var _b = _a, {
|
|
17
|
+
delayDuration = 200
|
|
18
|
+
} = _b, props = __objRest(_b, [
|
|
19
|
+
"delayDuration"
|
|
20
|
+
]);
|
|
21
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Root, __spreadValues({ delayDuration }, props));
|
|
22
|
+
};
|
|
9
23
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
10
24
|
var TooltipContent = React.forwardRef((_a, ref) => {
|
|
11
25
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|