@chekinapp/ui 0.0.45 → 0.0.47
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 +626 -647
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -17
- package/dist/index.d.ts +6 -17
- package/dist/index.js +540 -560
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -160,7 +160,6 @@ __export(index_exports, {
|
|
|
160
160
|
LargeModal: () => LargeModal,
|
|
161
161
|
LearnMoreButton: () => LearnMoreButton,
|
|
162
162
|
Link: () => Link,
|
|
163
|
-
Loader: () => Loader,
|
|
164
163
|
LoadingBar: () => LoadingBar,
|
|
165
164
|
METRIC_CARD_VARIANTS: () => METRIC_CARD_VARIANTS,
|
|
166
165
|
MetricCard: () => MetricCard,
|
|
@@ -6081,42 +6080,9 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
6081
6080
|
] });
|
|
6082
6081
|
}
|
|
6083
6082
|
|
|
6084
|
-
// src/
|
|
6083
|
+
// src/metric-card/MetricCard.tsx
|
|
6085
6084
|
var import_lucide_react22 = require("lucide-react");
|
|
6086
|
-
var import_react_i18next15 = require("react-i18next");
|
|
6087
6085
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6088
|
-
function Loader({
|
|
6089
|
-
size = "md",
|
|
6090
|
-
text,
|
|
6091
|
-
className = "",
|
|
6092
|
-
showText = true,
|
|
6093
|
-
variant = "primary"
|
|
6094
|
-
}) {
|
|
6095
|
-
const { t } = (0, import_react_i18next15.useTranslation)();
|
|
6096
|
-
const sizeClasses3 = {
|
|
6097
|
-
sm: "h-4 w-4",
|
|
6098
|
-
md: "h-8 w-8",
|
|
6099
|
-
lg: "h-12 w-12"
|
|
6100
|
-
};
|
|
6101
|
-
const textSizeClasses = {
|
|
6102
|
-
sm: "text-xs",
|
|
6103
|
-
md: "text-sm",
|
|
6104
|
-
lg: "text-base"
|
|
6105
|
-
};
|
|
6106
|
-
const variantClasses = {
|
|
6107
|
-
primary: "text-[#4f46e5]",
|
|
6108
|
-
secondary: "text-[#475569]",
|
|
6109
|
-
ghost: "text-[#94a3b8]"
|
|
6110
|
-
};
|
|
6111
|
-
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: cn("flex flex-col items-center justify-center gap-2", className), children: [
|
|
6112
|
-
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: cn("animate-spin", sizeClasses3[size], variantClasses[variant]), children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react22.Loader2, { className: "h-full w-full" }) }),
|
|
6113
|
-
showText && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { className: cn(textSizeClasses[size], "font-medium text-[#475569]"), children: text || t("loading") })
|
|
6114
|
-
] });
|
|
6115
|
-
}
|
|
6116
|
-
|
|
6117
|
-
// src/metric-card/MetricCard.tsx
|
|
6118
|
-
var import_lucide_react23 = require("lucide-react");
|
|
6119
|
-
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6120
6086
|
var metricCardVariantClasses = {
|
|
6121
6087
|
blue: "bg-[linear-gradient(122deg,#e6f0ff_36.37%,#f6f9ff_86.4%)] text-[#385cf8] [&_[data-slot=metric-card-icon]]:bg-[#dbeafe]",
|
|
6122
6088
|
green: "bg-[linear-gradient(122deg,#ddfbf4_36.37%,#f5fefc_86.4%)] text-[#2bc29f] [&_[data-slot=metric-card-icon]]:bg-[#cff9ef]",
|
|
@@ -6134,7 +6100,7 @@ function MetricCard({
|
|
|
6134
6100
|
loading = false,
|
|
6135
6101
|
className
|
|
6136
6102
|
}) {
|
|
6137
|
-
return /* @__PURE__ */ (0,
|
|
6103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6138
6104
|
"div",
|
|
6139
6105
|
{
|
|
6140
6106
|
className: cn(
|
|
@@ -6144,7 +6110,7 @@ function MetricCard({
|
|
|
6144
6110
|
className
|
|
6145
6111
|
),
|
|
6146
6112
|
children: [
|
|
6147
|
-
/* @__PURE__ */ (0,
|
|
6113
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6148
6114
|
"div",
|
|
6149
6115
|
{
|
|
6150
6116
|
"data-slot": "metric-card-icon",
|
|
@@ -6152,22 +6118,22 @@ function MetricCard({
|
|
|
6152
6118
|
children: icon
|
|
6153
6119
|
}
|
|
6154
6120
|
),
|
|
6155
|
-
/* @__PURE__ */ (0,
|
|
6156
|
-
/* @__PURE__ */ (0,
|
|
6157
|
-
/* @__PURE__ */ (0,
|
|
6158
|
-
tooltip && /* @__PURE__ */ (0,
|
|
6121
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex flex-1 flex-col gap-4", children: [
|
|
6122
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h4", { className: "whitespace-nowrap text-base font-medium leading-6 text-[var(--chekin-color-brand-navy)]", children: title }),
|
|
6124
|
+
tooltip && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Tooltip, { side: "right", content: tooltip, contentClassName: "max-w-64", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6159
6125
|
"button",
|
|
6160
6126
|
{
|
|
6161
6127
|
type: "button",
|
|
6162
6128
|
className: "inline-flex text-[var(--chekin-color-gray-1)]",
|
|
6163
6129
|
"aria-label": tooltip,
|
|
6164
|
-
children: /* @__PURE__ */ (0,
|
|
6130
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react22.CircleQuestionMark, { className: "h-4 w-4" })
|
|
6165
6131
|
}
|
|
6166
6132
|
) })
|
|
6167
6133
|
] }),
|
|
6168
|
-
/* @__PURE__ */ (0,
|
|
6169
|
-
/* @__PURE__ */ (0,
|
|
6170
|
-
!!percentage && /* @__PURE__ */ (0,
|
|
6134
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
6135
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "text-2xl font-bold leading-6", children: value }),
|
|
6136
|
+
!!percentage && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6171
6137
|
"div",
|
|
6172
6138
|
{
|
|
6173
6139
|
className: cn(
|
|
@@ -6175,7 +6141,7 @@ function MetricCard({
|
|
|
6175
6141
|
percentage < 0 && "text-[var(--chekin-color-brand-red)]"
|
|
6176
6142
|
),
|
|
6177
6143
|
children: [
|
|
6178
|
-
percentage < 0 ? /* @__PURE__ */ (0,
|
|
6144
|
+
percentage < 0 ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react22.TrendingDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react22.TrendingUp, {}),
|
|
6179
6145
|
percentage,
|
|
6180
6146
|
"%"
|
|
6181
6147
|
]
|
|
@@ -6199,8 +6165,8 @@ var METRIC_CARD_VARIANTS = {
|
|
|
6199
6165
|
|
|
6200
6166
|
// src/modal/Modal.tsx
|
|
6201
6167
|
var import_react47 = require("react");
|
|
6202
|
-
var
|
|
6203
|
-
var
|
|
6168
|
+
var import_lucide_react23 = require("lucide-react");
|
|
6169
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6204
6170
|
var preventDefault = (event) => {
|
|
6205
6171
|
event.preventDefault();
|
|
6206
6172
|
};
|
|
@@ -6232,7 +6198,7 @@ function Modal({
|
|
|
6232
6198
|
onOpenChange?.(false);
|
|
6233
6199
|
onClose?.();
|
|
6234
6200
|
};
|
|
6235
|
-
return /* @__PURE__ */ (0,
|
|
6201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Dialog, { open, onOpenChange, modal, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
6236
6202
|
DialogContent,
|
|
6237
6203
|
{
|
|
6238
6204
|
ref: contentRef,
|
|
@@ -6251,7 +6217,7 @@ function Modal({
|
|
|
6251
6217
|
lockScroll,
|
|
6252
6218
|
...!text && { "aria-describedby": void 0 },
|
|
6253
6219
|
children: [
|
|
6254
|
-
withCloseButton && /* @__PURE__ */ (0,
|
|
6220
|
+
withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6255
6221
|
"button",
|
|
6256
6222
|
{
|
|
6257
6223
|
type: "button",
|
|
@@ -6261,14 +6227,14 @@ function Modal({
|
|
|
6261
6227
|
"absolute right-4 top-4 z-10 rounded-full p-1 text-[var(--chekin-color-brand-blue)] hover:bg-[#f4f6f8]"
|
|
6262
6228
|
),
|
|
6263
6229
|
"aria-label": "Close",
|
|
6264
|
-
children: /* @__PURE__ */ (0,
|
|
6230
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_lucide_react23.X, { className: "h-5 w-5" })
|
|
6265
6231
|
}
|
|
6266
6232
|
),
|
|
6267
|
-
(iconSrc || iconProps?.src) && /* @__PURE__ */ (0,
|
|
6268
|
-
title ? /* @__PURE__ */ (0,
|
|
6269
|
-
text && /* @__PURE__ */ (0,
|
|
6233
|
+
(iconSrc || iconProps?.src) && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "modal__icon mx-auto mt-4 select-none", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("img", { src: iconSrc, alt: iconAlt ?? "", ...iconProps }) }),
|
|
6234
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogTitle, { className: cn("modal__title", "px-6 text-lg font-bold"), children: title }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogVisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogTitle, { children: "Dialog" }) }),
|
|
6235
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogDescription, { className: cn("modal__text", "text-base"), children: text }),
|
|
6270
6236
|
children,
|
|
6271
|
-
buttons && /* @__PURE__ */ (0,
|
|
6237
|
+
buttons && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6272
6238
|
"div",
|
|
6273
6239
|
{
|
|
6274
6240
|
className: cn(
|
|
@@ -6283,7 +6249,7 @@ function Modal({
|
|
|
6283
6249
|
) });
|
|
6284
6250
|
}
|
|
6285
6251
|
var ModalButton = (0, import_react47.forwardRef)(
|
|
6286
|
-
({ children, size, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
6252
|
+
({ children, size, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6287
6253
|
Button,
|
|
6288
6254
|
{
|
|
6289
6255
|
ref,
|
|
@@ -6298,9 +6264,108 @@ ModalButton.displayName = "ModalButton";
|
|
|
6298
6264
|
Modal.displayName = "Modal";
|
|
6299
6265
|
|
|
6300
6266
|
// src/modal-loader/ModalLoader.tsx
|
|
6301
|
-
var
|
|
6267
|
+
var import_react49 = require("react");
|
|
6268
|
+
|
|
6269
|
+
// src/circular-loader/CircularLoader.tsx
|
|
6270
|
+
var import_react48 = __toESM(require("react"), 1);
|
|
6271
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6272
|
+
var CircularLoader = import_react48.default.memo(
|
|
6273
|
+
({ visible = true, height, width, position, label, className }) => {
|
|
6274
|
+
if (!visible) return null;
|
|
6275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6276
|
+
"div",
|
|
6277
|
+
{
|
|
6278
|
+
className: cn(
|
|
6279
|
+
"main-loader flex flex-col items-center justify-center gap-2",
|
|
6280
|
+
position === "center" && "h-full",
|
|
6281
|
+
className
|
|
6282
|
+
),
|
|
6283
|
+
role: "progressbar",
|
|
6284
|
+
children: [
|
|
6285
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6286
|
+
"svg",
|
|
6287
|
+
{
|
|
6288
|
+
viewBox: "25 25 50 50",
|
|
6289
|
+
className: "main-loader__svg text-[var(--circular-loader-color)]",
|
|
6290
|
+
style: {
|
|
6291
|
+
width: toCssSize(width),
|
|
6292
|
+
height: toCssSize(height)
|
|
6293
|
+
},
|
|
6294
|
+
children: [
|
|
6295
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6296
|
+
"circle",
|
|
6297
|
+
{
|
|
6298
|
+
r: "20",
|
|
6299
|
+
cy: "50",
|
|
6300
|
+
cx: "50",
|
|
6301
|
+
className: "cover fill-none stroke-current opacity-5",
|
|
6302
|
+
strokeWidth: "7"
|
|
6303
|
+
}
|
|
6304
|
+
),
|
|
6305
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6306
|
+
"circle",
|
|
6307
|
+
{
|
|
6308
|
+
r: "20",
|
|
6309
|
+
cy: "50",
|
|
6310
|
+
cx: "50",
|
|
6311
|
+
className: "circle fill-none stroke-current",
|
|
6312
|
+
strokeDasharray: "1 200",
|
|
6313
|
+
strokeDashoffset: "0",
|
|
6314
|
+
strokeLinecap: "round",
|
|
6315
|
+
strokeWidth: "7",
|
|
6316
|
+
children: [
|
|
6317
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6318
|
+
"animateTransform",
|
|
6319
|
+
{
|
|
6320
|
+
attributeName: "transform",
|
|
6321
|
+
dur: "2.25s",
|
|
6322
|
+
from: "0 50 50",
|
|
6323
|
+
repeatCount: "indefinite",
|
|
6324
|
+
to: "360 50 50",
|
|
6325
|
+
type: "rotate"
|
|
6326
|
+
}
|
|
6327
|
+
),
|
|
6328
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6329
|
+
"animate",
|
|
6330
|
+
{
|
|
6331
|
+
attributeName: "stroke-dasharray",
|
|
6332
|
+
calcMode: "spline",
|
|
6333
|
+
dur: "1.8s",
|
|
6334
|
+
keyTimes: "0;0.5;1",
|
|
6335
|
+
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
6336
|
+
repeatCount: "indefinite",
|
|
6337
|
+
values: "1 200;90 200;90 200"
|
|
6338
|
+
}
|
|
6339
|
+
),
|
|
6340
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6341
|
+
"animate",
|
|
6342
|
+
{
|
|
6343
|
+
attributeName: "stroke-dashoffset",
|
|
6344
|
+
calcMode: "spline",
|
|
6345
|
+
dur: "1.8s",
|
|
6346
|
+
keyTimes: "0;0.5;1",
|
|
6347
|
+
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
6348
|
+
repeatCount: "indefinite",
|
|
6349
|
+
values: "0;-35;-125"
|
|
6350
|
+
}
|
|
6351
|
+
)
|
|
6352
|
+
]
|
|
6353
|
+
}
|
|
6354
|
+
)
|
|
6355
|
+
]
|
|
6356
|
+
}
|
|
6357
|
+
),
|
|
6358
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "text-sm font-medium text-chekin-gray-1", children: label })
|
|
6359
|
+
]
|
|
6360
|
+
}
|
|
6361
|
+
);
|
|
6362
|
+
}
|
|
6363
|
+
);
|
|
6364
|
+
CircularLoader.displayName = "CircularLoader";
|
|
6365
|
+
|
|
6366
|
+
// src/modal-loader/ModalLoader.tsx
|
|
6302
6367
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6303
|
-
var ModalLoader = (0,
|
|
6368
|
+
var ModalLoader = (0, import_react49.memo)(({ visible, className }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6304
6369
|
"div",
|
|
6305
6370
|
{
|
|
6306
6371
|
className: cn(
|
|
@@ -6308,23 +6373,29 @@ var ModalLoader = (0, import_react48.memo)(({ visible, className }) => /* @__PUR
|
|
|
6308
6373
|
visible ? "flex" : "hidden",
|
|
6309
6374
|
className
|
|
6310
6375
|
),
|
|
6311
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "mb-[60px]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "mb-[60px]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6377
|
+
CircularLoader,
|
|
6378
|
+
{
|
|
6379
|
+
width: 48,
|
|
6380
|
+
height: 48,
|
|
6381
|
+
className: "[--circular-loader-color:#475569]"
|
|
6382
|
+
}
|
|
6383
|
+
) })
|
|
6312
6384
|
}
|
|
6313
6385
|
));
|
|
6314
6386
|
ModalLoader.displayName = "ModalLoader";
|
|
6315
6387
|
|
|
6316
6388
|
// src/overlay-loader/OverlayLoader.tsx
|
|
6389
|
+
var import_react_i18next15 = require("react-i18next");
|
|
6317
6390
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6318
6391
|
function OverlayLoader({
|
|
6319
6392
|
isLoading,
|
|
6320
6393
|
children,
|
|
6321
|
-
|
|
6322
|
-
loaderText,
|
|
6323
|
-
showText = true,
|
|
6324
|
-
loaderVariant = "primary",
|
|
6394
|
+
label,
|
|
6325
6395
|
className = "",
|
|
6326
6396
|
overlayClassName = ""
|
|
6327
6397
|
}) {
|
|
6398
|
+
const { t } = (0, import_react_i18next15.useTranslation)();
|
|
6328
6399
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: cn("relative", className), children: [
|
|
6329
6400
|
children,
|
|
6330
6401
|
isLoading && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
@@ -6334,15 +6405,7 @@ function OverlayLoader({
|
|
|
6334
6405
|
"absolute inset-0 flex items-center justify-center bg-[rgb(255_255_255_/_0.6)]",
|
|
6335
6406
|
overlayClassName
|
|
6336
6407
|
),
|
|
6337
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6338
|
-
Loader,
|
|
6339
|
-
{
|
|
6340
|
-
size: loaderSize,
|
|
6341
|
-
text: loaderText,
|
|
6342
|
-
showText,
|
|
6343
|
-
variant: loaderVariant
|
|
6344
|
-
}
|
|
6345
|
-
)
|
|
6408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CircularLoader, { width: 48, height: 48, label: label || t("loading") })
|
|
6346
6409
|
}
|
|
6347
6410
|
)
|
|
6348
6411
|
] });
|
|
@@ -6351,14 +6414,14 @@ function OverlayLoader({
|
|
|
6351
6414
|
// src/page-loader/PageLoader.tsx
|
|
6352
6415
|
var import_react_i18next16 = require("react-i18next");
|
|
6353
6416
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
6354
|
-
function PageLoader({ className, description,
|
|
6417
|
+
function PageLoader({ className, description, label }) {
|
|
6355
6418
|
const { t } = (0, import_react_i18next16.useTranslation)();
|
|
6356
6419
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
6357
6420
|
"div",
|
|
6358
6421
|
{
|
|
6359
6422
|
className: cn("flex min-h-[300px] flex-col items-center justify-center", className),
|
|
6360
6423
|
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col items-center rounded-lg border border-[var(--chekin-color-gray-3)] bg-[rgb(255_255_255_/_0.8)] p-8 shadow-sm backdrop-blur-sm", children: [
|
|
6361
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
6424
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(CircularLoader, { width: 48, height: 48, label: label || t("loading") }),
|
|
6362
6425
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { className: "mt-4 max-w-xs text-center text-sm text-[var(--chekin-color-gray-1)]", children: description || t("loading_data_description") })
|
|
6363
6426
|
] })
|
|
6364
6427
|
}
|
|
@@ -6367,15 +6430,15 @@ function PageLoader({ className, description, ...props }) {
|
|
|
6367
6430
|
|
|
6368
6431
|
// src/pagination/Pagination.tsx
|
|
6369
6432
|
var import_react_i18next17 = require("react-i18next");
|
|
6370
|
-
var
|
|
6433
|
+
var import_lucide_react26 = require("lucide-react");
|
|
6371
6434
|
|
|
6372
6435
|
// src/select/Select.tsx
|
|
6373
|
-
var
|
|
6436
|
+
var import_react50 = require("react");
|
|
6374
6437
|
|
|
6375
6438
|
// src/select/components.tsx
|
|
6376
|
-
var
|
|
6439
|
+
var React22 = __toESM(require("react"), 1);
|
|
6377
6440
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
6378
|
-
var
|
|
6441
|
+
var import_lucide_react24 = require("lucide-react");
|
|
6379
6442
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
6380
6443
|
var SelectRoot = SelectPrimitive.Root;
|
|
6381
6444
|
var SelectGroup = SelectPrimitive.Group;
|
|
@@ -6385,7 +6448,7 @@ var selectSizeClassNames = {
|
|
|
6385
6448
|
sm: "text-sm",
|
|
6386
6449
|
md: "text-base"
|
|
6387
6450
|
};
|
|
6388
|
-
var SelectTrigger =
|
|
6451
|
+
var SelectTrigger = React22.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
6389
6452
|
SelectPrimitive.Trigger,
|
|
6390
6453
|
{
|
|
6391
6454
|
ref,
|
|
@@ -6401,7 +6464,7 @@ var SelectTrigger = React21.forwardRef(({ className, children, size = "sm", ...p
|
|
|
6401
6464
|
children: [
|
|
6402
6465
|
children,
|
|
6403
6466
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6404
|
-
|
|
6467
|
+
import_lucide_react24.ChevronDownIcon,
|
|
6405
6468
|
{
|
|
6406
6469
|
size: 16,
|
|
6407
6470
|
strokeWidth: 2,
|
|
@@ -6412,27 +6475,27 @@ var SelectTrigger = React21.forwardRef(({ className, children, size = "sm", ...p
|
|
|
6412
6475
|
}
|
|
6413
6476
|
));
|
|
6414
6477
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
6415
|
-
var SelectScrollUpButton =
|
|
6478
|
+
var SelectScrollUpButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6416
6479
|
SelectPrimitive.ScrollUpButton,
|
|
6417
6480
|
{
|
|
6418
6481
|
ref,
|
|
6419
6482
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
6420
6483
|
...props,
|
|
6421
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react24.ChevronUpIcon, { size: 16, strokeWidth: 2 })
|
|
6422
6485
|
}
|
|
6423
6486
|
));
|
|
6424
6487
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
6425
|
-
var SelectScrollDownButton =
|
|
6488
|
+
var SelectScrollDownButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6426
6489
|
SelectPrimitive.ScrollDownButton,
|
|
6427
6490
|
{
|
|
6428
6491
|
ref,
|
|
6429
6492
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
6430
6493
|
...props,
|
|
6431
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react24.ChevronDownIcon, { size: 16, strokeWidth: 2 })
|
|
6432
6495
|
}
|
|
6433
6496
|
));
|
|
6434
6497
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
6435
|
-
var SelectContent =
|
|
6498
|
+
var SelectContent = React22.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
6436
6499
|
SelectPrimitive.Content,
|
|
6437
6500
|
{
|
|
6438
6501
|
ref,
|
|
@@ -6466,7 +6529,7 @@ var SelectContent = React21.forwardRef(({ className, children, position = "poppe
|
|
|
6466
6529
|
}
|
|
6467
6530
|
) }));
|
|
6468
6531
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
6469
|
-
var SelectLabel =
|
|
6532
|
+
var SelectLabel = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6470
6533
|
SelectPrimitive.Label,
|
|
6471
6534
|
{
|
|
6472
6535
|
ref,
|
|
@@ -6478,7 +6541,7 @@ var SelectLabel = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6478
6541
|
}
|
|
6479
6542
|
));
|
|
6480
6543
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
6481
|
-
var SelectItem =
|
|
6544
|
+
var SelectItem = React22.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
6482
6545
|
SelectPrimitive.Item,
|
|
6483
6546
|
{
|
|
6484
6547
|
ref,
|
|
@@ -6492,13 +6555,13 @@ var SelectItem = React21.forwardRef(({ className, children, size = "sm", ...prop
|
|
|
6492
6555
|
),
|
|
6493
6556
|
...props,
|
|
6494
6557
|
children: [
|
|
6495
|
-
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react24.CheckIcon, { size: 16, strokeWidth: 2 }) }) }),
|
|
6496
6559
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SelectPrimitive.ItemText, { children })
|
|
6497
6560
|
]
|
|
6498
6561
|
}
|
|
6499
6562
|
));
|
|
6500
6563
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
6501
|
-
var SelectSeparator =
|
|
6564
|
+
var SelectSeparator = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6502
6565
|
SelectPrimitive.Separator,
|
|
6503
6566
|
{
|
|
6504
6567
|
ref,
|
|
@@ -6526,8 +6589,8 @@ var SelectInner = ({
|
|
|
6526
6589
|
onValueChange,
|
|
6527
6590
|
disabled
|
|
6528
6591
|
}, ref) => {
|
|
6529
|
-
const id = (0,
|
|
6530
|
-
const [isOpen, setIsOpen] = (0,
|
|
6592
|
+
const id = (0, import_react50.useId)();
|
|
6593
|
+
const [isOpen, setIsOpen] = (0, import_react50.useState)(false);
|
|
6531
6594
|
const hasValue = Boolean(value);
|
|
6532
6595
|
const showLabel = hasValue || isOpen;
|
|
6533
6596
|
const handleValueChange = (newValue) => {
|
|
@@ -6574,14 +6637,14 @@ var SelectInner = ({
|
|
|
6574
6637
|
] })
|
|
6575
6638
|
] });
|
|
6576
6639
|
};
|
|
6577
|
-
var SelectForward = (0,
|
|
6640
|
+
var SelectForward = (0, import_react50.forwardRef)(SelectInner);
|
|
6578
6641
|
SelectForward.displayName = "Select";
|
|
6579
6642
|
var Select = SelectForward;
|
|
6580
6643
|
|
|
6581
6644
|
// src/select/MultiSelect.tsx
|
|
6582
6645
|
var SelectPrimitive2 = __toESM(require("@radix-ui/react-select"), 1);
|
|
6583
|
-
var
|
|
6584
|
-
var
|
|
6646
|
+
var import_lucide_react25 = require("lucide-react");
|
|
6647
|
+
var import_react51 = require("react");
|
|
6585
6648
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
6586
6649
|
var MultiSelectInner = ({
|
|
6587
6650
|
label,
|
|
@@ -6592,8 +6655,8 @@ var MultiSelectInner = ({
|
|
|
6592
6655
|
placeholder,
|
|
6593
6656
|
disabled
|
|
6594
6657
|
}, ref) => {
|
|
6595
|
-
const id = (0,
|
|
6596
|
-
const [open, setOpen] = (0,
|
|
6658
|
+
const id = (0, import_react51.useId)();
|
|
6659
|
+
const [open, setOpen] = (0, import_react51.useState)(false);
|
|
6597
6660
|
const hasValue = value.length > 0;
|
|
6598
6661
|
const showLabel = hasValue || open;
|
|
6599
6662
|
const handleSelect = (selectedValue) => {
|
|
@@ -6645,7 +6708,7 @@ var MultiSelectInner = ({
|
|
|
6645
6708
|
selected && "bg-[#f9fafb]"
|
|
6646
6709
|
),
|
|
6647
6710
|
children: [
|
|
6648
|
-
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "absolute start-2 flex size-3.5 items-center justify-center", children: selected && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
6711
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "absolute start-2 flex size-3.5 items-center justify-center", children: selected && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react25.CheckIcon, { size: 16, strokeWidth: 2 }) }),
|
|
6649
6712
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { children: optionLabel })
|
|
6650
6713
|
]
|
|
6651
6714
|
},
|
|
@@ -6657,11 +6720,11 @@ var MultiSelectInner = ({
|
|
|
6657
6720
|
)
|
|
6658
6721
|
] });
|
|
6659
6722
|
};
|
|
6660
|
-
var MultiSelect = (0,
|
|
6723
|
+
var MultiSelect = (0, import_react51.forwardRef)(MultiSelectInner);
|
|
6661
6724
|
|
|
6662
6725
|
// src/select/InfinitySelect.tsx
|
|
6663
6726
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
6664
|
-
var
|
|
6727
|
+
var import_react52 = require("react");
|
|
6665
6728
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
6666
6729
|
function InfinitySelect({
|
|
6667
6730
|
label,
|
|
@@ -6676,22 +6739,22 @@ function InfinitySelect({
|
|
|
6676
6739
|
itemHeight = 35,
|
|
6677
6740
|
maxHeight = 300
|
|
6678
6741
|
}) {
|
|
6679
|
-
const id = (0,
|
|
6680
|
-
const parentRef = (0,
|
|
6681
|
-
const [isOpen, setIsOpen] = (0,
|
|
6742
|
+
const id = (0, import_react52.useId)();
|
|
6743
|
+
const parentRef = (0, import_react52.useRef)(null);
|
|
6744
|
+
const [isOpen, setIsOpen] = (0, import_react52.useState)(false);
|
|
6682
6745
|
const virtualizer = (0, import_react_virtual.useVirtualizer)({
|
|
6683
6746
|
count: hasNextPage ? options.length + 1 : options.length,
|
|
6684
6747
|
getScrollElement: () => parentRef.current,
|
|
6685
6748
|
estimateSize: () => itemHeight,
|
|
6686
6749
|
overscan: 5
|
|
6687
6750
|
});
|
|
6688
|
-
const loadMore = (0,
|
|
6751
|
+
const loadMore = (0, import_react52.useCallback)(() => {
|
|
6689
6752
|
if (hasNextPage && !isFetchingNextPage) {
|
|
6690
6753
|
fetchNextPage();
|
|
6691
6754
|
}
|
|
6692
6755
|
}, [fetchNextPage, hasNextPage, isFetchingNextPage]);
|
|
6693
6756
|
const virtualItems = virtualizer.getVirtualItems();
|
|
6694
|
-
(0,
|
|
6757
|
+
(0, import_react52.useEffect)(() => {
|
|
6695
6758
|
if (!virtualItems.length) return;
|
|
6696
6759
|
const lastItem = virtualItems[virtualItems.length - 1];
|
|
6697
6760
|
if (lastItem && lastItem.index >= options.length - 5 && hasNextPage && !isFetchingNextPage) {
|
|
@@ -6850,7 +6913,7 @@ function Pagination({
|
|
|
6850
6913
|
disabled: !canGoPrevious,
|
|
6851
6914
|
children: [
|
|
6852
6915
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "sr-only", children: t("go_to_first_page") }),
|
|
6853
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6916
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react26.ChevronsLeft, {})
|
|
6854
6917
|
]
|
|
6855
6918
|
}
|
|
6856
6919
|
),
|
|
@@ -6866,7 +6929,7 @@ function Pagination({
|
|
|
6866
6929
|
disabled: !canGoPrevious,
|
|
6867
6930
|
children: [
|
|
6868
6931
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "sr-only", children: t("go_to_previous_page") }),
|
|
6869
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6932
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react26.ChevronLeft, {})
|
|
6870
6933
|
]
|
|
6871
6934
|
}
|
|
6872
6935
|
),
|
|
@@ -6882,7 +6945,7 @@ function Pagination({
|
|
|
6882
6945
|
disabled: !canGoNext,
|
|
6883
6946
|
children: [
|
|
6884
6947
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "sr-only", children: t("go_to_next_page") }),
|
|
6885
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6948
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react26.ChevronRight, {})
|
|
6886
6949
|
]
|
|
6887
6950
|
}
|
|
6888
6951
|
),
|
|
@@ -6896,7 +6959,7 @@ function Pagination({
|
|
|
6896
6959
|
disabled: !canGoNext,
|
|
6897
6960
|
children: [
|
|
6898
6961
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "sr-only", children: t("go_to_last_page") }),
|
|
6899
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
6962
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react26.ChevronsRight, {})
|
|
6900
6963
|
]
|
|
6901
6964
|
}
|
|
6902
6965
|
)
|
|
@@ -6908,7 +6971,7 @@ function Pagination({
|
|
|
6908
6971
|
}
|
|
6909
6972
|
|
|
6910
6973
|
// src/popover/Popover.tsx
|
|
6911
|
-
var
|
|
6974
|
+
var React23 = __toESM(require("react"), 1);
|
|
6912
6975
|
var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
6913
6976
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
6914
6977
|
var Popover = RadixPopover.Root;
|
|
@@ -6916,7 +6979,7 @@ var PopoverTrigger = RadixPopover.Trigger;
|
|
|
6916
6979
|
var PopoverAnchor = RadixPopover.Anchor;
|
|
6917
6980
|
var PopoverPortal = RadixPopover.Portal;
|
|
6918
6981
|
var PopoverClose = RadixPopover.Close;
|
|
6919
|
-
var PopoverContent =
|
|
6982
|
+
var PopoverContent = React23.forwardRef(({ className, sideOffset = 4, align = "center", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
6920
6983
|
RadixPopover.Content,
|
|
6921
6984
|
{
|
|
6922
6985
|
ref,
|
|
@@ -7003,14 +7066,14 @@ function PopoverWithTooltip({
|
|
|
7003
7066
|
}
|
|
7004
7067
|
|
|
7005
7068
|
// src/radio/Radio.tsx
|
|
7006
|
-
var
|
|
7069
|
+
var import_react54 = require("react");
|
|
7007
7070
|
|
|
7008
7071
|
// src/radio-group/RadioGroup.tsx
|
|
7009
|
-
var
|
|
7072
|
+
var React24 = __toESM(require("react"), 1);
|
|
7010
7073
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
7011
|
-
var
|
|
7074
|
+
var import_lucide_react27 = require("lucide-react");
|
|
7012
7075
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
7013
|
-
var RadioGroup2 =
|
|
7076
|
+
var RadioGroup2 = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
7014
7077
|
RadioGroupPrimitive.Root,
|
|
7015
7078
|
{
|
|
7016
7079
|
ref,
|
|
@@ -7019,7 +7082,7 @@ var RadioGroup2 = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7019
7082
|
}
|
|
7020
7083
|
));
|
|
7021
7084
|
RadioGroup2.displayName = RadioGroupPrimitive.Root.displayName;
|
|
7022
|
-
var RadioGroupItem =
|
|
7085
|
+
var RadioGroupItem = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
7023
7086
|
RadioGroupPrimitive.Item,
|
|
7024
7087
|
{
|
|
7025
7088
|
ref,
|
|
@@ -7030,17 +7093,17 @@ var RadioGroupItem = React23.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
7030
7093
|
className
|
|
7031
7094
|
),
|
|
7032
7095
|
...props,
|
|
7033
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
7096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react27.Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
7034
7097
|
}
|
|
7035
7098
|
));
|
|
7036
7099
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
7037
7100
|
|
|
7038
7101
|
// src/radio/useRadioOptions.ts
|
|
7039
|
-
var
|
|
7102
|
+
var import_react53 = require("react");
|
|
7040
7103
|
function useRadioOptions({ options, defaultValue, onChange }) {
|
|
7041
7104
|
const initialValue = (typeof defaultValue === "string" ? options.find((option) => option.value === defaultValue) : defaultValue) || "";
|
|
7042
|
-
const [selectedValue, setSelectedValue] = (0,
|
|
7043
|
-
const handleValueChange = (0,
|
|
7105
|
+
const [selectedValue, setSelectedValue] = (0, import_react53.useState)(initialValue);
|
|
7106
|
+
const handleValueChange = (0, import_react53.useCallback)(
|
|
7044
7107
|
(value) => {
|
|
7045
7108
|
setSelectedValue(value);
|
|
7046
7109
|
const selectedOption = options.find((option) => option.value === value) || "";
|
|
@@ -7058,7 +7121,7 @@ function useRadioOptions({ options, defaultValue, onChange }) {
|
|
|
7058
7121
|
|
|
7059
7122
|
// src/radio/Radio.tsx
|
|
7060
7123
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
7061
|
-
var Radio = (0,
|
|
7124
|
+
var Radio = (0, import_react54.forwardRef)(
|
|
7062
7125
|
({ options, value, onChange, error, className = "", disabled = false, renderOption }, ref) => {
|
|
7063
7126
|
const { selectedValue, handleValueChange } = useRadioOptions({
|
|
7064
7127
|
options,
|
|
@@ -7197,7 +7260,7 @@ function RatingProgress({
|
|
|
7197
7260
|
}
|
|
7198
7261
|
|
|
7199
7262
|
// src/rating-radio-group/RatingRadioGroup.tsx
|
|
7200
|
-
var
|
|
7263
|
+
var import_lucide_react28 = require("lucide-react");
|
|
7201
7264
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
7202
7265
|
var getStarColor = (optionValue) => (value) => {
|
|
7203
7266
|
if (value >= optionValue) return "#facc15";
|
|
@@ -7226,7 +7289,7 @@ function RatingRadioGroup({
|
|
|
7226
7289
|
}
|
|
7227
7290
|
),
|
|
7228
7291
|
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
7229
|
-
|
|
7292
|
+
import_lucide_react28.Star,
|
|
7230
7293
|
{
|
|
7231
7294
|
className: "cursor-pointer rounded peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-[#385bf8]",
|
|
7232
7295
|
size: 24,
|
|
@@ -7240,8 +7303,8 @@ function RatingRadioGroup({
|
|
|
7240
7303
|
}
|
|
7241
7304
|
|
|
7242
7305
|
// src/rating-stars/RatingStars.tsx
|
|
7243
|
-
var
|
|
7244
|
-
var
|
|
7306
|
+
var React25 = __toESM(require("react"), 1);
|
|
7307
|
+
var import_lucide_react29 = require("lucide-react");
|
|
7245
7308
|
var import_react_i18next18 = require("react-i18next");
|
|
7246
7309
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
7247
7310
|
function RatingStars({
|
|
@@ -7260,7 +7323,7 @@ function RatingStars({
|
|
|
7260
7323
|
const { t } = (0, import_react_i18next18.useTranslation)();
|
|
7261
7324
|
const normalizedRating = Math.max(0, Math.min(maxRating, rating));
|
|
7262
7325
|
const stars = Array.from({ length: maxRating }, (_, index) => index + 1);
|
|
7263
|
-
const componentId =
|
|
7326
|
+
const componentId = React25.useId();
|
|
7264
7327
|
const decimal = normalizedRating - Math.floor(normalizedRating);
|
|
7265
7328
|
const partialStarIndex = decimal > 0 ? Math.ceil(normalizedRating) : -1;
|
|
7266
7329
|
const gradientId = `star-gradient-${componentId.replace(/:/g, "")}`;
|
|
@@ -7285,7 +7348,7 @@ function RatingStars({
|
|
|
7285
7348
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("stop", { offset: `${decimal * 100}%`, stopColor: emptyColor })
|
|
7286
7349
|
] }) }) }),
|
|
7287
7350
|
stars.map((star) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
7288
|
-
|
|
7351
|
+
import_lucide_react29.Star,
|
|
7289
7352
|
{
|
|
7290
7353
|
size,
|
|
7291
7354
|
className: cn("shrink-0", starClassName),
|
|
@@ -7308,11 +7371,11 @@ function RatingStars({
|
|
|
7308
7371
|
}
|
|
7309
7372
|
|
|
7310
7373
|
// src/rotate-icon/RotateIcon.tsx
|
|
7311
|
-
var
|
|
7374
|
+
var import_lucide_react30 = require("lucide-react");
|
|
7312
7375
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
7313
7376
|
function RotateIcon({ active, className }) {
|
|
7314
7377
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
7315
|
-
|
|
7378
|
+
import_lucide_react30.ChevronUp,
|
|
7316
7379
|
{
|
|
7317
7380
|
className: cn(
|
|
7318
7381
|
"h-4 w-4 transition-transform",
|
|
@@ -7324,7 +7387,7 @@ function RotateIcon({ active, className }) {
|
|
|
7324
7387
|
}
|
|
7325
7388
|
|
|
7326
7389
|
// src/search-button/SearchButton.tsx
|
|
7327
|
-
var
|
|
7390
|
+
var import_lucide_react31 = require("lucide-react");
|
|
7328
7391
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
7329
7392
|
function SearchButton({ onClick, className, icon, ariaLabel }) {
|
|
7330
7393
|
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
@@ -7335,13 +7398,13 @@ function SearchButton({ onClick, className, icon, ariaLabel }) {
|
|
|
7335
7398
|
"data-testid": "search-button",
|
|
7336
7399
|
"aria-label": ariaLabel,
|
|
7337
7400
|
type: "button",
|
|
7338
|
-
children: icon || /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7401
|
+
children: icon || /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_lucide_react31.Search, { size: 12, strokeWidth: 4, className: "text-[var(--chekin-color-gray-1)]" })
|
|
7339
7402
|
}
|
|
7340
7403
|
);
|
|
7341
7404
|
}
|
|
7342
7405
|
|
|
7343
7406
|
// src/search-input/SearchInput.tsx
|
|
7344
|
-
var
|
|
7407
|
+
var import_lucide_react32 = require("lucide-react");
|
|
7345
7408
|
var import_react_i18next19 = require("react-i18next");
|
|
7346
7409
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
7347
7410
|
function SearchInput({
|
|
@@ -7369,7 +7432,7 @@ function SearchInput({
|
|
|
7369
7432
|
tooltip && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(HelpTooltip, { content: tooltip, side: "top", size: 16 })
|
|
7370
7433
|
] }),
|
|
7371
7434
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "relative", children: [
|
|
7372
|
-
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7435
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react32.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[var(--chekin-color-gray-2)]" }),
|
|
7373
7436
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7374
7437
|
Input,
|
|
7375
7438
|
{
|
|
@@ -7390,7 +7453,7 @@ function SearchInput({
|
|
|
7390
7453
|
),
|
|
7391
7454
|
(loading || onReset) && /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "absolute right-2 top-1/2 flex -translate-y-1/2 items-center gap-1", children: [
|
|
7392
7455
|
loading && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7393
|
-
|
|
7456
|
+
import_lucide_react32.Loader2,
|
|
7394
7457
|
{
|
|
7395
7458
|
"aria-hidden": "true",
|
|
7396
7459
|
className: "h-5 w-5 animate-spin text-[var(--chekin-color-gray-2)]"
|
|
@@ -7404,7 +7467,7 @@ function SearchInput({
|
|
|
7404
7467
|
disabled: isBlocked,
|
|
7405
7468
|
className: "h-7 w-7 p-0 text-[var(--chekin-color-gray-2)]",
|
|
7406
7469
|
"aria-label": t("reset_search"),
|
|
7407
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7470
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react32.X, { className: "h-5 w-5" })
|
|
7408
7471
|
}
|
|
7409
7472
|
)
|
|
7410
7473
|
] })
|
|
@@ -7443,8 +7506,9 @@ var SectionTagColors = /* @__PURE__ */ ((SectionTagColors2) => {
|
|
|
7443
7506
|
})(SectionTagColors || {});
|
|
7444
7507
|
|
|
7445
7508
|
// src/section/Section.tsx
|
|
7446
|
-
var
|
|
7447
|
-
var
|
|
7509
|
+
var import_react55 = require("react");
|
|
7510
|
+
var import_lucide_react33 = require("lucide-react");
|
|
7511
|
+
var import_react_i18next20 = require("react-i18next");
|
|
7448
7512
|
|
|
7449
7513
|
// src/section/constants.ts
|
|
7450
7514
|
var SubSectionSize = /* @__PURE__ */ ((SubSectionSize2) => {
|
|
@@ -7463,11 +7527,11 @@ function TooltipInfo({ content, className }) {
|
|
|
7463
7527
|
className: cn("inline-flex text-[var(--chekin-color-gray-1)]", className),
|
|
7464
7528
|
onClick: (event) => event.stopPropagation(),
|
|
7465
7529
|
"aria-label": typeof content === "string" ? content : "More information",
|
|
7466
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_lucide_react33.CircleHelp, { className: "h-4 w-4" })
|
|
7467
7531
|
}
|
|
7468
7532
|
) });
|
|
7469
7533
|
}
|
|
7470
|
-
var Section = (0,
|
|
7534
|
+
var Section = (0, import_react55.forwardRef)(
|
|
7471
7535
|
({
|
|
7472
7536
|
children,
|
|
7473
7537
|
title,
|
|
@@ -7481,45 +7545,56 @@ var Section = (0, import_react54.forwardRef)(
|
|
|
7481
7545
|
linkContent,
|
|
7482
7546
|
hidden,
|
|
7483
7547
|
size
|
|
7484
|
-
}, ref) =>
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7548
|
+
}, ref) => {
|
|
7549
|
+
const { t } = (0, import_react_i18next20.useTranslation)();
|
|
7550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
7551
|
+
"div",
|
|
7552
|
+
{
|
|
7553
|
+
ref,
|
|
7554
|
+
className: cn(
|
|
7555
|
+
"mb-6 box-border flex w-full cursor-default flex-col gap-6 rounded-lg border border-solid border-[var(--chekin-color-gray-3)] bg-white px-6 py-10",
|
|
7556
|
+
loading && "cursor-progress",
|
|
7557
|
+
disabled && "pointer-events-none opacity-50",
|
|
7558
|
+
{ "!hidden": hidden },
|
|
7559
|
+
className
|
|
7560
|
+
),
|
|
7561
|
+
children: [
|
|
7562
|
+
(title || subtitle) && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
7563
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
7564
|
+
"div",
|
|
7565
|
+
{
|
|
7566
|
+
className: cn(
|
|
7567
|
+
"flex max-w-[85%] items-center text-lg font-bold text-[var(--chekin-color-brand-navy)] md:max-w-full",
|
|
7568
|
+
size !== 0 /* L */ && "subsection-title"
|
|
7569
|
+
),
|
|
7570
|
+
children: [
|
|
7571
|
+
title,
|
|
7572
|
+
titleTooltip && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "ml-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TooltipInfo, { content: titleTooltip }) }),
|
|
7573
|
+
linkContent && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "ml-6 text-sm font-semibold text-[var(--chekin-color-brand-blue)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
|
|
7574
|
+
]
|
|
7575
|
+
}
|
|
7576
|
+
),
|
|
7577
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "w-full max-w-[720px] md:max-w-full", children: [
|
|
7578
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "inline text-base font-normal text-[var(--chekin-color-gray-1)]", children: subtitle }),
|
|
7579
|
+
subtitleTooltip && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "ml-1.5 inline-block align-text-top", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TooltipInfo, { content: subtitleTooltip }) })
|
|
7580
|
+
] })
|
|
7581
|
+
] }),
|
|
7582
|
+
loading && showLoader ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7583
|
+
CircularLoader,
|
|
7499
7584
|
{
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
children: [
|
|
7505
|
-
title,
|
|
7506
|
-
titleTooltip && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "ml-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TooltipInfo, { content: titleTooltip }) }),
|
|
7507
|
-
linkContent && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "ml-6 text-sm font-semibold text-[var(--chekin-color-brand-blue)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
|
|
7508
|
-
]
|
|
7585
|
+
width: 32,
|
|
7586
|
+
height: 32,
|
|
7587
|
+
label: t("loading"),
|
|
7588
|
+
className: "mx-auto mb-3 mt-2.5"
|
|
7509
7589
|
}
|
|
7510
|
-
)
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
] }),
|
|
7516
|
-
loading && showLoader ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Loader, { className: "mx-auto mb-3 mt-2.5" }) : children
|
|
7517
|
-
]
|
|
7518
|
-
}
|
|
7519
|
-
)
|
|
7590
|
+
) : children
|
|
7591
|
+
]
|
|
7592
|
+
}
|
|
7593
|
+
);
|
|
7594
|
+
}
|
|
7520
7595
|
);
|
|
7521
7596
|
Section.displayName = "Section";
|
|
7522
|
-
var SubSection = (0,
|
|
7597
|
+
var SubSection = (0, import_react55.forwardRef)(
|
|
7523
7598
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7524
7599
|
Section,
|
|
7525
7600
|
{
|
|
@@ -7533,7 +7608,7 @@ var SubSection = (0, import_react54.forwardRef)(
|
|
|
7533
7608
|
)
|
|
7534
7609
|
);
|
|
7535
7610
|
SubSection.displayName = "SubSection";
|
|
7536
|
-
var DividingSubsection = (0,
|
|
7611
|
+
var DividingSubsection = (0, import_react55.forwardRef)(
|
|
7537
7612
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7538
7613
|
SubSection,
|
|
7539
7614
|
{
|
|
@@ -7546,7 +7621,7 @@ var DividingSubsection = (0, import_react54.forwardRef)(
|
|
|
7546
7621
|
DividingSubsection.displayName = "DividingSubsection";
|
|
7547
7622
|
|
|
7548
7623
|
// src/selectors/Selectors.tsx
|
|
7549
|
-
var
|
|
7624
|
+
var import_react56 = require("react");
|
|
7550
7625
|
|
|
7551
7626
|
// src/selector-button/SelectorButton.tsx
|
|
7552
7627
|
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
@@ -7615,8 +7690,8 @@ var getValueArray = (value) => {
|
|
|
7615
7690
|
return [];
|
|
7616
7691
|
};
|
|
7617
7692
|
function getSelectorContent(label, disabled, readOnly, active) {
|
|
7618
|
-
if ((0,
|
|
7619
|
-
return (0,
|
|
7693
|
+
if ((0, import_react56.isValidElement)(label)) {
|
|
7694
|
+
return (0, import_react56.cloneElement)(label, {
|
|
7620
7695
|
disabled,
|
|
7621
7696
|
readOnly,
|
|
7622
7697
|
active
|
|
@@ -7661,7 +7736,7 @@ function SelectorsInternal({
|
|
|
7661
7736
|
}
|
|
7662
7737
|
};
|
|
7663
7738
|
const isAnyActive = getValueArray(value).length > 0;
|
|
7664
|
-
(0,
|
|
7739
|
+
(0, import_react56.useEffect)(() => {
|
|
7665
7740
|
onAnySelectorActive?.(isAnyActive);
|
|
7666
7741
|
}, [isAnyActive, onAnySelectorActive]);
|
|
7667
7742
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
|
|
@@ -7706,7 +7781,7 @@ function SelectorsInternal({
|
|
|
7706
7781
|
)
|
|
7707
7782
|
] });
|
|
7708
7783
|
}
|
|
7709
|
-
var Selectors = (0,
|
|
7784
|
+
var Selectors = (0, import_react56.forwardRef)(SelectorsInternal);
|
|
7710
7785
|
|
|
7711
7786
|
// src/separator/Separator.tsx
|
|
7712
7787
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
@@ -7734,7 +7809,7 @@ function Separator3({
|
|
|
7734
7809
|
|
|
7735
7810
|
// src/sheet/Sheet.tsx
|
|
7736
7811
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
7737
|
-
var
|
|
7812
|
+
var import_lucide_react34 = require("lucide-react");
|
|
7738
7813
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
7739
7814
|
function Sheet({ ...props }) {
|
|
7740
7815
|
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
@@ -7788,7 +7863,7 @@ function SheetContent({
|
|
|
7788
7863
|
children: [
|
|
7789
7864
|
children,
|
|
7790
7865
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-[var(--chekin-radius-small)] opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:shadow-[var(--chekin-shadow-focus)] disabled:pointer-events-none", children: [
|
|
7791
|
-
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7866
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_lucide_react34.XIcon, { className: "size-4" }),
|
|
7792
7867
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "sr-only", children: "Close" })
|
|
7793
7868
|
] })
|
|
7794
7869
|
]
|
|
@@ -7844,10 +7919,10 @@ function SheetDescription({
|
|
|
7844
7919
|
}
|
|
7845
7920
|
|
|
7846
7921
|
// src/sidebar/Sidebar.tsx
|
|
7847
|
-
var
|
|
7922
|
+
var React26 = __toESM(require("react"), 1);
|
|
7848
7923
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
7849
7924
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
7850
|
-
var
|
|
7925
|
+
var import_lucide_react35 = require("lucide-react");
|
|
7851
7926
|
|
|
7852
7927
|
// src/skeleton/Skeleton.tsx
|
|
7853
7928
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
@@ -7866,19 +7941,19 @@ function Skeleton({ className, ...props }) {
|
|
|
7866
7941
|
}
|
|
7867
7942
|
|
|
7868
7943
|
// src/sidebar/SidebarContext.ts
|
|
7869
|
-
var
|
|
7870
|
-
var SidebarContext = (0,
|
|
7944
|
+
var import_react57 = require("react");
|
|
7945
|
+
var SidebarContext = (0, import_react57.createContext)(null);
|
|
7871
7946
|
|
|
7872
7947
|
// src/sidebar/useSidebarMenuButton.ts
|
|
7873
|
-
var
|
|
7948
|
+
var import_react59 = require("react");
|
|
7874
7949
|
|
|
7875
7950
|
// src/sidebar/SidebarMenuButtonContext.ts
|
|
7876
|
-
var
|
|
7877
|
-
var SidebarMenuButtonContext = (0,
|
|
7951
|
+
var import_react58 = require("react");
|
|
7952
|
+
var SidebarMenuButtonContext = (0, import_react58.createContext)(null);
|
|
7878
7953
|
|
|
7879
7954
|
// src/sidebar/useSidebarMenuButton.ts
|
|
7880
7955
|
function useSidebarMenuButton() {
|
|
7881
|
-
return (0,
|
|
7956
|
+
return (0, import_react59.useContext)(SidebarMenuButtonContext);
|
|
7882
7957
|
}
|
|
7883
7958
|
|
|
7884
7959
|
// src/sidebar/SidebarIcon.tsx
|
|
@@ -7919,16 +7994,16 @@ var SidebarIcon = ({
|
|
|
7919
7994
|
};
|
|
7920
7995
|
|
|
7921
7996
|
// src/sidebar/useSidebar.ts
|
|
7922
|
-
var
|
|
7997
|
+
var import_react60 = require("react");
|
|
7923
7998
|
function useSidebar() {
|
|
7924
|
-
const context = (0,
|
|
7999
|
+
const context = (0, import_react60.useContext)(SidebarContext);
|
|
7925
8000
|
if (!context) {
|
|
7926
8001
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
7927
8002
|
}
|
|
7928
8003
|
return context;
|
|
7929
8004
|
}
|
|
7930
8005
|
function useSidebarSafe() {
|
|
7931
|
-
return (0,
|
|
8006
|
+
return (0, import_react60.useContext)(SidebarContext);
|
|
7932
8007
|
}
|
|
7933
8008
|
|
|
7934
8009
|
// src/sidebar/Sidebar.tsx
|
|
@@ -7937,7 +8012,7 @@ var SIDEBAR_COOKIE_NAME_DEFAULT = "sidebar_state";
|
|
|
7937
8012
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
7938
8013
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
7939
8014
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
7940
|
-
var SidebarProvider =
|
|
8015
|
+
var SidebarProvider = React26.forwardRef(
|
|
7941
8016
|
({
|
|
7942
8017
|
defaultOpen = true,
|
|
7943
8018
|
open: openProp,
|
|
@@ -7949,10 +8024,10 @@ var SidebarProvider = React25.forwardRef(
|
|
|
7949
8024
|
...props
|
|
7950
8025
|
}, ref) => {
|
|
7951
8026
|
const isMobile = useIsMobile({ breakpoint: 641 });
|
|
7952
|
-
const [openMobile, setOpenMobile] =
|
|
7953
|
-
const [_open, _setOpen] =
|
|
8027
|
+
const [openMobile, setOpenMobile] = React26.useState(false);
|
|
8028
|
+
const [_open, _setOpen] = React26.useState(defaultOpen);
|
|
7954
8029
|
const open = openProp ?? _open;
|
|
7955
|
-
const setOpen =
|
|
8030
|
+
const setOpen = React26.useCallback(
|
|
7956
8031
|
(value) => {
|
|
7957
8032
|
const openState = typeof value === "function" ? value(open) : value;
|
|
7958
8033
|
if (setOpenProp) {
|
|
@@ -7964,10 +8039,10 @@ var SidebarProvider = React25.forwardRef(
|
|
|
7964
8039
|
},
|
|
7965
8040
|
[setOpenProp, open, stateName]
|
|
7966
8041
|
);
|
|
7967
|
-
const toggleSidebar =
|
|
8042
|
+
const toggleSidebar = React26.useCallback(() => {
|
|
7968
8043
|
return isMobile ? setOpenMobile((value) => !value) : setOpen((value) => !value);
|
|
7969
8044
|
}, [isMobile, setOpen]);
|
|
7970
|
-
|
|
8045
|
+
React26.useEffect(() => {
|
|
7971
8046
|
const handleKeyDown = (event) => {
|
|
7972
8047
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
7973
8048
|
event.preventDefault();
|
|
@@ -7978,7 +8053,7 @@ var SidebarProvider = React25.forwardRef(
|
|
|
7978
8053
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
7979
8054
|
}, [toggleSidebar]);
|
|
7980
8055
|
const state = open ? "expanded" : "collapsed";
|
|
7981
|
-
const contextValue =
|
|
8056
|
+
const contextValue = React26.useMemo(
|
|
7982
8057
|
() => ({
|
|
7983
8058
|
state,
|
|
7984
8059
|
open,
|
|
@@ -8003,7 +8078,7 @@ var SidebarProvider = React25.forwardRef(
|
|
|
8003
8078
|
}
|
|
8004
8079
|
);
|
|
8005
8080
|
SidebarProvider.displayName = "SidebarProvider";
|
|
8006
|
-
var Sidebar =
|
|
8081
|
+
var Sidebar = React26.forwardRef(
|
|
8007
8082
|
({
|
|
8008
8083
|
side = "left",
|
|
8009
8084
|
variant = "sidebar",
|
|
@@ -8097,7 +8172,7 @@ var Sidebar = React25.forwardRef(
|
|
|
8097
8172
|
}
|
|
8098
8173
|
);
|
|
8099
8174
|
Sidebar.displayName = "Sidebar";
|
|
8100
|
-
var SidebarTrigger =
|
|
8175
|
+
var SidebarTrigger = React26.forwardRef(({ className, onClick, icon, ...props }, ref) => {
|
|
8101
8176
|
const { toggleSidebar, open, isMobile, openMobile } = useSidebar();
|
|
8102
8177
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
8103
8178
|
Button,
|
|
@@ -8117,14 +8192,14 @@ var SidebarTrigger = React25.forwardRef(({ className, onClick, icon, ...props },
|
|
|
8117
8192
|
},
|
|
8118
8193
|
...props,
|
|
8119
8194
|
children: [
|
|
8120
|
-
icon || (isMobile ? openMobile : open) ? icon || /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8195
|
+
icon || (isMobile ? openMobile : open) ? icon || /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react35.ArrowLeftFromLineIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react35.ArrowRightFromLineIcon, {}),
|
|
8121
8196
|
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
8122
8197
|
]
|
|
8123
8198
|
}
|
|
8124
8199
|
);
|
|
8125
8200
|
});
|
|
8126
8201
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
8127
|
-
var SidebarRail =
|
|
8202
|
+
var SidebarRail = React26.forwardRef(
|
|
8128
8203
|
({ className, ...props }, ref) => {
|
|
8129
8204
|
const { toggleSidebar } = useSidebar();
|
|
8130
8205
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
@@ -8150,7 +8225,7 @@ var SidebarRail = React25.forwardRef(
|
|
|
8150
8225
|
}
|
|
8151
8226
|
);
|
|
8152
8227
|
SidebarRail.displayName = "SidebarRail";
|
|
8153
|
-
var SidebarInset =
|
|
8228
|
+
var SidebarInset = React26.forwardRef(
|
|
8154
8229
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8155
8230
|
"main",
|
|
8156
8231
|
{
|
|
@@ -8165,7 +8240,7 @@ var SidebarInset = React25.forwardRef(
|
|
|
8165
8240
|
)
|
|
8166
8241
|
);
|
|
8167
8242
|
SidebarInset.displayName = "SidebarInset";
|
|
8168
|
-
var SidebarInput =
|
|
8243
|
+
var SidebarInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8169
8244
|
Input,
|
|
8170
8245
|
{
|
|
8171
8246
|
ref,
|
|
@@ -8175,7 +8250,7 @@ var SidebarInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
8175
8250
|
}
|
|
8176
8251
|
));
|
|
8177
8252
|
SidebarInput.displayName = "SidebarInput";
|
|
8178
|
-
var SidebarHeader =
|
|
8253
|
+
var SidebarHeader = React26.forwardRef(
|
|
8179
8254
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8180
8255
|
"div",
|
|
8181
8256
|
{
|
|
@@ -8187,7 +8262,7 @@ var SidebarHeader = React25.forwardRef(
|
|
|
8187
8262
|
)
|
|
8188
8263
|
);
|
|
8189
8264
|
SidebarHeader.displayName = "SidebarHeader";
|
|
8190
|
-
var SidebarFooter =
|
|
8265
|
+
var SidebarFooter = React26.forwardRef(
|
|
8191
8266
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8192
8267
|
"div",
|
|
8193
8268
|
{
|
|
@@ -8199,7 +8274,7 @@ var SidebarFooter = React25.forwardRef(
|
|
|
8199
8274
|
)
|
|
8200
8275
|
);
|
|
8201
8276
|
SidebarFooter.displayName = "SidebarFooter";
|
|
8202
|
-
var SidebarSeparator =
|
|
8277
|
+
var SidebarSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8203
8278
|
Separator3,
|
|
8204
8279
|
{
|
|
8205
8280
|
ref,
|
|
@@ -8209,7 +8284,7 @@ var SidebarSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
8209
8284
|
}
|
|
8210
8285
|
));
|
|
8211
8286
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
8212
|
-
var SidebarContent =
|
|
8287
|
+
var SidebarContent = React26.forwardRef(
|
|
8213
8288
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8214
8289
|
"div",
|
|
8215
8290
|
{
|
|
@@ -8224,7 +8299,7 @@ var SidebarContent = React25.forwardRef(
|
|
|
8224
8299
|
)
|
|
8225
8300
|
);
|
|
8226
8301
|
SidebarContent.displayName = "SidebarContent";
|
|
8227
|
-
var SidebarGroup =
|
|
8302
|
+
var SidebarGroup = React26.forwardRef(
|
|
8228
8303
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8229
8304
|
"div",
|
|
8230
8305
|
{
|
|
@@ -8236,7 +8311,7 @@ var SidebarGroup = React25.forwardRef(
|
|
|
8236
8311
|
)
|
|
8237
8312
|
);
|
|
8238
8313
|
SidebarGroup.displayName = "SidebarGroup";
|
|
8239
|
-
var SidebarGroupLabel =
|
|
8314
|
+
var SidebarGroupLabel = React26.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
8240
8315
|
const Comp = asChild ? import_react_slot4.Slot : "div";
|
|
8241
8316
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8242
8317
|
Comp,
|
|
@@ -8253,7 +8328,7 @@ var SidebarGroupLabel = React25.forwardRef(({ className, asChild = false, ...pro
|
|
|
8253
8328
|
);
|
|
8254
8329
|
});
|
|
8255
8330
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
8256
|
-
var SidebarGroupAction =
|
|
8331
|
+
var SidebarGroupAction = React26.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
8257
8332
|
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
8258
8333
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8259
8334
|
Comp,
|
|
@@ -8269,7 +8344,7 @@ var SidebarGroupAction = React25.forwardRef(({ className, asChild = false, ...pr
|
|
|
8269
8344
|
);
|
|
8270
8345
|
});
|
|
8271
8346
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
8272
|
-
var SidebarGroupContent =
|
|
8347
|
+
var SidebarGroupContent = React26.forwardRef(
|
|
8273
8348
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8274
8349
|
"div",
|
|
8275
8350
|
{
|
|
@@ -8281,7 +8356,7 @@ var SidebarGroupContent = React25.forwardRef(
|
|
|
8281
8356
|
)
|
|
8282
8357
|
);
|
|
8283
8358
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
8284
|
-
var SidebarMenu =
|
|
8359
|
+
var SidebarMenu = React26.forwardRef(
|
|
8285
8360
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8286
8361
|
"ul",
|
|
8287
8362
|
{
|
|
@@ -8293,7 +8368,7 @@ var SidebarMenu = React25.forwardRef(
|
|
|
8293
8368
|
)
|
|
8294
8369
|
);
|
|
8295
8370
|
SidebarMenu.displayName = "SidebarMenu";
|
|
8296
|
-
var SidebarMenuItem =
|
|
8371
|
+
var SidebarMenuItem = React26.forwardRef(
|
|
8297
8372
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8298
8373
|
"li",
|
|
8299
8374
|
{
|
|
@@ -8325,7 +8400,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority11.cva)(
|
|
|
8325
8400
|
}
|
|
8326
8401
|
}
|
|
8327
8402
|
);
|
|
8328
|
-
var SidebarMenuButton =
|
|
8403
|
+
var SidebarMenuButton = React26.forwardRef(
|
|
8329
8404
|
({
|
|
8330
8405
|
asChild = false,
|
|
8331
8406
|
isActive = false,
|
|
@@ -8371,7 +8446,7 @@ var SidebarMenuButton = React25.forwardRef(
|
|
|
8371
8446
|
}
|
|
8372
8447
|
);
|
|
8373
8448
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
8374
|
-
var SidebarMenuAction =
|
|
8449
|
+
var SidebarMenuAction = React26.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
8375
8450
|
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
8376
8451
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8377
8452
|
Comp,
|
|
@@ -8388,7 +8463,7 @@ var SidebarMenuAction = React25.forwardRef(({ className, asChild = false, showOn
|
|
|
8388
8463
|
);
|
|
8389
8464
|
});
|
|
8390
8465
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
8391
|
-
var SidebarMenuBadge =
|
|
8466
|
+
var SidebarMenuBadge = React26.forwardRef(
|
|
8392
8467
|
({ className, ...props }, ref) => {
|
|
8393
8468
|
const { open, isMobile, openMobile } = useSidebar();
|
|
8394
8469
|
const isOpen = isMobile ? openMobile : open;
|
|
@@ -8408,8 +8483,8 @@ var SidebarMenuBadge = React25.forwardRef(
|
|
|
8408
8483
|
}
|
|
8409
8484
|
);
|
|
8410
8485
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
8411
|
-
var SidebarMenuSkeleton =
|
|
8412
|
-
const width =
|
|
8486
|
+
var SidebarMenuSkeleton = React26.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
8487
|
+
const width = React26.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
8413
8488
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
8414
8489
|
"div",
|
|
8415
8490
|
{
|
|
@@ -8432,7 +8507,7 @@ var SidebarMenuSkeleton = React25.forwardRef(({ className, showIcon = false, ...
|
|
|
8432
8507
|
);
|
|
8433
8508
|
});
|
|
8434
8509
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
8435
|
-
var SidebarMenuSub =
|
|
8510
|
+
var SidebarMenuSub = React26.forwardRef(
|
|
8436
8511
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8437
8512
|
"ul",
|
|
8438
8513
|
{
|
|
@@ -8447,7 +8522,7 @@ var SidebarMenuSub = React25.forwardRef(
|
|
|
8447
8522
|
)
|
|
8448
8523
|
);
|
|
8449
8524
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
8450
|
-
var SidebarMenuSubItem =
|
|
8525
|
+
var SidebarMenuSubItem = React26.forwardRef(
|
|
8451
8526
|
({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("li", { ref, ...props })
|
|
8452
8527
|
);
|
|
8453
8528
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
@@ -8471,7 +8546,7 @@ var sidebarMenuSubButtonVariants = (0, import_class_variance_authority11.cva)(
|
|
|
8471
8546
|
}
|
|
8472
8547
|
}
|
|
8473
8548
|
);
|
|
8474
|
-
var SidebarMenuSubButton =
|
|
8549
|
+
var SidebarMenuSubButton = React26.forwardRef(
|
|
8475
8550
|
({
|
|
8476
8551
|
asChild = false,
|
|
8477
8552
|
isActive,
|
|
@@ -8500,106 +8575,10 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
8500
8575
|
var VALUE_PART = 1;
|
|
8501
8576
|
var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => row.startsWith(`${stateName}=`))?.split("=")[VALUE_PART] === "true";
|
|
8502
8577
|
|
|
8503
|
-
// src/circular-loader/CircularLoader.tsx
|
|
8504
|
-
var import_react60 = __toESM(require("react"), 1);
|
|
8505
|
-
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
8506
|
-
var CircularLoader = import_react60.default.memo(
|
|
8507
|
-
({ visible = true, height, width, position, label, className }) => {
|
|
8508
|
-
if (!visible) return null;
|
|
8509
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
8510
|
-
"div",
|
|
8511
|
-
{
|
|
8512
|
-
className: cn(
|
|
8513
|
-
"main-loader flex flex-col items-center justify-center gap-2",
|
|
8514
|
-
position === "center" && "h-full",
|
|
8515
|
-
className
|
|
8516
|
-
),
|
|
8517
|
-
children: [
|
|
8518
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
8519
|
-
"svg",
|
|
8520
|
-
{
|
|
8521
|
-
viewBox: "25 25 50 50",
|
|
8522
|
-
className: "main-loader__svg text-[var(--circular-loader-color)]",
|
|
8523
|
-
style: {
|
|
8524
|
-
width: toCssSize(width),
|
|
8525
|
-
height: toCssSize(height)
|
|
8526
|
-
},
|
|
8527
|
-
children: [
|
|
8528
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8529
|
-
"circle",
|
|
8530
|
-
{
|
|
8531
|
-
r: "20",
|
|
8532
|
-
cy: "50",
|
|
8533
|
-
cx: "50",
|
|
8534
|
-
className: "cover fill-none stroke-current opacity-5",
|
|
8535
|
-
strokeWidth: "7"
|
|
8536
|
-
}
|
|
8537
|
-
),
|
|
8538
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
8539
|
-
"circle",
|
|
8540
|
-
{
|
|
8541
|
-
r: "20",
|
|
8542
|
-
cy: "50",
|
|
8543
|
-
cx: "50",
|
|
8544
|
-
className: "circle fill-none stroke-current",
|
|
8545
|
-
strokeDasharray: "1 200",
|
|
8546
|
-
strokeDashoffset: "0",
|
|
8547
|
-
strokeLinecap: "round",
|
|
8548
|
-
strokeWidth: "7",
|
|
8549
|
-
children: [
|
|
8550
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8551
|
-
"animateTransform",
|
|
8552
|
-
{
|
|
8553
|
-
attributeName: "transform",
|
|
8554
|
-
dur: "2.25s",
|
|
8555
|
-
from: "0 50 50",
|
|
8556
|
-
repeatCount: "indefinite",
|
|
8557
|
-
to: "360 50 50",
|
|
8558
|
-
type: "rotate"
|
|
8559
|
-
}
|
|
8560
|
-
),
|
|
8561
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8562
|
-
"animate",
|
|
8563
|
-
{
|
|
8564
|
-
attributeName: "stroke-dasharray",
|
|
8565
|
-
calcMode: "spline",
|
|
8566
|
-
dur: "1.8s",
|
|
8567
|
-
keyTimes: "0;0.5;1",
|
|
8568
|
-
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
8569
|
-
repeatCount: "indefinite",
|
|
8570
|
-
values: "1 200;90 200;90 200"
|
|
8571
|
-
}
|
|
8572
|
-
),
|
|
8573
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8574
|
-
"animate",
|
|
8575
|
-
{
|
|
8576
|
-
attributeName: "stroke-dashoffset",
|
|
8577
|
-
calcMode: "spline",
|
|
8578
|
-
dur: "1.8s",
|
|
8579
|
-
keyTimes: "0;0.5;1",
|
|
8580
|
-
keySplines: "0.42 0 0.58 1;0.42 0 0.58 1",
|
|
8581
|
-
repeatCount: "indefinite",
|
|
8582
|
-
values: "0;-35;-125"
|
|
8583
|
-
}
|
|
8584
|
-
)
|
|
8585
|
-
]
|
|
8586
|
-
}
|
|
8587
|
-
)
|
|
8588
|
-
]
|
|
8589
|
-
}
|
|
8590
|
-
),
|
|
8591
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "text-sm font-medium text-chekin-gray-1", children: label })
|
|
8592
|
-
]
|
|
8593
|
-
}
|
|
8594
|
-
);
|
|
8595
|
-
}
|
|
8596
|
-
);
|
|
8597
|
-
CircularLoader.displayName = "CircularLoader";
|
|
8598
|
-
|
|
8599
8578
|
// src/small-grid-single-item/SmallGridSingleItem.tsx
|
|
8600
8579
|
var import_react61 = require("react");
|
|
8601
|
-
var
|
|
8602
|
-
var
|
|
8580
|
+
var import_lucide_react36 = require("lucide-react");
|
|
8581
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
8603
8582
|
var SmallGridSingleItem = (0, import_react61.memo)(
|
|
8604
8583
|
({
|
|
8605
8584
|
title,
|
|
@@ -8615,7 +8594,7 @@ var SmallGridSingleItem = (0, import_react61.memo)(
|
|
|
8615
8594
|
const handleClick = (event) => {
|
|
8616
8595
|
if (!disabled && onClick) onClick(event);
|
|
8617
8596
|
};
|
|
8618
|
-
return /* @__PURE__ */ (0,
|
|
8597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
8619
8598
|
"div",
|
|
8620
8599
|
{
|
|
8621
8600
|
onClick: handleClick,
|
|
@@ -8629,24 +8608,24 @@ var SmallGridSingleItem = (0, import_react61.memo)(
|
|
|
8629
8608
|
className
|
|
8630
8609
|
),
|
|
8631
8610
|
children: [
|
|
8632
|
-
/* @__PURE__ */ (0,
|
|
8633
|
-
/* @__PURE__ */ (0,
|
|
8634
|
-
subtitle && /* @__PURE__ */ (0,
|
|
8611
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
8612
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "line-clamp-2 overflow-hidden text-ellipsis break-all", children: title }),
|
|
8613
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "line-clamp-2 overflow-hidden text-ellipsis text-[15px] font-medium leading-6 text-[var(--chekin-color-gray-2)]", children: subtitle })
|
|
8635
8614
|
] }),
|
|
8636
|
-
!readOnly && /* @__PURE__ */ (0,
|
|
8637
|
-
onDelete && /* @__PURE__ */ (0,
|
|
8615
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex h-full items-center justify-end gap-2", children: [
|
|
8616
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8638
8617
|
Button,
|
|
8639
8618
|
{
|
|
8640
8619
|
disabled,
|
|
8641
8620
|
onClick: onDelete,
|
|
8642
8621
|
size: "icon",
|
|
8643
8622
|
variant: "outline",
|
|
8644
|
-
children: /* @__PURE__ */ (0,
|
|
8623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react36.Trash2, { className: "h-5 w-5 text-[var(--chekin-color-brand-red)]" })
|
|
8645
8624
|
}
|
|
8646
8625
|
),
|
|
8647
|
-
onEdit && /* @__PURE__ */ (0,
|
|
8626
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { disabled, onClick: onEdit, size: "icon", variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_lucide_react36.Pencil, { className: "h-5 w-5 text-[var(--chekin-color-brand-blue)]" }) })
|
|
8648
8627
|
] }),
|
|
8649
|
-
error && /* @__PURE__ */ (0,
|
|
8628
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "absolute bottom-1 right-2 text-xs text-[var(--chekin-color-brand-red)]", children: error })
|
|
8650
8629
|
]
|
|
8651
8630
|
}
|
|
8652
8631
|
);
|
|
@@ -8655,9 +8634,9 @@ var SmallGridSingleItem = (0, import_react61.memo)(
|
|
|
8655
8634
|
SmallGridSingleItem.displayName = "SmallGridSingleItem";
|
|
8656
8635
|
|
|
8657
8636
|
// src/sorting-action/SortingAction.tsx
|
|
8658
|
-
var
|
|
8659
|
-
var
|
|
8660
|
-
var
|
|
8637
|
+
var import_react_i18next21 = require("react-i18next");
|
|
8638
|
+
var import_lucide_react37 = require("lucide-react");
|
|
8639
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
8661
8640
|
function SortingAction({
|
|
8662
8641
|
value,
|
|
8663
8642
|
onSortChange,
|
|
@@ -8666,9 +8645,9 @@ function SortingAction({
|
|
|
8666
8645
|
variant = "by_other",
|
|
8667
8646
|
onOpenChange
|
|
8668
8647
|
}) {
|
|
8669
|
-
const { t } = (0,
|
|
8670
|
-
return /* @__PURE__ */ (0,
|
|
8671
|
-
/* @__PURE__ */ (0,
|
|
8648
|
+
const { t } = (0, import_react_i18next21.useTranslation)();
|
|
8649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DropdownMenu, { open, onOpenChange, children: [
|
|
8650
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
8672
8651
|
"button",
|
|
8673
8652
|
{
|
|
8674
8653
|
type: "button",
|
|
@@ -8677,36 +8656,36 @@ function SortingAction({
|
|
|
8677
8656
|
className
|
|
8678
8657
|
),
|
|
8679
8658
|
"aria-label": "Open sorting menu",
|
|
8680
|
-
children: /* @__PURE__ */ (0,
|
|
8659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react37.ArrowDownUpIcon, { className: "h-4 w-4 text-[var(--chekin-color-gray-1)] group-hover/trigger:text-[var(--chekin-color-brand-navy)]" })
|
|
8681
8660
|
}
|
|
8682
8661
|
) }),
|
|
8683
|
-
/* @__PURE__ */ (0,
|
|
8684
|
-
/* @__PURE__ */ (0,
|
|
8662
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DropdownMenuContent, { className: "w-full max-w-[256px]", align: "start", children: [
|
|
8663
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
8685
8664
|
DropdownMenuItem,
|
|
8686
8665
|
{
|
|
8687
8666
|
active: value === "asc",
|
|
8688
8667
|
className: cn(value === "asc" && "text-[var(--chekin-color-brand-blue)]"),
|
|
8689
8668
|
onClick: () => onSortChange?.("asc"),
|
|
8690
8669
|
children: [
|
|
8691
|
-
/* @__PURE__ */ (0,
|
|
8670
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react37.ArrowUp, { className: "h-4 w-4" }),
|
|
8692
8671
|
variant === "by_text" ? t("sort_a_z") : t("sort_in_asc")
|
|
8693
8672
|
]
|
|
8694
8673
|
}
|
|
8695
8674
|
),
|
|
8696
|
-
/* @__PURE__ */ (0,
|
|
8675
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
8697
8676
|
DropdownMenuItem,
|
|
8698
8677
|
{
|
|
8699
8678
|
active: value === "desc",
|
|
8700
8679
|
className: cn(value === "desc" && "text-[var(--chekin-color-brand-blue)]"),
|
|
8701
8680
|
onClick: () => onSortChange?.("desc"),
|
|
8702
8681
|
children: [
|
|
8703
|
-
/* @__PURE__ */ (0,
|
|
8682
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react37.ArrowDown, { className: "h-4 w-4" }),
|
|
8704
8683
|
variant === "by_text" ? t("sort_z_a") : t("sort_in_desc")
|
|
8705
8684
|
]
|
|
8706
8685
|
}
|
|
8707
8686
|
),
|
|
8708
|
-
value && /* @__PURE__ */ (0,
|
|
8709
|
-
/* @__PURE__ */ (0,
|
|
8687
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DropdownMenuItem, { onClick: () => onSortChange?.(null), children: [
|
|
8688
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_lucide_react37.Minus, { className: "h-4 w-4" }),
|
|
8710
8689
|
t("clear_sorting")
|
|
8711
8690
|
] })
|
|
8712
8691
|
] })
|
|
@@ -8715,9 +8694,9 @@ function SortingAction({
|
|
|
8715
8694
|
|
|
8716
8695
|
// src/status-button/StatusButton.tsx
|
|
8717
8696
|
var import_react62 = require("react");
|
|
8718
|
-
var
|
|
8719
|
-
var
|
|
8720
|
-
var
|
|
8697
|
+
var import_react_i18next22 = require("react-i18next");
|
|
8698
|
+
var import_lucide_react38 = require("lucide-react");
|
|
8699
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
8721
8700
|
function StatusButton({
|
|
8722
8701
|
hidden,
|
|
8723
8702
|
status,
|
|
@@ -8731,11 +8710,11 @@ function StatusButton({
|
|
|
8731
8710
|
variant = "default",
|
|
8732
8711
|
...props
|
|
8733
8712
|
}) {
|
|
8734
|
-
const { t } = (0,
|
|
8713
|
+
const { t } = (0, import_react_i18next22.useTranslation)();
|
|
8735
8714
|
const configMap = (0, import_react62.useMemo)(() => {
|
|
8736
8715
|
const defaultLoadingConfig = {
|
|
8737
8716
|
text: loadingText ?? `${t("saving")}...`,
|
|
8738
|
-
icon: /* @__PURE__ */ (0,
|
|
8717
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react38.Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
8739
8718
|
variant,
|
|
8740
8719
|
isLoading: true
|
|
8741
8720
|
};
|
|
@@ -8745,13 +8724,13 @@ function StatusButton({
|
|
|
8745
8724
|
validating: { ...defaultLoadingConfig, text: t("validating") },
|
|
8746
8725
|
error: {
|
|
8747
8726
|
text: t("error"),
|
|
8748
|
-
icon: /* @__PURE__ */ (0,
|
|
8727
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react38.AlertCircle, { className: "h-4 w-4" }),
|
|
8749
8728
|
variant: "destructive",
|
|
8750
8729
|
isLoading: false
|
|
8751
8730
|
},
|
|
8752
8731
|
success: {
|
|
8753
8732
|
text: successText ?? t("saved_exclamation"),
|
|
8754
|
-
icon: /* @__PURE__ */ (0,
|
|
8733
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react38.CheckCircle, { className: "h-4 w-4" }),
|
|
8755
8734
|
variant,
|
|
8756
8735
|
isLoading: false
|
|
8757
8736
|
},
|
|
@@ -8767,7 +8746,7 @@ function StatusButton({
|
|
|
8767
8746
|
if (hidden) {
|
|
8768
8747
|
return null;
|
|
8769
8748
|
}
|
|
8770
|
-
return /* @__PURE__ */ (0,
|
|
8749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
8771
8750
|
Button,
|
|
8772
8751
|
{
|
|
8773
8752
|
className: cn(
|
|
@@ -8783,45 +8762,45 @@ function StatusButton({
|
|
|
8783
8762
|
...props,
|
|
8784
8763
|
children: [
|
|
8785
8764
|
config.icon,
|
|
8786
|
-
/* @__PURE__ */ (0,
|
|
8765
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { children: config.text })
|
|
8787
8766
|
]
|
|
8788
8767
|
}
|
|
8789
8768
|
);
|
|
8790
8769
|
}
|
|
8791
8770
|
|
|
8792
8771
|
// src/status-box/StatusBox.tsx
|
|
8793
|
-
var
|
|
8794
|
-
var
|
|
8772
|
+
var import_lucide_react39 = require("lucide-react");
|
|
8773
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
8795
8774
|
function StatusBox({ status, title, text }) {
|
|
8796
8775
|
if (status === "success") {
|
|
8797
|
-
return /* @__PURE__ */ (0,
|
|
8798
|
-
/* @__PURE__ */ (0,
|
|
8799
|
-
/* @__PURE__ */ (0,
|
|
8800
|
-
/* @__PURE__ */ (0,
|
|
8801
|
-
/* @__PURE__ */ (0,
|
|
8776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-green-100 bg-green-50 p-4", children: [
|
|
8777
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "rounded-full bg-green-100 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react39.CheckIcon, { className: "h-5 w-5 text-green-600" }) }),
|
|
8778
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { children: [
|
|
8779
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "font-semibold text-green-800", children: title }),
|
|
8780
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "text-sm text-green-700", children: text })
|
|
8802
8781
|
] })
|
|
8803
8782
|
] });
|
|
8804
8783
|
}
|
|
8805
8784
|
if (status === "failed") {
|
|
8806
|
-
return /* @__PURE__ */ (0,
|
|
8807
|
-
/* @__PURE__ */ (0,
|
|
8808
|
-
/* @__PURE__ */ (0,
|
|
8809
|
-
/* @__PURE__ */ (0,
|
|
8810
|
-
/* @__PURE__ */ (0,
|
|
8785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-red-100 bg-red-50 p-4", children: [
|
|
8786
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "rounded-full bg-red-100 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react39.XIcon, { className: "h-5 w-5 text-red-600" }) }),
|
|
8787
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { children: [
|
|
8788
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "font-semibold text-red-800", children: title }),
|
|
8789
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "text-sm text-red-700", children: text })
|
|
8811
8790
|
] })
|
|
8812
8791
|
] });
|
|
8813
8792
|
}
|
|
8814
|
-
return /* @__PURE__ */ (0,
|
|
8815
|
-
/* @__PURE__ */ (0,
|
|
8816
|
-
/* @__PURE__ */ (0,
|
|
8817
|
-
/* @__PURE__ */ (0,
|
|
8818
|
-
/* @__PURE__ */ (0,
|
|
8793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-amber-100 bg-amber-50 p-4", children: [
|
|
8794
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "rounded-full bg-amber-100 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react39.AlertTriangleIcon, { className: "h-5 w-5 text-amber-600" }) }),
|
|
8795
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { children: [
|
|
8796
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "font-semibold text-amber-800", children: title }),
|
|
8797
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "text-sm text-amber-700", children: text })
|
|
8819
8798
|
] })
|
|
8820
8799
|
] });
|
|
8821
8800
|
}
|
|
8822
8801
|
|
|
8823
8802
|
// src/stepper/Stepper.tsx
|
|
8824
|
-
var
|
|
8803
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
8825
8804
|
function Stepper({
|
|
8826
8805
|
totalSteps,
|
|
8827
8806
|
activeStep,
|
|
@@ -8830,7 +8809,7 @@ function Stepper({
|
|
|
8830
8809
|
}) {
|
|
8831
8810
|
if (totalSteps <= 0) return null;
|
|
8832
8811
|
const clampedActiveStep = Math.max(1, Math.min(totalSteps, activeStep));
|
|
8833
|
-
return /* @__PURE__ */ (0,
|
|
8812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
8834
8813
|
"div",
|
|
8835
8814
|
{
|
|
8836
8815
|
className: cn("flex w-full items-center gap-2", className),
|
|
@@ -8841,7 +8820,7 @@ function Stepper({
|
|
|
8841
8820
|
children: new Array(totalSteps).fill(null).map((_, stepIndex) => {
|
|
8842
8821
|
const stepNumber = stepIndex + 1;
|
|
8843
8822
|
const isActive = cumulative ? stepNumber <= clampedActiveStep : stepNumber === clampedActiveStep;
|
|
8844
|
-
return /* @__PURE__ */ (0,
|
|
8823
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
8845
8824
|
"span",
|
|
8846
8825
|
{
|
|
8847
8826
|
className: cn(
|
|
@@ -8858,14 +8837,14 @@ function Stepper({
|
|
|
8858
8837
|
|
|
8859
8838
|
// src/switch-blocks/SwitchBlocks.tsx
|
|
8860
8839
|
var import_react63 = require("react");
|
|
8861
|
-
var
|
|
8840
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
8862
8841
|
var SwitchBlocksInternal = (0, import_react63.forwardRef)(
|
|
8863
|
-
({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */ (0,
|
|
8842
|
+
({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
8864
8843
|
"div",
|
|
8865
8844
|
{
|
|
8866
8845
|
ref,
|
|
8867
8846
|
className: cn("flex flex-wrap items-center justify-start gap-4", className),
|
|
8868
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
8847
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
8869
8848
|
BoxOptionSelector,
|
|
8870
8849
|
{
|
|
8871
8850
|
id: option.id,
|
|
@@ -8887,7 +8866,7 @@ var SwitchBlocks = (0, import_react63.memo)(SwitchBlocksInternal);
|
|
|
8887
8866
|
|
|
8888
8867
|
// src/switch-group/SwitchGroup.tsx
|
|
8889
8868
|
var React27 = __toESM(require("react"), 1);
|
|
8890
|
-
var
|
|
8869
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
8891
8870
|
var SwitchGroup = React27.forwardRef(
|
|
8892
8871
|
({ options, value = [], onChange, disabled = false, className, error, ...props }, ref) => {
|
|
8893
8872
|
const handleOptionChange = (optionValue, checked) => {
|
|
@@ -8898,9 +8877,9 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8898
8877
|
}
|
|
8899
8878
|
onChange(value.filter((selectedValue) => selectedValue !== optionValue));
|
|
8900
8879
|
};
|
|
8901
|
-
return /* @__PURE__ */ (0,
|
|
8902
|
-
options.map((option) => /* @__PURE__ */ (0,
|
|
8903
|
-
/* @__PURE__ */ (0,
|
|
8880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { ref, className: cn("w-full space-y-4", className), ...props, children: [
|
|
8881
|
+
options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
8882
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
8904
8883
|
Label,
|
|
8905
8884
|
{
|
|
8906
8885
|
className: cn(
|
|
@@ -8909,7 +8888,7 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8909
8888
|
),
|
|
8910
8889
|
children: [
|
|
8911
8890
|
option.label,
|
|
8912
|
-
option.description && /* @__PURE__ */ (0,
|
|
8891
|
+
option.description && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
8913
8892
|
"span",
|
|
8914
8893
|
{
|
|
8915
8894
|
className: cn(
|
|
@@ -8926,7 +8905,7 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8926
8905
|
]
|
|
8927
8906
|
}
|
|
8928
8907
|
) }),
|
|
8929
|
-
/* @__PURE__ */ (0,
|
|
8908
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8930
8909
|
Switch,
|
|
8931
8910
|
{
|
|
8932
8911
|
value: value.includes(option.value),
|
|
@@ -8936,7 +8915,7 @@ var SwitchGroup = React27.forwardRef(
|
|
|
8936
8915
|
}
|
|
8937
8916
|
)
|
|
8938
8917
|
] }, option.value)),
|
|
8939
|
-
error && /* @__PURE__ */ (0,
|
|
8918
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ErrorMessage, { disabled, children: error })
|
|
8940
8919
|
] });
|
|
8941
8920
|
}
|
|
8942
8921
|
);
|
|
@@ -8946,7 +8925,7 @@ SwitchGroup.displayName = "SwitchGroup";
|
|
|
8946
8925
|
var import_react64 = require("react");
|
|
8947
8926
|
var TabsPrimitive2 = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
8948
8927
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
8949
|
-
var
|
|
8928
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
8950
8929
|
var Tabs = TabsPrimitive2.Root;
|
|
8951
8930
|
var tabsListVariants = (0, import_class_variance_authority12.cva)("inline-flex items-center", {
|
|
8952
8931
|
variants: {
|
|
@@ -8960,7 +8939,7 @@ var tabsListVariants = (0, import_class_variance_authority12.cva)("inline-flex i
|
|
|
8960
8939
|
}
|
|
8961
8940
|
});
|
|
8962
8941
|
var TabsList = (0, import_react64.forwardRef)(
|
|
8963
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8942
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
8964
8943
|
TabsPrimitive2.List,
|
|
8965
8944
|
{
|
|
8966
8945
|
ref,
|
|
@@ -8984,7 +8963,7 @@ var tabsTriggerVariants = (0, import_class_variance_authority12.cva)(
|
|
|
8984
8963
|
}
|
|
8985
8964
|
}
|
|
8986
8965
|
);
|
|
8987
|
-
var TabsTrigger = (0, import_react64.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8966
|
+
var TabsTrigger = (0, import_react64.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
8988
8967
|
TabsPrimitive2.Trigger,
|
|
8989
8968
|
{
|
|
8990
8969
|
ref,
|
|
@@ -8993,11 +8972,11 @@ var TabsTrigger = (0, import_react64.forwardRef)(({ className, variant, ...props
|
|
|
8993
8972
|
}
|
|
8994
8973
|
));
|
|
8995
8974
|
TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
|
|
8996
|
-
var TabsContent = (0, import_react64.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8975
|
+
var TabsContent = (0, import_react64.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(TabsPrimitive2.Content, { ref, className, tabIndex: -1, ...props }));
|
|
8997
8976
|
TabsContent.displayName = TabsPrimitive2.Content.displayName;
|
|
8998
8977
|
|
|
8999
8978
|
// src/tabbed-section/TabbedSection.tsx
|
|
9000
|
-
var
|
|
8979
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
9001
8980
|
function TabbedSection({
|
|
9002
8981
|
triggers,
|
|
9003
8982
|
value,
|
|
@@ -9019,8 +8998,8 @@ function TabbedSection({
|
|
|
9019
8998
|
"[&>div:first-child]:gap-3",
|
|
9020
8999
|
className
|
|
9021
9000
|
);
|
|
9022
|
-
return /* @__PURE__ */ (0,
|
|
9023
|
-
/* @__PURE__ */ (0,
|
|
9001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(Tabs, { value: activeTab, onValueChange: onTabChange, className: "w-full", children: [
|
|
9002
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
9024
9003
|
BookmarkTabsList,
|
|
9025
9004
|
{
|
|
9026
9005
|
variant,
|
|
@@ -9028,12 +9007,12 @@ function TabbedSection({
|
|
|
9028
9007
|
children: triggers
|
|
9029
9008
|
}
|
|
9030
9009
|
),
|
|
9031
|
-
/* @__PURE__ */ (0,
|
|
9010
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: contentContainerClassName, children })
|
|
9032
9011
|
] });
|
|
9033
9012
|
}
|
|
9034
9013
|
|
|
9035
9014
|
// src/table-placeholder/TablePlaceholder.tsx
|
|
9036
|
-
var
|
|
9015
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
9037
9016
|
function TablePlaceholder({
|
|
9038
9017
|
children,
|
|
9039
9018
|
text,
|
|
@@ -9046,21 +9025,21 @@ function TablePlaceholder({
|
|
|
9046
9025
|
if (!visible) {
|
|
9047
9026
|
return null;
|
|
9048
9027
|
}
|
|
9049
|
-
const content = /* @__PURE__ */ (0,
|
|
9050
|
-
iconSlot && /* @__PURE__ */ (0,
|
|
9051
|
-
title && /* @__PURE__ */ (0,
|
|
9052
|
-
text && /* @__PURE__ */ (0,
|
|
9053
|
-
children && /* @__PURE__ */ (0,
|
|
9028
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: "flex flex-col items-center justify-center px-4 py-14 text-center", children: [
|
|
9029
|
+
iconSlot && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "mb-6", children: iconSlot }),
|
|
9030
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("h3", { className: "mb-2 text-lg font-semibold", children: title }),
|
|
9031
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "text-md max-w-sm font-medium", children: text }),
|
|
9032
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "mt-6", children })
|
|
9054
9033
|
] });
|
|
9055
9034
|
if (insideTable) {
|
|
9056
|
-
return /* @__PURE__ */ (0,
|
|
9035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("td", { colSpan: 100, className, children: content }) });
|
|
9057
9036
|
}
|
|
9058
|
-
return /* @__PURE__ */ (0,
|
|
9037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className, children: content });
|
|
9059
9038
|
}
|
|
9060
9039
|
|
|
9061
9040
|
// src/task-card/TaskCard.tsx
|
|
9062
|
-
var
|
|
9063
|
-
var
|
|
9041
|
+
var import_lucide_react40 = require("lucide-react");
|
|
9042
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
9064
9043
|
function TaskCard({
|
|
9065
9044
|
title,
|
|
9066
9045
|
description,
|
|
@@ -9071,7 +9050,7 @@ function TaskCard({
|
|
|
9071
9050
|
}) {
|
|
9072
9051
|
const shouldShowCount = count !== void 0 && count > 1;
|
|
9073
9052
|
const shouldShowActions = shouldShowCount || onClick;
|
|
9074
|
-
return /* @__PURE__ */ (0,
|
|
9053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
9075
9054
|
"div",
|
|
9076
9055
|
{
|
|
9077
9056
|
className: cn(
|
|
@@ -9087,7 +9066,7 @@ function TaskCard({
|
|
|
9087
9066
|
role: onClick ? "button" : void 0,
|
|
9088
9067
|
tabIndex: onClick ? 0 : void 0,
|
|
9089
9068
|
children: [
|
|
9090
|
-
/* @__PURE__ */ (0,
|
|
9069
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
9091
9070
|
"div",
|
|
9092
9071
|
{
|
|
9093
9072
|
className: cn(
|
|
@@ -9097,12 +9076,12 @@ function TaskCard({
|
|
|
9097
9076
|
)
|
|
9098
9077
|
}
|
|
9099
9078
|
),
|
|
9100
|
-
/* @__PURE__ */ (0,
|
|
9101
|
-
/* @__PURE__ */ (0,
|
|
9102
|
-
/* @__PURE__ */ (0,
|
|
9079
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
|
|
9080
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("h4", { className: "m-0 w-full break-words text-base font-semibold leading-6 text-[var(--chekin-color-brand-navy)]", children: title }),
|
|
9081
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("p", { className: "m-0 w-full text-sm font-medium leading-6 text-[var(--chekin-color-gray-1)]", children: description })
|
|
9103
9082
|
] }),
|
|
9104
|
-
shouldShowActions && /* @__PURE__ */ (0,
|
|
9105
|
-
shouldShowCount && /* @__PURE__ */ (0,
|
|
9083
|
+
shouldShowActions && /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
9084
|
+
shouldShowCount && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
9106
9085
|
"div",
|
|
9107
9086
|
{
|
|
9108
9087
|
className: cn(
|
|
@@ -9113,7 +9092,7 @@ function TaskCard({
|
|
|
9113
9092
|
children: count
|
|
9114
9093
|
}
|
|
9115
9094
|
),
|
|
9116
|
-
onClick && /* @__PURE__ */ (0,
|
|
9095
|
+
onClick && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
9117
9096
|
"button",
|
|
9118
9097
|
{
|
|
9119
9098
|
className: "flex h-8 w-0 min-w-0 cursor-pointer items-center justify-center overflow-hidden rounded-md border-0 bg-transparent p-0 text-[var(--chekin-color-gray-1)] opacity-0 transition-[width,opacity,min-width] duration-300 ease-in-out hover:bg-black/5 focus-visible:w-8 focus-visible:min-w-8 focus-visible:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--chekin-color-brand-blue)] group-hover:w-8 group-hover:min-w-8 group-hover:opacity-100",
|
|
@@ -9123,7 +9102,7 @@ function TaskCard({
|
|
|
9123
9102
|
},
|
|
9124
9103
|
"aria-label": "View details",
|
|
9125
9104
|
type: "button",
|
|
9126
|
-
children: /* @__PURE__ */ (0,
|
|
9105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react40.ArrowRight, { className: "h-5 w-5" })
|
|
9127
9106
|
}
|
|
9128
9107
|
)
|
|
9129
9108
|
] })
|
|
@@ -9211,7 +9190,7 @@ var toggleVariants = (0, import_class_variance_authority13.cva)(
|
|
|
9211
9190
|
);
|
|
9212
9191
|
|
|
9213
9192
|
// src/toggle-group/ToggleGroup.tsx
|
|
9214
|
-
var
|
|
9193
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
9215
9194
|
var ToggleGroupContext = React28.createContext({
|
|
9216
9195
|
size: "default",
|
|
9217
9196
|
variant: "default",
|
|
@@ -9219,7 +9198,7 @@ var ToggleGroupContext = React28.createContext({
|
|
|
9219
9198
|
});
|
|
9220
9199
|
var ToggleGroup = React28.forwardRef(({ className, variant, size, theme, children, ...props }, ref) => {
|
|
9221
9200
|
const isTabVariant = variant === "tab";
|
|
9222
|
-
return /* @__PURE__ */ (0,
|
|
9201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
9223
9202
|
ToggleGroupPrimitive.Root,
|
|
9224
9203
|
{
|
|
9225
9204
|
ref,
|
|
@@ -9229,7 +9208,7 @@ var ToggleGroup = React28.forwardRef(({ className, variant, size, theme, childre
|
|
|
9229
9208
|
className
|
|
9230
9209
|
),
|
|
9231
9210
|
...props,
|
|
9232
|
-
children: /* @__PURE__ */ (0,
|
|
9211
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ToggleGroupContext.Provider, { value: { variant, size, theme }, children })
|
|
9233
9212
|
}
|
|
9234
9213
|
);
|
|
9235
9214
|
});
|
|
@@ -9238,7 +9217,7 @@ var ToggleGroupItem = React28.forwardRef(({ className, children, variant, size,
|
|
|
9238
9217
|
const context = React28.useContext(ToggleGroupContext);
|
|
9239
9218
|
const resolvedVariant = context.variant || variant;
|
|
9240
9219
|
const isTabVariant = resolvedVariant === "tab";
|
|
9241
|
-
return /* @__PURE__ */ (0,
|
|
9220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
9242
9221
|
ToggleGroupPrimitive.Item,
|
|
9243
9222
|
{
|
|
9244
9223
|
ref,
|
|
@@ -9251,9 +9230,9 @@ var ToggleGroupItem = React28.forwardRef(({ className, children, variant, size,
|
|
|
9251
9230
|
className
|
|
9252
9231
|
),
|
|
9253
9232
|
...props,
|
|
9254
|
-
children: isTabVariant ? /* @__PURE__ */ (0,
|
|
9255
|
-
/* @__PURE__ */ (0,
|
|
9256
|
-
/* @__PURE__ */ (0,
|
|
9233
|
+
children: isTabVariant ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("span", { className: "inline-grid", children: [
|
|
9234
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "invisible col-start-1 row-start-1 font-semibold", children }),
|
|
9235
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "col-start-1 row-start-1", children })
|
|
9257
9236
|
] }) : children
|
|
9258
9237
|
}
|
|
9259
9238
|
);
|
|
@@ -9262,7 +9241,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
9262
9241
|
|
|
9263
9242
|
// src/toggle-group/Toggles.tsx
|
|
9264
9243
|
var import_react66 = require("react");
|
|
9265
|
-
var
|
|
9244
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
9266
9245
|
var getValueArray2 = (value) => {
|
|
9267
9246
|
if (value) {
|
|
9268
9247
|
return Array.isArray(value) ? value : [value];
|
|
@@ -9358,16 +9337,16 @@ function TogglesInternal({
|
|
|
9358
9337
|
onValueChange: handleValueChange,
|
|
9359
9338
|
...multiple ? { type: "multiple", value: currentValue } : { type: "single", value: currentValue[0] ?? "" }
|
|
9360
9339
|
};
|
|
9361
|
-
return /* @__PURE__ */ (0,
|
|
9362
|
-
label && /* @__PURE__ */ (0,
|
|
9363
|
-
/* @__PURE__ */ (0,
|
|
9340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { ref, className, children: [
|
|
9341
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "select-none text-base font-normal text-[var(--chekin-color-brand-navy)]", children: label }) }),
|
|
9342
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ToggleGroup, { className: groupClassName, ...toggleGroupProps, children: options.map((option, index) => {
|
|
9364
9343
|
const isSelected = Boolean(
|
|
9365
9344
|
getValueArray2(value).find((selectedValue) => selectedValue === option.value)
|
|
9366
9345
|
);
|
|
9367
9346
|
const isDisabled = disabled || disabledItems?.includes(option.value) || option.disabled;
|
|
9368
9347
|
const isMinSelected = getValueArray2(value).length <= minSelected;
|
|
9369
9348
|
const isItemReadOnly = readOnly || isMinSelected && isSelected || readonlyItems?.includes(option.value);
|
|
9370
|
-
return /* @__PURE__ */ (0,
|
|
9349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9371
9350
|
ToggleGroupItem,
|
|
9372
9351
|
{
|
|
9373
9352
|
value: String(option.value),
|
|
@@ -9386,15 +9365,15 @@ var Toggles = (0, import_react66.forwardRef)(TogglesInternal);
|
|
|
9386
9365
|
var React29 = __toESM(require("react"), 1);
|
|
9387
9366
|
var LabelPrimitive2 = __toESM(require("@radix-ui/react-label"), 1);
|
|
9388
9367
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
9389
|
-
var
|
|
9368
|
+
var import_react_i18next23 = require("react-i18next");
|
|
9390
9369
|
|
|
9391
9370
|
// src/text-field/EndIcon.tsx
|
|
9392
|
-
var
|
|
9393
|
-
var EndIcon = ({ children }) => /* @__PURE__ */ (0,
|
|
9371
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
9372
|
+
var EndIcon = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "pointer-events-none absolute right-3.5 top-1/2 -translate-y-1/2 [&>*]:pointer-events-auto", children });
|
|
9394
9373
|
|
|
9395
9374
|
// src/text-field/FieldError.tsx
|
|
9396
|
-
var
|
|
9397
|
-
var FieldError = ({ id, children }) => /* @__PURE__ */ (0,
|
|
9375
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
9376
|
+
var FieldError = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
9398
9377
|
"p",
|
|
9399
9378
|
{
|
|
9400
9379
|
id,
|
|
@@ -9405,11 +9384,11 @@ var FieldError = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime120
|
|
|
9405
9384
|
);
|
|
9406
9385
|
|
|
9407
9386
|
// src/text-field/SupportingText.tsx
|
|
9408
|
-
var
|
|
9409
|
-
var SupportingText = ({ id, children }) => /* @__PURE__ */ (0,
|
|
9387
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
9388
|
+
var SupportingText = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { id, className: "mt-1 text-xs italic text-[var(--chekin-color-gray-2)]", children });
|
|
9410
9389
|
|
|
9411
9390
|
// src/text-field/TextField.tsx
|
|
9412
|
-
var
|
|
9391
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
9413
9392
|
var textFieldRootClasses = [
|
|
9414
9393
|
"[--text-field-height:2.75rem]",
|
|
9415
9394
|
"[--text-field-radius:8px]",
|
|
@@ -9516,7 +9495,7 @@ var TextField = React29.forwardRef(
|
|
|
9516
9495
|
readOnly,
|
|
9517
9496
|
...props
|
|
9518
9497
|
}, ref) => {
|
|
9519
|
-
const { t } = (0,
|
|
9498
|
+
const { t } = (0, import_react_i18next23.useTranslation)();
|
|
9520
9499
|
const hasError = Boolean(error);
|
|
9521
9500
|
const autoId = React29.useId();
|
|
9522
9501
|
const inputId = props.id || autoId;
|
|
@@ -9530,7 +9509,7 @@ var TextField = React29.forwardRef(
|
|
|
9530
9509
|
const errorId = error ? `${inputId}-error` : void 0;
|
|
9531
9510
|
const ariaDescribedBy = errorId || descriptionId || void 0;
|
|
9532
9511
|
if (variant === "floating") {
|
|
9533
|
-
return /* @__PURE__ */ (0,
|
|
9512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
9534
9513
|
"div",
|
|
9535
9514
|
{
|
|
9536
9515
|
className: cn(
|
|
@@ -9539,8 +9518,8 @@ var TextField = React29.forwardRef(
|
|
|
9539
9518
|
wrapperClassName
|
|
9540
9519
|
),
|
|
9541
9520
|
children: [
|
|
9542
|
-
/* @__PURE__ */ (0,
|
|
9543
|
-
/* @__PURE__ */ (0,
|
|
9521
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "relative", children: [
|
|
9522
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9544
9523
|
"input",
|
|
9545
9524
|
{
|
|
9546
9525
|
id: inputId,
|
|
@@ -9554,7 +9533,7 @@ var TextField = React29.forwardRef(
|
|
|
9554
9533
|
...props
|
|
9555
9534
|
}
|
|
9556
9535
|
),
|
|
9557
|
-
label && /* @__PURE__ */ (0,
|
|
9536
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9558
9537
|
LabelPrimitive2.Root,
|
|
9559
9538
|
{
|
|
9560
9539
|
htmlFor: inputId,
|
|
@@ -9568,17 +9547,17 @@ var TextField = React29.forwardRef(
|
|
|
9568
9547
|
children: label
|
|
9569
9548
|
}
|
|
9570
9549
|
),
|
|
9571
|
-
endIcon && /* @__PURE__ */ (0,
|
|
9550
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(EndIcon, { children: endIcon })
|
|
9572
9551
|
] }),
|
|
9573
|
-
supportingText && !hasError && /* @__PURE__ */ (0,
|
|
9574
|
-
hasError && /* @__PURE__ */ (0,
|
|
9552
|
+
supportingText && !hasError && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(SupportingText, { id: descriptionId, children: supportingText }),
|
|
9553
|
+
hasError && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(FieldError, { id: errorId, children: error })
|
|
9575
9554
|
]
|
|
9576
9555
|
}
|
|
9577
9556
|
);
|
|
9578
9557
|
}
|
|
9579
|
-
return /* @__PURE__ */ (0,
|
|
9580
|
-
label && /* @__PURE__ */ (0,
|
|
9581
|
-
/* @__PURE__ */ (0,
|
|
9558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: cn("flex w-full flex-col", textFieldRootClasses, wrapperClassName), children: [
|
|
9559
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "mb-1 flex items-center gap-1", children: [
|
|
9560
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9582
9561
|
LabelPrimitive2.Root,
|
|
9583
9562
|
{
|
|
9584
9563
|
htmlFor: inputId,
|
|
@@ -9586,14 +9565,14 @@ var TextField = React29.forwardRef(
|
|
|
9586
9565
|
children: label
|
|
9587
9566
|
}
|
|
9588
9567
|
),
|
|
9589
|
-
optional && /* @__PURE__ */ (0,
|
|
9590
|
-
/* @__PURE__ */ (0,
|
|
9591
|
-
/* @__PURE__ */ (0,
|
|
9568
|
+
optional && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("span", { className: "text-base leading-4", children: [
|
|
9569
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-[var(--chekin-color-brand-navy)]", children: "- " }),
|
|
9570
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "italic text-[var(--chekin-color-gray-2)]", children: optionalLabel || t("optional") })
|
|
9592
9571
|
] }),
|
|
9593
9572
|
tooltip
|
|
9594
9573
|
] }),
|
|
9595
|
-
/* @__PURE__ */ (0,
|
|
9596
|
-
/* @__PURE__ */ (0,
|
|
9574
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "relative", children: [
|
|
9575
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9597
9576
|
"input",
|
|
9598
9577
|
{
|
|
9599
9578
|
id: inputId,
|
|
@@ -9607,10 +9586,10 @@ var TextField = React29.forwardRef(
|
|
|
9607
9586
|
...props
|
|
9608
9587
|
}
|
|
9609
9588
|
),
|
|
9610
|
-
endIcon && /* @__PURE__ */ (0,
|
|
9589
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(EndIcon, { children: endIcon })
|
|
9611
9590
|
] }),
|
|
9612
|
-
supportingText && !hasError && /* @__PURE__ */ (0,
|
|
9613
|
-
hasError && /* @__PURE__ */ (0,
|
|
9591
|
+
supportingText && !hasError && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(SupportingText, { id: descriptionId, children: supportingText }),
|
|
9592
|
+
hasError && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(FieldError, { id: errorId, children: error })
|
|
9614
9593
|
] });
|
|
9615
9594
|
}
|
|
9616
9595
|
);
|
|
@@ -9618,12 +9597,12 @@ TextField.displayName = "TextField";
|
|
|
9618
9597
|
|
|
9619
9598
|
// src/textarea/Textarea.tsx
|
|
9620
9599
|
var import_react67 = require("react");
|
|
9621
|
-
var
|
|
9600
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
9622
9601
|
var Textarea = (0, import_react67.forwardRef)(
|
|
9623
9602
|
({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
|
|
9624
9603
|
const inputId = (0, import_react67.useId)();
|
|
9625
|
-
return /* @__PURE__ */ (0,
|
|
9626
|
-
/* @__PURE__ */ (0,
|
|
9604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: cn("relative", className), children: [
|
|
9605
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
9627
9606
|
"textarea",
|
|
9628
9607
|
{
|
|
9629
9608
|
ref,
|
|
@@ -9639,7 +9618,7 @@ var Textarea = (0, import_react67.forwardRef)(
|
|
|
9639
9618
|
...textareaProps
|
|
9640
9619
|
}
|
|
9641
9620
|
),
|
|
9642
|
-
label && /* @__PURE__ */ (0,
|
|
9621
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
9643
9622
|
"label",
|
|
9644
9623
|
{
|
|
9645
9624
|
htmlFor: inputId,
|
|
@@ -9657,34 +9636,34 @@ var Textarea = (0, import_react67.forwardRef)(
|
|
|
9657
9636
|
Textarea.displayName = "Textarea";
|
|
9658
9637
|
|
|
9659
9638
|
// src/three-dots-loader/ThreeDotsLoader.tsx
|
|
9660
|
-
var
|
|
9639
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
9661
9640
|
function Dots({
|
|
9662
9641
|
height,
|
|
9663
9642
|
width,
|
|
9664
9643
|
color
|
|
9665
9644
|
}) {
|
|
9666
|
-
return /* @__PURE__ */ (0,
|
|
9645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
9667
9646
|
"span",
|
|
9668
9647
|
{
|
|
9669
9648
|
className: "inline-flex items-center justify-center gap-[15%]",
|
|
9670
9649
|
style: { height, width },
|
|
9671
9650
|
"aria-hidden": "true",
|
|
9672
9651
|
children: [
|
|
9673
|
-
/* @__PURE__ */ (0,
|
|
9652
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9674
9653
|
"span",
|
|
9675
9654
|
{
|
|
9676
9655
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full [animation-delay:-0.32s]",
|
|
9677
9656
|
style: { backgroundColor: color }
|
|
9678
9657
|
}
|
|
9679
9658
|
),
|
|
9680
|
-
/* @__PURE__ */ (0,
|
|
9659
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9681
9660
|
"span",
|
|
9682
9661
|
{
|
|
9683
9662
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full [animation-delay:-0.16s]",
|
|
9684
9663
|
style: { backgroundColor: color }
|
|
9685
9664
|
}
|
|
9686
9665
|
),
|
|
9687
|
-
/* @__PURE__ */ (0,
|
|
9666
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9688
9667
|
"span",
|
|
9689
9668
|
{
|
|
9690
9669
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full",
|
|
@@ -9703,31 +9682,32 @@ function ThreeDotsLoader({
|
|
|
9703
9682
|
className,
|
|
9704
9683
|
labelPlacement = "right"
|
|
9705
9684
|
}) {
|
|
9706
|
-
const dots = /* @__PURE__ */ (0,
|
|
9685
|
+
const dots = /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Dots, { color, height, width });
|
|
9707
9686
|
if (label) {
|
|
9708
|
-
return /* @__PURE__ */ (0,
|
|
9687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
9709
9688
|
"div",
|
|
9710
9689
|
{
|
|
9711
9690
|
className: cn(
|
|
9712
9691
|
"flex items-center justify-center gap-x-[13px] [&>div]:text-sm [&>div]:font-bold [&>div]:uppercase [&>div]:text-[#9696b9] [&>div]:opacity-50",
|
|
9713
9692
|
className
|
|
9714
9693
|
),
|
|
9715
|
-
|
|
9694
|
+
role: "progressbar",
|
|
9695
|
+
children: labelPlacement === "right" ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
9716
9696
|
dots,
|
|
9717
|
-
/* @__PURE__ */ (0,
|
|
9718
|
-
] }) : /* @__PURE__ */ (0,
|
|
9719
|
-
/* @__PURE__ */ (0,
|
|
9697
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { children: label })
|
|
9698
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
9699
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { children: label }),
|
|
9720
9700
|
dots
|
|
9721
9701
|
] })
|
|
9722
9702
|
}
|
|
9723
9703
|
);
|
|
9724
9704
|
}
|
|
9725
|
-
return /* @__PURE__ */ (0,
|
|
9705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { role: "progressbar", className, children: dots });
|
|
9726
9706
|
}
|
|
9727
9707
|
|
|
9728
9708
|
// src/uploaded-files-list/UploadedFilesList.tsx
|
|
9729
|
-
var
|
|
9730
|
-
var
|
|
9709
|
+
var import_lucide_react41 = require("lucide-react");
|
|
9710
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
9731
9711
|
function UploadedFilesList({
|
|
9732
9712
|
files,
|
|
9733
9713
|
onRemoveFile,
|
|
@@ -9736,20 +9716,20 @@ function UploadedFilesList({
|
|
|
9736
9716
|
if (!files.length) {
|
|
9737
9717
|
return null;
|
|
9738
9718
|
}
|
|
9739
|
-
return /* @__PURE__ */ (0,
|
|
9719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: cn("flex flex-wrap gap-2.5", className), children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
9740
9720
|
"div",
|
|
9741
9721
|
{
|
|
9742
9722
|
className: "flex cursor-default items-center gap-2 rounded border border-[var(--chekin-color-gray-2)] bg-[var(--chekin-color-surface-pressed)] py-1.5 pl-3 pr-1.5",
|
|
9743
9723
|
children: [
|
|
9744
|
-
/* @__PURE__ */ (0,
|
|
9745
|
-
/* @__PURE__ */ (0,
|
|
9724
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "text-nowrap text-sm font-medium leading-5 text-[var(--chekin-color-brand-navy)]", children: file.name }),
|
|
9725
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
9746
9726
|
"button",
|
|
9747
9727
|
{
|
|
9748
9728
|
type: "button",
|
|
9749
9729
|
onClick: () => onRemoveFile(file.name),
|
|
9750
9730
|
className: "flex h-[18px] w-[18px] shrink-0 cursor-pointer items-center justify-center rounded bg-[var(--chekin-color-gray-1)] transition-all hover:shadow-md active:opacity-95",
|
|
9751
9731
|
"aria-label": `Remove ${file.name}`,
|
|
9752
|
-
children: /* @__PURE__ */ (0,
|
|
9732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react41.X, { className: "h-3.5 w-3.5 text-white", strokeWidth: 3 })
|
|
9753
9733
|
}
|
|
9754
9734
|
)
|
|
9755
9735
|
]
|
|
@@ -9759,9 +9739,9 @@ function UploadedFilesList({
|
|
|
9759
9739
|
}
|
|
9760
9740
|
|
|
9761
9741
|
// src/wide-button/WideButton.tsx
|
|
9762
|
-
var
|
|
9742
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
9763
9743
|
function WideButton({ className, disabled, ...props }) {
|
|
9764
|
-
return /* @__PURE__ */ (0,
|
|
9744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
9765
9745
|
Button,
|
|
9766
9746
|
{
|
|
9767
9747
|
variant: "ghost",
|
|
@@ -9779,28 +9759,28 @@ function WideButton({ className, disabled, ...props }) {
|
|
|
9779
9759
|
|
|
9780
9760
|
// src/datepicker/DatePicker.tsx
|
|
9781
9761
|
var React33 = __toESM(require("react"), 1);
|
|
9782
|
-
var
|
|
9762
|
+
var import_lucide_react44 = require("lucide-react");
|
|
9783
9763
|
|
|
9784
9764
|
// src/drawer/Drawer.tsx
|
|
9785
9765
|
var React30 = __toESM(require("react"), 1);
|
|
9786
9766
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
9787
9767
|
var import_react_draggable = __toESM(require("react-draggable"), 1);
|
|
9788
|
-
var
|
|
9768
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
9789
9769
|
var DRAWER_CLOSE_THRESHOLD = 72;
|
|
9790
9770
|
var DRAWER_MIN_OVERLAY_OPACITY = 0.1;
|
|
9791
9771
|
function Drawer({ ...props }) {
|
|
9792
|
-
return /* @__PURE__ */ (0,
|
|
9772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DialogPrimitive2.Root, { "data-slot": "drawer", ...props });
|
|
9793
9773
|
}
|
|
9794
9774
|
function DrawerTrigger({ ...props }) {
|
|
9795
|
-
return /* @__PURE__ */ (0,
|
|
9775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DialogPrimitive2.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
9796
9776
|
}
|
|
9797
9777
|
function DrawerPortal({ ...props }) {
|
|
9798
|
-
return /* @__PURE__ */ (0,
|
|
9778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DialogPrimitive2.Portal, { "data-slot": "drawer-portal", ...props });
|
|
9799
9779
|
}
|
|
9800
9780
|
function DrawerClose({ ...props }) {
|
|
9801
|
-
return /* @__PURE__ */ (0,
|
|
9781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
|
|
9802
9782
|
}
|
|
9803
|
-
var DrawerOverlay = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
9783
|
+
var DrawerOverlay = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9804
9784
|
DialogPrimitive2.Overlay,
|
|
9805
9785
|
{
|
|
9806
9786
|
ref,
|
|
@@ -9849,14 +9829,14 @@ var DrawerContent = React30.forwardRef(
|
|
|
9849
9829
|
},
|
|
9850
9830
|
[onClose]
|
|
9851
9831
|
);
|
|
9852
|
-
return /* @__PURE__ */ (0,
|
|
9853
|
-
lockScroll ? /* @__PURE__ */ (0,
|
|
9832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DrawerPortal, { container: finalContainer, children: [
|
|
9833
|
+
lockScroll ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9854
9834
|
DrawerOverlay,
|
|
9855
9835
|
{
|
|
9856
9836
|
style: { opacity: overlayOpacity },
|
|
9857
9837
|
onClick: closeOnOverlayClick ? onClose : void 0
|
|
9858
9838
|
}
|
|
9859
|
-
) : /* @__PURE__ */ (0,
|
|
9839
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9860
9840
|
"div",
|
|
9861
9841
|
{
|
|
9862
9842
|
className: cn(DrawerOverlayClasses),
|
|
@@ -9864,7 +9844,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9864
9844
|
onClick: closeOnOverlayClick ? onClose : void 0
|
|
9865
9845
|
}
|
|
9866
9846
|
),
|
|
9867
|
-
/* @__PURE__ */ (0,
|
|
9847
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9868
9848
|
DialogPrimitive2.Content,
|
|
9869
9849
|
{
|
|
9870
9850
|
asChild: true,
|
|
@@ -9880,7 +9860,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9880
9860
|
}
|
|
9881
9861
|
},
|
|
9882
9862
|
...props,
|
|
9883
|
-
children: /* @__PURE__ */ (0,
|
|
9863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "fixed inset-x-0 bottom-0 top-auto z-50 outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9884
9864
|
import_react_draggable.default,
|
|
9885
9865
|
{
|
|
9886
9866
|
axis: "y",
|
|
@@ -9890,7 +9870,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9890
9870
|
onDrag: handleDrag,
|
|
9891
9871
|
onStop: handleStop,
|
|
9892
9872
|
position: { x: 0, y: dragOffsetY },
|
|
9893
|
-
children: /* @__PURE__ */ (0,
|
|
9873
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
9894
9874
|
"div",
|
|
9895
9875
|
{
|
|
9896
9876
|
ref: nodeRef,
|
|
@@ -9899,15 +9879,15 @@ var DrawerContent = React30.forwardRef(
|
|
|
9899
9879
|
className
|
|
9900
9880
|
),
|
|
9901
9881
|
children: [
|
|
9902
|
-
showHandle && /* @__PURE__ */ (0,
|
|
9882
|
+
showHandle && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9903
9883
|
"div",
|
|
9904
9884
|
{
|
|
9905
9885
|
"data-drawer-handle": true,
|
|
9906
9886
|
className: "mx-auto flex h-8 w-24 cursor-grab touch-none items-center justify-center active:cursor-grabbing",
|
|
9907
|
-
children: /* @__PURE__ */ (0,
|
|
9887
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "block h-1.5 w-12 rounded-full bg-[#D9D7D3]" })
|
|
9908
9888
|
}
|
|
9909
9889
|
),
|
|
9910
|
-
/* @__PURE__ */ (0,
|
|
9890
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children })
|
|
9911
9891
|
]
|
|
9912
9892
|
}
|
|
9913
9893
|
)
|
|
@@ -9919,7 +9899,7 @@ var DrawerContent = React30.forwardRef(
|
|
|
9919
9899
|
}
|
|
9920
9900
|
);
|
|
9921
9901
|
DrawerContent.displayName = DialogPrimitive2.Content.displayName;
|
|
9922
|
-
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
9902
|
+
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9923
9903
|
"div",
|
|
9924
9904
|
{
|
|
9925
9905
|
className: cn("flex flex-col gap-2 px-5 pt-2 text-center", className),
|
|
@@ -9927,9 +9907,9 @@ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
|
|
|
9927
9907
|
}
|
|
9928
9908
|
);
|
|
9929
9909
|
DrawerHeader.displayName = "DrawerHeader";
|
|
9930
|
-
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
9910
|
+
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
|
|
9931
9911
|
DrawerFooter.displayName = "DrawerFooter";
|
|
9932
|
-
var DrawerTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
9912
|
+
var DrawerTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9933
9913
|
DialogPrimitive2.Title,
|
|
9934
9914
|
{
|
|
9935
9915
|
ref,
|
|
@@ -9939,7 +9919,7 @@ var DrawerTitle = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
9939
9919
|
}
|
|
9940
9920
|
));
|
|
9941
9921
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
9942
|
-
var DrawerDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
9922
|
+
var DrawerDescription = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
9943
9923
|
DialogPrimitive2.Description,
|
|
9944
9924
|
{
|
|
9945
9925
|
ref,
|
|
@@ -10372,7 +10352,7 @@ function useDatePickerWheel({
|
|
|
10372
10352
|
}
|
|
10373
10353
|
|
|
10374
10354
|
// src/datepicker/DatePickerWheelColumn.tsx
|
|
10375
|
-
var
|
|
10355
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
10376
10356
|
var spacerHeight = DATE_PICKER_OPTION_HEIGHT * DATE_PICKER_WHEEL_BUFFER_OPTIONS;
|
|
10377
10357
|
function DatePickerWheelColumn({
|
|
10378
10358
|
id,
|
|
@@ -10386,7 +10366,7 @@ function DatePickerWheelColumn({
|
|
|
10386
10366
|
onOptionSelect,
|
|
10387
10367
|
column
|
|
10388
10368
|
}) {
|
|
10389
|
-
return /* @__PURE__ */ (0,
|
|
10369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
10390
10370
|
"div",
|
|
10391
10371
|
{
|
|
10392
10372
|
id,
|
|
@@ -10403,14 +10383,14 @@ function DatePickerWheelColumn({
|
|
|
10403
10383
|
WebkitOverflowScrolling: "touch"
|
|
10404
10384
|
},
|
|
10405
10385
|
children: [
|
|
10406
|
-
/* @__PURE__ */ (0,
|
|
10386
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { style: { height: `${spacerHeight}px` } }),
|
|
10407
10387
|
items.map((item, index) => {
|
|
10408
10388
|
const { style } = getWheelOptionStyles(
|
|
10409
10389
|
index,
|
|
10410
10390
|
scrollTop,
|
|
10411
10391
|
DATE_PICKER_OPTION_HEIGHT
|
|
10412
10392
|
);
|
|
10413
|
-
return /* @__PURE__ */ (0,
|
|
10393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
10414
10394
|
"button",
|
|
10415
10395
|
{
|
|
10416
10396
|
id: `${id}-option-${index}`,
|
|
@@ -10426,14 +10406,14 @@ function DatePickerWheelColumn({
|
|
|
10426
10406
|
`${column}-${item}-${index}`
|
|
10427
10407
|
);
|
|
10428
10408
|
}),
|
|
10429
|
-
/* @__PURE__ */ (0,
|
|
10409
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { style: { height: `${spacerHeight}px` } })
|
|
10430
10410
|
]
|
|
10431
10411
|
}
|
|
10432
10412
|
) });
|
|
10433
10413
|
}
|
|
10434
10414
|
|
|
10435
10415
|
// src/datepicker/DatePickerContent.tsx
|
|
10436
|
-
var
|
|
10416
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
10437
10417
|
function DatePickerBody({
|
|
10438
10418
|
baseId,
|
|
10439
10419
|
label,
|
|
@@ -10455,19 +10435,19 @@ function DatePickerBody({
|
|
|
10455
10435
|
onOptionSelect,
|
|
10456
10436
|
onDone
|
|
10457
10437
|
}) {
|
|
10458
|
-
return /* @__PURE__ */ (0,
|
|
10459
|
-
/* @__PURE__ */ (0,
|
|
10460
|
-
/* @__PURE__ */ (0,
|
|
10461
|
-
/* @__PURE__ */ (0,
|
|
10462
|
-
/* @__PURE__ */ (0,
|
|
10438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "px-6 pb-4 pt-1 bg-white", children: [
|
|
10439
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "relative overflow-hidden rounded-[24px]", children: [
|
|
10440
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("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" }),
|
|
10441
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("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" }),
|
|
10442
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
10463
10443
|
"div",
|
|
10464
10444
|
{
|
|
10465
10445
|
"aria-hidden": true,
|
|
10466
10446
|
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]"
|
|
10467
10447
|
}
|
|
10468
10448
|
),
|
|
10469
|
-
/* @__PURE__ */ (0,
|
|
10470
|
-
/* @__PURE__ */ (0,
|
|
10449
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "relative grid grid-cols-[1.35fr_0.7fr_1fr] gap-1", children: [
|
|
10450
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
10471
10451
|
DatePickerWheelColumn,
|
|
10472
10452
|
{
|
|
10473
10453
|
id: `${baseId}-month`,
|
|
@@ -10482,7 +10462,7 @@ function DatePickerBody({
|
|
|
10482
10462
|
onOptionSelect
|
|
10483
10463
|
}
|
|
10484
10464
|
),
|
|
10485
|
-
/* @__PURE__ */ (0,
|
|
10465
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
10486
10466
|
DatePickerWheelColumn,
|
|
10487
10467
|
{
|
|
10488
10468
|
id: `${baseId}-day`,
|
|
@@ -10497,7 +10477,7 @@ function DatePickerBody({
|
|
|
10497
10477
|
onOptionSelect
|
|
10498
10478
|
}
|
|
10499
10479
|
),
|
|
10500
|
-
/* @__PURE__ */ (0,
|
|
10480
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
10501
10481
|
DatePickerWheelColumn,
|
|
10502
10482
|
{
|
|
10503
10483
|
id: `${baseId}-year`,
|
|
@@ -10514,7 +10494,7 @@ function DatePickerBody({
|
|
|
10514
10494
|
)
|
|
10515
10495
|
] })
|
|
10516
10496
|
] }),
|
|
10517
|
-
/* @__PURE__ */ (0,
|
|
10497
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
|
|
10518
10498
|
] });
|
|
10519
10499
|
}
|
|
10520
10500
|
function DatePickerContent({
|
|
@@ -10542,7 +10522,7 @@ function DatePickerContent({
|
|
|
10542
10522
|
onColumnKeyDown,
|
|
10543
10523
|
onOptionSelect
|
|
10544
10524
|
}) {
|
|
10545
|
-
const body = /* @__PURE__ */ (0,
|
|
10525
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
10546
10526
|
DatePickerBody,
|
|
10547
10527
|
{
|
|
10548
10528
|
baseId,
|
|
@@ -10567,27 +10547,27 @@ function DatePickerContent({
|
|
|
10567
10547
|
}
|
|
10568
10548
|
);
|
|
10569
10549
|
if (isMobile) {
|
|
10570
|
-
return /* @__PURE__ */ (0,
|
|
10550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
10571
10551
|
DrawerContent,
|
|
10572
10552
|
{
|
|
10573
10553
|
onClose: () => onOpenChange(false),
|
|
10574
10554
|
className: "rounded-none rounded-t-[32px] border-0 p-0",
|
|
10575
10555
|
children: [
|
|
10576
|
-
/* @__PURE__ */ (0,
|
|
10577
|
-
/* @__PURE__ */ (0,
|
|
10556
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DrawerTitle, { className: "sr-only", children: title }),
|
|
10557
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DrawerDescription, { className: "sr-only", children: label }),
|
|
10578
10558
|
body
|
|
10579
10559
|
]
|
|
10580
10560
|
}
|
|
10581
10561
|
) });
|
|
10582
10562
|
}
|
|
10583
|
-
return /* @__PURE__ */ (0,
|
|
10563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
10584
10564
|
DialogContent,
|
|
10585
10565
|
{
|
|
10586
10566
|
className: "max-w-[520px] rounded-[28px] border-0 p-0 shadow-xl",
|
|
10587
10567
|
showCloseButton: false,
|
|
10588
10568
|
children: [
|
|
10589
|
-
/* @__PURE__ */ (0,
|
|
10590
|
-
/* @__PURE__ */ (0,
|
|
10569
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DialogTitle, { className: "sr-only", children: title }),
|
|
10570
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DialogDescription, { className: "sr-only", children: label }),
|
|
10591
10571
|
body
|
|
10592
10572
|
]
|
|
10593
10573
|
}
|
|
@@ -10611,12 +10591,12 @@ var DEVICE = {
|
|
|
10611
10591
|
|
|
10612
10592
|
// src/field-trigger/FieldTrigger.tsx
|
|
10613
10593
|
var React32 = __toESM(require("react"), 1);
|
|
10614
|
-
var
|
|
10615
|
-
var
|
|
10594
|
+
var import_lucide_react43 = require("lucide-react");
|
|
10595
|
+
var import_react_i18next24 = require("react-i18next");
|
|
10616
10596
|
|
|
10617
10597
|
// src/field-error-message/FieldErrorMessage.tsx
|
|
10618
|
-
var
|
|
10619
|
-
var
|
|
10598
|
+
var import_lucide_react42 = require("lucide-react");
|
|
10599
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
10620
10600
|
function FieldErrorMessage({
|
|
10621
10601
|
id,
|
|
10622
10602
|
message,
|
|
@@ -10627,7 +10607,7 @@ function FieldErrorMessage({
|
|
|
10627
10607
|
}) {
|
|
10628
10608
|
const content = message ?? children;
|
|
10629
10609
|
if (!content) return null;
|
|
10630
|
-
return /* @__PURE__ */ (0,
|
|
10610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
10631
10611
|
"p",
|
|
10632
10612
|
{
|
|
10633
10613
|
id,
|
|
@@ -10639,21 +10619,21 @@ function FieldErrorMessage({
|
|
|
10639
10619
|
),
|
|
10640
10620
|
...props,
|
|
10641
10621
|
children: [
|
|
10642
|
-
/* @__PURE__ */ (0,
|
|
10643
|
-
|
|
10622
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
10623
|
+
import_lucide_react42.AlertCircle,
|
|
10644
10624
|
{
|
|
10645
10625
|
className: "h-[18px] w-[18px] shrink-0 text-white",
|
|
10646
10626
|
fill: "var(--error-message-color)"
|
|
10647
10627
|
}
|
|
10648
10628
|
),
|
|
10649
|
-
/* @__PURE__ */ (0,
|
|
10629
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { children: content })
|
|
10650
10630
|
]
|
|
10651
10631
|
}
|
|
10652
10632
|
);
|
|
10653
10633
|
}
|
|
10654
10634
|
|
|
10655
10635
|
// src/field-trigger/FieldTrigger.tsx
|
|
10656
|
-
var
|
|
10636
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
10657
10637
|
var FieldTrigger = React32.forwardRef(
|
|
10658
10638
|
({
|
|
10659
10639
|
as = "button",
|
|
@@ -10685,20 +10665,20 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10685
10665
|
onKeyDown,
|
|
10686
10666
|
...props
|
|
10687
10667
|
}, ref) => {
|
|
10688
|
-
const { t } = (0,
|
|
10668
|
+
const { t } = (0, import_react_i18next24.useTranslation)();
|
|
10689
10669
|
const hasValue = Boolean(valueText);
|
|
10690
10670
|
const isRaised = hasValue || forceFloatingLabel;
|
|
10691
10671
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
10692
10672
|
const visibleLabelText = labelText ?? label;
|
|
10693
10673
|
const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
|
|
10694
|
-
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0,
|
|
10695
|
-
/* @__PURE__ */ (0,
|
|
10696
|
-
optionalLabel && /* @__PURE__ */ (0,
|
|
10674
|
+
const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
|
|
10675
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "min-w-0 truncate", children: visibleLabelText }),
|
|
10676
|
+
optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "shrink-0 text-[12px] relative top-[1px] font-normal leading-4 text-current opacity-70", children: [
|
|
10697
10677
|
"(",
|
|
10698
10678
|
optionalLabel,
|
|
10699
10679
|
")"
|
|
10700
10680
|
] }),
|
|
10701
|
-
tooltip && /* @__PURE__ */ (0,
|
|
10681
|
+
tooltip && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10702
10682
|
HelpTooltip,
|
|
10703
10683
|
{
|
|
10704
10684
|
content: tooltip,
|
|
@@ -10714,10 +10694,10 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10714
10694
|
const hasInvalidState = Boolean(error);
|
|
10715
10695
|
const errorMessage = typeof error === "string" ? error : void 0;
|
|
10716
10696
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
10717
|
-
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0,
|
|
10697
|
+
const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "flex items-center gap-2", children: [
|
|
10718
10698
|
trailingAdornment,
|
|
10719
|
-
loading && /* @__PURE__ */ (0,
|
|
10720
|
-
|
|
10699
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10700
|
+
import_lucide_react43.Loader2,
|
|
10721
10701
|
{
|
|
10722
10702
|
"aria-hidden": "true",
|
|
10723
10703
|
className: "h-5 w-5 animate-spin text-[var(--chekin-color-gray-1)]"
|
|
@@ -10732,8 +10712,8 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10732
10712
|
disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : isAirbnbVariant ? "cursor-pointer" : "cursor-text",
|
|
10733
10713
|
className
|
|
10734
10714
|
);
|
|
10735
|
-
const sharedContent = /* @__PURE__ */ (0,
|
|
10736
|
-
/* @__PURE__ */ (0,
|
|
10715
|
+
const sharedContent = /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
|
|
10716
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
10737
10717
|
"span",
|
|
10738
10718
|
{
|
|
10739
10719
|
className: cn(
|
|
@@ -10742,7 +10722,7 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10742
10722
|
contentClassName
|
|
10743
10723
|
),
|
|
10744
10724
|
children: [
|
|
10745
|
-
/* @__PURE__ */ (0,
|
|
10725
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10746
10726
|
"span",
|
|
10747
10727
|
{
|
|
10748
10728
|
id: labelId,
|
|
@@ -10755,7 +10735,7 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10755
10735
|
children: animatedLabel
|
|
10756
10736
|
}
|
|
10757
10737
|
),
|
|
10758
|
-
children ? children : hasValue ? /* @__PURE__ */ (0,
|
|
10738
|
+
children ? children : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10759
10739
|
"span",
|
|
10760
10740
|
{
|
|
10761
10741
|
id: valueId,
|
|
@@ -10766,11 +10746,11 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10766
10746
|
),
|
|
10767
10747
|
children: valueText
|
|
10768
10748
|
}
|
|
10769
|
-
) : /* @__PURE__ */ (0,
|
|
10749
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
|
|
10770
10750
|
]
|
|
10771
10751
|
}
|
|
10772
10752
|
),
|
|
10773
|
-
resolvedTrailingAdornment && /* @__PURE__ */ (0,
|
|
10753
|
+
resolvedTrailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10774
10754
|
"span",
|
|
10775
10755
|
{
|
|
10776
10756
|
"aria-hidden": "true",
|
|
@@ -10782,9 +10762,9 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10782
10762
|
}
|
|
10783
10763
|
)
|
|
10784
10764
|
] });
|
|
10785
|
-
return /* @__PURE__ */ (0,
|
|
10786
|
-
topLabel && /* @__PURE__ */ (0,
|
|
10787
|
-
as === "button" ? /* @__PURE__ */ (0,
|
|
10765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "w-full", children: [
|
|
10766
|
+
topLabel && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[#222222]", children: topLabel }),
|
|
10767
|
+
as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10788
10768
|
"button",
|
|
10789
10769
|
{
|
|
10790
10770
|
id,
|
|
@@ -10801,7 +10781,7 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10801
10781
|
...props,
|
|
10802
10782
|
children: sharedContent
|
|
10803
10783
|
}
|
|
10804
|
-
) : /* @__PURE__ */ (0,
|
|
10784
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
10805
10785
|
"div",
|
|
10806
10786
|
{
|
|
10807
10787
|
id,
|
|
@@ -10818,14 +10798,14 @@ var FieldTrigger = React32.forwardRef(
|
|
|
10818
10798
|
children: sharedContent
|
|
10819
10799
|
}
|
|
10820
10800
|
),
|
|
10821
|
-
errorMessage && !hideErrorMessage && /* @__PURE__ */ (0,
|
|
10801
|
+
errorMessage && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(FieldErrorMessage, { id: errorId, message: errorMessage })
|
|
10822
10802
|
] });
|
|
10823
10803
|
}
|
|
10824
10804
|
);
|
|
10825
10805
|
FieldTrigger.displayName = "FieldTrigger";
|
|
10826
10806
|
|
|
10827
10807
|
// src/datepicker/DatePicker.tsx
|
|
10828
|
-
var
|
|
10808
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
10829
10809
|
var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
|
|
10830
10810
|
var DatePicker = React33.forwardRef(
|
|
10831
10811
|
({
|
|
@@ -10942,8 +10922,8 @@ var DatePicker = React33.forwardRef(
|
|
|
10942
10922
|
setIsOpen(false);
|
|
10943
10923
|
}
|
|
10944
10924
|
}, [isBlocked]);
|
|
10945
|
-
return /* @__PURE__ */ (0,
|
|
10946
|
-
name && /* @__PURE__ */ (0,
|
|
10925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
|
|
10926
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10947
10927
|
"input",
|
|
10948
10928
|
{
|
|
10949
10929
|
type: "hidden",
|
|
@@ -10951,7 +10931,7 @@ var DatePicker = React33.forwardRef(
|
|
|
10951
10931
|
value: resolvedValue ? formatDateInputValue(resolvedValue) : ""
|
|
10952
10932
|
}
|
|
10953
10933
|
),
|
|
10954
|
-
/* @__PURE__ */ (0,
|
|
10934
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10955
10935
|
FieldTrigger,
|
|
10956
10936
|
{
|
|
10957
10937
|
id: triggerId,
|
|
@@ -10978,10 +10958,10 @@ var DatePicker = React33.forwardRef(
|
|
|
10978
10958
|
onClick: handleTriggerClick,
|
|
10979
10959
|
onKeyDown: handleTriggerKeyDown,
|
|
10980
10960
|
onBlur,
|
|
10981
|
-
trailingAdornment: /* @__PURE__ */ (0,
|
|
10961
|
+
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_lucide_react44.Calendar, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
|
|
10982
10962
|
}
|
|
10983
10963
|
),
|
|
10984
|
-
/* @__PURE__ */ (0,
|
|
10964
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
10985
10965
|
DatePickerContent,
|
|
10986
10966
|
{
|
|
10987
10967
|
baseId: pickerId,
|
|
@@ -11015,7 +10995,7 @@ var DatePicker = React33.forwardRef(
|
|
|
11015
10995
|
DatePicker.displayName = "DatePicker";
|
|
11016
10996
|
|
|
11017
10997
|
// src/responsive-sheet/ResponsiveSheet.tsx
|
|
11018
|
-
var
|
|
10998
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
11019
10999
|
function ResponsiveSheet({
|
|
11020
11000
|
open,
|
|
11021
11001
|
onClose,
|
|
@@ -11050,7 +11030,7 @@ function ResponsiveSheet({
|
|
|
11050
11030
|
event.preventDefault();
|
|
11051
11031
|
}
|
|
11052
11032
|
};
|
|
11053
|
-
const content = /* @__PURE__ */ (0,
|
|
11033
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
11054
11034
|
"div",
|
|
11055
11035
|
{
|
|
11056
11036
|
className: cn(
|
|
@@ -11058,7 +11038,7 @@ function ResponsiveSheet({
|
|
|
11058
11038
|
contentClassName
|
|
11059
11039
|
),
|
|
11060
11040
|
children: [
|
|
11061
|
-
title ? /* @__PURE__ */ (0,
|
|
11041
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
11062
11042
|
"div",
|
|
11063
11043
|
{
|
|
11064
11044
|
className: cn(
|
|
@@ -11068,7 +11048,7 @@ function ResponsiveSheet({
|
|
|
11068
11048
|
children: title
|
|
11069
11049
|
}
|
|
11070
11050
|
) : null,
|
|
11071
|
-
description ? /* @__PURE__ */ (0,
|
|
11051
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
11072
11052
|
"p",
|
|
11073
11053
|
{
|
|
11074
11054
|
className: cn(
|
|
@@ -11083,7 +11063,7 @@ function ResponsiveSheet({
|
|
|
11083
11063
|
}
|
|
11084
11064
|
);
|
|
11085
11065
|
if (isMobileMode) {
|
|
11086
|
-
return /* @__PURE__ */ (0,
|
|
11066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
11087
11067
|
DrawerContent,
|
|
11088
11068
|
{
|
|
11089
11069
|
onClose,
|
|
@@ -11093,14 +11073,14 @@ function ResponsiveSheet({
|
|
|
11093
11073
|
onEscapeKeyDown: handleEscapeKeyDown,
|
|
11094
11074
|
className: cn(className, drawerClassName),
|
|
11095
11075
|
children: [
|
|
11096
|
-
title ? /* @__PURE__ */ (0,
|
|
11097
|
-
description ? /* @__PURE__ */ (0,
|
|
11076
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DrawerTitle, { className: "sr-only", children: title }) : null,
|
|
11077
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DrawerDescription, { className: "sr-only", children: description }) : null,
|
|
11098
11078
|
content
|
|
11099
11079
|
]
|
|
11100
11080
|
}
|
|
11101
11081
|
) });
|
|
11102
11082
|
}
|
|
11103
|
-
return /* @__PURE__ */ (0,
|
|
11083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
11104
11084
|
DialogContent,
|
|
11105
11085
|
{
|
|
11106
11086
|
showCloseButton,
|
|
@@ -11110,8 +11090,8 @@ function ResponsiveSheet({
|
|
|
11110
11090
|
className: cn("max-w-[560px] border-0 p-0 shadow-xl", className, dialogClassName),
|
|
11111
11091
|
lockScroll: false,
|
|
11112
11092
|
children: [
|
|
11113
|
-
title ? /* @__PURE__ */ (0,
|
|
11114
|
-
description ? /* @__PURE__ */ (0,
|
|
11093
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DialogTitle, { className: "sr-only", children: title }) : null,
|
|
11094
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DialogDescription, { className: "sr-only", children: description }) : null,
|
|
11115
11095
|
content
|
|
11116
11096
|
]
|
|
11117
11097
|
}
|
|
@@ -11120,7 +11100,7 @@ function ResponsiveSheet({
|
|
|
11120
11100
|
|
|
11121
11101
|
// src/airbnb/input/Input.tsx
|
|
11122
11102
|
var React34 = __toESM(require("react"), 1);
|
|
11123
|
-
var
|
|
11103
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
11124
11104
|
var getInputValue = (value) => value != null ? String(value) : "";
|
|
11125
11105
|
var AirbnbInput = React34.forwardRef(
|
|
11126
11106
|
({
|
|
@@ -11203,7 +11183,7 @@ var AirbnbInput = React34.forwardRef(
|
|
|
11203
11183
|
setIsFocused(false);
|
|
11204
11184
|
onBlur?.(event);
|
|
11205
11185
|
};
|
|
11206
|
-
return /* @__PURE__ */ (0,
|
|
11186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
11207
11187
|
FieldTrigger,
|
|
11208
11188
|
{
|
|
11209
11189
|
as: "div",
|
|
@@ -11235,7 +11215,7 @@ var AirbnbInput = React34.forwardRef(
|
|
|
11235
11215
|
forceFloatingLabel: shouldShowLabel,
|
|
11236
11216
|
forceLabelText: hasLabelMeta,
|
|
11237
11217
|
hideErrorMessage: !renderErrorMessage,
|
|
11238
|
-
children: /* @__PURE__ */ (0,
|
|
11218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
11239
11219
|
"input",
|
|
11240
11220
|
{
|
|
11241
11221
|
...props,
|
|
@@ -11272,13 +11252,13 @@ AirbnbInput.displayName = "Input";
|
|
|
11272
11252
|
|
|
11273
11253
|
// src/airbnb/phone-field/PhoneField.tsx
|
|
11274
11254
|
var React40 = __toESM(require("react"), 1);
|
|
11275
|
-
var
|
|
11255
|
+
var import_lucide_react46 = require("lucide-react");
|
|
11276
11256
|
|
|
11277
11257
|
// src/airbnb/select/Select.tsx
|
|
11278
11258
|
var React39 = __toESM(require("react"), 1);
|
|
11279
11259
|
|
|
11280
11260
|
// src/airbnb/select/SelectDesktopMenu.tsx
|
|
11281
|
-
var
|
|
11261
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
11282
11262
|
function SelectDesktopMenu({
|
|
11283
11263
|
id,
|
|
11284
11264
|
options,
|
|
@@ -11297,7 +11277,7 @@ function SelectDesktopMenu({
|
|
|
11297
11277
|
noOptionsMessage
|
|
11298
11278
|
}) {
|
|
11299
11279
|
const emptyMessage = noOptionsMessage?.();
|
|
11300
|
-
return /* @__PURE__ */ (0,
|
|
11280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
11301
11281
|
"div",
|
|
11302
11282
|
{
|
|
11303
11283
|
id,
|
|
@@ -11310,12 +11290,12 @@ function SelectDesktopMenu({
|
|
|
11310
11290
|
onKeyDown,
|
|
11311
11291
|
className: cn("max-h-[280px] overflow-y-auto p-2 outline-none", menuClassName),
|
|
11312
11292
|
children: [
|
|
11313
|
-
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0,
|
|
11293
|
+
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
|
|
11314
11294
|
options.map((option, index) => {
|
|
11315
11295
|
const isSelected = selectedValue?.value === option.value;
|
|
11316
11296
|
const isHighlighted = index === highlightedIndex;
|
|
11317
11297
|
const optionKey = `${String(option.value)}-${index}`;
|
|
11318
|
-
return /* @__PURE__ */ (0,
|
|
11298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
11319
11299
|
"button",
|
|
11320
11300
|
{
|
|
11321
11301
|
id: getOptionId2(index),
|
|
@@ -11347,7 +11327,7 @@ function SelectDesktopMenu({
|
|
|
11347
11327
|
}
|
|
11348
11328
|
|
|
11349
11329
|
// src/airbnb/select/SelectDesktopContent.tsx
|
|
11350
|
-
var
|
|
11330
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
11351
11331
|
function SelectDesktopContent({
|
|
11352
11332
|
isOpen,
|
|
11353
11333
|
listboxId,
|
|
@@ -11368,14 +11348,14 @@ function SelectDesktopContent({
|
|
|
11368
11348
|
noOptionsMessage
|
|
11369
11349
|
}) {
|
|
11370
11350
|
if (!isOpen) return null;
|
|
11371
|
-
return /* @__PURE__ */ (0,
|
|
11351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
11372
11352
|
"div",
|
|
11373
11353
|
{
|
|
11374
11354
|
className: cn(
|
|
11375
11355
|
"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)]",
|
|
11376
11356
|
dropdownClassName
|
|
11377
11357
|
),
|
|
11378
|
-
children: /* @__PURE__ */ (0,
|
|
11358
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
11379
11359
|
SelectDesktopMenu,
|
|
11380
11360
|
{
|
|
11381
11361
|
id: listboxId,
|
|
@@ -11473,7 +11453,7 @@ function getMobileOptionStyles(index, scrollTop) {
|
|
|
11473
11453
|
}
|
|
11474
11454
|
|
|
11475
11455
|
// src/airbnb/select/SelectMobileWheel.tsx
|
|
11476
|
-
var
|
|
11456
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
11477
11457
|
function SelectMobileWheel({
|
|
11478
11458
|
id,
|
|
11479
11459
|
options,
|
|
@@ -11492,7 +11472,7 @@ function SelectMobileWheel({
|
|
|
11492
11472
|
}) {
|
|
11493
11473
|
const spacerHeight2 = getWheelSpacerHeight();
|
|
11494
11474
|
const emptyMessage = noOptionsMessage?.();
|
|
11495
|
-
return /* @__PURE__ */ (0,
|
|
11475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
11496
11476
|
"div",
|
|
11497
11477
|
{
|
|
11498
11478
|
id,
|
|
@@ -11504,10 +11484,10 @@ function SelectMobileWheel({
|
|
|
11504
11484
|
onKeyDown,
|
|
11505
11485
|
className: cn("relative overflow-hidden outline-none", menuClassName),
|
|
11506
11486
|
children: [
|
|
11507
|
-
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0,
|
|
11508
|
-
/* @__PURE__ */ (0,
|
|
11509
|
-
/* @__PURE__ */ (0,
|
|
11510
|
-
/* @__PURE__ */ (0,
|
|
11487
|
+
options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
|
|
11488
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.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" }),
|
|
11489
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.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" }),
|
|
11490
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
11511
11491
|
"div",
|
|
11512
11492
|
{
|
|
11513
11493
|
"aria-hidden": true,
|
|
@@ -11517,7 +11497,7 @@ function SelectMobileWheel({
|
|
|
11517
11497
|
)
|
|
11518
11498
|
}
|
|
11519
11499
|
),
|
|
11520
|
-
/* @__PURE__ */ (0,
|
|
11500
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
11521
11501
|
"div",
|
|
11522
11502
|
{
|
|
11523
11503
|
ref: listRef,
|
|
@@ -11532,11 +11512,11 @@ function SelectMobileWheel({
|
|
|
11532
11512
|
WebkitOverflowScrolling: "touch"
|
|
11533
11513
|
},
|
|
11534
11514
|
children: [
|
|
11535
|
-
/* @__PURE__ */ (0,
|
|
11515
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
|
|
11536
11516
|
options.map((option, index) => {
|
|
11537
11517
|
const { distance, style } = getMobileOptionStyles(index, scrollTop);
|
|
11538
11518
|
const optionKey = `${String(option.value)}-${index}`;
|
|
11539
|
-
return /* @__PURE__ */ (0,
|
|
11519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
11540
11520
|
"button",
|
|
11541
11521
|
{
|
|
11542
11522
|
id: getOptionId2(index),
|
|
@@ -11557,7 +11537,7 @@ function SelectMobileWheel({
|
|
|
11557
11537
|
optionKey
|
|
11558
11538
|
);
|
|
11559
11539
|
}),
|
|
11560
|
-
/* @__PURE__ */ (0,
|
|
11540
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { style: { height: `${spacerHeight2}px` } })
|
|
11561
11541
|
]
|
|
11562
11542
|
}
|
|
11563
11543
|
)
|
|
@@ -11567,7 +11547,7 @@ function SelectMobileWheel({
|
|
|
11567
11547
|
}
|
|
11568
11548
|
|
|
11569
11549
|
// src/airbnb/select/SelectMobileContent.tsx
|
|
11570
|
-
var
|
|
11550
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
11571
11551
|
function SelectMobileContent({
|
|
11572
11552
|
open,
|
|
11573
11553
|
onOpenChange,
|
|
@@ -11591,11 +11571,11 @@ function SelectMobileContent({
|
|
|
11591
11571
|
getOptionId: getOptionId2,
|
|
11592
11572
|
noOptionsMessage
|
|
11593
11573
|
}) {
|
|
11594
|
-
return /* @__PURE__ */ (0,
|
|
11595
|
-
/* @__PURE__ */ (0,
|
|
11596
|
-
/* @__PURE__ */ (0,
|
|
11597
|
-
/* @__PURE__ */ (0,
|
|
11598
|
-
/* @__PURE__ */ (0,
|
|
11574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
|
|
11575
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
11576
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DrawerDescription, { className: "sr-only", children: label }),
|
|
11577
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
|
|
11578
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
11599
11579
|
SelectMobileWheel,
|
|
11600
11580
|
{
|
|
11601
11581
|
id: listboxId,
|
|
@@ -11614,15 +11594,15 @@ function SelectMobileContent({
|
|
|
11614
11594
|
noOptionsMessage
|
|
11615
11595
|
}
|
|
11616
11596
|
),
|
|
11617
|
-
/* @__PURE__ */ (0,
|
|
11597
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
|
|
11618
11598
|
] })
|
|
11619
11599
|
] }) });
|
|
11620
11600
|
}
|
|
11621
11601
|
|
|
11622
11602
|
// src/airbnb/select/SelectTrigger.tsx
|
|
11623
11603
|
var React35 = __toESM(require("react"), 1);
|
|
11624
|
-
var
|
|
11625
|
-
var
|
|
11604
|
+
var import_lucide_react45 = require("lucide-react");
|
|
11605
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
11626
11606
|
var SelectTrigger2 = React35.forwardRef(
|
|
11627
11607
|
({
|
|
11628
11608
|
id,
|
|
@@ -11648,7 +11628,7 @@ var SelectTrigger2 = React35.forwardRef(
|
|
|
11648
11628
|
onKeyDown,
|
|
11649
11629
|
onBlur
|
|
11650
11630
|
}, ref) => {
|
|
11651
|
-
return /* @__PURE__ */ (0,
|
|
11631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
11652
11632
|
FieldTrigger,
|
|
11653
11633
|
{
|
|
11654
11634
|
id,
|
|
@@ -11677,8 +11657,8 @@ var SelectTrigger2 = React35.forwardRef(
|
|
|
11677
11657
|
onClick,
|
|
11678
11658
|
onKeyDown,
|
|
11679
11659
|
onBlur,
|
|
11680
|
-
trailingAdornment: /* @__PURE__ */ (0,
|
|
11681
|
-
|
|
11660
|
+
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
11661
|
+
import_lucide_react45.ChevronDown,
|
|
11682
11662
|
{
|
|
11683
11663
|
className: open ? "h-6 w-6 rotate-180 text-[#1F1F1B] transition-transform" : "h-6 w-6 text-[#1F1F1B] transition-transform"
|
|
11684
11664
|
}
|
|
@@ -12039,7 +12019,7 @@ function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
|
|
|
12039
12019
|
}
|
|
12040
12020
|
|
|
12041
12021
|
// src/airbnb/select/Select.tsx
|
|
12042
|
-
var
|
|
12022
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
12043
12023
|
var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
12044
12024
|
options = [],
|
|
12045
12025
|
value,
|
|
@@ -12216,13 +12196,13 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
12216
12196
|
handleMobileOpenChange(false);
|
|
12217
12197
|
}
|
|
12218
12198
|
};
|
|
12219
|
-
return /* @__PURE__ */ (0,
|
|
12199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
12220
12200
|
"div",
|
|
12221
12201
|
{
|
|
12222
12202
|
ref: containerRef,
|
|
12223
12203
|
className: cn("relative w-full max-w-[var(--max-field-width)]", className),
|
|
12224
12204
|
children: [
|
|
12225
|
-
name && /* @__PURE__ */ (0,
|
|
12205
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
12226
12206
|
renderTrigger ? renderTrigger({
|
|
12227
12207
|
id: triggerId,
|
|
12228
12208
|
open: isOpen,
|
|
@@ -12244,7 +12224,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
12244
12224
|
onClick: handleTriggerClick,
|
|
12245
12225
|
onKeyDown: handleRootTriggerKeyDown,
|
|
12246
12226
|
onBlur
|
|
12247
|
-
}) : /* @__PURE__ */ (0,
|
|
12227
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
12248
12228
|
SelectTrigger2,
|
|
12249
12229
|
{
|
|
12250
12230
|
id: triggerId,
|
|
@@ -12272,7 +12252,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
12272
12252
|
onBlur
|
|
12273
12253
|
}
|
|
12274
12254
|
),
|
|
12275
|
-
isMobile ? /* @__PURE__ */ (0,
|
|
12255
|
+
isMobile ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
12276
12256
|
SelectMobileContent,
|
|
12277
12257
|
{
|
|
12278
12258
|
open: isOpen,
|
|
@@ -12297,7 +12277,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
12297
12277
|
getOptionId: getOptionId2,
|
|
12298
12278
|
noOptionsMessage
|
|
12299
12279
|
}
|
|
12300
|
-
) : /* @__PURE__ */ (0,
|
|
12280
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
12301
12281
|
SelectDesktopContent,
|
|
12302
12282
|
{
|
|
12303
12283
|
isOpen,
|
|
@@ -12331,7 +12311,7 @@ var AirbnbSelect = React39.forwardRef(function AirbnbSelect2({
|
|
|
12331
12311
|
});
|
|
12332
12312
|
|
|
12333
12313
|
// src/airbnb/phone-field/PhoneField.tsx
|
|
12334
|
-
var
|
|
12314
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
12335
12315
|
function formatPhoneCodeOptionLabel(option) {
|
|
12336
12316
|
const label = String(option.label);
|
|
12337
12317
|
const value = String(option.value);
|
|
@@ -12378,9 +12358,9 @@ var PhoneField = React40.forwardRef(
|
|
|
12378
12358
|
const hasInvalidState = Boolean(error) || Boolean(invalid);
|
|
12379
12359
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
12380
12360
|
const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
|
|
12381
|
-
return /* @__PURE__ */ (0,
|
|
12382
|
-
name && /* @__PURE__ */ (0,
|
|
12383
|
-
codeName && /* @__PURE__ */ (0,
|
|
12361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
|
|
12362
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
|
|
12363
|
+
codeName && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
12384
12364
|
"input",
|
|
12385
12365
|
{
|
|
12386
12366
|
type: "hidden",
|
|
@@ -12389,7 +12369,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12389
12369
|
disabled
|
|
12390
12370
|
}
|
|
12391
12371
|
),
|
|
12392
|
-
numberName && /* @__PURE__ */ (0,
|
|
12372
|
+
numberName && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
12393
12373
|
"input",
|
|
12394
12374
|
{
|
|
12395
12375
|
type: "hidden",
|
|
@@ -12398,7 +12378,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12398
12378
|
disabled
|
|
12399
12379
|
}
|
|
12400
12380
|
),
|
|
12401
|
-
topLabel && /* @__PURE__ */ (0,
|
|
12381
|
+
topLabel && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
12402
12382
|
"label",
|
|
12403
12383
|
{
|
|
12404
12384
|
htmlFor: inputId,
|
|
@@ -12406,8 +12386,8 @@ var PhoneField = React40.forwardRef(
|
|
|
12406
12386
|
children: topLabel
|
|
12407
12387
|
}
|
|
12408
12388
|
),
|
|
12409
|
-
/* @__PURE__ */ (0,
|
|
12410
|
-
/* @__PURE__ */ (0,
|
|
12389
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "flex items-stretch", children: [
|
|
12390
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
12411
12391
|
AirbnbSelect,
|
|
12412
12392
|
{
|
|
12413
12393
|
ref,
|
|
@@ -12438,7 +12418,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12438
12418
|
onClick,
|
|
12439
12419
|
onKeyDown,
|
|
12440
12420
|
valueLabel
|
|
12441
|
-
}) => /* @__PURE__ */ (0,
|
|
12421
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
12442
12422
|
"button",
|
|
12443
12423
|
{
|
|
12444
12424
|
id,
|
|
@@ -12460,9 +12440,9 @@ var PhoneField = React40.forwardRef(
|
|
|
12460
12440
|
triggerDisabled ? "cursor-not-allowed opacity-50" : triggerLoading ? "cursor-progress" : "cursor-pointer"
|
|
12461
12441
|
),
|
|
12462
12442
|
children: [
|
|
12463
|
-
/* @__PURE__ */ (0,
|
|
12464
|
-
/* @__PURE__ */ (0,
|
|
12465
|
-
|
|
12443
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { children: valueLabel ?? codePlaceholder }),
|
|
12444
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
12445
|
+
import_lucide_react46.ChevronDown,
|
|
12466
12446
|
{
|
|
12467
12447
|
className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
|
|
12468
12448
|
strokeWidth: 2
|
|
@@ -12473,7 +12453,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12473
12453
|
)
|
|
12474
12454
|
}
|
|
12475
12455
|
),
|
|
12476
|
-
/* @__PURE__ */ (0,
|
|
12456
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
12477
12457
|
AirbnbInput,
|
|
12478
12458
|
{
|
|
12479
12459
|
id: inputId,
|
|
@@ -12505,7 +12485,7 @@ var PhoneField = React40.forwardRef(
|
|
|
12505
12485
|
}
|
|
12506
12486
|
)
|
|
12507
12487
|
] }),
|
|
12508
|
-
error && /* @__PURE__ */ (0,
|
|
12488
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(FieldErrorMessage, { message: error })
|
|
12509
12489
|
] });
|
|
12510
12490
|
}
|
|
12511
12491
|
);
|
|
@@ -12513,15 +12493,15 @@ PhoneField.displayName = "PhoneField";
|
|
|
12513
12493
|
|
|
12514
12494
|
// src/airbnb/search-input/SearchInput.tsx
|
|
12515
12495
|
var React41 = __toESM(require("react"), 1);
|
|
12516
|
-
var
|
|
12517
|
-
var
|
|
12518
|
-
var
|
|
12496
|
+
var import_react_i18next25 = require("react-i18next");
|
|
12497
|
+
var import_lucide_react47 = require("lucide-react");
|
|
12498
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
12519
12499
|
var AirbnbSearchInput = React41.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
|
|
12520
|
-
const { t } = (0,
|
|
12500
|
+
const { t } = (0, import_react_i18next25.useTranslation)();
|
|
12521
12501
|
const placeholderText = placeholder || t("search_property") + "...";
|
|
12522
|
-
return /* @__PURE__ */ (0,
|
|
12523
|
-
/* @__PURE__ */ (0,
|
|
12524
|
-
/* @__PURE__ */ (0,
|
|
12502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
|
|
12503
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_lucide_react47.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
|
|
12504
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
12525
12505
|
"input",
|
|
12526
12506
|
{
|
|
12527
12507
|
...props,
|
|
@@ -12540,13 +12520,13 @@ var AirbnbSearchInput = React41.forwardRef(({ onReset, placeholder, wrapperClass
|
|
|
12540
12520
|
)
|
|
12541
12521
|
}
|
|
12542
12522
|
),
|
|
12543
|
-
onReset && /* @__PURE__ */ (0,
|
|
12523
|
+
onReset && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
12544
12524
|
Button,
|
|
12545
12525
|
{
|
|
12546
12526
|
variant: "ghost",
|
|
12547
12527
|
onClick: onReset,
|
|
12548
12528
|
className: "absolute right-0 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]",
|
|
12549
|
-
children: /* @__PURE__ */ (0,
|
|
12529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_lucide_react47.X, { className: "h-5 w-5" })
|
|
12550
12530
|
}
|
|
12551
12531
|
)
|
|
12552
12532
|
] });
|
|
@@ -12555,10 +12535,10 @@ AirbnbSearchInput.displayName = "SearchInput";
|
|
|
12555
12535
|
|
|
12556
12536
|
// src/searchable-select/SearchableSelect.tsx
|
|
12557
12537
|
var React42 = __toESM(require("react"), 1);
|
|
12558
|
-
var
|
|
12538
|
+
var import_lucide_react48 = require("lucide-react");
|
|
12559
12539
|
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
12560
12540
|
var import_react68 = require("react");
|
|
12561
|
-
var
|
|
12541
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
12562
12542
|
var ROW_HEIGHT = 48;
|
|
12563
12543
|
var DESKTOP_LIST_HEIGHT = 280;
|
|
12564
12544
|
var MOBILE_LIST_HEIGHT = 420;
|
|
@@ -12727,7 +12707,7 @@ var SearchableSelectInternal = ({
|
|
|
12727
12707
|
}
|
|
12728
12708
|
}
|
|
12729
12709
|
}
|
|
12730
|
-
const content = /* @__PURE__ */ (0,
|
|
12710
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12731
12711
|
SearchableSelectContent,
|
|
12732
12712
|
{
|
|
12733
12713
|
inputId: searchInputId,
|
|
@@ -12755,9 +12735,9 @@ var SearchableSelectInternal = ({
|
|
|
12755
12735
|
}
|
|
12756
12736
|
);
|
|
12757
12737
|
React42.useImperativeHandle(ref, () => triggerRef.current, []);
|
|
12758
|
-
return /* @__PURE__ */ (0,
|
|
12759
|
-
name && /* @__PURE__ */ (0,
|
|
12760
|
-
/* @__PURE__ */ (0,
|
|
12738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
|
|
12739
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
|
|
12740
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12761
12741
|
FieldTrigger,
|
|
12762
12742
|
{
|
|
12763
12743
|
id: `${reactId}-trigger`,
|
|
@@ -12792,8 +12772,8 @@ var SearchableSelectInternal = ({
|
|
|
12792
12772
|
},
|
|
12793
12773
|
onKeyDown: handleTriggerKeyDown,
|
|
12794
12774
|
onBlur,
|
|
12795
|
-
trailingAdornment: /* @__PURE__ */ (0,
|
|
12796
|
-
|
|
12775
|
+
trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12776
|
+
import_lucide_react48.ChevronDown,
|
|
12797
12777
|
{
|
|
12798
12778
|
className: cn(
|
|
12799
12779
|
"h-6 w-6 text-[#1F1F1B] transition-transform",
|
|
@@ -12803,7 +12783,7 @@ var SearchableSelectInternal = ({
|
|
|
12803
12783
|
)
|
|
12804
12784
|
}
|
|
12805
12785
|
),
|
|
12806
|
-
isMobile ? /* @__PURE__ */ (0,
|
|
12786
|
+
isMobile ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12807
12787
|
Drawer,
|
|
12808
12788
|
{
|
|
12809
12789
|
open,
|
|
@@ -12815,13 +12795,13 @@ var SearchableSelectInternal = ({
|
|
|
12815
12795
|
}
|
|
12816
12796
|
closeSelect();
|
|
12817
12797
|
},
|
|
12818
|
-
children: /* @__PURE__ */ (0,
|
|
12819
|
-
/* @__PURE__ */ (0,
|
|
12820
|
-
/* @__PURE__ */ (0,
|
|
12821
|
-
/* @__PURE__ */ (0,
|
|
12798
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
|
|
12799
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
|
|
12800
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DrawerDescription, { className: "sr-only", children: label }),
|
|
12801
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
|
|
12822
12802
|
] })
|
|
12823
12803
|
}
|
|
12824
|
-
) : open ? /* @__PURE__ */ (0,
|
|
12804
|
+
) : open ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12825
12805
|
"div",
|
|
12826
12806
|
{
|
|
12827
12807
|
className: cn(
|
|
@@ -12888,16 +12868,16 @@ function SearchableSelectContent({
|
|
|
12888
12868
|
virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
|
|
12889
12869
|
}
|
|
12890
12870
|
}, [highlightedIndex, virtualizer]);
|
|
12891
|
-
return /* @__PURE__ */ (0,
|
|
12892
|
-
/* @__PURE__ */ (0,
|
|
12893
|
-
/* @__PURE__ */ (0,
|
|
12894
|
-
|
|
12871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "p-2", children: [
|
|
12872
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "relative mb-2", children: [
|
|
12873
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12874
|
+
import_lucide_react48.Search,
|
|
12895
12875
|
{
|
|
12896
12876
|
"aria-hidden": "true",
|
|
12897
12877
|
className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[#9696B9]"
|
|
12898
12878
|
}
|
|
12899
12879
|
),
|
|
12900
|
-
/* @__PURE__ */ (0,
|
|
12880
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12901
12881
|
"input",
|
|
12902
12882
|
{
|
|
12903
12883
|
id: inputId,
|
|
@@ -12916,7 +12896,7 @@ function SearchableSelectContent({
|
|
|
12916
12896
|
}
|
|
12917
12897
|
)
|
|
12918
12898
|
] }),
|
|
12919
|
-
loading && options.length === 0 ? /* @__PURE__ */ (0,
|
|
12899
|
+
loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12920
12900
|
"div",
|
|
12921
12901
|
{
|
|
12922
12902
|
id: listboxId,
|
|
@@ -12925,7 +12905,7 @@ function SearchableSelectContent({
|
|
|
12925
12905
|
"aria-labelledby": labelId,
|
|
12926
12906
|
className: cn("overflow-y-auto outline-none", menuClassName),
|
|
12927
12907
|
style: { height: Math.min(height, rowCount * ROW_HEIGHT) },
|
|
12928
|
-
children: /* @__PURE__ */ (0,
|
|
12908
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12929
12909
|
"div",
|
|
12930
12910
|
{
|
|
12931
12911
|
className: "relative w-full",
|
|
@@ -12933,7 +12913,7 @@ function SearchableSelectContent({
|
|
|
12933
12913
|
children: virtualItems.map((virtualItem) => {
|
|
12934
12914
|
const option = options[virtualItem.index];
|
|
12935
12915
|
if (!option) {
|
|
12936
|
-
return /* @__PURE__ */ (0,
|
|
12916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12937
12917
|
"div",
|
|
12938
12918
|
{
|
|
12939
12919
|
className: "absolute left-0 top-0 flex w-full items-center px-4 text-base leading-6 text-[#6C6C6C]",
|
|
@@ -12948,7 +12928,7 @@ function SearchableSelectContent({
|
|
|
12948
12928
|
}
|
|
12949
12929
|
const isSelected = value?.value === option.value;
|
|
12950
12930
|
const isHighlighted = virtualItem.index === highlightedIndex;
|
|
12951
|
-
return /* @__PURE__ */ (0,
|
|
12931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
12952
12932
|
"button",
|
|
12953
12933
|
{
|
|
12954
12934
|
id: getOptionId(idPrefix, virtualItem.index),
|
|
@@ -12970,7 +12950,7 @@ function SearchableSelectContent({
|
|
|
12970
12950
|
height: `${virtualItem.size}px`,
|
|
12971
12951
|
transform: `translateY(${virtualItem.start}px)`
|
|
12972
12952
|
},
|
|
12973
|
-
children: /* @__PURE__ */ (0,
|
|
12953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "truncate text-center", children: String(option.label) })
|
|
12974
12954
|
},
|
|
12975
12955
|
`${String(option.value)}-${virtualItem.index}`
|
|
12976
12956
|
);
|
|
@@ -13129,7 +13109,6 @@ function getNextEnabledIndex(options, startIndex, step) {
|
|
|
13129
13109
|
LargeModal,
|
|
13130
13110
|
LearnMoreButton,
|
|
13131
13111
|
Link,
|
|
13132
|
-
Loader,
|
|
13133
13112
|
LoadingBar,
|
|
13134
13113
|
METRIC_CARD_VARIANTS,
|
|
13135
13114
|
MetricCard,
|