@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 +192 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +192 -178
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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-[
|
|
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)(
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
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-[
|
|
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)(
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
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
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
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
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
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
|