@chekinapp/ui 0.0.126 → 0.0.127
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 +214 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -8
- package/dist/index.d.ts +13 -8
- package/dist/index.js +277 -169
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -345,6 +345,7 @@ __export(index_exports, {
|
|
|
345
345
|
compressFile: () => compressFile,
|
|
346
346
|
compressImage: () => compressImage,
|
|
347
347
|
copyToClipboard: () => copyToClipboard,
|
|
348
|
+
countriesFilter: () => countriesFilter,
|
|
348
349
|
createDisabledMatchers: () => createDisabledMatchers,
|
|
349
350
|
emptyMediaVariants: () => emptyMediaVariants,
|
|
350
351
|
findPhoneCode: () => findPhoneCode,
|
|
@@ -12482,7 +12483,7 @@ function Fieldset({
|
|
|
12482
12483
|
{
|
|
12483
12484
|
"aria-hidden": "true",
|
|
12484
12485
|
className: cn(
|
|
12485
|
-
"pointer-events-none absolute -top-[5px] bottom-0 left-0 right-0 m-0 min-w-0 rounded-[6px] border px-[13px] transition-colors duration-75",
|
|
12486
|
+
"pointer-events-none absolute -top-[5px] bottom-0 left-0 right-0 m-0 min-w-0 rounded-[6px] border px-[13px] text-left transition-colors duration-75",
|
|
12486
12487
|
"border-[var(--chekin-color-gray-3)]",
|
|
12487
12488
|
isActivated && "border-[var(--chekin-color-gray-2)]",
|
|
12488
12489
|
isFocused && "border-[var(--chekin-color-brand-blue)]",
|
|
@@ -12786,10 +12787,6 @@ Input.displayName = "Input";
|
|
|
12786
12787
|
var React50 = __toESM(require("react"), 1);
|
|
12787
12788
|
var import_react_i18next34 = require("react-i18next");
|
|
12788
12789
|
|
|
12789
|
-
// src/dashboard/select/Select.tsx
|
|
12790
|
-
var React49 = __toESM(require("react"), 1);
|
|
12791
|
-
var import_react_i18next33 = require("react-i18next");
|
|
12792
|
-
|
|
12793
12790
|
// src/dashboard/_select-internals/SelectFieldShell.tsx
|
|
12794
12791
|
var import_react_i18next27 = require("react-i18next");
|
|
12795
12792
|
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
@@ -12917,6 +12914,46 @@ function isOptionSelected(option, selectedValue, selectedValues) {
|
|
|
12917
12914
|
function defaultIsOptionSelected(option, selectValue) {
|
|
12918
12915
|
return selectValue.some((item) => item.value === option.value);
|
|
12919
12916
|
}
|
|
12917
|
+
var COUNTRY_ALIASES = [["T\xFCrkiye", ["Turkey", "Turkiye"]]];
|
|
12918
|
+
function normalizeSearchText(value) {
|
|
12919
|
+
return value.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
|
|
12920
|
+
}
|
|
12921
|
+
var ALIAS_LOOKUP = COUNTRY_ALIASES.reduce(
|
|
12922
|
+
(acc, [officialName, aliases]) => {
|
|
12923
|
+
const officialLower = normalizeSearchText(officialName);
|
|
12924
|
+
aliases.forEach((alias) => {
|
|
12925
|
+
acc[normalizeSearchText(alias)] = officialLower;
|
|
12926
|
+
});
|
|
12927
|
+
return acc;
|
|
12928
|
+
},
|
|
12929
|
+
{}
|
|
12930
|
+
);
|
|
12931
|
+
function getOptionSearchText(option) {
|
|
12932
|
+
if (typeof option.label === "string" || typeof option.label === "number") {
|
|
12933
|
+
return String(option.label);
|
|
12934
|
+
}
|
|
12935
|
+
return String(option.value);
|
|
12936
|
+
}
|
|
12937
|
+
function countriesFilter(option, inputValue) {
|
|
12938
|
+
const input = normalizeSearchText(inputValue.trim());
|
|
12939
|
+
if (!input) {
|
|
12940
|
+
return true;
|
|
12941
|
+
}
|
|
12942
|
+
const label = normalizeSearchText(getOptionSearchText(option));
|
|
12943
|
+
if (label.includes(input)) {
|
|
12944
|
+
return true;
|
|
12945
|
+
}
|
|
12946
|
+
const officialName = ALIAS_LOOKUP[input];
|
|
12947
|
+
if (officialName && label.includes(officialName)) {
|
|
12948
|
+
return true;
|
|
12949
|
+
}
|
|
12950
|
+
for (const [alias, official] of Object.entries(ALIAS_LOOKUP)) {
|
|
12951
|
+
if (alias.includes(input) && label.includes(official)) {
|
|
12952
|
+
return true;
|
|
12953
|
+
}
|
|
12954
|
+
}
|
|
12955
|
+
return false;
|
|
12956
|
+
}
|
|
12920
12957
|
|
|
12921
12958
|
// src/dashboard/_select-internals/slots/DefaultOption.tsx
|
|
12922
12959
|
var import_lucide_react43 = require("lucide-react");
|
|
@@ -13266,15 +13303,19 @@ function SelectTrigger({
|
|
|
13266
13303
|
labelId,
|
|
13267
13304
|
valueId,
|
|
13268
13305
|
describedErrorId,
|
|
13306
|
+
accessibleLabel,
|
|
13269
13307
|
hasValue,
|
|
13270
13308
|
isOpen,
|
|
13271
13309
|
isBlocked,
|
|
13272
13310
|
disabled,
|
|
13311
|
+
readOnly,
|
|
13273
13312
|
loading,
|
|
13274
13313
|
invalid,
|
|
13275
13314
|
placeholder,
|
|
13315
|
+
showPlaceholderWhenIdle,
|
|
13276
13316
|
valueLabel,
|
|
13277
13317
|
leftIcon,
|
|
13318
|
+
hideIndicator,
|
|
13278
13319
|
onClick,
|
|
13279
13320
|
onKeyDown,
|
|
13280
13321
|
onBlur
|
|
@@ -13289,7 +13330,8 @@ function SelectTrigger({
|
|
|
13289
13330
|
"aria-haspopup": "listbox",
|
|
13290
13331
|
"aria-expanded": isOpen,
|
|
13291
13332
|
"aria-controls": listboxId,
|
|
13292
|
-
"aria-
|
|
13333
|
+
"aria-label": accessibleLabel,
|
|
13334
|
+
"aria-labelledby": accessibleLabel ? void 0 : hasValue && valueId ? `${labelId} ${valueId}` : labelId,
|
|
13293
13335
|
"aria-describedby": describedErrorId,
|
|
13294
13336
|
"aria-invalid": invalid,
|
|
13295
13337
|
"aria-busy": loading,
|
|
@@ -13301,18 +13343,19 @@ function SelectTrigger({
|
|
|
13301
13343
|
"relative m-0 box-border flex h-12 w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] border-0 pr-4 text-left text-[16px] font-medium leading-5 outline-none transition-colors duration-200",
|
|
13302
13344
|
leftIcon ? "pl-10" : "pl-4",
|
|
13303
13345
|
isEmpty ? "bg-[var(--empty-field-background)] text-[var(--chekin-color-gray-1)]" : "bg-transparent text-[var(--chekin-color-brand-navy)]",
|
|
13346
|
+
readOnly && !disabled && !loading && "cursor-default",
|
|
13304
13347
|
disabled && !loading && "cursor-not-allowed opacity-50",
|
|
13305
13348
|
loading && "!cursor-progress"
|
|
13306
13349
|
),
|
|
13307
13350
|
children: [
|
|
13308
13351
|
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "pointer-events-none absolute left-0 top-0 flex h-full max-w-10 items-center justify-center text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
|
|
13309
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: valueLabel
|
|
13310
|
-
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "
|
|
13352
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: hasValue ? valueLabel : showPlaceholderWhenIdle || isOpen ? placeholder : null }),
|
|
13353
|
+
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: !hideIndicator && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
13311
13354
|
import_lucide_react45.ChevronDown,
|
|
13312
13355
|
{
|
|
13313
13356
|
size: 16,
|
|
13314
13357
|
className: cn(
|
|
13315
|
-
"transition-transform duration-200",
|
|
13358
|
+
"pointer-events-none transition-transform duration-200",
|
|
13316
13359
|
isOpen && "rotate-180 text-[var(--chekin-color-brand-blue)]"
|
|
13317
13360
|
)
|
|
13318
13361
|
}
|
|
@@ -13332,6 +13375,7 @@ function ComboboxTrigger({
|
|
|
13332
13375
|
labelId,
|
|
13333
13376
|
valueId,
|
|
13334
13377
|
describedErrorId,
|
|
13378
|
+
accessibleLabel,
|
|
13335
13379
|
isOpen,
|
|
13336
13380
|
isFocused,
|
|
13337
13381
|
isBlocked,
|
|
@@ -13345,6 +13389,7 @@ function ComboboxTrigger({
|
|
|
13345
13389
|
inputRef,
|
|
13346
13390
|
inputValue,
|
|
13347
13391
|
placeholder,
|
|
13392
|
+
showPlaceholderWhenIdle,
|
|
13348
13393
|
highlightedIndex,
|
|
13349
13394
|
getOptionId: getOptionId2,
|
|
13350
13395
|
onInputChange,
|
|
@@ -13359,7 +13404,8 @@ function ComboboxTrigger({
|
|
|
13359
13404
|
containerClassName,
|
|
13360
13405
|
inputClassName,
|
|
13361
13406
|
hideIndicator,
|
|
13362
|
-
autoFocus
|
|
13407
|
+
autoFocus,
|
|
13408
|
+
searchable = true
|
|
13363
13409
|
}) {
|
|
13364
13410
|
const { t } = (0, import_react_i18next30.useTranslation)();
|
|
13365
13411
|
const resolvedPlaceholder = placeholder ?? t("type_to_search");
|
|
@@ -13371,7 +13417,8 @@ function ComboboxTrigger({
|
|
|
13371
13417
|
"aria-haspopup": "listbox",
|
|
13372
13418
|
"aria-expanded": isOpen,
|
|
13373
13419
|
"aria-controls": listboxId,
|
|
13374
|
-
"aria-
|
|
13420
|
+
"aria-label": accessibleLabel,
|
|
13421
|
+
"aria-labelledby": accessibleLabel ? void 0 : hasValue && valueId ? `${labelId} ${valueId}` : labelId,
|
|
13375
13422
|
"aria-describedby": describedErrorId,
|
|
13376
13423
|
"aria-invalid": invalid,
|
|
13377
13424
|
"aria-busy": loading,
|
|
@@ -13381,6 +13428,7 @@ function ComboboxTrigger({
|
|
|
13381
13428
|
"relative box-border flex w-full cursor-text rounded-[6px] border-0 text-left text-[16px] font-medium leading-5 outline-none transition-colors duration-200",
|
|
13382
13429
|
"min-h-12",
|
|
13383
13430
|
isEmpty && !isFocused ? "bg-[var(--empty-field-background)]" : "bg-transparent",
|
|
13431
|
+
readOnly && !disabled && !loading && "cursor-default",
|
|
13384
13432
|
disabled && !loading && "cursor-not-allowed",
|
|
13385
13433
|
loading && "!cursor-progress",
|
|
13386
13434
|
containerClassName
|
|
@@ -13408,8 +13456,8 @@ function ComboboxTrigger({
|
|
|
13408
13456
|
onFocus: onInputFocus,
|
|
13409
13457
|
onKeyDown: onInputKeyDown,
|
|
13410
13458
|
disabled: isBlocked,
|
|
13411
|
-
readOnly,
|
|
13412
|
-
placeholder: isFocused || isOpen ? resolvedPlaceholder : "",
|
|
13459
|
+
readOnly: readOnly || !searchable,
|
|
13460
|
+
placeholder: searchable && (showPlaceholderWhenIdle || isFocused || isOpen) ? resolvedPlaceholder : "",
|
|
13413
13461
|
autoComplete: "off",
|
|
13414
13462
|
autoFocus,
|
|
13415
13463
|
"aria-autocomplete": "list",
|
|
@@ -13418,7 +13466,9 @@ function ComboboxTrigger({
|
|
|
13418
13466
|
className: cn(
|
|
13419
13467
|
"m-0 box-border min-w-0 flex-1 border-0 bg-transparent p-0 text-[16px] font-medium leading-5 text-[var(--chekin-color-brand-navy)] outline-none placeholder:text-[var(--chekin-color-gray-1)]",
|
|
13420
13468
|
isMulti && "min-w-[40px]",
|
|
13421
|
-
|
|
13469
|
+
!searchable && "sr-only",
|
|
13470
|
+
readOnly && !disabled && !loading && "cursor-default",
|
|
13471
|
+
disabled && !loading && "cursor-not-allowed",
|
|
13422
13472
|
loading && "!cursor-progress",
|
|
13423
13473
|
inputClassName
|
|
13424
13474
|
)
|
|
@@ -13565,7 +13615,9 @@ function useSelectState(params) {
|
|
|
13565
13615
|
onKeyDown,
|
|
13566
13616
|
onFocus,
|
|
13567
13617
|
onBlur,
|
|
13568
|
-
|
|
13618
|
+
onInputChange,
|
|
13619
|
+
isSearchInDropdown,
|
|
13620
|
+
searchable = true
|
|
13569
13621
|
} = params;
|
|
13570
13622
|
const inputRef = React48.useRef(null);
|
|
13571
13623
|
const mobileSearchInputRef = React48.useRef(null);
|
|
@@ -13579,8 +13631,10 @@ function useSelectState(params) {
|
|
|
13579
13631
|
() => resolveValueLabel(singleSelected, getValueLabel),
|
|
13580
13632
|
[singleSelected, getValueLabel]
|
|
13581
13633
|
);
|
|
13582
|
-
const isSearchOnlyInput = isMulti || Boolean(isSearchInDropdown);
|
|
13583
|
-
const [inputValue, setInputValue] = React48.useState(
|
|
13634
|
+
const isSearchOnlyInput = searchable && (isMulti || Boolean(isSearchInDropdown));
|
|
13635
|
+
const [inputValue, setInputValue] = React48.useState(
|
|
13636
|
+
searchable && !isSearchOnlyInput ? valueLabel : ""
|
|
13637
|
+
);
|
|
13584
13638
|
const hasValue = selectedOptions.length > 0;
|
|
13585
13639
|
const isBlocked = Boolean(disabled) || Boolean(loading) || Boolean(readOnly);
|
|
13586
13640
|
const hasInvalidState = Boolean(error);
|
|
@@ -13595,9 +13649,10 @@ function useSelectState(params) {
|
|
|
13595
13649
|
const ids = useSelectIds({ name, hasValue, error, hideErrorMessage });
|
|
13596
13650
|
const { listboxId, getOptionId: getOptionId2 } = ids;
|
|
13597
13651
|
React48.useEffect(() => {
|
|
13652
|
+
if (!searchable) return;
|
|
13598
13653
|
if (isSearchOnlyInput) return;
|
|
13599
13654
|
if (!isFocused) setInputValue(valueLabel);
|
|
13600
|
-
}, [valueLabel, isFocused, isSearchOnlyInput]);
|
|
13655
|
+
}, [valueLabel, isFocused, isSearchOnlyInput, searchable]);
|
|
13601
13656
|
React48.useEffect(() => {
|
|
13602
13657
|
if (!isSearchOnlyInput) return;
|
|
13603
13658
|
if (!isOpen) {
|
|
@@ -13606,7 +13661,7 @@ function useSelectState(params) {
|
|
|
13606
13661
|
}
|
|
13607
13662
|
}, [isOpen, isSearchOnlyInput]);
|
|
13608
13663
|
const trimmedInput = inputValue.trim();
|
|
13609
|
-
const isFiltering = isSearchOnlyInput ? trimmedInput.length > 0 : trimmedInput.length > 0 && trimmedInput.toLowerCase() !== valueLabel.toLowerCase();
|
|
13664
|
+
const isFiltering = searchable && (isSearchOnlyInput ? trimmedInput.length > 0 : trimmedInput.length > 0 && trimmedInput.toLowerCase() !== valueLabel.toLowerCase());
|
|
13610
13665
|
const filteredOptions = React48.useMemo(() => {
|
|
13611
13666
|
if (!isFiltering) return options;
|
|
13612
13667
|
return options.filter((option) => filterOption(option, trimmedInput));
|
|
@@ -13637,9 +13692,9 @@ function useSelectState(params) {
|
|
|
13637
13692
|
}, [isOpen, filteredOptions, isOptionDisabled]);
|
|
13638
13693
|
React48.useEffect(() => {
|
|
13639
13694
|
if (!isOpen || highlightedIndex < 0) return;
|
|
13640
|
-
optionRefs.current[highlightedIndex]?.scrollIntoView({ block: "nearest" });
|
|
13695
|
+
optionRefs.current[highlightedIndex]?.scrollIntoView?.({ block: "nearest" });
|
|
13641
13696
|
}, [highlightedIndex, isOpen]);
|
|
13642
|
-
const inMenuSearchVisible = isMobile3 || Boolean(isSearchInDropdown);
|
|
13697
|
+
const inMenuSearchVisible = searchable && (isMobile3 || Boolean(isSearchInDropdown));
|
|
13643
13698
|
React48.useEffect(() => {
|
|
13644
13699
|
if (!isOpen || !inMenuSearchVisible) return;
|
|
13645
13700
|
const frame = window.requestAnimationFrame(
|
|
@@ -13667,7 +13722,9 @@ function useSelectState(params) {
|
|
|
13667
13722
|
return;
|
|
13668
13723
|
}
|
|
13669
13724
|
onSelectionChange([option], { action: "select" });
|
|
13670
|
-
setInputValue(
|
|
13725
|
+
setInputValue(
|
|
13726
|
+
searchable && !isSearchInDropdown ? resolveValueLabel(option, getValueLabel) : ""
|
|
13727
|
+
);
|
|
13671
13728
|
setIsOpen(false);
|
|
13672
13729
|
setIsFocused(false);
|
|
13673
13730
|
inputRef.current?.blur();
|
|
@@ -13681,7 +13738,8 @@ function useSelectState(params) {
|
|
|
13681
13738
|
closeMenuOnSelect,
|
|
13682
13739
|
setIsOpen,
|
|
13683
13740
|
getValueLabel,
|
|
13684
|
-
isSearchInDropdown
|
|
13741
|
+
isSearchInDropdown,
|
|
13742
|
+
searchable
|
|
13685
13743
|
]
|
|
13686
13744
|
);
|
|
13687
13745
|
const removeOption = React48.useCallback(
|
|
@@ -13716,7 +13774,9 @@ function useSelectState(params) {
|
|
|
13716
13774
|
return;
|
|
13717
13775
|
}
|
|
13718
13776
|
onSelectionChange([newOption], { action: "create" });
|
|
13719
|
-
setInputValue(
|
|
13777
|
+
setInputValue(
|
|
13778
|
+
searchable && !isSearchInDropdown ? resolveValueLabel(newOption, getValueLabel) : ""
|
|
13779
|
+
);
|
|
13720
13780
|
setIsOpen(false);
|
|
13721
13781
|
setIsFocused(false);
|
|
13722
13782
|
inputRef.current?.blur();
|
|
@@ -13730,14 +13790,18 @@ function useSelectState(params) {
|
|
|
13730
13790
|
closeMenuOnSelect,
|
|
13731
13791
|
setIsOpen,
|
|
13732
13792
|
getValueLabel,
|
|
13733
|
-
isSearchInDropdown
|
|
13793
|
+
isSearchInDropdown,
|
|
13794
|
+
searchable
|
|
13734
13795
|
]);
|
|
13735
13796
|
const handleInputChange = React48.useCallback(
|
|
13736
13797
|
(event) => {
|
|
13737
|
-
|
|
13798
|
+
if (!searchable) return;
|
|
13799
|
+
const nextValue = event.target.value;
|
|
13800
|
+
setInputValue(nextValue);
|
|
13801
|
+
onInputChange?.(nextValue);
|
|
13738
13802
|
if (!isOpen) setIsOpen(true);
|
|
13739
13803
|
},
|
|
13740
|
-
[isOpen, setIsOpen]
|
|
13804
|
+
[isOpen, onInputChange, searchable, setIsOpen]
|
|
13741
13805
|
);
|
|
13742
13806
|
const handleInputFocus = React48.useCallback(
|
|
13743
13807
|
(event) => {
|
|
@@ -13745,11 +13809,11 @@ function useSelectState(params) {
|
|
|
13745
13809
|
onFocus?.(event);
|
|
13746
13810
|
setIsFocused(true);
|
|
13747
13811
|
if (openMenuOnFocus) setIsOpen(true);
|
|
13748
|
-
if (!isMulti) {
|
|
13812
|
+
if (searchable && !isMulti) {
|
|
13749
13813
|
requestAnimationFrame(() => inputRef.current?.select());
|
|
13750
13814
|
}
|
|
13751
13815
|
},
|
|
13752
|
-
[isBlocked, onFocus, openMenuOnFocus, setIsOpen, isMulti]
|
|
13816
|
+
[isBlocked, onFocus, openMenuOnFocus, setIsOpen, searchable, isMulti]
|
|
13753
13817
|
);
|
|
13754
13818
|
const handleContainerClick = React48.useCallback(() => {
|
|
13755
13819
|
if (isBlocked) return;
|
|
@@ -13760,10 +13824,10 @@ function useSelectState(params) {
|
|
|
13760
13824
|
(event) => {
|
|
13761
13825
|
if (containerRef.current?.contains(event.relatedTarget)) return;
|
|
13762
13826
|
setIsFocused(false);
|
|
13763
|
-
if (!isSearchOnlyInput) setInputValue(valueLabel);
|
|
13827
|
+
if (searchable && !isSearchOnlyInput) setInputValue(valueLabel);
|
|
13764
13828
|
onBlur?.(event);
|
|
13765
13829
|
},
|
|
13766
|
-
[containerRef, isSearchOnlyInput, valueLabel, onBlur]
|
|
13830
|
+
[containerRef, isSearchOnlyInput, searchable, valueLabel, onBlur]
|
|
13767
13831
|
);
|
|
13768
13832
|
const handleInputKeyDown = React48.useCallback(
|
|
13769
13833
|
(event) => {
|
|
@@ -13817,7 +13881,7 @@ function useSelectState(params) {
|
|
|
13817
13881
|
}
|
|
13818
13882
|
if (event.key === "Escape") {
|
|
13819
13883
|
event.preventDefault();
|
|
13820
|
-
if (!isSearchOnlyInput) setInputValue(valueLabel);
|
|
13884
|
+
if (searchable && !isSearchOnlyInput) setInputValue(valueLabel);
|
|
13821
13885
|
setIsOpen(false);
|
|
13822
13886
|
inputRef.current?.blur();
|
|
13823
13887
|
}
|
|
@@ -13837,7 +13901,8 @@ function useSelectState(params) {
|
|
|
13837
13901
|
selectOption,
|
|
13838
13902
|
canCreateNewOption,
|
|
13839
13903
|
createOption,
|
|
13840
|
-
valueLabel
|
|
13904
|
+
valueLabel,
|
|
13905
|
+
searchable
|
|
13841
13906
|
]
|
|
13842
13907
|
);
|
|
13843
13908
|
const isEmpty = !hasValue && !inputValue;
|
|
@@ -13937,10 +14002,12 @@ function DefaultControl(props) {
|
|
|
13937
14002
|
labelId,
|
|
13938
14003
|
valueId,
|
|
13939
14004
|
describedErrorId,
|
|
14005
|
+
accessibleLabel,
|
|
13940
14006
|
getOptionId: getOptionId2,
|
|
13941
14007
|
inputRef,
|
|
13942
14008
|
inputValue,
|
|
13943
14009
|
placeholder,
|
|
14010
|
+
showPlaceholderWhenIdle,
|
|
13944
14011
|
isMulti,
|
|
13945
14012
|
isOpen,
|
|
13946
14013
|
isFocused,
|
|
@@ -13964,6 +14031,7 @@ function DefaultControl(props) {
|
|
|
13964
14031
|
hideIndicator,
|
|
13965
14032
|
autoFocus,
|
|
13966
14033
|
leftIcon,
|
|
14034
|
+
searchable,
|
|
13967
14035
|
components
|
|
13968
14036
|
} = props;
|
|
13969
14037
|
const Chip = components.MultiValueChip ?? DefaultMultiValueChip;
|
|
@@ -13977,6 +14045,7 @@ function DefaultControl(props) {
|
|
|
13977
14045
|
labelId,
|
|
13978
14046
|
valueId,
|
|
13979
14047
|
describedErrorId,
|
|
14048
|
+
accessibleLabel,
|
|
13980
14049
|
isOpen,
|
|
13981
14050
|
isFocused,
|
|
13982
14051
|
isBlocked,
|
|
@@ -13990,6 +14059,7 @@ function DefaultControl(props) {
|
|
|
13990
14059
|
inputRef,
|
|
13991
14060
|
inputValue,
|
|
13992
14061
|
placeholder: placeholderText,
|
|
14062
|
+
showPlaceholderWhenIdle,
|
|
13993
14063
|
highlightedIndex,
|
|
13994
14064
|
getOptionId: getOptionId2,
|
|
13995
14065
|
onInputChange,
|
|
@@ -14002,6 +14072,7 @@ function DefaultControl(props) {
|
|
|
14002
14072
|
hideIndicator,
|
|
14003
14073
|
autoFocus,
|
|
14004
14074
|
leftIcon,
|
|
14075
|
+
searchable,
|
|
14005
14076
|
leadingContent: isMulti ? selectedOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
|
|
14006
14077
|
Chip,
|
|
14007
14078
|
{
|
|
@@ -14016,6 +14087,7 @@ function DefaultControl(props) {
|
|
|
14016
14087
|
}
|
|
14017
14088
|
|
|
14018
14089
|
// src/dashboard/_select-internals/slots/StaticControl.tsx
|
|
14090
|
+
var import_lucide_react48 = require("lucide-react");
|
|
14019
14091
|
var import_jsx_runtime155 = require("react/jsx-runtime");
|
|
14020
14092
|
function StaticControl(props) {
|
|
14021
14093
|
const {
|
|
@@ -14024,6 +14096,7 @@ function StaticControl(props) {
|
|
|
14024
14096
|
labelId,
|
|
14025
14097
|
valueId,
|
|
14026
14098
|
describedErrorId,
|
|
14099
|
+
accessibleLabel,
|
|
14027
14100
|
isOpen,
|
|
14028
14101
|
isBlocked,
|
|
14029
14102
|
hasValue,
|
|
@@ -14032,30 +14105,53 @@ function StaticControl(props) {
|
|
|
14032
14105
|
disabled,
|
|
14033
14106
|
valueLabel,
|
|
14034
14107
|
placeholder,
|
|
14108
|
+
showPlaceholderWhenIdle,
|
|
14035
14109
|
onContainerClick,
|
|
14110
|
+
onClear,
|
|
14111
|
+
clearable,
|
|
14112
|
+
clearLabel,
|
|
14113
|
+
hideIndicator,
|
|
14114
|
+
readOnly,
|
|
14036
14115
|
leftIcon
|
|
14037
14116
|
} = props;
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
|
|
14042
|
-
|
|
14043
|
-
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14117
|
+
const showClear = Boolean(clearable) && hasValue && !readOnly && !disabled;
|
|
14118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "relative", children: [
|
|
14119
|
+
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
14120
|
+
SelectTrigger,
|
|
14121
|
+
{
|
|
14122
|
+
triggerId,
|
|
14123
|
+
listboxId,
|
|
14124
|
+
labelId,
|
|
14125
|
+
valueId,
|
|
14126
|
+
describedErrorId,
|
|
14127
|
+
accessibleLabel,
|
|
14128
|
+
hasValue,
|
|
14129
|
+
isOpen,
|
|
14130
|
+
isBlocked,
|
|
14131
|
+
disabled,
|
|
14132
|
+
readOnly,
|
|
14133
|
+
loading,
|
|
14134
|
+
invalid,
|
|
14135
|
+
placeholder,
|
|
14136
|
+
showPlaceholderWhenIdle,
|
|
14137
|
+
valueLabel,
|
|
14138
|
+
leftIcon,
|
|
14139
|
+
hideIndicator,
|
|
14140
|
+
onClick: onContainerClick,
|
|
14141
|
+
onKeyDown: () => void 0
|
|
14142
|
+
}
|
|
14143
|
+
),
|
|
14144
|
+
showClear && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
14145
|
+
"button",
|
|
14146
|
+
{
|
|
14147
|
+
type: "button",
|
|
14148
|
+
onClick: onClear,
|
|
14149
|
+
className: "absolute right-9 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-[3px] border-0 bg-transparent p-0 text-[#9696b9] hover:shadow-[0_3px_3px_#0f477734]",
|
|
14150
|
+
"aria-label": clearLabel,
|
|
14151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(import_lucide_react48.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
|
|
14152
|
+
}
|
|
14153
|
+
)
|
|
14154
|
+
] });
|
|
14059
14155
|
}
|
|
14060
14156
|
|
|
14061
14157
|
// src/dashboard/_select-internals/slots/DefaultMenuList.tsx
|
|
@@ -14163,6 +14259,10 @@ function mergeComponents(overrides) {
|
|
|
14163
14259
|
};
|
|
14164
14260
|
}
|
|
14165
14261
|
|
|
14262
|
+
// src/dashboard/select/Select.tsx
|
|
14263
|
+
var React49 = __toESM(require("react"), 1);
|
|
14264
|
+
var import_react_i18next33 = require("react-i18next");
|
|
14265
|
+
|
|
14166
14266
|
// src/dashboard/select/useSetCorrectOptionIfThereIsOnlyValue.ts
|
|
14167
14267
|
var import_react89 = require("react");
|
|
14168
14268
|
function useSetCorrectOptionIfThereIsOnlyValue({ value, options, onChange, enabled = true }) {
|
|
@@ -14222,6 +14322,7 @@ function SelectInternal(props, ref) {
|
|
|
14222
14322
|
openMenuOnFocus,
|
|
14223
14323
|
components: userComponents,
|
|
14224
14324
|
onInputChange,
|
|
14325
|
+
searchable = true,
|
|
14225
14326
|
searchPosition = "trigger",
|
|
14226
14327
|
menuHeader,
|
|
14227
14328
|
onMenuScrollToBottom,
|
|
@@ -14229,8 +14330,8 @@ function SelectInternal(props, ref) {
|
|
|
14229
14330
|
formatGroupLabel,
|
|
14230
14331
|
onReset
|
|
14231
14332
|
} = props;
|
|
14232
|
-
const isSearchInDropdown = searchPosition === "dropdown";
|
|
14233
14333
|
const isMulti = props.isMulti === true;
|
|
14334
|
+
const isSearchInDropdown = searchable && searchPosition === "dropdown";
|
|
14234
14335
|
const clearable = !isMulti ? props.clearable ?? true : true;
|
|
14235
14336
|
const closeMenuOnSelect = isMulti ? props.closeMenuOnSelect ?? false : void 0;
|
|
14236
14337
|
const { t } = (0, import_react_i18next33.useTranslation)();
|
|
@@ -14289,25 +14390,24 @@ function SelectInternal(props, ref) {
|
|
|
14289
14390
|
onKeyDown,
|
|
14290
14391
|
onFocus,
|
|
14291
14392
|
onBlur,
|
|
14292
|
-
|
|
14393
|
+
onInputChange,
|
|
14394
|
+
isSearchInDropdown,
|
|
14395
|
+
searchable
|
|
14293
14396
|
});
|
|
14294
14397
|
const components = React49.useMemo(() => {
|
|
14295
14398
|
const merged = mergeComponents(userComponents);
|
|
14296
|
-
if (isSearchInDropdown && !userComponents?.Control) {
|
|
14399
|
+
if ((isSearchInDropdown || !searchable && !isMulti) && !userComponents?.Control) {
|
|
14297
14400
|
return { ...merged, Control: StaticControl };
|
|
14298
14401
|
}
|
|
14299
14402
|
return merged;
|
|
14300
|
-
}, [userComponents, isSearchInDropdown]);
|
|
14403
|
+
}, [userComponents, isSearchInDropdown, searchable, isMulti]);
|
|
14301
14404
|
React49.useImperativeHandle(
|
|
14302
14405
|
ref,
|
|
14303
14406
|
() => state.containerRef.current
|
|
14304
14407
|
);
|
|
14305
|
-
const
|
|
14306
|
-
|
|
14307
|
-
|
|
14308
|
-
onInputChangeRef.current?.(state.inputValue);
|
|
14309
|
-
}, [state.inputValue]);
|
|
14310
|
-
const resolvedLabel = label ?? placeholder;
|
|
14408
|
+
const hasLabel = Boolean(label);
|
|
14409
|
+
const resolvedTitle = label ?? placeholder;
|
|
14410
|
+
const accessibleLabel = !hasLabel && typeof placeholder === "string" ? placeholder : void 0;
|
|
14311
14411
|
const hasInvalidState = state.hasInvalidState || Boolean(invalid);
|
|
14312
14412
|
const hiddenValue = isMulti ? selectedOptions.map((item) => String(item.value)).join(",") : selectedOptions[0] ? String(selectedOptions[0].value) : "";
|
|
14313
14413
|
const handleClear = (event) => {
|
|
@@ -14342,10 +14442,12 @@ function SelectInternal(props, ref) {
|
|
|
14342
14442
|
labelId: state.ids.labelId,
|
|
14343
14443
|
valueId: state.ids.valueId,
|
|
14344
14444
|
describedErrorId: state.ids.describedErrorId,
|
|
14445
|
+
accessibleLabel,
|
|
14345
14446
|
getOptionId: state.ids.getOptionId,
|
|
14346
14447
|
inputRef: state.inputRef,
|
|
14347
14448
|
inputValue: state.inputValue,
|
|
14348
14449
|
placeholder,
|
|
14450
|
+
showPlaceholderWhenIdle: !hasLabel,
|
|
14349
14451
|
isMulti,
|
|
14350
14452
|
isOpen: state.isOpen,
|
|
14351
14453
|
isFocused: state.isFocused,
|
|
@@ -14370,6 +14472,7 @@ function SelectInternal(props, ref) {
|
|
|
14370
14472
|
hideIndicator,
|
|
14371
14473
|
autoFocus,
|
|
14372
14474
|
leftIcon,
|
|
14475
|
+
searchable,
|
|
14373
14476
|
components
|
|
14374
14477
|
}
|
|
14375
14478
|
),
|
|
@@ -14385,8 +14488,8 @@ function SelectInternal(props, ref) {
|
|
|
14385
14488
|
readOnly,
|
|
14386
14489
|
htmlFor: state.ids.triggerId,
|
|
14387
14490
|
labelId: state.ids.labelId,
|
|
14388
|
-
legend:
|
|
14389
|
-
label
|
|
14491
|
+
legend: label,
|
|
14492
|
+
label,
|
|
14390
14493
|
tooltip,
|
|
14391
14494
|
onClick: state.handleContainerClick,
|
|
14392
14495
|
labelClassName: leftIcon ? "pl-[28px]" : void 0,
|
|
@@ -14402,7 +14505,7 @@ function SelectInternal(props, ref) {
|
|
|
14402
14505
|
state.closeMenu();
|
|
14403
14506
|
state.setIsFocused(false);
|
|
14404
14507
|
},
|
|
14405
|
-
title:
|
|
14508
|
+
title: resolvedTitle,
|
|
14406
14509
|
className: dropdownClassName,
|
|
14407
14510
|
drawerClassName,
|
|
14408
14511
|
children: [
|
|
@@ -14542,9 +14645,6 @@ var PhoneInput = React50.forwardRef(
|
|
|
14542
14645
|
const safeValue = value ?? EMPTY_VALUE;
|
|
14543
14646
|
const effectiveCode = safeValue.code || defaultCode || "";
|
|
14544
14647
|
const resolvedLabel = label ?? "";
|
|
14545
|
-
const resolvedPrefixLabel = prefixLabel ?? t("prefix");
|
|
14546
|
-
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
14547
|
-
const isCodeBlocked = isBlocked || Boolean(readOnly) || Boolean(codeReadOnly);
|
|
14548
14648
|
const hasExternalError = Boolean(error);
|
|
14549
14649
|
const isPrefixRequired = autoDetectCode && Boolean(safeValue.number) && !effectiveCode;
|
|
14550
14650
|
const hasInvalidState = hasExternalError || Boolean(invalid) || isPrefixRequired;
|
|
@@ -14626,13 +14726,17 @@ var PhoneInput = React50.forwardRef(
|
|
|
14626
14726
|
options: codeOptions,
|
|
14627
14727
|
value: selectedCodeOption,
|
|
14628
14728
|
onChange: handleCodeChange,
|
|
14629
|
-
label:
|
|
14729
|
+
label: prefixLabel,
|
|
14630
14730
|
placeholder: codePlaceholder,
|
|
14631
|
-
disabled
|
|
14731
|
+
disabled,
|
|
14732
|
+
readOnly: Boolean(readOnly) || Boolean(codeReadOnly),
|
|
14632
14733
|
loading,
|
|
14633
14734
|
invalid: hasInvalidState,
|
|
14634
14735
|
hideErrorMessage: true,
|
|
14635
14736
|
searchPosition: searchable ? "dropdown" : "trigger",
|
|
14737
|
+
searchable,
|
|
14738
|
+
filterOption: countriesFilter,
|
|
14739
|
+
clearable: false,
|
|
14636
14740
|
getValueLabel: (option) => option.value,
|
|
14637
14741
|
className: "!max-w-none",
|
|
14638
14742
|
dropdownClassName: "right-auto w-[280px]"
|
|
@@ -14658,7 +14762,9 @@ var PhoneInput = React50.forwardRef(
|
|
|
14658
14762
|
onFocus,
|
|
14659
14763
|
onBlur,
|
|
14660
14764
|
renderErrorMessage: false,
|
|
14661
|
-
wrapperClassName: "!max-w-none"
|
|
14765
|
+
wrapperClassName: "!max-w-none",
|
|
14766
|
+
contentClassName: readOnly ? "!cursor-default" : void 0,
|
|
14767
|
+
inputClassName: readOnly ? "!cursor-default" : void 0
|
|
14662
14768
|
}
|
|
14663
14769
|
)
|
|
14664
14770
|
] }),
|
|
@@ -14937,13 +15043,14 @@ function InfiniteScrollSelectInternal(props, ref) {
|
|
|
14937
15043
|
listHeight = DEFAULT_LIST_HEIGHT,
|
|
14938
15044
|
overscan = DEFAULT_OVERSCAN,
|
|
14939
15045
|
loadMoreThreshold = DEFAULT_LOAD_MORE_THRESHOLD,
|
|
14940
|
-
getFullSearchOption,
|
|
15046
|
+
getFullSearchOption: getFullSearchOptionProp,
|
|
14941
15047
|
filterOption: userFilterOption,
|
|
14942
15048
|
components: userComponents,
|
|
14943
15049
|
onInputChange: userOnInputChange,
|
|
14944
15050
|
isMulti = false,
|
|
14945
15051
|
...rest
|
|
14946
15052
|
} = props;
|
|
15053
|
+
const getFullSearchOption = isMulti ? void 0 : getFullSearchOptionProp;
|
|
14947
15054
|
const isPaginated = canLoadMore !== void 0 || isLoadingMore !== void 0 || loadMoreItems !== void 0 || onSearchChange !== void 0 || getFullSearchOption !== void 0;
|
|
14948
15055
|
const filterOption = userFilterOption ?? (isPaginated ? passthroughFilter : defaultFilterOption);
|
|
14949
15056
|
const [inputValue, setInputValue] = React56.useState("");
|
|
@@ -15095,7 +15202,7 @@ function SelectCheckboxOption(props) {
|
|
|
15095
15202
|
}
|
|
15096
15203
|
|
|
15097
15204
|
// src/dashboard/select-checkboxes/CountTrigger.tsx
|
|
15098
|
-
var
|
|
15205
|
+
var import_lucide_react49 = require("lucide-react");
|
|
15099
15206
|
var import_react_i18next36 = require("react-i18next");
|
|
15100
15207
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
15101
15208
|
function createCountTrigger(opts) {
|
|
@@ -15149,7 +15256,7 @@ function createCountTrigger(opts) {
|
|
|
15149
15256
|
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "pointer-events-none absolute left-0 top-0 flex h-full max-w-10 items-center justify-center text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
|
|
15150
15257
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: display }),
|
|
15151
15258
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
15152
|
-
|
|
15259
|
+
import_lucide_react49.ChevronDown,
|
|
15153
15260
|
{
|
|
15154
15261
|
size: 16,
|
|
15155
15262
|
className: cn(
|
|
@@ -15198,7 +15305,7 @@ function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
|
15198
15305
|
// src/dashboard/select-checkboxes/SelectCheckboxes.tsx
|
|
15199
15306
|
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
15200
15307
|
function hasPaginationProps(props) {
|
|
15201
|
-
return props.canLoadMore !== void 0 || props.isLoadingMore !== void 0 || props.loadMoreItems !== void 0 || props.onSearchChange !== void 0
|
|
15308
|
+
return props.canLoadMore !== void 0 || props.isLoadingMore !== void 0 || props.loadMoreItems !== void 0 || props.onSearchChange !== void 0;
|
|
15202
15309
|
}
|
|
15203
15310
|
function makeTriggerSlot(render) {
|
|
15204
15311
|
function CustomTrigger(props) {
|
|
@@ -15318,6 +15425,7 @@ function SelectCheckboxesInternal(props, ref) {
|
|
|
15318
15425
|
components,
|
|
15319
15426
|
closeMenuOnSelect,
|
|
15320
15427
|
searchPosition: searchable ? "dropdown" : "trigger",
|
|
15428
|
+
searchable,
|
|
15321
15429
|
menuHeader,
|
|
15322
15430
|
onInputChange: handleInputChange,
|
|
15323
15431
|
isMulti: true
|
|
@@ -15558,7 +15666,7 @@ var Textarea = React60.forwardRef(function Textarea2({
|
|
|
15558
15666
|
|
|
15559
15667
|
// src/dashboard/datepicker/Datepicker.tsx
|
|
15560
15668
|
var React62 = __toESM(require("react"), 1);
|
|
15561
|
-
var
|
|
15669
|
+
var import_lucide_react50 = require("lucide-react");
|
|
15562
15670
|
var import_react_i18next39 = require("react-i18next");
|
|
15563
15671
|
|
|
15564
15672
|
// src/airbnb-fields/datepicker/useDatePickerWheel.ts
|
|
@@ -16592,7 +16700,7 @@ var Datepicker = React62.forwardRef(
|
|
|
16592
16700
|
children: [
|
|
16593
16701
|
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)("span", { className: "block min-w-0 flex-1 truncate text-left", children: triggerText ?? (isWheelOpen ? mobilePlaceholder : null) }),
|
|
16594
16702
|
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
16595
|
-
|
|
16703
|
+
import_lucide_react50.ChevronDown,
|
|
16596
16704
|
{
|
|
16597
16705
|
size: 16,
|
|
16598
16706
|
className: cn(
|
|
@@ -16687,7 +16795,7 @@ var Datepicker = React62.forwardRef(
|
|
|
16687
16795
|
}
|
|
16688
16796
|
),
|
|
16689
16797
|
/* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
16690
|
-
|
|
16798
|
+
import_lucide_react50.ChevronDown,
|
|
16691
16799
|
{
|
|
16692
16800
|
size: 14,
|
|
16693
16801
|
onMouseDown: (event) => {
|
|
@@ -17019,7 +17127,7 @@ function resolveRangeSelection({
|
|
|
17019
17127
|
}
|
|
17020
17128
|
|
|
17021
17129
|
// src/dashboard/date-range-picker/components/DateRangeInputs.tsx
|
|
17022
|
-
var
|
|
17130
|
+
var import_lucide_react51 = require("lucide-react");
|
|
17023
17131
|
var import_jsx_runtime174 = require("react/jsx-runtime");
|
|
17024
17132
|
var DEFAULT_PLACEHOLDER = "00-00-0000";
|
|
17025
17133
|
var inputBaseClass = "m-0 box-border h-full w-full min-w-0 border-0 bg-transparent text-[16px] font-medium leading-5 text-[var(--chekin-color-brand-navy)] outline-none placeholder:text-[var(--chekin-color-gray-1)]";
|
|
@@ -17139,7 +17247,7 @@ function DateRangeInputs({
|
|
|
17139
17247
|
onClick: onReset,
|
|
17140
17248
|
className: iconButtonClass,
|
|
17141
17249
|
"aria-label": clearLabel,
|
|
17142
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
17250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_lucide_react51.SquareX, { size: 16, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
|
|
17143
17251
|
}
|
|
17144
17252
|
),
|
|
17145
17253
|
!readOnly && !hideCalendarIcon && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
@@ -17154,7 +17262,7 @@ function DateRangeInputs({
|
|
|
17154
17262
|
focusedInput !== null || isOpen ? "text-[var(--chekin-color-brand-blue)]" : "text-[var(--chekin-color-gray-2)]"
|
|
17155
17263
|
),
|
|
17156
17264
|
"aria-label": openCalendarLabel,
|
|
17157
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
17265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_lucide_react51.CalendarDays, { size: 18 })
|
|
17158
17266
|
}
|
|
17159
17267
|
)
|
|
17160
17268
|
] })
|
|
@@ -17703,7 +17811,7 @@ var TimePicker = React68.forwardRef(function TimePicker2({ format: formatName =
|
|
|
17703
17811
|
|
|
17704
17812
|
// src/dashboard/file-input/FileInput.tsx
|
|
17705
17813
|
var React69 = __toESM(require("react"), 1);
|
|
17706
|
-
var
|
|
17814
|
+
var import_lucide_react52 = require("lucide-react");
|
|
17707
17815
|
var import_react_i18next42 = require("react-i18next");
|
|
17708
17816
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
17709
17817
|
function defaultDownload(url) {
|
|
@@ -17817,7 +17925,7 @@ var FileInput = React69.forwardRef(function FileInput2({
|
|
|
17817
17925
|
className: "inline-flex items-center gap-[7px] truncate border-0 bg-transparent p-0 text-[14px] font-medium text-[var(--chekin-color-brand-navy)] outline-none",
|
|
17818
17926
|
children: [
|
|
17819
17927
|
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)("span", { className: "truncate", children: resolvedDownloadLabel }),
|
|
17820
|
-
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
17928
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_lucide_react52.Download, { size: 15 })
|
|
17821
17929
|
]
|
|
17822
17930
|
}
|
|
17823
17931
|
) : /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("span", { className: "truncate text-[14px] font-medium text-[var(--chekin-color-brand-navy)]", children: value.name }),
|
|
@@ -17829,13 +17937,13 @@ var FileInput = React69.forwardRef(function FileInput2({
|
|
|
17829
17937
|
onClick: handleClear,
|
|
17830
17938
|
className: "ml-2 flex h-[15px] w-[15px] items-center justify-center rounded-[3px] border-0 bg-transparent p-0 text-[#9696b9] outline-none hover:shadow-[0_3px_3px_#0f477734]",
|
|
17831
17939
|
"aria-label": t("remove_file"),
|
|
17832
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
17940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_lucide_react52.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
|
|
17833
17941
|
}
|
|
17834
17942
|
)
|
|
17835
17943
|
]
|
|
17836
17944
|
}
|
|
17837
17945
|
) : /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("span", { className: "block min-w-0 flex-1 truncate text-left text-[var(--chekin-color-gray-1)]", children: placeholder ?? "" }),
|
|
17838
|
-
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)("span", { className: "ml-auto flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
|
|
17946
|
+
/* @__PURE__ */ (0, import_jsx_runtime179.jsx)("span", { className: "ml-auto flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_lucide_react52.Paperclip, { size: 20 }) })
|
|
17839
17947
|
]
|
|
17840
17948
|
}
|
|
17841
17949
|
),
|
|
@@ -18090,11 +18198,11 @@ LegacyTextarea.displayName = "LegacyTextarea";
|
|
|
18090
18198
|
|
|
18091
18199
|
// src/airbnb-fields/datepicker/DatePicker.tsx
|
|
18092
18200
|
var React72 = __toESM(require("react"), 1);
|
|
18093
|
-
var
|
|
18201
|
+
var import_lucide_react54 = require("lucide-react");
|
|
18094
18202
|
|
|
18095
18203
|
// src/airbnb-fields/field-trigger/FieldTrigger.tsx
|
|
18096
18204
|
var React71 = __toESM(require("react"), 1);
|
|
18097
|
-
var
|
|
18205
|
+
var import_lucide_react53 = require("lucide-react");
|
|
18098
18206
|
var import_react_i18next43 = require("react-i18next");
|
|
18099
18207
|
var import_jsx_runtime183 = require("react/jsx-runtime");
|
|
18100
18208
|
var AirbnbFieldTrigger = React71.forwardRef(
|
|
@@ -18158,7 +18266,7 @@ var AirbnbFieldTrigger = React71.forwardRef(
|
|
|
18158
18266
|
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)("span", { className: "flex items-center gap-2", children: [
|
|
18159
18267
|
trailingAdornment,
|
|
18160
18268
|
loading && /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
|
|
18161
|
-
|
|
18269
|
+
import_lucide_react53.Loader2,
|
|
18162
18270
|
{
|
|
18163
18271
|
"aria-hidden": "true",
|
|
18164
18272
|
className: "h-5 w-5 animate-spin text-[var(--chekin-color-gray-1)]"
|
|
@@ -18414,7 +18522,7 @@ var AirbnbDatePicker = React72.forwardRef(
|
|
|
18414
18522
|
onClick: handleTriggerClick,
|
|
18415
18523
|
onKeyDown: handleTriggerKeyDown,
|
|
18416
18524
|
onBlur,
|
|
18417
|
-
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
18525
|
+
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(import_lucide_react54.Calendar, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
|
|
18418
18526
|
}
|
|
18419
18527
|
),
|
|
18420
18528
|
/* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
|
|
@@ -18452,7 +18560,7 @@ AirbnbDatePicker.displayName = "AirbnbDatePicker";
|
|
|
18452
18560
|
|
|
18453
18561
|
// src/airbnb-fields/input/Input.tsx
|
|
18454
18562
|
var React73 = __toESM(require("react"), 1);
|
|
18455
|
-
var
|
|
18563
|
+
var import_lucide_react55 = require("lucide-react");
|
|
18456
18564
|
var import_react_i18next44 = require("react-i18next");
|
|
18457
18565
|
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
18458
18566
|
var getInputValue = (value) => value != null ? String(value) : "";
|
|
@@ -18617,7 +18725,7 @@ var AirbnbInput = React73.forwardRef(
|
|
|
18617
18725
|
className: "absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center border-0 bg-transparent p-0 text-[#7A8399] hover:text-[#1F1F1B] hover:opacity-85 disabled:cursor-not-allowed disabled:opacity-50",
|
|
18618
18726
|
"aria-label": isPasswordRevealed ? t("hide_password") : t("show_password"),
|
|
18619
18727
|
children: /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
|
|
18620
|
-
|
|
18728
|
+
import_lucide_react55.Eye,
|
|
18621
18729
|
{
|
|
18622
18730
|
size: 18,
|
|
18623
18731
|
"aria-hidden": "true",
|
|
@@ -18635,7 +18743,7 @@ AirbnbInput.displayName = "AirbnbInput";
|
|
|
18635
18743
|
|
|
18636
18744
|
// src/airbnb-fields/phone-field/PhoneField.tsx
|
|
18637
18745
|
var React79 = __toESM(require("react"), 1);
|
|
18638
|
-
var
|
|
18746
|
+
var import_lucide_react57 = require("lucide-react");
|
|
18639
18747
|
|
|
18640
18748
|
// src/airbnb-fields/select/Select.tsx
|
|
18641
18749
|
var React78 = __toESM(require("react"), 1);
|
|
@@ -18984,7 +19092,7 @@ function AirbnbSelectMobileContent({
|
|
|
18984
19092
|
|
|
18985
19093
|
// src/airbnb-fields/select/SelectTrigger.tsx
|
|
18986
19094
|
var React74 = __toESM(require("react"), 1);
|
|
18987
|
-
var
|
|
19095
|
+
var import_lucide_react56 = require("lucide-react");
|
|
18988
19096
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
18989
19097
|
var AirbnbSelectTrigger = React74.forwardRef(
|
|
18990
19098
|
({
|
|
@@ -19039,7 +19147,7 @@ var AirbnbSelectTrigger = React74.forwardRef(
|
|
|
19039
19147
|
onKeyDown,
|
|
19040
19148
|
onBlur,
|
|
19041
19149
|
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
19042
|
-
|
|
19150
|
+
import_lucide_react56.ChevronDown,
|
|
19043
19151
|
{
|
|
19044
19152
|
className: open ? "h-6 w-6 rotate-180 text-[#1F1F1B] transition-transform" : "h-6 w-6 text-[#1F1F1B] transition-transform"
|
|
19045
19153
|
}
|
|
@@ -19823,7 +19931,7 @@ var AirbnbPhoneField = React79.forwardRef(
|
|
|
19823
19931
|
children: [
|
|
19824
19932
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)("span", { children: valueLabel ?? codePlaceholder }),
|
|
19825
19933
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
19826
|
-
|
|
19934
|
+
import_lucide_react57.ChevronDown,
|
|
19827
19935
|
{
|
|
19828
19936
|
className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
|
|
19829
19937
|
strokeWidth: 2
|
|
@@ -19871,7 +19979,7 @@ AirbnbPhoneField.displayName = "AirbnbPhoneField";
|
|
|
19871
19979
|
|
|
19872
19980
|
// src/airbnb-fields/searchable-select/SearchableSelect.tsx
|
|
19873
19981
|
var React80 = __toESM(require("react"), 1);
|
|
19874
|
-
var
|
|
19982
|
+
var import_lucide_react58 = require("lucide-react");
|
|
19875
19983
|
var import_react_virtual3 = require("@tanstack/react-virtual");
|
|
19876
19984
|
var import_react91 = require("react");
|
|
19877
19985
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
@@ -20107,7 +20215,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
20107
20215
|
onKeyDown: handleTriggerKeyDown,
|
|
20108
20216
|
onBlur,
|
|
20109
20217
|
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
20110
|
-
|
|
20218
|
+
import_lucide_react58.ChevronDown,
|
|
20111
20219
|
{
|
|
20112
20220
|
className: cn(
|
|
20113
20221
|
"h-6 w-6 text-[#1F1F1B] transition-transform",
|
|
@@ -20205,7 +20313,7 @@ function AirbnbSearchableSelectContent({
|
|
|
20205
20313
|
return /* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { className: "p-2", children: [
|
|
20206
20314
|
/* @__PURE__ */ (0, import_jsx_runtime193.jsxs)("div", { className: "relative mb-2", children: [
|
|
20207
20315
|
/* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
20208
|
-
|
|
20316
|
+
import_lucide_react58.Search,
|
|
20209
20317
|
{
|
|
20210
20318
|
"aria-hidden": "true",
|
|
20211
20319
|
className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[#9696B9]"
|
|
@@ -20315,13 +20423,13 @@ function getNextEnabledIndex(options, startIndex, step) {
|
|
|
20315
20423
|
// src/airbnb-fields/search-input/SearchInput.tsx
|
|
20316
20424
|
var React81 = __toESM(require("react"), 1);
|
|
20317
20425
|
var import_react_i18next45 = require("react-i18next");
|
|
20318
|
-
var
|
|
20426
|
+
var import_lucide_react59 = require("lucide-react");
|
|
20319
20427
|
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
20320
20428
|
var AirbnbSearchInput = React81.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
20321
20429
|
const { t } = (0, import_react_i18next45.useTranslation)();
|
|
20322
20430
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
20323
20431
|
return /* @__PURE__ */ (0, import_jsx_runtime194.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
20324
|
-
/* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
|
|
20432
|
+
/* @__PURE__ */ (0, import_jsx_runtime194.jsx)(import_lucide_react59.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
20325
20433
|
/* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
|
|
20326
20434
|
"input",
|
|
20327
20435
|
{
|
|
@@ -20347,7 +20455,7 @@ var AirbnbSearchInput = React81.forwardRef(({ onReset, placeholder, wrapperClass
|
|
|
20347
20455
|
variant: "ghost",
|
|
20348
20456
|
onClick: onReset,
|
|
20349
20457
|
className: "absolute right-0 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]",
|
|
20350
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(
|
|
20458
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime194.jsx)(import_lucide_react59.X, { className: "h-5 w-5" })
|
|
20351
20459
|
}
|
|
20352
20460
|
)
|
|
20353
20461
|
] });
|
|
@@ -20357,7 +20465,7 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
20357
20465
|
// src/airbnb-fields/switch/Switch.tsx
|
|
20358
20466
|
var React82 = __toESM(require("react"), 1);
|
|
20359
20467
|
var SwitchPrimitives2 = __toESM(require("@radix-ui/react-switch"), 1);
|
|
20360
|
-
var
|
|
20468
|
+
var import_lucide_react60 = require("lucide-react");
|
|
20361
20469
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
20362
20470
|
var AirbnbSwitch = React82.forwardRef(
|
|
20363
20471
|
({
|
|
@@ -20403,7 +20511,7 @@ var AirbnbSwitch = React82.forwardRef(
|
|
|
20403
20511
|
"data-[state=checked]:translate-x-[12px] data-[state=unchecked]:translate-x-0"
|
|
20404
20512
|
),
|
|
20405
20513
|
children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(
|
|
20406
|
-
|
|
20514
|
+
import_lucide_react60.Check,
|
|
20407
20515
|
{
|
|
20408
20516
|
"aria-hidden": "true",
|
|
20409
20517
|
className: "h-3 w-3 text-[#222222] opacity-0 transition-opacity duration-150 group-data-[state=checked]:opacity-100",
|
|
@@ -20754,6 +20862,7 @@ AirbnbSwitch.displayName = "AirbnbSwitch";
|
|
|
20754
20862
|
compressFile,
|
|
20755
20863
|
compressImage,
|
|
20756
20864
|
copyToClipboard,
|
|
20865
|
+
countriesFilter,
|
|
20757
20866
|
createDisabledMatchers,
|
|
20758
20867
|
emptyMediaVariants,
|
|
20759
20868
|
findPhoneCode,
|