shadcn-zod-formkit 3.2.0 → 3.4.0
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/README.md +5 -0
- package/dist/index.cjs +1461 -665
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +76 -58
- package/dist/index.d.ts +76 -58
- package/dist/index.mjs +1311 -516
- package/dist/index.mjs.map +1 -1
- package/dist/shadcn-zod-formkit-3.4.0.tgz +0 -0
- package/package.json +4 -2
- package/dist/shadcn-zod-formkit-3.2.0.tgz +0 -0
package/dist/index.cjs
CHANGED
|
@@ -9,27 +9,29 @@ var tailwindMerge = require('tailwind-merge');
|
|
|
9
9
|
var reactHookForm = require('react-hook-form');
|
|
10
10
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
11
11
|
var reactSlot = require('@radix-ui/react-slot');
|
|
12
|
+
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
12
13
|
var reactDayPicker = require('react-day-picker');
|
|
13
14
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
14
15
|
var reactColorPalette = require('react-color-palette');
|
|
15
16
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
16
17
|
require('react-color-palette/css');
|
|
18
|
+
var cmdk = require('cmdk');
|
|
17
19
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
18
20
|
var LabelPrimitive = require('@radix-ui/react-label');
|
|
19
|
-
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
20
21
|
var inputOtp = require('input-otp');
|
|
21
22
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
22
23
|
var ResizablePrimitive = require('react-resizable-panels');
|
|
23
24
|
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
24
25
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
26
|
+
var radixUi = require('radix-ui');
|
|
27
|
+
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
25
28
|
var nextThemes = require('next-themes');
|
|
26
29
|
var sonner = require('sonner');
|
|
27
30
|
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
31
|
+
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
28
32
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
29
|
-
var cmdk = require('cmdk');
|
|
30
33
|
var dateFns = require('date-fns');
|
|
31
|
-
var
|
|
32
|
-
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
34
|
+
var zustand = require('zustand');
|
|
33
35
|
var core = require('@dnd-kit/core');
|
|
34
36
|
var sortable = require('@dnd-kit/sortable');
|
|
35
37
|
var utilities = require('@dnd-kit/utilities');
|
|
@@ -58,19 +60,19 @@ function _interopNamespace(e) {
|
|
|
58
60
|
|
|
59
61
|
var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
60
62
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
63
|
+
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
61
64
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
62
65
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
63
66
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
64
67
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
65
|
-
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
66
68
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
67
69
|
var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
|
|
68
70
|
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
69
71
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
72
|
+
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
70
73
|
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
71
|
-
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
72
74
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
73
|
-
var
|
|
75
|
+
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
74
76
|
var z2__default = /*#__PURE__*/_interopDefault(z2);
|
|
75
77
|
|
|
76
78
|
var __create = Object.create;
|
|
@@ -8752,12 +8754,12 @@ var require_leaflet_src = __commonJS({
|
|
|
8752
8754
|
toBack(layer._container);
|
|
8753
8755
|
}
|
|
8754
8756
|
};
|
|
8755
|
-
var
|
|
8757
|
+
var create2 = Browser.vml ? vmlCreate : svgCreate;
|
|
8756
8758
|
var SVG = Renderer.extend({
|
|
8757
8759
|
_initContainer: function() {
|
|
8758
|
-
this._container =
|
|
8760
|
+
this._container = create2("svg");
|
|
8759
8761
|
this._container.setAttribute("pointer-events", "none");
|
|
8760
|
-
this._rootGroup =
|
|
8762
|
+
this._rootGroup = create2("g");
|
|
8761
8763
|
this._container.appendChild(this._rootGroup);
|
|
8762
8764
|
},
|
|
8763
8765
|
_destroyContainer: function() {
|
|
@@ -8784,7 +8786,7 @@ var require_leaflet_src = __commonJS({
|
|
|
8784
8786
|
},
|
|
8785
8787
|
// methods below are called by vector layers implementations
|
|
8786
8788
|
_initPath: function(layer) {
|
|
8787
|
-
var path = layer._path =
|
|
8789
|
+
var path = layer._path = create2("path");
|
|
8788
8790
|
if (layer.options.className) {
|
|
8789
8791
|
addClass(path, layer.options.className);
|
|
8790
8792
|
}
|
|
@@ -8919,7 +8921,7 @@ var require_leaflet_src = __commonJS({
|
|
|
8919
8921
|
function rectangle(latLngBounds, options) {
|
|
8920
8922
|
return new Rectangle(latLngBounds, options);
|
|
8921
8923
|
}
|
|
8922
|
-
SVG.create =
|
|
8924
|
+
SVG.create = create2;
|
|
8923
8925
|
SVG.pointsToPath = pointsToPath;
|
|
8924
8926
|
GeoJSON.geometryToLayer = geometryToLayer;
|
|
8925
8927
|
GeoJSON.coordsToLatLng = coordsToLatLng;
|
|
@@ -9227,7 +9229,7 @@ var require_leaflet_src = __commonJS({
|
|
|
9227
9229
|
// Amount of pixels to pan when pressing an arrow key.
|
|
9228
9230
|
keyboardPanDelta: 80
|
|
9229
9231
|
});
|
|
9230
|
-
var
|
|
9232
|
+
var Keyboard2 = Handler.extend({
|
|
9231
9233
|
keyCodes: {
|
|
9232
9234
|
left: [37],
|
|
9233
9235
|
right: [39],
|
|
@@ -9345,7 +9347,7 @@ var require_leaflet_src = __commonJS({
|
|
|
9345
9347
|
stop(e);
|
|
9346
9348
|
}
|
|
9347
9349
|
});
|
|
9348
|
-
Map2.addInitHook("addHandler", "keyboard",
|
|
9350
|
+
Map2.addInitHook("addHandler", "keyboard", Keyboard2);
|
|
9349
9351
|
Map2.mergeOptions({
|
|
9350
9352
|
// @section Mouse wheel options
|
|
9351
9353
|
// @option scrollWheelZoom: Boolean|String = true
|
|
@@ -9563,7 +9565,7 @@ var require_leaflet_src = __commonJS({
|
|
|
9563
9565
|
Map2.BoxZoom = BoxZoom;
|
|
9564
9566
|
Map2.DoubleClickZoom = DoubleClickZoom;
|
|
9565
9567
|
Map2.Drag = Drag;
|
|
9566
|
-
Map2.Keyboard =
|
|
9568
|
+
Map2.Keyboard = Keyboard2;
|
|
9567
9569
|
Map2.ScrollWheelZoom = ScrollWheelZoom;
|
|
9568
9570
|
Map2.TapHold = TapHold;
|
|
9569
9571
|
Map2.TouchZoom = TouchZoom;
|
|
@@ -10002,6 +10004,10 @@ var InputTypes = /* @__PURE__ */ ((InputTypes2) => {
|
|
|
10002
10004
|
InputTypes2["EMAIL"] = "email";
|
|
10003
10005
|
InputTypes2["SEARCH"] = "search";
|
|
10004
10006
|
InputTypes2["LOCATION_PICKER"] = "location_picker";
|
|
10007
|
+
InputTypes2["DATE_RANGE"] = "date_range";
|
|
10008
|
+
InputTypes2["COUNTRY_SELECT"] = "country_select";
|
|
10009
|
+
InputTypes2["RANGE"] = "range";
|
|
10010
|
+
InputTypes2["FILE_UPLOAD"] = "file_upload";
|
|
10005
10011
|
return InputTypes2;
|
|
10006
10012
|
})(InputTypes || {});
|
|
10007
10013
|
var inputFieldComp = [
|
|
@@ -10134,6 +10140,91 @@ function Badge({
|
|
|
10134
10140
|
}
|
|
10135
10141
|
);
|
|
10136
10142
|
}
|
|
10143
|
+
function Separator({
|
|
10144
|
+
className,
|
|
10145
|
+
orientation: orientation2 = "horizontal",
|
|
10146
|
+
decorative = true,
|
|
10147
|
+
...props
|
|
10148
|
+
}) {
|
|
10149
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10150
|
+
SeparatorPrimitive__namespace.Root,
|
|
10151
|
+
{
|
|
10152
|
+
"data-slot": "separator",
|
|
10153
|
+
decorative,
|
|
10154
|
+
orientation: orientation2,
|
|
10155
|
+
className: cn(
|
|
10156
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
10157
|
+
className
|
|
10158
|
+
),
|
|
10159
|
+
...props
|
|
10160
|
+
}
|
|
10161
|
+
);
|
|
10162
|
+
}
|
|
10163
|
+
var buttonGroupVariants = classVarianceAuthority.cva(
|
|
10164
|
+
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
10165
|
+
{
|
|
10166
|
+
variants: {
|
|
10167
|
+
orientation: {
|
|
10168
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
10169
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
10170
|
+
}
|
|
10171
|
+
},
|
|
10172
|
+
defaultVariants: {
|
|
10173
|
+
orientation: "horizontal"
|
|
10174
|
+
}
|
|
10175
|
+
}
|
|
10176
|
+
);
|
|
10177
|
+
function ButtonGroup({
|
|
10178
|
+
className,
|
|
10179
|
+
orientation: orientation2,
|
|
10180
|
+
...props
|
|
10181
|
+
}) {
|
|
10182
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10183
|
+
"div",
|
|
10184
|
+
{
|
|
10185
|
+
role: "group",
|
|
10186
|
+
"data-slot": "button-group",
|
|
10187
|
+
"data-orientation": orientation2,
|
|
10188
|
+
className: cn(buttonGroupVariants({ orientation: orientation2 }), className),
|
|
10189
|
+
...props
|
|
10190
|
+
}
|
|
10191
|
+
);
|
|
10192
|
+
}
|
|
10193
|
+
function ButtonGroupText({
|
|
10194
|
+
className,
|
|
10195
|
+
asChild = false,
|
|
10196
|
+
...props
|
|
10197
|
+
}) {
|
|
10198
|
+
const Comp = asChild ? reactSlot.Slot : "div";
|
|
10199
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10200
|
+
Comp,
|
|
10201
|
+
{
|
|
10202
|
+
className: cn(
|
|
10203
|
+
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
10204
|
+
className
|
|
10205
|
+
),
|
|
10206
|
+
...props
|
|
10207
|
+
}
|
|
10208
|
+
);
|
|
10209
|
+
}
|
|
10210
|
+
function ButtonGroupSeparator({
|
|
10211
|
+
className,
|
|
10212
|
+
orientation: orientation2 = "vertical",
|
|
10213
|
+
...props
|
|
10214
|
+
}) {
|
|
10215
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10216
|
+
Separator,
|
|
10217
|
+
{
|
|
10218
|
+
"data-slot": "button-group-separator",
|
|
10219
|
+
orientation: orientation2,
|
|
10220
|
+
className: cn(
|
|
10221
|
+
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
10222
|
+
className
|
|
10223
|
+
),
|
|
10224
|
+
...props
|
|
10225
|
+
}
|
|
10226
|
+
);
|
|
10227
|
+
}
|
|
10137
10228
|
var buttonVariants = classVarianceAuthority.cva(
|
|
10138
10229
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
10139
10230
|
{
|
|
@@ -10653,153 +10744,287 @@ function DialogDescription({
|
|
|
10653
10744
|
}
|
|
10654
10745
|
);
|
|
10655
10746
|
}
|
|
10656
|
-
function
|
|
10747
|
+
function Command({
|
|
10657
10748
|
className,
|
|
10658
10749
|
...props
|
|
10659
10750
|
}) {
|
|
10660
10751
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10661
|
-
|
|
10752
|
+
cmdk.Command,
|
|
10662
10753
|
{
|
|
10663
|
-
"data-slot": "
|
|
10754
|
+
"data-slot": "command",
|
|
10664
10755
|
className: cn(
|
|
10665
|
-
"
|
|
10756
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
10666
10757
|
className
|
|
10667
10758
|
),
|
|
10668
10759
|
...props
|
|
10669
10760
|
}
|
|
10670
10761
|
);
|
|
10671
10762
|
}
|
|
10672
|
-
function
|
|
10763
|
+
function CommandDialog({
|
|
10764
|
+
title = "Command Palette",
|
|
10765
|
+
description = "Search for a command to run...",
|
|
10766
|
+
children,
|
|
10673
10767
|
className,
|
|
10674
|
-
|
|
10675
|
-
decorative = true,
|
|
10768
|
+
showCloseButton = true,
|
|
10676
10769
|
...props
|
|
10677
10770
|
}) {
|
|
10678
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
10679
|
-
|
|
10771
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { ...props, children: [
|
|
10772
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "sr-only", children: [
|
|
10773
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: title }),
|
|
10774
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: description })
|
|
10775
|
+
] }),
|
|
10776
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10777
|
+
DialogContent,
|
|
10778
|
+
{
|
|
10779
|
+
className: cn("overflow-hidden p-0", className),
|
|
10780
|
+
showCloseButton,
|
|
10781
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
10782
|
+
}
|
|
10783
|
+
)
|
|
10784
|
+
] });
|
|
10785
|
+
}
|
|
10786
|
+
function CommandInput({
|
|
10787
|
+
className,
|
|
10788
|
+
...props
|
|
10789
|
+
}) {
|
|
10790
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10791
|
+
"div",
|
|
10680
10792
|
{
|
|
10681
|
-
"data-slot": "
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10793
|
+
"data-slot": "command-input-wrapper",
|
|
10794
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
10795
|
+
children: [
|
|
10796
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
10797
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10798
|
+
cmdk.Command.Input,
|
|
10799
|
+
{
|
|
10800
|
+
"data-slot": "command-input",
|
|
10801
|
+
className: cn(
|
|
10802
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
10803
|
+
className
|
|
10804
|
+
),
|
|
10805
|
+
...props
|
|
10806
|
+
}
|
|
10807
|
+
)
|
|
10808
|
+
]
|
|
10689
10809
|
}
|
|
10690
10810
|
);
|
|
10691
10811
|
}
|
|
10692
|
-
function
|
|
10812
|
+
function CommandList({
|
|
10813
|
+
className,
|
|
10814
|
+
...props
|
|
10815
|
+
}) {
|
|
10693
10816
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10694
|
-
|
|
10817
|
+
cmdk.Command.List,
|
|
10695
10818
|
{
|
|
10696
|
-
"data-slot": "
|
|
10819
|
+
"data-slot": "command-list",
|
|
10697
10820
|
className: cn(
|
|
10698
|
-
"
|
|
10699
|
-
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
10821
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
10700
10822
|
className
|
|
10701
10823
|
),
|
|
10702
10824
|
...props
|
|
10703
10825
|
}
|
|
10704
10826
|
);
|
|
10705
10827
|
}
|
|
10706
|
-
function
|
|
10707
|
-
className,
|
|
10708
|
-
variant = "legend",
|
|
10828
|
+
function CommandEmpty({
|
|
10709
10829
|
...props
|
|
10710
10830
|
}) {
|
|
10711
10831
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10712
|
-
|
|
10832
|
+
cmdk.Command.Empty,
|
|
10713
10833
|
{
|
|
10714
|
-
"data-slot": "
|
|
10715
|
-
"
|
|
10716
|
-
className: cn(
|
|
10717
|
-
"mb-3 font-medium",
|
|
10718
|
-
"data-[variant=legend]:text-base",
|
|
10719
|
-
"data-[variant=label]:text-sm",
|
|
10720
|
-
className
|
|
10721
|
-
),
|
|
10834
|
+
"data-slot": "command-empty",
|
|
10835
|
+
className: "py-6 text-center text-sm",
|
|
10722
10836
|
...props
|
|
10723
10837
|
}
|
|
10724
10838
|
);
|
|
10725
10839
|
}
|
|
10726
|
-
function
|
|
10840
|
+
function CommandGroup({
|
|
10841
|
+
className,
|
|
10842
|
+
...props
|
|
10843
|
+
}) {
|
|
10727
10844
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10728
|
-
|
|
10845
|
+
cmdk.Command.Group,
|
|
10729
10846
|
{
|
|
10730
|
-
"data-slot": "
|
|
10847
|
+
"data-slot": "command-group",
|
|
10731
10848
|
className: cn(
|
|
10732
|
-
"
|
|
10849
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
10733
10850
|
className
|
|
10734
10851
|
),
|
|
10735
10852
|
...props
|
|
10736
10853
|
}
|
|
10737
10854
|
);
|
|
10738
10855
|
}
|
|
10739
|
-
|
|
10740
|
-
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
10741
|
-
{
|
|
10742
|
-
variants: {
|
|
10743
|
-
orientation: {
|
|
10744
|
-
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
10745
|
-
horizontal: [
|
|
10746
|
-
"flex-row items-center",
|
|
10747
|
-
"[&>[data-slot=field-label]]:flex-auto",
|
|
10748
|
-
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
10749
|
-
],
|
|
10750
|
-
responsive: [
|
|
10751
|
-
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
10752
|
-
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
10753
|
-
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
10754
|
-
]
|
|
10755
|
-
}
|
|
10756
|
-
},
|
|
10757
|
-
defaultVariants: {
|
|
10758
|
-
orientation: "vertical"
|
|
10759
|
-
}
|
|
10760
|
-
}
|
|
10761
|
-
);
|
|
10762
|
-
function Field({
|
|
10856
|
+
function CommandSeparator({
|
|
10763
10857
|
className,
|
|
10764
|
-
orientation: orientation2 = "vertical",
|
|
10765
10858
|
...props
|
|
10766
10859
|
}) {
|
|
10767
10860
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10768
|
-
|
|
10861
|
+
cmdk.Command.Separator,
|
|
10769
10862
|
{
|
|
10770
|
-
|
|
10771
|
-
"
|
|
10772
|
-
"data-orientation": orientation2,
|
|
10773
|
-
className: cn(fieldVariants({ orientation: orientation2 }), className),
|
|
10863
|
+
"data-slot": "command-separator",
|
|
10864
|
+
className: cn("bg-border -mx-1 h-px", className),
|
|
10774
10865
|
...props
|
|
10775
10866
|
}
|
|
10776
10867
|
);
|
|
10777
10868
|
}
|
|
10778
|
-
function
|
|
10869
|
+
function CommandItem({
|
|
10870
|
+
className,
|
|
10871
|
+
...props
|
|
10872
|
+
}) {
|
|
10779
10873
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10780
|
-
|
|
10874
|
+
cmdk.Command.Item,
|
|
10781
10875
|
{
|
|
10782
|
-
"data-slot": "
|
|
10876
|
+
"data-slot": "command-item",
|
|
10783
10877
|
className: cn(
|
|
10784
|
-
"
|
|
10878
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
10785
10879
|
className
|
|
10786
10880
|
),
|
|
10787
10881
|
...props
|
|
10788
10882
|
}
|
|
10789
10883
|
);
|
|
10790
10884
|
}
|
|
10791
|
-
function
|
|
10885
|
+
function CommandShortcut({
|
|
10792
10886
|
className,
|
|
10793
10887
|
...props
|
|
10794
10888
|
}) {
|
|
10795
10889
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10796
|
-
|
|
10890
|
+
"span",
|
|
10797
10891
|
{
|
|
10798
|
-
"data-slot": "
|
|
10892
|
+
"data-slot": "command-shortcut",
|
|
10799
10893
|
className: cn(
|
|
10800
|
-
"
|
|
10801
|
-
|
|
10802
|
-
|
|
10894
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
10895
|
+
className
|
|
10896
|
+
),
|
|
10897
|
+
...props
|
|
10898
|
+
}
|
|
10899
|
+
);
|
|
10900
|
+
}
|
|
10901
|
+
function Label({
|
|
10902
|
+
className,
|
|
10903
|
+
...props
|
|
10904
|
+
}) {
|
|
10905
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10906
|
+
LabelPrimitive__namespace.Root,
|
|
10907
|
+
{
|
|
10908
|
+
"data-slot": "label",
|
|
10909
|
+
className: cn(
|
|
10910
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
10911
|
+
className
|
|
10912
|
+
),
|
|
10913
|
+
...props
|
|
10914
|
+
}
|
|
10915
|
+
);
|
|
10916
|
+
}
|
|
10917
|
+
function FieldSet({ className, ...props }) {
|
|
10918
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10919
|
+
"fieldset",
|
|
10920
|
+
{
|
|
10921
|
+
"data-slot": "field-set",
|
|
10922
|
+
className: cn(
|
|
10923
|
+
"flex flex-col gap-6",
|
|
10924
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
10925
|
+
className
|
|
10926
|
+
),
|
|
10927
|
+
...props
|
|
10928
|
+
}
|
|
10929
|
+
);
|
|
10930
|
+
}
|
|
10931
|
+
function FieldLegend({
|
|
10932
|
+
className,
|
|
10933
|
+
variant = "legend",
|
|
10934
|
+
...props
|
|
10935
|
+
}) {
|
|
10936
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10937
|
+
"legend",
|
|
10938
|
+
{
|
|
10939
|
+
"data-slot": "field-legend",
|
|
10940
|
+
"data-variant": variant,
|
|
10941
|
+
className: cn(
|
|
10942
|
+
"mb-3 font-medium",
|
|
10943
|
+
"data-[variant=legend]:text-base",
|
|
10944
|
+
"data-[variant=label]:text-sm",
|
|
10945
|
+
className
|
|
10946
|
+
),
|
|
10947
|
+
...props
|
|
10948
|
+
}
|
|
10949
|
+
);
|
|
10950
|
+
}
|
|
10951
|
+
function FieldGroup({ className, ...props }) {
|
|
10952
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10953
|
+
"div",
|
|
10954
|
+
{
|
|
10955
|
+
"data-slot": "field-group",
|
|
10956
|
+
className: cn(
|
|
10957
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
10958
|
+
className
|
|
10959
|
+
),
|
|
10960
|
+
...props
|
|
10961
|
+
}
|
|
10962
|
+
);
|
|
10963
|
+
}
|
|
10964
|
+
var fieldVariants = classVarianceAuthority.cva(
|
|
10965
|
+
"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
|
|
10966
|
+
{
|
|
10967
|
+
variants: {
|
|
10968
|
+
orientation: {
|
|
10969
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
10970
|
+
horizontal: [
|
|
10971
|
+
"flex-row items-center",
|
|
10972
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
10973
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
10974
|
+
],
|
|
10975
|
+
responsive: [
|
|
10976
|
+
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
10977
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
10978
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
10979
|
+
]
|
|
10980
|
+
}
|
|
10981
|
+
},
|
|
10982
|
+
defaultVariants: {
|
|
10983
|
+
orientation: "vertical"
|
|
10984
|
+
}
|
|
10985
|
+
}
|
|
10986
|
+
);
|
|
10987
|
+
function Field({
|
|
10988
|
+
className,
|
|
10989
|
+
orientation: orientation2 = "vertical",
|
|
10990
|
+
...props
|
|
10991
|
+
}) {
|
|
10992
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10993
|
+
"div",
|
|
10994
|
+
{
|
|
10995
|
+
role: "group",
|
|
10996
|
+
"data-slot": "field",
|
|
10997
|
+
"data-orientation": orientation2,
|
|
10998
|
+
className: cn(fieldVariants({ orientation: orientation2 }), className),
|
|
10999
|
+
...props
|
|
11000
|
+
}
|
|
11001
|
+
);
|
|
11002
|
+
}
|
|
11003
|
+
function FieldContent({ className, ...props }) {
|
|
11004
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11005
|
+
"div",
|
|
11006
|
+
{
|
|
11007
|
+
"data-slot": "field-content",
|
|
11008
|
+
className: cn(
|
|
11009
|
+
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
11010
|
+
className
|
|
11011
|
+
),
|
|
11012
|
+
...props
|
|
11013
|
+
}
|
|
11014
|
+
);
|
|
11015
|
+
}
|
|
11016
|
+
function FieldLabel({
|
|
11017
|
+
className,
|
|
11018
|
+
...props
|
|
11019
|
+
}) {
|
|
11020
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11021
|
+
Label,
|
|
11022
|
+
{
|
|
11023
|
+
"data-slot": "field-label",
|
|
11024
|
+
className: cn(
|
|
11025
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
11026
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
11027
|
+
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
10803
11028
|
className
|
|
10804
11029
|
),
|
|
10805
11030
|
...props
|
|
@@ -11506,93 +11731,376 @@ function SelectScrollDownButton({
|
|
|
11506
11731
|
}
|
|
11507
11732
|
);
|
|
11508
11733
|
}
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
"--normal-text": "var(--popover-foreground)",
|
|
11519
|
-
"--normal-border": "var(--border)"
|
|
11520
|
-
},
|
|
11521
|
-
...props
|
|
11522
|
-
}
|
|
11523
|
-
);
|
|
11524
|
-
};
|
|
11525
|
-
function Switch({
|
|
11734
|
+
function Sheet({ ...props }) {
|
|
11735
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
11736
|
+
}
|
|
11737
|
+
function SheetPortal({
|
|
11738
|
+
...props
|
|
11739
|
+
}) {
|
|
11740
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
11741
|
+
}
|
|
11742
|
+
function SheetOverlay({
|
|
11526
11743
|
className,
|
|
11527
11744
|
...props
|
|
11528
11745
|
}) {
|
|
11529
11746
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11530
|
-
|
|
11747
|
+
radixUi.Dialog.Overlay,
|
|
11531
11748
|
{
|
|
11532
|
-
"data-slot": "
|
|
11749
|
+
"data-slot": "sheet-overlay",
|
|
11533
11750
|
className: cn(
|
|
11534
|
-
"
|
|
11751
|
+
"fixed inset-0 z-50 bg-black/10 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
11535
11752
|
className
|
|
11536
11753
|
),
|
|
11537
|
-
...props
|
|
11538
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11539
|
-
SwitchPrimitive__namespace.Thumb,
|
|
11540
|
-
{
|
|
11541
|
-
"data-slot": "switch-thumb",
|
|
11542
|
-
className: cn(
|
|
11543
|
-
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
11544
|
-
)
|
|
11545
|
-
}
|
|
11546
|
-
)
|
|
11754
|
+
...props
|
|
11547
11755
|
}
|
|
11548
11756
|
);
|
|
11549
11757
|
}
|
|
11550
|
-
function
|
|
11551
|
-
|
|
11758
|
+
function SheetContent({
|
|
11759
|
+
className,
|
|
11760
|
+
children,
|
|
11761
|
+
side = "right",
|
|
11762
|
+
showCloseButton = true,
|
|
11552
11763
|
...props
|
|
11553
11764
|
}) {
|
|
11765
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
11766
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
11767
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11768
|
+
radixUi.Dialog.Content,
|
|
11769
|
+
{
|
|
11770
|
+
"data-slot": "sheet-content",
|
|
11771
|
+
"data-side": side,
|
|
11772
|
+
className: cn(
|
|
11773
|
+
"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
|
|
11774
|
+
className
|
|
11775
|
+
),
|
|
11776
|
+
...props,
|
|
11777
|
+
children: [
|
|
11778
|
+
children,
|
|
11779
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { "data-slot": "sheet-close", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11780
|
+
Button,
|
|
11781
|
+
{
|
|
11782
|
+
variant: "ghost",
|
|
11783
|
+
className: "absolute top-3 right-3",
|
|
11784
|
+
size: "icon-sm",
|
|
11785
|
+
children: [
|
|
11786
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11787
|
+
lucideReact.XIcon,
|
|
11788
|
+
{}
|
|
11789
|
+
),
|
|
11790
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
11791
|
+
]
|
|
11792
|
+
}
|
|
11793
|
+
) })
|
|
11794
|
+
]
|
|
11795
|
+
}
|
|
11796
|
+
)
|
|
11797
|
+
] });
|
|
11798
|
+
}
|
|
11799
|
+
function SheetHeader({ className, ...props }) {
|
|
11554
11800
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11555
|
-
|
|
11801
|
+
"div",
|
|
11556
11802
|
{
|
|
11557
|
-
"data-slot": "
|
|
11558
|
-
|
|
11803
|
+
"data-slot": "sheet-header",
|
|
11804
|
+
className: cn("flex flex-col gap-0.5 p-4", className),
|
|
11559
11805
|
...props
|
|
11560
11806
|
}
|
|
11561
11807
|
);
|
|
11562
11808
|
}
|
|
11563
|
-
function
|
|
11809
|
+
function SheetFooter({ className, ...props }) {
|
|
11810
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11811
|
+
"div",
|
|
11812
|
+
{
|
|
11813
|
+
"data-slot": "sheet-footer",
|
|
11814
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
11815
|
+
...props
|
|
11816
|
+
}
|
|
11817
|
+
);
|
|
11818
|
+
}
|
|
11819
|
+
function SheetTitle({
|
|
11820
|
+
className,
|
|
11564
11821
|
...props
|
|
11565
11822
|
}) {
|
|
11566
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11823
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11824
|
+
radixUi.Dialog.Title,
|
|
11825
|
+
{
|
|
11826
|
+
"data-slot": "sheet-title",
|
|
11827
|
+
className: cn(
|
|
11828
|
+
"font-heading text-base font-medium text-foreground",
|
|
11829
|
+
className
|
|
11830
|
+
),
|
|
11831
|
+
...props
|
|
11832
|
+
}
|
|
11833
|
+
);
|
|
11567
11834
|
}
|
|
11568
|
-
function
|
|
11835
|
+
function SheetDescription({
|
|
11836
|
+
className,
|
|
11569
11837
|
...props
|
|
11570
11838
|
}) {
|
|
11571
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11839
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11840
|
+
radixUi.Dialog.Description,
|
|
11841
|
+
{
|
|
11842
|
+
"data-slot": "sheet-description",
|
|
11843
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
11844
|
+
...props
|
|
11845
|
+
}
|
|
11846
|
+
);
|
|
11572
11847
|
}
|
|
11573
|
-
function
|
|
11848
|
+
function Slider({
|
|
11574
11849
|
className,
|
|
11575
|
-
|
|
11576
|
-
|
|
11850
|
+
defaultValue,
|
|
11851
|
+
value,
|
|
11852
|
+
min = 0,
|
|
11853
|
+
max = 100,
|
|
11577
11854
|
...props
|
|
11578
11855
|
}) {
|
|
11579
|
-
|
|
11580
|
-
|
|
11856
|
+
const _values = React3__namespace.useMemo(
|
|
11857
|
+
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
11858
|
+
[value, defaultValue, min, max]
|
|
11859
|
+
);
|
|
11860
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11861
|
+
SliderPrimitive__namespace.Root,
|
|
11581
11862
|
{
|
|
11582
|
-
"data-slot": "
|
|
11583
|
-
|
|
11863
|
+
"data-slot": "slider",
|
|
11864
|
+
defaultValue,
|
|
11865
|
+
value,
|
|
11866
|
+
min,
|
|
11867
|
+
max,
|
|
11584
11868
|
className: cn(
|
|
11585
|
-
"
|
|
11869
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
11586
11870
|
className
|
|
11587
11871
|
),
|
|
11588
11872
|
...props,
|
|
11589
11873
|
children: [
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11874
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11875
|
+
SliderPrimitive__namespace.Track,
|
|
11876
|
+
{
|
|
11877
|
+
"data-slot": "slider-track",
|
|
11878
|
+
className: cn(
|
|
11879
|
+
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
11880
|
+
),
|
|
11881
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11882
|
+
SliderPrimitive__namespace.Range,
|
|
11883
|
+
{
|
|
11884
|
+
"data-slot": "slider-range",
|
|
11885
|
+
className: cn(
|
|
11886
|
+
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
11887
|
+
)
|
|
11888
|
+
}
|
|
11889
|
+
)
|
|
11890
|
+
}
|
|
11891
|
+
),
|
|
11892
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11893
|
+
SliderPrimitive__namespace.Thumb,
|
|
11894
|
+
{
|
|
11895
|
+
"data-slot": "slider-thumb",
|
|
11896
|
+
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
11897
|
+
},
|
|
11898
|
+
index
|
|
11899
|
+
))
|
|
11900
|
+
]
|
|
11901
|
+
}
|
|
11902
|
+
);
|
|
11903
|
+
}
|
|
11904
|
+
var Toaster = ({ ...props }) => {
|
|
11905
|
+
const { theme = "system" } = nextThemes.useTheme();
|
|
11906
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11907
|
+
sonner.Toaster,
|
|
11908
|
+
{
|
|
11909
|
+
theme,
|
|
11910
|
+
className: "toaster group",
|
|
11911
|
+
style: {
|
|
11912
|
+
"--normal-bg": "var(--popover)",
|
|
11913
|
+
"--normal-text": "var(--popover-foreground)",
|
|
11914
|
+
"--normal-border": "var(--border)"
|
|
11915
|
+
},
|
|
11916
|
+
...props
|
|
11917
|
+
}
|
|
11918
|
+
);
|
|
11919
|
+
};
|
|
11920
|
+
function Stepper({ steps, currentStep, clickable = false, onStepClick }) {
|
|
11921
|
+
const handleStepClick = (stepNumber) => {
|
|
11922
|
+
if (clickable && onStepClick) {
|
|
11923
|
+
onStepClick(stepNumber);
|
|
11924
|
+
}
|
|
11925
|
+
};
|
|
11926
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-4 items-center justify-around", children: steps.map((step, index) => {
|
|
11927
|
+
const stepNumber = index + 1;
|
|
11928
|
+
const isCompleted = stepNumber < currentStep;
|
|
11929
|
+
const isCurrent = stepNumber === currentStep;
|
|
11930
|
+
const isUpcoming = stepNumber > currentStep;
|
|
11931
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 items-center", children: [
|
|
11932
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
11933
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11934
|
+
"div",
|
|
11935
|
+
{
|
|
11936
|
+
onClick: () => handleStepClick(stepNumber),
|
|
11937
|
+
className: cn(
|
|
11938
|
+
"flex size-10 items-center shadow-lg justify-center rounded-full border-2 transition-all duration-300",
|
|
11939
|
+
isCompleted && "border-primary bg-primary text-primary-foreground",
|
|
11940
|
+
isCurrent && "border-primary bg-background text-primary scale-110",
|
|
11941
|
+
isUpcoming && "border-muted-foreground/60 bg-background border-b text-muted-foreground",
|
|
11942
|
+
clickable && "cursor-pointer hover:scale-125 hover:shadow-xl",
|
|
11943
|
+
!clickable && "cursor-default"
|
|
11944
|
+
),
|
|
11945
|
+
children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: stepNumber })
|
|
11946
|
+
}
|
|
11947
|
+
),
|
|
11948
|
+
step.title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 text-center", children: [
|
|
11949
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11950
|
+
"p",
|
|
11951
|
+
{
|
|
11952
|
+
className: cn(
|
|
11953
|
+
"text-sm font-medium transition-colors",
|
|
11954
|
+
(isCompleted || isCurrent) && "text-foreground",
|
|
11955
|
+
isUpcoming && "text-muted-foreground"
|
|
11956
|
+
),
|
|
11957
|
+
children: step.title
|
|
11958
|
+
}
|
|
11959
|
+
),
|
|
11960
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground max-w-[120px]", children: step.description })
|
|
11961
|
+
] })
|
|
11962
|
+
] }),
|
|
11963
|
+
index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-2 flex-1 mb-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11964
|
+
"div",
|
|
11965
|
+
{
|
|
11966
|
+
className: cn(
|
|
11967
|
+
"h-0.5 w-full transition-all duration-300",
|
|
11968
|
+
stepNumber < currentStep ? "bg-primary" : "bg-muted-foreground/30"
|
|
11969
|
+
)
|
|
11970
|
+
}
|
|
11971
|
+
) })
|
|
11972
|
+
] }, index);
|
|
11973
|
+
}) }) });
|
|
11974
|
+
}
|
|
11975
|
+
function Switch({
|
|
11976
|
+
className,
|
|
11977
|
+
...props
|
|
11978
|
+
}) {
|
|
11979
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11980
|
+
SwitchPrimitive__namespace.Root,
|
|
11981
|
+
{
|
|
11982
|
+
"data-slot": "switch",
|
|
11983
|
+
className: cn(
|
|
11984
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
11985
|
+
className
|
|
11986
|
+
),
|
|
11987
|
+
...props,
|
|
11988
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11989
|
+
SwitchPrimitive__namespace.Thumb,
|
|
11990
|
+
{
|
|
11991
|
+
"data-slot": "switch-thumb",
|
|
11992
|
+
className: cn(
|
|
11993
|
+
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
11994
|
+
)
|
|
11995
|
+
}
|
|
11996
|
+
)
|
|
11997
|
+
}
|
|
11998
|
+
);
|
|
11999
|
+
}
|
|
12000
|
+
function Tabs({
|
|
12001
|
+
className,
|
|
12002
|
+
...props
|
|
12003
|
+
}) {
|
|
12004
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12005
|
+
TabsPrimitive__namespace.Root,
|
|
12006
|
+
{
|
|
12007
|
+
"data-slot": "tabs",
|
|
12008
|
+
className: cn("flex flex-col gap-2", className),
|
|
12009
|
+
...props
|
|
12010
|
+
}
|
|
12011
|
+
);
|
|
12012
|
+
}
|
|
12013
|
+
function TabsList({
|
|
12014
|
+
className,
|
|
12015
|
+
...props
|
|
12016
|
+
}) {
|
|
12017
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12018
|
+
TabsPrimitive__namespace.List,
|
|
12019
|
+
{
|
|
12020
|
+
"data-slot": "tabs-list",
|
|
12021
|
+
className: cn(
|
|
12022
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
12023
|
+
className
|
|
12024
|
+
),
|
|
12025
|
+
...props
|
|
12026
|
+
}
|
|
12027
|
+
);
|
|
12028
|
+
}
|
|
12029
|
+
function TabsTrigger({
|
|
12030
|
+
className,
|
|
12031
|
+
...props
|
|
12032
|
+
}) {
|
|
12033
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12034
|
+
TabsPrimitive__namespace.Trigger,
|
|
12035
|
+
{
|
|
12036
|
+
"data-slot": "tabs-trigger",
|
|
12037
|
+
className: cn(
|
|
12038
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
12039
|
+
className
|
|
12040
|
+
),
|
|
12041
|
+
...props
|
|
12042
|
+
}
|
|
12043
|
+
);
|
|
12044
|
+
}
|
|
12045
|
+
function TabsContent({
|
|
12046
|
+
className,
|
|
12047
|
+
...props
|
|
12048
|
+
}) {
|
|
12049
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12050
|
+
TabsPrimitive__namespace.Content,
|
|
12051
|
+
{
|
|
12052
|
+
"data-slot": "tabs-content",
|
|
12053
|
+
className: cn("flex-1 outline-none", className),
|
|
12054
|
+
...props
|
|
12055
|
+
}
|
|
12056
|
+
);
|
|
12057
|
+
}
|
|
12058
|
+
function TooltipProvider({
|
|
12059
|
+
delayDuration = 0,
|
|
12060
|
+
...props
|
|
12061
|
+
}) {
|
|
12062
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12063
|
+
TooltipPrimitive__namespace.Provider,
|
|
12064
|
+
{
|
|
12065
|
+
"data-slot": "tooltip-provider",
|
|
12066
|
+
delayDuration,
|
|
12067
|
+
...props
|
|
12068
|
+
}
|
|
12069
|
+
);
|
|
12070
|
+
}
|
|
12071
|
+
function Tooltip({
|
|
12072
|
+
...props
|
|
12073
|
+
}) {
|
|
12074
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
|
|
12075
|
+
}
|
|
12076
|
+
function TooltipTrigger({
|
|
12077
|
+
...props
|
|
12078
|
+
}) {
|
|
12079
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
12080
|
+
}
|
|
12081
|
+
function TooltipContent({
|
|
12082
|
+
className,
|
|
12083
|
+
sideOffset = 0,
|
|
12084
|
+
children,
|
|
12085
|
+
...props
|
|
12086
|
+
}) {
|
|
12087
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12088
|
+
TooltipPrimitive__namespace.Content,
|
|
12089
|
+
{
|
|
12090
|
+
"data-slot": "tooltip-content",
|
|
12091
|
+
sideOffset,
|
|
12092
|
+
className: cn(
|
|
12093
|
+
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
12094
|
+
className
|
|
12095
|
+
),
|
|
12096
|
+
...props,
|
|
12097
|
+
children: [
|
|
12098
|
+
children,
|
|
12099
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
12100
|
+
]
|
|
12101
|
+
}
|
|
12102
|
+
) });
|
|
12103
|
+
}
|
|
11596
12104
|
var GroupedSwitchInput = class extends BaseInput {
|
|
11597
12105
|
render() {
|
|
11598
12106
|
const { input, isSubmitting } = this;
|
|
@@ -11737,76 +12245,11 @@ var AccordionGroupedSwitches = ({ form, input, groups = [], onChange, isSubmitti
|
|
|
11737
12245
|
input.name
|
|
11738
12246
|
);
|
|
11739
12247
|
};
|
|
11740
|
-
var
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
11746
|
-
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
11747
|
-
}
|
|
11748
|
-
},
|
|
11749
|
-
defaultVariants: {
|
|
11750
|
-
orientation: "horizontal"
|
|
11751
|
-
}
|
|
11752
|
-
}
|
|
11753
|
-
);
|
|
11754
|
-
function ButtonGroup({
|
|
11755
|
-
className,
|
|
11756
|
-
orientation: orientation2,
|
|
11757
|
-
...props
|
|
11758
|
-
}) {
|
|
11759
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11760
|
-
"div",
|
|
11761
|
-
{
|
|
11762
|
-
role: "group",
|
|
11763
|
-
"data-slot": "button-group",
|
|
11764
|
-
"data-orientation": orientation2,
|
|
11765
|
-
className: cn(buttonGroupVariants({ orientation: orientation2 }), className),
|
|
11766
|
-
...props
|
|
11767
|
-
}
|
|
11768
|
-
);
|
|
11769
|
-
}
|
|
11770
|
-
function ButtonGroupText({
|
|
11771
|
-
className,
|
|
11772
|
-
asChild = false,
|
|
11773
|
-
...props
|
|
11774
|
-
}) {
|
|
11775
|
-
const Comp = asChild ? reactSlot.Slot : "div";
|
|
11776
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11777
|
-
Comp,
|
|
11778
|
-
{
|
|
11779
|
-
className: cn(
|
|
11780
|
-
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
11781
|
-
className
|
|
11782
|
-
),
|
|
11783
|
-
...props
|
|
11784
|
-
}
|
|
11785
|
-
);
|
|
11786
|
-
}
|
|
11787
|
-
function ButtonGroupSeparator({
|
|
11788
|
-
className,
|
|
11789
|
-
orientation: orientation2 = "vertical",
|
|
11790
|
-
...props
|
|
11791
|
-
}) {
|
|
11792
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11793
|
-
Separator,
|
|
11794
|
-
{
|
|
11795
|
-
"data-slot": "button-group-separator",
|
|
11796
|
-
orientation: orientation2,
|
|
11797
|
-
className: cn(
|
|
11798
|
-
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
11799
|
-
className
|
|
11800
|
-
),
|
|
11801
|
-
...props
|
|
11802
|
-
}
|
|
11803
|
-
);
|
|
11804
|
-
}
|
|
11805
|
-
var ButtonGroupInput = class extends BaseInput {
|
|
11806
|
-
render() {
|
|
11807
|
-
const { input, form, isSubmitting } = this;
|
|
11808
|
-
const className = input.className;
|
|
11809
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FieldButtonGroup, { input, form, isSubmitting, className });
|
|
12248
|
+
var ButtonGroupInput = class extends BaseInput {
|
|
12249
|
+
render() {
|
|
12250
|
+
const { input, form, isSubmitting } = this;
|
|
12251
|
+
const className = input.className;
|
|
12252
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldButtonGroup, { input, form, isSubmitting, className });
|
|
11810
12253
|
}
|
|
11811
12254
|
};
|
|
11812
12255
|
var FieldButtonGroup = ({ input, form, isSubmitting, className = "w-full flex-1" }) => {
|
|
@@ -12050,160 +12493,6 @@ var ColorComp = React3__namespace.default.forwardRef(
|
|
|
12050
12493
|
] });
|
|
12051
12494
|
}
|
|
12052
12495
|
);
|
|
12053
|
-
function Command({
|
|
12054
|
-
className,
|
|
12055
|
-
...props
|
|
12056
|
-
}) {
|
|
12057
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12058
|
-
cmdk.Command,
|
|
12059
|
-
{
|
|
12060
|
-
"data-slot": "command",
|
|
12061
|
-
className: cn(
|
|
12062
|
-
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
12063
|
-
className
|
|
12064
|
-
),
|
|
12065
|
-
...props
|
|
12066
|
-
}
|
|
12067
|
-
);
|
|
12068
|
-
}
|
|
12069
|
-
function CommandDialog({
|
|
12070
|
-
title = "Command Palette",
|
|
12071
|
-
description = "Search for a command to run...",
|
|
12072
|
-
children,
|
|
12073
|
-
className,
|
|
12074
|
-
showCloseButton = true,
|
|
12075
|
-
...props
|
|
12076
|
-
}) {
|
|
12077
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { ...props, children: [
|
|
12078
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "sr-only", children: [
|
|
12079
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: title }),
|
|
12080
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: description })
|
|
12081
|
-
] }),
|
|
12082
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12083
|
-
DialogContent,
|
|
12084
|
-
{
|
|
12085
|
-
className: cn("overflow-hidden p-0", className),
|
|
12086
|
-
showCloseButton,
|
|
12087
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
12088
|
-
}
|
|
12089
|
-
)
|
|
12090
|
-
] });
|
|
12091
|
-
}
|
|
12092
|
-
function CommandInput({
|
|
12093
|
-
className,
|
|
12094
|
-
...props
|
|
12095
|
-
}) {
|
|
12096
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12097
|
-
"div",
|
|
12098
|
-
{
|
|
12099
|
-
"data-slot": "command-input-wrapper",
|
|
12100
|
-
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
12101
|
-
children: [
|
|
12102
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
12103
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12104
|
-
cmdk.Command.Input,
|
|
12105
|
-
{
|
|
12106
|
-
"data-slot": "command-input",
|
|
12107
|
-
className: cn(
|
|
12108
|
-
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
12109
|
-
className
|
|
12110
|
-
),
|
|
12111
|
-
...props
|
|
12112
|
-
}
|
|
12113
|
-
)
|
|
12114
|
-
]
|
|
12115
|
-
}
|
|
12116
|
-
);
|
|
12117
|
-
}
|
|
12118
|
-
function CommandList({
|
|
12119
|
-
className,
|
|
12120
|
-
...props
|
|
12121
|
-
}) {
|
|
12122
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12123
|
-
cmdk.Command.List,
|
|
12124
|
-
{
|
|
12125
|
-
"data-slot": "command-list",
|
|
12126
|
-
className: cn(
|
|
12127
|
-
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
12128
|
-
className
|
|
12129
|
-
),
|
|
12130
|
-
...props
|
|
12131
|
-
}
|
|
12132
|
-
);
|
|
12133
|
-
}
|
|
12134
|
-
function CommandEmpty({
|
|
12135
|
-
...props
|
|
12136
|
-
}) {
|
|
12137
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12138
|
-
cmdk.Command.Empty,
|
|
12139
|
-
{
|
|
12140
|
-
"data-slot": "command-empty",
|
|
12141
|
-
className: "py-6 text-center text-sm",
|
|
12142
|
-
...props
|
|
12143
|
-
}
|
|
12144
|
-
);
|
|
12145
|
-
}
|
|
12146
|
-
function CommandGroup({
|
|
12147
|
-
className,
|
|
12148
|
-
...props
|
|
12149
|
-
}) {
|
|
12150
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12151
|
-
cmdk.Command.Group,
|
|
12152
|
-
{
|
|
12153
|
-
"data-slot": "command-group",
|
|
12154
|
-
className: cn(
|
|
12155
|
-
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
12156
|
-
className
|
|
12157
|
-
),
|
|
12158
|
-
...props
|
|
12159
|
-
}
|
|
12160
|
-
);
|
|
12161
|
-
}
|
|
12162
|
-
function CommandSeparator({
|
|
12163
|
-
className,
|
|
12164
|
-
...props
|
|
12165
|
-
}) {
|
|
12166
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12167
|
-
cmdk.Command.Separator,
|
|
12168
|
-
{
|
|
12169
|
-
"data-slot": "command-separator",
|
|
12170
|
-
className: cn("bg-border -mx-1 h-px", className),
|
|
12171
|
-
...props
|
|
12172
|
-
}
|
|
12173
|
-
);
|
|
12174
|
-
}
|
|
12175
|
-
function CommandItem({
|
|
12176
|
-
className,
|
|
12177
|
-
...props
|
|
12178
|
-
}) {
|
|
12179
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12180
|
-
cmdk.Command.Item,
|
|
12181
|
-
{
|
|
12182
|
-
"data-slot": "command-item",
|
|
12183
|
-
className: cn(
|
|
12184
|
-
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
12185
|
-
className
|
|
12186
|
-
),
|
|
12187
|
-
...props
|
|
12188
|
-
}
|
|
12189
|
-
);
|
|
12190
|
-
}
|
|
12191
|
-
function CommandShortcut({
|
|
12192
|
-
className,
|
|
12193
|
-
...props
|
|
12194
|
-
}) {
|
|
12195
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12196
|
-
"span",
|
|
12197
|
-
{
|
|
12198
|
-
"data-slot": "command-shortcut",
|
|
12199
|
-
className: cn(
|
|
12200
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
12201
|
-
className
|
|
12202
|
-
),
|
|
12203
|
-
...props
|
|
12204
|
-
}
|
|
12205
|
-
);
|
|
12206
|
-
}
|
|
12207
12496
|
var ComboboxInput = class extends BaseInput {
|
|
12208
12497
|
render() {
|
|
12209
12498
|
const { input, form, isSubmitting } = this;
|
|
@@ -12741,6 +13030,61 @@ var FieldFileMultiUpload = ({ input, form, isSubmitting }) => {
|
|
|
12741
13030
|
);
|
|
12742
13031
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formField });
|
|
12743
13032
|
};
|
|
13033
|
+
var useKeyboardStore = zustand.create((set, get) => ({
|
|
13034
|
+
activeInput: null,
|
|
13035
|
+
inputs: {},
|
|
13036
|
+
isOpen: false,
|
|
13037
|
+
setIsOpen() {
|
|
13038
|
+
set({ isOpen: !get().isOpen });
|
|
13039
|
+
},
|
|
13040
|
+
registerInput: (id, initialValue = "") => set((state) => ({
|
|
13041
|
+
inputs: {
|
|
13042
|
+
...state.inputs,
|
|
13043
|
+
[id]: initialValue
|
|
13044
|
+
}
|
|
13045
|
+
})),
|
|
13046
|
+
unregisterInput: (id) => set((state) => {
|
|
13047
|
+
const newInputs = { ...state.inputs };
|
|
13048
|
+
delete newInputs[id];
|
|
13049
|
+
return { inputs: newInputs };
|
|
13050
|
+
}),
|
|
13051
|
+
focusInput: (id) => set({ activeInput: id }),
|
|
13052
|
+
write: (char) => set((state) => {
|
|
13053
|
+
if (!state.activeInput) return state;
|
|
13054
|
+
const current = state.inputs[state.activeInput] || "";
|
|
13055
|
+
return {
|
|
13056
|
+
inputs: {
|
|
13057
|
+
...state.inputs,
|
|
13058
|
+
[state.activeInput]: current + char
|
|
13059
|
+
}
|
|
13060
|
+
};
|
|
13061
|
+
}),
|
|
13062
|
+
backspace: () => set((state) => {
|
|
13063
|
+
if (!state.activeInput) return state;
|
|
13064
|
+
const current = state.inputs[state.activeInput] || "";
|
|
13065
|
+
return {
|
|
13066
|
+
inputs: {
|
|
13067
|
+
...state.inputs,
|
|
13068
|
+
[state.activeInput]: current.slice(0, -1)
|
|
13069
|
+
}
|
|
13070
|
+
};
|
|
13071
|
+
}),
|
|
13072
|
+
clear: () => set((state) => {
|
|
13073
|
+
if (!state.activeInput) return state;
|
|
13074
|
+
return {
|
|
13075
|
+
inputs: {
|
|
13076
|
+
...state.inputs,
|
|
13077
|
+
[state.activeInput]: ""
|
|
13078
|
+
}
|
|
13079
|
+
};
|
|
13080
|
+
}),
|
|
13081
|
+
setValue: (id, value) => set((state) => ({
|
|
13082
|
+
inputs: {
|
|
13083
|
+
...state.inputs,
|
|
13084
|
+
[id]: value
|
|
13085
|
+
}
|
|
13086
|
+
}))
|
|
13087
|
+
}));
|
|
12744
13088
|
var TextInputGroup = class extends BaseInput {
|
|
12745
13089
|
render() {
|
|
12746
13090
|
const { input, form, isSubmitting } = this;
|
|
@@ -12785,6 +13129,7 @@ var CustomInputGroup = ({
|
|
|
12785
13129
|
isValid,
|
|
12786
13130
|
autoCapitalize = "none"
|
|
12787
13131
|
}) => {
|
|
13132
|
+
const withKeyboard = input.withKeyboard;
|
|
12788
13133
|
const groupConfig = input.inputGroupConfig;
|
|
12789
13134
|
const infoTooltip = input?.infoTooltip;
|
|
12790
13135
|
const autoValidate = groupConfig?.autoValidIcons ?? input.zodType ? true : false;
|
|
@@ -12799,6 +13144,7 @@ var CustomInputGroup = ({
|
|
|
12799
13144
|
const isPasswordField = input.keyboardType === "password" /* PASSWORD */;
|
|
12800
13145
|
const isNumberField = input.keyboardType === "number" /* NUMBER */;
|
|
12801
13146
|
const showInputGroupAddons = iconsRight.length > 0 || textRight || autoValidate || infoTooltip || isPasswordField;
|
|
13147
|
+
const setIsOpen = useKeyboardStore((state) => state.setIsOpen);
|
|
12802
13148
|
const applyMask = (value2, mask) => {
|
|
12803
13149
|
if (!mask) return value2;
|
|
12804
13150
|
if (typeof mask === "string") {
|
|
@@ -12913,6 +13259,7 @@ var CustomInputGroup = ({
|
|
|
12913
13259
|
children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { size: 20 })
|
|
12914
13260
|
}
|
|
12915
13261
|
),
|
|
13262
|
+
withKeyboard && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "text-2xl", onClick: setIsOpen, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Keyboard, {}) }),
|
|
12916
13263
|
autoValidate && /* @__PURE__ */ jsxRuntime.jsx("div", { children: isSubmitting ? iconLoadingState : isValid ? iconValidState : iconInvalidState })
|
|
12917
13264
|
] })
|
|
12918
13265
|
] });
|
|
@@ -13338,94 +13685,36 @@ var FieldRepeater = ({ form, input, isSubmitting }) => {
|
|
|
13338
13685
|
}
|
|
13339
13686
|
);
|
|
13340
13687
|
};
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
})
|
|
13688
|
+
var RepeaterTabsInput = class extends BaseInput {
|
|
13689
|
+
render() {
|
|
13690
|
+
const { input, form, isSubmitting } = this;
|
|
13691
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldRepeaterTabs, { form, input, isSubmitting });
|
|
13692
|
+
}
|
|
13693
|
+
};
|
|
13694
|
+
var FieldRepeaterTabs = ({ form, input, isSubmitting }) => {
|
|
13695
|
+
const { control } = form;
|
|
13696
|
+
const { fields, append, remove } = reactHookForm.useFieldArray({
|
|
13697
|
+
control,
|
|
13698
|
+
name: input.name
|
|
13699
|
+
});
|
|
13700
|
+
const [activeTab, setActiveTab] = React3.useState(fields[0]?.id ?? "");
|
|
13701
|
+
const canAdd = !input.maxItems || fields.length < input.maxItems;
|
|
13702
|
+
const canRemove = fields.length > (input.minItems ?? 0);
|
|
13703
|
+
const handleAdd = () => {
|
|
13704
|
+
const newItem = { id: `tab-${Date.now()}` };
|
|
13705
|
+
append(newItem);
|
|
13706
|
+
setActiveTab(newItem.id);
|
|
13707
|
+
};
|
|
13708
|
+
const handleRemove = (index) => {
|
|
13709
|
+
const removedId = fields[index].id;
|
|
13710
|
+
remove(index);
|
|
13711
|
+
if (activeTab === removedId && fields.length > 1) {
|
|
13712
|
+
const nextTab = fields[index - 1] ?? fields[0];
|
|
13713
|
+
if (nextTab) setActiveTab(nextTab.id);
|
|
13714
|
+
}
|
|
13715
|
+
};
|
|
13345
13716
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13346
|
-
|
|
13347
|
-
{
|
|
13348
|
-
"data-slot": "tabs",
|
|
13349
|
-
className: cn("flex flex-col gap-2", className),
|
|
13350
|
-
...props
|
|
13351
|
-
}
|
|
13352
|
-
);
|
|
13353
|
-
}
|
|
13354
|
-
function TabsList({
|
|
13355
|
-
className,
|
|
13356
|
-
...props
|
|
13357
|
-
}) {
|
|
13358
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13359
|
-
TabsPrimitive__namespace.List,
|
|
13360
|
-
{
|
|
13361
|
-
"data-slot": "tabs-list",
|
|
13362
|
-
className: cn(
|
|
13363
|
-
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
13364
|
-
className
|
|
13365
|
-
),
|
|
13366
|
-
...props
|
|
13367
|
-
}
|
|
13368
|
-
);
|
|
13369
|
-
}
|
|
13370
|
-
function TabsTrigger({
|
|
13371
|
-
className,
|
|
13372
|
-
...props
|
|
13373
|
-
}) {
|
|
13374
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13375
|
-
TabsPrimitive__namespace.Trigger,
|
|
13376
|
-
{
|
|
13377
|
-
"data-slot": "tabs-trigger",
|
|
13378
|
-
className: cn(
|
|
13379
|
-
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
13380
|
-
className
|
|
13381
|
-
),
|
|
13382
|
-
...props
|
|
13383
|
-
}
|
|
13384
|
-
);
|
|
13385
|
-
}
|
|
13386
|
-
function TabsContent({
|
|
13387
|
-
className,
|
|
13388
|
-
...props
|
|
13389
|
-
}) {
|
|
13390
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13391
|
-
TabsPrimitive__namespace.Content,
|
|
13392
|
-
{
|
|
13393
|
-
"data-slot": "tabs-content",
|
|
13394
|
-
className: cn("flex-1 outline-none", className),
|
|
13395
|
-
...props
|
|
13396
|
-
}
|
|
13397
|
-
);
|
|
13398
|
-
}
|
|
13399
|
-
var RepeaterTabsInput = class extends BaseInput {
|
|
13400
|
-
render() {
|
|
13401
|
-
const { input, form, isSubmitting } = this;
|
|
13402
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FieldRepeaterTabs, { form, input, isSubmitting });
|
|
13403
|
-
}
|
|
13404
|
-
};
|
|
13405
|
-
var FieldRepeaterTabs = ({ form, input, isSubmitting }) => {
|
|
13406
|
-
const { control } = form;
|
|
13407
|
-
const { fields, append, remove } = reactHookForm.useFieldArray({
|
|
13408
|
-
control,
|
|
13409
|
-
name: input.name
|
|
13410
|
-
});
|
|
13411
|
-
const [activeTab, setActiveTab] = React3.useState(fields[0]?.id ?? "");
|
|
13412
|
-
const canAdd = !input.maxItems || fields.length < input.maxItems;
|
|
13413
|
-
const canRemove = fields.length > (input.minItems ?? 0);
|
|
13414
|
-
const handleAdd = () => {
|
|
13415
|
-
const newItem = { id: `tab-${Date.now()}` };
|
|
13416
|
-
append(newItem);
|
|
13417
|
-
setActiveTab(newItem.id);
|
|
13418
|
-
};
|
|
13419
|
-
const handleRemove = (index) => {
|
|
13420
|
-
const removedId = fields[index].id;
|
|
13421
|
-
remove(index);
|
|
13422
|
-
if (activeTab === removedId && fields.length > 1) {
|
|
13423
|
-
const nextTab = fields[index - 1] ?? fields[0];
|
|
13424
|
-
if (nextTab) setActiveTab(nextTab.id);
|
|
13425
|
-
}
|
|
13426
|
-
};
|
|
13427
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13428
|
-
FormField,
|
|
13717
|
+
FormField,
|
|
13429
13718
|
{
|
|
13430
13719
|
control,
|
|
13431
13720
|
name: input.name,
|
|
@@ -13682,62 +13971,6 @@ var FieldSimpleCheckList = ({ input, value, onChange, isSubmitting }) => {
|
|
|
13682
13971
|
] });
|
|
13683
13972
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formField });
|
|
13684
13973
|
};
|
|
13685
|
-
function Slider({
|
|
13686
|
-
className,
|
|
13687
|
-
defaultValue,
|
|
13688
|
-
value,
|
|
13689
|
-
min = 0,
|
|
13690
|
-
max = 100,
|
|
13691
|
-
...props
|
|
13692
|
-
}) {
|
|
13693
|
-
const _values = React3__namespace.useMemo(
|
|
13694
|
-
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
13695
|
-
[value, defaultValue, min, max]
|
|
13696
|
-
);
|
|
13697
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13698
|
-
SliderPrimitive__namespace.Root,
|
|
13699
|
-
{
|
|
13700
|
-
"data-slot": "slider",
|
|
13701
|
-
defaultValue,
|
|
13702
|
-
value,
|
|
13703
|
-
min,
|
|
13704
|
-
max,
|
|
13705
|
-
className: cn(
|
|
13706
|
-
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
13707
|
-
className
|
|
13708
|
-
),
|
|
13709
|
-
...props,
|
|
13710
|
-
children: [
|
|
13711
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13712
|
-
SliderPrimitive__namespace.Track,
|
|
13713
|
-
{
|
|
13714
|
-
"data-slot": "slider-track",
|
|
13715
|
-
className: cn(
|
|
13716
|
-
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
13717
|
-
),
|
|
13718
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13719
|
-
SliderPrimitive__namespace.Range,
|
|
13720
|
-
{
|
|
13721
|
-
"data-slot": "slider-range",
|
|
13722
|
-
className: cn(
|
|
13723
|
-
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
13724
|
-
)
|
|
13725
|
-
}
|
|
13726
|
-
)
|
|
13727
|
-
}
|
|
13728
|
-
),
|
|
13729
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13730
|
-
SliderPrimitive__namespace.Thumb,
|
|
13731
|
-
{
|
|
13732
|
-
"data-slot": "slider-thumb",
|
|
13733
|
-
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
13734
|
-
},
|
|
13735
|
-
index
|
|
13736
|
-
))
|
|
13737
|
-
]
|
|
13738
|
-
}
|
|
13739
|
-
);
|
|
13740
|
-
}
|
|
13741
13974
|
var SliderInput = class extends BaseInput {
|
|
13742
13975
|
render() {
|
|
13743
13976
|
const { input, form, isSubmitting } = this;
|
|
@@ -15000,106 +15233,706 @@ function LocationPickerComponent({
|
|
|
15000
15233
|
e.preventDefault();
|
|
15001
15234
|
handleSearch();
|
|
15002
15235
|
}
|
|
15003
|
-
}, [handleSearch]);
|
|
15004
|
-
const handleClear = React3.useCallback(() => {
|
|
15005
|
-
onChange(null);
|
|
15006
|
-
}, [onChange]);
|
|
15007
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-4 space-y-4", children: [
|
|
15008
|
-
showSearch && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
15009
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
15010
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
15011
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15012
|
-
Input,
|
|
15013
|
-
{
|
|
15014
|
-
value: searchQuery,
|
|
15015
|
-
onChange: (e) => setSearchQuery(e.target.value),
|
|
15016
|
-
onKeyDown: handleKeyDown,
|
|
15017
|
-
placeholder: "Buscar direcci\xF3n...",
|
|
15018
|
-
disabled: disabled || isSearching,
|
|
15019
|
-
className: "pl-10"
|
|
15020
|
-
}
|
|
15021
|
-
)
|
|
15022
|
-
] }),
|
|
15023
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15024
|
-
Button,
|
|
15025
|
-
{
|
|
15026
|
-
type: "button",
|
|
15027
|
-
onClick: handleSearch,
|
|
15028
|
-
disabled: disabled || isSearching || !searchQuery.trim(),
|
|
15029
|
-
variant: "secondary",
|
|
15030
|
-
children: isSearching ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4" })
|
|
15236
|
+
}, [handleSearch]);
|
|
15237
|
+
const handleClear = React3.useCallback(() => {
|
|
15238
|
+
onChange(null);
|
|
15239
|
+
}, [onChange]);
|
|
15240
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "p-4 space-y-4", children: [
|
|
15241
|
+
showSearch && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
15242
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
15243
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }),
|
|
15244
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15245
|
+
Input,
|
|
15246
|
+
{
|
|
15247
|
+
value: searchQuery,
|
|
15248
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
15249
|
+
onKeyDown: handleKeyDown,
|
|
15250
|
+
placeholder: "Buscar direcci\xF3n...",
|
|
15251
|
+
disabled: disabled || isSearching,
|
|
15252
|
+
className: "pl-10"
|
|
15253
|
+
}
|
|
15254
|
+
)
|
|
15255
|
+
] }),
|
|
15256
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15257
|
+
Button,
|
|
15258
|
+
{
|
|
15259
|
+
type: "button",
|
|
15260
|
+
onClick: handleSearch,
|
|
15261
|
+
disabled: disabled || isSearching || !searchQuery.trim(),
|
|
15262
|
+
variant: "secondary",
|
|
15263
|
+
children: isSearching ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "h-4 w-4" })
|
|
15264
|
+
}
|
|
15265
|
+
),
|
|
15266
|
+
showCurrentLocation && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15267
|
+
Button,
|
|
15268
|
+
{
|
|
15269
|
+
type: "button",
|
|
15270
|
+
onClick: handleCurrentLocation,
|
|
15271
|
+
disabled: disabled || isGettingLocation,
|
|
15272
|
+
variant: "secondary",
|
|
15273
|
+
title: "Usar ubicaci\xF3n actual",
|
|
15274
|
+
children: isGettingLocation ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Navigation, { className: "h-4 w-4" })
|
|
15275
|
+
}
|
|
15276
|
+
)
|
|
15277
|
+
] }),
|
|
15278
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(React3.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-gray-100 rounded-lg flex items-center justify-center", style: { height: `${height}px` }, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-8 w-8 animate-spin text-gray-400" }) }), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15279
|
+
MapComponent2,
|
|
15280
|
+
{
|
|
15281
|
+
center: [currentLocation.lat, currentLocation.lng],
|
|
15282
|
+
zoom: defaultZoom,
|
|
15283
|
+
height,
|
|
15284
|
+
marker: value ? [value.lat, value.lng] : null,
|
|
15285
|
+
onMapClick: handleMapClick,
|
|
15286
|
+
disabled
|
|
15287
|
+
}
|
|
15288
|
+
) }) }),
|
|
15289
|
+
value && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
15290
|
+
value.formattedAddress && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-sm", children: [
|
|
15291
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPin, { className: "h-4 w-4 text-gray-400 mt-0.5 flex-shrink-0" }),
|
|
15292
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700", children: value.formattedAddress })
|
|
15293
|
+
] }),
|
|
15294
|
+
showCoordinates && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-2 bg-gray-50 rounded-md", children: [
|
|
15295
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs font-mono text-gray-600", children: [
|
|
15296
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
15297
|
+
"Lat: ",
|
|
15298
|
+
value.lat.toFixed(6)
|
|
15299
|
+
] }),
|
|
15300
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "\u2022" }),
|
|
15301
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
15302
|
+
"Lng: ",
|
|
15303
|
+
value.lng.toFixed(6)
|
|
15304
|
+
] })
|
|
15305
|
+
] }),
|
|
15306
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15307
|
+
Button,
|
|
15308
|
+
{
|
|
15309
|
+
type: "button",
|
|
15310
|
+
size: "sm",
|
|
15311
|
+
variant: "ghost",
|
|
15312
|
+
onClick: handleCopyCoordinates,
|
|
15313
|
+
className: "h-6 px-2",
|
|
15314
|
+
children: copiedCoords ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3 w-3 text-green-500" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "h-3 w-3" })
|
|
15315
|
+
}
|
|
15316
|
+
)
|
|
15317
|
+
] })
|
|
15318
|
+
] }),
|
|
15319
|
+
value && !disabled && !required && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15320
|
+
Button,
|
|
15321
|
+
{
|
|
15322
|
+
type: "button",
|
|
15323
|
+
variant: "outline",
|
|
15324
|
+
size: "sm",
|
|
15325
|
+
onClick: handleClear,
|
|
15326
|
+
className: "w-full",
|
|
15327
|
+
children: [
|
|
15328
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4 mr-2" }),
|
|
15329
|
+
"Limpiar ubicaci\xF3n"
|
|
15330
|
+
]
|
|
15331
|
+
}
|
|
15332
|
+
),
|
|
15333
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: "\u{1F4A1} Haz click en el mapa para marcar una ubicaci\xF3n o busca una direcci\xF3n." })
|
|
15334
|
+
] });
|
|
15335
|
+
}
|
|
15336
|
+
var DateRangeInput = class extends BaseInput {
|
|
15337
|
+
render() {
|
|
15338
|
+
const { input, form, isSubmitting } = this;
|
|
15339
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldDateRangeInput, { input, form, isSubmitting });
|
|
15340
|
+
}
|
|
15341
|
+
};
|
|
15342
|
+
var FieldDateRangeInput = ({ form, input, isSubmitting }) => {
|
|
15343
|
+
const [isValid, setIsValid] = React3.useState(isValidField(input, form));
|
|
15344
|
+
const infoTooltip = input?.infoTooltip;
|
|
15345
|
+
const groupConfig = input.inputGroupConfig;
|
|
15346
|
+
const autoValidate = groupConfig?.autoValidIcons ?? input.zodType ? true : false;
|
|
15347
|
+
const iconValidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { style: { color: "#00bf3e" } });
|
|
15348
|
+
const iconInvalidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { style: { color: "#ff8080" } });
|
|
15349
|
+
const iconLoadingState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin", style: { color: "#1e90ff" } });
|
|
15350
|
+
const iconsRight = groupConfig?.iconsRight ?? [];
|
|
15351
|
+
groupConfig?.iconsLeft ?? [];
|
|
15352
|
+
groupConfig?.textLeft;
|
|
15353
|
+
const textRight = groupConfig?.textRight;
|
|
15354
|
+
const formField = /* @__PURE__ */ jsxRuntime.jsx(
|
|
15355
|
+
FormField,
|
|
15356
|
+
{
|
|
15357
|
+
control: form.control,
|
|
15358
|
+
name: input.name,
|
|
15359
|
+
render: ({ field }) => {
|
|
15360
|
+
setIsValid(isValidField(input, form));
|
|
15361
|
+
const [dateRange, setDateRange] = React3__namespace.useState(
|
|
15362
|
+
field.value ? {
|
|
15363
|
+
from: field.value.from ? new Date(field.value.from) : void 0,
|
|
15364
|
+
to: field.value.to ? new Date(field.value.to) : void 0
|
|
15365
|
+
} : void 0
|
|
15366
|
+
);
|
|
15367
|
+
React3__namespace.useEffect(() => {
|
|
15368
|
+
if (field.value && !dateRange) {
|
|
15369
|
+
setDateRange({
|
|
15370
|
+
from: field.value.from ? new Date(field.value.from) : void 0,
|
|
15371
|
+
to: field.value.to ? new Date(field.value.to) : void 0
|
|
15372
|
+
});
|
|
15373
|
+
setIsValid(isValidField(input, form));
|
|
15374
|
+
}
|
|
15375
|
+
}, [field.value]);
|
|
15376
|
+
const formatDateRange = (range) => {
|
|
15377
|
+
if (!range || !range.from) return input.placeHolder ?? "Seleccionar rango de fechas";
|
|
15378
|
+
if (range.to) {
|
|
15379
|
+
return `${dateFns.format(range.from, "LLL dd, y")} - ${dateFns.format(range.to, "LLL dd, y")}`;
|
|
15380
|
+
}
|
|
15381
|
+
return dateFns.format(range.from, "LLL dd, y");
|
|
15382
|
+
};
|
|
15383
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
|
|
15384
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
|
|
15385
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
15386
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className: "flex flex-row gap-1", children: [
|
|
15387
|
+
infoTooltip && /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
15388
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { size: 20 }) }),
|
|
15389
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: infoTooltip }) })
|
|
15390
|
+
] }),
|
|
15391
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15392
|
+
Button,
|
|
15393
|
+
{
|
|
15394
|
+
variant: "outline",
|
|
15395
|
+
type: "button",
|
|
15396
|
+
className: cn(
|
|
15397
|
+
"w-full justify-start text-left py-0.5 ",
|
|
15398
|
+
!dateRange && "text-muted-foreground"
|
|
15399
|
+
),
|
|
15400
|
+
children: [
|
|
15401
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 items-center gap-1 justify-start text-left ", children: [
|
|
15402
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, {}),
|
|
15403
|
+
formatDateRange(dateRange)
|
|
15404
|
+
] }),
|
|
15405
|
+
(iconsRight.length > 0 || textRight || autoValidate) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15406
|
+
textRight && /* @__PURE__ */ jsxRuntime.jsx(InputGroupText, { children: textRight }),
|
|
15407
|
+
iconsRight.map((IconComponent, index) => /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: 24, className: "w-6! h-6!" }, index)),
|
|
15408
|
+
autoValidate && /* @__PURE__ */ jsxRuntime.jsx("div", { children: isSubmitting ? iconLoadingState : isValid ? iconValidState : iconInvalidState })
|
|
15409
|
+
] })
|
|
15410
|
+
]
|
|
15411
|
+
}
|
|
15412
|
+
)
|
|
15413
|
+
] }) }) }),
|
|
15414
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start" })
|
|
15415
|
+
] }),
|
|
15416
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
|
|
15417
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
|
|
15418
|
+
] });
|
|
15419
|
+
}
|
|
15420
|
+
},
|
|
15421
|
+
input.name
|
|
15422
|
+
);
|
|
15423
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formField });
|
|
15424
|
+
};
|
|
15425
|
+
var countries = [
|
|
15426
|
+
{ name: "Afghanistan", code: "AF", flag: "\u{1F1E6}\u{1F1EB}" },
|
|
15427
|
+
{ name: "Albania", code: "AL", flag: "\u{1F1E6}\u{1F1F1}" },
|
|
15428
|
+
{ name: "Algeria", code: "DZ", flag: "\u{1F1E9}\u{1F1FF}" },
|
|
15429
|
+
{ name: "Argentina", code: "AR", flag: "\u{1F1E6}\u{1F1F7}" },
|
|
15430
|
+
{ name: "Australia", code: "AU", flag: "\u{1F1E6}\u{1F1FA}" },
|
|
15431
|
+
{ name: "Austria", code: "AT", flag: "\u{1F1E6}\u{1F1F9}" },
|
|
15432
|
+
{ name: "Bangladesh", code: "BD", flag: "\u{1F1E7}\u{1F1E9}" },
|
|
15433
|
+
{ name: "Belgium", code: "BE", flag: "\u{1F1E7}\u{1F1EA}" },
|
|
15434
|
+
{ name: "Brazil", code: "BR", flag: "\u{1F1E7}\u{1F1F7}" },
|
|
15435
|
+
{ name: "Canada", code: "CA", flag: "\u{1F1E8}\u{1F1E6}" },
|
|
15436
|
+
{ name: "Chile", code: "CL", flag: "\u{1F1E8}\u{1F1F1}" },
|
|
15437
|
+
{ name: "China", code: "CN", flag: "\u{1F1E8}\u{1F1F3}" },
|
|
15438
|
+
{ name: "Colombia", code: "CO", flag: "\u{1F1E8}\u{1F1F4}" },
|
|
15439
|
+
{ name: "Denmark", code: "DK", flag: "\u{1F1E9}\u{1F1F0}" },
|
|
15440
|
+
{ name: "Egypt", code: "EG", flag: "\u{1F1EA}\u{1F1EC}" },
|
|
15441
|
+
{ name: "Finland", code: "FI", flag: "\u{1F1EB}\u{1F1EE}" },
|
|
15442
|
+
{ name: "France", code: "FR", flag: "\u{1F1EB}\u{1F1F7}" },
|
|
15443
|
+
{ name: "Germany", code: "DE", flag: "\u{1F1E9}\u{1F1EA}" },
|
|
15444
|
+
{ name: "Greece", code: "GR", flag: "\u{1F1EC}\u{1F1F7}" },
|
|
15445
|
+
{ name: "India", code: "IN", flag: "\u{1F1EE}\u{1F1F3}" },
|
|
15446
|
+
{ name: "Indonesia", code: "ID", flag: "\u{1F1EE}\u{1F1E9}" },
|
|
15447
|
+
{ name: "Ireland", code: "IE", flag: "\u{1F1EE}\u{1F1EA}" },
|
|
15448
|
+
{ name: "Italy", code: "IT", flag: "\u{1F1EE}\u{1F1F9}" },
|
|
15449
|
+
{ name: "Japan", code: "JP", flag: "\u{1F1EF}\u{1F1F5}" },
|
|
15450
|
+
{ name: "Jordan", code: "JO", flag: "\u{1F1EF}\u{1F1F4}" },
|
|
15451
|
+
{ name: "Kenya", code: "KE", flag: "\u{1F1F0}\u{1F1EA}" },
|
|
15452
|
+
{ name: "South Korea", code: "KR", flag: "\u{1F1F0}\u{1F1F7}" },
|
|
15453
|
+
{ name: "Lebanon", code: "LB", flag: "\u{1F1F1}\u{1F1E7}" },
|
|
15454
|
+
{ name: "Malaysia", code: "MY", flag: "\u{1F1F2}\u{1F1FE}" },
|
|
15455
|
+
{ name: "Mexico", code: "MX", flag: "\u{1F1F2}\u{1F1FD}" },
|
|
15456
|
+
{ name: "Morocco", code: "MA", flag: "\u{1F1F2}\u{1F1E6}" },
|
|
15457
|
+
{ name: "Netherlands", code: "NL", flag: "\u{1F1F3}\u{1F1F1}" },
|
|
15458
|
+
{ name: "New Zealand", code: "NZ", flag: "\u{1F1F3}\u{1F1FF}" },
|
|
15459
|
+
{ name: "Norway", code: "NO", flag: "\u{1F1F3}\u{1F1F4}" },
|
|
15460
|
+
{ name: "Pakistan", code: "PK", flag: "\u{1F1F5}\u{1F1F0}" },
|
|
15461
|
+
{ name: "Peru", code: "PE", flag: "\u{1F1F5}\u{1F1EA}" },
|
|
15462
|
+
{ name: "Philippines", code: "PH", flag: "\u{1F1F5}\u{1F1ED}" },
|
|
15463
|
+
{ name: "Poland", code: "PL", flag: "\u{1F1F5}\u{1F1F1}" },
|
|
15464
|
+
{ name: "Portugal", code: "PT", flag: "\u{1F1F5}\u{1F1F9}" },
|
|
15465
|
+
{ name: "Romania", code: "RO", flag: "\u{1F1F7}\u{1F1F4}" },
|
|
15466
|
+
{ name: "Russia", code: "RU", flag: "\u{1F1F7}\u{1F1FA}" },
|
|
15467
|
+
{ name: "Saudi Arabia", code: "SA", flag: "\u{1F1F8}\u{1F1E6}" },
|
|
15468
|
+
{ name: "Singapore", code: "SG", flag: "\u{1F1F8}\u{1F1EC}" },
|
|
15469
|
+
{ name: "South Africa", code: "ZA", flag: "\u{1F1FF}\u{1F1E6}" },
|
|
15470
|
+
{ name: "Spain", code: "ES", flag: "\u{1F1EA}\u{1F1F8}" },
|
|
15471
|
+
{ name: "Sweden", code: "SE", flag: "\u{1F1F8}\u{1F1EA}" },
|
|
15472
|
+
{ name: "Switzerland", code: "CH", flag: "\u{1F1E8}\u{1F1ED}" },
|
|
15473
|
+
{ name: "Thailand", code: "TH", flag: "\u{1F1F9}\u{1F1ED}" },
|
|
15474
|
+
{ name: "Turkey", code: "TR", flag: "\u{1F1F9}\u{1F1F7}" },
|
|
15475
|
+
{ name: "Ukraine", code: "UA", flag: "\u{1F1FA}\u{1F1E6}" },
|
|
15476
|
+
{ name: "United Arab Emirates", code: "AE", flag: "\u{1F1E6}\u{1F1EA}" },
|
|
15477
|
+
{ name: "United Kingdom", code: "GB", flag: "\u{1F1EC}\u{1F1E7}" },
|
|
15478
|
+
{ name: "United States", code: "US", flag: "\u{1F1FA}\u{1F1F8}" },
|
|
15479
|
+
{ name: "Vietnam", code: "VN", flag: "\u{1F1FB}\u{1F1F3}" }
|
|
15480
|
+
];
|
|
15481
|
+
var CountrySelectInput = class extends BaseInput {
|
|
15482
|
+
render() {
|
|
15483
|
+
const { input, form, isSubmitting } = this;
|
|
15484
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldCountrySelectInput, { input, form, isSubmitting });
|
|
15485
|
+
}
|
|
15486
|
+
};
|
|
15487
|
+
var FieldCountrySelectInput = ({ form, input, isSubmitting }) => {
|
|
15488
|
+
const [isValid, setIsValid] = React3.useState(isValidField(input, form));
|
|
15489
|
+
const infoTooltip = input?.infoTooltip;
|
|
15490
|
+
const groupConfig = input.inputGroupConfig;
|
|
15491
|
+
const autoValidate = groupConfig?.autoValidIcons ?? input.zodType ? true : false;
|
|
15492
|
+
const iconValidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { style: { color: "#00bf3e" } });
|
|
15493
|
+
const iconInvalidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { style: { color: "#ff8080" } });
|
|
15494
|
+
const iconsRight = groupConfig?.iconsRight ?? [];
|
|
15495
|
+
groupConfig?.iconsLeft ?? [];
|
|
15496
|
+
groupConfig?.textLeft;
|
|
15497
|
+
const textRight = groupConfig?.textRight;
|
|
15498
|
+
const formField = /* @__PURE__ */ jsxRuntime.jsx(
|
|
15499
|
+
FormField,
|
|
15500
|
+
{
|
|
15501
|
+
control: form.control,
|
|
15502
|
+
name: input.name,
|
|
15503
|
+
render: ({ field }) => {
|
|
15504
|
+
setIsValid(isValidField(input, form));
|
|
15505
|
+
const [open, setOpen] = React3__namespace.useState(false);
|
|
15506
|
+
const [value, setValue] = React3__namespace.useState(field.value || "");
|
|
15507
|
+
const selectedCountry = countries.find((country) => country.code === value);
|
|
15508
|
+
const handleSelect = (countryCode) => {
|
|
15509
|
+
setValue(countryCode);
|
|
15510
|
+
setOpen(false);
|
|
15511
|
+
handleOnChage(countryCode, input, field);
|
|
15512
|
+
};
|
|
15513
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
|
|
15514
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
|
|
15515
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
15516
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className: "flex flex-row gap-1", children: [
|
|
15517
|
+
infoTooltip && /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
15518
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { size: 20 }) }),
|
|
15519
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: infoTooltip }) })
|
|
15520
|
+
] }),
|
|
15521
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15522
|
+
Button,
|
|
15523
|
+
{
|
|
15524
|
+
type: "button",
|
|
15525
|
+
variant: "outline",
|
|
15526
|
+
role: "combobox",
|
|
15527
|
+
"aria-expanded": open,
|
|
15528
|
+
className: "w-full justify-between",
|
|
15529
|
+
children: [
|
|
15530
|
+
selectedCountry ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
15531
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: selectedCountry.flag }),
|
|
15532
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: selectedCountry.name }),
|
|
15533
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
15534
|
+
"(",
|
|
15535
|
+
selectedCountry.code,
|
|
15536
|
+
")"
|
|
15537
|
+
] })
|
|
15538
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: input.placeHolder ?? "Select country..." }),
|
|
15539
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
15540
|
+
]
|
|
15541
|
+
}
|
|
15542
|
+
),
|
|
15543
|
+
(iconsRight.length > 0 || textRight || autoValidate) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15544
|
+
textRight && /* @__PURE__ */ jsxRuntime.jsx(InputGroupText, { children: textRight }),
|
|
15545
|
+
iconsRight.map((IconComponent, index) => /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: 24, className: "w-6! h-6!" }, index)),
|
|
15546
|
+
autoValidate && /* @__PURE__ */ jsxRuntime.jsx("div", { children: isValid ? iconValidState : iconInvalidState })
|
|
15547
|
+
] })
|
|
15548
|
+
] }) }) }),
|
|
15549
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-[400px] p-0", children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { children: [
|
|
15550
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: "Search countries..." }),
|
|
15551
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CommandList, { children: [
|
|
15552
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { children: "No country found." }),
|
|
15553
|
+
/* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { children: countries.map((country) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15554
|
+
CommandItem,
|
|
15555
|
+
{
|
|
15556
|
+
value: `${country.name} ${country.code}`,
|
|
15557
|
+
onSelect: () => handleSelect(country.code),
|
|
15558
|
+
children: [
|
|
15559
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15560
|
+
lucideReact.Check,
|
|
15561
|
+
{
|
|
15562
|
+
className: cn(
|
|
15563
|
+
"mr-2 h-4 w-4",
|
|
15564
|
+
value === country.code ? "opacity-100" : "opacity-0"
|
|
15565
|
+
)
|
|
15566
|
+
}
|
|
15567
|
+
),
|
|
15568
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2", children: country.flag }),
|
|
15569
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: country.name }),
|
|
15570
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto text-muted-foreground", children: [
|
|
15571
|
+
"(",
|
|
15572
|
+
country.code,
|
|
15573
|
+
")"
|
|
15574
|
+
] })
|
|
15575
|
+
]
|
|
15576
|
+
},
|
|
15577
|
+
country.code
|
|
15578
|
+
)) })
|
|
15579
|
+
] })
|
|
15580
|
+
] }) })
|
|
15581
|
+
] }),
|
|
15582
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
|
|
15583
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
|
|
15584
|
+
] });
|
|
15585
|
+
}
|
|
15586
|
+
},
|
|
15587
|
+
input.name
|
|
15588
|
+
);
|
|
15589
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formField });
|
|
15590
|
+
};
|
|
15591
|
+
var RangeInput = class extends BaseInput {
|
|
15592
|
+
render() {
|
|
15593
|
+
const { input, form, isSubmitting } = this;
|
|
15594
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldRange, { input, form, isSubmitting });
|
|
15595
|
+
}
|
|
15596
|
+
};
|
|
15597
|
+
var FieldRange = ({ input, form, isSubmitting }) => {
|
|
15598
|
+
const [isValid, setIsValid] = React3.useState(isValidField(input, form));
|
|
15599
|
+
const groupConfig = input.inputGroupConfig;
|
|
15600
|
+
const autoValidate = groupConfig?.autoValidIcons ?? input.zodType ? true : false;
|
|
15601
|
+
const iconValidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { style: { color: "#00bf3e" } });
|
|
15602
|
+
const iconInvalidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { style: { color: "#ff8080" } });
|
|
15603
|
+
const iconLoadingState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin", style: { color: "#1e90ff" } });
|
|
15604
|
+
const iconsRight = groupConfig?.iconsRight ?? [];
|
|
15605
|
+
const textRight = groupConfig?.textRight;
|
|
15606
|
+
const minValue = input.min ?? 0;
|
|
15607
|
+
const maxValue = input.max ?? 100;
|
|
15608
|
+
const step = input.step ?? 1;
|
|
15609
|
+
const initialValue = form.getValues(input.name) ?? input.value ?? [minValue, maxValue];
|
|
15610
|
+
const [value, setValue] = React3.useState(Array.isArray(initialValue) ? initialValue : [minValue, maxValue]);
|
|
15611
|
+
const handleChange = (val) => {
|
|
15612
|
+
setValue(val);
|
|
15613
|
+
({ min: val[0], max: val[1] });
|
|
15614
|
+
};
|
|
15615
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15616
|
+
FormField,
|
|
15617
|
+
{
|
|
15618
|
+
control: form.control,
|
|
15619
|
+
name: input.name,
|
|
15620
|
+
render: ({ field, fieldState }) => {
|
|
15621
|
+
setIsValid(isValidField(input, form));
|
|
15622
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { className: input.className, children: [
|
|
15623
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
|
|
15624
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
15625
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15626
|
+
Slider,
|
|
15627
|
+
{
|
|
15628
|
+
value,
|
|
15629
|
+
onValueChange: handleChange,
|
|
15630
|
+
max: maxValue,
|
|
15631
|
+
min: minValue,
|
|
15632
|
+
step,
|
|
15633
|
+
className: "w-full"
|
|
15634
|
+
}
|
|
15635
|
+
),
|
|
15636
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InputGroup, { className: "flex flex-row gap-1 justify-center", children: [
|
|
15637
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
15638
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Min:" }),
|
|
15639
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputGroupText, { className: "min-w-[60px] text-center", children: value[0] })
|
|
15640
|
+
] }),
|
|
15641
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
15642
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "Max:" }),
|
|
15643
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputGroupText, { className: "min-w-[60px] text-center", children: value[1] })
|
|
15644
|
+
] }),
|
|
15645
|
+
(iconsRight.length > 0 || textRight || autoValidate) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15646
|
+
textRight && /* @__PURE__ */ jsxRuntime.jsx(InputGroupText, { children: textRight }),
|
|
15647
|
+
iconsRight.map((IconComponent, index) => /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: 24, className: "w-6! h-6!" }, index)),
|
|
15648
|
+
autoValidate && /* @__PURE__ */ jsxRuntime.jsx("div", { children: isSubmitting ? iconLoadingState : isValid ? iconValidState : iconInvalidState })
|
|
15649
|
+
] })
|
|
15650
|
+
] })
|
|
15651
|
+
] }) }),
|
|
15652
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
|
|
15653
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
|
|
15654
|
+
] });
|
|
15655
|
+
}
|
|
15656
|
+
},
|
|
15657
|
+
input.name
|
|
15658
|
+
);
|
|
15659
|
+
};
|
|
15660
|
+
var FileUploadInput = class extends BaseInput {
|
|
15661
|
+
render() {
|
|
15662
|
+
const { input, form, isSubmitting } = this;
|
|
15663
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldFileUpload, { input, form, isSubmitting });
|
|
15664
|
+
}
|
|
15665
|
+
};
|
|
15666
|
+
var FieldFileUpload = ({ input, form, isSubmitting }) => {
|
|
15667
|
+
const inputRef = React3.useRef(null);
|
|
15668
|
+
const [file, setFile] = React3.useState(form.getValues(input.name) || null);
|
|
15669
|
+
const [dragOver, setDragOver] = React3.useState(false);
|
|
15670
|
+
const [uploading, setUploading] = React3.useState(false);
|
|
15671
|
+
const [uploadProgress, setUploadProgress] = React3.useState(0);
|
|
15672
|
+
const [previewUrl, setPreviewUrl] = React3.useState(null);
|
|
15673
|
+
const config = input.fileConfig;
|
|
15674
|
+
const {
|
|
15675
|
+
dragAndDrop = true,
|
|
15676
|
+
progressBar = true,
|
|
15677
|
+
uploadUrl,
|
|
15678
|
+
onUploadProgress,
|
|
15679
|
+
onUploadComplete,
|
|
15680
|
+
previewFormats = { image: true, video: false, audio: false, pdf: false },
|
|
15681
|
+
maxSize = 10 * 1024 * 1024,
|
|
15682
|
+
// 10MB default
|
|
15683
|
+
acceptedFormats = ["*"]
|
|
15684
|
+
} = config || {};
|
|
15685
|
+
const autoValidate = input.inputGroupConfig?.autoValidIcons;
|
|
15686
|
+
const iconValidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { style: { color: "#00bf3e" } });
|
|
15687
|
+
const iconInvalidState = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { style: { color: "#ff8080" } });
|
|
15688
|
+
const generatePreview = (fileData) => {
|
|
15689
|
+
const type = fileData.type;
|
|
15690
|
+
if (previewFormats.image && type.startsWith("image/")) {
|
|
15691
|
+
const reader = new FileReader();
|
|
15692
|
+
reader.onload = (e) => {
|
|
15693
|
+
setPreviewUrl(e.target?.result);
|
|
15694
|
+
};
|
|
15695
|
+
if (fileData.file) reader.readAsDataURL(fileData.file);
|
|
15696
|
+
} else if (previewFormats.video && type.startsWith("video/")) {
|
|
15697
|
+
const reader = new FileReader();
|
|
15698
|
+
reader.onload = (e) => {
|
|
15699
|
+
setPreviewUrl(e.target?.result);
|
|
15700
|
+
};
|
|
15701
|
+
if (fileData.file) reader.readAsDataURL(fileData.file);
|
|
15702
|
+
} else if (previewFormats.audio && type.startsWith("audio/")) {
|
|
15703
|
+
setPreviewUrl("audio");
|
|
15704
|
+
} else if (previewFormats.pdf && type === "application/pdf") {
|
|
15705
|
+
setPreviewUrl("pdf");
|
|
15706
|
+
}
|
|
15707
|
+
};
|
|
15708
|
+
const handleFileSelect = async (selectedFile) => {
|
|
15709
|
+
if (selectedFile.size > maxSize) {
|
|
15710
|
+
form.setError(input.name, {
|
|
15711
|
+
type: "manual",
|
|
15712
|
+
message: `File size exceeds ${(maxSize / 1024 / 1024).toFixed(0)}MB limit`
|
|
15713
|
+
});
|
|
15714
|
+
return;
|
|
15715
|
+
}
|
|
15716
|
+
const fileData = {
|
|
15717
|
+
name: selectedFile.name,
|
|
15718
|
+
size: selectedFile.size,
|
|
15719
|
+
type: selectedFile.type,
|
|
15720
|
+
lastModified: selectedFile.lastModified,
|
|
15721
|
+
file: selectedFile,
|
|
15722
|
+
uploadProgress: 0
|
|
15723
|
+
};
|
|
15724
|
+
setFile(fileData);
|
|
15725
|
+
form.setValue(input.name, fileData);
|
|
15726
|
+
generatePreview(fileData);
|
|
15727
|
+
if (uploadUrl) {
|
|
15728
|
+
await handleUpload(fileData);
|
|
15729
|
+
}
|
|
15730
|
+
};
|
|
15731
|
+
const handleUpload = async (fileData) => {
|
|
15732
|
+
if (!uploadUrl || !fileData.file) return;
|
|
15733
|
+
setUploading(true);
|
|
15734
|
+
setUploadProgress(0);
|
|
15735
|
+
try {
|
|
15736
|
+
const formData = new FormData();
|
|
15737
|
+
formData.append("file", fileData.file);
|
|
15738
|
+
const xhr = new XMLHttpRequest();
|
|
15739
|
+
xhr.upload.addEventListener("progress", (e) => {
|
|
15740
|
+
if (e.lengthComputable) {
|
|
15741
|
+
const percentComplete = e.loaded / e.total * 100;
|
|
15742
|
+
setUploadProgress(percentComplete);
|
|
15743
|
+
onUploadProgress?.(percentComplete);
|
|
15031
15744
|
}
|
|
15032
|
-
)
|
|
15033
|
-
|
|
15034
|
-
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15745
|
+
});
|
|
15746
|
+
xhr.addEventListener("load", () => {
|
|
15747
|
+
if (xhr.status === 200) {
|
|
15748
|
+
try {
|
|
15749
|
+
const response = JSON.parse(xhr.responseText);
|
|
15750
|
+
fileData.uploadedUrl = response.url || response.data?.url;
|
|
15751
|
+
fileData.uploadProgress = 100;
|
|
15752
|
+
setUploadProgress(100);
|
|
15753
|
+
setFile({ ...fileData });
|
|
15754
|
+
form.setValue(input.name, fileData);
|
|
15755
|
+
onUploadComplete?.(response);
|
|
15756
|
+
} catch (e) {
|
|
15757
|
+
console.error("Failed to parse upload response", e);
|
|
15758
|
+
}
|
|
15042
15759
|
}
|
|
15043
|
-
)
|
|
15044
|
-
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
15760
|
+
});
|
|
15761
|
+
xhr.addEventListener("error", () => {
|
|
15762
|
+
form.setError(input.name, {
|
|
15763
|
+
type: "manual",
|
|
15764
|
+
message: "Upload failed. Please try again."
|
|
15765
|
+
});
|
|
15766
|
+
setUploading(false);
|
|
15767
|
+
});
|
|
15768
|
+
xhr.open("POST", uploadUrl);
|
|
15769
|
+
xhr.send(formData);
|
|
15770
|
+
} catch (error) {
|
|
15771
|
+
form.setError(input.name, {
|
|
15772
|
+
type: "manual",
|
|
15773
|
+
message: "Upload error. Please try again."
|
|
15774
|
+
});
|
|
15775
|
+
setUploading(false);
|
|
15776
|
+
}
|
|
15777
|
+
};
|
|
15778
|
+
const handleInputChange = (event) => {
|
|
15779
|
+
const selectedFile = event.target.files?.[0];
|
|
15780
|
+
if (selectedFile) {
|
|
15781
|
+
handleFileSelect(selectedFile);
|
|
15782
|
+
}
|
|
15783
|
+
};
|
|
15784
|
+
const handleDrop = (event) => {
|
|
15785
|
+
if (!dragAndDrop) return;
|
|
15786
|
+
event.preventDefault();
|
|
15787
|
+
setDragOver(false);
|
|
15788
|
+
const droppedFile = event.dataTransfer.files?.[0];
|
|
15789
|
+
if (droppedFile) {
|
|
15790
|
+
handleFileSelect(droppedFile);
|
|
15791
|
+
}
|
|
15792
|
+
};
|
|
15793
|
+
const handleDragOver = (event) => {
|
|
15794
|
+
if (!dragAndDrop) return;
|
|
15795
|
+
event.preventDefault();
|
|
15796
|
+
setDragOver(true);
|
|
15797
|
+
};
|
|
15798
|
+
const handleDragLeave = () => {
|
|
15799
|
+
setDragOver(false);
|
|
15800
|
+
};
|
|
15801
|
+
const handleRemove = () => {
|
|
15802
|
+
setFile(null);
|
|
15803
|
+
setPreviewUrl(null);
|
|
15804
|
+
setUploadProgress(0);
|
|
15805
|
+
form.setValue(input.name, null);
|
|
15806
|
+
if (inputRef.current) {
|
|
15807
|
+
inputRef.current.value = "";
|
|
15808
|
+
}
|
|
15809
|
+
};
|
|
15810
|
+
const getFileIcon = () => {
|
|
15811
|
+
if (!file) return null;
|
|
15812
|
+
const type = file.type;
|
|
15813
|
+
if (type.startsWith("image/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "w-8 h-8" });
|
|
15814
|
+
if (type.startsWith("video/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Video, { className: "w-8 h-8" });
|
|
15815
|
+
if (type.startsWith("audio/")) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Music, { className: "w-8 h-8" });
|
|
15816
|
+
if (type === "application/pdf") return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "w-8 h-8" });
|
|
15817
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.File, { className: "w-8 h-8" });
|
|
15818
|
+
};
|
|
15819
|
+
const formatFileSize = (bytes) => {
|
|
15820
|
+
if (bytes === 0) return "0 Bytes";
|
|
15821
|
+
const k = 1024;
|
|
15822
|
+
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
15823
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
15824
|
+
return Math.round(bytes / Math.pow(k, i) * 100) / 100 + " " + sizes[i];
|
|
15825
|
+
};
|
|
15826
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15827
|
+
FormField,
|
|
15828
|
+
{
|
|
15829
|
+
control: form.control,
|
|
15830
|
+
name: input.name,
|
|
15831
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
|
|
15832
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FormLabel, { htmlFor: input.name, children: [
|
|
15833
|
+
input.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-500 mr-1", children: "*" }),
|
|
15834
|
+
input.label
|
|
15072
15835
|
] }),
|
|
15073
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15836
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
15837
|
+
!file || !file.uploadedUrl ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15838
|
+
"div",
|
|
15839
|
+
{
|
|
15840
|
+
onDrop: handleDrop,
|
|
15841
|
+
onDragOver: handleDragOver,
|
|
15842
|
+
onDragLeave: handleDragLeave,
|
|
15843
|
+
className: cn(
|
|
15844
|
+
"relative border-2 border-dashed rounded-lg p-8 transition-colors",
|
|
15845
|
+
dragAndDrop ? "cursor-pointer" : "",
|
|
15846
|
+
dragOver ? "border-blue-500 bg-blue-50" : "border-gray-300 hover:border-gray-400",
|
|
15847
|
+
uploading ? "opacity-50 pointer-events-none" : ""
|
|
15848
|
+
),
|
|
15849
|
+
children: [
|
|
15850
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15851
|
+
"input",
|
|
15852
|
+
{
|
|
15853
|
+
ref: inputRef,
|
|
15854
|
+
type: "file",
|
|
15855
|
+
onChange: handleInputChange,
|
|
15856
|
+
className: "hidden",
|
|
15857
|
+
id: input.name,
|
|
15858
|
+
disabled: uploading || isSubmitting,
|
|
15859
|
+
accept: acceptedFormats.join(",")
|
|
15860
|
+
}
|
|
15861
|
+
),
|
|
15862
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center justify-center gap-3", children: uploading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15863
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-8 h-8 animate-spin text-blue-500" }),
|
|
15864
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600", children: "Uploading..." })
|
|
15865
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15866
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "w-8 h-8 text-gray-400" }),
|
|
15867
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
15868
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-900", children: dragAndDrop ? "Drag and drop your file here, or click to select" : "Click to select a file" }),
|
|
15869
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-gray-500 mt-1", children: [
|
|
15870
|
+
"Max size: ",
|
|
15871
|
+
formatFileSize(maxSize)
|
|
15872
|
+
] })
|
|
15873
|
+
] }),
|
|
15874
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15875
|
+
"button",
|
|
15876
|
+
{
|
|
15877
|
+
type: "button",
|
|
15878
|
+
onClick: () => inputRef.current?.click(),
|
|
15879
|
+
className: "mt-2 px-4 py-2 bg-blue-500 text-white text-sm rounded-md hover:bg-blue-600 transition-colors",
|
|
15880
|
+
children: "Select File"
|
|
15881
|
+
}
|
|
15882
|
+
)
|
|
15883
|
+
] }) })
|
|
15884
|
+
]
|
|
15885
|
+
}
|
|
15886
|
+
) : null,
|
|
15887
|
+
file && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border rounded-lg p-4 bg-gray-50", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
15888
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: previewUrl && previewUrl !== "audio" && previewUrl !== "pdf" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15889
|
+
"img",
|
|
15890
|
+
{
|
|
15891
|
+
src: previewUrl,
|
|
15892
|
+
alt: "preview",
|
|
15893
|
+
className: "w-16 h-16 object-cover rounded-md"
|
|
15894
|
+
}
|
|
15895
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 bg-gray-200 rounded-md flex items-center justify-center text-gray-400", children: getFileIcon() }) }),
|
|
15896
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
15897
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-gray-900 truncate", children: file.name }),
|
|
15898
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500 mt-1", children: formatFileSize(file.size) }),
|
|
15899
|
+
progressBar && file.uploadProgress !== void 0 && file.uploadProgress < 100 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", children: [
|
|
15900
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-gray-200 rounded-full h-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15901
|
+
"div",
|
|
15902
|
+
{
|
|
15903
|
+
className: "bg-blue-500 h-2 rounded-full transition-all duration-300",
|
|
15904
|
+
style: { width: `${file.uploadProgress}%` }
|
|
15905
|
+
}
|
|
15906
|
+
) }),
|
|
15907
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-gray-500 mt-1", children: [
|
|
15908
|
+
Math.round(file.uploadProgress),
|
|
15909
|
+
"% uploaded"
|
|
15910
|
+
] })
|
|
15911
|
+
] }),
|
|
15912
|
+
file.uploadedUrl && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-2", children: [
|
|
15913
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { className: "w-4 h-4 text-green-500" }),
|
|
15914
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-green-600", children: "Upload complete" })
|
|
15915
|
+
] })
|
|
15916
|
+
] }),
|
|
15917
|
+
!uploading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15918
|
+
"button",
|
|
15919
|
+
{
|
|
15920
|
+
type: "button",
|
|
15921
|
+
onClick: handleRemove,
|
|
15922
|
+
className: "shrink-0 p-1 text-gray-400 hover:text-gray-600 rounded-md hover:bg-gray-200 transition-colors",
|
|
15923
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-5 h-5" })
|
|
15924
|
+
}
|
|
15925
|
+
)
|
|
15926
|
+
] }) }),
|
|
15927
|
+
autoValidate && form.formState.errors[input.name] && iconInvalidState,
|
|
15928
|
+
autoValidate && !form.formState.errors[input.name] && file && iconValidState
|
|
15929
|
+
] }) }),
|
|
15930
|
+
input.description && /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
|
|
15931
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
|
|
15084
15932
|
] })
|
|
15085
|
-
|
|
15086
|
-
|
|
15087
|
-
|
|
15088
|
-
{
|
|
15089
|
-
type: "button",
|
|
15090
|
-
variant: "outline",
|
|
15091
|
-
size: "sm",
|
|
15092
|
-
onClick: handleClear,
|
|
15093
|
-
className: "w-full",
|
|
15094
|
-
children: [
|
|
15095
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4 mr-2" }),
|
|
15096
|
-
"Limpiar ubicaci\xF3n"
|
|
15097
|
-
]
|
|
15098
|
-
}
|
|
15099
|
-
),
|
|
15100
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: "\u{1F4A1} Haz click en el mapa para marcar una ubicaci\xF3n o busca una direcci\xF3n." })
|
|
15101
|
-
] });
|
|
15102
|
-
}
|
|
15933
|
+
}
|
|
15934
|
+
);
|
|
15935
|
+
};
|
|
15103
15936
|
var inputMap = {
|
|
15104
15937
|
["text_group" /* TEXT_GROUP */]: TextInputGroup,
|
|
15105
15938
|
["text" /* TEXT */]: TextInput,
|
|
@@ -15138,8 +15971,13 @@ var inputMap = {
|
|
|
15138
15971
|
// ✨ New input types (v1.36.0)
|
|
15139
15972
|
["email" /* EMAIL */]: EmailInput,
|
|
15140
15973
|
["search" /* SEARCH */]: TextInput,
|
|
15141
|
-
//
|
|
15974
|
+
// SearchInput component is currently a function component
|
|
15142
15975
|
["location_picker" /* LOCATION_PICKER */]: LocationPickerInput,
|
|
15976
|
+
["date_range" /* DATE_RANGE */]: DateRangeInput,
|
|
15977
|
+
["country_select" /* COUNTRY_SELECT */]: CountrySelectInput,
|
|
15978
|
+
["range" /* RANGE */]: RangeInput,
|
|
15979
|
+
// ✨ New input types (v1.37.0)
|
|
15980
|
+
["file_upload" /* FILE_UPLOAD */]: FileUploadInput,
|
|
15143
15981
|
//ToDos: ============================================================
|
|
15144
15982
|
["slider" /* SLIDER */]: SliderInput,
|
|
15145
15983
|
//ToDo: // PENDIENTE ... VISUALMENTE NO SE VE BIEN.!!!
|
|
@@ -15479,61 +16317,6 @@ var FormWrapper = ({ form, handleSubmit, children, readOnly, debug, isWrapInWiza
|
|
|
15479
16317
|
}
|
|
15480
16318
|
) });
|
|
15481
16319
|
};
|
|
15482
|
-
function Stepper({ steps, currentStep, clickable = false, onStepClick }) {
|
|
15483
|
-
const handleStepClick = (stepNumber) => {
|
|
15484
|
-
if (clickable && onStepClick) {
|
|
15485
|
-
onStepClick(stepNumber);
|
|
15486
|
-
}
|
|
15487
|
-
};
|
|
15488
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-4 items-center justify-around", children: steps.map((step, index) => {
|
|
15489
|
-
const stepNumber = index + 1;
|
|
15490
|
-
const isCompleted = stepNumber < currentStep;
|
|
15491
|
-
const isCurrent = stepNumber === currentStep;
|
|
15492
|
-
const isUpcoming = stepNumber > currentStep;
|
|
15493
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 items-center", children: [
|
|
15494
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
15495
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15496
|
-
"div",
|
|
15497
|
-
{
|
|
15498
|
-
onClick: () => handleStepClick(stepNumber),
|
|
15499
|
-
className: cn(
|
|
15500
|
-
"flex size-10 items-center shadow-lg justify-center rounded-full border-2 transition-all duration-300",
|
|
15501
|
-
isCompleted && "border-primary bg-primary text-primary-foreground",
|
|
15502
|
-
isCurrent && "border-primary bg-background text-primary scale-110",
|
|
15503
|
-
isUpcoming && "border-muted-foreground/60 bg-background border-b text-muted-foreground",
|
|
15504
|
-
clickable && "cursor-pointer hover:scale-125 hover:shadow-xl",
|
|
15505
|
-
!clickable && "cursor-default"
|
|
15506
|
-
),
|
|
15507
|
-
children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: stepNumber })
|
|
15508
|
-
}
|
|
15509
|
-
),
|
|
15510
|
-
step.title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 text-center", children: [
|
|
15511
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15512
|
-
"p",
|
|
15513
|
-
{
|
|
15514
|
-
className: cn(
|
|
15515
|
-
"text-sm font-medium transition-colors",
|
|
15516
|
-
(isCompleted || isCurrent) && "text-foreground",
|
|
15517
|
-
isUpcoming && "text-muted-foreground"
|
|
15518
|
-
),
|
|
15519
|
-
children: step.title
|
|
15520
|
-
}
|
|
15521
|
-
),
|
|
15522
|
-
step.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground max-w-[120px]", children: step.description })
|
|
15523
|
-
] })
|
|
15524
|
-
] }),
|
|
15525
|
-
index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-2 flex-1 mb-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15526
|
-
"div",
|
|
15527
|
-
{
|
|
15528
|
-
className: cn(
|
|
15529
|
-
"h-0.5 w-full transition-all duration-300",
|
|
15530
|
-
stepNumber < currentStep ? "bg-primary" : "bg-muted-foreground/30"
|
|
15531
|
-
)
|
|
15532
|
-
}
|
|
15533
|
-
) })
|
|
15534
|
-
] }, index);
|
|
15535
|
-
}) }) });
|
|
15536
|
-
}
|
|
15537
16320
|
var WizardForm = ({
|
|
15538
16321
|
fields,
|
|
15539
16322
|
record,
|
|
@@ -15756,6 +16539,18 @@ var InputList = ({ handleAddInput, inputsTypes }) => {
|
|
|
15756
16539
|
);
|
|
15757
16540
|
}) });
|
|
15758
16541
|
};
|
|
16542
|
+
var CustomSheet = ({ title = "", children, childrenHeader, isOpen, className, side = "bottom" }) => {
|
|
16543
|
+
const setIsOpen = useKeyboardStore((state) => state.setIsOpen);
|
|
16544
|
+
const storeIsOpen = useKeyboardStore((state) => state.isOpen);
|
|
16545
|
+
const controlledIsOpen = typeof isOpen === "boolean" ? isOpen : storeIsOpen;
|
|
16546
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Sheet, { open: controlledIsOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side, children: [
|
|
16547
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { children: [
|
|
16548
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: title }),
|
|
16549
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: childrenHeader })
|
|
16550
|
+
] }),
|
|
16551
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetFooter, { children })
|
|
16552
|
+
] }) });
|
|
16553
|
+
};
|
|
15759
16554
|
var GenericFilter = ({
|
|
15760
16555
|
filters = [],
|
|
15761
16556
|
pagination,
|
|
@@ -16014,6 +16809,7 @@ exports.CommandShortcut = CommandShortcut;
|
|
|
16014
16809
|
exports.CurrencyInput = CurrencyInput;
|
|
16015
16810
|
exports.CustomAlert = CustomAlert;
|
|
16016
16811
|
exports.CustomInputGroup = CustomInputGroup;
|
|
16812
|
+
exports.CustomSheet = CustomSheet;
|
|
16017
16813
|
exports.DateInput = DateInput;
|
|
16018
16814
|
exports.DateTimeInput = DateTimeInput;
|
|
16019
16815
|
exports.Dialog = Dialog;
|