@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.cjs CHANGED
@@ -9309,7 +9309,7 @@ var DatePicker = React30.forwardRef(
9309
9309
  setIsOpen(false);
9310
9310
  }
9311
9311
  }, [isBlocked]);
9312
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: cn("relative w-full max-w-[425px]", className), children: [
9312
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
9313
9313
  name && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
9314
9314
  "input",
9315
9315
  {
@@ -9573,7 +9573,7 @@ var AirbnbInput = React31.forwardRef(
9573
9573
  setIsFocused(false);
9574
9574
  onBlur?.(event);
9575
9575
  };
9576
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: cn("w-full", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
9576
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
9577
9577
  FieldTrigger,
9578
9578
  {
9579
9579
  as: "div",
@@ -10631,109 +10631,116 @@ var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
10631
10631
  handleMobileOpenChange(false);
10632
10632
  }
10633
10633
  };
10634
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
10635
- name && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10636
- renderTrigger ? renderTrigger({
10637
- id: triggerId,
10638
- open: isOpen,
10639
- variant,
10640
- label,
10641
- topLabel,
10642
- helperText,
10643
- value,
10644
- valueLabel,
10645
- disabled: isBlocked,
10646
- loading,
10647
- optional,
10648
- tooltip,
10649
- error,
10650
- invalid,
10651
- listboxId,
10652
- describedBy,
10653
- triggerRef: combinedRef,
10654
- onClick: handleTriggerClick,
10655
- onKeyDown: handleRootTriggerKeyDown
10656
- }) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
10657
- SelectTrigger2,
10658
- {
10659
- id: triggerId,
10660
- ref: combinedRef,
10661
- open: isOpen,
10662
- variant,
10663
- label,
10664
- topLabel,
10665
- helperText,
10666
- valueLabel,
10667
- disabled,
10668
- loading,
10669
- optional,
10670
- tooltip,
10671
- error: triggerError,
10672
- hideErrorMessage,
10673
- labelId,
10674
- valueId,
10675
- helperTextId,
10676
- errorId: error ? errorId : void 0,
10677
- listboxId,
10678
- describedBy,
10679
- onClick: handleTriggerClick,
10680
- onKeyDown: handleRootTriggerKeyDown
10681
- }
10682
- ),
10683
- isMobile ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
10684
- SelectMobileContent,
10685
- {
10686
- open: isOpen,
10687
- onOpenChange: handleMobileOpenChange,
10688
- onClose: () => handleMobileOpenChange(false),
10689
- listboxId,
10690
- labelId,
10691
- label,
10692
- mobileTitle,
10693
- doneLabel,
10694
- errorId: describedErrorId,
10695
- options,
10696
- disabled: isBlocked,
10697
- menuClassName,
10698
- scrollTop: mobileScrollTop,
10699
- activeIndex: activeMobileIndex,
10700
- listRef: mobileListRef,
10701
- onScroll: handleScroll,
10702
- onOptionClick: handleOptionClick,
10703
- onKeyDown: handleMobileWheelKeyDown,
10704
- onDone: handleMobileDone,
10705
- getOptionId: getOptionId2,
10706
- noOptionsMessage
10707
- }
10708
- ) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
10709
- SelectDesktopContent,
10710
- {
10711
- isOpen,
10712
- listboxId,
10713
- labelId,
10714
- errorId: describedErrorId,
10715
- options,
10716
- value,
10717
- highlightedIndex,
10718
- onOptionClick: (option) => {
10719
- handleDesktopSelect(option);
10720
- setIsOpen(false);
10721
- focusTrigger();
10722
- },
10723
- onOptionHover: setHighlightedIndex,
10724
- onKeyDown: (event) => {
10725
- handleMenuKeyDown(event, () => setIsOpen(false));
10726
- },
10727
- disabled: isBlocked,
10728
- menuClassName,
10729
- dropdownClassName,
10730
- listRef: desktopListRef,
10731
- setOptionRef,
10732
- getOptionId: getOptionId2,
10733
- noOptionsMessage
10734
- }
10735
- )
10736
- ] });
10634
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
10635
+ "div",
10636
+ {
10637
+ ref: containerRef,
10638
+ className: cn("relative w-full max-w-[var(--max-field-width)]", className),
10639
+ children: [
10640
+ name && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
10641
+ renderTrigger ? renderTrigger({
10642
+ id: triggerId,
10643
+ open: isOpen,
10644
+ variant,
10645
+ label,
10646
+ topLabel,
10647
+ helperText,
10648
+ value,
10649
+ valueLabel,
10650
+ disabled: isBlocked,
10651
+ loading,
10652
+ optional,
10653
+ tooltip,
10654
+ error,
10655
+ invalid,
10656
+ listboxId,
10657
+ describedBy,
10658
+ triggerRef: combinedRef,
10659
+ onClick: handleTriggerClick,
10660
+ onKeyDown: handleRootTriggerKeyDown
10661
+ }) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
10662
+ SelectTrigger2,
10663
+ {
10664
+ id: triggerId,
10665
+ ref: combinedRef,
10666
+ open: isOpen,
10667
+ variant,
10668
+ label,
10669
+ topLabel,
10670
+ helperText,
10671
+ valueLabel,
10672
+ disabled,
10673
+ loading,
10674
+ optional,
10675
+ tooltip,
10676
+ error: triggerError,
10677
+ hideErrorMessage,
10678
+ labelId,
10679
+ valueId,
10680
+ helperTextId,
10681
+ errorId: error ? errorId : void 0,
10682
+ listboxId,
10683
+ describedBy,
10684
+ onClick: handleTriggerClick,
10685
+ onKeyDown: handleRootTriggerKeyDown
10686
+ }
10687
+ ),
10688
+ isMobile ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
10689
+ SelectMobileContent,
10690
+ {
10691
+ open: isOpen,
10692
+ onOpenChange: handleMobileOpenChange,
10693
+ onClose: () => handleMobileOpenChange(false),
10694
+ listboxId,
10695
+ labelId,
10696
+ label,
10697
+ mobileTitle,
10698
+ doneLabel,
10699
+ errorId: describedErrorId,
10700
+ options,
10701
+ disabled: isBlocked,
10702
+ menuClassName,
10703
+ scrollTop: mobileScrollTop,
10704
+ activeIndex: activeMobileIndex,
10705
+ listRef: mobileListRef,
10706
+ onScroll: handleScroll,
10707
+ onOptionClick: handleOptionClick,
10708
+ onKeyDown: handleMobileWheelKeyDown,
10709
+ onDone: handleMobileDone,
10710
+ getOptionId: getOptionId2,
10711
+ noOptionsMessage
10712
+ }
10713
+ ) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
10714
+ SelectDesktopContent,
10715
+ {
10716
+ isOpen,
10717
+ listboxId,
10718
+ labelId,
10719
+ errorId: describedErrorId,
10720
+ options,
10721
+ value,
10722
+ highlightedIndex,
10723
+ onOptionClick: (option) => {
10724
+ handleDesktopSelect(option);
10725
+ setIsOpen(false);
10726
+ focusTrigger();
10727
+ },
10728
+ onOptionHover: setHighlightedIndex,
10729
+ onKeyDown: (event) => {
10730
+ handleMenuKeyDown(event, () => setIsOpen(false));
10731
+ },
10732
+ disabled: isBlocked,
10733
+ menuClassName,
10734
+ dropdownClassName,
10735
+ listRef: desktopListRef,
10736
+ setOptionRef,
10737
+ getOptionId: getOptionId2,
10738
+ noOptionsMessage
10739
+ }
10740
+ )
10741
+ ]
10742
+ }
10743
+ );
10737
10744
  });
10738
10745
 
10739
10746
  // src/airbnb/phone-field/PhoneField.tsx
@@ -10778,7 +10785,7 @@ var PhoneField = React37.forwardRef(
10778
10785
  const hasInvalidState = Boolean(error) || Boolean(invalid);
10779
10786
  const isBlocked = Boolean(disabled) || Boolean(loading);
10780
10787
  const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
10781
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: cn("w-full max-w-[425px]", className), children: [
10788
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
10782
10789
  name && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
10783
10790
  codeName && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
10784
10791
  "input",
@@ -11144,82 +11151,89 @@ var SearchableSelectInternal = ({
11144
11151
  }
11145
11152
  );
11146
11153
  React39.useImperativeHandle(ref, () => triggerRef.current, []);
11147
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
11148
- name && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
11149
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11150
- FieldTrigger,
11151
- {
11152
- id: `${reactId}-trigger`,
11153
- ref: triggerRef,
11154
- variant,
11155
- "aria-haspopup": "listbox",
11156
- "aria-expanded": open,
11157
- "aria-controls": listboxId,
11158
- label,
11159
- topLabel,
11160
- labelId,
11161
- valueId,
11162
- helperTextId,
11163
- errorId: error ? errorId : void 0,
11164
- labelText: topLabel ? helperText : void 0,
11165
- valueText: valueLabel,
11166
- placeholder: helperText,
11167
- describedBy,
11168
- error: triggerError,
11169
- loading,
11170
- optional,
11171
- tooltip,
11172
- forceLabelText: Boolean(optional) || Boolean(tooltip),
11173
- hideErrorMessage,
11174
- disabled,
11175
- onClick: () => {
11176
- if (open) {
11177
- closeSelect();
11178
- return;
11179
- }
11180
- openSelect();
11181
- },
11182
- onKeyDown: handleTriggerKeyDown,
11183
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11184
- import_lucide_react46.ChevronDown,
11154
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
11155
+ "div",
11156
+ {
11157
+ ref: containerRef,
11158
+ className: cn("relative w-full max-w-[var(--max-field-width)]", className),
11159
+ children: [
11160
+ name && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
11161
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11162
+ FieldTrigger,
11185
11163
  {
11186
- className: cn(
11187
- "h-6 w-6 text-[#1F1F1B] transition-transform",
11188
- open && "rotate-180"
11164
+ id: `${reactId}-trigger`,
11165
+ ref: triggerRef,
11166
+ variant,
11167
+ "aria-haspopup": "listbox",
11168
+ "aria-expanded": open,
11169
+ "aria-controls": listboxId,
11170
+ label,
11171
+ topLabel,
11172
+ labelId,
11173
+ valueId,
11174
+ helperTextId,
11175
+ errorId: error ? errorId : void 0,
11176
+ labelText: topLabel ? helperText : void 0,
11177
+ valueText: valueLabel,
11178
+ placeholder: helperText,
11179
+ describedBy,
11180
+ error: triggerError,
11181
+ loading,
11182
+ optional,
11183
+ tooltip,
11184
+ forceLabelText: Boolean(optional) || Boolean(tooltip),
11185
+ hideErrorMessage,
11186
+ disabled,
11187
+ onClick: () => {
11188
+ if (open) {
11189
+ closeSelect();
11190
+ return;
11191
+ }
11192
+ openSelect();
11193
+ },
11194
+ onKeyDown: handleTriggerKeyDown,
11195
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11196
+ import_lucide_react46.ChevronDown,
11197
+ {
11198
+ className: cn(
11199
+ "h-6 w-6 text-[#1F1F1B] transition-transform",
11200
+ open && "rotate-180"
11201
+ )
11202
+ }
11189
11203
  )
11190
11204
  }
11191
- )
11192
- }
11193
- ),
11194
- isMobile ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11195
- Drawer,
11196
- {
11197
- open,
11198
- onOpenChange: (nextOpen) => {
11199
- if (isBlocked && nextOpen) return;
11200
- if (nextOpen) {
11201
- setSelectOpen(true);
11202
- return;
11203
- }
11204
- closeSelect();
11205
- },
11206
- children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
11207
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
11208
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerDescription, { className: "sr-only", children: label }),
11209
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
11210
- ] })
11211
- }
11212
- ) : open ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11213
- "div",
11214
- {
11215
- className: cn(
11216
- "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)]",
11217
- dropdownClassName
11218
11205
  ),
11219
- children: content
11220
- }
11221
- ) : null
11222
- ] });
11206
+ isMobile ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11207
+ Drawer,
11208
+ {
11209
+ open,
11210
+ onOpenChange: (nextOpen) => {
11211
+ if (isBlocked && nextOpen) return;
11212
+ if (nextOpen) {
11213
+ setSelectOpen(true);
11214
+ return;
11215
+ }
11216
+ closeSelect();
11217
+ },
11218
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
11219
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
11220
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerDescription, { className: "sr-only", children: label }),
11221
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
11222
+ ] })
11223
+ }
11224
+ ) : open ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
11225
+ "div",
11226
+ {
11227
+ className: cn(
11228
+ "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)]",
11229
+ dropdownClassName
11230
+ ),
11231
+ children: content
11232
+ }
11233
+ ) : null
11234
+ ]
11235
+ }
11236
+ );
11223
11237
  };
11224
11238
  var SearchableSelect = React39.forwardRef(
11225
11239
  SearchableSelectInternal