@chekinapp/ui 0.0.136 → 0.0.137
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 +69 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +115 -83
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14745,6 +14745,7 @@ import * as React59 from "react";
|
|
|
14745
14745
|
import { useTranslation as useTranslation36 } from "react-i18next";
|
|
14746
14746
|
|
|
14747
14747
|
// src/dashboard/select-checkboxes/SelectCheckboxOption.tsx
|
|
14748
|
+
import { Check as Check7 } from "lucide-react";
|
|
14748
14749
|
import { jsx as jsx163, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
14749
14750
|
function SelectCheckboxOption(props) {
|
|
14750
14751
|
const {
|
|
@@ -14758,7 +14759,7 @@ function SelectCheckboxOption(props) {
|
|
|
14758
14759
|
onHover,
|
|
14759
14760
|
innerRef
|
|
14760
14761
|
} = props;
|
|
14761
|
-
return /* @__PURE__ */
|
|
14762
|
+
return /* @__PURE__ */ jsxs102(
|
|
14762
14763
|
"button",
|
|
14763
14764
|
{
|
|
14764
14765
|
id,
|
|
@@ -14778,10 +14779,25 @@ function SelectCheckboxOption(props) {
|
|
|
14778
14779
|
isSelected && "bg-[var(--chekin-color-surface-autocomplete)] font-semibold text-[var(--chekin-color-brand-blue)]",
|
|
14779
14780
|
isDisabled && "cursor-not-allowed text-[var(--chekin-color-gray-2)]"
|
|
14780
14781
|
),
|
|
14781
|
-
children:
|
|
14782
|
-
/* @__PURE__ */ jsx163(
|
|
14783
|
-
|
|
14784
|
-
|
|
14782
|
+
children: [
|
|
14783
|
+
/* @__PURE__ */ jsx163(
|
|
14784
|
+
"span",
|
|
14785
|
+
{
|
|
14786
|
+
"aria-hidden": "true",
|
|
14787
|
+
"data-state": isSelected ? "checked" : "unchecked",
|
|
14788
|
+
className: cn(
|
|
14789
|
+
"checkbox__control pointer-events-none flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-solid",
|
|
14790
|
+
isSelected ? "border-[var(--checkbox-checked-border)] bg-[var(--checkbox-checked-bg)] text-[var(--checkbox-check-color)]" : "border-[var(--checkbox-border)] bg-[var(--checkbox-bg)]",
|
|
14791
|
+
isDisabled && "opacity-50"
|
|
14792
|
+
),
|
|
14793
|
+
children: isSelected && /* @__PURE__ */ jsx163(Check7, { className: "checkbox__icon h-3 w-3" })
|
|
14794
|
+
}
|
|
14795
|
+
),
|
|
14796
|
+
/* @__PURE__ */ jsxs102("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-2", children: [
|
|
14797
|
+
/* @__PURE__ */ jsx163("span", { className: "block break-words", children: option.label }),
|
|
14798
|
+
option.description && /* @__PURE__ */ jsx163("span", { className: "shrink-0 text-[12px] font-medium italic text-[var(--chekin-color-gray-1)]", children: option.description })
|
|
14799
|
+
] })
|
|
14800
|
+
]
|
|
14785
14801
|
}
|
|
14786
14802
|
);
|
|
14787
14803
|
}
|
|
@@ -14872,9 +14888,10 @@ function createCountTrigger(opts) {
|
|
|
14872
14888
|
}
|
|
14873
14889
|
|
|
14874
14890
|
// src/dashboard/select-checkboxes/SelectAllRow.tsx
|
|
14875
|
-
import {
|
|
14891
|
+
import { Check as Check8 } from "lucide-react";
|
|
14892
|
+
import { jsx as jsx165, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
14876
14893
|
function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
14877
|
-
return /* @__PURE__ */
|
|
14894
|
+
return /* @__PURE__ */ jsxs104(
|
|
14878
14895
|
"button",
|
|
14879
14896
|
{
|
|
14880
14897
|
type: "button",
|
|
@@ -14884,7 +14901,22 @@ function SelectAllRow({ label, checked, disabled, onToggle }) {
|
|
|
14884
14901
|
"flex w-full items-center gap-3 border-0 border-b border-[#f2f4f8] bg-white px-4 py-[14px] text-left text-[16px] font-bold leading-5 text-[var(--chekin-color-brand-navy)] outline-none transition-colors hover:bg-[var(--chekin-color-surface-pressed)]",
|
|
14885
14902
|
disabled && "cursor-default opacity-40"
|
|
14886
14903
|
),
|
|
14887
|
-
children:
|
|
14904
|
+
children: [
|
|
14905
|
+
/* @__PURE__ */ jsx165(
|
|
14906
|
+
"span",
|
|
14907
|
+
{
|
|
14908
|
+
"aria-hidden": "true",
|
|
14909
|
+
"data-state": checked ? "checked" : "unchecked",
|
|
14910
|
+
className: cn(
|
|
14911
|
+
"checkbox__control pointer-events-none flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-solid",
|
|
14912
|
+
checked ? "border-[var(--checkbox-checked-border)] bg-[var(--checkbox-checked-bg)] text-[var(--checkbox-check-color)]" : "border-[var(--checkbox-border)] bg-[var(--checkbox-bg)]",
|
|
14913
|
+
disabled && "opacity-50"
|
|
14914
|
+
),
|
|
14915
|
+
children: checked && /* @__PURE__ */ jsx165(Check8, { className: "checkbox__icon h-3 w-3" })
|
|
14916
|
+
}
|
|
14917
|
+
),
|
|
14918
|
+
/* @__PURE__ */ jsx165("span", { className: "flex-1", children: label })
|
|
14919
|
+
]
|
|
14888
14920
|
}
|
|
14889
14921
|
);
|
|
14890
14922
|
}
|
|
@@ -15158,7 +15190,7 @@ function useTextareaValueState({
|
|
|
15158
15190
|
}
|
|
15159
15191
|
|
|
15160
15192
|
// src/dashboard/textarea/Textarea.tsx
|
|
15161
|
-
import { jsx as jsx167, jsxs as
|
|
15193
|
+
import { jsx as jsx167, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
15162
15194
|
var LINE_HEIGHT = 20;
|
|
15163
15195
|
var VERTICAL_PADDING = 32;
|
|
15164
15196
|
var Textarea = React61.forwardRef(function Textarea2({
|
|
@@ -15227,7 +15259,7 @@ var Textarea = React61.forwardRef(function Textarea2({
|
|
|
15227
15259
|
onBlur?.(event);
|
|
15228
15260
|
syncValueState();
|
|
15229
15261
|
};
|
|
15230
|
-
return /* @__PURE__ */
|
|
15262
|
+
return /* @__PURE__ */ jsxs105(
|
|
15231
15263
|
"div",
|
|
15232
15264
|
{
|
|
15233
15265
|
className: cn(
|
|
@@ -15237,7 +15269,7 @@ var Textarea = React61.forwardRef(function Textarea2({
|
|
|
15237
15269
|
className
|
|
15238
15270
|
),
|
|
15239
15271
|
children: [
|
|
15240
|
-
label && /* @__PURE__ */
|
|
15272
|
+
label && /* @__PURE__ */ jsxs105(
|
|
15241
15273
|
"label",
|
|
15242
15274
|
{
|
|
15243
15275
|
htmlFor: textareaId,
|
|
@@ -15722,7 +15754,7 @@ function useDatePickerWheel({
|
|
|
15722
15754
|
}
|
|
15723
15755
|
|
|
15724
15756
|
// src/airbnb-fields/datepicker/DatePickerWheelColumn.tsx
|
|
15725
|
-
import { jsx as jsx168, jsxs as
|
|
15757
|
+
import { jsx as jsx168, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
15726
15758
|
var spacerHeight = DATE_PICKER_OPTION_HEIGHT * DATE_PICKER_WHEEL_BUFFER_OPTIONS;
|
|
15727
15759
|
function AirbnbDatePickerWheelColumn({
|
|
15728
15760
|
id,
|
|
@@ -15736,7 +15768,7 @@ function AirbnbDatePickerWheelColumn({
|
|
|
15736
15768
|
onOptionSelect,
|
|
15737
15769
|
column
|
|
15738
15770
|
}) {
|
|
15739
|
-
return /* @__PURE__ */ jsx168("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */
|
|
15771
|
+
return /* @__PURE__ */ jsx168("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */ jsxs106(
|
|
15740
15772
|
"div",
|
|
15741
15773
|
{
|
|
15742
15774
|
id,
|
|
@@ -15783,7 +15815,7 @@ function AirbnbDatePickerWheelColumn({
|
|
|
15783
15815
|
}
|
|
15784
15816
|
|
|
15785
15817
|
// src/airbnb-fields/datepicker/DatePickerContent.tsx
|
|
15786
|
-
import { jsx as jsx169, jsxs as
|
|
15818
|
+
import { jsx as jsx169, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
15787
15819
|
function AirbnbDatePickerBody({
|
|
15788
15820
|
baseId,
|
|
15789
15821
|
label,
|
|
@@ -15805,8 +15837,8 @@ function AirbnbDatePickerBody({
|
|
|
15805
15837
|
onOptionSelect,
|
|
15806
15838
|
onDone
|
|
15807
15839
|
}) {
|
|
15808
|
-
return /* @__PURE__ */
|
|
15809
|
-
/* @__PURE__ */
|
|
15840
|
+
return /* @__PURE__ */ jsxs107("div", { className: "px-6 pb-4 pt-1 bg-white", children: [
|
|
15841
|
+
/* @__PURE__ */ jsxs107("div", { className: "relative overflow-hidden rounded-[24px]", children: [
|
|
15810
15842
|
/* @__PURE__ */ jsx169("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" }),
|
|
15811
15843
|
/* @__PURE__ */ jsx169("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" }),
|
|
15812
15844
|
/* @__PURE__ */ jsx169(
|
|
@@ -15816,7 +15848,7 @@ function AirbnbDatePickerBody({
|
|
|
15816
15848
|
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]"
|
|
15817
15849
|
}
|
|
15818
15850
|
),
|
|
15819
|
-
/* @__PURE__ */
|
|
15851
|
+
/* @__PURE__ */ jsxs107("div", { className: "relative grid grid-cols-[1.35fr_0.7fr_1fr] gap-1", children: [
|
|
15820
15852
|
/* @__PURE__ */ jsx169(
|
|
15821
15853
|
AirbnbDatePickerWheelColumn,
|
|
15822
15854
|
{
|
|
@@ -15917,7 +15949,7 @@ function AirbnbDatePickerContent({
|
|
|
15917
15949
|
}
|
|
15918
15950
|
);
|
|
15919
15951
|
if (isMobile3) {
|
|
15920
|
-
return /* @__PURE__ */ jsx169(Drawer, { open, onOpenChange, children: /* @__PURE__ */
|
|
15952
|
+
return /* @__PURE__ */ jsx169(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs107(
|
|
15921
15953
|
DrawerContent,
|
|
15922
15954
|
{
|
|
15923
15955
|
onClose: () => onOpenChange(false),
|
|
@@ -15930,7 +15962,7 @@ function AirbnbDatePickerContent({
|
|
|
15930
15962
|
}
|
|
15931
15963
|
) });
|
|
15932
15964
|
}
|
|
15933
|
-
return /* @__PURE__ */ jsx169(Dialog, { open, onOpenChange, children: /* @__PURE__ */
|
|
15965
|
+
return /* @__PURE__ */ jsx169(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs107(
|
|
15934
15966
|
DialogContent,
|
|
15935
15967
|
{
|
|
15936
15968
|
className: "max-w-[520px] rounded-[28px] border-0 p-0 shadow-xl",
|
|
@@ -15945,7 +15977,7 @@ function AirbnbDatePickerContent({
|
|
|
15945
15977
|
}
|
|
15946
15978
|
|
|
15947
15979
|
// src/dashboard/datepicker/Datepicker.tsx
|
|
15948
|
-
import { jsx as jsx170, jsxs as
|
|
15980
|
+
import { jsx as jsx170, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
15949
15981
|
var MONTHS_IN_YEAR2 = 12;
|
|
15950
15982
|
function getMonthLabels2(locale) {
|
|
15951
15983
|
const formatter = new Intl.DateTimeFormat(locale, { month: "long" });
|
|
@@ -16307,9 +16339,9 @@ var Datepicker = React63.forwardRef(
|
|
|
16307
16339
|
className
|
|
16308
16340
|
),
|
|
16309
16341
|
style: wrapperWidth ? { width: wrapperWidth } : void 0,
|
|
16310
|
-
children: /* @__PURE__ */
|
|
16311
|
-
/* @__PURE__ */
|
|
16312
|
-
isMobile3 ? /* @__PURE__ */
|
|
16342
|
+
children: /* @__PURE__ */ jsxs108("div", { className: "relative min-h-[var(--field-min-height,48px)] w-full", children: [
|
|
16343
|
+
/* @__PURE__ */ jsxs108("div", { className: "relative w-full", children: [
|
|
16344
|
+
isMobile3 ? /* @__PURE__ */ jsxs108(
|
|
16313
16345
|
"button",
|
|
16314
16346
|
{
|
|
16315
16347
|
ref: mobileTriggerRef,
|
|
@@ -16342,7 +16374,7 @@ var Datepicker = React63.forwardRef(
|
|
|
16342
16374
|
) })
|
|
16343
16375
|
]
|
|
16344
16376
|
}
|
|
16345
|
-
) : /* @__PURE__ */
|
|
16377
|
+
) : /* @__PURE__ */ jsxs108(
|
|
16346
16378
|
"div",
|
|
16347
16379
|
{
|
|
16348
16380
|
className: cn(
|
|
@@ -16378,7 +16410,7 @@ var Datepicker = React63.forwardRef(
|
|
|
16378
16410
|
className: subInputClass
|
|
16379
16411
|
}
|
|
16380
16412
|
) }),
|
|
16381
|
-
/* @__PURE__ */
|
|
16413
|
+
/* @__PURE__ */ jsxs108("div", { className: "relative flex h-full min-w-0 items-center gap-1 px-2 before:absolute before:inset-y-3 before:left-0 before:w-px before:bg-[var(--chekin-color-gray-3)] before:content-[''] after:absolute after:inset-y-3 after:right-0 after:w-px after:bg-[var(--chekin-color-gray-3)] after:content-[''] sm:px-3", children: [
|
|
16382
16414
|
/* @__PURE__ */ jsx170(
|
|
16383
16415
|
"input",
|
|
16384
16416
|
{
|
|
@@ -16872,7 +16904,7 @@ function resolveRangeSelection({
|
|
|
16872
16904
|
|
|
16873
16905
|
// src/dashboard/date-range-picker/components/DateRangeInputs.tsx
|
|
16874
16906
|
import { CalendarDays, SquareX as SquareX4 } from "lucide-react";
|
|
16875
|
-
import { jsx as jsx171, jsxs as
|
|
16907
|
+
import { jsx as jsx171, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
16876
16908
|
var DEFAULT_PLACEHOLDER = "00-00-0000";
|
|
16877
16909
|
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)]";
|
|
16878
16910
|
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";
|
|
@@ -16914,7 +16946,7 @@ function DateRangeInputs({
|
|
|
16914
16946
|
isBlocked && "cursor-not-allowed",
|
|
16915
16947
|
loading && "cursor-progress"
|
|
16916
16948
|
);
|
|
16917
|
-
return /* @__PURE__ */
|
|
16949
|
+
return /* @__PURE__ */ jsxs109(
|
|
16918
16950
|
"div",
|
|
16919
16951
|
{
|
|
16920
16952
|
className: cn(
|
|
@@ -16984,7 +17016,7 @@ function DateRangeInputs({
|
|
|
16984
17016
|
)
|
|
16985
17017
|
}
|
|
16986
17018
|
),
|
|
16987
|
-
/* @__PURE__ */
|
|
17019
|
+
/* @__PURE__ */ jsxs109("span", { className: "ml-auto flex shrink-0 items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
|
|
16988
17020
|
!readOnly && !hideClearDates && !isEmpty && /* @__PURE__ */ jsx171(
|
|
16989
17021
|
"button",
|
|
16990
17022
|
{
|
|
@@ -17057,7 +17089,7 @@ function DateRangeCalendar({
|
|
|
17057
17089
|
}
|
|
17058
17090
|
|
|
17059
17091
|
// src/dashboard/date-range-picker/components/DateRangePopover.tsx
|
|
17060
|
-
import { jsx as jsx173, jsxs as
|
|
17092
|
+
import { jsx as jsx173, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
17061
17093
|
function DateRangePopover({
|
|
17062
17094
|
isOpen,
|
|
17063
17095
|
isMobile: isMobile3,
|
|
@@ -17076,7 +17108,7 @@ function DateRangePopover({
|
|
|
17076
17108
|
onOpenChange: (next) => {
|
|
17077
17109
|
if (!next) onClose();
|
|
17078
17110
|
},
|
|
17079
|
-
children: /* @__PURE__ */
|
|
17111
|
+
children: /* @__PURE__ */ jsxs110(
|
|
17080
17112
|
DrawerContent,
|
|
17081
17113
|
{
|
|
17082
17114
|
onClose,
|
|
@@ -17105,7 +17137,7 @@ function DateRangePopover({
|
|
|
17105
17137
|
}
|
|
17106
17138
|
|
|
17107
17139
|
// src/dashboard/date-range-picker/DateRangePicker.tsx
|
|
17108
|
-
import { jsx as jsx174, jsxs as
|
|
17140
|
+
import { jsx as jsx174, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
17109
17141
|
var DateRangePicker = React67.forwardRef(function DateRangePicker2({
|
|
17110
17142
|
label,
|
|
17111
17143
|
value: externalValue,
|
|
@@ -17300,8 +17332,8 @@ var DateRangePicker = React67.forwardRef(function DateRangePicker2({
|
|
|
17300
17332
|
className
|
|
17301
17333
|
),
|
|
17302
17334
|
style: wrapperWidth ? { width: wrapperWidth } : void 0,
|
|
17303
|
-
children: /* @__PURE__ */
|
|
17304
|
-
/* @__PURE__ */
|
|
17335
|
+
children: /* @__PURE__ */ jsxs111("div", { className: "relative min-h-[var(--field-min-height,48px)] w-full", children: [
|
|
17336
|
+
/* @__PURE__ */ jsxs111("div", { className: "relative w-full", children: [
|
|
17305
17337
|
/* @__PURE__ */ jsx174(
|
|
17306
17338
|
DateRangeInputs,
|
|
17307
17339
|
{
|
|
@@ -17584,7 +17616,7 @@ var TimePicker = React69.forwardRef(function TimePicker2({ format: formatName =
|
|
|
17584
17616
|
import * as React70 from "react";
|
|
17585
17617
|
import { Download, Paperclip, SquareX as SquareX5 } from "lucide-react";
|
|
17586
17618
|
import { useTranslation as useTranslation41 } from "react-i18next";
|
|
17587
|
-
import { jsx as jsx176, jsxs as
|
|
17619
|
+
import { jsx as jsx176, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
17588
17620
|
function defaultDownload(url) {
|
|
17589
17621
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
17590
17622
|
}
|
|
@@ -17642,7 +17674,7 @@ var FileInput = React70.forwardRef(function FileInput2({
|
|
|
17642
17674
|
event.stopPropagation();
|
|
17643
17675
|
if (isUrl) onDownload(value);
|
|
17644
17676
|
};
|
|
17645
|
-
return /* @__PURE__ */
|
|
17677
|
+
return /* @__PURE__ */ jsxs112(
|
|
17646
17678
|
"label",
|
|
17647
17679
|
{
|
|
17648
17680
|
htmlFor: inputId,
|
|
@@ -17672,9 +17704,9 @@ var FileInput = React70.forwardRef(function FileInput2({
|
|
|
17672
17704
|
"aria-invalid": isInvalid
|
|
17673
17705
|
}
|
|
17674
17706
|
),
|
|
17675
|
-
/* @__PURE__ */
|
|
17676
|
-
/* @__PURE__ */
|
|
17677
|
-
/* @__PURE__ */
|
|
17707
|
+
/* @__PURE__ */ jsxs112("div", { className: "relative w-full", children: [
|
|
17708
|
+
/* @__PURE__ */ jsxs112("div", { className: "relative w-full", children: [
|
|
17709
|
+
/* @__PURE__ */ jsxs112(
|
|
17678
17710
|
"div",
|
|
17679
17711
|
{
|
|
17680
17712
|
className: cn(
|
|
@@ -17682,13 +17714,13 @@ var FileInput = React70.forwardRef(function FileInput2({
|
|
|
17682
17714
|
isEmpty && "bg-[var(--empty-field-background)]"
|
|
17683
17715
|
),
|
|
17684
17716
|
children: [
|
|
17685
|
-
hasFileChip ? /* @__PURE__ */
|
|
17717
|
+
hasFileChip ? /* @__PURE__ */ jsxs112(
|
|
17686
17718
|
"div",
|
|
17687
17719
|
{
|
|
17688
17720
|
className: "inline-flex h-6 max-w-[85%] items-center rounded-[4px] border border-[#acacd5] bg-[#f0f0f8] pl-[10px] pr-1",
|
|
17689
17721
|
onClick: (event) => event.preventDefault(),
|
|
17690
17722
|
children: [
|
|
17691
|
-
isUrl ? /* @__PURE__ */
|
|
17723
|
+
isUrl ? /* @__PURE__ */ jsxs112(
|
|
17692
17724
|
"button",
|
|
17693
17725
|
{
|
|
17694
17726
|
type: "button",
|
|
@@ -17754,7 +17786,7 @@ var FileInput = React70.forwardRef(function FileInput2({
|
|
|
17754
17786
|
|
|
17755
17787
|
// src/dashboard/select-icons-box/SelectIconsBox.tsx
|
|
17756
17788
|
import * as React71 from "react";
|
|
17757
|
-
import { jsx as jsx177, jsxs as
|
|
17789
|
+
import { jsx as jsx177, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
17758
17790
|
var FOCUSABLE_TRIGGER_SELECTOR2 = 'input:not([type="hidden"]):not([disabled]):not([readonly]), button:not([disabled])';
|
|
17759
17791
|
var SelectIconsBox = React71.forwardRef(
|
|
17760
17792
|
function SelectIconsBox2({
|
|
@@ -17802,7 +17834,7 @@ var SelectIconsBox = React71.forwardRef(
|
|
|
17802
17834
|
);
|
|
17803
17835
|
focusable?.focus();
|
|
17804
17836
|
};
|
|
17805
|
-
return /* @__PURE__ */
|
|
17837
|
+
return /* @__PURE__ */ jsxs113(
|
|
17806
17838
|
"div",
|
|
17807
17839
|
{
|
|
17808
17840
|
ref: combinedContainerRef,
|
|
@@ -17906,13 +17938,13 @@ function getErrorMessage(error) {
|
|
|
17906
17938
|
|
|
17907
17939
|
// src/lib/toastResponseError.tsx
|
|
17908
17940
|
import i18next from "i18next";
|
|
17909
|
-
import { jsx as jsx178, jsxs as
|
|
17941
|
+
import { jsx as jsx178, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
17910
17942
|
function addSupportEmailToMessage(message, prefixText) {
|
|
17911
17943
|
if (typeof message !== "string") {
|
|
17912
17944
|
return message;
|
|
17913
17945
|
}
|
|
17914
17946
|
const builtMessage = `${prefixText ? `${prefixText} ` : ""}${message}`;
|
|
17915
|
-
return /* @__PURE__ */
|
|
17947
|
+
return /* @__PURE__ */ jsxs114("div", { children: [
|
|
17916
17948
|
/* @__PURE__ */ jsx178("div", { children: builtMessage }),
|
|
17917
17949
|
i18next.t("reach_us_at_email")
|
|
17918
17950
|
] });
|
|
@@ -17929,11 +17961,11 @@ function toastResponseError(error, options = {}) {
|
|
|
17929
17961
|
|
|
17930
17962
|
// src/legacy-fields/textarea/Textarea.tsx
|
|
17931
17963
|
import { forwardRef as forwardRef72, useId as useId15 } from "react";
|
|
17932
|
-
import { jsx as jsx179, jsxs as
|
|
17964
|
+
import { jsx as jsx179, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
17933
17965
|
var LegacyTextarea = forwardRef72(
|
|
17934
17966
|
({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
|
|
17935
17967
|
const inputId = useId15();
|
|
17936
|
-
return /* @__PURE__ */
|
|
17968
|
+
return /* @__PURE__ */ jsxs115("div", { className: cn("relative", className), children: [
|
|
17937
17969
|
/* @__PURE__ */ jsx179(
|
|
17938
17970
|
"textarea",
|
|
17939
17971
|
{
|
|
@@ -17975,7 +18007,7 @@ import { Calendar as Calendar2 } from "lucide-react";
|
|
|
17975
18007
|
import * as React72 from "react";
|
|
17976
18008
|
import { Loader2 as Loader24 } from "lucide-react";
|
|
17977
18009
|
import { useTranslation as useTranslation42 } from "react-i18next";
|
|
17978
|
-
import { Fragment as Fragment17, jsx as jsx180, jsxs as
|
|
18010
|
+
import { Fragment as Fragment17, jsx as jsx180, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
17979
18011
|
var AirbnbFieldTrigger = React72.forwardRef(
|
|
17980
18012
|
({
|
|
17981
18013
|
as = "button",
|
|
@@ -18012,9 +18044,9 @@ var AirbnbFieldTrigger = React72.forwardRef(
|
|
|
18012
18044
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
18013
18045
|
const visibleLabelText = labelText ?? label;
|
|
18014
18046
|
const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
|
|
18015
|
-
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */
|
|
18047
|
+
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ jsxs116("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
|
|
18016
18048
|
/* @__PURE__ */ jsx180("span", { className: "min-w-0 truncate", children: visibleLabelText }),
|
|
18017
|
-
optionalLabel && /* @__PURE__ */
|
|
18049
|
+
optionalLabel && /* @__PURE__ */ jsxs116("span", { className: "text-current opacity-70 lowercase", children: [
|
|
18018
18050
|
"(",
|
|
18019
18051
|
optionalLabel,
|
|
18020
18052
|
")"
|
|
@@ -18034,7 +18066,7 @@ var AirbnbFieldTrigger = React72.forwardRef(
|
|
|
18034
18066
|
const hasInvalidState = Boolean(error);
|
|
18035
18067
|
const errorMessage = typeof error === "string" ? error : void 0;
|
|
18036
18068
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
18037
|
-
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */
|
|
18069
|
+
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ jsxs116("span", { className: "flex items-center gap-2", children: [
|
|
18038
18070
|
trailingAdornment,
|
|
18039
18071
|
loading && /* @__PURE__ */ jsx180(
|
|
18040
18072
|
Loader24,
|
|
@@ -18052,8 +18084,8 @@ var AirbnbFieldTrigger = React72.forwardRef(
|
|
|
18052
18084
|
disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : "cursor-pointer",
|
|
18053
18085
|
className
|
|
18054
18086
|
);
|
|
18055
|
-
const sharedContent = /* @__PURE__ */
|
|
18056
|
-
/* @__PURE__ */
|
|
18087
|
+
const sharedContent = /* @__PURE__ */ jsxs116(Fragment17, { children: [
|
|
18088
|
+
/* @__PURE__ */ jsxs116(
|
|
18057
18089
|
"span",
|
|
18058
18090
|
{
|
|
18059
18091
|
className: cn(
|
|
@@ -18099,7 +18131,7 @@ var AirbnbFieldTrigger = React72.forwardRef(
|
|
|
18099
18131
|
}
|
|
18100
18132
|
)
|
|
18101
18133
|
] });
|
|
18102
|
-
return /* @__PURE__ */
|
|
18134
|
+
return /* @__PURE__ */ jsxs116("div", { className: "w-full", children: [
|
|
18103
18135
|
topLabel && /* @__PURE__ */ jsx180("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[#222222]", children: topLabel }),
|
|
18104
18136
|
as === "button" ? /* @__PURE__ */ jsx180(
|
|
18105
18137
|
"button",
|
|
@@ -18142,7 +18174,7 @@ var AirbnbFieldTrigger = React72.forwardRef(
|
|
|
18142
18174
|
AirbnbFieldTrigger.displayName = "AirbnbFieldTrigger";
|
|
18143
18175
|
|
|
18144
18176
|
// src/airbnb-fields/datepicker/DatePicker.tsx
|
|
18145
|
-
import { jsx as jsx181, jsxs as
|
|
18177
|
+
import { jsx as jsx181, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
18146
18178
|
var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
|
|
18147
18179
|
var AirbnbDatePicker = React73.forwardRef(
|
|
18148
18180
|
({
|
|
@@ -18258,7 +18290,7 @@ var AirbnbDatePicker = React73.forwardRef(
|
|
|
18258
18290
|
setIsOpen(false);
|
|
18259
18291
|
}
|
|
18260
18292
|
}, [isBlocked]);
|
|
18261
|
-
return /* @__PURE__ */
|
|
18293
|
+
return /* @__PURE__ */ jsxs117("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
|
|
18262
18294
|
name && /* @__PURE__ */ jsx181(
|
|
18263
18295
|
"input",
|
|
18264
18296
|
{
|
|
@@ -18333,7 +18365,7 @@ AirbnbDatePicker.displayName = "AirbnbDatePicker";
|
|
|
18333
18365
|
import * as React74 from "react";
|
|
18334
18366
|
import { Eye as Eye2 } from "lucide-react";
|
|
18335
18367
|
import { useTranslation as useTranslation43 } from "react-i18next";
|
|
18336
|
-
import { jsx as jsx182, jsxs as
|
|
18368
|
+
import { jsx as jsx182, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
18337
18369
|
var getInputValue = (value) => value != null ? String(value) : "";
|
|
18338
18370
|
var AirbnbInput = React74.forwardRef(
|
|
18339
18371
|
({
|
|
@@ -18428,7 +18460,7 @@ var AirbnbInput = React74.forwardRef(
|
|
|
18428
18460
|
const togglePasswordReveal = () => {
|
|
18429
18461
|
setIsPasswordRevealed((isRevealed) => !isRevealed);
|
|
18430
18462
|
};
|
|
18431
|
-
return /* @__PURE__ */ jsx182("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */
|
|
18463
|
+
return /* @__PURE__ */ jsx182("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ jsxs118(
|
|
18432
18464
|
AirbnbFieldTrigger,
|
|
18433
18465
|
{
|
|
18434
18466
|
as: "div",
|
|
@@ -18520,7 +18552,7 @@ import { ChevronDown as ChevronDown6 } from "lucide-react";
|
|
|
18520
18552
|
import * as React79 from "react";
|
|
18521
18553
|
|
|
18522
18554
|
// src/airbnb-fields/select/SelectDesktopMenu.tsx
|
|
18523
|
-
import { jsx as jsx183, jsxs as
|
|
18555
|
+
import { jsx as jsx183, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
18524
18556
|
function AirbnbSelectDesktopMenu({
|
|
18525
18557
|
id,
|
|
18526
18558
|
options,
|
|
@@ -18539,7 +18571,7 @@ function AirbnbSelectDesktopMenu({
|
|
|
18539
18571
|
noOptionsMessage
|
|
18540
18572
|
}) {
|
|
18541
18573
|
const emptyMessage = noOptionsMessage?.();
|
|
18542
|
-
return /* @__PURE__ */
|
|
18574
|
+
return /* @__PURE__ */ jsxs119(
|
|
18543
18575
|
"div",
|
|
18544
18576
|
{
|
|
18545
18577
|
id,
|
|
@@ -18715,7 +18747,7 @@ function getMobileOptionStyles(index, scrollTop) {
|
|
|
18715
18747
|
}
|
|
18716
18748
|
|
|
18717
18749
|
// src/airbnb-fields/select/SelectMobileWheel.tsx
|
|
18718
|
-
import { jsx as jsx185, jsxs as
|
|
18750
|
+
import { jsx as jsx185, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
18719
18751
|
function AirbnbSelectMobileWheel({
|
|
18720
18752
|
id,
|
|
18721
18753
|
options,
|
|
@@ -18734,7 +18766,7 @@ function AirbnbSelectMobileWheel({
|
|
|
18734
18766
|
}) {
|
|
18735
18767
|
const spacerHeight2 = getWheelSpacerHeight();
|
|
18736
18768
|
const emptyMessage = noOptionsMessage?.();
|
|
18737
|
-
return /* @__PURE__ */
|
|
18769
|
+
return /* @__PURE__ */ jsxs120(
|
|
18738
18770
|
"div",
|
|
18739
18771
|
{
|
|
18740
18772
|
id,
|
|
@@ -18759,7 +18791,7 @@ function AirbnbSelectMobileWheel({
|
|
|
18759
18791
|
)
|
|
18760
18792
|
}
|
|
18761
18793
|
),
|
|
18762
|
-
/* @__PURE__ */
|
|
18794
|
+
/* @__PURE__ */ jsxs120(
|
|
18763
18795
|
"div",
|
|
18764
18796
|
{
|
|
18765
18797
|
ref: listRef,
|
|
@@ -18809,7 +18841,7 @@ function AirbnbSelectMobileWheel({
|
|
|
18809
18841
|
}
|
|
18810
18842
|
|
|
18811
18843
|
// src/airbnb-fields/select/SelectMobileContent.tsx
|
|
18812
|
-
import { jsx as jsx186, jsxs as
|
|
18844
|
+
import { jsx as jsx186, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
18813
18845
|
function AirbnbSelectMobileContent({
|
|
18814
18846
|
open,
|
|
18815
18847
|
onOpenChange,
|
|
@@ -18833,10 +18865,10 @@ function AirbnbSelectMobileContent({
|
|
|
18833
18865
|
getOptionId: getOptionId2,
|
|
18834
18866
|
noOptionsMessage
|
|
18835
18867
|
}) {
|
|
18836
|
-
return /* @__PURE__ */ jsx186(Drawer, { open, onOpenChange, children: /* @__PURE__ */
|
|
18868
|
+
return /* @__PURE__ */ jsx186(Drawer, { open, onOpenChange, children: /* @__PURE__ */ jsxs121(DrawerContent, { onClose, lockScroll: false, children: [
|
|
18837
18869
|
/* @__PURE__ */ jsx186(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
18838
18870
|
/* @__PURE__ */ jsx186(DrawerDescription, { className: "sr-only", children: label }),
|
|
18839
|
-
/* @__PURE__ */
|
|
18871
|
+
/* @__PURE__ */ jsxs121("div", { className: "px-6 pb-4 pt-1", children: [
|
|
18840
18872
|
/* @__PURE__ */ jsx186(
|
|
18841
18873
|
AirbnbSelectMobileWheel,
|
|
18842
18874
|
{
|
|
@@ -19279,7 +19311,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
|
|
|
19279
19311
|
}
|
|
19280
19312
|
|
|
19281
19313
|
// src/airbnb-fields/select/Select.tsx
|
|
19282
|
-
import { jsx as jsx188, jsxs as
|
|
19314
|
+
import { jsx as jsx188, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
19283
19315
|
var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
|
|
19284
19316
|
options = [],
|
|
19285
19317
|
value,
|
|
@@ -19460,7 +19492,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
|
|
|
19460
19492
|
handleMobileOpenChange(false);
|
|
19461
19493
|
}
|
|
19462
19494
|
};
|
|
19463
|
-
return /* @__PURE__ */
|
|
19495
|
+
return /* @__PURE__ */ jsxs122(
|
|
19464
19496
|
"div",
|
|
19465
19497
|
{
|
|
19466
19498
|
ref: containerRef,
|
|
@@ -19573,7 +19605,7 @@ var AirbnbSelect = React79.forwardRef(function AirbnbSelect2({
|
|
|
19573
19605
|
});
|
|
19574
19606
|
|
|
19575
19607
|
// src/airbnb-fields/phone-field/PhoneField.tsx
|
|
19576
|
-
import { jsx as jsx189, jsxs as
|
|
19608
|
+
import { jsx as jsx189, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
19577
19609
|
function formatPhoneCodeOptionLabel2(option) {
|
|
19578
19610
|
const label = String(option.label);
|
|
19579
19611
|
const value = String(option.value);
|
|
@@ -19621,7 +19653,7 @@ var AirbnbPhoneField = React80.forwardRef(
|
|
|
19621
19653
|
const hasInvalidState = Boolean(error) || Boolean(invalid);
|
|
19622
19654
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
19623
19655
|
const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
|
|
19624
|
-
return /* @__PURE__ */
|
|
19656
|
+
return /* @__PURE__ */ jsxs123("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
|
|
19625
19657
|
name && /* @__PURE__ */ jsx189("input", { type: "hidden", name, value: combinedValue, disabled }),
|
|
19626
19658
|
codeName && /* @__PURE__ */ jsx189(
|
|
19627
19659
|
"input",
|
|
@@ -19649,7 +19681,7 @@ var AirbnbPhoneField = React80.forwardRef(
|
|
|
19649
19681
|
children: topLabel
|
|
19650
19682
|
}
|
|
19651
19683
|
),
|
|
19652
|
-
/* @__PURE__ */
|
|
19684
|
+
/* @__PURE__ */ jsxs123("div", { className: "flex items-stretch", children: [
|
|
19653
19685
|
/* @__PURE__ */ jsx189(
|
|
19654
19686
|
AirbnbSelect,
|
|
19655
19687
|
{
|
|
@@ -19679,7 +19711,7 @@ var AirbnbPhoneField = React80.forwardRef(
|
|
|
19679
19711
|
onClick,
|
|
19680
19712
|
onKeyDown,
|
|
19681
19713
|
valueLabel
|
|
19682
|
-
}) => /* @__PURE__ */
|
|
19714
|
+
}) => /* @__PURE__ */ jsxs123(
|
|
19683
19715
|
"button",
|
|
19684
19716
|
{
|
|
19685
19717
|
id,
|
|
@@ -19753,7 +19785,7 @@ import * as React81 from "react";
|
|
|
19753
19785
|
import { ChevronDown as ChevronDown7, Search as Search4 } from "lucide-react";
|
|
19754
19786
|
import { useVirtualizer as useVirtualizer3 } from "@tanstack/react-virtual";
|
|
19755
19787
|
import { useCallback as useCallback57 } from "react";
|
|
19756
|
-
import { jsx as jsx190, jsxs as
|
|
19788
|
+
import { jsx as jsx190, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
19757
19789
|
var ROW_HEIGHT = 48;
|
|
19758
19790
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
19759
19791
|
var MOBILE_LIST_HEIGHT = 420;
|
|
@@ -19949,7 +19981,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
19949
19981
|
}
|
|
19950
19982
|
);
|
|
19951
19983
|
React81.useImperativeHandle(ref, () => triggerRef.current, []);
|
|
19952
|
-
return /* @__PURE__ */
|
|
19984
|
+
return /* @__PURE__ */ jsxs124("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
|
|
19953
19985
|
name && /* @__PURE__ */ jsx190("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
19954
19986
|
/* @__PURE__ */ jsx190(
|
|
19955
19987
|
AirbnbFieldTrigger,
|
|
@@ -20008,7 +20040,7 @@ var AirbnbSearchableSelectInternal = ({
|
|
|
20008
20040
|
}
|
|
20009
20041
|
closeSelect();
|
|
20010
20042
|
},
|
|
20011
|
-
children: /* @__PURE__ */
|
|
20043
|
+
children: /* @__PURE__ */ jsxs124(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
|
|
20012
20044
|
/* @__PURE__ */ jsx190(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
20013
20045
|
/* @__PURE__ */ jsx190(DrawerDescription, { className: "sr-only", children: label }),
|
|
20014
20046
|
/* @__PURE__ */ jsx190("div", { className: "px-5 pb-5 pt-1", children: content })
|
|
@@ -20081,8 +20113,8 @@ function AirbnbSearchableSelectContent({
|
|
|
20081
20113
|
virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
|
|
20082
20114
|
}
|
|
20083
20115
|
}, [highlightedIndex, virtualizer]);
|
|
20084
|
-
return /* @__PURE__ */
|
|
20085
|
-
/* @__PURE__ */
|
|
20116
|
+
return /* @__PURE__ */ jsxs124("div", { className: "p-2", children: [
|
|
20117
|
+
/* @__PURE__ */ jsxs124("div", { className: "relative mb-2", children: [
|
|
20086
20118
|
/* @__PURE__ */ jsx190(
|
|
20087
20119
|
Search4,
|
|
20088
20120
|
{
|
|
@@ -20195,11 +20227,11 @@ function getNextEnabledIndex(options, startIndex, step) {
|
|
|
20195
20227
|
import * as React82 from "react";
|
|
20196
20228
|
import { useTranslation as useTranslation44 } from "react-i18next";
|
|
20197
20229
|
import { Search as Search5, X as X11 } from "lucide-react";
|
|
20198
|
-
import { jsx as jsx191, jsxs as
|
|
20230
|
+
import { jsx as jsx191, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
20199
20231
|
var AirbnbSearchInput = React82.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
20200
20232
|
const { t } = useTranslation44();
|
|
20201
20233
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
20202
|
-
return /* @__PURE__ */
|
|
20234
|
+
return /* @__PURE__ */ jsxs125("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
20203
20235
|
/* @__PURE__ */ jsx191(Search5, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
20204
20236
|
/* @__PURE__ */ jsx191(
|
|
20205
20237
|
"input",
|
|
@@ -20236,8 +20268,8 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
|
|
|
20236
20268
|
// src/airbnb-fields/switch/Switch.tsx
|
|
20237
20269
|
import * as React83 from "react";
|
|
20238
20270
|
import * as SwitchPrimitives2 from "@radix-ui/react-switch";
|
|
20239
|
-
import { Check as
|
|
20240
|
-
import { Fragment as Fragment18, jsx as jsx192, jsxs as
|
|
20271
|
+
import { Check as Check9 } from "lucide-react";
|
|
20272
|
+
import { Fragment as Fragment18, jsx as jsx192, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
20241
20273
|
var AirbnbSwitch = React83.forwardRef(
|
|
20242
20274
|
({
|
|
20243
20275
|
className,
|
|
@@ -20282,7 +20314,7 @@ var AirbnbSwitch = React83.forwardRef(
|
|
|
20282
20314
|
"data-[state=checked]:translate-x-[12px] data-[state=unchecked]:translate-x-0"
|
|
20283
20315
|
),
|
|
20284
20316
|
children: /* @__PURE__ */ jsx192(
|
|
20285
|
-
|
|
20317
|
+
Check9,
|
|
20286
20318
|
{
|
|
20287
20319
|
"aria-hidden": "true",
|
|
20288
20320
|
className: "h-3 w-3 text-[#222222] opacity-0 transition-opacity duration-150 group-data-[state=checked]:opacity-100",
|
|
@@ -20296,8 +20328,8 @@ var AirbnbSwitch = React83.forwardRef(
|
|
|
20296
20328
|
if (!label && !error) {
|
|
20297
20329
|
return switchElement;
|
|
20298
20330
|
}
|
|
20299
|
-
return /* @__PURE__ */
|
|
20300
|
-
/* @__PURE__ */
|
|
20331
|
+
return /* @__PURE__ */ jsxs126(Fragment18, { children: [
|
|
20332
|
+
/* @__PURE__ */ jsxs126("div", { className: cn("flex items-center gap-x-3 gap-y-1.5", wrapperClassName), children: [
|
|
20301
20333
|
switchElement,
|
|
20302
20334
|
label && /* @__PURE__ */ jsx192(
|
|
20303
20335
|
Label,
|