@chekinapp/ui 0.2.3 → 0.2.5

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
@@ -36,6 +36,7 @@ __export(index_exports, {
36
36
  AccordionItem: () => AccordionItem,
37
37
  AccordionTrigger: () => AccordionTrigger,
38
38
  AirbnbDatePicker: () => AirbnbDatePicker,
39
+ AirbnbFieldHelperText: () => AirbnbFieldHelperText,
39
40
  AirbnbFieldTrigger: () => AirbnbFieldTrigger,
40
41
  AirbnbInput: () => AirbnbInput,
41
42
  AirbnbPhoneField: () => AirbnbPhoneField,
@@ -9956,7 +9957,7 @@ function TooltipInfo({ content, className }) {
9956
9957
  side: "right",
9957
9958
  content,
9958
9959
  contentClassName: "max-w-64",
9959
- className: cn("text-[var(--chekin-color-gray-1)]", className),
9960
+ className: cn("text-[var(--section-tooltip-color)]", className),
9960
9961
  onClick: (event) => event.stopPropagation(),
9961
9962
  label: typeof content === "string" ? content : "More information"
9962
9963
  }
@@ -9996,19 +9997,19 @@ var Section = (0, import_react68.forwardRef)(
9996
9997
  "div",
9997
9998
  {
9998
9999
  className: cn(
9999
- "flex max-w-[85%] items-center text-lg font-bold text-[var(--chekin-color-brand-navy)] md:max-w-full",
10000
+ "flex max-w-[85%] items-center text-lg font-bold text-[var(--section-title-color)] md:max-w-full",
10000
10001
  size !== 0 /* L */ && "subsection-title",
10001
10002
  titleClassName
10002
10003
  ),
10003
10004
  children: [
10004
10005
  title,
10005
10006
  titleTooltip && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TooltipInfo, { content: titleTooltip }) }),
10006
- linkContent && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-6 text-sm font-semibold text-[var(--chekin-color-brand-blue)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
10007
+ linkContent && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-6 text-sm font-semibold text-[var(--section-link-color)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
10007
10008
  ]
10008
10009
  }
10009
10010
  ),
10010
10011
  subtitle && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "w-full max-w-[720px] md:max-w-full", children: [
10011
- /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "inline text-base font-normal text-[var(--chekin-color-gray-1)]", children: subtitle }),
10012
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "inline text-base font-normal text-[var(--section-subtitle-color)]", children: subtitle }),
10012
10013
  subtitleTooltip && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "ml-1.5 inline-block align-text-top", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(TooltipInfo, { content: subtitleTooltip }) })
10013
10014
  ] })
10014
10015
  ] }),
@@ -20309,7 +20310,32 @@ var import_lucide_react54 = require("lucide-react");
20309
20310
  var React73 = __toESM(require("react"), 1);
20310
20311
  var import_lucide_react53 = require("lucide-react");
20311
20312
  var import_react_i18next42 = require("react-i18next");
20313
+
20314
+ // src/airbnb-fields/field-helper-text/FieldHelperText.tsx
20312
20315
  var import_jsx_runtime184 = require("react/jsx-runtime");
20316
+ function AirbnbFieldHelperText({
20317
+ id,
20318
+ helper,
20319
+ disabled,
20320
+ className
20321
+ }) {
20322
+ if (!helper) return null;
20323
+ return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20324
+ "p",
20325
+ {
20326
+ id,
20327
+ className: cn(
20328
+ "mt-2 text-[12px] font-normal leading-5 text-[var(--chekin-airbnb-gray-text)]",
20329
+ disabled && "opacity-50",
20330
+ className
20331
+ ),
20332
+ children: helper
20333
+ }
20334
+ );
20335
+ }
20336
+
20337
+ // src/airbnb-fields/field-trigger/FieldTrigger.tsx
20338
+ var import_jsx_runtime185 = require("react/jsx-runtime");
20313
20339
  var AirbnbFieldTrigger = React73.forwardRef(
20314
20340
  ({
20315
20341
  as = "button",
@@ -20323,6 +20349,7 @@ var AirbnbFieldTrigger = React73.forwardRef(
20323
20349
  labelText,
20324
20350
  valueText,
20325
20351
  placeholder,
20352
+ helper,
20326
20353
  disabled,
20327
20354
  error,
20328
20355
  loading,
@@ -20341,19 +20368,20 @@ var AirbnbFieldTrigger = React73.forwardRef(
20341
20368
  ...props
20342
20369
  }, ref) => {
20343
20370
  const { t } = (0, import_react_i18next42.useTranslation)();
20371
+ const generatedHelperId = React73.useId();
20344
20372
  const hasValue = Boolean(valueText);
20345
20373
  const isRaised = hasValue || forceFloatingLabel;
20346
20374
  const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
20347
20375
  const visibleLabelText = labelText ?? label;
20348
20376
  const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
20349
- const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
20350
- /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("span", { className: "min-w-0 truncate", children: visibleLabelText }),
20351
- optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("span", { className: "text-current opacity-70 lowercase", children: [
20377
+ const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
20378
+ /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("span", { className: "min-w-0 truncate", children: visibleLabelText }),
20379
+ optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("span", { className: "text-current opacity-70 lowercase", children: [
20352
20380
  "(",
20353
20381
  optionalLabel,
20354
20382
  ")"
20355
20383
  ] }),
20356
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20384
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20357
20385
  HelpTooltip,
20358
20386
  {
20359
20387
  content: tooltip,
@@ -20367,10 +20395,14 @@ var AirbnbFieldTrigger = React73.forwardRef(
20367
20395
  const animatedLabel = forceLabelText ? resolvedLabelText ?? placeholder : isRaised ? resolvedLabelText : label ?? placeholder;
20368
20396
  const hasInvalidState = Boolean(error);
20369
20397
  const errorMessage = typeof error === "string" ? error : void 0;
20398
+ const showErrorMessage = Boolean(errorMessage) && !hideErrorMessage;
20399
+ const showHelper = Boolean(helper) && !showErrorMessage;
20400
+ const helperId = helper ? generatedHelperId : void 0;
20401
+ const describedByValue = [describedBy, showHelper ? helperId : void 0].filter(Boolean).join(" ") || void 0;
20370
20402
  const isBlocked = Boolean(disabled) || Boolean(loading);
20371
- const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("span", { className: "flex items-center gap-2", children: [
20403
+ const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("span", { className: "flex items-center gap-2", children: [
20372
20404
  trailingAdornment,
20373
- loading && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20405
+ loading && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20374
20406
  import_lucide_react53.Loader2,
20375
20407
  {
20376
20408
  "aria-hidden": "true",
@@ -20386,8 +20418,8 @@ var AirbnbFieldTrigger = React73.forwardRef(
20386
20418
  disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : "cursor-pointer",
20387
20419
  className
20388
20420
  );
20389
- const sharedContent = /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(import_jsx_runtime184.Fragment, { children: [
20390
- /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)(
20421
+ const sharedContent = /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(import_jsx_runtime185.Fragment, { children: [
20422
+ /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
20391
20423
  "span",
20392
20424
  {
20393
20425
  className: cn(
@@ -20396,7 +20428,7 @@ var AirbnbFieldTrigger = React73.forwardRef(
20396
20428
  contentClassName
20397
20429
  ),
20398
20430
  children: [
20399
- /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20431
+ /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20400
20432
  "span",
20401
20433
  {
20402
20434
  id: labelId,
@@ -20409,7 +20441,7 @@ var AirbnbFieldTrigger = React73.forwardRef(
20409
20441
  children: animatedLabel
20410
20442
  }
20411
20443
  ),
20412
- children ? children : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20444
+ children ? children : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20413
20445
  "span",
20414
20446
  {
20415
20447
  id: valueId,
@@ -20420,11 +20452,11 @@ var AirbnbFieldTrigger = React73.forwardRef(
20420
20452
  ),
20421
20453
  children: valueText
20422
20454
  }
20423
- ) : /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
20455
+ ) : /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
20424
20456
  ]
20425
20457
  }
20426
20458
  ),
20427
- resolvedTrailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20459
+ resolvedTrailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20428
20460
  "span",
20429
20461
  {
20430
20462
  "aria-hidden": "true",
@@ -20433,16 +20465,16 @@ var AirbnbFieldTrigger = React73.forwardRef(
20433
20465
  }
20434
20466
  )
20435
20467
  ] });
20436
- return /* @__PURE__ */ (0, import_jsx_runtime184.jsxs)("div", { className: "w-full", children: [
20437
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[var(--chekin-airbnb-ink-strong)]", children: topLabel }),
20438
- as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20468
+ return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: "w-full", children: [
20469
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[var(--chekin-airbnb-ink-strong)]", children: topLabel }),
20470
+ as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20439
20471
  "button",
20440
20472
  {
20441
20473
  id,
20442
20474
  ref,
20443
20475
  type: "button",
20444
20476
  "aria-labelledby": hasValue && valueId ? `${labelId} ${valueId}` : labelId,
20445
- "aria-describedby": describedBy,
20477
+ "aria-describedby": describedByValue,
20446
20478
  "aria-invalid": hasInvalidState,
20447
20479
  "aria-busy": loading,
20448
20480
  disabled: isBlocked,
@@ -20452,13 +20484,13 @@ var AirbnbFieldTrigger = React73.forwardRef(
20452
20484
  ...props,
20453
20485
  children: sharedContent
20454
20486
  }
20455
- ) : /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
20487
+ ) : /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20456
20488
  "div",
20457
20489
  {
20458
20490
  id,
20459
20491
  ref,
20460
20492
  "aria-labelledby": hasValue && valueId ? `${labelId} ${valueId}` : labelId,
20461
- "aria-describedby": describedBy,
20493
+ "aria-describedby": describedByValue,
20462
20494
  "aria-invalid": hasInvalidState,
20463
20495
  "aria-busy": loading,
20464
20496
  "aria-disabled": isBlocked,
@@ -20469,14 +20501,15 @@ var AirbnbFieldTrigger = React73.forwardRef(
20469
20501
  children: sharedContent
20470
20502
  }
20471
20503
  ),
20472
- errorMessage && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(FieldErrorMessage, { id: errorId, message: errorMessage })
20504
+ showErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(FieldErrorMessage, { id: errorId, message: errorMessage }),
20505
+ showHelper && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(AirbnbFieldHelperText, { id: helperId, helper, disabled })
20473
20506
  ] });
20474
20507
  }
20475
20508
  );
20476
20509
  AirbnbFieldTrigger.displayName = "AirbnbFieldTrigger";
20477
20510
 
20478
20511
  // src/airbnb-fields/datepicker/DatePicker.tsx
20479
- var import_jsx_runtime185 = require("react/jsx-runtime");
20512
+ var import_jsx_runtime186 = require("react/jsx-runtime");
20480
20513
  var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
20481
20514
  var AirbnbDatePicker = React74.forwardRef(
20482
20515
  ({
@@ -20493,6 +20526,7 @@ var AirbnbDatePicker = React74.forwardRef(
20493
20526
  loading,
20494
20527
  optional,
20495
20528
  tooltip,
20529
+ helper,
20496
20530
  className,
20497
20531
  name,
20498
20532
  minDate,
@@ -20592,8 +20626,8 @@ var AirbnbDatePicker = React74.forwardRef(
20592
20626
  setIsOpen(false);
20593
20627
  }
20594
20628
  }, [isBlocked]);
20595
- return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
20596
- name && /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20629
+ return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
20630
+ name && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20597
20631
  "input",
20598
20632
  {
20599
20633
  type: "hidden",
@@ -20601,7 +20635,7 @@ var AirbnbDatePicker = React74.forwardRef(
20601
20635
  value: resolvedValue ? formatDateInputValue(resolvedValue) : ""
20602
20636
  }
20603
20637
  ),
20604
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20638
+ /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20605
20639
  AirbnbFieldTrigger,
20606
20640
  {
20607
20641
  id: triggerId,
@@ -20621,13 +20655,14 @@ var AirbnbDatePicker = React74.forwardRef(
20621
20655
  loading,
20622
20656
  optional,
20623
20657
  tooltip,
20658
+ helper,
20624
20659
  forceLabelText: Boolean(optional) || Boolean(tooltip),
20625
20660
  "aria-haspopup": "dialog",
20626
20661
  "aria-expanded": isOpen,
20627
20662
  onClick: handleTriggerClick,
20628
20663
  onKeyDown: handleTriggerKeyDown,
20629
20664
  onBlur,
20630
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20665
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20631
20666
  import_lucide_react54.Calendar,
20632
20667
  {
20633
20668
  className: "h-5 w-5 text-[var(--chekin-airbnb-ink)]",
@@ -20636,7 +20671,7 @@ var AirbnbDatePicker = React74.forwardRef(
20636
20671
  )
20637
20672
  }
20638
20673
  ),
20639
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
20674
+ /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20640
20675
  AirbnbDatePickerContent,
20641
20676
  {
20642
20677
  baseId: pickerId,
@@ -20673,13 +20708,14 @@ AirbnbDatePicker.displayName = "AirbnbDatePicker";
20673
20708
  var React75 = __toESM(require("react"), 1);
20674
20709
  var import_lucide_react55 = require("lucide-react");
20675
20710
  var import_react_i18next43 = require("react-i18next");
20676
- var import_jsx_runtime186 = require("react/jsx-runtime");
20711
+ var import_jsx_runtime187 = require("react/jsx-runtime");
20677
20712
  var getInputValue = (value) => value != null ? String(value) : "";
20678
20713
  var AirbnbInput = React75.forwardRef(
20679
20714
  ({
20680
20715
  label,
20681
20716
  topLabel,
20682
20717
  helperText,
20718
+ helper,
20683
20719
  error,
20684
20720
  invalid,
20685
20721
  loading,
@@ -20774,7 +20810,7 @@ var AirbnbInput = React75.forwardRef(
20774
20810
  }
20775
20811
  inputRef.current?.focus();
20776
20812
  };
20777
- return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
20813
+ return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
20778
20814
  AirbnbFieldTrigger,
20779
20815
  {
20780
20816
  as: "div",
@@ -20786,6 +20822,7 @@ var AirbnbInput = React75.forwardRef(
20786
20822
  errorId: error ? errorId : void 0,
20787
20823
  labelText: helperText ?? label,
20788
20824
  placeholder: placeholder ?? label,
20825
+ helper,
20789
20826
  disabled,
20790
20827
  error: triggerError,
20791
20828
  loading,
@@ -20804,7 +20841,7 @@ var AirbnbInput = React75.forwardRef(
20804
20841
  forceLabelText: hasLabelMeta,
20805
20842
  hideErrorMessage: !renderErrorMessage,
20806
20843
  children: [
20807
- /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20844
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20808
20845
  "input",
20809
20846
  {
20810
20847
  ...props,
@@ -20834,7 +20871,7 @@ var AirbnbInput = React75.forwardRef(
20834
20871
  )
20835
20872
  }
20836
20873
  ),
20837
- shouldShowPasswordReveal && /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20874
+ shouldShowPasswordReveal && /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20838
20875
  "button",
20839
20876
  {
20840
20877
  type: "button",
@@ -20842,7 +20879,7 @@ var AirbnbInput = React75.forwardRef(
20842
20879
  disabled: isBlocked,
20843
20880
  className: "absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center border-0 bg-transparent p-0 text-[var(--chekin-airbnb-gray-cool)] hover:text-[var(--chekin-airbnb-ink)] hover:opacity-85 disabled:cursor-not-allowed disabled:opacity-50",
20844
20881
  "aria-label": isPasswordRevealed ? t("hide_password") : t("show_password"),
20845
- children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
20882
+ children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20846
20883
  import_lucide_react55.Eye,
20847
20884
  {
20848
20885
  size: 18,
@@ -20869,7 +20906,7 @@ var import_lucide_react57 = require("lucide-react");
20869
20906
  var React80 = __toESM(require("react"), 1);
20870
20907
 
20871
20908
  // src/airbnb-fields/select/SelectDesktopMenu.tsx
20872
- var import_jsx_runtime187 = require("react/jsx-runtime");
20909
+ var import_jsx_runtime188 = require("react/jsx-runtime");
20873
20910
  function AirbnbSelectDesktopMenu({
20874
20911
  id,
20875
20912
  options,
@@ -20888,7 +20925,7 @@ function AirbnbSelectDesktopMenu({
20888
20925
  noOptionsMessage
20889
20926
  }) {
20890
20927
  const emptyMessage = noOptionsMessage?.();
20891
- return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
20928
+ return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(
20892
20929
  "div",
20893
20930
  {
20894
20931
  id,
@@ -20901,12 +20938,12 @@ function AirbnbSelectDesktopMenu({
20901
20938
  onKeyDown,
20902
20939
  className: cn("max-h-[280px] overflow-y-auto p-2 outline-none", menuClassName),
20903
20940
  children: [
20904
- options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime187.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
20941
+ options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime188.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
20905
20942
  options.map((option, index) => {
20906
20943
  const isSelected = selectedValue?.value === option.value;
20907
20944
  const isHighlighted = index === highlightedIndex;
20908
20945
  const optionKey = `${String(option.value)}-${index}`;
20909
- return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
20946
+ return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
20910
20947
  "button",
20911
20948
  {
20912
20949
  id: getOptionId2(index),
@@ -20938,7 +20975,7 @@ function AirbnbSelectDesktopMenu({
20938
20975
  }
20939
20976
 
20940
20977
  // src/airbnb-fields/select/SelectDesktopContent.tsx
20941
- var import_jsx_runtime188 = require("react/jsx-runtime");
20978
+ var import_jsx_runtime189 = require("react/jsx-runtime");
20942
20979
  function AirbnbSelectDesktopContent({
20943
20980
  isOpen,
20944
20981
  listboxId,
@@ -20959,14 +20996,14 @@ function AirbnbSelectDesktopContent({
20959
20996
  noOptionsMessage
20960
20997
  }) {
20961
20998
  if (!isOpen) return null;
20962
- return /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
20999
+ return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
20963
21000
  "div",
20964
21001
  {
20965
21002
  className: cn(
20966
21003
  "absolute left-0 right-0 top-[calc(100%+8px)] z-20 overflow-hidden rounded-[20px] border border-[var(--chekin-airbnb-border)] bg-white shadow-[0_14px_30px_rgba(18,18,18,0.08)]",
20967
21004
  dropdownClassName
20968
21005
  ),
20969
- children: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
21006
+ children: /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
20970
21007
  AirbnbSelectDesktopMenu,
20971
21008
  {
20972
21009
  id: listboxId,
@@ -21064,7 +21101,7 @@ function getMobileOptionStyles(index, scrollTop) {
21064
21101
  }
21065
21102
 
21066
21103
  // src/airbnb-fields/select/SelectMobileWheel.tsx
21067
- var import_jsx_runtime189 = require("react/jsx-runtime");
21104
+ var import_jsx_runtime190 = require("react/jsx-runtime");
21068
21105
  function AirbnbSelectMobileWheel({
21069
21106
  id,
21070
21107
  options,
@@ -21083,7 +21120,7 @@ function AirbnbSelectMobileWheel({
21083
21120
  }) {
21084
21121
  const spacerHeight2 = getWheelSpacerHeight();
21085
21122
  const emptyMessage = noOptionsMessage?.();
21086
- return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
21123
+ return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
21087
21124
  "div",
21088
21125
  {
21089
21126
  id,
@@ -21095,10 +21132,10 @@ function AirbnbSelectMobileWheel({
21095
21132
  onKeyDown,
21096
21133
  className: cn("relative overflow-hidden outline-none", menuClassName),
21097
21134
  children: [
21098
- options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
21099
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
21100
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
21101
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
21135
+ options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : null,
21136
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
21137
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
21138
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
21102
21139
  "div",
21103
21140
  {
21104
21141
  "aria-hidden": true,
@@ -21108,7 +21145,7 @@ function AirbnbSelectMobileWheel({
21108
21145
  )
21109
21146
  }
21110
21147
  ),
21111
- /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
21148
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
21112
21149
  "div",
21113
21150
  {
21114
21151
  ref: listRef,
@@ -21123,11 +21160,11 @@ function AirbnbSelectMobileWheel({
21123
21160
  WebkitOverflowScrolling: "touch"
21124
21161
  },
21125
21162
  children: [
21126
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
21163
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
21127
21164
  options.map((option, index) => {
21128
21165
  const { distance, style } = getMobileOptionStyles(index, scrollTop);
21129
21166
  const optionKey = `${String(option.value)}-${index}`;
21130
- return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(
21167
+ return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
21131
21168
  "button",
21132
21169
  {
21133
21170
  id: getOptionId2(index),
@@ -21148,7 +21185,7 @@ function AirbnbSelectMobileWheel({
21148
21185
  optionKey
21149
21186
  );
21150
21187
  }),
21151
- /* @__PURE__ */ (0, import_jsx_runtime189.jsx)("div", { style: { height: `${spacerHeight2}px` } })
21188
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)("div", { style: { height: `${spacerHeight2}px` } })
21152
21189
  ]
21153
21190
  }
21154
21191
  )
@@ -21158,7 +21195,7 @@ function AirbnbSelectMobileWheel({
21158
21195
  }
21159
21196
 
21160
21197
  // src/airbnb-fields/select/SelectMobileContent.tsx
21161
- var import_jsx_runtime190 = require("react/jsx-runtime");
21198
+ var import_jsx_runtime191 = require("react/jsx-runtime");
21162
21199
  function AirbnbSelectMobileContent({
21163
21200
  open,
21164
21201
  onOpenChange,
@@ -21182,11 +21219,11 @@ function AirbnbSelectMobileContent({
21182
21219
  getOptionId: getOptionId2,
21183
21220
  noOptionsMessage
21184
21221
  }) {
21185
- return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
21186
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
21187
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(DrawerDescription, { className: "sr-only", children: label }),
21188
- /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
21189
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
21222
+ return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
21223
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
21224
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(DrawerDescription, { className: "sr-only", children: label }),
21225
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
21226
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
21190
21227
  AirbnbSelectMobileWheel,
21191
21228
  {
21192
21229
  id: listboxId,
@@ -21205,7 +21242,7 @@ function AirbnbSelectMobileContent({
21205
21242
  noOptionsMessage
21206
21243
  }
21207
21244
  ),
21208
- /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
21245
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
21209
21246
  ] })
21210
21247
  ] }) });
21211
21248
  }
@@ -21213,7 +21250,7 @@ function AirbnbSelectMobileContent({
21213
21250
  // src/airbnb-fields/select/SelectTrigger.tsx
21214
21251
  var React76 = __toESM(require("react"), 1);
21215
21252
  var import_lucide_react56 = require("lucide-react");
21216
- var import_jsx_runtime191 = require("react/jsx-runtime");
21253
+ var import_jsx_runtime192 = require("react/jsx-runtime");
21217
21254
  var AirbnbSelectTrigger = React76.forwardRef(
21218
21255
  ({
21219
21256
  id,
@@ -21226,6 +21263,7 @@ var AirbnbSelectTrigger = React76.forwardRef(
21226
21263
  loading,
21227
21264
  optional,
21228
21265
  tooltip,
21266
+ helper,
21229
21267
  error,
21230
21268
  hideErrorMessage,
21231
21269
  labelId,
@@ -21238,7 +21276,7 @@ var AirbnbSelectTrigger = React76.forwardRef(
21238
21276
  onKeyDown,
21239
21277
  onBlur
21240
21278
  }, ref) => {
21241
- return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
21279
+ return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21242
21280
  AirbnbFieldTrigger,
21243
21281
  {
21244
21282
  id,
@@ -21260,13 +21298,14 @@ var AirbnbSelectTrigger = React76.forwardRef(
21260
21298
  loading,
21261
21299
  optional,
21262
21300
  tooltip,
21301
+ helper,
21263
21302
  forceLabelText: Boolean(optional) || Boolean(tooltip),
21264
21303
  hideErrorMessage,
21265
21304
  disabled,
21266
21305
  onClick,
21267
21306
  onKeyDown,
21268
21307
  onBlur,
21269
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
21308
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21270
21309
  import_lucide_react56.ChevronDown,
21271
21310
  {
21272
21311
  strokeWidth: "1.5",
@@ -21629,7 +21668,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
21629
21668
  }
21630
21669
 
21631
21670
  // src/airbnb-fields/select/Select.tsx
21632
- var import_jsx_runtime192 = require("react/jsx-runtime");
21671
+ var import_jsx_runtime193 = require("react/jsx-runtime");
21633
21672
  var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21634
21673
  options = [],
21635
21674
  value,
@@ -21644,6 +21683,7 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21644
21683
  loading,
21645
21684
  optional,
21646
21685
  tooltip,
21686
+ helper,
21647
21687
  error,
21648
21688
  invalid,
21649
21689
  hideErrorMessage,
@@ -21810,13 +21850,13 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21810
21850
  handleMobileOpenChange(false);
21811
21851
  }
21812
21852
  };
21813
- return /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(
21853
+ return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
21814
21854
  "div",
21815
21855
  {
21816
21856
  ref: containerRef,
21817
21857
  className: cn("relative w-full max-w-[var(--max-field-width)]", className),
21818
21858
  children: [
21819
- name && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
21859
+ name && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
21820
21860
  renderTrigger ? renderTrigger({
21821
21861
  id: triggerId,
21822
21862
  open: isOpen,
@@ -21829,6 +21869,7 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21829
21869
  loading,
21830
21870
  optional,
21831
21871
  tooltip,
21872
+ helper,
21832
21873
  error,
21833
21874
  invalid,
21834
21875
  listboxId,
@@ -21837,7 +21878,7 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21837
21878
  onClick: handleTriggerClick,
21838
21879
  onKeyDown: handleRootTriggerKeyDown,
21839
21880
  onBlur
21840
- }) : /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21881
+ }) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
21841
21882
  AirbnbSelectTrigger,
21842
21883
  {
21843
21884
  id: triggerId,
@@ -21851,6 +21892,7 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21851
21892
  loading,
21852
21893
  optional,
21853
21894
  tooltip,
21895
+ helper,
21854
21896
  error: triggerError,
21855
21897
  hideErrorMessage,
21856
21898
  labelId,
@@ -21864,7 +21906,7 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21864
21906
  onBlur
21865
21907
  }
21866
21908
  ),
21867
- isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21909
+ isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
21868
21910
  AirbnbSelectMobileContent,
21869
21911
  {
21870
21912
  open: isOpen,
@@ -21889,7 +21931,7 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21889
21931
  getOptionId: getOptionId2,
21890
21932
  noOptionsMessage
21891
21933
  }
21892
- ) : /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
21934
+ ) : /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
21893
21935
  AirbnbSelectDesktopContent,
21894
21936
  {
21895
21937
  isOpen,
@@ -21923,7 +21965,7 @@ var AirbnbSelect = React80.forwardRef(function AirbnbSelect2({
21923
21965
  });
21924
21966
 
21925
21967
  // src/airbnb-fields/phone-field/PhoneField.tsx
21926
- var import_jsx_runtime193 = require("react/jsx-runtime");
21968
+ var import_jsx_runtime194 = require("react/jsx-runtime");
21927
21969
  function formatPhoneCodeOptionLabel2(option) {
21928
21970
  const label = String(option.label);
21929
21971
  const value = String(option.value);
@@ -21945,6 +21987,7 @@ var AirbnbPhoneField = React81.forwardRef(
21945
21987
  loading,
21946
21988
  optional,
21947
21989
  tooltip,
21990
+ helper,
21948
21991
  className,
21949
21992
  name,
21950
21993
  codeName,
@@ -21971,9 +22014,9 @@ var AirbnbPhoneField = React81.forwardRef(
21971
22014
  const hasInvalidState = Boolean(error) || Boolean(invalid);
21972
22015
  const isBlocked = Boolean(disabled) || Boolean(loading);
21973
22016
  const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
21974
- return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
21975
- name && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
21976
- codeName && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22017
+ return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
22018
+ name && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
22019
+ codeName && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21977
22020
  "input",
21978
22021
  {
21979
22022
  type: "hidden",
@@ -21982,7 +22025,7 @@ var AirbnbPhoneField = React81.forwardRef(
21982
22025
  disabled
21983
22026
  }
21984
22027
  ),
21985
- numberName && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22028
+ numberName && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21986
22029
  "input",
21987
22030
  {
21988
22031
  type: "hidden",
@@ -21991,7 +22034,7 @@ var AirbnbPhoneField = React81.forwardRef(
21991
22034
  disabled
21992
22035
  }
21993
22036
  ),
21994
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22037
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
21995
22038
  "label",
21996
22039
  {
21997
22040
  htmlFor: inputId,
@@ -21999,8 +22042,8 @@ var AirbnbPhoneField = React81.forwardRef(
21999
22042
  children: topLabel
22000
22043
  }
22001
22044
  ),
22002
- /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { className: "flex items-stretch", children: [
22003
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22045
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: "flex items-stretch", children: [
22046
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22004
22047
  AirbnbSelect,
22005
22048
  {
22006
22049
  ref,
@@ -22029,7 +22072,7 @@ var AirbnbPhoneField = React81.forwardRef(
22029
22072
  onClick,
22030
22073
  onKeyDown,
22031
22074
  valueLabel
22032
- }) => /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)(
22075
+ }) => /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)(
22033
22076
  "button",
22034
22077
  {
22035
22078
  id,
@@ -22050,8 +22093,8 @@ var AirbnbPhoneField = React81.forwardRef(
22050
22093
  triggerDisabled ? "cursor-not-allowed opacity-50" : triggerLoading ? "cursor-progress" : "cursor-pointer"
22051
22094
  ),
22052
22095
  children: [
22053
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("span", { children: valueLabel ?? codePlaceholder }),
22054
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22096
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("span", { children: valueLabel ?? codePlaceholder }),
22097
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22055
22098
  import_lucide_react57.ChevronDown,
22056
22099
  {
22057
22100
  className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
@@ -22063,7 +22106,7 @@ var AirbnbPhoneField = React81.forwardRef(
22063
22106
  )
22064
22107
  }
22065
22108
  ),
22066
- /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
22109
+ /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22067
22110
  AirbnbInput,
22068
22111
  {
22069
22112
  id: inputId,
@@ -22092,7 +22135,8 @@ var AirbnbPhoneField = React81.forwardRef(
22092
22135
  }
22093
22136
  )
22094
22137
  ] }),
22095
- error && /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(FieldErrorMessage, { message: error })
22138
+ error && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(FieldErrorMessage, { message: error }),
22139
+ !error && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(AirbnbFieldHelperText, { helper, disabled })
22096
22140
  ] });
22097
22141
  }
22098
22142
  );
@@ -22103,7 +22147,7 @@ var React82 = __toESM(require("react"), 1);
22103
22147
  var import_lucide_react58 = require("lucide-react");
22104
22148
  var import_react_virtual3 = require("@tanstack/react-virtual");
22105
22149
  var import_react90 = require("react");
22106
- var import_jsx_runtime194 = require("react/jsx-runtime");
22150
+ var import_jsx_runtime195 = require("react/jsx-runtime");
22107
22151
  var ROW_HEIGHT = 48;
22108
22152
  var DESKTOP_LIST_HEIGHT = 280;
22109
22153
  var MOBILE_LIST_HEIGHT = 420;
@@ -22134,6 +22178,7 @@ var AirbnbSearchableSelectInternal = ({
22134
22178
  invalid,
22135
22179
  optional,
22136
22180
  tooltip,
22181
+ helper,
22137
22182
  hideErrorMessage,
22138
22183
  name,
22139
22184
  className,
@@ -22271,7 +22316,7 @@ var AirbnbSearchableSelectInternal = ({
22271
22316
  }
22272
22317
  }
22273
22318
  }
22274
- const content = /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22319
+ const content = /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22275
22320
  AirbnbSearchableSelectContent,
22276
22321
  {
22277
22322
  inputId: searchInputId,
@@ -22299,9 +22344,9 @@ var AirbnbSearchableSelectInternal = ({
22299
22344
  }
22300
22345
  );
22301
22346
  React82.useImperativeHandle(ref, () => triggerRef.current, []);
22302
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
22303
- name && /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
22304
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22347
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
22348
+ name && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
22349
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22305
22350
  AirbnbFieldTrigger,
22306
22351
  {
22307
22352
  id: `${reactId}-trigger`,
@@ -22323,6 +22368,7 @@ var AirbnbSearchableSelectInternal = ({
22323
22368
  loading,
22324
22369
  optional,
22325
22370
  tooltip,
22371
+ helper,
22326
22372
  forceLabelText: Boolean(optional) || Boolean(tooltip),
22327
22373
  hideErrorMessage,
22328
22374
  disabled,
@@ -22335,7 +22381,7 @@ var AirbnbSearchableSelectInternal = ({
22335
22381
  },
22336
22382
  onKeyDown: handleTriggerKeyDown,
22337
22383
  onBlur,
22338
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22384
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22339
22385
  import_lucide_react58.ChevronDown,
22340
22386
  {
22341
22387
  className: cn(
@@ -22346,7 +22392,7 @@ var AirbnbSearchableSelectInternal = ({
22346
22392
  )
22347
22393
  }
22348
22394
  ),
22349
- isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22395
+ isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22350
22396
  Drawer,
22351
22397
  {
22352
22398
  open,
@@ -22358,13 +22404,13 @@ var AirbnbSearchableSelectInternal = ({
22358
22404
  }
22359
22405
  closeSelect();
22360
22406
  },
22361
- children: /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
22362
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
22363
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(DrawerDescription, { className: "sr-only", children: label }),
22364
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
22407
+ children: /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
22408
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
22409
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(DrawerDescription, { className: "sr-only", children: label }),
22410
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
22365
22411
  ] })
22366
22412
  }
22367
- ) : open ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22413
+ ) : open ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22368
22414
  "div",
22369
22415
  {
22370
22416
  className: cn(
@@ -22431,16 +22477,16 @@ function AirbnbSearchableSelectContent({
22431
22477
  virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
22432
22478
  }
22433
22479
  }, [highlightedIndex, virtualizer]);
22434
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: "p-2", children: [
22435
- /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: "relative mb-2", children: [
22436
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22480
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: "p-2", children: [
22481
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: "relative mb-2", children: [
22482
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22437
22483
  import_lucide_react58.Search,
22438
22484
  {
22439
22485
  "aria-hidden": "true",
22440
22486
  className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[var(--chekin-neutral-500)]"
22441
22487
  }
22442
22488
  ),
22443
- /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22489
+ /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22444
22490
  "input",
22445
22491
  {
22446
22492
  id: inputId,
@@ -22459,7 +22505,7 @@ function AirbnbSearchableSelectContent({
22459
22505
  }
22460
22506
  )
22461
22507
  ] }),
22462
- loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22508
+ loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[var(--chekin-airbnb-gray-text)]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22463
22509
  "div",
22464
22510
  {
22465
22511
  id: listboxId,
@@ -22468,7 +22514,7 @@ function AirbnbSearchableSelectContent({
22468
22514
  "aria-labelledby": labelId,
22469
22515
  className: cn("overflow-y-auto outline-none", menuClassName),
22470
22516
  style: { height: Math.min(height, rowCount * ROW_HEIGHT) },
22471
- children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22517
+ children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22472
22518
  "div",
22473
22519
  {
22474
22520
  className: "relative w-full",
@@ -22476,7 +22522,7 @@ function AirbnbSearchableSelectContent({
22476
22522
  children: virtualItems.map((virtualItem) => {
22477
22523
  const option = options[virtualItem.index];
22478
22524
  if (!option) {
22479
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22525
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22480
22526
  "div",
22481
22527
  {
22482
22528
  className: "absolute left-0 top-0 flex w-full items-center px-4 text-base leading-6 text-[var(--chekin-airbnb-gray-text)]",
@@ -22491,7 +22537,7 @@ function AirbnbSearchableSelectContent({
22491
22537
  }
22492
22538
  const isSelected = value?.value === option.value;
22493
22539
  const isHighlighted = virtualItem.index === highlightedIndex;
22494
- return /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
22540
+ return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22495
22541
  "button",
22496
22542
  {
22497
22543
  id: getOptionId(idPrefix, virtualItem.index),
@@ -22513,7 +22559,7 @@ function AirbnbSearchableSelectContent({
22513
22559
  height: `${virtualItem.size}px`,
22514
22560
  transform: `translateY(${virtualItem.start}px)`
22515
22561
  },
22516
- children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)("span", { className: "truncate text-center", children: String(option.label) })
22562
+ children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("span", { className: "truncate text-center", children: String(option.label) })
22517
22563
  },
22518
22564
  `${String(option.value)}-${virtualItem.index}`
22519
22565
  );
@@ -22545,13 +22591,15 @@ function getNextEnabledIndex(options, startIndex, step) {
22545
22591
  var React83 = __toESM(require("react"), 1);
22546
22592
  var import_react_i18next44 = require("react-i18next");
22547
22593
  var import_lucide_react59 = require("lucide-react");
22548
- var import_jsx_runtime195 = require("react/jsx-runtime");
22549
- var AirbnbSearchInput = React83.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
22594
+ var import_jsx_runtime196 = require("react/jsx-runtime");
22595
+ var AirbnbSearchInput = React83.forwardRef(({ onReset, placeholder, helper, wrapperClassName, ...props }, ref) => {
22550
22596
  const { t } = (0, import_react_i18next44.useTranslation)();
22597
+ const generatedId = React83.useId();
22598
+ const helperId = helper ? `${props.id ?? generatedId}-helper` : void 0;
22551
22599
  const placeholderText = placeholder || t("search_property") + "...";
22552
- return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
22553
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_lucide_react59.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[var(--chekin-neutral-500)]" }),
22554
- /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22600
+ const field = /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
22601
+ /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_lucide_react59.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[var(--chekin-neutral-500)]" }),
22602
+ /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22555
22603
  "input",
22556
22604
  {
22557
22605
  ...props,
@@ -22564,22 +22612,30 @@ var AirbnbSearchInput = React83.forwardRef(({ onReset, placeholder, wrapperClass
22564
22612
  onFocus: props.onFocus,
22565
22613
  onBlur: props.onBlur,
22566
22614
  placeholder: placeholderText,
22615
+ "aria-describedby": helperId ?? props["aria-describedby"],
22567
22616
  className: cn(
22568
22617
  "placeholder-shown:bg-accent flex h-10 w-full rounded-md border border-input bg-background py-3 pl-12 pr-4 text-base text-[#2d3748] ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-base placeholder:font-medium placeholder:text-[var(--chekin-neutral-500)] focus:border-gray-300 focus:outline-none focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
22569
22618
  props.className
22570
22619
  )
22571
22620
  }
22572
22621
  ),
22573
- onReset && /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
22622
+ onReset && /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22574
22623
  Button,
22575
22624
  {
22576
22625
  variant: "ghost",
22577
22626
  onClick: onReset,
22578
22627
  className: "absolute right-0 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[var(--chekin-neutral-500)]",
22579
- children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(import_lucide_react59.X, { className: "h-5 w-5" })
22628
+ children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(import_lucide_react59.X, { className: "h-5 w-5" })
22580
22629
  }
22581
22630
  )
22582
22631
  ] });
22632
+ if (!helper) {
22633
+ return field;
22634
+ }
22635
+ return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("div", { className: "w-full", children: [
22636
+ field,
22637
+ /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(AirbnbFieldHelperText, { id: helperId, helper, disabled: props.disabled })
22638
+ ] });
22583
22639
  });
22584
22640
  AirbnbSearchInput.displayName = "AirbnbSearchInput";
22585
22641
 
@@ -22587,7 +22643,7 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
22587
22643
  var React84 = __toESM(require("react"), 1);
22588
22644
  var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
22589
22645
  var import_lucide_react60 = require("lucide-react");
22590
- var import_jsx_runtime196 = require("react/jsx-runtime");
22646
+ var import_jsx_runtime197 = require("react/jsx-runtime");
22591
22647
  var AirbnbSwitch = React84.forwardRef(
22592
22648
  ({
22593
22649
  className,
@@ -22599,15 +22655,18 @@ var AirbnbSwitch = React84.forwardRef(
22599
22655
  id,
22600
22656
  label,
22601
22657
  error,
22658
+ helper,
22602
22659
  wrapperClassName,
22603
22660
  ...props
22604
22661
  }, ref) => {
22605
22662
  const generatedId = React84.useId();
22606
22663
  const fieldId = id || generatedId;
22607
- const switchElement = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22664
+ const helperId = `${fieldId}-helper`;
22665
+ const switchElement = /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22608
22666
  SwitchPrimitives2.Root,
22609
22667
  {
22610
22668
  ref,
22669
+ "aria-describedby": helper ? helperId : void 0,
22611
22670
  className: cn(
22612
22671
  "group inline-flex h-[24px] w-[36px] shrink-0 cursor-pointer items-center rounded-full border border-solid border-transparent p-[2px] transition-colors duration-200",
22613
22672
  "focus-visible:outline-none focus-visible:shadow-[var(--chekin-shadow-focus)]",
@@ -22624,14 +22683,14 @@ var AirbnbSwitch = React84.forwardRef(
22624
22683
  "aria-busy": loading,
22625
22684
  "aria-readonly": readOnly,
22626
22685
  ...props,
22627
- children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22686
+ children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22628
22687
  SwitchPrimitives2.Thumb,
22629
22688
  {
22630
22689
  className: cn(
22631
22690
  "flex h-[20px] w-[20px] items-center justify-center rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,0.22)] transition-transform duration-200",
22632
22691
  "data-[state=checked]:translate-x-[12px] data-[state=unchecked]:translate-x-0"
22633
22692
  ),
22634
- children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22693
+ children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22635
22694
  import_lucide_react60.Check,
22636
22695
  {
22637
22696
  "aria-hidden": "true",
@@ -22643,13 +22702,13 @@ var AirbnbSwitch = React84.forwardRef(
22643
22702
  )
22644
22703
  }
22645
22704
  );
22646
- if (!label && !error) {
22705
+ if (!label && !error && !helper) {
22647
22706
  return switchElement;
22648
22707
  }
22649
- return /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)(import_jsx_runtime196.Fragment, { children: [
22650
- /* @__PURE__ */ (0, import_jsx_runtime196.jsxs)("div", { className: cn("flex items-center gap-x-3 gap-y-1.5", wrapperClassName), children: [
22708
+ return /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)(import_jsx_runtime197.Fragment, { children: [
22709
+ /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)("div", { className: cn("flex items-center gap-x-3 gap-y-1.5", wrapperClassName), children: [
22651
22710
  switchElement,
22652
- label && /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
22711
+ label && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(
22653
22712
  Label,
22654
22713
  {
22655
22714
  htmlFor: fieldId,
@@ -22661,7 +22720,8 @@ var AirbnbSwitch = React84.forwardRef(
22661
22720
  }
22662
22721
  )
22663
22722
  ] }),
22664
- error && /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(ErrorMessage, { disabled, children: error })
22723
+ error && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(ErrorMessage, { disabled, children: error }),
22724
+ !error && /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(AirbnbFieldHelperText, { id: helperId, helper, disabled })
22665
22725
  ] });
22666
22726
  }
22667
22727
  );
@@ -22674,6 +22734,7 @@ AirbnbSwitch.displayName = "AirbnbSwitch";
22674
22734
  AccordionItem,
22675
22735
  AccordionTrigger,
22676
22736
  AirbnbDatePicker,
22737
+ AirbnbFieldHelperText,
22677
22738
  AirbnbFieldTrigger,
22678
22739
  AirbnbInput,
22679
22740
  AirbnbPhoneField,