@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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useLayoutEffect, useImperativeHandle, isValidElement, cloneElement } from 'react';
1
+ import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useLayoutEffect, useId, useImperativeHandle, isValidElement, cloneElement } from 'react';
2
2
  import { View, Text, Platform, Pressable, StyleSheet, Image, useWindowDimensions, Animated, Easing, TouchableOpacity, Modal as Modal$1, TextInput, ScrollView, PanResponder } from 'react-native';
3
3
  import Svg20, { Path } from 'react-native-svg';
4
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -7397,7 +7397,7 @@ var require_react_dom_development = __commonJS({
7397
7397
  var HostPortal = 4;
7398
7398
  var HostComponent = 5;
7399
7399
  var HostText = 6;
7400
- var Fragment3 = 7;
7400
+ var Fragment4 = 7;
7401
7401
  var Mode = 8;
7402
7402
  var ContextConsumer = 9;
7403
7403
  var ContextProvider = 10;
@@ -8552,7 +8552,7 @@ var require_react_dom_development = __commonJS({
8552
8552
  return "DehydratedFragment";
8553
8553
  case ForwardRef:
8554
8554
  return getWrappedName$1(type, type.render, "ForwardRef");
8555
- case Fragment3:
8555
+ case Fragment4:
8556
8556
  return "Fragment";
8557
8557
  case HostComponent:
8558
8558
  return type;
@@ -16977,7 +16977,7 @@ var require_react_dom_development = __commonJS({
16977
16977
  }
16978
16978
  }
16979
16979
  function updateFragment2(returnFiber, current2, fragment, lanes, key) {
16980
- if (current2 === null || current2.tag !== Fragment3) {
16980
+ if (current2 === null || current2.tag !== Fragment4) {
16981
16981
  var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
16982
16982
  created.return = returnFiber;
16983
16983
  return created;
@@ -17380,7 +17380,7 @@ var require_react_dom_development = __commonJS({
17380
17380
  if (child.key === key) {
17381
17381
  var elementType = element.type;
17382
17382
  if (elementType === REACT_FRAGMENT_TYPE) {
17383
- if (child.tag === Fragment3) {
17383
+ if (child.tag === Fragment4) {
17384
17384
  deleteRemainingChildren(returnFiber, child.sibling);
17385
17385
  var existing = useFiber(child, element.props.children);
17386
17386
  existing.return = returnFiber;
@@ -22854,7 +22854,7 @@ var require_react_dom_development = __commonJS({
22854
22854
  var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
22855
22855
  return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
22856
22856
  }
22857
- case Fragment3:
22857
+ case Fragment4:
22858
22858
  return updateFragment(current2, workInProgress2, renderLanes2);
22859
22859
  case Mode:
22860
22860
  return updateMode(current2, workInProgress2, renderLanes2);
@@ -23126,7 +23126,7 @@ var require_react_dom_development = __commonJS({
23126
23126
  case SimpleMemoComponent:
23127
23127
  case FunctionComponent:
23128
23128
  case ForwardRef:
23129
- case Fragment3:
23129
+ case Fragment4:
23130
23130
  case Mode:
23131
23131
  case Profiler:
23132
23132
  case ContextConsumer:
@@ -27378,7 +27378,7 @@ var require_react_dom_development = __commonJS({
27378
27378
  return fiber;
27379
27379
  }
27380
27380
  function createFiberFromFragment(elements, mode, lanes, key) {
27381
- var fiber = createFiber(Fragment3, elements, key, mode);
27381
+ var fiber = createFiber(Fragment4, elements, key, mode);
27382
27382
  fiber.lanes = lanes;
27383
27383
  return fiber;
27384
27384
  }
@@ -28613,8 +28613,8 @@ var languageSwitcherTypography = {
28613
28613
  fontFamily: fonts.sans,
28614
28614
  fontSize: 14,
28615
28615
  fontWeight: "600",
28616
- lineHeight: 19,
28617
- letterSpacing: 0
28616
+ lineHeight: 14,
28617
+ letterSpacing: 0.42
28618
28618
  };
28619
28619
  var counterTypography = {
28620
28620
  fontFamily: fonts.sans,
@@ -29409,9 +29409,9 @@ function HeadsetIcon({ size = 24, color = "#B76533", strokeWidth = 2 }) {
29409
29409
  }
29410
29410
 
29411
29411
  // src/icons/Globe/globePath.ts
29412
- 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";
29413
- function GlobeIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
29414
- return /* @__PURE__ */ jsx(Svg20, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(
29412
+ 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";
29413
+ function GlobeIcon({ size = 16, color = colors.primary, strokeWidth = 1.5 }) {
29414
+ return /* @__PURE__ */ jsx(Svg20, { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
29415
29415
  Path,
29416
29416
  {
29417
29417
  d: GLOBE_PATH,
@@ -29479,7 +29479,7 @@ function InstagramIcon({ size = 20, color = colors.white }) {
29479
29479
  }
29480
29480
 
29481
29481
  // src/icons/Key/keyPath.ts
29482
- 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";
29482
+ 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";
29483
29483
  function KeyIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
29484
29484
  return /* @__PURE__ */ jsx(Svg20, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx(
29485
29485
  Path,
@@ -31032,6 +31032,7 @@ var AccountHeader = forwardRef(
31032
31032
  onBackPress,
31033
31033
  onMenuPress,
31034
31034
  onNotificationsPress,
31035
+ languageSlot,
31035
31036
  badge,
31036
31037
  backAccessibilityLabel = "Back",
31037
31038
  menuAccessibilityLabel = "Open menu",
@@ -31111,16 +31112,19 @@ var AccountHeader = forwardRef(
31111
31112
  ]
31112
31113
  }
31113
31114
  ),
31114
- /* @__PURE__ */ jsx(View, { style: styles6.end, children: /* @__PURE__ */ jsx(
31115
- Pressable,
31116
- {
31117
- accessibilityRole: "button",
31118
- accessibilityLabel: notificationsAccessibilityLabel,
31119
- onPress: onNotificationsPress,
31120
- style: styles6.iconButton,
31121
- children: /* @__PURE__ */ jsx(BellIcon, { color: colors.white, size: ICON_BUTTON_ICON_SIZE, strokeWidth: 1.5 })
31122
- }
31123
- ) })
31115
+ /* @__PURE__ */ jsxs(View, { style: styles6.end, children: [
31116
+ languageSlot != null ? /* @__PURE__ */ jsx(View, { style: styles6.languageSlot, children: languageSlot }) : null,
31117
+ /* @__PURE__ */ jsx(
31118
+ Pressable,
31119
+ {
31120
+ accessibilityRole: "button",
31121
+ accessibilityLabel: notificationsAccessibilityLabel,
31122
+ onPress: onNotificationsPress,
31123
+ style: styles6.iconButton,
31124
+ children: /* @__PURE__ */ jsx(BellIcon, { color: colors.white, size: ICON_BUTTON_ICON_SIZE, strokeWidth: 1.5 })
31125
+ }
31126
+ )
31127
+ ] })
31124
31128
  ]
31125
31129
  }
31126
31130
  );
@@ -31140,7 +31144,9 @@ var styles6 = StyleSheet.create({
31140
31144
  paddingLeft: 24,
31141
31145
  backgroundColor: colors.dark,
31142
31146
  borderBottomWidth: 1,
31143
- borderBottomColor: colors.grey700
31147
+ borderBottomColor: colors.grey700,
31148
+ zIndex: 40,
31149
+ position: "relative"
31144
31150
  },
31145
31151
  start: {
31146
31152
  flex: 1,
@@ -31163,7 +31169,17 @@ var styles6 = StyleSheet.create({
31163
31169
  },
31164
31170
  end: {
31165
31171
  flexShrink: 0,
31166
- marginLeft: RIGHT_GAP
31172
+ marginLeft: RIGHT_GAP,
31173
+ flexDirection: "row",
31174
+ alignItems: "center",
31175
+ gap: 8,
31176
+ zIndex: 50,
31177
+ position: "relative"
31178
+ },
31179
+ languageSlot: {
31180
+ flexShrink: 0,
31181
+ zIndex: 50,
31182
+ position: "relative"
31167
31183
  },
31168
31184
  iconButton: {
31169
31185
  width: ICON_BUTTON_SIZE,
@@ -31778,10 +31794,14 @@ var AccordionItem = forwardRef(
31778
31794
  });
31779
31795
  const bodyTextStyle = [styles13.body, { fontSize: bodyFontSize, lineHeight: bodyLineHeight }];
31780
31796
  return /* @__PURE__ */ jsxs(
31781
- View,
31797
+ Pressable,
31782
31798
  {
31783
31799
  ...rest,
31784
31800
  ref: setContainerRef,
31801
+ accessibilityRole: "button",
31802
+ accessibilityState: { expanded: open },
31803
+ accessibilityLabel: accessibilityLabel ?? title,
31804
+ onPress: toggle,
31785
31805
  style: [
31786
31806
  styles13.root,
31787
31807
  {
@@ -31789,30 +31809,21 @@ var AccordionItem = forwardRef(
31789
31809
  paddingRight: paddingX,
31790
31810
  paddingLeft: paddingX
31791
31811
  },
31812
+ Platform.OS === "web" ? styles13.rootWeb : null,
31792
31813
  style
31793
31814
  ],
31794
31815
  children: [
31795
- /* @__PURE__ */ jsxs(
31796
- Pressable,
31797
- {
31798
- accessibilityRole: "button",
31799
- accessibilityState: { expanded: open },
31800
- accessibilityLabel: accessibilityLabel ?? title,
31801
- onPress: toggle,
31802
- style: styles13.header,
31803
- children: [
31804
- /* @__PURE__ */ jsx(Text, { style: styles13.title, children: title }),
31805
- /* @__PURE__ */ jsx(Animated.View, { style: [styles13.chevron, { transform: [{ rotate: chevronRotate }] }], children: /* @__PURE__ */ jsx(
31806
- ChevronDownIcon,
31807
- {
31808
- size: CHEVRON_SIZE2,
31809
- color: open ? colors.primary : colors.grey400,
31810
- strokeWidth: 2
31811
- }
31812
- ) })
31813
- ]
31814
- }
31815
- ),
31816
+ /* @__PURE__ */ jsxs(View, { style: styles13.header, children: [
31817
+ /* @__PURE__ */ jsx(Text, { style: styles13.title, children: title }),
31818
+ /* @__PURE__ */ jsx(Animated.View, { style: [styles13.chevron, { transform: [{ rotate: chevronRotate }] }], children: /* @__PURE__ */ jsx(
31819
+ ChevronDownIcon,
31820
+ {
31821
+ size: CHEVRON_SIZE2,
31822
+ color: open ? colors.primary : colors.grey400,
31823
+ strokeWidth: 2
31824
+ }
31825
+ ) })
31826
+ ] }),
31816
31827
  /* @__PURE__ */ jsx(
31817
31828
  View,
31818
31829
  {
@@ -31822,7 +31833,7 @@ var AccordionItem = forwardRef(
31822
31833
  children: /* @__PURE__ */ jsx(Text, { style: bodyTextStyle, children })
31823
31834
  }
31824
31835
  ),
31825
- /* @__PURE__ */ jsx(Animated.View, { style: [styles13.bodyClip, { height: bodyHeight }], children: /* @__PURE__ */ jsx(View, { style: styles13.bodyInner, children: /* @__PURE__ */ jsx(Text, { style: bodyTextStyle, children }) }) })
31836
+ /* @__PURE__ */ jsx(Animated.View, { style: [styles13.bodyClip, { height: bodyHeight }], pointerEvents: "none", children: /* @__PURE__ */ jsx(View, { style: styles13.bodyInner, children: /* @__PURE__ */ jsx(Text, { style: bodyTextStyle, children }) }) })
31826
31837
  ]
31827
31838
  }
31828
31839
  );
@@ -31837,6 +31848,9 @@ var styles13 = StyleSheet.create({
31837
31848
  opacity: 1,
31838
31849
  overflow: "hidden"
31839
31850
  },
31851
+ rootWeb: {
31852
+ cursor: "pointer"
31853
+ },
31840
31854
  header: {
31841
31855
  flexDirection: "row",
31842
31856
  alignItems: "center",
@@ -32602,6 +32616,12 @@ var defaultLanguageOptions = [
32602
32616
  var CONTROL_WIDTH = 90;
32603
32617
  var CONTROL_HEIGHT = 35;
32604
32618
  var ICON_SIZE8 = 16;
32619
+ var ICON_BUTTON_SIZE2 = 32;
32620
+ var ICON_MENU_WIDTH = 67;
32621
+ var ICON_MENU_HEIGHT = 129;
32622
+ var ICON_MENU_TOP = 39;
32623
+ var ITEM_HEIGHT = 35;
32624
+ var ACTIVE_ITEM_BACKGROUND = "#E38E5E12";
32605
32625
  var LanguageSwitcher = forwardRef(
32606
32626
  function LanguageSwitcher2({
32607
32627
  options = defaultLanguageOptions,
@@ -32612,6 +32632,7 @@ var LanguageSwitcher = forwardRef(
32612
32632
  defaultOpen = false,
32613
32633
  onOpenChange,
32614
32634
  disabled = false,
32635
+ variant = "default",
32615
32636
  accessibilityLabel = "Language",
32616
32637
  style,
32617
32638
  className,
@@ -32631,6 +32652,7 @@ var LanguageSwitcher = forwardRef(
32631
32652
  const selectedValue = isValueControlled ? value : uncontrolledValue;
32632
32653
  const isOpen = isOpenControlled ? openProp : uncontrolledOpen;
32633
32654
  const selectedOption = options.find((option) => option.value === selectedValue) ?? options[0] ?? null;
32655
+ const isIconVariant = variant === "icon";
32634
32656
  useApplyWebClassName(wrapperRef, className?.trim() || void 0);
32635
32657
  const setOpen = useCallback(
32636
32658
  (next) => {
@@ -32681,7 +32703,14 @@ var LanguageSwitcher = forwardRef(
32681
32703
  {
32682
32704
  ...rest,
32683
32705
  ref: setWrapperRef,
32684
- style: [styles18.wrapper, isOpen && styles18.wrapperOpen, disabled && styles18.disabled, style],
32706
+ style: [
32707
+ styles18.wrapper,
32708
+ isIconVariant ? styles18.wrapperIcon : styles18.wrapperDefault,
32709
+ isOpen && styles18.wrapperOpen,
32710
+ isOpen && isIconVariant && styles18.wrapperOpenIcon,
32711
+ disabled && styles18.disabled,
32712
+ style
32713
+ ],
32685
32714
  children: [
32686
32715
  /* @__PURE__ */ jsxs(
32687
32716
  Pressable,
@@ -32696,36 +32725,55 @@ var LanguageSwitcher = forwardRef(
32696
32725
  onHoverIn: () => setTriggerHovered(true),
32697
32726
  onHoverOut: () => setTriggerHovered(false),
32698
32727
  style: ({ pressed }) => [
32699
- styles18.trigger,
32700
- (triggerHovered || pressed || isOpen) && styles18.triggerActive
32728
+ isIconVariant ? styles18.triggerIcon : styles18.trigger,
32729
+ !isIconVariant && (triggerHovered || pressed || isOpen) && styles18.triggerActive
32701
32730
  ],
32702
32731
  children: [
32703
- /* @__PURE__ */ jsx(GlobeIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: 2 }),
32704
- /* @__PURE__ */ jsx(Text, { style: styles18.triggerLabel, numberOfLines: 1, children: selectedOption?.label ?? "" }),
32705
- /* @__PURE__ */ jsx(View, { style: [styles18.chevron, isOpen && styles18.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: 2 }) })
32732
+ /* @__PURE__ */ jsx(GlobeIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: isIconVariant ? 1.5 : 2 }),
32733
+ !isIconVariant ? /* @__PURE__ */ jsxs(Fragment, { children: [
32734
+ /* @__PURE__ */ jsx(Text, { style: styles18.triggerLabel, numberOfLines: 1, children: selectedOption?.label ?? "" }),
32735
+ /* @__PURE__ */ jsx(View, { style: [styles18.chevron, isOpen && styles18.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE8, color: colors.white, strokeWidth: 2 }) })
32736
+ ] }) : null
32706
32737
  ]
32707
32738
  }
32708
32739
  ),
32709
- isOpen && options.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles18.menu, accessibilityRole: "menu", children: options.map((option) => {
32710
- const selected = option.value === selectedValue;
32711
- return /* @__PURE__ */ jsx(
32712
- Pressable,
32713
- {
32714
- onPress: () => selectLanguage(option.value),
32715
- accessibilityRole: "menuitem",
32716
- accessibilityLabel: option.label,
32717
- accessibilityState: { selected },
32718
- onHoverIn: () => setHoveredValue(option.value),
32719
- onHoverOut: () => setHoveredValue(null),
32720
- style: ({ pressed }) => [
32721
- styles18.item,
32722
- selected ? styles18.itemSelected : (hoveredValue === option.value || pressed) && styles18.itemHovered
32723
- ],
32724
- children: /* @__PURE__ */ jsx(Text, { style: [styles18.itemLabel, selected && styles18.itemLabelSelected], children: option.label })
32725
- },
32726
- option.value
32727
- );
32728
- }) }) : null
32740
+ isOpen && options.length > 0 ? /* @__PURE__ */ jsx(
32741
+ View,
32742
+ {
32743
+ style: [styles18.menu, isIconVariant ? styles18.menuIcon : styles18.menuDefault],
32744
+ accessibilityRole: "menu",
32745
+ children: options.map((option) => {
32746
+ const selected = option.value === selectedValue;
32747
+ return /* @__PURE__ */ jsx(
32748
+ Pressable,
32749
+ {
32750
+ onPress: () => selectLanguage(option.value),
32751
+ accessibilityRole: "menuitem",
32752
+ accessibilityLabel: option.label,
32753
+ accessibilityState: { selected },
32754
+ onHoverIn: () => setHoveredValue(option.value),
32755
+ onHoverOut: () => setHoveredValue(null),
32756
+ style: ({ pressed }) => [
32757
+ styles18.item,
32758
+ isIconVariant ? styles18.itemIcon : null,
32759
+ selected ? isIconVariant ? styles18.itemSelectedIcon : styles18.itemSelected : (hoveredValue === option.value || pressed) && styles18.itemHovered
32760
+ ],
32761
+ children: /* @__PURE__ */ jsx(
32762
+ Text,
32763
+ {
32764
+ style: [
32765
+ styles18.itemLabel,
32766
+ selected && (isIconVariant ? styles18.itemLabelSelectedIcon : styles18.itemLabelSelected)
32767
+ ],
32768
+ children: option.label
32769
+ }
32770
+ )
32771
+ },
32772
+ option.value
32773
+ );
32774
+ })
32775
+ }
32776
+ ) : null
32729
32777
  ]
32730
32778
  }
32731
32779
  );
@@ -32734,11 +32782,19 @@ var LanguageSwitcher = forwardRef(
32734
32782
  var styles18 = StyleSheet.create({
32735
32783
  wrapper: {
32736
32784
  position: "relative",
32737
- width: CONTROL_WIDTH,
32738
32785
  alignSelf: "flex-start"
32739
32786
  },
32787
+ wrapperDefault: {
32788
+ width: CONTROL_WIDTH
32789
+ },
32790
+ wrapperIcon: {
32791
+ width: ICON_BUTTON_SIZE2
32792
+ },
32740
32793
  wrapperOpen: {
32741
- zIndex: 20
32794
+ zIndex: 100
32795
+ },
32796
+ wrapperOpenIcon: {
32797
+ zIndex: 200
32742
32798
  },
32743
32799
  disabled: {
32744
32800
  opacity: 0.6
@@ -32753,6 +32809,17 @@ var styles18 = StyleSheet.create({
32753
32809
  borderRadius: 12,
32754
32810
  backgroundColor: "transparent"
32755
32811
  },
32812
+ triggerIcon: {
32813
+ width: ICON_BUTTON_SIZE2,
32814
+ height: ICON_BUTTON_SIZE2,
32815
+ padding: 8,
32816
+ alignItems: "center",
32817
+ justifyContent: "center",
32818
+ borderRadius: 5,
32819
+ backgroundColor: colors.grey800,
32820
+ borderWidth: 1,
32821
+ borderColor: colors.grey700
32822
+ },
32756
32823
  triggerActive: {
32757
32824
  backgroundColor: colors.whiteAlpha6
32758
32825
  },
@@ -32775,22 +32842,42 @@ var styles18 = StyleSheet.create({
32775
32842
  },
32776
32843
  menu: {
32777
32844
  position: "absolute",
32845
+ padding: 8,
32846
+ borderRadius: 12,
32847
+ overflow: "hidden"
32848
+ },
32849
+ menuDefault: {
32778
32850
  top: CONTROL_HEIGHT + 8,
32779
32851
  left: 0,
32780
32852
  width: CONTROL_WIDTH,
32781
- padding: 8,
32782
32853
  gap: 8,
32783
- borderRadius: 12,
32784
- backgroundColor: colors.whiteAlpha6,
32785
- overflow: "hidden"
32854
+ backgroundColor: colors.whiteAlpha6
32855
+ },
32856
+ menuIcon: {
32857
+ top: ICON_MENU_TOP,
32858
+ left: (ICON_BUTTON_SIZE2 - ICON_MENU_WIDTH) / 2,
32859
+ right: "auto",
32860
+ width: ICON_MENU_WIDTH,
32861
+ height: ICON_MENU_HEIGHT,
32862
+ gap: 4,
32863
+ opacity: 1,
32864
+ zIndex: 200,
32865
+ backgroundColor: colors.grey800,
32866
+ borderWidth: 1,
32867
+ borderColor: colors.grey700
32786
32868
  },
32787
32869
  item: {
32788
- height: CONTROL_HEIGHT,
32870
+ height: ITEM_HEIGHT,
32789
32871
  alignItems: "center",
32790
32872
  justifyContent: "center",
32791
32873
  paddingVertical: 8,
32792
32874
  paddingHorizontal: 12,
32793
- borderRadius: 8
32875
+ borderRadius: 8,
32876
+ gap: 8
32877
+ },
32878
+ itemIcon: {
32879
+ width: 51,
32880
+ alignSelf: "stretch"
32794
32881
  },
32795
32882
  itemHovered: {
32796
32883
  backgroundColor: colors.whiteAlpha6
@@ -32798,6 +32885,9 @@ var styles18 = StyleSheet.create({
32798
32885
  itemSelected: {
32799
32886
  backgroundColor: colors.whiteAlpha6
32800
32887
  },
32888
+ itemSelectedIcon: {
32889
+ backgroundColor: ACTIVE_ITEM_BACKGROUND
32890
+ },
32801
32891
  itemLabel: {
32802
32892
  ...languageSwitcherTypography,
32803
32893
  ...Platform.select({ web: { fontFamily: `${fonts.sans}, sans-serif` } }),
@@ -32805,6 +32895,9 @@ var styles18 = StyleSheet.create({
32805
32895
  },
32806
32896
  itemLabelSelected: {
32807
32897
  color: colors.primary
32898
+ },
32899
+ itemLabelSelectedIcon: {
32900
+ color: colors.primary
32808
32901
  }
32809
32902
  });
32810
32903
  var ICON_SIZE9 = 25.63181;
@@ -33225,14 +33318,22 @@ var DEFAULT_WEEKDAY_LABELS = ["\u0535\u0550", "\u0535\u0554", "\u0549\u0550", "\
33225
33318
  var EMPTY_RANGE = { start: null, end: null };
33226
33319
  var DEFAULT_WIDTH = 320;
33227
33320
  var DEFAULT_MENU_HEIGHT = 388;
33321
+ var MENU_CONTENT_WIDTH = 296;
33228
33322
  var RANGE_TRIGGER_WIDTH = 382;
33229
33323
  var TRIGGER_HEIGHT = 44;
33230
33324
  var TRIGGER_RADIUS = 60;
33231
33325
  var MENU_RADIUS2 = 20;
33326
+ var MENU_PADDING = 12;
33232
33327
  var ICON_SIZE10 = 20;
33233
33328
  var NAV_ICON_SIZE = 20;
33329
+ var HEADER_HEIGHT3 = 36;
33330
+ var WEEKDAY_ROW_HEIGHT = 44;
33331
+ var WEEKDAY_ROW_GAP = 8;
33332
+ var WEEK_ROW_GAP = 16;
33333
+ var DAY_CELL_WIDTH = 42.28571701049805;
33234
33334
  var DAY_CELL_HEIGHT = 44;
33235
- var DAY_CIRCLE_SIZE = 44;
33335
+ var DAY_CELL_RADIUS = 67;
33336
+ var DAY_CELL_PADDING = 12;
33236
33337
  function RangeTriggerField({
33237
33338
  label,
33238
33339
  value,
@@ -33516,7 +33617,7 @@ var DatePicker = forwardRef(
33516
33617
  )
33517
33618
  ] }),
33518
33619
  /* @__PURE__ */ jsxs(View, { children: [
33519
- /* @__PURE__ */ jsx(View, { style: styles22.weekdayRow, children: weekdayLabels.map((weekdayLabel, index) => /* @__PURE__ */ jsx(View, { style: styles22.dayCellWrap, children: /* @__PURE__ */ jsx(Text, { style: styles22.weekdayText, children: weekdayLabel }) }, `${weekdayLabel}-${index}`)) }),
33620
+ /* @__PURE__ */ jsx(View, { style: styles22.weekdayRow, children: weekdayLabels.map((weekdayLabel, index) => /* @__PURE__ */ jsx(View, { style: styles22.weekdayCell, children: /* @__PURE__ */ jsx(Text, { style: styles22.weekdayText, children: weekdayLabel }) }, `${weekdayLabel}-${index}`)) }),
33520
33621
  weeks.map((week, weekIndex) => {
33521
33622
  let rangeHighlightStyle = null;
33522
33623
  if (isRange && rangeValue.start && rangeValue.end) {
@@ -33740,10 +33841,11 @@ var styles22 = StyleSheet.create({
33740
33841
  marginTop: 8,
33741
33842
  zIndex: 10,
33742
33843
  borderRadius: MENU_RADIUS2,
33743
- padding: 12,
33844
+ padding: MENU_PADDING,
33744
33845
  gap: 0,
33745
33846
  opacity: 1,
33746
33847
  backgroundColor: colors.grey700,
33848
+ overflow: "hidden",
33747
33849
  ...Platform.select({
33748
33850
  web: {
33749
33851
  boxShadow: `0 8px 24px ${colors.black}73`
@@ -33772,14 +33874,17 @@ var styles22 = StyleSheet.create({
33772
33874
  width: RANGE_TRIGGER_WIDTH
33773
33875
  },
33774
33876
  calendarHeader: {
33775
- height: 36,
33877
+ height: HEADER_HEIGHT3,
33878
+ paddingTop: 8,
33879
+ paddingBottom: 8,
33776
33880
  flexDirection: "row",
33777
33881
  alignItems: "center",
33778
- justifyContent: "space-between"
33882
+ justifyContent: "space-between",
33883
+ opacity: 1
33779
33884
  },
33780
33885
  navButton: {
33781
- width: 36,
33782
- height: 36,
33886
+ width: HEADER_HEIGHT3,
33887
+ height: HEADER_HEIGHT3,
33783
33888
  alignItems: "center",
33784
33889
  justifyContent: "center"
33785
33890
  },
@@ -33792,7 +33897,21 @@ var styles22 = StyleSheet.create({
33792
33897
  textAlign: "center"
33793
33898
  },
33794
33899
  weekdayRow: {
33795
- flexDirection: "row"
33900
+ width: MENU_CONTENT_WIDTH,
33901
+ height: WEEKDAY_ROW_HEIGHT,
33902
+ marginTop: WEEKDAY_ROW_GAP,
33903
+ flexDirection: "row",
33904
+ alignItems: "center",
33905
+ opacity: 1
33906
+ },
33907
+ weekdayCell: {
33908
+ width: DAY_CELL_WIDTH,
33909
+ height: WEEKDAY_ROW_HEIGHT,
33910
+ flexGrow: 1,
33911
+ flexShrink: 1,
33912
+ flexBasis: 0,
33913
+ alignItems: "center",
33914
+ justifyContent: "center"
33796
33915
  },
33797
33916
  weekdayText: {
33798
33917
  ...datePickerTypography.weekday,
@@ -33801,29 +33920,36 @@ var styles22 = StyleSheet.create({
33801
33920
  textTransform: "uppercase"
33802
33921
  },
33803
33922
  weekRow: {
33923
+ width: MENU_CONTENT_WIDTH,
33804
33924
  flexDirection: "row",
33805
33925
  position: "relative"
33806
33926
  },
33807
33927
  weekRowSpaced: {
33808
- marginTop: 8
33928
+ marginTop: WEEK_ROW_GAP
33809
33929
  },
33810
33930
  rangeHighlight: {
33811
33931
  position: "absolute",
33812
- top: (DAY_CELL_HEIGHT - DAY_CIRCLE_SIZE) / 2,
33813
- bottom: (DAY_CELL_HEIGHT - DAY_CIRCLE_SIZE) / 2,
33814
- borderRadius: DAY_CIRCLE_SIZE / 2,
33932
+ top: 0,
33933
+ bottom: 0,
33934
+ borderRadius: DAY_CELL_RADIUS,
33815
33935
  backgroundColor: colors.primaryHover
33816
33936
  },
33817
33937
  dayCellWrap: {
33818
- flex: 1,
33938
+ width: DAY_CELL_WIDTH,
33819
33939
  height: DAY_CELL_HEIGHT,
33940
+ flexGrow: 1,
33941
+ flexShrink: 1,
33942
+ flexBasis: 0,
33820
33943
  alignItems: "center",
33821
- justifyContent: "center"
33944
+ justifyContent: "center",
33945
+ opacity: 1
33822
33946
  },
33823
33947
  dayCircle: {
33824
- width: DAY_CIRCLE_SIZE,
33825
- height: DAY_CIRCLE_SIZE,
33826
- borderRadius: DAY_CIRCLE_SIZE / 2,
33948
+ width: "100%",
33949
+ height: "100%",
33950
+ borderRadius: DAY_CELL_RADIUS,
33951
+ padding: DAY_CELL_PADDING,
33952
+ gap: 10,
33827
33953
  alignItems: "center",
33828
33954
  justifyContent: "center"
33829
33955
  },
@@ -34134,6 +34260,8 @@ var Input = forwardRef(function Input2({
34134
34260
  const [focused, setFocused] = useState(false);
34135
34261
  const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? "");
34136
34262
  const metrics = sizeConfig2[size];
34263
+ const reactId = useId();
34264
+ const inputDomId = `eh-input-${reactId.replace(/:/g, "")}`;
34137
34265
  const isControlled = typeof value === "string";
34138
34266
  const currentValue = isControlled ? value : uncontrolledValue;
34139
34267
  const hasValue = currentValue.length > 0;
@@ -34150,28 +34278,37 @@ var Input = forwardRef(function Input2({
34150
34278
  size: metrics.iconSize,
34151
34279
  color: chrome.rightIconColor
34152
34280
  });
34281
+ const focusInput = () => {
34282
+ if (disabled) return;
34283
+ inputRef.current?.focus();
34284
+ };
34153
34285
  useApplyWebClassName(rootRef, className);
34154
34286
  useApplyWebClassName(inputRef, inputClassName);
34287
+ const fieldChromeStyle = [
34288
+ styles25.field,
34289
+ {
34290
+ height: metrics.height,
34291
+ borderRadius: metrics.borderRadius,
34292
+ paddingTop: metrics.paddingVertical,
34293
+ paddingBottom: metrics.paddingVertical,
34294
+ paddingLeft: metrics.paddingHorizontal,
34295
+ paddingRight: metrics.paddingHorizontal,
34296
+ gap: metrics.gap,
34297
+ borderColor: chrome.borderColor,
34298
+ backgroundColor: chrome.backgroundColor
34299
+ },
34300
+ Platform.OS === "web" ? styles25.fieldWeb : null,
34301
+ fieldStyle
34302
+ ];
34155
34303
  return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles25.root, disabled && styles25.disabled, style], children: [
34156
- showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles25.label, { color: chrome.labelColor }], children: label }) : null,
34304
+ showLabel && label ? /* @__PURE__ */ jsx(Pressable, { disabled, onPress: focusInput, style: styles25.labelPressable, children: /* @__PURE__ */ jsx(Text, { style: [styles25.label, { color: chrome.labelColor }], children: label }) }) : null,
34157
34305
  /* @__PURE__ */ jsxs(
34158
- View,
34306
+ Pressable,
34159
34307
  {
34160
- style: [
34161
- styles25.field,
34162
- {
34163
- height: metrics.height,
34164
- borderRadius: metrics.borderRadius,
34165
- paddingTop: metrics.paddingVertical,
34166
- paddingBottom: metrics.paddingVertical,
34167
- paddingLeft: metrics.paddingHorizontal,
34168
- paddingRight: metrics.paddingHorizontal,
34169
- gap: metrics.gap,
34170
- borderColor: chrome.borderColor,
34171
- backgroundColor: chrome.backgroundColor
34172
- },
34173
- fieldStyle
34174
- ],
34308
+ accessibilityRole: "none",
34309
+ disabled,
34310
+ onPress: focusInput,
34311
+ style: fieldChromeStyle,
34175
34312
  children: [
34176
34313
  hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: [styles25.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: leftIconNode }) : null,
34177
34314
  /* @__PURE__ */ jsx(
@@ -34179,6 +34316,7 @@ var Input = forwardRef(function Input2({
34179
34316
  {
34180
34317
  ref: setInputRef,
34181
34318
  ...textInputProps,
34319
+ nativeID: inputDomId,
34182
34320
  value: isControlled ? value : void 0,
34183
34321
  defaultValue: isControlled ? void 0 : defaultValue,
34184
34322
  editable: !disabled,
@@ -34219,7 +34357,16 @@ var Input = forwardRef(function Input2({
34219
34357
  hitSlop: 8,
34220
34358
  children: rightIconNode
34221
34359
  }
34222
- ) : /* @__PURE__ */ jsx(View, { style: [styles25.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }], children: rightIconNode }) : null
34360
+ ) : /* @__PURE__ */ jsx(
34361
+ Pressable,
34362
+ {
34363
+ accessibilityRole: "none",
34364
+ disabled,
34365
+ onPress: focusInput,
34366
+ style: [styles25.iconSlot, { width: metrics.iconSize, height: metrics.iconSize }],
34367
+ children: rightIconNode
34368
+ }
34369
+ ) : null
34223
34370
  ]
34224
34371
  }
34225
34372
  ),
@@ -34235,6 +34382,9 @@ var styles25 = StyleSheet.create({
34235
34382
  disabled: {
34236
34383
  opacity: 0.6
34237
34384
  },
34385
+ labelPressable: {
34386
+ alignSelf: "flex-start"
34387
+ },
34238
34388
  label: {
34239
34389
  ...inputTypography.label
34240
34390
  },
@@ -34243,13 +34393,21 @@ var styles25 = StyleSheet.create({
34243
34393
  flexDirection: "row",
34244
34394
  alignItems: "center"
34245
34395
  },
34396
+ fieldWeb: {
34397
+ // Web-only cursor for the clickable field chrome.
34398
+ cursor: "text"
34399
+ },
34246
34400
  input: {
34247
34401
  flex: 1,
34402
+ alignSelf: "stretch",
34248
34403
  paddingVertical: 0,
34249
34404
  margin: 0
34250
34405
  },
34251
34406
  inputWeb: {
34252
- outlineStyle: "none"
34407
+ outlineStyle: "none",
34408
+ height: "100%",
34409
+ minWidth: 0,
34410
+ cursor: "text"
34253
34411
  },
34254
34412
  inputAndroid: {
34255
34413
  includeFontPadding: false
@@ -34612,6 +34770,7 @@ var Select = forwardRef(
34612
34770
  emptyText = "No results",
34613
34771
  valueColor,
34614
34772
  style,
34773
+ menuStyle,
34615
34774
  className,
34616
34775
  accessibilityLabel,
34617
34776
  // Pulled out only to keep them off `rest` (which is spread onto the root View);
@@ -34639,6 +34798,8 @@ var Select = forwardRef(
34639
34798
  const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
34640
34799
  const [searchQuery, setSearchQuery] = useState("");
34641
34800
  const [hoveredValue, setHoveredValue] = useState(null);
34801
+ const [menuAlignEnd, setMenuAlignEnd] = useState(false);
34802
+ const [menuPlaceAbove, setMenuPlaceAbove] = useState(false);
34642
34803
  const selectedValues = useMemo(() => {
34643
34804
  const current = isValueControlled ? valueProp : multiple ? uncontrolledMultiple : uncontrolledSingle;
34644
34805
  return toArray(current);
@@ -34657,6 +34818,23 @@ var Select = forwardRef(
34657
34818
  return options.filter((option) => option.label.toLowerCase().includes(query));
34658
34819
  }, [isExternalSearch, options, searchQuery]);
34659
34820
  useApplyWebClassName(rootRef, className);
34821
+ const resolvedMenuWidth = useMemo(() => {
34822
+ const flat = StyleSheet.flatten(menuStyle);
34823
+ const width = flat?.width;
34824
+ if (typeof width === "number") return width;
34825
+ const minWidth = flat?.minWidth;
34826
+ if (typeof minWidth === "number") return minWidth;
34827
+ return null;
34828
+ }, [menuStyle]);
34829
+ const estimatedMenuHeight = useMemo(() => {
34830
+ const searchBlock = showSearch ? 40 + 8 : 0;
34831
+ const optionCount = Math.max(filteredOptions.length, 1);
34832
+ const listHeight = Math.min(
34833
+ optionCount * 43 + Math.max(0, optionCount - 1) * 8,
34834
+ MENU_MAX_LIST_HEIGHT
34835
+ );
34836
+ return 24 + searchBlock + listHeight;
34837
+ }, [filteredOptions.length, showSearch]);
34660
34838
  const setOpen = useCallback(
34661
34839
  (next) => {
34662
34840
  if (!isOpenControlled) setUncontrolledOpen(next);
@@ -34666,11 +34844,37 @@ var Select = forwardRef(
34666
34844
  } else {
34667
34845
  setSearchQuery("");
34668
34846
  setHoveredValue(null);
34847
+ setMenuAlignEnd(false);
34848
+ setMenuPlaceAbove(false);
34669
34849
  onSearchChange?.("");
34670
34850
  }
34671
34851
  },
34672
34852
  [isOpenControlled, onOpenChange, onSearchChange, selectedValues]
34673
34853
  );
34854
+ useLayoutEffect(() => {
34855
+ if (Platform.OS !== "web" || !isOpen) return;
34856
+ const updateMenuPlacement = () => {
34857
+ const trigger = triggerRef.current;
34858
+ const rect = trigger?.getBoundingClientRect?.();
34859
+ if (!rect) return;
34860
+ const viewportPadding = 8;
34861
+ const gap = 8;
34862
+ const menuWidth = Math.max(rect.width, resolvedMenuWidth ?? 0);
34863
+ const overflowsRight = rect.left + menuWidth > window.innerWidth - viewportPadding;
34864
+ setMenuAlignEnd(overflowsRight);
34865
+ const spaceBelow = window.innerHeight - viewportPadding - rect.bottom;
34866
+ const spaceAbove = rect.top - viewportPadding;
34867
+ const needsAbove = estimatedMenuHeight + gap > spaceBelow && spaceAbove > spaceBelow;
34868
+ setMenuPlaceAbove(needsAbove);
34869
+ };
34870
+ updateMenuPlacement();
34871
+ window.addEventListener("resize", updateMenuPlacement);
34872
+ window.addEventListener("scroll", updateMenuPlacement, true);
34873
+ return () => {
34874
+ window.removeEventListener("resize", updateMenuPlacement);
34875
+ window.removeEventListener("scroll", updateMenuPlacement, true);
34876
+ };
34877
+ }, [estimatedMenuHeight, isOpen, resolvedMenuWidth]);
34674
34878
  const handleSearchChange = (text) => {
34675
34879
  setSearchQuery(text);
34676
34880
  onSearchChange?.(text);
@@ -34845,69 +35049,80 @@ var Select = forwardRef(
34845
35049
  ]
34846
35050
  }
34847
35051
  ),
34848
- isOpen ? /* @__PURE__ */ jsxs(View, { style: styles27.menu, children: [
34849
- showSearch ? /* @__PURE__ */ jsxs(View, { style: styles27.searchField, children: [
34850
- /* @__PURE__ */ jsx(View, { style: styles27.iconSlot, children: /* @__PURE__ */ jsx(SearchIcon, { size: ICON_SIZE12, color: colors.grey100 }) }),
34851
- /* @__PURE__ */ jsx(
34852
- TextInput,
34853
- {
34854
- ref: searchInputRef,
34855
- value: searchQuery,
34856
- onChangeText: handleSearchChange,
34857
- editable: !disabled,
34858
- placeholder: searchPlaceholder,
34859
- placeholderTextColor: colors.grey100,
34860
- style: [
34861
- styles27.searchInput,
34862
- Platform.OS === "web" ? styles27.searchInputWeb : null,
34863
- Platform.OS === "android" ? styles27.searchInputAndroid : null
34864
- ],
34865
- accessibilityLabel: searchPlaceholder
34866
- }
34867
- )
34868
- ] }) : null,
34869
- /* @__PURE__ */ jsxs(
34870
- ScrollView,
34871
- {
34872
- style: styles27.optionList,
34873
- contentContainerStyle: styles27.optionListContent,
34874
- keyboardShouldPersistTaps: "handled",
34875
- showsVerticalScrollIndicator: false,
34876
- children: [
34877
- loading ? /* @__PURE__ */ jsx(View, { style: styles27.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles27.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx(View, { style: styles27.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles27.statusText, children: emptyText }) }) : null,
34878
- !loading && filteredOptions.map((option) => {
34879
- const isSelected = selectedValues.includes(option.value);
34880
- const isHovered = hoveredValue === option.value;
34881
- const visualState = isSelected ? "selected" : isHovered ? "hover" : "default";
34882
- return /* @__PURE__ */ jsxs(
34883
- Pressable,
34884
- {
34885
- onPress: () => handleSelect(option.value),
34886
- disabled,
34887
- onHoverIn: () => setHoveredValue(option.value),
34888
- onHoverOut: () => setHoveredValue((current) => current === option.value ? null : current),
34889
- onPressIn: () => setHoveredValue(option.value),
34890
- onPressOut: () => setHoveredValue((current) => current === option.value ? null : current),
34891
- accessibilityRole: multiple ? "checkbox" : "button",
34892
- accessibilityState: { selected: isSelected, checked: isSelected, disabled },
34893
- style: [
34894
- styles27.item,
35052
+ isOpen ? /* @__PURE__ */ jsxs(
35053
+ View,
35054
+ {
35055
+ style: [
35056
+ styles27.menu,
35057
+ menuAlignEnd ? styles27.menuAlignEnd : styles27.menuAlignStart,
35058
+ menuPlaceAbove ? styles27.menuAbove : styles27.menuBelow,
35059
+ menuStyle
35060
+ ],
35061
+ children: [
35062
+ showSearch ? /* @__PURE__ */ jsxs(View, { style: styles27.searchField, children: [
35063
+ /* @__PURE__ */ jsx(View, { style: styles27.iconSlot, children: /* @__PURE__ */ jsx(SearchIcon, { size: ICON_SIZE12, color: colors.grey100 }) }),
35064
+ /* @__PURE__ */ jsx(
35065
+ TextInput,
35066
+ {
35067
+ ref: searchInputRef,
35068
+ value: searchQuery,
35069
+ onChangeText: handleSearchChange,
35070
+ editable: !disabled,
35071
+ placeholder: searchPlaceholder,
35072
+ placeholderTextColor: colors.grey100,
35073
+ style: [
35074
+ styles27.searchInput,
35075
+ Platform.OS === "web" ? styles27.searchInputWeb : null,
35076
+ Platform.OS === "android" ? styles27.searchInputAndroid : null
35077
+ ],
35078
+ accessibilityLabel: searchPlaceholder
35079
+ }
35080
+ )
35081
+ ] }) : null,
35082
+ /* @__PURE__ */ jsxs(
35083
+ ScrollView,
35084
+ {
35085
+ style: styles27.optionList,
35086
+ contentContainerStyle: styles27.optionListContent,
35087
+ keyboardShouldPersistTaps: "handled",
35088
+ showsVerticalScrollIndicator: false,
35089
+ children: [
35090
+ loading ? /* @__PURE__ */ jsx(View, { style: styles27.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles27.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx(View, { style: styles27.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles27.statusText, children: emptyText }) }) : null,
35091
+ !loading && filteredOptions.map((option) => {
35092
+ const isSelected = selectedValues.includes(option.value);
35093
+ const isHovered = hoveredValue === option.value;
35094
+ const visualState = isSelected ? "selected" : isHovered ? "hover" : "default";
35095
+ return /* @__PURE__ */ jsxs(
35096
+ Pressable,
34895
35097
  {
34896
- backgroundColor: itemBackground(visualState)
34897
- }
34898
- ],
34899
- children: [
34900
- multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles27.itemCheckbox, children: /* @__PURE__ */ jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
34901
- /* @__PURE__ */ jsx(Text, { style: styles27.itemLabel, numberOfLines: 1, children: option.label })
34902
- ]
34903
- },
34904
- option.value
34905
- );
34906
- })
34907
- ]
34908
- }
34909
- )
34910
- ] }) : null
35098
+ onPress: () => handleSelect(option.value),
35099
+ disabled,
35100
+ onHoverIn: () => setHoveredValue(option.value),
35101
+ onHoverOut: () => setHoveredValue((current) => current === option.value ? null : current),
35102
+ onPressIn: () => setHoveredValue(option.value),
35103
+ onPressOut: () => setHoveredValue((current) => current === option.value ? null : current),
35104
+ accessibilityRole: multiple ? "checkbox" : "button",
35105
+ accessibilityState: { selected: isSelected, checked: isSelected, disabled },
35106
+ style: [
35107
+ styles27.item,
35108
+ {
35109
+ backgroundColor: itemBackground(visualState)
35110
+ }
35111
+ ],
35112
+ children: [
35113
+ multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles27.itemCheckbox, children: /* @__PURE__ */ jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
35114
+ /* @__PURE__ */ jsx(Text, { style: styles27.itemLabel, numberOfLines: 1, children: option.label })
35115
+ ]
35116
+ },
35117
+ option.value
35118
+ );
35119
+ })
35120
+ ]
35121
+ }
35122
+ )
35123
+ ]
35124
+ }
35125
+ ) : null
34911
35126
  ] }),
34912
35127
  showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles27.hint, { color: hintColor }], children: hint }) : null
34913
35128
  ]
@@ -35016,10 +35231,7 @@ var styles27 = StyleSheet.create({
35016
35231
  },
35017
35232
  menu: {
35018
35233
  position: "absolute",
35019
- top: "100%",
35020
- left: 0,
35021
- right: 0,
35022
- marginTop: 8,
35234
+ minWidth: "100%",
35023
35235
  zIndex: 10,
35024
35236
  borderRadius: MENU_RADIUS3,
35025
35237
  padding: 12,
@@ -35034,6 +35246,26 @@ var styles27 = StyleSheet.create({
35034
35246
  }
35035
35247
  })
35036
35248
  },
35249
+ menuAlignStart: {
35250
+ left: 0,
35251
+ right: "auto"
35252
+ },
35253
+ menuAlignEnd: {
35254
+ left: "auto",
35255
+ right: 0
35256
+ },
35257
+ menuBelow: {
35258
+ top: "100%",
35259
+ bottom: "auto",
35260
+ marginTop: 8,
35261
+ marginBottom: 0
35262
+ },
35263
+ menuAbove: {
35264
+ top: "auto",
35265
+ bottom: "100%",
35266
+ marginTop: 0,
35267
+ marginBottom: 8
35268
+ },
35037
35269
  optionList: {
35038
35270
  maxHeight: MENU_MAX_LIST_HEIGHT
35039
35271
  },
@@ -35169,25 +35401,35 @@ var Textarea = forwardRef(function Textarea2({
35169
35401
  const setInputRef = useMemo(() => mergeRefs(inputRef, forwardedRef), [forwardedRef]);
35170
35402
  const [focused, setFocused] = useState(false);
35171
35403
  const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? "");
35404
+ const reactId = useId();
35405
+ const inputDomId = `eh-textarea-${reactId.replace(/:/g, "")}`;
35172
35406
  const isControlled = typeof value === "string";
35173
35407
  const currentValue = isControlled ? value : uncontrolledValue;
35174
35408
  const hasValue = currentValue.length > 0;
35175
35409
  const visualState = resolveVisualState2({ disabled, error, focused, hasValue });
35176
35410
  const chrome = chromeFor2(visualState);
35177
35411
  const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
35412
+ const focusInput = () => {
35413
+ if (disabled) return;
35414
+ inputRef.current?.focus();
35415
+ };
35178
35416
  useApplyWebClassName(rootRef, className);
35179
35417
  useApplyWebClassName(inputRef, inputClassName);
35180
35418
  return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles28.root, disabled && styles28.disabled, style], children: [
35181
- showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles28.label, { color: chrome.labelColor }], children: label }) : null,
35419
+ showLabel && label ? /* @__PURE__ */ jsx(Pressable, { disabled, onPress: focusInput, style: styles28.labelPressable, children: /* @__PURE__ */ jsx(Text, { style: [styles28.label, { color: chrome.labelColor }], children: label }) }) : null,
35182
35420
  /* @__PURE__ */ jsx(
35183
- View,
35421
+ Pressable,
35184
35422
  {
35423
+ accessibilityRole: "none",
35424
+ disabled,
35425
+ onPress: focusInput,
35185
35426
  style: [
35186
35427
  styles28.field,
35187
35428
  {
35188
35429
  borderColor: chrome.borderColor,
35189
35430
  backgroundColor: chrome.backgroundColor
35190
35431
  },
35432
+ Platform.OS === "web" ? styles28.fieldWeb : null,
35191
35433
  fieldStyle
35192
35434
  ],
35193
35435
  children: /* @__PURE__ */ jsx(
@@ -35195,6 +35437,7 @@ var Textarea = forwardRef(function Textarea2({
35195
35437
  {
35196
35438
  ref: setInputRef,
35197
35439
  ...textInputProps,
35440
+ nativeID: inputDomId,
35198
35441
  multiline: true,
35199
35442
  textAlignVertical: "top",
35200
35443
  value: isControlled ? value : void 0,
@@ -35240,6 +35483,9 @@ var styles28 = StyleSheet.create({
35240
35483
  disabled: {
35241
35484
  opacity: 0.6
35242
35485
  },
35486
+ labelPressable: {
35487
+ alignSelf: "flex-start"
35488
+ },
35243
35489
  label: {
35244
35490
  ...textareaTypography.label
35245
35491
  },
@@ -35252,14 +35498,21 @@ var styles28 = StyleSheet.create({
35252
35498
  paddingLeft: FIELD_PADDING_HORIZONTAL,
35253
35499
  paddingRight: FIELD_PADDING_HORIZONTAL
35254
35500
  },
35501
+ fieldWeb: {
35502
+ cursor: "text"
35503
+ },
35255
35504
  input: {
35256
35505
  flex: 1,
35506
+ alignSelf: "stretch",
35257
35507
  paddingVertical: 0,
35258
35508
  margin: 0
35259
35509
  },
35260
35510
  inputWeb: {
35261
35511
  outlineStyle: "none",
35262
- resize: "none"
35512
+ resize: "none",
35513
+ height: "100%",
35514
+ minWidth: 0,
35515
+ cursor: "text"
35263
35516
  },
35264
35517
  inputAndroid: {
35265
35518
  includeFontPadding: false