@codefast/ui 0.3.11-canary.0 → 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 +13 -0
- package/package.json +79 -153
- 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,92 +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
|
-
buttonVariants: ()=>buttonVariants,
|
|
28
|
-
Button: ()=>Button
|
|
29
|
-
});
|
|
30
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
32
|
-
const react_slot_namespaceObject = require("@radix-ui/react-slot");
|
|
33
|
-
const buttonVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
34
|
-
base: "inline-flex shrink-0 items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-hidden transition select-none focus-visible:ring-3 disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
size: "md",
|
|
37
|
-
variant: "default"
|
|
38
|
-
},
|
|
39
|
-
variants: {
|
|
40
|
-
size: {
|
|
41
|
-
"icon-sm": "size-8",
|
|
42
|
-
icon: "size-9",
|
|
43
|
-
"icon-lg": "size-10",
|
|
44
|
-
sm: "h-8 px-3 has-[>svg]:px-2.5",
|
|
45
|
-
md: "h-9 px-4 has-[>svg]:px-3",
|
|
46
|
-
lg: "h-10 px-6 has-[>svg]:px-4"
|
|
47
|
-
},
|
|
48
|
-
variant: {
|
|
49
|
-
default: "bg-primary text-primary-foreground hover:not-disabled:bg-primary/80 focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40",
|
|
50
|
-
destructive: "bg-destructive text-white hover:not-disabled:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
51
|
-
ghost: "hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:ring-ring/50 dark:hover:not-disabled:bg-secondary/50",
|
|
52
|
-
link: "text-primary underline-offset-4 hover:not-disabled:underline focus-visible:ring-ring/50",
|
|
53
|
-
outline: "border border-input shadow-xs hover:not-disabled:border-ring/60 hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive focus-within:aria-invalid:ring-destructive/20 hover:not-disabled:aria-invalid:border-destructive/60 dark:bg-input/30 dark:hover:not-disabled:bg-input/50 dark:aria-invalid:border-destructive/70 dark:focus-within:aria-invalid:ring-destructive/40",
|
|
54
|
-
secondary: "bg-secondary text-secondary-foreground hover:not-disabled:bg-secondary/80 focus-visible:ring-ring/50"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
function Button({ asChild = false, children, className, size, type = "button", variant, ...props }) {
|
|
59
|
-
const Comp = asChild ? react_slot_namespaceObject.Slot : "button";
|
|
60
|
-
if (asChild) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Comp, {
|
|
61
|
-
className: buttonVariants({
|
|
62
|
-
className,
|
|
63
|
-
size,
|
|
64
|
-
variant
|
|
65
|
-
}),
|
|
66
|
-
"data-slot": "button",
|
|
67
|
-
"data-variant": variant,
|
|
68
|
-
...props,
|
|
69
|
-
children: children
|
|
70
|
-
});
|
|
71
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
72
|
-
className: buttonVariants({
|
|
73
|
-
className,
|
|
74
|
-
size,
|
|
75
|
-
variant
|
|
76
|
-
}),
|
|
77
|
-
"data-slot": "button",
|
|
78
|
-
"data-variant": variant,
|
|
79
|
-
type: type,
|
|
80
|
-
...props,
|
|
81
|
-
children: children
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
exports.Button = __webpack_exports__.Button;
|
|
85
|
-
exports.buttonVariants = __webpack_exports__.buttonVariants;
|
|
86
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
87
|
-
"Button",
|
|
88
|
-
"buttonVariants"
|
|
89
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
90
|
-
Object.defineProperty(exports, '__esModule', {
|
|
91
|
-
value: true
|
|
92
|
-
});
|
|
@@ -1,151 +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
|
-
Calendar: ()=>Calendar,
|
|
29
|
-
CalendarDayButton: ()=>CalendarDayButton
|
|
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
|
-
const external_react_namespaceObject = require("react");
|
|
35
|
-
const external_react_day_picker_namespaceObject = require("react-day-picker");
|
|
36
|
-
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
37
|
-
function Calendar({ buttonVariant = "ghost", captionLayout = "label", className, classNames, components, formatters, showOutsideDays = true, ...props }) {
|
|
38
|
-
const defaultClassNames = (0, external_react_day_picker_namespaceObject.getDefaultClassNames)();
|
|
39
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_day_picker_namespaceObject.DayPicker, {
|
|
40
|
-
captionLayout: captionLayout,
|
|
41
|
-
className: (0, tailwind_variants_namespaceObject.cn)("group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", "rtl:**:[.rdp-button_next>svg]:rotate-180", "rtl:**:[.rdp-button_previous>svg]:rotate-180", className),
|
|
42
|
-
classNames: {
|
|
43
|
-
button_next: (0, tailwind_variants_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
44
|
-
variant: buttonVariant
|
|
45
|
-
}), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
46
|
-
button_previous: (0, tailwind_variants_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
47
|
-
variant: buttonVariant
|
|
48
|
-
}), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
49
|
-
caption_label: (0, tailwind_variants_namespaceObject.cn)("font-medium select-none", "label" === captionLayout ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
50
|
-
day: (0, tailwind_variants_namespaceObject.cn)("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
|
|
51
|
-
disabled: (0, tailwind_variants_namespaceObject.cn)("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
52
|
-
dropdown: (0, tailwind_variants_namespaceObject.cn)("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
53
|
-
dropdown_root: (0, tailwind_variants_namespaceObject.cn)("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-3 has-focus:ring-ring/50", defaultClassNames.dropdown_root),
|
|
54
|
-
dropdowns: (0, tailwind_variants_namespaceObject.cn)("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
|
|
55
|
-
hidden: (0, tailwind_variants_namespaceObject.cn)("invisible", defaultClassNames.hidden),
|
|
56
|
-
month: (0, tailwind_variants_namespaceObject.cn)("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
57
|
-
month_caption: (0, tailwind_variants_namespaceObject.cn)("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
58
|
-
months: (0, tailwind_variants_namespaceObject.cn)("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
59
|
-
nav: (0, tailwind_variants_namespaceObject.cn)("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
60
|
-
outside: (0, tailwind_variants_namespaceObject.cn)("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
61
|
-
range_end: (0, tailwind_variants_namespaceObject.cn)("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
62
|
-
range_middle: (0, tailwind_variants_namespaceObject.cn)("rounded-none", defaultClassNames.range_middle),
|
|
63
|
-
range_start: (0, tailwind_variants_namespaceObject.cn)("rounded-l-md bg-accent", defaultClassNames.range_start),
|
|
64
|
-
root: (0, tailwind_variants_namespaceObject.cn)("w-fit", defaultClassNames.root),
|
|
65
|
-
table: "w-full border-collapse",
|
|
66
|
-
today: (0, tailwind_variants_namespaceObject.cn)("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
67
|
-
week: (0, tailwind_variants_namespaceObject.cn)("mt-2 flex w-full", defaultClassNames.week),
|
|
68
|
-
week_number: (0, tailwind_variants_namespaceObject.cn)("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
69
|
-
week_number_header: (0, tailwind_variants_namespaceObject.cn)("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
70
|
-
weekday: (0, tailwind_variants_namespaceObject.cn)("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
|
|
71
|
-
weekdays: (0, tailwind_variants_namespaceObject.cn)("flex", defaultClassNames.weekdays),
|
|
72
|
-
...classNames
|
|
73
|
-
},
|
|
74
|
-
components: {
|
|
75
|
-
Chevron: CalendarChevron,
|
|
76
|
-
DayButton: CalendarDayButton,
|
|
77
|
-
Root: CalendarRoot,
|
|
78
|
-
WeekNumber: CalendarWeekNumber,
|
|
79
|
-
...components
|
|
80
|
-
},
|
|
81
|
-
formatters: {
|
|
82
|
-
formatMonthDropdown: (date)=>date.toLocaleString("default", {
|
|
83
|
-
month: "short"
|
|
84
|
-
}),
|
|
85
|
-
...formatters
|
|
86
|
-
},
|
|
87
|
-
showOutsideDays: showOutsideDays,
|
|
88
|
-
...props
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function CalendarChevron({ className, orientation, ...props }) {
|
|
92
|
-
if ("left" === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronLeftIcon, {
|
|
93
|
-
className: (0, tailwind_variants_namespaceObject.cn)("size-4", className),
|
|
94
|
-
...props
|
|
95
|
-
});
|
|
96
|
-
if ("right" === orientation) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRightIcon, {
|
|
97
|
-
className: (0, tailwind_variants_namespaceObject.cn)("size-4", className),
|
|
98
|
-
...props
|
|
99
|
-
});
|
|
100
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {
|
|
101
|
-
className: (0, tailwind_variants_namespaceObject.cn)("size-4", className),
|
|
102
|
-
...props
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function CalendarRoot({ className, rootRef, ...props }) {
|
|
106
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
107
|
-
ref: rootRef,
|
|
108
|
-
className: (0, tailwind_variants_namespaceObject.cn)(className),
|
|
109
|
-
"data-slot": "calendar",
|
|
110
|
-
...props
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function CalendarWeekNumber({ children, ...props }) {
|
|
114
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("td", {
|
|
115
|
-
...props,
|
|
116
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
117
|
-
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
118
|
-
children: children
|
|
119
|
-
})
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
123
|
-
const defaultClassNames = (0, external_react_day_picker_namespaceObject.getDefaultClassNames)();
|
|
124
|
-
const ref = (0, external_react_namespaceObject.useRef)(null);
|
|
125
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
126
|
-
if (modifiers.focused) ref.current?.focus();
|
|
127
|
-
}, [
|
|
128
|
-
modifiers.focused
|
|
129
|
-
]);
|
|
130
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
131
|
-
ref: ref,
|
|
132
|
-
className: (0, tailwind_variants_namespaceObject.cn)("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-3 group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
|
|
133
|
-
"data-day": day.date.toLocaleDateString(),
|
|
134
|
-
"data-range-end": modifiers.range_end,
|
|
135
|
-
"data-range-middle": modifiers.range_middle,
|
|
136
|
-
"data-range-start": modifiers.range_start,
|
|
137
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
138
|
-
size: "icon",
|
|
139
|
-
variant: "ghost",
|
|
140
|
-
...props
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
exports.Calendar = __webpack_exports__.Calendar;
|
|
144
|
-
exports.CalendarDayButton = __webpack_exports__.CalendarDayButton;
|
|
145
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
146
|
-
"Calendar",
|
|
147
|
-
"CalendarDayButton"
|
|
148
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
149
|
-
Object.defineProperty(exports, '__esModule', {
|
|
150
|
-
value: true
|
|
151
|
-
});
|
package/dist/components/card.cjs
DELETED
|
@@ -1,105 +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
|
-
CardFooter: ()=>CardFooter,
|
|
28
|
-
CardAction: ()=>CardAction,
|
|
29
|
-
CardContent: ()=>CardContent,
|
|
30
|
-
CardDescription: ()=>CardDescription,
|
|
31
|
-
CardHeader: ()=>CardHeader,
|
|
32
|
-
CardTitle: ()=>CardTitle,
|
|
33
|
-
Card: ()=>Card
|
|
34
|
-
});
|
|
35
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
36
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
37
|
-
function Card({ className, ...props }) {
|
|
38
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
39
|
-
className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col gap-6 overflow-auto rounded-xl border bg-card py-6 text-card-foreground shadow-sm", className),
|
|
40
|
-
"data-slot": "card",
|
|
41
|
-
...props
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function CardHeader({ className, ...props }) {
|
|
45
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
46
|
-
className: (0, tailwind_variants_namespaceObject.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-[data-slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
47
|
-
"data-slot": "card-header",
|
|
48
|
-
...props
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function CardTitle({ children, className, ...props }) {
|
|
52
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
53
|
-
className: (0, tailwind_variants_namespaceObject.cn)("leading-none font-semibold", className),
|
|
54
|
-
"data-slot": "card-title",
|
|
55
|
-
...props,
|
|
56
|
-
children: children
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function CardDescription({ className, ...props }) {
|
|
60
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
61
|
-
className: (0, tailwind_variants_namespaceObject.cn)("text-sm text-muted-foreground", className),
|
|
62
|
-
"data-slot": "card-description",
|
|
63
|
-
...props
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function CardContent({ className, ...props }) {
|
|
67
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
68
|
-
className: (0, tailwind_variants_namespaceObject.cn)("px-6", className),
|
|
69
|
-
"data-slot": "card-content",
|
|
70
|
-
...props
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function CardFooter({ className, ...props }) {
|
|
74
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
75
|
-
className: (0, tailwind_variants_namespaceObject.cn)("flex items-center px-6 [.border-t]:pt-6", className),
|
|
76
|
-
"data-slot": "card-footer",
|
|
77
|
-
...props
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function CardAction({ className, ...props }) {
|
|
81
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
82
|
-
className: (0, tailwind_variants_namespaceObject.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
83
|
-
"data-slot": "card-action",
|
|
84
|
-
...props
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
exports.Card = __webpack_exports__.Card;
|
|
88
|
-
exports.CardAction = __webpack_exports__.CardAction;
|
|
89
|
-
exports.CardContent = __webpack_exports__.CardContent;
|
|
90
|
-
exports.CardDescription = __webpack_exports__.CardDescription;
|
|
91
|
-
exports.CardFooter = __webpack_exports__.CardFooter;
|
|
92
|
-
exports.CardHeader = __webpack_exports__.CardHeader;
|
|
93
|
-
exports.CardTitle = __webpack_exports__.CardTitle;
|
|
94
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
95
|
-
"Card",
|
|
96
|
-
"CardAction",
|
|
97
|
-
"CardContent",
|
|
98
|
-
"CardDescription",
|
|
99
|
-
"CardFooter",
|
|
100
|
-
"CardHeader",
|
|
101
|
-
"CardTitle"
|
|
102
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
103
|
-
Object.defineProperty(exports, '__esModule', {
|
|
104
|
-
value: true
|
|
105
|
-
});
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.n = (module)=>{
|
|
6
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
7
|
-
__webpack_require__.d(getter, {
|
|
8
|
-
a: getter
|
|
9
|
-
});
|
|
10
|
-
return getter;
|
|
11
|
-
};
|
|
12
|
-
})();
|
|
13
|
-
(()=>{
|
|
14
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
15
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: definition[key]
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
})();
|
|
21
|
-
(()=>{
|
|
22
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
23
|
-
})();
|
|
24
|
-
(()=>{
|
|
25
|
-
__webpack_require__.r = (exports1)=>{
|
|
26
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
27
|
-
value: 'Module'
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
30
|
-
value: true
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
})();
|
|
34
|
-
var __webpack_exports__ = {};
|
|
35
|
-
__webpack_require__.r(__webpack_exports__);
|
|
36
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
37
|
-
CarouselPrevious: ()=>CarouselPrevious,
|
|
38
|
-
Carousel: ()=>Carousel,
|
|
39
|
-
createCarouselScope: ()=>createCarouselScope,
|
|
40
|
-
CarouselContent: ()=>CarouselContent,
|
|
41
|
-
CarouselItem: ()=>CarouselItem,
|
|
42
|
-
CarouselNext: ()=>CarouselNext
|
|
43
|
-
});
|
|
44
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
45
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
46
|
-
const react_context_namespaceObject = require("@radix-ui/react-context");
|
|
47
|
-
const external_embla_carousel_react_namespaceObject = require("embla-carousel-react");
|
|
48
|
-
var external_embla_carousel_react_default = /*#__PURE__*/ __webpack_require__.n(external_embla_carousel_react_namespaceObject);
|
|
49
|
-
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
50
|
-
const external_react_namespaceObject = require("react");
|
|
51
|
-
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
52
|
-
const CAROUSEL_NAME = "Carousel";
|
|
53
|
-
const [createCarouselContext, createCarouselScope] = (0, react_context_namespaceObject.createContextScope)(CAROUSEL_NAME);
|
|
54
|
-
const [CarouselContextProvider, useCarouselContext] = createCarouselContext(CAROUSEL_NAME);
|
|
55
|
-
function Carousel({ __scopeCarousel, children, className, opts, orientation, plugins, setApi, ...props }) {
|
|
56
|
-
const [carouselRef, api] = external_embla_carousel_react_default()({
|
|
57
|
-
...opts,
|
|
58
|
-
axis: "vertical" === orientation ? "y" : "x"
|
|
59
|
-
}, plugins);
|
|
60
|
-
const [canScrollPrevious, setCanScrollPrevious] = (0, external_react_namespaceObject.useState)(false);
|
|
61
|
-
const [canScrollNext, setCanScrollNext] = (0, external_react_namespaceObject.useState)(false);
|
|
62
|
-
const onSelect = (0, external_react_namespaceObject.useCallback)((carouselApi)=>{
|
|
63
|
-
if (!carouselApi) return;
|
|
64
|
-
setCanScrollPrevious(carouselApi.canScrollPrev());
|
|
65
|
-
setCanScrollNext(carouselApi.canScrollNext());
|
|
66
|
-
}, []);
|
|
67
|
-
const scrollPrevious = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
68
|
-
api?.scrollPrev();
|
|
69
|
-
}, [
|
|
70
|
-
api
|
|
71
|
-
]);
|
|
72
|
-
const scrollNext = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
73
|
-
api?.scrollNext();
|
|
74
|
-
}, [
|
|
75
|
-
api
|
|
76
|
-
]);
|
|
77
|
-
const handleKeyDown = (0, external_react_namespaceObject.useCallback)((event)=>{
|
|
78
|
-
if ("ArrowLeft" === event.key) {
|
|
79
|
-
event.preventDefault();
|
|
80
|
-
scrollPrevious();
|
|
81
|
-
} else if ("ArrowRight" === event.key) {
|
|
82
|
-
event.preventDefault();
|
|
83
|
-
scrollNext();
|
|
84
|
-
}
|
|
85
|
-
}, [
|
|
86
|
-
scrollPrevious,
|
|
87
|
-
scrollNext
|
|
88
|
-
]);
|
|
89
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
90
|
-
if (!api || !setApi) return;
|
|
91
|
-
setApi(api);
|
|
92
|
-
}, [
|
|
93
|
-
api,
|
|
94
|
-
setApi
|
|
95
|
-
]);
|
|
96
|
-
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
97
|
-
if (!api) return;
|
|
98
|
-
queueMicrotask(()=>{
|
|
99
|
-
onSelect(api);
|
|
100
|
-
});
|
|
101
|
-
api.on("reInit", onSelect);
|
|
102
|
-
api.on("select", onSelect);
|
|
103
|
-
return ()=>{
|
|
104
|
-
api.off("select", onSelect);
|
|
105
|
-
};
|
|
106
|
-
}, [
|
|
107
|
-
api,
|
|
108
|
-
onSelect
|
|
109
|
-
]);
|
|
110
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CarouselContextProvider, {
|
|
111
|
-
api: api,
|
|
112
|
-
canScrollNext: canScrollNext,
|
|
113
|
-
canScrollPrev: canScrollPrevious,
|
|
114
|
-
carouselRef: carouselRef,
|
|
115
|
-
opts: opts,
|
|
116
|
-
orientation: orientation ?? (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
117
|
-
scope: __scopeCarousel,
|
|
118
|
-
scrollNext: scrollNext,
|
|
119
|
-
scrollPrev: scrollPrevious,
|
|
120
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
121
|
-
className: (0, tailwind_variants_namespaceObject.cn)("relative", className),
|
|
122
|
-
"data-slot": "carousel",
|
|
123
|
-
onKeyDownCapture: handleKeyDown,
|
|
124
|
-
...props,
|
|
125
|
-
children: children
|
|
126
|
-
})
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
const CAROUSEL_CONTENT_NAME = "CarouselContent";
|
|
130
|
-
function CarouselContent({ __scopeCarousel, className, classNames, ...props }) {
|
|
131
|
-
const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);
|
|
132
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
133
|
-
ref: carouselRef,
|
|
134
|
-
className: (0, tailwind_variants_namespaceObject.cn)("overflow-hidden", classNames?.wrapper),
|
|
135
|
-
"data-slot": "carousel-content",
|
|
136
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
137
|
-
className: (0, tailwind_variants_namespaceObject.cn)("flex", "horizontal" === orientation ? "-ml-4" : "-mt-4 flex-col", classNames?.content, className),
|
|
138
|
-
...props
|
|
139
|
-
})
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
const CAROUSEL_ITEM_NAME = "CarouselItem";
|
|
143
|
-
function CarouselItem({ __scopeCarousel, className, ...props }) {
|
|
144
|
-
const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);
|
|
145
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
146
|
-
"aria-roledescription": "slide",
|
|
147
|
-
className: (0, tailwind_variants_namespaceObject.cn)("min-w-0 shrink-0 grow-0 basis-full", "horizontal" === orientation ? "pl-4" : "pt-4", className),
|
|
148
|
-
"data-slot": "carousel-item",
|
|
149
|
-
role: "group",
|
|
150
|
-
...props
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
const CAROUSEL_PREVIOUS_NAME = "CarouselPrevious";
|
|
154
|
-
function CarouselPrevious({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
|
|
155
|
-
const { canScrollPrev, orientation, scrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);
|
|
156
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
|
|
157
|
-
"aria-label": "Previous slide",
|
|
158
|
-
className: (0, tailwind_variants_namespaceObject.cn)("absolute size-8 shadow-none", "horizontal" === orientation ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
159
|
-
"data-slot": "carousel-previous",
|
|
160
|
-
disabled: !canScrollPrev,
|
|
161
|
-
size: size,
|
|
162
|
-
variant: variant,
|
|
163
|
-
onClick: scrollPrev,
|
|
164
|
-
...props,
|
|
165
|
-
children: [
|
|
166
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ArrowLeftIcon, {}),
|
|
167
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
168
|
-
className: "sr-only",
|
|
169
|
-
children: "Previous slide"
|
|
170
|
-
})
|
|
171
|
-
]
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
const CAROUSEL_NEXT_NAME = "CarouselNext";
|
|
175
|
-
function CarouselNext({ __scopeCarousel, className, size = "icon", variant = "outline", ...props }) {
|
|
176
|
-
const { canScrollNext, orientation, scrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);
|
|
177
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
|
|
178
|
-
"aria-label": "Next slide",
|
|
179
|
-
className: (0, tailwind_variants_namespaceObject.cn)("absolute size-8 shadow-none", "horizontal" === orientation ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
180
|
-
"data-slot": "carousel-next",
|
|
181
|
-
disabled: !canScrollNext,
|
|
182
|
-
size: size,
|
|
183
|
-
variant: variant,
|
|
184
|
-
onClick: scrollNext,
|
|
185
|
-
...props,
|
|
186
|
-
children: [
|
|
187
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ArrowRightIcon, {}),
|
|
188
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
189
|
-
className: "sr-only",
|
|
190
|
-
children: "Next slide"
|
|
191
|
-
})
|
|
192
|
-
]
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
exports.Carousel = __webpack_exports__.Carousel;
|
|
196
|
-
exports.CarouselContent = __webpack_exports__.CarouselContent;
|
|
197
|
-
exports.CarouselItem = __webpack_exports__.CarouselItem;
|
|
198
|
-
exports.CarouselNext = __webpack_exports__.CarouselNext;
|
|
199
|
-
exports.CarouselPrevious = __webpack_exports__.CarouselPrevious;
|
|
200
|
-
exports.createCarouselScope = __webpack_exports__.createCarouselScope;
|
|
201
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
202
|
-
"Carousel",
|
|
203
|
-
"CarouselContent",
|
|
204
|
-
"CarouselItem",
|
|
205
|
-
"CarouselNext",
|
|
206
|
-
"CarouselPrevious",
|
|
207
|
-
"createCarouselScope"
|
|
208
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
209
|
-
Object.defineProperty(exports, '__esModule', {
|
|
210
|
-
value: true
|
|
211
|
-
});
|