@chekinapp/ui 0.0.6 → 0.0.8

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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes } from 'react';
2
+ import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes, FocusEventHandler } from 'react';
3
3
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
@@ -2224,6 +2224,7 @@ type DatePickerProps = {
2224
2224
  value?: DatePickerValue;
2225
2225
  defaultValue?: DatePickerValue;
2226
2226
  onChange: (value: Date | null) => void;
2227
+ onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
2227
2228
  placeholder?: string;
2228
2229
  disabled?: boolean;
2229
2230
  error?: string;
@@ -2400,6 +2401,7 @@ type PhoneFieldProps = {
2400
2401
  topLabel?: string;
2401
2402
  value?: PhoneFieldValue | null;
2402
2403
  onChange: (value: PhoneFieldValue) => void;
2404
+ onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
2403
2405
  options: PhoneFieldOption[];
2404
2406
  placeholder?: string;
2405
2407
  disabled?: boolean;
@@ -2439,11 +2441,13 @@ type SelectRenderTriggerProps<T = undefined, V extends SelectValue = string, L e
2439
2441
  triggerRef: React$1.Ref<HTMLButtonElement>;
2440
2442
  onClick: () => void;
2441
2443
  onKeyDown: React$1.KeyboardEventHandler<HTMLButtonElement>;
2444
+ onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
2442
2445
  };
2443
2446
  type AirbnbSelectProps<T = undefined, V extends SelectValue = string, L extends string | number | React$1.ReactNode = string> = {
2444
- options: SelectOption<T, V, L>[];
2447
+ options?: SelectOption<T, V, L>[];
2445
2448
  value?: SelectOption<T, V, L> | null;
2446
2449
  onChange: (option: SelectOption<T, V, L>) => void;
2450
+ onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
2447
2451
  variant?: 'default' | 'airbnb';
2448
2452
  label: string;
2449
2453
  topLabel?: string;
@@ -2481,6 +2485,7 @@ type SearchableSelectProps<T = undefined, V extends SearchableSelectValue = stri
2481
2485
  options: SelectOption<T, V, L>[];
2482
2486
  value?: SelectOption<T, V, L> | null;
2483
2487
  onChange: (option: SelectOption<T, V, L>) => void;
2488
+ onBlur?: FocusEventHandler<HTMLButtonElement>;
2484
2489
  onOpenChange?: (open: boolean) => void;
2485
2490
  searchValue?: string;
2486
2491
  onSearchChange?: (value: string) => void;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes } from 'react';
2
+ import { ReactNode, ElementType, InputHTMLAttributes, ComponentProps, PropsWithChildren, MouseEvent, SVGProps, FC, ImgHTMLAttributes, ComponentType, AnchorHTMLAttributes, ForwardedRef, ButtonHTMLAttributes, HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, ComponentPropsWithoutRef, ReactElement, TextareaHTMLAttributes, FocusEventHandler } from 'react';
3
3
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
@@ -2224,6 +2224,7 @@ type DatePickerProps = {
2224
2224
  value?: DatePickerValue;
2225
2225
  defaultValue?: DatePickerValue;
2226
2226
  onChange: (value: Date | null) => void;
2227
+ onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
2227
2228
  placeholder?: string;
2228
2229
  disabled?: boolean;
2229
2230
  error?: string;
@@ -2400,6 +2401,7 @@ type PhoneFieldProps = {
2400
2401
  topLabel?: string;
2401
2402
  value?: PhoneFieldValue | null;
2402
2403
  onChange: (value: PhoneFieldValue) => void;
2404
+ onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
2403
2405
  options: PhoneFieldOption[];
2404
2406
  placeholder?: string;
2405
2407
  disabled?: boolean;
@@ -2439,11 +2441,13 @@ type SelectRenderTriggerProps<T = undefined, V extends SelectValue = string, L e
2439
2441
  triggerRef: React$1.Ref<HTMLButtonElement>;
2440
2442
  onClick: () => void;
2441
2443
  onKeyDown: React$1.KeyboardEventHandler<HTMLButtonElement>;
2444
+ onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
2442
2445
  };
2443
2446
  type AirbnbSelectProps<T = undefined, V extends SelectValue = string, L extends string | number | React$1.ReactNode = string> = {
2444
- options: SelectOption<T, V, L>[];
2447
+ options?: SelectOption<T, V, L>[];
2445
2448
  value?: SelectOption<T, V, L> | null;
2446
2449
  onChange: (option: SelectOption<T, V, L>) => void;
2450
+ onBlur?: React$1.FocusEventHandler<HTMLButtonElement>;
2447
2451
  variant?: 'default' | 'airbnb';
2448
2452
  label: string;
2449
2453
  topLabel?: string;
@@ -2481,6 +2485,7 @@ type SearchableSelectProps<T = undefined, V extends SearchableSelectValue = stri
2481
2485
  options: SelectOption<T, V, L>[];
2482
2486
  value?: SelectOption<T, V, L> | null;
2483
2487
  onChange: (option: SelectOption<T, V, L>) => void;
2488
+ onBlur?: FocusEventHandler<HTMLButtonElement>;
2484
2489
  onOpenChange?: (open: boolean) => void;
2485
2490
  searchValue?: string;
2486
2491
  onSearchChange?: (value: string) => void;
package/dist/index.js CHANGED
@@ -8937,6 +8937,7 @@ var DatePicker = React30.forwardRef(
8937
8937
  value,
8938
8938
  defaultValue,
8939
8939
  onChange,
8940
+ onBlur,
8940
8941
  placeholder = "Select a date",
8941
8942
  disabled,
8942
8943
  error,
@@ -9043,7 +9044,7 @@ var DatePicker = React30.forwardRef(
9043
9044
  setIsOpen(false);
9044
9045
  }
9045
9046
  }, [isBlocked]);
9046
- return /* @__PURE__ */ jsxs78("div", { className: cn("relative w-full max-w-[425px]", className), children: [
9047
+ return /* @__PURE__ */ jsxs78("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
9047
9048
  name && /* @__PURE__ */ jsx121(
9048
9049
  "input",
9049
9050
  {
@@ -9078,6 +9079,7 @@ var DatePicker = React30.forwardRef(
9078
9079
  "aria-expanded": isOpen,
9079
9080
  onClick: handleTriggerClick,
9080
9081
  onKeyDown: handleTriggerKeyDown,
9082
+ onBlur,
9081
9083
  trailingAdornment: /* @__PURE__ */ jsx121(Calendar2, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
9082
9084
  }
9083
9085
  ),
@@ -9307,7 +9309,7 @@ var AirbnbInput = React31.forwardRef(
9307
9309
  setIsFocused(false);
9308
9310
  onBlur?.(event);
9309
9311
  };
9310
- return /* @__PURE__ */ jsx123("div", { className: cn("w-full", wrapperClassName), children: /* @__PURE__ */ jsx123(
9312
+ return /* @__PURE__ */ jsx123("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ jsx123(
9311
9313
  FieldTrigger,
9312
9314
  {
9313
9315
  as: "div",
@@ -9749,7 +9751,8 @@ var SelectTrigger2 = React32.forwardRef(
9749
9751
  listboxId,
9750
9752
  describedBy,
9751
9753
  onClick,
9752
- onKeyDown
9754
+ onKeyDown,
9755
+ onBlur
9753
9756
  }, ref) => {
9754
9757
  return /* @__PURE__ */ jsx128(
9755
9758
  FieldTrigger,
@@ -9779,6 +9782,7 @@ var SelectTrigger2 = React32.forwardRef(
9779
9782
  disabled,
9780
9783
  onClick,
9781
9784
  onKeyDown,
9785
+ onBlur,
9782
9786
  trailingAdornment: /* @__PURE__ */ jsx128(
9783
9787
  ChevronDown,
9784
9788
  {
@@ -10195,9 +10199,10 @@ function useOutsideClick(elementRef, onOutsideClick, nested) {
10195
10199
  // src/airbnb/select/Select.tsx
10196
10200
  import { jsx as jsx129, jsxs as jsxs83 } from "react/jsx-runtime";
10197
10201
  var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
10198
- options,
10202
+ options = [],
10199
10203
  value,
10200
10204
  onChange,
10205
+ onBlur,
10201
10206
  variant = "default",
10202
10207
  label,
10203
10208
  topLabel,
@@ -10365,109 +10370,118 @@ var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
10365
10370
  handleMobileOpenChange(false);
10366
10371
  }
10367
10372
  };
10368
- return /* @__PURE__ */ jsxs83("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
10369
- name && /* @__PURE__ */ jsx129("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10370
- renderTrigger ? renderTrigger({
10371
- id: triggerId,
10372
- open: isOpen,
10373
- variant,
10374
- label,
10375
- topLabel,
10376
- helperText,
10377
- value,
10378
- valueLabel,
10379
- disabled: isBlocked,
10380
- loading,
10381
- optional,
10382
- tooltip,
10383
- error,
10384
- invalid,
10385
- listboxId,
10386
- describedBy,
10387
- triggerRef: combinedRef,
10388
- onClick: handleTriggerClick,
10389
- onKeyDown: handleRootTriggerKeyDown
10390
- }) : /* @__PURE__ */ jsx129(
10391
- SelectTrigger2,
10392
- {
10393
- id: triggerId,
10394
- ref: combinedRef,
10395
- open: isOpen,
10396
- variant,
10397
- label,
10398
- topLabel,
10399
- helperText,
10400
- valueLabel,
10401
- disabled,
10402
- loading,
10403
- optional,
10404
- tooltip,
10405
- error: triggerError,
10406
- hideErrorMessage,
10407
- labelId,
10408
- valueId,
10409
- helperTextId,
10410
- errorId: error ? errorId : void 0,
10411
- listboxId,
10412
- describedBy,
10413
- onClick: handleTriggerClick,
10414
- onKeyDown: handleRootTriggerKeyDown
10415
- }
10416
- ),
10417
- isMobile ? /* @__PURE__ */ jsx129(
10418
- SelectMobileContent,
10419
- {
10420
- open: isOpen,
10421
- onOpenChange: handleMobileOpenChange,
10422
- onClose: () => handleMobileOpenChange(false),
10423
- listboxId,
10424
- labelId,
10425
- label,
10426
- mobileTitle,
10427
- doneLabel,
10428
- errorId: describedErrorId,
10429
- options,
10430
- disabled: isBlocked,
10431
- menuClassName,
10432
- scrollTop: mobileScrollTop,
10433
- activeIndex: activeMobileIndex,
10434
- listRef: mobileListRef,
10435
- onScroll: handleScroll,
10436
- onOptionClick: handleOptionClick,
10437
- onKeyDown: handleMobileWheelKeyDown,
10438
- onDone: handleMobileDone,
10439
- getOptionId: getOptionId2,
10440
- noOptionsMessage
10441
- }
10442
- ) : /* @__PURE__ */ jsx129(
10443
- SelectDesktopContent,
10444
- {
10445
- isOpen,
10446
- listboxId,
10447
- labelId,
10448
- errorId: describedErrorId,
10449
- options,
10450
- value,
10451
- highlightedIndex,
10452
- onOptionClick: (option) => {
10453
- handleDesktopSelect(option);
10454
- setIsOpen(false);
10455
- focusTrigger();
10456
- },
10457
- onOptionHover: setHighlightedIndex,
10458
- onKeyDown: (event) => {
10459
- handleMenuKeyDown(event, () => setIsOpen(false));
10460
- },
10461
- disabled: isBlocked,
10462
- menuClassName,
10463
- dropdownClassName,
10464
- listRef: desktopListRef,
10465
- setOptionRef,
10466
- getOptionId: getOptionId2,
10467
- noOptionsMessage
10468
- }
10469
- )
10470
- ] });
10373
+ return /* @__PURE__ */ jsxs83(
10374
+ "div",
10375
+ {
10376
+ ref: containerRef,
10377
+ className: cn("relative w-full max-w-[var(--max-field-width)]", className),
10378
+ children: [
10379
+ name && /* @__PURE__ */ jsx129("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10380
+ renderTrigger ? renderTrigger({
10381
+ id: triggerId,
10382
+ open: isOpen,
10383
+ variant,
10384
+ label,
10385
+ topLabel,
10386
+ helperText,
10387
+ value,
10388
+ valueLabel,
10389
+ disabled: isBlocked,
10390
+ loading,
10391
+ optional,
10392
+ tooltip,
10393
+ error,
10394
+ invalid,
10395
+ listboxId,
10396
+ describedBy,
10397
+ triggerRef: combinedRef,
10398
+ onClick: handleTriggerClick,
10399
+ onKeyDown: handleRootTriggerKeyDown,
10400
+ onBlur
10401
+ }) : /* @__PURE__ */ jsx129(
10402
+ SelectTrigger2,
10403
+ {
10404
+ id: triggerId,
10405
+ ref: combinedRef,
10406
+ open: isOpen,
10407
+ variant,
10408
+ label,
10409
+ topLabel,
10410
+ helperText,
10411
+ valueLabel,
10412
+ disabled,
10413
+ loading,
10414
+ optional,
10415
+ tooltip,
10416
+ error: triggerError,
10417
+ hideErrorMessage,
10418
+ labelId,
10419
+ valueId,
10420
+ helperTextId,
10421
+ errorId: error ? errorId : void 0,
10422
+ listboxId,
10423
+ describedBy,
10424
+ onClick: handleTriggerClick,
10425
+ onKeyDown: handleRootTriggerKeyDown,
10426
+ onBlur
10427
+ }
10428
+ ),
10429
+ isMobile ? /* @__PURE__ */ jsx129(
10430
+ SelectMobileContent,
10431
+ {
10432
+ open: isOpen,
10433
+ onOpenChange: handleMobileOpenChange,
10434
+ onClose: () => handleMobileOpenChange(false),
10435
+ listboxId,
10436
+ labelId,
10437
+ label,
10438
+ mobileTitle,
10439
+ doneLabel,
10440
+ errorId: describedErrorId,
10441
+ options,
10442
+ disabled: isBlocked,
10443
+ menuClassName,
10444
+ scrollTop: mobileScrollTop,
10445
+ activeIndex: activeMobileIndex,
10446
+ listRef: mobileListRef,
10447
+ onScroll: handleScroll,
10448
+ onOptionClick: handleOptionClick,
10449
+ onKeyDown: handleMobileWheelKeyDown,
10450
+ onDone: handleMobileDone,
10451
+ getOptionId: getOptionId2,
10452
+ noOptionsMessage
10453
+ }
10454
+ ) : /* @__PURE__ */ jsx129(
10455
+ SelectDesktopContent,
10456
+ {
10457
+ isOpen,
10458
+ listboxId,
10459
+ labelId,
10460
+ errorId: describedErrorId,
10461
+ options,
10462
+ value,
10463
+ highlightedIndex,
10464
+ onOptionClick: (option) => {
10465
+ handleDesktopSelect(option);
10466
+ setIsOpen(false);
10467
+ focusTrigger();
10468
+ },
10469
+ onOptionHover: setHighlightedIndex,
10470
+ onKeyDown: (event) => {
10471
+ handleMenuKeyDown(event, () => setIsOpen(false));
10472
+ },
10473
+ disabled: isBlocked,
10474
+ menuClassName,
10475
+ dropdownClassName,
10476
+ listRef: desktopListRef,
10477
+ setOptionRef,
10478
+ getOptionId: getOptionId2,
10479
+ noOptionsMessage
10480
+ }
10481
+ )
10482
+ ]
10483
+ }
10484
+ );
10471
10485
  });
10472
10486
 
10473
10487
  // src/airbnb/phone-field/PhoneField.tsx
@@ -10479,6 +10493,7 @@ var PhoneField = React37.forwardRef(
10479
10493
  topLabel,
10480
10494
  value,
10481
10495
  onChange,
10496
+ onBlur,
10482
10497
  options,
10483
10498
  placeholder = "Phone number",
10484
10499
  disabled,
@@ -10499,7 +10514,7 @@ var PhoneField = React37.forwardRef(
10499
10514
  const codeOptions = React37.useMemo(
10500
10515
  () => options.map((option) => ({
10501
10516
  value: option.value,
10502
- label: option.label,
10517
+ label: `${option.label} (${option.value})`,
10503
10518
  disabled: option.disabled
10504
10519
  })),
10505
10520
  [options]
@@ -10512,7 +10527,7 @@ var PhoneField = React37.forwardRef(
10512
10527
  const hasInvalidState = Boolean(error) || Boolean(invalid);
10513
10528
  const isBlocked = Boolean(disabled) || Boolean(loading);
10514
10529
  const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
10515
- return /* @__PURE__ */ jsxs84("div", { className: cn("w-full max-w-[425px]", className), children: [
10530
+ return /* @__PURE__ */ jsxs84("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
10516
10531
  name && /* @__PURE__ */ jsx130("input", { type: "hidden", name, value: combinedValue, disabled }),
10517
10532
  codeName && /* @__PURE__ */ jsx130(
10518
10533
  "input",
@@ -10634,7 +10649,8 @@ var PhoneField = React37.forwardRef(
10634
10649
  onChange: (event) => onChange({
10635
10650
  code: value?.code ?? "",
10636
10651
  number: event.target.value
10637
- })
10652
+ }),
10653
+ onBlur
10638
10654
  }
10639
10655
  )
10640
10656
  ] }),
@@ -10702,6 +10718,7 @@ var SearchableSelectInternal = ({
10702
10718
  options,
10703
10719
  value,
10704
10720
  onChange,
10721
+ onBlur,
10705
10722
  onOpenChange,
10706
10723
  searchValue,
10707
10724
  onSearchChange,
@@ -10878,82 +10895,90 @@ var SearchableSelectInternal = ({
10878
10895
  }
10879
10896
  );
10880
10897
  React39.useImperativeHandle(ref, () => triggerRef.current, []);
10881
- return /* @__PURE__ */ jsxs86("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
10882
- name && /* @__PURE__ */ jsx132("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10883
- /* @__PURE__ */ jsx132(
10884
- FieldTrigger,
10885
- {
10886
- id: `${reactId}-trigger`,
10887
- ref: triggerRef,
10888
- variant,
10889
- "aria-haspopup": "listbox",
10890
- "aria-expanded": open,
10891
- "aria-controls": listboxId,
10892
- label,
10893
- topLabel,
10894
- labelId,
10895
- valueId,
10896
- helperTextId,
10897
- errorId: error ? errorId : void 0,
10898
- labelText: topLabel ? helperText : void 0,
10899
- valueText: valueLabel,
10900
- placeholder: helperText,
10901
- describedBy,
10902
- error: triggerError,
10903
- loading,
10904
- optional,
10905
- tooltip,
10906
- forceLabelText: Boolean(optional) || Boolean(tooltip),
10907
- hideErrorMessage,
10908
- disabled,
10909
- onClick: () => {
10910
- if (open) {
10911
- closeSelect();
10912
- return;
10913
- }
10914
- openSelect();
10915
- },
10916
- onKeyDown: handleTriggerKeyDown,
10917
- trailingAdornment: /* @__PURE__ */ jsx132(
10918
- ChevronDown3,
10898
+ return /* @__PURE__ */ jsxs86(
10899
+ "div",
10900
+ {
10901
+ ref: containerRef,
10902
+ className: cn("relative w-full max-w-[var(--max-field-width)]", className),
10903
+ children: [
10904
+ name && /* @__PURE__ */ jsx132("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10905
+ /* @__PURE__ */ jsx132(
10906
+ FieldTrigger,
10919
10907
  {
10920
- className: cn(
10921
- "h-6 w-6 text-[#1F1F1B] transition-transform",
10922
- open && "rotate-180"
10908
+ id: `${reactId}-trigger`,
10909
+ ref: triggerRef,
10910
+ variant,
10911
+ "aria-haspopup": "listbox",
10912
+ "aria-expanded": open,
10913
+ "aria-controls": listboxId,
10914
+ label,
10915
+ topLabel,
10916
+ labelId,
10917
+ valueId,
10918
+ helperTextId,
10919
+ errorId: error ? errorId : void 0,
10920
+ labelText: topLabel ? helperText : void 0,
10921
+ valueText: valueLabel,
10922
+ placeholder: helperText,
10923
+ describedBy,
10924
+ error: triggerError,
10925
+ loading,
10926
+ optional,
10927
+ tooltip,
10928
+ forceLabelText: Boolean(optional) || Boolean(tooltip),
10929
+ hideErrorMessage,
10930
+ disabled,
10931
+ onClick: () => {
10932
+ if (open) {
10933
+ closeSelect();
10934
+ return;
10935
+ }
10936
+ openSelect();
10937
+ },
10938
+ onKeyDown: handleTriggerKeyDown,
10939
+ onBlur,
10940
+ trailingAdornment: /* @__PURE__ */ jsx132(
10941
+ ChevronDown3,
10942
+ {
10943
+ className: cn(
10944
+ "h-6 w-6 text-[#1F1F1B] transition-transform",
10945
+ open && "rotate-180"
10946
+ )
10947
+ }
10923
10948
  )
10924
10949
  }
10925
- )
10926
- }
10927
- ),
10928
- isMobile ? /* @__PURE__ */ jsx132(
10929
- Drawer,
10930
- {
10931
- open,
10932
- onOpenChange: (nextOpen) => {
10933
- if (isBlocked && nextOpen) return;
10934
- if (nextOpen) {
10935
- setSelectOpen(true);
10936
- return;
10937
- }
10938
- closeSelect();
10939
- },
10940
- children: /* @__PURE__ */ jsxs86(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
10941
- /* @__PURE__ */ jsx132(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
10942
- /* @__PURE__ */ jsx132(DrawerDescription, { className: "sr-only", children: label }),
10943
- /* @__PURE__ */ jsx132("div", { className: "px-5 pb-5 pt-1", children: content })
10944
- ] })
10945
- }
10946
- ) : open ? /* @__PURE__ */ jsx132(
10947
- "div",
10948
- {
10949
- className: cn(
10950
- "absolute left-0 right-0 top-[calc(100%+8px)] z-20 overflow-hidden rounded-[20px] border border-[#DEDAD2] bg-white shadow-[0_14px_30px_rgba(18,18,18,0.08)]",
10951
- dropdownClassName
10952
10950
  ),
10953
- children: content
10954
- }
10955
- ) : null
10956
- ] });
10951
+ isMobile ? /* @__PURE__ */ jsx132(
10952
+ Drawer,
10953
+ {
10954
+ open,
10955
+ onOpenChange: (nextOpen) => {
10956
+ if (isBlocked && nextOpen) return;
10957
+ if (nextOpen) {
10958
+ setSelectOpen(true);
10959
+ return;
10960
+ }
10961
+ closeSelect();
10962
+ },
10963
+ children: /* @__PURE__ */ jsxs86(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
10964
+ /* @__PURE__ */ jsx132(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
10965
+ /* @__PURE__ */ jsx132(DrawerDescription, { className: "sr-only", children: label }),
10966
+ /* @__PURE__ */ jsx132("div", { className: "px-5 pb-5 pt-1", children: content })
10967
+ ] })
10968
+ }
10969
+ ) : open ? /* @__PURE__ */ jsx132(
10970
+ "div",
10971
+ {
10972
+ className: cn(
10973
+ "absolute left-0 right-0 top-[calc(100%+8px)] z-20 overflow-hidden rounded-[20px] border border-[#DEDAD2] bg-white shadow-[0_14px_30px_rgba(18,18,18,0.08)]",
10974
+ dropdownClassName
10975
+ ),
10976
+ children: content
10977
+ }
10978
+ ) : null
10979
+ ]
10980
+ }
10981
+ );
10957
10982
  };
10958
10983
  var SearchableSelect = React39.forwardRef(
10959
10984
  SearchableSelectInternal