@timeax/form-palette 0.2.0 → 0.2.2

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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React66 = require('react');
3
+ var React67 = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var SelectPrimitive = require('@radix-ui/react-select');
6
6
  var PopoverPrimitive = require('@radix-ui/react-popover');
@@ -8,10 +8,10 @@ var reactSlot = require('@radix-ui/react-slot');
8
8
  var SwitchPrimitive = require('@radix-ui/react-switch');
9
9
  var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
10
10
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
11
+ var ScrollAreaPrimitive2 = require('@radix-ui/react-scroll-area');
11
12
  var reactVirtuoso = require('react-virtuoso');
12
13
  var SliderPrimitive = require('@radix-ui/react-slider');
13
14
  var DialogPrimitive = require('@radix-ui/react-dialog');
14
- var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
15
15
  var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
16
16
  require('@radix-ui/react-toggle');
17
17
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
@@ -44,15 +44,15 @@ function _interopNamespace(e) {
44
44
  return Object.freeze(n);
45
45
  }
46
46
 
47
- var React66__namespace = /*#__PURE__*/_interopNamespace(React66);
47
+ var React67__namespace = /*#__PURE__*/_interopNamespace(React67);
48
48
  var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
49
49
  var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
50
50
  var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
51
51
  var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
52
52
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
53
+ var ScrollAreaPrimitive2__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive2);
53
54
  var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
54
55
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
55
- var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
56
56
  var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
57
57
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
58
58
  var Editor__default = /*#__PURE__*/_interopDefault(Editor);
@@ -5633,7 +5633,7 @@ function getAdapter(key) {
5633
5633
  function hasAdapter(key) {
5634
5634
  return typeof registry[key] === "function";
5635
5635
  }
5636
- var CoreContextReact = React66__namespace.default.createContext(
5636
+ var CoreContextReact = React67__namespace.default.createContext(
5637
5637
  null
5638
5638
  );
5639
5639
 
@@ -5645,9 +5645,10 @@ function mapZodError(error) {
5645
5645
  const path = issue.path;
5646
5646
  const message2 = issue.message || "Validation error";
5647
5647
  const first = path[0];
5648
- if (typeof first === "string" && first.length > 0) {
5649
- const existing = fieldErrors[first];
5650
- fieldErrors[first] = existing ? `${existing}
5648
+ if ((typeof first === "string" || typeof first === "number") && String(first).length > 0) {
5649
+ const fullPath = path.filter((p2) => typeof p2 === "string" || typeof p2 === "number").join(".");
5650
+ const existing = fieldErrors[fullPath];
5651
+ fieldErrors[fullPath] = existing ? `${existing}
5651
5652
  ${message2}` : message2;
5652
5653
  } else {
5653
5654
  uncaught.push(message2);
@@ -9214,16 +9215,16 @@ function deepEqual(a3, b2) {
9214
9215
  }
9215
9216
  function CoreProvider(props) {
9216
9217
  var _a, _b;
9217
- const registryRef = React66__namespace.useRef(new FieldRegistry());
9218
- const bucketRef = React66__namespace.useRef({});
9219
- const uncaughtRef = React66__namespace.useRef([]);
9220
- const errorsRef = React66__namespace.useRef(null);
9221
- const buttonRef = React66__namespace.useRef(null);
9222
- const activeButtonNameRef = React66__namespace.useRef(null);
9223
- const [hasUncaughtErrors, setHasUncaughtErrors] = React66__namespace.useState(0);
9224
- const originalRef = React66__namespace.useRef(null);
9225
- const propsRef = React66__namespace.useRef(props);
9226
- React66__namespace.useEffect(() => {
9218
+ const registryRef = React67__namespace.useRef(new FieldRegistry());
9219
+ const bucketRef = React67__namespace.useRef({});
9220
+ const uncaughtRef = React67__namespace.useRef([]);
9221
+ const errorsRef = React67__namespace.useRef(null);
9222
+ const buttonRef = React67__namespace.useRef(null);
9223
+ const activeButtonNameRef = React67__namespace.useRef(null);
9224
+ const [hasUncaughtErrors, setHasUncaughtErrors] = React67__namespace.useState(0);
9225
+ const originalRef = React67__namespace.useRef(null);
9226
+ const propsRef = React67__namespace.useRef(props);
9227
+ React67__namespace.useEffect(() => {
9227
9228
  propsRef.current = props;
9228
9229
  }, [props]);
9229
9230
  const adapterKey = (_a = props.adapter) != null ? _a : "local";
@@ -9765,7 +9766,7 @@ function CoreProvider(props) {
9765
9766
  return uncaughtRef.current;
9766
9767
  }
9767
9768
  };
9768
- React66__namespace.useEffect(() => {
9769
+ React67__namespace.useEffect(() => {
9769
9770
  if (!props.formRef) return;
9770
9771
  props.formRef.current = context;
9771
9772
  return () => {
@@ -9774,7 +9775,7 @@ function CoreProvider(props) {
9774
9775
  }
9775
9776
  };
9776
9777
  }, [context]);
9777
- React66__namespace.useEffect(() => {
9778
+ React67__namespace.useEffect(() => {
9778
9779
  if (props.init) {
9779
9780
  props.init(context);
9780
9781
  }
@@ -9782,7 +9783,7 @@ function CoreProvider(props) {
9782
9783
  return /* @__PURE__ */ jsxRuntime.jsx(CoreContextReact.Provider, { value: context, children: props.children });
9783
9784
  }
9784
9785
  function useCoreContext() {
9785
- const ctx = React66.useContext(CoreContextReact);
9786
+ const ctx = React67.useContext(CoreContextReact);
9786
9787
  if (!ctx) {
9787
9788
  throw new Error("useCoreContext must be used within a <CoreProvider>.");
9788
9789
  }
@@ -9829,7 +9830,7 @@ var defaultAttributes = {
9829
9830
  };
9830
9831
 
9831
9832
  // ../../node_modules/lucide-react/dist/esm/Icon.js
9832
- var Icon = React66.forwardRef(
9833
+ var Icon = React67.forwardRef(
9833
9834
  ({
9834
9835
  color = "currentColor",
9835
9836
  size = 24,
@@ -9839,7 +9840,7 @@ var Icon = React66.forwardRef(
9839
9840
  children,
9840
9841
  iconNode,
9841
9842
  ...rest
9842
- }, ref) => React66.createElement(
9843
+ }, ref) => React67.createElement(
9843
9844
  "svg",
9844
9845
  {
9845
9846
  ref,
@@ -9853,7 +9854,7 @@ var Icon = React66.forwardRef(
9853
9854
  ...rest
9854
9855
  },
9855
9856
  [
9856
- ...iconNode.map(([tag, attrs]) => React66.createElement(tag, attrs)),
9857
+ ...iconNode.map(([tag, attrs]) => React67.createElement(tag, attrs)),
9857
9858
  ...Array.isArray(children) ? children : [children]
9858
9859
  ]
9859
9860
  )
@@ -9861,8 +9862,8 @@ var Icon = React66.forwardRef(
9861
9862
 
9862
9863
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
9863
9864
  var createLucideIcon = (iconName, iconNode) => {
9864
- const Component = React66.forwardRef(
9865
- ({ className, ...props }, ref) => React66.createElement(Icon, {
9865
+ const Component = React67.forwardRef(
9866
+ ({ className, ...props }, ref) => React67.createElement(Icon, {
9866
9867
  ref,
9867
9868
  iconNode,
9868
9869
  className: mergeClasses(
@@ -10210,9 +10211,9 @@ function ErrorStrip(props) {
10210
10211
  } = props;
10211
10212
  const ctxFromHook = useCore();
10212
10213
  const form = formProp != null ? formProp : ctxFromHook;
10213
- const [isVisible, setIsVisible] = React66__namespace.useState(true);
10214
+ const [isVisible, setIsVisible] = React67__namespace.useState(true);
10214
10215
  const messages = messagesProp ? messagesProp : (_b = (form == null ? void 0 : form.hasUncaughtErrors) ? (_a = form == null ? void 0 : form.getUncaught) == null ? void 0 : _a.call(form) : []) != null ? _b : [];
10215
- React66__namespace.useEffect(() => {
10216
+ React67__namespace.useEffect(() => {
10216
10217
  if (messages.length > 0) {
10217
10218
  setIsVisible(true);
10218
10219
  }
@@ -10276,7 +10277,7 @@ function ErrorStrip(props) {
10276
10277
  function CoreRoot(props) {
10277
10278
  const { noErrorStrip, onSubmitForm, children, ...rest } = props;
10278
10279
  const form = useCore();
10279
- const handleSubmit = React66__namespace.useCallback(
10280
+ const handleSubmit = React67__namespace.useCallback(
10280
10281
  (event) => {
10281
10282
  event.preventDefault();
10282
10283
  if (form.props.activateButtonOnChange && !form.isDirty()) return;
@@ -10324,16 +10325,16 @@ function CoreShell(props) {
10324
10325
  function useButton(options) {
10325
10326
  const form = useCoreContext();
10326
10327
  const { name, disabled: disabledProp = false } = options;
10327
- const [loading, setLoadingState] = React66__namespace.useState(false);
10328
- const [disabled, setDisabledState] = React66__namespace.useState(
10328
+ const [loading, setLoadingState] = React67__namespace.useState(false);
10329
+ const [disabled, setDisabledState] = React67__namespace.useState(
10329
10330
  Boolean(disabledProp)
10330
10331
  );
10331
- const ref = React66__namespace.useRef(null);
10332
- const optsRef = React66__namespace.useRef(options);
10333
- React66__namespace.useEffect(() => {
10332
+ const ref = React67__namespace.useRef(null);
10333
+ const optsRef = React67__namespace.useRef(options);
10334
+ React67__namespace.useEffect(() => {
10334
10335
  optsRef.current = options;
10335
10336
  }, [options]);
10336
- const buttonRef = React66__namespace.useRef(null);
10337
+ const buttonRef = React67__namespace.useRef(null);
10337
10338
  if (!buttonRef.current) {
10338
10339
  const btn = {
10339
10340
  name,
@@ -10363,11 +10364,11 @@ function useButton(options) {
10363
10364
  };
10364
10365
  buttonRef.current = btn;
10365
10366
  }
10366
- React66__namespace.useEffect(() => {
10367
+ React67__namespace.useEffect(() => {
10367
10368
  if (!buttonRef.current) return;
10368
10369
  buttonRef.current.name = name;
10369
10370
  }, [name]);
10370
- React66__namespace.useEffect(() => {
10371
+ React67__namespace.useEffect(() => {
10371
10372
  if (!buttonRef.current) return;
10372
10373
  form.button = buttonRef.current;
10373
10374
  return () => {
@@ -10434,41 +10435,41 @@ function useField(options) {
10434
10435
  onValueChange,
10435
10436
  onSubmit
10436
10437
  } = options;
10437
- const ref = React66__namespace.useRef(null);
10438
- const stateRef = React66__namespace.useRef({
10438
+ const ref = React67__namespace.useRef(null);
10439
+ const stateRef = React67__namespace.useRef({
10439
10440
  value: defaultValue,
10440
10441
  error: "",
10441
10442
  loading: false,
10442
10443
  original: getOriginalValue ? getOriginalValue(defaultValue) : defaultValue
10443
10444
  });
10444
- const [valueState, setValueState] = React66__namespace.useState(
10445
+ const [valueState, setValueState] = React67__namespace.useState(
10445
10446
  stateRef.current.value
10446
10447
  );
10447
10448
  const isControlled = valueProp !== void 0;
10448
10449
  const value = isControlled ? valueProp : valueState;
10449
- React66__namespace.useEffect(() => {
10450
+ React67__namespace.useEffect(() => {
10450
10451
  if (isControlled && valueProp !== stateRef.current.value) {
10451
10452
  stateRef.current.value = valueProp;
10452
10453
  setValueState(valueProp);
10453
10454
  }
10454
10455
  }, [isControlled, valueProp]);
10455
- const [error, setErrorState] = React66__namespace.useState(
10456
+ const [error, setErrorState] = React67__namespace.useState(
10456
10457
  stateRef.current.error
10457
10458
  );
10458
- const [loading, setLoadingState] = React66__namespace.useState(
10459
+ const [loading, setLoadingState] = React67__namespace.useState(
10459
10460
  stateRef.current.loading
10460
10461
  );
10461
- const [required, setRequired] = React66__namespace.useState(
10462
+ const [required, setRequired] = React67__namespace.useState(
10462
10463
  Boolean(requiredProp)
10463
10464
  );
10464
- const [disabled, setDisabled] = React66__namespace.useState(
10465
+ const [disabled, setDisabled] = React67__namespace.useState(
10465
10466
  Boolean(disabledProp)
10466
10467
  );
10467
- const [readOnly, setReadOnly] = React66__namespace.useState(
10468
+ const [readOnly, setReadOnly] = React67__namespace.useState(
10468
10469
  Boolean(readOnlyProp)
10469
10470
  );
10470
- const id = React66__namespace.useId();
10471
- const keyRef = React66__namespace.useRef(
10471
+ const id = React67__namespace.useId();
10472
+ const keyRef = React67__namespace.useRef(
10472
10473
  (() => {
10473
10474
  if (rawName && rawName.trim()) return `${rawName.trim()}-${id}`;
10474
10475
  if (rawBindId && rawBindId.trim())
@@ -10476,10 +10477,10 @@ function useField(options) {
10476
10477
  return `field-${Math.random().toString(36).slice(2)}-${id}`;
10477
10478
  })()
10478
10479
  );
10479
- const bindIdRef = React66__namespace.useRef(
10480
+ const bindIdRef = React67__namespace.useRef(
10480
10481
  rawBindId && rawBindId.trim() || keyRef.current
10481
10482
  );
10482
- const fieldRef = React66__namespace.useRef(null);
10483
+ const fieldRef = React67__namespace.useRef(null);
10483
10484
  if (!fieldRef.current) {
10484
10485
  const key = keyRef.current;
10485
10486
  const bindId = bindIdRef.current;
@@ -10582,19 +10583,19 @@ function useField(options) {
10582
10583
  fieldRef.current = f2;
10583
10584
  }
10584
10585
  const field = fieldRef.current;
10585
- React66__namespace.useEffect(() => {
10586
+ React67__namespace.useEffect(() => {
10586
10587
  setRequired(requiredProp);
10587
10588
  if (field) {
10588
10589
  field.required = requiredProp;
10589
10590
  }
10590
10591
  }, [requiredProp, field]);
10591
- React66__namespace.useEffect(() => {
10592
+ React67__namespace.useEffect(() => {
10592
10593
  setDisabled(disabledProp);
10593
10594
  }, [disabledProp]);
10594
- React66__namespace.useEffect(() => {
10595
+ React67__namespace.useEffect(() => {
10595
10596
  setReadOnly(readOnlyProp);
10596
10597
  }, [readOnlyProp]);
10597
- React66__namespace.useEffect(() => {
10598
+ React67__namespace.useEffect(() => {
10598
10599
  if (!field) return;
10599
10600
  form.addField(field);
10600
10601
  return () => {
@@ -10709,25 +10710,25 @@ function useOptionalField(options) {
10709
10710
  getOriginalValue,
10710
10711
  onValueChange
10711
10712
  } = options;
10712
- const ref = React66__namespace.useRef(null);
10713
- const [valueState, setValueState] = React66__namespace.useState(defaultValue);
10713
+ const ref = React67__namespace.useRef(null);
10714
+ const [valueState, setValueState] = React67__namespace.useState(defaultValue);
10714
10715
  const isControlled = valueProp !== void 0;
10715
10716
  const value = isControlled ? valueProp : valueState;
10716
- React66__namespace.useEffect(() => {
10717
+ React67__namespace.useEffect(() => {
10717
10718
  if (isControlled) {
10718
10719
  setValueState(valueProp);
10719
10720
  }
10720
10721
  }, [isControlled, valueProp]);
10721
- const [error, setErrorState] = React66__namespace.useState("");
10722
- const [loading, setLoadingState] = React66__namespace.useState(false);
10723
- const [required, setRequired] = React66__namespace.useState(requiredProp);
10724
- const [disabled, setDisabled] = React66__namespace.useState(disabledProp);
10725
- const [readOnly, setReadOnly] = React66__namespace.useState(readOnlyProp);
10726
- const originalRef = React66__namespace.useRef(
10722
+ const [error, setErrorState] = React67__namespace.useState("");
10723
+ const [loading, setLoadingState] = React67__namespace.useState(false);
10724
+ const [required, setRequired] = React67__namespace.useState(requiredProp);
10725
+ const [disabled, setDisabled] = React67__namespace.useState(disabledProp);
10726
+ const [readOnly, setReadOnly] = React67__namespace.useState(readOnlyProp);
10727
+ const originalRef = React67__namespace.useRef(
10727
10728
  getOriginalValue ? getOriginalValue(defaultValue) : defaultValue
10728
10729
  );
10729
- const id = React66__namespace.useId();
10730
- const keyRef = React66__namespace.useRef("");
10730
+ const id = React67__namespace.useId();
10731
+ const keyRef = React67__namespace.useRef("");
10731
10732
  if (!keyRef.current) {
10732
10733
  if (rawName && rawName.trim()) {
10733
10734
  keyRef.current = `${rawName.trim()}-${id}`;
@@ -10737,17 +10738,17 @@ function useOptionalField(options) {
10737
10738
  keyRef.current = `field-${Math.random().toString(36).slice(2)}-${id}`;
10738
10739
  }
10739
10740
  }
10740
- const bindIdRef = React66__namespace.useRef("");
10741
+ const bindIdRef = React67__namespace.useRef("");
10741
10742
  if (!bindIdRef.current) {
10742
10743
  bindIdRef.current = rawBindId && rawBindId.trim() || keyRef.current;
10743
10744
  }
10744
- React66__namespace.useEffect(() => {
10745
+ React67__namespace.useEffect(() => {
10745
10746
  setRequired(requiredProp);
10746
10747
  }, [requiredProp]);
10747
- React66__namespace.useEffect(() => {
10748
+ React67__namespace.useEffect(() => {
10748
10749
  setDisabled(disabledProp);
10749
10750
  }, [disabledProp]);
10750
- React66__namespace.useEffect(() => {
10751
+ React67__namespace.useEffect(() => {
10751
10752
  setReadOnly(readOnlyProp);
10752
10753
  }, [readOnlyProp]);
10753
10754
  function setValue(next, variant = "direct") {
@@ -10845,17 +10846,17 @@ var focusEl = (el) => {
10845
10846
  }
10846
10847
  };
10847
10848
  function useUpdateEffect(effect, deps) {
10848
- const mounted = React66__namespace.useRef(false);
10849
- React66__namespace.useEffect(() => {
10849
+ const mounted = React67__namespace.useRef(false);
10850
+ React67__namespace.useEffect(() => {
10850
10851
  if (mounted.current) {
10851
10852
  return effect();
10852
10853
  }
10853
10854
  mounted.current = true;
10854
10855
  }, deps);
10855
10856
  }
10856
- var InputMask = React66__namespace.memo(
10857
- React66__namespace.forwardRef((inProps, ref) => {
10858
- const props = React66__namespace.useMemo(
10857
+ var InputMask = React67__namespace.memo(
10858
+ React67__namespace.forwardRef((inProps, ref) => {
10859
+ const props = React67__namespace.useMemo(
10859
10860
  () => ({
10860
10861
  autoClear: true,
10861
10862
  autoFocus: false,
@@ -10870,20 +10871,20 @@ var InputMask = React66__namespace.memo(
10870
10871
  }),
10871
10872
  [inProps]
10872
10873
  );
10873
- const elementRef = React66__namespace.useRef(null);
10874
- const firstNonMaskPos = React66__namespace.useRef(null);
10875
- const lastRequiredNonMaskPos = React66__namespace.useRef(0);
10876
- const tests = React66__namespace.useRef([]);
10877
- const buffer = React66__namespace.useRef([]);
10878
- const len = React66__namespace.useRef(0);
10879
- const oldVal = React66__namespace.useRef(null);
10880
- const focus = React66__namespace.useRef(false);
10881
- const focusText = React66__namespace.useRef(null);
10882
- const isValueChecked = React66__namespace.useRef(null);
10883
- const partialPosition = React66__namespace.useRef(null);
10884
- const defaultBuffer = React66__namespace.useRef(null);
10885
- const caretTimeoutId = React66__namespace.useRef(null);
10886
- const androidChrome = React66__namespace.useRef(false);
10874
+ const elementRef = React67__namespace.useRef(null);
10875
+ const firstNonMaskPos = React67__namespace.useRef(null);
10876
+ const lastRequiredNonMaskPos = React67__namespace.useRef(0);
10877
+ const tests = React67__namespace.useRef([]);
10878
+ const buffer = React67__namespace.useRef([]);
10879
+ const len = React67__namespace.useRef(0);
10880
+ const oldVal = React67__namespace.useRef(null);
10881
+ const focus = React67__namespace.useRef(false);
10882
+ const focusText = React67__namespace.useRef(null);
10883
+ const isValueChecked = React67__namespace.useRef(null);
10884
+ const partialPosition = React67__namespace.useRef(null);
10885
+ const defaultBuffer = React67__namespace.useRef(null);
10886
+ const caretTimeoutId = React67__namespace.useRef(null);
10887
+ const androidChrome = React67__namespace.useRef(false);
10887
10888
  const caret = (first, last) => {
10888
10889
  var _a, _b;
10889
10890
  let range;
@@ -10918,7 +10919,7 @@ var InputMask = React66__namespace.memo(
10918
10919
  }
10919
10920
  return { begin, end };
10920
10921
  };
10921
- const getPlaceholder = React66__namespace.useCallback(
10922
+ const getPlaceholder = React67__namespace.useCallback(
10922
10923
  (i4) => {
10923
10924
  var _a;
10924
10925
  const slotChar2 = (_a = props.slotChar) != null ? _a : "_";
@@ -11188,7 +11189,7 @@ var InputMask = React66__namespace.memo(
11188
11189
  });
11189
11190
  }
11190
11191
  };
11191
- const getUnmaskedValue = React66__namespace.useCallback(() => {
11192
+ const getUnmaskedValue = React67__namespace.useCallback(() => {
11192
11193
  const unmaskedBuffer = [];
11193
11194
  for (let i4 = 0; i4 < buffer.current.length; i4++) {
11194
11195
  const c2 = buffer.current[i4];
@@ -11243,7 +11244,7 @@ var InputMask = React66__namespace.memo(
11243
11244
  }
11244
11245
  return pos;
11245
11246
  };
11246
- const isValueUpdated = React66__namespace.useCallback(() => {
11247
+ const isValueUpdated = React67__namespace.useCallback(() => {
11247
11248
  var _a, _b, _c, _d;
11248
11249
  const elVal = (_b = (_a = elementRef.current) == null ? void 0 : _a.value) != null ? _b : "";
11249
11250
  return props.unmask ? ((_c = props.value) != null ? _c : "") !== getUnmaskedValue() : defaultBuffer.current !== elVal && elVal !== ((_d = props.value) != null ? _d : "");
@@ -11343,7 +11344,7 @@ var InputMask = React66__namespace.memo(
11343
11344
  const onInput = (event) => {
11344
11345
  androidChrome.current ? handleAndroidInput(event) : handleInputChange(event);
11345
11346
  };
11346
- React66__namespace.useImperativeHandle(
11347
+ React67__namespace.useImperativeHandle(
11347
11348
  ref,
11348
11349
  () => ({
11349
11350
  focus: () => focusEl(elementRef.current),
@@ -11351,10 +11352,10 @@ var InputMask = React66__namespace.memo(
11351
11352
  }),
11352
11353
  []
11353
11354
  );
11354
- React66__namespace.useEffect(() => {
11355
+ React67__namespace.useEffect(() => {
11355
11356
  if (!elementRef.current) return;
11356
11357
  }, []);
11357
- React66__namespace.useEffect(() => {
11358
+ React67__namespace.useEffect(() => {
11358
11359
  init();
11359
11360
  updateValue();
11360
11361
  }, []);
@@ -11388,6 +11389,7 @@ var InputMask = React66__namespace.memo(
11388
11389
  onKeyPress: l2,
11389
11390
  onInput: m2,
11390
11391
  className,
11392
+ invalid,
11391
11393
  ...restInputProps
11392
11394
  } = props;
11393
11395
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -11409,6 +11411,7 @@ var InputMask = React66__namespace.memo(
11409
11411
  onKeyPress,
11410
11412
  onInput,
11411
11413
  onPaste: (e4) => handleInputChange(e4, true),
11414
+ "aria-invalid": invalid ? "true" : void 0,
11412
11415
  ...restInputProps
11413
11416
  }
11414
11417
  );
@@ -11502,7 +11505,7 @@ function resolveSizeDensityClasses(size, density) {
11502
11505
  }
11503
11506
  return { heightCls, textCls, densityCls };
11504
11507
  }
11505
- var Input = React66__namespace.forwardRef(
11508
+ var Input = React67__namespace.forwardRef(
11506
11509
  function Input2(rawProps, forwardedRef) {
11507
11510
  const {
11508
11511
  // base
@@ -11512,6 +11515,7 @@ var Input = React66__namespace.forwardRef(
11512
11515
  disabled,
11513
11516
  readOnly,
11514
11517
  required,
11518
+ invalid,
11515
11519
  // size / density
11516
11520
  size = "md",
11517
11521
  density = "normal",
@@ -11565,8 +11569,8 @@ var Input = React66__namespace.forwardRef(
11565
11569
  const sizeKey = size != null ? size : "md";
11566
11570
  const densityKey = density != null ? density : "normal";
11567
11571
  const isMasked = Boolean(mask);
11568
- const innerRef = React66__namespace.useRef(null);
11569
- React66__namespace.useImperativeHandle(
11572
+ const innerRef = React67__namespace.useRef(null);
11573
+ React67__namespace.useImperativeHandle(
11570
11574
  forwardedRef,
11571
11575
  () => innerRef.current,
11572
11576
  []
@@ -11587,11 +11591,11 @@ var Input = React66__namespace.forwardRef(
11587
11591
  const baseIconGap = iconGap != null ? iconGap : 4;
11588
11592
  const leadingGap = leadingIconSpacing != null ? leadingIconSpacing : baseIconGap;
11589
11593
  const trailingGap = trailingIconSpacing != null ? trailingIconSpacing : baseIconGap;
11590
- const leadingIconsRef = React66__namespace.useRef(null);
11591
- const trailingIconsRef = React66__namespace.useRef(null);
11592
- const [leadingIconsWidth, setLeadingIconsWidth] = React66__namespace.useState(0);
11593
- const [trailingIconsWidth, setTrailingIconsWidth] = React66__namespace.useState(0);
11594
- React66__namespace.useLayoutEffect(() => {
11594
+ const leadingIconsRef = React67__namespace.useRef(null);
11595
+ const trailingIconsRef = React67__namespace.useRef(null);
11596
+ const [leadingIconsWidth, setLeadingIconsWidth] = React67__namespace.useState(0);
11597
+ const [trailingIconsWidth, setTrailingIconsWidth] = React67__namespace.useState(0);
11598
+ React67__namespace.useLayoutEffect(() => {
11595
11599
  if (typeof window === "undefined") return;
11596
11600
  if (typeof ResizeObserver === "undefined") return;
11597
11601
  const leadingEl = leadingIconsRef.current;
@@ -11666,7 +11670,7 @@ var Input = React66__namespace.forwardRef(
11666
11670
  inputClassName
11667
11671
  );
11668
11672
  const maskMode = unmask === true || unmask === "raw" ? "raw" : "masked";
11669
- const handleFocus = React66__namespace.useCallback(
11673
+ const handleFocus = React67__namespace.useCallback(
11670
11674
  (event) => {
11671
11675
  onFocus == null ? void 0 : onFocus(event);
11672
11676
  if (!prefix && !suffix) return;
@@ -11694,7 +11698,7 @@ var Input = React66__namespace.forwardRef(
11694
11698
  const placeholder = typeof mask === "string" && mask ? mask : rest.placeholder;
11695
11699
  const hasCustomPadding = typeof px === "number" || typeof py === "number" || typeof ps === "number" || typeof pe2 === "number" || typeof pb === "number";
11696
11700
  const hasKeyFilter = !!keyFilter;
11697
- const handleKeyDownWrapped = React66__namespace.useCallback(
11701
+ const handleKeyDownWrapped = React67__namespace.useCallback(
11698
11702
  (event) => {
11699
11703
  if (hasKeyFilter && keyFilterOn === "keydown" && !event.ctrlKey && !event.metaKey && !event.altKey && event.key && event.key.length === 1) {
11700
11704
  const inputEl = event.currentTarget;
@@ -11711,7 +11715,7 @@ var Input = React66__namespace.forwardRef(
11711
11715
  },
11712
11716
  [hasKeyFilter, keyFilterOn, keyFilter, onKeyDown]
11713
11717
  );
11714
- const handleKeyPressWrapped = React66__namespace.useCallback(
11718
+ const handleKeyPressWrapped = React67__namespace.useCallback(
11715
11719
  (event) => {
11716
11720
  if (hasKeyFilter && keyFilterOn === "keypress" && !event.ctrlKey && !event.metaKey && !event.altKey && event.key && event.key.length === 1) {
11717
11721
  const inputEl = event.currentTarget;
@@ -11728,7 +11732,7 @@ var Input = React66__namespace.forwardRef(
11728
11732
  },
11729
11733
  [hasKeyFilter, keyFilterOn, keyFilter, onKeyPress]
11730
11734
  );
11731
- const handleBeforeInputWrapped = React66__namespace.useCallback(
11735
+ const handleBeforeInputWrapped = React67__namespace.useCallback(
11732
11736
  (event) => {
11733
11737
  if (hasKeyFilter && keyFilterOn === "beforeinput" && (event == null ? void 0 : event.nativeEvent)) {
11734
11738
  const inputEl = event.currentTarget;
@@ -11749,7 +11753,7 @@ var Input = React66__namespace.forwardRef(
11749
11753
  },
11750
11754
  [hasKeyFilter, keyFilterOn, keyFilter, onBeforeInput]
11751
11755
  );
11752
- const handlePasteWrapped = React66__namespace.useCallback(
11756
+ const handlePasteWrapped = React67__namespace.useCallback(
11753
11757
  (event) => {
11754
11758
  var _a, _b;
11755
11759
  if (hasKeyFilter && keyFilterOnPaste) {
@@ -11800,6 +11804,7 @@ var Input = React66__namespace.forwardRef(
11800
11804
  onBeforeInput: handleBeforeInputWrapped,
11801
11805
  onPaste: handlePasteWrapped,
11802
11806
  "aria-required": required ? "true" : void 0,
11807
+ "aria-invalid": invalid ? "true" : void 0,
11803
11808
  "data-size": sizeKey,
11804
11809
  "data-density": densityKey,
11805
11810
  placeholder,
@@ -11853,6 +11858,7 @@ var Input = React66__namespace.forwardRef(
11853
11858
  disabled,
11854
11859
  readOnly,
11855
11860
  "aria-required": required ? "true" : void 0,
11861
+ "aria-invalid": invalid ? "true" : void 0,
11856
11862
  "data-size": sizeKey,
11857
11863
  "data-density": densityKey,
11858
11864
  placeholder,
@@ -12147,7 +12153,7 @@ function stripAffixes(value, prefix, suffix) {
12147
12153
  if (suffix && out.endsWith(suffix)) out = out.slice(0, -suffix.length);
12148
12154
  return out;
12149
12155
  }
12150
- var ShadcnTextVariant = React66__namespace.forwardRef(function ShadcnTextVariant2(props, forwardedRef) {
12156
+ var ShadcnTextVariant = React67__namespace.forwardRef(function ShadcnTextVariant2(props, forwardedRef) {
12151
12157
  const {
12152
12158
  // form-level props
12153
12159
  value,
@@ -12195,7 +12201,7 @@ var ShadcnTextVariant = React66__namespace.forwardRef(function ShadcnTextVariant
12195
12201
  ...rest
12196
12202
  } = props;
12197
12203
  const isMasked = Boolean(mask);
12198
- const handlePlainChange = React66__namespace.useCallback(
12204
+ const handlePlainChange = React67__namespace.useCallback(
12199
12205
  (e4) => {
12200
12206
  var _a;
12201
12207
  const displayed = (_a = e4.target.value) != null ? _a : "";
@@ -12226,7 +12232,7 @@ var ShadcnTextVariant = React66__namespace.forwardRef(function ShadcnTextVariant
12226
12232
  },
12227
12233
  [onValue, prefix, suffix, stripPrefix, stripSuffix]
12228
12234
  );
12229
- const handleMaskedChange = React66__namespace.useCallback(
12235
+ const handleMaskedChange = React67__namespace.useCallback(
12230
12236
  (e4) => {
12231
12237
  var _a, _b, _c;
12232
12238
  const maskedValue = (_a = e4.value) != null ? _a : "";
@@ -12444,8 +12450,8 @@ function normalizeEditable(raw, locale, decimalSep, allowMinus) {
12444
12450
  if (t4 === decimalSep) t4 = "0" + decimalSep;
12445
12451
  return t4;
12446
12452
  }
12447
- var InputNumber = React66__namespace.memo(
12448
- React66__namespace.forwardRef((inProps, ref) => {
12453
+ var InputNumber = React67__namespace.memo(
12454
+ React67__namespace.forwardRef((inProps, ref) => {
12449
12455
  var _a;
12450
12456
  const props = {
12451
12457
  allowEmpty: true,
@@ -12460,19 +12466,19 @@ var InputNumber = React66__namespace.memo(
12460
12466
  type: "text",
12461
12467
  ...inProps
12462
12468
  };
12463
- const locale = React66__namespace.useMemo(
12469
+ const locale = React67__namespace.useMemo(
12464
12470
  () => resolveLocale(props.locale),
12465
12471
  [props.locale]
12466
12472
  );
12467
- const decimalSep = React66__namespace.useMemo(
12473
+ const decimalSep = React67__namespace.useMemo(
12468
12474
  () => getDecimalSeparator(locale),
12469
12475
  [locale]
12470
12476
  );
12471
- const allowMinus = React66__namespace.useMemo(
12477
+ const allowMinus = React67__namespace.useMemo(
12472
12478
  () => props.min == null || props.min < 0,
12473
12479
  [props.min]
12474
12480
  );
12475
- const fmtOptions = React66__namespace.useMemo(() => {
12481
+ const fmtOptions = React67__namespace.useMemo(() => {
12476
12482
  return {
12477
12483
  localeMatcher: props.localeMatcher,
12478
12484
  style: props.mode,
@@ -12493,22 +12499,22 @@ var InputNumber = React66__namespace.memo(
12493
12499
  props.maxFractionDigits,
12494
12500
  props.roundingMode
12495
12501
  ]);
12496
- const inputRef = React66__namespace.useRef(null);
12497
- React66__namespace.useImperativeHandle(ref, () => inputRef.current);
12498
- const [display, setDisplay] = React66__namespace.useState("");
12499
- const [focused, setFocused] = React66__namespace.useState(false);
12500
- const toEditableFromNumber = React66__namespace.useCallback(
12502
+ const inputRef = React67__namespace.useRef(null);
12503
+ React67__namespace.useImperativeHandle(ref, () => inputRef.current);
12504
+ const [display, setDisplay] = React67__namespace.useState("");
12505
+ const [focused, setFocused] = React67__namespace.useState(false);
12506
+ const toEditableFromNumber = React67__namespace.useCallback(
12501
12507
  (n3) => {
12502
12508
  const s3 = String(n3);
12503
12509
  return decimalSep === "." ? s3 : s3.replace(".", decimalSep);
12504
12510
  },
12505
12511
  [decimalSep]
12506
12512
  );
12507
- const clampModel = React66__namespace.useCallback(
12513
+ const clampModel = React67__namespace.useCallback(
12508
12514
  (n3) => clampToLimits(n3, props.min, props.max),
12509
12515
  [props.min, props.max]
12510
12516
  );
12511
- const emit = React66__namespace.useCallback(
12517
+ const emit = React67__namespace.useCallback(
12512
12518
  (event, value2) => {
12513
12519
  var _a2, _b, _c;
12514
12520
  const safeValue = sanitizeNumberish(value2);
@@ -12543,7 +12549,7 @@ var InputNumber = React66__namespace.memo(
12543
12549
  }
12544
12550
  });
12545
12551
  };
12546
- const formatFromModel = React66__namespace.useCallback(
12552
+ const formatFromModel = React67__namespace.useCallback(
12547
12553
  (n3) => {
12548
12554
  const safeNumber = sanitizeNumberish(n3);
12549
12555
  if (safeNumber == null) return "";
@@ -12566,7 +12572,7 @@ var InputNumber = React66__namespace.memo(
12566
12572
  toEditableFromNumber
12567
12573
  ]
12568
12574
  );
12569
- const getModelFromDisplay = React66__namespace.useCallback(
12575
+ const getModelFromDisplay = React67__namespace.useCallback(
12570
12576
  (text) => {
12571
12577
  const stripped = stripAffixes2(text, props.prefix, props.suffix);
12572
12578
  const withoutGroup = stripGrouping(stripped, locale);
@@ -12578,7 +12584,7 @@ var InputNumber = React66__namespace.memo(
12578
12584
  },
12579
12585
  [props.prefix, props.suffix, locale, decimalSep, clampModel]
12580
12586
  );
12581
- const syncFromPropsValue = React66__namespace.useCallback(
12587
+ const syncFromPropsValue = React67__namespace.useCallback(
12582
12588
  (v2) => {
12583
12589
  const safeValue = sanitizeNumberish(v2);
12584
12590
  if (safeValue == null) {
@@ -12592,11 +12598,11 @@ var InputNumber = React66__namespace.memo(
12592
12598
  },
12593
12599
  [clampModel, focused, toEditableFromNumber, formatFromModel]
12594
12600
  );
12595
- React66__namespace.useEffect(() => {
12601
+ React67__namespace.useEffect(() => {
12596
12602
  var _a2;
12597
12603
  syncFromPropsValue((_a2 = props.value) != null ? _a2 : null);
12598
12604
  }, []);
12599
- React66__namespace.useEffect(() => {
12605
+ React67__namespace.useEffect(() => {
12600
12606
  var _a2;
12601
12607
  if (focused) return;
12602
12608
  syncFromPropsValue((_a2 = props.value) != null ? _a2 : null);
@@ -12689,6 +12695,25 @@ var InputNumber = React66__namespace.memo(
12689
12695
  value,
12690
12696
  icon,
12691
12697
  iconGap,
12698
+ // Destructure to prevent leakage:
12699
+ locale: _locale,
12700
+ localeMatcher,
12701
+ mode,
12702
+ currency,
12703
+ currencyDisplay,
12704
+ useGrouping,
12705
+ minFractionDigits,
12706
+ maxFractionDigits,
12707
+ roundingMode,
12708
+ min: min2,
12709
+ max: max2,
12710
+ step,
12711
+ allowEmpty,
12712
+ format: format2,
12713
+ invalid,
12714
+ onValueChange,
12715
+ onChange,
12716
+ onValue,
12692
12717
  ...passThroughProps
12693
12718
  } = props;
12694
12719
  return (
@@ -12730,7 +12755,7 @@ InputNumber.displayName = "InputNumber";
12730
12755
  function sanitizeNumberish2(value) {
12731
12756
  return typeof value === "number" && Number.isFinite(value) ? value : null;
12732
12757
  }
12733
- var ShadcnNumberVariant = React66__namespace.default.forwardRef(function ShadcnNumberVariant2(props, forwardedRef) {
12758
+ var ShadcnNumberVariant = React67__namespace.default.forwardRef(function ShadcnNumberVariant2(props, forwardedRef) {
12734
12759
  const {
12735
12760
  showButtons,
12736
12761
  buttonLayout = "stacked",
@@ -12748,7 +12773,7 @@ var ShadcnNumberVariant = React66__namespace.default.forwardRef(function ShadcnN
12748
12773
  id,
12749
12774
  inputId
12750
12775
  } = rest;
12751
- const handleChange = React66__namespace.default.useCallback(
12776
+ const handleChange = React67__namespace.default.useCallback(
12752
12777
  (e4) => {
12753
12778
  const safeValue = sanitizeNumberish2(e4.value);
12754
12779
  if (onValueChange) {
@@ -12761,7 +12786,7 @@ var ShadcnNumberVariant = React66__namespace.default.forwardRef(function ShadcnN
12761
12786
  },
12762
12787
  [onValueChange]
12763
12788
  );
12764
- const handleStep = React66__namespace.default.useCallback(
12789
+ const handleStep = React67__namespace.default.useCallback(
12765
12790
  (direction, originalEvent) => {
12766
12791
  var _a, _b;
12767
12792
  if (disabled) return;
@@ -13279,7 +13304,7 @@ var CountrySelect = ({
13279
13304
  }) })
13280
13305
  ] }) });
13281
13306
  };
13282
- var ShadcnPhoneVariant = React66__namespace.forwardRef(function ShadcnPhoneVariant2(props, ref) {
13307
+ var ShadcnPhoneVariant = React67__namespace.forwardRef(function ShadcnPhoneVariant2(props, ref) {
13283
13308
  const {
13284
13309
  countries: countriesProp,
13285
13310
  defaultCountry,
@@ -13304,8 +13329,8 @@ var ShadcnPhoneVariant = React66__namespace.forwardRef(function ShadcnPhoneVaria
13304
13329
  } = props;
13305
13330
  let DEFAULT_COUNTRIES2 = getGlobalCountryList();
13306
13331
  const defaultCountries = countriesProp && countriesProp.length > 0 ? countriesProp : DEFAULT_COUNTRIES2;
13307
- const [countries, setLoadedCountries] = React66__namespace.useState(defaultCountries);
13308
- React66__namespace.useEffect(() => {
13332
+ const [countries, setLoadedCountries] = React67__namespace.useState(defaultCountries);
13333
+ React67__namespace.useEffect(() => {
13309
13334
  if (countriesProp == null ? void 0 : countriesProp.length) return;
13310
13335
  const list = getPaletteUtil("countries");
13311
13336
  if (list == null ? void 0 : list.length) {
@@ -13318,7 +13343,7 @@ var ShadcnPhoneVariant = React66__namespace.forwardRef(function ShadcnPhoneVaria
13318
13343
  });
13319
13344
  }
13320
13345
  }, []);
13321
- const [country, setCountry] = React66__namespace.useState(() => {
13346
+ const [country, setCountry] = React67__namespace.useState(() => {
13322
13347
  var _a;
13323
13348
  if (defaultCountry) {
13324
13349
  const found = countries.find((c2) => c2.code === defaultCountry);
@@ -13326,7 +13351,7 @@ var ShadcnPhoneVariant = React66__namespace.forwardRef(function ShadcnPhoneVaria
13326
13351
  }
13327
13352
  return (_a = countries[0]) != null ? _a : DEFAULT_COUNTRIES2[0];
13328
13353
  });
13329
- React66__namespace.useEffect(() => {
13354
+ React67__namespace.useEffect(() => {
13330
13355
  setCountry((prev) => {
13331
13356
  var _a;
13332
13357
  if (defaultCountry) {
@@ -13337,13 +13362,13 @@ var ShadcnPhoneVariant = React66__namespace.forwardRef(function ShadcnPhoneVaria
13337
13362
  return (_a = stillThere != null ? stillThere : countries[0]) != null ? _a : prev;
13338
13363
  });
13339
13364
  }, [countries, defaultCountry]);
13340
- const [local, setLocal] = React66__namespace.useState(
13365
+ const [local, setLocal] = React67__namespace.useState(
13341
13366
  () => computeDisplayFromValue(value, country, keepCharPositions)
13342
13367
  );
13343
- React66__namespace.useEffect(() => {
13368
+ React67__namespace.useEffect(() => {
13344
13369
  setLocal(computeDisplayFromValue(value, country, keepCharPositions));
13345
13370
  }, [value, country, keepCharPositions]);
13346
- const handleInputChange = React66__namespace.useCallback(
13371
+ const handleInputChange = React67__namespace.useCallback(
13347
13372
  (event) => {
13348
13373
  var _a;
13349
13374
  const rawInput = (_a = event.target.value) != null ? _a : "";
@@ -13369,7 +13394,7 @@ var ShadcnPhoneVariant = React66__namespace.forwardRef(function ShadcnPhoneVaria
13369
13394
  },
13370
13395
  [country, valueMode, keepCharPositions, onValue]
13371
13396
  );
13372
- const handleCountryChange = React66__namespace.useCallback(
13397
+ const handleCountryChange = React67__namespace.useCallback(
13373
13398
  (nextCode) => {
13374
13399
  var _a;
13375
13400
  const nextCountry = (_a = countries.find((c2) => c2.code === nextCode)) != null ? _a : countries[0];
@@ -13456,7 +13481,7 @@ function normalizeColorForPicker(value) {
13456
13481
  }
13457
13482
  return "#000000";
13458
13483
  }
13459
- var ShadcnColorVariant = React66__namespace.forwardRef(function ShadcnColorVariant2(props, ref) {
13484
+ var ShadcnColorVariant = React67__namespace.forwardRef(function ShadcnColorVariant2(props, ref) {
13460
13485
  const {
13461
13486
  // variant contract
13462
13487
  value,
@@ -13477,22 +13502,22 @@ var ShadcnColorVariant = React66__namespace.forwardRef(function ShadcnColorVaria
13477
13502
  // everything else → Input (size, density, className, icons, etc.)
13478
13503
  ...restTextProps
13479
13504
  } = props;
13480
- const [local, setLocal] = React66__namespace.useState(value != null ? value : "");
13481
- const [pickerOpen, setPickerOpen] = React66__namespace.useState(false);
13482
- React66__namespace.useEffect(() => {
13505
+ const [local, setLocal] = React67__namespace.useState(value != null ? value : "");
13506
+ const [pickerOpen, setPickerOpen] = React67__namespace.useState(false);
13507
+ React67__namespace.useEffect(() => {
13483
13508
  setLocal(value != null ? value : "");
13484
13509
  }, [value]);
13485
- const pickerRef = React66__namespace.useRef(null);
13510
+ const pickerRef = React67__namespace.useRef(null);
13486
13511
  const effectiveColor = normalizeColorForPicker(local || value);
13487
13512
  const showError = Boolean(error);
13488
- const openSystemPicker = React66__namespace.useCallback(() => {
13513
+ const openSystemPicker = React67__namespace.useCallback(() => {
13489
13514
  setPickerOpen(true);
13490
13515
  window.setTimeout(() => {
13491
13516
  var _a;
13492
13517
  (_a = pickerRef.current) == null ? void 0 : _a.click();
13493
13518
  }, 0);
13494
13519
  }, []);
13495
- const handleTextChange = React66__namespace.useCallback(
13520
+ const handleTextChange = React67__namespace.useCallback(
13496
13521
  (event) => {
13497
13522
  var _a;
13498
13523
  const next = (_a = event.target.value) != null ? _a : "";
@@ -13509,7 +13534,7 @@ var ShadcnColorVariant = React66__namespace.forwardRef(function ShadcnColorVaria
13509
13534
  },
13510
13535
  [onValue]
13511
13536
  );
13512
- const handlePickerChange = React66__namespace.useCallback(
13537
+ const handlePickerChange = React67__namespace.useCallback(
13513
13538
  (event) => {
13514
13539
  var _a;
13515
13540
  const next = (_a = event.target.value) != null ? _a : "";
@@ -13527,7 +13552,7 @@ var ShadcnColorVariant = React66__namespace.forwardRef(function ShadcnColorVaria
13527
13552
  },
13528
13553
  [onValue]
13529
13554
  );
13530
- const handlePickerBlur = React66__namespace.useCallback(() => {
13555
+ const handlePickerBlur = React67__namespace.useCallback(() => {
13531
13556
  setPickerOpen(false);
13532
13557
  }, []);
13533
13558
  const leadingControl = showPreview ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -13829,7 +13854,7 @@ function meterColor(score) {
13829
13854
  if (score === 3) return "bg-amber-500";
13830
13855
  return "bg-emerald-500";
13831
13856
  }
13832
- var ShadcnPasswordVariant = React66__namespace.forwardRef(function ShadcnPasswordVariant2(props, ref) {
13857
+ var ShadcnPasswordVariant = React67__namespace.forwardRef(function ShadcnPasswordVariant2(props, ref) {
13833
13858
  var _a, _b;
13834
13859
  const {
13835
13860
  // base variant bits
@@ -13865,18 +13890,18 @@ var ShadcnPasswordVariant = React66__namespace.forwardRef(function ShadcnPasswor
13865
13890
  // everything else from Shadcn text UI
13866
13891
  ...restTextProps
13867
13892
  } = props;
13868
- const [revealed, setRevealed] = React66__namespace.useState(
13893
+ const [revealed, setRevealed] = React67__namespace.useState(
13869
13894
  Boolean(defaultRevealed)
13870
13895
  );
13871
- const normalizedStrength = React66__namespace.useMemo(
13896
+ const normalizedStrength = React67__namespace.useMemo(
13872
13897
  () => normalizeStrengthOptions(strengthMeter),
13873
13898
  [strengthMeter]
13874
13899
  );
13875
- const effectiveRuleDefinitions = React66__namespace.useMemo(
13900
+ const effectiveRuleDefinitions = React67__namespace.useMemo(
13876
13901
  () => getMergedRuleDefinitions(ruleDefinitions),
13877
13902
  [ruleDefinitions]
13878
13903
  );
13879
- const meterState = React66__namespace.useMemo(() => {
13904
+ const meterState = React67__namespace.useMemo(() => {
13880
13905
  if (!normalizedStrength) return null;
13881
13906
  const v2 = value != null ? value : "";
13882
13907
  return computeMeterState(
@@ -13886,14 +13911,14 @@ var ShadcnPasswordVariant = React66__namespace.forwardRef(function ShadcnPasswor
13886
13911
  ruleUses
13887
13912
  );
13888
13913
  }, [normalizedStrength, value, ruleUses, effectiveRuleDefinitions]);
13889
- const handleToggleReveal = React66__namespace.useCallback(() => {
13914
+ const handleToggleReveal = React67__namespace.useCallback(() => {
13890
13915
  setRevealed((prev) => {
13891
13916
  const next = !prev;
13892
13917
  onRevealChange == null ? void 0 : onRevealChange(next);
13893
13918
  return next;
13894
13919
  });
13895
13920
  }, [onRevealChange]);
13896
- const handleChange = React66__namespace.useCallback(
13921
+ const handleChange = React67__namespace.useCallback(
13897
13922
  (event) => {
13898
13923
  var _a2;
13899
13924
  const next = (_a2 = event.target.value) != null ? _a2 : "";
@@ -16543,38 +16568,38 @@ __export(custom_components_exports, {
16543
16568
  YearsDropdown: () => YearsDropdown
16544
16569
  });
16545
16570
  function Button(props) {
16546
- return React66__namespace.default.createElement("button", { ...props });
16571
+ return React67__namespace.default.createElement("button", { ...props });
16547
16572
  }
16548
16573
  function CaptionLabel(props) {
16549
- return React66__namespace.default.createElement("span", { ...props });
16574
+ return React67__namespace.default.createElement("span", { ...props });
16550
16575
  }
16551
16576
  function Chevron(props) {
16552
16577
  const { size = 24, orientation = "left", className } = props;
16553
16578
  return (
16554
16579
  // biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
16555
- React66__namespace.default.createElement(
16580
+ React67__namespace.default.createElement(
16556
16581
  "svg",
16557
16582
  { className, width: size, height: size, viewBox: "0 0 24 24" },
16558
- orientation === "up" && React66__namespace.default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
16559
- orientation === "down" && React66__namespace.default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
16560
- orientation === "left" && React66__namespace.default.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
16561
- orientation === "right" && React66__namespace.default.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
16583
+ orientation === "up" && React67__namespace.default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
16584
+ orientation === "down" && React67__namespace.default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
16585
+ orientation === "left" && React67__namespace.default.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
16586
+ orientation === "right" && React67__namespace.default.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
16562
16587
  )
16563
16588
  );
16564
16589
  }
16565
16590
  function Day(props) {
16566
16591
  const { day, modifiers, ...tdProps } = props;
16567
- return React66__namespace.default.createElement("td", { ...tdProps });
16592
+ return React67__namespace.default.createElement("td", { ...tdProps });
16568
16593
  }
16569
16594
  function DayButton(props) {
16570
16595
  const { day, modifiers, ...buttonProps } = props;
16571
- const ref = React66__namespace.default.useRef(null);
16572
- React66__namespace.default.useEffect(() => {
16596
+ const ref = React67__namespace.default.useRef(null);
16597
+ React67__namespace.default.useEffect(() => {
16573
16598
  var _a;
16574
16599
  if (modifiers.focused)
16575
16600
  (_a = ref.current) == null ? void 0 : _a.focus();
16576
16601
  }, [modifiers.focused]);
16577
- return React66__namespace.default.createElement("button", { ref, ...buttonProps });
16602
+ return React67__namespace.default.createElement("button", { ref, ...buttonProps });
16578
16603
  }
16579
16604
 
16580
16605
  // ../../node_modules/react-day-picker/dist/esm/UI.js
@@ -16637,41 +16662,41 @@ function Dropdown(props) {
16637
16662
  const { options, className, components, classNames, ...selectProps } = props;
16638
16663
  const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
16639
16664
  const selectedOption = options == null ? void 0 : options.find(({ value }) => value === selectProps.value);
16640
- return React66__namespace.default.createElement(
16665
+ return React67__namespace.default.createElement(
16641
16666
  "span",
16642
16667
  { "data-disabled": selectProps.disabled, className: classNames[UI.DropdownRoot] },
16643
- React66__namespace.default.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options == null ? void 0 : options.map(({ value, label, disabled }) => React66__namespace.default.createElement(components.Option, { key: value, value, disabled }, label))),
16644
- React66__namespace.default.createElement(
16668
+ React67__namespace.default.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options == null ? void 0 : options.map(({ value, label, disabled }) => React67__namespace.default.createElement(components.Option, { key: value, value, disabled }, label))),
16669
+ React67__namespace.default.createElement(
16645
16670
  "span",
16646
16671
  { className: classNames[UI.CaptionLabel], "aria-hidden": true },
16647
16672
  selectedOption == null ? void 0 : selectedOption.label,
16648
- React66__namespace.default.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron] })
16673
+ React67__namespace.default.createElement(components.Chevron, { orientation: "down", size: 18, className: classNames[UI.Chevron] })
16649
16674
  )
16650
16675
  );
16651
16676
  }
16652
16677
  function DropdownNav(props) {
16653
- return React66__namespace.default.createElement("div", { ...props });
16678
+ return React67__namespace.default.createElement("div", { ...props });
16654
16679
  }
16655
16680
  function Footer(props) {
16656
- return React66__namespace.default.createElement("div", { ...props });
16681
+ return React67__namespace.default.createElement("div", { ...props });
16657
16682
  }
16658
16683
  function Month(props) {
16659
16684
  const { calendarMonth, displayIndex, ...divProps } = props;
16660
- return React66__namespace.default.createElement("div", { ...divProps }, props.children);
16685
+ return React67__namespace.default.createElement("div", { ...divProps }, props.children);
16661
16686
  }
16662
16687
  function MonthCaption(props) {
16663
16688
  const { calendarMonth, displayIndex, ...divProps } = props;
16664
- return React66__namespace.default.createElement("div", { ...divProps });
16689
+ return React67__namespace.default.createElement("div", { ...divProps });
16665
16690
  }
16666
16691
  function MonthGrid(props) {
16667
- return React66__namespace.default.createElement("table", { ...props });
16692
+ return React67__namespace.default.createElement("table", { ...props });
16668
16693
  }
16669
16694
  function Months(props) {
16670
- return React66__namespace.default.createElement("div", { ...props });
16695
+ return React67__namespace.default.createElement("div", { ...props });
16671
16696
  }
16672
- var dayPickerContext = React66.createContext(void 0);
16697
+ var dayPickerContext = React67.createContext(void 0);
16673
16698
  function useDayPicker() {
16674
- const context = React66.useContext(dayPickerContext);
16699
+ const context = React67.useContext(dayPickerContext);
16675
16700
  if (context === void 0) {
16676
16701
  throw new Error("useDayPicker() must be used within a custom component.");
16677
16702
  }
@@ -16681,81 +16706,81 @@ function useDayPicker() {
16681
16706
  // ../../node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js
16682
16707
  function MonthsDropdown(props) {
16683
16708
  const { components } = useDayPicker();
16684
- return React66__namespace.default.createElement(components.Dropdown, { ...props });
16709
+ return React67__namespace.default.createElement(components.Dropdown, { ...props });
16685
16710
  }
16686
16711
  function Nav(props) {
16687
16712
  const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;
16688
16713
  const { components, classNames, labels: { labelPrevious: labelPrevious2, labelNext: labelNext2 } } = useDayPicker();
16689
- const handleNextClick = React66.useCallback((e4) => {
16714
+ const handleNextClick = React67.useCallback((e4) => {
16690
16715
  if (nextMonth) {
16691
16716
  onNextClick == null ? void 0 : onNextClick(e4);
16692
16717
  }
16693
16718
  }, [nextMonth, onNextClick]);
16694
- const handlePreviousClick = React66.useCallback((e4) => {
16719
+ const handlePreviousClick = React67.useCallback((e4) => {
16695
16720
  if (previousMonth) {
16696
16721
  onPreviousClick == null ? void 0 : onPreviousClick(e4);
16697
16722
  }
16698
16723
  }, [previousMonth, onPreviousClick]);
16699
- return React66__namespace.default.createElement(
16724
+ return React67__namespace.default.createElement(
16700
16725
  "nav",
16701
16726
  { ...navProps },
16702
- React66__namespace.default.createElement(
16727
+ React67__namespace.default.createElement(
16703
16728
  components.PreviousMonthButton,
16704
16729
  { type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick },
16705
- React66__namespace.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: "left" })
16730
+ React67__namespace.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: "left" })
16706
16731
  ),
16707
- React66__namespace.default.createElement(
16732
+ React67__namespace.default.createElement(
16708
16733
  components.NextMonthButton,
16709
16734
  { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick },
16710
- React66__namespace.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron] })
16735
+ React67__namespace.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, orientation: "right", className: classNames[UI.Chevron] })
16711
16736
  )
16712
16737
  );
16713
16738
  }
16714
16739
  function NextMonthButton(props) {
16715
16740
  const { components } = useDayPicker();
16716
- return React66__namespace.default.createElement(components.Button, { ...props });
16741
+ return React67__namespace.default.createElement(components.Button, { ...props });
16717
16742
  }
16718
16743
  function Option(props) {
16719
- return React66__namespace.default.createElement("option", { ...props });
16744
+ return React67__namespace.default.createElement("option", { ...props });
16720
16745
  }
16721
16746
  function PreviousMonthButton(props) {
16722
16747
  const { components } = useDayPicker();
16723
- return React66__namespace.default.createElement(components.Button, { ...props });
16748
+ return React67__namespace.default.createElement(components.Button, { ...props });
16724
16749
  }
16725
16750
  function Root3(props) {
16726
16751
  const { rootRef, ...rest } = props;
16727
- return React66__namespace.default.createElement("div", { ...rest, ref: rootRef });
16752
+ return React67__namespace.default.createElement("div", { ...rest, ref: rootRef });
16728
16753
  }
16729
16754
  function Select2(props) {
16730
- return React66__namespace.default.createElement("select", { ...props });
16755
+ return React67__namespace.default.createElement("select", { ...props });
16731
16756
  }
16732
16757
  function Week(props) {
16733
16758
  const { week, ...trProps } = props;
16734
- return React66__namespace.default.createElement("tr", { ...trProps });
16759
+ return React67__namespace.default.createElement("tr", { ...trProps });
16735
16760
  }
16736
16761
  function Weekday(props) {
16737
- return React66__namespace.default.createElement("th", { ...props });
16762
+ return React67__namespace.default.createElement("th", { ...props });
16738
16763
  }
16739
16764
  function Weekdays(props) {
16740
- return React66__namespace.default.createElement(
16765
+ return React67__namespace.default.createElement(
16741
16766
  "thead",
16742
16767
  { "aria-hidden": true },
16743
- React66__namespace.default.createElement("tr", { ...props })
16768
+ React67__namespace.default.createElement("tr", { ...props })
16744
16769
  );
16745
16770
  }
16746
16771
  function WeekNumber(props) {
16747
16772
  const { week, ...thProps } = props;
16748
- return React66__namespace.default.createElement("th", { ...thProps });
16773
+ return React67__namespace.default.createElement("th", { ...thProps });
16749
16774
  }
16750
16775
  function WeekNumberHeader(props) {
16751
- return React66__namespace.default.createElement("th", { ...props });
16776
+ return React67__namespace.default.createElement("th", { ...props });
16752
16777
  }
16753
16778
  function Weeks(props) {
16754
- return React66__namespace.default.createElement("tbody", { ...props });
16779
+ return React67__namespace.default.createElement("tbody", { ...props });
16755
16780
  }
16756
16781
  function YearsDropdown(props) {
16757
16782
  const { components } = useDayPicker();
16758
- return React66__namespace.default.createElement(components.Dropdown, { ...props });
16783
+ return React67__namespace.default.createElement(components.Dropdown, { ...props });
16759
16784
  }
16760
16785
 
16761
16786
  // ../../node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
@@ -17238,10 +17263,10 @@ var queryWeeksEl = (element) => asHtmlElement(element.querySelector("[data-anima
17238
17263
  var queryNavEl = (element) => asHtmlElement(element.querySelector("[data-animated-nav]"));
17239
17264
  var queryWeekdaysEl = (element) => asHtmlElement(element.querySelector("[data-animated-weekdays]"));
17240
17265
  function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib }) {
17241
- const previousRootElSnapshotRef = React66.useRef(null);
17242
- const previousMonthsRef = React66.useRef(months);
17243
- const animatingRef = React66.useRef(false);
17244
- React66.useLayoutEffect(() => {
17266
+ const previousRootElSnapshotRef = React67.useRef(null);
17267
+ const previousMonthsRef = React67.useRef(months);
17268
+ const animatingRef = React67.useRef(false);
17269
+ React67.useLayoutEffect(() => {
17245
17270
  const previousMonths = previousMonthsRef.current;
17246
17271
  previousMonthsRef.current = months;
17247
17272
  if (!enabled || !rootElRef.current || // safety check because the ref can be set to anything by consumers
@@ -17541,7 +17566,7 @@ function getWeeks(months) {
17541
17566
  }, initialWeeks.slice());
17542
17567
  }
17543
17568
  function useControlledValue(defaultValue, controlledValue) {
17544
- const [uncontrolledValue, setValue] = React66.useState(defaultValue);
17569
+ const [uncontrolledValue, setValue] = React67.useState(defaultValue);
17545
17570
  const value = controlledValue === void 0 ? uncontrolledValue : controlledValue;
17546
17571
  return [value, setValue];
17547
17572
  }
@@ -17557,11 +17582,11 @@ function useCalendar(props, dateLib) {
17557
17582
  // initialMonth is always computed from props.month if provided
17558
17583
  props.month ? initialMonth : void 0
17559
17584
  );
17560
- React66.useEffect(() => {
17585
+ React67.useEffect(() => {
17561
17586
  const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
17562
17587
  setFirstMonth(newInitialMonth);
17563
17588
  }, [props.timeZone]);
17564
- const { months, weeks, days, previousMonth, nextMonth } = React66.useMemo(() => {
17589
+ const { months, weeks, days, previousMonth, nextMonth } = React67.useMemo(() => {
17565
17590
  const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);
17566
17591
  const dates = getDates(displayMonths, props.endMonth ? endOfMonth2(props.endMonth) : void 0, {
17567
17592
  ISOWeek: props.ISOWeek,
@@ -17713,9 +17738,9 @@ function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMo
17713
17738
  // ../../node_modules/react-day-picker/dist/esm/useFocus.js
17714
17739
  function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
17715
17740
  const { autoFocus } = props;
17716
- const [lastFocused, setLastFocused] = React66.useState();
17741
+ const [lastFocused, setLastFocused] = React67.useState();
17717
17742
  const focusTarget = calculateFocusTarget(calendar.days, getModifiers, isSelected || (() => false), lastFocused);
17718
- const [focusedDay, setFocused] = React66.useState(autoFocus ? focusTarget : void 0);
17743
+ const [focusedDay, setFocused] = React67.useState(autoFocus ? focusTarget : void 0);
17719
17744
  const blur = () => {
17720
17745
  setLastFocused(focusedDay);
17721
17746
  setFocused(void 0);
@@ -18096,7 +18121,7 @@ function DayPicker(initialProps) {
18096
18121
  props.modifiers = nextModifiers;
18097
18122
  }
18098
18123
  }
18099
- const { components, formatters: formatters2, labels, dateLib, locale, classNames } = React66.useMemo(() => {
18124
+ const { components, formatters: formatters2, labels, dateLib, locale, classNames } = React67.useMemo(() => {
18100
18125
  const locale2 = { ...enUS2, ...props.locale };
18101
18126
  const dateLib2 = new DateLib({
18102
18127
  locale: locale2,
@@ -18141,21 +18166,21 @@ function DayPicker(initialProps) {
18141
18166
  const { isSelected, select, selected: selectedValue } = (_b = useSelection(props, dateLib)) != null ? _b : {};
18142
18167
  const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : (() => false), dateLib);
18143
18168
  const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
18144
- const weekdays = React66.useMemo(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
18169
+ const weekdays = React67.useMemo(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
18145
18170
  const isInteractive = mode !== void 0 || onDayClick !== void 0;
18146
- const handlePreviousClick = React66.useCallback(() => {
18171
+ const handlePreviousClick = React67.useCallback(() => {
18147
18172
  if (!previousMonth)
18148
18173
  return;
18149
18174
  goToMonth(previousMonth);
18150
18175
  onPrevClick == null ? void 0 : onPrevClick(previousMonth);
18151
18176
  }, [previousMonth, goToMonth, onPrevClick]);
18152
- const handleNextClick = React66.useCallback(() => {
18177
+ const handleNextClick = React67.useCallback(() => {
18153
18178
  if (!nextMonth)
18154
18179
  return;
18155
18180
  goToMonth(nextMonth);
18156
18181
  onNextClick == null ? void 0 : onNextClick(nextMonth);
18157
18182
  }, [goToMonth, nextMonth, onNextClick]);
18158
- const handleDayClick = React66.useCallback((day, m2) => (e4) => {
18183
+ const handleDayClick = React67.useCallback((day, m2) => (e4) => {
18159
18184
  e4.preventDefault();
18160
18185
  e4.stopPropagation();
18161
18186
  setFocused(day);
@@ -18165,15 +18190,15 @@ function DayPicker(initialProps) {
18165
18190
  select == null ? void 0 : select(day.date, m2, e4);
18166
18191
  onDayClick == null ? void 0 : onDayClick(day.date, m2, e4);
18167
18192
  }, [select, onDayClick, setFocused]);
18168
- const handleDayFocus = React66.useCallback((day, m2) => (e4) => {
18193
+ const handleDayFocus = React67.useCallback((day, m2) => (e4) => {
18169
18194
  setFocused(day);
18170
18195
  onDayFocus == null ? void 0 : onDayFocus(day.date, m2, e4);
18171
18196
  }, [onDayFocus, setFocused]);
18172
- const handleDayBlur = React66.useCallback((day, m2) => (e4) => {
18197
+ const handleDayBlur = React67.useCallback((day, m2) => (e4) => {
18173
18198
  blur();
18174
18199
  onDayBlur == null ? void 0 : onDayBlur(day.date, m2, e4);
18175
18200
  }, [blur, onDayBlur]);
18176
- const handleDayKeyDown = React66.useCallback((day, modifiers) => (e4) => {
18201
+ const handleDayKeyDown = React67.useCallback((day, modifiers) => (e4) => {
18177
18202
  const keyMap = {
18178
18203
  ArrowLeft: [
18179
18204
  e4.shiftKey ? "month" : "day",
@@ -18198,28 +18223,28 @@ function DayPicker(initialProps) {
18198
18223
  }
18199
18224
  onDayKeyDown == null ? void 0 : onDayKeyDown(day.date, modifiers, e4);
18200
18225
  }, [moveFocus, onDayKeyDown, props.dir]);
18201
- const handleDayMouseEnter = React66.useCallback((day, modifiers) => (e4) => {
18226
+ const handleDayMouseEnter = React67.useCallback((day, modifiers) => (e4) => {
18202
18227
  onDayMouseEnter == null ? void 0 : onDayMouseEnter(day.date, modifiers, e4);
18203
18228
  }, [onDayMouseEnter]);
18204
- const handleDayMouseLeave = React66.useCallback((day, modifiers) => (e4) => {
18229
+ const handleDayMouseLeave = React67.useCallback((day, modifiers) => (e4) => {
18205
18230
  onDayMouseLeave == null ? void 0 : onDayMouseLeave(day.date, modifiers, e4);
18206
18231
  }, [onDayMouseLeave]);
18207
- const handleMonthChange = React66.useCallback((date) => (e4) => {
18232
+ const handleMonthChange = React67.useCallback((date) => (e4) => {
18208
18233
  const selectedMonth = Number(e4.target.value);
18209
18234
  const month = dateLib.setMonth(dateLib.startOfMonth(date), selectedMonth);
18210
18235
  goToMonth(month);
18211
18236
  }, [dateLib, goToMonth]);
18212
- const handleYearChange = React66.useCallback((date) => (e4) => {
18237
+ const handleYearChange = React67.useCallback((date) => (e4) => {
18213
18238
  const selectedYear = Number(e4.target.value);
18214
18239
  const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);
18215
18240
  goToMonth(month);
18216
18241
  }, [dateLib, goToMonth]);
18217
- const { className, style } = React66.useMemo(() => ({
18242
+ const { className, style } = React67.useMemo(() => ({
18218
18243
  className: [classNames[UI.Root], props.className].filter(Boolean).join(" "),
18219
18244
  style: { ...styles == null ? void 0 : styles[UI.Root], ...props.style }
18220
18245
  }), [classNames, props.className, props.style, styles]);
18221
18246
  const dataAttributes = getDataAttributes(props);
18222
- const rootElRef = React66.useRef(null);
18247
+ const rootElRef = React67.useRef(null);
18223
18248
  useAnimation(rootElRef, Boolean(props.animate), {
18224
18249
  classNames,
18225
18250
  months,
@@ -18242,18 +18267,18 @@ function DayPicker(initialProps) {
18242
18267
  labels,
18243
18268
  formatters: formatters2
18244
18269
  };
18245
- return React66__namespace.default.createElement(
18270
+ return React67__namespace.default.createElement(
18246
18271
  dayPickerContext.Provider,
18247
18272
  { value: contextValue },
18248
- React66__namespace.default.createElement(
18273
+ React67__namespace.default.createElement(
18249
18274
  components.Root,
18250
18275
  { rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"], ...dataAttributes },
18251
- React66__namespace.default.createElement(
18276
+ React67__namespace.default.createElement(
18252
18277
  components.Months,
18253
18278
  { className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
18254
- !props.hideNavigation && !navLayout && React66__namespace.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
18279
+ !props.hideNavigation && !navLayout && React67__namespace.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
18255
18280
  months.map((calendarMonth, displayIndex) => {
18256
- return React66__namespace.default.createElement(
18281
+ return React67__namespace.default.createElement(
18257
18282
  components.Month,
18258
18283
  {
18259
18284
  "data-animated-month": props.animate ? "true" : void 0,
@@ -18264,21 +18289,21 @@ function DayPicker(initialProps) {
18264
18289
  displayIndex,
18265
18290
  calendarMonth
18266
18291
  },
18267
- navLayout === "around" && !props.hideNavigation && displayIndex === 0 && React66__namespace.default.createElement(
18292
+ navLayout === "around" && !props.hideNavigation && displayIndex === 0 && React67__namespace.default.createElement(
18268
18293
  components.PreviousMonthButton,
18269
18294
  { type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
18270
- React66__namespace.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
18295
+ React67__namespace.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
18271
18296
  ),
18272
- React66__namespace.default.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI.MonthCaption], style: styles == null ? void 0 : styles[UI.MonthCaption], calendarMonth, displayIndex }, (captionLayout == null ? void 0 : captionLayout.startsWith("dropdown")) ? React66__namespace.default.createElement(
18297
+ React67__namespace.default.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI.MonthCaption], style: styles == null ? void 0 : styles[UI.MonthCaption], calendarMonth, displayIndex }, (captionLayout == null ? void 0 : captionLayout.startsWith("dropdown")) ? React67__namespace.default.createElement(
18273
18298
  components.DropdownNav,
18274
18299
  { className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
18275
18300
  (() => {
18276
- const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React66__namespace.default.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : React66__namespace.default.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
18277
- const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React66__namespace.default.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : React66__namespace.default.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
18301
+ const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React67__namespace.default.createElement(components.MonthsDropdown, { key: "month", className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : React67__namespace.default.createElement("span", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
18302
+ const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React67__namespace.default.createElement(components.YearsDropdown, { key: "year", className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : React67__namespace.default.createElement("span", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
18278
18303
  const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
18279
18304
  return controls;
18280
18305
  })(),
18281
- React66__namespace.default.createElement("span", { role: "status", "aria-live": "polite", style: {
18306
+ React67__namespace.default.createElement("span", { role: "status", "aria-live": "polite", style: {
18282
18307
  border: 0,
18283
18308
  clip: "rect(0 0 0 0)",
18284
18309
  height: "1px",
@@ -18290,27 +18315,27 @@ function DayPicker(initialProps) {
18290
18315
  whiteSpace: "nowrap",
18291
18316
  wordWrap: "normal"
18292
18317
  } }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
18293
- ) : React66__namespace.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
18294
- navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && React66__namespace.default.createElement(
18318
+ ) : React67__namespace.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
18319
+ navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && React67__namespace.default.createElement(
18295
18320
  components.NextMonthButton,
18296
18321
  { type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
18297
- React66__namespace.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
18322
+ React67__namespace.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
18298
18323
  ),
18299
- displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && React66__namespace.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
18300
- React66__namespace.default.createElement(
18324
+ displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && React67__namespace.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
18325
+ React67__namespace.default.createElement(
18301
18326
  components.MonthGrid,
18302
18327
  { role: "grid", "aria-multiselectable": mode === "multiple" || mode === "range", "aria-label": labelGrid2(calendarMonth.date, dateLib.options, dateLib) || void 0, className: classNames[UI.MonthGrid], style: styles == null ? void 0 : styles[UI.MonthGrid] },
18303
- !props.hideWeekdays && React66__namespace.default.createElement(
18328
+ !props.hideWeekdays && React67__namespace.default.createElement(
18304
18329
  components.Weekdays,
18305
18330
  { "data-animated-weekdays": props.animate ? "true" : void 0, className: classNames[UI.Weekdays], style: styles == null ? void 0 : styles[UI.Weekdays] },
18306
- showWeekNumber && React66__namespace.default.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader2(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles == null ? void 0 : styles[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader2()),
18307
- weekdays.map((weekday) => React66__namespace.default.createElement(components.Weekday, { "aria-label": labelWeekday2(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles == null ? void 0 : styles[UI.Weekday], scope: "col" }, formatWeekdayName2(weekday, dateLib.options, dateLib)))
18331
+ showWeekNumber && React67__namespace.default.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader2(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles == null ? void 0 : styles[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader2()),
18332
+ weekdays.map((weekday) => React67__namespace.default.createElement(components.Weekday, { "aria-label": labelWeekday2(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles == null ? void 0 : styles[UI.Weekday], scope: "col" }, formatWeekdayName2(weekday, dateLib.options, dateLib)))
18308
18333
  ),
18309
- React66__namespace.default.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles == null ? void 0 : styles[UI.Weeks] }, calendarMonth.weeks.map((week) => {
18310
- return React66__namespace.default.createElement(
18334
+ React67__namespace.default.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles == null ? void 0 : styles[UI.Weeks] }, calendarMonth.weeks.map((week) => {
18335
+ return React67__namespace.default.createElement(
18311
18336
  components.Week,
18312
18337
  { className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
18313
- showWeekNumber && React66__namespace.default.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
18338
+ showWeekNumber && React67__namespace.default.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
18314
18339
  locale
18315
18340
  }), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
18316
18341
  week.days.map((day) => {
@@ -18327,7 +18352,7 @@ function DayPicker(initialProps) {
18327
18352
  const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
18328
18353
  const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
18329
18354
  const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
18330
- return React66__namespace.default.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React66__namespace.default.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
18355
+ return React67__namespace.default.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? React67__namespace.default.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
18331
18356
  })
18332
18357
  );
18333
18358
  }))
@@ -18335,7 +18360,7 @@ function DayPicker(initialProps) {
18335
18360
  );
18336
18361
  })
18337
18362
  ),
18338
- props.footer && React66__namespace.default.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
18363
+ props.footer && React67__namespace.default.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
18339
18364
  )
18340
18365
  );
18341
18366
  }
@@ -18578,8 +18603,8 @@ function CalendarDayButton({
18578
18603
  ...props
18579
18604
  }) {
18580
18605
  const defaultClassNames = getDefaultClassNames();
18581
- const ref = React66__namespace.useRef(null);
18582
- React66__namespace.useEffect(() => {
18606
+ const ref = React67__namespace.useRef(null);
18607
+ React67__namespace.useEffect(() => {
18583
18608
  var _a;
18584
18609
  if (modifiers.focused) (_a = ref.current) == null ? void 0 : _a.focus();
18585
18610
  }, [modifiers.focused]);
@@ -18656,15 +18681,15 @@ var TimeDropdowns = (props) => {
18656
18681
  triggerClassName,
18657
18682
  density = "normal"
18658
18683
  } = props;
18659
- const minuteOptions = React66__namespace.useMemo(
18684
+ const minuteOptions = React67__namespace.useMemo(
18660
18685
  () => buildMinuteOptions(minuteStep),
18661
18686
  [minuteStep]
18662
18687
  );
18663
- const secondOptions = React66__namespace.useMemo(
18688
+ const secondOptions = React67__namespace.useMemo(
18664
18689
  () => buildSecondOptions(secondStep),
18665
18690
  [secondStep]
18666
18691
  );
18667
- const hourOptions = React66__namespace.useMemo(
18692
+ const hourOptions = React67__namespace.useMemo(
18668
18693
  () => use12Hour ? buildHourOptions12() : buildHourOptions24(),
18669
18694
  [use12Hour]
18670
18695
  );
@@ -19003,7 +19028,7 @@ function parseRawToDate(rawDigits, kind) {
19003
19028
  function meterSafeDigits(masked) {
19004
19029
  return masked.replace(/\D+/g, "");
19005
19030
  }
19006
- var ShadcnDateVariant = React66__namespace.forwardRef(function ShadcnDateVariant2(props, ref) {
19031
+ var ShadcnDateVariant = React67__namespace.forwardRef(function ShadcnDateVariant2(props, ref) {
19007
19032
  const {
19008
19033
  // variant base bits
19009
19034
  value,
@@ -19036,10 +19061,10 @@ var ShadcnDateVariant = React66__namespace.forwardRef(function ShadcnDateVariant
19036
19061
  const resolvedMask = inputMask != null ? inputMask : kindConfig.mask;
19037
19062
  const defaultShowCalendar = kind === "date" || kind === "datetime";
19038
19063
  const showCalendar = typeof showCalendarProp === "boolean" ? showCalendarProp : defaultShowCalendar;
19039
- const [internalOpen, setInternalOpen] = React66__namespace.useState(false);
19064
+ const [internalOpen, setInternalOpen] = React67__namespace.useState(false);
19040
19065
  const isControlledOpen = open !== void 0;
19041
19066
  const currentOpen = isControlledOpen ? !!open : internalOpen;
19042
- const handleOpenChange = React66__namespace.useCallback(
19067
+ const handleOpenChange = React67__namespace.useCallback(
19043
19068
  (next) => {
19044
19069
  if (!isControlledOpen) {
19045
19070
  setInternalOpen(next);
@@ -19049,7 +19074,7 @@ var ShadcnDateVariant = React66__namespace.forwardRef(function ShadcnDateVariant
19049
19074
  [isControlledOpen, onOpenChange]
19050
19075
  );
19051
19076
  const { single, range } = normalizeValueForMode(value, mode);
19052
- const displayValue = React66__namespace.useMemo(() => {
19077
+ const displayValue = React67__namespace.useMemo(() => {
19053
19078
  if (mode === "single") {
19054
19079
  return formatDisplaySingle(single, singlePattern);
19055
19080
  }
@@ -19060,12 +19085,12 @@ var ShadcnDateVariant = React66__namespace.forwardRef(function ShadcnDateVariant
19060
19085
  rangeSeparator
19061
19086
  );
19062
19087
  }, [mode, single, range, singlePattern, formatRange, rangeSeparator]);
19063
- const [localText, setLocalText] = React66__namespace.useState(displayValue);
19064
- React66__namespace.useEffect(() => {
19088
+ const [localText, setLocalText] = React67__namespace.useState(displayValue);
19089
+ React67__namespace.useEffect(() => {
19065
19090
  setLocalText(displayValue);
19066
19091
  }, [displayValue]);
19067
19092
  const showTimeDropdowns = mode === "single" && (kind === "datetime" || kind === "time" || kind === "hour");
19068
- const handleSelect = React66__namespace.useCallback(
19093
+ const handleSelect = React67__namespace.useCallback(
19069
19094
  (next) => {
19070
19095
  let nextValue;
19071
19096
  let nextRange;
@@ -19115,7 +19140,7 @@ var ShadcnDateVariant = React66__namespace.forwardRef(function ShadcnDateVariant
19115
19140
  },
19116
19141
  [mode, stayOpenOnSelect, onValue, handleOpenChange, kind, single]
19117
19142
  );
19118
- const handleTimeChange = React66__namespace.useCallback(
19143
+ const handleTimeChange = React67__namespace.useCallback(
19119
19144
  (next) => {
19120
19145
  if (!next) {
19121
19146
  const detail2 = {
@@ -19146,7 +19171,7 @@ var ShadcnDateVariant = React66__namespace.forwardRef(function ShadcnDateVariant
19146
19171
  },
19147
19172
  [mode, kind, onValue]
19148
19173
  );
19149
- const handleClear = React66__namespace.useCallback(
19174
+ const handleClear = React67__namespace.useCallback(
19150
19175
  (ev) => {
19151
19176
  ev.preventDefault();
19152
19177
  ev.stopPropagation();
@@ -19165,7 +19190,7 @@ var ShadcnDateVariant = React66__namespace.forwardRef(function ShadcnDateVariant
19165
19190
  );
19166
19191
  const hasValue = hasSelection(value);
19167
19192
  const placeholderText = typeof placeholder === "string" ? placeholder : mode === "range" ? "Select date range" : "Select date";
19168
- const handleInputChange = React66__namespace.useCallback(
19193
+ const handleInputChange = React67__namespace.useCallback(
19169
19194
  (event) => {
19170
19195
  var _a, _b, _c;
19171
19196
  if (mode !== "single") return;
@@ -19352,7 +19377,7 @@ function resolveBasePadding2(size, density) {
19352
19377
  }
19353
19378
  return { px, py };
19354
19379
  }
19355
- var Textarea = React66__namespace.forwardRef(
19380
+ var Textarea = React67__namespace.forwardRef(
19356
19381
  function Textarea2(rawProps, forwardedRef) {
19357
19382
  const {
19358
19383
  // layout wrapper
@@ -19400,8 +19425,8 @@ var Textarea = React66__namespace.forwardRef(
19400
19425
  } = rawProps;
19401
19426
  const sizeKey = size != null ? size : "md";
19402
19427
  const densityKey = density != null ? density : "normal";
19403
- const innerRef = React66__namespace.useRef(null);
19404
- React66__namespace.useImperativeHandle(
19428
+ const innerRef = React67__namespace.useRef(null);
19429
+ React67__namespace.useImperativeHandle(
19405
19430
  forwardedRef,
19406
19431
  () => innerRef.current,
19407
19432
  []
@@ -19422,11 +19447,11 @@ var Textarea = React66__namespace.forwardRef(
19422
19447
  const baseIconGap = iconGap != null ? iconGap : 1;
19423
19448
  const leadingGap = leadingIconSpacing != null ? leadingIconSpacing : baseIconGap;
19424
19449
  const trailingGap = trailingIconSpacing != null ? trailingIconSpacing : baseIconGap;
19425
- const leadingIconsRef = React66__namespace.useRef(null);
19426
- const trailingIconsRef = React66__namespace.useRef(null);
19427
- const [leadingIconsWidth, setLeadingIconsWidth] = React66__namespace.useState(0);
19428
- const [trailingIconsWidth, setTrailingIconsWidth] = React66__namespace.useState(0);
19429
- const measureIconWidths = React66__namespace.useCallback(() => {
19450
+ const leadingIconsRef = React67__namespace.useRef(null);
19451
+ const trailingIconsRef = React67__namespace.useRef(null);
19452
+ const [leadingIconsWidth, setLeadingIconsWidth] = React67__namespace.useState(0);
19453
+ const [trailingIconsWidth, setTrailingIconsWidth] = React67__namespace.useState(0);
19454
+ const measureIconWidths = React67__namespace.useCallback(() => {
19430
19455
  if (typeof window === "undefined") return;
19431
19456
  const lead = leadingIconsRef.current;
19432
19457
  const trail = trailingIconsRef.current;
@@ -19443,7 +19468,7 @@ var Textarea = React66__namespace.forwardRef(
19443
19468
  setTrailingIconsWidth(0);
19444
19469
  }
19445
19470
  }, []);
19446
- React66__namespace.useLayoutEffect(() => {
19471
+ React67__namespace.useLayoutEffect(() => {
19447
19472
  if (typeof window === "undefined" || typeof MutationObserver === "undefined") {
19448
19473
  measureIconWidths();
19449
19474
  return;
@@ -19472,10 +19497,10 @@ var Textarea = React66__namespace.forwardRef(
19472
19497
  measureIconWidths();
19473
19498
  return () => observers.forEach((o3) => o3.disconnect());
19474
19499
  }, [measureIconWidths, hasLeadingIcons, hasTrailingIcons]);
19475
- const [rowHeight, setRowHeight] = React66__namespace.useState(null);
19500
+ const [rowHeight, setRowHeight] = React67__namespace.useState(null);
19476
19501
  const baseMinRows = Math.max(minRowsProp != null ? minRowsProp : 1, 1);
19477
- const [rows, setRows] = React66__namespace.useState(baseMinRows);
19478
- React66__namespace.useLayoutEffect(() => {
19502
+ const [rows, setRows] = React67__namespace.useState(baseMinRows);
19503
+ React67__namespace.useLayoutEffect(() => {
19479
19504
  if (typeof window === "undefined") return;
19480
19505
  const el = innerRef.current;
19481
19506
  if (!el) return;
@@ -19491,7 +19516,7 @@ var Textarea = React66__namespace.forwardRef(
19491
19516
  setRows(baseMinRows);
19492
19517
  }
19493
19518
  }, [sizeKey, densityKey, baseMinRows]);
19494
- const recomputeHeight = React66__namespace.useCallback(() => {
19519
+ const recomputeHeight = React67__namespace.useCallback(() => {
19495
19520
  if (!autoResize) return;
19496
19521
  if (!innerRef.current) return;
19497
19522
  if (!rowHeight) return;
@@ -19513,7 +19538,7 @@ var Textarea = React66__namespace.forwardRef(
19513
19538
  el.style.height = `${nextHeight}px`;
19514
19539
  setRows(nextRows);
19515
19540
  }, [autoResize, rowHeight, baseMinRows, maxRows]);
19516
- React66__namespace.useLayoutEffect(() => {
19541
+ React67__namespace.useLayoutEffect(() => {
19517
19542
  recomputeHeight();
19518
19543
  }, [recomputeHeight, rest.value, rest.defaultValue]);
19519
19544
  const { px: pxDefault, py: pyDefault } = resolveBasePadding2(size, density);
@@ -19583,19 +19608,19 @@ var Textarea = React66__namespace.forwardRef(
19583
19608
  const focusTextarea = () => {
19584
19609
  if (innerRef.current) innerRef.current.focus();
19585
19610
  };
19586
- const handleFocus = React66__namespace.useCallback(
19611
+ const handleFocus = React67__namespace.useCallback(
19587
19612
  (event) => {
19588
19613
  onFocus == null ? void 0 : onFocus(event);
19589
19614
  },
19590
19615
  [onFocus]
19591
19616
  );
19592
- const handleBlur = React66__namespace.useCallback(
19617
+ const handleBlur = React67__namespace.useCallback(
19593
19618
  (event) => {
19594
19619
  onBlur == null ? void 0 : onBlur(event);
19595
19620
  },
19596
19621
  [onBlur]
19597
19622
  );
19598
- const handleChange = React66__namespace.useCallback(
19623
+ const handleChange = React67__namespace.useCallback(
19599
19624
  (event) => {
19600
19625
  onChange == null ? void 0 : onChange(event);
19601
19626
  recomputeHeight();
@@ -19772,7 +19797,7 @@ function splitIntoTokens(raw, sep) {
19772
19797
  }
19773
19798
  return acc.map((t4) => t4.trim()).filter((t4) => t4.length > 0);
19774
19799
  }
19775
- var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVariant2(props, ref) {
19800
+ var ShadcnChipsVariant = React67__namespace.forwardRef(function ShadcnChipsVariant2(props, ref) {
19776
19801
  var _a;
19777
19802
  const {
19778
19803
  // variant base bits
@@ -19809,20 +19834,20 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19809
19834
  ...restTextProps
19810
19835
  } = props;
19811
19836
  const hasInvalidIncomingValue = value !== void 0 && !Array.isArray(value);
19812
- React66__namespace.useEffect(() => {
19837
+ React67__namespace.useEffect(() => {
19813
19838
  if (!hasInvalidIncomingValue) return;
19814
19839
  console.warn(
19815
19840
  "[form-palette] ShadcnChipsVariant expected `value` to be `string[] | undefined`; received:",
19816
19841
  value
19817
19842
  );
19818
19843
  }, [hasInvalidIncomingValue, value]);
19819
- const chips = React66__namespace.useMemo(
19844
+ const chips = React67__namespace.useMemo(
19820
19845
  () => Array.isArray(value) ? value : [],
19821
19846
  [value]
19822
19847
  );
19823
19848
  const hasChips = chips.length > 0;
19824
- const [inputText, setInputText] = React66__namespace.useState("");
19825
- const emitChange = React66__namespace.useCallback(
19849
+ const [inputText, setInputText] = React67__namespace.useState("");
19850
+ const emitChange = React67__namespace.useCallback(
19826
19851
  (nextChips, meta) => {
19827
19852
  const detail = {
19828
19853
  source: "variant",
@@ -19837,7 +19862,7 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19837
19862
  },
19838
19863
  [onValue]
19839
19864
  );
19840
- const commitFromRaw = React66__namespace.useCallback(
19865
+ const commitFromRaw = React67__namespace.useCallback(
19841
19866
  (raw) => {
19842
19867
  const tokens = splitIntoTokens(raw, separators);
19843
19868
  if (!tokens.length) return;
@@ -19858,7 +19883,7 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19858
19883
  },
19859
19884
  [chips, separators, allowDuplicates, maxChips, emitChange, onAddChips]
19860
19885
  );
19861
- const handleRemoveAt = React66__namespace.useCallback(
19886
+ const handleRemoveAt = React67__namespace.useCallback(
19862
19887
  (index) => {
19863
19888
  if (index < 0 || index >= chips.length) return;
19864
19889
  const removed = [chips[index]];
@@ -19868,7 +19893,7 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19868
19893
  },
19869
19894
  [chips, emitChange, onRemoveChips]
19870
19895
  );
19871
- const handleClear = React66__namespace.useCallback(
19896
+ const handleClear = React67__namespace.useCallback(
19872
19897
  (ev) => {
19873
19898
  ev == null ? void 0 : ev.preventDefault();
19874
19899
  ev == null ? void 0 : ev.stopPropagation();
@@ -19879,7 +19904,7 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19879
19904
  },
19880
19905
  [chips, emitChange, onRemoveChips]
19881
19906
  );
19882
- const handleEntryChange = React66__namespace.useCallback(
19907
+ const handleEntryChange = React67__namespace.useCallback(
19883
19908
  (event) => {
19884
19909
  var _a2;
19885
19910
  const next = (_a2 = event.target.value) != null ? _a2 : "";
@@ -19887,7 +19912,7 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19887
19912
  },
19888
19913
  []
19889
19914
  );
19890
- const handleEntryKeyDown = React66__namespace.useCallback(
19915
+ const handleEntryKeyDown = React67__namespace.useCallback(
19891
19916
  (event) => {
19892
19917
  const key = event.key;
19893
19918
  if (key === "Enter" && addOnEnter) {
@@ -19918,7 +19943,7 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19918
19943
  handleRemoveAt
19919
19944
  ]
19920
19945
  );
19921
- const handleEntryBlur = React66__namespace.useCallback(
19946
+ const handleEntryBlur = React67__namespace.useCallback(
19922
19947
  (event) => {
19923
19948
  if (addOnBlur && inputText.trim().length) {
19924
19949
  commitFromRaw(inputText);
@@ -19930,10 +19955,12 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19930
19955
  [addOnBlur, inputText, commitFromRaw, restTextProps]
19931
19956
  );
19932
19957
  const effectivePlaceholder = placeholder != null ? placeholder : hasChips ? "" : "Add item\u2026";
19958
+ const defaultMaxVisible = !textareaMode && placement !== "below" ? 3 : void 0;
19959
+ const effectiveMaxVisibleChips = maxVisibleChips !== void 0 ? maxVisibleChips : defaultMaxVisible;
19933
19960
  let visibleChips = chips;
19934
19961
  let hiddenCount = 0;
19935
- if (typeof maxVisibleChips === "number" && maxVisibleChips > 0 && chips.length > maxVisibleChips) {
19936
- visibleChips = chips.slice(0, maxVisibleChips);
19962
+ if (typeof effectiveMaxVisibleChips === "number" && effectiveMaxVisibleChips > 0 && chips.length > effectiveMaxVisibleChips) {
19963
+ visibleChips = chips.slice(0, effectiveMaxVisibleChips);
19937
19964
  hiddenCount = chips.length - visibleChips.length;
19938
19965
  }
19939
19966
  const maxWidthStyle = maxChipWidth !== void 0 ? {
@@ -19943,7 +19970,7 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19943
19970
  const baseRemoveClasses = textareaMode ? "cursor-pointer text-[16px] opacity-70 hover:opacity-100 mt-0.5" : "cursor-pointer text-[16px] opacity-70 hover:opacity-100";
19944
19971
  const chipNodes = visibleChips.map((chip, index) => {
19945
19972
  if (renderChip) {
19946
- return /* @__PURE__ */ jsxRuntime.jsx(React66__namespace.Fragment, { children: renderChip(chip, index, {
19973
+ return /* @__PURE__ */ jsxRuntime.jsx(React67__namespace.Fragment, { children: renderChip(chip, index, {
19947
19974
  remove: () => handleRemoveAt(index),
19948
19975
  chips
19949
19976
  }) }, `${chip}-${index}`);
@@ -19992,25 +20019,69 @@ var ShadcnChipsVariant = React66__namespace.forwardRef(function ShadcnChipsVaria
19992
20019
  );
19993
20020
  });
19994
20021
  if (hiddenCount > 0) {
19995
- const defaultOverflow = /* @__PURE__ */ jsxRuntime.jsxs(
19996
- "span",
19997
- {
19998
- className: cn(
19999
- baseChipClasses,
20000
- "cursor-default",
20001
- chipClassName
20002
- ),
20003
- "data-slot": "chip-overflow",
20004
- children: [
20005
- "+",
20006
- hiddenCount,
20007
- " more"
20008
- ]
20009
- }
20010
- );
20022
+ const hiddenChips = chips.slice(effectiveMaxVisibleChips != null ? effectiveMaxVisibleChips : 0);
20023
+ const defaultOverflow = /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
20024
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
20025
+ "button",
20026
+ {
20027
+ type: "button",
20028
+ className: cn(
20029
+ baseChipClasses,
20030
+ "cursor-pointer font-semibold bg-primary/10 text-primary hover:bg-primary/20",
20031
+ chipClassName
20032
+ ),
20033
+ "data-slot": "chip-overflow",
20034
+ children: [
20035
+ "+",
20036
+ hiddenCount,
20037
+ " more"
20038
+ ]
20039
+ }
20040
+ ) }),
20041
+ /* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { className: "p-3 w-64 max-h-60 overflow-y-auto", align: "start", children: [
20042
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wider mb-2", children: "Hidden Chips" }),
20043
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: hiddenChips.map((chip, hiddenIdx) => {
20044
+ const actualIndex = (effectiveMaxVisibleChips != null ? effectiveMaxVisibleChips : 0) + hiddenIdx;
20045
+ let label = chip;
20046
+ if (typeof maxChipChars === "number" && maxChipChars > 0 && label.length > maxChipChars) {
20047
+ label = label.slice(0, maxChipChars) + "\u2026";
20048
+ }
20049
+ return /* @__PURE__ */ jsxRuntime.jsxs(
20050
+ "div",
20051
+ {
20052
+ className: cn(baseChipClasses, chipClassName, "max-w-full"),
20053
+ children: [
20054
+ /* @__PURE__ */ jsxRuntime.jsx(
20055
+ "span",
20056
+ {
20057
+ className: cn("truncate", chipLabelClassName),
20058
+ style: maxWidthStyle,
20059
+ children: label
20060
+ }
20061
+ ),
20062
+ /* @__PURE__ */ jsxRuntime.jsx(
20063
+ "span",
20064
+ {
20065
+ className: cn(baseRemoveClasses, chipRemoveClassName),
20066
+ onClick: (e4) => {
20067
+ e4.preventDefault();
20068
+ e4.stopPropagation();
20069
+ handleRemoveAt(actualIndex);
20070
+ },
20071
+ "aria-hidden": "true",
20072
+ children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: 14 })
20073
+ }
20074
+ )
20075
+ ]
20076
+ },
20077
+ `${chip}-${actualIndex}`
20078
+ );
20079
+ }) })
20080
+ ] })
20081
+ ] });
20011
20082
  const node = (_a = renderOverflowChip == null ? void 0 : renderOverflowChip(hiddenCount, chips)) != null ? _a : defaultOverflow;
20012
20083
  chipNodes.push(
20013
- /* @__PURE__ */ jsxRuntime.jsx(React66__namespace.Fragment, { children: node }, "__overflow")
20084
+ /* @__PURE__ */ jsxRuntime.jsx(React67__namespace.Fragment, { children: node }, "__overflow")
20014
20085
  );
20015
20086
  }
20016
20087
  const effectivePlacement = textareaMode ? placement != null ? placement : "inline" : placement != null ? placement : "inline";
@@ -20204,7 +20275,7 @@ var chipVariant = {
20204
20275
  tags: ["chips", "multi-select", "tags"]
20205
20276
  }
20206
20277
  };
20207
- var ShadcnTextareaVariant = React66__namespace.forwardRef(function ShadcnTextareaVariant2(props, ref) {
20278
+ var ShadcnTextareaVariant = React67__namespace.forwardRef(function ShadcnTextareaVariant2(props, ref) {
20208
20279
  const {
20209
20280
  value,
20210
20281
  onValue,
@@ -20212,7 +20283,7 @@ var ShadcnTextareaVariant = React66__namespace.forwardRef(function ShadcnTextare
20212
20283
  // everything else goes straight to the UI Textarea
20213
20284
  ...rest
20214
20285
  } = props;
20215
- const handleChange = React66__namespace.useCallback(
20286
+ const handleChange = React67__namespace.useCallback(
20216
20287
  (event) => {
20217
20288
  var _a;
20218
20289
  const next = (_a = event.target.value) != null ? _a : "";
@@ -20307,7 +20378,7 @@ function switchThumbSize(size) {
20307
20378
  if (size === "lg") return "size-5";
20308
20379
  return "size-4";
20309
20380
  }
20310
- var ShadcnToggleVariant = React66__namespace.forwardRef(function ShadcnToggleVariant2(props, _ref) {
20381
+ var ShadcnToggleVariant = React67__namespace.forwardRef(function ShadcnToggleVariant2(props, _ref) {
20311
20382
  const {
20312
20383
  // variant bits
20313
20384
  value,
@@ -20329,7 +20400,7 @@ var ShadcnToggleVariant = React66__namespace.forwardRef(function ShadcnToggleVar
20329
20400
  ...restSwitchProps
20330
20401
  } = props;
20331
20402
  const checked = !!value;
20332
- const handleToggle = React66__namespace.useCallback(
20403
+ const handleToggle = React67__namespace.useCallback(
20333
20404
  (next) => {
20334
20405
  const nextVal = Boolean(next);
20335
20406
  const detail = {
@@ -20855,7 +20926,7 @@ var InnerShadcnRadioVariant = (props, ref) => {
20855
20926
  ...restGroupProps
20856
20927
  } = props;
20857
20928
  const hasError = !!error;
20858
- const normalized = React66__namespace.useMemo(
20929
+ const normalized = React67__namespace.useMemo(
20859
20930
  () => normalizeItems(
20860
20931
  items != null ? items : options,
20861
20932
  mappers,
@@ -20886,14 +20957,14 @@ var InnerShadcnRadioVariant = (props, ref) => {
20886
20957
  optionTagOnClick
20887
20958
  ]
20888
20959
  );
20889
- const selectedString = React66__namespace.useMemo(() => {
20960
+ const selectedString = React67__namespace.useMemo(() => {
20890
20961
  if (value === void 0) return void 0;
20891
20962
  const found = normalized.find(
20892
20963
  (item) => isEqualValue(item.value, value)
20893
20964
  );
20894
20965
  return found ? String(found.value) : void 0;
20895
20966
  }, [normalized, value]);
20896
- const handleSelect = React66__namespace.useCallback(
20967
+ const handleSelect = React67__namespace.useCallback(
20897
20968
  (next, selectedRaw) => {
20898
20969
  if (!onValue || disabled) return;
20899
20970
  const detail = {
@@ -20907,7 +20978,7 @@ var InnerShadcnRadioVariant = (props, ref) => {
20907
20978
  },
20908
20979
  [onValue, disabled]
20909
20980
  );
20910
- const handleRadioChange = React66__namespace.useCallback(
20981
+ const handleRadioChange = React67__namespace.useCallback(
20911
20982
  (raw) => {
20912
20983
  var _a;
20913
20984
  const found = normalized.find((item) => String(item.value) === raw);
@@ -21049,7 +21120,7 @@ var InnerShadcnRadioVariant = (props, ref) => {
21049
21120
  }
21050
21121
  );
21051
21122
  };
21052
- var ShadcnRadioVariant = React66__namespace.forwardRef(
21123
+ var ShadcnRadioVariant = React67__namespace.forwardRef(
21053
21124
  InnerShadcnRadioVariant
21054
21125
  );
21055
21126
 
@@ -21309,7 +21380,7 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
21309
21380
  } = props;
21310
21381
  const hasError = !!error;
21311
21382
  const isSingle = !!single;
21312
- const normalized = React66__namespace.useMemo(
21383
+ const normalized = React67__namespace.useMemo(
21313
21384
  () => normalizeItems2(
21314
21385
  items != null ? items : options,
21315
21386
  mappers,
@@ -21412,14 +21483,14 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
21412
21483
  }
21413
21484
  );
21414
21485
  }
21415
- const normalizedByValueKey = React66__namespace.useMemo(() => {
21486
+ const normalizedByValueKey = React67__namespace.useMemo(() => {
21416
21487
  const lookup = /* @__PURE__ */ new Map();
21417
21488
  normalized.forEach((item) => {
21418
21489
  lookup.set(valueLookupKey(item.value), item);
21419
21490
  });
21420
21491
  return lookup;
21421
21492
  }, [normalized]);
21422
- const groupValue = React66__namespace.useMemo(() => {
21493
+ const groupValue = React67__namespace.useMemo(() => {
21423
21494
  const source = asGroupValue(value);
21424
21495
  if (!(source == null ? void 0 : source.length)) return source;
21425
21496
  return source.map((entry) => {
@@ -21457,21 +21528,21 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
21457
21528
  labelTextSizeClass: labelTextSize2(size),
21458
21529
  descriptionTextSizeClass: descriptionTextSize2(size)
21459
21530
  });
21460
- const hasAnyTristate = React66__namespace.useMemo(
21531
+ const hasAnyTristate = React67__namespace.useMemo(
21461
21532
  () => normalized.some((item) => {
21462
21533
  var _a, _b;
21463
21534
  return (_b = (_a = item.tristate) != null ? _a : tristateDefault) != null ? _b : false;
21464
21535
  }),
21465
21536
  [normalized, tristateDefault]
21466
21537
  );
21467
- const findEntryIndex = React66__namespace.useCallback(
21538
+ const findEntryIndex = React67__namespace.useCallback(
21468
21539
  (val) => {
21469
21540
  if (!groupValue) return -1;
21470
21541
  return groupValue.findIndex((e4) => isEqualValue2(e4.value, val));
21471
21542
  },
21472
21543
  [groupValue]
21473
21544
  );
21474
- const getEntryState = React66__namespace.useCallback(
21545
+ const getEntryState = React67__namespace.useCallback(
21475
21546
  (val) => {
21476
21547
  const idx = findEntryIndex(val);
21477
21548
  if (!groupValue || idx === -1) return "none";
@@ -21479,7 +21550,7 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
21479
21550
  },
21480
21551
  [groupValue, findEntryIndex]
21481
21552
  );
21482
- const updateGroupValue = React66__namespace.useCallback(
21553
+ const updateGroupValue = React67__namespace.useCallback(
21483
21554
  (itemValue, nextInternal, effectiveTristate) => {
21484
21555
  if (!onValue || disabled) return;
21485
21556
  const currentList = groupValue ? [...groupValue] : [];
@@ -21709,7 +21780,7 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
21709
21780
  }
21710
21781
  );
21711
21782
  };
21712
- var ShadcnCheckboxVariant = React66__namespace.forwardRef(
21783
+ var ShadcnCheckboxVariant = React67__namespace.forwardRef(
21713
21784
  InnerShadcnCheckboxVariant
21714
21785
  );
21715
21786
 
@@ -21732,6 +21803,155 @@ var checkboxModule = {
21732
21803
  tags: ["checkbox", "group", "boolean", "tri-state"]
21733
21804
  }
21734
21805
  };
21806
+ function ScrollArea({
21807
+ className,
21808
+ children,
21809
+ ...props
21810
+ }) {
21811
+ return /* @__PURE__ */ jsxRuntime.jsxs(
21812
+ ScrollAreaPrimitive2__namespace.Root,
21813
+ {
21814
+ "data-slot": "scroll-area",
21815
+ className: cn("relative", className),
21816
+ ...props,
21817
+ children: [
21818
+ /* @__PURE__ */ jsxRuntime.jsx(
21819
+ ScrollAreaPrimitive2__namespace.Viewport,
21820
+ {
21821
+ "data-slot": "scroll-area-viewport",
21822
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
21823
+ children
21824
+ }
21825
+ ),
21826
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
21827
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive2__namespace.Corner, {})
21828
+ ]
21829
+ }
21830
+ );
21831
+ }
21832
+ function ScrollBar({
21833
+ className,
21834
+ orientation = "vertical",
21835
+ ...props
21836
+ }) {
21837
+ return /* @__PURE__ */ jsxRuntime.jsx(
21838
+ ScrollAreaPrimitive2__namespace.ScrollAreaScrollbar,
21839
+ {
21840
+ "data-slot": "scroll-area-scrollbar",
21841
+ orientation,
21842
+ className: cn(
21843
+ "flex touch-none p-px transition-colors select-none",
21844
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
21845
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
21846
+ className
21847
+ ),
21848
+ ...props,
21849
+ children: /* @__PURE__ */ jsxRuntime.jsx(
21850
+ ScrollAreaPrimitive2__namespace.ScrollAreaThumb,
21851
+ {
21852
+ "data-slot": "scroll-area-thumb",
21853
+ className: "bg-border relative flex-1 rounded-full"
21854
+ }
21855
+ )
21856
+ }
21857
+ );
21858
+ }
21859
+ function VirtualScroll({
21860
+ className,
21861
+ rootProps,
21862
+ scrollbarProps,
21863
+ style,
21864
+ components,
21865
+ ...props
21866
+ }) {
21867
+ const Scroller = React67__namespace.useMemo(() => {
21868
+ return React67__namespace.forwardRef((scrollerProps, ref) => {
21869
+ return /* @__PURE__ */ jsxRuntime.jsx(
21870
+ ScrollAreaPrimitive2__namespace.Viewport,
21871
+ {
21872
+ ...scrollerProps,
21873
+ ref,
21874
+ "data-slot": "scroll-area-viewport",
21875
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
21876
+ }
21877
+ );
21878
+ });
21879
+ }, []);
21880
+ const combinedComponents = React67__namespace.useMemo(() => {
21881
+ return {
21882
+ ...components,
21883
+ Scroller
21884
+ };
21885
+ }, [components, Scroller]);
21886
+ return /* @__PURE__ */ jsxRuntime.jsxs(
21887
+ ScrollAreaPrimitive2__namespace.Root,
21888
+ {
21889
+ "data-slot": "scroll-area",
21890
+ className,
21891
+ ...rootProps,
21892
+ style: { ...style, position: "relative" },
21893
+ children: [
21894
+ /* @__PURE__ */ jsxRuntime.jsx(
21895
+ reactVirtuoso.Virtuoso,
21896
+ {
21897
+ ...props,
21898
+ components: combinedComponents
21899
+ }
21900
+ ),
21901
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { ...scrollbarProps }),
21902
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive2__namespace.Corner, {})
21903
+ ]
21904
+ }
21905
+ );
21906
+ }
21907
+ function VirtualScrollGrid({
21908
+ className,
21909
+ rootProps,
21910
+ scrollbarProps,
21911
+ style,
21912
+ components,
21913
+ ...props
21914
+ }) {
21915
+ const Scroller = React67__namespace.useMemo(() => {
21916
+ return React67__namespace.forwardRef((scrollerProps, ref) => {
21917
+ return /* @__PURE__ */ jsxRuntime.jsx(
21918
+ ScrollAreaPrimitive2__namespace.Viewport,
21919
+ {
21920
+ ...scrollerProps,
21921
+ ref,
21922
+ "data-slot": "scroll-area-viewport",
21923
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
21924
+ }
21925
+ );
21926
+ });
21927
+ }, []);
21928
+ const combinedComponents = React67__namespace.useMemo(() => {
21929
+ return {
21930
+ ...components,
21931
+ Scroller
21932
+ };
21933
+ }, [components, Scroller]);
21934
+ return /* @__PURE__ */ jsxRuntime.jsxs(
21935
+ ScrollAreaPrimitive2__namespace.Root,
21936
+ {
21937
+ "data-slot": "scroll-area",
21938
+ className,
21939
+ ...rootProps,
21940
+ style: { ...style, position: "relative" },
21941
+ children: [
21942
+ /* @__PURE__ */ jsxRuntime.jsx(
21943
+ reactVirtuoso.VirtuosoGrid,
21944
+ {
21945
+ ...props,
21946
+ components: combinedComponents
21947
+ }
21948
+ ),
21949
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { ...scrollbarProps }),
21950
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive2__namespace.Corner, {})
21951
+ ]
21952
+ }
21953
+ );
21954
+ }
21735
21955
  function normalizeOptions(opts, config) {
21736
21956
  return globalNormalizeOptions(opts, config);
21737
21957
  }
@@ -21756,7 +21976,7 @@ function triggerPadding(density) {
21756
21976
  return "py-1.5";
21757
21977
  }
21758
21978
  }
21759
- var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVariant2(props, _ref) {
21979
+ var ShadcnSelectVariant = React67__namespace.forwardRef(function ShadcnSelectVariant2(props, _ref) {
21760
21980
  var _a, _b;
21761
21981
  const {
21762
21982
  value,
@@ -21788,6 +22008,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
21788
22008
  clearable,
21789
22009
  placeholder,
21790
22010
  className,
22011
+ style,
21791
22012
  triggerClassName,
21792
22013
  contentClassName,
21793
22014
  renderOption,
@@ -21814,9 +22035,9 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
21814
22035
  virtualScroll = true
21815
22036
  } = props;
21816
22037
  const isButtonMode = mode === "button";
21817
- const [open, setOpen] = React66__namespace.useState(false);
21818
- const [query, setQuery] = React66__namespace.useState("");
21819
- const items = React66__namespace.useMemo(
22038
+ const [open, setOpen] = React67__namespace.useState(false);
22039
+ const [query, setQuery] = React67__namespace.useState("");
22040
+ const items = React67__namespace.useMemo(
21820
22041
  () => normalizeOptions(options != null ? options : [], {
21821
22042
  autoCap,
21822
22043
  optionLabel,
@@ -21852,7 +22073,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
21852
22073
  ]
21853
22074
  );
21854
22075
  const normalizedValue = value === "" || value == null ? void 0 : value;
21855
- const valueMap = React66__namespace.useMemo(() => {
22076
+ const valueMap = React67__namespace.useMemo(() => {
21856
22077
  const map = /* @__PURE__ */ new Map();
21857
22078
  for (const item of items) {
21858
22079
  map.set(String(item.value), item.value);
@@ -21862,7 +22083,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
21862
22083
  const selectedItem = normalizedValue == null ? null : (_a = items.find(
21863
22084
  (it) => String(it.value) === String(normalizedValue)
21864
22085
  )) != null ? _a : null;
21865
- const filteredItems = React66__namespace.useMemo(() => {
22086
+ const filteredItems = React67__namespace.useMemo(() => {
21866
22087
  if (!query) return items;
21867
22088
  const q2 = query.toLowerCase();
21868
22089
  return items.filter((it) => it.labelText.toLowerCase().includes(q2));
@@ -21874,7 +22095,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
21874
22095
  listMaxHeight,
21875
22096
  Math.max(estimatedRowHeight, filteredItems.length * estimatedRowHeight)
21876
22097
  );
21877
- const handleChange = React66__namespace.useCallback(
22098
+ const handleChange = React67__namespace.useCallback(
21878
22099
  (rawKey) => {
21879
22100
  var _a2, _b2, _c, _d;
21880
22101
  if (!onValue || rawKey === "") return;
@@ -21923,7 +22144,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
21923
22144
  "focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
21924
22145
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
21925
22146
  );
21926
- const ButtonModeTrigger = React66__namespace.useMemo(() => {
22147
+ const ButtonModeTrigger = React67__namespace.useMemo(() => {
21927
22148
  if (!isButtonMode) return null;
21928
22149
  const selectedValue = value;
21929
22150
  const renderable = button != null ? button : children;
@@ -21998,8 +22219,10 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
21998
22219
  heightCls,
21999
22220
  padCls,
22000
22221
  hasControls && joinControls && extendBoxToControls ? "border-none shadow-none focus:ring-0 focus:outline-none" : "",
22001
- triggerClassName
22222
+ triggerClassName,
22223
+ !joinControls && className
22002
22224
  ),
22225
+ style: !joinControls ? style : void 0,
22003
22226
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between gap-2", children: [
22004
22227
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
22005
22228
  hasLeadingIcons && /* @__PURE__ */ jsxRuntime.jsx(
@@ -22082,7 +22305,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
22082
22305
  filteredItems.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5 text-xs text-muted-foreground", children: emptySearchText != null ? emptySearchText : "No results found" }) : useVirtualization ? (
22083
22306
  // CASE 3: normal list, virtualized
22084
22307
  /* @__PURE__ */ jsxRuntime.jsx(
22085
- reactVirtuoso.Virtuoso,
22308
+ VirtualScroll,
22086
22309
  {
22087
22310
  style: { height: listHeight },
22088
22311
  data: filteredItems,
@@ -22145,7 +22368,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
22145
22368
  }
22146
22369
  }
22147
22370
  )
22148
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-60 overflow-auto", children: filteredItems.map((item, index) => {
22371
+ ) : /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "max-h-60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: filteredItems.map((item, index) => {
22149
22372
  var _a2, _b2;
22150
22373
  const optionNode = /* @__PURE__ */ jsxRuntime.jsx(
22151
22374
  SelectItem,
@@ -22200,7 +22423,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
22200
22423
  setQuery("");
22201
22424
  }
22202
22425
  });
22203
- }) })
22426
+ }) }) })
22204
22427
  )
22205
22428
  ] })
22206
22429
  ]
@@ -22213,8 +22436,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
22213
22436
  "data-slot": "select-field",
22214
22437
  className: cn(
22215
22438
  "w-full",
22216
- disabled && "opacity-50 cursor-not-allowed",
22217
- className
22439
+ disabled && "opacity-50 cursor-not-allowed"
22218
22440
  ),
22219
22441
  "aria-disabled": disabled || void 0,
22220
22442
  "aria-invalid": error ? "true" : void 0,
@@ -22244,6 +22466,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
22244
22466
  "div",
22245
22467
  {
22246
22468
  className: groupClassName,
22469
+ style,
22247
22470
  "data-slot": "select-group",
22248
22471
  "data-disabled": disabled ? "true" : "false",
22249
22472
  children: [
@@ -22289,8 +22512,7 @@ var ShadcnSelectVariant = React66__namespace.forwardRef(function ShadcnSelectVar
22289
22512
  "data-slot": "select-field",
22290
22513
  className: cn(
22291
22514
  "flex items-stretch w-full",
22292
- disabled && "opacity-50 cursor-not-allowed",
22293
- className
22515
+ disabled && "opacity-50 cursor-not-allowed"
22294
22516
  ),
22295
22517
  "aria-disabled": disabled || void 0,
22296
22518
  "aria-invalid": error ? "true" : void 0,
@@ -22348,10 +22570,10 @@ var SelectionSummary = ({
22348
22570
  placeholder,
22349
22571
  onRemoveValue
22350
22572
  }) => {
22351
- const containerRef = React66__namespace.useRef(null);
22352
- const [visibleCount, setVisibleCount] = React66__namespace.useState(0);
22353
- const [moreOpen, setMoreOpen] = React66__namespace.useState(false);
22354
- React66__namespace.useLayoutEffect(() => {
22573
+ const containerRef = React67__namespace.useRef(null);
22574
+ const [visibleCount, setVisibleCount] = React67__namespace.useState(0);
22575
+ const [moreOpen, setMoreOpen] = React67__namespace.useState(false);
22576
+ React67__namespace.useLayoutEffect(() => {
22355
22577
  const el = containerRef.current;
22356
22578
  if (!el) return;
22357
22579
  const computeVisibleItems = () => {
@@ -22399,7 +22621,7 @@ var SelectionSummary = ({
22399
22621
  ref: containerRef,
22400
22622
  className: "flex items-center w-full overflow-hidden whitespace-nowrap",
22401
22623
  children: [
22402
- visibleItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React66__namespace.Fragment, { children: [
22624
+ visibleItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React67__namespace.Fragment, { children: [
22403
22625
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate flex-shrink-0", children: item.labelNode }),
22404
22626
  index < visibleItems.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground mr-1", children: "," })
22405
22627
  ] }, item.key)),
@@ -22480,7 +22702,7 @@ function removeSelectValue(current, valueToRemove) {
22480
22702
  return current.filter((v2) => String(v2) !== target);
22481
22703
  }
22482
22704
 
22483
- // src/presets/shadcn-variants/multiselect.tsx
22705
+ // src/presets/shadcn/variants/multiselect.tsx
22484
22706
  var import_lodash = __toESM(require_lodash());
22485
22707
  function normalizeOptions2(opts, config) {
22486
22708
  return globalNormalizeOptions(opts, config);
@@ -22506,7 +22728,7 @@ function triggerPadding2(density) {
22506
22728
  return "py-1.5";
22507
22729
  }
22508
22730
  }
22509
- var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMultiSelectVariant2(props, _ref) {
22731
+ var ShadcnMultiSelectVariant = React67__namespace.forwardRef(function ShadcnMultiSelectVariant2(props, _ref) {
22510
22732
  var _a;
22511
22733
  const {
22512
22734
  value,
@@ -22569,9 +22791,9 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22569
22791
  selectedBadgeClassName,
22570
22792
  selectedBadgePlacement = "end"
22571
22793
  } = props;
22572
- const [open, setOpen] = React66__namespace.useState(false);
22573
- const [query, setQuery] = React66__namespace.useState("");
22574
- const { items, keyedItems } = React66__namespace.useMemo(() => {
22794
+ const [open, setOpen] = React67__namespace.useState(false);
22795
+ const [query, setQuery] = React67__namespace.useState("");
22796
+ const { items, keyedItems } = React67__namespace.useMemo(() => {
22575
22797
  const items2 = normalizeOptions2(options != null ? options : [], {
22576
22798
  autoCap,
22577
22799
  optionLabel,
@@ -22606,24 +22828,24 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22606
22828
  optionTagBgColor,
22607
22829
  optionTagOnClick
22608
22830
  ]);
22609
- const selectedValues = React66__namespace.useMemo(
22831
+ const selectedValues = React67__namespace.useMemo(
22610
22832
  () => new Set(value != null ? value : []),
22611
22833
  [value]
22612
22834
  );
22613
- const selectedItems = React66__namespace.useMemo(
22835
+ const selectedItems = React67__namespace.useMemo(
22614
22836
  () => items.filter((it) => selectedValues.has(it.value)),
22615
22837
  [items, selectedValues]
22616
22838
  );
22617
- const filteredItems = React66__namespace.useMemo(() => {
22839
+ const filteredItems = React67__namespace.useMemo(() => {
22618
22840
  if (!query) return items;
22619
22841
  const q2 = query.toLowerCase();
22620
22842
  return items.filter((it) => it.labelText.toLowerCase().includes(q2));
22621
22843
  }, [items, query]);
22622
- const selectableItems = React66__namespace.useMemo(
22844
+ const selectableItems = React67__namespace.useMemo(
22623
22845
  () => items.filter((it) => !it.disabled),
22624
22846
  [items]
22625
22847
  );
22626
- const allSelectableValues = React66__namespace.useMemo(
22848
+ const allSelectableValues = React67__namespace.useMemo(
22627
22849
  () => new Set(selectableItems.map((it) => it.value)),
22628
22850
  [selectableItems]
22629
22851
  );
@@ -22643,7 +22865,7 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22643
22865
  filteredItems.length * estimatedRowHeight + headerHeight + footerHeight
22644
22866
  )
22645
22867
  );
22646
- const handleToggleValue = React66__namespace.useCallback(
22868
+ const handleToggleValue = React67__namespace.useCallback(
22647
22869
  (primitive) => {
22648
22870
  if (!onValue || disabled || readOnly) return;
22649
22871
  const current = value != null ? value : [];
@@ -22677,7 +22899,7 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22677
22899
  },
22678
22900
  [onValue, value, disabled, readOnly, keyedItems]
22679
22901
  );
22680
- const handleSelectAll = React66__namespace.useCallback(() => {
22902
+ const handleSelectAll = React67__namespace.useCallback(() => {
22681
22903
  if (!onValue || disabled || readOnly) return;
22682
22904
  const current = value != null ? value : [];
22683
22905
  const allSelectableArr = Array.from(allSelectableValues);
@@ -22718,7 +22940,7 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22718
22940
  selectedValues,
22719
22941
  keyedItems
22720
22942
  ]);
22721
- const handleClearAll = React66__namespace.useCallback(() => {
22943
+ const handleClearAll = React67__namespace.useCallback(() => {
22722
22944
  if (!onValue || disabled || readOnly) return;
22723
22945
  const detail = {
22724
22946
  source: "variant",
@@ -22770,7 +22992,7 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22770
22992
  const hasLeadingControl = !!leadingControl;
22771
22993
  const hasTrailingControl = !!trailingControl;
22772
22994
  const hasControls = hasLeadingControl || hasTrailingControl;
22773
- const makeCheckboxNode = React66__namespace.useCallback(
22995
+ const makeCheckboxNode = React67__namespace.useCallback(
22774
22996
  (opts) => {
22775
22997
  if (renderCheckbox) {
22776
22998
  return renderCheckbox(opts);
@@ -22866,7 +23088,7 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22866
23088
  ] })
22867
23089
  }
22868
23090
  );
22869
- const ButtonModeTrigger = React66__namespace.useMemo(() => {
23091
+ const ButtonModeTrigger = React67__namespace.useMemo(() => {
22870
23092
  if (mode !== "button") return null;
22871
23093
  const selectedCount = selectedItems.length;
22872
23094
  const content = (() => {
@@ -22971,7 +23193,7 @@ var ShadcnMultiSelectVariant = React66__namespace.forwardRef(function ShadcnMult
22971
23193
  }
22972
23194
  ) }),
22973
23195
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-1", children: /* @__PURE__ */ jsxRuntime.jsx(
22974
- reactVirtuoso.Virtuoso,
23196
+ VirtualScroll,
22975
23197
  {
22976
23198
  style: { height: listHeight },
22977
23199
  data: filteredItems,
@@ -23235,7 +23457,7 @@ function Slider({
23235
23457
  max: max2 = 100,
23236
23458
  ...props
23237
23459
  }) {
23238
- const _values = React66__namespace.useMemo(
23460
+ const _values = React67__namespace.useMemo(
23239
23461
  () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min2, max2],
23240
23462
  [value, defaultValue, min2, max2]
23241
23463
  );
@@ -23314,7 +23536,7 @@ function clampToRange(v2, min2, max2) {
23314
23536
  if (v2 > max2) return max2;
23315
23537
  return v2;
23316
23538
  }
23317
- var ShadcnSliderVariant = React66__namespace.forwardRef(function ShadcnSliderVariant2(props, _ref) {
23539
+ var ShadcnSliderVariant = React67__namespace.forwardRef(function ShadcnSliderVariant2(props, _ref) {
23318
23540
  const {
23319
23541
  value,
23320
23542
  onValue,
@@ -23353,7 +23575,7 @@ var ShadcnSliderVariant = React66__namespace.forwardRef(function ShadcnSliderVar
23353
23575
  } = props;
23354
23576
  const numericValue = typeof value === "number" ? value : min2;
23355
23577
  const isDisabled = !!(disabled || readOnly);
23356
- const handleChange = React66__namespace.useCallback(
23578
+ const handleChange = React67__namespace.useCallback(
23357
23579
  (vals) => {
23358
23580
  if (!onValue) return;
23359
23581
  const next = clampToRange(vals[0], min2, max2);
@@ -23368,7 +23590,7 @@ var ShadcnSliderVariant = React66__namespace.forwardRef(function ShadcnSliderVar
23368
23590
  [onValue, min2, max2]
23369
23591
  );
23370
23592
  const stepAmount = controlStep != null ? controlStep : step;
23371
- const applyStep = React66__namespace.useCallback(
23593
+ const applyStep = React67__namespace.useCallback(
23372
23594
  (direction) => {
23373
23595
  if (!onValue || isDisabled) return;
23374
23596
  const current = typeof value === "number" ? value : min2;
@@ -23826,7 +24048,7 @@ function getGapPx(el) {
23826
24048
  const g2 = cs.columnGap && cs.columnGap !== "normal" ? cs.columnGap : cs.gap;
23827
24049
  return parsePx(g2);
23828
24050
  }
23829
- var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValueVariant2(props, _ref) {
24051
+ var ShadcnKeyValueVariant = React67__namespace.forwardRef(function ShadcnKeyValueVariant2(props, _ref) {
23830
24052
  const {
23831
24053
  value,
23832
24054
  onValue,
@@ -23851,14 +24073,14 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
23851
24073
  renderChip
23852
24074
  } = props;
23853
24075
  const isDisabled = disabled || readOnly;
23854
- const items = React66__namespace.useMemo(() => mapToItems(value), [value]);
23855
- const [dialogOpen, setDialogOpen] = React66__namespace.useState(false);
23856
- const [editingIndex, setEditingIndex] = React66__namespace.useState(null);
23857
- const [draft, setDraft] = React66__namespace.useState({ key: "", value: "" });
24076
+ const items = React67__namespace.useMemo(() => mapToItems(value), [value]);
24077
+ const [dialogOpen, setDialogOpen] = React67__namespace.useState(false);
24078
+ const [editingIndex, setEditingIndex] = React67__namespace.useState(null);
24079
+ const [draft, setDraft] = React67__namespace.useState({ key: "", value: "" });
23858
24080
  const canAdd = items.length < max2;
23859
24081
  const canDelete = items.length > min2;
23860
24082
  const hasItems = items.length > 0;
23861
- const commitItems = React66__namespace.useCallback(
24083
+ const commitItems = React67__namespace.useCallback(
23862
24084
  (next, meta) => {
23863
24085
  if (!onValue) return;
23864
24086
  const nextMap = itemsToMap(next);
@@ -23872,13 +24094,13 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
23872
24094
  },
23873
24095
  [onValue]
23874
24096
  );
23875
- const openForNew = React66__namespace.useCallback(() => {
24097
+ const openForNew = React67__namespace.useCallback(() => {
23876
24098
  if (isDisabled || !canAdd) return;
23877
24099
  setEditingIndex(null);
23878
24100
  setDraft({ key: "", value: "" });
23879
24101
  setDialogOpen(true);
23880
24102
  }, [isDisabled, canAdd]);
23881
- const openForEdit = React66__namespace.useCallback(
24103
+ const openForEdit = React67__namespace.useCallback(
23882
24104
  (index) => {
23883
24105
  if (isDisabled) return;
23884
24106
  const item = items[index];
@@ -23889,7 +24111,7 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
23889
24111
  },
23890
24112
  [isDisabled, items]
23891
24113
  );
23892
- const handleDelete = React66__namespace.useCallback(() => {
24114
+ const handleDelete = React67__namespace.useCallback(() => {
23893
24115
  if (editingIndex == null) return;
23894
24116
  if (!canDelete) return;
23895
24117
  const next = items.slice();
@@ -23900,7 +24122,7 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
23900
24122
  index: editingIndex
23901
24123
  });
23902
24124
  }, [editingIndex, items, canDelete, commitItems]);
23903
- const handleSubmit = React66__namespace.useCallback(() => {
24125
+ const handleSubmit = React67__namespace.useCallback(() => {
23904
24126
  const trimmedKey = draft.key.trim();
23905
24127
  const trimmedValue = draft.value;
23906
24128
  if (!trimmedKey) return;
@@ -23922,7 +24144,7 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
23922
24144
  index: editingIndex != null ? editingIndex : next.length - 1
23923
24145
  });
23924
24146
  }, [draft, items, editingIndex, canAdd, commitItems]);
23925
- const handleQuickRemove = React66__namespace.useCallback(
24147
+ const handleQuickRemove = React67__namespace.useCallback(
23926
24148
  (index) => {
23927
24149
  if (isDisabled || !canDelete) return;
23928
24150
  const next = items.slice();
@@ -23931,21 +24153,21 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
23931
24153
  },
23932
24154
  [isDisabled, canDelete, items, commitItems]
23933
24155
  );
23934
- const [listOpen, setListOpen] = React66__namespace.useState(false);
23935
- const openList = React66__namespace.useCallback(() => {
24156
+ const [listOpen, setListOpen] = React67__namespace.useState(false);
24157
+ const openList = React67__namespace.useCallback(() => {
23936
24158
  if (isDisabled) return;
23937
24159
  setListOpen(true);
23938
24160
  }, [isDisabled]);
23939
- const wrapRef = React66__namespace.useRef(null);
23940
- const leftRef = React66__namespace.useRef(null);
23941
- const moreMeasureRef = React66__namespace.useRef(null);
23942
- const chipRefs = React66__namespace.useRef([]);
24161
+ const wrapRef = React67__namespace.useRef(null);
24162
+ const leftRef = React67__namespace.useRef(null);
24163
+ const moreMeasureRef = React67__namespace.useRef(null);
24164
+ const chipRefs = React67__namespace.useRef([]);
23943
24165
  chipRefs.current = items.map((_2, i3) => {
23944
24166
  var _a;
23945
24167
  return (_a = chipRefs.current[i3]) != null ? _a : null;
23946
24168
  });
23947
- const [visibleCount, setVisibleCount] = React66__namespace.useState(() => items.length);
23948
- const recomputeVisible = React66__namespace.useCallback(() => {
24169
+ const [visibleCount, setVisibleCount] = React67__namespace.useState(() => items.length);
24170
+ const recomputeVisible = React67__namespace.useCallback(() => {
23949
24171
  var _a, _b;
23950
24172
  const leftEl = leftRef.current;
23951
24173
  if (!leftEl) {
@@ -23994,10 +24216,10 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
23994
24216
  }
23995
24217
  setVisibleCount(best);
23996
24218
  }, [items.length]);
23997
- React66__namespace.useLayoutEffect(() => {
24219
+ React67__namespace.useLayoutEffect(() => {
23998
24220
  recomputeVisible();
23999
24221
  }, [recomputeVisible, items, size, density, showValue]);
24000
- React66__namespace.useEffect(() => {
24222
+ React67__namespace.useEffect(() => {
24001
24223
  const el = leftRef.current;
24002
24224
  if (!el) return;
24003
24225
  const ro = new ResizeObserver(() => recomputeVisible());
@@ -24204,7 +24426,7 @@ var ShadcnKeyValueVariant = React66__namespace.forwardRef(function ShadcnKeyValu
24204
24426
  }
24205
24427
  )
24206
24428
  ] }),
24207
- items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-border/50 px-3 py-6 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-auto rounded-md border border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-border/50", children: items.map((pair, index) => /* @__PURE__ */ jsxRuntime.jsxs(
24429
+ items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-border/50 px-3 py-6 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "max-h-64 rounded-md border border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-border/50", children: items.map((pair, index) => /* @__PURE__ */ jsxRuntime.jsxs(
24208
24430
  "div",
24209
24431
  {
24210
24432
  className: "flex items-center justify-between gap-2 px-2 py-1.5",
@@ -24387,7 +24609,7 @@ var keyValueModule = {
24387
24609
  label: ""
24388
24610
  }
24389
24611
  };
24390
- var ShadcnCustomVariant = React66__namespace.forwardRef(function ShadcnCustomVariant2(props, ref) {
24612
+ var ShadcnCustomVariant = React67__namespace.forwardRef(function ShadcnCustomVariant2(props, ref) {
24391
24613
  const {
24392
24614
  // Variant base props we care about:
24393
24615
  value,
@@ -24423,7 +24645,7 @@ var ShadcnCustomVariant = React66__namespace.forwardRef(function ShadcnCustomVar
24423
24645
  }
24424
24646
  const isDisabled = !!disabled;
24425
24647
  const isReadOnly = !!readOnly;
24426
- const handleChange = React66__namespace.useCallback(
24648
+ const handleChange = React67__namespace.useCallback(
24427
24649
  (...args) => {
24428
24650
  var _a;
24429
24651
  if (!onValue) return;
@@ -24528,7 +24750,7 @@ function triggerHeight3(size) {
24528
24750
  return "min-h-9 text-sm";
24529
24751
  }
24530
24752
  }
24531
- var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeSelectVariant2(props, ref) {
24753
+ var ShadcnTreeSelectVariant = React67__namespace.forwardRef(function ShadcnTreeSelectVariant2(props, ref) {
24532
24754
  const {
24533
24755
  value,
24534
24756
  onValue,
@@ -24588,14 +24810,14 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24588
24810
  selectedBadgeClassName,
24589
24811
  selectedBadgePlacement = "corner"
24590
24812
  } = props;
24591
- const [open, setOpen] = React66__namespace.useState(false);
24592
- const [query, setQuery] = React66__namespace.useState("");
24813
+ const [open, setOpen] = React67__namespace.useState(false);
24814
+ const [query, setQuery] = React67__namespace.useState("");
24593
24815
  const isDisabled = disabled || readOnly;
24594
- const d = React66__namespace.useMemo(
24816
+ const d = React67__namespace.useMemo(
24595
24817
  () => densityClasses(density),
24596
24818
  [density]
24597
24819
  );
24598
- const tree = React66__namespace.useMemo(
24820
+ const tree = React67__namespace.useMemo(
24599
24821
  () => normalizeTree(options != null ? options : [], {
24600
24822
  autoCap,
24601
24823
  optionLabel,
@@ -24630,8 +24852,8 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24630
24852
  optionTagOnClick
24631
24853
  ]
24632
24854
  );
24633
- const allNodesFlat = React66__namespace.useMemo(() => flattenTree(tree), [tree]);
24634
- const computedInitialExpanded = React66__namespace.useMemo(() => {
24855
+ const allNodesFlat = React67__namespace.useMemo(() => flattenTree(tree), [tree]);
24856
+ const computedInitialExpanded = React67__namespace.useMemo(() => {
24635
24857
  if (expandAll) {
24636
24858
  return new Set(
24637
24859
  allNodesFlat.filter((n3) => n3.hasChildren).map((n3) => n3.value)
@@ -24642,13 +24864,13 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24642
24864
  }
24643
24865
  return /* @__PURE__ */ new Set();
24644
24866
  }, [expandAll, defaultExpandedValues, allNodesFlat]);
24645
- const [expanded, setExpanded] = React66__namespace.useState(
24867
+ const [expanded, setExpanded] = React67__namespace.useState(
24646
24868
  computedInitialExpanded
24647
24869
  );
24648
- React66__namespace.useEffect(() => {
24870
+ React67__namespace.useEffect(() => {
24649
24871
  setExpanded(computedInitialExpanded);
24650
24872
  }, [computedInitialExpanded]);
24651
- const toggleExpanded = React66__namespace.useCallback((key) => {
24873
+ const toggleExpanded = React67__namespace.useCallback((key) => {
24652
24874
  setExpanded((prev) => {
24653
24875
  const next = new Set(prev);
24654
24876
  if (next.has(key)) next.delete(key);
@@ -24656,7 +24878,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24656
24878
  return next;
24657
24879
  });
24658
24880
  }, []);
24659
- const displayedNodes = React66__namespace.useMemo(() => {
24881
+ const displayedNodes = React67__namespace.useMemo(() => {
24660
24882
  if (query) {
24661
24883
  const q2 = query.toLowerCase();
24662
24884
  const matchSet = /* @__PURE__ */ new Set();
@@ -24690,19 +24912,19 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24690
24912
  displayedNodes.length * estimatedRowHeight
24691
24913
  )
24692
24914
  );
24693
- const selectedValues = React66__namespace.useMemo(() => {
24915
+ const selectedValues = React67__namespace.useMemo(() => {
24694
24916
  if (value === void 0 || value === null) return [];
24695
24917
  if (Array.isArray(value)) {
24696
24918
  return multiple ? value : value.length ? [value[0]] : [];
24697
24919
  }
24698
24920
  return [value];
24699
24921
  }, [value, multiple]);
24700
- const selectedItems = React66__namespace.useMemo(
24922
+ const selectedItems = React67__namespace.useMemo(
24701
24923
  () => allNodesFlat.filter((node) => selectedValues.includes(node.value)),
24702
24924
  [allNodesFlat, selectedValues]
24703
24925
  );
24704
24926
  const selectedCount = selectedItems.length;
24705
- const handleToggleValue = React66__namespace.useCallback(
24927
+ const handleToggleValue = React67__namespace.useCallback(
24706
24928
  (item) => {
24707
24929
  if (isDisabled) return;
24708
24930
  if (leafOnly && item.hasChildren) {
@@ -24745,7 +24967,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24745
24967
  allNodesFlat
24746
24968
  ]
24747
24969
  );
24748
- const handleClear = React66__namespace.useCallback(() => {
24970
+ const handleClear = React67__namespace.useCallback(() => {
24749
24971
  if (!onValue) return;
24750
24972
  const detail = {
24751
24973
  source: "variant",
@@ -24796,12 +25018,12 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24796
25018
  ) });
24797
25019
  };
24798
25020
  const triggerContent = renderValue ? renderValue({ selectedItems, placeholder }) : renderDefaultTriggerContent();
25021
+ const triggerPaddingClasses = cn("px-3", d.triggerPy);
24799
25022
  const baseBoxClasses = cn(
24800
- "flex items-center justify-between border-input w-full min-w-0 rounded-md border bg-background text-sm shadow-xs ring-offset-background",
24801
- "placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
24802
- "disabled:cursor-not-allowed disabled:opacity-50",
24803
- "aria-invalid:border-destructive",
24804
- d.triggerPy
25023
+ "flex items-center justify-between w-full min-w-0 text-sm ring-offset-background",
25024
+ "placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
25025
+ triggerPaddingClasses,
25026
+ hasControls && extendBoxToControls ? "border-none shadow-none focus:outline-none bg-transparent text-left" : "border-input rounded-md border bg-background shadow-xs focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 aria-invalid:border-destructive"
24805
25027
  );
24806
25028
  const DefaultTriggerButton = /* @__PURE__ */ jsxRuntime.jsx(
24807
25029
  "button",
@@ -24811,7 +25033,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24811
25033
  disabled: isDisabled,
24812
25034
  className: cn(
24813
25035
  triggerHeight3(size),
24814
- hasControls && extendBoxToControls ? "border-none shadow-none focus:outline-none bg-transparent w-full text-left" : baseBoxClasses,
25036
+ baseBoxClasses,
24815
25037
  triggerClassName
24816
25038
  ),
24817
25039
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between gap-2 overflow-hidden", children: [
@@ -24853,7 +25075,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24853
25075
  ] })
24854
25076
  }
24855
25077
  );
24856
- const ButtonModeTrigger = React66__namespace.useMemo(() => {
25078
+ const ButtonModeTrigger = React67__namespace.useMemo(() => {
24857
25079
  if (mode !== "button") return null;
24858
25080
  const ctx = { open, selectedItems, selectedCount };
24859
25081
  const triggerNode = typeof button === "function" ? button(ctx) : button != null ? button : typeof children === "function" ? children(ctx) : children;
@@ -24883,7 +25105,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24883
25105
  badgeEl
24884
25106
  ] });
24885
25107
  };
24886
- if (React66__namespace.isValidElement(triggerNode)) {
25108
+ if (React67__namespace.isValidElement(triggerNode)) {
24887
25109
  return wrapWithBadge(triggerNode);
24888
25110
  }
24889
25111
  return wrapWithBadge(
@@ -24917,7 +25139,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
24917
25139
  emptyLabel && tree.length === 0 && !query && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 text-sm text-center text-muted-foreground", children: emptyLabel }),
24918
25140
  tree.length > 0 && displayedNodes.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 text-sm text-center text-muted-foreground", children: emptySearchText != null ? emptySearchText : "No results found" }),
24919
25141
  displayedNodes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
24920
- reactVirtuoso.Virtuoso,
25142
+ VirtualScroll,
24921
25143
  {
24922
25144
  style: { height: listHeight },
24923
25145
  data: displayedNodes,
@@ -25012,7 +25234,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
25012
25234
  );
25013
25235
  const renderer = (_b = item.render) != null ? _b : renderOption;
25014
25236
  if (!renderer) {
25015
- return /* @__PURE__ */ jsxRuntime.jsx(React66__namespace.Fragment, { children: optionNode }, item.key);
25237
+ return /* @__PURE__ */ jsxRuntime.jsx(React67__namespace.Fragment, { children: optionNode }, item.key);
25016
25238
  }
25017
25239
  const rendered = renderer({
25018
25240
  item,
@@ -25023,7 +25245,7 @@ var ShadcnTreeSelectVariant = React66__namespace.forwardRef(function ShadcnTreeS
25023
25245
  if (!item.disabled) handleToggleValue(item);
25024
25246
  }
25025
25247
  });
25026
- return /* @__PURE__ */ jsxRuntime.jsx(React66__namespace.Fragment, { children: rendered }, item.key);
25248
+ return /* @__PURE__ */ jsxRuntime.jsx(React67__namespace.Fragment, { children: rendered }, item.key);
25027
25249
  }
25028
25250
  }
25029
25251
  )
@@ -25140,62 +25362,28 @@ var treeselect_default = ShadcnTreeSelectVariant;
25140
25362
  // src/variants/core/treeselect.tsx
25141
25363
  var treeselectModule = {
25142
25364
  variant: "treeselect",
25143
- Variant: treeselect_default
25365
+ Variant: treeselect_default,
25366
+ // Layout defaults for this variant
25367
+ defaults: {
25368
+ layout: {
25369
+ labelPlacement: "top",
25370
+ sublabelPlacement: "right",
25371
+ descriptionPlacement: "below",
25372
+ helpTextPlacement: "below",
25373
+ errorTextPlacement: "below",
25374
+ inline: false,
25375
+ fullWidth: true,
25376
+ defaultSize: "md",
25377
+ defaultDensity: "comfortable"
25378
+ }
25379
+ },
25380
+ meta: {
25381
+ label: "TreeSelect",
25382
+ description: "Hierarchical tree selection dropdown with collapsible folders and node tags.",
25383
+ tags: ["tree", "select", "hierarchical", "dropdown", "multiselect"]
25384
+ }
25144
25385
  };
25145
25386
  var treeselect_default2 = treeselectModule;
25146
- function ScrollArea({
25147
- className,
25148
- children,
25149
- ...props
25150
- }) {
25151
- return /* @__PURE__ */ jsxRuntime.jsxs(
25152
- ScrollAreaPrimitive__namespace.Root,
25153
- {
25154
- "data-slot": "scroll-area",
25155
- className: cn("relative", className),
25156
- ...props,
25157
- children: [
25158
- /* @__PURE__ */ jsxRuntime.jsx(
25159
- ScrollAreaPrimitive__namespace.Viewport,
25160
- {
25161
- "data-slot": "scroll-area-viewport",
25162
- className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
25163
- children
25164
- }
25165
- ),
25166
- /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
25167
- /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
25168
- ]
25169
- }
25170
- );
25171
- }
25172
- function ScrollBar({
25173
- className,
25174
- orientation = "vertical",
25175
- ...props
25176
- }) {
25177
- return /* @__PURE__ */ jsxRuntime.jsx(
25178
- ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
25179
- {
25180
- "data-slot": "scroll-area-scrollbar",
25181
- orientation,
25182
- className: cn(
25183
- "flex touch-none p-px transition-colors select-none",
25184
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
25185
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
25186
- className
25187
- ),
25188
- ...props,
25189
- children: /* @__PURE__ */ jsxRuntime.jsx(
25190
- ScrollAreaPrimitive__namespace.ScrollAreaThumb,
25191
- {
25192
- "data-slot": "scroll-area-thumb",
25193
- className: "bg-border relative flex-1 rounded-full"
25194
- }
25195
- )
25196
- }
25197
- );
25198
- }
25199
25387
  function fileId() {
25200
25388
  return `file_${Math.random().toString(36).slice(2)}`;
25201
25389
  }
@@ -25348,8 +25536,8 @@ function mergeHandlers(a3, b2) {
25348
25536
  };
25349
25537
  }
25350
25538
  var FileThumbnail = ({ item }) => {
25351
- const [preview, setPreview] = React66__namespace.useState(null);
25352
- React66__namespace.useEffect(() => {
25539
+ const [preview, setPreview] = React67__namespace.useState(null);
25540
+ React67__namespace.useEffect(() => {
25353
25541
  var _a;
25354
25542
  const isImage2 = ((_a = item.type) == null ? void 0 : _a.startsWith("image/")) || item.name.match(/\.(jpg|jpeg|png|gif|webp)$/i);
25355
25543
  if (!isImage2) return;
@@ -25371,7 +25559,7 @@ var FileThumbnail = ({ item }) => {
25371
25559
  }
25372
25560
  ) : /* @__PURE__ */ jsxRuntime.jsx(File2, { className: "h-4 w-4 text-muted-foreground/50" }) });
25373
25561
  };
25374
- var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant2(props, ref) {
25562
+ var ShadcnFileVariant = React67__namespace.forwardRef(function ShadcnFileVariant2(props, ref) {
25375
25563
  const {
25376
25564
  value,
25377
25565
  onValue,
@@ -25425,18 +25613,18 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25425
25613
  } = props;
25426
25614
  const joinControls = mode === "default" ? joinControlsProp != null ? joinControlsProp : true : false;
25427
25615
  const extendBoxToControls = mode === "default" ? extendBoxToControlsProp != null ? extendBoxToControlsProp : true : false;
25428
- const items = React66__namespace.useMemo(() => {
25616
+ const items = React67__namespace.useMemo(() => {
25429
25617
  var _a;
25430
25618
  const raw = (_a = toArray(value)) != null ? _a : [];
25431
25619
  return raw.map(normaliseFileLike);
25432
25620
  }, [value]);
25433
25621
  const isDisabled = Boolean(disabled || readOnly);
25434
- const [dragOver, setDragOver] = React66__namespace.useState(false);
25435
- const [selectedIds, setSelectedIds] = React66__namespace.useState(
25622
+ const [dragOver, setDragOver] = React67__namespace.useState(false);
25623
+ const [selectedIds, setSelectedIds] = React67__namespace.useState(
25436
25624
  () => /* @__PURE__ */ new Set()
25437
25625
  );
25438
- const [popoverOpen, setPopoverOpen] = React66__namespace.useState(false);
25439
- const fileInputRef = React66__namespace.useRef(null);
25626
+ const [popoverOpen, setPopoverOpen] = React67__namespace.useState(false);
25627
+ const fileInputRef = React67__namespace.useRef(null);
25440
25628
  const den = densityTokens(density);
25441
25629
  const heightCls = triggerHeight4(size);
25442
25630
  const chipHeightCls = chipHeight(size);
@@ -25445,7 +25633,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25445
25633
  const resolvedTrailingIcons = (trailingIcons == null ? void 0 : trailingIcons.length) ? trailingIcons : [];
25446
25634
  const hasExternalControls = !!leadingControl || !!trailingControl;
25447
25635
  const COLLAPSE_LIMIT = 2;
25448
- const emitChange = React66__namespace.useCallback(
25636
+ const emitChange = React67__namespace.useCallback(
25449
25637
  (nextItems, meta) => {
25450
25638
  var _a;
25451
25639
  const nextValues = nextItems.map(fileItemToValue);
@@ -25459,7 +25647,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25459
25647
  },
25460
25648
  [multiple, onValue]
25461
25649
  );
25462
- const handleAddItems = React66__namespace.useCallback(
25650
+ const handleAddItems = React67__namespace.useCallback(
25463
25651
  (incoming, from) => {
25464
25652
  if (isDisabled) return;
25465
25653
  let next = multiple ? [...items] : [];
@@ -25496,7 +25684,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25496
25684
  onFilesAdded
25497
25685
  ]
25498
25686
  );
25499
- const handleRemove = React66__namespace.useCallback(
25687
+ const handleRemove = React67__namespace.useCallback(
25500
25688
  (id) => {
25501
25689
  const next = items.filter((i3) => i3.id !== id);
25502
25690
  emitChange(next, { action: "remove", id });
@@ -25508,7 +25696,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25508
25696
  },
25509
25697
  [emitChange, items, selectedIds]
25510
25698
  );
25511
- const handleBulkRemove = React66__namespace.useCallback(() => {
25699
+ const handleBulkRemove = React67__namespace.useCallback(() => {
25512
25700
  const next = items.filter((i3) => !selectedIds.has(i3.id));
25513
25701
  emitChange(next, {
25514
25702
  action: "bulk-remove",
@@ -25516,7 +25704,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25516
25704
  });
25517
25705
  setSelectedIds(/* @__PURE__ */ new Set());
25518
25706
  }, [emitChange, items, selectedIds]);
25519
- const openPicker = React66__namespace.useCallback(async () => {
25707
+ const openPicker = React67__namespace.useCallback(async () => {
25520
25708
  var _a;
25521
25709
  if (isDisabled) return;
25522
25710
  let resolvedLoader = customLoader != null ? customLoader : custom && getPaletteUtil("customLoader");
@@ -25555,14 +25743,14 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25555
25743
  mergeMode,
25556
25744
  multiple
25557
25745
  ]);
25558
- const onDragOver = React66__namespace.useCallback(
25746
+ const onDragOver = React67__namespace.useCallback(
25559
25747
  (e4) => {
25560
25748
  e4.preventDefault();
25561
25749
  if (!isDisabled) setDragOver(true);
25562
25750
  },
25563
25751
  [isDisabled]
25564
25752
  );
25565
- const onDrop = React66__namespace.useCallback(
25753
+ const onDrop = React67__namespace.useCallback(
25566
25754
  (e4) => {
25567
25755
  var _a;
25568
25756
  e4.preventDefault();
@@ -25580,15 +25768,15 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25580
25768
  }
25581
25769
  e4.target.value = "";
25582
25770
  };
25583
- const FileChip = React66__namespace.useCallback(
25771
+ const FileChip = React67__namespace.useCallback(
25584
25772
  ({
25585
25773
  item,
25586
25774
  condensed = false
25587
25775
  }) => {
25588
25776
  const name = formatFileName ? formatFileName(item) : item.name;
25589
- const [preview, setPreview] = React66__namespace.useState(null);
25590
- const [isOpen, setIsOpen] = React66__namespace.useState(false);
25591
- React66__namespace.useEffect(() => {
25777
+ const [preview, setPreview] = React67__namespace.useState(null);
25778
+ const [isOpen, setIsOpen] = React67__namespace.useState(false);
25779
+ React67__namespace.useEffect(() => {
25592
25780
  var _a;
25593
25781
  const isImage2 = ((_a = item.type) == null ? void 0 : _a.startsWith("image/")) || item.name.match(/\.(jpg|jpeg|png|gif|webp)$/i);
25594
25782
  if (!isImage2) {
@@ -25695,7 +25883,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25695
25883
  ]
25696
25884
  );
25697
25885
  const selectedCount = items.length;
25698
- const resolveButtonTriggerElement = React66__namespace.useCallback(() => {
25886
+ const resolveButtonTriggerElement = React67__namespace.useCallback(() => {
25699
25887
  const ctx = {
25700
25888
  open: popoverOpen,
25701
25889
  items,
@@ -25725,7 +25913,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25725
25913
  );
25726
25914
  const child = el.props.children;
25727
25915
  if (selectedBadgePlacement === "end") {
25728
- return React66__namespace.cloneElement(el, {
25916
+ return React67__namespace.cloneElement(el, {
25729
25917
  className: nextClass,
25730
25918
  children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-2", children: [
25731
25919
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0", children: child }),
@@ -25733,7 +25921,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25733
25921
  ] })
25734
25922
  });
25735
25923
  }
25736
- return React66__namespace.cloneElement(el, {
25924
+ return React67__namespace.cloneElement(el, {
25737
25925
  className: nextClass,
25738
25926
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
25739
25927
  child,
@@ -25741,7 +25929,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25741
25929
  ] })
25742
25930
  });
25743
25931
  };
25744
- const withDnD = (el) => React66__namespace.cloneElement(el, {
25932
+ const withDnD = (el) => React67__namespace.cloneElement(el, {
25745
25933
  onDragOver: mergeHandlers(
25746
25934
  el.props.onDragOver,
25747
25935
  onDragOver
@@ -25752,7 +25940,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25752
25940
  ),
25753
25941
  onDrop: mergeHandlers(el.props.onDrop, onDrop)
25754
25942
  });
25755
- if (React66__namespace.isValidElement(rawNode)) {
25943
+ if (React67__namespace.isValidElement(rawNode)) {
25756
25944
  return withDnD(injectBadgeIntoElement(rawNode));
25757
25945
  }
25758
25946
  const fallback = /* @__PURE__ */ jsxRuntime.jsxs(
@@ -25808,7 +25996,7 @@ var ShadcnFileVariant = React66__namespace.forwardRef(function ShadcnFileVariant
25808
25996
  selectedCount,
25809
25997
  triggerClassName
25810
25998
  ]);
25811
- const TriggerRegion = React66__namespace.useMemo(() => {
25999
+ const TriggerRegion = React67__namespace.useMemo(() => {
25812
26000
  if (showDropArea) {
25813
26001
  if (renderDropArea)
25814
26002
  return renderDropArea({ openPicker, isDragging: dragOver });
@@ -26268,7 +26456,7 @@ var toggleVariants = cva(
26268
26456
  }
26269
26457
  }
26270
26458
  );
26271
- var ToggleGroupContext = React66__namespace.createContext({
26459
+ var ToggleGroupContext = React67__namespace.createContext({
26272
26460
  size: "default",
26273
26461
  variant: "default",
26274
26462
  spacing: 0
@@ -26305,7 +26493,7 @@ function ToggleGroupItem({
26305
26493
  size,
26306
26494
  ...props
26307
26495
  }) {
26308
- const context = React66__namespace.useContext(ToggleGroupContext);
26496
+ const context = React67__namespace.useContext(ToggleGroupContext);
26309
26497
  return /* @__PURE__ */ jsxRuntime.jsx(
26310
26498
  ToggleGroupPrimitive__namespace.Item,
26311
26499
  {
@@ -26496,7 +26684,7 @@ function normalizeOption(input, {
26496
26684
  raw: input
26497
26685
  };
26498
26686
  }
26499
- var ShadcnToggleVariant3 = React66__namespace.forwardRef(function ShadcnToggleVariant4(props, ref) {
26687
+ var ShadcnToggleVariant3 = React67__namespace.forwardRef(function ShadcnToggleVariant4(props, ref) {
26500
26688
  const {
26501
26689
  value,
26502
26690
  onValue,
@@ -26533,7 +26721,7 @@ var ShadcnToggleVariant3 = React66__namespace.forwardRef(function ShadcnToggleVa
26533
26721
  const isDisabled = Boolean(disabled || readOnly);
26534
26722
  const toggleSize = mapSizeToToggleSize(size);
26535
26723
  const currentValue = normalizeValue(value, multiple);
26536
- const normalizedOptions = React66__namespace.useMemo(
26724
+ const normalizedOptions = React67__namespace.useMemo(
26537
26725
  () => options.map(
26538
26726
  (opt) => normalizeOption(
26539
26727
  opt,
@@ -26573,7 +26761,7 @@ var ShadcnToggleVariant3 = React66__namespace.forwardRef(function ShadcnToggleVa
26573
26761
  autoCap
26574
26762
  ]
26575
26763
  );
26576
- const handleChange = React66__namespace.useCallback(
26764
+ const handleChange = React67__namespace.useCallback(
26577
26765
  (val) => {
26578
26766
  if (readOnly) return;
26579
26767
  if (!onValue) return;
@@ -26610,7 +26798,7 @@ var ShadcnToggleVariant3 = React66__namespace.forwardRef(function ShadcnToggleVa
26610
26798
  fullWidth && layout === "vertical" && "[&>*]:w-full",
26611
26799
  className
26612
26800
  );
26613
- const groupStyle = React66__namespace.useMemo(() => {
26801
+ const groupStyle = React67__namespace.useMemo(() => {
26614
26802
  const style = {};
26615
26803
  if (layout === "grid") {
26616
26804
  style.gridTemplateColumns = `repeat(${gridCols}, minmax(0, 1fr))`;
@@ -26751,29 +26939,29 @@ function ShadcnEditorVariant(props) {
26751
26939
  theme = "auto",
26752
26940
  themeTarget = "nearest"
26753
26941
  } = props;
26754
- const mountRef = React66__namespace.useRef(null);
26755
- const editorRef = React66__namespace.useRef(null);
26756
- const formatRef = React66__namespace.useRef(format2);
26757
- const onValueRef = React66__namespace.useRef(onValue);
26758
- const syncingRef = React66__namespace.useRef(false);
26759
- const loadedRef = React66__namespace.useRef(false);
26760
- const lastContentRef = React66__namespace.useRef(value != null ? value : "");
26761
- const [autoDark, setAutoDark] = React66__namespace.useState(false);
26942
+ const mountRef = React67__namespace.useRef(null);
26943
+ const editorRef = React67__namespace.useRef(null);
26944
+ const formatRef = React67__namespace.useRef(format2);
26945
+ const onValueRef = React67__namespace.useRef(onValue);
26946
+ const syncingRef = React67__namespace.useRef(false);
26947
+ const loadedRef = React67__namespace.useRef(false);
26948
+ const lastContentRef = React67__namespace.useRef(value != null ? value : "");
26949
+ const [autoDark, setAutoDark] = React67__namespace.useState(false);
26762
26950
  formatRef.current = format2;
26763
26951
  onValueRef.current = onValue;
26764
26952
  if (value !== void 0) lastContentRef.current = value;
26765
26953
  const effectiveReadOnly = Boolean(disabled || readOnly);
26766
26954
  const effectiveTheme = theme === "auto" ? autoDark ? "dark" : "light" : theme;
26767
- const readContent = React66__namespace.useCallback((ed) => {
26955
+ const readContent = React67__namespace.useCallback((ed) => {
26768
26956
  var _a, _b;
26769
26957
  return formatRef.current === "markdown" ? (_a = ed.getMarkdown()) != null ? _a : "" : (_b = ed.getHTML()) != null ? _b : "";
26770
26958
  }, []);
26771
- const emit = React66__namespace.useCallback((next) => {
26959
+ const emit = React67__namespace.useCallback((next) => {
26772
26960
  var _a;
26773
26961
  const detail = { source: "user", raw: next };
26774
26962
  (_a = onValueRef.current) == null ? void 0 : _a.call(onValueRef, next, detail);
26775
26963
  }, []);
26776
- const structuralKey = React66__namespace.useMemo(() => {
26964
+ const structuralKey = React67__namespace.useMemo(() => {
26777
26965
  const hideModeSwitch = toolbar === "none" || pastePlainText;
26778
26966
  return JSON.stringify({
26779
26967
  toolbar,
@@ -26782,7 +26970,7 @@ function ShadcnEditorVariant(props) {
26782
26970
  effectiveTheme
26783
26971
  });
26784
26972
  }, [toolbar, useCommandShortcut, pastePlainText, effectiveTheme]);
26785
- React66__namespace.useEffect(() => {
26973
+ React67__namespace.useEffect(() => {
26786
26974
  if (theme !== "auto") return;
26787
26975
  if (typeof document === "undefined") return;
26788
26976
  const host = mountRef.current;
@@ -26807,7 +26995,7 @@ function ShadcnEditorVariant(props) {
26807
26995
  }
26808
26996
  return () => observer.disconnect();
26809
26997
  }, [theme, themeTarget]);
26810
- React66__namespace.useEffect(() => {
26998
+ React67__namespace.useEffect(() => {
26811
26999
  var _a;
26812
27000
  const el = mountRef.current;
26813
27001
  if (!el) return;
@@ -26878,29 +27066,29 @@ function ShadcnEditorVariant(props) {
26878
27066
  editorRef.current = null;
26879
27067
  };
26880
27068
  }, [structuralKey]);
26881
- React66__namespace.useEffect(() => {
27069
+ React67__namespace.useEffect(() => {
26882
27070
  const ed = editorRef.current;
26883
27071
  if (!ed) return;
26884
27072
  if (typeof ed.setHeight === "function") ed.setHeight(height);
26885
27073
  }, [height]);
26886
- React66__namespace.useEffect(() => {
27074
+ React67__namespace.useEffect(() => {
26887
27075
  const ed = editorRef.current;
26888
27076
  if (!ed) return;
26889
27077
  if (typeof ed.setPlaceholder === "function")
26890
27078
  ed.setPlaceholder(placeholder);
26891
27079
  }, [placeholder]);
26892
- React66__namespace.useEffect(() => {
27080
+ React67__namespace.useEffect(() => {
26893
27081
  const ed = editorRef.current;
26894
27082
  if (!ed) return;
26895
27083
  if (typeof ed.changeMode === "function") ed.changeMode(editType);
26896
27084
  }, [editType]);
26897
- React66__namespace.useEffect(() => {
27085
+ React67__namespace.useEffect(() => {
26898
27086
  const ed = editorRef.current;
26899
27087
  if (!ed) return;
26900
27088
  if (typeof ed.changePreviewStyle === "function")
26901
27089
  ed.changePreviewStyle(previewStyle);
26902
27090
  }, [previewStyle]);
26903
- React66__namespace.useEffect(() => {
27091
+ React67__namespace.useEffect(() => {
26904
27092
  var _a, _b, _c, _d;
26905
27093
  const ed = editorRef.current;
26906
27094
  if (!ed) return;
@@ -26918,7 +27106,7 @@ function ShadcnEditorVariant(props) {
26918
27106
  syncingRef.current = false;
26919
27107
  });
26920
27108
  }, [value, format2]);
26921
- React66__namespace.useEffect(() => {
27109
+ React67__namespace.useEffect(() => {
26922
27110
  if (!pastePlainText) return;
26923
27111
  const host = mountRef.current;
26924
27112
  if (!host) return;
@@ -27422,10 +27610,10 @@ function JsonEditorMain(props) {
27422
27610
  className,
27423
27611
  contentClassName
27424
27612
  } = props;
27425
- const directChildPaths = React66__namespace.useMemo(() => {
27613
+ const directChildPaths = React67__namespace.useMemo(() => {
27426
27614
  return getDirectChildPaths(route, allPaths);
27427
27615
  }, [route, allPaths]);
27428
- const rows = React66__namespace.useMemo(() => {
27616
+ const rows = React67__namespace.useMemo(() => {
27429
27617
  return resolveLayoutForParent({
27430
27618
  parent: route,
27431
27619
  childPaths: directChildPaths,
@@ -27433,7 +27621,7 @@ function JsonEditorMain(props) {
27433
27621
  filters
27434
27622
  });
27435
27623
  }, [route, directChildPaths, layout, filters]);
27436
- const effectiveRows = React66__namespace.useMemo(() => {
27624
+ const effectiveRows = React67__namespace.useMemo(() => {
27437
27625
  const hasAny = rows.some((r5) => {
27438
27626
  var _a;
27439
27627
  return (_a = r5.fields) == null ? void 0 : _a.length;
@@ -27957,12 +28145,12 @@ var T = (e4) => {
27957
28145
  };
27958
28146
  var x = "__\u200Bundefined__";
27959
28147
  var A = { displayName: "Default", fragments: { edit: "rgb(42, 161, 152)" }, styles: { container: { backgroundColor: "#f6f6f6", fontFamily: "monospace" }, collection: {}, collectionInner: {}, collectionElement: {}, dropZone: {}, property: "#292929", bracket: { color: "rgb(0, 43, 54)", fontWeight: "bold" }, itemCount: { color: "rgba(0, 0, 0, 0.3)", fontStyle: "italic" }, string: "rgb(203, 75, 22)", number: "rgb(38, 139, 210)", boolean: "green", null: { color: "rgb(220, 50, 47)", fontVariant: "small-caps", fontWeight: "bold" }, input: ["#292929"], inputHighlight: "#b3d8ff", error: { fontSize: "0.8em", color: "red", fontWeight: "bold" }, iconCollection: "rgb(0, 43, 54)", iconEdit: "edit", iconDelete: "rgb(203, 75, 22)", iconAdd: "edit", iconCopy: "rgb(38, 139, 210)", iconOk: "green", iconCancel: "rgb(203, 75, 22)" } };
27960
- var P = React66.createContext({ getStyles: () => ({}), icons: {} });
28148
+ var P = React67.createContext({ getStyles: () => ({}), icons: {} });
27961
28149
  var R = ({ theme: e4 = A, icons: n3 = {}, docRoot: r5, children: o3 }) => {
27962
28150
  const i3 = I(e4, r5);
27963
28151
  return jsxRuntime.jsx(P.Provider, { value: { getStyles: (e5, t4) => "function" == typeof i3[e5] ? i3[e5](t4) : i3[e5], icons: n3 }, children: o3 });
27964
28152
  };
27965
- var K = () => React66.useContext(P);
28153
+ var K = () => React67.useContext(P);
27966
28154
  var I = (e4, t4) => {
27967
28155
  var n3, r5, o3, i3;
27968
28156
  const a3 = {}, l2 = (Array.isArray(e4) ? e4 : [e4]).map(((e5) => _(e5) ? V({ fragments: {}, styles: e5 }, a3) : V(e5, a3))), s3 = V(A, {});
@@ -27998,9 +28186,9 @@ var V = (e4, t4) => {
27998
28186
  };
27999
28187
  var _ = (e4) => !("styles" in e4);
28000
28188
  var F = { container: "backgroundColor", collection: "backgroundColor", collectionInner: "backgroundColor", collectionElement: "backgroundColor", dropZone: "borderColor", inputHighlight: "backgroundColor" };
28001
- var L = React66.createContext(null);
28189
+ var L = React67.createContext(null);
28002
28190
  var z = ({ children: e4, onEditEvent: n3, onCollapse: r5 }) => {
28003
- const [o3, l2] = React66.useState(null), [s3, c2] = React66.useState(null), [d, u] = React66.useState(null), [p2, g2] = React66.useState({ path: null, pathString: null }), m2 = React66.useRef(null), h2 = React66.useRef("next"), y2 = React66.useRef(null);
28191
+ const [o3, l2] = React67.useState(null), [s3, c2] = React67.useState(null), [d, u] = React67.useState(null), [p2, g2] = React67.useState({ path: null, pathString: null }), m2 = React67.useRef(null), h2 = React67.useRef("next"), y2 = React67.useRef(null);
28004
28192
  return jsxRuntime.jsx(L.Provider, { value: { collapseState: o3, setCollapseState: (e5) => {
28005
28193
  l2(e5), r5 && null !== e5 && (Array.isArray(e5) ? e5.forEach(((e6) => r5(e6))) : r5(e5)), null !== e5 && setTimeout((() => l2(null)), 2e3);
28006
28194
  }, getMatchingCollapseState: (e5) => {
@@ -28019,7 +28207,7 @@ var z = ({ children: e4, onEditEvent: n3, onCollapse: r5 }) => {
28019
28207
  }, previousValue: d, setPreviousValue: u, dragSource: p2, setDragSource: g2 }, children: e4 });
28020
28208
  };
28021
28209
  var M = () => {
28022
- const e4 = React66.useContext(L);
28210
+ const e4 = React67.useContext(L);
28023
28211
  if (!e4) throw new Error("Missing Context Provider");
28024
28212
  return e4;
28025
28213
  };
@@ -28031,7 +28219,7 @@ var B = (e4, t4) => {
28031
28219
  };
28032
28220
  var W = "**INVALID_FUNCTION**";
28033
28221
  var G = ({ nodeData: r5, showStringQuotes: o3 = true, stringTruncate: a3 = 200, pathString: l2, canEdit: s3, setIsEditing: c2, styles: d, translate: u, value: p2, TextWrapper: g2 = ({ children: e4 }) => e4 }) => {
28034
- const m2 = null != p2 ? p2 : r5.value, [h2, y2] = React66.useState(false), f2 = o3 ? '"' : "", b2 = m2.length > a3, v2 = () => {
28222
+ const m2 = null != p2 ? p2 : r5.value, [h2, y2] = React67.useState(false), f2 = o3 ? '"' : "", b2 = m2.length > a3, v2 = () => {
28035
28223
  s3 ? c2(true) : y2(!h2);
28036
28224
  };
28037
28225
  return jsxRuntime.jsxs("div", { id: `${l2}_display`, onDoubleClick: v2, onClick: (e4) => {
@@ -28039,7 +28227,7 @@ var G = ({ nodeData: r5, showStringQuotes: o3 = true, stringTruncate: a3 = 200,
28039
28227
  }, className: "jer-value-string", style: d, children: [f2, b2 ? jsxRuntime.jsxs(jsxRuntime.Fragment, h2 ? { children: [jsxRuntime.jsx(g2, { children: jsxRuntime.jsxs("span", { children: [m2, f2] }) }), jsxRuntime.jsxs("span", { className: "jer-string-expansion jer-show-less", onClick: () => y2(false), children: [" ", u("SHOW_LESS", r5)] })] } : { children: [jsxRuntime.jsxs(g2, { children: [jsxRuntime.jsx("span", { children: m2.slice(0, a3 - 2).trimEnd() }), " "] }), jsxRuntime.jsx("span", { className: "jer-string-expansion jer-ellipsis", onClick: () => y2(true), children: "..." }), f2] }) : jsxRuntime.jsx(g2, { children: `${m2}${f2}` })] });
28040
28228
  };
28041
28229
  var Y = ({ styles: e4, pathString: n3, value: r5, setValue: o3, handleEdit: i3, handleKeyboard: l2, keyboardCommon: s3 }) => {
28042
- const c2 = React66.useRef(null);
28230
+ const c2 = React67.useRef(null);
28043
28231
  return jsxRuntime.jsx(m, { className: "jer-input-text", textAreaRef: c2, name: n3, value: r5, setValue: o3, handleKeyPress: (e5) => {
28044
28232
  l2(e5, Object.assign({ stringConfirm: i3, stringLineBreak: () => {
28045
28233
  const e6 = N(c2, "\n");
@@ -28065,14 +28253,14 @@ var $ = ({ value: e4, setValue: n3, isEditing: r5, path: o3, setIsEditing: i3, h
28065
28253
  }, autoFocus: true }) : jsxRuntime.jsx("span", { onDoubleClick: () => i3(true), className: "jer-value-boolean", style: d("boolean", l2), children: String(e4) });
28066
28254
  };
28067
28255
  var Z = (e4, t4) => {
28068
- const n3 = React66.useRef(void 0), r5 = React66.useRef(t4);
28069
- React66.useEffect((() => {
28256
+ const n3 = React67.useRef(void 0), r5 = React67.useRef(t4);
28257
+ React67.useEffect((() => {
28070
28258
  r5.current = t4;
28071
28259
  }), [t4]);
28072
28260
  const o3 = (e5) => {
28073
28261
  r5.current(e5);
28074
28262
  };
28075
- React66.useEffect((() => {
28263
+ React67.useEffect((() => {
28076
28264
  if (window.clearTimeout(n3.current), e4) return n3.current = window.setTimeout((() => {
28077
28265
  window.addEventListener("keydown", o3);
28078
28266
  }), 100), () => {
@@ -28128,7 +28316,7 @@ var ie = ({ name: e4, nodeData: r5 }) => {
28128
28316
  }
28129
28317
  };
28130
28318
  var ae = ({ startEdit: r5, handleDelete: o3, handleAdd: a3, enableClipboard: l2, type: s3, customButtons: c2, nodeData: d, translate: p2, keyboardControls: g2, handleKeyboard: m2, editConfirmRef: h2, getNewKeyOptions: y2, jsonStringify: f2, onEditEvent: b2, showIconTooltips: v2 }) => {
28131
- const { getStyles: j2 } = K(), w2 = p2("KEY_NEW", d), [D2, C2] = React66.useState(w2), [O2, k2] = React66.useState(false), { key: S2, path: N2, value: T2 } = d, x2 = Array.isArray(O2), A2 = (e4) => {
28319
+ const { getStyles: j2 } = K(), w2 = p2("KEY_NEW", d), [D2, C2] = React67.useState(w2), [O2, k2] = React67.useState(false), { key: S2, path: N2, value: T2 } = d, x2 = Array.isArray(O2), A2 = (e4) => {
28132
28320
  var t4;
28133
28321
  if (b2 && b2(e4 ? [...N2, null] : null, e4), !e4) return void k2(false);
28134
28322
  const n3 = Object.keys(r3(d.fullData, N2)), r6 = y2 ? null === (t4 = y2(d)) || void 0 === t4 ? void 0 : t4.filter(((e5) => !n3.includes(e5))) : null;
@@ -28169,9 +28357,9 @@ var le = ({ onOk: n3, onCancel: r5, nodeData: o3, editConfirmRef: i3, hideOk: a3
28169
28357
  var se = (e4) => e4.reduce(((e5, t4) => "number" == typeof t4 ? `${e5}[${t4}]` : "" === e5 ? t4 : `${e5}.${t4}`), "");
28170
28358
  var ce = ["string", "number", "boolean", "null", "object", "array"];
28171
28359
  var de = ({ props: e4, collapsed: t4 }) => {
28172
- const { data: n3, nodeData: r5, parentData: o3, onEdit: a3, onError: l2, showErrorMessages: c2, restrictEditFilter: d, restrictDeleteFilter: u, restrictAddFilter: p2, restrictDragFilter: g2, translate: m2, errorMessageTimeout: h2 } = e4, { currentlyEditingElement: y2, setCurrentlyEditingElement: f2 } = M(), [b2, v2] = React66.useState(null), E2 = Object.assign(Object.assign({}, r5), { collapsed: t4 }), { path: w2, key: D2, size: C2 } = E2, O2 = j(w2), k2 = !d(E2), S2 = !u(E2), N2 = !p2(E2), T2 = !g2(E2) && S2 && null === y2, x2 = (e5) => {
28360
+ const { data: n3, nodeData: r5, parentData: o3, onEdit: a3, onError: l2, showErrorMessages: c2, restrictEditFilter: d, restrictDeleteFilter: u, restrictAddFilter: p2, restrictDragFilter: g2, translate: m2, errorMessageTimeout: h2 } = e4, { currentlyEditingElement: y2, setCurrentlyEditingElement: f2 } = M(), [b2, v2] = React67.useState(null), E2 = Object.assign(Object.assign({}, r5), { collapsed: t4 }), { path: w2, key: D2, size: C2 } = E2, O2 = j(w2), k2 = !d(E2), S2 = !u(E2), N2 = !p2(E2), T2 = !g2(E2) && S2 && null === y2, x2 = (e5) => {
28173
28361
  c2 && (v2(e5), setTimeout((() => v2(null)), h2)), console.warn("Error", e5);
28174
- }, A2 = React66.useCallback(((e5, t5) => {
28362
+ }, A2 = React67.useCallback(((e5, t5) => {
28175
28363
  x2(e5.message), l2 && l2({ currentData: E2.fullData, errorValue: t5, currentValue: n3, name: D2, path: w2, error: e5 });
28176
28364
  }), [l2, c2]), P2 = y2 === O2, R2 = y2 === `key_${O2}`, K2 = "number" == typeof w2.slice(-1)[0], I2 = { isEditing: P2, isEditingKey: R2, isArray: K2, canEditKey: null !== o3 && k2 && N2 && S2 && !K2 }, V2 = "" === D2 && w2.length > 0 ? m2("EMPTY_STRING", E2) : null;
28177
28365
  return { pathString: O2, nodeData: E2, path: w2, name: D2, size: C2, canEdit: k2, canDelete: S2, canAdd: N2, canDrag: T2, error: b2, showError: x2, onError: A2, setError: v2, handleEditKey: (e5) => {
@@ -28186,11 +28374,11 @@ var de = ({ props: e4, collapsed: t4 }) => {
28186
28374
  }, derivedValues: I2, emptyStringKey: V2 };
28187
28375
  };
28188
28376
  var ue = ({ canDrag: e4, canDragOnto: n3, path: r5, nodeData: o3, onMove: a3, onError: l2, translate: s3 }) => {
28189
- const { getStyles: d } = K(), { dragSource: u, setDragSource: p2 } = M(), [g2, m2] = React66.useState(false), h2 = j(r5), y2 = React66.useMemo((() => e4 ? { onDragStart: (e5) => {
28377
+ const { getStyles: d } = K(), { dragSource: u, setDragSource: p2 } = M(), [g2, m2] = React67.useState(false), h2 = j(r5), y2 = React67.useMemo((() => e4 ? { onDragStart: (e5) => {
28190
28378
  e5.stopPropagation(), p2({ path: r5, pathString: h2 });
28191
28379
  }, onDragEnd: (e5) => {
28192
28380
  e5.stopPropagation(), p2({ path: null, pathString: null });
28193
- } } : {}), [e4, h2]), f2 = React66.useMemo((() => (e5) => n3 ? { onDragOver: (e6) => {
28381
+ } } : {}), [e4, h2]), f2 = React67.useMemo((() => (e5) => n3 ? { onDragOver: (e6) => {
28194
28382
  e6.stopPropagation(), e6.preventDefault();
28195
28383
  }, onDrop: (t4) => {
28196
28384
  t4.stopPropagation(), v2(e5), p2({ path: null, pathString: null }), m2(false);
@@ -28199,7 +28387,7 @@ var ue = ({ canDrag: e4, canDragOnto: n3, path: r5, nodeData: o3, onMove: a3, on
28199
28387
  t4.stopPropagation(), h2.startsWith(null !== (n4 = u.pathString) && void 0 !== n4 ? n4 : "") || m2(e5);
28200
28388
  }, onDragExit: (e6) => {
28201
28389
  e6.stopPropagation(), m2(false);
28202
- } } : {}), [u, n3, h2]), b2 = React66.useMemo((() => n3 && null !== u.pathString ? jsxRuntime.jsx("div", Object.assign({ className: "jer-drop-target-bottom", style: { height: "50%", position: "absolute", width: "100%", top: "50%", zIndex: r5.length } }, f2("below"))) : null), [u, n3, r5.length]), v2 = (e5) => {
28390
+ } } : {}), [u, n3, h2]), b2 = React67.useMemo((() => n3 && null !== u.pathString ? jsxRuntime.jsx("div", Object.assign({ className: "jer-drop-target-bottom", style: { height: "50%", position: "absolute", width: "100%", top: "50%", zIndex: r5.length } }, f2("below"))) : null), [u, n3, r5.length]), v2 = (e5) => {
28203
28391
  var t4, n4;
28204
28392
  const i3 = null === (t4 = u.path) || void 0 === t4 ? void 0 : t4.slice(-1)[0], c2 = null === (n4 = u.path) || void 0 === n4 ? void 0 : n4.slice(0, -1).join("."), d2 = r5.slice(0, -1).join(""), { parentData: p3 } = o3;
28205
28393
  "string" == typeof i3 && p3 && !Array.isArray(p3) && Object.keys(p3).includes(i3) && i3 in p3 && c2 !== d2 ? l2({ code: "KEY_EXISTS", message: s3("ERROR_KEY_EXISTS", o3) }, i3) : a3(u.path, r5, e5).then(((e6) => {
@@ -28226,20 +28414,20 @@ var ge = ({ isEditingKey: n3, canEditKey: r5, pathString: o3, path: i3, name: a3
28226
28414
  } }), style: { width: f2.length / 1.5 + 0.5 + "em" } }) : jsxRuntime.jsxs("span", { className: "jer-key-text", style: Object.assign(Object.assign({}, g2), { minWidth: `${Math.min(f2.length + 1, 5)}ch`, flexShrink: f2.length > 10 ? 1 : 0 }), onDoubleClick: () => r5 && y2(i3, "key"), onClick: u, children: [h2 ? jsxRuntime.jsx("span", { className: "jer-empty-string", children: h2 }) : f2, "" !== f2 || h2 ? jsxRuntime.jsx("span", { className: "jer-key-colon", children: ":" }) : null] });
28227
28415
  };
28228
28416
  var me = (n3) => {
28229
- const { data: r5, parentData: o3, onEdit: a3, onDelete: d, onChange: u, onMove: p2, enableClipboard: g2, canDragOnto: m2, restrictTypeSelection: h2, searchFilter: f2, searchText: b2, showLabel: v2, stringTruncate: j2, showStringQuotes: E2, arrayIndexFromOne: w2, indent: D2, translate: C2, customNodeDefinitions: k2, customNodeData: S2, handleKeyboard: N2, keyboardControls: T2, sort: x2, editConfirmRef: A2, jsonStringify: P2, showIconTooltips: R2 } = n3, { getStyles: I2 } = K(), { setCurrentlyEditingElement: V2, setCollapseState: _2, previouslyEditedElement: F2, setPreviouslyEditedElement: L2, tabDirection: z2, setTabDirection: B2, previousValue: G2, setPreviousValue: Y2 } = M(), [H2, U2] = React66.useState("function" == typeof r5 ? W : r5), { pathString: $2, nodeData: Z2, path: X3, name: J2, canEdit: Q2, canDelete: q2, canDrag: ee2, error: te2, onError: ne2, handleEditKey: re3, emptyStringKey: oe2, derivedValues: ie2 } = de({ props: n3 }), { dragSourceProps: se2, getDropTargetProps: pe2, BottomDropTarget: me2, DropTargetPadding: be2 } = ue({ canDrag: ee2, canDragOnto: m2, path: X3, nodeData: Z2, onMove: p2, onError: ne2, translate: C2 }), [ve2, je2] = React66.useState(he(r5, S2)), Ee2 = React66.useCallback(((e4) => {
28417
+ const { data: r5, parentData: o3, onEdit: a3, onDelete: d, onChange: u, onMove: p2, enableClipboard: g2, canDragOnto: m2, restrictTypeSelection: h2, searchFilter: f2, searchText: b2, showLabel: v2, stringTruncate: j2, showStringQuotes: E2, arrayIndexFromOne: w2, indent: D2, translate: C2, customNodeDefinitions: k2, customNodeData: S2, handleKeyboard: N2, keyboardControls: T2, sort: x2, editConfirmRef: A2, jsonStringify: P2, showIconTooltips: R2 } = n3, { getStyles: I2 } = K(), { setCurrentlyEditingElement: V2, setCollapseState: _2, previouslyEditedElement: F2, setPreviouslyEditedElement: L2, tabDirection: z2, setTabDirection: B2, previousValue: G2, setPreviousValue: Y2 } = M(), [H2, U2] = React67.useState("function" == typeof r5 ? W : r5), { pathString: $2, nodeData: Z2, path: X3, name: J2, canEdit: Q2, canDelete: q2, canDrag: ee2, error: te2, onError: ne2, handleEditKey: re3, emptyStringKey: oe2, derivedValues: ie2 } = de({ props: n3 }), { dragSourceProps: se2, getDropTargetProps: pe2, BottomDropTarget: me2, DropTargetPadding: be2 } = ue({ canDrag: ee2, canDragOnto: m2, path: X3, nodeData: Z2, onMove: p2, onError: ne2, translate: C2 }), [ve2, je2] = React67.useState(he(r5, S2)), Ee2 = React67.useCallback(((e4) => {
28230
28418
  if (!u) return void U2(e4);
28231
28419
  const t4 = u({ currentData: Z2.fullData, newValue: e4, currentValue: H2, name: J2, path: X3 });
28232
28420
  U2(t4);
28233
28421
  }), [u]);
28234
- React66.useEffect((() => {
28422
+ React67.useEffect((() => {
28235
28423
  U2("function" == typeof r5 ? W : r5), je2(he(r5, S2));
28236
28424
  }), [r5, te2]);
28237
- const { CustomNode: we2, customNodeProps: De2, hideKey: Ce2, showEditTools: Oe2 = true, showOnEdit: ke2, showOnView: Se2, passOriginalNode: Ne2 } = S2, Te2 = [...ce, ...k2.filter((({ showInTypesSelector: e4 = false, name: t4 }) => e4 && !!t4)).map((({ name: e4 }) => e4))], xe2 = React66.useMemo((() => {
28425
+ const { CustomNode: we2, customNodeProps: De2, hideKey: Ce2, showEditTools: Oe2 = true, showOnEdit: ke2, showOnView: Se2, passOriginalNode: Ne2 } = S2, Te2 = [...ce, ...k2.filter((({ showInTypesSelector: e4 = false, name: t4 }) => e4 && !!t4)).map((({ name: e4 }) => e4))], xe2 = React67.useMemo((() => {
28238
28426
  if ("boolean" == typeof h2) return h2 ? [] : Te2;
28239
28427
  if (Array.isArray(h2)) return h2;
28240
28428
  const e4 = h2(Z2);
28241
28429
  return "boolean" == typeof e4 ? e4 ? [] : Te2 : e4;
28242
- }), [Z2, h2]), [Ae, Pe] = React66.useState(((e4, t4) => {
28430
+ }), [Z2, h2]), [Ae, Pe] = React67.useState(((e4, t4) => {
28243
28431
  var n4;
28244
28432
  if ("string" != typeof e4) return null;
28245
28433
  const r6 = t4.filter(((t5) => t5 instanceof Object && t5.enum && t5.values.includes(e4) && t5.matchPriority));
@@ -28348,8 +28536,8 @@ var be = (e4 = [], t4) => {
28348
28536
  return Object.assign({ CustomNode: o3, CustomWrapper: i3, customNodeProps: a3, wrapperProps: l2, hideKey: s3, showEditTools: c2, showOnEdit: d, showOnView: u, showCollectionWrapper: g2 }, m2);
28349
28537
  };
28350
28538
  var ve = (r5) => {
28351
- const { getStyles: o3 } = K(), { collapseState: c2, setCollapseState: d, getMatchingCollapseState: u, currentlyEditingElement: p2, setCurrentlyEditingElement: f2, areChildrenBeingEdited: b2, previousValue: v2, setPreviousValue: j2 } = M(), { mainContainerRef: w2, data: D2, nodeData: C2, parentData: k2, showCollectionCount: S2, onEdit: T2, onAdd: x2, onDelete: A2, canDragOnto: P2, collapseFilter: R2, collapseAnimationTime: I2, onMove: V2, enableClipboard: _2, onEditEvent: F2, showIconTooltips: L2, searchFilter: z2, searchText: B2, indent: W2, sort: G2, showArrayIndices: Y2, arrayIndexFromOne: H2, defaultValue: U2, newKeyOptions: $2, translate: Z2, customNodeDefinitions: X3, customNodeData: J2, jsonParse: Q2, jsonStringify: q2, TextEditor: ee2, keyboardControls: te2, handleKeyboard: ne2, insertAtTop: re3, onCollapse: oe2, editConfirmRef: se2, collapseClickZones: ce2 } = r5, [he2, ye2] = React66.useState(q2(D2)), fe2 = R2(C2), { contentRef: je2, isAnimating: Ee2, maxHeight: we2, collapsed: De2, animateCollapse: Ce2, cssTransitionValue: Oe2 } = ((e4, t4, n3, r6, o4) => {
28352
- const [l2, c3] = React66.useState(n3 ? 0 : void 0), [d2, u2] = React66.useState(n3), p3 = React66.useRef(false), g2 = React66.useRef(null), m2 = React66.useRef(0), h2 = React66.useRef(0), y2 = t4 / 1e3 + "s", f3 = React66.useCallback(((n4) => {
28539
+ const { getStyles: o3 } = K(), { collapseState: c2, setCollapseState: d, getMatchingCollapseState: u, currentlyEditingElement: p2, setCurrentlyEditingElement: f2, areChildrenBeingEdited: b2, previousValue: v2, setPreviousValue: j2 } = M(), { mainContainerRef: w2, data: D2, nodeData: C2, parentData: k2, showCollectionCount: S2, onEdit: T2, onAdd: x2, onDelete: A2, canDragOnto: P2, collapseFilter: R2, collapseAnimationTime: I2, onMove: V2, enableClipboard: _2, onEditEvent: F2, showIconTooltips: L2, searchFilter: z2, searchText: B2, indent: W2, sort: G2, showArrayIndices: Y2, arrayIndexFromOne: H2, defaultValue: U2, newKeyOptions: $2, translate: Z2, customNodeDefinitions: X3, customNodeData: J2, jsonParse: Q2, jsonStringify: q2, TextEditor: ee2, keyboardControls: te2, handleKeyboard: ne2, insertAtTop: re3, onCollapse: oe2, editConfirmRef: se2, collapseClickZones: ce2 } = r5, [he2, ye2] = React67.useState(q2(D2)), fe2 = R2(C2), { contentRef: je2, isAnimating: Ee2, maxHeight: we2, collapsed: De2, animateCollapse: Ce2, cssTransitionValue: Oe2 } = ((e4, t4, n3, r6, o4) => {
28540
+ const [l2, c3] = React67.useState(n3 ? 0 : void 0), [d2, u2] = React67.useState(n3), p3 = React67.useRef(false), g2 = React67.useRef(null), m2 = React67.useRef(0), h2 = React67.useRef(0), y2 = t4 / 1e3 + "s", f3 = React67.useCallback(((n4) => {
28353
28541
  var i3, a3;
28354
28542
  if (d2 !== n4) {
28355
28543
  switch (window.clearTimeout(h2.current), p3.current = true, n4) {
@@ -28369,23 +28557,23 @@ var ve = (r5) => {
28369
28557
  }
28370
28558
  }), [t4, d2, e4, r6, o4]);
28371
28559
  return { contentRef: g2, isAnimating: p3.current, animateCollapse: f3, maxHeight: l2, collapsed: d2, cssTransitionValue: y2 };
28372
- })(D2, I2, fe2, w2, q2), { pathString: ke2, nodeData: Se2, path: Ne2, name: Te2, size: xe2, canEdit: Ae, canDelete: Pe, canAdd: Re, canDrag: Ke, error: Ie, setError: Ve, onError: _e, handleEditKey: Fe, emptyStringKey: Le, derivedValues: ze } = de({ props: r5, collapsed: De2 }), { dragSourceProps: Me, getDropTargetProps: Be, BottomDropTarget: We, DropTargetPadding: Ge } = ue({ canDrag: Ke, canDragOnto: P2, path: Ne2, nodeData: Se2, onMove: V2, onError: _e, translate: Z2 }), Ye = React66.useRef(!fe2), { isEditing: He, isEditingKey: Ue, isArray: $e, canEditKey: Ze } = ze;
28373
- React66.useEffect((() => {
28560
+ })(D2, I2, fe2, w2, q2), { pathString: ke2, nodeData: Se2, path: Ne2, name: Te2, size: xe2, canEdit: Ae, canDelete: Pe, canAdd: Re, canDrag: Ke, error: Ie, setError: Ve, onError: _e, handleEditKey: Fe, emptyStringKey: Le, derivedValues: ze } = de({ props: r5, collapsed: De2 }), { dragSourceProps: Me, getDropTargetProps: Be, BottomDropTarget: We, DropTargetPadding: Ge } = ue({ canDrag: Ke, canDragOnto: P2, path: Ne2, nodeData: Se2, onMove: V2, onError: _e, translate: Z2 }), Ye = React67.useRef(!fe2), { isEditing: He, isEditingKey: Ue, isArray: $e, canEditKey: Ze } = ze;
28561
+ React67.useEffect((() => {
28374
28562
  ye2(q2(D2));
28375
- }), [D2, q2]), React66.useEffect((() => {
28563
+ }), [D2, q2]), React67.useEffect((() => {
28376
28564
  const e4 = R2(Se2) && !He;
28377
28565
  Ye.current = !e4, Ce2(e4);
28378
- }), [R2]), React66.useEffect((() => {
28566
+ }), [R2]), React67.useEffect((() => {
28379
28567
  if (null !== c2) {
28380
28568
  const e4 = u(Ne2);
28381
28569
  e4 && (Ye.current = true, Ce2(e4.collapsed));
28382
28570
  }
28383
28571
  }), [c2]);
28384
- const Xe = React66.useRef(null), Je = React66.useCallback(((e4, t4) => {
28572
+ const Xe = React67.useRef(null), Je = React67.useCallback(((e4, t4) => {
28385
28573
  if ("function" != typeof U2) return U2;
28386
28574
  const n3 = U2(e4, t4);
28387
28575
  return void 0 !== n3 ? n3 : null;
28388
- }), [U2]), Qe = React66.useCallback(((e4) => $2 ? "function" != typeof $2 ? $2 : $2(e4) : null), [$2]), { CustomNode: qe, customNodeProps: et, CustomWrapper: tt, wrapperProps: nt = {}, hideKey: rt, showEditTools: ot = true, showOnEdit: it, showOnView: at, showCollectionWrapper: lt = true } = J2, st = b2(ke2);
28576
+ }), [U2]), Qe = React67.useCallback(((e4) => $2 ? "function" != typeof $2 ? $2 : $2(e4) : null), [$2]), { CustomNode: qe, customNodeProps: et, CustomWrapper: tt, wrapperProps: nt = {}, hideKey: rt, showEditTools: ot = true, showOnEdit: it, showOnView: at, showCollectionWrapper: lt = true } = J2, st = b2(ke2);
28389
28577
  st && De2 && Ce2(false);
28390
28578
  if (!(y("collection", Se2, z2, B2) || 0 === Se2.level) && !st) return null;
28391
28579
  const ct = Array.isArray(D2) ? "array" : "object", dt = "array" === ct ? { open: "[", close: "]" } : { open: "{", close: "}" }, ut = (e4) => {
@@ -28474,15 +28662,15 @@ var De = [];
28474
28662
  })(':root{--jer-select-border:#b6b6b6;--jer-select-focus:#777;--jer-select-arrow:#777;--jer-form-border:1px solid #ededf0;--jer-form-border-focus:1px solid #e2e2e2;--jer-highlight-color:#b3d8ff}.jer-visible{opacity:1}.jer-hidden{opacity:0}.jer-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:none;color:#000;cursor:inherit;font-family:inherit;font-size:.8em;line-height:inherit;margin:0;outline:none;padding:0 1em 0 0;z-index:1}select::-ms-expand{display:none}.jer-select{align-items:center;background-color:#fff;background-image:linear-gradient(0deg,#f9f9f9,#fff 33%);border:1px solid var(--jer-select-border);border-radius:.25em;cursor:pointer;display:grid;grid-template-areas:"select";line-height:1.1;max-width:15ch;min-width:12ch;padding:.25em .5em;position:relative}.jer-select select,.jer-select:after{grid-area:select}.jer-select:not(.jer-select--multiple):after{background-color:var(--jer-select-arrow);clip-path:polygon(100% 0,0 0,50% 100%);content:"";height:.5em;justify-self:end;width:.8em}select:focus+.focus{border:1px solid var(--jer-select-focus);border-radius:inherit;bottom:-1px;left:-1px;position:absolute;right:-1px;top:-1px}.jer-select-inner{text-overflow:ellipsis;width:100%}.jer-editor-container{border-radius:.5em;font-size:16px;line-height:1;padding:1em 1em 1em 2em;position:relative;text-align:left}.jer-editor-container textarea{border:var(--jer-form-border);border-radius:.3em;color:var(--jer-input-color);outline:none}.jer-editor-container textarea:focus{border:var(--jer-form-border-focus)}.jer-editor-container input{border:var(--jer-form-border);border-radius:.3em;font-family:inherit;outline:none}.jer-editor-container input:focus{border:var(--jer-form-border-focus)}.jer-editor-container ::selection{background-color:var(--jer-highlight-color)}.jer-collection-header-row,.jer-value-main-row{align-items:center;display:flex;gap:.3em;min-height:1.7em}.jer-collection-header-row{display:flex;flex-wrap:wrap}.jer-collapse-icon{left:-1.2em;position:absolute;top:.35em}.jer-collection-inner{position:relative}.jer-collection-text-edit{align-items:flex-start;display:flex;flex-direction:column;gap:.3em;line-height:1.1em}.jer-collection-text-area{font-family:inherit;font-size:.85em;max-height:40em;overflow:hidden;padding:.2em .5em 0;resize:both}.jer-collection-input-button-row{display:flex;font-size:150%;justify-content:flex-end;margin-top:.4em;width:100%}.jer-collection-error-row{bottom:.5em;position:absolute}.jer-error-slug{margin-left:1em}.jer-value-component{position:relative}.jer-value-main-row{display:flex;gap:0}.jer-value-and-buttons{align-items:center;display:flex;justify-content:flex-start;padding-left:.5em}.jer-value-error-row{position:absolute}.jer-value-string{line-height:1.3em;overflow-wrap:anywhere;white-space:pre-wrap;word-break:break-word}.jer-string-expansion{cursor:pointer;filter:saturate(50%);opacity:.6}.jer-show-less{font-size:80%}.jer-hyperlink{text-decoration:underline}.jer-input-text{font-family:inherit;font-size:.9em;height:1.4em;line-height:1.2em;margin:0;min-width:6em;overflow:hidden;padding:.25em .5em .2em;resize:none}.jer-input-boolean{margin-left:.3em;margin-right:.3em;transform:scale(1.5)}.jer-key-text{line-height:1.1em;white-space:pre-wrap;word-break:break-word}.jer-key-edit{font-size:inherit;font-size:.9em;padding:0 .3em}.jer-value-invalid{font-style:italic;opacity:.5}.jer-input-number{font-size:90%;min-width:3em}.jer-confirm-buttons,.jer-edit-buttons{align-items:center;cursor:pointer;display:flex;height:1em}.jer-input-buttons{gap:.4em}.jer-edit-buttons{gap:.4em;margin-left:.5em;opacity:0}.jer-confirm-buttons{gap:.2em;margin-left:.4em}.jer-edit-buttons:hover{opacity:1;position:relative}.jer-collection-header-row:hover>.jer-edit-buttons,.jer-value-and-buttons:hover>.jer-edit-buttons,.jer-value-main-row:hover>.jer-edit-buttons{opacity:1}.jer-copy-pulse{position:relative;transition:.3s}.jer-copy-pulse:hover{opacity:.85;transform:scale(1.2);transition:.3s}.jer-copy-pulse:after{border-radius:50%;box-shadow:0 0 15px 5px var(--jer-icon-copy-color);content:"";display:block;height:100%;left:0;opacity:0;position:absolute;top:0;transition:all .5s;width:100%}.jer-copy-pulse:active:after{border-radius:4em;box-shadow:0 0 0 0 var(--jer-icon-copy-color);left:0;opacity:1;position:absolute;top:0;transition:0s}.jer-copy-pulse:active{top:.07em}.jer-rotate-90{transform:rotate(-90deg)}.jer-icon:hover{opacity:.85;transform:scale(1.2);transition:.3s}.jer-empty-string{font-size:90%;font-style:italic}.jer-drag-n-drop-padding{border:1px dashed #e0e0e0;border-radius:.3em;height:.5em}.jer-clickzone{height:calc(100% - .8em);left:-1em;position:absolute;top:1.2em}', {});
28475
28663
  var Ce = ({ data: e4, setData: n3, rootName: r5 = "root", onUpdate: o3 = () => {
28476
28664
  }, onEdit: d = o3, onDelete: u = o3, onAdd: p2 = o3, onChange: m2, onError: y2, onEditEvent: f2, showErrorMessages: b2 = true, enableClipboard: v2 = true, indent: E2 = 2, collapse: D2 = false, collapseAnimationTime: O2 = 300, showCollectionCount: k2 = true, restrictEdit: S2 = false, restrictDelete: N2 = false, restrictAdd: x2 = false, restrictTypeSelection: A2 = false, restrictDrag: P2 = true, viewOnly: R2, searchFilter: I2, searchText: V2, searchDebounceTime: _2 = 350, keySort: F2 = false, showArrayIndices: L2 = true, arrayIndexFromOne: z2 = false, showStringQuotes: B2 = true, showIconTooltips: W2 = false, defaultValue: G2 = null, newKeyOptions: Y2, minWidth: H2 = 250, maxWidth: U2 = "min(600px, 90vw)", rootFontSize: $2, stringTruncate: Z2 = 250, translations: X3 = {}, className: J2, id: Q2, customText: q2 = {}, customNodeDefinitions: ee2 = [], customButtons: te2 = [], jsonParse: ne2 = JSON.parse, jsonStringify: re3 = (e5, t4) => JSON.stringify(e5, t4, 2), TextEditor: oe2, errorMessageTimeout: ie2 = 2500, keyboardControls: ae2 = {}, externalTriggers: le2, insertAtTop: se2 = false, onCollapse: ce2, collapseClickZones: de2 = ["header", "left"] }) => {
28477
- const { getStyles: ue2 } = K(), { setCurrentlyEditingElement: pe2 } = M(), ge2 = React66.useMemo((() => Se(D2)), [D2]), he2 = React66.useMemo((() => Ee(X3, q2)), [X3, q2]), [ye2, fe2] = React66.useState(V2), [je2, we2] = (({ setData: e5, data: t4 }) => {
28478
- const [n4, r6] = React66.useState(e5 ? void 0 : t4), o4 = React66.useCallback(((t5) => {
28665
+ const { getStyles: ue2 } = K(), { setCurrentlyEditingElement: pe2 } = M(), ge2 = React67.useMemo((() => Se(D2)), [D2]), he2 = React67.useMemo((() => Ee(X3, q2)), [X3, q2]), [ye2, fe2] = React67.useState(V2), [je2, we2] = (({ setData: e5, data: t4 }) => {
28666
+ const [n4, r6] = React67.useState(e5 ? void 0 : t4), o4 = React67.useCallback(((t5) => {
28479
28667
  e5 ? e5(t5) : r6(t5);
28480
28668
  }), [e5]);
28481
- return React66.useEffect((() => {
28669
+ return React67.useEffect((() => {
28482
28670
  e5 || r6(t4);
28483
28671
  }), [t4]), [e5 ? t4 : n4, o4];
28484
- })({ setData: n3, data: e4 }), De2 = React66.useRef(null);
28485
- React66.useEffect((() => {
28672
+ })({ setData: n3, data: e4 }), De2 = React67.useRef(null);
28673
+ React67.useEffect((() => {
28486
28674
  pe2(null);
28487
28675
  const e5 = setTimeout((() => fe2(V2)), _2);
28488
28676
  return () => clearTimeout(e5);
@@ -28493,7 +28681,7 @@ var Ce = ({ data: e4, setData: n3, rootName: r5 = "root", onUpdate: o3 = () => {
28493
28681
  const r6 = Te(n4) ? n4 : ["error", n4], [o4, i3] = r6;
28494
28682
  if ("error" === o4) return we2(t4.currentData), false === i3 ? he2("ERROR_UPDATE", Ce2) : String(i3);
28495
28683
  we2(i3);
28496
- })), Ae = React66.useMemo((() => Se(S2, R2)), [S2, R2]), Pe = React66.useMemo((() => Se(N2, R2)), [N2, R2]), Re = React66.useMemo((() => Se(x2, R2)), [x2, R2]), Ke = React66.useMemo((() => Se(P2, R2)), [P2, R2]), Ie = React66.useMemo((() => Ne(I2)), [I2]), Ve = React66.useMemo((() => ((e5) => {
28684
+ })), Ae = React67.useMemo((() => Se(S2, R2)), [S2, R2]), Pe = React67.useMemo((() => Se(N2, R2)), [N2, R2]), Re = React67.useMemo((() => Se(x2, R2)), [x2, R2]), Ke = React67.useMemo((() => Se(P2, R2)), [P2, R2]), Ie = React67.useMemo((() => Ne(I2)), [I2]), Ve = React67.useMemo((() => ((e5) => {
28497
28685
  const t4 = Object.assign({}, C);
28498
28686
  for (const n4 of Object.keys(C)) {
28499
28687
  const r6 = n4;
@@ -28505,25 +28693,25 @@ var Ce = ({ data: e4, setData: n3, rootName: r5 = "root", onUpdate: o3 = () => {
28505
28693
  }
28506
28694
  }
28507
28695
  return t4;
28508
- })(ae2)), [ae2]), _e = React66.useCallback(((e5, t4) => ((e6, t5, n4) => {
28696
+ })(ae2)), [ae2]), _e = React67.useCallback(((e5, t4) => ((e6, t5, n4) => {
28509
28697
  const r6 = Object.entries(t5);
28510
28698
  for (const [t6, o4] of r6) if (w(n4, e6[t6], t6)) {
28511
28699
  n4.preventDefault(), o4();
28512
28700
  break;
28513
28701
  }
28514
- })(Ve, t4, e5)), [Ve]), Fe = React66.useMemo((() => {
28702
+ })(Ve, t4, e5)), [Ve]), Fe = React67.useMemo((() => {
28515
28703
  const e5 = xe(ee2, "stringifyReplacer");
28516
28704
  return (t4) => re3(t4, e5);
28517
- }), [ee2, re3]), Le = React66.useMemo((() => {
28705
+ }), [ee2, re3]), Le = React67.useMemo((() => {
28518
28706
  const e5 = xe(ee2, "parseReviver");
28519
28707
  return (t4) => {
28520
28708
  const n4 = ne2(t4, e5);
28521
28709
  return T(n4);
28522
28710
  };
28523
- }), [ee2, ne2]), ze = React66.useRef(null);
28711
+ }), [ee2, ne2]), ze = React67.useRef(null);
28524
28712
  ((e5, t4) => {
28525
28713
  const { setCurrentlyEditingElement: n4, currentlyEditingElement: r6, setCollapseState: o4 } = M();
28526
- React66.useEffect((() => {
28714
+ React67.useEffect((() => {
28527
28715
  if (!e5) return;
28528
28716
  const { collapse: i3, edit: a3 } = e5;
28529
28717
  i3 && o4(i3);
@@ -28540,7 +28728,7 @@ var Ce = ({ data: e4, setData: n3, rootName: r5 = "root", onUpdate: o3 = () => {
28540
28728
  }
28541
28729
  }), [e5]);
28542
28730
  })(le2, ze);
28543
- const Me = React66.useCallback(((e5, t4) => {
28731
+ const Me = React67.useCallback(((e5, t4) => {
28544
28732
  false !== F2 && ("function" != typeof F2 ? e5.sort(((e6, n4) => {
28545
28733
  const r6 = t4(e6)[0], o4 = t4(n4)[0];
28546
28734
  return r6 < o4 ? -1 : r6 > o4 ? 1 : 0;
@@ -28566,8 +28754,8 @@ var Ce = ({ data: e4, setData: n3, rootName: r5 = "root", onUpdate: o3 = () => {
28566
28754
  };
28567
28755
  var Oe = (e4) => {
28568
28756
  var n3;
28569
- const [r5, o3] = React66.useState();
28570
- return React66.useEffect((() => {
28757
+ const [r5, o3] = React67.useState();
28758
+ return React67.useEffect((() => {
28571
28759
  const e5 = document.documentElement;
28572
28760
  o3(e5);
28573
28761
  }), []), r5 ? jsxRuntime.jsx(R, { theme: null !== (n3 = e4.theme) && void 0 !== n3 ? n3 : A, icons: e4.icons, docRoot: r5, children: jsxRuntime.jsx(z, { onEditEvent: e4.onEditEvent, onCollapse: e4.onCollapse, children: jsxRuntime.jsx(Ce, Object.assign({}, e4)) }) }) : null;
@@ -28609,7 +28797,7 @@ function JsonEditorRawPanel(props) {
28609
28797
  const canEditRaw = (_b = permissions == null ? void 0 : permissions.canEditRaw) != null ? _b : false;
28610
28798
  if (!canViewRaw) return null;
28611
28799
  const viewOnly = !!disabled || !!readOnly || !canEditRaw;
28612
- const onCopy = React66__namespace.useCallback(async () => {
28800
+ const onCopy = React67__namespace.useCallback(async () => {
28613
28801
  try {
28614
28802
  await navigator.clipboard.writeText(
28615
28803
  JSON.stringify(root != null ? root : {}, null, 2)
@@ -28703,17 +28891,17 @@ function collectAllPaths(value, prefix = "", out = []) {
28703
28891
  }
28704
28892
  function useControllable(opts) {
28705
28893
  const { value, defaultValue, onChange } = opts;
28706
- const [inner, setInner] = React66__namespace.useState(defaultValue);
28894
+ const [inner, setInner] = React67__namespace.useState(defaultValue);
28707
28895
  const isControlled = value !== void 0;
28708
28896
  const state = isControlled ? value : inner;
28709
- const setState = React66__namespace.useCallback(
28897
+ const setState = React67__namespace.useCallback(
28710
28898
  (next) => {
28711
28899
  if (!isControlled) setInner(next);
28712
28900
  onChange == null ? void 0 : onChange(next);
28713
28901
  },
28714
28902
  [isControlled, onChange]
28715
28903
  );
28716
- React66__namespace.useEffect(() => {
28904
+ React67__namespace.useEffect(() => {
28717
28905
  if (!isControlled) return;
28718
28906
  setInner(value);
28719
28907
  }, [isControlled]);
@@ -28728,7 +28916,7 @@ function callCallbacks(callbacks, action, nextRoot, ctx) {
28728
28916
  const meta = { action, route: ctx.route, path, parent, key };
28729
28917
  (_b = callbacks.onEdit) == null ? void 0 : _b.call(callbacks, nextRoot, meta);
28730
28918
  }
28731
- var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props, ref) {
28919
+ var JsonEditor = React67__namespace.forwardRef(function JsonEditorEditor(props, ref) {
28732
28920
  var _a, _b;
28733
28921
  const {
28734
28922
  root,
@@ -28758,16 +28946,16 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28758
28946
  } = props;
28759
28947
  const canViewRaw = (_a = permissions == null ? void 0 : permissions.canViewRaw) != null ? _a : true;
28760
28948
  const canEditRaw = (_b = permissions == null ? void 0 : permissions.canEditRaw) != null ? _b : false;
28761
- const routes = React66__namespace.useMemo(
28949
+ const routes = React67__namespace.useMemo(
28762
28950
  () => buildJsonRoutes(root, void 0, filters),
28763
28951
  [root, filters]
28764
28952
  );
28765
- const allPaths = React66__namespace.useMemo(() => {
28953
+ const allPaths = React67__namespace.useMemo(() => {
28766
28954
  const list = collectAllPaths(root, "", []);
28767
28955
  const seen = /* @__PURE__ */ new Set();
28768
28956
  return list.filter((p2) => seen.has(p2) ? false : (seen.add(p2), true));
28769
28957
  }, [root]);
28770
- const computedInitialRoute = React66__namespace.useMemo(() => {
28958
+ const computedInitialRoute = React67__namespace.useMemo(() => {
28771
28959
  var _a2, _b2;
28772
28960
  const explicit = routeProp != null ? routeProp : defaultRoute;
28773
28961
  if (explicit !== void 0) return explicit;
@@ -28783,25 +28971,25 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28783
28971
  defaultValue: defaultViewMode,
28784
28972
  onChange: onViewModeChange
28785
28973
  });
28786
- React66__namespace.useEffect(() => {
28974
+ React67__namespace.useEffect(() => {
28787
28975
  if (!canViewRaw && (viewMode === "raw" || viewMode === "split")) {
28788
28976
  setViewMode("visual");
28789
28977
  }
28790
28978
  }, [canViewRaw, setViewMode, viewMode]);
28791
- const fileInputRef = React66__namespace.useRef(null);
28792
- const contentRef = React66__namespace.useRef(null);
28793
- const [rawWidth, setRawWidth] = React66__namespace.useState(420);
28794
- const [isResizing, setIsResizing] = React66__namespace.useState(false);
28795
- const startXRef = React66__namespace.useRef(0);
28796
- const startWRef = React66__namespace.useRef(0);
28797
- const clampRawWidth = React66__namespace.useCallback((w2) => {
28979
+ const fileInputRef = React67__namespace.useRef(null);
28980
+ const contentRef = React67__namespace.useRef(null);
28981
+ const [rawWidth, setRawWidth] = React67__namespace.useState(420);
28982
+ const [isResizing, setIsResizing] = React67__namespace.useState(false);
28983
+ const startXRef = React67__namespace.useRef(0);
28984
+ const startWRef = React67__namespace.useRef(0);
28985
+ const clampRawWidth = React67__namespace.useCallback((w2) => {
28798
28986
  var _a2, _b2;
28799
28987
  const containerW = (_b2 = (_a2 = contentRef.current) == null ? void 0 : _a2.getBoundingClientRect().width) != null ? _b2 : 0;
28800
28988
  const min2 = 260;
28801
28989
  const max2 = containerW ? Math.max(min2, Math.min(900, containerW - 240)) : 900;
28802
28990
  return Math.max(min2, Math.min(max2, w2));
28803
28991
  }, []);
28804
- const onResizePointerDown = React66__namespace.useCallback(
28992
+ const onResizePointerDown = React67__namespace.useCallback(
28805
28993
  (e4) => {
28806
28994
  if (e4.button !== 0 && e4.pointerType === "mouse") return;
28807
28995
  setIsResizing(true);
@@ -28813,7 +29001,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28813
29001
  },
28814
29002
  [rawWidth]
28815
29003
  );
28816
- const onResizePointerMove = React66__namespace.useCallback(
29004
+ const onResizePointerMove = React67__namespace.useCallback(
28817
29005
  (e4) => {
28818
29006
  if (!isResizing) return;
28819
29007
  const dx = e4.clientX - startXRef.current;
@@ -28822,7 +29010,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28822
29010
  },
28823
29011
  [clampRawWidth, isResizing]
28824
29012
  );
28825
- const stopResizing = React66__namespace.useCallback(
29013
+ const stopResizing = React67__namespace.useCallback(
28826
29014
  (e4) => {
28827
29015
  if (!isResizing) return;
28828
29016
  setIsResizing(false);
@@ -28833,14 +29021,14 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28833
29021
  },
28834
29022
  [isResizing]
28835
29023
  );
28836
- const loadFile = React66__namespace.useCallback(() => {
29024
+ const loadFile = React67__namespace.useCallback(() => {
28837
29025
  var _a2;
28838
29026
  (_a2 = fileInputRef.current) == null ? void 0 : _a2.click();
28839
29027
  }, []);
28840
- const close = React66__namespace.useCallback(() => {
29028
+ const close = React67__namespace.useCallback(() => {
28841
29029
  onClose == null ? void 0 : onClose();
28842
29030
  }, [onClose]);
28843
- const onFilePicked = React66__namespace.useCallback(
29031
+ const onFilePicked = React67__namespace.useCallback(
28844
29032
  async (e4) => {
28845
29033
  var _a2;
28846
29034
  const file = (_a2 = e4.target.files) == null ? void 0 : _a2[0];
@@ -28860,7 +29048,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28860
29048
  },
28861
29049
  [callbacks, onRoot, route]
28862
29050
  );
28863
- const breadcrumb = React66__namespace.useMemo(() => {
29051
+ const breadcrumb = React67__namespace.useMemo(() => {
28864
29052
  const segs = splitPath(route);
28865
29053
  const parts = [];
28866
29054
  const rootNode = {
@@ -28887,7 +29075,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28887
29075
  }) : prettifyLabel2(s3);
28888
29076
  parts.push({ path: acc, label });
28889
29077
  }
28890
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: parts.map((p2, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React66__namespace.Fragment, { children: [
29078
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1 text-sm text-muted-foreground", children: parts.map((p2, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React67__namespace.Fragment, { children: [
28891
29079
  /* @__PURE__ */ jsxRuntime.jsx(
28892
29080
  Button2,
28893
29081
  {
@@ -28902,7 +29090,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28902
29090
  idx < parts.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-60", children: "/" }) : null
28903
29091
  ] }, p2.path || "root")) });
28904
29092
  }, [route, routes, renderRouteLabel, setRoute]);
28905
- const routeTitle = React66__namespace.useMemo(() => {
29093
+ const routeTitle = React67__namespace.useMemo(() => {
28906
29094
  if (!route) return "Config.json";
28907
29095
  const key = lastSegment(route);
28908
29096
  if (renderRouteLabel) {
@@ -28918,7 +29106,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28918
29106
  }
28919
29107
  return prettifyLabel2(key);
28920
29108
  }, [route, renderRouteLabel]);
28921
- const viewControls = React66__namespace.useMemo(() => {
29109
+ const viewControls = React67__namespace.useMemo(() => {
28922
29110
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 rounded-md border p-1", children: [
28923
29111
  /* @__PURE__ */ jsxRuntime.jsxs(
28924
29112
  Button2,
@@ -28961,7 +29149,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
28961
29149
  ) : null
28962
29150
  ] });
28963
29151
  }, [canViewRaw, setViewMode, viewMode]);
28964
- const header = React66__namespace.useMemo(() => {
29152
+ const header = React67__namespace.useMemo(() => {
28965
29153
  const ctx = {
28966
29154
  title: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate font-medium", children: headerTitle != null ? headerTitle : "JSON Editor" }) }),
28967
29155
  viewControls,
@@ -29013,7 +29201,7 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
29013
29201
  showClose,
29014
29202
  viewControls
29015
29203
  ]);
29016
- const onVisualRoot = React66__namespace.useCallback(
29204
+ const onVisualRoot = React67__namespace.useCallback(
29017
29205
  (nextRoot, detail) => {
29018
29206
  onRoot(nextRoot, detail);
29019
29207
  const d = detail;
@@ -29025,14 +29213,14 @@ var JsonEditor = React66__namespace.forwardRef(function JsonEditorEditor(props,
29025
29213
  },
29026
29214
  [callbacks, onRoot, route]
29027
29215
  );
29028
- const onRawRoot = React66__namespace.useCallback(
29216
+ const onRawRoot = React67__namespace.useCallback(
29029
29217
  (nextRoot, detail) => {
29030
29218
  onRoot(nextRoot, detail);
29031
29219
  callCallbacks(callbacks, "edit-raw", nextRoot, { route, path: "" });
29032
29220
  },
29033
29221
  [callbacks, onRoot, route]
29034
29222
  );
29035
- React66__namespace.useImperativeHandle(
29223
+ React67__namespace.useImperativeHandle(
29036
29224
  ref,
29037
29225
  () => ({
29038
29226
  loadFile,
@@ -29154,7 +29342,7 @@ function triggerHeightCls(size) {
29154
29342
  return "h-9 text-sm";
29155
29343
  }
29156
29344
  }
29157
- var ShadcnJsonEditorVariant = React66__namespace.forwardRef(function ShadcnJsonEditorVariant2(props, ref) {
29345
+ var ShadcnJsonEditorVariant = React67__namespace.forwardRef(function ShadcnJsonEditorVariant2(props, ref) {
29158
29346
  var _a;
29159
29347
  const {
29160
29348
  mode = "popover",
@@ -29201,15 +29389,15 @@ var ShadcnJsonEditorVariant = React66__namespace.forwardRef(function ShadcnJsonE
29201
29389
  extendBoxToControls = true,
29202
29390
  triggerClassName
29203
29391
  } = props;
29204
- const editorRef = React66__namespace.useRef(null);
29205
- const root = React66__namespace.useMemo(() => {
29392
+ const editorRef = React67__namespace.useRef(null);
29393
+ const root = React67__namespace.useMemo(() => {
29206
29394
  if ("root" in props) return props.root;
29207
29395
  const v2 = props.value;
29208
29396
  if (isPlainObject6(v2)) return v2;
29209
29397
  if (v2 == null) return {};
29210
29398
  return {};
29211
29399
  }, [props]);
29212
- const emitRoot = React66__namespace.useCallback(
29400
+ const emitRoot = React67__namespace.useCallback(
29213
29401
  (nextRoot, detail) => {
29214
29402
  var _a2, _b;
29215
29403
  if ("onRoot" in props) {
@@ -29220,9 +29408,9 @@ var ShadcnJsonEditorVariant = React66__namespace.forwardRef(function ShadcnJsonE
29220
29408
  },
29221
29409
  [props]
29222
29410
  );
29223
- const [openInner, setOpenInner] = React66__namespace.useState(false);
29411
+ const [openInner, setOpenInner] = React67__namespace.useState(false);
29224
29412
  const open = openProp != null ? openProp : openInner;
29225
- const setOpen = React66__namespace.useCallback(
29413
+ const setOpen = React67__namespace.useCallback(
29226
29414
  (next) => {
29227
29415
  if (openProp === void 0) setOpenInner(next);
29228
29416
  onOpenChange == null ? void 0 : onOpenChange(next);
@@ -29230,11 +29418,11 @@ var ShadcnJsonEditorVariant = React66__namespace.forwardRef(function ShadcnJsonE
29230
29418
  },
29231
29419
  [openProp, onOpenChange, onClose]
29232
29420
  );
29233
- const close = React66__namespace.useCallback(() => setOpen(false), [setOpen]);
29234
- const doOpen = React66__namespace.useCallback(() => setOpen(true), [setOpen]);
29235
- const toggle = React66__namespace.useCallback(() => setOpen(!open), [setOpen, open]);
29236
- const [expanded, setExpanded] = React66__namespace.useState();
29237
- React66__namespace.useImperativeHandle(
29421
+ const close = React67__namespace.useCallback(() => setOpen(false), [setOpen]);
29422
+ const doOpen = React67__namespace.useCallback(() => setOpen(true), [setOpen]);
29423
+ const toggle = React67__namespace.useCallback(() => setOpen(!open), [setOpen, open]);
29424
+ const [expanded, setExpanded] = React67__namespace.useState();
29425
+ React67__namespace.useImperativeHandle(
29238
29426
  ref,
29239
29427
  () => ({
29240
29428
  open: doOpen,
@@ -30631,19 +30819,19 @@ function createListerRuntime(opts) {
30631
30819
  selectors
30632
30820
  };
30633
30821
  }
30634
- var ListerContext = React66__namespace.createContext(
30822
+ var ListerContext = React67__namespace.createContext(
30635
30823
  null
30636
30824
  );
30637
30825
  function ListerProvider({
30638
30826
  children,
30639
30827
  ...opts
30640
30828
  }) {
30641
- const runtimeRef = React66__namespace.useRef(null);
30642
- const [, forceUpdate] = React66__namespace.useReducer((x2) => x2 + 1, 0);
30829
+ const runtimeRef = React67__namespace.useRef(null);
30830
+ const [, forceUpdate] = React67__namespace.useReducer((x2) => x2 + 1, 0);
30643
30831
  if (!runtimeRef.current) {
30644
30832
  runtimeRef.current = createListerRuntime(opts);
30645
30833
  }
30646
- React66__namespace.useEffect(() => {
30834
+ React67__namespace.useEffect(() => {
30647
30835
  const runtime = runtimeRef.current;
30648
30836
  if (!runtime) return;
30649
30837
  const unsub = runtime.subscribe(() => {
@@ -30654,7 +30842,7 @@ function ListerProvider({
30654
30842
  return /* @__PURE__ */ jsxRuntime.jsx(ListerContext.Provider, { value: runtimeRef.current, children });
30655
30843
  }
30656
30844
  function useListerRuntime() {
30657
- const ctx = React66__namespace.useContext(ListerContext);
30845
+ const ctx = React67__namespace.useContext(ListerContext);
30658
30846
  if (!ctx)
30659
30847
  throw new Error(
30660
30848
  "useListerRuntime must be used within <ListerProvider>"
@@ -30691,14 +30879,14 @@ function ListerFiltersButton(props) {
30691
30879
  const hasFilters = options.length > 0;
30692
30880
  if (!hasFilters) return null;
30693
30881
  const ctx = actions.getFilterCtx(id);
30694
- const [openGroups, setOpenGroups] = React66__namespace.useState(
30882
+ const [openGroups, setOpenGroups] = React67__namespace.useState(
30695
30883
  {}
30696
30884
  );
30697
30885
  const toggleGroup = (key) => {
30698
30886
  setOpenGroups((m2) => ({ ...m2, [key]: !m2[key] }));
30699
30887
  };
30700
30888
  const selectedIds = asArray(session == null ? void 0 : session.selectedFilterValues);
30701
- const appliedCount = React66__namespace.useMemo(() => {
30889
+ const appliedCount = React67__namespace.useMemo(() => {
30702
30890
  var _a2;
30703
30891
  const patch = (_a2 = session == null ? void 0 : session.filtersPatch) != null ? _a2 : {};
30704
30892
  return Object.keys(patch).length;
@@ -31209,7 +31397,7 @@ function normalizeIconifyInput(icon) {
31209
31397
  }
31210
31398
  function OptionIcon(props) {
31211
31399
  const { icon, className } = props;
31212
- if (React66__namespace.isValidElement(icon)) {
31400
+ if (React67__namespace.isValidElement(icon)) {
31213
31401
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("shrink-0", className), children: icon });
31214
31402
  }
31215
31403
  if (isSvgSnippetString(icon)) {
@@ -31262,7 +31450,7 @@ function OptionList(props) {
31262
31450
  const options = (_a = selectors.visibleOptions(id)) != null ? _a : [];
31263
31451
  const draft = s3 == null ? void 0 : s3.draftValue;
31264
31452
  const isMulti = (s3 == null ? void 0 : s3.mode) === "multiple";
31265
- const isSelected = React66__namespace.useCallback(
31453
+ const isSelected = React67__namespace.useCallback(
31266
31454
  (value) => {
31267
31455
  if (isMulti) return Array.isArray(draft) && draft.includes(value);
31268
31456
  return draft === value;
@@ -31270,19 +31458,19 @@ function OptionList(props) {
31270
31458
  [draft, isMulti]
31271
31459
  );
31272
31460
  if (s3 == null ? void 0 : s3.errorCode) {
31273
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-y-auto", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-4 text-sm opacity-70", children: [
31461
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-4 text-sm opacity-70", children: [
31274
31462
  "Error: ",
31275
31463
  String(s3.errorCode)
31276
31464
  ] }) });
31277
31465
  }
31278
31466
  if ((s3 == null ? void 0 : s3.loading) && !((_b = s3 == null ? void 0 : s3.optionsList) == null ? void 0 : _b.length)) {
31279
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-y-auto", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "Loading\u2026" }) });
31467
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "Loading\u2026" }) });
31280
31468
  }
31281
31469
  if (!options.length) {
31282
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-y-auto", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "No results" }) });
31470
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "No results" }) });
31283
31471
  }
31284
31472
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-hidden", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full min-h-0 p-1", children: /* @__PURE__ */ jsxRuntime.jsx(
31285
- reactVirtuoso.Virtuoso,
31473
+ VirtualScroll,
31286
31474
  {
31287
31475
  style: { height: "100%", minHeight: 0 },
31288
31476
  data: options,
@@ -31329,13 +31517,13 @@ function OptionList(props) {
31329
31517
  }
31330
31518
  function useLister() {
31331
31519
  const runtime = useListerRuntime();
31332
- const [state, setState] = React66__namespace.useState(runtime.getState());
31333
- React66__namespace.useEffect(() => {
31520
+ const [state, setState] = React67__namespace.useState(runtime.getState());
31521
+ React67__namespace.useEffect(() => {
31334
31522
  return runtime.subscribe(() => {
31335
31523
  setState(runtime.getState());
31336
31524
  });
31337
31525
  }, [runtime]);
31338
- return React66__namespace.useMemo(
31526
+ return React67__namespace.useMemo(
31339
31527
  () => ({
31340
31528
  api: runtime.api,
31341
31529
  actions: runtime.actions,
@@ -31478,7 +31666,7 @@ var defaultHost = {
31478
31666
  }
31479
31667
  };
31480
31668
 
31481
- // src/presets/shadcn-variants/lister/patch.ts
31669
+ // src/presets/shadcn/variants/lister/patch.ts
31482
31670
  function makeInlineDef(args) {
31483
31671
  const mapping = {
31484
31672
  optionValue: (raw, ctx) => pick(raw, args.optionValue, ctx),
@@ -31674,25 +31862,25 @@ function ListerInner(props) {
31674
31862
  panelClassName
31675
31863
  } = props;
31676
31864
  const { api, actions, store } = useLister();
31677
- const ownerKeyRef = React66__namespace.useRef(
31865
+ const ownerKeyRef = React67__namespace.useRef(
31678
31866
  (_a = openOptions == null ? void 0 : openOptions.ownerKey) != null ? _a : createRuntimeKey("lister_owner")
31679
31867
  );
31680
- React66__namespace.useEffect(() => {
31868
+ React67__namespace.useEffect(() => {
31681
31869
  const next = openOptions == null ? void 0 : openOptions.ownerKey;
31682
31870
  if (next) ownerKeyRef.current = next;
31683
31871
  }, [openOptions]);
31684
31872
  const session = findSessionByOwner(store, ownerKeyRef.current);
31685
31873
  const sessionId = session == null ? void 0 : session.sessionId;
31686
31874
  const isOpen = !!(session == null ? void 0 : session.isOpen);
31687
- const [selectedOptions, setSelectedOptions] = React66__namespace.useState(
31875
+ const [selectedOptions, setSelectedOptions] = React67__namespace.useState(
31688
31876
  null
31689
31877
  );
31690
- const openingRef = React66__namespace.useRef(false);
31878
+ const openingRef = React67__namespace.useRef(false);
31691
31879
  const mode = modeProp != null ? modeProp : "single";
31692
31880
  const confirm = mode === "multiple" ? true : !!confirmProp;
31693
31881
  const disabledTrigger = !!(disabled || readOnly);
31694
31882
  const hasValue = mode === "multiple" ? Array.isArray(value) && value.length > 0 : value != null && value !== "";
31695
- React66__namespace.useEffect(() => {
31883
+ React67__namespace.useEffect(() => {
31696
31884
  if (!hasValue) {
31697
31885
  setSelectedOptions(null);
31698
31886
  return;
@@ -31728,7 +31916,7 @@ function ListerInner(props) {
31728
31916
  alive = false;
31729
31917
  };
31730
31918
  }, [api, def, filters, mode, value, hasValue]);
31731
- const openSession = React66__namespace.useCallback(async () => {
31919
+ const openSession = React67__namespace.useCallback(async () => {
31732
31920
  var _a2, _b2;
31733
31921
  console.log(openingRef.current);
31734
31922
  if (disabledTrigger) return;
@@ -31769,7 +31957,7 @@ function ListerInner(props) {
31769
31957
  permissions,
31770
31958
  value
31771
31959
  ]);
31772
- const clear = React66__namespace.useCallback(() => {
31960
+ const clear = React67__namespace.useCallback(() => {
31773
31961
  if (disabledTrigger) return;
31774
31962
  onValue(void 0, {
31775
31963
  action: "clear",
@@ -31777,7 +31965,7 @@ function ListerInner(props) {
31777
31965
  });
31778
31966
  setSelectedOptions(null);
31779
31967
  }, [disabledTrigger, onValue]);
31780
- const display = React66__namespace.useMemo(() => {
31968
+ const display = React67__namespace.useMemo(() => {
31781
31969
  return buildLabelsFromOptions({
31782
31970
  mode,
31783
31971
  value,
@@ -31786,7 +31974,7 @@ function ListerInner(props) {
31786
31974
  maxItems: maxDisplayItems
31787
31975
  });
31788
31976
  }, [maxDisplayItems, mode, placeholder, selectedOptions, value]);
31789
- const triggerCtx = React66__namespace.useMemo(
31977
+ const triggerCtx = React67__namespace.useMemo(
31790
31978
  () => ({
31791
31979
  mode,
31792
31980
  value,
@@ -31912,7 +32100,7 @@ function ListerInner(props) {
31912
32100
  }
31913
32101
  );
31914
32102
  const userTriggerEl = renderTrigger ? renderTrigger(triggerCtx) : null;
31915
- const TriggerNode = renderTrigger && React66__namespace.isValidElement(userTriggerEl) ? React66__namespace.cloneElement(userTriggerEl, {
32103
+ const TriggerNode = renderTrigger && React67__namespace.isValidElement(userTriggerEl) ? React67__namespace.cloneElement(userTriggerEl, {
31916
32104
  className: cn(
31917
32105
  (_b = userTriggerEl.props) == null ? void 0 : _b.className,
31918
32106
  className
@@ -32138,11 +32326,11 @@ function ListerResolvedInner(props) {
32138
32326
  } = props;
32139
32327
  const isStandaloneInline = !def && endpoint != null;
32140
32328
  const shouldInferOptionValue = isStandaloneInline && optionValue === void 0;
32141
- const [resolvedOptionValue, setResolvedOptionValue] = React66__namespace.useState(() => optionValue != null ? optionValue : "id");
32142
- React66__namespace.useEffect(() => {
32329
+ const [resolvedOptionValue, setResolvedOptionValue] = React67__namespace.useState(() => optionValue != null ? optionValue : "id");
32330
+ React67__namespace.useEffect(() => {
32143
32331
  if (optionValue !== void 0) setResolvedOptionValue(optionValue);
32144
32332
  }, [optionValue]);
32145
- React66__namespace.useEffect(() => {
32333
+ React67__namespace.useEffect(() => {
32146
32334
  if (!shouldInferOptionValue) return;
32147
32335
  if (!endpoint) return;
32148
32336
  let alive = true;
@@ -32194,7 +32382,7 @@ function ListerResolvedInner(props) {
32194
32382
  const inlineExists = endpoint !== void 0 || method !== void 0 || buildRequest !== void 0 || selector !== void 0 || resolvedOptionValue !== void 0 || // ✅ KEEP THIS (your rule)
32195
32383
  optionLabel !== void 0 || optionIcon !== void 0 || optionDescription !== void 0 || optionDisabled !== void 0 || optionGroup !== void 0 || optionMeta !== void 0 || // ✅ include search override as "inline patch" signal too
32196
32384
  search !== void 0;
32197
- const finalDef = React66__namespace.useMemo(() => {
32385
+ const finalDef = React67__namespace.useMemo(() => {
32198
32386
  const baseDef = def;
32199
32387
  if (!inlineExists) return baseDef;
32200
32388
  if (!baseDef) {
@@ -32249,7 +32437,7 @@ function ListerResolvedInner(props) {
32249
32437
  optionMeta,
32250
32438
  search
32251
32439
  ]);
32252
- const openOptions = React66__namespace.useMemo(() => {
32440
+ const openOptions = React67__namespace.useMemo(() => {
32253
32441
  return {
32254
32442
  title,
32255
32443
  searchMode,
@@ -32503,24 +32691,24 @@ function IconPickerPanel(props) {
32503
32691
  maxRender = 2500
32504
32692
  } = props;
32505
32693
  const den = densityTokens2(density);
32506
- const groups = React66__namespace.useMemo(() => {
32694
+ const groups = React67__namespace.useMemo(() => {
32507
32695
  const base = groupsProp != null ? groupsProp : [];
32508
32696
  if (!(allowedGroupIds == null ? void 0 : allowedGroupIds.length)) return base;
32509
32697
  const allowed = base.filter((g2) => allowedGroupIds.includes(g2.id));
32510
32698
  return allowed.length ? allowed : base;
32511
32699
  }, [allowedGroupIds, groupsProp]);
32512
- const prefixes = React66__namespace.useMemo(() => {
32700
+ const prefixes = React67__namespace.useMemo(() => {
32513
32701
  return uniq2(groups.flatMap((g2) => g2.prefixes).filter(Boolean));
32514
32702
  }, [groups]);
32515
- const [selectedGroupId, setSelectedGroupId] = React66__namespace.useState(() => {
32703
+ const [selectedGroupId, setSelectedGroupId] = React67__namespace.useState(() => {
32516
32704
  var _a;
32517
32705
  return (_a = groups[0]) == null ? void 0 : _a.id;
32518
32706
  });
32519
- const [searchQuery, setSearchQuery] = React66__namespace.useState("");
32520
- const [loading, setLoading] = React66__namespace.useState(false);
32521
- const [error, setError] = React66__namespace.useState(null);
32522
- const [allIcons, setAllIcons] = React66__namespace.useState([]);
32523
- React66__namespace.useEffect(() => {
32707
+ const [searchQuery, setSearchQuery] = React67__namespace.useState("");
32708
+ const [loading, setLoading] = React67__namespace.useState(false);
32709
+ const [error, setError] = React67__namespace.useState(null);
32710
+ const [allIcons, setAllIcons] = React67__namespace.useState([]);
32711
+ React67__namespace.useEffect(() => {
32524
32712
  setSelectedGroupId((prev) => {
32525
32713
  var _a, _b;
32526
32714
  if (!prev) return (_a = groups[0]) == null ? void 0 : _a.id;
@@ -32528,7 +32716,7 @@ function IconPickerPanel(props) {
32528
32716
  return exists ? prev : (_b = groups[0]) == null ? void 0 : _b.id;
32529
32717
  });
32530
32718
  }, [groups]);
32531
- React66__namespace.useEffect(() => {
32719
+ React67__namespace.useEffect(() => {
32532
32720
  const controller = new AbortController();
32533
32721
  let mounted = true;
32534
32722
  const load = async () => {
@@ -32570,15 +32758,15 @@ function IconPickerPanel(props) {
32570
32758
  controller.abort();
32571
32759
  };
32572
32760
  }, [prefixes, url]);
32573
- const selectedGroup = React66__namespace.useMemo(
32761
+ const selectedGroup = React67__namespace.useMemo(
32574
32762
  () => groups.find((g2) => g2.id === selectedGroupId),
32575
32763
  [groups, selectedGroupId]
32576
32764
  );
32577
- const selectedGroupPrefixes = React66__namespace.useMemo(() => {
32765
+ const selectedGroupPrefixes = React67__namespace.useMemo(() => {
32578
32766
  if (!selectedGroup) return void 0;
32579
32767
  return new Set(selectedGroup.prefixes);
32580
32768
  }, [selectedGroup]);
32581
- const filteredIcons = React66__namespace.useMemo(() => {
32769
+ const filteredIcons = React67__namespace.useMemo(() => {
32582
32770
  const q2 = searchQuery.trim().toLowerCase();
32583
32771
  let list = allIcons;
32584
32772
  if (selectedGroupPrefixes) {
@@ -32594,7 +32782,7 @@ function IconPickerPanel(props) {
32594
32782
  }
32595
32783
  return list;
32596
32784
  }, [allIcons, searchQuery, selectedGroupPrefixes]);
32597
- const limitedIcons = React66__namespace.useMemo(() => {
32785
+ const limitedIcons = React67__namespace.useMemo(() => {
32598
32786
  if (filteredIcons.length <= maxRender) return filteredIcons;
32599
32787
  return filteredIcons.slice(0, maxRender);
32600
32788
  }, [filteredIcons, maxRender]);
@@ -32608,7 +32796,7 @@ function IconPickerPanel(props) {
32608
32796
  value.includes(iconName) ? value.filter((x2) => x2 !== iconName) : [...value, iconName]
32609
32797
  );
32610
32798
  };
32611
- const GridComponents = React66__namespace.useMemo(
32799
+ const GridComponents = React67__namespace.useMemo(
32612
32800
  () => ({
32613
32801
  List: (p2) => /* @__PURE__ */ jsxRuntime.jsx(
32614
32802
  "div",
@@ -32621,8 +32809,11 @@ function IconPickerPanel(props) {
32621
32809
  }),
32622
32810
  []
32623
32811
  );
32624
- const gridHeightStyle = React66__namespace.useMemo(
32625
- () => ({ height: "50vh" }),
32812
+ const gridHeightStyle = React67__namespace.useMemo(
32813
+ () => ({
32814
+ height: "320px",
32815
+ maxHeight: "calc(var(--radix-popper-available-height) - 140px)"
32816
+ }),
32626
32817
  []
32627
32818
  );
32628
32819
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
@@ -32679,7 +32870,7 @@ function IconPickerPanel(props) {
32679
32870
  " results (refine search to narrow)."
32680
32871
  ] }),
32681
32872
  /* @__PURE__ */ jsxRuntime.jsx(
32682
- reactVirtuoso.VirtuosoGrid,
32873
+ VirtualScrollGrid,
32683
32874
  {
32684
32875
  style: gridHeightStyle,
32685
32876
  data: limitedIcons,
@@ -32746,7 +32937,7 @@ function IconPickerPanel(props) {
32746
32937
  )
32747
32938
  ] });
32748
32939
  }
32749
- var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant2(props, ref) {
32940
+ var ShadcnIconVariant = React67__namespace.forwardRef(function ShadcnIconVariant2(props, ref) {
32750
32941
  var _a, _b;
32751
32942
  const {
32752
32943
  value,
@@ -32798,12 +32989,12 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32798
32989
  const resolvedLeadingIcons = (leadingIcons == null ? void 0 : leadingIcons.length) ? leadingIcons : icon ? [icon] : [];
32799
32990
  const resolvedTrailingIcons = (trailingIcons == null ? void 0 : trailingIcons.length) ? trailingIcons : [];
32800
32991
  const hasExternalControls = !!leadingControl || !!trailingControl;
32801
- const [popoverOpen, setPopoverOpen] = React66__namespace.useState(false);
32802
- const selected = React66__namespace.useMemo(() => {
32992
+ const [popoverOpen, setPopoverOpen] = React67__namespace.useState(false);
32993
+ const selected = React67__namespace.useMemo(() => {
32803
32994
  if (multiple) return Array.isArray(value) ? value.filter(Boolean) : [];
32804
32995
  return typeof value === "string" && value ? [value] : [];
32805
32996
  }, [multiple, value]);
32806
- const emit = React66__namespace.useCallback(
32997
+ const emit = React67__namespace.useCallback(
32807
32998
  (nextArr, meta) => {
32808
32999
  var _a2, _b2;
32809
33000
  if (!onValue) return;
@@ -32825,7 +33016,7 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32825
33016
  },
32826
33017
  [multiple, onValue]
32827
33018
  );
32828
- const Chip = React66__namespace.useCallback(
33019
+ const Chip = React67__namespace.useCallback(
32829
33020
  ({ iconName }) => {
32830
33021
  var _a2;
32831
33022
  const short = (_a2 = iconName.split(":")[1]) != null ? _a2 : iconName;
@@ -32888,7 +33079,7 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32888
33079
  [chipHeightCls, den.chipGap, den.chipPad, emit, selected]
32889
33080
  );
32890
33081
  const selectedCount = selected.length;
32891
- const resolveButtonTriggerElement = React66__namespace.useCallback(() => {
33082
+ const resolveButtonTriggerElement = React67__namespace.useCallback(() => {
32892
33083
  const ctx = {
32893
33084
  open: popoverOpen,
32894
33085
  items: selected,
@@ -32918,7 +33109,7 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32918
33109
  );
32919
33110
  const child = el.props.children;
32920
33111
  if (selectedBadgePlacement === "end") {
32921
- return React66__namespace.cloneElement(el, {
33112
+ return React67__namespace.cloneElement(el, {
32922
33113
  className: nextClass,
32923
33114
  children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-2", children: [
32924
33115
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0", children: child }),
@@ -32926,7 +33117,7 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32926
33117
  ] })
32927
33118
  });
32928
33119
  }
32929
- return React66__namespace.cloneElement(el, {
33120
+ return React67__namespace.cloneElement(el, {
32930
33121
  className: nextClass,
32931
33122
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32932
33123
  child,
@@ -32934,7 +33125,7 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32934
33125
  ] })
32935
33126
  });
32936
33127
  };
32937
- const withNoopDnD = (el) => React66__namespace.cloneElement(el, {
33128
+ const withNoopDnD = (el) => React67__namespace.cloneElement(el, {
32938
33129
  // keep event-merging parity with file variant (no-op, but safe)
32939
33130
  onDragOver: mergeHandlers2(
32940
33131
  el.props.onDragOver,
@@ -32951,7 +33142,7 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32951
33142
  }
32952
33143
  )
32953
33144
  });
32954
- if (React66__namespace.isValidElement(rawNode))
33145
+ if (React67__namespace.isValidElement(rawNode))
32955
33146
  return withNoopDnD(injectBadgeIntoElement(rawNode));
32956
33147
  const fallback = /* @__PURE__ */ jsxRuntime.jsxs(
32957
33148
  "button",
@@ -32999,7 +33190,7 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
32999
33190
  triggerClassName
33000
33191
  ]);
33001
33192
  const COLLAPSE_LIMIT = 2;
33002
- const TriggerRegion = React66__namespace.useMemo(() => {
33193
+ const TriggerRegion = React67__namespace.useMemo(() => {
33003
33194
  const hasItems = selected.length > 0;
33004
33195
  const visibleItems = selected.slice(0, COLLAPSE_LIMIT);
33005
33196
  const hiddenCount = selected.length - COLLAPSE_LIMIT;
@@ -33087,11 +33278,11 @@ var ShadcnIconVariant = React66__namespace.forwardRef(function ShadcnIconVariant
33087
33278
  PopoverContent,
33088
33279
  {
33089
33280
  className: cn(
33090
- "w-(--radix-popover-trigger-width) p-0 max-h-(--radix-popper-available-height)",
33281
+ "w-(--radix-popover-trigger-width) p-0 max-h-(--radix-popper-available-height) overflow-hidden flex flex-col",
33091
33282
  popoverClassName
33092
33283
  ),
33093
33284
  align: "start",
33094
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
33285
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 min-h-0", children: [
33095
33286
  /* @__PURE__ */ jsxRuntime.jsxs(
33096
33287
  "div",
33097
33288
  {
@@ -33371,8 +33562,8 @@ function isFileLikeString(s3) {
33371
33562
  return FILE_EXT_RE.test(v2);
33372
33563
  }
33373
33564
  function useImagePreview(value) {
33374
- const [src, setSrc] = React66__namespace.useState(null);
33375
- React66__namespace.useEffect(() => {
33565
+ const [src, setSrc] = React67__namespace.useState(null);
33566
+ React67__namespace.useEffect(() => {
33376
33567
  if (!value) {
33377
33568
  setSrc(null);
33378
33569
  return;
@@ -33390,7 +33581,7 @@ var ImageThumb = ({ image }) => {
33390
33581
  const src = useImagePreview(image);
33391
33582
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-sm border bg-muted/50", children: src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx(Image, { className: "h-4 w-4 text-muted-foreground/50" }) });
33392
33583
  };
33393
- var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageIconVariant2(props, ref) {
33584
+ var ShadcnImageIconVariant = React67__namespace.forwardRef(function ShadcnImageIconVariant2(props, ref) {
33394
33585
  const {
33395
33586
  value,
33396
33587
  onValue,
@@ -33447,7 +33638,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33447
33638
  const regIcon = getPaletteUtil("iconPicker");
33448
33639
  const resolvedIconUrl = iconUrl != null ? iconUrl : regIcon == null ? void 0 : regIcon.url;
33449
33640
  const resolvedIconGroups = iconGroups != null ? iconGroups : regIcon == null ? void 0 : regIcon.groups;
33450
- const effectiveIconGroups = React66__namespace.useMemo(() => {
33641
+ const effectiveIconGroups = React67__namespace.useMemo(() => {
33451
33642
  const groups = resolvedIconGroups != null ? resolvedIconGroups : DEFAULT_GROUPS;
33452
33643
  const allowed = toArray(allowedIconGroupIds).filter(
33453
33644
  Boolean
@@ -33456,7 +33647,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33456
33647
  const filtered = groups.filter((g2) => allowed.includes(g2.id));
33457
33648
  return filtered.length ? filtered : groups;
33458
33649
  }, [resolvedIconGroups, allowedIconGroupIds]);
33459
- const allowedIconPrefixes = React66__namespace.useMemo(() => {
33650
+ const allowedIconPrefixes = React67__namespace.useMemo(() => {
33460
33651
  var _a;
33461
33652
  const set = /* @__PURE__ */ new Set();
33462
33653
  for (const g2 of effectiveIconGroups) {
@@ -33464,7 +33655,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33464
33655
  }
33465
33656
  return set;
33466
33657
  }, [effectiveIconGroups]);
33467
- const isIconString = React66__namespace.useCallback(
33658
+ const isIconString = React67__namespace.useCallback(
33468
33659
  (raw) => {
33469
33660
  var _a;
33470
33661
  const s3 = raw.trim();
@@ -33476,7 +33667,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33476
33667
  },
33477
33668
  [allowedIconPrefixes]
33478
33669
  );
33479
- const normaliseImageIconInput = React66__namespace.useCallback(
33670
+ const normaliseImageIconInput = React67__namespace.useCallback(
33480
33671
  (v2) => {
33481
33672
  var _a;
33482
33673
  if (v2 == null) return null;
@@ -33517,25 +33708,25 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33517
33708
  const resolvedLeadingIcons = (leadingIcons == null ? void 0 : leadingIcons.length) ? leadingIcons : icon ? [icon] : [];
33518
33709
  const resolvedTrailingIcons = (trailingIcons == null ? void 0 : trailingIcons.length) ? trailingIcons : [];
33519
33710
  const hasExternalControls = !!leadingControl || !!trailingControl;
33520
- const [popoverOpen, setPopoverOpen] = React66__namespace.useState(false);
33521
- const [tab, setTab] = React66__namespace.useState("icon");
33522
- const list = React66__namespace.useMemo(() => {
33711
+ const [popoverOpen, setPopoverOpen] = React67__namespace.useState(false);
33712
+ const [tab, setTab] = React67__namespace.useState("icon");
33713
+ const list = React67__namespace.useMemo(() => {
33523
33714
  const raw = multiple ? toArray(value) : value != null ? [value] : [];
33524
33715
  return raw.map(normaliseImageIconInput).filter(Boolean);
33525
33716
  }, [multiple, normaliseImageIconInput, value]);
33526
- const iconsSelected = React66__namespace.useMemo(() => {
33717
+ const iconsSelected = React67__namespace.useMemo(() => {
33527
33718
  return list.filter((x2) => x2.kind === "icon").map((x2) => x2.icon);
33528
33719
  }, [list]);
33529
- const imagesSelected = React66__namespace.useMemo(() => {
33720
+ const imagesSelected = React67__namespace.useMemo(() => {
33530
33721
  return list.filter((x2) => x2.kind === "image");
33531
33722
  }, [list]);
33532
- const toFieldRaw = React66__namespace.useCallback(
33723
+ const toFieldRaw = React67__namespace.useCallback(
33533
33724
  (x2) => {
33534
33725
  return x2.kind === "icon" ? x2.icon : x2.image;
33535
33726
  },
33536
33727
  []
33537
33728
  );
33538
- const emit = React66__namespace.useCallback(
33729
+ const emit = React67__namespace.useCallback(
33539
33730
  (nextList, meta) => {
33540
33731
  var _a, _b;
33541
33732
  if (!onValue) return;
@@ -33564,7 +33755,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33564
33755
  emit(next, { action: "remove", index: idx });
33565
33756
  };
33566
33757
  const clearAll = () => emit([], { action: "clear" });
33567
- const Chip = React66__namespace.useCallback(
33758
+ const Chip = React67__namespace.useCallback(
33568
33759
  ({ item, index }) => {
33569
33760
  var _a, _b, _c;
33570
33761
  const label = item.kind === "icon" ? (_a = item.icon.split(":")[1]) != null ? _a : item.icon : (_c = item.name) != null ? _c : typeof item.image === "string" ? (_b = item.image.split(/[\\/]/).pop()) != null ? _b : item.image : item.image.name;
@@ -33615,7 +33806,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33615
33806
  [chipHeightCls, den.chipGap, den.chipPad, removeAt]
33616
33807
  );
33617
33808
  const selectedCount = list.length;
33618
- const resolveButtonTriggerElement = React66__namespace.useCallback(() => {
33809
+ const resolveButtonTriggerElement = React67__namespace.useCallback(() => {
33619
33810
  const ctx = {
33620
33811
  open: popoverOpen,
33621
33812
  items: list,
@@ -33645,7 +33836,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33645
33836
  );
33646
33837
  const child = el.props.children;
33647
33838
  if (selectedBadgePlacement === "end") {
33648
- return React66__namespace.cloneElement(el, {
33839
+ return React67__namespace.cloneElement(el, {
33649
33840
  className: nextClass,
33650
33841
  children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-2", children: [
33651
33842
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0", children: child }),
@@ -33653,7 +33844,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33653
33844
  ] })
33654
33845
  });
33655
33846
  }
33656
- return React66__namespace.cloneElement(el, {
33847
+ return React67__namespace.cloneElement(el, {
33657
33848
  className: nextClass,
33658
33849
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
33659
33850
  child,
@@ -33661,7 +33852,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33661
33852
  ] })
33662
33853
  });
33663
33854
  };
33664
- if (React66__namespace.isValidElement(rawNode))
33855
+ if (React67__namespace.isValidElement(rawNode))
33665
33856
  return injectBadgeIntoElement(rawNode);
33666
33857
  return /* @__PURE__ */ jsxRuntime.jsxs(
33667
33858
  "button",
@@ -33693,12 +33884,12 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33693
33884
  selectedCount,
33694
33885
  triggerClassName
33695
33886
  ]);
33696
- const [dragOver, setDragOver] = React66__namespace.useState(false);
33697
- const fileInputRef = React66__namespace.useRef(null);
33698
- const [imgSelectedIds, setImgSelectedIds] = React66__namespace.useState(
33887
+ const [dragOver, setDragOver] = React67__namespace.useState(false);
33888
+ const fileInputRef = React67__namespace.useRef(null);
33889
+ const [imgSelectedIds, setImgSelectedIds] = React67__namespace.useState(
33699
33890
  () => /* @__PURE__ */ new Set()
33700
33891
  );
33701
- const imageItems = React66__namespace.useMemo(() => {
33892
+ const imageItems = React67__namespace.useMemo(() => {
33702
33893
  return imagesSelected.map((x2) => normaliseFileLike2(x2.image));
33703
33894
  }, [imagesSelected]);
33704
33895
  const canAddMore = (nextCount) => {
@@ -33761,7 +33952,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33761
33952
  setImagesFromItems(next, { from });
33762
33953
  }
33763
33954
  };
33764
- const openImagePicker = React66__namespace.useCallback(async () => {
33955
+ const openImagePicker = React67__namespace.useCallback(async () => {
33765
33956
  var _a;
33766
33957
  if (isDisabled) return;
33767
33958
  const resolvedLoader = typeof customLoader == "function" ? customLoader : customLoader ? getPaletteUtil("customLoader") : void 0;
@@ -33786,14 +33977,14 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33786
33977
  }
33787
33978
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
33788
33979
  }, [accept, customLoader, imageItems, isDisabled, mergeMode, multiple]);
33789
- const onDragOver = React66__namespace.useCallback(
33980
+ const onDragOver = React67__namespace.useCallback(
33790
33981
  (e4) => {
33791
33982
  e4.preventDefault();
33792
33983
  if (!isDisabled) setDragOver(true);
33793
33984
  },
33794
33985
  [isDisabled]
33795
33986
  );
33796
- const onDrop = React66__namespace.useCallback(
33987
+ const onDrop = React67__namespace.useCallback(
33797
33988
  (e4) => {
33798
33989
  var _a;
33799
33990
  e4.preventDefault();
@@ -33842,7 +34033,7 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33842
34033
  if (icons[0]) setPopoverOpen(false);
33843
34034
  }
33844
34035
  };
33845
- const TriggerRegion = React66__namespace.useMemo(() => {
34036
+ const TriggerRegion = React67__namespace.useMemo(() => {
33846
34037
  const COLLAPSE_LIMIT = 2;
33847
34038
  const hasItems = list.length > 0;
33848
34039
  const visibleItems = list.slice(0, COLLAPSE_LIMIT);
@@ -33937,11 +34128,11 @@ var ShadcnImageIconVariant = React66__namespace.forwardRef(function ShadcnImageI
33937
34128
  PopoverContent,
33938
34129
  {
33939
34130
  className: cn(
33940
- "w-(--radix-popover-trigger-width) p-0 max-h-(--radix-popper-available-height)",
34131
+ "w-(--radix-popover-trigger-width) p-0 max-h-(--radix-popper-available-height) overflow-hidden flex flex-col",
33941
34132
  popoverClassName
33942
34133
  ),
33943
34134
  align: "start",
33944
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
34135
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 min-h-0", children: [
33945
34136
  /* @__PURE__ */ jsxRuntime.jsxs(
33946
34137
  "div",
33947
34138
  {
@@ -34472,7 +34663,7 @@ function FieldError({
34472
34663
  errors,
34473
34664
  ...props
34474
34665
  }) {
34475
- const content = React66.useMemo(() => {
34666
+ const content = React67.useMemo(() => {
34476
34667
  var _a;
34477
34668
  if (children) {
34478
34669
  return children;
@@ -34593,6 +34784,70 @@ function buildLayoutGraph(args) {
34593
34784
  }
34594
34785
  };
34595
34786
  }
34787
+ var ThemeContext = React67__namespace.createContext(null);
34788
+ function ThemeProvider({ theme, children }) {
34789
+ const outerTheme = React67__namespace.useContext(ThemeContext);
34790
+ const mergedTheme = React67__namespace.useMemo(() => {
34791
+ if (!outerTheme) return theme;
34792
+ return mergeThemes(outerTheme, theme);
34793
+ }, [outerTheme, theme]);
34794
+ return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: mergedTheme, children });
34795
+ }
34796
+ var PaletteThemeProvider = ThemeProvider;
34797
+ function usePaletteTheme() {
34798
+ var _a;
34799
+ return (_a = React67__namespace.useContext(ThemeContext)) != null ? _a : {};
34800
+ }
34801
+ function mergeThemes(outer, inner) {
34802
+ var _a;
34803
+ const merged = {
34804
+ defaultProps: { ...outer.defaultProps, ...inner.defaultProps },
34805
+ classes: mergeClasses2(outer.classes, inner.classes),
34806
+ styles: mergeStyleObjects(outer.styles, inner.styles),
34807
+ variants: { ...outer.variants }
34808
+ };
34809
+ if (inner.variants) {
34810
+ for (const key of Object.keys(inner.variants)) {
34811
+ const variantKey = key;
34812
+ const innerVar = inner.variants[variantKey];
34813
+ const outerVar = (_a = outer.variants) == null ? void 0 : _a[variantKey];
34814
+ if (innerVar) {
34815
+ merged.variants[variantKey] = {
34816
+ defaultProps: { ...outerVar == null ? void 0 : outerVar.defaultProps, ...innerVar.defaultProps },
34817
+ classes: mergeClasses2(outerVar == null ? void 0 : outerVar.classes, innerVar.classes),
34818
+ styles: mergeStyleObjects(outerVar == null ? void 0 : outerVar.styles, innerVar.styles)
34819
+ };
34820
+ }
34821
+ }
34822
+ }
34823
+ return merged;
34824
+ }
34825
+ function mergeClasses2(outer, inner) {
34826
+ if (!outer && !inner) return void 0;
34827
+ if (!outer) return inner;
34828
+ if (!inner) return outer;
34829
+ const result = { ...outer };
34830
+ for (const key of Object.keys(inner)) {
34831
+ const outerVal = outer[key];
34832
+ const innerVal = inner[key];
34833
+ if (outerVal && innerVal) {
34834
+ result[key] = `${outerVal} ${innerVal}`;
34835
+ } else if (innerVal) {
34836
+ result[key] = innerVal;
34837
+ }
34838
+ }
34839
+ return result;
34840
+ }
34841
+ function mergeStyleObjects(outer, inner) {
34842
+ if (!outer && !inner) return void 0;
34843
+ if (!outer) return inner;
34844
+ if (!inner) return outer;
34845
+ const result = { ...outer };
34846
+ for (const key of Object.keys(inner)) {
34847
+ result[key] = { ...outer[key], ...inner[key] };
34848
+ }
34849
+ return result;
34850
+ }
34596
34851
  function normalizeValidateResult(result) {
34597
34852
  if (result === void 0 || result === null || result === true) return [];
34598
34853
  if (result === false) return ["Invalid value."];
@@ -34614,7 +34869,7 @@ function resolveLayoutForField(defaults, overrides, props, variantResolve) {
34614
34869
  ...overrides
34615
34870
  };
34616
34871
  }
34617
- function renderHelperSlot(root, slot, classes) {
34872
+ function renderHelperSlot(root, slot, classes, styles) {
34618
34873
  const placement = slot.placement;
34619
34874
  switch (slot.id) {
34620
34875
  case "sublabel":
@@ -34625,6 +34880,7 @@ function renderHelperSlot(root, slot, classes) {
34625
34880
  "text-xs text-muted-foreground",
34626
34881
  classes == null ? void 0 : classes.sublabel
34627
34882
  ),
34883
+ style: styles == null ? void 0 : styles.sublabel,
34628
34884
  "data-slot": `sublabel-${placement}`,
34629
34885
  children: slot.content
34630
34886
  },
@@ -34638,6 +34894,7 @@ function renderHelperSlot(root, slot, classes) {
34638
34894
  "text-xs text-muted-foreground",
34639
34895
  classes == null ? void 0 : classes.description
34640
34896
  ),
34897
+ style: styles == null ? void 0 : styles.description,
34641
34898
  "data-slot": `description-${placement}`,
34642
34899
  children: slot.content
34643
34900
  },
@@ -34651,6 +34908,7 @@ function renderHelperSlot(root, slot, classes) {
34651
34908
  "text-xs text-muted-foreground",
34652
34909
  classes == null ? void 0 : classes.helpText
34653
34910
  ),
34911
+ style: styles == null ? void 0 : styles.helpText,
34654
34912
  "data-slot": `helptext-${placement}`,
34655
34913
  children: slot.content
34656
34914
  },
@@ -34661,6 +34919,7 @@ function renderHelperSlot(root, slot, classes) {
34661
34919
  FieldError,
34662
34920
  {
34663
34921
  className: cn("text-xs text-destructive", classes == null ? void 0 : classes.error),
34922
+ style: styles == null ? void 0 : styles.error,
34664
34923
  "data-slot": `error-${placement}`,
34665
34924
  children: slot.content
34666
34925
  },
@@ -34671,6 +34930,7 @@ function renderHelperSlot(root, slot, classes) {
34671
34930
  "div",
34672
34931
  {
34673
34932
  className: cn("flex items-center gap-1", classes == null ? void 0 : classes.tags),
34933
+ style: (styles == null ? void 0 : styles.tags) || (styles == null ? void 0 : styles.tag),
34674
34934
  "data-slot": `tags-${placement}`,
34675
34935
  children: slot.content
34676
34936
  },
@@ -34680,29 +34940,66 @@ function renderHelperSlot(root, slot, classes) {
34680
34940
  return null;
34681
34941
  }
34682
34942
  }
34683
- function getClasses(props) {
34943
+ function getClasses(props, themeClasses, variantThemeClasses) {
34684
34944
  var _a;
34685
34945
  const legacy = (_a = props.classes) != null ? _a : {};
34686
34946
  return {
34687
- root: cn(legacy.root, props.className) || void 0,
34688
- labelRow: cn(legacy.labelRow, props.labelRowClassName) || void 0,
34689
- inlineRow: cn(legacy.inlineRow, props.inlineRowClassName) || void 0,
34690
- label: cn(legacy.label, props.labelClassName) || void 0,
34691
- sublabel: cn(legacy.sublabel, props.sublabelClassName) || void 0,
34692
- description: cn(legacy.description, props.descriptionClassName) || void 0,
34693
- helpText: cn(legacy.helpText, props.helpTextClassName) || void 0,
34694
- error: cn(legacy.error, props.errorClassName) || void 0,
34695
- group: cn(legacy.group, props.groupClassName) || void 0,
34696
- content: cn(legacy.content, props.contentClassName) || void 0,
34697
- variant: cn(legacy.variant, props.variantClassName) || void 0,
34698
- inlineInputColumn: cn(legacy.inlineInputColumn, props.inlineInputColumnClassName) || void 0,
34699
- inlineLabelColumn: cn(legacy.inlineLabelColumn, props.inlineLabelColumnClassName) || void 0,
34700
- required: cn(legacy.required, props.requiredClassName) || void 0,
34701
- tag: cn(legacy.tag, props.tagClassName) || void 0
34947
+ root: cn(themeClasses == null ? void 0 : themeClasses.root, variantThemeClasses == null ? void 0 : variantThemeClasses.root, legacy.root, props.className) || void 0,
34948
+ labelRow: cn(themeClasses == null ? void 0 : themeClasses.labelRow, variantThemeClasses == null ? void 0 : variantThemeClasses.labelRow, legacy.labelRow, props.labelRowClassName) || void 0,
34949
+ inlineRow: cn(themeClasses == null ? void 0 : themeClasses.inlineRow, variantThemeClasses == null ? void 0 : variantThemeClasses.inlineRow, legacy.inlineRow, props.inlineRowClassName) || void 0,
34950
+ label: cn(themeClasses == null ? void 0 : themeClasses.label, variantThemeClasses == null ? void 0 : variantThemeClasses.label, legacy.label, props.labelClassName) || void 0,
34951
+ sublabel: cn(themeClasses == null ? void 0 : themeClasses.sublabel, variantThemeClasses == null ? void 0 : variantThemeClasses.sublabel, legacy.sublabel, props.sublabelClassName) || void 0,
34952
+ description: cn(themeClasses == null ? void 0 : themeClasses.description, variantThemeClasses == null ? void 0 : variantThemeClasses.description, legacy.description, props.descriptionClassName) || void 0,
34953
+ helpText: cn(themeClasses == null ? void 0 : themeClasses.helpText, variantThemeClasses == null ? void 0 : variantThemeClasses.helpText, legacy.helpText, props.helpTextClassName) || void 0,
34954
+ error: cn(themeClasses == null ? void 0 : themeClasses.error, variantThemeClasses == null ? void 0 : variantThemeClasses.error, legacy.error, props.errorClassName) || void 0,
34955
+ group: cn(themeClasses == null ? void 0 : themeClasses.group, variantThemeClasses == null ? void 0 : variantThemeClasses.group, legacy.group, props.groupClassName) || void 0,
34956
+ content: cn(themeClasses == null ? void 0 : themeClasses.content, variantThemeClasses == null ? void 0 : variantThemeClasses.content, legacy.content, props.contentClassName) || void 0,
34957
+ variant: cn(themeClasses == null ? void 0 : themeClasses.variant, variantThemeClasses == null ? void 0 : variantThemeClasses.variant, legacy.variant, props.variantClassName) || void 0,
34958
+ inlineInputColumn: cn(themeClasses == null ? void 0 : themeClasses.inlineInputColumn, variantThemeClasses == null ? void 0 : variantThemeClasses.inlineInputColumn, legacy.inlineInputColumn, props.inlineInputColumnClassName) || void 0,
34959
+ inlineLabelColumn: cn(themeClasses == null ? void 0 : themeClasses.inlineLabelColumn, variantThemeClasses == null ? void 0 : variantThemeClasses.inlineLabelColumn, legacy.inlineLabelColumn, props.inlineLabelColumnClassName) || void 0,
34960
+ required: cn(themeClasses == null ? void 0 : themeClasses.required, variantThemeClasses == null ? void 0 : variantThemeClasses.required, legacy.required, props.requiredClassName) || void 0,
34961
+ tag: cn(themeClasses == null ? void 0 : themeClasses.tag, variantThemeClasses == null ? void 0 : variantThemeClasses.tag, legacy.tag, props.tagClassName) || void 0
34702
34962
  };
34703
34963
  }
34964
+ function mergeStyles(propsStyles, themeStyles, variantThemeStyles) {
34965
+ const keys = [
34966
+ "root",
34967
+ "labelRow",
34968
+ "inlineRow",
34969
+ "label",
34970
+ "sublabel",
34971
+ "description",
34972
+ "helpText",
34973
+ "error",
34974
+ "group",
34975
+ "content",
34976
+ "variant",
34977
+ "inlineInputColumn",
34978
+ "inlineLabelColumn",
34979
+ "required",
34980
+ "tag"
34981
+ ];
34982
+ const result = {};
34983
+ for (const key of keys) {
34984
+ const s3 = {
34985
+ ...themeStyles == null ? void 0 : themeStyles[key],
34986
+ ...variantThemeStyles == null ? void 0 : variantThemeStyles[key],
34987
+ ...propsStyles == null ? void 0 : propsStyles[key]
34988
+ };
34989
+ if (Object.keys(s3).length > 0) {
34990
+ result[key] = s3;
34991
+ }
34992
+ }
34993
+ return result;
34994
+ }
34704
34995
  function InputField(props) {
34705
- var _a, _b, _c, _d, _e, _f, _g;
34996
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
34997
+ const theme = usePaletteTheme();
34998
+ const mergedProps = {
34999
+ ...theme.defaultProps,
35000
+ ...props.variant ? (_b = (_a = theme.variants) == null ? void 0 : _a[props.variant]) == null ? void 0 : _b.defaultProps : void 0,
35001
+ ...props
35002
+ };
34706
35003
  const {
34707
35004
  variant,
34708
35005
  onSubmit,
@@ -34747,7 +35044,7 @@ function InputField(props) {
34747
35044
  classes: _depreciated,
34748
35045
  // Everything else → forwarded to variant
34749
35046
  ...rest
34750
- } = props;
35047
+ } = mergedProps;
34751
35048
  const module2 = getVariant(variant);
34752
35049
  if (!module2) {
34753
35050
  {
@@ -34759,8 +35056,13 @@ function InputField(props) {
34759
35056
  }
34760
35057
  return null;
34761
35058
  }
34762
- const classes = getClasses(props);
34763
- const layout = React66__namespace.useMemo(() => {
35059
+ const themeClasses = theme.classes;
35060
+ const themeVariantClasses = variant ? (_d = (_c = theme.variants) == null ? void 0 : _c[variant]) == null ? void 0 : _d.classes : void 0;
35061
+ const classes = getClasses(mergedProps, themeClasses, themeVariantClasses);
35062
+ const themeStyles = theme.styles;
35063
+ const themeVariantStyles = variant ? (_f = (_e = theme.variants) == null ? void 0 : _e[variant]) == null ? void 0 : _f.styles : void 0;
35064
+ const mergedStyles = mergeStyles(mergedProps.styles, themeStyles, themeVariantStyles);
35065
+ const layout = React67__namespace.useMemo(() => {
34764
35066
  var _a2;
34765
35067
  const defaultsLayout = (_a2 = module2.defaults) == null ? void 0 : _a2.layout;
34766
35068
  const overrides = {};
@@ -34791,7 +35093,7 @@ function InputField(props) {
34791
35093
  return resolveLayoutForField(
34792
35094
  defaultsLayout,
34793
35095
  overrides,
34794
- props,
35096
+ mergedProps,
34795
35097
  module2.resolveLayout
34796
35098
  );
34797
35099
  }, [
@@ -34804,11 +35106,11 @@ function InputField(props) {
34804
35106
  tagPlacement,
34805
35107
  inline,
34806
35108
  fullWidth,
34807
- props
35109
+ mergedProps
34808
35110
  ]);
34809
- const effectiveSize = (_c = size != null ? size : (_b = (_a = module2.defaults) == null ? void 0 : _a.layout) == null ? void 0 : _b.defaultSize) != null ? _c : void 0;
34810
- const effectiveDensity = (_f = density != null ? density : (_e = (_d = module2.defaults) == null ? void 0 : _d.layout) == null ? void 0 : _e.defaultDensity) != null ? _f : void 0;
34811
- const validate = React66__namespace.useCallback(
35111
+ const effectiveSize = (_i = size != null ? size : (_h = (_g = module2.defaults) == null ? void 0 : _g.layout) == null ? void 0 : _h.defaultSize) != null ? _i : void 0;
35112
+ const effectiveDensity = (_l = density != null ? density : (_k = (_j = module2.defaults) == null ? void 0 : _j.layout) == null ? void 0 : _k.defaultDensity) != null ? _l : void 0;
35113
+ const validate = React67__namespace.useCallback(
34812
35114
  (value2, field2, form, _report) => {
34813
35115
  var _a2;
34814
35116
  const messages = [];
@@ -34848,7 +35150,7 @@ function InputField(props) {
34848
35150
  const { value: fieldValue, setValue, error, ref, key } = field;
34849
35151
  const Variant = module2.Variant;
34850
35152
  const visualError = (errorText != null ? errorText : error) || "";
34851
- const handleValueChange = React66__namespace.useCallback(
35153
+ const handleValueChange = React67__namespace.useCallback(
34852
35154
  (next, detail) => {
34853
35155
  let finalValue = next;
34854
35156
  let defaultPrevented = false;
@@ -34897,7 +35199,7 @@ function InputField(props) {
34897
35199
  hostVariantClass,
34898
35200
  classes == null ? void 0 : classes.variant
34899
35201
  ) || void 0;
34900
- const tagsContent = React66__namespace.useMemo(() => {
35202
+ const tagsContent = React67__namespace.useMemo(() => {
34901
35203
  const items = tags != null ? tags : [];
34902
35204
  if (!items.length) return null;
34903
35205
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: items.map((tag, index) => /* @__PURE__ */ jsxRuntime.jsxs(
@@ -34921,7 +35223,7 @@ function InputField(props) {
34921
35223
  index
34922
35224
  )) });
34923
35225
  }, [tags, classes == null ? void 0 : classes.tag]);
34924
- const graph = React66__namespace.useMemo(
35226
+ const graph = React67__namespace.useMemo(
34925
35227
  () => buildLayoutGraph({
34926
35228
  layout,
34927
35229
  sublabel,
@@ -34965,15 +35267,15 @@ function InputField(props) {
34965
35267
  "[container-type:normal]",
34966
35268
  "[container-name:none]",
34967
35269
  classes == null ? void 0 : classes.group
34968
- ) : (_g = classes == null ? void 0 : classes.group) != null ? _g : void 0;
35270
+ ) : (_m = classes == null ? void 0 : classes.group) != null ? _m : void 0;
34969
35271
  const inlineFieldContentClass = isCompactInline ? cn("flex-none w-auto", classes == null ? void 0 : classes.content) : cn("w-full", classes == null ? void 0 : classes.content);
34970
- const inlineInputColumn = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: inlineInputColClass, children: [
35272
+ const inlineInputColumn = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: inlineInputColClass, style: mergedStyles.inlineInputColumn, children: [
34971
35273
  graph.getSlotsFor("input", "above").render(
34972
35274
  (slots) => slots.map(
34973
- (slot) => renderHelperSlot("input", slot, classes)
35275
+ (slot) => renderHelperSlot("input", slot, classes, mergedStyles)
34974
35276
  )
34975
35277
  ),
34976
- /* @__PURE__ */ jsxRuntime.jsx(FieldGroup, { className: inlineFieldGroupClass, children: /* @__PURE__ */ jsxRuntime.jsx(FieldContent, { className: inlineFieldContentClass, children: /* @__PURE__ */ jsxRuntime.jsx(
35278
+ /* @__PURE__ */ jsxRuntime.jsx(FieldGroup, { className: inlineFieldGroupClass, style: mergedStyles.group, children: /* @__PURE__ */ jsxRuntime.jsx(FieldContent, { className: inlineFieldContentClass, style: mergedStyles.content, children: /* @__PURE__ */ jsxRuntime.jsx(
34977
35279
  Variant,
34978
35280
  {
34979
35281
  ...rest,
@@ -34987,19 +35289,20 @@ function InputField(props) {
34987
35289
  readOnly: readOnlyProp,
34988
35290
  size: effectiveSize,
34989
35291
  density: effectiveDensity,
34990
- className: mergedVariantClass
35292
+ className: mergedVariantClass,
35293
+ style: { ...mergedStyles.variant, ...rest.style }
34991
35294
  }
34992
35295
  ) }) }),
34993
35296
  graph.getSlotsFor("input", "below").render(
34994
35297
  (slots) => slots.map(
34995
- (slot) => renderHelperSlot("input", slot, classes)
35298
+ (slot) => renderHelperSlot("input", slot, classes, mergedStyles)
34996
35299
  )
34997
35300
  )
34998
35301
  ] });
34999
- const inlineLabelColumn = inlineLabelSide === "hidden" || !hasAnyLabelBlockContent ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-0", inlineLabelColClass), children: [
35302
+ const inlineLabelColumn = inlineLabelSide === "hidden" || !hasAnyLabelBlockContent ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-0", inlineLabelColClass), style: mergedStyles.inlineLabelColumn, children: [
35000
35303
  graph.getSlotsFor("label", "above").render(
35001
35304
  (slots) => slots.map(
35002
- (slot) => renderHelperSlot("label", slot, classes)
35305
+ (slot) => renderHelperSlot("label", slot, classes, mergedStyles)
35003
35306
  )
35004
35307
  ),
35005
35308
  hasLabelRowContent && /* @__PURE__ */ jsxRuntime.jsxs(
@@ -35009,10 +35312,11 @@ function InputField(props) {
35009
35312
  "flex items-baseline justify-between gap-1",
35010
35313
  classes == null ? void 0 : classes.labelRow
35011
35314
  ),
35315
+ style: mergedStyles.labelRow,
35012
35316
  "data-slot": "label-row",
35013
35317
  children: [
35014
35318
  graph.getSlotsFor("label", "left").render((slots) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-1", children: slots.map(
35015
- (slot) => renderHelperSlot("label", slot, classes)
35319
+ (slot) => renderHelperSlot("label", slot, classes, mergedStyles)
35016
35320
  ) })),
35017
35321
  label && /* @__PURE__ */ jsxRuntime.jsx(
35018
35322
  FieldLabel,
@@ -35022,6 +35326,7 @@ function InputField(props) {
35022
35326
  "text-sm font-medium text-foreground",
35023
35327
  classes == null ? void 0 : classes.label
35024
35328
  ),
35329
+ style: mergedStyles.label,
35025
35330
  children: /* @__PURE__ */ jsxRuntime.jsxs(FieldTitle, { children: [
35026
35331
  label,
35027
35332
  " ",
@@ -35032,6 +35337,7 @@ function InputField(props) {
35032
35337
  "text-destructive",
35033
35338
  classes == null ? void 0 : classes.required
35034
35339
  ),
35340
+ style: mergedStyles.required,
35035
35341
  children: "*"
35036
35342
  }
35037
35343
  ) : ""
@@ -35039,14 +35345,14 @@ function InputField(props) {
35039
35345
  }
35040
35346
  ),
35041
35347
  graph.getSlotsFor("label", "right").render((slots) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-1", children: slots.map(
35042
- (slot) => renderHelperSlot("label", slot, classes)
35348
+ (slot) => renderHelperSlot("label", slot, classes, mergedStyles)
35043
35349
  ) }))
35044
35350
  ]
35045
35351
  }
35046
35352
  ),
35047
35353
  graph.getSlotsFor("label", "below").render(
35048
35354
  (slots) => slots.map(
35049
- (slot) => renderHelperSlot("label", slot, classes)
35355
+ (slot) => renderHelperSlot("label", slot, classes, mergedStyles)
35050
35356
  )
35051
35357
  )
35052
35358
  ] });
@@ -35060,14 +35366,14 @@ function InputField(props) {
35060
35366
  hasStackedLabelBlock && hasLabelRowContent && "mt-0.5",
35061
35367
  classes == null ? void 0 : classes.group
35062
35368
  );
35063
- const Element = contain ? "div" : React66__namespace.Fragment;
35369
+ const Element = contain ? "div" : React67__namespace.Fragment;
35064
35370
  const attrs = (a3 = "l") => contain ? a3 === "l" ? { className: "p-4 border-b border-input" } : { className: "px-4 pt-2 pb-4" } : {};
35065
35371
  return /* @__PURE__ */ jsxRuntime.jsx(
35066
35372
  Field,
35067
35373
  {
35068
35374
  className: rootClassName,
35069
35375
  ref,
35070
- style,
35376
+ style: { ...mergedStyles.root, ...style },
35071
35377
  "data-variant": String(variant),
35072
35378
  "data-label-placement": lp != null ? lp : void 0,
35073
35379
  "data-sublabel-placement": sp != null ? sp : void 0,
@@ -35079,7 +35385,7 @@ function InputField(props) {
35079
35385
  "data-fullwidth": layout.fullWidth ? "true" : "false",
35080
35386
  children: isInline ? (
35081
35387
  // INLINE MODE: label + control on the same row
35082
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: inlineRowClassName, "data-slot": "inline-row", children: inlineLabelSide === "right" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
35388
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: inlineRowClassName, style: mergedStyles.inlineRow, "data-slot": "inline-row", children: inlineLabelSide === "right" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
35083
35389
  inlineInputColumn,
35084
35390
  inlineLabelColumn
35085
35391
  ] }) : inlineLabelSide === "hidden" ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: inlineInputColumn }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -35095,7 +35401,8 @@ function InputField(props) {
35095
35401
  (slot) => renderHelperSlot(
35096
35402
  "label",
35097
35403
  slot,
35098
- classes
35404
+ classes,
35405
+ mergedStyles
35099
35406
  )
35100
35407
  )
35101
35408
  ),
@@ -35106,13 +35413,15 @@ function InputField(props) {
35106
35413
  "flex items-baseline justify-between gap-1",
35107
35414
  classes == null ? void 0 : classes.labelRow
35108
35415
  ),
35416
+ style: mergedStyles.labelRow,
35109
35417
  "data-slot": "label-row",
35110
35418
  children: [
35111
35419
  graph.getSlotsFor("label", "left").render((slots) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-1", children: slots.map(
35112
35420
  (slot) => renderHelperSlot(
35113
35421
  "label",
35114
35422
  slot,
35115
- classes
35423
+ classes,
35424
+ mergedStyles
35116
35425
  )
35117
35426
  ) })),
35118
35427
  label && /* @__PURE__ */ jsxRuntime.jsx(
@@ -35123,6 +35432,7 @@ function InputField(props) {
35123
35432
  "text-sm font-medium text-foreground",
35124
35433
  classes == null ? void 0 : classes.label
35125
35434
  ),
35435
+ style: mergedStyles.label,
35126
35436
  children: /* @__PURE__ */ jsxRuntime.jsxs(FieldTitle, { children: [
35127
35437
  label,
35128
35438
  " ",
@@ -35133,6 +35443,7 @@ function InputField(props) {
35133
35443
  "text-destructive",
35134
35444
  classes == null ? void 0 : classes.required
35135
35445
  ),
35446
+ style: mergedStyles.required,
35136
35447
  children: "*"
35137
35448
  }
35138
35449
  ) : ""
@@ -35143,7 +35454,8 @@ function InputField(props) {
35143
35454
  (slot) => renderHelperSlot(
35144
35455
  "label",
35145
35456
  slot,
35146
- classes
35457
+ classes,
35458
+ mergedStyles
35147
35459
  )
35148
35460
  ) }))
35149
35461
  ]
@@ -35154,7 +35466,8 @@ function InputField(props) {
35154
35466
  (slot) => renderHelperSlot(
35155
35467
  "label",
35156
35468
  slot,
35157
- classes
35469
+ classes,
35470
+ mergedStyles
35158
35471
  )
35159
35472
  )
35160
35473
  )
@@ -35162,13 +35475,14 @@ function InputField(props) {
35162
35475
  /* @__PURE__ */ jsxRuntime.jsxs(Element, { ...attrs("i"), children: [
35163
35476
  graph.getSlotsFor("input", "above").render(
35164
35477
  (slots) => slots.map(
35165
- (slot) => renderHelperSlot("input", slot, classes)
35478
+ (slot) => renderHelperSlot("input", slot, classes, mergedStyles)
35166
35479
  )
35167
35480
  ),
35168
- /* @__PURE__ */ jsxRuntime.jsx(FieldGroup, { className: stackedGroupClassName, children: /* @__PURE__ */ jsxRuntime.jsx(
35481
+ /* @__PURE__ */ jsxRuntime.jsx(FieldGroup, { className: stackedGroupClassName, style: mergedStyles.group, children: /* @__PURE__ */ jsxRuntime.jsx(
35169
35482
  FieldContent,
35170
35483
  {
35171
35484
  className: cn("w-full", classes == null ? void 0 : classes.content),
35485
+ style: mergedStyles.content,
35172
35486
  children: /* @__PURE__ */ jsxRuntime.jsx(
35173
35487
  Variant,
35174
35488
  {
@@ -35183,14 +35497,15 @@ function InputField(props) {
35183
35497
  readOnly: readOnlyProp,
35184
35498
  size: effectiveSize,
35185
35499
  density: effectiveDensity,
35186
- className: mergedVariantClass
35500
+ className: mergedVariantClass,
35501
+ style: { ...mergedStyles.variant, ...rest.style }
35187
35502
  }
35188
35503
  )
35189
35504
  }
35190
35505
  ) }),
35191
35506
  graph.getSlotsFor("input", "below").render(
35192
35507
  (slots) => slots.map(
35193
- (slot) => renderHelperSlot("input", slot, classes)
35508
+ (slot) => renderHelperSlot("input", slot, classes, mergedStyles)
35194
35509
  )
35195
35510
  )
35196
35511
  ] })
@@ -35499,7 +35814,9 @@ exports.Input = Input;
35499
35814
  exports.InputField = InputField;
35500
35815
  exports.InputMask = InputMask;
35501
35816
  exports.InputNumber = InputNumber;
35817
+ exports.PaletteThemeProvider = PaletteThemeProvider;
35502
35818
  exports.Textarea = Textarea;
35819
+ exports.ThemeProvider = ThemeProvider;
35503
35820
  exports.createAxiosAdapter = createAxiosAdapter;
35504
35821
  exports.createInertiaAdapter = createInertiaAdapter;
35505
35822
  exports.getAdapter = getAdapter;
@@ -35523,5 +35840,6 @@ exports.useCore = useCore;
35523
35840
  exports.useCoreContext = useCoreContext;
35524
35841
  exports.useField = useField;
35525
35842
  exports.useOptionalField = useOptionalField;
35843
+ exports.usePaletteTheme = usePaletteTheme;
35526
35844
  //# sourceMappingURL=index.js.map
35527
35845
  //# sourceMappingURL=index.js.map