@chekinapp/ui 0.0.2 → 0.0.4
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 +513 -385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -6
- package/dist/index.d.ts +27 -6
- package/dist/index.js +516 -389
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -172,6 +172,7 @@ __export(index_exports, {
|
|
|
172
172
|
RatingRadioGroup: () => RatingRadioGroup,
|
|
173
173
|
RatingStars: () => RatingStars,
|
|
174
174
|
RegistryIcon: () => RegistryIcon,
|
|
175
|
+
ResponsiveSheet: () => ResponsiveSheet,
|
|
175
176
|
RotateIcon: () => RotateIcon,
|
|
176
177
|
ScrollArea: () => ScrollArea,
|
|
177
178
|
ScrollBar: () => ScrollBar,
|
|
@@ -4982,6 +4983,10 @@ var import_react25 = require("react");
|
|
|
4982
4983
|
function getChekinRuntimeSettings() {
|
|
4983
4984
|
return window.ChekinProSettings || window.ChekinHousingsSDKSettings || {};
|
|
4984
4985
|
}
|
|
4986
|
+
function isMobileModalModeAvailable() {
|
|
4987
|
+
const settings = getChekinRuntimeSettings();
|
|
4988
|
+
return !settings.autoHeight;
|
|
4989
|
+
}
|
|
4985
4990
|
|
|
4986
4991
|
// src/lib/use-scroll-frame-into-view.ts
|
|
4987
4992
|
function useScrollFrameIntoView(active, options = {}) {
|
|
@@ -5298,37 +5303,42 @@ var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5298
5303
|
}
|
|
5299
5304
|
));
|
|
5300
5305
|
SelectLabel.displayName = "SelectLabel";
|
|
5301
|
-
var Select = (
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
}
|
|
5306
|
+
var Select = React19.forwardRef(
|
|
5307
|
+
({
|
|
5308
|
+
placeholder,
|
|
5309
|
+
label,
|
|
5310
|
+
supportingText,
|
|
5311
|
+
errorText,
|
|
5312
|
+
containerClassName,
|
|
5313
|
+
triggerClassName,
|
|
5314
|
+
children,
|
|
5315
|
+
...props
|
|
5316
|
+
}, ref) => {
|
|
5317
|
+
const reactId = React19.useId();
|
|
5318
|
+
const triggerId = props.name ?? reactId;
|
|
5319
|
+
const internalRef = React19.useRef(null);
|
|
5320
|
+
const combinedRef = useCombinedRef(ref, internalRef);
|
|
5321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: cn("flex flex-col gap-chekin-1 w-[300px]", containerClassName), children: [
|
|
5322
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
5323
|
+
"label",
|
|
5324
|
+
{
|
|
5325
|
+
htmlFor: triggerId,
|
|
5326
|
+
className: "text-chekin-navy font-sans font-medium text-[14px] leading-5",
|
|
5327
|
+
children: label
|
|
5328
|
+
}
|
|
5329
|
+
),
|
|
5330
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(SelectRoot, { ...props, children: [
|
|
5331
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SelectTrigger, { ref: combinedRef, id: triggerId, className: triggerClassName, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(RadixSelect.Value, { placeholder }) }),
|
|
5332
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SelectContent, { children })
|
|
5333
|
+
] }),
|
|
5334
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex justify-between min-h-[15px]", children: [
|
|
5335
|
+
supportingText && !errorText && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "text-chekin-gray-2 font-sans italic text-[12px] leading-[15px]", children: supportingText }),
|
|
5336
|
+
errorText && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "ml-auto text-chekin-red font-sans font-medium text-[12px] leading-4 text-right", children: errorText })
|
|
5337
|
+
] })
|
|
5338
|
+
] });
|
|
5339
|
+
}
|
|
5340
|
+
);
|
|
5341
|
+
Select.displayName = "Select";
|
|
5332
5342
|
|
|
5333
5343
|
// src/pagination/Pagination.tsx
|
|
5334
5344
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
@@ -9103,158 +9113,270 @@ FieldTrigger.displayName = "FieldTrigger";
|
|
|
9103
9113
|
// src/datepicker/DatePicker.tsx
|
|
9104
9114
|
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
9105
9115
|
var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
+
var DatePicker = React30.forwardRef(
|
|
9117
|
+
({
|
|
9118
|
+
variant = "default",
|
|
9119
|
+
label,
|
|
9120
|
+
topLabel,
|
|
9121
|
+
value,
|
|
9122
|
+
defaultValue,
|
|
9123
|
+
onChange,
|
|
9124
|
+
placeholder = "Select a date",
|
|
9125
|
+
disabled,
|
|
9126
|
+
error,
|
|
9127
|
+
className,
|
|
9128
|
+
name,
|
|
9129
|
+
minDate,
|
|
9130
|
+
maxDate,
|
|
9131
|
+
locale = "en-US",
|
|
9132
|
+
mobileTitle,
|
|
9133
|
+
doneLabel = "Done",
|
|
9134
|
+
formatValue = formatDateValue
|
|
9135
|
+
}, ref) => {
|
|
9136
|
+
const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
|
|
9137
|
+
const [isOpen, setIsOpen] = React30.useState(false);
|
|
9138
|
+
const triggerId = React30.useId();
|
|
9139
|
+
const pickerId = React30.useId();
|
|
9140
|
+
const labelId = React30.useId();
|
|
9141
|
+
const valueId = React30.useId();
|
|
9142
|
+
const helperTextId = React30.useId();
|
|
9143
|
+
const errorId = React30.useId();
|
|
9144
|
+
const internalRef = React30.useRef(null);
|
|
9145
|
+
const combinedRef = useCombinedRef(ref, internalRef);
|
|
9146
|
+
const monthLabels = React30.useMemo(() => getMonthLabels(locale), [locale]);
|
|
9147
|
+
const resolvedMinDate = React30.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
|
|
9148
|
+
const resolvedMaxDate = React30.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
|
|
9149
|
+
const resolvedValue = React30.useMemo(
|
|
9150
|
+
() => value ? clampDate(value, resolvedMinDate, resolvedMaxDate) : null,
|
|
9151
|
+
[resolvedMaxDate, resolvedMinDate, value]
|
|
9152
|
+
);
|
|
9153
|
+
const hasValue = Boolean(resolvedValue);
|
|
9154
|
+
const {
|
|
9155
|
+
dayIndex,
|
|
9156
|
+
dayListRef,
|
|
9157
|
+
dayScrollTop,
|
|
9158
|
+
days,
|
|
9159
|
+
draftDate,
|
|
9160
|
+
handleColumnKeyDown,
|
|
9161
|
+
handleColumnScroll,
|
|
9162
|
+
handleOptionSelect,
|
|
9163
|
+
monthIndex,
|
|
9164
|
+
monthListRef,
|
|
9165
|
+
months,
|
|
9166
|
+
monthScrollTop,
|
|
9167
|
+
yearIndex,
|
|
9168
|
+
yearListRef,
|
|
9169
|
+
yearScrollTop,
|
|
9170
|
+
years
|
|
9171
|
+
} = useDatePickerWheel({
|
|
9172
|
+
isOpen,
|
|
9173
|
+
value: resolvedValue,
|
|
9174
|
+
defaultValue,
|
|
9175
|
+
minDate: resolvedMinDate,
|
|
9176
|
+
maxDate: resolvedMaxDate
|
|
9177
|
+
});
|
|
9178
|
+
const handleOpenChange = React30.useCallback((nextOpen) => {
|
|
9179
|
+
setIsOpen(nextOpen);
|
|
9180
|
+
if (!nextOpen) {
|
|
9181
|
+
internalRef.current?.focus();
|
|
9182
|
+
}
|
|
9183
|
+
}, []);
|
|
9184
|
+
const handleDone = React30.useCallback(() => {
|
|
9185
|
+
onChange(clampDate(draftDate, resolvedMinDate, resolvedMaxDate));
|
|
9186
|
+
handleOpenChange(false);
|
|
9187
|
+
}, [draftDate, handleOpenChange, onChange, resolvedMaxDate, resolvedMinDate]);
|
|
9188
|
+
const handleTriggerClick = React30.useCallback(() => {
|
|
9189
|
+
if (disabled) return;
|
|
9190
|
+
setIsOpen(true);
|
|
9191
|
+
}, [disabled]);
|
|
9192
|
+
const handleTriggerKeyDown = React30.useCallback(
|
|
9193
|
+
(event) => {
|
|
9194
|
+
if (disabled) return;
|
|
9195
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
|
|
9196
|
+
event.preventDefault();
|
|
9197
|
+
setIsOpen(true);
|
|
9198
|
+
}
|
|
9199
|
+
},
|
|
9200
|
+
[disabled]
|
|
9201
|
+
);
|
|
9202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: cn("relative w-full max-w-[425px]", className), children: [
|
|
9203
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9204
|
+
"input",
|
|
9205
|
+
{
|
|
9206
|
+
type: "hidden",
|
|
9207
|
+
name,
|
|
9208
|
+
value: resolvedValue ? formatDateInputValue(resolvedValue) : ""
|
|
9209
|
+
}
|
|
9210
|
+
),
|
|
9211
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9212
|
+
FieldTrigger,
|
|
9213
|
+
{
|
|
9214
|
+
id: triggerId,
|
|
9215
|
+
ref: combinedRef,
|
|
9216
|
+
variant,
|
|
9217
|
+
label,
|
|
9218
|
+
topLabel,
|
|
9219
|
+
labelId,
|
|
9220
|
+
valueId: hasValue ? valueId : void 0,
|
|
9221
|
+
helperTextId: !hasValue ? helperTextId : void 0,
|
|
9222
|
+
errorId: error ? errorId : void 0,
|
|
9223
|
+
describedBy: error ? errorId : void 0,
|
|
9224
|
+
labelText: topLabel ? placeholder : void 0,
|
|
9225
|
+
valueText: resolvedValue ? formatValue(resolvedValue) : void 0,
|
|
9226
|
+
placeholder,
|
|
9227
|
+
disabled,
|
|
9228
|
+
error,
|
|
9229
|
+
"aria-haspopup": "dialog",
|
|
9230
|
+
"aria-expanded": isOpen,
|
|
9231
|
+
onClick: handleTriggerClick,
|
|
9232
|
+
onKeyDown: handleTriggerKeyDown,
|
|
9233
|
+
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react41.Calendar, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
|
|
9234
|
+
}
|
|
9235
|
+
),
|
|
9236
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9237
|
+
DatePickerContent,
|
|
9238
|
+
{
|
|
9239
|
+
baseId: pickerId,
|
|
9240
|
+
open: isOpen,
|
|
9241
|
+
isMobile,
|
|
9242
|
+
label,
|
|
9243
|
+
title: mobileTitle ?? label,
|
|
9244
|
+
doneLabel,
|
|
9245
|
+
monthLabels: months.map((month) => monthLabels[month] ?? ""),
|
|
9246
|
+
days,
|
|
9247
|
+
years,
|
|
9248
|
+
monthIndex,
|
|
9249
|
+
dayIndex,
|
|
9250
|
+
yearIndex,
|
|
9251
|
+
monthScrollTop,
|
|
9252
|
+
dayScrollTop,
|
|
9253
|
+
yearScrollTop,
|
|
9254
|
+
monthListRef,
|
|
9255
|
+
dayListRef,
|
|
9256
|
+
yearListRef,
|
|
9257
|
+
onOpenChange: handleOpenChange,
|
|
9258
|
+
onDone: handleDone,
|
|
9259
|
+
onColumnScroll: handleColumnScroll,
|
|
9260
|
+
onColumnKeyDown: handleColumnKeyDown,
|
|
9261
|
+
onOptionSelect: handleOptionSelect
|
|
9262
|
+
}
|
|
9263
|
+
)
|
|
9264
|
+
] });
|
|
9265
|
+
}
|
|
9266
|
+
);
|
|
9267
|
+
DatePicker.displayName = "DatePicker";
|
|
9268
|
+
|
|
9269
|
+
// src/responsive-sheet/ResponsiveSheet.tsx
|
|
9270
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
9271
|
+
function ResponsiveSheet({
|
|
9272
|
+
open,
|
|
9273
|
+
onClose,
|
|
9274
|
+
title,
|
|
9275
|
+
description,
|
|
9276
|
+
children,
|
|
9116
9277
|
className,
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9278
|
+
contentClassName,
|
|
9279
|
+
dialogClassName,
|
|
9280
|
+
drawerClassName,
|
|
9281
|
+
titleClassName,
|
|
9282
|
+
descriptionClassName,
|
|
9283
|
+
showCloseButton = true,
|
|
9284
|
+
showDrawerHandle = true,
|
|
9285
|
+
closeOnOverlayClick = true,
|
|
9286
|
+
closeOnEscape = true
|
|
9124
9287
|
}) {
|
|
9125
|
-
const { isMatch: isMobile } = useScreenResize(DEVICE.
|
|
9126
|
-
const
|
|
9127
|
-
const
|
|
9128
|
-
const pickerId = React30.useId();
|
|
9129
|
-
const labelId = React30.useId();
|
|
9130
|
-
const valueId = React30.useId();
|
|
9131
|
-
const helperTextId = React30.useId();
|
|
9132
|
-
const errorId = React30.useId();
|
|
9133
|
-
const triggerRef = React30.useRef(null);
|
|
9134
|
-
const monthLabels = React30.useMemo(() => getMonthLabels(locale), [locale]);
|
|
9135
|
-
const resolvedMinDate = React30.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
|
|
9136
|
-
const resolvedMaxDate = React30.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
|
|
9137
|
-
const resolvedValue = React30.useMemo(
|
|
9138
|
-
() => value ? clampDate(value, resolvedMinDate, resolvedMaxDate) : null,
|
|
9139
|
-
[resolvedMaxDate, resolvedMinDate, value]
|
|
9140
|
-
);
|
|
9141
|
-
const hasValue = Boolean(resolvedValue);
|
|
9142
|
-
const {
|
|
9143
|
-
dayIndex,
|
|
9144
|
-
dayListRef,
|
|
9145
|
-
dayScrollTop,
|
|
9146
|
-
days,
|
|
9147
|
-
draftDate,
|
|
9148
|
-
handleColumnKeyDown,
|
|
9149
|
-
handleColumnScroll,
|
|
9150
|
-
handleOptionSelect,
|
|
9151
|
-
monthIndex,
|
|
9152
|
-
monthListRef,
|
|
9153
|
-
months,
|
|
9154
|
-
monthScrollTop,
|
|
9155
|
-
yearIndex,
|
|
9156
|
-
yearListRef,
|
|
9157
|
-
yearScrollTop,
|
|
9158
|
-
years
|
|
9159
|
-
} = useDatePickerWheel({
|
|
9160
|
-
isOpen,
|
|
9161
|
-
value: resolvedValue,
|
|
9162
|
-
defaultValue,
|
|
9163
|
-
minDate: resolvedMinDate,
|
|
9164
|
-
maxDate: resolvedMaxDate
|
|
9165
|
-
});
|
|
9166
|
-
const handleOpenChange = React30.useCallback((nextOpen) => {
|
|
9167
|
-
setIsOpen(nextOpen);
|
|
9288
|
+
const { isMatch: isMobile } = useScreenResize(DEVICE.laptop);
|
|
9289
|
+
const isMobileMode = isMobile && isMobileModalModeAvailable();
|
|
9290
|
+
const handleOpenChange = (nextOpen) => {
|
|
9168
9291
|
if (!nextOpen) {
|
|
9169
|
-
|
|
9292
|
+
onClose();
|
|
9293
|
+
}
|
|
9294
|
+
};
|
|
9295
|
+
const handleInteractOutside = (event) => {
|
|
9296
|
+
if (!closeOnOverlayClick) {
|
|
9297
|
+
event.preventDefault();
|
|
9298
|
+
}
|
|
9299
|
+
};
|
|
9300
|
+
const handleEscapeKeyDown = (event) => {
|
|
9301
|
+
if (!closeOnEscape) {
|
|
9302
|
+
event.preventDefault();
|
|
9303
|
+
}
|
|
9304
|
+
};
|
|
9305
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
9306
|
+
"div",
|
|
9307
|
+
{
|
|
9308
|
+
className: cn(
|
|
9309
|
+
"flex w-full flex-col px-6 pb-6 pt-4 sm:px-8 sm:pb-8 sm:pt-8",
|
|
9310
|
+
contentClassName
|
|
9311
|
+
),
|
|
9312
|
+
children: [
|
|
9313
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
9314
|
+
"div",
|
|
9315
|
+
{
|
|
9316
|
+
className: cn(
|
|
9317
|
+
"text-center text-[20px] font-semibold leading-7",
|
|
9318
|
+
titleClassName
|
|
9319
|
+
),
|
|
9320
|
+
children: title
|
|
9321
|
+
}
|
|
9322
|
+
) : null,
|
|
9323
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
9324
|
+
"p",
|
|
9325
|
+
{
|
|
9326
|
+
className: cn(
|
|
9327
|
+
"mt-3 text-center text-[14px] leading-6 text-[var(--primary)]/70",
|
|
9328
|
+
descriptionClassName
|
|
9329
|
+
),
|
|
9330
|
+
children: description
|
|
9331
|
+
}
|
|
9332
|
+
) : null,
|
|
9333
|
+
children
|
|
9334
|
+
]
|
|
9170
9335
|
}
|
|
9171
|
-
}, []);
|
|
9172
|
-
const handleDone = React30.useCallback(() => {
|
|
9173
|
-
onChange(clampDate(draftDate, resolvedMinDate, resolvedMaxDate));
|
|
9174
|
-
handleOpenChange(false);
|
|
9175
|
-
}, [draftDate, handleOpenChange, onChange, resolvedMaxDate, resolvedMinDate]);
|
|
9176
|
-
const handleTriggerClick = React30.useCallback(() => {
|
|
9177
|
-
if (disabled) return;
|
|
9178
|
-
setIsOpen(true);
|
|
9179
|
-
}, [disabled]);
|
|
9180
|
-
const handleTriggerKeyDown = React30.useCallback(
|
|
9181
|
-
(event) => {
|
|
9182
|
-
if (disabled) return;
|
|
9183
|
-
if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
|
|
9184
|
-
event.preventDefault();
|
|
9185
|
-
setIsOpen(true);
|
|
9186
|
-
}
|
|
9187
|
-
},
|
|
9188
|
-
[disabled]
|
|
9189
9336
|
);
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
{
|
|
9194
|
-
type: "hidden",
|
|
9195
|
-
name,
|
|
9196
|
-
value: resolvedValue ? formatDateInputValue(resolvedValue) : ""
|
|
9197
|
-
}
|
|
9198
|
-
),
|
|
9199
|
-
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9200
|
-
FieldTrigger,
|
|
9201
|
-
{
|
|
9202
|
-
id: triggerId,
|
|
9203
|
-
ref: triggerRef,
|
|
9204
|
-
variant,
|
|
9205
|
-
label,
|
|
9206
|
-
topLabel,
|
|
9207
|
-
labelId,
|
|
9208
|
-
valueId: hasValue ? valueId : void 0,
|
|
9209
|
-
helperTextId: !hasValue ? helperTextId : void 0,
|
|
9210
|
-
errorId: error ? errorId : void 0,
|
|
9211
|
-
describedBy: error ? errorId : void 0,
|
|
9212
|
-
labelText: topLabel ? placeholder : void 0,
|
|
9213
|
-
valueText: resolvedValue ? formatValue(resolvedValue) : void 0,
|
|
9214
|
-
placeholder,
|
|
9215
|
-
disabled,
|
|
9216
|
-
error,
|
|
9217
|
-
"aria-haspopup": "dialog",
|
|
9218
|
-
"aria-expanded": isOpen,
|
|
9219
|
-
onClick: handleTriggerClick,
|
|
9220
|
-
onKeyDown: handleTriggerKeyDown,
|
|
9221
|
-
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_lucide_react41.Calendar, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
|
|
9222
|
-
}
|
|
9223
|
-
),
|
|
9224
|
-
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9225
|
-
DatePickerContent,
|
|
9337
|
+
if (isMobileMode) {
|
|
9338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
9339
|
+
DrawerContent,
|
|
9226
9340
|
{
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
yearIndex,
|
|
9239
|
-
monthScrollTop,
|
|
9240
|
-
dayScrollTop,
|
|
9241
|
-
yearScrollTop,
|
|
9242
|
-
monthListRef,
|
|
9243
|
-
dayListRef,
|
|
9244
|
-
yearListRef,
|
|
9245
|
-
onOpenChange: handleOpenChange,
|
|
9246
|
-
onDone: handleDone,
|
|
9247
|
-
onColumnScroll: handleColumnScroll,
|
|
9248
|
-
onColumnKeyDown: handleColumnKeyDown,
|
|
9249
|
-
onOptionSelect: handleOptionSelect
|
|
9341
|
+
onClose,
|
|
9342
|
+
showHandle: showDrawerHandle,
|
|
9343
|
+
closeOnOverlayClick,
|
|
9344
|
+
lockScroll: false,
|
|
9345
|
+
onEscapeKeyDown: handleEscapeKeyDown,
|
|
9346
|
+
className: cn(className, drawerClassName),
|
|
9347
|
+
children: [
|
|
9348
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DrawerTitle, { className: "sr-only", children: title }) : null,
|
|
9349
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DrawerDescription, { className: "sr-only", children: description }) : null,
|
|
9350
|
+
content
|
|
9351
|
+
]
|
|
9250
9352
|
}
|
|
9251
|
-
)
|
|
9252
|
-
|
|
9353
|
+
) });
|
|
9354
|
+
}
|
|
9355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
9356
|
+
DialogContent,
|
|
9357
|
+
{
|
|
9358
|
+
showCloseButton,
|
|
9359
|
+
onPointerDownOutside: handleInteractOutside,
|
|
9360
|
+
onInteractOutside: handleInteractOutside,
|
|
9361
|
+
onEscapeKeyDown: handleEscapeKeyDown,
|
|
9362
|
+
className: cn(
|
|
9363
|
+
"max-w-[560px] rounded-[28px] border-0 p-0 shadow-xl",
|
|
9364
|
+
className,
|
|
9365
|
+
dialogClassName
|
|
9366
|
+
),
|
|
9367
|
+
lockScroll: false,
|
|
9368
|
+
children: [
|
|
9369
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DialogTitle, { className: "sr-only", children: title }) : null,
|
|
9370
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DialogDescription, { className: "sr-only", children: description }) : null,
|
|
9371
|
+
content
|
|
9372
|
+
]
|
|
9373
|
+
}
|
|
9374
|
+
) });
|
|
9253
9375
|
}
|
|
9254
9376
|
|
|
9255
9377
|
// src/airbnb/input/Input.tsx
|
|
9256
9378
|
var React31 = __toESM(require("react"), 1);
|
|
9257
|
-
var
|
|
9379
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
9258
9380
|
var getInputValue = (value) => value != null ? String(value) : "";
|
|
9259
9381
|
var AirbnbInput = React31.forwardRef(
|
|
9260
9382
|
({
|
|
@@ -9329,7 +9451,7 @@ var AirbnbInput = React31.forwardRef(
|
|
|
9329
9451
|
setIsFocused(false);
|
|
9330
9452
|
onBlur?.(event);
|
|
9331
9453
|
};
|
|
9332
|
-
return /* @__PURE__ */ (0,
|
|
9454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: cn("w-full", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
9333
9455
|
FieldTrigger,
|
|
9334
9456
|
{
|
|
9335
9457
|
as: "div",
|
|
@@ -9357,7 +9479,7 @@ var AirbnbInput = React31.forwardRef(
|
|
|
9357
9479
|
trailingAdornment,
|
|
9358
9480
|
forceFloatingLabel: shouldShowLabel,
|
|
9359
9481
|
hideErrorMessage: !renderErrorMessage,
|
|
9360
|
-
children: /* @__PURE__ */ (0,
|
|
9482
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
9361
9483
|
"input",
|
|
9362
9484
|
{
|
|
9363
9485
|
...props,
|
|
@@ -9398,7 +9520,7 @@ var import_lucide_react43 = require("lucide-react");
|
|
|
9398
9520
|
var React36 = __toESM(require("react"), 1);
|
|
9399
9521
|
|
|
9400
9522
|
// src/airbnb/select/SelectDesktopMenu.tsx
|
|
9401
|
-
var
|
|
9523
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
9402
9524
|
function SelectDesktopMenu({
|
|
9403
9525
|
id,
|
|
9404
9526
|
options,
|
|
@@ -9417,7 +9539,7 @@ function SelectDesktopMenu({
|
|
|
9417
9539
|
noOptionsMessage
|
|
9418
9540
|
}) {
|
|
9419
9541
|
const emptyMessage = noOptionsMessage?.();
|
|
9420
|
-
return /* @__PURE__ */ (0,
|
|
9542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
9421
9543
|
"div",
|
|
9422
9544
|
{
|
|
9423
9545
|
id,
|
|
@@ -9430,12 +9552,12 @@ function SelectDesktopMenu({
|
|
|
9430
9552
|
onKeyDown,
|
|
9431
9553
|
className: cn("max-h-[280px] overflow-y-auto p-2 outline-none", menuClassName),
|
|
9432
9554
|
children: [
|
|
9433
|
-
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0,
|
|
9555
|
+
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
|
|
9434
9556
|
options.map((option, index) => {
|
|
9435
9557
|
const isSelected = selectedValue?.value === option.value;
|
|
9436
9558
|
const isHighlighted = index === highlightedIndex;
|
|
9437
9559
|
const optionKey = `${String(option.value)}-${index}`;
|
|
9438
|
-
return /* @__PURE__ */ (0,
|
|
9560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9439
9561
|
"button",
|
|
9440
9562
|
{
|
|
9441
9563
|
id: getOptionId2(index),
|
|
@@ -9467,7 +9589,7 @@ function SelectDesktopMenu({
|
|
|
9467
9589
|
}
|
|
9468
9590
|
|
|
9469
9591
|
// src/airbnb/select/SelectDesktopContent.tsx
|
|
9470
|
-
var
|
|
9592
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
9471
9593
|
function SelectDesktopContent({
|
|
9472
9594
|
isOpen,
|
|
9473
9595
|
listboxId,
|
|
@@ -9488,14 +9610,14 @@ function SelectDesktopContent({
|
|
|
9488
9610
|
noOptionsMessage
|
|
9489
9611
|
}) {
|
|
9490
9612
|
if (!isOpen) return null;
|
|
9491
|
-
return /* @__PURE__ */ (0,
|
|
9613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
9492
9614
|
"div",
|
|
9493
9615
|
{
|
|
9494
9616
|
className: cn(
|
|
9495
9617
|
"absolute left-0 right-0 top-[calc(100%+8px)] z-20 overflow-hidden rounded-[20px] border border-[#DEDAD2] bg-white shadow-[0_14px_30px_rgba(18,18,18,0.08)]",
|
|
9496
9618
|
dropdownClassName
|
|
9497
9619
|
),
|
|
9498
|
-
children: /* @__PURE__ */ (0,
|
|
9620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
9499
9621
|
SelectDesktopMenu,
|
|
9500
9622
|
{
|
|
9501
9623
|
id: listboxId,
|
|
@@ -9593,7 +9715,7 @@ function getMobileOptionStyles(index, scrollTop) {
|
|
|
9593
9715
|
}
|
|
9594
9716
|
|
|
9595
9717
|
// src/airbnb/select/SelectMobileWheel.tsx
|
|
9596
|
-
var
|
|
9718
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
9597
9719
|
function SelectMobileWheel({
|
|
9598
9720
|
id,
|
|
9599
9721
|
options,
|
|
@@ -9612,7 +9734,7 @@ function SelectMobileWheel({
|
|
|
9612
9734
|
}) {
|
|
9613
9735
|
const spacerHeight2 = getWheelSpacerHeight();
|
|
9614
9736
|
const emptyMessage = noOptionsMessage?.();
|
|
9615
|
-
return /* @__PURE__ */ (0,
|
|
9737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
9616
9738
|
"div",
|
|
9617
9739
|
{
|
|
9618
9740
|
id,
|
|
@@ -9624,10 +9746,10 @@ function SelectMobileWheel({
|
|
|
9624
9746
|
onKeyDown,
|
|
9625
9747
|
className: cn("relative overflow-hidden outline-none", menuClassName),
|
|
9626
9748
|
children: [
|
|
9627
|
-
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0,
|
|
9628
|
-
/* @__PURE__ */ (0,
|
|
9629
|
-
/* @__PURE__ */ (0,
|
|
9630
|
-
/* @__PURE__ */ (0,
|
|
9749
|
+
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
|
|
9750
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
|
|
9751
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
|
|
9752
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
9631
9753
|
"div",
|
|
9632
9754
|
{
|
|
9633
9755
|
"aria-hidden": true,
|
|
@@ -9637,7 +9759,7 @@ function SelectMobileWheel({
|
|
|
9637
9759
|
)
|
|
9638
9760
|
}
|
|
9639
9761
|
),
|
|
9640
|
-
/* @__PURE__ */ (0,
|
|
9762
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
9641
9763
|
"div",
|
|
9642
9764
|
{
|
|
9643
9765
|
ref: listRef,
|
|
@@ -9652,11 +9774,11 @@ function SelectMobileWheel({
|
|
|
9652
9774
|
WebkitOverflowScrolling: "touch"
|
|
9653
9775
|
},
|
|
9654
9776
|
children: [
|
|
9655
|
-
/* @__PURE__ */ (0,
|
|
9777
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
|
|
9656
9778
|
options.map((option, index) => {
|
|
9657
9779
|
const { distance, style } = getMobileOptionStyles(index, scrollTop);
|
|
9658
9780
|
const optionKey = `${String(option.value)}-${index}`;
|
|
9659
|
-
return /* @__PURE__ */ (0,
|
|
9781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
9660
9782
|
"button",
|
|
9661
9783
|
{
|
|
9662
9784
|
id: getOptionId2(index),
|
|
@@ -9677,7 +9799,7 @@ function SelectMobileWheel({
|
|
|
9677
9799
|
optionKey
|
|
9678
9800
|
);
|
|
9679
9801
|
}),
|
|
9680
|
-
/* @__PURE__ */ (0,
|
|
9802
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { style: { height: `${spacerHeight2}px` } })
|
|
9681
9803
|
]
|
|
9682
9804
|
}
|
|
9683
9805
|
)
|
|
@@ -9687,7 +9809,7 @@ function SelectMobileWheel({
|
|
|
9687
9809
|
}
|
|
9688
9810
|
|
|
9689
9811
|
// src/airbnb/select/SelectMobileContent.tsx
|
|
9690
|
-
var
|
|
9812
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
9691
9813
|
function SelectMobileContent({
|
|
9692
9814
|
open,
|
|
9693
9815
|
onOpenChange,
|
|
@@ -9711,11 +9833,11 @@ function SelectMobileContent({
|
|
|
9711
9833
|
getOptionId: getOptionId2,
|
|
9712
9834
|
noOptionsMessage
|
|
9713
9835
|
}) {
|
|
9714
|
-
return /* @__PURE__ */ (0,
|
|
9715
|
-
/* @__PURE__ */ (0,
|
|
9716
|
-
/* @__PURE__ */ (0,
|
|
9717
|
-
/* @__PURE__ */ (0,
|
|
9718
|
-
/* @__PURE__ */ (0,
|
|
9836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
|
|
9837
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
9838
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DrawerDescription, { className: "sr-only", children: label }),
|
|
9839
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
|
|
9840
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
9719
9841
|
SelectMobileWheel,
|
|
9720
9842
|
{
|
|
9721
9843
|
id: listboxId,
|
|
@@ -9734,7 +9856,7 @@ function SelectMobileContent({
|
|
|
9734
9856
|
noOptionsMessage
|
|
9735
9857
|
}
|
|
9736
9858
|
),
|
|
9737
|
-
/* @__PURE__ */ (0,
|
|
9859
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
|
|
9738
9860
|
] })
|
|
9739
9861
|
] }) });
|
|
9740
9862
|
}
|
|
@@ -9742,7 +9864,7 @@ function SelectMobileContent({
|
|
|
9742
9864
|
// src/airbnb/select/SelectTrigger.tsx
|
|
9743
9865
|
var React32 = __toESM(require("react"), 1);
|
|
9744
9866
|
var import_lucide_react42 = require("lucide-react");
|
|
9745
|
-
var
|
|
9867
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
9746
9868
|
var SelectTrigger2 = React32.forwardRef(
|
|
9747
9869
|
({
|
|
9748
9870
|
id,
|
|
@@ -9764,7 +9886,7 @@ var SelectTrigger2 = React32.forwardRef(
|
|
|
9764
9886
|
onClick,
|
|
9765
9887
|
onKeyDown
|
|
9766
9888
|
}, ref) => {
|
|
9767
|
-
return /* @__PURE__ */ (0,
|
|
9889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
9768
9890
|
FieldTrigger,
|
|
9769
9891
|
{
|
|
9770
9892
|
id,
|
|
@@ -9788,7 +9910,7 @@ var SelectTrigger2 = React32.forwardRef(
|
|
|
9788
9910
|
disabled,
|
|
9789
9911
|
onClick,
|
|
9790
9912
|
onKeyDown,
|
|
9791
|
-
trailingAdornment: /* @__PURE__ */ (0,
|
|
9913
|
+
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
9792
9914
|
import_lucide_react42.ChevronDown,
|
|
9793
9915
|
{
|
|
9794
9916
|
className: open ? "h-6 w-6 rotate-180 text-[#1F1F1B] transition-transform" : "h-6 w-6 text-[#1F1F1B] transition-transform"
|
|
@@ -10202,8 +10324,8 @@ function useOutsideClick(elementRef, onOutsideClick, nested) {
|
|
|
10202
10324
|
}
|
|
10203
10325
|
|
|
10204
10326
|
// src/airbnb/select/Select.tsx
|
|
10205
|
-
var
|
|
10206
|
-
|
|
10327
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
10328
|
+
var AirbnbSelect = React36.forwardRef(function AirbnbSelect2({
|
|
10207
10329
|
options,
|
|
10208
10330
|
value,
|
|
10209
10331
|
onChange,
|
|
@@ -10223,7 +10345,7 @@ function AirbnbSelect({
|
|
|
10223
10345
|
mobileTitle,
|
|
10224
10346
|
name,
|
|
10225
10347
|
noOptionsMessage
|
|
10226
|
-
}) {
|
|
10348
|
+
}, ref) {
|
|
10227
10349
|
const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
|
|
10228
10350
|
const [isOpen, setIsOpen] = React36.useState(false);
|
|
10229
10351
|
const containerRef = React36.useRef(null);
|
|
@@ -10261,7 +10383,7 @@ function AirbnbSelect({
|
|
|
10261
10383
|
listRef: desktopListRef,
|
|
10262
10384
|
setHighlightedIndex,
|
|
10263
10385
|
setOptionRef,
|
|
10264
|
-
triggerRef,
|
|
10386
|
+
triggerRef: desktopTriggerRef,
|
|
10265
10387
|
focusTrigger,
|
|
10266
10388
|
handleSelect: handleDesktopSelect,
|
|
10267
10389
|
handleMenuKeyDown,
|
|
@@ -10274,6 +10396,7 @@ function AirbnbSelect({
|
|
|
10274
10396
|
disabled,
|
|
10275
10397
|
onChange
|
|
10276
10398
|
});
|
|
10399
|
+
const combinedRef = useCombinedRef(ref, desktopTriggerRef);
|
|
10277
10400
|
const activeMobileIndex = getOptionIndex(options, pendingValue);
|
|
10278
10401
|
const valueLabel = value ? getValueLabel?.(value) ?? String(value.label) : void 0;
|
|
10279
10402
|
useOutsideClick(containerRef, isOpen && !isMobile ? () => setIsOpen(false) : null);
|
|
@@ -10360,8 +10483,8 @@ function AirbnbSelect({
|
|
|
10360
10483
|
handleMobileOpenChange(false);
|
|
10361
10484
|
}
|
|
10362
10485
|
};
|
|
10363
|
-
return /* @__PURE__ */ (0,
|
|
10364
|
-
name && /* @__PURE__ */ (0,
|
|
10486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
|
|
10487
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
10365
10488
|
renderTrigger ? renderTrigger({
|
|
10366
10489
|
id: triggerId,
|
|
10367
10490
|
open: isOpen,
|
|
@@ -10375,14 +10498,14 @@ function AirbnbSelect({
|
|
|
10375
10498
|
error,
|
|
10376
10499
|
listboxId,
|
|
10377
10500
|
describedBy,
|
|
10378
|
-
triggerRef,
|
|
10501
|
+
triggerRef: combinedRef,
|
|
10379
10502
|
onClick: handleTriggerClick,
|
|
10380
10503
|
onKeyDown: handleRootTriggerKeyDown
|
|
10381
|
-
}) : /* @__PURE__ */ (0,
|
|
10504
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10382
10505
|
SelectTrigger2,
|
|
10383
10506
|
{
|
|
10384
10507
|
id: triggerId,
|
|
10385
|
-
ref:
|
|
10508
|
+
ref: combinedRef,
|
|
10386
10509
|
open: isOpen,
|
|
10387
10510
|
variant,
|
|
10388
10511
|
label,
|
|
@@ -10402,7 +10525,7 @@ function AirbnbSelect({
|
|
|
10402
10525
|
onKeyDown: handleRootTriggerKeyDown
|
|
10403
10526
|
}
|
|
10404
10527
|
),
|
|
10405
|
-
isMobile ? /* @__PURE__ */ (0,
|
|
10528
|
+
isMobile ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10406
10529
|
SelectMobileContent,
|
|
10407
10530
|
{
|
|
10408
10531
|
open: isOpen,
|
|
@@ -10427,7 +10550,7 @@ function AirbnbSelect({
|
|
|
10427
10550
|
getOptionId: getOptionId2,
|
|
10428
10551
|
noOptionsMessage
|
|
10429
10552
|
}
|
|
10430
|
-
) : /* @__PURE__ */ (0,
|
|
10553
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10431
10554
|
SelectDesktopContent,
|
|
10432
10555
|
{
|
|
10433
10556
|
isOpen,
|
|
@@ -10456,172 +10579,176 @@ function AirbnbSelect({
|
|
|
10456
10579
|
}
|
|
10457
10580
|
)
|
|
10458
10581
|
] });
|
|
10459
|
-
}
|
|
10582
|
+
});
|
|
10460
10583
|
|
|
10461
10584
|
// src/airbnb/phone-field/PhoneField.tsx
|
|
10462
|
-
var
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
type: "hidden",
|
|
10500
|
-
name: codeName,
|
|
10501
|
-
value: value?.code ?? "",
|
|
10502
|
-
disabled
|
|
10503
|
-
}
|
|
10504
|
-
),
|
|
10505
|
-
numberName && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10506
|
-
"input",
|
|
10507
|
-
{
|
|
10508
|
-
type: "hidden",
|
|
10509
|
-
name: numberName,
|
|
10510
|
-
value: value?.number ?? "",
|
|
10511
|
-
disabled
|
|
10512
|
-
}
|
|
10513
|
-
),
|
|
10514
|
-
topLabel && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10515
|
-
"label",
|
|
10516
|
-
{
|
|
10517
|
-
htmlFor: inputId,
|
|
10518
|
-
className: "mb-3 block text-[16px] font-medium leading-5 text-[#1F1F1B]",
|
|
10519
|
-
children: topLabel
|
|
10520
|
-
}
|
|
10521
|
-
),
|
|
10522
|
-
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-stretch", children: [
|
|
10523
|
-
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10524
|
-
AirbnbSelect,
|
|
10585
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
10586
|
+
var PhoneField = React37.forwardRef(
|
|
10587
|
+
({
|
|
10588
|
+
variant = "default",
|
|
10589
|
+
label,
|
|
10590
|
+
topLabel,
|
|
10591
|
+
value,
|
|
10592
|
+
onChange,
|
|
10593
|
+
options,
|
|
10594
|
+
placeholder = "Phone number",
|
|
10595
|
+
disabled,
|
|
10596
|
+
error,
|
|
10597
|
+
className,
|
|
10598
|
+
name,
|
|
10599
|
+
codeName,
|
|
10600
|
+
numberName,
|
|
10601
|
+
mobileTitle,
|
|
10602
|
+
codePlaceholder = "+00"
|
|
10603
|
+
}, ref) => {
|
|
10604
|
+
const inputId = React37.useId();
|
|
10605
|
+
const codeOptions = React37.useMemo(
|
|
10606
|
+
() => options.map((option) => ({
|
|
10607
|
+
value: option.value,
|
|
10608
|
+
label: option.label,
|
|
10609
|
+
disabled: option.disabled
|
|
10610
|
+
})),
|
|
10611
|
+
[options]
|
|
10612
|
+
);
|
|
10613
|
+
const selectedCodeOption = React37.useMemo(
|
|
10614
|
+
() => codeOptions.find((option) => option.value === value?.code) ?? null,
|
|
10615
|
+
[codeOptions, value?.code]
|
|
10616
|
+
);
|
|
10617
|
+
const combinedValue = value?.code || value?.number ? `${value?.code ?? ""}${value?.number ?? ""}` : "";
|
|
10618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: cn("w-full max-w-[425px]", className), children: [
|
|
10619
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
|
|
10620
|
+
codeName && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
10621
|
+
"input",
|
|
10525
10622
|
{
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
value:
|
|
10529
|
-
|
|
10530
|
-
code: String(option.value),
|
|
10531
|
-
number: value?.number ?? ""
|
|
10532
|
-
}),
|
|
10533
|
-
label: `${label} country code`,
|
|
10534
|
-
placeholder: codePlaceholder,
|
|
10535
|
-
disabled,
|
|
10536
|
-
className: "max-w-none shrink-0 basis-[96px]",
|
|
10537
|
-
mobileTitle: mobileTitle ?? "Select country code",
|
|
10538
|
-
dropdownClassName: "right-auto w-[280px]",
|
|
10539
|
-
getValueLabel: (option) => String(option.value),
|
|
10540
|
-
renderTrigger: ({
|
|
10541
|
-
id,
|
|
10542
|
-
open,
|
|
10543
|
-
variant: selectVariant,
|
|
10544
|
-
disabled: triggerDisabled,
|
|
10545
|
-
listboxId,
|
|
10546
|
-
triggerRef,
|
|
10547
|
-
onClick,
|
|
10548
|
-
onKeyDown,
|
|
10549
|
-
valueLabel
|
|
10550
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
10551
|
-
"button",
|
|
10552
|
-
{
|
|
10553
|
-
id,
|
|
10554
|
-
ref: triggerRef,
|
|
10555
|
-
type: "button",
|
|
10556
|
-
"aria-label": `${label} country code`,
|
|
10557
|
-
"aria-haspopup": "listbox",
|
|
10558
|
-
"aria-expanded": open,
|
|
10559
|
-
"aria-controls": listboxId,
|
|
10560
|
-
disabled: triggerDisabled,
|
|
10561
|
-
onClick,
|
|
10562
|
-
onKeyDown,
|
|
10563
|
-
className: cn(
|
|
10564
|
-
"flex w-full items-center justify-center gap-2 border border-r-0 text-[16px] font-medium leading-6 transition-colors focus-visible:outline-none",
|
|
10565
|
-
selectVariant === "airbnb" ? "h-full min-h-[60px] rounded-l-[16px] rounded-r-none px-4 focus-visible:ring-2 focus-visible:ring-[#1F1F1B] focus-visible:ring-offset-2" : "min-h-[48px] rounded-l-[10px] rounded-r-none px-3.5 focus-visible:border-[#315EFB]",
|
|
10566
|
-
error ? "border-[var(--status-danger)] bg-[#F2F2F2] text-[var(--status-danger)]" : selectVariant === "airbnb" ? "border-[#8C8C8C] bg-[#F4F4F2] text-[#1F1F1B]" : "border-[#A8A8A4] bg-white text-[#1F1F1B]",
|
|
10567
|
-
triggerDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
10568
|
-
),
|
|
10569
|
-
children: [
|
|
10570
|
-
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { children: valueLabel ?? codePlaceholder }),
|
|
10571
|
-
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10572
|
-
import_lucide_react43.ChevronDown,
|
|
10573
|
-
{
|
|
10574
|
-
className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
|
|
10575
|
-
strokeWidth: 2
|
|
10576
|
-
}
|
|
10577
|
-
)
|
|
10578
|
-
]
|
|
10579
|
-
}
|
|
10580
|
-
)
|
|
10623
|
+
type: "hidden",
|
|
10624
|
+
name: codeName,
|
|
10625
|
+
value: value?.code ?? "",
|
|
10626
|
+
disabled
|
|
10581
10627
|
}
|
|
10582
10628
|
),
|
|
10583
|
-
/* @__PURE__ */ (0,
|
|
10584
|
-
|
|
10629
|
+
numberName && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
10630
|
+
"input",
|
|
10585
10631
|
{
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
type: "tel",
|
|
10589
|
-
inputMode: "tel",
|
|
10590
|
-
label,
|
|
10591
|
-
helperText: placeholder,
|
|
10632
|
+
type: "hidden",
|
|
10633
|
+
name: numberName,
|
|
10592
10634
|
value: value?.number ?? "",
|
|
10593
|
-
|
|
10594
|
-
disabled,
|
|
10595
|
-
error,
|
|
10596
|
-
renderErrorMessage: false,
|
|
10597
|
-
wrapperClassName: "min-w-0 flex-1",
|
|
10598
|
-
fieldClassName: cn(
|
|
10599
|
-
variant === "airbnb" ? "min-h-[60px] rounded-l-none rounded-r-[16px] border-l-0" : "rounded-l-none rounded-r-[10px] border-l-0"
|
|
10600
|
-
),
|
|
10601
|
-
contentClassName: cn(variant === "airbnb" ? "h-[40px] py-2" : "h-[48px]"),
|
|
10602
|
-
inputClassName: "text-[16px] leading-7",
|
|
10603
|
-
onChange: (event) => onChange({
|
|
10604
|
-
code: value?.code ?? "",
|
|
10605
|
-
number: event.target.value
|
|
10606
|
-
})
|
|
10635
|
+
disabled
|
|
10607
10636
|
}
|
|
10608
|
-
)
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10637
|
+
),
|
|
10638
|
+
topLabel && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
10639
|
+
"label",
|
|
10640
|
+
{
|
|
10641
|
+
htmlFor: inputId,
|
|
10642
|
+
className: "mb-3 block text-[16px] font-medium leading-5 text-[#1F1F1B]",
|
|
10643
|
+
children: topLabel
|
|
10644
|
+
}
|
|
10645
|
+
),
|
|
10646
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-stretch", children: [
|
|
10647
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
10648
|
+
AirbnbSelect,
|
|
10649
|
+
{
|
|
10650
|
+
ref,
|
|
10651
|
+
variant,
|
|
10652
|
+
options: codeOptions,
|
|
10653
|
+
value: selectedCodeOption,
|
|
10654
|
+
onChange: (option) => onChange({
|
|
10655
|
+
code: String(option.value),
|
|
10656
|
+
number: value?.number ?? ""
|
|
10657
|
+
}),
|
|
10658
|
+
label: `${label} country code`,
|
|
10659
|
+
placeholder: codePlaceholder,
|
|
10660
|
+
disabled,
|
|
10661
|
+
className: "max-w-none shrink-0 basis-[96px]",
|
|
10662
|
+
mobileTitle: mobileTitle ?? "Select country code",
|
|
10663
|
+
dropdownClassName: "right-auto w-[280px]",
|
|
10664
|
+
getValueLabel: (option) => String(option.value),
|
|
10665
|
+
renderTrigger: ({
|
|
10666
|
+
id,
|
|
10667
|
+
open,
|
|
10668
|
+
variant: selectVariant,
|
|
10669
|
+
disabled: triggerDisabled,
|
|
10670
|
+
listboxId,
|
|
10671
|
+
triggerRef,
|
|
10672
|
+
onClick,
|
|
10673
|
+
onKeyDown,
|
|
10674
|
+
valueLabel
|
|
10675
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
10676
|
+
"button",
|
|
10677
|
+
{
|
|
10678
|
+
id,
|
|
10679
|
+
ref: triggerRef,
|
|
10680
|
+
type: "button",
|
|
10681
|
+
"aria-label": `${label} country code`,
|
|
10682
|
+
"aria-haspopup": "listbox",
|
|
10683
|
+
"aria-expanded": open,
|
|
10684
|
+
"aria-controls": listboxId,
|
|
10685
|
+
disabled: triggerDisabled,
|
|
10686
|
+
onClick,
|
|
10687
|
+
onKeyDown,
|
|
10688
|
+
className: cn(
|
|
10689
|
+
"flex w-full items-center justify-center gap-2 border border-r-0 text-[16px] font-medium leading-6 transition-colors focus-visible:outline-none",
|
|
10690
|
+
selectVariant === "airbnb" ? "h-full min-h-[60px] rounded-l-[16px] rounded-r-none px-4 focus-visible:ring-2 focus-visible:ring-[#1F1F1B] focus-visible:ring-offset-2" : "min-h-[48px] rounded-l-[10px] rounded-r-none px-3.5 focus-visible:border-[#315EFB]",
|
|
10691
|
+
error ? "border-[var(--status-danger)] bg-[#F2F2F2] text-[var(--status-danger)]" : selectVariant === "airbnb" ? "border-[#8C8C8C] bg-[#F4F4F2] text-[#1F1F1B]" : "border-[#A8A8A4] bg-white text-[#1F1F1B]",
|
|
10692
|
+
triggerDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
10693
|
+
),
|
|
10694
|
+
children: [
|
|
10695
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { children: valueLabel ?? codePlaceholder }),
|
|
10696
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
10697
|
+
import_lucide_react43.ChevronDown,
|
|
10698
|
+
{
|
|
10699
|
+
className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
|
|
10700
|
+
strokeWidth: 2
|
|
10701
|
+
}
|
|
10702
|
+
)
|
|
10703
|
+
]
|
|
10704
|
+
}
|
|
10705
|
+
)
|
|
10706
|
+
}
|
|
10707
|
+
),
|
|
10708
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
10709
|
+
AirbnbInput,
|
|
10710
|
+
{
|
|
10711
|
+
id: inputId,
|
|
10712
|
+
variant,
|
|
10713
|
+
type: "tel",
|
|
10714
|
+
inputMode: "tel",
|
|
10715
|
+
label,
|
|
10716
|
+
helperText: placeholder,
|
|
10717
|
+
value: value?.number ?? "",
|
|
10718
|
+
placeholder,
|
|
10719
|
+
disabled,
|
|
10720
|
+
error,
|
|
10721
|
+
renderErrorMessage: false,
|
|
10722
|
+
wrapperClassName: "min-w-0 flex-1",
|
|
10723
|
+
fieldClassName: cn(
|
|
10724
|
+
variant === "airbnb" ? "min-h-[60px] rounded-l-none rounded-r-[16px] border-l-0" : "rounded-l-none rounded-r-[10px] border-l-0"
|
|
10725
|
+
),
|
|
10726
|
+
contentClassName: cn(variant === "airbnb" ? "h-[40px] py-2" : "h-[48px]"),
|
|
10727
|
+
inputClassName: "text-[16px] leading-7",
|
|
10728
|
+
onChange: (event) => onChange({
|
|
10729
|
+
code: value?.code ?? "",
|
|
10730
|
+
number: event.target.value
|
|
10731
|
+
})
|
|
10732
|
+
}
|
|
10733
|
+
)
|
|
10734
|
+
] }),
|
|
10735
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(FieldErrorMessage, { message: error })
|
|
10736
|
+
] });
|
|
10737
|
+
}
|
|
10738
|
+
);
|
|
10739
|
+
PhoneField.displayName = "PhoneField";
|
|
10613
10740
|
|
|
10614
10741
|
// src/airbnb/search-input/SearchInput.tsx
|
|
10615
10742
|
var React38 = __toESM(require("react"), 1);
|
|
10616
10743
|
var import_react_i18next22 = require("react-i18next");
|
|
10617
10744
|
var import_lucide_react44 = require("lucide-react");
|
|
10618
|
-
var
|
|
10745
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
10619
10746
|
var AirbnbSearchInput = React38.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
10620
10747
|
const { t } = (0, import_react_i18next22.useTranslation)();
|
|
10621
10748
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
10622
|
-
return /* @__PURE__ */ (0,
|
|
10623
|
-
/* @__PURE__ */ (0,
|
|
10624
|
-
/* @__PURE__ */ (0,
|
|
10749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
10750
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_lucide_react44.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
10751
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
10625
10752
|
"input",
|
|
10626
10753
|
{
|
|
10627
10754
|
...props,
|
|
@@ -10640,13 +10767,13 @@ var AirbnbSearchInput = React38.forwardRef(({ onReset, placeholder, wrapperClass
|
|
|
10640
10767
|
)
|
|
10641
10768
|
}
|
|
10642
10769
|
),
|
|
10643
|
-
onReset && /* @__PURE__ */ (0,
|
|
10770
|
+
onReset && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
10644
10771
|
Button,
|
|
10645
10772
|
{
|
|
10646
10773
|
variant: "ghost",
|
|
10647
10774
|
onClick: onReset,
|
|
10648
10775
|
className: "absolute right-0 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]",
|
|
10649
|
-
children: /* @__PURE__ */ (0,
|
|
10776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_lucide_react44.X, { className: "h-5 w-5" })
|
|
10650
10777
|
}
|
|
10651
10778
|
)
|
|
10652
10779
|
] });
|
|
@@ -10657,7 +10784,7 @@ AirbnbSearchInput.displayName = "SearchInput";
|
|
|
10657
10784
|
var React39 = __toESM(require("react"), 1);
|
|
10658
10785
|
var import_lucide_react45 = require("lucide-react");
|
|
10659
10786
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
10660
|
-
var
|
|
10787
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
10661
10788
|
var ROW_HEIGHT = 48;
|
|
10662
10789
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
10663
10790
|
var MOBILE_LIST_HEIGHT = 420;
|
|
@@ -10808,7 +10935,7 @@ var SearchableSelectInternal = ({
|
|
|
10808
10935
|
}
|
|
10809
10936
|
}
|
|
10810
10937
|
}
|
|
10811
|
-
const content = /* @__PURE__ */ (0,
|
|
10938
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10812
10939
|
SearchableSelectContent,
|
|
10813
10940
|
{
|
|
10814
10941
|
inputId: searchInputId,
|
|
@@ -10836,9 +10963,9 @@ var SearchableSelectInternal = ({
|
|
|
10836
10963
|
}
|
|
10837
10964
|
);
|
|
10838
10965
|
React39.useImperativeHandle(ref, () => triggerRef.current, []);
|
|
10839
|
-
return /* @__PURE__ */ (0,
|
|
10840
|
-
name && /* @__PURE__ */ (0,
|
|
10841
|
-
/* @__PURE__ */ (0,
|
|
10966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
|
|
10967
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
10968
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10842
10969
|
FieldTrigger,
|
|
10843
10970
|
{
|
|
10844
10971
|
id: `${reactId}-trigger`,
|
|
@@ -10868,7 +10995,7 @@ var SearchableSelectInternal = ({
|
|
|
10868
10995
|
openSelect();
|
|
10869
10996
|
},
|
|
10870
10997
|
onKeyDown: handleTriggerKeyDown,
|
|
10871
|
-
trailingAdornment: /* @__PURE__ */ (0,
|
|
10998
|
+
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10872
10999
|
import_lucide_react45.ChevronDown,
|
|
10873
11000
|
{
|
|
10874
11001
|
className: cn(
|
|
@@ -10879,7 +11006,7 @@ var SearchableSelectInternal = ({
|
|
|
10879
11006
|
)
|
|
10880
11007
|
}
|
|
10881
11008
|
),
|
|
10882
|
-
isMobile ? /* @__PURE__ */ (0,
|
|
11009
|
+
isMobile ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10883
11010
|
Drawer,
|
|
10884
11011
|
{
|
|
10885
11012
|
open,
|
|
@@ -10890,13 +11017,13 @@ var SearchableSelectInternal = ({
|
|
|
10890
11017
|
}
|
|
10891
11018
|
closeSelect();
|
|
10892
11019
|
},
|
|
10893
|
-
children: /* @__PURE__ */ (0,
|
|
10894
|
-
/* @__PURE__ */ (0,
|
|
10895
|
-
/* @__PURE__ */ (0,
|
|
10896
|
-
/* @__PURE__ */ (0,
|
|
11020
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
|
|
11021
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
11022
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DrawerDescription, { className: "sr-only", children: label }),
|
|
11023
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
|
|
10897
11024
|
] })
|
|
10898
11025
|
}
|
|
10899
|
-
) : open ? /* @__PURE__ */ (0,
|
|
11026
|
+
) : open ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10900
11027
|
"div",
|
|
10901
11028
|
{
|
|
10902
11029
|
className: cn(
|
|
@@ -10963,16 +11090,16 @@ function SearchableSelectContent({
|
|
|
10963
11090
|
virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
|
|
10964
11091
|
}
|
|
10965
11092
|
}, [highlightedIndex, virtualizer]);
|
|
10966
|
-
return /* @__PURE__ */ (0,
|
|
10967
|
-
/* @__PURE__ */ (0,
|
|
10968
|
-
/* @__PURE__ */ (0,
|
|
11093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "p-2", children: [
|
|
11094
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "relative mb-2", children: [
|
|
11095
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10969
11096
|
import_lucide_react45.Search,
|
|
10970
11097
|
{
|
|
10971
11098
|
"aria-hidden": "true",
|
|
10972
11099
|
className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[#9696B9]"
|
|
10973
11100
|
}
|
|
10974
11101
|
),
|
|
10975
|
-
/* @__PURE__ */ (0,
|
|
11102
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10976
11103
|
"input",
|
|
10977
11104
|
{
|
|
10978
11105
|
id: inputId,
|
|
@@ -10991,7 +11118,7 @@ function SearchableSelectContent({
|
|
|
10991
11118
|
}
|
|
10992
11119
|
)
|
|
10993
11120
|
] }),
|
|
10994
|
-
loading && options.length === 0 ? /* @__PURE__ */ (0,
|
|
11121
|
+
loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
10995
11122
|
"div",
|
|
10996
11123
|
{
|
|
10997
11124
|
id: listboxId,
|
|
@@ -11000,7 +11127,7 @@ function SearchableSelectContent({
|
|
|
11000
11127
|
"aria-labelledby": labelId,
|
|
11001
11128
|
className: cn("overflow-y-auto outline-none", menuClassName),
|
|
11002
11129
|
style: { height: Math.min(height, rowCount * ROW_HEIGHT) },
|
|
11003
|
-
children: /* @__PURE__ */ (0,
|
|
11130
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
11004
11131
|
"div",
|
|
11005
11132
|
{
|
|
11006
11133
|
className: "relative w-full",
|
|
@@ -11008,7 +11135,7 @@ function SearchableSelectContent({
|
|
|
11008
11135
|
children: virtualItems.map((virtualItem) => {
|
|
11009
11136
|
const option = options[virtualItem.index];
|
|
11010
11137
|
if (!option) {
|
|
11011
|
-
return /* @__PURE__ */ (0,
|
|
11138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
11012
11139
|
"div",
|
|
11013
11140
|
{
|
|
11014
11141
|
className: "absolute left-0 top-0 flex w-full items-center px-4 text-base leading-6 text-[#6C6C6C]",
|
|
@@ -11023,7 +11150,7 @@ function SearchableSelectContent({
|
|
|
11023
11150
|
}
|
|
11024
11151
|
const isSelected = value?.value === option.value;
|
|
11025
11152
|
const isHighlighted = virtualItem.index === highlightedIndex;
|
|
11026
|
-
return /* @__PURE__ */ (0,
|
|
11153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
11027
11154
|
"button",
|
|
11028
11155
|
{
|
|
11029
11156
|
id: getOptionId(idPrefix, virtualItem.index),
|
|
@@ -11045,7 +11172,7 @@ function SearchableSelectContent({
|
|
|
11045
11172
|
height: `${virtualItem.size}px`,
|
|
11046
11173
|
transform: `translateY(${virtualItem.start}px)`
|
|
11047
11174
|
},
|
|
11048
|
-
children: /* @__PURE__ */ (0,
|
|
11175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "truncate text-center", children: String(option.label) })
|
|
11049
11176
|
},
|
|
11050
11177
|
`${String(option.value)}-${virtualItem.index}`
|
|
11051
11178
|
);
|
|
@@ -11216,6 +11343,7 @@ function getNextEnabledIndex(options, startIndex, step) {
|
|
|
11216
11343
|
RatingRadioGroup,
|
|
11217
11344
|
RatingStars,
|
|
11218
11345
|
RegistryIcon,
|
|
11346
|
+
ResponsiveSheet,
|
|
11219
11347
|
RotateIcon,
|
|
11220
11348
|
ScrollArea,
|
|
11221
11349
|
ScrollBar,
|