@codefast/ui 0.3.11-canary.0 → 0.3.11-canary.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/CHANGELOG.md +22 -0
- package/dist/components/accordion.d.ts +29 -10
- package/dist/components/accordion.js +38 -37
- package/dist/components/alert-dialog.d.ts +60 -24
- package/dist/components/alert-dialog.js +69 -72
- package/dist/components/alert.d.ts +27 -15
- package/dist/components/alert.js +29 -31
- package/dist/components/aspect-ratio.d.ts +8 -4
- package/dist/components/aspect-ratio.js +7 -5
- package/dist/components/avatar.d.ts +17 -6
- package/dist/components/avatar.js +19 -17
- package/dist/components/badge.d.ts +21 -14
- package/dist/components/badge.js +19 -22
- package/dist/components/breadcrumb.d.ts +35 -12
- package/dist/components/breadcrumb.js +48 -54
- package/dist/components/button-group.d.ts +29 -14
- package/dist/components/button-group.js +27 -32
- package/dist/components/button.d.ts +35 -25
- package/dist/components/button.js +50 -48
- package/dist/components/calendar.d.ts +24 -9
- package/dist/components/calendar.js +92 -98
- package/dist/components/card.d.ts +34 -10
- package/dist/components/card.js +39 -37
- package/dist/components/carousel.d.ts +55 -24
- package/dist/components/carousel.js +113 -130
- package/dist/components/chart.d.ts +72 -36
- package/dist/components/chart.js +154 -166
- package/dist/components/checkbox-cards.d.ts +15 -8
- package/dist/components/checkbox-cards.js +22 -25
- package/dist/components/checkbox-group.d.ts +16 -8
- package/dist/components/checkbox-group.js +19 -19
- package/dist/components/checkbox.d.ts +9 -4
- package/dist/components/checkbox.js +14 -14
- package/dist/components/collapsible.d.ts +14 -6
- package/dist/components/collapsible.js +18 -16
- package/dist/components/command.d.ts +55 -23
- package/dist/components/command.js +70 -85
- package/dist/components/context-menu.d.ts +72 -22
- package/dist/components/context-menu.js +88 -109
- package/dist/components/dialog.d.ts +53 -22
- package/dist/components/dialog.js +71 -85
- package/dist/components/drawer.d.ts +60 -28
- package/dist/components/drawer.js +59 -67
- package/dist/components/dropdown-menu.d.ts +73 -22
- package/dist/components/dropdown-menu.js +95 -112
- package/dist/components/empty.d.ts +37 -15
- package/dist/components/empty.js +43 -45
- package/dist/components/field.d.ts +63 -25
- package/dist/components/field.js +88 -104
- package/dist/components/form.d.ts +37 -15
- package/dist/components/form.js +65 -70
- package/dist/components/hover-card.d.ts +21 -7
- package/dist/components/hover-card.js +24 -24
- package/dist/components/input-group.d.ts +53 -28
- package/dist/components/input-group.js +63 -77
- package/dist/components/input-number.d.ts +28 -7
- package/dist/components/input-number.js +55 -59
- package/dist/components/input-otp.d.ts +24 -10
- package/dist/components/input-otp.js +33 -37
- package/dist/components/input-password.d.ts +12 -5
- package/dist/components/input-password.js +31 -32
- package/dist/components/input-search.d.ts +18 -8
- package/dist/components/input-search.js +43 -41
- package/dist/components/input.d.ts +10 -4
- package/dist/components/input.js +9 -7
- package/dist/components/item.d.ts +69 -32
- package/dist/components/item.js +89 -92
- package/dist/components/kbd.d.ts +13 -5
- package/dist/components/kbd.js +13 -11
- package/dist/components/label.d.ts +9 -4
- package/dist/components/label.js +9 -7
- package/dist/components/menubar.d.ts +80 -23
- package/dist/components/menubar.js +97 -118
- package/dist/components/native-select.d.ts +16 -6
- package/dist/components/native-select.js +25 -26
- package/dist/components/navigation-menu.d.ts +36 -12
- package/dist/components/navigation-menu.js +60 -75
- package/dist/components/pagination.d.ts +35 -14
- package/dist/components/pagination.js +54 -69
- package/dist/components/popover.d.ts +24 -8
- package/dist/components/popover.js +28 -28
- package/dist/components/progress-circle.d.ts +106 -88
- package/dist/components/progress-circle.js +106 -138
- package/dist/components/progress.d.ts +10 -4
- package/dist/components/progress.js +14 -14
- package/dist/components/radio-cards.d.ts +10 -4
- package/dist/components/radio-cards.js +22 -23
- package/dist/components/radio-group.d.ts +13 -5
- package/dist/components/radio-group.js +18 -16
- package/dist/components/radio.d.ts +12 -5
- package/dist/components/radio.js +10 -8
- package/dist/components/resizable.d.ts +18 -7
- package/dist/components/resizable.js +22 -22
- package/dist/components/scroll-area.d.ts +33 -20
- package/dist/components/scroll-area.js +84 -88
- package/dist/components/select.d.ts +50 -16
- package/dist/components/select.js +77 -96
- package/dist/components/separator.d.ts +29 -19
- package/dist/components/separator.js +36 -34
- package/dist/components/sheet.d.ts +62 -29
- package/dist/components/sheet.js +79 -100
- package/dist/components/sidebar.d.ts +160 -66
- package/dist/components/sidebar.js +294 -336
- package/dist/components/skeleton.d.ts +9 -4
- package/dist/components/skeleton.js +8 -6
- package/dist/components/slider.d.ts +13 -4
- package/dist/components/slider.js +34 -40
- package/dist/components/sonner.d.ts +10 -7
- package/dist/components/sonner.js +16 -14
- package/dist/components/spinner.d.ts +12 -5
- package/dist/components/spinner.js +33 -35
- package/dist/components/switch.d.ts +9 -4
- package/dist/components/switch.js +13 -11
- package/dist/components/table.d.ts +37 -11
- package/dist/components/table.js +47 -45
- package/dist/components/tabs.d.ts +21 -7
- package/dist/components/tabs.js +24 -22
- package/dist/components/textarea.d.ts +9 -4
- package/dist/components/textarea.js +8 -6
- package/dist/components/toggle-group.d.ts +24 -9
- package/dist/components/toggle-group.js +41 -42
- package/dist/components/toggle.d.ts +25 -17
- package/dist/components/toggle.js +30 -28
- package/dist/components/tooltip.d.ts +24 -8
- package/dist/components/tooltip.js +29 -32
- package/dist/hooks/use-animated-value.d.ts +4 -1
- package/dist/hooks/use-animated-value.js +57 -36
- package/dist/hooks/use-copy-to-clipboard.d.ts +11 -5
- package/dist/hooks/use-copy-to-clipboard.js +39 -20
- package/dist/hooks/use-is-mobile.d.ts +4 -1
- package/dist/hooks/use-is-mobile.js +21 -1
- package/dist/hooks/use-media-query.d.ts +4 -1
- package/dist/hooks/use-media-query.js +45 -18
- package/dist/hooks/use-mutation-observer.d.ts +6 -2
- package/dist/hooks/use-mutation-observer.js +34 -16
- package/dist/hooks/use-pagination.d.ts +22 -14
- package/dist/hooks/use-pagination.js +100 -49
- package/dist/index.d.ts +69 -130
- package/dist/index.js +11 -11
- package/dist/primitives/checkbox-group.d.ts +105 -83
- package/dist/primitives/checkbox-group.js +111 -84
- package/dist/primitives/input-number.d.ts +51 -40
- package/dist/primitives/input-number.js +483 -350
- package/dist/primitives/input.d.ts +48 -42
- package/dist/primitives/input.js +65 -43
- package/dist/primitives/progress-circle.d.ts +79 -48
- package/dist/primitives/progress-circle.js +154 -105
- package/package.json +81 -156
- package/dist/components/accordion.cjs +0 -98
- package/dist/components/alert-dialog.cjs +0 -156
- package/dist/components/alert.cjs +0 -84
- package/dist/components/aspect-ratio.cjs +0 -44
- package/dist/components/avatar.cjs +0 -66
- package/dist/components/badge.cjs +0 -67
- package/dist/components/breadcrumb.cjs +0 -125
- package/dist/components/button-group.cjs +0 -87
- package/dist/components/button.cjs +0 -92
- package/dist/components/calendar.cjs +0 -151
- package/dist/components/card.cjs +0 -105
- package/dist/components/carousel.cjs +0 -211
- package/dist/components/chart.cjs +0 -251
- package/dist/components/checkbox-cards.cjs +0 -70
- package/dist/components/checkbox-group.cjs +0 -64
- package/dist/components/checkbox.cjs +0 -54
- package/dist/components/collapsible.cjs +0 -62
- package/dist/components/command.cjs +0 -168
- package/dist/components/context-menu.cjs +0 -219
- package/dist/components/dialog.cjs +0 -165
- package/dist/components/drawer.cjs +0 -144
- package/dist/components/dropdown-menu.cjs +0 -222
- package/dist/components/empty.cjs +0 -113
- package/dist/components/field.cjs +0 -194
- package/dist/components/form.cjs +0 -152
- package/dist/components/hover-card.cjs +0 -78
- package/dist/components/input-group.cjs +0 -156
- package/dist/components/input-number.cjs +0 -99
- package/dist/components/input-otp.cjs +0 -102
- package/dist/components/input-password.cjs +0 -72
- package/dist/components/input-search.cjs +0 -81
- package/dist/components/input.cjs +0 -46
- package/dist/components/item.cjs +0 -186
- package/dist/components/kbd.cjs +0 -54
- package/dist/components/label.cjs +0 -46
- package/dist/components/menubar.cjs +0 -233
- package/dist/components/native-select.cjs +0 -75
- package/dist/components/navigation-menu.cjs +0 -146
- package/dist/components/pagination.cjs +0 -138
- package/dist/components/popover.cjs +0 -87
- package/dist/components/progress-circle.cjs +0 -185
- package/dist/components/progress.cjs +0 -53
- package/dist/components/radio-cards.cjs +0 -67
- package/dist/components/radio-group.cjs +0 -60
- package/dist/components/radio.cjs +0 -48
- package/dist/components/resizable.cjs +0 -72
- package/dist/components/scroll-area.cjs +0 -141
- package/dist/components/select.cjs +0 -181
- package/dist/components/separator.cjs +0 -83
- package/dist/components/sheet.cjs +0 -185
- package/dist/components/sidebar.cjs +0 -507
- package/dist/components/skeleton.cjs +0 -44
- package/dist/components/slider.cjs +0 -80
- package/dist/components/sonner.cjs +0 -58
- package/dist/components/spinner.cjs +0 -76
- package/dist/components/switch.cjs +0 -50
- package/dist/components/table.cjs +0 -118
- package/dist/components/tabs.cjs +0 -76
- package/dist/components/textarea.cjs +0 -44
- package/dist/components/toggle-group.cjs +0 -91
- package/dist/components/toggle.cjs +0 -72
- package/dist/components/tooltip.cjs +0 -91
- package/dist/hooks/use-animated-value.cjs +0 -75
- package/dist/hooks/use-copy-to-clipboard.cjs +0 -58
- package/dist/hooks/use-is-mobile.cjs +0 -40
- package/dist/hooks/use-media-query.cjs +0 -57
- package/dist/hooks/use-mutation-observer.cjs +0 -57
- package/dist/hooks/use-pagination.cjs +0 -93
- package/dist/index.cjs +0 -1081
- package/dist/primitives/checkbox-group.cjs +0 -151
- package/dist/primitives/input-number.cjs +0 -439
- package/dist/primitives/input.cjs +0 -99
- package/dist/primitives/progress-circle.cjs +0 -199
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
Toaster: ()=>Toaster,
|
|
29
|
-
useSonner: ()=>external_sonner_namespaceObject.useSonner,
|
|
30
|
-
toast: ()=>external_sonner_namespaceObject.toast
|
|
31
|
-
});
|
|
32
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
-
const external_next_themes_namespaceObject = require("next-themes");
|
|
34
|
-
const external_sonner_namespaceObject = require("sonner");
|
|
35
|
-
function Toaster({ ...props }) {
|
|
36
|
-
const { theme = "system" } = (0, external_next_themes_namespaceObject.useTheme)();
|
|
37
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_sonner_namespaceObject.Toaster, {
|
|
38
|
-
className: "toaster group",
|
|
39
|
-
style: {
|
|
40
|
-
"--normal-bg": "var(--popover)",
|
|
41
|
-
"--normal-border": "var(--border)",
|
|
42
|
-
"--normal-text": "var(--popover-foreground)"
|
|
43
|
-
},
|
|
44
|
-
theme: theme,
|
|
45
|
-
...props
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
exports.Toaster = __webpack_exports__.Toaster;
|
|
49
|
-
exports.toast = __webpack_exports__.toast;
|
|
50
|
-
exports.useSonner = __webpack_exports__.useSonner;
|
|
51
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
52
|
-
"Toaster",
|
|
53
|
-
"toast",
|
|
54
|
-
"useSonner"
|
|
55
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
56
|
-
Object.defineProperty(exports, '__esModule', {
|
|
57
|
-
value: true
|
|
58
|
-
});
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
Spinner: ()=>Spinner
|
|
29
|
-
});
|
|
30
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
32
|
-
const react_visually_hidden_namespaceObject = require("@radix-ui/react-visually-hidden");
|
|
33
|
-
const SPINNER_COUNT = 8;
|
|
34
|
-
function Spinner({ children, className, loading = true, ...props }) {
|
|
35
|
-
if (!loading) return children;
|
|
36
|
-
const spinner = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
37
|
-
className: (0, tailwind_variants_namespaceObject.cn)("relative flex size-4 items-center justify-center opacity-60", className),
|
|
38
|
-
...props,
|
|
39
|
-
children: Array.from({
|
|
40
|
-
length: SPINNER_COUNT
|
|
41
|
-
}, (_, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
42
|
-
className: (0, tailwind_variants_namespaceObject.cn)("absolute h-full rotate-(--spinner-rotate) before:block before:h-1/3 before:w-full before:animate-out before:rounded-full before:bg-current before:delay-(--spinner-delay) before:animation-duration-(--spinner-duration) before:fade-out-25 before:repeat-infinite"),
|
|
43
|
-
style: {
|
|
44
|
-
"--spinner-delay": `-${((SPINNER_COUNT - index) * 100).toString()}ms`,
|
|
45
|
-
"--spinner-duration": `${(100 * SPINNER_COUNT).toString()}ms`,
|
|
46
|
-
"--spinner-rotate": `${(360 / SPINNER_COUNT * index).toString()}deg`,
|
|
47
|
-
width: `${(100 / SPINNER_COUNT).toString()}%`
|
|
48
|
-
}
|
|
49
|
-
}, index))
|
|
50
|
-
});
|
|
51
|
-
if (void 0 === children) return spinner;
|
|
52
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
53
|
-
className: "relative",
|
|
54
|
-
children: [
|
|
55
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
56
|
-
"aria-hidden": true,
|
|
57
|
-
className: "invisible contents",
|
|
58
|
-
children: children
|
|
59
|
-
}),
|
|
60
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_visually_hidden_namespaceObject.VisuallyHidden, {
|
|
61
|
-
children: children
|
|
62
|
-
}),
|
|
63
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
64
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
65
|
-
children: spinner
|
|
66
|
-
})
|
|
67
|
-
]
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
exports.Spinner = __webpack_exports__.Spinner;
|
|
71
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
72
|
-
"Spinner"
|
|
73
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
74
|
-
Object.defineProperty(exports, '__esModule', {
|
|
75
|
-
value: true
|
|
76
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
Switch: ()=>Switch
|
|
29
|
-
});
|
|
30
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
32
|
-
const react_switch_namespaceObject = require("@radix-ui/react-switch");
|
|
33
|
-
function Switch({ className, ...props }) {
|
|
34
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_switch_namespaceObject.Root, {
|
|
35
|
-
className: (0, tailwind_variants_namespaceObject.cn)("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent p-0.75 shadow-xs outline-hidden transition-all focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:not-data-[state=checked]:border-ring/60 disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:focus-visible:ring-primary/20 data-[state=unchecked]:bg-input dark:data-[state=checked]:focus-visible:ring-primary/40 dark:data-[state=unchecked]:bg-input/80", className),
|
|
36
|
-
"data-slot": "switch",
|
|
37
|
-
...props,
|
|
38
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_switch_namespaceObject.Thumb, {
|
|
39
|
-
className: "pointer-events-none block size-3.5 rounded-full bg-background shadow-sm transition-transform data-[state=checked]:translate-x-3.5 data-[state=unchecked]:translate-x-0 dark:not-data-[state=checked]:bg-foreground",
|
|
40
|
-
"data-slot": "switch-thumb"
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
exports.Switch = __webpack_exports__.Switch;
|
|
45
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
46
|
-
"Switch"
|
|
47
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
48
|
-
Object.defineProperty(exports, '__esModule', {
|
|
49
|
-
value: true
|
|
50
|
-
});
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: definition[key]
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
})();
|
|
11
|
-
(()=>{
|
|
12
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
-
})();
|
|
14
|
-
(()=>{
|
|
15
|
-
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
-
value: 'Module'
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
var __webpack_exports__ = {};
|
|
25
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
TableFooter: ()=>TableFooter,
|
|
28
|
-
TableHead: ()=>TableHead,
|
|
29
|
-
TableCaption: ()=>TableCaption,
|
|
30
|
-
TableBody: ()=>TableBody,
|
|
31
|
-
TableCell: ()=>TableCell,
|
|
32
|
-
TableRow: ()=>TableRow,
|
|
33
|
-
TableHeader: ()=>TableHeader,
|
|
34
|
-
Table: ()=>Table
|
|
35
|
-
});
|
|
36
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
37
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
38
|
-
function Table({ className, ...props }) {
|
|
39
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
40
|
-
className: "relative w-full overflow-auto",
|
|
41
|
-
"data-slot": "table-cotainer",
|
|
42
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("table", {
|
|
43
|
-
className: (0, tailwind_variants_namespaceObject.cn)("w-full caption-bottom text-sm", className),
|
|
44
|
-
"data-slot": "table",
|
|
45
|
-
...props
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function TableHeader({ className, ...props }) {
|
|
50
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("thead", {
|
|
51
|
-
className: (0, tailwind_variants_namespaceObject.cn)("*:border-b *:has-aria-expanded:bg-transparent", className),
|
|
52
|
-
"data-slot": "table-header",
|
|
53
|
-
...props
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function TableBody({ className, ...props }) {
|
|
57
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tbody", {
|
|
58
|
-
className: (0, tailwind_variants_namespaceObject.cn)("*:last-child:border-0", className),
|
|
59
|
-
"data-slot": "table-body",
|
|
60
|
-
...props
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function TableFooter({ className, ...props }) {
|
|
64
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tfoot", {
|
|
65
|
-
className: (0, tailwind_variants_namespaceObject.cn)("bg-muted/50 font-medium *:border-t *:border-b-0 *:has-aria-expanded:bg-transparent", className),
|
|
66
|
-
"data-slot": "table-footer",
|
|
67
|
-
...props
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function TableRow({ className, ...props }) {
|
|
71
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tr", {
|
|
72
|
-
className: (0, tailwind_variants_namespaceObject.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
73
|
-
"data-slot": "table-row",
|
|
74
|
-
...props
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function TableHead({ className, ...props }) {
|
|
78
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("th", {
|
|
79
|
-
className: (0, tailwind_variants_namespaceObject.cn)("p-2 text-left align-middle font-medium", className),
|
|
80
|
-
"data-slot": "table-head",
|
|
81
|
-
...props
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function TableCell({ className, ...props }) {
|
|
85
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("td", {
|
|
86
|
-
className: (0, tailwind_variants_namespaceObject.cn)("p-2 align-middle", className),
|
|
87
|
-
"data-slot": "table-cell",
|
|
88
|
-
...props
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function TableCaption({ className, ...props }) {
|
|
92
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("caption", {
|
|
93
|
-
className: (0, tailwind_variants_namespaceObject.cn)("mt-4 text-sm text-muted-foreground", className),
|
|
94
|
-
"data-slot": "table-caption",
|
|
95
|
-
...props
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
exports.Table = __webpack_exports__.Table;
|
|
99
|
-
exports.TableBody = __webpack_exports__.TableBody;
|
|
100
|
-
exports.TableCaption = __webpack_exports__.TableCaption;
|
|
101
|
-
exports.TableCell = __webpack_exports__.TableCell;
|
|
102
|
-
exports.TableFooter = __webpack_exports__.TableFooter;
|
|
103
|
-
exports.TableHead = __webpack_exports__.TableHead;
|
|
104
|
-
exports.TableHeader = __webpack_exports__.TableHeader;
|
|
105
|
-
exports.TableRow = __webpack_exports__.TableRow;
|
|
106
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
107
|
-
"Table",
|
|
108
|
-
"TableBody",
|
|
109
|
-
"TableCaption",
|
|
110
|
-
"TableCell",
|
|
111
|
-
"TableFooter",
|
|
112
|
-
"TableHead",
|
|
113
|
-
"TableHeader",
|
|
114
|
-
"TableRow"
|
|
115
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
116
|
-
Object.defineProperty(exports, '__esModule', {
|
|
117
|
-
value: true
|
|
118
|
-
});
|
package/dist/components/tabs.cjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
TabsList: ()=>TabsList,
|
|
29
|
-
Tabs: ()=>Tabs,
|
|
30
|
-
TabsTrigger: ()=>TabsTrigger,
|
|
31
|
-
TabsContent: ()=>TabsContent
|
|
32
|
-
});
|
|
33
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
35
|
-
const react_tabs_namespaceObject = require("@radix-ui/react-tabs");
|
|
36
|
-
function Tabs({ className, ...props }) {
|
|
37
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Root, {
|
|
38
|
-
className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col gap-2", className),
|
|
39
|
-
"data-slot": "tabs",
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function TabsList({ className, ...props }) {
|
|
44
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.List, {
|
|
45
|
-
className: (0, tailwind_variants_namespaceObject.cn)("inline-flex w-fit items-center justify-center gap-1 rounded-xl bg-muted px-1 py-1 text-muted-foreground", className),
|
|
46
|
-
"data-slot": "tabs-list",
|
|
47
|
-
...props
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function TabsTrigger({ className, ...props }) {
|
|
51
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Trigger, {
|
|
52
|
-
className: (0, tailwind_variants_namespaceObject.cn)("inline-flex items-center justify-center gap-1.5 rounded-lg px-2 py-1.5 text-sm font-medium whitespace-nowrap text-muted-foreground transition not-dark:outline-hidden hover:not-disabled:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:-outline-offset-1 dark:outline-ring dark:data-[state=active]:bg-input/50 dark:data-[state=active]:outline-1 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
53
|
-
"data-slot": "tabs-trigger",
|
|
54
|
-
...props
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function TabsContent({ className, ...props }) {
|
|
58
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Content, {
|
|
59
|
-
className: (0, tailwind_variants_namespaceObject.cn)("mt-2 rounded-xl ring-ring/50 outline-ring focus-visible:ring-4 focus-visible:outline-1", className),
|
|
60
|
-
"data-slot": "tabs-content",
|
|
61
|
-
...props
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
exports.Tabs = __webpack_exports__.Tabs;
|
|
65
|
-
exports.TabsContent = __webpack_exports__.TabsContent;
|
|
66
|
-
exports.TabsList = __webpack_exports__.TabsList;
|
|
67
|
-
exports.TabsTrigger = __webpack_exports__.TabsTrigger;
|
|
68
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
69
|
-
"Tabs",
|
|
70
|
-
"TabsContent",
|
|
71
|
-
"TabsList",
|
|
72
|
-
"TabsTrigger"
|
|
73
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
74
|
-
Object.defineProperty(exports, '__esModule', {
|
|
75
|
-
value: true
|
|
76
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: definition[key]
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
})();
|
|
11
|
-
(()=>{
|
|
12
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
-
})();
|
|
14
|
-
(()=>{
|
|
15
|
-
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
-
value: 'Module'
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
var __webpack_exports__ = {};
|
|
25
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
Textarea: ()=>Textarea
|
|
28
|
-
});
|
|
29
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
31
|
-
function Textarea({ className, ...props }) {
|
|
32
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
|
|
33
|
-
className: (0, tailwind_variants_namespaceObject.cn)("flex min-h-16 w-full grow rounded-lg border border-input px-3 py-2 text-base shadow-xs outline-hidden transition placeholder:text-muted-foreground hover:not-disabled:not-focus-visible:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-invalid:border-destructive focus-within:aria-invalid:ring-destructive/20 hover:not-disabled:not-focus-within:aria-invalid:border-destructive/60 md:text-sm dark:bg-input/30 dark:focus-within:aria-invalid:ring-destructive/40", className),
|
|
34
|
-
"data-slot": "textarea",
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
exports.Textarea = __webpack_exports__.Textarea;
|
|
39
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
40
|
-
"Textarea"
|
|
41
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
42
|
-
Object.defineProperty(exports, '__esModule', {
|
|
43
|
-
value: true
|
|
44
|
-
});
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
ToggleGroup: ()=>ToggleGroup,
|
|
29
|
-
ToggleGroupItem: ()=>ToggleGroupItem
|
|
30
|
-
});
|
|
31
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
33
|
-
const react_context_namespaceObject = require("@radix-ui/react-context");
|
|
34
|
-
const react_toggle_group_namespaceObject = require("@radix-ui/react-toggle-group");
|
|
35
|
-
const external_toggle_cjs_namespaceObject = require("./toggle.cjs");
|
|
36
|
-
const TOGGLE_GROUP_NAME = "ToggleGroup";
|
|
37
|
-
const [createToggleGroupContext] = (0, react_context_namespaceObject.createContextScope)(TOGGLE_GROUP_NAME, [
|
|
38
|
-
react_toggle_group_namespaceObject.createToggleGroupScope
|
|
39
|
-
]);
|
|
40
|
-
const useToggleGroupScope = (0, react_toggle_group_namespaceObject.createToggleGroupScope)();
|
|
41
|
-
const [ToggleGroupProvider, useToggleGroupContext] = createToggleGroupContext(TOGGLE_GROUP_NAME);
|
|
42
|
-
function ToggleGroup({ __scopeToggleGroup, children, className, size, spacing = 0, variant, ...props }) {
|
|
43
|
-
const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
|
|
44
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ToggleGroupProvider, {
|
|
45
|
-
scope: __scopeToggleGroup,
|
|
46
|
-
size: size,
|
|
47
|
-
spacing: spacing,
|
|
48
|
-
variant: variant,
|
|
49
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toggle_group_namespaceObject.Root, {
|
|
50
|
-
className: (0, tailwind_variants_namespaceObject.cn)("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-lg data-[spacing=default]:data-[variant=outline]:shadow-xs", className),
|
|
51
|
-
"data-size": size,
|
|
52
|
-
"data-slot": "toggle-group",
|
|
53
|
-
"data-spacing": spacing,
|
|
54
|
-
"data-variant": variant,
|
|
55
|
-
style: {
|
|
56
|
-
"--gap": spacing
|
|
57
|
-
},
|
|
58
|
-
...toggleGroupScope,
|
|
59
|
-
...props,
|
|
60
|
-
children: children
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
const TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem";
|
|
65
|
-
function ToggleGroupItem({ __scopeToggleGroup, children, className, ...props }) {
|
|
66
|
-
const { size, spacing, variant } = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);
|
|
67
|
-
const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
|
|
68
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toggle_group_namespaceObject.Item, {
|
|
69
|
-
className: (0, tailwind_variants_namespaceObject.cn)((0, external_toggle_cjs_namespaceObject.toggleVariants)({
|
|
70
|
-
className,
|
|
71
|
-
size,
|
|
72
|
-
variant
|
|
73
|
-
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-lg data-[spacing=0]:last:rounded-r-lg data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l"),
|
|
74
|
-
"data-size": size,
|
|
75
|
-
"data-slot": "toggle-group-item",
|
|
76
|
-
"data-spacing": spacing,
|
|
77
|
-
"data-variant": variant,
|
|
78
|
-
...toggleGroupScope,
|
|
79
|
-
...props,
|
|
80
|
-
children: children
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
exports.ToggleGroup = __webpack_exports__.ToggleGroup;
|
|
84
|
-
exports.ToggleGroupItem = __webpack_exports__.ToggleGroupItem;
|
|
85
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
86
|
-
"ToggleGroup",
|
|
87
|
-
"ToggleGroupItem"
|
|
88
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
89
|
-
Object.defineProperty(exports, '__esModule', {
|
|
90
|
-
value: true
|
|
91
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
Toggle: ()=>Toggle,
|
|
29
|
-
toggleVariants: ()=>toggleVariants
|
|
30
|
-
});
|
|
31
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
33
|
-
const react_toggle_namespaceObject = require("@radix-ui/react-toggle");
|
|
34
|
-
const toggleVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
35
|
-
base: "inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
36
|
-
variants: {
|
|
37
|
-
size: {
|
|
38
|
-
default: "h-9 min-w-9 px-2",
|
|
39
|
-
lg: "h-10 min-w-10 px-2.5",
|
|
40
|
-
sm: "h-8 min-w-8 px-1.5"
|
|
41
|
-
},
|
|
42
|
-
variant: {
|
|
43
|
-
default: "bg-transparent",
|
|
44
|
-
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
defaultVariants: {
|
|
48
|
-
size: "default",
|
|
49
|
-
variant: "default"
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
function Toggle({ children, className, size, variant, ...props }) {
|
|
53
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toggle_namespaceObject.Root, {
|
|
54
|
-
className: toggleVariants({
|
|
55
|
-
className,
|
|
56
|
-
size,
|
|
57
|
-
variant
|
|
58
|
-
}),
|
|
59
|
-
"data-slot": "toggle",
|
|
60
|
-
...props,
|
|
61
|
-
children: children
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
exports.Toggle = __webpack_exports__.Toggle;
|
|
65
|
-
exports.toggleVariants = __webpack_exports__.toggleVariants;
|
|
66
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
67
|
-
"Toggle",
|
|
68
|
-
"toggleVariants"
|
|
69
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
70
|
-
Object.defineProperty(exports, '__esModule', {
|
|
71
|
-
value: true
|
|
72
|
-
});
|