@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
package/dist/components/form.cjs
DELETED
|
@@ -1,152 +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
|
-
FormMessage: ()=>FormMessage,
|
|
29
|
-
FormDescription: ()=>FormDescription,
|
|
30
|
-
FormControl: ()=>FormControl,
|
|
31
|
-
FormItem: ()=>FormItem,
|
|
32
|
-
createFormFieldScope: ()=>createFormFieldScope,
|
|
33
|
-
FormLabel: ()=>FormLabel,
|
|
34
|
-
Form: ()=>Form,
|
|
35
|
-
FormField: ()=>FormField
|
|
36
|
-
});
|
|
37
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
38
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
39
|
-
const react_context_namespaceObject = require("@radix-ui/react-context");
|
|
40
|
-
const react_slot_namespaceObject = require("@radix-ui/react-slot");
|
|
41
|
-
const external_react_namespaceObject = require("react");
|
|
42
|
-
const external_react_hook_form_namespaceObject = require("react-hook-form");
|
|
43
|
-
const external_label_cjs_namespaceObject = require("./label.cjs");
|
|
44
|
-
const Form = external_react_hook_form_namespaceObject.FormProvider;
|
|
45
|
-
const FORM_FIELD_NAME = 'FormField';
|
|
46
|
-
const [createFormFieldContext, createFormFieldScope] = (0, react_context_namespaceObject.createContextScope)(FORM_FIELD_NAME);
|
|
47
|
-
const [FormFieldContextProvider, useFormFieldContext] = createFormFieldContext(FORM_FIELD_NAME);
|
|
48
|
-
function useFormItem(consumerName, scope) {
|
|
49
|
-
const { id } = useFormItemContext(consumerName, scope);
|
|
50
|
-
const { name } = useFormFieldContext(consumerName, scope);
|
|
51
|
-
const { getFieldState } = (0, external_react_hook_form_namespaceObject.useFormContext)();
|
|
52
|
-
const formState = (0, external_react_hook_form_namespaceObject.useFormState)({
|
|
53
|
-
name
|
|
54
|
-
});
|
|
55
|
-
const fieldState = getFieldState(name, formState);
|
|
56
|
-
return {
|
|
57
|
-
formDescriptionId: `form-item-description-${id}`,
|
|
58
|
-
formItemId: `form-item-${id}`,
|
|
59
|
-
formMessageId: `form-item-message-${id}`,
|
|
60
|
-
id,
|
|
61
|
-
name,
|
|
62
|
-
...fieldState
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function FormField(formFieldProps) {
|
|
66
|
-
const { __scopeFormField, ...props } = formFieldProps;
|
|
67
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormFieldContextProvider, {
|
|
68
|
-
name: props.name,
|
|
69
|
-
scope: __scopeFormField,
|
|
70
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_hook_form_namespaceObject.Controller, {
|
|
71
|
-
...props
|
|
72
|
-
})
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
const FORM_ITEM_NAME = 'FormItem';
|
|
76
|
-
const [FormItemContextProvider, useFormItemContext] = createFormFieldContext(FORM_ITEM_NAME);
|
|
77
|
-
function FormItem({ __scopeFormField, className, ...props }) {
|
|
78
|
-
const id = (0, external_react_namespaceObject.useId)();
|
|
79
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormItemContextProvider, {
|
|
80
|
-
id: id,
|
|
81
|
-
scope: __scopeFormField,
|
|
82
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
83
|
-
className: (0, tailwind_variants_namespaceObject.cn)('grid gap-2', className),
|
|
84
|
-
"data-slot": "form-item",
|
|
85
|
-
...props
|
|
86
|
-
})
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
const FORM_LABEL_NAME = 'FormLabel';
|
|
90
|
-
function FormLabel({ __scopeFormField, ...props }) {
|
|
91
|
-
const { error, formItemId } = useFormItem(FORM_LABEL_NAME, __scopeFormField);
|
|
92
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_label_cjs_namespaceObject.Label, {
|
|
93
|
-
"data-invalid": error ? true : void 0,
|
|
94
|
-
"data-slot": "form-label",
|
|
95
|
-
htmlFor: formItemId,
|
|
96
|
-
...props
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
const FORM_CONTROL_NAME = 'FormControl';
|
|
100
|
-
function FormControl({ __scopeFormField, ...props }) {
|
|
101
|
-
const { error, formDescriptionId, formItemId, formMessageId } = useFormItem(FORM_CONTROL_NAME, __scopeFormField);
|
|
102
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_slot_namespaceObject.Slot, {
|
|
103
|
-
"aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId,
|
|
104
|
-
"aria-invalid": Boolean(error),
|
|
105
|
-
"data-slot": "form-control",
|
|
106
|
-
id: formItemId,
|
|
107
|
-
...props
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function FormDescription({ __scopeFormField, className, ...props }) {
|
|
111
|
-
const { formDescriptionId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);
|
|
112
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
113
|
-
className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground text-xs', className),
|
|
114
|
-
"data-slot": "form-description",
|
|
115
|
-
id: formDescriptionId,
|
|
116
|
-
...props
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
const FORM_MESSAGE_NAME = 'FormMessage';
|
|
120
|
-
function FormMessage({ __scopeFormField, children, className, ...props }) {
|
|
121
|
-
const { error, formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);
|
|
122
|
-
const body = error?.message ?? children;
|
|
123
|
-
if (!body) return null;
|
|
124
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
125
|
-
className: (0, tailwind_variants_namespaceObject.cn)('text-xs', error?.message ? 'text-destructive font-medium' : 'text-muted-foreground', className),
|
|
126
|
-
"data-slot": "form-message",
|
|
127
|
-
id: formMessageId,
|
|
128
|
-
...props,
|
|
129
|
-
children: body
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
exports.Form = __webpack_exports__.Form;
|
|
133
|
-
exports.FormControl = __webpack_exports__.FormControl;
|
|
134
|
-
exports.FormDescription = __webpack_exports__.FormDescription;
|
|
135
|
-
exports.FormField = __webpack_exports__.FormField;
|
|
136
|
-
exports.FormItem = __webpack_exports__.FormItem;
|
|
137
|
-
exports.FormLabel = __webpack_exports__.FormLabel;
|
|
138
|
-
exports.FormMessage = __webpack_exports__.FormMessage;
|
|
139
|
-
exports.createFormFieldScope = __webpack_exports__.createFormFieldScope;
|
|
140
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
141
|
-
"Form",
|
|
142
|
-
"FormControl",
|
|
143
|
-
"FormDescription",
|
|
144
|
-
"FormField",
|
|
145
|
-
"FormItem",
|
|
146
|
-
"FormLabel",
|
|
147
|
-
"FormMessage",
|
|
148
|
-
"createFormFieldScope"
|
|
149
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
150
|
-
Object.defineProperty(exports, '__esModule', {
|
|
151
|
-
value: true
|
|
152
|
-
});
|
|
@@ -1,78 +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
|
-
HoverCard: ()=>HoverCard,
|
|
29
|
-
HoverCardContent: ()=>HoverCardContent,
|
|
30
|
-
HoverCardTrigger: ()=>HoverCardTrigger,
|
|
31
|
-
HoverCardArrow: ()=>HoverCardArrow
|
|
32
|
-
});
|
|
33
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
35
|
-
const react_hover_card_namespaceObject = require("@radix-ui/react-hover-card");
|
|
36
|
-
function HoverCard({ ...props }) {
|
|
37
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_hover_card_namespaceObject.Root, {
|
|
38
|
-
"data-slot": "hover-card",
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
function HoverCardTrigger({ ...props }) {
|
|
43
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_hover_card_namespaceObject.Trigger, {
|
|
44
|
-
"data-slot": "hover-card-trigger",
|
|
45
|
-
...props
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function HoverCardContent({ align = 'center', className, sideOffset = 4, ...props }) {
|
|
49
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_hover_card_namespaceObject.Portal, {
|
|
50
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_hover_card_namespaceObject.Content, {
|
|
51
|
-
align: align,
|
|
52
|
-
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=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-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=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 ease-ui z-50 min-w-32 origin-(--radix-hover-card-content-transform-origin) rounded-lg border p-4 shadow-lg', className),
|
|
53
|
-
"data-slot": "hover-card-content",
|
|
54
|
-
sideOffset: sideOffset,
|
|
55
|
-
...props
|
|
56
|
-
})
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
function HoverCardArrow({ className, ...props }) {
|
|
60
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_hover_card_namespaceObject.Arrow, {
|
|
61
|
-
className: (0, tailwind_variants_namespaceObject.cn)('fill-popover', className),
|
|
62
|
-
"data-slot": "hover-card-arrow",
|
|
63
|
-
...props
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
exports.HoverCard = __webpack_exports__.HoverCard;
|
|
67
|
-
exports.HoverCardArrow = __webpack_exports__.HoverCardArrow;
|
|
68
|
-
exports.HoverCardContent = __webpack_exports__.HoverCardContent;
|
|
69
|
-
exports.HoverCardTrigger = __webpack_exports__.HoverCardTrigger;
|
|
70
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
71
|
-
"HoverCard",
|
|
72
|
-
"HoverCardArrow",
|
|
73
|
-
"HoverCardContent",
|
|
74
|
-
"HoverCardTrigger"
|
|
75
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
76
|
-
Object.defineProperty(exports, '__esModule', {
|
|
77
|
-
value: true
|
|
78
|
-
});
|
|
@@ -1,156 +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
|
-
inputGroupAddonVariants: ()=>inputGroupAddonVariants,
|
|
29
|
-
inputGroupVariants: ()=>inputGroupVariants,
|
|
30
|
-
InputGroupText: ()=>InputGroupText,
|
|
31
|
-
InputGroupAddon: ()=>InputGroupAddon,
|
|
32
|
-
InputGroupTextarea: ()=>InputGroupTextarea,
|
|
33
|
-
InputGroupButton: ()=>InputGroupButton,
|
|
34
|
-
InputGroup: ()=>InputGroup,
|
|
35
|
-
InputGroupInput: ()=>InputGroupInput,
|
|
36
|
-
inputGroupButtonVariants: ()=>inputGroupButtonVariants
|
|
37
|
-
});
|
|
38
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
40
|
-
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
41
|
-
const external_input_cjs_namespaceObject = require("./input.cjs");
|
|
42
|
-
const external_textarea_cjs_namespaceObject = require("./textarea.cjs");
|
|
43
|
-
const inputGroupVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
44
|
-
base: (0, tailwind_variants_namespaceObject.cn)('group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-lg border shadow-xs transition-[color,box-shadow] outline-none', 'h-9 min-w-0 has-[>textarea]:h-auto', 'has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2', 'has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2', 'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:pb-3', 'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:pt-3', 'has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3', 'has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40')
|
|
45
|
-
});
|
|
46
|
-
const inputGroupAddonVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
47
|
-
base: (0, tailwind_variants_namespaceObject.cn)("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50"),
|
|
48
|
-
defaultVariants: {
|
|
49
|
-
align: 'inline-start'
|
|
50
|
-
},
|
|
51
|
-
variants: {
|
|
52
|
-
align: {
|
|
53
|
-
'block-end': 'order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5',
|
|
54
|
-
'block-start': 'order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5',
|
|
55
|
-
'inline-end': 'order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]',
|
|
56
|
-
'inline-start': 'order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]'
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
const inputGroupButtonVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
61
|
-
base: "text-sm shadow-none flex items-center gap-2 [&>svg:not([class*='size-'])]:size-4",
|
|
62
|
-
defaultVariants: {
|
|
63
|
-
size: 'xs'
|
|
64
|
-
},
|
|
65
|
-
variants: {
|
|
66
|
-
size: {
|
|
67
|
-
'icon-sm': 'size-8 p-0 has-[>svg]:p-0',
|
|
68
|
-
'icon-xs': 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0',
|
|
69
|
-
sm: 'h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5',
|
|
70
|
-
xs: 'h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg]:size-3.5 has-[>svg]:px-2'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
function InputGroup({ className, ...props }) {
|
|
75
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
76
|
-
className: inputGroupVariants({
|
|
77
|
-
className
|
|
78
|
-
}),
|
|
79
|
-
"data-slot": "input-group",
|
|
80
|
-
role: "group",
|
|
81
|
-
...props
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function InputGroupAddon({ align = 'inline-start', className, ...props }) {
|
|
85
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
86
|
-
className: (0, tailwind_variants_namespaceObject.cn)(inputGroupAddonVariants({
|
|
87
|
-
align
|
|
88
|
-
}), className),
|
|
89
|
-
"data-align": align,
|
|
90
|
-
"data-slot": "input-group-addon",
|
|
91
|
-
role: "group",
|
|
92
|
-
onPointerDown: (event)=>{
|
|
93
|
-
if (event.target.closest('button')) return;
|
|
94
|
-
event.preventDefault();
|
|
95
|
-
const control = event.currentTarget.parentElement?.querySelector('input, textarea');
|
|
96
|
-
if (control instanceof HTMLElement) control.focus();
|
|
97
|
-
},
|
|
98
|
-
...props
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function InputGroupButton({ className, size = 'xs', type = 'button', variant = 'ghost', ...props }) {
|
|
102
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
103
|
-
className: (0, tailwind_variants_namespaceObject.cn)(inputGroupButtonVariants({
|
|
104
|
-
size
|
|
105
|
-
}), className),
|
|
106
|
-
"data-size": size,
|
|
107
|
-
"data-slot": "input-group-button",
|
|
108
|
-
type: type,
|
|
109
|
-
variant: variant,
|
|
110
|
-
...props
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function InputGroupText({ className, ...props }) {
|
|
114
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
115
|
-
className: (0, tailwind_variants_namespaceObject.cn)("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
116
|
-
"data-slot": "input-group-text",
|
|
117
|
-
...props
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function InputGroupInput({ className, ...props }) {
|
|
121
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
|
|
122
|
-
className: (0, tailwind_variants_namespaceObject.cn)('flex-1 rounded-none border-0 bg-transparent px-3 py-1 shadow-none focus-visible:ring-0 dark:bg-transparent', className),
|
|
123
|
-
"data-slot": "input-group-control",
|
|
124
|
-
...props
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
function InputGroupTextarea({ className, ...props }) {
|
|
128
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_textarea_cjs_namespaceObject.Textarea, {
|
|
129
|
-
className: (0, tailwind_variants_namespaceObject.cn)('flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent', className),
|
|
130
|
-
"data-slot": "input-group-control",
|
|
131
|
-
...props
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
exports.InputGroup = __webpack_exports__.InputGroup;
|
|
135
|
-
exports.InputGroupAddon = __webpack_exports__.InputGroupAddon;
|
|
136
|
-
exports.InputGroupButton = __webpack_exports__.InputGroupButton;
|
|
137
|
-
exports.InputGroupInput = __webpack_exports__.InputGroupInput;
|
|
138
|
-
exports.InputGroupText = __webpack_exports__.InputGroupText;
|
|
139
|
-
exports.InputGroupTextarea = __webpack_exports__.InputGroupTextarea;
|
|
140
|
-
exports.inputGroupAddonVariants = __webpack_exports__.inputGroupAddonVariants;
|
|
141
|
-
exports.inputGroupButtonVariants = __webpack_exports__.inputGroupButtonVariants;
|
|
142
|
-
exports.inputGroupVariants = __webpack_exports__.inputGroupVariants;
|
|
143
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
144
|
-
"InputGroup",
|
|
145
|
-
"InputGroupAddon",
|
|
146
|
-
"InputGroupButton",
|
|
147
|
-
"InputGroupInput",
|
|
148
|
-
"InputGroupText",
|
|
149
|
-
"InputGroupTextarea",
|
|
150
|
-
"inputGroupAddonVariants",
|
|
151
|
-
"inputGroupButtonVariants",
|
|
152
|
-
"inputGroupVariants"
|
|
153
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
154
|
-
Object.defineProperty(exports, '__esModule', {
|
|
155
|
-
value: true
|
|
156
|
-
});
|
|
@@ -1,99 +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
|
-
InputNumber: ()=>InputNumber
|
|
29
|
-
});
|
|
30
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
32
|
-
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
33
|
-
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
34
|
-
const external_spinner_cjs_namespaceObject = require("./spinner.cjs");
|
|
35
|
-
const input_number_cjs_namespaceObject = require("../primitives/input-number.cjs");
|
|
36
|
-
function InputNumber({ ariaDecrementLabel, ariaIncrementLabel, className, defaultValue, disabled, formatOptions, id, loaderPosition, loading, max, min, onChange, prefix, readOnly, spinner, step, suffix, value, ...props }) {
|
|
37
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(input_number_cjs_namespaceObject.Root, {
|
|
38
|
-
ariaDecrementLabel: ariaDecrementLabel,
|
|
39
|
-
ariaIncrementLabel: ariaIncrementLabel,
|
|
40
|
-
className: (0, tailwind_variants_namespaceObject.cn)("group border-input hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 pr-0 text-base transition not-has-disabled:shadow-xs focus-within:ring-3 has-disabled:opacity-50 md:text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
41
|
-
"data-slot": "input-number",
|
|
42
|
-
defaultValue: defaultValue,
|
|
43
|
-
disabled: disabled,
|
|
44
|
-
formatOptions: formatOptions,
|
|
45
|
-
id: id,
|
|
46
|
-
loaderPosition: loaderPosition,
|
|
47
|
-
loading: loading,
|
|
48
|
-
max: max,
|
|
49
|
-
min: min,
|
|
50
|
-
prefix: prefix,
|
|
51
|
-
readOnly: readOnly,
|
|
52
|
-
spinner: spinner ?? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner, {}, "spinner"),
|
|
53
|
-
step: step,
|
|
54
|
-
suffix: suffix,
|
|
55
|
-
value: value,
|
|
56
|
-
onChange: onChange,
|
|
57
|
-
children: [
|
|
58
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.Field, {
|
|
59
|
-
autoCapitalize: "none",
|
|
60
|
-
autoComplete: "off",
|
|
61
|
-
autoCorrect: "off",
|
|
62
|
-
className: "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
63
|
-
spellCheck: "false",
|
|
64
|
-
...props
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
67
|
-
className: (0, tailwind_variants_namespaceObject.cn)('divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition', '*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0'),
|
|
68
|
-
"data-slot": "input-number-buttons",
|
|
69
|
-
children: [
|
|
70
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.IncrementButton, {
|
|
71
|
-
"aria-label": "Increment",
|
|
72
|
-
className: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
73
|
-
className: 'text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]',
|
|
74
|
-
variant: 'ghost'
|
|
75
|
-
}),
|
|
76
|
-
"data-slot": "input-number-increment-button",
|
|
77
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon, {})
|
|
78
|
-
}),
|
|
79
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.DecrementButton, {
|
|
80
|
-
"aria-label": "Decrement",
|
|
81
|
-
className: (0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
82
|
-
className: 'text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]',
|
|
83
|
-
variant: 'ghost'
|
|
84
|
-
}),
|
|
85
|
-
"data-slot": "input-number-decrement-button",
|
|
86
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {})
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
})
|
|
90
|
-
]
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
exports.InputNumber = __webpack_exports__.InputNumber;
|
|
94
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
95
|
-
"InputNumber"
|
|
96
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
97
|
-
Object.defineProperty(exports, '__esModule', {
|
|
98
|
-
value: true
|
|
99
|
-
});
|
|
@@ -1,102 +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
|
-
InputOTPSlot: ()=>InputOTPSlot,
|
|
29
|
-
InputOTPSeparator: ()=>InputOTPSeparator,
|
|
30
|
-
REGEXP_ONLY_CHARS: ()=>external_input_otp_namespaceObject.REGEXP_ONLY_CHARS,
|
|
31
|
-
REGEXP_ONLY_DIGITS: ()=>external_input_otp_namespaceObject.REGEXP_ONLY_DIGITS,
|
|
32
|
-
InputOTP: ()=>InputOTP,
|
|
33
|
-
REGEXP_ONLY_DIGITS_AND_CHARS: ()=>external_input_otp_namespaceObject.REGEXP_ONLY_DIGITS_AND_CHARS,
|
|
34
|
-
InputOTPGroup: ()=>InputOTPGroup
|
|
35
|
-
});
|
|
36
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
37
|
-
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
38
|
-
const external_input_otp_namespaceObject = require("input-otp");
|
|
39
|
-
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
40
|
-
const external_react_namespaceObject = require("react");
|
|
41
|
-
function InputOTP({ className, containerClassName, ...props }) {
|
|
42
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_otp_namespaceObject.OTPInput, {
|
|
43
|
-
"aria-label": "One-time password",
|
|
44
|
-
className: (0, tailwind_variants_namespaceObject.cn)(className),
|
|
45
|
-
containerClassName: (0, tailwind_variants_namespaceObject.cn)('flex items-center gap-2 has-disabled:opacity-50', containerClassName),
|
|
46
|
-
"data-slot": "input-otp",
|
|
47
|
-
...props
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function InputOTPGroup({ className, ...props }) {
|
|
51
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
52
|
-
className: (0, tailwind_variants_namespaceObject.cn)('flex items-center -space-x-px', className),
|
|
53
|
-
"data-slot": "input-otp-group",
|
|
54
|
-
role: "group",
|
|
55
|
-
...props
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
function InputOTPSlot({ className, index, ...props }) {
|
|
59
|
-
const inputOTPContext = (0, external_react_namespaceObject.use)(external_input_otp_namespaceObject.OTPInputContext);
|
|
60
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
61
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
62
|
-
className: (0, tailwind_variants_namespaceObject.cn)('border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 relative flex size-9 items-center justify-center border text-sm outline-hidden transition-all not-has-disabled:shadow-xs first:rounded-l-lg last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-3', className),
|
|
63
|
-
"data-active": isActive,
|
|
64
|
-
"data-slot": "input-otp-slot",
|
|
65
|
-
...props,
|
|
66
|
-
children: [
|
|
67
|
-
char,
|
|
68
|
-
hasFakeCaret ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
69
|
-
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
70
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
71
|
-
className: "animate-caret-blink bg-foreground animation-duration-1000 h-4 w-px"
|
|
72
|
-
})
|
|
73
|
-
}) : null
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function InputOTPSeparator({ ...props }) {
|
|
78
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
79
|
-
"data-slot": "input-otp-separator",
|
|
80
|
-
...props,
|
|
81
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MinusIcon, {})
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
exports.InputOTP = __webpack_exports__.InputOTP;
|
|
85
|
-
exports.InputOTPGroup = __webpack_exports__.InputOTPGroup;
|
|
86
|
-
exports.InputOTPSeparator = __webpack_exports__.InputOTPSeparator;
|
|
87
|
-
exports.InputOTPSlot = __webpack_exports__.InputOTPSlot;
|
|
88
|
-
exports.REGEXP_ONLY_CHARS = __webpack_exports__.REGEXP_ONLY_CHARS;
|
|
89
|
-
exports.REGEXP_ONLY_DIGITS = __webpack_exports__.REGEXP_ONLY_DIGITS;
|
|
90
|
-
exports.REGEXP_ONLY_DIGITS_AND_CHARS = __webpack_exports__.REGEXP_ONLY_DIGITS_AND_CHARS;
|
|
91
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
92
|
-
"InputOTP",
|
|
93
|
-
"InputOTPGroup",
|
|
94
|
-
"InputOTPSeparator",
|
|
95
|
-
"InputOTPSlot",
|
|
96
|
-
"REGEXP_ONLY_CHARS",
|
|
97
|
-
"REGEXP_ONLY_DIGITS",
|
|
98
|
-
"REGEXP_ONLY_DIGITS_AND_CHARS"
|
|
99
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
100
|
-
Object.defineProperty(exports, '__esModule', {
|
|
101
|
-
value: true
|
|
102
|
-
});
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __webpack_require__ = {};
|
|
4
|
-
(()=>{
|
|
5
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: definition[key]
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
-
})();
|
|
15
|
-
(()=>{
|
|
16
|
-
__webpack_require__.r = (exports1)=>{
|
|
17
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
-
value: 'Module'
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
-
value: true
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
})();
|
|
25
|
-
var __webpack_exports__ = {};
|
|
26
|
-
__webpack_require__.r(__webpack_exports__);
|
|
27
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
-
InputPassword: ()=>InputPassword
|
|
29
|
-
});
|
|
30
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
-
const external_react_namespaceObject = require("react");
|
|
33
|
-
const external_input_group_cjs_namespaceObject = require("./input-group.cjs");
|
|
34
|
-
function InputPassword({ className, disabled, readOnly, ...props }) {
|
|
35
|
-
const [type, setType] = (0, external_react_namespaceObject.useState)('password');
|
|
36
|
-
const togglePasswordVisibility = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
37
|
-
setType((previous)=>'password' === previous ? 'text' : 'password');
|
|
38
|
-
}, []);
|
|
39
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup, {
|
|
40
|
-
className: className,
|
|
41
|
-
"data-disabled": disabled ? 'true' : void 0,
|
|
42
|
-
"data-slot": "input-password",
|
|
43
|
-
children: [
|
|
44
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput, {
|
|
45
|
-
autoCapitalize: "none",
|
|
46
|
-
"data-slot": "input-password-item",
|
|
47
|
-
disabled: disabled,
|
|
48
|
-
readOnly: readOnly,
|
|
49
|
-
type: type,
|
|
50
|
-
...props
|
|
51
|
-
}),
|
|
52
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupButton, {
|
|
53
|
-
"aria-label": 'password' === type ? 'Show password' : 'Hide password',
|
|
54
|
-
className: "focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0",
|
|
55
|
-
"data-slot": "input-password-toggle",
|
|
56
|
-
disabled: disabled,
|
|
57
|
-
size: "icon-sm",
|
|
58
|
-
type: "button",
|
|
59
|
-
variant: "ghost",
|
|
60
|
-
onClick: togglePasswordVisibility,
|
|
61
|
-
children: 'password' === type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeOffIcon, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeIcon, {})
|
|
62
|
-
})
|
|
63
|
-
]
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
exports.InputPassword = __webpack_exports__.InputPassword;
|
|
67
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
68
|
-
"InputPassword"
|
|
69
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
70
|
-
Object.defineProperty(exports, '__esModule', {
|
|
71
|
-
value: true
|
|
72
|
-
});
|