@ecohouse/ui 0.1.28 → 0.1.29

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,5 +1,5 @@
1
- import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useLayoutEffect, isValidElement, cloneElement } from 'react';
2
- import { View, Text, Platform, Pressable, StyleSheet, Image, Animated, Easing, TouchableOpacity, TextInput, ScrollView, PanResponder } from 'react-native';
1
+ import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useImperativeHandle, useLayoutEffect, isValidElement, cloneElement } from 'react';
2
+ import { View, Text, Platform, Pressable, StyleSheet, Image, Animated, Easing, TouchableOpacity, TextInput, useWindowDimensions, ScrollView, PanResponder } from 'react-native';
3
3
  import Svg16, { Path } from 'react-native-svg';
4
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
5
 
@@ -3865,6 +3865,207 @@ var styles13 = StyleSheet.create({
3865
3865
  ...inputTypography.hint
3866
3866
  }
3867
3867
  });
3868
+
3869
+ // src/components/VerificationCodeInput/VerificationCodeInput.utils.ts
3870
+ function normalizeVerificationCode(value, length) {
3871
+ return value.replace(/\D/g, "").slice(0, Math.max(1, length));
3872
+ }
3873
+ function updateVerificationCode(currentCode, index, input, length) {
3874
+ const safeLength = Math.max(1, length);
3875
+ const safeIndex = Math.min(Math.max(0, index), safeLength - 1);
3876
+ const current = normalizeVerificationCode(currentCode, safeLength);
3877
+ const insertedDigits = normalizeVerificationCode(input, safeLength - safeIndex);
3878
+ if (!insertedDigits) {
3879
+ return {
3880
+ code: `${current.slice(0, safeIndex)}${current.slice(safeIndex + 1)}`,
3881
+ nextFocus: safeIndex
3882
+ };
3883
+ }
3884
+ return {
3885
+ code: `${current.slice(0, safeIndex)}${insertedDigits}${current.slice(
3886
+ safeIndex + insertedDigits.length
3887
+ )}`.slice(0, safeLength),
3888
+ nextFocus: Math.min(safeIndex + insertedDigits.length, safeLength - 1)
3889
+ };
3890
+ }
3891
+ var DEFAULT_LENGTH = 6;
3892
+ var DESKTOP_CELL_WIDTH = 54;
3893
+ var MOBILE_CELL_WIDTH = 50;
3894
+ var CELL_HEIGHT = 68;
3895
+ var DESKTOP_GAP = 12;
3896
+ var MOBILE_GAP = 4;
3897
+ var MOBILE_BREAKPOINT = 640;
3898
+ var VerificationCodeInput = forwardRef(function VerificationCodeInput2({
3899
+ length = DEFAULT_LENGTH,
3900
+ value,
3901
+ defaultValue = "",
3902
+ onValueChange,
3903
+ onComplete,
3904
+ onSubmit,
3905
+ error = false,
3906
+ disabled = false,
3907
+ autoFocus = false,
3908
+ getDigitAccessibilityLabel,
3909
+ style,
3910
+ inputStyle,
3911
+ className,
3912
+ ...viewProps
3913
+ }, forwardedRef) {
3914
+ const safeLength = Math.max(1, Math.floor(length));
3915
+ const isControlled = typeof value === "string";
3916
+ const [uncontrolledValue, setUncontrolledValue] = useState(
3917
+ () => normalizeVerificationCode(defaultValue, safeLength)
3918
+ );
3919
+ const [focusedIndex, setFocusedIndex] = useState(null);
3920
+ const { width: viewportWidth } = useWindowDimensions();
3921
+ const rootRef = useRef(null);
3922
+ const inputRefs = useRef([]);
3923
+ const currentCode = normalizeVerificationCode(
3924
+ isControlled ? value : uncontrolledValue,
3925
+ safeLength
3926
+ );
3927
+ useApplyWebClassName(rootRef, className);
3928
+ const focus = useCallback(
3929
+ (index = 0) => {
3930
+ const safeIndex = Math.min(Math.max(0, index), safeLength - 1);
3931
+ inputRefs.current[safeIndex]?.focus();
3932
+ },
3933
+ [safeLength]
3934
+ );
3935
+ const commit = useCallback(
3936
+ (nextValue) => {
3937
+ const normalized = normalizeVerificationCode(nextValue, safeLength);
3938
+ if (!isControlled) {
3939
+ setUncontrolledValue(normalized);
3940
+ }
3941
+ onValueChange?.(normalized);
3942
+ if (normalized.length === safeLength) {
3943
+ onComplete?.(normalized);
3944
+ }
3945
+ },
3946
+ [isControlled, onComplete, onValueChange, safeLength]
3947
+ );
3948
+ useImperativeHandle(
3949
+ forwardedRef,
3950
+ () => ({
3951
+ clear: () => {
3952
+ commit("");
3953
+ focus(0);
3954
+ },
3955
+ focus
3956
+ }),
3957
+ [commit, focus]
3958
+ );
3959
+ const handleChange = (index, input) => {
3960
+ const update = updateVerificationCode(currentCode, index, input, safeLength);
3961
+ commit(update.code);
3962
+ focus(update.nextFocus);
3963
+ };
3964
+ const handleKeyPress = (index, event) => {
3965
+ const key = event.nativeEvent.key;
3966
+ if (key === "Backspace" && !currentCode[index] && index > 0) {
3967
+ const update = updateVerificationCode(currentCode, index - 1, "", safeLength);
3968
+ commit(update.code);
3969
+ focus(index - 1);
3970
+ return;
3971
+ }
3972
+ if (key === "ArrowLeft" && index > 0) {
3973
+ focus(index - 1);
3974
+ }
3975
+ if (key === "ArrowRight" && index < safeLength - 1) {
3976
+ focus(index + 1);
3977
+ }
3978
+ };
3979
+ const mobile = viewportWidth < MOBILE_BREAKPOINT;
3980
+ const cellWidth = mobile ? MOBILE_CELL_WIDTH : DESKTOP_CELL_WIDTH;
3981
+ const cellGap = mobile ? MOBILE_GAP : DESKTOP_GAP;
3982
+ const rootWidth = cellWidth * safeLength + cellGap * Math.max(0, safeLength - 1);
3983
+ return /* @__PURE__ */ jsx(
3984
+ View,
3985
+ {
3986
+ ...viewProps,
3987
+ ref: rootRef,
3988
+ style: [
3989
+ styles14.root,
3990
+ { width: rootWidth, maxWidth: "100%", gap: cellGap },
3991
+ disabled && styles14.disabled,
3992
+ style
3993
+ ],
3994
+ children: Array.from({ length: safeLength }, (_, index) => {
3995
+ const active = focusedIndex === index;
3996
+ const borderColor = error ? colors.redHover : active ? colors.primary : colors.grey600;
3997
+ return /* @__PURE__ */ jsx(
3998
+ TextInput,
3999
+ {
4000
+ ref: (element) => {
4001
+ inputRefs.current[index] = element;
4002
+ },
4003
+ accessibilityLabel: getDigitAccessibilityLabel?.(index) ?? `Verification code digit ${index + 1}`,
4004
+ accessibilityState: { disabled },
4005
+ autoComplete: index === 0 ? "one-time-code" : "off",
4006
+ autoFocus: autoFocus && index === 0,
4007
+ caretHidden: Platform.OS !== "web",
4008
+ editable: !disabled,
4009
+ inputMode: "numeric",
4010
+ keyboardType: "number-pad",
4011
+ maxLength: safeLength,
4012
+ onBlur: () => setFocusedIndex((current) => current === index ? null : current),
4013
+ onChangeText: (text) => handleChange(index, text),
4014
+ onFocus: () => setFocusedIndex(index),
4015
+ onKeyPress: (event) => handleKeyPress(index, event),
4016
+ onSubmitEditing: () => onSubmit?.(currentCode),
4017
+ selectTextOnFocus: true,
4018
+ style: [
4019
+ styles14.cell,
4020
+ {
4021
+ width: cellWidth,
4022
+ height: CELL_HEIGHT,
4023
+ borderColor,
4024
+ color: error ? colors.red : colors.white
4025
+ },
4026
+ Platform.OS === "web" ? styles14.cellWeb : null,
4027
+ Platform.OS === "android" ? styles14.cellAndroid : null,
4028
+ inputStyle
4029
+ ],
4030
+ value: currentCode[index] ?? ""
4031
+ },
4032
+ index
4033
+ );
4034
+ })
4035
+ }
4036
+ );
4037
+ });
4038
+ var styles14 = StyleSheet.create({
4039
+ root: {
4040
+ minWidth: 0,
4041
+ alignSelf: "center",
4042
+ flexDirection: "row",
4043
+ justifyContent: "center"
4044
+ },
4045
+ disabled: {
4046
+ opacity: 0.6
4047
+ },
4048
+ cell: {
4049
+ minWidth: 0,
4050
+ flexGrow: 0,
4051
+ flexShrink: 0,
4052
+ borderWidth: 1,
4053
+ borderRadius: 16,
4054
+ padding: 0,
4055
+ margin: 0,
4056
+ textAlign: "center",
4057
+ fontFamily: fonts.sans,
4058
+ fontSize: 22,
4059
+ fontWeight: "600",
4060
+ lineHeight: 22
4061
+ },
4062
+ cellWeb: {
4063
+ outlineStyle: "none"
4064
+ },
4065
+ cellAndroid: {
4066
+ includeFontPadding: false
4067
+ }
4068
+ });
3868
4069
  var DEFAULT_WIDTH3 = 308;
3869
4070
  var TRIGGER_HEIGHT2 = 44;
3870
4071
  var TRIGGER_RADIUS2 = 60;
@@ -3944,25 +4145,25 @@ function MultiValueChips({ options, disabled, onRemove }) {
3944
4145
  const next = Math.ceil(event.nativeEvent.layout.width);
3945
4146
  setEllipsisWidth((current) => current === next ? current : next);
3946
4147
  };
3947
- return /* @__PURE__ */ jsxs(View, { style: styles14.multiValueRoot, children: [
3948
- /* @__PURE__ */ jsxs(View, { pointerEvents: "none", style: styles14.measureRow, children: [
4148
+ return /* @__PURE__ */ jsxs(View, { style: styles15.multiValueRoot, children: [
4149
+ /* @__PURE__ */ jsxs(View, { pointerEvents: "none", style: styles15.measureRow, children: [
3949
4150
  options.map((option) => /* @__PURE__ */ jsxs(
3950
4151
  View,
3951
4152
  {
3952
- style: styles14.chip,
4153
+ style: styles15.chip,
3953
4154
  onLayout: (event) => handleChipLayout(option.value, event),
3954
4155
  children: [
3955
- /* @__PURE__ */ jsx(Text, { style: styles14.chipLabel, numberOfLines: 1, children: option.label }),
3956
- /* @__PURE__ */ jsx(Text, { style: styles14.chipRemove, children: "\xD7" })
4156
+ /* @__PURE__ */ jsx(Text, { style: styles15.chipLabel, numberOfLines: 1, children: option.label }),
4157
+ /* @__PURE__ */ jsx(Text, { style: styles15.chipRemove, children: "\xD7" })
3957
4158
  ]
3958
4159
  },
3959
4160
  `measure-${option.value}`
3960
4161
  )),
3961
- /* @__PURE__ */ jsx(View, { style: styles14.ellipsis, onLayout: handleEllipsisLayout, children: /* @__PURE__ */ jsx(Text, { style: styles14.ellipsisText, children: "..." }) })
4162
+ /* @__PURE__ */ jsx(View, { style: styles15.ellipsis, onLayout: handleEllipsisLayout, children: /* @__PURE__ */ jsx(Text, { style: styles15.ellipsisText, children: "..." }) })
3962
4163
  ] }),
3963
- /* @__PURE__ */ jsxs(View, { style: styles14.chipsRow, onLayout: handleContainerLayout, children: [
3964
- visible.map((option) => /* @__PURE__ */ jsxs(View, { style: styles14.chip, children: [
3965
- /* @__PURE__ */ jsx(Text, { style: styles14.chipLabel, numberOfLines: 1, children: option.label }),
4164
+ /* @__PURE__ */ jsxs(View, { style: styles15.chipsRow, onLayout: handleContainerLayout, children: [
4165
+ visible.map((option) => /* @__PURE__ */ jsxs(View, { style: styles15.chip, children: [
4166
+ /* @__PURE__ */ jsx(Text, { style: styles15.chipLabel, numberOfLines: 1, children: option.label }),
3966
4167
  /* @__PURE__ */ jsx(
3967
4168
  Pressable,
3968
4169
  {
@@ -3974,11 +4175,11 @@ function MultiValueChips({ options, disabled, onRemove }) {
3974
4175
  hitSlop: 6,
3975
4176
  accessibilityRole: "button",
3976
4177
  accessibilityLabel: `Remove ${option.label}`,
3977
- children: /* @__PURE__ */ jsx(Text, { style: styles14.chipRemove, children: "\xD7" })
4178
+ children: /* @__PURE__ */ jsx(Text, { style: styles15.chipRemove, children: "\xD7" })
3978
4179
  }
3979
4180
  )
3980
4181
  ] }, option.value)),
3981
- hasOverflow ? /* @__PURE__ */ jsx(View, { style: styles14.ellipsis, children: /* @__PURE__ */ jsx(Text, { style: styles14.ellipsisText, children: "..." }) }) : null
4182
+ hasOverflow ? /* @__PURE__ */ jsx(View, { style: styles15.ellipsis, children: /* @__PURE__ */ jsx(Text, { style: styles15.ellipsisText, children: "..." }) }) : null
3982
4183
  ] })
3983
4184
  ] });
3984
4185
  }
@@ -4202,11 +4403,11 @@ var Select = forwardRef(
4202
4403
  {
4203
4404
  ...rest,
4204
4405
  ref: setRootRef,
4205
- style: [styles14.root, isOpen && styles14.rootOpen, disabled && styles14.disabled, style],
4406
+ style: [styles15.root, isOpen && styles15.rootOpen, disabled && styles15.disabled, style],
4206
4407
  accessibilityState: { disabled, expanded: isOpen },
4207
4408
  children: [
4208
- showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles14.label, { color: labelColor }], children: label }) : null,
4209
- /* @__PURE__ */ jsxs(View, { style: [styles14.triggerWrap, isOpen && styles14.triggerWrapOpen], children: [
4409
+ showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles15.label, { color: labelColor }], children: label }) : null,
4410
+ /* @__PURE__ */ jsxs(View, { style: [styles15.triggerWrap, isOpen && styles15.triggerWrapOpen], children: [
4210
4411
  /* @__PURE__ */ jsxs(
4211
4412
  Pressable,
4212
4413
  {
@@ -4217,29 +4418,29 @@ var Select = forwardRef(
4217
4418
  accessibilityLabel: resolvedAccessibilityLabel,
4218
4419
  accessibilityState: { disabled, expanded: isOpen },
4219
4420
  style: [
4220
- styles14.trigger,
4421
+ styles15.trigger,
4221
4422
  {
4222
4423
  borderColor: triggerBorderColor,
4223
4424
  backgroundColor: colors.grey700
4224
4425
  }
4225
4426
  ],
4226
4427
  children: [
4227
- hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: styles14.iconSlot, children: leftIconNode }) : null,
4228
- /* @__PURE__ */ jsx(View, { style: styles14.triggerContent, children: multiple && hasValue ? /* @__PURE__ */ jsx(
4428
+ hasLeftIcon ? /* @__PURE__ */ jsx(View, { style: styles15.iconSlot, children: leftIconNode }) : null,
4429
+ /* @__PURE__ */ jsx(View, { style: styles15.triggerContent, children: multiple && hasValue ? /* @__PURE__ */ jsx(
4229
4430
  MultiValueChips,
4230
4431
  {
4231
4432
  options: selectedOptions,
4232
4433
  disabled,
4233
4434
  onRemove: handleRemoveChip
4234
4435
  }
4235
- ) : /* @__PURE__ */ jsx(Text, { style: [styles14.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: multiple ? placeholder : singleLabel }) }),
4236
- /* @__PURE__ */ jsx(View, { style: [styles14.iconSlot, isOpen && styles14.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE8, color: isOpen ? colors.primary : colors.grey100 }) })
4436
+ ) : /* @__PURE__ */ jsx(Text, { style: [styles15.triggerText, { color: triggerTextColor }], numberOfLines: 1, children: multiple ? placeholder : singleLabel }) }),
4437
+ /* @__PURE__ */ jsx(View, { style: [styles15.iconSlot, isOpen && styles15.chevronOpen], children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: ICON_SIZE8, color: isOpen ? colors.primary : colors.grey100 }) })
4237
4438
  ]
4238
4439
  }
4239
4440
  ),
4240
- isOpen ? /* @__PURE__ */ jsxs(View, { style: styles14.menu, children: [
4241
- showSearch ? /* @__PURE__ */ jsxs(View, { style: styles14.searchField, children: [
4242
- /* @__PURE__ */ jsx(View, { style: styles14.iconSlot, children: /* @__PURE__ */ jsx(SearchIcon, { size: ICON_SIZE8, color: colors.grey100 }) }),
4441
+ isOpen ? /* @__PURE__ */ jsxs(View, { style: styles15.menu, children: [
4442
+ showSearch ? /* @__PURE__ */ jsxs(View, { style: styles15.searchField, children: [
4443
+ /* @__PURE__ */ jsx(View, { style: styles15.iconSlot, children: /* @__PURE__ */ jsx(SearchIcon, { size: ICON_SIZE8, color: colors.grey100 }) }),
4243
4444
  /* @__PURE__ */ jsx(
4244
4445
  TextInput,
4245
4446
  {
@@ -4250,9 +4451,9 @@ var Select = forwardRef(
4250
4451
  placeholder: searchPlaceholder,
4251
4452
  placeholderTextColor: colors.grey100,
4252
4453
  style: [
4253
- styles14.searchInput,
4254
- Platform.OS === "web" ? styles14.searchInputWeb : null,
4255
- Platform.OS === "android" ? styles14.searchInputAndroid : null
4454
+ styles15.searchInput,
4455
+ Platform.OS === "web" ? styles15.searchInputWeb : null,
4456
+ Platform.OS === "android" ? styles15.searchInputAndroid : null
4256
4457
  ],
4257
4458
  accessibilityLabel: searchPlaceholder
4258
4459
  }
@@ -4261,12 +4462,12 @@ var Select = forwardRef(
4261
4462
  /* @__PURE__ */ jsxs(
4262
4463
  ScrollView,
4263
4464
  {
4264
- style: styles14.optionList,
4265
- contentContainerStyle: styles14.optionListContent,
4465
+ style: styles15.optionList,
4466
+ contentContainerStyle: styles15.optionListContent,
4266
4467
  keyboardShouldPersistTaps: "handled",
4267
4468
  showsVerticalScrollIndicator: false,
4268
4469
  children: [
4269
- loading ? /* @__PURE__ */ jsx(View, { style: styles14.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles14.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx(View, { style: styles14.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles14.statusText, children: emptyText }) }) : null,
4470
+ loading ? /* @__PURE__ */ jsx(View, { style: styles15.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles15.statusText, children: "Loading..." }) }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx(View, { style: styles15.statusRow, children: /* @__PURE__ */ jsx(Text, { style: styles15.statusText, children: emptyText }) }) : null,
4270
4471
  !loading && filteredOptions.map((option) => {
4271
4472
  const isSelected = selectedValues.includes(option.value);
4272
4473
  const isHovered = hoveredValue === option.value;
@@ -4283,14 +4484,14 @@ var Select = forwardRef(
4283
4484
  accessibilityRole: multiple ? "checkbox" : "button",
4284
4485
  accessibilityState: { selected: isSelected, checked: isSelected, disabled },
4285
4486
  style: [
4286
- styles14.item,
4487
+ styles15.item,
4287
4488
  {
4288
4489
  backgroundColor: itemBackground(visualState)
4289
4490
  }
4290
4491
  ],
4291
4492
  children: [
4292
- multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles14.itemCheckbox, children: /* @__PURE__ */ jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
4293
- /* @__PURE__ */ jsx(Text, { style: styles14.itemLabel, numberOfLines: 1, children: option.label })
4493
+ multiple ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles15.itemCheckbox, children: /* @__PURE__ */ jsx(Checkbox, { value: isSelected, variant: "light" }) }) : null,
4494
+ /* @__PURE__ */ jsx(Text, { style: styles15.itemLabel, numberOfLines: 1, children: option.label })
4294
4495
  ]
4295
4496
  },
4296
4497
  option.value
@@ -4301,13 +4502,13 @@ var Select = forwardRef(
4301
4502
  )
4302
4503
  ] }) : null
4303
4504
  ] }),
4304
- showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles14.hint, { color: hintColor }], children: hint }) : null
4505
+ showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles15.hint, { color: hintColor }], children: hint }) : null
4305
4506
  ]
4306
4507
  }
4307
4508
  );
4308
4509
  }
4309
4510
  );
4310
- var styles14 = StyleSheet.create({
4511
+ var styles15 = StyleSheet.create({
4311
4512
  root: {
4312
4513
  width: DEFAULT_WIDTH3,
4313
4514
  gap: 8,
@@ -4569,13 +4770,13 @@ var Textarea = forwardRef(function Textarea2({
4569
4770
  const resolvedAccessibilityLabel = accessibilityLabel ?? (showLabel ? void 0 : label);
4570
4771
  useApplyWebClassName(rootRef, className);
4571
4772
  useApplyWebClassName(inputRef, inputClassName);
4572
- return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles15.root, disabled && styles15.disabled, style], children: [
4573
- showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles15.label, { color: chrome.labelColor }], children: label }) : null,
4773
+ return /* @__PURE__ */ jsxs(View, { ref: rootRef, style: [styles16.root, disabled && styles16.disabled, style], children: [
4774
+ showLabel && label ? /* @__PURE__ */ jsx(Text, { style: [styles16.label, { color: chrome.labelColor }], children: label }) : null,
4574
4775
  /* @__PURE__ */ jsx(
4575
4776
  View,
4576
4777
  {
4577
4778
  style: [
4578
- styles15.field,
4779
+ styles16.field,
4579
4780
  {
4580
4781
  borderColor: chrome.borderColor,
4581
4782
  backgroundColor: chrome.backgroundColor
@@ -4607,11 +4808,11 @@ var Textarea = forwardRef(function Textarea2({
4607
4808
  onBlur?.(event);
4608
4809
  },
4609
4810
  style: [
4610
- styles15.input,
4811
+ styles16.input,
4611
4812
  textareaTypography.field,
4612
4813
  { color: chrome.textColor },
4613
- Platform.OS === "web" ? styles15.inputWeb : null,
4614
- Platform.OS === "android" ? styles15.inputAndroid : null,
4814
+ Platform.OS === "web" ? styles16.inputWeb : null,
4815
+ Platform.OS === "android" ? styles16.inputAndroid : null,
4615
4816
  inputStyle
4616
4817
  ],
4617
4818
  accessibilityLabel: resolvedAccessibilityLabel,
@@ -4620,10 +4821,10 @@ var Textarea = forwardRef(function Textarea2({
4620
4821
  )
4621
4822
  }
4622
4823
  ),
4623
- showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles15.hint, { color: chrome.hintColor }], children: hint }) : null
4824
+ showHint && hint ? /* @__PURE__ */ jsx(Text, { style: [styles16.hint, { color: chrome.hintColor }], children: hint }) : null
4624
4825
  ] });
4625
4826
  });
4626
- var styles15 = StyleSheet.create({
4827
+ var styles16 = StyleSheet.create({
4627
4828
  root: {
4628
4829
  width: DEFAULT_WIDTH4,
4629
4830
  gap: 8,
@@ -4723,13 +4924,13 @@ var Toggle = forwardRef(function Toggle2({
4723
4924
  accessibilityRole: "switch",
4724
4925
  accessibilityLabel: resolvedAccessibilityLabel,
4725
4926
  accessibilityState: { checked: isActive, disabled },
4726
- style: [styles16.pressable, disabled && styles16.disabled, style],
4927
+ style: [styles17.pressable, disabled && styles17.disabled, style],
4727
4928
  children: [
4728
4929
  /* @__PURE__ */ jsx(
4729
4930
  Animated.View,
4730
4931
  {
4731
4932
  style: [
4732
- styles16.track,
4933
+ styles17.track,
4733
4934
  {
4734
4935
  backgroundColor: trackBackgroundColor
4735
4936
  }
@@ -4738,7 +4939,7 @@ var Toggle = forwardRef(function Toggle2({
4738
4939
  Animated.View,
4739
4940
  {
4740
4941
  style: [
4741
- styles16.thumb,
4942
+ styles17.thumb,
4742
4943
  {
4743
4944
  transform: [{ translateX: thumbTranslateX }]
4744
4945
  }
@@ -4747,12 +4948,12 @@ var Toggle = forwardRef(function Toggle2({
4747
4948
  )
4748
4949
  }
4749
4950
  ),
4750
- labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles16.label, labelStyle], children: labelContent }) : labelContent : null
4951
+ labelContent != null && labelContent !== false ? typeof labelContent === "string" || typeof labelContent === "number" ? /* @__PURE__ */ jsx(Text, { style: [styles17.label, labelStyle], children: labelContent }) : labelContent : null
4751
4952
  ]
4752
4953
  }
4753
4954
  );
4754
4955
  });
4755
- var styles16 = StyleSheet.create({
4956
+ var styles17 = StyleSheet.create({
4756
4957
  pressable: {
4757
4958
  flexDirection: "row",
4758
4959
  alignItems: "center",
@@ -4827,21 +5028,21 @@ var RatingInput = forwardRef(
4827
5028
  {
4828
5029
  ...rest,
4829
5030
  ref: setContainerRef,
4830
- style: [styles17.root, disabled && styles17.disabled, style],
5031
+ style: [styles18.root, disabled && styles18.disabled, style],
4831
5032
  children: [
4832
- showValue ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles17.value, valueStyle], children: selectedValue.toFixed(precision) }) : null,
5033
+ showValue ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles18.value, valueStyle], children: selectedValue.toFixed(precision) }) : null,
4833
5034
  /* @__PURE__ */ jsx(
4834
5035
  View,
4835
5036
  {
4836
5037
  accessibilityRole: readOnly ? "image" : "radiogroup",
4837
5038
  accessibilityLabel: resolvedAccessibilityLabel,
4838
5039
  accessibilityState: { disabled },
4839
- style: [styles17.stars, { gap: resolvedStarGap }],
5040
+ style: [styles18.stars, { gap: resolvedStarGap }],
4840
5041
  children: Array.from({ length: STAR_COUNT }, (_, index) => {
4841
5042
  const starValue = index + 1;
4842
5043
  const isSelected = starValue <= selectedStarCount;
4843
5044
  const icon = isSelected ? /* @__PURE__ */ jsx(StarFilledIcon, { size: iconWidth, height: iconHeight }) : /* @__PURE__ */ jsx(StarIcon, { size: iconWidth, height: iconHeight });
4844
- const itemStyle = [styles17.starItem, { width: size, height: size }];
5045
+ const itemStyle = [styles18.starItem, { width: size, height: size }];
4845
5046
  if (readOnly) {
4846
5047
  return /* @__PURE__ */ jsx(View, { style: itemStyle, children: icon }, starValue);
4847
5048
  }
@@ -4867,7 +5068,7 @@ var RatingInput = forwardRef(
4867
5068
  );
4868
5069
  }
4869
5070
  );
4870
- var styles17 = StyleSheet.create({
5071
+ var styles18 = StyleSheet.create({
4871
5072
  root: {
4872
5073
  flexDirection: "row",
4873
5074
  alignItems: "center",
@@ -4931,19 +5132,19 @@ var CommentCard = forwardRef(
4931
5132
  setExpanded(next);
4932
5133
  onExpandedChange?.(next);
4933
5134
  };
4934
- return /* @__PURE__ */ jsxs(View, { ...rest, ref: setContainerRef, style: [styles18.root, style], children: [
4935
- /* @__PURE__ */ jsxs(View, { style: styles18.header, children: [
4936
- /* @__PURE__ */ jsx(View, { style: styles18.avatar, children: hasImage ? /* @__PURE__ */ jsx(
5135
+ return /* @__PURE__ */ jsxs(View, { ...rest, ref: setContainerRef, style: [styles19.root, style], children: [
5136
+ /* @__PURE__ */ jsxs(View, { style: styles19.header, children: [
5137
+ /* @__PURE__ */ jsx(View, { style: styles19.avatar, children: hasImage ? /* @__PURE__ */ jsx(
4937
5138
  Image,
4938
5139
  {
4939
5140
  source: { uri: imageUrl ?? void 0 },
4940
- style: styles18.avatarImage,
5141
+ style: styles19.avatarImage,
4941
5142
  onError: () => setImageFailed(true)
4942
5143
  }
4943
5144
  ) : /* @__PURE__ */ jsx(UserIcon, { size: 20, color: colors.primary }) }),
4944
- /* @__PURE__ */ jsxs(View, { style: styles18.identity, children: [
4945
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles18.name, children: userName }),
4946
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles18.date, children: date })
5145
+ /* @__PURE__ */ jsxs(View, { style: styles19.identity, children: [
5146
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles19.name, children: userName }),
5147
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles19.date, children: date })
4947
5148
  ] }),
4948
5149
  /* @__PURE__ */ jsx(RatingInput, { value: rating, readOnly: true, showValue: false, size: 16 })
4949
5150
  ] }),
@@ -4951,7 +5152,7 @@ var CommentCard = forwardRef(
4951
5152
  Text,
4952
5153
  {
4953
5154
  numberOfLines: expanded ? void 0 : maxCommentLines,
4954
- style: [styles18.comment, commentStyle],
5155
+ style: [styles19.comment, commentStyle],
4955
5156
  children: commentText
4956
5157
  }
4957
5158
  ),
@@ -4964,14 +5165,14 @@ var CommentCard = forwardRef(
4964
5165
  hitSlop: 6,
4965
5166
  onHoverIn: () => setActionHovered(true),
4966
5167
  onHoverOut: () => setActionHovered(false),
4967
- style: styles18.action,
5168
+ style: styles19.action,
4968
5169
  children: /* @__PURE__ */ jsx(
4969
5170
  Text,
4970
5171
  {
4971
5172
  style: [
4972
- styles18.actionText,
4973
- expanded && styles18.closeActionText,
4974
- actionHovered && (expanded ? styles18.closeActionTextHovered : styles18.openActionTextHovered)
5173
+ styles19.actionText,
5174
+ expanded && styles19.closeActionText,
5175
+ actionHovered && (expanded ? styles19.closeActionTextHovered : styles19.openActionTextHovered)
4975
5176
  ],
4976
5177
  children: expanded ? readLessLabel : readMoreLabel
4977
5178
  }
@@ -4981,7 +5182,7 @@ var CommentCard = forwardRef(
4981
5182
  ] });
4982
5183
  }
4983
5184
  );
4984
- var styles18 = StyleSheet.create({
5185
+ var styles19 = StyleSheet.create({
4985
5186
  root: {
4986
5187
  width: CARD_WIDTH,
4987
5188
  minHeight: CARD_MIN_HEIGHT,
@@ -5420,7 +5621,7 @@ var Range = forwardRef(function Range2({
5420
5621
  ...rest,
5421
5622
  ref: setRootRef,
5422
5623
  onLayout,
5423
- style: [styles19.root, disabled && styles19.disabled, style],
5624
+ style: [styles20.root, disabled && styles20.disabled, style],
5424
5625
  children: [
5425
5626
  /* @__PURE__ */ jsxs(
5426
5627
  Pressable,
@@ -5434,16 +5635,16 @@ var Range = forwardRef(function Range2({
5434
5635
  updateNearestFromTrack(event.nativeEvent.offsetX);
5435
5636
  } : void 0,
5436
5637
  onPress: Platform.OS === "web" ? void 0 : handleTrackPress,
5437
- style: styles19.sliderPlane,
5638
+ style: styles20.sliderPlane,
5438
5639
  tabIndex: -1,
5439
5640
  children: [
5440
- /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles19.track }),
5641
+ /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: styles20.track }),
5441
5642
  /* @__PURE__ */ jsx(
5442
5643
  View,
5443
5644
  {
5444
5645
  pointerEvents: "none",
5445
5646
  style: [
5446
- styles19.activeTrack,
5647
+ styles20.activeTrack,
5447
5648
  {
5448
5649
  left: TRACK_HORIZONTAL_INSET + fromOffset,
5449
5650
  width: toOffset - fromOffset + THUMB_SIZE2
@@ -5485,9 +5686,9 @@ var Range = forwardRef(function Range2({
5485
5686
  onAccessibilityAction: (event) => handleAccessibilityAction(event, effectiveFrom, updateFromInput),
5486
5687
  pointerEvents: disabled ? "none" : "auto",
5487
5688
  style: [
5488
- styles19.thumb,
5489
- Platform.OS === "web" && styles19.thumbWeb,
5490
- focusedThumb === "from" && Platform.OS === "web" && styles19.thumbFocusedWeb,
5689
+ styles20.thumb,
5690
+ Platform.OS === "web" && styles20.thumbWeb,
5691
+ focusedThumb === "from" && Platform.OS === "web" && styles20.thumbFocusedWeb,
5491
5692
  { left: TRACK_HORIZONTAL_INSET + fromOffset }
5492
5693
  ],
5493
5694
  tabIndex: disabled ? -1 : 0
@@ -5527,9 +5728,9 @@ var Range = forwardRef(function Range2({
5527
5728
  onAccessibilityAction: (event) => handleAccessibilityAction(event, effectiveTo, updateToInput),
5528
5729
  pointerEvents: disabled ? "none" : "auto",
5529
5730
  style: [
5530
- styles19.thumb,
5531
- Platform.OS === "web" && styles19.thumbWeb,
5532
- focusedThumb === "to" && Platform.OS === "web" && styles19.thumbFocusedWeb,
5731
+ styles20.thumb,
5732
+ Platform.OS === "web" && styles20.thumbWeb,
5733
+ focusedThumb === "to" && Platform.OS === "web" && styles20.thumbFocusedWeb,
5533
5734
  { left: TRACK_HORIZONTAL_INSET + toOffset }
5534
5735
  ],
5535
5736
  tabIndex: disabled ? -1 : 0
@@ -5538,7 +5739,7 @@ var Range = forwardRef(function Range2({
5538
5739
  ]
5539
5740
  }
5540
5741
  ),
5541
- /* @__PURE__ */ jsxs(View, { style: styles19.inputs, children: [
5742
+ /* @__PURE__ */ jsxs(View, { style: styles20.inputs, children: [
5542
5743
  /* @__PURE__ */ jsx(
5543
5744
  RangeInput,
5544
5745
  {
@@ -5589,7 +5790,7 @@ function RangeInput({
5589
5790
  placeholder,
5590
5791
  value
5591
5792
  }) {
5592
- return /* @__PURE__ */ jsxs(View, { style: [styles19.inputField, focused && styles19.inputFieldFocused], children: [
5793
+ return /* @__PURE__ */ jsxs(View, { style: [styles20.inputField, focused && styles20.inputFieldFocused], children: [
5593
5794
  /* @__PURE__ */ jsx(
5594
5795
  TextInput,
5595
5796
  {
@@ -5605,15 +5806,15 @@ function RangeInput({
5605
5806
  placeholder,
5606
5807
  placeholderTextColor: colors.grey150,
5607
5808
  returnKeyType: "done",
5608
- style: [styles19.input, Platform.OS === "web" && styles19.inputWeb],
5809
+ style: [styles20.input, Platform.OS === "web" && styles20.inputWeb],
5609
5810
  tabIndex: disabled ? -1 : void 0,
5610
5811
  value
5611
5812
  }
5612
5813
  ),
5613
- /* @__PURE__ */ jsx(View, { style: styles19.currencySlot, children: /* @__PURE__ */ jsx(Text, { style: styles19.currency, children: currency }) })
5814
+ /* @__PURE__ */ jsx(View, { style: styles20.currencySlot, children: /* @__PURE__ */ jsx(Text, { style: styles20.currency, children: currency }) })
5614
5815
  ] });
5615
5816
  }
5616
- var styles19 = StyleSheet.create({
5817
+ var styles20 = StyleSheet.create({
5617
5818
  root: {
5618
5819
  width: DEFAULT_WIDTH5,
5619
5820
  gap: 15,
@@ -5717,6 +5918,6 @@ var styles19 = StyleSheet.create({
5717
5918
  }
5718
5919
  });
5719
5920
 
5720
- export { Amenity, AmenityIcon, AppleIcon, AreaExpandIcon, ArrowRightIcon, Avatar, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, BagIcon, BathroomsIcon, BedroomsIcon, BellIcon, BrandLogo, BuildingIcon, Button, CalendarIcon, CalendarOutlineIcon, CameraIcon, CardLocationIcon, CheckBadgeIcon, CheckIcon, CheckSuccessIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ClockFilledIcon, ClockIcon, CloseIcon, CommentCard, CopyIcon, Counter, DatePicker, FacebookIcon, FavoritesButton, FiltersIcon, GlobeIcon, GooglePlayIcon, GuestsIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LanguageSwitcher, LayoutGridIcon, LinkedInIcon, ListViewIcon, LocationPinIcon, LogOutIcon, MailIcon, MapCollapseIcon, MapExpandIcon, MapViewIcon, MenuIcon, MenuItem, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, QrCodeIcon, Range, RatingInput, RatingStarIcon, SaveHeartIcon, SearchIcon, SegmentedToggle, Select, SettingsIcon, ShareIcon, ShowIcon, SidebarIcon, SortIcon, StarFilledIcon, StarIcon, StatCard, Textarea, Toggle, TooltipArrowIcon, UserIcon, UsersAltIcon, VideoIcon, WhatsAppIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
5921
+ export { Amenity, AmenityIcon, AppleIcon, AreaExpandIcon, ArrowRightIcon, Avatar, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, BagIcon, BathroomsIcon, BedroomsIcon, BellIcon, BrandLogo, BuildingIcon, Button, CalendarIcon, CalendarOutlineIcon, CameraIcon, CardLocationIcon, CheckBadgeIcon, CheckIcon, CheckSuccessIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ClockFilledIcon, ClockIcon, CloseIcon, CommentCard, CopyIcon, Counter, DatePicker, FacebookIcon, FavoritesButton, FiltersIcon, GlobeIcon, GooglePlayIcon, GuestsIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LanguageSwitcher, LayoutGridIcon, LinkedInIcon, ListViewIcon, LocationPinIcon, LogOutIcon, MailIcon, MapCollapseIcon, MapExpandIcon, MapViewIcon, MenuIcon, MenuItem, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, QrCodeIcon, Range, RatingInput, RatingStarIcon, SaveHeartIcon, SearchIcon, SegmentedToggle, Select, SettingsIcon, ShareIcon, ShowIcon, SidebarIcon, SortIcon, StarFilledIcon, StarIcon, StatCard, Textarea, Toggle, TooltipArrowIcon, UserIcon, UsersAltIcon, VerificationCodeInput, VideoIcon, WhatsAppIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
5721
5922
  //# sourceMappingURL=index.js.map
5722
5923
  //# sourceMappingURL=index.js.map