@chekinapp/ui 0.0.105 → 0.0.106
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 +92 -66
- 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 +159 -133
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12166,7 +12166,7 @@ var DashboardInput = React43.forwardRef(
|
|
|
12166
12166
|
"div",
|
|
12167
12167
|
{
|
|
12168
12168
|
className: cn(
|
|
12169
|
-
"relative block w-full
|
|
12169
|
+
"relative block w-full max-w-[var(--field-max-width,296px)] min-h-[68px]",
|
|
12170
12170
|
disabled && "cursor-not-allowed opacity-50",
|
|
12171
12171
|
loading && "cursor-progress opacity-50",
|
|
12172
12172
|
wrapperClassName,
|
|
@@ -12366,7 +12366,7 @@ function SelectFieldShell({
|
|
|
12366
12366
|
ref: containerRef,
|
|
12367
12367
|
onBlur,
|
|
12368
12368
|
className: cn(
|
|
12369
|
-
"relative w-full max-w-[var(--max-
|
|
12369
|
+
"relative w-full max-w-[var(--field-max-width,296px)]",
|
|
12370
12370
|
disabled && "cursor-not-allowed opacity-50",
|
|
12371
12371
|
loading && "cursor-progress",
|
|
12372
12372
|
className
|
|
@@ -12581,7 +12581,8 @@ function SelectMenuPanel({
|
|
|
12581
12581
|
}
|
|
12582
12582
|
|
|
12583
12583
|
// src/dashboard/_select-internals/SelectSearchInput.tsx
|
|
12584
|
-
import {
|
|
12584
|
+
import { Search as Search3 } from "lucide-react";
|
|
12585
|
+
import { jsx as jsx147, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
12585
12586
|
function SelectSearchInput({
|
|
12586
12587
|
inputRef,
|
|
12587
12588
|
value,
|
|
@@ -12591,26 +12592,35 @@ function SelectSearchInput({
|
|
|
12591
12592
|
onChange,
|
|
12592
12593
|
onKeyDown
|
|
12593
12594
|
}) {
|
|
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
|
-
|
|
12595
|
+
return /* @__PURE__ */ jsx147("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ jsxs94("div", { className: "relative", children: [
|
|
12596
|
+
/* @__PURE__ */ jsx147(
|
|
12597
|
+
Search3,
|
|
12598
|
+
{
|
|
12599
|
+
"aria-hidden": "true",
|
|
12600
|
+
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--chekin-color-gray-2)]"
|
|
12601
|
+
}
|
|
12602
|
+
),
|
|
12603
|
+
/* @__PURE__ */ jsx147(
|
|
12604
|
+
"input",
|
|
12605
|
+
{
|
|
12606
|
+
ref: inputRef,
|
|
12607
|
+
type: "text",
|
|
12608
|
+
value,
|
|
12609
|
+
placeholder,
|
|
12610
|
+
onChange,
|
|
12611
|
+
onKeyDown,
|
|
12612
|
+
autoComplete: "off",
|
|
12613
|
+
"aria-controls": listboxId,
|
|
12614
|
+
"aria-activedescendant": activeOptionId,
|
|
12615
|
+
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)]"
|
|
12616
|
+
}
|
|
12617
|
+
)
|
|
12618
|
+
] }) });
|
|
12609
12619
|
}
|
|
12610
12620
|
|
|
12611
12621
|
// src/dashboard/_select-internals/SelectTrigger.tsx
|
|
12612
12622
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
12613
|
-
import { jsx as jsx148, jsxs as
|
|
12623
|
+
import { jsx as jsx148, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
12614
12624
|
function SelectTrigger({
|
|
12615
12625
|
triggerRef,
|
|
12616
12626
|
triggerId,
|
|
@@ -12631,7 +12641,7 @@ function SelectTrigger({
|
|
|
12631
12641
|
onBlur
|
|
12632
12642
|
}) {
|
|
12633
12643
|
const isEmpty = !hasValue;
|
|
12634
|
-
return /* @__PURE__ */
|
|
12644
|
+
return /* @__PURE__ */ jsxs95(
|
|
12635
12645
|
"button",
|
|
12636
12646
|
{
|
|
12637
12647
|
id: triggerId,
|
|
@@ -12656,7 +12666,7 @@ function SelectTrigger({
|
|
|
12656
12666
|
),
|
|
12657
12667
|
children: [
|
|
12658
12668
|
/* @__PURE__ */ jsx148("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: valueLabel ?? (isOpen ? placeholder : null) }),
|
|
12659
|
-
/* @__PURE__ */
|
|
12669
|
+
/* @__PURE__ */ jsxs95("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
12660
12670
|
loading && /* @__PURE__ */ jsx148(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
12661
12671
|
/* @__PURE__ */ jsx148(
|
|
12662
12672
|
ChevronDown2,
|
|
@@ -12759,7 +12769,7 @@ function useSelectSearch({
|
|
|
12759
12769
|
}
|
|
12760
12770
|
|
|
12761
12771
|
// src/dashboard/select/Select.tsx
|
|
12762
|
-
import { jsx as jsx149, jsxs as
|
|
12772
|
+
import { jsx as jsx149, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
12763
12773
|
function DashboardSelectInternal({
|
|
12764
12774
|
options = [],
|
|
12765
12775
|
value,
|
|
@@ -12883,7 +12893,7 @@ function DashboardSelectInternal({
|
|
|
12883
12893
|
setIsOpen(false);
|
|
12884
12894
|
}
|
|
12885
12895
|
};
|
|
12886
|
-
return /* @__PURE__ */
|
|
12896
|
+
return /* @__PURE__ */ jsxs96(
|
|
12887
12897
|
SelectFieldShell,
|
|
12888
12898
|
{
|
|
12889
12899
|
containerRef,
|
|
@@ -12940,7 +12950,7 @@ function DashboardSelectInternal({
|
|
|
12940
12950
|
onClick: !isBlocked ? toggleMenu : void 0
|
|
12941
12951
|
}
|
|
12942
12952
|
),
|
|
12943
|
-
/* @__PURE__ */
|
|
12953
|
+
/* @__PURE__ */ jsxs96(
|
|
12944
12954
|
SelectMenuPanel,
|
|
12945
12955
|
{
|
|
12946
12956
|
isOpen,
|
|
@@ -12996,13 +13006,13 @@ var DashboardSelect = React47.forwardRef(
|
|
|
12996
13006
|
|
|
12997
13007
|
// src/dashboard/multi-select/MultiSelect.tsx
|
|
12998
13008
|
import * as React48 from "react";
|
|
12999
|
-
import { SquareX as SquareX3 } from "lucide-react";
|
|
13009
|
+
import { Search as Search4, SquareX as SquareX3 } from "lucide-react";
|
|
13000
13010
|
import { useTranslation as useTranslation32 } from "react-i18next";
|
|
13001
13011
|
|
|
13002
13012
|
// src/dashboard/multi-select/MultiSelectChip.tsx
|
|
13003
13013
|
import { SquareX as SquareX2 } from "lucide-react";
|
|
13004
13014
|
import { useTranslation as useTranslation31 } from "react-i18next";
|
|
13005
|
-
import { jsx as jsx150, jsxs as
|
|
13015
|
+
import { jsx as jsx150, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
13006
13016
|
function MultiSelectChip({
|
|
13007
13017
|
option,
|
|
13008
13018
|
readOnly,
|
|
@@ -13010,7 +13020,7 @@ function MultiSelectChip({
|
|
|
13010
13020
|
}) {
|
|
13011
13021
|
const { t } = useTranslation31();
|
|
13012
13022
|
const labelText = typeof option.label === "string" ? option.label : String(option.value);
|
|
13013
|
-
return /* @__PURE__ */
|
|
13023
|
+
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
13024
|
/* @__PURE__ */ jsx150("span", { className: "whitespace-nowrap", children: option.label }),
|
|
13015
13025
|
!readOnly && /* @__PURE__ */ jsx150(
|
|
13016
13026
|
"button",
|
|
@@ -13029,7 +13039,7 @@ function MultiSelectChip({
|
|
|
13029
13039
|
}
|
|
13030
13040
|
|
|
13031
13041
|
// src/dashboard/multi-select/MultiSelect.tsx
|
|
13032
|
-
import { jsx as jsx151, jsxs as
|
|
13042
|
+
import { jsx as jsx151, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
13033
13043
|
var isValueSelected = (selected, option) => selected.some((item) => item.value === option.value);
|
|
13034
13044
|
function DashboardMultiSelectInternal({
|
|
13035
13045
|
options = [],
|
|
@@ -13224,7 +13234,7 @@ function DashboardMultiSelectInternal({
|
|
|
13224
13234
|
setIsFocused(false);
|
|
13225
13235
|
onBlur?.(event);
|
|
13226
13236
|
};
|
|
13227
|
-
return /* @__PURE__ */
|
|
13237
|
+
return /* @__PURE__ */ jsxs98(
|
|
13228
13238
|
SelectFieldShell,
|
|
13229
13239
|
{
|
|
13230
13240
|
containerRef,
|
|
@@ -13243,7 +13253,7 @@ function DashboardMultiSelectInternal({
|
|
|
13243
13253
|
hiddenValue: selectedValues.map((item) => String(item.value)).join(","),
|
|
13244
13254
|
onBlur: handleInputBlur,
|
|
13245
13255
|
children: [
|
|
13246
|
-
/* @__PURE__ */
|
|
13256
|
+
/* @__PURE__ */ jsxs98(
|
|
13247
13257
|
"div",
|
|
13248
13258
|
{
|
|
13249
13259
|
id: triggerId,
|
|
@@ -13276,6 +13286,13 @@ function DashboardMultiSelectInternal({
|
|
|
13276
13286
|
String(option.value)
|
|
13277
13287
|
)
|
|
13278
13288
|
),
|
|
13289
|
+
/* @__PURE__ */ jsx151(
|
|
13290
|
+
Search4,
|
|
13291
|
+
{
|
|
13292
|
+
"aria-hidden": "true",
|
|
13293
|
+
className: "h-4 w-4 shrink-0 text-[var(--chekin-color-gray-2)]"
|
|
13294
|
+
}
|
|
13295
|
+
),
|
|
13279
13296
|
/* @__PURE__ */ jsx151(
|
|
13280
13297
|
"input",
|
|
13281
13298
|
{
|
|
@@ -13305,7 +13322,7 @@ function DashboardMultiSelectInternal({
|
|
|
13305
13322
|
"aria-activedescendant": isOpen && highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0
|
|
13306
13323
|
}
|
|
13307
13324
|
),
|
|
13308
|
-
/* @__PURE__ */
|
|
13325
|
+
/* @__PURE__ */ jsxs98("span", { className: "ml-auto flex items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
13309
13326
|
loading && /* @__PURE__ */ jsx151(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
13310
13327
|
hasValue && !readOnly && /* @__PURE__ */ jsx151(
|
|
13311
13328
|
"button",
|
|
@@ -13351,7 +13368,7 @@ function DashboardMultiSelectInternal({
|
|
|
13351
13368
|
onClick: handleContainerClick
|
|
13352
13369
|
}
|
|
13353
13370
|
),
|
|
13354
|
-
/* @__PURE__ */
|
|
13371
|
+
/* @__PURE__ */ jsxs98(
|
|
13355
13372
|
SelectMenuPanel,
|
|
13356
13373
|
{
|
|
13357
13374
|
isOpen,
|
|
@@ -13364,21 +13381,30 @@ function DashboardMultiSelectInternal({
|
|
|
13364
13381
|
className: dropdownClassName,
|
|
13365
13382
|
drawerClassName,
|
|
13366
13383
|
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
|
-
|
|
13384
|
+
isMobile3 && /* @__PURE__ */ jsx151("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ jsxs98("div", { className: "relative", children: [
|
|
13385
|
+
/* @__PURE__ */ jsx151(
|
|
13386
|
+
Search4,
|
|
13387
|
+
{
|
|
13388
|
+
"aria-hidden": "true",
|
|
13389
|
+
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--chekin-color-gray-2)]"
|
|
13390
|
+
}
|
|
13391
|
+
),
|
|
13392
|
+
/* @__PURE__ */ jsx151(
|
|
13393
|
+
"input",
|
|
13394
|
+
{
|
|
13395
|
+
ref: mobileSearchInputRef,
|
|
13396
|
+
type: "text",
|
|
13397
|
+
value: searchValue,
|
|
13398
|
+
placeholder: placeholder ?? "",
|
|
13399
|
+
onChange: (event) => setSearchValue(event.target.value),
|
|
13400
|
+
onKeyDown: handleInputKeyDown,
|
|
13401
|
+
autoComplete: "off",
|
|
13402
|
+
"aria-controls": listboxId,
|
|
13403
|
+
"aria-activedescendant": highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0,
|
|
13404
|
+
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)]"
|
|
13405
|
+
}
|
|
13406
|
+
)
|
|
13407
|
+
] }) }),
|
|
13382
13408
|
/* @__PURE__ */ jsx151(
|
|
13383
13409
|
SelectMenu,
|
|
13384
13410
|
{
|
|
@@ -13436,7 +13462,7 @@ import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
|
|
|
13436
13462
|
import { useTranslation as useTranslation33 } from "react-i18next";
|
|
13437
13463
|
|
|
13438
13464
|
// src/dashboard/infinite-scroll-select/InfiniteScrollList.tsx
|
|
13439
|
-
import { jsx as jsx153, jsxs as
|
|
13465
|
+
import { jsx as jsx153, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
13440
13466
|
function InfiniteScrollList({
|
|
13441
13467
|
scrollRef,
|
|
13442
13468
|
listboxId,
|
|
@@ -13489,10 +13515,10 @@ function InfiniteScrollList({
|
|
|
13489
13515
|
height: `${virtualItem.size}px`,
|
|
13490
13516
|
transform: `translateY(${virtualItem.start}px)`
|
|
13491
13517
|
},
|
|
13492
|
-
children: isLoaderRow ? /* @__PURE__ */
|
|
13518
|
+
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
13519
|
/* @__PURE__ */ jsx153(ThreeDotsLoader, { height: 36, width: 36 }),
|
|
13494
13520
|
/* @__PURE__ */ jsx153("span", { children: loadingMoreText })
|
|
13495
|
-
] }) : /* @__PURE__ */
|
|
13521
|
+
] }) : /* @__PURE__ */ jsxs99(
|
|
13496
13522
|
"button",
|
|
13497
13523
|
{
|
|
13498
13524
|
id: getOptionId2(virtualItem.index),
|
|
@@ -13527,7 +13553,7 @@ function InfiniteScrollList({
|
|
|
13527
13553
|
}
|
|
13528
13554
|
|
|
13529
13555
|
// src/dashboard/infinite-scroll-select/InfiniteScrollSelect.tsx
|
|
13530
|
-
import { jsx as jsx154, jsxs as
|
|
13556
|
+
import { jsx as jsx154, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
13531
13557
|
var DEFAULT_ITEM_HEIGHT = 60;
|
|
13532
13558
|
var DEFAULT_LIST_HEIGHT = 322;
|
|
13533
13559
|
var DEFAULT_OVERSCAN = 5;
|
|
@@ -13700,7 +13726,7 @@ function DashboardInfiniteScrollSelectInternal({
|
|
|
13700
13726
|
const totalSize = virtualizer.getTotalSize();
|
|
13701
13727
|
const measuredListHeight = Math.min(listHeight, Math.max(totalSize, itemHeight));
|
|
13702
13728
|
const activeOptionId = highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0;
|
|
13703
|
-
return /* @__PURE__ */
|
|
13729
|
+
return /* @__PURE__ */ jsxs100(
|
|
13704
13730
|
SelectFieldShell,
|
|
13705
13731
|
{
|
|
13706
13732
|
containerRef,
|
|
@@ -13757,7 +13783,7 @@ function DashboardInfiniteScrollSelectInternal({
|
|
|
13757
13783
|
onClick: !isBlocked ? toggleMenu : void 0
|
|
13758
13784
|
}
|
|
13759
13785
|
),
|
|
13760
|
-
/* @__PURE__ */
|
|
13786
|
+
/* @__PURE__ */ jsxs100(
|
|
13761
13787
|
SelectMenuPanel,
|
|
13762
13788
|
{
|
|
13763
13789
|
isOpen,
|
|
@@ -13779,7 +13805,7 @@ function DashboardInfiniteScrollSelectInternal({
|
|
|
13779
13805
|
onKeyDown: handleSearchKeyDown
|
|
13780
13806
|
}
|
|
13781
13807
|
),
|
|
13782
|
-
filteredOptions.length === 0 && isLoadingMore ? /* @__PURE__ */
|
|
13808
|
+
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
13809
|
/* @__PURE__ */ jsx154(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
13784
13810
|
/* @__PURE__ */ jsx154("span", { children: resolvedLoadingMoreText })
|
|
13785
13811
|
] }) : 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 +13844,7 @@ var DashboardInfiniteScrollSelect = React50.forwardRef(
|
|
|
13818
13844
|
// src/dashboard/textarea/Textarea.tsx
|
|
13819
13845
|
import * as React51 from "react";
|
|
13820
13846
|
import { useTranslation as useTranslation34 } from "react-i18next";
|
|
13821
|
-
import { jsx as jsx155, jsxs as
|
|
13847
|
+
import { jsx as jsx155, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
13822
13848
|
var LINE_HEIGHT = 20;
|
|
13823
13849
|
var VERTICAL_PADDING = 32;
|
|
13824
13850
|
function getEmptyState(empty, value, defaultValue) {
|
|
@@ -13875,17 +13901,17 @@ var DashboardTextarea = React51.forwardRef(
|
|
|
13875
13901
|
resize();
|
|
13876
13902
|
onInput?.(event);
|
|
13877
13903
|
};
|
|
13878
|
-
return /* @__PURE__ */
|
|
13904
|
+
return /* @__PURE__ */ jsxs101(
|
|
13879
13905
|
"div",
|
|
13880
13906
|
{
|
|
13881
13907
|
className: cn(
|
|
13882
|
-
"relative block min-h-[88px] w-full",
|
|
13908
|
+
"relative block min-h-[88px] w-full max-w-[var(--field-max-width,296px)]",
|
|
13883
13909
|
isBlocked && "cursor-not-allowed opacity-50",
|
|
13884
13910
|
loading && "cursor-progress opacity-50",
|
|
13885
13911
|
className
|
|
13886
13912
|
),
|
|
13887
13913
|
children: [
|
|
13888
|
-
label && /* @__PURE__ */
|
|
13914
|
+
label && /* @__PURE__ */ jsxs101(
|
|
13889
13915
|
"label",
|
|
13890
13916
|
{
|
|
13891
13917
|
htmlFor: textareaId,
|
|
@@ -14368,7 +14394,7 @@ function useDatePickerWheel({
|
|
|
14368
14394
|
}
|
|
14369
14395
|
|
|
14370
14396
|
// src/airbnb-fields/datepicker/DatePickerWheelColumn.tsx
|
|
14371
|
-
import { jsx as jsx156, jsxs as
|
|
14397
|
+
import { jsx as jsx156, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14372
14398
|
var spacerHeight = DATE_PICKER_OPTION_HEIGHT * DATE_PICKER_WHEEL_BUFFER_OPTIONS;
|
|
14373
14399
|
function AirbnbDatePickerWheelColumn({
|
|
14374
14400
|
id,
|
|
@@ -14382,7 +14408,7 @@ function AirbnbDatePickerWheelColumn({
|
|
|
14382
14408
|
onOptionSelect,
|
|
14383
14409
|
column
|
|
14384
14410
|
}) {
|
|
14385
|
-
return /* @__PURE__ */ jsx156("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */
|
|
14411
|
+
return /* @__PURE__ */ jsx156("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */ jsxs102(
|
|
14386
14412
|
"div",
|
|
14387
14413
|
{
|
|
14388
14414
|
id,
|
|
@@ -14429,7 +14455,7 @@ function AirbnbDatePickerWheelColumn({
|
|
|
14429
14455
|
}
|
|
14430
14456
|
|
|
14431
14457
|
// src/airbnb-fields/datepicker/DatePickerContent.tsx
|
|
14432
|
-
import { jsx as jsx157, jsxs as
|
|
14458
|
+
import { jsx as jsx157, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
14433
14459
|
function AirbnbDatePickerBody({
|
|
14434
14460
|
baseId,
|
|
14435
14461
|
label,
|
|
@@ -14451,8 +14477,8 @@ function AirbnbDatePickerBody({
|
|
|
14451
14477
|
onOptionSelect,
|
|
14452
14478
|
onDone
|
|
14453
14479
|
}) {
|
|
14454
|
-
return /* @__PURE__ */
|
|
14455
|
-
/* @__PURE__ */
|
|
14480
|
+
return /* @__PURE__ */ jsxs103("div", { className: "px-6 pb-4 pt-1 bg-white", children: [
|
|
14481
|
+
/* @__PURE__ */ jsxs103("div", { className: "relative overflow-hidden rounded-[24px]", children: [
|
|
14456
14482
|
/* @__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
14483
|
/* @__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
14484
|
/* @__PURE__ */ jsx157(
|
|
@@ -14462,7 +14488,7 @@ function AirbnbDatePickerBody({
|
|
|
14462
14488
|
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
14489
|
}
|
|
14464
14490
|
),
|
|
14465
|
-
/* @__PURE__ */
|
|
14491
|
+
/* @__PURE__ */ jsxs103("div", { className: "relative grid grid-cols-[1.35fr_0.7fr_1fr] gap-1", children: [
|
|
14466
14492
|
/* @__PURE__ */ jsx157(
|
|
14467
14493
|
AirbnbDatePickerWheelColumn,
|
|
14468
14494
|
{
|
|
@@ -14563,7 +14589,7 @@ function AirbnbDatePickerContent({
|
|
|
14563
14589
|
}
|
|
14564
14590
|
);
|
|
14565
14591
|
if (isMobile3) {
|
|
14566
|
-
return /* @__PURE__ */ jsx157(Drawer, { open, onOpenChange, children: /* @__PURE__ */
|
|
14592
|
+
return /* @__PURE__ */ jsx157(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs103(
|
|
14567
14593
|
DrawerContent,
|
|
14568
14594
|
{
|
|
14569
14595
|
onClose: () => onOpenChange(false),
|
|
@@ -14576,7 +14602,7 @@ function AirbnbDatePickerContent({
|
|
|
14576
14602
|
}
|
|
14577
14603
|
) });
|
|
14578
14604
|
}
|
|
14579
|
-
return /* @__PURE__ */ jsx157(Dialog, { open, onOpenChange, children: /* @__PURE__ */
|
|
14605
|
+
return /* @__PURE__ */ jsx157(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs103(
|
|
14580
14606
|
DialogContent,
|
|
14581
14607
|
{
|
|
14582
14608
|
className: "max-w-[520px] rounded-[28px] border-0 p-0 shadow-xl",
|
|
@@ -14591,7 +14617,7 @@ function AirbnbDatePickerContent({
|
|
|
14591
14617
|
}
|
|
14592
14618
|
|
|
14593
14619
|
// src/dashboard/datepicker/Datepicker.tsx
|
|
14594
|
-
import { jsx as jsx158, jsxs as
|
|
14620
|
+
import { jsx as jsx158, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
14595
14621
|
var MONTHS_IN_YEAR2 = 12;
|
|
14596
14622
|
function getMonthLabels2(locale) {
|
|
14597
14623
|
const formatter = new Intl.DateTimeFormat(locale, { month: "long" });
|
|
@@ -14917,15 +14943,15 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14917
14943
|
{
|
|
14918
14944
|
ref: containerRef,
|
|
14919
14945
|
className: cn(
|
|
14920
|
-
"relative w-full max-w-[var(--max-
|
|
14946
|
+
"relative w-full max-w-[var(--field-max-width,296px)]",
|
|
14921
14947
|
disabled && "cursor-not-allowed opacity-50",
|
|
14922
14948
|
loading && "cursor-progress",
|
|
14923
14949
|
className
|
|
14924
14950
|
),
|
|
14925
14951
|
style: wrapperWidth ? { width: wrapperWidth } : void 0,
|
|
14926
|
-
children: /* @__PURE__ */
|
|
14927
|
-
/* @__PURE__ */
|
|
14928
|
-
isMobile3 ? /* @__PURE__ */
|
|
14952
|
+
children: /* @__PURE__ */ jsxs104("div", { className: "relative min-h-[68px] w-full", children: [
|
|
14953
|
+
/* @__PURE__ */ jsxs104("div", { className: "relative w-full", children: [
|
|
14954
|
+
isMobile3 ? /* @__PURE__ */ jsxs104(
|
|
14929
14955
|
"button",
|
|
14930
14956
|
{
|
|
14931
14957
|
ref: mobileTriggerRef,
|
|
@@ -14945,7 +14971,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14945
14971
|
),
|
|
14946
14972
|
children: [
|
|
14947
14973
|
/* @__PURE__ */ jsx158("span", { className: "block min-w-0 flex-1 truncate text-left", children: triggerText ?? (isWheelOpen ? mobilePlaceholder : null) }),
|
|
14948
|
-
/* @__PURE__ */
|
|
14974
|
+
/* @__PURE__ */ jsxs104("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
14949
14975
|
loading && /* @__PURE__ */ jsx158(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
14950
14976
|
/* @__PURE__ */ jsx158(
|
|
14951
14977
|
ChevronDown3,
|
|
@@ -14960,7 +14986,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14960
14986
|
] })
|
|
14961
14987
|
]
|
|
14962
14988
|
}
|
|
14963
|
-
) : /* @__PURE__ */
|
|
14989
|
+
) : /* @__PURE__ */ jsxs104(
|
|
14964
14990
|
"div",
|
|
14965
14991
|
{
|
|
14966
14992
|
className: cn(
|
|
@@ -14989,7 +15015,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
14989
15015
|
className: subInputClass
|
|
14990
15016
|
}
|
|
14991
15017
|
) }),
|
|
14992
|
-
/* @__PURE__ */
|
|
15018
|
+
/* @__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
15019
|
/* @__PURE__ */ jsx158(
|
|
14994
15020
|
"input",
|
|
14995
15021
|
{
|
|
@@ -15050,7 +15076,7 @@ var DashboardDatepicker = React53.forwardRef(
|
|
|
15050
15076
|
}
|
|
15051
15077
|
)
|
|
15052
15078
|
] }),
|
|
15053
|
-
/* @__PURE__ */
|
|
15079
|
+
/* @__PURE__ */ jsxs104("div", { className: "flex h-full min-w-0 items-center px-2 sm:px-4", children: [
|
|
15054
15080
|
/* @__PURE__ */ jsx158(
|
|
15055
15081
|
"input",
|
|
15056
15082
|
{
|
|
@@ -15370,7 +15396,7 @@ function resolveRangeSelection({
|
|
|
15370
15396
|
|
|
15371
15397
|
// src/dashboard/date-range-picker/components/DateRangeInputs.tsx
|
|
15372
15398
|
import { CalendarDays, SquareX as SquareX4 } from "lucide-react";
|
|
15373
|
-
import { jsx as jsx159, jsxs as
|
|
15399
|
+
import { jsx as jsx159, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
15374
15400
|
var DEFAULT_PLACEHOLDER = "00-00-0000";
|
|
15375
15401
|
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
15402
|
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 +15438,7 @@ function DateRangeInputs({
|
|
|
15412
15438
|
isBlocked && "cursor-not-allowed",
|
|
15413
15439
|
loading && "cursor-progress"
|
|
15414
15440
|
);
|
|
15415
|
-
return /* @__PURE__ */
|
|
15441
|
+
return /* @__PURE__ */ jsxs105(
|
|
15416
15442
|
"div",
|
|
15417
15443
|
{
|
|
15418
15444
|
className: cn(
|
|
@@ -15480,7 +15506,7 @@ function DateRangeInputs({
|
|
|
15480
15506
|
)
|
|
15481
15507
|
}
|
|
15482
15508
|
),
|
|
15483
|
-
/* @__PURE__ */
|
|
15509
|
+
/* @__PURE__ */ jsxs105("span", { className: "ml-auto flex shrink-0 items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
15484
15510
|
loading && /* @__PURE__ */ jsx159(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
15485
15511
|
!readOnly && !hideClearDates && !isEmpty && /* @__PURE__ */ jsx159(
|
|
15486
15512
|
"button",
|
|
@@ -15554,7 +15580,7 @@ function DateRangeCalendar({
|
|
|
15554
15580
|
}
|
|
15555
15581
|
|
|
15556
15582
|
// src/dashboard/date-range-picker/components/DateRangePopover.tsx
|
|
15557
|
-
import { jsx as jsx161, jsxs as
|
|
15583
|
+
import { jsx as jsx161, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
15558
15584
|
function DateRangePopover({
|
|
15559
15585
|
isOpen,
|
|
15560
15586
|
isMobile: isMobile3,
|
|
@@ -15573,7 +15599,7 @@ function DateRangePopover({
|
|
|
15573
15599
|
onOpenChange: (next) => {
|
|
15574
15600
|
if (!next) onClose();
|
|
15575
15601
|
},
|
|
15576
|
-
children: /* @__PURE__ */
|
|
15602
|
+
children: /* @__PURE__ */ jsxs106(
|
|
15577
15603
|
DrawerContent,
|
|
15578
15604
|
{
|
|
15579
15605
|
onClose,
|
|
@@ -15602,7 +15628,7 @@ function DateRangePopover({
|
|
|
15602
15628
|
}
|
|
15603
15629
|
|
|
15604
15630
|
// src/dashboard/date-range-picker/DateRangePicker.tsx
|
|
15605
|
-
import { jsx as jsx162, jsxs as
|
|
15631
|
+
import { jsx as jsx162, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
15606
15632
|
var DashboardDateRangePicker = React57.forwardRef(function DashboardDateRangePicker2({
|
|
15607
15633
|
label,
|
|
15608
15634
|
value: externalValue,
|
|
@@ -15768,14 +15794,14 @@ var DashboardDateRangePicker = React57.forwardRef(function DashboardDateRangePic
|
|
|
15768
15794
|
{
|
|
15769
15795
|
ref: containerRef,
|
|
15770
15796
|
className: cn(
|
|
15771
|
-
"relative w-full max-w-[var(--max-
|
|
15797
|
+
"relative w-full max-w-[var(--field-max-width,296px)]",
|
|
15772
15798
|
disabled && "cursor-not-allowed opacity-50",
|
|
15773
15799
|
loading && "cursor-progress",
|
|
15774
15800
|
className
|
|
15775
15801
|
),
|
|
15776
15802
|
style: wrapperWidth ? { width: wrapperWidth } : void 0,
|
|
15777
|
-
children: /* @__PURE__ */
|
|
15778
|
-
/* @__PURE__ */
|
|
15803
|
+
children: /* @__PURE__ */ jsxs107("div", { className: "relative min-h-[68px] w-full", children: [
|
|
15804
|
+
/* @__PURE__ */ jsxs107("div", { className: "relative w-full", children: [
|
|
15779
15805
|
/* @__PURE__ */ jsx162(
|
|
15780
15806
|
DateRangeInputs,
|
|
15781
15807
|
{
|
|
@@ -16058,7 +16084,7 @@ var DashboardTimePicker = React59.forwardRef(
|
|
|
16058
16084
|
import * as React60 from "react";
|
|
16059
16085
|
import { Download, Paperclip, SquareX as SquareX5 } from "lucide-react";
|
|
16060
16086
|
import { useTranslation as useTranslation38 } from "react-i18next";
|
|
16061
|
-
import { jsx as jsx164, jsxs as
|
|
16087
|
+
import { jsx as jsx164, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
16062
16088
|
function defaultDownload(url) {
|
|
16063
16089
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
16064
16090
|
}
|
|
@@ -16116,12 +16142,12 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16116
16142
|
event.stopPropagation();
|
|
16117
16143
|
if (isUrl) onDownload(value);
|
|
16118
16144
|
};
|
|
16119
|
-
return /* @__PURE__ */
|
|
16145
|
+
return /* @__PURE__ */ jsxs108(
|
|
16120
16146
|
"label",
|
|
16121
16147
|
{
|
|
16122
16148
|
htmlFor: inputId,
|
|
16123
16149
|
className: cn(
|
|
16124
|
-
"relative block w-full max-w-[var(--max-
|
|
16150
|
+
"relative block w-full max-w-[var(--field-max-width,296px)] cursor-pointer text-left",
|
|
16125
16151
|
(disabled || readOnly) && "cursor-not-allowed",
|
|
16126
16152
|
loading && "cursor-progress",
|
|
16127
16153
|
disabled && "opacity-50",
|
|
@@ -16145,9 +16171,9 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16145
16171
|
"aria-invalid": isInvalid
|
|
16146
16172
|
}
|
|
16147
16173
|
),
|
|
16148
|
-
/* @__PURE__ */
|
|
16149
|
-
/* @__PURE__ */
|
|
16150
|
-
/* @__PURE__ */
|
|
16174
|
+
/* @__PURE__ */ jsxs108("div", { className: "relative min-h-[68px] w-full", children: [
|
|
16175
|
+
/* @__PURE__ */ jsxs108("div", { className: "relative w-full", children: [
|
|
16176
|
+
/* @__PURE__ */ jsxs108(
|
|
16151
16177
|
"div",
|
|
16152
16178
|
{
|
|
16153
16179
|
className: cn(
|
|
@@ -16155,13 +16181,13 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16155
16181
|
isEmpty && "bg-[var(--chekin-color-surface-input-empty)]"
|
|
16156
16182
|
),
|
|
16157
16183
|
children: [
|
|
16158
|
-
hasFileChip ? /* @__PURE__ */
|
|
16184
|
+
hasFileChip ? /* @__PURE__ */ jsxs108(
|
|
16159
16185
|
"div",
|
|
16160
16186
|
{
|
|
16161
16187
|
className: "inline-flex h-6 max-w-[85%] items-center rounded-[4px] border border-[#acacd5] bg-[#f0f0f8] pl-[10px] pr-1",
|
|
16162
16188
|
onClick: (event) => event.preventDefault(),
|
|
16163
16189
|
children: [
|
|
16164
|
-
isUrl ? /* @__PURE__ */
|
|
16190
|
+
isUrl ? /* @__PURE__ */ jsxs108(
|
|
16165
16191
|
"button",
|
|
16166
16192
|
{
|
|
16167
16193
|
type: "button",
|
|
@@ -16187,7 +16213,7 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16187
16213
|
]
|
|
16188
16214
|
}
|
|
16189
16215
|
) : /* @__PURE__ */ jsx164("span", { className: "block min-w-0 flex-1 truncate text-left text-[var(--chekin-color-gray-1)]", children: placeholder ?? "" }),
|
|
16190
|
-
/* @__PURE__ */
|
|
16216
|
+
/* @__PURE__ */ jsxs108("span", { className: "ml-auto flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
16191
16217
|
loading && /* @__PURE__ */ jsx164(ThreeDotsLoader, { height: 18, width: 18 }),
|
|
16192
16218
|
/* @__PURE__ */ jsx164(Paperclip, { size: 20 })
|
|
16193
16219
|
] })
|
|
@@ -16231,7 +16257,7 @@ var DashboardFileInput = React60.forwardRef(
|
|
|
16231
16257
|
|
|
16232
16258
|
// src/dashboard/select-icons-box/SelectIconsBox.tsx
|
|
16233
16259
|
import * as React61 from "react";
|
|
16234
|
-
import { jsx as jsx165, jsxs as
|
|
16260
|
+
import { jsx as jsx165, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
16235
16261
|
function DashboardSelectIconsBox({
|
|
16236
16262
|
children,
|
|
16237
16263
|
icons,
|
|
@@ -16267,7 +16293,7 @@ function DashboardSelectIconsBox({
|
|
|
16267
16293
|
onSelect(iconName);
|
|
16268
16294
|
setOpen(false);
|
|
16269
16295
|
};
|
|
16270
|
-
return /* @__PURE__ */
|
|
16296
|
+
return /* @__PURE__ */ jsxs109(
|
|
16271
16297
|
"div",
|
|
16272
16298
|
{
|
|
16273
16299
|
ref: containerRef,
|
|
@@ -16367,13 +16393,13 @@ function getErrorMessage(error) {
|
|
|
16367
16393
|
|
|
16368
16394
|
// src/lib/toastResponseError.tsx
|
|
16369
16395
|
import i18next from "i18next";
|
|
16370
|
-
import { jsx as jsx166, jsxs as
|
|
16396
|
+
import { jsx as jsx166, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
16371
16397
|
function addSupportEmailToMessage(message, prefixText) {
|
|
16372
16398
|
if (typeof message !== "string") {
|
|
16373
16399
|
return message;
|
|
16374
16400
|
}
|
|
16375
16401
|
const builtMessage = `${prefixText ? `${prefixText} ` : ""}${message}`;
|
|
16376
|
-
return /* @__PURE__ */
|
|
16402
|
+
return /* @__PURE__ */ jsxs110("div", { children: [
|
|
16377
16403
|
/* @__PURE__ */ jsx166("div", { children: builtMessage }),
|
|
16378
16404
|
i18next.t("reach_us_at_email")
|
|
16379
16405
|
] });
|
|
@@ -16390,11 +16416,11 @@ function toastResponseError(error, options = {}) {
|
|
|
16390
16416
|
|
|
16391
16417
|
// src/legacy-fields/textarea/Textarea.tsx
|
|
16392
16418
|
import { forwardRef as forwardRef68, useId as useId15 } from "react";
|
|
16393
|
-
import { jsx as jsx167, jsxs as
|
|
16419
|
+
import { jsx as jsx167, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
16394
16420
|
var LegacyTextarea = forwardRef68(
|
|
16395
16421
|
({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
|
|
16396
16422
|
const inputId = useId15();
|
|
16397
|
-
return /* @__PURE__ */
|
|
16423
|
+
return /* @__PURE__ */ jsxs111("div", { className: cn("relative", className), children: [
|
|
16398
16424
|
/* @__PURE__ */ jsx167(
|
|
16399
16425
|
"textarea",
|
|
16400
16426
|
{
|
|
@@ -16436,7 +16462,7 @@ import { Calendar as Calendar2 } from "lucide-react";
|
|
|
16436
16462
|
import * as React62 from "react";
|
|
16437
16463
|
import { Loader2 as Loader24 } from "lucide-react";
|
|
16438
16464
|
import { useTranslation as useTranslation39 } from "react-i18next";
|
|
16439
|
-
import { Fragment as Fragment17, jsx as jsx168, jsxs as
|
|
16465
|
+
import { Fragment as Fragment17, jsx as jsx168, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
16440
16466
|
var AirbnbFieldTrigger = React62.forwardRef(
|
|
16441
16467
|
({
|
|
16442
16468
|
as = "button",
|
|
@@ -16474,9 +16500,9 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16474
16500
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
16475
16501
|
const visibleLabelText = labelText ?? label;
|
|
16476
16502
|
const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
|
|
16477
|
-
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */
|
|
16503
|
+
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ jsxs112("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
|
|
16478
16504
|
/* @__PURE__ */ jsx168("span", { className: "min-w-0 truncate", children: visibleLabelText }),
|
|
16479
|
-
optionalLabel && /* @__PURE__ */
|
|
16505
|
+
optionalLabel && /* @__PURE__ */ jsxs112("span", { className: "shrink-0 text-[12px] relative top-[1px] font-normal leading-4 text-current opacity-70", children: [
|
|
16480
16506
|
"(",
|
|
16481
16507
|
optionalLabel,
|
|
16482
16508
|
")"
|
|
@@ -16497,7 +16523,7 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16497
16523
|
const hasInvalidState = Boolean(error);
|
|
16498
16524
|
const errorMessage = typeof error === "string" ? error : void 0;
|
|
16499
16525
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
16500
|
-
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */
|
|
16526
|
+
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ jsxs112("span", { className: "flex items-center gap-2", children: [
|
|
16501
16527
|
trailingAdornment,
|
|
16502
16528
|
loading && /* @__PURE__ */ jsx168(
|
|
16503
16529
|
Loader24,
|
|
@@ -16515,8 +16541,8 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16515
16541
|
disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : isAirbnbVariant ? "cursor-pointer" : "cursor-text",
|
|
16516
16542
|
className
|
|
16517
16543
|
);
|
|
16518
|
-
const sharedContent = /* @__PURE__ */
|
|
16519
|
-
/* @__PURE__ */
|
|
16544
|
+
const sharedContent = /* @__PURE__ */ jsxs112(Fragment17, { children: [
|
|
16545
|
+
/* @__PURE__ */ jsxs112(
|
|
16520
16546
|
"span",
|
|
16521
16547
|
{
|
|
16522
16548
|
className: cn(
|
|
@@ -16565,7 +16591,7 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16565
16591
|
}
|
|
16566
16592
|
)
|
|
16567
16593
|
] });
|
|
16568
|
-
return /* @__PURE__ */
|
|
16594
|
+
return /* @__PURE__ */ jsxs112("div", { className: "w-full", children: [
|
|
16569
16595
|
topLabel && /* @__PURE__ */ jsx168("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[#222222]", children: topLabel }),
|
|
16570
16596
|
as === "button" ? /* @__PURE__ */ jsx168(
|
|
16571
16597
|
"button",
|
|
@@ -16608,7 +16634,7 @@ var AirbnbFieldTrigger = React62.forwardRef(
|
|
|
16608
16634
|
AirbnbFieldTrigger.displayName = "AirbnbFieldTrigger";
|
|
16609
16635
|
|
|
16610
16636
|
// src/airbnb-fields/datepicker/DatePicker.tsx
|
|
16611
|
-
import { jsx as jsx169, jsxs as
|
|
16637
|
+
import { jsx as jsx169, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
16612
16638
|
var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
|
|
16613
16639
|
var AirbnbDatePicker = React63.forwardRef(
|
|
16614
16640
|
({
|
|
@@ -16725,7 +16751,7 @@ var AirbnbDatePicker = React63.forwardRef(
|
|
|
16725
16751
|
setIsOpen(false);
|
|
16726
16752
|
}
|
|
16727
16753
|
}, [isBlocked]);
|
|
16728
|
-
return /* @__PURE__ */
|
|
16754
|
+
return /* @__PURE__ */ jsxs113("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
|
|
16729
16755
|
name && /* @__PURE__ */ jsx169(
|
|
16730
16756
|
"input",
|
|
16731
16757
|
{
|
|
@@ -16957,7 +16983,7 @@ import { ChevronDown as ChevronDown5 } from "lucide-react";
|
|
|
16957
16983
|
import * as React69 from "react";
|
|
16958
16984
|
|
|
16959
16985
|
// src/airbnb-fields/select/SelectDesktopMenu.tsx
|
|
16960
|
-
import { jsx as jsx171, jsxs as
|
|
16986
|
+
import { jsx as jsx171, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
16961
16987
|
function AirbnbSelectDesktopMenu({
|
|
16962
16988
|
id,
|
|
16963
16989
|
options,
|
|
@@ -16976,7 +17002,7 @@ function AirbnbSelectDesktopMenu({
|
|
|
16976
17002
|
noOptionsMessage
|
|
16977
17003
|
}) {
|
|
16978
17004
|
const emptyMessage = noOptionsMessage?.();
|
|
16979
|
-
return /* @__PURE__ */
|
|
17005
|
+
return /* @__PURE__ */ jsxs114(
|
|
16980
17006
|
"div",
|
|
16981
17007
|
{
|
|
16982
17008
|
id,
|
|
@@ -17152,7 +17178,7 @@ function getMobileOptionStyles(index, scrollTop) {
|
|
|
17152
17178
|
}
|
|
17153
17179
|
|
|
17154
17180
|
// src/airbnb-fields/select/SelectMobileWheel.tsx
|
|
17155
|
-
import { jsx as jsx173, jsxs as
|
|
17181
|
+
import { jsx as jsx173, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
17156
17182
|
function AirbnbSelectMobileWheel({
|
|
17157
17183
|
id,
|
|
17158
17184
|
options,
|
|
@@ -17171,7 +17197,7 @@ function AirbnbSelectMobileWheel({
|
|
|
17171
17197
|
}) {
|
|
17172
17198
|
const spacerHeight2 = getWheelSpacerHeight();
|
|
17173
17199
|
const emptyMessage = noOptionsMessage?.();
|
|
17174
|
-
return /* @__PURE__ */
|
|
17200
|
+
return /* @__PURE__ */ jsxs115(
|
|
17175
17201
|
"div",
|
|
17176
17202
|
{
|
|
17177
17203
|
id,
|
|
@@ -17196,7 +17222,7 @@ function AirbnbSelectMobileWheel({
|
|
|
17196
17222
|
)
|
|
17197
17223
|
}
|
|
17198
17224
|
),
|
|
17199
|
-
/* @__PURE__ */
|
|
17225
|
+
/* @__PURE__ */ jsxs115(
|
|
17200
17226
|
"div",
|
|
17201
17227
|
{
|
|
17202
17228
|
ref: listRef,
|
|
@@ -17246,7 +17272,7 @@ function AirbnbSelectMobileWheel({
|
|
|
17246
17272
|
}
|
|
17247
17273
|
|
|
17248
17274
|
// src/airbnb-fields/select/SelectMobileContent.tsx
|
|
17249
|
-
import { jsx as jsx174, jsxs as
|
|
17275
|
+
import { jsx as jsx174, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
17250
17276
|
function AirbnbSelectMobileContent({
|
|
17251
17277
|
open,
|
|
17252
17278
|
onOpenChange,
|
|
@@ -17270,10 +17296,10 @@ function AirbnbSelectMobileContent({
|
|
|
17270
17296
|
getOptionId: getOptionId2,
|
|
17271
17297
|
noOptionsMessage
|
|
17272
17298
|
}) {
|
|
17273
|
-
return /* @__PURE__ */ jsx174(Drawer, { open, onOpenChange, children: /* @__PURE__ */
|
|
17299
|
+
return /* @__PURE__ */ jsx174(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs116(DrawerContent, { onClose, lockScroll: false, children: [
|
|
17274
17300
|
/* @__PURE__ */ jsx174(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
17275
17301
|
/* @__PURE__ */ jsx174(DrawerDescription, { className: "sr-only", children: label }),
|
|
17276
|
-
/* @__PURE__ */
|
|
17302
|
+
/* @__PURE__ */ jsxs116("div", { className: "px-6 pb-4 pt-1", children: [
|
|
17277
17303
|
/* @__PURE__ */ jsx174(
|
|
17278
17304
|
AirbnbSelectMobileWheel,
|
|
17279
17305
|
{
|
|
@@ -17718,7 +17744,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
|
|
|
17718
17744
|
}
|
|
17719
17745
|
|
|
17720
17746
|
// src/airbnb-fields/select/Select.tsx
|
|
17721
|
-
import { jsx as jsx176, jsxs as
|
|
17747
|
+
import { jsx as jsx176, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
17722
17748
|
var AirbnbSelect = React69.forwardRef(function AirbnbSelect2({
|
|
17723
17749
|
options = [],
|
|
17724
17750
|
value,
|
|
@@ -17898,7 +17924,7 @@ var AirbnbSelect = React69.forwardRef(function AirbnbSelect2({
|
|
|
17898
17924
|
handleMobileOpenChange(false);
|
|
17899
17925
|
}
|
|
17900
17926
|
};
|
|
17901
|
-
return /* @__PURE__ */
|
|
17927
|
+
return /* @__PURE__ */ jsxs117(
|
|
17902
17928
|
"div",
|
|
17903
17929
|
{
|
|
17904
17930
|
ref: containerRef,
|
|
@@ -18013,7 +18039,7 @@ var AirbnbSelect = React69.forwardRef(function AirbnbSelect2({
|
|
|
18013
18039
|
});
|
|
18014
18040
|
|
|
18015
18041
|
// src/airbnb-fields/phone-field/PhoneField.tsx
|
|
18016
|
-
import { jsx as jsx177, jsxs as
|
|
18042
|
+
import { jsx as jsx177, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
18017
18043
|
function formatPhoneCodeOptionLabel(option) {
|
|
18018
18044
|
const label = String(option.label);
|
|
18019
18045
|
const value = String(option.value);
|
|
@@ -18060,7 +18086,7 @@ var AirbnbPhoneField = React70.forwardRef(
|
|
|
18060
18086
|
const hasInvalidState = Boolean(error) || Boolean(invalid);
|
|
18061
18087
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
18062
18088
|
const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
|
|
18063
|
-
return /* @__PURE__ */
|
|
18089
|
+
return /* @__PURE__ */ jsxs118("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
|
|
18064
18090
|
name && /* @__PURE__ */ jsx177("input", { type: "hidden", name, value: combinedValue, disabled }),
|
|
18065
18091
|
codeName && /* @__PURE__ */ jsx177(
|
|
18066
18092
|
"input",
|
|
@@ -18088,7 +18114,7 @@ var AirbnbPhoneField = React70.forwardRef(
|
|
|
18088
18114
|
children: topLabel
|
|
18089
18115
|
}
|
|
18090
18116
|
),
|
|
18091
|
-
/* @__PURE__ */
|
|
18117
|
+
/* @__PURE__ */ jsxs118("div", { className: "flex items-stretch", children: [
|
|
18092
18118
|
/* @__PURE__ */ jsx177(
|
|
18093
18119
|
AirbnbSelect,
|
|
18094
18120
|
{
|
|
@@ -18120,7 +18146,7 @@ var AirbnbPhoneField = React70.forwardRef(
|
|
|
18120
18146
|
onClick,
|
|
18121
18147
|
onKeyDown,
|
|
18122
18148
|
valueLabel
|
|
18123
|
-
}) => /* @__PURE__ */
|
|
18149
|
+
}) => /* @__PURE__ */ jsxs118(
|
|
18124
18150
|
"button",
|
|
18125
18151
|
{
|
|
18126
18152
|
id,
|
|
@@ -18195,10 +18221,10 @@ AirbnbPhoneField.displayName = "AirbnbPhoneField";
|
|
|
18195
18221
|
|
|
18196
18222
|
// src/airbnb-fields/searchable-select/SearchableSelect.tsx
|
|
18197
18223
|
import * as React71 from "react";
|
|
18198
|
-
import { ChevronDown as ChevronDown6, Search as
|
|
18224
|
+
import { ChevronDown as ChevronDown6, Search as Search5 } from "lucide-react";
|
|
18199
18225
|
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
18200
18226
|
import { useCallback as useCallback51 } from "react";
|
|
18201
|
-
import { jsx as jsx178, jsxs as
|
|
18227
|
+
import { jsx as jsx178, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
18202
18228
|
var ROW_HEIGHT = 48;
|
|
18203
18229
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
18204
18230
|
var MOBILE_LIST_HEIGHT = 420;
|
|
@@ -18395,7 +18421,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
18395
18421
|
}
|
|
18396
18422
|
);
|
|
18397
18423
|
React71.useImperativeHandle(ref, () => triggerRef.current, []);
|
|
18398
|
-
return /* @__PURE__ */
|
|
18424
|
+
return /* @__PURE__ */ jsxs119("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
|
|
18399
18425
|
name && /* @__PURE__ */ jsx178("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
18400
18426
|
/* @__PURE__ */ jsx178(
|
|
18401
18427
|
AirbnbFieldTrigger,
|
|
@@ -18455,7 +18481,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
18455
18481
|
}
|
|
18456
18482
|
closeSelect();
|
|
18457
18483
|
},
|
|
18458
|
-
children: /* @__PURE__ */
|
|
18484
|
+
children: /* @__PURE__ */ jsxs119(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
|
|
18459
18485
|
/* @__PURE__ */ jsx178(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
18460
18486
|
/* @__PURE__ */ jsx178(DrawerDescription, { className: "sr-only", children: label }),
|
|
18461
18487
|
/* @__PURE__ */ jsx178("div", { className: "px-5 pb-5 pt-1", children: content })
|
|
@@ -18528,10 +18554,10 @@ function AirbnbSearchableSelectContent({
|
|
|
18528
18554
|
virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
|
|
18529
18555
|
}
|
|
18530
18556
|
}, [highlightedIndex, virtualizer]);
|
|
18531
|
-
return /* @__PURE__ */
|
|
18532
|
-
/* @__PURE__ */
|
|
18557
|
+
return /* @__PURE__ */ jsxs119("div", { className: "p-2", children: [
|
|
18558
|
+
/* @__PURE__ */ jsxs119("div", { className: "relative mb-2", children: [
|
|
18533
18559
|
/* @__PURE__ */ jsx178(
|
|
18534
|
-
|
|
18560
|
+
Search5,
|
|
18535
18561
|
{
|
|
18536
18562
|
"aria-hidden": "true",
|
|
18537
18563
|
className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[#9696B9]"
|
|
@@ -18641,13 +18667,13 @@ function getNextEnabledIndex(options, startIndex, step) {
|
|
|
18641
18667
|
// src/airbnb-fields/search-input/SearchInput.tsx
|
|
18642
18668
|
import * as React72 from "react";
|
|
18643
18669
|
import { useTranslation as useTranslation40 } from "react-i18next";
|
|
18644
|
-
import { Search as
|
|
18645
|
-
import { jsx as jsx179, jsxs as
|
|
18670
|
+
import { Search as Search6, X as X10 } from "lucide-react";
|
|
18671
|
+
import { jsx as jsx179, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
18646
18672
|
var AirbnbSearchInput = React72.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
18647
18673
|
const { t } = useTranslation40();
|
|
18648
18674
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
18649
|
-
return /* @__PURE__ */
|
|
18650
|
-
/* @__PURE__ */ jsx179(
|
|
18675
|
+
return /* @__PURE__ */ jsxs120("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
18676
|
+
/* @__PURE__ */ jsx179(Search6, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
18651
18677
|
/* @__PURE__ */ jsx179(
|
|
18652
18678
|
"input",
|
|
18653
18679
|
{
|