@ecohouse/ui 0.1.34 → 0.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -7403,7 +7403,7 @@ var require_react_dom_development = __commonJS({
7403
7403
  var HostPortal = 4;
7404
7404
  var HostComponent = 5;
7405
7405
  var HostText = 6;
7406
- var Fragment3 = 7;
7406
+ var Fragment4 = 7;
7407
7407
  var Mode = 8;
7408
7408
  var ContextConsumer = 9;
7409
7409
  var ContextProvider = 10;
@@ -8558,7 +8558,7 @@ var require_react_dom_development = __commonJS({
8558
8558
  return "DehydratedFragment";
8559
8559
  case ForwardRef:
8560
8560
  return getWrappedName$1(type, type.render, "ForwardRef");
8561
- case Fragment3:
8561
+ case Fragment4:
8562
8562
  return "Fragment";
8563
8563
  case HostComponent:
8564
8564
  return type;
@@ -16983,7 +16983,7 @@ var require_react_dom_development = __commonJS({
16983
16983
  }
16984
16984
  }
16985
16985
  function updateFragment2(returnFiber, current2, fragment, lanes, key) {
16986
- if (current2 === null || current2.tag !== Fragment3) {
16986
+ if (current2 === null || current2.tag !== Fragment4) {
16987
16987
  var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
16988
16988
  created.return = returnFiber;
16989
16989
  return created;
@@ -17386,7 +17386,7 @@ var require_react_dom_development = __commonJS({
17386
17386
  if (child.key === key) {
17387
17387
  var elementType = element.type;
17388
17388
  if (elementType === REACT_FRAGMENT_TYPE) {
17389
- if (child.tag === Fragment3) {
17389
+ if (child.tag === Fragment4) {
17390
17390
  deleteRemainingChildren(returnFiber, child.sibling);
17391
17391
  var existing = useFiber(child, element.props.children);
17392
17392
  existing.return = returnFiber;
@@ -22860,7 +22860,7 @@ var require_react_dom_development = __commonJS({
22860
22860
  var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
22861
22861
  return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
22862
22862
  }
22863
- case Fragment3:
22863
+ case Fragment4:
22864
22864
  return updateFragment(current2, workInProgress2, renderLanes2);
22865
22865
  case Mode:
22866
22866
  return updateMode(current2, workInProgress2, renderLanes2);
@@ -23132,7 +23132,7 @@ var require_react_dom_development = __commonJS({
23132
23132
  case SimpleMemoComponent:
23133
23133
  case FunctionComponent:
23134
23134
  case ForwardRef:
23135
- case Fragment3:
23135
+ case Fragment4:
23136
23136
  case Mode:
23137
23137
  case Profiler:
23138
23138
  case ContextConsumer:
@@ -27384,7 +27384,7 @@ var require_react_dom_development = __commonJS({
27384
27384
  return fiber;
27385
27385
  }
27386
27386
  function createFiberFromFragment(elements, mode, lanes, key) {
27387
- var fiber = createFiber(Fragment3, elements, key, mode);
27387
+ var fiber = createFiber(Fragment4, elements, key, mode);
27388
27388
  fiber.lanes = lanes;
27389
27389
  return fiber;
27390
27390
  }
@@ -28619,8 +28619,8 @@ var languageSwitcherTypography = {
28619
28619
  fontFamily: fonts.sans,
28620
28620
  fontSize: 14,
28621
28621
  fontWeight: "600",
28622
- lineHeight: 19,
28623
- letterSpacing: 0
28622
+ lineHeight: 14,
28623
+ letterSpacing: 0.42
28624
28624
  };
28625
28625
  var counterTypography = {
28626
28626
  fontFamily: fonts.sans,
@@ -29415,9 +29415,9 @@ function HeadsetIcon({ size = 24, color = "#B76533", strokeWidth = 2 }) {
29415
29415
  }
29416
29416
 
29417
29417
  // src/icons/Globe/globePath.ts
29418
- var GLOBE_PATH = "M18.3333 10C18.3333 14.6024 14.6024 18.3333 10 18.3333M18.3333 10C18.3333 5.39763 14.6024 1.66667 10 1.66667M18.3333 10H1.66667M10 18.3333C5.39763 18.3333 1.66667 14.6024 1.66667 10M10 18.3333C12.0833 16.0511 13.2675 13.0836 13.3333 10C13.2675 6.91643 12.0833 3.94892 10 1.66667M10 18.3333C7.91667 16.0511 6.73248 13.0836 6.66667 10C6.73248 6.91643 7.91667 3.94892 10 1.66667M1.66667 10C1.66667 5.39763 5.39763 1.66667 10 1.66667";
29419
- function GlobeIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
29420
- return /* @__PURE__ */ jsxRuntime.jsx(Svg20__default.default, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
29418
+ var GLOBE_PATH = "M1.3335 8.00004H14.6668M1.3335 8.00004C1.3335 11.6819 4.31826 14.6667 8.00016 14.6667M1.3335 8.00004C1.3335 4.31814 4.31826 1.33337 8.00016 1.33337M14.6668 8.00004C14.6668 11.6819 11.6821 14.6667 8.00016 14.6667M14.6668 8.00004C14.6668 4.31814 11.6821 1.33337 8.00016 1.33337M8.00016 1.33337C9.66768 3.15894 10.6153 5.52806 10.6668 8.00004C10.6153 10.472 9.66768 12.8411 8.00016 14.6667M8.00016 1.33337C6.33264 3.15894 5.38499 5.52806 5.3335 8.00004C5.38499 10.472 6.33264 12.8411 8.00016 14.6667";
29419
+ function GlobeIcon({ size = 16, color = colors.primary, strokeWidth = 1.5 }) {
29420
+ return /* @__PURE__ */ jsxRuntime.jsx(Svg20__default.default, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
29421
29421
  Svg20.Path,
29422
29422
  {
29423
29423
  d: GLOBE_PATH,
@@ -29485,7 +29485,7 @@ function InstagramIcon({ size = 20, color = colors.white }) {
29485
29485
  }
29486
29486
 
29487
29487
  // src/icons/Key/keyPath.ts
29488
- var KEY_PATH = "M5.28673 10.0002L7.0545 11.768M7.6435 7.64301L9.41127 9.41078M10.0003 5.28624L11.768 7.05401M4.22553 11.0604L11.0609 4.22505C11.7209 3.56502 12.0513 3.235 12.4318 3.11136C12.7666 3.00259 13.127 3.00259 13.4618 3.11136C13.8421 3.23494 14.1718 3.56464 14.8311 4.22393L15.775 5.16785C16.4351 5.82788 16.7654 6.15867 16.8891 6.53922C16.9979 6.87396 16.9976 7.23381 16.8889 7.56855C16.7652 7.9491 16.4353 8.27937 15.7753 8.9394L8.93989 15.7748C8.27986 16.4348 7.94959 16.7647 7.56904 16.8884C7.2343 16.9971 6.87445 16.9974 6.53971 16.8886C6.15916 16.765 5.82837 16.4346 5.16834 15.7745L4.22441 14.8306C3.56513 14.1713 3.23542 13.8416 3.11185 13.4613C3.00308 13.1266 3.00308 12.7661 3.11185 12.4313C3.23549 12.0508 3.56551 11.7204 4.22553 11.0604Z";
29488
+ var KEY_PATH = "M14.1668 8.33333V6.66667C14.1668 4.36548 12.3013 2.5 10.0002 2.5C7.69898 2.5 5.8335 4.36548 5.8335 6.66667V8.33333M10.0002 12.0833V13.75M7.3335 17.5H12.6668C14.067 17.5 14.767 17.5 15.3018 17.2275C15.7722 16.9878 16.1547 16.6054 16.3943 16.135C16.6668 15.6002 16.6668 14.9001 16.6668 13.5V12.3333C16.6668 10.9332 16.6668 10.2331 16.3943 9.69836C16.1547 9.22795 15.7722 8.8455 15.3018 8.60582C14.767 8.33333 14.067 8.33333 12.6668 8.33333H7.3335C5.93336 8.33333 5.2333 8.33333 4.69852 8.60582C4.22811 8.8455 3.84566 9.22795 3.60598 9.69836C3.3335 10.2331 3.3335 10.9332 3.3335 12.3333V13.5C3.3335 14.9001 3.3335 15.6002 3.60598 16.135C3.84566 16.6054 4.22811 16.9878 4.69852 17.2275C5.2333 17.5 5.93336 17.5 7.3335 17.5Z";
29489
29489
  function KeyIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
29490
29490
  return /* @__PURE__ */ jsxRuntime.jsx(Svg20__default.default, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
29491
29491
  Svg20.Path,
@@ -31038,6 +31038,7 @@ var AccountHeader = react.forwardRef(
31038
31038
  onBackPress,
31039
31039
  onMenuPress,
31040
31040
  onNotificationsPress,
31041
+ languageSlot,
31041
31042
  badge,
31042
31043
  backAccessibilityLabel = "Back",
31043
31044
  menuAccessibilityLabel = "Open menu",
@@ -31117,16 +31118,19 @@ var AccountHeader = react.forwardRef(
31117
31118
  ]
31118
31119
  }
31119
31120
  ),
31120
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles6.end, children: /* @__PURE__ */ jsxRuntime.jsx(
31121
- reactNative.Pressable,
31122
- {
31123
- accessibilityRole: "button",
31124
- accessibilityLabel: notificationsAccessibilityLabel,
31125
- onPress: onNotificationsPress,
31126
- style: styles6.iconButton,
31127
- children: /* @__PURE__ */ jsxRuntime.jsx(BellIcon, { color: colors.white, size: ICON_BUTTON_ICON_SIZE, strokeWidth: 1.5 })
31128
- }
31129
- ) })
31121
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles6.end, children: [
31122
+ languageSlot != null ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles6.languageSlot, children: languageSlot }) : null,
31123
+ /* @__PURE__ */ jsxRuntime.jsx(
31124
+ reactNative.Pressable,
31125
+ {
31126
+ accessibilityRole: "button",
31127
+ accessibilityLabel: notificationsAccessibilityLabel,
31128
+ onPress: onNotificationsPress,
31129
+ style: styles6.iconButton,
31130
+ children: /* @__PURE__ */ jsxRuntime.jsx(BellIcon, { color: colors.white, size: ICON_BUTTON_ICON_SIZE, strokeWidth: 1.5 })
31131
+ }
31132
+ )
31133
+ ] })
31130
31134
  ]
31131
31135
  }
31132
31136
  );
@@ -31146,7 +31150,9 @@ var styles6 = reactNative.StyleSheet.create({
31146
31150
  paddingLeft: 24,
31147
31151
  backgroundColor: colors.dark,
31148
31152
  borderBottomWidth: 1,
31149
- borderBottomColor: colors.grey700
31153
+ borderBottomColor: colors.grey700,
31154
+ zIndex: 40,
31155
+ position: "relative"
31150
31156
  },
31151
31157
  start: {
31152
31158
  flex: 1,
@@ -31169,7 +31175,17 @@ var styles6 = reactNative.StyleSheet.create({
31169
31175
  },
31170
31176
  end: {
31171
31177
  flexShrink: 0,
31172
- marginLeft: RIGHT_GAP
31178
+ marginLeft: RIGHT_GAP,
31179
+ flexDirection: "row",
31180
+ alignItems: "center",
31181
+ gap: 8,
31182
+ zIndex: 50,
31183
+ position: "relative"
31184
+ },
31185
+ languageSlot: {
31186
+ flexShrink: 0,
31187
+ zIndex: 50,
31188
+ position: "relative"
31173
31189
  },
31174
31190
  iconButton: {
31175
31191
  width: ICON_BUTTON_SIZE,
@@ -31784,10 +31800,14 @@ var AccordionItem = react.forwardRef(
31784
31800
  });
31785
31801
  const bodyTextStyle = [styles13.body, { fontSize: bodyFontSize, lineHeight: bodyLineHeight }];
31786
31802
  return /* @__PURE__ */ jsxRuntime.jsxs(
31787
- reactNative.View,
31803
+ reactNative.Pressable,
31788
31804
  {
31789
31805
  ...rest,
31790
31806
  ref: setContainerRef,
31807
+ accessibilityRole: "button",
31808
+ accessibilityState: { expanded: open },
31809
+ accessibilityLabel: accessibilityLabel ?? title,
31810
+ onPress: toggle,
31791
31811
  style: [
31792
31812
  styles13.root,
31793
31813
  {
@@ -31795,30 +31815,21 @@ var AccordionItem = react.forwardRef(
31795
31815
  paddingRight: paddingX,
31796
31816
  paddingLeft: paddingX
31797
31817
  },
31818
+ reactNative.Platform.OS === "web" ? styles13.rootWeb : null,
31798
31819
  style
31799
31820
  ],
31800
31821
  children: [
31801
- /* @__PURE__ */ jsxRuntime.jsxs(
31802
- reactNative.Pressable,
31803
- {
31804
- accessibilityRole: "button",
31805
- accessibilityState: { expanded: open },
31806
- accessibilityLabel: accessibilityLabel ?? title,
31807
- onPress: toggle,
31808
- style: styles13.header,
31809
- children: [
31810
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles13.title, children: title }),
31811
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles13.chevron, { transform: [{ rotate: chevronRotate }] }], children: /* @__PURE__ */ jsxRuntime.jsx(
31812
- ChevronDownIcon,
31813
- {
31814
- size: CHEVRON_SIZE2,
31815
- color: open ? colors.primary : colors.grey400,
31816
- strokeWidth: 2
31817
- }
31818
- ) })
31819
- ]
31820
- }
31821
- ),
31822
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles13.header, children: [
31823
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles13.title, children: title }),
31824
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles13.chevron, { transform: [{ rotate: chevronRotate }] }], children: /* @__PURE__ */ jsxRuntime.jsx(
31825
+ ChevronDownIcon,
31826
+ {
31827
+ size: CHEVRON_SIZE2,
31828
+ color: open ? colors.primary : colors.grey400,
31829
+ strokeWidth: 2
31830
+ }
31831
+ ) })
31832
+ ] }),
31822
31833
  /* @__PURE__ */ jsxRuntime.jsx(
31823
31834
  reactNative.View,
31824
31835
  {
@@ -31828,7 +31839,7 @@ var AccordionItem = react.forwardRef(
31828
31839
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: bodyTextStyle, children })
31829
31840
  }
31830
31841
  ),
31831
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles13.bodyClip, { height: bodyHeight }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles13.bodyInner, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: bodyTextStyle, children }) }) })
31842
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles13.bodyClip, { height: bodyHeight }], pointerEvents: "none", children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles13.bodyInner, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: bodyTextStyle, children }) }) })
31832
31843
  ]
31833
31844
  }
31834
31845
  );
@@ -31843,6 +31854,9 @@ var styles13 = reactNative.StyleSheet.create({
31843
31854
  opacity: 1,
31844
31855
  overflow: "hidden"
31845
31856
  },
31857
+ rootWeb: {
31858
+ cursor: "pointer"
31859
+ },
31846
31860
  header: {
31847
31861
  flexDirection: "row",
31848
31862
  alignItems: "center",
@@ -32608,6 +32622,12 @@ var defaultLanguageOptions = [
32608
32622
  var CONTROL_WIDTH = 90;
32609
32623
  var CONTROL_HEIGHT = 35;
32610
32624
  var ICON_SIZE8 = 16;
32625
+ var ICON_BUTTON_SIZE2 = 32;
32626
+ var ICON_MENU_WIDTH = 67;
32627
+ var ICON_MENU_HEIGHT = 129;
32628
+ var ICON_MENU_TOP = 39;
32629
+ var ITEM_HEIGHT = 35;
32630
+ var ACTIVE_ITEM_BACKGROUND = "#E38E5E12";
32611
32631
  var LanguageSwitcher = react.forwardRef(
32612
32632
  function LanguageSwitcher2({
32613
32633
  options = defaultLanguageOptions,
@@ -32618,6 +32638,7 @@ var LanguageSwitcher = react.forwardRef(
32618
32638
  defaultOpen = false,
32619
32639
  onOpenChange,
32620
32640
  disabled = false,
32641
+ variant = "default",
32621
32642
  accessibilityLabel = "Language",
32622
32643
  style,
32623
32644
  className,
@@ -32637,6 +32658,7 @@ var LanguageSwitcher = react.forwardRef(
32637
32658
  const selectedValue = isValueControlled ? value : uncontrolledValue;
32638
32659
  const isOpen = isOpenControlled ? openProp : uncontrolledOpen;
32639
32660
  const selectedOption = options.find((option) => option.value === selectedValue) ?? options[0] ?? null;
32661
+ const isIconVariant = variant === "icon";
32640
32662
  useApplyWebClassName(wrapperRef, className?.trim() || void 0);
32641
32663
  const setOpen = react.useCallback(
32642
32664
  (next) => {
@@ -32687,7 +32709,14 @@ var LanguageSwitcher = react.forwardRef(
32687
32709
  {
32688
32710
  ...rest,
32689
32711
  ref: setWrapperRef,
32690
- style: [styles18.wrapper, isOpen && styles18.wrapperOpen, disabled && styles18.disabled, style],
32712
+ style: [
32713
+ styles18.wrapper,
32714
+ isIconVariant ? styles18.wrapperIcon : styles18.wrapperDefault,
32715
+ isOpen && styles18.wrapperOpen,
32716
+ isOpen && isIconVariant && styles18.wrapperOpenIcon,
32717
+ disabled && styles18.disabled,
32718
+ style
32719
+ ],
32691
32720
  children: [
32692
32721
  /* @__PURE__ */ jsxRuntime.jsxs(
32693
32722
  reactNative.Pressable,
@@ -32702,36 +32731,55 @@ var LanguageSwitcher = react.forwardRef(
32702
32731
  onHoverIn: () => setTriggerHovered(true),
32703
32732
  onHoverOut: () => setTriggerHovered(false),
32704
32733
  style: ({ pressed }) => [
32705
- styles18.trigger,
32706
- (triggerHovered || pressed || isOpen) && styles18.triggerActive
32734
+ isIconVariant ? styles18.triggerIcon : styles18.trigger,
32735
+ !isIconVariant && (triggerHovered || pressed || isOpen) && styles18.triggerActive
32707
32736
  ],
32708
32737
  children: [
32709
- /* @__PURE__ */ jsxRuntime.jsx(GlobeIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: 2 }),
32710
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles18.triggerLabel, numberOfLines: 1, children: selectedOption?.label ?? "" }),
32711
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.chevron, isOpen && styles18.chevronOpen], children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: 2 }) })
32738
+ /* @__PURE__ */ jsxRuntime.jsx(GlobeIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: isIconVariant ? 1.5 : 2 }),
32739
+ !isIconVariant ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
32740
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles18.triggerLabel, numberOfLines: 1, children: selectedOption?.label ?? "" }),
32741
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.chevron, isOpen && styles18.chevronOpen], children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: 2 }) })
32742
+ ] }) : null
32712
32743
  ]
32713
32744
  }
32714
32745
  ),
32715
- isOpen && options.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.menu, accessibilityRole: "menu", children: options.map((option) => {
32716
- const selected = option.value === selectedValue;
32717
- return /* @__PURE__ */ jsxRuntime.jsx(
32718
- reactNative.Pressable,
32719
- {
32720
- onPress: () => selectLanguage(option.value),
32721
- accessibilityRole: "menuitem",
32722
- accessibilityLabel: option.label,
32723
- accessibilityState: { selected },
32724
- onHoverIn: () => setHoveredValue(option.value),
32725
- onHoverOut: () => setHoveredValue(null),
32726
- style: ({ pressed }) => [
32727
- styles18.item,
32728
- selected ? styles18.itemSelected : (hoveredValue === option.value || pressed) && styles18.itemHovered
32729
- ],
32730
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles18.itemLabel, selected && styles18.itemLabelSelected], children: option.label })
32731
- },
32732
- option.value
32733
- );
32734
- }) }) : null
32746
+ isOpen && options.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
32747
+ reactNative.View,
32748
+ {
32749
+ style: [styles18.menu, isIconVariant ? styles18.menuIcon : styles18.menuDefault],
32750
+ accessibilityRole: "menu",
32751
+ children: options.map((option) => {
32752
+ const selected = option.value === selectedValue;
32753
+ return /* @__PURE__ */ jsxRuntime.jsx(
32754
+ reactNative.Pressable,
32755
+ {
32756
+ onPress: () => selectLanguage(option.value),
32757
+ accessibilityRole: "menuitem",
32758
+ accessibilityLabel: option.label,
32759
+ accessibilityState: { selected },
32760
+ onHoverIn: () => setHoveredValue(option.value),
32761
+ onHoverOut: () => setHoveredValue(null),
32762
+ style: ({ pressed }) => [
32763
+ styles18.item,
32764
+ isIconVariant ? styles18.itemIcon : null,
32765
+ selected ? isIconVariant ? styles18.itemSelectedIcon : styles18.itemSelected : (hoveredValue === option.value || pressed) && styles18.itemHovered
32766
+ ],
32767
+ children: /* @__PURE__ */ jsxRuntime.jsx(
32768
+ reactNative.Text,
32769
+ {
32770
+ style: [
32771
+ styles18.itemLabel,
32772
+ selected && (isIconVariant ? styles18.itemLabelSelectedIcon : styles18.itemLabelSelected)
32773
+ ],
32774
+ children: option.label
32775
+ }
32776
+ )
32777
+ },
32778
+ option.value
32779
+ );
32780
+ })
32781
+ }
32782
+ ) : null
32735
32783
  ]
32736
32784
  }
32737
32785
  );
@@ -32740,11 +32788,19 @@ var LanguageSwitcher = react.forwardRef(
32740
32788
  var styles18 = reactNative.StyleSheet.create({
32741
32789
  wrapper: {
32742
32790
  position: "relative",
32743
- width: CONTROL_WIDTH,
32744
32791
  alignSelf: "flex-start"
32745
32792
  },
32793
+ wrapperDefault: {
32794
+ width: CONTROL_WIDTH
32795
+ },
32796
+ wrapperIcon: {
32797
+ width: ICON_BUTTON_SIZE2
32798
+ },
32746
32799
  wrapperOpen: {
32747
- zIndex: 20
32800
+ zIndex: 100
32801
+ },
32802
+ wrapperOpenIcon: {
32803
+ zIndex: 200
32748
32804
  },
32749
32805
  disabled: {
32750
32806
  opacity: 0.6
@@ -32759,6 +32815,17 @@ var styles18 = reactNative.StyleSheet.create({
32759
32815
  borderRadius: 12,
32760
32816
  backgroundColor: "transparent"
32761
32817
  },
32818
+ triggerIcon: {
32819
+ width: ICON_BUTTON_SIZE2,
32820
+ height: ICON_BUTTON_SIZE2,
32821
+ padding: 8,
32822
+ alignItems: "center",
32823
+ justifyContent: "center",
32824
+ borderRadius: 5,
32825
+ backgroundColor: colors.grey800,
32826
+ borderWidth: 1,
32827
+ borderColor: colors.grey700
32828
+ },
32762
32829
  triggerActive: {
32763
32830
  backgroundColor: colors.whiteAlpha6
32764
32831
  },
@@ -32781,22 +32848,42 @@ var styles18 = reactNative.StyleSheet.create({
32781
32848
  },
32782
32849
  menu: {
32783
32850
  position: "absolute",
32851
+ padding: 8,
32852
+ borderRadius: 12,
32853
+ overflow: "hidden"
32854
+ },
32855
+ menuDefault: {
32784
32856
  top: CONTROL_HEIGHT + 8,
32785
32857
  left: 0,
32786
32858
  width: CONTROL_WIDTH,
32787
- padding: 8,
32788
32859
  gap: 8,
32789
- borderRadius: 12,
32790
- backgroundColor: colors.whiteAlpha6,
32791
- overflow: "hidden"
32860
+ backgroundColor: colors.whiteAlpha6
32861
+ },
32862
+ menuIcon: {
32863
+ top: ICON_MENU_TOP,
32864
+ left: (ICON_BUTTON_SIZE2 - ICON_MENU_WIDTH) / 2,
32865
+ right: "auto",
32866
+ width: ICON_MENU_WIDTH,
32867
+ height: ICON_MENU_HEIGHT,
32868
+ gap: 4,
32869
+ opacity: 1,
32870
+ zIndex: 200,
32871
+ backgroundColor: colors.grey800,
32872
+ borderWidth: 1,
32873
+ borderColor: colors.grey700
32792
32874
  },
32793
32875
  item: {
32794
- height: CONTROL_HEIGHT,
32876
+ height: ITEM_HEIGHT,
32795
32877
  alignItems: "center",
32796
32878
  justifyContent: "center",
32797
32879
  paddingVertical: 8,
32798
32880
  paddingHorizontal: 12,
32799
- borderRadius: 8
32881
+ borderRadius: 8,
32882
+ gap: 8
32883
+ },
32884
+ itemIcon: {
32885
+ width: 51,
32886
+ alignSelf: "stretch"
32800
32887
  },
32801
32888
  itemHovered: {
32802
32889
  backgroundColor: colors.whiteAlpha6
@@ -32804,6 +32891,9 @@ var styles18 = reactNative.StyleSheet.create({
32804
32891
  itemSelected: {
32805
32892
  backgroundColor: colors.whiteAlpha6
32806
32893
  },
32894
+ itemSelectedIcon: {
32895
+ backgroundColor: ACTIVE_ITEM_BACKGROUND
32896
+ },
32807
32897
  itemLabel: {
32808
32898
  ...languageSwitcherTypography,
32809
32899
  ...reactNative.Platform.select({ web: { fontFamily: `${fonts.sans}, sans-serif` } }),
@@ -32811,6 +32901,9 @@ var styles18 = reactNative.StyleSheet.create({
32811
32901
  },
32812
32902
  itemLabelSelected: {
32813
32903
  color: colors.primary
32904
+ },
32905
+ itemLabelSelectedIcon: {
32906
+ color: colors.primary
32814
32907
  }
32815
32908
  });
32816
32909
  var ICON_SIZE9 = 25.63181;
@@ -33231,14 +33324,22 @@ var DEFAULT_WEEKDAY_LABELS = ["\u0535\u0550", "\u0535\u0554", "\u0549\u0550", "\
33231
33324
  var EMPTY_RANGE = { start: null, end: null };
33232
33325
  var DEFAULT_WIDTH = 320;
33233
33326
  var DEFAULT_MENU_HEIGHT = 388;
33327
+ var MENU_CONTENT_WIDTH = 296;
33234
33328
  var RANGE_TRIGGER_WIDTH = 382;
33235
33329
  var TRIGGER_HEIGHT = 44;
33236
33330
  var TRIGGER_RADIUS = 60;
33237
33331
  var MENU_RADIUS2 = 20;
33332
+ var MENU_PADDING = 12;
33238
33333
  var ICON_SIZE10 = 20;
33239
33334
  var NAV_ICON_SIZE = 20;
33335
+ var HEADER_HEIGHT3 = 36;
33336
+ var WEEKDAY_ROW_HEIGHT = 44;
33337
+ var WEEKDAY_ROW_GAP = 8;
33338
+ var WEEK_ROW_GAP = 16;
33339
+ var DAY_CELL_WIDTH = 42.28571701049805;
33240
33340
  var DAY_CELL_HEIGHT = 44;
33241
- var DAY_CIRCLE_SIZE = 44;
33341
+ var DAY_CELL_RADIUS = 67;
33342
+ var DAY_CELL_PADDING = 12;
33242
33343
  function RangeTriggerField({
33243
33344
  label,
33244
33345
  value,
@@ -33522,7 +33623,7 @@ var DatePicker = react.forwardRef(
33522
33623
  )
33523
33624
  ] }),
33524
33625
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { children: [
33525
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.weekdayRow, children: weekdayLabels.map((weekdayLabel, index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.dayCellWrap, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles22.weekdayText, children: weekdayLabel }) }, `${weekdayLabel}-${index}`)) }),
33626
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.weekdayRow, children: weekdayLabels.map((weekdayLabel, index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.weekdayCell, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles22.weekdayText, children: weekdayLabel }) }, `${weekdayLabel}-${index}`)) }),
33526
33627
  weeks.map((week, weekIndex) => {
33527
33628
  let rangeHighlightStyle = null;
33528
33629
  if (isRange && rangeValue.start && rangeValue.end) {
@@ -33746,10 +33847,11 @@ var styles22 = reactNative.StyleSheet.create({
33746
33847
  marginTop: 8,
33747
33848
  zIndex: 10,
33748
33849
  borderRadius: MENU_RADIUS2,
33749
- padding: 12,
33850
+ padding: MENU_PADDING,
33750
33851
  gap: 0,
33751
33852
  opacity: 1,
33752
33853
  backgroundColor: colors.grey700,
33854
+ overflow: "hidden",
33753
33855
  ...reactNative.Platform.select({
33754
33856
  web: {
33755
33857
  boxShadow: `0 8px 24px ${colors.black}73`
@@ -33778,14 +33880,17 @@ var styles22 = reactNative.StyleSheet.create({
33778
33880
  width: RANGE_TRIGGER_WIDTH
33779
33881
  },
33780
33882
  calendarHeader: {
33781
- height: 36,
33883
+ height: HEADER_HEIGHT3,
33884
+ paddingTop: 8,
33885
+ paddingBottom: 8,
33782
33886
  flexDirection: "row",
33783
33887
  alignItems: "center",
33784
- justifyContent: "space-between"
33888
+ justifyContent: "space-between",
33889
+ opacity: 1
33785
33890
  },
33786
33891
  navButton: {
33787
- width: 36,
33788
- height: 36,
33892
+ width: HEADER_HEIGHT3,
33893
+ height: HEADER_HEIGHT3,
33789
33894
  alignItems: "center",
33790
33895
  justifyContent: "center"
33791
33896
  },
@@ -33798,7 +33903,21 @@ var styles22 = reactNative.StyleSheet.create({
33798
33903
  textAlign: "center"
33799
33904
  },
33800
33905
  weekdayRow: {
33801
- flexDirection: "row"
33906
+ width: MENU_CONTENT_WIDTH,
33907
+ height: WEEKDAY_ROW_HEIGHT,
33908
+ marginTop: WEEKDAY_ROW_GAP,
33909
+ flexDirection: "row",
33910
+ alignItems: "center",
33911
+ opacity: 1
33912
+ },
33913
+ weekdayCell: {
33914
+ width: DAY_CELL_WIDTH,
33915
+ height: WEEKDAY_ROW_HEIGHT,
33916
+ flexGrow: 1,
33917
+ flexShrink: 1,
33918
+ flexBasis: 0,
33919
+ alignItems: "center",
33920
+ justifyContent: "center"
33802
33921
  },
33803
33922
  weekdayText: {
33804
33923
  ...datePickerTypography.weekday,
@@ -33807,29 +33926,36 @@ var styles22 = reactNative.StyleSheet.create({
33807
33926
  textTransform: "uppercase"
33808
33927
  },
33809
33928
  weekRow: {
33929
+ width: MENU_CONTENT_WIDTH,
33810
33930
  flexDirection: "row",
33811
33931
  position: "relative"
33812
33932
  },
33813
33933
  weekRowSpaced: {
33814
- marginTop: 8
33934
+ marginTop: WEEK_ROW_GAP
33815
33935
  },
33816
33936
  rangeHighlight: {
33817
33937
  position: "absolute",
33818
- top: (DAY_CELL_HEIGHT - DAY_CIRCLE_SIZE) / 2,
33819
- bottom: (DAY_CELL_HEIGHT - DAY_CIRCLE_SIZE) / 2,
33820
- borderRadius: DAY_CIRCLE_SIZE / 2,
33938
+ top: 0,
33939
+ bottom: 0,
33940
+ borderRadius: DAY_CELL_RADIUS,
33821
33941
  backgroundColor: colors.primaryHover
33822
33942
  },
33823
33943
  dayCellWrap: {
33824
- flex: 1,
33944
+ width: DAY_CELL_WIDTH,
33825
33945
  height: DAY_CELL_HEIGHT,
33946
+ flexGrow: 1,
33947
+ flexShrink: 1,
33948
+ flexBasis: 0,
33826
33949
  alignItems: "center",
33827
- justifyContent: "center"
33950
+ justifyContent: "center",
33951
+ opacity: 1
33828
33952
  },
33829
33953
  dayCircle: {
33830
- width: DAY_CIRCLE_SIZE,
33831
- height: DAY_CIRCLE_SIZE,
33832
- borderRadius: DAY_CIRCLE_SIZE / 2,
33954
+ width: "100%",
33955
+ height: "100%",
33956
+ borderRadius: DAY_CELL_RADIUS,
33957
+ padding: DAY_CELL_PADDING,
33958
+ gap: 10,
33833
33959
  alignItems: "center",
33834
33960
  justifyContent: "center"
33835
33961
  },
@@ -34140,6 +34266,8 @@ var Input = react.forwardRef(function Input2({
34140
34266
  const [focused, setFocused] = react.useState(false);
34141
34267
  const [uncontrolledValue, setUncontrolledValue] = react.useState(defaultValue ?? "");
34142
34268
  const metrics = sizeConfig2[size];
34269
+ const reactId = react.useId();
34270
+ const inputDomId = `eh-input-${reactId.replace(/:/g, "")}`;
34143
34271
  const isControlled = typeof value === "string";
34144
34272
  const currentValue = isControlled ? value : uncontrolledValue;
34145
34273
  const hasValue = currentValue.length > 0;
@@ -34156,28 +34284,37 @@ var Input = react.forwardRef(function Input2({
34156
34284
  size: metrics.iconSize,
34157
34285
  color: chrome.rightIconColor
34158
34286
  });
34287
+ const focusInput = () => {
34288
+ if (disabled) return;
34289
+ inputRef.current?.focus();
34290
+ };
34159
34291
  useApplyWebClassName(rootRef, className);
34160
34292
  useApplyWebClassName(inputRef, inputClassName);
34293
+ const fieldChromeStyle = [
34294
+ styles25.field,
34295
+ {
34296
+ height: metrics.height,
34297
+ borderRadius: metrics.borderRadius,
34298
+ paddingTop: metrics.paddingVertical,
34299
+ paddingBottom: metrics.paddingVertical,
34300
+ paddingLeft: metrics.paddingHorizontal,
34301
+ paddingRight: metrics.paddingHorizontal,
34302
+ gap: metrics.gap,
34303
+ borderColor: chrome.borderColor,
34304
+ backgroundColor: chrome.backgroundColor
34305
+ },
34306
+ reactNative.Platform.OS === "web" ? styles25.fieldWeb : null,
34307
+ fieldStyle
34308
+ ];
34161
34309
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [styles25.root, disabled && styles25.disabled, style], children: [
34162
- showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.label, { color: chrome.labelColor }], children: label }) : null,
34310
+ showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { disabled, onPress: focusInput, style: styles25.labelPressable, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.label, { color: chrome.labelColor }], children: label }) }) : null,
34163
34311
  /* @__PURE__ */ jsxRuntime.jsxs(
34164
- reactNative.View,
34312
+ reactNative.Pressable,
34165
34313
  {
34166
- style: [
34167
- styles25.field,
34168
- {
34169
- height: metrics.height,
34170
- borderRadius: metrics.borderRadius,
34171
- paddingTop: metrics.paddingVertical,
34172
- paddingBottom: metrics.paddingVertical,
34173
- paddingLeft: metrics.paddingHorizontal,
34174
- paddingRight: metrics.paddingHorizontal,
34175
- gap: metrics.gap,
34176
- borderColor: chrome.borderColor,
34177
- backgroundColor: chrome.backgroundColor
34178
- },
34179
- fieldStyle
34180
- ],
34314
+ accessibilityRole: "none",
34315
+ disabled,
34316
+ onPress: focusInput,
34317
+ style: fieldChromeStyle,
34181
34318
  children: [
34182
34319
  hasLeftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles25.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: leftIconNode }) : null,
34183
34320
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -34185,6 +34322,7 @@ var Input = react.forwardRef(function Input2({
34185
34322
  {
34186
34323
  ref: setInputRef,
34187
34324
  ...textInputProps,
34325
+ nativeID: inputDomId,
34188
34326
  value: isControlled ? value : void 0,
34189
34327
  defaultValue: isControlled ? void 0 : defaultValue,
34190
34328
  editable: !disabled,
@@ -34225,7 +34363,16 @@ var Input = react.forwardRef(function Input2({
34225
34363
  hitSlop: 8,
34226
34364
  children: rightIconNode
34227
34365
  }
34228
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles25.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: rightIconNode }) : null
34366
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
34367
+ reactNative.Pressable,
34368
+ {
34369
+ accessibilityRole: "none",
34370
+ disabled,
34371
+ onPress: focusInput,
34372
+ style: [styles25.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }],
34373
+ children: rightIconNode
34374
+ }
34375
+ ) : null
34229
34376
  ]
34230
34377
  }
34231
34378
  ),
@@ -34241,6 +34388,9 @@ var styles25 = reactNative.StyleSheet.create({
34241
34388
  disabled: {
34242
34389
  opacity: 0.6
34243
34390
  },
34391
+ labelPressable: {
34392
+ alignSelf: "flex-start"
34393
+ },
34244
34394
  label: {
34245
34395
  ...inputTypography.label
34246
34396
  },
@@ -34249,13 +34399,21 @@ var styles25 = reactNative.StyleSheet.create({
34249
34399
  flexDirection: "row",
34250
34400
  alignItems: "center"
34251
34401
  },
34402
+ fieldWeb: {
34403
+ // Web-only cursor for the clickable field chrome.
34404
+ cursor: "text"
34405
+ },
34252
34406
  input: {
34253
34407
  flex: 1,
34408
+ alignSelf: "stretch",
34254
34409
  paddingVertical: 0,
34255
34410
  margin: 0
34256
34411
  },
34257
34412
  inputWeb: {
34258
- outlineStyle: "none"
34413
+ outlineStyle: "none",
34414
+ height: "100%",
34415
+ minWidth: 0,
34416
+ cursor: "text"
34259
34417
  },
34260
34418
  inputAndroid: {
34261
34419
  includeFontPadding: false
@@ -34618,6 +34776,7 @@ var Select = react.forwardRef(
34618
34776
  emptyText = "No results",
34619
34777
  valueColor,
34620
34778
  style,
34779
+ menuStyle,
34621
34780
  className,
34622
34781
  accessibilityLabel,
34623
34782
  // Pulled out only to keep them off `rest` (which is spread onto the root View);
@@ -34645,6 +34804,8 @@ var Select = react.forwardRef(
34645
34804
  const [uncontrolledOpen, setUncontrolledOpen] = react.useState(defaultOpen);
34646
34805
  const [searchQuery, setSearchQuery] = react.useState("");
34647
34806
  const [hoveredValue, setHoveredValue] = react.useState(null);
34807
+ const [menuAlignEnd, setMenuAlignEnd] = react.useState(false);
34808
+ const [menuPlaceAbove, setMenuPlaceAbove] = react.useState(false);
34648
34809
  const selectedValues = react.useMemo(() => {
34649
34810
  const current = isValueControlled ? valueProp : multiple ? uncontrolledMultiple : uncontrolledSingle;
34650
34811
  return toArray(current);
@@ -34663,6 +34824,23 @@ var Select = react.forwardRef(
34663
34824
  return options.filter((option) => option.label.toLowerCase().includes(query));
34664
34825
  }, [isExternalSearch, options, searchQuery]);
34665
34826
  useApplyWebClassName(rootRef, className);
34827
+ const resolvedMenuWidth = react.useMemo(() => {
34828
+ const flat = reactNative.StyleSheet.flatten(menuStyle);
34829
+ const width = flat?.width;
34830
+ if (typeof width === "number") return width;
34831
+ const minWidth = flat?.minWidth;
34832
+ if (typeof minWidth === "number") return minWidth;
34833
+ return null;
34834
+ }, [menuStyle]);
34835
+ const estimatedMenuHeight = react.useMemo(() => {
34836
+ const searchBlock = showSearch ? 40 + 8 : 0;
34837
+ const optionCount = Math.max(filteredOptions.length, 1);
34838
+ const listHeight = Math.min(
34839
+ optionCount * 43 + Math.max(0, optionCount - 1) * 8,
34840
+ MENU_MAX_LIST_HEIGHT
34841
+ );
34842
+ return 24 + searchBlock + listHeight;
34843
+ }, [filteredOptions.length, showSearch]);
34666
34844
  const setOpen = react.useCallback(
34667
34845
  (next) => {
34668
34846
  if (!isOpenControlled) setUncontrolledOpen(next);
@@ -34672,11 +34850,37 @@ var Select = react.forwardRef(
34672
34850
  } else {
34673
34851
  setSearchQuery("");
34674
34852
  setHoveredValue(null);
34853
+ setMenuAlignEnd(false);
34854
+ setMenuPlaceAbove(false);
34675
34855
  onSearchChange?.("");
34676
34856
  }
34677
34857
  },
34678
34858
  [isOpenControlled, onOpenChange, onSearchChange, selectedValues]
34679
34859
  );
34860
+ react.useLayoutEffect(() => {
34861
+ if (reactNative.Platform.OS !== "web" || !isOpen) return;
34862
+ const updateMenuPlacement = () => {
34863
+ const trigger = triggerRef.current;
34864
+ const rect = trigger?.getBoundingClientRect?.();
34865
+ if (!rect) return;
34866
+ const viewportPadding = 8;
34867
+ const gap = 8;
34868
+ const menuWidth = Math.max(rect.width, resolvedMenuWidth ?? 0);
34869
+ const overflowsRight = rect.left + menuWidth > window.innerWidth - viewportPadding;
34870
+ setMenuAlignEnd(overflowsRight);
34871
+ const spaceBelow = window.innerHeight - viewportPadding - rect.bottom;
34872
+ const spaceAbove = rect.top - viewportPadding;
34873
+ const needsAbove = estimatedMenuHeight + gap > spaceBelow && spaceAbove > spaceBelow;
34874
+ setMenuPlaceAbove(needsAbove);
34875
+ };
34876
+ updateMenuPlacement();
34877
+ window.addEventListener("resize", updateMenuPlacement);
34878
+ window.addEventListener("scroll", updateMenuPlacement, true);
34879
+ return () => {
34880
+ window.removeEventListener("resize", updateMenuPlacement);
34881
+ window.removeEventListener("scroll", updateMenuPlacement, true);
34882
+ };
34883
+ }, [estimatedMenuHeight, isOpen, resolvedMenuWidth]);
34680
34884
  const handleSearchChange = (text) => {
34681
34885
  setSearchQuery(text);
34682
34886
  onSearchChange?.(text);
@@ -34851,69 +35055,80 @@ var Select = react.forwardRef(
34851
35055
  ]
34852
35056
  }
34853
35057
  ),
34854
- isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.menu, children: [
34855
- showSearch ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.searchField, children: [
34856
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { size: ICON_SIZE12, color: colors.grey100 }) }),
34857
- /* @__PURE__ */ jsxRuntime.jsx(
34858
- reactNative.TextInput,
34859
- {
34860
- ref: searchInputRef,
34861
- value: searchQuery,
34862
- onChangeText: handleSearchChange,
34863
- editable: !disabled,
34864
- placeholder: searchPlaceholder,
34865
- placeholderTextColor: colors.grey100,
34866
- style: [
34867
- styles27.searchInput,
34868
- reactNative.Platform.OS === "web" ? styles27.searchInputWeb : null,
34869
- reactNative.Platform.OS === "android" ? styles27.searchInputAndroid : null
34870
- ],
34871
- accessibilityLabel: searchPlaceholder
34872
- }
34873
- )
34874
- ] }) : null,
34875
- /* @__PURE__ */ jsxRuntime.jsxs(
34876
- reactNative.ScrollView,
34877
- {
34878
- style: styles27.optionList,
34879
- contentContainerStyle: styles27.optionListContent,
34880
- keyboardShouldPersistTaps: "handled",
34881
- showsVerticalScrollIndicator: false,
34882
- children: [
34883
- loading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles27.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles27.statusText, children: emptyText }) }) : null,
34884
- !loading && filteredOptions.map((option) => {
34885
- const isSelected = selectedValues.includes(option.value);
34886
- const isHovered = hoveredValue === option.value;
34887
- const visualState = isSelected ? "selected" : isHovered ? "hover" : "default";
34888
- return /* @__PURE__ */ jsxRuntime.jsxs(
34889
- reactNative.Pressable,
34890
- {
34891
- onPress: () => handleSelect(option.value),
34892
- disabled,
34893
- onHoverIn: () => setHoveredValue(option.value),
34894
- onHoverOut: () => setHoveredValue((current) => current === option.value ? null : current),
34895
- onPressIn: () => setHoveredValue(option.value),
34896
- onPressOut: () => setHoveredValue((current) => current === option.value ? null : current),
34897
- accessibilityRole: multiple ? "checkbox" : "button",
34898
- accessibilityState: { selected: isSelected, checked: isSelected, disabled },
34899
- style: [
34900
- styles27.item,
35058
+ isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(
35059
+ reactNative.View,
35060
+ {
35061
+ style: [
35062
+ styles27.menu,
35063
+ menuAlignEnd ? styles27.menuAlignEnd : styles27.menuAlignStart,
35064
+ menuPlaceAbove ? styles27.menuAbove : styles27.menuBelow,
35065
+ menuStyle
35066
+ ],
35067
+ children: [
35068
+ showSearch ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.searchField, children: [
35069
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.iconSlot, children: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { size: ICON_SIZE12, color: colors.grey100 }) }),
35070
+ /* @__PURE__ */ jsxRuntime.jsx(
35071
+ reactNative.TextInput,
35072
+ {
35073
+ ref: searchInputRef,
35074
+ value: searchQuery,
35075
+ onChangeText: handleSearchChange,
35076
+ editable: !disabled,
35077
+ placeholder: searchPlaceholder,
35078
+ placeholderTextColor: colors.grey100,
35079
+ style: [
35080
+ styles27.searchInput,
35081
+ reactNative.Platform.OS === "web" ? styles27.searchInputWeb : null,
35082
+ reactNative.Platform.OS === "android" ? styles27.searchInputAndroid : null
35083
+ ],
35084
+ accessibilityLabel: searchPlaceholder
35085
+ }
35086
+ )
35087
+ ] }) : null,
35088
+ /* @__PURE__ */ jsxRuntime.jsxs(
35089
+ reactNative.ScrollView,
35090
+ {
35091
+ style: styles27.optionList,
35092
+ contentContainerStyle: styles27.optionListContent,
35093
+ keyboardShouldPersistTaps: "handled",
35094
+ showsVerticalScrollIndicator: false,
35095
+ children: [
35096
+ loading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles27.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles27.statusRow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles27.statusText, children: emptyText }) }) : null,
35097
+ !loading && filteredOptions.map((option) => {
35098
+ const isSelected = selectedValues.includes(option.value);
35099
+ const isHovered = hoveredValue === option.value;
35100
+ const visualState = isSelected ? "selected" : isHovered ? "hover" : "default";
35101
+ return /* @__PURE__ */ jsxRuntime.jsxs(
35102
+ reactNative.Pressable,
34901
35103
  {
34902
- backgroundColor: itemBackground(visualState)
34903
- }
34904
- ],
34905
- children: [
34906
- multiple ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles27.itemCheckbox, children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
34907
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles27.itemLabel, numberOfLines: 1, children: option.label })
34908
- ]
34909
- },
34910
- option.value
34911
- );
34912
- })
34913
- ]
34914
- }
34915
- )
34916
- ] }) : null
35104
+ onPress: () => handleSelect(option.value),
35105
+ disabled,
35106
+ onHoverIn: () => setHoveredValue(option.value),
35107
+ onHoverOut: () => setHoveredValue((current) => current === option.value ? null : current),
35108
+ onPressIn: () => setHoveredValue(option.value),
35109
+ onPressOut: () => setHoveredValue((current) => current === option.value ? null : current),
35110
+ accessibilityRole: multiple ? "checkbox" : "button",
35111
+ accessibilityState: { selected: isSelected, checked: isSelected, disabled },
35112
+ style: [
35113
+ styles27.item,
35114
+ {
35115
+ backgroundColor: itemBackground(visualState)
35116
+ }
35117
+ ],
35118
+ children: [
35119
+ multiple ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles27.itemCheckbox, children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
35120
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles27.itemLabel, numberOfLines: 1, children: option.label })
35121
+ ]
35122
+ },
35123
+ option.value
35124
+ );
35125
+ })
35126
+ ]
35127
+ }
35128
+ )
35129
+ ]
35130
+ }
35131
+ ) : null
34917
35132
  ] }),
34918
35133
  showHint && hint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles27.hint, { color: hintColor }], children: hint }) : null
34919
35134
  ]
@@ -35022,10 +35237,7 @@ var styles27 = reactNative.StyleSheet.create({
35022
35237
  },
35023
35238
  menu: {
35024
35239
  position: "absolute",
35025
- top: "100%",
35026
- left: 0,
35027
- right: 0,
35028
- marginTop: 8,
35240
+ minWidth: "100%",
35029
35241
  zIndex: 10,
35030
35242
  borderRadius: MENU_RADIUS3,
35031
35243
  padding: 12,
@@ -35040,6 +35252,26 @@ var styles27 = reactNative.StyleSheet.create({
35040
35252
  }
35041
35253
  })
35042
35254
  },
35255
+ menuAlignStart: {
35256
+ left: 0,
35257
+ right: "auto"
35258
+ },
35259
+ menuAlignEnd: {
35260
+ left: "auto",
35261
+ right: 0
35262
+ },
35263
+ menuBelow: {
35264
+ top: "100%",
35265
+ bottom: "auto",
35266
+ marginTop: 8,
35267
+ marginBottom: 0
35268
+ },
35269
+ menuAbove: {
35270
+ top: "auto",
35271
+ bottom: "100%",
35272
+ marginTop: 0,
35273
+ marginBottom: 8
35274
+ },
35043
35275
  optionList: {
35044
35276
  maxHeight: MENU_MAX_LIST_HEIGHT
35045
35277
  },
@@ -35175,25 +35407,35 @@ var Textarea = react.forwardRef(function Textarea2({
35175
35407
  const setInputRef = react.useMemo(() => mergeRefs(inputRef, forwardedRef), [forwardedRef]);
35176
35408
  const [focused, setFocused] = react.useState(false);
35177
35409
  const [uncontrolledValue, setUncontrolledValue] = react.useState(defaultValue ?? "");
35410
+ const reactId = react.useId();
35411
+ const inputDomId = `eh-textarea-${reactId.replace(/:/g, "")}`;
35178
35412
  const isControlled = typeof value === "string";
35179
35413
  const currentValue = isControlled ? value : uncontrolledValue;
35180
35414
  const hasValue = currentValue.length > 0;
35181
35415
  const visualState = resolveVisualState2({ disabled, error, focused, hasValue });
35182
35416
  const chrome = chromeFor2(visualState);
35183
35417
  const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
35418
+ const focusInput = () => {
35419
+ if (disabled) return;
35420
+ inputRef.current?.focus();
35421
+ };
35184
35422
  useApplyWebClassName(rootRef, className);
35185
35423
  useApplyWebClassName(inputRef, inputClassName);
35186
35424
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ref: rootRef, style: [styles28.root, disabled && styles28.disabled, style], children: [
35187
- showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles28.label, { color: chrome.labelColor }], children: label }) : null,
35425
+ showLabel && label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { disabled, onPress: focusInput, style: styles28.labelPressable, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles28.label, { color: chrome.labelColor }], children: label }) }) : null,
35188
35426
  /* @__PURE__ */ jsxRuntime.jsx(
35189
- reactNative.View,
35427
+ reactNative.Pressable,
35190
35428
  {
35429
+ accessibilityRole: "none",
35430
+ disabled,
35431
+ onPress: focusInput,
35191
35432
  style: [
35192
35433
  styles28.field,
35193
35434
  {
35194
35435
  borderColor: chrome.borderColor,
35195
35436
  backgroundColor: chrome.backgroundColor
35196
35437
  },
35438
+ reactNative.Platform.OS === "web" ? styles28.fieldWeb : null,
35197
35439
  fieldStyle
35198
35440
  ],
35199
35441
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -35201,6 +35443,7 @@ var Textarea = react.forwardRef(function Textarea2({
35201
35443
  {
35202
35444
  ref: setInputRef,
35203
35445
  ...textInputProps,
35446
+ nativeID: inputDomId,
35204
35447
  multiline: true,
35205
35448
  textAlignVertical: "top",
35206
35449
  value: isControlled ? value : void 0,
@@ -35246,6 +35489,9 @@ var styles28 = reactNative.StyleSheet.create({
35246
35489
  disabled: {
35247
35490
  opacity: 0.6
35248
35491
  },
35492
+ labelPressable: {
35493
+ alignSelf: "flex-start"
35494
+ },
35249
35495
  label: {
35250
35496
  ...textareaTypography.label
35251
35497
  },
@@ -35258,14 +35504,21 @@ var styles28 = reactNative.StyleSheet.create({
35258
35504
  paddingLeft: FIELD_PADDING_HORIZONTAL,
35259
35505
  paddingRight: FIELD_PADDING_HORIZONTAL
35260
35506
  },
35507
+ fieldWeb: {
35508
+ cursor: "text"
35509
+ },
35261
35510
  input: {
35262
35511
  flex: 1,
35512
+ alignSelf: "stretch",
35263
35513
  paddingVertical: 0,
35264
35514
  margin: 0
35265
35515
  },
35266
35516
  inputWeb: {
35267
35517
  outlineStyle: "none",
35268
- resize: "none"
35518
+ resize: "none",
35519
+ height: "100%",
35520
+ minWidth: 0,
35521
+ cursor: "text"
35269
35522
  },
35270
35523
  inputAndroid: {
35271
35524
  includeFontPadding: false