@chekinapp/ui 0.0.105 → 0.0.107
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 +107 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +174 -139
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -12081,6 +12081,7 @@ var checkIfEmpty = ({
|
|
|
12081
12081
|
if (value === 0 || defaultValue === 0) return false;
|
|
12082
12082
|
return !value && !defaultValue;
|
|
12083
12083
|
};
|
|
12084
|
+
var checkInputValueIfEmpty = (value) => value.length === 0;
|
|
12084
12085
|
var DashboardInput = React43.forwardRef(
|
|
12085
12086
|
({
|
|
12086
12087
|
value,
|
|
@@ -12123,10 +12124,15 @@ var DashboardInput = React43.forwardRef(
|
|
|
12123
12124
|
const inputId = id ?? name ?? generatedId;
|
|
12124
12125
|
const errorId = `${inputId}-error`;
|
|
12125
12126
|
const { t } = useTranslation26();
|
|
12126
|
-
const
|
|
12127
|
+
const isEmptyControlled = typeof empty !== "undefined" || typeof value !== "undefined";
|
|
12128
|
+
const propsAreEmpty = checkIfEmpty({ empty, value, defaultValue });
|
|
12129
|
+
const [uncontrolledIsEmpty, setUncontrolledIsEmpty] = React43.useState(propsAreEmpty);
|
|
12130
|
+
const isEmpty = isEmptyControlled ? propsAreEmpty : uncontrolledIsEmpty;
|
|
12127
12131
|
const [inputType, setInputType] = React43.useState(type);
|
|
12128
12132
|
const [isPasswordRevealed, setIsPasswordRevealed] = React43.useState(false);
|
|
12129
12133
|
const [isFocused, setIsFocused] = React43.useState(false);
|
|
12134
|
+
const inputRef = React43.useRef(null);
|
|
12135
|
+
const combinedInputRef = useCombinedRef(inputRef, ref);
|
|
12130
12136
|
const prevInputType = usePrevious(inputType);
|
|
12131
12137
|
const isPasswordReveal = (prevInputType === "password" || type === "password") && !isEmpty;
|
|
12132
12138
|
const hasInvalidState = Boolean(invalid) || Boolean(error) && error !== "NONE";
|
|
@@ -12144,12 +12150,15 @@ var DashboardInput = React43.forwardRef(
|
|
|
12144
12150
|
setInputType(type);
|
|
12145
12151
|
}, [type]);
|
|
12146
12152
|
const handleChange = (event) => {
|
|
12147
|
-
if (readOnly || disabled
|
|
12148
|
-
|
|
12153
|
+
if (readOnly || disabled) return;
|
|
12154
|
+
if (!isEmptyControlled) {
|
|
12155
|
+
setUncontrolledIsEmpty(checkInputValueIfEmpty(event.currentTarget.value));
|
|
12156
|
+
}
|
|
12157
|
+
onChange?.(event);
|
|
12149
12158
|
};
|
|
12150
12159
|
const handleLabelClick = () => {
|
|
12151
|
-
if (readOnly || disabled) return;
|
|
12152
|
-
|
|
12160
|
+
if (readOnly || disabled || loading) return;
|
|
12161
|
+
inputRef.current?.focus();
|
|
12153
12162
|
};
|
|
12154
12163
|
const handleFocus = (event) => {
|
|
12155
12164
|
if (readOnly || disabled) return;
|
|
@@ -12166,7 +12175,7 @@ var DashboardInput = React43.forwardRef(
|
|
|
12166
12175
|
"div",
|
|
12167
12176
|
{
|
|
12168
12177
|
className: cn(
|
|
12169
|
-
"relative block w-full
|
|
12178
|
+
"relative block w-full max-w-[var(--field-max-width,296px)] min-h-[68px]",
|
|
12170
12179
|
disabled && "cursor-not-allowed opacity-50",
|
|
12171
12180
|
loading && "cursor-progress opacity-50",
|
|
12172
12181
|
wrapperClassName,
|
|
@@ -12217,7 +12226,7 @@ var DashboardInput = React43.forwardRef(
|
|
|
12217
12226
|
"input",
|
|
12218
12227
|
{
|
|
12219
12228
|
...props,
|
|
12220
|
-
ref,
|
|
12229
|
+
ref: combinedInputRef,
|
|
12221
12230
|
id: inputId,
|
|
12222
12231
|
name,
|
|
12223
12232
|
type: inputType,
|
|
@@ -12366,7 +12375,7 @@ function SelectFieldShell({
|
|
|
12366
12375
|
ref: containerRef,
|
|
12367
12376
|
onBlur,
|
|
12368
12377
|
className: cn(
|
|
12369
|
-
"relative w-full max-w-[var(--max-
|
|
12378
|
+
"relative w-full max-w-[var(--field-max-width,296px)]",
|
|
12370
12379
|
disabled && "cursor-not-allowed opacity-50",
|
|
12371
12380
|
loading && "cursor-progress",
|
|
12372
12381
|
className
|
|
@@ -12581,7 +12590,8 @@ function SelectMenuPanel({
|
|
|
12581
12590
|
}
|
|
12582
12591
|
|
|
12583
12592
|
// src/dashboard/_select-internals/SelectSearchInput.tsx
|
|
12584
|
-
import {
|
|
12593
|
+
import { Search as Search3 } from "lucide-react";
|
|
12594
|
+
import { jsx as jsx147, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
12585
12595
|
function SelectSearchInput({
|
|
12586
12596
|
inputRef,
|
|
12587
12597
|
value,
|
|
@@ -12591,26 +12601,35 @@ function SelectSearchInput({
|
|
|
12591
12601
|
onChange,
|
|
12592
12602
|
onKeyDown
|
|
12593
12603
|
}) {
|
|
12594
|
-
return /* @__PURE__ */ jsx147("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12604
|
+
return /* @__PURE__ */ jsx147("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ jsxs94("div", { className: "relative", children: [
|
|
12605
|
+
/* @__PURE__ */ jsx147(
|
|
12606
|
+
Search3,
|
|
12607
|
+
{
|
|
12608
|
+
"aria-hidden": "true",
|
|
12609
|
+
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--chekin-color-gray-2)]"
|
|
12610
|
+
}
|
|
12611
|
+
),
|
|
12612
|
+
/* @__PURE__ */ jsx147(
|
|
12613
|
+
"input",
|
|
12614
|
+
{
|
|
12615
|
+
ref: inputRef,
|
|
12616
|
+
type: "text",
|
|
12617
|
+
value,
|
|
12618
|
+
placeholder,
|
|
12619
|
+
onChange,
|
|
12620
|
+
onKeyDown,
|
|
12621
|
+
autoComplete: "off",
|
|
12622
|
+
"aria-controls": listboxId,
|
|
12623
|
+
"aria-activedescendant": activeOptionId,
|
|
12624
|
+
className: "m-0 box-border h-9 w-full rounded-md border border-[var(--chekin-color-gray-3)] bg-white px-9 text-[16px] font-medium text-[var(--chekin-color-brand-navy)] outline-none transition-colors placeholder:text-[var(--chekin-color-gray-1)] focus:border-[var(--chekin-color-brand-blue)]"
|
|
12625
|
+
}
|
|
12626
|
+
)
|
|
12627
|
+
] }) });
|
|
12609
12628
|
}
|
|
12610
12629
|
|
|
12611
12630
|
// src/dashboard/_select-internals/SelectTrigger.tsx
|
|
12612
12631
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
12613
|
-
import { jsx as jsx148, jsxs as
|
|
12632
|
+
import { jsx as jsx148, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
12614
12633
|
function SelectTrigger({
|
|
12615
12634
|
triggerRef,
|
|
12616
12635
|
triggerId,
|
|
@@ -12631,7 +12650,7 @@ function SelectTrigger({
|
|
|
12631
12650
|
onBlur
|
|
12632
12651
|
}) {
|
|
12633
12652
|
const isEmpty = !hasValue;
|
|
12634
|
-
return /* @__PURE__ */
|
|
12653
|
+
return /* @__PURE__ */ jsxs95(
|
|
12635
12654
|
"button",
|
|
12636
12655
|
{
|
|
12637
12656
|
id: triggerId,
|
|
@@ -12656,7 +12675,7 @@ function SelectTrigger({
|
|
|
12656
12675
|
),
|
|
12657
12676
|
children: [
|
|
12658
12677
|
/* @__PURE__ */ jsx148("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: valueLabel ?? (isOpen ? placeholder : null) }),
|
|
12659
|
-
/* @__PURE__ */
|
|
12678
|
+
/* @__PURE__ */ jsxs95("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
12660
12679
|
loading && /* @__PURE__ */ jsx148(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
12661
12680
|
/* @__PURE__ */ jsx148(
|
|
12662
12681
|
ChevronDown2,
|
|
@@ -12759,7 +12778,7 @@ function useSelectSearch({
|
|
|
12759
12778
|
}
|
|
12760
12779
|
|
|
12761
12780
|
// src/dashboard/select/Select.tsx
|
|
12762
|
-
import { jsx as jsx149, jsxs as
|
|
12781
|
+
import { jsx as jsx149, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
12763
12782
|
function DashboardSelectInternal({
|
|
12764
12783
|
options = [],
|
|
12765
12784
|
value,
|
|
@@ -12883,7 +12902,7 @@ function DashboardSelectInternal({
|
|
|
12883
12902
|
setIsOpen(false);
|
|
12884
12903
|
}
|
|
12885
12904
|
};
|
|
12886
|
-
return /* @__PURE__ */
|
|
12905
|
+
return /* @__PURE__ */ jsxs96(
|
|
12887
12906
|
SelectFieldShell,
|
|
12888
12907
|
{
|
|
12889
12908
|
containerRef,
|
|
@@ -12940,7 +12959,7 @@ function DashboardSelectInternal({
|
|
|
12940
12959
|
onClick: !isBlocked ? toggleMenu : void 0
|
|
12941
12960
|
}
|
|
12942
12961
|
),
|
|
12943
|
-
/* @__PURE__ */
|
|
12962
|
+
/* @__PURE__ */ jsxs96(
|
|
12944
12963
|
SelectMenuPanel,
|
|
12945
12964
|
{
|
|
12946
12965
|
isOpen,
|
|
@@ -12996,13 +13015,13 @@ var DashboardSelect = React47.forwardRef(
|
|
|
12996
13015
|
|
|
12997
13016
|
// src/dashboard/multi-select/MultiSelect.tsx
|
|
12998
13017
|
import * as React48 from "react";
|
|
12999
|
-
import { SquareX as SquareX3 } from "lucide-react";
|
|
13018
|
+
import { Search as Search4, SquareX as SquareX3 } from "lucide-react";
|
|
13000
13019
|
import { useTranslation as useTranslation32 } from "react-i18next";
|
|
13001
13020
|
|
|
13002
13021
|
// src/dashboard/multi-select/MultiSelectChip.tsx
|
|
13003
13022
|
import { SquareX as SquareX2 } from "lucide-react";
|
|
13004
13023
|
import { useTranslation as useTranslation31 } from "react-i18next";
|
|
13005
|
-
import { jsx as jsx150, jsxs as
|
|
13024
|
+
import { jsx as jsx150, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
13006
13025
|
function MultiSelectChip({
|
|
13007
13026
|
option,
|
|
13008
13027
|
readOnly,
|
|
@@ -13010,7 +13029,7 @@ function MultiSelectChip({
|
|
|
13010
13029
|
}) {
|
|
13011
13030
|
const { t } = useTranslation31();
|
|
13012
13031
|
const labelText = typeof option.label === "string" ? option.label : String(option.value);
|
|
13013
|
-
return /* @__PURE__ */
|
|
13032
|
+
return /* @__PURE__ */ jsxs97("span", { className: "inline-flex items-center gap-2 rounded-[4px] border border-[#acacd5] bg-[#f0f0f8] py-[2px] pl-[10px] pr-1 text-[12px] font-medium text-[var(--chekin-color-brand-navy)]", children: [
|
|
13014
13033
|
/* @__PURE__ */ jsx150("span", { className: "whitespace-nowrap", children: option.label }),
|
|
13015
13034
|
!readOnly && /* @__PURE__ */ jsx150(
|
|
13016
13035
|
"button",
|
|
@@ -13029,7 +13048,7 @@ function MultiSelectChip({
|
|
|
13029
13048
|
}
|
|
13030
13049
|
|
|
13031
13050
|
// src/dashboard/multi-select/MultiSelect.tsx
|
|
13032
|
-
import { jsx as jsx151, jsxs as
|
|
13051
|
+
import { jsx as jsx151, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
13033
13052
|
var isValueSelected = (selected, option) => selected.some((item) => item.value === option.value);
|
|
13034
13053
|
function DashboardMultiSelectInternal({
|
|
13035
13054
|
options = [],
|
|
@@ -13224,7 +13243,7 @@ function DashboardMultiSelectInternal({
|
|
|
13224
13243
|
setIsFocused(false);
|
|
13225
13244
|
onBlur?.(event);
|
|
13226
13245
|
};
|
|
13227
|
-
return /* @__PURE__ */
|
|
13246
|
+
return /* @__PURE__ */ jsxs98(
|
|
13228
13247
|
SelectFieldShell,
|
|
13229
13248
|
{
|
|
13230
13249
|
containerRef,
|
|
@@ -13243,7 +13262,7 @@ function DashboardMultiSelectInternal({
|
|
|
13243
13262
|
hiddenValue: selectedValues.map((item) => String(item.value)).join(","),
|
|
13244
13263
|
onBlur: handleInputBlur,
|
|
13245
13264
|
children: [
|
|
13246
|
-
/* @__PURE__ */
|
|
13265
|
+
/* @__PURE__ */ jsxs98(
|
|
13247
13266
|
"div",
|
|
13248
13267
|
{
|
|
13249
13268
|
id: triggerId,
|
|
@@ -13276,6 +13295,13 @@ function DashboardMultiSelectInternal({
|
|
|
13276
13295
|
String(option.value)
|
|
13277
13296
|
)
|
|
13278
13297
|
),
|
|
13298
|
+
/* @__PURE__ */ jsx151(
|
|
13299
|
+
Search4,
|
|
13300
|
+
{
|
|
13301
|
+
"aria-hidden": "true",
|
|
13302
|
+
className: "h-4 w-4 shrink-0 text-[var(--chekin-color-gray-2)]"
|
|
13303
|
+
}
|
|
13304
|
+
),
|
|
13279
13305
|
/* @__PURE__ */ jsx151(
|
|
13280
13306
|
"input",
|
|
13281
13307
|
{
|
|
@@ -13305,7 +13331,7 @@ function DashboardMultiSelectInternal({
|
|
|
13305
13331
|
"aria-activedescendant": isOpen && highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0
|
|
13306
13332
|
}
|
|
13307
13333
|
),
|
|
13308
|
-
/* @__PURE__ */
|
|
13334
|
+
/* @__PURE__ */ jsxs98("span", { className: "ml-auto flex items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
13309
13335
|
loading && /* @__PURE__ */ jsx151(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
13310
13336
|
hasValue && !readOnly && /* @__PURE__ */ jsx151(
|
|
13311
13337
|
"button",
|
|
@@ -13351,7 +13377,7 @@ function DashboardMultiSelectInternal({
|
|
|
13351
13377
|
onClick: handleContainerClick
|
|
13352
13378
|
}
|
|
13353
13379
|
),
|
|
13354
|
-
/* @__PURE__ */
|
|
13380
|
+
/* @__PURE__ */ jsxs98(
|
|
13355
13381
|
SelectMenuPanel,
|
|
13356
13382
|
{
|
|
13357
13383
|
isOpen,
|
|
@@ -13364,21 +13390,30 @@ function DashboardMultiSelectInternal({
|
|
|
13364
13390
|
className: dropdownClassName,
|
|
13365
13391
|
drawerClassName,
|
|
13366
13392
|
children: [
|
|
13367
|
-
isMobile3 && /* @__PURE__ */ jsx151("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
|
|
13377
|
-
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
|
|
13381
|
-
|
|
13393
|
+
isMobile3 && /* @__PURE__ */ jsx151("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ jsxs98("div", { className: "relative", children: [
|
|
13394
|
+
/* @__PURE__ */ jsx151(
|
|
13395
|
+
Search4,
|
|
13396
|
+
{
|
|
13397
|
+
"aria-hidden": "true",
|
|
13398
|
+
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--chekin-color-gray-2)]"
|
|
13399
|
+
}
|
|
13400
|
+
),
|
|
13401
|
+
/* @__PURE__ */ jsx151(
|
|
13402
|
+
"input",
|
|
13403
|
+
{
|
|
13404
|
+
ref: mobileSearchInputRef,
|
|
13405
|
+
type: "text",
|
|
13406
|
+
value: searchValue,
|
|
13407
|
+
placeholder: placeholder ?? "",
|
|
13408
|
+
onChange: (event) => setSearchValue(event.target.value),
|
|
13409
|
+
onKeyDown: handleInputKeyDown,
|
|
13410
|
+
autoComplete: "off",
|
|
13411
|
+
"aria-controls": listboxId,
|
|
13412
|
+
"aria-activedescendant": highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0,
|
|
13413
|
+
className: "m-0 box-border h-9 w-full rounded-md border border-[var(--chekin-color-gray-3)] bg-white px-9 text-[16px] font-medium text-[var(--chekin-color-brand-navy)] outline-none transition-colors placeholder:text-[var(--chekin-color-gray-1)] focus:border-[var(--chekin-color-brand-blue)]"
|
|
13414
|
+
}
|
|
13415
|
+
)
|
|
13416
|
+
] }) }),
|
|
13382
13417
|
/* @__PURE__ */ jsx151(
|
|
13383
13418
|
SelectMenu,
|
|
13384
13419
|
{
|
|
@@ -13436,7 +13471,7 @@ import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
|
13436
13471
|
import { useTranslation as useTranslation33 } from "react-i18next";
|
|
13437
13472
|
|
|
13438
13473
|
// src/dashboard/infinite-scroll-select/InfiniteScrollList.tsx
|
|
13439
|
-
import { jsx as jsx153, jsxs as
|
|
13474
|
+
import { jsx as jsx153, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
13440
13475
|
function InfiniteScrollList({
|
|
13441
13476
|
scrollRef,
|
|
13442
13477
|
listboxId,
|
|
@@ -13489,10 +13524,10 @@ function InfiniteScrollList({
|
|
|
13489
13524
|
height: `${virtualItem.size}px`,
|
|
13490
13525
|
transform: `translateY(${virtualItem.start}px)`
|
|
13491
13526
|
},
|
|
13492
|
-
children: isLoaderRow ? /* @__PURE__ */
|
|
13527
|
+
children: isLoaderRow ? /* @__PURE__ */ jsxs99("div", { className: "flex h-full items-center justify-center gap-2 px-4 text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: [
|
|
13493
13528
|
/* @__PURE__ */ jsx153(ThreeDotsLoader, { height: 36, width: 36 }),
|
|
13494
13529
|
/* @__PURE__ */ jsx153("span", { children: loadingMoreText })
|
|
13495
|
-
] }) : /* @__PURE__ */
|
|
13530
|
+
] }) : /* @__PURE__ */ jsxs99(
|
|
13496
13531
|
"button",
|
|
13497
13532
|
{
|
|
13498
13533
|
id: getOptionId2(virtualItem.index),
|
|
@@ -13527,7 +13562,7 @@ function InfiniteScrollList({
|
|
|
13527
13562
|
}
|
|
13528
13563
|
|
|
13529
13564
|
// src/dashboard/infinite-scroll-select/InfiniteScrollSelect.tsx
|
|
13530
|
-
import { jsx as jsx154, jsxs as
|
|
13565
|
+
import { jsx as jsx154, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
13531
13566
|
var DEFAULT_ITEM_HEIGHT = 60;
|
|
13532
13567
|
var DEFAULT_LIST_HEIGHT = 322;
|
|
13533
13568
|
var DEFAULT_OVERSCAN = 5;
|
|
@@ -13700,7 +13735,7 @@ function DashboardInfiniteScrollSelectInternal({
|
|
|
13700
13735
|
const totalSize = virtualizer.getTotalSize();
|
|
13701
13736
|
const measuredListHeight = Math.min(listHeight, Math.max(totalSize, itemHeight));
|
|
13702
13737
|
const activeOptionId = highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0;
|
|
13703
|
-
return /* @__PURE__ */
|
|
13738
|
+
return /* @__PURE__ */ jsxs100(
|
|
13704
13739
|
SelectFieldShell,
|
|
13705
13740
|
{
|
|
13706
13741
|
containerRef,
|
|
@@ -13757,7 +13792,7 @@ function DashboardInfiniteScrollSelectInternal({
|
|
|
13757
13792
|
onClick: !isBlocked ? toggleMenu : void 0
|
|
13758
13793
|
}
|
|
13759
13794
|
),
|
|
13760
|
-
/* @__PURE__ */
|
|
13795
|
+
/* @__PURE__ */ jsxs100(
|
|
13761
13796
|
SelectMenuPanel,
|
|
13762
13797
|
{
|
|
13763
13798
|
isOpen,
|
|
@@ -13779,7 +13814,7 @@ function DashboardInfiniteScrollSelectInternal({
|
|
|
13779
13814
|
onKeyDown: handleSearchKeyDown
|
|
13780
13815
|
}
|
|
13781
13816
|
),
|
|
13782
|
-
filteredOptions.length === 0 && isLoadingMore ? /* @__PURE__ */
|
|
13817
|
+
filteredOptions.length === 0 && isLoadingMore ? /* @__PURE__ */ jsxs100("div", { className: "flex items-center justify-center gap-2 px-4 py-[20px] text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: [
|
|
13783
13818
|
/* @__PURE__ */ jsx154(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
13784
13819
|
/* @__PURE__ */ jsx154("span", { children: resolvedLoadingMoreText })
|
|
13785
13820
|
] }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx154("div", { className: "px-4 py-[20px] text-left text-[16px] text-[var(--chekin-color-brand-navy)]", children: emptyMessage ?? t("no_options") }) : /* @__PURE__ */ jsx154(
|
|
@@ -13818,7 +13853,7 @@ var DashboardInfiniteScrollSelect = React50.forwardRef(
|
|
|
13818
13853
|
// src/dashboard/textarea/Textarea.tsx
|
|
13819
13854
|
import * as React51 from "react";
|
|
13820
13855
|
import { useTranslation as useTranslation34 } from "react-i18next";
|
|
13821
|
-
import { jsx as jsx155, jsxs as
|
|
13856
|
+
import { jsx as jsx155, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
13822
13857
|
var LINE_HEIGHT = 20;
|
|
13823
13858
|
var VERTICAL_PADDING = 32;
|
|
13824
13859
|
function getEmptyState(empty, value, defaultValue) {
|
|
@@ -13875,17 +13910,17 @@ var DashboardTextarea = React51.forwardRef(
|
|
|
13875
13910
|
resize();
|
|
13876
13911
|
onInput?.(event);
|
|
13877
13912
|
};
|
|
13878
|
-
return /* @__PURE__ */
|
|
13913
|
+
return /* @__PURE__ */ jsxs101(
|
|
13879
13914
|
"div",
|
|
13880
13915
|
{
|
|
13881
13916
|
className: cn(
|
|
13882
|
-
"relative block min-h-[88px] w-full",
|
|
13917
|
+
"relative block min-h-[88px] w-full max-w-[var(--field-max-width,296px)]",
|
|
13883
13918
|
isBlocked && "cursor-not-allowed opacity-50",
|
|
13884
13919
|
loading && "cursor-progress opacity-50",
|
|
13885
13920
|
className
|
|
13886
13921
|
),
|
|
13887
13922
|
children: [
|
|
13888
|
-
label && /* @__PURE__ */
|
|
13923
|
+
label && /* @__PURE__ */ jsxs101(
|
|
13889
13924
|
"label",
|
|
13890
13925
|
{
|
|
13891
13926
|
htmlFor: textareaId,
|
|
@@ -14368,7 +14403,7 @@ function useDatePickerWheel({
|
|
|
14368
14403
|
}
|
|
14369
14404
|
|
|
14370
14405
|
// src/airbnb-fields/datepicker/DatePickerWheelColumn.tsx
|
|
14371
|
-
import { jsx as jsx156, jsxs as
|
|
14406
|
+
import { jsx as jsx156, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14372
14407
|
var spacerHeight = DATE_PICKER_OPTION_HEIGHT * DATE_PICKER_WHEEL_BUFFER_OPTIONS;
|
|
14373
14408
|
function AirbnbDatePickerWheelColumn({
|
|
14374
14409
|
id,
|
|
@@ -14382,7 +14417,7 @@ function AirbnbDatePickerWheelColumn({
|
|
|
14382
14417
|
onOptionSelect,
|
|
14383
14418
|
column
|
|
14384
14419
|
}) {
|
|
14385
|
-
return /* @__PURE__ */ jsx156("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */
|
|
14420
|
+
return /* @__PURE__ */ jsx156("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */ jsxs102(
|
|
14386
14421
|
"div",
|
|
14387
14422
|
{
|
|
14388
14423
|
id,
|
|
@@ -14429,7 +14464,7 @@ function AirbnbDatePickerWheelColumn({
|
|
|
14429
14464
|
}
|
|
14430
14465
|
|
|
14431
14466
|
// src/airbnb-fields/datepicker/DatePickerContent.tsx
|
|
14432
|
-
import { jsx as jsx157, jsxs as
|
|
14467
|
+
import { jsx as jsx157, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
14433
14468
|
function AirbnbDatePickerBody({
|
|
14434
14469
|
baseId,
|
|
14435
14470
|
label,
|
|
@@ -14451,8 +14486,8 @@ function AirbnbDatePickerBody({
|
|
|
14451
14486
|
onOptionSelect,
|
|
14452
14487
|
onDone
|
|
14453
14488
|
}) {
|
|
14454
|
-
return /* @__PURE__ */
|
|
14455
|
-
/* @__PURE__ */
|
|
14489
|
+
return /* @__PURE__ */ jsxs103("div", { className: "px-6 pb-4 pt-1 bg-white", children: [
|
|
14490
|
+
/* @__PURE__ */ jsxs103("div", { className: "relative overflow-hidden rounded-[24px]", children: [
|
|
14456
14491
|
/* @__PURE__ */ jsx157("div", { className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
|
|
14457
14492
|
/* @__PURE__ */ jsx157("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 z-20 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
|
|
14458
14493
|
/* @__PURE__ */ jsx157(
|
|
@@ -14462,7 +14497,7 @@ function AirbnbDatePickerBody({
|
|
|
14462
14497
|
className: "pointer-events-none absolute inset-x-0 top-1/2 z-0 h-8 -translate-y-1/2 rounded-[12px] bg-black/[0.04]"
|
|
14463
14498
|
}
|
|
14464
14499
|
),
|
|
14465
|
-
/* @__PURE__ */
|
|
14500
|
+
/* @__PURE__ */ jsxs103("div", { className: "relative grid grid-cols-[1.35fr_0.7fr_1fr] gap-1", children: [
|
|
14466
14501
|
/* @__PURE__ */ jsx157(
|
|
14467
14502
|
AirbnbDatePickerWheelColumn,
|
|
14468
14503
|
{
|
|
@@ -14563,7 +14598,7 @@ function AirbnbDatePickerContent({
|
|
|
14563
14598
|
}
|
|
14564
14599
|
);
|
|
14565
14600
|
if (isMobile3) {
|
|
14566
|
-
return /* @__PURE__ */ jsx157(Drawer, { open, onOpenChange, children: /* @__PURE__ */
|
|
14601
|
+
return /* @__PURE__ */ jsx157(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs103(
|
|
14567
14602
|
DrawerContent,
|
|
14568
14603
|
{
|
|
14569
14604
|
onClose: () => onOpenChange(false),
|
|
@@ -14576,7 +14611,7 @@ function AirbnbDatePickerContent({
|
|
|
14576
14611
|
}
|
|
14577
14612
|
) });
|
|
14578
14613
|
}
|
|
14579
|
-
return /* @__PURE__ */ jsx157(Dialog, { open, onOpenChange, children: /* @__PURE__ */
|
|
14614
|
+
return /* @__PURE__ */ jsx157(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs103(
|
|
14580
14615
|
DialogContent,
|
|
14581
14616
|
{
|
|
14582
14617
|
className: "max-w-[520px] rounded-[28px] border-0 p-0 shadow-xl",
|
|
@@ -14591,7 +14626,7 @@ function AirbnbDatePickerContent({
|
|
|
14591
14626
|
}
|
|
14592
14627
|
|
|
14593
14628
|
// src/dashboard/datepicker/Datepicker.tsx
|
|
14594
|
-
import { jsx as jsx158, jsxs as
|
|
14629
|
+
import { jsx as jsx158, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
14595
14630
|
var MONTHS_IN_YEAR2 = 12;
|
|
14596
14631
|
function getMonthLabels2(locale) {
|
|
14597
14632
|
const formatter = new Intl.DateTimeFormat(locale, { month: "long" });
|
|
@@ -14917,15 +14952,15 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14917
14952
|
{
|
|
14918
14953
|
ref: containerRef,
|
|
14919
14954
|
className: cn(
|
|
14920
|
-
"relative w-full max-w-[var(--max-
|
|
14955
|
+
"relative w-full max-w-[var(--field-max-width,296px)]",
|
|
14921
14956
|
disabled && "cursor-not-allowed opacity-50",
|
|
14922
14957
|
loading && "cursor-progress",
|
|
14923
14958
|
className
|
|
14924
14959
|
),
|
|
14925
14960
|
style: wrapperWidth ? { width: wrapperWidth } : void 0,
|
|
14926
|
-
children: /* @__PURE__ */
|
|
14927
|
-
/* @__PURE__ */
|
|
14928
|
-
isMobile3 ? /* @__PURE__ */
|
|
14961
|
+
children: /* @__PURE__ */ jsxs104("div", { className: "relative min-h-[68px] w-full", children: [
|
|
14962
|
+
/* @__PURE__ */ jsxs104("div", { className: "relative w-full", children: [
|
|
14963
|
+
isMobile3 ? /* @__PURE__ */ jsxs104(
|
|
14929
14964
|
"button",
|
|
14930
14965
|
{
|
|
14931
14966
|
ref: mobileTriggerRef,
|
|
@@ -14945,7 +14980,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14945
14980
|
),
|
|
14946
14981
|
children: [
|
|
14947
14982
|
/* @__PURE__ */ jsx158("span", { className: "block min-w-0 flex-1 truncate text-left", children: triggerText ?? (isWheelOpen ? mobilePlaceholder : null) }),
|
|
14948
|
-
/* @__PURE__ */
|
|
14983
|
+
/* @__PURE__ */ jsxs104("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
14949
14984
|
loading && /* @__PURE__ */ jsx158(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
14950
14985
|
/* @__PURE__ */ jsx158(
|
|
14951
14986
|
ChevronDown3,
|
|
@@ -14960,7 +14995,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14960
14995
|
] })
|
|
14961
14996
|
]
|
|
14962
14997
|
}
|
|
14963
|
-
) : /* @__PURE__ */
|
|
14998
|
+
) : /* @__PURE__ */ jsxs104(
|
|
14964
14999
|
"div",
|
|
14965
15000
|
{
|
|
14966
15001
|
className: cn(
|
|
@@ -14989,7 +15024,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14989
15024
|
className: subInputClass
|
|
14990
15025
|
}
|
|
14991
15026
|
) }),
|
|
14992
|
-
/* @__PURE__ */
|
|
15027
|
+
/* @__PURE__ */ jsxs104("div", { className: "relative flex h-full min-w-0 items-center gap-1 border-x border-[var(--chekin-color-gray-3)] px-2 sm:px-3", children: [
|
|
14993
15028
|
/* @__PURE__ */ jsx158(
|
|
14994
15029
|
"input",
|
|
14995
15030
|
{
|
|
@@ -15050,7 +15085,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
15050
15085
|
}
|
|
15051
15086
|
)
|
|
15052
15087
|
] }),
|
|
15053
|
-
/* @__PURE__ */
|
|
15088
|
+
/* @__PURE__ */ jsxs104("div", { className: "flex h-full min-w-0 items-center px-2 sm:px-4", children: [
|
|
15054
15089
|
/* @__PURE__ */ jsx158(
|
|
15055
15090
|
"input",
|
|
15056
15091
|
{
|
|
@@ -15370,7 +15405,7 @@ function resolveRangeSelection({
|
|
|
15370
15405
|
|
|
15371
15406
|
// src/dashboard/date-range-picker/components/DateRangeInputs.tsx
|
|
15372
15407
|
import { CalendarDays, SquareX as SquareX4 } from "lucide-react";
|
|
15373
|
-
import { jsx as jsx159, jsxs as
|
|
15408
|
+
import { jsx as jsx159, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
15374
15409
|
var DEFAULT_PLACEHOLDER = "00-00-0000";
|
|
15375
15410
|
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)]";
|
|
15376
15411
|
var iconButtonClass = "flex h-5 w-5 items-center justify-center rounded-[3px] border-0 bg-transparent p-0 text-[#9696b9] outline-none hover:shadow-[0_3px_3px_#0f477734] disabled:cursor-not-allowed";
|
|
@@ -15412,7 +15447,7 @@ function DateRangeInputs({
|
|
|
15412
15447
|
isBlocked && "cursor-not-allowed",
|
|
15413
15448
|
loading && "cursor-progress"
|
|
15414
15449
|
);
|
|
15415
|
-
return /* @__PURE__ */
|
|
15450
|
+
return /* @__PURE__ */ jsxs105(
|
|
15416
15451
|
"div",
|
|
15417
15452
|
{
|
|
15418
15453
|
className: cn(
|
|
@@ -15480,7 +15515,7 @@ function DateRangeInputs({
|
|
|
15480
15515
|
)
|
|
15481
15516
|
}
|
|
15482
15517
|
),
|
|
15483
|
-
/* @__PURE__ */
|
|
15518
|
+
/* @__PURE__ */ jsxs105("span", { className: "ml-auto flex shrink-0 items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
15484
15519
|
loading && /* @__PURE__ */ jsx159(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
15485
15520
|
!readOnly && !hideClearDates && !isEmpty && /* @__PURE__ */ jsx159(
|
|
15486
15521
|
"button",
|
|
@@ -15554,7 +15589,7 @@ function DateRangeCalendar({
|
|
|
15554
15589
|
}
|
|
15555
15590
|
|
|
15556
15591
|
// src/dashboard/date-range-picker/components/DateRangePopover.tsx
|
|
15557
|
-
import { jsx as jsx161, jsxs as
|
|
15592
|
+
import { jsx as jsx161, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
15558
15593
|
function DateRangePopover({
|
|
15559
15594
|
isOpen,
|
|
15560
15595
|
isMobile: isMobile3,
|
|
@@ -15573,7 +15608,7 @@ function DateRangePopover({
|
|
|
15573
15608
|
onOpenChange: (next) => {
|
|
15574
15609
|
if (!next) onClose();
|
|
15575
15610
|
},
|
|
15576
|
-
children: /* @__PURE__ */
|
|
15611
|
+
children: /* @__PURE__ */ jsxs106(
|
|
15577
15612
|
DrawerContent,
|
|
15578
15613
|
{
|
|
15579
15614
|
onClose,
|
|
@@ -15602,7 +15637,7 @@ function DateRangePopover({
|
|
|
15602
15637
|
}
|
|
15603
15638
|
|
|
15604
15639
|
// src/dashboard/date-range-picker/DateRangePicker.tsx
|
|
15605
|
-
import { jsx as jsx162, jsxs as
|
|
15640
|
+
import { jsx as jsx162, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
15606
15641
|
var DashboardDateRangePicker = React57.forwardRef(function DashboardDateRangePicker2({
|
|
15607
15642
|
label,
|
|
15608
15643
|
value: externalValue,
|
|
@@ -15768,14 +15803,14 @@ var DashboardDateRangePicker = React57.forwardRef(function DashboardDateRangePic
|
|
|
15768
15803
|
{
|
|
15769
15804
|
ref: containerRef,
|
|
15770
15805
|
className: cn(
|
|
15771
|
-
"relative w-full max-w-[var(--max-
|
|
15806
|
+
"relative w-full max-w-[var(--field-max-width,296px)]",
|
|
15772
15807
|
disabled && "cursor-not-allowed opacity-50",
|
|
15773
15808
|
loading && "cursor-progress",
|
|
15774
15809
|
className
|
|
15775
15810
|
),
|
|
15776
15811
|
style: wrapperWidth ? { width: wrapperWidth } : void 0,
|
|
15777
|
-
children: /* @__PURE__ */
|
|
15778
|
-
/* @__PURE__ */
|
|
15812
|
+
children: /* @__PURE__ */ jsxs107("div", { className: "relative min-h-[68px] w-full", children: [
|
|
15813
|
+
/* @__PURE__ */ jsxs107("div", { className: "relative w-full", children: [
|
|
15779
15814
|
/* @__PURE__ */ jsx162(
|
|
15780
15815
|
DateRangeInputs,
|
|
15781
15816
|
{
|
|
@@ -16058,7 +16093,7 @@ var DashboardTimePicker = React59.forwardRef(
|
|
|
16058
16093
|
import * as React60 from "react";
|
|
16059
16094
|
import { Download, Paperclip, SquareX as SquareX5 } from "lucide-react";
|
|
16060
16095
|
import { useTranslation as useTranslation38 } from "react-i18next";
|
|
16061
|
-
import { jsx as jsx164, jsxs as
|
|
16096
|
+
import { jsx as jsx164, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
16062
16097
|
function defaultDownload(url) {
|
|
16063
16098
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
16064
16099
|
}
|
|
@@ -16116,12 +16151,12 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16116
16151
|
event.stopPropagation();
|
|
16117
16152
|
if (isUrl) onDownload(value);
|
|
16118
16153
|
};
|
|
16119
|
-
return /* @__PURE__ */
|
|
16154
|
+
return /* @__PURE__ */ jsxs108(
|
|
16120
16155
|
"label",
|
|
16121
16156
|
{
|
|
16122
16157
|
htmlFor: inputId,
|
|
16123
16158
|
className: cn(
|
|
16124
|
-
"relative block w-full max-w-[var(--max-
|
|
16159
|
+
"relative block w-full max-w-[var(--field-max-width,296px)] cursor-pointer text-left",
|
|
16125
16160
|
(disabled || readOnly) && "cursor-not-allowed",
|
|
16126
16161
|
loading && "cursor-progress",
|
|
16127
16162
|
disabled && "opacity-50",
|
|
@@ -16145,9 +16180,9 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16145
16180
|
"aria-invalid": isInvalid
|
|
16146
16181
|
}
|
|
16147
16182
|
),
|
|
16148
|
-
/* @__PURE__ */
|
|
16149
|
-
/* @__PURE__ */
|
|
16150
|
-
/* @__PURE__ */
|
|
16183
|
+
/* @__PURE__ */ jsxs108("div", { className: "relative min-h-[68px] w-full", children: [
|
|
16184
|
+
/* @__PURE__ */ jsxs108("div", { className: "relative w-full", children: [
|
|
16185
|
+
/* @__PURE__ */ jsxs108(
|
|
16151
16186
|
"div",
|
|
16152
16187
|
{
|
|
16153
16188
|
className: cn(
|
|
@@ -16155,13 +16190,13 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16155
16190
|
isEmpty && "bg-[var(--chekin-color-surface-input-empty)]"
|
|
16156
16191
|
),
|
|
16157
16192
|
children: [
|
|
16158
|
-
hasFileChip ? /* @__PURE__ */
|
|
16193
|
+
hasFileChip ? /* @__PURE__ */ jsxs108(
|
|
16159
16194
|
"div",
|
|
16160
16195
|
{
|
|
16161
16196
|
className: "inline-flex h-6 max-w-[85%] items-center rounded-[4px] border border-[#acacd5] bg-[#f0f0f8] pl-[10px] pr-1",
|
|
16162
16197
|
onClick: (event) => event.preventDefault(),
|
|
16163
16198
|
children: [
|
|
16164
|
-
isUrl ? /* @__PURE__ */
|
|
16199
|
+
isUrl ? /* @__PURE__ */ jsxs108(
|
|
16165
16200
|
"button",
|
|
16166
16201
|
{
|
|
16167
16202
|
type: "button",
|
|
@@ -16187,7 +16222,7 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16187
16222
|
]
|
|
16188
16223
|
}
|
|
16189
16224
|
) : /* @__PURE__ */ jsx164("span", { className: "block min-w-0 flex-1 truncate text-left text-[var(--chekin-color-gray-1)]", children: placeholder ?? "" }),
|
|
16190
|
-
/* @__PURE__ */
|
|
16225
|
+
/* @__PURE__ */ jsxs108("span", { className: "ml-auto flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
16191
16226
|
loading && /* @__PURE__ */ jsx164(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
16192
16227
|
/* @__PURE__ */ jsx164(Paperclip, { size: 20 })
|
|
16193
16228
|
] })
|
|
@@ -16231,7 +16266,7 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16231
16266
|
|
|
16232
16267
|
// src/dashboard/select-icons-box/SelectIconsBox.tsx
|
|
16233
16268
|
import * as React61 from "react";
|
|
16234
|
-
import { jsx as jsx165, jsxs as
|
|
16269
|
+
import { jsx as jsx165, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
16235
16270
|
function DashboardSelectIconsBox({
|
|
16236
16271
|
children,
|
|
16237
16272
|
icons,
|
|
@@ -16267,7 +16302,7 @@ function DashboardSelectIconsBox({
|
|
|
16267
16302
|
onSelect(iconName);
|
|
16268
16303
|
setOpen(false);
|
|
16269
16304
|
};
|
|
16270
|
-
return /* @__PURE__ */
|
|
16305
|
+
return /* @__PURE__ */ jsxs109(
|
|
16271
16306
|
"div",
|
|
16272
16307
|
{
|
|
16273
16308
|
ref: containerRef,
|
|
@@ -16367,13 +16402,13 @@ function getErrorMessage(error) {
|
|
|
16367
16402
|
|
|
16368
16403
|
// src/lib/toastResponseError.tsx
|
|
16369
16404
|
import i18next from "i18next";
|
|
16370
|
-
import { jsx as jsx166, jsxs as
|
|
16405
|
+
import { jsx as jsx166, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
16371
16406
|
function addSupportEmailToMessage(message, prefixText) {
|
|
16372
16407
|
if (typeof message !== "string") {
|
|
16373
16408
|
return message;
|
|
16374
16409
|
}
|
|
16375
16410
|
const builtMessage = `${prefixText ? `${prefixText} ` : ""}${message}`;
|
|
16376
|
-
return /* @__PURE__ */
|
|
16411
|
+
return /* @__PURE__ */ jsxs110("div", { children: [
|
|
16377
16412
|
/* @__PURE__ */ jsx166("div", { children: builtMessage }),
|
|
16378
16413
|
i18next.t("reach_us_at_email")
|
|
16379
16414
|
] });
|
|
@@ -16390,11 +16425,11 @@ function toastResponseError(error, options = {}) {
|
|
|
16390
16425
|
|
|
16391
16426
|
// src/legacy-fields/textarea/Textarea.tsx
|
|
16392
16427
|
import { forwardRef as forwardRef68, useId as useId15 } from "react";
|
|
16393
|
-
import { jsx as jsx167, jsxs as
|
|
16428
|
+
import { jsx as jsx167, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
16394
16429
|
var LegacyTextarea = forwardRef68(
|
|
16395
16430
|
({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
|
|
16396
16431
|
const inputId = useId15();
|
|
16397
|
-
return /* @__PURE__ */
|
|
16432
|
+
return /* @__PURE__ */ jsxs111("div", { className: cn("relative", className), children: [
|
|
16398
16433
|
/* @__PURE__ */ jsx167(
|
|
16399
16434
|
"textarea",
|
|
16400
16435
|
{
|
|
@@ -16436,7 +16471,7 @@ import { Calendar as Calendar2 } from "lucide-react";
|
|
|
16436
16471
|
import * as React62 from "react";
|
|
16437
16472
|
import { Loader2 as Loader24 } from "lucide-react";
|
|
16438
16473
|
import { useTranslation as useTranslation39 } from "react-i18next";
|
|
16439
|
-
import { Fragment as Fragment17, jsx as jsx168, jsxs as
|
|
16474
|
+
import { Fragment as Fragment17, jsx as jsx168, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
16440
16475
|
var AirbnbFieldTrigger = React62.forwardRef(
|
|
16441
16476
|
({
|
|
16442
16477
|
as = "button",
|
|
@@ -16474,9 +16509,9 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16474
16509
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
16475
16510
|
const visibleLabelText = labelText ?? label;
|
|
16476
16511
|
const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
|
|
16477
|
-
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */
|
|
16512
|
+
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ jsxs112("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
|
|
16478
16513
|
/* @__PURE__ */ jsx168("span", { className: "min-w-0 truncate", children: visibleLabelText }),
|
|
16479
|
-
optionalLabel && /* @__PURE__ */
|
|
16514
|
+
optionalLabel && /* @__PURE__ */ jsxs112("span", { className: "shrink-0 text-[12px] relative top-[1px] font-normal leading-4 text-current opacity-70", children: [
|
|
16480
16515
|
"(",
|
|
16481
16516
|
optionalLabel,
|
|
16482
16517
|
")"
|
|
@@ -16497,7 +16532,7 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16497
16532
|
const hasInvalidState = Boolean(error);
|
|
16498
16533
|
const errorMessage = typeof error === "string" ? error : void 0;
|
|
16499
16534
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
16500
|
-
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */
|
|
16535
|
+
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ jsxs112("span", { className: "flex items-center gap-2", children: [
|
|
16501
16536
|
trailingAdornment,
|
|
16502
16537
|
loading && /* @__PURE__ */ jsx168(
|
|
16503
16538
|
Loader24,
|
|
@@ -16515,8 +16550,8 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16515
16550
|
disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : isAirbnbVariant ? "cursor-pointer" : "cursor-text",
|
|
16516
16551
|
className
|
|
16517
16552
|
);
|
|
16518
|
-
const sharedContent = /* @__PURE__ */
|
|
16519
|
-
/* @__PURE__ */
|
|
16553
|
+
const sharedContent = /* @__PURE__ */ jsxs112(Fragment17, { children: [
|
|
16554
|
+
/* @__PURE__ */ jsxs112(
|
|
16520
16555
|
"span",
|
|
16521
16556
|
{
|
|
16522
16557
|
className: cn(
|
|
@@ -16565,7 +16600,7 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16565
16600
|
}
|
|
16566
16601
|
)
|
|
16567
16602
|
] });
|
|
16568
|
-
return /* @__PURE__ */
|
|
16603
|
+
return /* @__PURE__ */ jsxs112("div", { className: "w-full", children: [
|
|
16569
16604
|
topLabel && /* @__PURE__ */ jsx168("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[#222222]", children: topLabel }),
|
|
16570
16605
|
as === "button" ? /* @__PURE__ */ jsx168(
|
|
16571
16606
|
"button",
|
|
@@ -16608,7 +16643,7 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16608
16643
|
AirbnbFieldTrigger.displayName = "AirbnbFieldTrigger";
|
|
16609
16644
|
|
|
16610
16645
|
// src/airbnb-fields/datepicker/DatePicker.tsx
|
|
16611
|
-
import { jsx as jsx169, jsxs as
|
|
16646
|
+
import { jsx as jsx169, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
16612
16647
|
var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
|
|
16613
16648
|
var AirbnbDatePicker = React63.forwardRef(
|
|
16614
16649
|
({
|
|
@@ -16725,7 +16760,7 @@ var AirbnbDatePicker = React63.forwardRef(
|
|
|
16725
16760
|
setIsOpen(false);
|
|
16726
16761
|
}
|
|
16727
16762
|
}, [isBlocked]);
|
|
16728
|
-
return /* @__PURE__ */
|
|
16763
|
+
return /* @__PURE__ */ jsxs113("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
|
|
16729
16764
|
name && /* @__PURE__ */ jsx169(
|
|
16730
16765
|
"input",
|
|
16731
16766
|
{
|
|
@@ -16957,7 +16992,7 @@ import { ChevronDown as ChevronDown5 } from "lucide-react";
|
|
|
16957
16992
|
import * as React69 from "react";
|
|
16958
16993
|
|
|
16959
16994
|
// src/airbnb-fields/select/SelectDesktopMenu.tsx
|
|
16960
|
-
import { jsx as jsx171, jsxs as
|
|
16995
|
+
import { jsx as jsx171, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
16961
16996
|
function AirbnbSelectDesktopMenu({
|
|
16962
16997
|
id,
|
|
16963
16998
|
options,
|
|
@@ -16976,7 +17011,7 @@ function AirbnbSelectDesktopMenu({
|
|
|
16976
17011
|
noOptionsMessage
|
|
16977
17012
|
}) {
|
|
16978
17013
|
const emptyMessage = noOptionsMessage?.();
|
|
16979
|
-
return /* @__PURE__ */
|
|
17014
|
+
return /* @__PURE__ */ jsxs114(
|
|
16980
17015
|
"div",
|
|
16981
17016
|
{
|
|
16982
17017
|
id,
|
|
@@ -17152,7 +17187,7 @@ function getMobileOptionStyles(index, scrollTop) {
|
|
|
17152
17187
|
}
|
|
17153
17188
|
|
|
17154
17189
|
// src/airbnb-fields/select/SelectMobileWheel.tsx
|
|
17155
|
-
import { jsx as jsx173, jsxs as
|
|
17190
|
+
import { jsx as jsx173, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
17156
17191
|
function AirbnbSelectMobileWheel({
|
|
17157
17192
|
id,
|
|
17158
17193
|
options,
|
|
@@ -17171,7 +17206,7 @@ function AirbnbSelectMobileWheel({
|
|
|
17171
17206
|
}) {
|
|
17172
17207
|
const spacerHeight2 = getWheelSpacerHeight();
|
|
17173
17208
|
const emptyMessage = noOptionsMessage?.();
|
|
17174
|
-
return /* @__PURE__ */
|
|
17209
|
+
return /* @__PURE__ */ jsxs115(
|
|
17175
17210
|
"div",
|
|
17176
17211
|
{
|
|
17177
17212
|
id,
|
|
@@ -17196,7 +17231,7 @@ function AirbnbSelectMobileWheel({
|
|
|
17196
17231
|
)
|
|
17197
17232
|
}
|
|
17198
17233
|
),
|
|
17199
|
-
/* @__PURE__ */
|
|
17234
|
+
/* @__PURE__ */ jsxs115(
|
|
17200
17235
|
"div",
|
|
17201
17236
|
{
|
|
17202
17237
|
ref: listRef,
|
|
@@ -17246,7 +17281,7 @@ function AirbnbSelectMobileWheel({
|
|
|
17246
17281
|
}
|
|
17247
17282
|
|
|
17248
17283
|
// src/airbnb-fields/select/SelectMobileContent.tsx
|
|
17249
|
-
import { jsx as jsx174, jsxs as
|
|
17284
|
+
import { jsx as jsx174, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
17250
17285
|
function AirbnbSelectMobileContent({
|
|
17251
17286
|
open,
|
|
17252
17287
|
onOpenChange,
|
|
@@ -17270,10 +17305,10 @@ function AirbnbSelectMobileContent({
|
|
|
17270
17305
|
getOptionId: getOptionId2,
|
|
17271
17306
|
noOptionsMessage
|
|
17272
17307
|
}) {
|
|
17273
|
-
return /* @__PURE__ */ jsx174(Drawer, { open, onOpenChange, children: /* @__PURE__ */
|
|
17308
|
+
return /* @__PURE__ */ jsx174(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs116(DrawerContent, { onClose, lockScroll: false, children: [
|
|
17274
17309
|
/* @__PURE__ */ jsx174(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
17275
17310
|
/* @__PURE__ */ jsx174(DrawerDescription, { className: "sr-only", children: label }),
|
|
17276
|
-
/* @__PURE__ */
|
|
17311
|
+
/* @__PURE__ */ jsxs116("div", { className: "px-6 pb-4 pt-1", children: [
|
|
17277
17312
|
/* @__PURE__ */ jsx174(
|
|
17278
17313
|
AirbnbSelectMobileWheel,
|
|
17279
17314
|
{
|
|
@@ -17718,7 +17753,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
|
|
|
17718
17753
|
}
|
|
17719
17754
|
|
|
17720
17755
|
// src/airbnb-fields/select/Select.tsx
|
|
17721
|
-
import { jsx as jsx176, jsxs as
|
|
17756
|
+
import { jsx as jsx176, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
17722
17757
|
var AirbnbSelect = React69.forwardRef(function AirbnbSelect2({
|
|
17723
17758
|
options = [],
|
|
17724
17759
|
value,
|
|
@@ -17898,7 +17933,7 @@ var AirbnbSelect = React69.forwardRef(function AirbnbSelect2({
|
|
|
17898
17933
|
handleMobileOpenChange(false);
|
|
17899
17934
|
}
|
|
17900
17935
|
};
|
|
17901
|
-
return /* @__PURE__ */
|
|
17936
|
+
return /* @__PURE__ */ jsxs117(
|
|
17902
17937
|
"div",
|
|
17903
17938
|
{
|
|
17904
17939
|
ref: containerRef,
|
|
@@ -18013,7 +18048,7 @@ var AirbnbSelect = React69.forwardRef(function AirbnbSelect2({
|
|
|
18013
18048
|
});
|
|
18014
18049
|
|
|
18015
18050
|
// src/airbnb-fields/phone-field/PhoneField.tsx
|
|
18016
|
-
import { jsx as jsx177, jsxs as
|
|
18051
|
+
import { jsx as jsx177, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
18017
18052
|
function formatPhoneCodeOptionLabel(option) {
|
|
18018
18053
|
const label = String(option.label);
|
|
18019
18054
|
const value = String(option.value);
|
|
@@ -18060,7 +18095,7 @@ var AirbnbPhoneField = React70.forwardRef(
|
|
|
18060
18095
|
const hasInvalidState = Boolean(error) || Boolean(invalid);
|
|
18061
18096
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
18062
18097
|
const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
|
|
18063
|
-
return /* @__PURE__ */
|
|
18098
|
+
return /* @__PURE__ */ jsxs118("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
|
|
18064
18099
|
name && /* @__PURE__ */ jsx177("input", { type: "hidden", name, value: combinedValue, disabled }),
|
|
18065
18100
|
codeName && /* @__PURE__ */ jsx177(
|
|
18066
18101
|
"input",
|
|
@@ -18088,7 +18123,7 @@ var AirbnbPhoneField = React70.forwardRef(
|
|
|
18088
18123
|
children: topLabel
|
|
18089
18124
|
}
|
|
18090
18125
|
),
|
|
18091
|
-
/* @__PURE__ */
|
|
18126
|
+
/* @__PURE__ */ jsxs118("div", { className: "flex items-stretch", children: [
|
|
18092
18127
|
/* @__PURE__ */ jsx177(
|
|
18093
18128
|
AirbnbSelect,
|
|
18094
18129
|
{
|
|
@@ -18120,7 +18155,7 @@ var AirbnbPhoneField = React70.forwardRef(
|
|
|
18120
18155
|
onClick,
|
|
18121
18156
|
onKeyDown,
|
|
18122
18157
|
valueLabel
|
|
18123
|
-
}) => /* @__PURE__ */
|
|
18158
|
+
}) => /* @__PURE__ */ jsxs118(
|
|
18124
18159
|
"button",
|
|
18125
18160
|
{
|
|
18126
18161
|
id,
|
|
@@ -18195,10 +18230,10 @@ AirbnbPhoneField.displayName = "AirbnbPhoneField";
|
|
|
18195
18230
|
|
|
18196
18231
|
// src/airbnb-fields/searchable-select/SearchableSelect.tsx
|
|
18197
18232
|
import * as React71 from "react";
|
|
18198
|
-
import { ChevronDown as ChevronDown6, Search as
|
|
18233
|
+
import { ChevronDown as ChevronDown6, Search as Search5 } from "lucide-react";
|
|
18199
18234
|
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
18200
18235
|
import { useCallback as useCallback51 } from "react";
|
|
18201
|
-
import { jsx as jsx178, jsxs as
|
|
18236
|
+
import { jsx as jsx178, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
18202
18237
|
var ROW_HEIGHT = 48;
|
|
18203
18238
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
18204
18239
|
var MOBILE_LIST_HEIGHT = 420;
|
|
@@ -18395,7 +18430,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
18395
18430
|
}
|
|
18396
18431
|
);
|
|
18397
18432
|
React71.useImperativeHandle(ref, () => triggerRef.current, []);
|
|
18398
|
-
return /* @__PURE__ */
|
|
18433
|
+
return /* @__PURE__ */ jsxs119("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
|
|
18399
18434
|
name && /* @__PURE__ */ jsx178("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
18400
18435
|
/* @__PURE__ */ jsx178(
|
|
18401
18436
|
AirbnbFieldTrigger,
|
|
@@ -18455,7 +18490,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
18455
18490
|
}
|
|
18456
18491
|
closeSelect();
|
|
18457
18492
|
},
|
|
18458
|
-
children: /* @__PURE__ */
|
|
18493
|
+
children: /* @__PURE__ */ jsxs119(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
|
|
18459
18494
|
/* @__PURE__ */ jsx178(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
18460
18495
|
/* @__PURE__ */ jsx178(DrawerDescription, { className: "sr-only", children: label }),
|
|
18461
18496
|
/* @__PURE__ */ jsx178("div", { className: "px-5 pb-5 pt-1", children: content })
|
|
@@ -18528,10 +18563,10 @@ function AirbnbSearchableSelectContent({
|
|
|
18528
18563
|
virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
|
|
18529
18564
|
}
|
|
18530
18565
|
}, [highlightedIndex, virtualizer]);
|
|
18531
|
-
return /* @__PURE__ */
|
|
18532
|
-
/* @__PURE__ */
|
|
18566
|
+
return /* @__PURE__ */ jsxs119("div", { className: "p-2", children: [
|
|
18567
|
+
/* @__PURE__ */ jsxs119("div", { className: "relative mb-2", children: [
|
|
18533
18568
|
/* @__PURE__ */ jsx178(
|
|
18534
|
-
|
|
18569
|
+
Search5,
|
|
18535
18570
|
{
|
|
18536
18571
|
"aria-hidden": "true",
|
|
18537
18572
|
className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[#9696B9]"
|
|
@@ -18641,13 +18676,13 @@ function getNextEnabledIndex(options, startIndex, step) {
|
|
|
18641
18676
|
// src/airbnb-fields/search-input/SearchInput.tsx
|
|
18642
18677
|
import * as React72 from "react";
|
|
18643
18678
|
import { useTranslation as useTranslation40 } from "react-i18next";
|
|
18644
|
-
import { Search as
|
|
18645
|
-
import { jsx as jsx179, jsxs as
|
|
18679
|
+
import { Search as Search6, X as X10 } from "lucide-react";
|
|
18680
|
+
import { jsx as jsx179, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
18646
18681
|
var AirbnbSearchInput = React72.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
18647
18682
|
const { t } = useTranslation40();
|
|
18648
18683
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
18649
|
-
return /* @__PURE__ */
|
|
18650
|
-
/* @__PURE__ */ jsx179(
|
|
18684
|
+
return /* @__PURE__ */ jsxs120("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
18685
|
+
/* @__PURE__ */ jsx179(Search6, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
18651
18686
|
/* @__PURE__ */ jsx179(
|
|
18652
18687
|
"input",
|
|
18653
18688
|
{
|