@codefast/ui 0.3.9 → 0.3.10
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 +11 -0
- package/dist/components/accordion.cjs +97 -1
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +51 -1
- package/dist/components/alert-dialog.cjs +155 -1
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +94 -1
- package/dist/components/alert.cjs +84 -1
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +41 -1
- package/dist/components/aspect-ratio.cjs +43 -1
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/aspect-ratio.js +9 -1
- package/dist/components/avatar.cjs +65 -1
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +25 -1
- package/dist/components/badge.cjs +66 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +29 -1
- package/dist/components/breadcrumb.cjs +126 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +74 -1
- package/dist/components/button-group.cjs +86 -1
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +43 -1
- package/dist/components/button.cjs +92 -1
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +55 -1
- package/dist/components/calendar.cjs +150 -1
- package/dist/components/calendar.d.ts +12 -19
- package/dist/components/calendar.js +113 -1
- package/dist/components/card.cjs +105 -1
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +53 -1
- package/dist/components/carousel.cjs +210 -1
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +151 -1
- package/dist/components/chart.cjs +250 -3
- package/dist/components/chart.d.ts +9 -9
- package/dist/components/chart.js +198 -3
- package/dist/components/checkbox-cards.cjs +69 -1
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +32 -1
- package/dist/components/checkbox-group.cjs +63 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +26 -1
- package/dist/components/checkbox.cjs +53 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +19 -1
- package/dist/components/collapsible.cjs +61 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +21 -1
- package/dist/components/command.cjs +167 -1
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +106 -1
- package/dist/components/context-menu.cjs +218 -1
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +142 -1
- package/dist/components/dialog.cjs +164 -1
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +106 -1
- package/dist/components/drawer.cjs +143 -1
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +85 -1
- package/dist/components/dropdown-menu.cjs +221 -1
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +145 -1
- package/dist/components/empty.cjs +113 -1
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +61 -1
- package/dist/components/field.cjs +193 -1
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +129 -1
- package/dist/components/form.cjs +151 -1
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +96 -1
- package/dist/components/hover-card.cjs +77 -1
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +34 -1
- package/dist/components/input-group.cjs +155 -1
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +97 -1
- package/dist/components/input-number.cjs +98 -1
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +64 -1
- package/dist/components/input-otp.cjs +101 -1
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +49 -1
- package/dist/components/input-password.cjs +71 -1
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +37 -1
- package/dist/components/input-search.cjs +80 -1
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +46 -1
- package/dist/components/input.cjs +45 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +11 -1
- package/dist/components/item.cjs +186 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +119 -1
- package/dist/components/kbd.cjs +54 -1
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +17 -1
- package/dist/components/label.cjs +45 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +11 -1
- package/dist/components/menubar.cjs +232 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +153 -1
- package/dist/components/native-select.cjs +75 -1
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +35 -1
- package/dist/components/navigation-menu.cjs +146 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +94 -2
- package/dist/components/pagination.cjs +138 -1
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +86 -1
- package/dist/components/popover.cjs +86 -1
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +40 -1
- package/dist/components/progress-circle.cjs +184 -1
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +147 -1
- package/dist/components/progress.cjs +52 -1
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +18 -1
- package/dist/components/radio-cards.cjs +66 -1
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +29 -1
- package/dist/components/radio-group.cjs +59 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +22 -1
- package/dist/components/radio.cjs +47 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +13 -1
- package/dist/components/resizable.cjs +71 -1
- package/dist/components/resizable.d.ts +8 -8
- package/dist/components/resizable.js +31 -1
- package/dist/components/scroll-area.cjs +140 -1
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +100 -1
- package/dist/components/select.cjs +180 -1
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +119 -1
- package/dist/components/separator.cjs +82 -1
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +42 -1
- package/dist/components/sheet.cjs +184 -1
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +123 -1
- package/dist/components/sidebar.cjs +506 -1
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +400 -1
- package/dist/components/skeleton.cjs +44 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +10 -1
- package/dist/components/slider.cjs +79 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +45 -1
- package/dist/components/sonner.cjs +57 -1
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +17 -1
- package/dist/components/spinner.cjs +75 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +41 -1
- package/dist/components/switch.cjs +49 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +15 -1
- package/dist/components/table.cjs +118 -1
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +63 -1
- package/dist/components/tabs.cjs +75 -1
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +32 -1
- package/dist/components/textarea.cjs +44 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +10 -1
- package/dist/components/toggle-group.cjs +90 -1
- package/dist/components/toggle-group.d.ts +10 -12
- package/dist/components/toggle-group.js +53 -1
- package/dist/components/toggle.cjs +71 -1
- package/dist/components/toggle.d.ts +10 -12
- package/dist/components/toggle.js +34 -1
- package/dist/components/tooltip.cjs +90 -1
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +44 -1
- package/dist/css/amber.css +95 -1
- package/dist/css/blue.css +95 -1
- package/dist/css/cyan.css +95 -1
- package/dist/css/emerald.css +95 -1
- package/dist/css/fuchsia.css +95 -1
- package/dist/css/gray.css +95 -1
- package/dist/css/green.css +95 -1
- package/dist/css/indigo.css +95 -1
- package/dist/css/lime.css +95 -1
- package/dist/css/neutral.css +95 -1
- package/dist/css/orange.css +95 -1
- package/dist/css/pink.css +95 -1
- package/dist/css/preset.css +118 -1
- package/dist/css/purple.css +95 -1
- package/dist/css/red.css +95 -1
- package/dist/css/rose.css +95 -1
- package/dist/css/sky.css +95 -1
- package/dist/css/slate.css +95 -1
- package/dist/css/stone.css +95 -1
- package/dist/css/style.css +3 -1
- package/dist/css/teal.css +95 -1
- package/dist/css/violet.css +95 -1
- package/dist/css/yellow.css +95 -1
- package/dist/css/zinc.css +95 -1
- package/dist/hooks/use-animated-value.cjs +74 -1
- package/dist/hooks/use-animated-value.d.ts +9 -10
- package/dist/hooks/use-animated-value.js +40 -1
- package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +18 -1
- package/dist/hooks/use-copy-to-clipboard.js +23 -1
- package/dist/hooks/use-is-mobile.cjs +39 -1
- package/dist/hooks/use-is-mobile.d.ts +15 -6
- package/dist/hooks/use-is-mobile.js +5 -1
- package/dist/hooks/use-media-query.cjs +56 -1
- package/dist/hooks/use-media-query.d.ts +11 -3
- package/dist/hooks/use-media-query.js +22 -1
- package/dist/hooks/use-mutation-observer.cjs +56 -1
- package/dist/hooks/use-mutation-observer.d.ts +8 -12
- package/dist/hooks/use-mutation-observer.js +22 -1
- package/dist/hooks/use-pagination.cjs +92 -1
- package/dist/hooks/use-pagination.d.ts +12 -10
- package/dist/hooks/use-pagination.js +55 -1
- package/dist/index.cjs +1081 -1
- package/dist/index.d.ts +130 -131
- package/dist/index.js +69 -1
- package/dist/primitives/checkbox-group.cjs +151 -1
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +99 -1
- package/dist/primitives/input-number.cjs +439 -1
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +381 -1
- package/dist/primitives/input.cjs +99 -1
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +53 -1
- package/dist/primitives/progress-circle.cjs +198 -1
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +128 -1
- package/package.json +385 -38
|
@@ -1 +1,138 @@
|
|
|
1
|
-
"use strict";
|
|
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,25 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import { buttonVariants } from
|
|
4
|
-
type PaginationProps = ComponentProps<
|
|
1
|
+
import type { VariantProps } from '@codefast/tailwind-variants';
|
|
2
|
+
import type { ComponentProps, JSX } from 'react';
|
|
3
|
+
import { buttonVariants } from './button';
|
|
4
|
+
type PaginationProps = ComponentProps<'nav'>;
|
|
5
5
|
declare function Pagination({ className, ...props }: PaginationProps): JSX.Element;
|
|
6
|
-
type PaginationContentProps = ComponentProps<
|
|
6
|
+
type PaginationContentProps = ComponentProps<'ul'>;
|
|
7
7
|
declare function PaginationContent({ className, ...props }: PaginationContentProps): JSX.Element;
|
|
8
|
-
type PaginationItemProps = ComponentProps<
|
|
8
|
+
type PaginationItemProps = ComponentProps<'li'>;
|
|
9
9
|
declare function PaginationItem(props: PaginationItemProps): JSX.Element;
|
|
10
|
-
interface PaginationLinkProps extends ComponentProps<
|
|
10
|
+
interface PaginationLinkProps extends ComponentProps<'a'>, Pick<VariantProps<typeof buttonVariants>, 'size'> {
|
|
11
11
|
isActive?: boolean;
|
|
12
12
|
}
|
|
13
13
|
declare function PaginationLink({ children, className, isActive, size, ...props }: PaginationLinkProps): JSX.Element;
|
|
14
|
-
interface PaginationPreviousProps extends ComponentProps<
|
|
14
|
+
interface PaginationPreviousProps extends ComponentProps<'a'>, Pick<VariantProps<typeof buttonVariants>, 'size'> {
|
|
15
15
|
isActive?: boolean;
|
|
16
16
|
}
|
|
17
17
|
declare function PaginationPrevious({ ...props }: PaginationPreviousProps): JSX.Element;
|
|
18
|
-
interface PaginationNextProps extends ComponentProps<
|
|
18
|
+
interface PaginationNextProps extends ComponentProps<'a'>, Pick<VariantProps<typeof buttonVariants>, 'size'> {
|
|
19
19
|
isActive?: boolean;
|
|
20
20
|
}
|
|
21
21
|
declare function PaginationNext({ ...props }: PaginationNextProps): JSX.Element;
|
|
22
|
-
type PaginationEllipsisProps = ComponentProps<
|
|
22
|
+
type PaginationEllipsisProps = ComponentProps<'span'>;
|
|
23
23
|
declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): JSX.Element;
|
|
24
24
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
25
25
|
export type { PaginationContentProps, PaginationEllipsisProps, PaginationItemProps, PaginationLinkProps, PaginationNextProps, PaginationPreviousProps, PaginationProps, };
|
|
@@ -1 +1,86 @@
|
|
|
1
|
-
import{jsx
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
3
|
+
import { ChevronLeftIcon, ChevronRightIcon, EllipsisIcon } from "lucide-react";
|
|
4
|
+
import { buttonVariants } from "./button.js";
|
|
5
|
+
function Pagination({ className, ...props }) {
|
|
6
|
+
return /*#__PURE__*/ jsx("nav", {
|
|
7
|
+
"aria-label": "pagination",
|
|
8
|
+
className: cn('mx-auto flex w-full justify-center', className),
|
|
9
|
+
"data-slot": "pagination",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function PaginationContent({ className, ...props }) {
|
|
14
|
+
return /*#__PURE__*/ jsx("ul", {
|
|
15
|
+
className: cn('flex flex-row items-center gap-1', className),
|
|
16
|
+
"data-slot": "pagination-content",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function PaginationItem(props) {
|
|
21
|
+
return /*#__PURE__*/ jsx("li", {
|
|
22
|
+
"data-slot": "pagination-item",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function PaginationLink({ children, className, isActive, size = 'icon', ...props }) {
|
|
27
|
+
return /*#__PURE__*/ jsx("a", {
|
|
28
|
+
"aria-current": isActive ? 'page' : void 0,
|
|
29
|
+
className: buttonVariants({
|
|
30
|
+
className,
|
|
31
|
+
size,
|
|
32
|
+
variant: isActive ? 'outline' : 'ghost'
|
|
33
|
+
}),
|
|
34
|
+
"data-slot": "pagination-link",
|
|
35
|
+
...props,
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function PaginationPrevious({ ...props }) {
|
|
40
|
+
return /*#__PURE__*/ jsxs(PaginationLink, {
|
|
41
|
+
"aria-label": "Go to previous page",
|
|
42
|
+
"data-slot": "pagination-previous",
|
|
43
|
+
size: "md",
|
|
44
|
+
...props,
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsx(ChevronLeftIcon, {
|
|
47
|
+
className: "size-4"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ jsx("span", {
|
|
50
|
+
children: "Previous"
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function PaginationNext({ ...props }) {
|
|
56
|
+
return /*#__PURE__*/ jsxs(PaginationLink, {
|
|
57
|
+
"aria-label": "Go to next page",
|
|
58
|
+
"data-slot": "pagination-next",
|
|
59
|
+
size: "md",
|
|
60
|
+
...props,
|
|
61
|
+
children: [
|
|
62
|
+
/*#__PURE__*/ jsx("span", {
|
|
63
|
+
children: "Next"
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ jsx(ChevronRightIcon, {})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
70
|
+
return /*#__PURE__*/ jsxs("span", {
|
|
71
|
+
"aria-hidden": true,
|
|
72
|
+
className: cn('flex size-10 items-center justify-center', className),
|
|
73
|
+
"data-slot": "pagination-ellipsis",
|
|
74
|
+
...props,
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ jsx(EllipsisIcon, {
|
|
77
|
+
className: "size-4"
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ jsx("span", {
|
|
80
|
+
className: "sr-only",
|
|
81
|
+
children: "More pages"
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -1,2 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as PopoverPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
type PopoverProps = ComponentProps<typeof PopoverPrimitive.Root>;
|
|
4
4
|
declare function Popover({ ...props }: PopoverProps): JSX.Element;
|
|
5
5
|
type PopoverTriggerProps = ComponentProps<typeof PopoverPrimitive.Trigger>;
|
|
@@ -11,4 +11,4 @@ declare function PopoverContent({ align, className, sideOffset, ...props }: Popo
|
|
|
11
11
|
type PopoverArrowProps = ComponentProps<typeof PopoverPrimitive.Arrow>;
|
|
12
12
|
declare function PopoverArrow({ className, ...props }: PopoverArrowProps): JSX.Element;
|
|
13
13
|
export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
|
|
14
|
-
export type { PopoverAnchorProps, PopoverArrowProps, PopoverContentProps, PopoverProps, PopoverTriggerProps
|
|
14
|
+
export type { PopoverAnchorProps, PopoverArrowProps, PopoverContentProps, PopoverProps, PopoverTriggerProps };
|
|
@@ -1,2 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
+
import { Anchor, Arrow, Content, Portal, Root, Trigger } from "@radix-ui/react-popover";
|
|
5
|
+
function Popover({ ...props }) {
|
|
6
|
+
return /*#__PURE__*/ jsx(Root, {
|
|
7
|
+
"data-slot": "popover",
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function PopoverTrigger({ ...props }) {
|
|
12
|
+
return /*#__PURE__*/ jsx(Trigger, {
|
|
13
|
+
"data-slot": "popover-trigger",
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function PopoverAnchor({ ...props }) {
|
|
18
|
+
return /*#__PURE__*/ jsx(Anchor, {
|
|
19
|
+
"data-slot": "popover-anchor",
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function PopoverContent({ align = 'center', className, sideOffset = 4, ...props }) {
|
|
24
|
+
return /*#__PURE__*/ jsx(Portal, {
|
|
25
|
+
children: /*#__PURE__*/ jsx(Content, {
|
|
26
|
+
align: align,
|
|
27
|
+
className: 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),
|
|
28
|
+
"data-slot": "popover-content",
|
|
29
|
+
sideOffset: sideOffset,
|
|
30
|
+
...props
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function PopoverArrow({ className, ...props }) {
|
|
35
|
+
return /*#__PURE__*/ jsx(Arrow, {
|
|
36
|
+
className: cn('fill-popover', className),
|
|
37
|
+
"data-slot": "popover-arrow",
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
|
|
@@ -1,2 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
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
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import * as ProgressCirclePrimitive from
|
|
1
|
+
import type { VariantProps } from '@codefast/tailwind-variants';
|
|
2
|
+
import type { ComponentProps, JSX } from 'react';
|
|
3
|
+
import * as ProgressCirclePrimitive from '../primitives/progress-circle';
|
|
4
4
|
declare const progressCircleVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
5
|
size: {
|
|
6
6
|
sm: {
|
|
@@ -15,7 +15,7 @@ declare const progressCircleVariants: import("@codefast/tailwind-variants").Vari
|
|
|
15
15
|
xl: {
|
|
16
16
|
label: string;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
'2xl': {
|
|
19
19
|
label: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -41,7 +41,7 @@ declare const progressCircleVariants: import("@codefast/tailwind-variants").Vari
|
|
|
41
41
|
svg: string;
|
|
42
42
|
track: string;
|
|
43
43
|
}>;
|
|
44
|
-
interface ProgressCircleProps extends Omit<ComponentProps<typeof ProgressCirclePrimitive.Provider>,
|
|
44
|
+
interface ProgressCircleProps extends Omit<ComponentProps<typeof ProgressCirclePrimitive.Provider>, 'children' | 'size'>, VariantProps<typeof progressCircleVariants> {
|
|
45
45
|
/**
|
|
46
46
|
* Enables animation effect when value changes
|
|
47
47
|
*/
|