@proyecto-viviana/solid-stately 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/autocomplete/createAutocompleteState.d.ts +45 -0
  2. package/dist/autocomplete/index.d.ts +1 -0
  3. package/dist/calendar/createCalendarState.d.ts +129 -0
  4. package/dist/calendar/createDateFieldState.d.ts +109 -0
  5. package/dist/calendar/createRangeCalendarState.d.ts +145 -0
  6. package/dist/calendar/createTimeFieldState.d.ts +94 -0
  7. package/dist/calendar/index.d.ts +6 -0
  8. package/dist/checkbox/createCheckboxGroupState.d.ts +70 -0
  9. package/dist/checkbox/index.d.ts +1 -0
  10. package/dist/collections/ListCollection.d.ts +36 -0
  11. package/dist/collections/createListState.d.ts +78 -0
  12. package/dist/collections/createMenuState.d.ts +49 -0
  13. package/dist/collections/createSelectionState.d.ts +75 -0
  14. package/dist/collections/index.d.ts +5 -0
  15. package/dist/collections/types.d.ts +146 -0
  16. package/dist/color/Color.d.ts +27 -0
  17. package/dist/color/createColorAreaState.d.ts +75 -0
  18. package/dist/color/createColorFieldState.d.ts +54 -0
  19. package/dist/color/createColorSliderState.d.ts +66 -0
  20. package/dist/color/createColorWheelState.d.ts +50 -0
  21. package/dist/color/index.d.ts +9 -0
  22. package/dist/color/types.d.ts +105 -0
  23. package/dist/combobox/createComboBoxState.d.ts +124 -0
  24. package/dist/combobox/index.d.ts +4 -0
  25. package/dist/disclosure/createDisclosureState.d.ts +63 -0
  26. package/dist/disclosure/index.d.ts +1 -0
  27. package/dist/dnd/createDragState.d.ts +58 -0
  28. package/dist/dnd/createDraggableCollectionState.d.ts +56 -0
  29. package/dist/dnd/createDropState.d.ts +60 -0
  30. package/dist/dnd/createDroppableCollectionState.d.ts +77 -0
  31. package/dist/dnd/index.d.ts +10 -0
  32. package/dist/dnd/types.d.ts +263 -0
  33. package/dist/form/createFormValidationState.d.ts +99 -0
  34. package/dist/form/index.d.ts +1 -0
  35. package/dist/grid/createGridState.d.ts +11 -0
  36. package/dist/grid/index.d.ts +6 -0
  37. package/dist/grid/types.d.ts +155 -0
  38. package/dist/index.d.ts +25 -3363
  39. package/dist/index.js +505 -227
  40. package/dist/index.js.map +7 -0
  41. package/dist/numberfield/createNumberFieldState.d.ts +64 -0
  42. package/dist/numberfield/index.d.ts +1 -0
  43. package/dist/overlays/createOverlayTriggerState.d.ts +31 -0
  44. package/dist/overlays/index.d.ts +1 -0
  45. package/dist/radio/createRadioGroupState.d.ts +76 -0
  46. package/dist/radio/index.d.ts +1 -0
  47. package/dist/searchfield/createSearchFieldState.d.ts +24 -0
  48. package/dist/searchfield/index.d.ts +2 -0
  49. package/dist/select/createSelectState.d.ts +72 -0
  50. package/dist/select/index.d.ts +1 -0
  51. package/dist/slider/createSliderState.d.ts +71 -0
  52. package/dist/slider/index.d.ts +2 -0
  53. package/dist/ssr/index.d.ts +27 -0
  54. package/dist/table/TableCollection.d.ts +51 -0
  55. package/dist/table/createTableState.d.ts +11 -0
  56. package/dist/table/index.d.ts +7 -0
  57. package/dist/table/types.d.ts +138 -0
  58. package/dist/tabs/createTabListState.d.ts +67 -0
  59. package/dist/tabs/index.d.ts +1 -0
  60. package/dist/textfield/createTextFieldState.d.ts +29 -0
  61. package/dist/textfield/index.d.ts +1 -0
  62. package/dist/toast/createToastState.d.ts +117 -0
  63. package/dist/toast/index.d.ts +1 -0
  64. package/dist/toggle/createToggleState.d.ts +33 -0
  65. package/dist/toggle/index.d.ts +1 -0
  66. package/dist/tooltip/createTooltipTriggerState.d.ts +38 -0
  67. package/dist/tooltip/index.d.ts +1 -0
  68. package/dist/tree/TreeCollection.d.ts +39 -0
  69. package/dist/tree/createTreeState.d.ts +13 -0
  70. package/dist/tree/index.d.ts +6 -0
  71. package/dist/tree/types.d.ts +156 -0
  72. package/dist/utils/index.d.ts +1 -0
  73. package/dist/utils/reactivity.d.ts +27 -0
  74. package/package.json +3 -3
  75. package/dist/index.jsx +0 -6407
package/dist/index.js CHANGED
@@ -1,9 +1,5 @@
1
- import { createContext, createSignal, createUniqueId, untrack, createMemo, createEffect, onCleanup, on, useContext } from 'solid-js';
2
- import { isServer as isServer$1 } from 'solid-js/web';
3
- import { getLocalTimeZone, startOfMonth, endOfMonth, DateFormatter, today, getDayOfWeek, toCalendarDate as toCalendarDate$1, toCalendarDateTime, isSameDay, isSameMonth, startOfWeek, getWeeksInMonth } from '@internationalized/date';
4
- export { CalendarDate as CalendarDateClass, CalendarDateTime as CalendarDateTimeClass, DateFormatter, Time as TimeClass, ZonedDateTime as ZonedDateTimeClass, endOfMonth, endOfWeek, endOfYear, getDayOfWeek, getLocalTimeZone, getWeeksInMonth, isSameDay, isSameMonth, isSameYear, isToday, isWeekend, maxDate, minDate, now, parseAbsolute, parseAbsoluteToLocal, parseDate, parseDateTime, parseTime, parseZonedDateTime, startOfMonth, startOfWeek, startOfYear, toCalendarDate, toCalendarDateTime, toTime, toZoned, today } from '@internationalized/date';
5
-
6
1
  // src/toggle/createToggleState.ts
2
+ import { createSignal } from "solid-js";
7
3
 
8
4
  // src/utils/reactivity.ts
9
5
  function access(value) {
@@ -48,15 +44,18 @@ function createToggleState(props = {}) {
48
44
  toggle
49
45
  };
50
46
  }
47
+
48
+ // src/autocomplete/createAutocompleteState.ts
49
+ import { createSignal as createSignal2 } from "solid-js";
51
50
  function createAutocompleteState(props = {}) {
52
51
  const {
53
52
  inputValue: controlledInputValue,
54
53
  defaultInputValue = "",
55
54
  onInputChange
56
55
  } = props;
57
- const [focusedNodeId, setFocusedNodeId] = createSignal(null);
56
+ const [focusedNodeId, setFocusedNodeId] = createSignal2(null);
58
57
  const isControlled = controlledInputValue !== void 0;
59
- const [uncontrolledValue, setUncontrolledValue] = createSignal(defaultInputValue);
58
+ const [uncontrolledValue, setUncontrolledValue] = createSignal2(defaultInputValue);
60
59
  const inputValue = () => {
61
60
  return isControlled ? controlledInputValue : uncontrolledValue();
62
61
  };
@@ -73,11 +72,14 @@ function createAutocompleteState(props = {}) {
73
72
  setFocusedNodeId
74
73
  };
75
74
  }
75
+
76
+ // src/textfield/createTextFieldState.ts
77
+ import { createSignal as createSignal3 } from "solid-js";
76
78
  function createTextFieldState(props = {}) {
77
79
  const getProps = () => access(props);
78
80
  const initialProps = getProps();
79
81
  const initialValue = initialProps.value ?? initialProps.defaultValue ?? "";
80
- const [internalValue, setInternalValue] = createSignal(initialValue);
82
+ const [internalValue, setInternalValue] = createSignal3(initialValue);
81
83
  const isControlled = () => getProps().value !== void 0;
82
84
  const value = () => {
83
85
  const p = getProps();
@@ -95,11 +97,14 @@ function createTextFieldState(props = {}) {
95
97
  setValue
96
98
  };
97
99
  }
100
+
101
+ // src/checkbox/createCheckboxGroupState.ts
102
+ import { createSignal as createSignal4 } from "solid-js";
98
103
  function createCheckboxGroupState(props = {}) {
99
104
  const getProps = () => access(props);
100
105
  const initialProps = getProps();
101
106
  const initialValue = initialProps.value ?? initialProps.defaultValue ?? [];
102
- const [internalValue, setInternalValue] = createSignal(initialValue);
107
+ const [internalValue, setInternalValue] = createSignal4(initialValue);
103
108
  const isControlled = () => getProps().value !== void 0;
104
109
  const value = () => {
105
110
  const p = getProps();
@@ -177,7 +182,14 @@ function createCheckboxGroupState(props = {}) {
177
182
  toggleValue
178
183
  };
179
184
  }
180
- var isServer = isServer$1;
185
+
186
+ // src/radio/createRadioGroupState.ts
187
+ import { createSignal as createSignal5, untrack } from "solid-js";
188
+
189
+ // src/ssr/index.ts
190
+ import { createUniqueId } from "solid-js";
191
+ import { isServer as _isServer } from "solid-js/web";
192
+ var isServer = _isServer;
181
193
  function createIsSSR() {
182
194
  return isServer;
183
195
  }
@@ -195,11 +207,11 @@ function createRadioGroupState(props = {}) {
195
207
  const getProps = () => access(props);
196
208
  const initialProps = untrack(() => getProps());
197
209
  const name = initialProps.name || `radio-group-${createId()}`;
198
- const [internalValue, setInternalValue] = createSignal(
210
+ const [internalValue, setInternalValue] = createSignal5(
199
211
  initialProps.defaultValue ?? null
200
212
  );
201
- const [lastFocusedValue, setLastFocusedValueInternal] = createSignal(null);
202
- const [syncVersion, setSyncVersion] = createSignal(0);
213
+ const [lastFocusedValue, setLastFocusedValueInternal] = createSignal5(null);
214
+ const [syncVersion, setSyncVersion] = createSignal5(0);
203
215
  const isControlled = () => getProps().value !== void 0;
204
216
  const selectedValue = () => {
205
217
  const p = getProps();
@@ -250,9 +262,12 @@ function createRadioGroupState(props = {}) {
250
262
  radioGroupSyncVersion.set(state, syncVersion);
251
263
  return state;
252
264
  }
265
+
266
+ // src/overlays/createOverlayTriggerState.ts
267
+ import { createSignal as createSignal6 } from "solid-js";
253
268
  function createOverlayTriggerState(props = {}) {
254
269
  const propsAccessor = () => access(props);
255
- const [internalOpen, setInternalOpen] = createSignal(propsAccessor().defaultOpen ?? false);
270
+ const [internalOpen, setInternalOpen] = createSignal6(propsAccessor().defaultOpen ?? false);
256
271
  const isOpen = () => {
257
272
  const p = propsAccessor();
258
273
  return p.isOpen !== void 0 ? p.isOpen : internalOpen();
@@ -382,13 +397,16 @@ function createListCollection(items, options = {}) {
382
397
  }));
383
398
  return new ListCollection(nodes);
384
399
  }
400
+
401
+ // src/collections/createSelectionState.ts
402
+ import { createSignal as createSignal7 } from "solid-js";
385
403
  function createSelectionState(props = {}) {
386
404
  const getProps = () => access(props);
387
- const [internalBehavior, setInternalBehavior] = createSignal("toggle");
388
- const [internalSelectedKeys, setInternalSelectedKeys] = createSignal(
405
+ const [internalBehavior, setInternalBehavior] = createSignal7("toggle");
406
+ const [internalSelectedKeys, setInternalSelectedKeys] = createSignal7(
389
407
  getInitialSelection(getProps().defaultSelectedKeys)
390
408
  );
391
- const [anchorKey, setAnchorKey] = createSignal(null);
409
+ const [anchorKey, setAnchorKey] = createSignal7(null);
392
410
  const selectionMode = () => getProps().selectionMode ?? "none";
393
411
  const selectionBehavior = () => {
394
412
  return getProps().selectionBehavior ?? internalBehavior();
@@ -569,6 +587,9 @@ function normalizeSelection(keys) {
569
587
  if (keys === "all") return "all";
570
588
  return new Set(keys);
571
589
  }
590
+
591
+ // src/collections/createListState.ts
592
+ import { createSignal as createSignal8 } from "solid-js";
572
593
  function createListState(props) {
573
594
  const getProps = () => access(props);
574
595
  const collection = () => {
@@ -635,9 +656,9 @@ function createListState(props) {
635
656
  return getProps().allowDuplicateSelectionEvents;
636
657
  }
637
658
  });
638
- const [isFocused, setIsFocused] = createSignal(false);
639
- const [focusedKey, setFocusedKeyInternal] = createSignal(null);
640
- const [childFocusStrategy, setChildFocusStrategy] = createSignal(null);
659
+ const [isFocused, setIsFocused] = createSignal8(false);
660
+ const [focusedKey, setFocusedKeyInternal] = createSignal8(null);
661
+ const [childFocusStrategy, setChildFocusStrategy] = createSignal8(null);
641
662
  const setFocusedKey = (key, childStrategy) => {
642
663
  setFocusedKeyInternal(key);
643
664
  setChildFocusStrategy(childStrategy ?? null);
@@ -761,6 +782,9 @@ function createMenuState(props) {
761
782
  close
762
783
  };
763
784
  }
785
+
786
+ // src/select/createSelectState.ts
787
+ import { createSignal as createSignal9 } from "solid-js";
764
788
  function createSelectState(props) {
765
789
  const getProps = () => access(props);
766
790
  const overlayState = createOverlayTriggerState({
@@ -775,7 +799,7 @@ function createSelectState(props) {
775
799
  }
776
800
  });
777
801
  const isControlled = () => getProps().selectedKey !== void 0;
778
- const [internalSelectedKey, setInternalSelectedKey] = createSignal(
802
+ const [internalSelectedKey, setInternalSelectedKey] = createSignal9(
779
803
  getProps().defaultSelectedKey ?? null
780
804
  );
781
805
  const selectedKey = () => {
@@ -847,6 +871,9 @@ function createSelectState(props) {
847
871
  }
848
872
  };
849
873
  }
874
+
875
+ // src/combobox/createComboBoxState.ts
876
+ import { createSignal as createSignal10, createMemo, createEffect } from "solid-js";
850
877
  var defaultContainsFilter = (textValue, inputValue) => {
851
878
  return textValue.toLowerCase().includes(inputValue.toLowerCase());
852
879
  };
@@ -856,15 +883,15 @@ function createComboBoxState(props) {
856
883
  const allowsEmptyCollection = () => getProps().allowsEmptyCollection ?? false;
857
884
  const allowsCustomValue = () => getProps().allowsCustomValue ?? false;
858
885
  const shouldCloseOnBlur = () => getProps().shouldCloseOnBlur ?? true;
859
- const [focusStrategy, setFocusStrategy] = createSignal(null);
860
- const [showAllItems, setShowAllItems] = createSignal(false);
886
+ const [focusStrategy, setFocusStrategy] = createSignal10(null);
887
+ const [showAllItems, setShowAllItems] = createSignal10(false);
861
888
  let menuOpenTrigger = "focus";
862
889
  const isSelectionControlled = () => getProps().selectedKey !== void 0;
863
- const [internalSelectedKey, setInternalSelectedKey] = createSignal(
890
+ const [internalSelectedKey, setInternalSelectedKey] = createSignal10(
864
891
  getProps().defaultSelectedKey ?? null
865
892
  );
866
893
  const isInputControlled = () => getProps().inputValue !== void 0;
867
- const [internalInputValue, setInternalInputValue] = createSignal(
894
+ const [internalInputValue, setInternalInputValue] = createSignal10(
868
895
  getProps().defaultInputValue ?? ""
869
896
  );
870
897
  let inputInitialized = false;
@@ -877,7 +904,7 @@ function createComboBoxState(props) {
877
904
  }
878
905
  getProps().onInputChange?.(value);
879
906
  };
880
- const [lastValue, setLastValue] = createSignal(inputValue());
907
+ const [lastValue, setLastValue] = createSignal10(inputValue());
881
908
  const selectedKey = () => {
882
909
  return isSelectionControlled() ? getProps().selectedKey ?? null : internalSelectedKey();
883
910
  };
@@ -1046,10 +1073,11 @@ function createComboBoxState(props) {
1046
1073
  commitSelection();
1047
1074
  }
1048
1075
  };
1049
- const [isFocused, setIsFocused] = createSignal(false);
1076
+ const [isFocused, setIsFocused] = createSignal10(false);
1077
+ let valueOnFocus = "";
1050
1078
  const setFocused = (focused) => {
1051
1079
  if (focused) {
1052
- inputValue();
1080
+ valueOnFocus = inputValue();
1053
1081
  if (menuTrigger() === "focus" && !getProps().isReadOnly) {
1054
1082
  open(null, "focus");
1055
1083
  }
@@ -1258,6 +1286,9 @@ function createFilteredCollection(items, original) {
1258
1286
  }
1259
1287
  };
1260
1288
  }
1289
+
1290
+ // src/tabs/createTabListState.ts
1291
+ import { createSignal as createSignal11 } from "solid-js";
1261
1292
  function createTabListState(props) {
1262
1293
  const getProps = () => access(props);
1263
1294
  const collection = () => {
@@ -1318,7 +1349,7 @@ function createTabListState(props) {
1318
1349
  }
1319
1350
  return findFirstNonDisabledKey();
1320
1351
  };
1321
- const [selectedKeyInternal, setSelectedKeyInternal] = createSignal(
1352
+ const [selectedKeyInternal, setSelectedKeyInternal] = createSignal11(
1322
1353
  getInitialSelectedKey()
1323
1354
  );
1324
1355
  const selectedKey = () => {
@@ -1344,9 +1375,9 @@ function createTabListState(props) {
1344
1375
  const isDisabled = () => getProps().isDisabled ?? false;
1345
1376
  const keyboardActivation = () => getProps().keyboardActivation ?? "automatic";
1346
1377
  const orientation = () => getProps().orientation ?? "horizontal";
1347
- const [isFocused, setIsFocused] = createSignal(false);
1348
- const [focusedKey, setFocusedKeyInternal] = createSignal(null);
1349
- const [childFocusStrategy, setChildFocusStrategy] = createSignal(null);
1378
+ const [isFocused, setIsFocused] = createSignal11(false);
1379
+ const [focusedKey, setFocusedKeyInternal] = createSignal11(null);
1380
+ const [childFocusStrategy, setChildFocusStrategy] = createSignal11(null);
1350
1381
  const setFocusedKey = (key, childStrategy) => {
1351
1382
  setFocusedKeyInternal(key);
1352
1383
  setChildFocusStrategy(childStrategy ?? null);
@@ -1371,6 +1402,9 @@ function createTabListState(props) {
1371
1402
  childFocusStrategy
1372
1403
  };
1373
1404
  }
1405
+
1406
+ // src/numberfield/createNumberFieldState.ts
1407
+ import { createSignal as createSignal12, createMemo as createMemo2 } from "solid-js";
1374
1408
  function handleDecimalOperation(operator, value1, value2) {
1375
1409
  const getDecimals = (n) => {
1376
1410
  const str = String(n);
@@ -1400,12 +1434,12 @@ function createNumberFieldState(props) {
1400
1434
  const getProps = () => access(props);
1401
1435
  const locale = () => getProps().locale ?? "en-US";
1402
1436
  const formatOptions = () => getProps().formatOptions ?? {};
1403
- const formatter = createMemo(() => {
1437
+ const formatter = createMemo2(() => {
1404
1438
  return new Intl.NumberFormat(locale(), formatOptions());
1405
1439
  });
1406
1440
  const parseNumber = (value) => {
1407
1441
  if (!value || value === "" || value === "-") return NaN;
1408
- formatOptions();
1442
+ const opts = formatOptions();
1409
1443
  const testNumber = formatter().format(1.1);
1410
1444
  const decimalSeparator = testNumber.charAt(1);
1411
1445
  let normalized = value;
@@ -1420,14 +1454,14 @@ function createNumberFieldState(props) {
1420
1454
  if (isNaN(value)) return "";
1421
1455
  return formatter().format(value);
1422
1456
  };
1423
- const step = createMemo(() => {
1457
+ const step = createMemo2(() => {
1424
1458
  const p = getProps();
1425
1459
  if (p.step != null) return p.step;
1426
1460
  if (p.formatOptions?.style === "percent") return 0.01;
1427
1461
  return 1;
1428
1462
  });
1429
- const [inputValue, setInputValueInternal] = createSignal("");
1430
- const [numberValue, setNumberValue] = createSignal(NaN);
1463
+ const [inputValue, setInputValueInternal] = createSignal12("");
1464
+ const [numberValue, setNumberValue] = createSignal12(NaN);
1431
1465
  const initValue = () => {
1432
1466
  const p = getProps();
1433
1467
  const initial = p.value ?? p.defaultValue;
@@ -1443,7 +1477,7 @@ function createNumberFieldState(props) {
1443
1477
  initValue();
1444
1478
  }
1445
1479
  };
1446
- const actualNumberValue = createMemo(() => {
1480
+ const actualNumberValue = createMemo2(() => {
1447
1481
  ensureInitialized();
1448
1482
  const p = getProps();
1449
1483
  if (p.value !== void 0) {
@@ -1453,7 +1487,7 @@ function createNumberFieldState(props) {
1453
1487
  });
1454
1488
  const validate = (value) => {
1455
1489
  if (value === "" || value === "-") return true;
1456
- formatOptions();
1490
+ const opts = formatOptions();
1457
1491
  const testNumber = formatter().format(1.1);
1458
1492
  const decimalSeparator = testNumber.charAt(1);
1459
1493
  const pattern = new RegExp(
@@ -1489,7 +1523,7 @@ function createNumberFieldState(props) {
1489
1523
  p.onChange?.(parsed);
1490
1524
  }
1491
1525
  };
1492
- const canIncrement = createMemo(() => {
1526
+ const canIncrement = createMemo2(() => {
1493
1527
  ensureInitialized();
1494
1528
  const p = getProps();
1495
1529
  if (p.isDisabled || p.isReadOnly) return false;
@@ -1498,7 +1532,7 @@ function createNumberFieldState(props) {
1498
1532
  if (p.maxValue == null) return true;
1499
1533
  return handleDecimalOperation("+", current, step()) <= p.maxValue;
1500
1534
  });
1501
- const canDecrement = createMemo(() => {
1535
+ const canDecrement = createMemo2(() => {
1502
1536
  ensureInitialized();
1503
1537
  const p = getProps();
1504
1538
  if (p.isDisabled || p.isReadOnly) return false;
@@ -1581,13 +1615,16 @@ function createNumberFieldState(props) {
1581
1615
  decrementToMin
1582
1616
  };
1583
1617
  }
1618
+
1619
+ // src/searchfield/createSearchFieldState.ts
1620
+ import { createSignal as createSignal13, createMemo as createMemo3 } from "solid-js";
1584
1621
  function createSearchFieldState(props) {
1585
1622
  const getProps = () => access(props);
1586
1623
  const isControlled = () => getProps().value !== void 0;
1587
- const [internalValue, setInternalValue] = createSignal(
1624
+ const [internalValue, setInternalValue] = createSignal13(
1588
1625
  getProps().defaultValue ?? ""
1589
1626
  );
1590
- const value = createMemo(() => {
1627
+ const value = createMemo3(() => {
1591
1628
  const p = getProps();
1592
1629
  return isControlled() ? p.value ?? "" : internalValue();
1593
1630
  });
@@ -1603,6 +1640,9 @@ function createSearchFieldState(props) {
1603
1640
  setValue
1604
1641
  };
1605
1642
  }
1643
+
1644
+ // src/slider/createSliderState.ts
1645
+ import { createSignal as createSignal14, createMemo as createMemo4 } from "solid-js";
1606
1646
  var DEFAULT_MIN = 0;
1607
1647
  var DEFAULT_MAX = 100;
1608
1648
  var DEFAULT_STEP = 1;
@@ -1624,20 +1664,20 @@ function createSliderState(props) {
1624
1664
  const isDisabled = getProps().isDisabled ?? false;
1625
1665
  const pageStep = Math.max(step, snapToStep2((maxValue - minValue) / 10, 0, maxValue - minValue, step));
1626
1666
  const isControlled = () => getProps().value !== void 0;
1627
- const [internalValue, setInternalValue] = createSignal(
1667
+ const [internalValue, setInternalValue] = createSignal14(
1628
1668
  snapToStep2(getProps().defaultValue ?? minValue, minValue, maxValue, step)
1629
1669
  );
1630
- const [isDragging, setIsDragging] = createSignal(false);
1631
- const [isFocused, setIsFocused] = createSignal(false);
1632
- const value = createMemo(() => {
1670
+ const [isDragging, setIsDragging] = createSignal14(false);
1671
+ const [isFocused, setIsFocused] = createSignal14(false);
1672
+ const value = createMemo4(() => {
1633
1673
  const p = getProps();
1634
1674
  const rawValue = isControlled() ? p.value ?? minValue : internalValue();
1635
1675
  return snapToStep2(rawValue, minValue, maxValue, step);
1636
1676
  });
1637
- const getValuePercent = createMemo(() => {
1677
+ const getValuePercent = createMemo4(() => {
1638
1678
  return (value() - minValue) / (maxValue - minValue);
1639
1679
  });
1640
- const getFormattedValue = createMemo(() => {
1680
+ const getFormattedValue = createMemo4(() => {
1641
1681
  const p = getProps();
1642
1682
  const formatter = new Intl.NumberFormat(p.locale, p.formatOptions);
1643
1683
  return formatter.format(value());
@@ -1694,6 +1734,9 @@ function createSliderState(props) {
1694
1734
  isDisabled
1695
1735
  };
1696
1736
  }
1737
+
1738
+ // src/tooltip/createTooltipTriggerState.ts
1739
+ import { createSignal as createSignal15, onCleanup } from "solid-js";
1697
1740
  var TOOLTIP_DELAY = 1500;
1698
1741
  var TOOLTIP_COOLDOWN = 500;
1699
1742
  var tooltips = {};
@@ -1720,7 +1763,7 @@ function createTooltipTriggerState(props = {}) {
1720
1763
  const overlayState = createOverlayTriggerState(props);
1721
1764
  const id = `tooltip-${++tooltipId}`;
1722
1765
  let closeTimeout = null;
1723
- const [closeCallback, setCloseCallback] = createSignal(() => overlayState.close());
1766
+ const [closeCallback, setCloseCallback] = createSignal15(() => overlayState.close());
1724
1767
  const ensureTooltipEntry = () => {
1725
1768
  tooltips[id] = hideTooltip;
1726
1769
  };
@@ -1813,6 +1856,9 @@ function createTooltipTriggerState(props = {}) {
1813
1856
  close: hideTooltip
1814
1857
  };
1815
1858
  }
1859
+
1860
+ // src/toast/createToastState.ts
1861
+ import { createSignal as createSignal16, onCleanup as onCleanup2 } from "solid-js";
1816
1862
  var Timer = class {
1817
1863
  timerId = null;
1818
1864
  startTime = 0;
@@ -1974,11 +2020,11 @@ var ToastQueue = class {
1974
2020
  }
1975
2021
  };
1976
2022
  function createToastState(props) {
1977
- const [visibleToasts, setVisibleToasts] = createSignal([]);
2023
+ const [visibleToasts, setVisibleToasts] = createSignal16([]);
1978
2024
  const unsubscribe = props.queue.subscribe((toasts) => {
1979
2025
  setVisibleToasts(toasts);
1980
2026
  });
1981
- onCleanup(() => {
2027
+ onCleanup2(() => {
1982
2028
  unsubscribe();
1983
2029
  });
1984
2030
  return {
@@ -1994,9 +2040,12 @@ function createToastQueue(options) {
1994
2040
  const state = createToastState({ queue });
1995
2041
  return { ...state, queue };
1996
2042
  }
2043
+
2044
+ // src/disclosure/createDisclosureState.ts
2045
+ import { createSignal as createSignal17, createEffect as createEffect2 } from "solid-js";
1997
2046
  function createDisclosureState(props = {}) {
1998
2047
  const propsAccessor = () => access(props);
1999
- const [internalExpanded, setInternalExpanded] = createSignal(
2048
+ const [internalExpanded, setInternalExpanded] = createSignal17(
2000
2049
  propsAccessor().defaultExpanded ?? false
2001
2050
  );
2002
2051
  const isExpanded = () => {
@@ -2023,7 +2072,7 @@ function createDisclosureState(props = {}) {
2023
2072
  }
2024
2073
  function createDisclosureGroupState(props = {}) {
2025
2074
  const propsAccessor = () => access(props);
2026
- const [internalKeys, setInternalKeys] = createSignal(
2075
+ const [internalKeys, setInternalKeys] = createSignal17(
2027
2076
  new Set(propsAccessor().defaultExpandedKeys ?? [])
2028
2077
  );
2029
2078
  const expandedKeys = () => {
@@ -2037,7 +2086,7 @@ function createDisclosureGroupState(props = {}) {
2037
2086
  }
2038
2087
  p.onExpandedChange?.(keys);
2039
2088
  };
2040
- createEffect(() => {
2089
+ createEffect2(() => {
2041
2090
  const p = propsAccessor();
2042
2091
  const allowsMultiple = p.allowsMultipleExpanded ?? false;
2043
2092
  const keys = expandedKeys();
@@ -2083,6 +2132,22 @@ function createDisclosureGroupState(props = {}) {
2083
2132
  isExpanded
2084
2133
  };
2085
2134
  }
2135
+
2136
+ // src/calendar/createCalendarState.ts
2137
+ import { createSignal as createSignal18, createMemo as createMemo5 } from "solid-js";
2138
+ import {
2139
+ today,
2140
+ getLocalTimeZone,
2141
+ isSameDay,
2142
+ isSameMonth,
2143
+ startOfMonth,
2144
+ endOfMonth,
2145
+ startOfWeek,
2146
+ getWeeksInMonth,
2147
+ getDayOfWeek,
2148
+ DateFormatter,
2149
+ toCalendarDate as intlToCalendarDate
2150
+ } from "@internationalized/date";
2086
2151
  function createCalendarState(props = {}) {
2087
2152
  const timeZone = getLocalTimeZone();
2088
2153
  const locale = props.locale ?? "en-US";
@@ -2104,22 +2169,22 @@ function createCalendarState(props = {}) {
2104
2169
  }
2105
2170
  return today(timeZone);
2106
2171
  };
2107
- const [internalValue, setInternalValue] = createSignal(
2172
+ const [internalValue, setInternalValue] = createSignal18(
2108
2173
  props.defaultValue ?? null
2109
2174
  );
2110
- const [focusedDate, setFocusedDateInternal] = createSignal(
2175
+ const [focusedDate, setFocusedDateInternal] = createSignal18(
2111
2176
  getInitialFocusedDate()
2112
2177
  );
2113
- const [isFocused, setFocused] = createSignal(false);
2114
- const [isPaginating, setIsPaginating] = createSignal(false);
2115
- const value = createMemo(() => {
2178
+ const [isFocused, setFocused] = createSignal18(false);
2179
+ const [isPaginating, setIsPaginating] = createSignal18(false);
2180
+ const value = createMemo5(() => {
2116
2181
  const controlled = access(props.value);
2117
2182
  return controlled !== void 0 ? controlled : internalValue();
2118
2183
  });
2119
- const isDisabled = createMemo(() => access(props.isDisabled) ?? false);
2120
- const isReadOnly = createMemo(() => access(props.isReadOnly) ?? false);
2121
- const validationState = createMemo(() => access(props.validationState));
2122
- const visibleRange = createMemo(() => {
2184
+ const isDisabled = createMemo5(() => access(props.isDisabled) ?? false);
2185
+ const isReadOnly = createMemo5(() => access(props.isReadOnly) ?? false);
2186
+ const validationState = createMemo5(() => access(props.validationState));
2187
+ const visibleRange = createMemo5(() => {
2123
2188
  const focused = focusedDate();
2124
2189
  const start = startOfMonth(focused);
2125
2190
  let end = endOfMonth(focused);
@@ -2128,7 +2193,7 @@ function createCalendarState(props = {}) {
2128
2193
  }
2129
2194
  return { start, end };
2130
2195
  });
2131
- const weekDays = createMemo(() => {
2196
+ const weekDays = createMemo5(() => {
2132
2197
  const formatter = new DateFormatter(locale, { weekday: "short" });
2133
2198
  const startDay = props.firstDayOfWeek ?? 0;
2134
2199
  const days = [];
@@ -2141,7 +2206,7 @@ function createCalendarState(props = {}) {
2141
2206
  }
2142
2207
  return days;
2143
2208
  });
2144
- const title = createMemo(() => {
2209
+ const title = createMemo5(() => {
2145
2210
  const formatter = new DateFormatter(locale, {
2146
2211
  month: "long",
2147
2212
  year: "numeric"
@@ -2307,10 +2372,26 @@ function createCalendarState(props = {}) {
2307
2372
  };
2308
2373
  }
2309
2374
  function toCalendarDate(date) {
2310
- return toCalendarDate$1(date);
2375
+ return intlToCalendarDate(date);
2311
2376
  }
2377
+
2378
+ // src/calendar/createRangeCalendarState.ts
2379
+ import { createSignal as createSignal19, createMemo as createMemo6 } from "solid-js";
2380
+ import {
2381
+ today as today2,
2382
+ getLocalTimeZone as getLocalTimeZone2,
2383
+ isSameDay as isSameDay2,
2384
+ isSameMonth as isSameMonth2,
2385
+ startOfMonth as startOfMonth2,
2386
+ endOfMonth as endOfMonth2,
2387
+ startOfWeek as startOfWeek2,
2388
+ getWeeksInMonth as getWeeksInMonth2,
2389
+ getDayOfWeek as getDayOfWeek2,
2390
+ DateFormatter as DateFormatter2,
2391
+ toCalendarDate as intlToCalendarDate2
2392
+ } from "@internationalized/date";
2312
2393
  function createRangeCalendarState(props = {}) {
2313
- const timeZone = getLocalTimeZone();
2394
+ const timeZone = getLocalTimeZone2();
2314
2395
  const locale = props.locale ?? "en-US";
2315
2396
  const visibleMonths = props.visibleMonths ?? 1;
2316
2397
  const getInitialFocusedDate = () => {
@@ -2328,25 +2409,25 @@ function createRangeCalendarState(props = {}) {
2328
2409
  if (props.defaultValue?.start) {
2329
2410
  return toCalendarDate2(props.defaultValue.start);
2330
2411
  }
2331
- return today(timeZone);
2412
+ return today2(timeZone);
2332
2413
  };
2333
- const [internalValue, setInternalValue] = createSignal(
2414
+ const [internalValue, setInternalValue] = createSignal19(
2334
2415
  props.defaultValue ?? null
2335
2416
  );
2336
- const [focusedDate, setFocusedDateInternal] = createSignal(
2417
+ const [focusedDate, setFocusedDateInternal] = createSignal19(
2337
2418
  getInitialFocusedDate()
2338
2419
  );
2339
- const [anchorDate, setAnchorDate] = createSignal(null);
2340
- const [isFocused, setFocused] = createSignal(false);
2341
- const [isDragging, setDragging] = createSignal(false);
2342
- const value = createMemo(() => {
2420
+ const [anchorDate, setAnchorDate] = createSignal19(null);
2421
+ const [isFocused, setFocused] = createSignal19(false);
2422
+ const [isDragging, setDragging] = createSignal19(false);
2423
+ const value = createMemo6(() => {
2343
2424
  const controlled = access(props.value);
2344
2425
  return controlled !== void 0 ? controlled : internalValue();
2345
2426
  });
2346
- const isDisabled = createMemo(() => access(props.isDisabled) ?? false);
2347
- const isReadOnly = createMemo(() => access(props.isReadOnly) ?? false);
2348
- const validationState = createMemo(() => access(props.validationState));
2349
- const highlightedRange = createMemo(() => {
2427
+ const isDisabled = createMemo6(() => access(props.isDisabled) ?? false);
2428
+ const isReadOnly = createMemo6(() => access(props.isReadOnly) ?? false);
2429
+ const validationState = createMemo6(() => access(props.validationState));
2430
+ const highlightedRange = createMemo6(() => {
2350
2431
  const anchor = anchorDate();
2351
2432
  if (!anchor) {
2352
2433
  const v = value();
@@ -2364,21 +2445,21 @@ function createRangeCalendarState(props = {}) {
2364
2445
  }
2365
2446
  return { start: focused, end: anchor };
2366
2447
  });
2367
- const visibleRange = createMemo(() => {
2448
+ const visibleRange = createMemo6(() => {
2368
2449
  const focused = focusedDate();
2369
- const start = startOfMonth(focused);
2370
- let end = endOfMonth(focused);
2450
+ const start = startOfMonth2(focused);
2451
+ let end = endOfMonth2(focused);
2371
2452
  for (let i = 1; i < visibleMonths; i++) {
2372
- end = endOfMonth(end.add({ months: 1 }));
2453
+ end = endOfMonth2(end.add({ months: 1 }));
2373
2454
  }
2374
2455
  return { start, end };
2375
2456
  });
2376
- const weekDays = createMemo(() => {
2377
- const formatter = new DateFormatter(locale, { weekday: "short" });
2457
+ const weekDays = createMemo6(() => {
2458
+ const formatter = new DateFormatter2(locale, { weekday: "short" });
2378
2459
  const startDay = props.firstDayOfWeek ?? 0;
2379
2460
  const days = [];
2380
- const base = today(timeZone);
2381
- const dayOfWeek = getDayOfWeek(base, locale);
2461
+ const base = today2(timeZone);
2462
+ const dayOfWeek = getDayOfWeek2(base, locale);
2382
2463
  const weekStart = base.subtract({ days: (dayOfWeek - startDay + 7) % 7 });
2383
2464
  for (let i = 0; i < 7; i++) {
2384
2465
  const day = weekStart.add({ days: i });
@@ -2386,8 +2467,8 @@ function createRangeCalendarState(props = {}) {
2386
2467
  }
2387
2468
  return days;
2388
2469
  });
2389
- const title = createMemo(() => {
2390
- const formatter = new DateFormatter(locale, {
2470
+ const title = createMemo6(() => {
2471
+ const formatter = new DateFormatter2(locale, {
2391
2472
  month: "long",
2392
2473
  year: "numeric"
2393
2474
  });
@@ -2425,15 +2506,15 @@ function createRangeCalendarState(props = {}) {
2425
2506
  const isSelectionStart = (date) => {
2426
2507
  const range = highlightedRange();
2427
2508
  if (!range) return false;
2428
- return isSameDay(toCalendarDate2(date), range.start);
2509
+ return isSameDay2(toCalendarDate2(date), range.start);
2429
2510
  };
2430
2511
  const isSelectionEnd = (date) => {
2431
2512
  const range = highlightedRange();
2432
2513
  if (!range) return false;
2433
- return isSameDay(toCalendarDate2(date), range.end);
2514
+ return isSameDay2(toCalendarDate2(date), range.end);
2434
2515
  };
2435
2516
  const isCellFocused = (date) => {
2436
- return isSameDay(toCalendarDate2(date), focusedDate());
2517
+ return isSameDay2(toCalendarDate2(date), focusedDate());
2437
2518
  };
2438
2519
  const isCellUnavailable = (date) => {
2439
2520
  return props.isDateUnavailable?.(date) ?? false;
@@ -2451,7 +2532,7 @@ function createRangeCalendarState(props = {}) {
2451
2532
  const isOutsideVisibleRange = (date) => {
2452
2533
  const range = visibleRange();
2453
2534
  const calDate = toCalendarDate2(date);
2454
- return !isSameMonth(calDate, range.start) && !isSameMonth(calDate, range.end);
2535
+ return !isSameMonth2(calDate, range.start) && !isSameMonth2(calDate, range.end);
2455
2536
  };
2456
2537
  const isInvalid = (date) => {
2457
2538
  return isCellDisabled(date) || isCellUnavailable(date);
@@ -2481,10 +2562,10 @@ function createRangeCalendarState(props = {}) {
2481
2562
  setFocusedDate(focusedDate().add({ weeks: 1 }));
2482
2563
  };
2483
2564
  const focusPageStart = () => {
2484
- setFocusedDate(startOfMonth(focusedDate()));
2565
+ setFocusedDate(startOfMonth2(focusedDate()));
2485
2566
  };
2486
2567
  const focusPageEnd = () => {
2487
- setFocusedDate(endOfMonth(focusedDate()));
2568
+ setFocusedDate(endOfMonth2(focusedDate()));
2488
2569
  };
2489
2570
  const selectFocusedDate = () => {
2490
2571
  if (isReadOnly() || isDisabled()) return;
@@ -2518,8 +2599,8 @@ function createRangeCalendarState(props = {}) {
2518
2599
  };
2519
2600
  const getDatesInWeek = (weekIndex, monthStartDate) => {
2520
2601
  const startDate = monthStartDate ?? visibleRange().start;
2521
- const monthStart = startOfMonth(startDate);
2522
- const weekStart = startOfWeek(monthStart, locale);
2602
+ const monthStart = startOfMonth2(startDate);
2603
+ const weekStart = startOfWeek2(monthStart, locale);
2523
2604
  const week = [];
2524
2605
  const firstDayOfWeek = weekStart.add({ weeks: weekIndex });
2525
2606
  for (let i = 0; i < 7; i++) {
@@ -2530,7 +2611,7 @@ function createRangeCalendarState(props = {}) {
2530
2611
  };
2531
2612
  const getWeeksInMonthFn = (date) => {
2532
2613
  const monthDate = date ?? focusedDate();
2533
- return getWeeksInMonth(monthDate, locale);
2614
+ return getWeeksInMonth2(monthDate, locale);
2534
2615
  };
2535
2616
  return {
2536
2617
  value,
@@ -2577,31 +2658,41 @@ function createRangeCalendarState(props = {}) {
2577
2658
  };
2578
2659
  }
2579
2660
  function toCalendarDate2(date) {
2580
- return toCalendarDate$1(date);
2661
+ return intlToCalendarDate2(date);
2581
2662
  }
2663
+
2664
+ // src/calendar/createDateFieldState.ts
2665
+ import { createSignal as createSignal20, createMemo as createMemo7 } from "solid-js";
2666
+ import {
2667
+ today as today3,
2668
+ getLocalTimeZone as getLocalTimeZone3,
2669
+ DateFormatter as DateFormatter3,
2670
+ toCalendarDate as intlToCalendarDate3,
2671
+ toCalendarDateTime
2672
+ } from "@internationalized/date";
2582
2673
  function createDateFieldState(props = {}) {
2583
- const timeZone = getLocalTimeZone();
2674
+ const timeZone = getLocalTimeZone3();
2584
2675
  const locale = props.locale ?? "en-US";
2585
2676
  const granularity = props.granularity ?? "day";
2586
- const [internalValue, setInternalValue] = createSignal(
2677
+ const [internalValue, setInternalValue] = createSignal20(
2587
2678
  props.defaultValue ?? null
2588
2679
  );
2589
- const [placeholderDate, setPlaceholderDate] = createSignal({});
2590
- const value = createMemo(() => {
2680
+ const [placeholderDate, setPlaceholderDate] = createSignal20({});
2681
+ const value = createMemo7(() => {
2591
2682
  const controlled = access(props.value);
2592
2683
  return controlled !== void 0 ? controlled : internalValue();
2593
2684
  });
2594
- const dateValue = createMemo(() => {
2685
+ const dateValue = createMemo7(() => {
2595
2686
  const v = value();
2596
2687
  if (v) return v;
2597
2688
  const parts = placeholderDate();
2598
- const placeholder = props.placeholderValue ?? today(timeZone);
2689
+ const placeholder = props.placeholderValue ?? today3(timeZone);
2599
2690
  if (Object.keys(parts).length === 0) return null;
2600
2691
  const year = parts.year ?? placeholder.year;
2601
2692
  const month = parts.month ?? placeholder.month;
2602
2693
  const day = parts.day ?? placeholder.day;
2603
2694
  if (granularity === "day") {
2604
- return toCalendarDate$1(placeholder).set({ year, month, day });
2695
+ return intlToCalendarDate3(placeholder).set({ year, month, day });
2605
2696
  }
2606
2697
  const hour = parts.hour ?? 0;
2607
2698
  const minute = parts.minute ?? 0;
@@ -2615,11 +2706,11 @@ function createDateFieldState(props = {}) {
2615
2706
  second
2616
2707
  });
2617
2708
  });
2618
- const isDisabled = createMemo(() => access(props.isDisabled) ?? false);
2619
- const isReadOnly = createMemo(() => access(props.isReadOnly) ?? false);
2620
- const isRequired = createMemo(() => access(props.isRequired) ?? false);
2621
- const validationState = createMemo(() => access(props.validationState));
2622
- const isInvalid = createMemo(() => {
2709
+ const isDisabled = createMemo7(() => access(props.isDisabled) ?? false);
2710
+ const isReadOnly = createMemo7(() => access(props.isReadOnly) ?? false);
2711
+ const isRequired = createMemo7(() => access(props.isRequired) ?? false);
2712
+ const validationState = createMemo7(() => access(props.validationState));
2713
+ const isInvalid = createMemo7(() => {
2623
2714
  const v = value();
2624
2715
  if (!v) return false;
2625
2716
  const minValue = access(props.minValue);
@@ -2628,9 +2719,9 @@ function createDateFieldState(props = {}) {
2628
2719
  if (maxValue && v.compare(maxValue) > 0) return true;
2629
2720
  return validationState() === "invalid";
2630
2721
  });
2631
- const segments = createMemo(() => {
2722
+ const segments = createMemo7(() => {
2632
2723
  const v = value();
2633
- const placeholder = props.placeholderValue ?? today(timeZone);
2724
+ const placeholder = props.placeholderValue ?? today3(timeZone);
2634
2725
  const parts = placeholderDate();
2635
2726
  const segs = [];
2636
2727
  const formatOptions = {
@@ -2648,7 +2739,7 @@ function createDateFieldState(props = {}) {
2648
2739
  formatOptions.hourCycle = props.hourCycle === 12 ? "h12" : "h23";
2649
2740
  }
2650
2741
  }
2651
- const formatter = new DateFormatter(locale, formatOptions);
2742
+ const formatter = new DateFormatter3(locale, formatOptions);
2652
2743
  const dateToFormat = v ?? placeholder;
2653
2744
  const formattedParts = formatter.formatToParts(dateToFormat.toDate(timeZone));
2654
2745
  for (const part of formattedParts) {
@@ -2663,6 +2754,7 @@ function createDateFieldState(props = {}) {
2663
2754
  });
2664
2755
  } else if (type) {
2665
2756
  const segValue = getSegmentValue(v, type);
2757
+ const placeholderValue = getSegmentValue(placeholder, type);
2666
2758
  const partValue = parts[type];
2667
2759
  const hasValue = v !== null || partValue !== void 0;
2668
2760
  segs.push({
@@ -2707,7 +2799,7 @@ function createDateFieldState(props = {}) {
2707
2799
  if (isDisabled() || isReadOnly()) return;
2708
2800
  const v = value();
2709
2801
  const current = v ? getSegmentValue(v, type) : placeholderDate()[type];
2710
- const max = getMaxValue(type, v ?? props.placeholderValue ?? today(timeZone));
2802
+ const max = getMaxValue(type, v ?? props.placeholderValue ?? today3(timeZone));
2711
2803
  const min = getMinValue(type);
2712
2804
  const newValue = current !== void 0 ? current + 1 : min;
2713
2805
  setSegment(type, newValue > max ? min : newValue);
@@ -2716,7 +2808,7 @@ function createDateFieldState(props = {}) {
2716
2808
  if (isDisabled() || isReadOnly()) return;
2717
2809
  const v = value();
2718
2810
  const current = v ? getSegmentValue(v, type) : placeholderDate()[type];
2719
- const max = getMaxValue(type, v ?? props.placeholderValue ?? today(timeZone));
2811
+ const max = getMaxValue(type, v ?? props.placeholderValue ?? today3(timeZone));
2720
2812
  const min = getMinValue(type);
2721
2813
  const newValue = current !== void 0 ? current - 1 : max;
2722
2814
  setSegment(type, newValue < min ? max : newValue);
@@ -2758,7 +2850,7 @@ function createDateFieldState(props = {}) {
2758
2850
  options.second = "2-digit";
2759
2851
  }
2760
2852
  }
2761
- const formatter = new DateFormatter(locale, options);
2853
+ const formatter = new DateFormatter3(locale, options);
2762
2854
  return formatter.format(v.toDate(timeZone));
2763
2855
  };
2764
2856
  return {
@@ -2901,24 +2993,31 @@ function updateDatePart(date, type, value) {
2901
2993
  return date;
2902
2994
  }
2903
2995
  }
2996
+
2997
+ // src/calendar/createTimeFieldState.ts
2998
+ import { createSignal as createSignal21, createMemo as createMemo8 } from "solid-js";
2999
+ import {
3000
+ getLocalTimeZone as getLocalTimeZone4,
3001
+ DateFormatter as DateFormatter4
3002
+ } from "@internationalized/date";
2904
3003
  function createTimeFieldState(props = {}) {
2905
- getLocalTimeZone();
3004
+ const timeZone = getLocalTimeZone4();
2906
3005
  const locale = props.locale ?? "en-US";
2907
3006
  const granularity = props.granularity ?? "minute";
2908
3007
  const hourCycle = props.hourCycle ?? 12;
2909
- const [internalValue, setInternalValue] = createSignal(
3008
+ const [internalValue, setInternalValue] = createSignal21(
2910
3009
  props.defaultValue ?? null
2911
3010
  );
2912
- const [placeholderParts, setPlaceholderParts] = createSignal({});
2913
- const value = createMemo(() => {
3011
+ const [placeholderParts, setPlaceholderParts] = createSignal21({});
3012
+ const value = createMemo8(() => {
2914
3013
  const controlled = access(props.value);
2915
3014
  return controlled !== void 0 ? controlled : internalValue();
2916
3015
  });
2917
- const isDisabled = createMemo(() => access(props.isDisabled) ?? false);
2918
- const isReadOnly = createMemo(() => access(props.isReadOnly) ?? false);
2919
- const isRequired = createMemo(() => access(props.isRequired) ?? false);
2920
- const validationState = createMemo(() => access(props.validationState));
2921
- const isInvalid = createMemo(() => {
3016
+ const isDisabled = createMemo8(() => access(props.isDisabled) ?? false);
3017
+ const isReadOnly = createMemo8(() => access(props.isReadOnly) ?? false);
3018
+ const isRequired = createMemo8(() => access(props.isRequired) ?? false);
3019
+ const validationState = createMemo8(() => access(props.validationState));
3020
+ const isInvalid = createMemo8(() => {
2922
3021
  const v = value();
2923
3022
  if (!v) return false;
2924
3023
  const minValue = access(props.minValue);
@@ -2927,7 +3026,7 @@ function createTimeFieldState(props = {}) {
2927
3026
  if (maxValue && compareTime(v, maxValue) > 0) return true;
2928
3027
  return validationState() === "invalid";
2929
3028
  });
2930
- const segments = createMemo(() => {
3029
+ const segments = createMemo8(() => {
2931
3030
  const v = value();
2932
3031
  const parts = placeholderParts();
2933
3032
  const segs = [];
@@ -2943,7 +3042,7 @@ function createTimeFieldState(props = {}) {
2943
3042
  if (v) {
2944
3043
  baseDate.setHours(getHour(v), getMinute(v), getSecond(v));
2945
3044
  }
2946
- const formatter = new DateFormatter(locale, formatOptions);
3045
+ const formatter = new DateFormatter4(locale, formatOptions);
2947
3046
  const formattedParts = formatter.formatToParts(baseDate);
2948
3047
  for (const part of formattedParts) {
2949
3048
  const type = mapTimePartType(part.type);
@@ -2989,7 +3088,7 @@ function createTimeFieldState(props = {}) {
2989
3088
  if (type === "literal") return;
2990
3089
  const v = value();
2991
3090
  if (v) {
2992
- const updated = updateTimePart(v, type, newValue);
3091
+ const updated = updateTimePart(v, type, newValue, hourCycle);
2993
3092
  setValue(updated);
2994
3093
  } else {
2995
3094
  setPlaceholderParts((prev) => ({
@@ -3178,31 +3277,71 @@ function compareTime(a, b) {
3178
3277
  const bSecond = getSecond(b);
3179
3278
  return aSecond - bSecond;
3180
3279
  }
3280
+
3281
+ // src/calendar/index.ts
3282
+ import {
3283
+ today as today4,
3284
+ now,
3285
+ getLocalTimeZone as getLocalTimeZone5,
3286
+ parseDate,
3287
+ parseDateTime,
3288
+ parseTime,
3289
+ parseAbsolute,
3290
+ parseAbsoluteToLocal,
3291
+ parseZonedDateTime,
3292
+ toCalendarDate as toCalendarDate3,
3293
+ toCalendarDateTime as toCalendarDateTime2,
3294
+ toZoned,
3295
+ toTime,
3296
+ CalendarDate,
3297
+ CalendarDateTime,
3298
+ ZonedDateTime,
3299
+ Time,
3300
+ DateFormatter as DateFormatter5,
3301
+ isSameDay as isSameDay3,
3302
+ isSameMonth as isSameMonth3,
3303
+ isSameYear,
3304
+ isToday,
3305
+ isWeekend,
3306
+ startOfMonth as startOfMonth3,
3307
+ endOfMonth as endOfMonth3,
3308
+ startOfWeek as startOfWeek3,
3309
+ endOfWeek,
3310
+ startOfYear,
3311
+ endOfYear,
3312
+ getWeeksInMonth as getWeeksInMonth3,
3313
+ getDayOfWeek as getDayOfWeek3,
3314
+ minDate,
3315
+ maxDate
3316
+ } from "@internationalized/date";
3317
+
3318
+ // src/grid/createGridState.ts
3319
+ import { createSignal as createSignal22, createEffect as createEffect3, createMemo as createMemo9, on } from "solid-js";
3181
3320
  function createGridState(options) {
3182
3321
  const getOptions = () => options();
3183
- const disabledKeys = createMemo(() => {
3322
+ const disabledKeys = createMemo9(() => {
3184
3323
  const keys = getOptions().disabledKeys;
3185
3324
  return keys ? new Set(keys) : /* @__PURE__ */ new Set();
3186
3325
  });
3187
- const [isFocused, setIsFocused] = createSignal(false);
3188
- const [focusedKey, setFocusedKeyInternal] = createSignal(null);
3189
- const [childFocusStrategy, setChildFocusStrategy] = createSignal(null);
3190
- const [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = createSignal(false);
3191
- const [internalSelectedKeys, setInternalSelectedKeys] = createSignal(
3326
+ const [isFocused, setIsFocused] = createSignal22(false);
3327
+ const [focusedKey, setFocusedKeyInternal] = createSignal22(null);
3328
+ const [childFocusStrategy, setChildFocusStrategy] = createSignal22(null);
3329
+ const [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = createSignal22(false);
3330
+ const [internalSelectedKeys, setInternalSelectedKeys] = createSignal22(
3192
3331
  getInitialSelection2(getOptions().defaultSelectedKeys)
3193
3332
  );
3194
- const [anchorKey, setAnchorKey] = createSignal(null);
3195
- const selectedKeys = createMemo(() => {
3333
+ const [anchorKey, setAnchorKey] = createSignal22(null);
3334
+ const selectedKeys = createMemo9(() => {
3196
3335
  const opts = getOptions();
3197
3336
  if (opts.selectedKeys !== void 0) {
3198
3337
  return normalizeSelection2(opts.selectedKeys);
3199
3338
  }
3200
3339
  return internalSelectedKeys();
3201
3340
  });
3202
- const selectionMode = createMemo(() => getOptions().selectionMode ?? "none");
3203
- createMemo(() => getOptions().selectionBehavior ?? "toggle");
3204
- const disallowEmptySelection = createMemo(() => getOptions().disallowEmptySelection ?? false);
3205
- const focusMode = createMemo(() => getOptions().focusMode ?? "row");
3341
+ const selectionMode = createMemo9(() => getOptions().selectionMode ?? "none");
3342
+ const selectionBehavior = createMemo9(() => getOptions().selectionBehavior ?? "toggle");
3343
+ const disallowEmptySelection = createMemo9(() => getOptions().disallowEmptySelection ?? false);
3344
+ const focusMode = createMemo9(() => getOptions().focusMode ?? "row");
3206
3345
  const setFocusedKey = (key, strategy = "first") => {
3207
3346
  const opts = getOptions();
3208
3347
  const collection = opts.collection;
@@ -3221,7 +3360,7 @@ function createGridState(options) {
3221
3360
  setChildFocusStrategy(strategy);
3222
3361
  };
3223
3362
  let cachedCollection = null;
3224
- createEffect(
3363
+ createEffect3(
3225
3364
  on(
3226
3365
  () => getOptions().collection,
3227
3366
  (collection) => {
@@ -3409,6 +3548,9 @@ function normalizeSelection2(keys) {
3409
3548
  if (keys === "all") return "all";
3410
3549
  return new Set(keys);
3411
3550
  }
3551
+
3552
+ // src/table/createTableState.ts
3553
+ import { createMemo as createMemo10 } from "solid-js";
3412
3554
  var OPPOSITE_SORT_DIRECTION = {
3413
3555
  ascending: "descending",
3414
3556
  descending: "ascending"
@@ -3426,10 +3568,10 @@ function createTableState(options) {
3426
3568
  defaultSelectedKeys: getOptions().defaultSelectedKeys,
3427
3569
  onSelectionChange: getOptions().onSelectionChange
3428
3570
  }));
3429
- const sortDescriptor = createMemo(() => {
3571
+ const sortDescriptor = createMemo10(() => {
3430
3572
  return getOptions().sortDescriptor ?? null;
3431
3573
  });
3432
- const showSelectionCheckboxes = createMemo(() => {
3574
+ const showSelectionCheckboxes = createMemo10(() => {
3433
3575
  return getOptions().showSelectionCheckboxes ?? false;
3434
3576
  });
3435
3577
  const sort = (columnKey, direction) => {
@@ -3773,52 +3915,55 @@ var TableCollection = class {
3773
3915
  function createTableCollection(options) {
3774
3916
  return new TableCollection(options);
3775
3917
  }
3918
+
3919
+ // src/tree/createTreeState.ts
3920
+ import { createSignal as createSignal23, createEffect as createEffect4, createMemo as createMemo11, on as on2 } from "solid-js";
3776
3921
  function createTreeState(options) {
3777
3922
  const getOptions = () => options();
3778
- const disabledKeys = createMemo(() => {
3923
+ const disabledKeys = createMemo11(() => {
3779
3924
  const keys = getOptions().disabledKeys;
3780
3925
  return keys ? new Set(keys) : /* @__PURE__ */ new Set();
3781
3926
  });
3782
- const [internalExpandedKeys, setInternalExpandedKeys] = createSignal(
3927
+ const [internalExpandedKeys, setInternalExpandedKeys] = createSignal23(
3783
3928
  getInitialExpandedKeys(getOptions().defaultExpandedKeys)
3784
3929
  );
3785
- const expandedKeys = createMemo(() => {
3930
+ const expandedKeys = createMemo11(() => {
3786
3931
  const opts = getOptions();
3787
3932
  if (opts.expandedKeys !== void 0) {
3788
3933
  return new Set(opts.expandedKeys);
3789
3934
  }
3790
3935
  return internalExpandedKeys();
3791
3936
  });
3792
- const collection = createMemo(() => {
3937
+ const collection = createMemo11(() => {
3793
3938
  const opts = getOptions();
3794
3939
  return opts.collectionFactory(expandedKeys());
3795
3940
  });
3796
- const [isFocused, setIsFocused] = createSignal(false);
3797
- const [focusedKey, setFocusedKeyInternal] = createSignal(null);
3798
- const [childFocusStrategy, setChildFocusStrategy] = createSignal(null);
3799
- const [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = createSignal(false);
3800
- const [internalSelectedKeys, setInternalSelectedKeys] = createSignal(
3941
+ const [isFocused, setIsFocused] = createSignal23(false);
3942
+ const [focusedKey, setFocusedKeyInternal] = createSignal23(null);
3943
+ const [childFocusStrategy, setChildFocusStrategy] = createSignal23(null);
3944
+ const [isKeyboardNavigationDisabled, setKeyboardNavigationDisabled] = createSignal23(false);
3945
+ const [internalSelectedKeys, setInternalSelectedKeys] = createSignal23(
3801
3946
  getInitialSelection3(getOptions().defaultSelectedKeys)
3802
3947
  );
3803
- const [anchorKey, setAnchorKey] = createSignal(null);
3804
- const selectedKeys = createMemo(() => {
3948
+ const [anchorKey, setAnchorKey] = createSignal23(null);
3949
+ const selectedKeys = createMemo11(() => {
3805
3950
  const opts = getOptions();
3806
3951
  if (opts.selectedKeys !== void 0) {
3807
3952
  return normalizeSelection3(opts.selectedKeys);
3808
3953
  }
3809
3954
  return internalSelectedKeys();
3810
3955
  });
3811
- const selectionMode = createMemo(() => getOptions().selectionMode ?? "none");
3812
- createMemo(() => getOptions().selectionBehavior ?? "toggle");
3813
- const disallowEmptySelection = createMemo(() => getOptions().disallowEmptySelection ?? false);
3814
- const disabledBehavior = createMemo(() => getOptions().disabledBehavior ?? "all");
3956
+ const selectionMode = createMemo11(() => getOptions().selectionMode ?? "none");
3957
+ const selectionBehavior = createMemo11(() => getOptions().selectionBehavior ?? "toggle");
3958
+ const disallowEmptySelection = createMemo11(() => getOptions().disallowEmptySelection ?? false);
3959
+ const disabledBehavior = createMemo11(() => getOptions().disabledBehavior ?? "all");
3815
3960
  const setFocusedKey = (key, strategy = "first") => {
3816
3961
  setFocusedKeyInternal(key);
3817
3962
  setChildFocusStrategy(strategy);
3818
3963
  };
3819
3964
  let cachedCollection = null;
3820
- createEffect(
3821
- on(collection, (coll) => {
3965
+ createEffect4(
3966
+ on2(collection, (coll) => {
3822
3967
  const currentFocusedKey = focusedKey();
3823
3968
  if (currentFocusedKey != null && cachedCollection) {
3824
3969
  const visibleKeys = [...coll.getKeys()];
@@ -4935,10 +5080,13 @@ function normalizeColor(value) {
4935
5080
  }
4936
5081
  return value;
4937
5082
  }
5083
+
5084
+ // src/color/createColorSliderState.ts
5085
+ import { createSignal as createSignal24, createMemo as createMemo12 } from "solid-js";
4938
5086
  function createColorSliderState(options) {
4939
5087
  const getOptions = () => options();
4940
- const [internalValue, setInternalValue] = createSignal(null);
4941
- const [isDragging, setIsDragging] = createSignal(false);
5088
+ const [internalValue, setInternalValue] = createSignal24(null);
5089
+ const [isDragging, setIsDragging] = createSignal24(false);
4942
5090
  const initValue = () => {
4943
5091
  const opts = getOptions();
4944
5092
  if (opts.defaultValue) {
@@ -4952,21 +5100,21 @@ function createColorSliderState(options) {
4952
5100
  setInternalValue(init);
4953
5101
  }
4954
5102
  }
4955
- const value = createMemo(() => {
5103
+ const value = createMemo12(() => {
4956
5104
  const opts = getOptions();
4957
5105
  if (opts.value !== void 0) {
4958
5106
  return normalizeColor(opts.value);
4959
5107
  }
4960
5108
  return internalValue() ?? normalizeColor("#ff0000");
4961
5109
  });
4962
- const channel = createMemo(() => getOptions().channel);
4963
- const isDisabled = createMemo(() => getOptions().isDisabled ?? false);
4964
- const locale = createMemo(() => getOptions().locale ?? "en-US");
4965
- const channelRange = createMemo(() => value().getChannelRange(channel()));
4966
- const step = createMemo(() => channelRange().step);
4967
- const pageSize = createMemo(() => channelRange().pageSize);
4968
- const minValue = createMemo(() => channelRange().minValue);
4969
- const maxValue = createMemo(() => channelRange().maxValue);
5110
+ const channel = createMemo12(() => getOptions().channel);
5111
+ const isDisabled = createMemo12(() => getOptions().isDisabled ?? false);
5112
+ const locale = createMemo12(() => getOptions().locale ?? "en-US");
5113
+ const channelRange = createMemo12(() => value().getChannelRange(channel()));
5114
+ const step = createMemo12(() => channelRange().step);
5115
+ const pageSize = createMemo12(() => channelRange().pageSize);
5116
+ const minValue = createMemo12(() => channelRange().minValue);
5117
+ const maxValue = createMemo12(() => channelRange().maxValue);
4970
5118
  const updateValue = (newColor) => {
4971
5119
  const opts = getOptions();
4972
5120
  if (opts.value !== void 0) {
@@ -5062,10 +5210,13 @@ function createColorSliderState(options) {
5062
5210
  getThumbValueLabel
5063
5211
  };
5064
5212
  }
5213
+
5214
+ // src/color/createColorAreaState.ts
5215
+ import { createSignal as createSignal25, createMemo as createMemo13 } from "solid-js";
5065
5216
  function createColorAreaState(options) {
5066
5217
  const getOptions = () => options();
5067
- const [internalValue, setInternalValue] = createSignal(null);
5068
- const [isDragging, setIsDragging] = createSignal(false);
5218
+ const [internalValue, setInternalValue] = createSignal25(null);
5219
+ const [isDragging, setIsDragging] = createSignal25(false);
5069
5220
  const initValue = () => {
5070
5221
  const opts = getOptions();
5071
5222
  if (opts.defaultValue) {
@@ -5079,30 +5230,30 @@ function createColorAreaState(options) {
5079
5230
  setInternalValue(init);
5080
5231
  }
5081
5232
  }
5082
- const value = createMemo(() => {
5233
+ const value = createMemo13(() => {
5083
5234
  const opts = getOptions();
5084
5235
  if (opts.value !== void 0) {
5085
5236
  return normalizeColor(opts.value);
5086
5237
  }
5087
5238
  return internalValue() ?? normalizeColor("#ff0000");
5088
5239
  });
5089
- const isDisabled = createMemo(() => getOptions().isDisabled ?? false);
5090
- const axes = createMemo(() => {
5240
+ const isDisabled = createMemo13(() => getOptions().isDisabled ?? false);
5241
+ const axes = createMemo13(() => {
5091
5242
  const opts = getOptions();
5092
5243
  return value().getColorSpaceAxes({
5093
5244
  xChannel: opts.xChannel,
5094
5245
  yChannel: opts.yChannel
5095
5246
  });
5096
5247
  });
5097
- const xChannel = createMemo(() => axes().xChannel);
5098
- const yChannel = createMemo(() => axes().yChannel);
5099
- const zChannel = createMemo(() => axes().zChannel);
5100
- const xRange = createMemo(() => value().getChannelRange(xChannel()));
5101
- const yRange = createMemo(() => value().getChannelRange(yChannel()));
5102
- const xChannelStep = createMemo(() => xRange().step);
5103
- const yChannelStep = createMemo(() => yRange().step);
5104
- const xChannelPageStep = createMemo(() => xRange().pageSize);
5105
- const yChannelPageStep = createMemo(() => yRange().pageSize);
5248
+ const xChannel = createMemo13(() => axes().xChannel);
5249
+ const yChannel = createMemo13(() => axes().yChannel);
5250
+ const zChannel = createMemo13(() => axes().zChannel);
5251
+ const xRange = createMemo13(() => value().getChannelRange(xChannel()));
5252
+ const yRange = createMemo13(() => value().getChannelRange(yChannel()));
5253
+ const xChannelStep = createMemo13(() => xRange().step);
5254
+ const yChannelStep = createMemo13(() => yRange().step);
5255
+ const xChannelPageStep = createMemo13(() => xRange().pageSize);
5256
+ const yChannelPageStep = createMemo13(() => yRange().pageSize);
5106
5257
  const updateValue = (newColor) => {
5107
5258
  const opts = getOptions();
5108
5259
  if (opts.value !== void 0) {
@@ -5222,10 +5373,13 @@ function createColorAreaState(options) {
5222
5373
  getDisplayColor
5223
5374
  };
5224
5375
  }
5376
+
5377
+ // src/color/createColorWheelState.ts
5378
+ import { createSignal as createSignal26, createMemo as createMemo14 } from "solid-js";
5225
5379
  function createColorWheelState(options) {
5226
5380
  const getOptions = () => options();
5227
- const [internalValue, setInternalValue] = createSignal(null);
5228
- const [isDragging, setIsDragging] = createSignal(false);
5381
+ const [internalValue, setInternalValue] = createSignal26(null);
5382
+ const [isDragging, setIsDragging] = createSignal26(false);
5229
5383
  const initValue = () => {
5230
5384
  const opts = getOptions();
5231
5385
  if (opts.defaultValue) {
@@ -5239,17 +5393,17 @@ function createColorWheelState(options) {
5239
5393
  setInternalValue(init);
5240
5394
  }
5241
5395
  }
5242
- const value = createMemo(() => {
5396
+ const value = createMemo14(() => {
5243
5397
  const opts = getOptions();
5244
5398
  if (opts.value !== void 0) {
5245
5399
  return normalizeColor(opts.value);
5246
5400
  }
5247
5401
  return internalValue() ?? normalizeColor("#ff0000");
5248
5402
  });
5249
- const isDisabled = createMemo(() => getOptions().isDisabled ?? false);
5250
- const hueRange = createMemo(() => value().getChannelRange("hue"));
5251
- const step = createMemo(() => hueRange().step);
5252
- const pageStep = createMemo(() => hueRange().pageSize);
5403
+ const isDisabled = createMemo14(() => getOptions().isDisabled ?? false);
5404
+ const hueRange = createMemo14(() => value().getChannelRange("hue"));
5405
+ const step = createMemo14(() => hueRange().step);
5406
+ const pageStep = createMemo14(() => hueRange().pageSize);
5253
5407
  const updateValue = (newColor) => {
5254
5408
  const opts = getOptions();
5255
5409
  if (opts.value !== void 0) {
@@ -5324,11 +5478,14 @@ function createColorWheelState(options) {
5324
5478
  getDisplayColor
5325
5479
  };
5326
5480
  }
5481
+
5482
+ // src/color/createColorFieldState.ts
5483
+ import { createSignal as createSignal27, createMemo as createMemo15 } from "solid-js";
5327
5484
  function createColorFieldState(options) {
5328
5485
  const getOptions = () => options();
5329
- const [internalValue, setInternalValue] = createSignal(null);
5330
- const [inputValue, setInputValueInternal] = createSignal("");
5331
- const [isInvalid, setIsInvalid] = createSignal(false);
5486
+ const [internalValue, setInternalValue] = createSignal27(null);
5487
+ const [inputValue, setInputValueInternal] = createSignal27("");
5488
+ const [isInvalid, setIsInvalid] = createSignal27(false);
5332
5489
  const initValue = () => {
5333
5490
  const opts = getOptions();
5334
5491
  if (opts.defaultValue) {
@@ -5344,7 +5501,7 @@ function createColorFieldState(options) {
5344
5501
  setInputValueInternal(formatColorValue(init, getOptions().channel, getOptions().colorFormat));
5345
5502
  }
5346
5503
  }
5347
- const value = createMemo(() => {
5504
+ const value = createMemo15(() => {
5348
5505
  const opts = getOptions();
5349
5506
  if (opts.value !== void 0) {
5350
5507
  if (opts.value === null) return null;
@@ -5352,9 +5509,9 @@ function createColorFieldState(options) {
5352
5509
  }
5353
5510
  return internalValue();
5354
5511
  });
5355
- const channel = createMemo(() => getOptions().channel);
5356
- const isDisabled = createMemo(() => getOptions().isDisabled ?? false);
5357
- const isReadOnly = createMemo(() => getOptions().isReadOnly ?? false);
5512
+ const channel = createMemo15(() => getOptions().channel);
5513
+ const isDisabled = createMemo15(() => getOptions().isDisabled ?? false);
5514
+ const isReadOnly = createMemo15(() => getOptions().isReadOnly ?? false);
5358
5515
  function formatColorValue(color, chan, format) {
5359
5516
  if (!color) return "";
5360
5517
  if (chan) {
@@ -5497,9 +5654,12 @@ function createColorFieldState(options) {
5497
5654
  validate
5498
5655
  };
5499
5656
  }
5657
+
5658
+ // src/dnd/createDragState.ts
5659
+ import { createSignal as createSignal28, createMemo as createMemo16 } from "solid-js";
5500
5660
  function createDragState(props) {
5501
- const getProps = createMemo(() => props());
5502
- const [isDragging, setIsDragging] = createSignal(false);
5661
+ const getProps = createMemo16(() => props());
5662
+ const [isDragging, setIsDragging] = createSignal28(false);
5503
5663
  const startDrag = (x, y) => {
5504
5664
  const p = getProps();
5505
5665
  if (p.isDisabled) return;
@@ -5571,9 +5731,12 @@ function createDragState(props) {
5571
5731
  getAllowedDropOperations
5572
5732
  };
5573
5733
  }
5734
+
5735
+ // src/dnd/createDropState.ts
5736
+ import { createSignal as createSignal29, createMemo as createMemo17 } from "solid-js";
5574
5737
  function createDropState(props) {
5575
- const getProps = createMemo(() => props());
5576
- const [isDropTarget, setIsDropTarget] = createSignal(false);
5738
+ const getProps = createMemo17(() => props());
5739
+ const [isDropTarget, setIsDropTarget] = createSignal29(false);
5577
5740
  const enterTarget = (x, y) => {
5578
5741
  const p = getProps();
5579
5742
  if (p.isDisabled) return;
@@ -5666,10 +5829,13 @@ function createDropState(props) {
5666
5829
  getDropOperationForPoint
5667
5830
  };
5668
5831
  }
5832
+
5833
+ // src/dnd/createDraggableCollectionState.ts
5834
+ import { createSignal as createSignal30, createMemo as createMemo18 } from "solid-js";
5669
5835
  function createDraggableCollectionState(props) {
5670
- const getProps = createMemo(() => props());
5671
- const [isDragging, setIsDragging] = createSignal(false);
5672
- const [draggingKeys, setDraggingKeys] = createSignal(
5836
+ const getProps = createMemo18(() => props());
5837
+ const [isDragging, setIsDragging] = createSignal30(false);
5838
+ const [draggingKeys, setDraggingKeys] = createSignal30(
5673
5839
  /* @__PURE__ */ new Set()
5674
5840
  );
5675
5841
  const startDrag = (keys, x, y) => {
@@ -5749,11 +5915,14 @@ function createDraggableCollectionState(props) {
5749
5915
  getAllowedDropOperations
5750
5916
  };
5751
5917
  }
5752
- var DIRECTORY_DRAG_TYPE = /* @__PURE__ */ Symbol("directory");
5918
+
5919
+ // src/dnd/createDroppableCollectionState.ts
5920
+ import { createSignal as createSignal31, createMemo as createMemo19 } from "solid-js";
5921
+ var DIRECTORY_DRAG_TYPE = Symbol("directory");
5753
5922
  function createDroppableCollectionState(props) {
5754
- const getProps = createMemo(() => props());
5755
- const [isDropTarget, setIsDropTarget] = createSignal(false);
5756
- const [target, setTarget] = createSignal(null);
5923
+ const getProps = createMemo19(() => props());
5924
+ const [isDropTarget, setIsDropTarget] = createSignal31(false);
5925
+ const [target, setTarget] = createSignal31(null);
5757
5926
  const isAccepted = (types) => {
5758
5927
  const p = getProps();
5759
5928
  const acceptedTypes = p.acceptedDragTypes ?? "all";
@@ -5945,6 +6114,15 @@ function targetsEqual(a, b) {
5945
6114
  }
5946
6115
  return false;
5947
6116
  }
6117
+
6118
+ // src/form/createFormValidationState.ts
6119
+ import {
6120
+ createContext,
6121
+ createEffect as createEffect5,
6122
+ createMemo as createMemo20,
6123
+ createSignal as createSignal32,
6124
+ useContext
6125
+ } from "solid-js";
5948
6126
  var VALID_VALIDITY_STATE = {
5949
6127
  badInput: false,
5950
6128
  customError: false,
@@ -6009,54 +6187,54 @@ function createFormValidationState(props) {
6009
6187
  validate,
6010
6188
  validationBehavior = "aria"
6011
6189
  } = props;
6012
- const isInvalidProp = createMemo(
6190
+ const isInvalidProp = createMemo20(
6013
6191
  () => isInvalid ?? (validationState === "invalid" ? true : void 0)
6014
6192
  );
6015
- const controlledError = createMemo(
6193
+ const controlledError = createMemo20(
6016
6194
  () => isInvalidProp() !== void 0 ? {
6017
6195
  isInvalid: isInvalidProp(),
6018
6196
  validationErrors: [],
6019
6197
  validationDetails: CUSTOM_VALIDITY_STATE
6020
6198
  } : null
6021
6199
  );
6022
- const clientError = createMemo(() => {
6200
+ const clientError = createMemo20(() => {
6023
6201
  if (!validate || props.value == null) {
6024
6202
  return null;
6025
6203
  }
6026
6204
  const validateErrors = runValidate(validate, props.value);
6027
6205
  return getValidationResult(validateErrors);
6028
6206
  });
6029
- const builtinValidation = createMemo(() => {
6207
+ const builtinValidation = createMemo20(() => {
6030
6208
  if (builtinValidationProp?.validationDetails.valid) {
6031
6209
  return void 0;
6032
6210
  }
6033
6211
  return builtinValidationProp;
6034
6212
  });
6035
6213
  const serverErrors = useContext(FormValidationContext);
6036
- const serverErrorMessages = createMemo(() => {
6214
+ const serverErrorMessages = createMemo20(() => {
6037
6215
  if (name) {
6038
6216
  return Array.isArray(name) ? name.flatMap((n) => asArray(serverErrors[n])) : asArray(serverErrors[name]);
6039
6217
  }
6040
6218
  return [];
6041
6219
  });
6042
- const [lastServerErrors, setLastServerErrors] = createSignal(serverErrors);
6043
- const [isServerErrorCleared, setServerErrorCleared] = createSignal(false);
6044
- createEffect(() => {
6220
+ const [lastServerErrors, setLastServerErrors] = createSignal32(serverErrors);
6221
+ const [isServerErrorCleared, setServerErrorCleared] = createSignal32(false);
6222
+ createEffect5(() => {
6045
6223
  if (serverErrors !== lastServerErrors()) {
6046
6224
  setLastServerErrors(serverErrors);
6047
6225
  setServerErrorCleared(false);
6048
6226
  }
6049
6227
  });
6050
- const serverError = createMemo(
6228
+ const serverError = createMemo20(
6051
6229
  () => getValidationResult(isServerErrorCleared() ? [] : serverErrorMessages())
6052
6230
  );
6053
- const [currentValidity, setCurrentValidity] = createSignal(
6231
+ const [currentValidity, setCurrentValidity] = createSignal32(
6054
6232
  DEFAULT_VALIDATION_RESULT
6055
6233
  );
6056
- const [commitQueued, setCommitQueued] = createSignal(false);
6234
+ const [commitQueued, setCommitQueued] = createSignal32(false);
6057
6235
  let nextValidation = DEFAULT_VALIDATION_RESULT;
6058
6236
  let lastError = DEFAULT_VALIDATION_RESULT;
6059
- createEffect(() => {
6237
+ createEffect5(() => {
6060
6238
  if (!commitQueued()) {
6061
6239
  return;
6062
6240
  }
@@ -6067,10 +6245,10 @@ function createFormValidationState(props) {
6067
6245
  setCurrentValidity(error);
6068
6246
  }
6069
6247
  });
6070
- const realtimeValidation = createMemo(
6248
+ const realtimeValidation = createMemo20(
6071
6249
  () => controlledError() || serverError() || clientError() || builtinValidation() || DEFAULT_VALIDATION_RESULT
6072
6250
  );
6073
- const displayValidation = createMemo(() => {
6251
+ const displayValidation = createMemo20(() => {
6074
6252
  if (validationBehavior === "native") {
6075
6253
  return controlledError() || serverError() || currentValidity();
6076
6254
  }
@@ -6126,5 +6304,105 @@ function mergeValidation(...results) {
6126
6304
  validationDetails
6127
6305
  };
6128
6306
  }
6129
-
6130
- export { DEFAULT_VALIDATION_RESULT, DIRECTORY_DRAG_TYPE, FormValidationContext, ListCollection, TableCollection, Timer, ToastQueue, TreeCollection, VALID_VALIDITY_STATE, access, canUseDOM, createAutocompleteState, createCalendarState, createCheckboxGroupState, createColorAreaState, createColorFieldState, createColorSliderState, createColorWheelState, createComboBoxState, createDateFieldState, createDisclosureGroupState, createDisclosureState, createDragState, createDraggableCollectionState, createDropState, createDroppableCollectionState, createFormValidationState, createGridState, createHSBColor, createHSLColor, createId, createIsSSR, createListCollection, createListState, createMenuState, createOverlayTriggerState as createMenuTriggerState, createNumberFieldState, createOverlayTriggerState, createRGBColor, createRadioGroupState, createRangeCalendarState, createSearchFieldState, createSelectState, createSelectionState, createSingleSelectListState, createSliderState, createTabListState, createTableCollection, createTableState, createTextFieldState, createTimeFieldState, createToastQueue, createToastState, createToggleState, createTooltipTriggerState, createTreeCollection, createTreeState, defaultContainsFilter, isAccessor, isServer, mergeValidation, normalizeColor, parseColor, privateValidationStateProp, radioGroupSyncVersion, resetTooltipState };
6307
+ export {
6308
+ CalendarDate as CalendarDateClass,
6309
+ CalendarDateTime as CalendarDateTimeClass,
6310
+ DEFAULT_VALIDATION_RESULT,
6311
+ DIRECTORY_DRAG_TYPE,
6312
+ DateFormatter5 as DateFormatter,
6313
+ FormValidationContext,
6314
+ ListCollection,
6315
+ TableCollection,
6316
+ Time as TimeClass,
6317
+ Timer,
6318
+ ToastQueue,
6319
+ TreeCollection,
6320
+ VALID_VALIDITY_STATE,
6321
+ ZonedDateTime as ZonedDateTimeClass,
6322
+ access,
6323
+ canUseDOM,
6324
+ createAutocompleteState,
6325
+ createCalendarState,
6326
+ createCheckboxGroupState,
6327
+ createColorAreaState,
6328
+ createColorFieldState,
6329
+ createColorSliderState,
6330
+ createColorWheelState,
6331
+ createComboBoxState,
6332
+ createDateFieldState,
6333
+ createDisclosureGroupState,
6334
+ createDisclosureState,
6335
+ createDragState,
6336
+ createDraggableCollectionState,
6337
+ createDropState,
6338
+ createDroppableCollectionState,
6339
+ createFormValidationState,
6340
+ createGridState,
6341
+ createHSBColor,
6342
+ createHSLColor,
6343
+ createId,
6344
+ createIsSSR,
6345
+ createListCollection,
6346
+ createListState,
6347
+ createMenuState,
6348
+ createOverlayTriggerState as createMenuTriggerState,
6349
+ createNumberFieldState,
6350
+ createOverlayTriggerState,
6351
+ createRGBColor,
6352
+ createRadioGroupState,
6353
+ createRangeCalendarState,
6354
+ createSearchFieldState,
6355
+ createSelectState,
6356
+ createSelectionState,
6357
+ createSingleSelectListState,
6358
+ createSliderState,
6359
+ createTabListState,
6360
+ createTableCollection,
6361
+ createTableState,
6362
+ createTextFieldState,
6363
+ createTimeFieldState,
6364
+ createToastQueue,
6365
+ createToastState,
6366
+ createToggleState,
6367
+ createTooltipTriggerState,
6368
+ createTreeCollection,
6369
+ createTreeState,
6370
+ defaultContainsFilter,
6371
+ endOfMonth3 as endOfMonth,
6372
+ endOfWeek,
6373
+ endOfYear,
6374
+ getDayOfWeek3 as getDayOfWeek,
6375
+ getLocalTimeZone5 as getLocalTimeZone,
6376
+ getWeeksInMonth3 as getWeeksInMonth,
6377
+ isAccessor,
6378
+ isSameDay3 as isSameDay,
6379
+ isSameMonth3 as isSameMonth,
6380
+ isSameYear,
6381
+ isServer,
6382
+ isToday,
6383
+ isWeekend,
6384
+ maxDate,
6385
+ mergeValidation,
6386
+ minDate,
6387
+ normalizeColor,
6388
+ now,
6389
+ parseAbsolute,
6390
+ parseAbsoluteToLocal,
6391
+ parseColor,
6392
+ parseDate,
6393
+ parseDateTime,
6394
+ parseTime,
6395
+ parseZonedDateTime,
6396
+ privateValidationStateProp,
6397
+ radioGroupSyncVersion,
6398
+ resetTooltipState,
6399
+ startOfMonth3 as startOfMonth,
6400
+ startOfWeek3 as startOfWeek,
6401
+ startOfYear,
6402
+ toCalendarDate3 as toCalendarDate,
6403
+ toCalendarDateTime2 as toCalendarDateTime,
6404
+ toTime,
6405
+ toZoned,
6406
+ today4 as today
6407
+ };
6408
+ //# sourceMappingURL=index.js.map