@codefast/ui 0.3.10 → 0.3.11-canary.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/CHANGELOG.md +32 -0
- package/README.md +277 -167
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +5 -5
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +9 -9
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +5 -5
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +7 -7
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +6 -8
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +8 -8
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +17 -17
- package/dist/components/calendar.d.ts +5 -5
- package/dist/components/calendar.js +35 -35
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +7 -7
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +20 -20
- package/dist/components/chart.d.ts +12 -11
- package/dist/components/chart.js +42 -42
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +2 -2
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +10 -10
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +10 -10
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +12 -12
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +9 -9
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +10 -10
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +10 -10
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +17 -17
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +8 -8
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +3 -3
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +20 -20
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +7 -7
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +4 -4
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +6 -6
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +4 -4
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +23 -23
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +2 -2
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +13 -13
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +10 -10
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +6 -6
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +3 -3
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +22 -22
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +3 -3
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +1 -1
- package/dist/components/resizable.d.ts +2 -2
- package/dist/components/resizable.js +3 -3
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +31 -31
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +9 -9
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +9 -9
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +17 -17
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +65 -65
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +4 -4
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +4 -4
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +5 -5
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +8 -8
- package/dist/components/tabs.d.ts +2 -2
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +5 -5
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.js +8 -8
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +2 -2
- package/dist/css/preset.css +4 -4
- package/dist/css/style.css +3 -3
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -1
- package/dist/hooks/use-media-query.js +3 -3
- package/dist/hooks/use-mutation-observer.d.ts +1 -1
- package/dist/hooks/use-pagination.js +1 -1
- package/dist/index.d.ts +130 -130
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +3 -3
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +46 -46
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +7 -7
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +8 -8
- package/package.json +111 -189
- 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 -127
- 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,75 +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
|
-
NativeSelectOption: ()=>NativeSelectOption,
|
|
28
|
-
NativeSelect: ()=>NativeSelect,
|
|
29
|
-
NativeSelectOptGroup: ()=>NativeSelectOptGroup
|
|
30
|
-
});
|
|
31
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
33
|
-
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
34
|
-
function NativeSelect({ className, ...props }) {
|
|
35
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
36
|
-
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
37
|
-
"data-slot": "native-select-wrapper",
|
|
38
|
-
children: [
|
|
39
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("select", {
|
|
40
|
-
className: (0, tailwind_variants_namespaceObject.cn)('border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 h-9 w-full min-w-0 appearance-none rounded-lg border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', className),
|
|
41
|
-
"data-slot": "native-select",
|
|
42
|
-
...props
|
|
43
|
-
}),
|
|
44
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {
|
|
45
|
-
"aria-hidden": "true",
|
|
46
|
-
className: "text-muted-foreground pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 opacity-50 select-none",
|
|
47
|
-
"data-slot": "native-select-icon"
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function NativeSelectOption({ ...props }) {
|
|
53
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("option", {
|
|
54
|
-
"data-slot": "native-select-option",
|
|
55
|
-
...props
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function NativeSelectOptGroup({ className, ...props }) {
|
|
59
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("optgroup", {
|
|
60
|
-
className: (0, tailwind_variants_namespaceObject.cn)(className),
|
|
61
|
-
"data-slot": "native-select-optgroup",
|
|
62
|
-
...props
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
exports.NativeSelect = __webpack_exports__.NativeSelect;
|
|
66
|
-
exports.NativeSelectOptGroup = __webpack_exports__.NativeSelectOptGroup;
|
|
67
|
-
exports.NativeSelectOption = __webpack_exports__.NativeSelectOption;
|
|
68
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
69
|
-
"NativeSelect",
|
|
70
|
-
"NativeSelectOptGroup",
|
|
71
|
-
"NativeSelectOption"
|
|
72
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
73
|
-
Object.defineProperty(exports, '__esModule', {
|
|
74
|
-
value: true
|
|
75
|
-
});
|
|
@@ -1,146 +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
|
-
NavigationMenu: ()=>NavigationMenu,
|
|
28
|
-
NavigationMenuContent: ()=>NavigationMenuContent,
|
|
29
|
-
NavigationMenuLink: ()=>NavigationMenuLink,
|
|
30
|
-
NavigationMenuList: ()=>NavigationMenuList,
|
|
31
|
-
NavigationMenuTrigger: ()=>NavigationMenuTrigger,
|
|
32
|
-
navigationMenuTriggerVariants: ()=>navigationMenuTriggerVariants,
|
|
33
|
-
NavigationMenuItem: ()=>NavigationMenuItem
|
|
34
|
-
});
|
|
35
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
36
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
37
|
-
const react_navigation_menu_namespaceObject = require("@radix-ui/react-navigation-menu");
|
|
38
|
-
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
39
|
-
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
40
|
-
const navigationMenuTriggerVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
41
|
-
base: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
42
|
-
className: 'data-[state=open]:bg-secondary/50 data-[state=open]:text-secondary-foreground group/navigation-menu-trigger focus-visible:bg-secondary dark:hover:not-disabled:bg-secondary',
|
|
43
|
-
variant: 'ghost'
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
function NavigationMenu({ children, className, viewport = true, ...props }) {
|
|
47
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_navigation_menu_namespaceObject.Root, {
|
|
48
|
-
className: (0, tailwind_variants_namespaceObject.cn)('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className),
|
|
49
|
-
"data-slot": "navigation-menu",
|
|
50
|
-
"data-viewport": viewport,
|
|
51
|
-
...props,
|
|
52
|
-
children: [
|
|
53
|
-
children,
|
|
54
|
-
viewport ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuViewport, {}) : null
|
|
55
|
-
]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function NavigationMenuList({ children, className, ...props }) {
|
|
59
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_navigation_menu_namespaceObject.List, {
|
|
60
|
-
className: (0, tailwind_variants_namespaceObject.cn)('flex flex-1 list-none items-center justify-center gap-1', className),
|
|
61
|
-
"data-slot": "navigation-menu-list",
|
|
62
|
-
...props,
|
|
63
|
-
children: [
|
|
64
|
-
children,
|
|
65
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NavigationMenuIndicator, {
|
|
66
|
-
className: "invisible"
|
|
67
|
-
})
|
|
68
|
-
]
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function NavigationMenuItem({ className, ...props }) {
|
|
72
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Item, {
|
|
73
|
-
className: (0, tailwind_variants_namespaceObject.cn)('group-data-[viewport=false]/navigation-menu:relative', className),
|
|
74
|
-
"data-slot": "navigation-menu-item",
|
|
75
|
-
...props
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function NavigationMenuTrigger({ children, className, ...props }) {
|
|
79
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_navigation_menu_namespaceObject.Trigger, {
|
|
80
|
-
className: navigationMenuTriggerVariants({
|
|
81
|
-
className
|
|
82
|
-
}),
|
|
83
|
-
"data-slot": "navigation-menu-trigger",
|
|
84
|
-
...props,
|
|
85
|
-
children: [
|
|
86
|
-
children,
|
|
87
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {
|
|
88
|
-
"aria-hidden": "true",
|
|
89
|
-
className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]/navigation-menu-trigger:rotate-180"
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function NavigationMenuContent({ className, ...props }) {
|
|
95
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Content, {
|
|
96
|
-
className: (0, tailwind_variants_namespaceObject.cn)('data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out-0 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 ease-ui top-0 left-0 w-full group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-2 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:p-1 group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=true]/navigation-menu:p-2 md:absolute md:w-auto', className),
|
|
97
|
-
"data-slot": "navigation-menu-content",
|
|
98
|
-
...props
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function NavigationMenuLink({ className, ...props }) {
|
|
102
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Link, {
|
|
103
|
-
className: (0, tailwind_variants_namespaceObject.cn)("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm outline-hidden transition [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
104
|
-
"data-slot": "navigation-menu-link",
|
|
105
|
-
...props
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
function NavigationMenuViewport({ className, ...props }) {
|
|
109
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
110
|
-
className: "absolute top-full left-0 z-30 flex justify-center perspective-distant",
|
|
111
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Viewport, {
|
|
112
|
-
className: (0, tailwind_variants_namespaceObject.cn)('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-90 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 ease-ui relative mt-2 min-h-[calc(var(--radix-navigation-menu-viewport-height)+2px)] w-full origin-[top_center] overflow-hidden rounded-lg border shadow-lg transition-[width,height] sm:min-w-[calc(var(--radix-navigation-menu-viewport-width)+2px)]', className),
|
|
113
|
-
"data-slot": "navigation-menu-viewport",
|
|
114
|
-
...props
|
|
115
|
-
})
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function NavigationMenuIndicator({ className, ...props }) {
|
|
119
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_navigation_menu_namespaceObject.Indicator, {
|
|
120
|
-
className: (0, tailwind_variants_namespaceObject.cn)('data-[state=visible]:fade-in-0 ease-ui data-[state=visible]:animate-in data-[state=hidden]:fade-out-0 data-[state=hidden]:animate-out top-full z-10 flex h-2 items-center justify-center overflow-hidden', className),
|
|
121
|
-
"data-slot": "navigation-menu-indicator",
|
|
122
|
-
...props,
|
|
123
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
124
|
-
className: "bg-popover text-popover-foreground relative top-[60%] size-2.5 rotate-45 rounded-tl-xs"
|
|
125
|
-
})
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
exports.NavigationMenu = __webpack_exports__.NavigationMenu;
|
|
129
|
-
exports.NavigationMenuContent = __webpack_exports__.NavigationMenuContent;
|
|
130
|
-
exports.NavigationMenuItem = __webpack_exports__.NavigationMenuItem;
|
|
131
|
-
exports.NavigationMenuLink = __webpack_exports__.NavigationMenuLink;
|
|
132
|
-
exports.NavigationMenuList = __webpack_exports__.NavigationMenuList;
|
|
133
|
-
exports.NavigationMenuTrigger = __webpack_exports__.NavigationMenuTrigger;
|
|
134
|
-
exports.navigationMenuTriggerVariants = __webpack_exports__.navigationMenuTriggerVariants;
|
|
135
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
136
|
-
"NavigationMenu",
|
|
137
|
-
"NavigationMenuContent",
|
|
138
|
-
"NavigationMenuItem",
|
|
139
|
-
"NavigationMenuLink",
|
|
140
|
-
"NavigationMenuList",
|
|
141
|
-
"NavigationMenuTrigger",
|
|
142
|
-
"navigationMenuTriggerVariants"
|
|
143
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
144
|
-
Object.defineProperty(exports, '__esModule', {
|
|
145
|
-
value: true
|
|
146
|
-
});
|
|
@@ -1,138 +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
|
-
PaginationPrevious: ()=>PaginationPrevious,
|
|
28
|
-
Pagination: ()=>Pagination,
|
|
29
|
-
PaginationLink: ()=>PaginationLink,
|
|
30
|
-
PaginationItem: ()=>PaginationItem,
|
|
31
|
-
PaginationNext: ()=>PaginationNext,
|
|
32
|
-
PaginationContent: ()=>PaginationContent,
|
|
33
|
-
PaginationEllipsis: ()=>PaginationEllipsis
|
|
34
|
-
});
|
|
35
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
36
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
37
|
-
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
38
|
-
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
39
|
-
function Pagination({ className, ...props }) {
|
|
40
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("nav", {
|
|
41
|
-
"aria-label": "pagination",
|
|
42
|
-
className: (0, tailwind_variants_namespaceObject.cn)('mx-auto flex w-full justify-center', className),
|
|
43
|
-
"data-slot": "pagination",
|
|
44
|
-
...props
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function PaginationContent({ className, ...props }) {
|
|
48
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
|
|
49
|
-
className: (0, tailwind_variants_namespaceObject.cn)('flex flex-row items-center gap-1', className),
|
|
50
|
-
"data-slot": "pagination-content",
|
|
51
|
-
...props
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function PaginationItem(props) {
|
|
55
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("li", {
|
|
56
|
-
"data-slot": "pagination-item",
|
|
57
|
-
...props
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function PaginationLink({ children, className, isActive, size = 'icon', ...props }) {
|
|
61
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
|
|
62
|
-
"aria-current": isActive ? 'page' : void 0,
|
|
63
|
-
className: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
64
|
-
className,
|
|
65
|
-
size,
|
|
66
|
-
variant: isActive ? 'outline' : 'ghost'
|
|
67
|
-
}),
|
|
68
|
-
"data-slot": "pagination-link",
|
|
69
|
-
...props,
|
|
70
|
-
children: children
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function PaginationPrevious({ ...props }) {
|
|
74
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationLink, {
|
|
75
|
-
"aria-label": "Go to previous page",
|
|
76
|
-
"data-slot": "pagination-previous",
|
|
77
|
-
size: "md",
|
|
78
|
-
...props,
|
|
79
|
-
children: [
|
|
80
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon, {
|
|
81
|
-
className: "size-4"
|
|
82
|
-
}),
|
|
83
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
84
|
-
children: "Previous"
|
|
85
|
-
})
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function PaginationNext({ ...props }) {
|
|
90
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(PaginationLink, {
|
|
91
|
-
"aria-label": "Go to next page",
|
|
92
|
-
"data-slot": "pagination-next",
|
|
93
|
-
size: "md",
|
|
94
|
-
...props,
|
|
95
|
-
children: [
|
|
96
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
97
|
-
children: "Next"
|
|
98
|
-
}),
|
|
99
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {})
|
|
100
|
-
]
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function PaginationEllipsis({ className, ...props }) {
|
|
104
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
105
|
-
"aria-hidden": true,
|
|
106
|
-
className: (0, tailwind_variants_namespaceObject.cn)('flex size-10 items-center justify-center', className),
|
|
107
|
-
"data-slot": "pagination-ellipsis",
|
|
108
|
-
...props,
|
|
109
|
-
children: [
|
|
110
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EllipsisIcon, {
|
|
111
|
-
className: "size-4"
|
|
112
|
-
}),
|
|
113
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
114
|
-
className: "sr-only",
|
|
115
|
-
children: "More pages"
|
|
116
|
-
})
|
|
117
|
-
]
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
exports.Pagination = __webpack_exports__.Pagination;
|
|
121
|
-
exports.PaginationContent = __webpack_exports__.PaginationContent;
|
|
122
|
-
exports.PaginationEllipsis = __webpack_exports__.PaginationEllipsis;
|
|
123
|
-
exports.PaginationItem = __webpack_exports__.PaginationItem;
|
|
124
|
-
exports.PaginationLink = __webpack_exports__.PaginationLink;
|
|
125
|
-
exports.PaginationNext = __webpack_exports__.PaginationNext;
|
|
126
|
-
exports.PaginationPrevious = __webpack_exports__.PaginationPrevious;
|
|
127
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
128
|
-
"Pagination",
|
|
129
|
-
"PaginationContent",
|
|
130
|
-
"PaginationEllipsis",
|
|
131
|
-
"PaginationItem",
|
|
132
|
-
"PaginationLink",
|
|
133
|
-
"PaginationNext",
|
|
134
|
-
"PaginationPrevious"
|
|
135
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
136
|
-
Object.defineProperty(exports, '__esModule', {
|
|
137
|
-
value: true
|
|
138
|
-
});
|
|
@@ -1,87 +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
|
-
PopoverAnchor: ()=>PopoverAnchor,
|
|
29
|
-
PopoverArrow: ()=>PopoverArrow,
|
|
30
|
-
PopoverContent: ()=>PopoverContent,
|
|
31
|
-
Popover: ()=>Popover,
|
|
32
|
-
PopoverTrigger: ()=>PopoverTrigger
|
|
33
|
-
});
|
|
34
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
35
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
36
|
-
const react_popover_namespaceObject = require("@radix-ui/react-popover");
|
|
37
|
-
function Popover({ ...props }) {
|
|
38
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Root, {
|
|
39
|
-
"data-slot": "popover",
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function PopoverTrigger({ ...props }) {
|
|
44
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Trigger, {
|
|
45
|
-
"data-slot": "popover-trigger",
|
|
46
|
-
...props
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function PopoverAnchor({ ...props }) {
|
|
50
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Anchor, {
|
|
51
|
-
"data-slot": "popover-anchor",
|
|
52
|
-
...props
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function PopoverContent({ align = 'center', className, sideOffset = 4, ...props }) {
|
|
56
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Portal, {
|
|
57
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Content, {
|
|
58
|
-
align: align,
|
|
59
|
-
className: (0, tailwind_variants_namespaceObject.cn)('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 ease-ui z-50 min-w-32 origin-(--radix-popover-content-transform-origin) rounded-lg border p-4 shadow-lg outline-hidden', className),
|
|
60
|
-
"data-slot": "popover-content",
|
|
61
|
-
sideOffset: sideOffset,
|
|
62
|
-
...props
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function PopoverArrow({ className, ...props }) {
|
|
67
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_popover_namespaceObject.Arrow, {
|
|
68
|
-
className: (0, tailwind_variants_namespaceObject.cn)('fill-popover', className),
|
|
69
|
-
"data-slot": "popover-arrow",
|
|
70
|
-
...props
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
exports.Popover = __webpack_exports__.Popover;
|
|
74
|
-
exports.PopoverAnchor = __webpack_exports__.PopoverAnchor;
|
|
75
|
-
exports.PopoverArrow = __webpack_exports__.PopoverArrow;
|
|
76
|
-
exports.PopoverContent = __webpack_exports__.PopoverContent;
|
|
77
|
-
exports.PopoverTrigger = __webpack_exports__.PopoverTrigger;
|
|
78
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
79
|
-
"Popover",
|
|
80
|
-
"PopoverAnchor",
|
|
81
|
-
"PopoverArrow",
|
|
82
|
-
"PopoverContent",
|
|
83
|
-
"PopoverTrigger"
|
|
84
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
85
|
-
Object.defineProperty(exports, '__esModule', {
|
|
86
|
-
value: true
|
|
87
|
-
});
|
|
@@ -1,185 +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
|
-
ProgressCircle: ()=>ProgressCircle,
|
|
29
|
-
progressCircleVariants: ()=>progressCircleVariants
|
|
30
|
-
});
|
|
31
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
33
|
-
const external_react_namespaceObject = require("react");
|
|
34
|
-
const use_animated_value_cjs_namespaceObject = require("../hooks/use-animated-value.cjs");
|
|
35
|
-
const progress_circle_cjs_namespaceObject = require("../primitives/progress-circle.cjs");
|
|
36
|
-
const progressCircleVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
37
|
-
defaultVariants: {
|
|
38
|
-
size: 'md',
|
|
39
|
-
thickness: 'regular',
|
|
40
|
-
variant: 'default'
|
|
41
|
-
},
|
|
42
|
-
slots: {
|
|
43
|
-
indicator: 'origin-center',
|
|
44
|
-
label: 'absolute inset-0 flex items-center justify-center text-xs font-medium',
|
|
45
|
-
root: 'relative inline-flex items-center justify-center',
|
|
46
|
-
svg: 'size-full',
|
|
47
|
-
track: 'origin-center'
|
|
48
|
-
},
|
|
49
|
-
variants: {
|
|
50
|
-
size: {
|
|
51
|
-
sm: {
|
|
52
|
-
label: 'text-[0.625rem]'
|
|
53
|
-
},
|
|
54
|
-
md: {
|
|
55
|
-
label: 'text-xs'
|
|
56
|
-
},
|
|
57
|
-
lg: {
|
|
58
|
-
label: 'text-sm'
|
|
59
|
-
},
|
|
60
|
-
xl: {
|
|
61
|
-
label: 'text-base'
|
|
62
|
-
},
|
|
63
|
-
'2xl': {
|
|
64
|
-
label: 'text-lg'
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
thickness: {
|
|
68
|
-
regular: {},
|
|
69
|
-
thick: {},
|
|
70
|
-
thin: {}
|
|
71
|
-
},
|
|
72
|
-
variant: {
|
|
73
|
-
default: {
|
|
74
|
-
indicator: 'text-primary',
|
|
75
|
-
track: 'text-primary/20'
|
|
76
|
-
},
|
|
77
|
-
destructive: {
|
|
78
|
-
indicator: 'text-destructive',
|
|
79
|
-
track: 'text-destructive/20'
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
function ProgressCircle({ animate = true, animationDuration = 1000, className, classNames, customLabel, showValue = false, size, sizeInPixels, strokeWidth, thickness = 'regular', value = 0, variant = 'default', ...props }) {
|
|
85
|
-
const displayValue = (0, use_animated_value_cjs_namespaceObject.useAnimatedValue)(value, animationDuration, animate);
|
|
86
|
-
const actualSize = (0, external_react_namespaceObject.useMemo)(()=>sizeInPixels ?? getActualSize(size), [
|
|
87
|
-
sizeInPixels,
|
|
88
|
-
size
|
|
89
|
-
]);
|
|
90
|
-
const actualThickness = (0, external_react_namespaceObject.useMemo)(()=>strokeWidth ?? getStrokeWidth(thickness, actualSize), [
|
|
91
|
-
strokeWidth,
|
|
92
|
-
thickness,
|
|
93
|
-
actualSize
|
|
94
|
-
]);
|
|
95
|
-
const slots = (0, external_react_namespaceObject.useMemo)(()=>progressCircleVariants({
|
|
96
|
-
size,
|
|
97
|
-
thickness,
|
|
98
|
-
variant
|
|
99
|
-
}), [
|
|
100
|
-
variant,
|
|
101
|
-
size,
|
|
102
|
-
thickness
|
|
103
|
-
]);
|
|
104
|
-
const shouldShowLabel = showValue || Boolean(customLabel);
|
|
105
|
-
const renderLabel = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
106
|
-
if (customLabel) return customLabel({
|
|
107
|
-
value: displayValue
|
|
108
|
-
});
|
|
109
|
-
return `${displayValue.toString()}%`;
|
|
110
|
-
}, [
|
|
111
|
-
customLabel,
|
|
112
|
-
displayValue
|
|
113
|
-
]);
|
|
114
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Provider, {
|
|
115
|
-
size: actualSize,
|
|
116
|
-
strokeWidth: actualThickness,
|
|
117
|
-
value: value,
|
|
118
|
-
...props,
|
|
119
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(progress_circle_cjs_namespaceObject.Root, {
|
|
120
|
-
className: slots.root({
|
|
121
|
-
className: [
|
|
122
|
-
className,
|
|
123
|
-
classNames?.root
|
|
124
|
-
]
|
|
125
|
-
}),
|
|
126
|
-
children: [
|
|
127
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(progress_circle_cjs_namespaceObject.SVG, {
|
|
128
|
-
className: slots.svg({
|
|
129
|
-
className: classNames?.svg
|
|
130
|
-
}),
|
|
131
|
-
children: [
|
|
132
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Track, {
|
|
133
|
-
className: slots.track({
|
|
134
|
-
className: classNames?.track
|
|
135
|
-
})
|
|
136
|
-
}),
|
|
137
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Indicator, {
|
|
138
|
-
className: slots.indicator({
|
|
139
|
-
className: classNames?.indicator
|
|
140
|
-
}),
|
|
141
|
-
style: {
|
|
142
|
-
transitionDuration: `${animationDuration.toString()}ms`,
|
|
143
|
-
transitionProperty: 'stroke-dashoffset'
|
|
144
|
-
}
|
|
145
|
-
})
|
|
146
|
-
]
|
|
147
|
-
}),
|
|
148
|
-
shouldShowLabel ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(progress_circle_cjs_namespaceObject.Value, {
|
|
149
|
-
className: slots.label({
|
|
150
|
-
className: classNames?.label
|
|
151
|
-
}),
|
|
152
|
-
children: renderLabel()
|
|
153
|
-
}) : null
|
|
154
|
-
]
|
|
155
|
-
})
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
ProgressCircle.displayName = 'ProgressCircle';
|
|
159
|
-
const getActualSize = (size)=>{
|
|
160
|
-
const sizeMap = {
|
|
161
|
-
'2xl': 128,
|
|
162
|
-
lg: 64,
|
|
163
|
-
md: 48,
|
|
164
|
-
sm: 32,
|
|
165
|
-
xl: 96
|
|
166
|
-
};
|
|
167
|
-
return size ? sizeMap[size] : 48;
|
|
168
|
-
};
|
|
169
|
-
const getStrokeWidth = (thickness, size)=>{
|
|
170
|
-
const thicknessMap = {
|
|
171
|
-
regular: Math.max(3, 0.05 * size),
|
|
172
|
-
thick: Math.max(4, 0.075 * size),
|
|
173
|
-
thin: Math.max(2, 0.025 * size)
|
|
174
|
-
};
|
|
175
|
-
return thickness ? thicknessMap[thickness] : Math.max(3, 0.05 * size);
|
|
176
|
-
};
|
|
177
|
-
exports.ProgressCircle = __webpack_exports__.ProgressCircle;
|
|
178
|
-
exports.progressCircleVariants = __webpack_exports__.progressCircleVariants;
|
|
179
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
180
|
-
"ProgressCircle",
|
|
181
|
-
"progressCircleVariants"
|
|
182
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
183
|
-
Object.defineProperty(exports, '__esModule', {
|
|
184
|
-
value: true
|
|
185
|
-
});
|