@ecohouse/ui 0.1.61 → 0.1.62

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 (33) hide show
  1. package/dist/index.cjs +328 -114
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +8 -2
  4. package/dist/index.d.ts +8 -2
  5. package/dist/index.js +329 -116
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/components/Checkbox/Checkbox.tsx +6 -0
  9. package/src/components/Counter/Counter.test.ts +38 -0
  10. package/src/components/Counter/Counter.tsx +7 -10
  11. package/src/components/Counter/Counter.utils.ts +28 -0
  12. package/src/components/DatePicker/DatePicker.tsx +5 -14
  13. package/src/components/Drawer/Drawer.tsx +15 -12
  14. package/src/components/Modal/Modal.tsx +31 -11
  15. package/src/components/RadioButton/RadioButton.tsx +14 -0
  16. package/src/components/Select/Select.tsx +16 -8
  17. package/src/components/Toggle/Toggle.tsx +6 -0
  18. package/src/components/VerificationCodeInput/VerificationCodeInput.test.ts +60 -12
  19. package/src/components/VerificationCodeInput/VerificationCodeInput.tsx +29 -24
  20. package/src/components/VerificationCodeInput/VerificationCodeInput.utils.ts +53 -13
  21. package/src/index.ts +6 -1
  22. package/src/utils/dateUtils.test.ts +72 -0
  23. package/src/utils/dateUtils.ts +30 -2
  24. package/src/utils/focusTrap.test.ts +26 -0
  25. package/src/utils/focusTrap.ts +39 -0
  26. package/src/utils/overlayStack.test.ts +175 -0
  27. package/src/utils/overlayStack.ts +105 -0
  28. package/src/utils/useHydrated.test.ts +14 -0
  29. package/src/utils/useHydrated.ts +14 -0
  30. package/src/utils/useOverlayLayer.ts +41 -0
  31. package/src/utils/useWebFocusTrap.ts +68 -0
  32. package/src/utils/webToggleKey.test.ts +49 -0
  33. package/src/utils/webToggleKey.ts +23 -0
package/dist/index.cjs CHANGED
@@ -18771,29 +18771,29 @@ var require_react_dom_development = __commonJS({
18771
18771
  }
18772
18772
  return [newState, dispatch];
18773
18773
  }
18774
- function mountMutableSource(source, getSnapshot, subscribe) {
18774
+ function mountMutableSource(source, getSnapshot, subscribe2) {
18775
18775
  {
18776
18776
  return void 0;
18777
18777
  }
18778
18778
  }
18779
- function updateMutableSource(source, getSnapshot, subscribe) {
18779
+ function updateMutableSource(source, getSnapshot, subscribe2) {
18780
18780
  {
18781
18781
  return void 0;
18782
18782
  }
18783
18783
  }
18784
- function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
18784
+ function mountSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot2) {
18785
18785
  var fiber = currentlyRenderingFiber$1;
18786
18786
  var hook = mountWorkInProgressHook();
18787
18787
  var nextSnapshot;
18788
18788
  var isHydrating2 = getIsHydrating();
18789
18789
  if (isHydrating2) {
18790
- if (getServerSnapshot === void 0) {
18790
+ if (getServerSnapshot2 === void 0) {
18791
18791
  throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");
18792
18792
  }
18793
- nextSnapshot = getServerSnapshot();
18793
+ nextSnapshot = getServerSnapshot2();
18794
18794
  {
18795
18795
  if (!didWarnUncachedGetSnapshot) {
18796
- if (nextSnapshot !== getServerSnapshot()) {
18796
+ if (nextSnapshot !== getServerSnapshot2()) {
18797
18797
  error("The result of getServerSnapshot should be cached to avoid an infinite loop");
18798
18798
  didWarnUncachedGetSnapshot = true;
18799
18799
  }
@@ -18824,12 +18824,12 @@ var require_react_dom_development = __commonJS({
18824
18824
  getSnapshot
18825
18825
  };
18826
18826
  hook.queue = inst;
18827
- mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]);
18827
+ mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe2), [subscribe2]);
18828
18828
  fiber.flags |= Passive;
18829
18829
  pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), void 0, null);
18830
18830
  return nextSnapshot;
18831
18831
  }
18832
- function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
18832
+ function updateSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot2) {
18833
18833
  var fiber = currentlyRenderingFiber$1;
18834
18834
  var hook = updateWorkInProgressHook();
18835
18835
  var nextSnapshot = getSnapshot();
@@ -18849,7 +18849,7 @@ var require_react_dom_development = __commonJS({
18849
18849
  markWorkInProgressReceivedUpdate();
18850
18850
  }
18851
18851
  var inst = hook.queue;
18852
- updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]);
18852
+ updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe2), [subscribe2]);
18853
18853
  if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by
18854
18854
  // checking whether we scheduled a subscription effect above.
18855
18855
  workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {
@@ -18892,13 +18892,13 @@ var require_react_dom_development = __commonJS({
18892
18892
  forceStoreRerender(fiber);
18893
18893
  }
18894
18894
  }
18895
- function subscribeToStore(fiber, inst, subscribe) {
18895
+ function subscribeToStore(fiber, inst, subscribe2) {
18896
18896
  var handleStoreChange = function() {
18897
18897
  if (checkIfSnapshotChanged(inst)) {
18898
18898
  forceStoreRerender(fiber);
18899
18899
  }
18900
18900
  };
18901
- return subscribe(handleStoreChange);
18901
+ return subscribe2(handleStoreChange);
18902
18902
  }
18903
18903
  function checkIfSnapshotChanged(inst) {
18904
18904
  var latestGetSnapshot = inst.getSnapshot;
@@ -19479,15 +19479,15 @@ var require_react_dom_development = __commonJS({
19479
19479
  mountHookTypesDev();
19480
19480
  return mountTransition();
19481
19481
  },
19482
- useMutableSource: function(source, getSnapshot, subscribe) {
19482
+ useMutableSource: function(source, getSnapshot, subscribe2) {
19483
19483
  currentHookNameInDev = "useMutableSource";
19484
19484
  mountHookTypesDev();
19485
19485
  return mountMutableSource();
19486
19486
  },
19487
- useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19487
+ useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot2) {
19488
19488
  currentHookNameInDev = "useSyncExternalStore";
19489
19489
  mountHookTypesDev();
19490
- return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
19490
+ return mountSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot2);
19491
19491
  },
19492
19492
  useId: function() {
19493
19493
  currentHookNameInDev = "useId";
@@ -19583,15 +19583,15 @@ var require_react_dom_development = __commonJS({
19583
19583
  updateHookTypesDev();
19584
19584
  return mountTransition();
19585
19585
  },
19586
- useMutableSource: function(source, getSnapshot, subscribe) {
19586
+ useMutableSource: function(source, getSnapshot, subscribe2) {
19587
19587
  currentHookNameInDev = "useMutableSource";
19588
19588
  updateHookTypesDev();
19589
19589
  return mountMutableSource();
19590
19590
  },
19591
- useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19591
+ useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot2) {
19592
19592
  currentHookNameInDev = "useSyncExternalStore";
19593
19593
  updateHookTypesDev();
19594
- return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
19594
+ return mountSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot2);
19595
19595
  },
19596
19596
  useId: function() {
19597
19597
  currentHookNameInDev = "useId";
@@ -19687,15 +19687,15 @@ var require_react_dom_development = __commonJS({
19687
19687
  updateHookTypesDev();
19688
19688
  return updateTransition();
19689
19689
  },
19690
- useMutableSource: function(source, getSnapshot, subscribe) {
19690
+ useMutableSource: function(source, getSnapshot, subscribe2) {
19691
19691
  currentHookNameInDev = "useMutableSource";
19692
19692
  updateHookTypesDev();
19693
19693
  return updateMutableSource();
19694
19694
  },
19695
- useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19695
+ useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot2) {
19696
19696
  currentHookNameInDev = "useSyncExternalStore";
19697
19697
  updateHookTypesDev();
19698
- return updateSyncExternalStore(subscribe, getSnapshot);
19698
+ return updateSyncExternalStore(subscribe2, getSnapshot);
19699
19699
  },
19700
19700
  useId: function() {
19701
19701
  currentHookNameInDev = "useId";
@@ -19791,15 +19791,15 @@ var require_react_dom_development = __commonJS({
19791
19791
  updateHookTypesDev();
19792
19792
  return rerenderTransition();
19793
19793
  },
19794
- useMutableSource: function(source, getSnapshot, subscribe) {
19794
+ useMutableSource: function(source, getSnapshot, subscribe2) {
19795
19795
  currentHookNameInDev = "useMutableSource";
19796
19796
  updateHookTypesDev();
19797
19797
  return updateMutableSource();
19798
19798
  },
19799
- useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19799
+ useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot2) {
19800
19800
  currentHookNameInDev = "useSyncExternalStore";
19801
19801
  updateHookTypesDev();
19802
- return updateSyncExternalStore(subscribe, getSnapshot);
19802
+ return updateSyncExternalStore(subscribe2, getSnapshot);
19803
19803
  },
19804
19804
  useId: function() {
19805
19805
  currentHookNameInDev = "useId";
@@ -19909,17 +19909,17 @@ var require_react_dom_development = __commonJS({
19909
19909
  mountHookTypesDev();
19910
19910
  return mountTransition();
19911
19911
  },
19912
- useMutableSource: function(source, getSnapshot, subscribe) {
19912
+ useMutableSource: function(source, getSnapshot, subscribe2) {
19913
19913
  currentHookNameInDev = "useMutableSource";
19914
19914
  warnInvalidHookAccess();
19915
19915
  mountHookTypesDev();
19916
19916
  return mountMutableSource();
19917
19917
  },
19918
- useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19918
+ useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot2) {
19919
19919
  currentHookNameInDev = "useSyncExternalStore";
19920
19920
  warnInvalidHookAccess();
19921
19921
  mountHookTypesDev();
19922
- return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
19922
+ return mountSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot2);
19923
19923
  },
19924
19924
  useId: function() {
19925
19925
  currentHookNameInDev = "useId";
@@ -20030,17 +20030,17 @@ var require_react_dom_development = __commonJS({
20030
20030
  updateHookTypesDev();
20031
20031
  return updateTransition();
20032
20032
  },
20033
- useMutableSource: function(source, getSnapshot, subscribe) {
20033
+ useMutableSource: function(source, getSnapshot, subscribe2) {
20034
20034
  currentHookNameInDev = "useMutableSource";
20035
20035
  warnInvalidHookAccess();
20036
20036
  updateHookTypesDev();
20037
20037
  return updateMutableSource();
20038
20038
  },
20039
- useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
20039
+ useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot2) {
20040
20040
  currentHookNameInDev = "useSyncExternalStore";
20041
20041
  warnInvalidHookAccess();
20042
20042
  updateHookTypesDev();
20043
- return updateSyncExternalStore(subscribe, getSnapshot);
20043
+ return updateSyncExternalStore(subscribe2, getSnapshot);
20044
20044
  },
20045
20045
  useId: function() {
20046
20046
  currentHookNameInDev = "useId";
@@ -20151,17 +20151,17 @@ var require_react_dom_development = __commonJS({
20151
20151
  updateHookTypesDev();
20152
20152
  return rerenderTransition();
20153
20153
  },
20154
- useMutableSource: function(source, getSnapshot, subscribe) {
20154
+ useMutableSource: function(source, getSnapshot, subscribe2) {
20155
20155
  currentHookNameInDev = "useMutableSource";
20156
20156
  warnInvalidHookAccess();
20157
20157
  updateHookTypesDev();
20158
20158
  return updateMutableSource();
20159
20159
  },
20160
- useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
20160
+ useSyncExternalStore: function(subscribe2, getSnapshot, getServerSnapshot2) {
20161
20161
  currentHookNameInDev = "useSyncExternalStore";
20162
20162
  warnInvalidHookAccess();
20163
20163
  updateHookTypesDev();
20164
- return updateSyncExternalStore(subscribe, getSnapshot);
20164
+ return updateSyncExternalStore(subscribe2, getSnapshot);
20165
20165
  },
20166
20166
  useId: function() {
20167
20167
  currentHookNameInDev = "useId";
@@ -33162,14 +33162,23 @@ var styles18 = reactNative.StyleSheet.create({
33162
33162
  includeFontPadding: false
33163
33163
  }
33164
33164
  });
33165
+
33166
+ // src/components/Counter/Counter.utils.ts
33167
+ function clampCounterValue(value, min, max) {
33168
+ return Math.max(min, max === void 0 ? value : Math.min(value, max));
33169
+ }
33170
+ function resolveCounterValue(controlledValue, uncontrolledValue, min, max) {
33171
+ if (controlledValue !== void 0 && Number.isFinite(controlledValue)) return controlledValue;
33172
+ return clampCounterValue(controlledValue === void 0 ? uncontrolledValue : min, min, max);
33173
+ }
33174
+ function stepCounterValue(current, delta, min, max) {
33175
+ return clampCounterValue(current + delta, min, max);
33176
+ }
33165
33177
  var BUTTON_SIZE = 32;
33166
33178
  var webBlurStyle7 = reactNative.Platform.OS === "web" ? {
33167
33179
  backdropFilter: "blur(20px)",
33168
33180
  WebkitBackdropFilter: "blur(20px)"
33169
33181
  } : {};
33170
- function clamp(value, min, max) {
33171
- return Math.max(min, max === void 0 ? value : Math.min(value, max));
33172
- }
33173
33182
  var Counter = react.forwardRef(function Counter2({
33174
33183
  value,
33175
33184
  defaultValue,
@@ -33187,16 +33196,16 @@ var Counter = react.forwardRef(function Counter2({
33187
33196
  const containerRef = react.useRef(null);
33188
33197
  const isControlled = value !== void 0;
33189
33198
  const [uncontrolledValue, setUncontrolledValue] = react.useState(
33190
- () => clamp(defaultValue ?? min, min, max)
33199
+ () => clampCounterValue(defaultValue ?? min, min, max)
33191
33200
  );
33192
- const resolvedValue = clamp(isControlled ? value : uncontrolledValue, min, max);
33201
+ const resolvedValue = resolveCounterValue(value, uncontrolledValue, min, max);
33193
33202
  const resolvedClassName = className?.trim() || void 0;
33194
33203
  const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
33195
33204
  const decrementDisabled = disabled || resolvedValue <= min;
33196
33205
  const incrementDisabled = disabled || max !== void 0 && resolvedValue >= max;
33197
33206
  useApplyWebClassName(containerRef, resolvedClassName);
33198
- const updateValue = (nextValue) => {
33199
- const next = clamp(nextValue, min, max);
33207
+ const updateValue = (delta) => {
33208
+ const next = stepCounterValue(resolvedValue, delta, min, max);
33200
33209
  if (next === resolvedValue) return;
33201
33210
  if (!isControlled) setUncontrolledValue(next);
33202
33211
  onValueChange?.(next);
@@ -33206,7 +33215,7 @@ var Counter = react.forwardRef(function Counter2({
33206
33215
  {
33207
33216
  disabled: decrementDisabled,
33208
33217
  hitSlop,
33209
- onPress: () => updateValue(resolvedValue - step),
33218
+ onPress: () => updateValue(-step),
33210
33219
  accessibilityRole: "button",
33211
33220
  accessibilityLabel: "Decrease value",
33212
33221
  accessibilityState: { disabled: decrementDisabled },
@@ -33219,7 +33228,7 @@ var Counter = react.forwardRef(function Counter2({
33219
33228
  {
33220
33229
  disabled: incrementDisabled,
33221
33230
  hitSlop,
33222
- onPress: () => updateValue(resolvedValue + step),
33231
+ onPress: () => updateValue(step),
33223
33232
  accessibilityRole: "button",
33224
33233
  accessibilityLabel: "Increase value",
33225
33234
  accessibilityState: { disabled: incrementDisabled },
@@ -34502,6 +34511,15 @@ var styles25 = reactNative.StyleSheet.create({
34502
34511
  top: 0
34503
34512
  }
34504
34513
  });
34514
+
34515
+ // src/utils/webToggleKey.ts
34516
+ function handleWebToggleKeyDown(event, onToggle) {
34517
+ const isSpace = event.key === " " || event.key === "Spacebar";
34518
+ if (!isSpace || event.target !== event.currentTarget) return false;
34519
+ event.preventDefault();
34520
+ if (!event.repeat) onToggle();
34521
+ return true;
34522
+ }
34505
34523
  var BOX_SIZE = 20;
34506
34524
  var BOX_RADIUS = 6;
34507
34525
  var CHECK_SIZE = 12;
@@ -34557,6 +34575,8 @@ var Checkbox = react.forwardRef(function Checkbox2({
34557
34575
  accessibilityRole: "checkbox",
34558
34576
  accessibilityLabel: resolvedAccessibilityLabel,
34559
34577
  accessibilityState: { checked: isActive, disabled },
34578
+ "aria-checked": isActive,
34579
+ ...reactNative.Platform.OS === "web" && !disabled ? { onKeyDown: (event) => handleWebToggleKeyDown(event, handlePress) } : null,
34560
34580
  style: [styles26.root, disabled && styles26.disabled, style],
34561
34581
  children: [
34562
34582
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -34650,8 +34670,23 @@ function abbreviateMonthName(monthName, letterCount = 3) {
34650
34670
  }
34651
34671
  return chars.slice(0, end).join("");
34652
34672
  }
34673
+ function abbreviateMonthNames(monthNames, letterCount = 3) {
34674
+ return monthNames.map((name, index) => {
34675
+ const maxLetters = abbreviatedLetterCount(name);
34676
+ let count = letterCount;
34677
+ while (count < maxLetters && monthNames.some(
34678
+ (other, otherIndex) => otherIndex !== index && abbreviateMonthName(other, count) === abbreviateMonthName(name, count)
34679
+ )) {
34680
+ count += 1;
34681
+ }
34682
+ return abbreviateMonthName(name, count);
34683
+ });
34684
+ }
34685
+ function abbreviatedLetterCount(monthName) {
34686
+ return Array.from(monthName.replace(/ու/g, "u")).length;
34687
+ }
34653
34688
  function formatDateDayShortMonth(date, monthNames, letterCount = 3) {
34654
- const month = abbreviateMonthName(monthNames[date.getMonth()] ?? "", letterCount);
34689
+ const month = abbreviateMonthNames(monthNames, letterCount)[date.getMonth()] ?? "";
34655
34690
  return `${date.getDate()} ${month} ${date.getFullYear()}`;
34656
34691
  }
34657
34692
  function getMonthMatrix(monthDate, weekStartsOn = 1) {
@@ -34675,6 +34710,78 @@ function getMonthMatrix(monthDate, weekStartsOn = 1) {
34675
34710
  }
34676
34711
  return weeks;
34677
34712
  }
34713
+
34714
+ // src/utils/overlayStack.ts
34715
+ function createOverlayStack(target) {
34716
+ const layers = [];
34717
+ const top = (kind) => {
34718
+ for (let index = layers.length - 1; index >= 0; index -= 1) {
34719
+ if (layers[index].kind === kind) return layers[index];
34720
+ }
34721
+ return void 0;
34722
+ };
34723
+ const handleCapture = (event) => {
34724
+ const layer = top("popover");
34725
+ if (event.key !== "Escape" || event.defaultPrevented || !layer) return;
34726
+ event.preventDefault();
34727
+ event.stopImmediatePropagation();
34728
+ layer.onEscape();
34729
+ };
34730
+ const handleBubble = (event) => {
34731
+ const layer = top("overlay");
34732
+ if (event.key !== "Escape" || event.defaultPrevented || !layer) return;
34733
+ event.preventDefault();
34734
+ layer.onEscape();
34735
+ };
34736
+ return {
34737
+ push(layer) {
34738
+ layers.push(layer);
34739
+ if (layers.length === 1) {
34740
+ target.addEventListener("keydown", handleCapture, true);
34741
+ target.addEventListener("keydown", handleBubble, false);
34742
+ }
34743
+ return () => {
34744
+ const index = layers.indexOf(layer);
34745
+ if (index === -1) return;
34746
+ layers.splice(index, 1);
34747
+ if (layers.length === 0) {
34748
+ target.removeEventListener("keydown", handleCapture, true);
34749
+ target.removeEventListener("keydown", handleBubble, false);
34750
+ }
34751
+ };
34752
+ },
34753
+ isTop: (layer) => top(layer.kind) === layer
34754
+ };
34755
+ }
34756
+ var documentStack = null;
34757
+ function getDocumentOverlayStack() {
34758
+ if (!documentStack) {
34759
+ documentStack = createOverlayStack(document);
34760
+ }
34761
+ return documentStack;
34762
+ }
34763
+
34764
+ // src/utils/useOverlayLayer.ts
34765
+ function useOverlayLayer(kind, active, onEscape) {
34766
+ const onEscapeRef = react.useRef(onEscape);
34767
+ onEscapeRef.current = onEscape;
34768
+ const layerRef = react.useRef(null);
34769
+ react.useEffect(() => {
34770
+ if (!active || reactNative.Platform.OS !== "web" || typeof document === "undefined") return void 0;
34771
+ const layer = { kind, onEscape: () => onEscapeRef.current() };
34772
+ const stack = getDocumentOverlayStack();
34773
+ const remove = stack.push(layer);
34774
+ layerRef.current = layer;
34775
+ return () => {
34776
+ remove();
34777
+ if (layerRef.current === layer) layerRef.current = null;
34778
+ };
34779
+ }, [active, kind]);
34780
+ return react.useCallback(() => {
34781
+ const layer = layerRef.current;
34782
+ return layer !== null && getDocumentOverlayStack().isTop(layer);
34783
+ }, []);
34784
+ }
34678
34785
  var DEFAULT_MONTH_NAMES = [
34679
34786
  "\u0540\u0578\u0582\u0576\u057E\u0561\u0580",
34680
34787
  "\u0553\u0565\u057F\u0580\u057E\u0561\u0580",
@@ -34869,17 +34976,7 @@ var DatePicker = react.forwardRef(
34869
34976
  setOpen(false);
34870
34977
  focusTrigger();
34871
34978
  }, [focusTrigger, setOpen]);
34872
- react.useEffect(() => {
34873
- if (reactNative.Platform.OS !== "web" || !isOpen) return;
34874
- const handleKeyDown = (event) => {
34875
- if (event.key === "Escape") {
34876
- event.preventDefault();
34877
- closeAndFocusTrigger();
34878
- }
34879
- };
34880
- document.addEventListener("keydown", handleKeyDown);
34881
- return () => document.removeEventListener("keydown", handleKeyDown);
34882
- }, [isOpen, closeAndFocusTrigger]);
34979
+ useOverlayLayer("popover", isOpen, closeAndFocusTrigger);
34883
34980
  const handleTriggerPress = () => {
34884
34981
  if (disabled) return;
34885
34982
  setOpen(!isOpen);
@@ -34969,6 +35066,7 @@ var DatePicker = react.forwardRef(
34969
35066
  accessibilityRole: "button",
34970
35067
  accessibilityLabel: resolvedAccessibilityLabel,
34971
35068
  accessibilityState: { disabled, expanded: isOpen },
35069
+ "aria-expanded": isOpen,
34972
35070
  style: [
34973
35071
  styles27.trigger,
34974
35072
  usesRangeTrigger && styles27.rangeTrigger,
@@ -35527,6 +35625,78 @@ var styles28 = reactNative.StyleSheet.create({
35527
35625
 
35528
35626
  // src/components/Modal/Modal.tsx
35529
35627
  var import_react_dom = __toESM(require_react_dom());
35628
+ var subscribe = () => () => {
35629
+ };
35630
+ var getClientSnapshot = () => true;
35631
+ var getServerSnapshot = () => false;
35632
+ function useHydrated() {
35633
+ return react.useSyncExternalStore(subscribe, getClientSnapshot, getServerSnapshot);
35634
+ }
35635
+
35636
+ // src/utils/focusTrap.ts
35637
+ var TABBABLE_SELECTOR = [
35638
+ "a[href]",
35639
+ "area[href]",
35640
+ "button",
35641
+ "input:not([type='hidden'])",
35642
+ "select",
35643
+ "textarea",
35644
+ "iframe",
35645
+ "[contenteditable='true']",
35646
+ "[tabindex]"
35647
+ ].join(",");
35648
+ function getTabbableElements(container) {
35649
+ return Array.from(container.querySelectorAll(TABBABLE_SELECTOR)).filter(
35650
+ (element) => element.tabIndex >= 0 && !element.hasAttribute("disabled") && element.getAttribute("aria-hidden") !== "true" && element.getClientRects().length > 0
35651
+ );
35652
+ }
35653
+ function getWrappedFocusIndex(count, currentIndex, backwards) {
35654
+ if (count === 0) return null;
35655
+ if (currentIndex === -1) return backwards ? count - 1 : 0;
35656
+ if (backwards && currentIndex === 0) return count - 1;
35657
+ if (!backwards && currentIndex === count - 1) return 0;
35658
+ return null;
35659
+ }
35660
+
35661
+ // src/utils/useWebFocusTrap.ts
35662
+ function useWebFocusTrap(containerRef, active, isTopLayer) {
35663
+ react.useEffect(() => {
35664
+ if (!active || reactNative.Platform.OS !== "web" || typeof document === "undefined") return void 0;
35665
+ const container = containerRef.current;
35666
+ if (!container) return void 0;
35667
+ const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;
35668
+ if (!container.contains(document.activeElement)) container.focus({ preventScroll: true });
35669
+ const handleKeyDown = (event) => {
35670
+ if (event.key !== "Tab" || event.defaultPrevented || !isTopLayer()) return;
35671
+ const activeElement = document.activeElement;
35672
+ if (activeElement !== null && activeElement !== document.body && !container.contains(activeElement)) {
35673
+ return;
35674
+ }
35675
+ const tabbables = getTabbableElements(container);
35676
+ if (tabbables.length === 0) {
35677
+ event.preventDefault();
35678
+ container.focus({ preventScroll: true });
35679
+ return;
35680
+ }
35681
+ const nextIndex = getWrappedFocusIndex(
35682
+ tabbables.length,
35683
+ tabbables.indexOf(activeElement),
35684
+ event.shiftKey
35685
+ );
35686
+ if (nextIndex === null) return;
35687
+ event.preventDefault();
35688
+ tabbables[nextIndex].focus();
35689
+ };
35690
+ document.addEventListener("keydown", handleKeyDown);
35691
+ return () => {
35692
+ document.removeEventListener("keydown", handleKeyDown);
35693
+ const current = document.activeElement;
35694
+ if (previouslyFocused?.isConnected && (current === null || current === document.body || container.contains(current))) {
35695
+ previouslyFocused.focus({ preventScroll: true });
35696
+ }
35697
+ };
35698
+ }, [active, containerRef, isTopLayer]);
35699
+ }
35530
35700
  var BACKDROP_COLOR = "#09090933";
35531
35701
  var WEB_Z_INDEX = 500;
35532
35702
  var webBackdropDomStyle = {
@@ -35554,6 +35724,13 @@ var webRootDomStyle = {
35554
35724
  alignItems: "center",
35555
35725
  justifyContent: "center"
35556
35726
  };
35727
+ var webDialogDomStyle = {
35728
+ position: "relative",
35729
+ zIndex: 1,
35730
+ maxWidth: "100%",
35731
+ maxHeight: "100%",
35732
+ outline: "none"
35733
+ };
35557
35734
  var Modal = react.forwardRef(function Modal2({
35558
35735
  open,
35559
35736
  onClose,
@@ -35564,22 +35741,22 @@ var Modal = react.forwardRef(function Modal2({
35564
35741
  className
35565
35742
  }, forwardedRef) {
35566
35743
  const contentRef = react.useRef(null);
35744
+ const dialogRef = react.useRef(null);
35567
35745
  const setContentRef = react.useMemo(() => mergeRefs(contentRef, forwardedRef), [forwardedRef]);
35568
35746
  const resolvedClassName = className?.trim() || void 0;
35569
- useApplyWebClassName(contentRef, resolvedClassName, open && reactNative.Platform.OS === "web");
35747
+ const hydrated = useHydrated();
35748
+ const webOpen = open && hydrated && reactNative.Platform.OS === "web";
35749
+ useApplyWebClassName(contentRef, resolvedClassName, webOpen);
35570
35750
  react.useEffect(() => {
35571
- if (!open || reactNative.Platform.OS !== "web") return void 0;
35751
+ if (!webOpen) return void 0;
35572
35752
  const previousOverflow = document.body.style.overflow;
35573
35753
  document.body.style.overflow = "hidden";
35574
- const onKeyDown = (event) => {
35575
- if (event.key === "Escape") onClose();
35576
- };
35577
- document.addEventListener("keydown", onKeyDown);
35578
35754
  return () => {
35579
35755
  document.body.style.overflow = previousOverflow;
35580
- document.removeEventListener("keydown", onKeyDown);
35581
35756
  };
35582
- }, [open, onClose]);
35757
+ }, [webOpen]);
35758
+ const isTopLayer = useOverlayLayer("overlay", webOpen, onClose);
35759
+ useWebFocusTrap(dialogRef, webOpen, isTopLayer);
35583
35760
  const content = /* @__PURE__ */ jsxRuntime.jsx(
35584
35761
  reactNative.View,
35585
35762
  {
@@ -35590,7 +35767,7 @@ var Modal = react.forwardRef(function Modal2({
35590
35767
  }
35591
35768
  );
35592
35769
  if (reactNative.Platform.OS === "web") {
35593
- if (!open || typeof document === "undefined") return null;
35770
+ if (!webOpen) return null;
35594
35771
  return (0, import_react_dom.createPortal)(
35595
35772
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: webRootDomStyle, role: "presentation", children: [
35596
35773
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -35603,7 +35780,16 @@ var Modal = react.forwardRef(function Modal2({
35603
35780
  style: webBackdropDomStyle
35604
35781
  }
35605
35782
  ),
35606
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative", zIndex: 1, maxWidth: "100%", maxHeight: "100%" }, children: content })
35783
+ /* @__PURE__ */ jsxRuntime.jsx(
35784
+ "div",
35785
+ {
35786
+ ref: dialogRef,
35787
+ role: "dialog",
35788
+ tabIndex: -1,
35789
+ style: webDialogDomStyle,
35790
+ children: content
35791
+ }
35792
+ )
35607
35793
  ] }),
35608
35794
  document.body
35609
35795
  );
@@ -35678,20 +35864,18 @@ var Drawer = react.forwardRef(function Drawer2({
35678
35864
  const [entered, setEntered] = react.useState(false);
35679
35865
  const animatedWidth = react.useRef(new reactNative.Animated.Value(open ? width : 0)).current;
35680
35866
  const animatedBackdrop = react.useRef(new reactNative.Animated.Value(open ? 1 : 0)).current;
35681
- useApplyWebClassName(panelRef, resolvedClassName, mounted && reactNative.Platform.OS === "web");
35867
+ const hydrated = useHydrated();
35868
+ const webMounted = mounted && hydrated && reactNative.Platform.OS === "web";
35869
+ useApplyWebClassName(panelRef, resolvedClassName, webMounted);
35682
35870
  react.useEffect(() => {
35683
- if (!mounted || reactNative.Platform.OS !== "web") return void 0;
35871
+ if (!webMounted) return void 0;
35684
35872
  const previousOverflow = document.body.style.overflow;
35685
35873
  document.body.style.overflow = "hidden";
35686
- const onKeyDown = (event) => {
35687
- if (event.key === "Escape") onClose();
35688
- };
35689
- document.addEventListener("keydown", onKeyDown);
35690
35874
  return () => {
35691
35875
  document.body.style.overflow = previousOverflow;
35692
- document.removeEventListener("keydown", onKeyDown);
35693
35876
  };
35694
- }, [mounted, onClose]);
35877
+ }, [webMounted]);
35878
+ useOverlayLayer("overlay", webMounted && open, onClose);
35695
35879
  const targetWidth = Math.min(width, typeof window !== "undefined" ? window.innerWidth : width);
35696
35880
  const playWidth = react.useCallback(
35697
35881
  (target) => {
@@ -35732,7 +35916,7 @@ var Drawer = react.forwardRef(function Drawer2({
35732
35916
  };
35733
35917
  }, [open, animationDuration, playWidth]);
35734
35918
  react.useEffect(() => {
35735
- if (reactNative.Platform.OS !== "web" || !mounted || !open) return void 0;
35919
+ if (!webMounted || !open) return void 0;
35736
35920
  const shell = shellRef.current;
35737
35921
  if (shell) {
35738
35922
  shell.style.transition = "none";
@@ -35745,7 +35929,7 @@ var Drawer = react.forwardRef(function Drawer2({
35745
35929
  });
35746
35930
  });
35747
35931
  return () => cancelAnimationFrame(frame);
35748
- }, [mounted, open, targetWidth, playWidth]);
35932
+ }, [webMounted, open, targetWidth, playWidth]);
35749
35933
  react.useEffect(() => {
35750
35934
  if (reactNative.Platform.OS === "web") return void 0;
35751
35935
  if (open) {
@@ -35826,7 +36010,7 @@ var Drawer = react.forwardRef(function Drawer2({
35826
36010
  }
35827
36011
  );
35828
36012
  if (reactNative.Platform.OS === "web") {
35829
- if (!mounted || typeof document === "undefined") return null;
36013
+ if (!webMounted) return null;
35830
36014
  return (0, import_react_dom2.createPortal)(
35831
36015
  /* @__PURE__ */ jsxRuntime.jsxs(
35832
36016
  "div",
@@ -36526,21 +36710,42 @@ var styles32 = reactNative.StyleSheet.create({
36526
36710
  function normalizeVerificationCode(value, length) {
36527
36711
  return value.replace(/\D/g, "").slice(0, Math.max(1, length));
36528
36712
  }
36529
- function updateVerificationCode(currentCode, index, input, length) {
36713
+ function toVerificationCells(code, length) {
36714
+ const safeLength = Math.max(1, length);
36715
+ const digits = normalizeVerificationCode(code, safeLength);
36716
+ return Array.from({ length: safeLength }, (_, index) => digits[index] ?? "");
36717
+ }
36718
+ function verificationCellsToCode(cells) {
36719
+ return cells.join("");
36720
+ }
36721
+ function isVerificationCodeComplete(cells) {
36722
+ return cells.length > 0 && cells.every((cell) => cell !== "");
36723
+ }
36724
+ function reconcileVerificationCells(cells, code, length) {
36725
+ const safeLength = Math.max(1, length);
36726
+ const normalized = normalizeVerificationCode(code, safeLength);
36727
+ if (cells.length === safeLength && verificationCellsToCode(cells) === normalized) {
36728
+ return [...cells];
36729
+ }
36730
+ return toVerificationCells(normalized, safeLength);
36731
+ }
36732
+ function updateVerificationCells(currentCells, index, input, length) {
36530
36733
  const safeLength = Math.max(1, length);
36531
36734
  const safeIndex = Math.min(Math.max(0, index), safeLength - 1);
36532
- const current = normalizeVerificationCode(currentCode, safeLength);
36735
+ const cells = Array.from({ length: safeLength }, (_, cellIndex) => {
36736
+ const cell = currentCells[cellIndex] ?? "";
36737
+ return /^\d$/.test(cell) ? cell : "";
36738
+ });
36533
36739
  const insertedDigits = normalizeVerificationCode(input, safeLength - safeIndex);
36534
36740
  if (!insertedDigits) {
36535
- return {
36536
- code: `${current.slice(0, safeIndex)}${current.slice(safeIndex + 1)}`,
36537
- nextFocus: safeIndex
36538
- };
36741
+ cells[safeIndex] = "";
36742
+ return { cells, nextFocus: safeIndex };
36539
36743
  }
36744
+ Array.from(insertedDigits).forEach((digit, offset) => {
36745
+ cells[safeIndex + offset] = digit;
36746
+ });
36540
36747
  return {
36541
- code: `${current.slice(0, safeIndex)}${insertedDigits}${current.slice(
36542
- safeIndex + insertedDigits.length
36543
- )}`.slice(0, safeLength),
36748
+ cells,
36544
36749
  nextFocus: Math.min(safeIndex + insertedDigits.length, safeLength - 1)
36545
36750
  };
36546
36751
  }
@@ -36571,17 +36776,17 @@ var VerificationCodeInput = react.forwardRef(function VerificationCodeInput2({
36571
36776
  }, forwardedRef) {
36572
36777
  const safeLength = Math.max(1, Math.floor(length));
36573
36778
  const isControlled = typeof value === "string";
36574
- const [uncontrolledValue, setUncontrolledValue] = react.useState(
36575
- () => normalizeVerificationCode(defaultValue, safeLength)
36576
- );
36779
+ const [cellsState, setCellsState] = react.useState(() => toVerificationCells(defaultValue, safeLength));
36577
36780
  const [focusedIndex, setFocusedIndex] = react.useState(null);
36578
36781
  const { width: viewportWidth } = reactNative.useWindowDimensions();
36579
36782
  const rootRef = react.useRef(null);
36580
36783
  const inputRefs = react.useRef([]);
36581
- const currentCode = normalizeVerificationCode(
36582
- isControlled ? value : uncontrolledValue,
36784
+ const cells = reconcileVerificationCells(
36785
+ cellsState,
36786
+ isControlled ? value : verificationCellsToCode(cellsState),
36583
36787
  safeLength
36584
36788
  );
36789
+ const currentCode = verificationCellsToCode(cells);
36585
36790
  useApplyWebClassName(rootRef, className);
36586
36791
  const focus = react.useCallback(
36587
36792
  (index = 0) => {
@@ -36591,39 +36796,37 @@ var VerificationCodeInput = react.forwardRef(function VerificationCodeInput2({
36591
36796
  [safeLength]
36592
36797
  );
36593
36798
  const commit = react.useCallback(
36594
- (nextValue) => {
36595
- const normalized = normalizeVerificationCode(nextValue, safeLength);
36596
- if (!isControlled) {
36597
- setUncontrolledValue(normalized);
36598
- }
36599
- onValueChange?.(normalized);
36600
- if (normalized.length === safeLength) {
36601
- onComplete?.(normalized);
36799
+ (nextCells) => {
36800
+ setCellsState(nextCells);
36801
+ const code = verificationCellsToCode(nextCells);
36802
+ onValueChange?.(code);
36803
+ if (isVerificationCodeComplete(nextCells)) {
36804
+ onComplete?.(code);
36602
36805
  }
36603
36806
  },
36604
- [isControlled, onComplete, onValueChange, safeLength]
36807
+ [onComplete, onValueChange]
36605
36808
  );
36606
36809
  react.useImperativeHandle(
36607
36810
  forwardedRef,
36608
36811
  () => ({
36609
36812
  clear: () => {
36610
- commit("");
36813
+ commit(toVerificationCells("", safeLength));
36611
36814
  focus(0);
36612
36815
  },
36613
36816
  focus
36614
36817
  }),
36615
- [commit, focus]
36818
+ [commit, focus, safeLength]
36616
36819
  );
36617
36820
  const handleChange = (index, input) => {
36618
- const update = updateVerificationCode(currentCode, index, input, safeLength);
36619
- commit(update.code);
36821
+ const update = updateVerificationCells(cells, index, input, safeLength);
36822
+ commit(update.cells);
36620
36823
  focus(update.nextFocus);
36621
36824
  };
36622
36825
  const handleKeyPress = (index, event) => {
36623
36826
  const key = event.nativeEvent.key;
36624
- if (key === "Backspace" && !currentCode[index] && index > 0) {
36625
- const update = updateVerificationCode(currentCode, index - 1, "", safeLength);
36626
- commit(update.code);
36827
+ if (key === "Backspace" && !cells[index] && index > 0) {
36828
+ const update = updateVerificationCells(cells, index - 1, "", safeLength);
36829
+ commit(update.cells);
36627
36830
  focus(index - 1);
36628
36831
  return;
36629
36832
  }
@@ -36691,7 +36894,7 @@ var VerificationCodeInput = react.forwardRef(function VerificationCodeInput2({
36691
36894
  reactNative.Platform.OS === "android" ? styles33.cellAndroid : null,
36692
36895
  inputStyle
36693
36896
  ],
36694
- value: currentCode[index] ?? ""
36897
+ value: cells[index] ?? ""
36695
36898
  },
36696
36899
  index
36697
36900
  );
@@ -36777,6 +36980,9 @@ var FALLBACK_ELLIPSIS_WIDTH = 20;
36777
36980
  var WEB_MENU_Z_INDEX = 600;
36778
36981
  var WEB_VIEWPORT_PADDING = 8;
36779
36982
  var WEB_MENU_GAP = 8;
36983
+ function webListboxProps(multiple) {
36984
+ return { role: "listbox", "aria-multiselectable": multiple };
36985
+ }
36780
36986
  function itemBackground(state) {
36781
36987
  switch (state) {
36782
36988
  case "hover":
@@ -37090,6 +37296,7 @@ var Select = react.forwardRef(
37090
37296
  setOpen(false);
37091
37297
  focusTrigger();
37092
37298
  }, [focusTrigger, setOpen]);
37299
+ useOverlayLayer("popover", isOpen, closeAndFocusTrigger);
37093
37300
  react.useEffect(() => {
37094
37301
  if (reactNative.Platform.OS !== "web") return;
37095
37302
  const isTriggerFocused = () => document.activeElement === triggerRef.current;
@@ -37103,11 +37310,6 @@ var Select = react.forwardRef(
37103
37310
  }
37104
37311
  return;
37105
37312
  }
37106
- if (event.key === "Escape") {
37107
- event.preventDefault();
37108
- closeAndFocusTrigger();
37109
- return;
37110
- }
37111
37313
  if (event.key === "ArrowDown" || event.key === "ArrowUp") {
37112
37314
  event.preventDefault();
37113
37315
  setHoveredValue((current) => {
@@ -37145,7 +37347,6 @@ var Select = react.forwardRef(
37145
37347
  filteredOptions,
37146
37348
  hoveredValue,
37147
37349
  multiple,
37148
- closeAndFocusTrigger,
37149
37350
  focusTrigger,
37150
37351
  handleSelect,
37151
37352
  setOpen
@@ -37212,6 +37413,7 @@ var Select = react.forwardRef(
37212
37413
  contentContainerStyle: styles34.optionListContent,
37213
37414
  keyboardShouldPersistTaps: "handled",
37214
37415
  showsVerticalScrollIndicator: false,
37416
+ ...reactNative.Platform.OS === "web" ? webListboxProps(multiple) : null,
37215
37417
  children: [
37216
37418
  loading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles34.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles34.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles34.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles34.statusText, children: emptyText }) }) : null,
37217
37419
  !loading && filteredOptions.map((option) => {
@@ -37229,6 +37431,8 @@ var Select = react.forwardRef(
37229
37431
  onPressOut: () => setHoveredValue((current) => current === option.value ? null : current),
37230
37432
  accessibilityRole: multiple ? "checkbox" : "button",
37231
37433
  accessibilityState: { selected: isSelected, checked: isSelected, disabled },
37434
+ role: reactNative.Platform.OS === "web" ? "option" : void 0,
37435
+ "aria-selected": isSelected,
37232
37436
  style: [
37233
37437
  styles34.item,
37234
37438
  {
@@ -37269,6 +37473,7 @@ var Select = react.forwardRef(
37269
37473
  accessibilityRole: "combobox",
37270
37474
  accessibilityLabel: resolvedAccessibilityLabel,
37271
37475
  accessibilityState: { disabled, expanded: isOpen },
37476
+ "aria-expanded": isOpen,
37272
37477
  style: [
37273
37478
  styles34.trigger,
37274
37479
  {
@@ -37752,6 +37957,8 @@ var Toggle = react.forwardRef(function Toggle2({
37752
37957
  accessibilityRole: "switch",
37753
37958
  accessibilityLabel: resolvedAccessibilityLabel,
37754
37959
  accessibilityState: { checked: isActive, disabled },
37960
+ "aria-checked": isActive,
37961
+ ...reactNative.Platform.OS === "web" && !disabled ? { onKeyDown: (event) => handleWebToggleKeyDown(event, handlePress) } : null,
37755
37962
  style: [styles36.pressable, disabled && styles36.disabled, style],
37756
37963
  children: [
37757
37964
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -37903,7 +38110,7 @@ var BASE_ITEM_SIZE = 16;
37903
38110
  var ICON_WIDTH_RATIO = 12.57 / BASE_ITEM_SIZE;
37904
38111
  var ICON_HEIGHT_RATIO = 11.98 / BASE_ITEM_SIZE;
37905
38112
  var STAR_GAP_RATIO = 2 / BASE_ITEM_SIZE;
37906
- function clamp2(value) {
38113
+ function clamp(value) {
37907
38114
  return Math.max(0, Math.min(value, STAR_COUNT));
37908
38115
  }
37909
38116
  var RatingInput = react.forwardRef(
@@ -37927,8 +38134,8 @@ var RatingInput = react.forwardRef(
37927
38134
  const containerRef = react.useRef(null);
37928
38135
  const setContainerRef = react.useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
37929
38136
  const isControlled = value !== void 0;
37930
- const [uncontrolledValue, setUncontrolledValue] = react.useState(() => clamp2(defaultValue));
37931
- const selectedValue = clamp2(isControlled ? value : uncontrolledValue);
38137
+ const [uncontrolledValue, setUncontrolledValue] = react.useState(() => clamp(defaultValue));
38138
+ const selectedValue = clamp(isControlled ? value : uncontrolledValue);
37932
38139
  const selectedStarCount = Math.round(selectedValue);
37933
38140
  const iconWidth = size * ICON_WIDTH_RATIO;
37934
38141
  const iconHeight = size * ICON_HEIGHT_RATIO;
@@ -39091,6 +39298,12 @@ var RadioButton = react.forwardRef(
39091
39298
  accessibilityRole: "radio",
39092
39299
  accessibilityLabel: resolvedAccessibilityLabel,
39093
39300
  accessibilityState: { selected: isActive, disabled },
39301
+ ...reactNative.Platform.OS === "web" ? {
39302
+ "aria-checked": isActive,
39303
+ ...disabled ? null : {
39304
+ onKeyDown: (event) => handleWebToggleKeyDown(event, handlePress)
39305
+ }
39306
+ } : null,
39094
39307
  style: [styles42.root, disabled && styles42.disabled, style],
39095
39308
  children: [
39096
39309
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles42.control, children: isActive ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles42.dot }) : null }),
@@ -39416,6 +39629,7 @@ exports.WasherIcon = WasherIcon;
39416
39629
  exports.WhatsAppIcon = WhatsAppIcon;
39417
39630
  exports.ZoomOutIcon = ZoomOutIcon;
39418
39631
  exports.abbreviateMonthName = abbreviateMonthName;
39632
+ exports.abbreviateMonthNames = abbreviateMonthNames;
39419
39633
  exports.avatarTypography = avatarTypography;
39420
39634
  exports.badgeTypography = badgeTypography;
39421
39635
  exports.buttonTypography = buttonTypography;