@chekinapp/ui 0.0.6 → 0.0.7

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
@@ -9043,7 +9043,7 @@ var DatePicker = React30.forwardRef(
9043
9043
  setIsOpen(false);
9044
9044
  }
9045
9045
  }, [isBlocked]);
9046
- return /* @__PURE__ */ jsxs78("div", { className: cn("relative w-full max-w-[425px]", className), children: [
9046
+ return /* @__PURE__ */ jsxs78("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
9047
9047
  name && /* @__PURE__ */ jsx121(
9048
9048
  "input",
9049
9049
  {
@@ -9307,7 +9307,7 @@ var AirbnbInput = React31.forwardRef(
9307
9307
  setIsFocused(false);
9308
9308
  onBlur?.(event);
9309
9309
  };
9310
- return /* @__PURE__ */ jsx123("div", { className: cn("w-full", wrapperClassName), children: /* @__PURE__ */ jsx123(
9310
+ return /* @__PURE__ */ jsx123("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ jsx123(
9311
9311
  FieldTrigger,
9312
9312
  {
9313
9313
  as: "div",
@@ -10365,109 +10365,116 @@ var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
10365
10365
  handleMobileOpenChange(false);
10366
10366
  }
10367
10367
  };
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
- ] });
10368
+ return /* @__PURE__ */ jsxs83(
10369
+ "div",
10370
+ {
10371
+ ref: containerRef,
10372
+ className: cn("relative w-full max-w-[var(--max-field-width)]", className),
10373
+ children: [
10374
+ name && /* @__PURE__ */ jsx129("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10375
+ renderTrigger ? renderTrigger({
10376
+ id: triggerId,
10377
+ open: isOpen,
10378
+ variant,
10379
+ label,
10380
+ topLabel,
10381
+ helperText,
10382
+ value,
10383
+ valueLabel,
10384
+ disabled: isBlocked,
10385
+ loading,
10386
+ optional,
10387
+ tooltip,
10388
+ error,
10389
+ invalid,
10390
+ listboxId,
10391
+ describedBy,
10392
+ triggerRef: combinedRef,
10393
+ onClick: handleTriggerClick,
10394
+ onKeyDown: handleRootTriggerKeyDown
10395
+ }) : /* @__PURE__ */ jsx129(
10396
+ SelectTrigger2,
10397
+ {
10398
+ id: triggerId,
10399
+ ref: combinedRef,
10400
+ open: isOpen,
10401
+ variant,
10402
+ label,
10403
+ topLabel,
10404
+ helperText,
10405
+ valueLabel,
10406
+ disabled,
10407
+ loading,
10408
+ optional,
10409
+ tooltip,
10410
+ error: triggerError,
10411
+ hideErrorMessage,
10412
+ labelId,
10413
+ valueId,
10414
+ helperTextId,
10415
+ errorId: error ? errorId : void 0,
10416
+ listboxId,
10417
+ describedBy,
10418
+ onClick: handleTriggerClick,
10419
+ onKeyDown: handleRootTriggerKeyDown
10420
+ }
10421
+ ),
10422
+ isMobile ? /* @__PURE__ */ jsx129(
10423
+ SelectMobileContent,
10424
+ {
10425
+ open: isOpen,
10426
+ onOpenChange: handleMobileOpenChange,
10427
+ onClose: () => handleMobileOpenChange(false),
10428
+ listboxId,
10429
+ labelId,
10430
+ label,
10431
+ mobileTitle,
10432
+ doneLabel,
10433
+ errorId: describedErrorId,
10434
+ options,
10435
+ disabled: isBlocked,
10436
+ menuClassName,
10437
+ scrollTop: mobileScrollTop,
10438
+ activeIndex: activeMobileIndex,
10439
+ listRef: mobileListRef,
10440
+ onScroll: handleScroll,
10441
+ onOptionClick: handleOptionClick,
10442
+ onKeyDown: handleMobileWheelKeyDown,
10443
+ onDone: handleMobileDone,
10444
+ getOptionId: getOptionId2,
10445
+ noOptionsMessage
10446
+ }
10447
+ ) : /* @__PURE__ */ jsx129(
10448
+ SelectDesktopContent,
10449
+ {
10450
+ isOpen,
10451
+ listboxId,
10452
+ labelId,
10453
+ errorId: describedErrorId,
10454
+ options,
10455
+ value,
10456
+ highlightedIndex,
10457
+ onOptionClick: (option) => {
10458
+ handleDesktopSelect(option);
10459
+ setIsOpen(false);
10460
+ focusTrigger();
10461
+ },
10462
+ onOptionHover: setHighlightedIndex,
10463
+ onKeyDown: (event) => {
10464
+ handleMenuKeyDown(event, () => setIsOpen(false));
10465
+ },
10466
+ disabled: isBlocked,
10467
+ menuClassName,
10468
+ dropdownClassName,
10469
+ listRef: desktopListRef,
10470
+ setOptionRef,
10471
+ getOptionId: getOptionId2,
10472
+ noOptionsMessage
10473
+ }
10474
+ )
10475
+ ]
10476
+ }
10477
+ );
10471
10478
  });
10472
10479
 
10473
10480
  // src/airbnb/phone-field/PhoneField.tsx
@@ -10512,7 +10519,7 @@ var PhoneField = React37.forwardRef(
10512
10519
  const hasInvalidState = Boolean(error) || Boolean(invalid);
10513
10520
  const isBlocked = Boolean(disabled) || Boolean(loading);
10514
10521
  const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
10515
- return /* @__PURE__ */ jsxs84("div", { className: cn("w-full max-w-[425px]", className), children: [
10522
+ return /* @__PURE__ */ jsxs84("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
10516
10523
  name && /* @__PURE__ */ jsx130("input", { type: "hidden", name, value: combinedValue, disabled }),
10517
10524
  codeName && /* @__PURE__ */ jsx130(
10518
10525
  "input",
@@ -10878,82 +10885,89 @@ var SearchableSelectInternal = ({
10878
10885
  }
10879
10886
  );
10880
10887
  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,
10888
+ return /* @__PURE__ */ jsxs86(
10889
+ "div",
10890
+ {
10891
+ ref: containerRef,
10892
+ className: cn("relative w-full max-w-[var(--max-field-width)]", className),
10893
+ children: [
10894
+ name && /* @__PURE__ */ jsx132("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10895
+ /* @__PURE__ */ jsx132(
10896
+ FieldTrigger,
10919
10897
  {
10920
- className: cn(
10921
- "h-6 w-6 text-[#1F1F1B] transition-transform",
10922
- open && "rotate-180"
10898
+ id: `${reactId}-trigger`,
10899
+ ref: triggerRef,
10900
+ variant,
10901
+ "aria-haspopup": "listbox",
10902
+ "aria-expanded": open,
10903
+ "aria-controls": listboxId,
10904
+ label,
10905
+ topLabel,
10906
+ labelId,
10907
+ valueId,
10908
+ helperTextId,
10909
+ errorId: error ? errorId : void 0,
10910
+ labelText: topLabel ? helperText : void 0,
10911
+ valueText: valueLabel,
10912
+ placeholder: helperText,
10913
+ describedBy,
10914
+ error: triggerError,
10915
+ loading,
10916
+ optional,
10917
+ tooltip,
10918
+ forceLabelText: Boolean(optional) || Boolean(tooltip),
10919
+ hideErrorMessage,
10920
+ disabled,
10921
+ onClick: () => {
10922
+ if (open) {
10923
+ closeSelect();
10924
+ return;
10925
+ }
10926
+ openSelect();
10927
+ },
10928
+ onKeyDown: handleTriggerKeyDown,
10929
+ trailingAdornment: /* @__PURE__ */ jsx132(
10930
+ ChevronDown3,
10931
+ {
10932
+ className: cn(
10933
+ "h-6 w-6 text-[#1F1F1B] transition-transform",
10934
+ open && "rotate-180"
10935
+ )
10936
+ }
10923
10937
  )
10924
10938
  }
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
10939
  ),
10953
- children: content
10954
- }
10955
- ) : null
10956
- ] });
10940
+ isMobile ? /* @__PURE__ */ jsx132(
10941
+ Drawer,
10942
+ {
10943
+ open,
10944
+ onOpenChange: (nextOpen) => {
10945
+ if (isBlocked && nextOpen) return;
10946
+ if (nextOpen) {
10947
+ setSelectOpen(true);
10948
+ return;
10949
+ }
10950
+ closeSelect();
10951
+ },
10952
+ children: /* @__PURE__ */ jsxs86(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
10953
+ /* @__PURE__ */ jsx132(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
10954
+ /* @__PURE__ */ jsx132(DrawerDescription, { className: "sr-only", children: label }),
10955
+ /* @__PURE__ */ jsx132("div", { className: "px-5 pb-5 pt-1", children: content })
10956
+ ] })
10957
+ }
10958
+ ) : open ? /* @__PURE__ */ jsx132(
10959
+ "div",
10960
+ {
10961
+ className: cn(
10962
+ "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)]",
10963
+ dropdownClassName
10964
+ ),
10965
+ children: content
10966
+ }
10967
+ ) : null
10968
+ ]
10969
+ }
10970
+ );
10957
10971
  };
10958
10972
  var SearchableSelect = React39.forwardRef(
10959
10973
  SearchableSelectInternal