shadcn-zod-formkit 3.3.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/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 TabsPrimitive = require('@radix-ui/react-tabs');
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 SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
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 create = Browser.vml ? vmlCreate : svgCreate;
8757
+ var create2 = Browser.vml ? vmlCreate : svgCreate;
8756
8758
  var SVG = Renderer.extend({
8757
8759
  _initContainer: function() {
8758
- this._container = create("svg");
8760
+ this._container = create2("svg");
8759
8761
  this._container.setAttribute("pointer-events", "none");
8760
- this._rootGroup = create("g");
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 = create("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 = 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 Keyboard = Handler.extend({
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", 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 = Keyboard;
9568
+ Map2.Keyboard = Keyboard2;
9567
9569
  Map2.ScrollWheelZoom = ScrollWheelZoom;
9568
9570
  Map2.TapHold = TapHold;
9569
9571
  Map2.TouchZoom = TouchZoom;
@@ -10138,6 +10140,91 @@ function Badge({
10138
10140
  }
10139
10141
  );
10140
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
+ }
10141
10228
  var buttonVariants = classVarianceAuthority.cva(
10142
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",
10143
10230
  {
@@ -10657,153 +10744,287 @@ function DialogDescription({
10657
10744
  }
10658
10745
  );
10659
10746
  }
10660
- function Label({
10747
+ function Command({
10661
10748
  className,
10662
10749
  ...props
10663
10750
  }) {
10664
10751
  return /* @__PURE__ */ jsxRuntime.jsx(
10665
- LabelPrimitive__namespace.Root,
10752
+ cmdk.Command,
10666
10753
  {
10667
- "data-slot": "label",
10754
+ "data-slot": "command",
10668
10755
  className: cn(
10669
- "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",
10756
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
10670
10757
  className
10671
10758
  ),
10672
10759
  ...props
10673
10760
  }
10674
10761
  );
10675
10762
  }
10676
- function Separator({
10763
+ function CommandDialog({
10764
+ title = "Command Palette",
10765
+ description = "Search for a command to run...",
10766
+ children,
10677
10767
  className,
10678
- orientation: orientation2 = "horizontal",
10679
- decorative = true,
10768
+ showCloseButton = true,
10680
10769
  ...props
10681
10770
  }) {
10682
- return /* @__PURE__ */ jsxRuntime.jsx(
10683
- SeparatorPrimitive__namespace.Root,
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",
10684
10792
  {
10685
- "data-slot": "separator",
10686
- decorative,
10687
- orientation: orientation2,
10688
- className: cn(
10689
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
10690
- className
10691
- ),
10692
- ...props
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
+ ]
10693
10809
  }
10694
10810
  );
10695
10811
  }
10696
- function FieldSet({ className, ...props }) {
10812
+ function CommandList({
10813
+ className,
10814
+ ...props
10815
+ }) {
10697
10816
  return /* @__PURE__ */ jsxRuntime.jsx(
10698
- "fieldset",
10817
+ cmdk.Command.List,
10699
10818
  {
10700
- "data-slot": "field-set",
10819
+ "data-slot": "command-list",
10701
10820
  className: cn(
10702
- "flex flex-col gap-6",
10703
- "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",
10704
10822
  className
10705
10823
  ),
10706
10824
  ...props
10707
10825
  }
10708
10826
  );
10709
10827
  }
10710
- function FieldLegend({
10711
- className,
10712
- variant = "legend",
10828
+ function CommandEmpty({
10713
10829
  ...props
10714
10830
  }) {
10715
10831
  return /* @__PURE__ */ jsxRuntime.jsx(
10716
- "legend",
10832
+ cmdk.Command.Empty,
10717
10833
  {
10718
- "data-slot": "field-legend",
10719
- "data-variant": variant,
10720
- className: cn(
10721
- "mb-3 font-medium",
10722
- "data-[variant=legend]:text-base",
10723
- "data-[variant=label]:text-sm",
10724
- className
10725
- ),
10834
+ "data-slot": "command-empty",
10835
+ className: "py-6 text-center text-sm",
10726
10836
  ...props
10727
10837
  }
10728
10838
  );
10729
10839
  }
10730
- function FieldGroup({ className, ...props }) {
10840
+ function CommandGroup({
10841
+ className,
10842
+ ...props
10843
+ }) {
10731
10844
  return /* @__PURE__ */ jsxRuntime.jsx(
10732
- "div",
10845
+ cmdk.Command.Group,
10733
10846
  {
10734
- "data-slot": "field-group",
10847
+ "data-slot": "command-group",
10735
10848
  className: cn(
10736
- "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",
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",
10737
10850
  className
10738
10851
  ),
10739
10852
  ...props
10740
10853
  }
10741
10854
  );
10742
10855
  }
10743
- var fieldVariants = classVarianceAuthority.cva(
10744
- "group/field flex w-full gap-3 data-[invalid=true]:text-destructive",
10745
- {
10746
- variants: {
10747
- orientation: {
10748
- vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
10749
- horizontal: [
10750
- "flex-row items-center",
10751
- "[&>[data-slot=field-label]]:flex-auto",
10752
- "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
10753
- ],
10754
- responsive: [
10755
- "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
10756
- "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
10757
- "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
10758
- ]
10759
- }
10760
- },
10761
- defaultVariants: {
10762
- orientation: "vertical"
10763
- }
10764
- }
10765
- );
10766
- function Field({
10856
+ function CommandSeparator({
10767
10857
  className,
10768
- orientation: orientation2 = "vertical",
10769
10858
  ...props
10770
10859
  }) {
10771
10860
  return /* @__PURE__ */ jsxRuntime.jsx(
10772
- "div",
10861
+ cmdk.Command.Separator,
10773
10862
  {
10774
- role: "group",
10775
- "data-slot": "field",
10776
- "data-orientation": orientation2,
10777
- className: cn(fieldVariants({ orientation: orientation2 }), className),
10863
+ "data-slot": "command-separator",
10864
+ className: cn("bg-border -mx-1 h-px", className),
10778
10865
  ...props
10779
10866
  }
10780
10867
  );
10781
10868
  }
10782
- function FieldContent({ className, ...props }) {
10869
+ function CommandItem({
10870
+ className,
10871
+ ...props
10872
+ }) {
10783
10873
  return /* @__PURE__ */ jsxRuntime.jsx(
10784
- "div",
10874
+ cmdk.Command.Item,
10785
10875
  {
10786
- "data-slot": "field-content",
10876
+ "data-slot": "command-item",
10787
10877
  className: cn(
10788
- "group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
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",
10789
10879
  className
10790
10880
  ),
10791
10881
  ...props
10792
10882
  }
10793
10883
  );
10794
10884
  }
10795
- function FieldLabel({
10885
+ function CommandShortcut({
10796
10886
  className,
10797
10887
  ...props
10798
10888
  }) {
10799
10889
  return /* @__PURE__ */ jsxRuntime.jsx(
10800
- Label,
10890
+ "span",
10801
10891
  {
10802
- "data-slot": "field-label",
10892
+ "data-slot": "command-shortcut",
10803
10893
  className: cn(
10804
- "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
10805
- "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",
10806
- "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
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",
10807
11028
  className
10808
11029
  ),
10809
11030
  ...props
@@ -11510,93 +11731,376 @@ function SelectScrollDownButton({
11510
11731
  }
11511
11732
  );
11512
11733
  }
11513
- var Toaster = ({ ...props }) => {
11514
- const { theme = "system" } = nextThemes.useTheme();
11515
- return /* @__PURE__ */ jsxRuntime.jsx(
11516
- sonner.Toaster,
11517
- {
11518
- theme,
11519
- className: "toaster group",
11520
- style: {
11521
- "--normal-bg": "var(--popover)",
11522
- "--normal-text": "var(--popover-foreground)",
11523
- "--normal-border": "var(--border)"
11524
- },
11525
- ...props
11526
- }
11527
- );
11528
- };
11529
- 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({
11530
11743
  className,
11531
11744
  ...props
11532
11745
  }) {
11533
11746
  return /* @__PURE__ */ jsxRuntime.jsx(
11534
- SwitchPrimitive__namespace.Root,
11747
+ radixUi.Dialog.Overlay,
11535
11748
  {
11536
- "data-slot": "switch",
11749
+ "data-slot": "sheet-overlay",
11537
11750
  className: cn(
11538
- "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",
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",
11539
11752
  className
11540
11753
  ),
11541
- ...props,
11542
- children: /* @__PURE__ */ jsxRuntime.jsx(
11543
- SwitchPrimitive__namespace.Thumb,
11544
- {
11545
- "data-slot": "switch-thumb",
11546
- className: cn(
11547
- "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"
11548
- )
11549
- }
11550
- )
11754
+ ...props
11551
11755
  }
11552
11756
  );
11553
11757
  }
11554
- function TooltipProvider({
11555
- delayDuration = 0,
11758
+ function SheetContent({
11759
+ className,
11760
+ children,
11761
+ side = "right",
11762
+ showCloseButton = true,
11556
11763
  ...props
11557
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 }) {
11558
11800
  return /* @__PURE__ */ jsxRuntime.jsx(
11559
- TooltipPrimitive__namespace.Provider,
11801
+ "div",
11560
11802
  {
11561
- "data-slot": "tooltip-provider",
11562
- delayDuration,
11803
+ "data-slot": "sheet-header",
11804
+ className: cn("flex flex-col gap-0.5 p-4", className),
11563
11805
  ...props
11564
11806
  }
11565
11807
  );
11566
11808
  }
11567
- function Tooltip({
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,
11568
11821
  ...props
11569
11822
  }) {
11570
- return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
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
+ );
11571
11834
  }
11572
- function TooltipTrigger({
11835
+ function SheetDescription({
11836
+ className,
11573
11837
  ...props
11574
11838
  }) {
11575
- return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { "data-slot": "tooltip-trigger", ...props });
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
+ );
11576
11847
  }
11577
- function TooltipContent({
11848
+ function Slider({
11578
11849
  className,
11579
- sideOffset = 0,
11580
- children,
11850
+ defaultValue,
11851
+ value,
11852
+ min = 0,
11853
+ max = 100,
11581
11854
  ...props
11582
11855
  }) {
11583
- return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
11584
- TooltipPrimitive__namespace.Content,
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,
11585
11862
  {
11586
- "data-slot": "tooltip-content",
11587
- sideOffset,
11863
+ "data-slot": "slider",
11864
+ defaultValue,
11865
+ value,
11866
+ min,
11867
+ max,
11588
11868
  className: cn(
11589
- "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",
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",
11590
11870
  className
11591
11871
  ),
11592
11872
  ...props,
11593
11873
  children: [
11594
- children,
11595
- /* @__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]" })
11596
- ]
11597
- }
11598
- ) });
11599
- }
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
+ }
11600
12104
  var GroupedSwitchInput = class extends BaseInput {
11601
12105
  render() {
11602
12106
  const { input, isSubmitting } = this;
@@ -11709,103 +12213,38 @@ var AccordionGroupedSwitches = ({ form, input, groups = [], onChange, isSubmitti
11709
12213
  AccordionItem,
11710
12214
  {
11711
12215
  value: group.label,
11712
- className: `px-1 ${indx % 2 ? `bg-black/10` : "bg-black/5"}`,
11713
- children: [
11714
- /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 w-full", children: [
11715
- group.label,
11716
- " ",
11717
- /* @__PURE__ */ jsxRuntime.jsxs(Badge, { children: [
11718
- countCheckedByGroup(group),
11719
- " / ",
11720
- group.options.length
11721
- ] })
11722
- ] }) }),
11723
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
11724
- GroupedSwitches,
11725
- {
11726
- isSubmitting,
11727
- input,
11728
- options: group.options,
11729
- onChange: (updated) => handleOptionChange(field, group.label, updated, input)
11730
- }
11731
- ) })
11732
- ]
11733
- },
11734
- indx
11735
- )) })
11736
- ] }) }),
11737
- input.description && /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
11738
- /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
11739
- ] })
11740
- },
11741
- input.name
11742
- );
11743
- };
11744
- var buttonGroupVariants = classVarianceAuthority.cva(
11745
- "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",
11746
- {
11747
- variants: {
11748
- orientation: {
11749
- horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
11750
- vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
11751
- }
11752
- },
11753
- defaultVariants: {
11754
- orientation: "horizontal"
11755
- }
11756
- }
11757
- );
11758
- function ButtonGroup({
11759
- className,
11760
- orientation: orientation2,
11761
- ...props
11762
- }) {
11763
- return /* @__PURE__ */ jsxRuntime.jsx(
11764
- "div",
11765
- {
11766
- role: "group",
11767
- "data-slot": "button-group",
11768
- "data-orientation": orientation2,
11769
- className: cn(buttonGroupVariants({ orientation: orientation2 }), className),
11770
- ...props
11771
- }
11772
- );
11773
- }
11774
- function ButtonGroupText({
11775
- className,
11776
- asChild = false,
11777
- ...props
11778
- }) {
11779
- const Comp = asChild ? reactSlot.Slot : "div";
11780
- return /* @__PURE__ */ jsxRuntime.jsx(
11781
- Comp,
11782
- {
11783
- className: cn(
11784
- "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",
11785
- className
11786
- ),
11787
- ...props
11788
- }
11789
- );
11790
- }
11791
- function ButtonGroupSeparator({
11792
- className,
11793
- orientation: orientation2 = "vertical",
11794
- ...props
11795
- }) {
11796
- return /* @__PURE__ */ jsxRuntime.jsx(
11797
- Separator,
11798
- {
11799
- "data-slot": "button-group-separator",
11800
- orientation: orientation2,
11801
- className: cn(
11802
- "bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
11803
- className
11804
- ),
11805
- ...props
11806
- }
12216
+ className: `px-1 ${indx % 2 ? `bg-black/10` : "bg-black/5"}`,
12217
+ children: [
12218
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 w-full", children: [
12219
+ group.label,
12220
+ " ",
12221
+ /* @__PURE__ */ jsxRuntime.jsxs(Badge, { children: [
12222
+ countCheckedByGroup(group),
12223
+ " / ",
12224
+ group.options.length
12225
+ ] })
12226
+ ] }) }),
12227
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
12228
+ GroupedSwitches,
12229
+ {
12230
+ isSubmitting,
12231
+ input,
12232
+ options: group.options,
12233
+ onChange: (updated) => handleOptionChange(field, group.label, updated, input)
12234
+ }
12235
+ ) })
12236
+ ]
12237
+ },
12238
+ indx
12239
+ )) })
12240
+ ] }) }),
12241
+ input.description && /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
12242
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
12243
+ ] })
12244
+ },
12245
+ input.name
11807
12246
  );
11808
- }
12247
+ };
11809
12248
  var ButtonGroupInput = class extends BaseInput {
11810
12249
  render() {
11811
12250
  const { input, form, isSubmitting } = this;
@@ -11981,233 +12420,79 @@ var FieldColor = ({ form, input, isSubmitting }) => {
11981
12420
  /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: ColorCmp ? /* @__PURE__ */ jsxRuntime.jsx(
11982
12421
  ColorCmp,
11983
12422
  {
11984
- value: field.value || "#000000",
11985
- onChange: (event) => {
11986
- handleOnChage(event, input, field);
11987
- },
11988
- onBlur: field.onBlur,
11989
- disabled: input.disabled || isSubmitting,
11990
- placeholder: input.placeHolder
11991
- }
11992
- ) : "N/A" }),
11993
- /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
11994
- /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
11995
- ] })
11996
- }
11997
- );
11998
- };
11999
- var ColorComp = React3__namespace.default.forwardRef(
12000
- ({ value = "#000000", onChange, onBlur, disabled, className, hideInput = ["hsv"] }, ref) => {
12001
- const [color, setColor] = reactColorPalette.useColor(value);
12002
- const [open, setOpen] = React3.useState(false);
12003
- React3__namespace.default.useEffect(() => {
12004
- if (value !== color.hex) {
12005
- setColor({ ...color, hex: value });
12006
- }
12007
- }, [value]);
12008
- const handleColorChange = (newColor) => {
12009
- setColor({ ...color, hex: newColor });
12010
- onChange?.(newColor);
12011
- };
12012
- const handlePickerChange = (newColor) => {
12013
- setColor(newColor);
12014
- onChange?.(newColor.hex);
12015
- };
12016
- const handleOpenChange = (newOpen) => {
12017
- setOpen(newOpen);
12018
- if (!newOpen) {
12019
- onBlur?.();
12020
- }
12021
- };
12022
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
12023
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-2 p-2", children: PRESET_COLORS.map((presetColor) => /* @__PURE__ */ jsxRuntime.jsx(
12024
- "button",
12025
- {
12026
- type: "button",
12027
- disabled,
12028
- className: cn(
12029
- "flex-1 size-4 shadow-lg rounded-md border-2 border-black transition-all hover:scale-110 disabled:opacity-50 disabled:cursor-not-allowed",
12030
- color.hex === presetColor ? "border-foreground ring-2 ring-foreground/20" : "border-border hover:border-foreground/50"
12031
- ),
12032
- style: { backgroundColor: presetColor },
12033
- onClick: () => handleColorChange(presetColor),
12034
- "aria-label": `Select color ${presetColor}`
12035
- },
12036
- presetColor
12037
- )) }),
12038
- /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
12039
- /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12040
- Button,
12041
- {
12042
- ref,
12043
- variant: "outline",
12044
- disabled,
12045
- className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", className),
12046
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
12047
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 border border-border rounded-sm", style: { backgroundColor: color.hex, width: 20, height: 20 } }),
12048
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: color.hex })
12049
- ] })
12050
- }
12051
- ) }),
12052
- /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(reactColorPalette.ColorPicker, { color, onChange: handlePickerChange, hideInput }) })
12053
- ] })
12054
- ] });
12055
- }
12056
- );
12057
- function Command({
12058
- className,
12059
- ...props
12060
- }) {
12061
- return /* @__PURE__ */ jsxRuntime.jsx(
12062
- cmdk.Command,
12063
- {
12064
- "data-slot": "command",
12065
- className: cn(
12066
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
12067
- className
12068
- ),
12069
- ...props
12070
- }
12071
- );
12072
- }
12073
- function CommandDialog({
12074
- title = "Command Palette",
12075
- description = "Search for a command to run...",
12076
- children,
12077
- className,
12078
- showCloseButton = true,
12079
- ...props
12080
- }) {
12081
- return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { ...props, children: [
12082
- /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "sr-only", children: [
12083
- /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: title }),
12084
- /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: description })
12085
- ] }),
12086
- /* @__PURE__ */ jsxRuntime.jsx(
12087
- DialogContent,
12088
- {
12089
- className: cn("overflow-hidden p-0", className),
12090
- showCloseButton,
12091
- 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 })
12092
- }
12093
- )
12094
- ] });
12095
- }
12096
- function CommandInput({
12097
- className,
12098
- ...props
12099
- }) {
12100
- return /* @__PURE__ */ jsxRuntime.jsxs(
12101
- "div",
12102
- {
12103
- "data-slot": "command-input-wrapper",
12104
- className: "flex h-9 items-center gap-2 border-b px-3",
12105
- children: [
12106
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
12107
- /* @__PURE__ */ jsxRuntime.jsx(
12108
- cmdk.Command.Input,
12109
- {
12110
- "data-slot": "command-input",
12111
- className: cn(
12112
- "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",
12113
- className
12114
- ),
12115
- ...props
12116
- }
12117
- )
12118
- ]
12119
- }
12120
- );
12121
- }
12122
- function CommandList({
12123
- className,
12124
- ...props
12125
- }) {
12126
- return /* @__PURE__ */ jsxRuntime.jsx(
12127
- cmdk.Command.List,
12128
- {
12129
- "data-slot": "command-list",
12130
- className: cn(
12131
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
12132
- className
12133
- ),
12134
- ...props
12135
- }
12136
- );
12137
- }
12138
- function CommandEmpty({
12139
- ...props
12140
- }) {
12141
- return /* @__PURE__ */ jsxRuntime.jsx(
12142
- cmdk.Command.Empty,
12143
- {
12144
- "data-slot": "command-empty",
12145
- className: "py-6 text-center text-sm",
12146
- ...props
12147
- }
12148
- );
12149
- }
12150
- function CommandGroup({
12151
- className,
12152
- ...props
12153
- }) {
12154
- return /* @__PURE__ */ jsxRuntime.jsx(
12155
- cmdk.Command.Group,
12156
- {
12157
- "data-slot": "command-group",
12158
- className: cn(
12159
- "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",
12160
- className
12161
- ),
12162
- ...props
12163
- }
12164
- );
12165
- }
12166
- function CommandSeparator({
12167
- className,
12168
- ...props
12169
- }) {
12170
- return /* @__PURE__ */ jsxRuntime.jsx(
12171
- cmdk.Command.Separator,
12172
- {
12173
- "data-slot": "command-separator",
12174
- className: cn("bg-border -mx-1 h-px", className),
12175
- ...props
12176
- }
12177
- );
12178
- }
12179
- function CommandItem({
12180
- className,
12181
- ...props
12182
- }) {
12183
- return /* @__PURE__ */ jsxRuntime.jsx(
12184
- cmdk.Command.Item,
12185
- {
12186
- "data-slot": "command-item",
12187
- className: cn(
12188
- "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",
12189
- className
12190
- ),
12191
- ...props
12192
- }
12193
- );
12194
- }
12195
- function CommandShortcut({
12196
- className,
12197
- ...props
12198
- }) {
12199
- return /* @__PURE__ */ jsxRuntime.jsx(
12200
- "span",
12201
- {
12202
- "data-slot": "command-shortcut",
12203
- className: cn(
12204
- "text-muted-foreground ml-auto text-xs tracking-widest",
12205
- className
12206
- ),
12207
- ...props
12423
+ value: field.value || "#000000",
12424
+ onChange: (event) => {
12425
+ handleOnChage(event, input, field);
12426
+ },
12427
+ onBlur: field.onBlur,
12428
+ disabled: input.disabled || isSubmitting,
12429
+ placeholder: input.placeHolder
12430
+ }
12431
+ ) : "N/A" }),
12432
+ /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
12433
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
12434
+ ] })
12208
12435
  }
12209
12436
  );
12210
- }
12437
+ };
12438
+ var ColorComp = React3__namespace.default.forwardRef(
12439
+ ({ value = "#000000", onChange, onBlur, disabled, className, hideInput = ["hsv"] }, ref) => {
12440
+ const [color, setColor] = reactColorPalette.useColor(value);
12441
+ const [open, setOpen] = React3.useState(false);
12442
+ React3__namespace.default.useEffect(() => {
12443
+ if (value !== color.hex) {
12444
+ setColor({ ...color, hex: value });
12445
+ }
12446
+ }, [value]);
12447
+ const handleColorChange = (newColor) => {
12448
+ setColor({ ...color, hex: newColor });
12449
+ onChange?.(newColor);
12450
+ };
12451
+ const handlePickerChange = (newColor) => {
12452
+ setColor(newColor);
12453
+ onChange?.(newColor.hex);
12454
+ };
12455
+ const handleOpenChange = (newOpen) => {
12456
+ setOpen(newOpen);
12457
+ if (!newOpen) {
12458
+ onBlur?.();
12459
+ }
12460
+ };
12461
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
12462
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-2 p-2", children: PRESET_COLORS.map((presetColor) => /* @__PURE__ */ jsxRuntime.jsx(
12463
+ "button",
12464
+ {
12465
+ type: "button",
12466
+ disabled,
12467
+ className: cn(
12468
+ "flex-1 size-4 shadow-lg rounded-md border-2 border-black transition-all hover:scale-110 disabled:opacity-50 disabled:cursor-not-allowed",
12469
+ color.hex === presetColor ? "border-foreground ring-2 ring-foreground/20" : "border-border hover:border-foreground/50"
12470
+ ),
12471
+ style: { backgroundColor: presetColor },
12472
+ onClick: () => handleColorChange(presetColor),
12473
+ "aria-label": `Select color ${presetColor}`
12474
+ },
12475
+ presetColor
12476
+ )) }),
12477
+ /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
12478
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12479
+ Button,
12480
+ {
12481
+ ref,
12482
+ variant: "outline",
12483
+ disabled,
12484
+ className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", className),
12485
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
12486
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 border border-border rounded-sm", style: { backgroundColor: color.hex, width: 20, height: 20 } }),
12487
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: color.hex })
12488
+ ] })
12489
+ }
12490
+ ) }),
12491
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(reactColorPalette.ColorPicker, { color, onChange: handlePickerChange, hideInput }) })
12492
+ ] })
12493
+ ] });
12494
+ }
12495
+ );
12211
12496
  var ComboboxInput = class extends BaseInput {
12212
12497
  render() {
12213
12498
  const { input, form, isSubmitting } = this;
@@ -12745,6 +13030,61 @@ var FieldFileMultiUpload = ({ input, form, isSubmitting }) => {
12745
13030
  );
12746
13031
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formField });
12747
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
+ }));
12748
13088
  var TextInputGroup = class extends BaseInput {
12749
13089
  render() {
12750
13090
  const { input, form, isSubmitting } = this;
@@ -12789,6 +13129,7 @@ var CustomInputGroup = ({
12789
13129
  isValid,
12790
13130
  autoCapitalize = "none"
12791
13131
  }) => {
13132
+ const withKeyboard = input.withKeyboard;
12792
13133
  const groupConfig = input.inputGroupConfig;
12793
13134
  const infoTooltip = input?.infoTooltip;
12794
13135
  const autoValidate = groupConfig?.autoValidIcons ?? input.zodType ? true : false;
@@ -12803,6 +13144,7 @@ var CustomInputGroup = ({
12803
13144
  const isPasswordField = input.keyboardType === "password" /* PASSWORD */;
12804
13145
  const isNumberField = input.keyboardType === "number" /* NUMBER */;
12805
13146
  const showInputGroupAddons = iconsRight.length > 0 || textRight || autoValidate || infoTooltip || isPasswordField;
13147
+ const setIsOpen = useKeyboardStore((state) => state.setIsOpen);
12806
13148
  const applyMask = (value2, mask) => {
12807
13149
  if (!mask) return value2;
12808
13150
  if (typeof mask === "string") {
@@ -12917,6 +13259,7 @@ var CustomInputGroup = ({
12917
13259
  children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { size: 20 })
12918
13260
  }
12919
13261
  ),
13262
+ withKeyboard && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "text-2xl", onClick: setIsOpen, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Keyboard, {}) }),
12920
13263
  autoValidate && /* @__PURE__ */ jsxRuntime.jsx("div", { children: isSubmitting ? iconLoadingState : isValid ? iconValidState : iconInvalidState })
12921
13264
  ] })
12922
13265
  ] });
@@ -13342,64 +13685,6 @@ var FieldRepeater = ({ form, input, isSubmitting }) => {
13342
13685
  }
13343
13686
  );
13344
13687
  };
13345
- function Tabs({
13346
- className,
13347
- ...props
13348
- }) {
13349
- return /* @__PURE__ */ jsxRuntime.jsx(
13350
- TabsPrimitive__namespace.Root,
13351
- {
13352
- "data-slot": "tabs",
13353
- className: cn("flex flex-col gap-2", className),
13354
- ...props
13355
- }
13356
- );
13357
- }
13358
- function TabsList({
13359
- className,
13360
- ...props
13361
- }) {
13362
- return /* @__PURE__ */ jsxRuntime.jsx(
13363
- TabsPrimitive__namespace.List,
13364
- {
13365
- "data-slot": "tabs-list",
13366
- className: cn(
13367
- "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
13368
- className
13369
- ),
13370
- ...props
13371
- }
13372
- );
13373
- }
13374
- function TabsTrigger({
13375
- className,
13376
- ...props
13377
- }) {
13378
- return /* @__PURE__ */ jsxRuntime.jsx(
13379
- TabsPrimitive__namespace.Trigger,
13380
- {
13381
- "data-slot": "tabs-trigger",
13382
- className: cn(
13383
- "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",
13384
- className
13385
- ),
13386
- ...props
13387
- }
13388
- );
13389
- }
13390
- function TabsContent({
13391
- className,
13392
- ...props
13393
- }) {
13394
- return /* @__PURE__ */ jsxRuntime.jsx(
13395
- TabsPrimitive__namespace.Content,
13396
- {
13397
- "data-slot": "tabs-content",
13398
- className: cn("flex-1 outline-none", className),
13399
- ...props
13400
- }
13401
- );
13402
- }
13403
13688
  var RepeaterTabsInput = class extends BaseInput {
13404
13689
  render() {
13405
13690
  const { input, form, isSubmitting } = this;
@@ -13686,62 +13971,6 @@ var FieldSimpleCheckList = ({ input, value, onChange, isSubmitting }) => {
13686
13971
  ] });
13687
13972
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formField });
13688
13973
  };
13689
- function Slider({
13690
- className,
13691
- defaultValue,
13692
- value,
13693
- min = 0,
13694
- max = 100,
13695
- ...props
13696
- }) {
13697
- const _values = React3__namespace.useMemo(
13698
- () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
13699
- [value, defaultValue, min, max]
13700
- );
13701
- return /* @__PURE__ */ jsxRuntime.jsxs(
13702
- SliderPrimitive__namespace.Root,
13703
- {
13704
- "data-slot": "slider",
13705
- defaultValue,
13706
- value,
13707
- min,
13708
- max,
13709
- className: cn(
13710
- "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",
13711
- className
13712
- ),
13713
- ...props,
13714
- children: [
13715
- /* @__PURE__ */ jsxRuntime.jsx(
13716
- SliderPrimitive__namespace.Track,
13717
- {
13718
- "data-slot": "slider-track",
13719
- className: cn(
13720
- "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"
13721
- ),
13722
- children: /* @__PURE__ */ jsxRuntime.jsx(
13723
- SliderPrimitive__namespace.Range,
13724
- {
13725
- "data-slot": "slider-range",
13726
- className: cn(
13727
- "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
13728
- )
13729
- }
13730
- )
13731
- }
13732
- ),
13733
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(
13734
- SliderPrimitive__namespace.Thumb,
13735
- {
13736
- "data-slot": "slider-thumb",
13737
- 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"
13738
- },
13739
- index
13740
- ))
13741
- ]
13742
- }
13743
- );
13744
- }
13745
13974
  var SliderInput = class extends BaseInput {
13746
13975
  render() {
13747
13976
  const { input, form, isSubmitting } = this;
@@ -16088,61 +16317,6 @@ var FormWrapper = ({ form, handleSubmit, children, readOnly, debug, isWrapInWiza
16088
16317
  }
16089
16318
  ) });
16090
16319
  };
16091
- function Stepper({ steps, currentStep, clickable = false, onStepClick }) {
16092
- const handleStepClick = (stepNumber) => {
16093
- if (clickable && onStepClick) {
16094
- onStepClick(stepNumber);
16095
- }
16096
- };
16097
- 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) => {
16098
- const stepNumber = index + 1;
16099
- const isCompleted = stepNumber < currentStep;
16100
- const isCurrent = stepNumber === currentStep;
16101
- const isUpcoming = stepNumber > currentStep;
16102
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 items-center", children: [
16103
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
16104
- /* @__PURE__ */ jsxRuntime.jsx(
16105
- "div",
16106
- {
16107
- onClick: () => handleStepClick(stepNumber),
16108
- className: cn(
16109
- "flex size-10 items-center shadow-lg justify-center rounded-full border-2 transition-all duration-300",
16110
- isCompleted && "border-primary bg-primary text-primary-foreground",
16111
- isCurrent && "border-primary bg-background text-primary scale-110",
16112
- isUpcoming && "border-muted-foreground/60 bg-background border-b text-muted-foreground",
16113
- clickable && "cursor-pointer hover:scale-125 hover:shadow-xl",
16114
- !clickable && "cursor-default"
16115
- ),
16116
- children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold", children: stepNumber })
16117
- }
16118
- ),
16119
- step.title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 text-center", children: [
16120
- /* @__PURE__ */ jsxRuntime.jsx(
16121
- "p",
16122
- {
16123
- className: cn(
16124
- "text-sm font-medium transition-colors",
16125
- (isCompleted || isCurrent) && "text-foreground",
16126
- isUpcoming && "text-muted-foreground"
16127
- ),
16128
- children: step.title
16129
- }
16130
- ),
16131
- step.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-muted-foreground max-w-[120px]", children: step.description })
16132
- ] })
16133
- ] }),
16134
- index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-2 flex-1 mb-8", children: /* @__PURE__ */ jsxRuntime.jsx(
16135
- "div",
16136
- {
16137
- className: cn(
16138
- "h-0.5 w-full transition-all duration-300",
16139
- stepNumber < currentStep ? "bg-primary" : "bg-muted-foreground/30"
16140
- )
16141
- }
16142
- ) })
16143
- ] }, index);
16144
- }) }) });
16145
- }
16146
16320
  var WizardForm = ({
16147
16321
  fields,
16148
16322
  record,
@@ -16365,6 +16539,18 @@ var InputList = ({ handleAddInput, inputsTypes }) => {
16365
16539
  );
16366
16540
  }) });
16367
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
+ };
16368
16554
  var GenericFilter = ({
16369
16555
  filters = [],
16370
16556
  pagination,
@@ -16623,6 +16809,7 @@ exports.CommandShortcut = CommandShortcut;
16623
16809
  exports.CurrencyInput = CurrencyInput;
16624
16810
  exports.CustomAlert = CustomAlert;
16625
16811
  exports.CustomInputGroup = CustomInputGroup;
16812
+ exports.CustomSheet = CustomSheet;
16626
16813
  exports.DateInput = DateInput;
16627
16814
  exports.DateTimeInput = DateTimeInput;
16628
16815
  exports.Dialog = Dialog;