@chekinapp/ui 0.2.6 → 0.2.8
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 +940 -846
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +1038 -945
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
AirbnbSearchableSelect: () => AirbnbSearchableSelect,
|
|
45
45
|
AirbnbSelect: () => AirbnbSelect,
|
|
46
46
|
AirbnbSwitch: () => AirbnbSwitch,
|
|
47
|
+
AirbnbTimePicker: () => AirbnbTimePicker,
|
|
47
48
|
Alert: () => Alert,
|
|
48
49
|
AlertBox: () => AlertBox,
|
|
49
50
|
AlertDescription: () => AlertDescription,
|
|
@@ -8014,7 +8015,198 @@ function registerUiKitI18n(i18n, options = {}) {
|
|
|
8014
8015
|
|
|
8015
8016
|
// src/large-modal/LargeModal.tsx
|
|
8016
8017
|
var import_lucide_react17 = require("lucide-react");
|
|
8018
|
+
|
|
8019
|
+
// src/drawer/Drawer.tsx
|
|
8020
|
+
var React22 = __toESM(require("react"), 1);
|
|
8021
|
+
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
8022
|
+
var import_react_draggable = __toESM(require("react-draggable"), 1);
|
|
8017
8023
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8024
|
+
var DRAWER_CLOSE_THRESHOLD = 72;
|
|
8025
|
+
var DRAWER_MIN_OVERLAY_OPACITY = 0.1;
|
|
8026
|
+
function Drawer({ ...props }) {
|
|
8027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DialogPrimitive2.Root, { "data-slot": "drawer", ...props });
|
|
8028
|
+
}
|
|
8029
|
+
function DrawerTrigger({ ...props }) {
|
|
8030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DialogPrimitive2.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
8031
|
+
}
|
|
8032
|
+
function DrawerPortal({ ...props }) {
|
|
8033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DialogPrimitive2.Portal, { "data-slot": "drawer-portal", ...props });
|
|
8034
|
+
}
|
|
8035
|
+
function DrawerClose({ ...props }) {
|
|
8036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
|
|
8037
|
+
}
|
|
8038
|
+
var DrawerOverlay = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8039
|
+
DialogPrimitive2.Overlay,
|
|
8040
|
+
{
|
|
8041
|
+
ref,
|
|
8042
|
+
"data-slot": "drawer-overlay",
|
|
8043
|
+
className: cn(
|
|
8044
|
+
"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
8045
|
+
className
|
|
8046
|
+
),
|
|
8047
|
+
...props
|
|
8048
|
+
}
|
|
8049
|
+
));
|
|
8050
|
+
DrawerOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
8051
|
+
var DrawerOverlayClasses = "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0";
|
|
8052
|
+
var DrawerContent = React22.forwardRef(
|
|
8053
|
+
({
|
|
8054
|
+
className,
|
|
8055
|
+
children,
|
|
8056
|
+
container,
|
|
8057
|
+
onClose,
|
|
8058
|
+
showHandle = true,
|
|
8059
|
+
closeOnOverlayClick = true,
|
|
8060
|
+
lockScroll = true,
|
|
8061
|
+
disableDrag = false,
|
|
8062
|
+
...props
|
|
8063
|
+
}, ref) => {
|
|
8064
|
+
const finalContainer = container || getCustomContainer() || void 0;
|
|
8065
|
+
const nodeRef = React22.useRef(null);
|
|
8066
|
+
const [dragOffsetY, setDragOffsetY] = React22.useState(0);
|
|
8067
|
+
const overlayOpacity = Math.max(
|
|
8068
|
+
DRAWER_MIN_OVERLAY_OPACITY,
|
|
8069
|
+
1 - dragOffsetY / (DRAWER_CLOSE_THRESHOLD * 2)
|
|
8070
|
+
);
|
|
8071
|
+
const handleDrag = React22.useCallback(
|
|
8072
|
+
(_event, data) => {
|
|
8073
|
+
setDragOffsetY(Math.max(0, data.y));
|
|
8074
|
+
},
|
|
8075
|
+
[]
|
|
8076
|
+
);
|
|
8077
|
+
const handleStop = React22.useCallback(
|
|
8078
|
+
(_event, data) => {
|
|
8079
|
+
if (data.y > DRAWER_CLOSE_THRESHOLD) {
|
|
8080
|
+
setDragOffsetY(0);
|
|
8081
|
+
onClose?.();
|
|
8082
|
+
return;
|
|
8083
|
+
}
|
|
8084
|
+
setDragOffsetY(0);
|
|
8085
|
+
},
|
|
8086
|
+
[onClose]
|
|
8087
|
+
);
|
|
8088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(DrawerPortal, { container: finalContainer, children: [
|
|
8089
|
+
lockScroll ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8090
|
+
DrawerOverlay,
|
|
8091
|
+
{
|
|
8092
|
+
style: { opacity: overlayOpacity },
|
|
8093
|
+
onClick: closeOnOverlayClick ? onClose : void 0
|
|
8094
|
+
}
|
|
8095
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8096
|
+
"div",
|
|
8097
|
+
{
|
|
8098
|
+
className: cn(DrawerOverlayClasses),
|
|
8099
|
+
style: { opacity: overlayOpacity },
|
|
8100
|
+
onClick: closeOnOverlayClick ? onClose : void 0
|
|
8101
|
+
}
|
|
8102
|
+
),
|
|
8103
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8104
|
+
DialogPrimitive2.Content,
|
|
8105
|
+
{
|
|
8106
|
+
asChild: true,
|
|
8107
|
+
ref,
|
|
8108
|
+
onPointerDownOutside: (event) => {
|
|
8109
|
+
if (!closeOnOverlayClick) {
|
|
8110
|
+
event.preventDefault();
|
|
8111
|
+
}
|
|
8112
|
+
},
|
|
8113
|
+
onInteractOutside: (event) => {
|
|
8114
|
+
if (!closeOnOverlayClick) {
|
|
8115
|
+
event.preventDefault();
|
|
8116
|
+
}
|
|
8117
|
+
},
|
|
8118
|
+
...props,
|
|
8119
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "fixed inset-x-0 bottom-0 top-auto z-50 outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8120
|
+
import_react_draggable.default,
|
|
8121
|
+
{
|
|
8122
|
+
axis: "y",
|
|
8123
|
+
bounds: { top: 0 },
|
|
8124
|
+
handle: "[data-drawer-handle]",
|
|
8125
|
+
nodeRef,
|
|
8126
|
+
disabled: disableDrag,
|
|
8127
|
+
onDrag: handleDrag,
|
|
8128
|
+
onStop: handleStop,
|
|
8129
|
+
position: { x: 0, y: dragOffsetY },
|
|
8130
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
8131
|
+
"div",
|
|
8132
|
+
{
|
|
8133
|
+
ref: nodeRef,
|
|
8134
|
+
className: cn(
|
|
8135
|
+
"bg-[var(--modal-background)] flex max-h-[calc(100vh-1rem)] w-full flex-col rounded-t-[32px] shadow-lg",
|
|
8136
|
+
className
|
|
8137
|
+
),
|
|
8138
|
+
children: [
|
|
8139
|
+
showHandle && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8140
|
+
"div",
|
|
8141
|
+
{
|
|
8142
|
+
"data-drawer-handle": true,
|
|
8143
|
+
className: cn(
|
|
8144
|
+
"mx-auto flex h-8 w-24 touch-none items-center justify-center",
|
|
8145
|
+
disableDrag ? "cursor-default" : "cursor-grab active:cursor-grabbing"
|
|
8146
|
+
),
|
|
8147
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "block h-1.5 w-12 rounded-full bg-[#D9D7D3]" })
|
|
8148
|
+
}
|
|
8149
|
+
),
|
|
8150
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children })
|
|
8151
|
+
]
|
|
8152
|
+
}
|
|
8153
|
+
)
|
|
8154
|
+
}
|
|
8155
|
+
) })
|
|
8156
|
+
}
|
|
8157
|
+
)
|
|
8158
|
+
] });
|
|
8159
|
+
}
|
|
8160
|
+
);
|
|
8161
|
+
DrawerContent.displayName = DialogPrimitive2.Content.displayName;
|
|
8162
|
+
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8163
|
+
"div",
|
|
8164
|
+
{
|
|
8165
|
+
className: cn("flex flex-col gap-2 px-5 pt-2 text-center", className),
|
|
8166
|
+
...props
|
|
8167
|
+
}
|
|
8168
|
+
);
|
|
8169
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
8170
|
+
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
|
|
8171
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
8172
|
+
var DrawerTitle = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8173
|
+
DialogPrimitive2.Title,
|
|
8174
|
+
{
|
|
8175
|
+
ref,
|
|
8176
|
+
"data-slot": "drawer-title",
|
|
8177
|
+
className: cn("text-lg font-semibold leading-none", className),
|
|
8178
|
+
...props
|
|
8179
|
+
}
|
|
8180
|
+
));
|
|
8181
|
+
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
8182
|
+
var DrawerDescription = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8183
|
+
DialogPrimitive2.Description,
|
|
8184
|
+
{
|
|
8185
|
+
ref,
|
|
8186
|
+
"data-slot": "drawer-description",
|
|
8187
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
8188
|
+
...props
|
|
8189
|
+
}
|
|
8190
|
+
));
|
|
8191
|
+
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
8192
|
+
|
|
8193
|
+
// src/lib/device.ts
|
|
8194
|
+
var DEVICE = {
|
|
8195
|
+
mobileS: "320px",
|
|
8196
|
+
mobileM: "375px",
|
|
8197
|
+
mobileL: "425px",
|
|
8198
|
+
mobileXL: "479px",
|
|
8199
|
+
tablet: "768px",
|
|
8200
|
+
laptop: "1025px",
|
|
8201
|
+
laptopM: "1126px",
|
|
8202
|
+
laptopML: "1300px",
|
|
8203
|
+
laptopL: "1440px",
|
|
8204
|
+
laptopXL: "1640px",
|
|
8205
|
+
desktop: "2560px"
|
|
8206
|
+
};
|
|
8207
|
+
|
|
8208
|
+
// src/large-modal/LargeModal.tsx
|
|
8209
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8018
8210
|
function LargeModal({
|
|
8019
8211
|
open,
|
|
8020
8212
|
onOpenChange,
|
|
@@ -8023,15 +8215,61 @@ function LargeModal({
|
|
|
8023
8215
|
subHeader,
|
|
8024
8216
|
screenReaderText,
|
|
8025
8217
|
className,
|
|
8218
|
+
drawerClassName,
|
|
8026
8219
|
footer,
|
|
8027
8220
|
container,
|
|
8028
8221
|
withCloseButton = true,
|
|
8029
8222
|
closeOnDocumentClick = true,
|
|
8030
8223
|
closeOnEscape = true,
|
|
8031
|
-
allowContentOverflow = false
|
|
8224
|
+
allowContentOverflow = false,
|
|
8225
|
+
showDrawerHandle = true,
|
|
8226
|
+
disableDrag = false
|
|
8032
8227
|
}) {
|
|
8033
8228
|
const portalContainer = container ?? getCustomContainer();
|
|
8034
|
-
|
|
8229
|
+
const { isMatch: isMobile3 } = useScreenResize(DEVICE.tablet);
|
|
8230
|
+
const isMobileMode = isMobile3 && isMobileModalModeAvailable();
|
|
8231
|
+
if (isMobileMode) {
|
|
8232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
8233
|
+
DrawerContent,
|
|
8234
|
+
{
|
|
8235
|
+
onClose: () => onOpenChange?.(false),
|
|
8236
|
+
showHandle: showDrawerHandle,
|
|
8237
|
+
closeOnOverlayClick: closeOnDocumentClick,
|
|
8238
|
+
disableDrag,
|
|
8239
|
+
container: portalContainer || void 0,
|
|
8240
|
+
lockScroll: !portalContainer,
|
|
8241
|
+
onEscapeKeyDown: (event) => {
|
|
8242
|
+
if (!closeOnEscape) {
|
|
8243
|
+
event.preventDefault();
|
|
8244
|
+
event.stopPropagation();
|
|
8245
|
+
}
|
|
8246
|
+
},
|
|
8247
|
+
className: cn("bg-[var(--chekin-color-white)]", className, drawerClassName),
|
|
8248
|
+
children: [
|
|
8249
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DrawerHeader, { className: "sticky top-0 z-10 flex-shrink-0 flex-row items-center justify-between border-b border-[var(--chekin-border-default)] bg-[var(--chekin-color-white)] px-6 pb-4 text-left", children: [
|
|
8250
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
8251
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DrawerTitle, { className: "text-lg font-semibold text-[var(--chekin-color-brand-navy)]", children: header }),
|
|
8252
|
+
subHeader && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { children: subHeader })
|
|
8253
|
+
] }),
|
|
8254
|
+
!showDrawerHandle && withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8255
|
+
"button",
|
|
8256
|
+
{
|
|
8257
|
+
type: "button",
|
|
8258
|
+
onClick: () => onOpenChange?.(false),
|
|
8259
|
+
className: "rounded-full p-1 text-[var(--chekin-color-brand-navy)] hover:bg-[var(--chekin-color-surface-input-empty)]",
|
|
8260
|
+
"aria-label": "Close",
|
|
8261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react17.X, { className: "h-5 w-5" })
|
|
8262
|
+
}
|
|
8263
|
+
),
|
|
8264
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DrawerDescription, { className: "sr-only", children: screenReaderText })
|
|
8265
|
+
] }),
|
|
8266
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "min-h-0 flex-1 space-y-6 overflow-y-auto px-6 py-6", children }),
|
|
8267
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DrawerFooter, { className: "p-4", children: footer })
|
|
8268
|
+
]
|
|
8269
|
+
}
|
|
8270
|
+
) });
|
|
8271
|
+
}
|
|
8272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
8035
8273
|
DialogContent,
|
|
8036
8274
|
{
|
|
8037
8275
|
showCloseButton: false,
|
|
@@ -8055,24 +8293,24 @@ function LargeModal({
|
|
|
8055
8293
|
}
|
|
8056
8294
|
},
|
|
8057
8295
|
children: [
|
|
8058
|
-
/* @__PURE__ */ (0,
|
|
8059
|
-
/* @__PURE__ */ (0,
|
|
8060
|
-
/* @__PURE__ */ (0,
|
|
8061
|
-
subHeader && /* @__PURE__ */ (0,
|
|
8296
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(DialogHeader, { className: "flex-shrink-0 flex-row items-center justify-between rounded-t-2xl border-b border-[var(--chekin-border-default)] bg-[var(--chekin-color-white)] p-6", children: [
|
|
8297
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { children: [
|
|
8298
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DialogTitle, { className: "text-lg font-semibold text-[var(--chekin-color-brand-navy)]", children: header }),
|
|
8299
|
+
subHeader && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { children: subHeader })
|
|
8062
8300
|
] }),
|
|
8063
|
-
withCloseButton && /* @__PURE__ */ (0,
|
|
8301
|
+
withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8064
8302
|
"button",
|
|
8065
8303
|
{
|
|
8066
8304
|
type: "button",
|
|
8067
8305
|
onClick: () => onOpenChange?.(false),
|
|
8068
8306
|
className: "rounded-full p-1 text-[var(--chekin-color-brand-navy)] hover:bg-[var(--chekin-color-surface-input-empty)]",
|
|
8069
8307
|
"aria-label": "Close",
|
|
8070
|
-
children: /* @__PURE__ */ (0,
|
|
8308
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react17.X, { className: "h-5 w-5" })
|
|
8071
8309
|
}
|
|
8072
8310
|
),
|
|
8073
|
-
/* @__PURE__ */ (0,
|
|
8311
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DialogDescription, { className: "sr-only", children: screenReaderText })
|
|
8074
8312
|
] }),
|
|
8075
|
-
/* @__PURE__ */ (0,
|
|
8313
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
8076
8314
|
"div",
|
|
8077
8315
|
{
|
|
8078
8316
|
className: cn(
|
|
@@ -8082,7 +8320,7 @@ function LargeModal({
|
|
|
8082
8320
|
children
|
|
8083
8321
|
}
|
|
8084
8322
|
),
|
|
8085
|
-
footer && /* @__PURE__ */ (0,
|
|
8323
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DialogFooter, { className: "p-4", children: footer })
|
|
8086
8324
|
]
|
|
8087
8325
|
}
|
|
8088
8326
|
) });
|
|
@@ -8091,20 +8329,20 @@ function LargeModal({
|
|
|
8091
8329
|
// src/learn-more-button/LearnMoreButton.tsx
|
|
8092
8330
|
var import_lucide_react18 = require("lucide-react");
|
|
8093
8331
|
var import_react_i18next9 = require("react-i18next");
|
|
8094
|
-
var
|
|
8332
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8095
8333
|
function LearnMoreButton({ label, ...props }) {
|
|
8096
8334
|
const { t } = (0, import_react_i18next9.useTranslation)();
|
|
8097
|
-
return /* @__PURE__ */ (0,
|
|
8098
|
-
/* @__PURE__ */ (0,
|
|
8335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Button, { variant: "link", ...props, children: [
|
|
8336
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react18.BookOpenIcon, { className: "size-5 text-[var(--button-link-text)]" }),
|
|
8099
8337
|
label || t("learn_more")
|
|
8100
8338
|
] });
|
|
8101
8339
|
}
|
|
8102
8340
|
|
|
8103
8341
|
// src/link/Link.tsx
|
|
8104
8342
|
var import_react53 = require("react");
|
|
8105
|
-
var
|
|
8343
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8106
8344
|
var LinkInternal = (0, import_react53.forwardRef)(
|
|
8107
|
-
({ disabled = false, className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8345
|
+
({ disabled = false, className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
8108
8346
|
"a",
|
|
8109
8347
|
{
|
|
8110
8348
|
ref,
|
|
@@ -8128,7 +8366,7 @@ var Link = (0, import_react53.memo)(LinkInternal);
|
|
|
8128
8366
|
var import_react54 = require("react");
|
|
8129
8367
|
var import_lucide_react19 = require("lucide-react");
|
|
8130
8368
|
var import_react_i18next10 = require("react-i18next");
|
|
8131
|
-
var
|
|
8369
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8132
8370
|
function ImageFullScreenView({ src, alt, onClose }) {
|
|
8133
8371
|
const { t } = (0, import_react_i18next10.useTranslation)();
|
|
8134
8372
|
const [scale, setScale] = (0, import_react54.useState)(1);
|
|
@@ -8137,9 +8375,9 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8137
8375
|
const zoomIn = () => setScale((value) => Math.min(value + 0.25, 3));
|
|
8138
8376
|
const zoomOut = () => setScale((value) => Math.max(value - 0.25, 0.5));
|
|
8139
8377
|
const rotate = () => setRotation((value) => (value + 90) % 360);
|
|
8140
|
-
return /* @__PURE__ */ (0,
|
|
8141
|
-
/* @__PURE__ */ (0,
|
|
8142
|
-
/* @__PURE__ */ (0,
|
|
8378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "fixed inset-0 z-[300] flex flex-col items-center justify-center bg-black/90", children: [
|
|
8379
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "absolute right-4 top-4 z-[301] flex gap-2", children: [
|
|
8380
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8143
8381
|
Button,
|
|
8144
8382
|
{
|
|
8145
8383
|
variant: "ghost",
|
|
@@ -8147,10 +8385,10 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8147
8385
|
onClick: zoomIn,
|
|
8148
8386
|
className: "rounded-full text-white hover:bg-white/20",
|
|
8149
8387
|
"aria-label": t("zoom_in"),
|
|
8150
|
-
children: /* @__PURE__ */ (0,
|
|
8388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react19.ZoomIn, { className: "h-6 w-6" })
|
|
8151
8389
|
}
|
|
8152
8390
|
),
|
|
8153
|
-
/* @__PURE__ */ (0,
|
|
8391
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8154
8392
|
Button,
|
|
8155
8393
|
{
|
|
8156
8394
|
variant: "ghost",
|
|
@@ -8158,10 +8396,10 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8158
8396
|
onClick: zoomOut,
|
|
8159
8397
|
className: "rounded-full text-white hover:bg-white/20",
|
|
8160
8398
|
"aria-label": t("zoom_out"),
|
|
8161
|
-
children: /* @__PURE__ */ (0,
|
|
8399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react19.ZoomOut, { className: "h-6 w-6" })
|
|
8162
8400
|
}
|
|
8163
8401
|
),
|
|
8164
|
-
/* @__PURE__ */ (0,
|
|
8402
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8165
8403
|
Button,
|
|
8166
8404
|
{
|
|
8167
8405
|
variant: "ghost",
|
|
@@ -8169,10 +8407,10 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8169
8407
|
onClick: rotate,
|
|
8170
8408
|
className: "rounded-full text-white hover:bg-white/20",
|
|
8171
8409
|
"aria-label": t("rotate"),
|
|
8172
|
-
children: /* @__PURE__ */ (0,
|
|
8410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react19.RotateCw, { className: "h-6 w-6" })
|
|
8173
8411
|
}
|
|
8174
8412
|
),
|
|
8175
|
-
/* @__PURE__ */ (0,
|
|
8413
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8176
8414
|
Button,
|
|
8177
8415
|
{
|
|
8178
8416
|
variant: "ghost",
|
|
@@ -8180,11 +8418,11 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8180
8418
|
onClick: onClose,
|
|
8181
8419
|
className: "rounded-full text-white hover:bg-white/20",
|
|
8182
8420
|
"aria-label": t("close"),
|
|
8183
|
-
children: /* @__PURE__ */ (0,
|
|
8421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react19.X, { className: "h-6 w-6" })
|
|
8184
8422
|
}
|
|
8185
8423
|
)
|
|
8186
8424
|
] }),
|
|
8187
|
-
/* @__PURE__ */ (0,
|
|
8425
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8188
8426
|
"div",
|
|
8189
8427
|
{
|
|
8190
8428
|
className: "flex h-full w-full cursor-move items-center justify-center overflow-hidden",
|
|
@@ -8193,7 +8431,7 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8193
8431
|
onClose();
|
|
8194
8432
|
}
|
|
8195
8433
|
},
|
|
8196
|
-
children: /* @__PURE__ */ (0,
|
|
8434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8197
8435
|
"div",
|
|
8198
8436
|
{
|
|
8199
8437
|
style: {
|
|
@@ -8201,7 +8439,7 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8201
8439
|
transition: "transform 0.2s ease-in-out"
|
|
8202
8440
|
},
|
|
8203
8441
|
className: "max-h-[90%] max-w-[90%]",
|
|
8204
|
-
children: /* @__PURE__ */ (0,
|
|
8442
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
8205
8443
|
Image2,
|
|
8206
8444
|
{
|
|
8207
8445
|
src: src || "",
|
|
@@ -8215,14 +8453,14 @@ function ImageFullScreenView({ src, alt, onClose }) {
|
|
|
8215
8453
|
)
|
|
8216
8454
|
}
|
|
8217
8455
|
),
|
|
8218
|
-
/* @__PURE__ */ (0,
|
|
8456
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "absolute bottom-4 left-0 right-0 text-center text-sm text-white/70", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { children: t("esc_to_close") }) })
|
|
8219
8457
|
] });
|
|
8220
8458
|
}
|
|
8221
8459
|
|
|
8222
8460
|
// src/modal/Modal.tsx
|
|
8223
8461
|
var import_react55 = require("react");
|
|
8224
8462
|
var import_lucide_react20 = require("lucide-react");
|
|
8225
|
-
var
|
|
8463
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8226
8464
|
var preventDefault = (event) => {
|
|
8227
8465
|
event.preventDefault();
|
|
8228
8466
|
};
|
|
@@ -8256,7 +8494,7 @@ function Modal({
|
|
|
8256
8494
|
onOpenChange?.(false);
|
|
8257
8495
|
onClose?.();
|
|
8258
8496
|
};
|
|
8259
|
-
return /* @__PURE__ */ (0,
|
|
8497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Dialog, { open, onOpenChange, modal, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
8260
8498
|
DialogContent,
|
|
8261
8499
|
{
|
|
8262
8500
|
ref: contentRef,
|
|
@@ -8275,7 +8513,7 @@ function Modal({
|
|
|
8275
8513
|
lockScroll,
|
|
8276
8514
|
...!text && { "aria-describedby": void 0 },
|
|
8277
8515
|
children: [
|
|
8278
|
-
withCloseButton && /* @__PURE__ */ (0,
|
|
8516
|
+
withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8279
8517
|
"button",
|
|
8280
8518
|
{
|
|
8281
8519
|
type: "button",
|
|
@@ -8285,14 +8523,14 @@ function Modal({
|
|
|
8285
8523
|
"absolute right-4 top-4 z-10 rounded-full p-1 text-[var(--chekin-color-brand-blue)] hover:bg-[var(--chekin-neutral-50)]"
|
|
8286
8524
|
),
|
|
8287
8525
|
"aria-label": "Close",
|
|
8288
|
-
children: /* @__PURE__ */ (0,
|
|
8526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react20.X, { className: "h-5 w-5" })
|
|
8289
8527
|
}
|
|
8290
8528
|
),
|
|
8291
|
-
(icon || iconSrc || iconProps?.src) && /* @__PURE__ */ (0,
|
|
8292
|
-
title ? /* @__PURE__ */ (0,
|
|
8293
|
-
text && /* @__PURE__ */ (0,
|
|
8529
|
+
(icon || iconSrc || iconProps?.src) && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: cn("modal__icon mx-auto mt-4 select-none", iconClassName), children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("img", { src: iconSrc, alt: iconAlt ?? "", ...iconProps }) }),
|
|
8530
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(DialogTitle, { className: cn("modal__title", "px-6 font-bold"), children: title }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(DialogVisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(DialogTitle, { children: "Dialog" }) }),
|
|
8531
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(DialogDescription, { className: cn("modal__text", "text-base"), children: text }),
|
|
8294
8532
|
children,
|
|
8295
|
-
buttons && /* @__PURE__ */ (0,
|
|
8533
|
+
buttons && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8296
8534
|
"div",
|
|
8297
8535
|
{
|
|
8298
8536
|
className: cn(
|
|
@@ -8307,7 +8545,7 @@ function Modal({
|
|
|
8307
8545
|
) });
|
|
8308
8546
|
}
|
|
8309
8547
|
var ModalButton = (0, import_react55.forwardRef)(
|
|
8310
|
-
({ children, size, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
8548
|
+
({ children, size, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8311
8549
|
Button,
|
|
8312
8550
|
{
|
|
8313
8551
|
ref,
|
|
@@ -8326,7 +8564,7 @@ var import_react57 = require("react");
|
|
|
8326
8564
|
|
|
8327
8565
|
// src/circular-loader/CircularLoader.tsx
|
|
8328
8566
|
var import_react56 = __toESM(require("react"), 1);
|
|
8329
|
-
var
|
|
8567
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
8330
8568
|
var loaderSizePixels = {
|
|
8331
8569
|
sm: 16,
|
|
8332
8570
|
md: 32,
|
|
@@ -8352,7 +8590,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8352
8590
|
className
|
|
8353
8591
|
}) => {
|
|
8354
8592
|
if (!visible) return null;
|
|
8355
|
-
return /* @__PURE__ */ (0,
|
|
8593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8356
8594
|
"div",
|
|
8357
8595
|
{
|
|
8358
8596
|
className: cn(
|
|
@@ -8362,7 +8600,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8362
8600
|
),
|
|
8363
8601
|
role: "progressbar",
|
|
8364
8602
|
children: [
|
|
8365
|
-
/* @__PURE__ */ (0,
|
|
8603
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8366
8604
|
"svg",
|
|
8367
8605
|
{
|
|
8368
8606
|
viewBox: "25 25 50 50",
|
|
@@ -8372,7 +8610,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8372
8610
|
height: toCssSize(height ?? width ?? loaderSizePixels[size])
|
|
8373
8611
|
},
|
|
8374
8612
|
children: [
|
|
8375
|
-
/* @__PURE__ */ (0,
|
|
8613
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8376
8614
|
"circle",
|
|
8377
8615
|
{
|
|
8378
8616
|
r: "20",
|
|
@@ -8382,7 +8620,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8382
8620
|
strokeWidth: "7"
|
|
8383
8621
|
}
|
|
8384
8622
|
),
|
|
8385
|
-
/* @__PURE__ */ (0,
|
|
8623
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8386
8624
|
"circle",
|
|
8387
8625
|
{
|
|
8388
8626
|
r: "20",
|
|
@@ -8394,7 +8632,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8394
8632
|
strokeLinecap: "round",
|
|
8395
8633
|
strokeWidth: "7",
|
|
8396
8634
|
children: [
|
|
8397
|
-
/* @__PURE__ */ (0,
|
|
8635
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8398
8636
|
"animateTransform",
|
|
8399
8637
|
{
|
|
8400
8638
|
attributeName: "transform",
|
|
@@ -8405,7 +8643,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8405
8643
|
type: "rotate"
|
|
8406
8644
|
}
|
|
8407
8645
|
),
|
|
8408
|
-
/* @__PURE__ */ (0,
|
|
8646
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8409
8647
|
"animate",
|
|
8410
8648
|
{
|
|
8411
8649
|
attributeName: "stroke-dasharray",
|
|
@@ -8417,7 +8655,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8417
8655
|
values: "1 200;90 200;90 200"
|
|
8418
8656
|
}
|
|
8419
8657
|
),
|
|
8420
|
-
/* @__PURE__ */ (0,
|
|
8658
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8421
8659
|
"animate",
|
|
8422
8660
|
{
|
|
8423
8661
|
attributeName: "stroke-dashoffset",
|
|
@@ -8435,7 +8673,7 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8435
8673
|
]
|
|
8436
8674
|
}
|
|
8437
8675
|
),
|
|
8438
|
-
label && /* @__PURE__ */ (0,
|
|
8676
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8439
8677
|
"div",
|
|
8440
8678
|
{
|
|
8441
8679
|
className: cn(
|
|
@@ -8453,8 +8691,8 @@ var CircularLoader = import_react56.default.memo(
|
|
|
8453
8691
|
CircularLoader.displayName = "CircularLoader";
|
|
8454
8692
|
|
|
8455
8693
|
// src/modal-loader/ModalLoader.tsx
|
|
8456
|
-
var
|
|
8457
|
-
var ModalLoader = (0, import_react57.memo)(({ visible, className }) => /* @__PURE__ */ (0,
|
|
8694
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8695
|
+
var ModalLoader = (0, import_react57.memo)(({ visible, className }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8458
8696
|
"div",
|
|
8459
8697
|
{
|
|
8460
8698
|
className: cn(
|
|
@@ -8462,17 +8700,17 @@ var ModalLoader = (0, import_react57.memo)(({ visible, className }) => /* @__PUR
|
|
|
8462
8700
|
visible ? "flex" : "hidden",
|
|
8463
8701
|
className
|
|
8464
8702
|
),
|
|
8465
|
-
children: /* @__PURE__ */ (0,
|
|
8703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "mb-[60px]", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(CircularLoader, { size: "lg", className: "[--circular-loader-color:#475569]" }) })
|
|
8466
8704
|
}
|
|
8467
8705
|
));
|
|
8468
8706
|
ModalLoader.displayName = "ModalLoader";
|
|
8469
8707
|
|
|
8470
8708
|
// src/numbered-list/NumberedList.tsx
|
|
8471
8709
|
var import_react58 = require("react");
|
|
8472
|
-
var
|
|
8710
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8473
8711
|
var NumberedList = ({ children, className, itemClassName }) => {
|
|
8474
8712
|
const items = Array.isArray(children) ? import_react58.Children.toArray(children) : [children];
|
|
8475
|
-
return /* @__PURE__ */ (0,
|
|
8713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8476
8714
|
"ol",
|
|
8477
8715
|
{
|
|
8478
8716
|
className: cn(
|
|
@@ -8480,7 +8718,7 @@ var NumberedList = ({ children, className, itemClassName }) => {
|
|
|
8480
8718
|
className
|
|
8481
8719
|
),
|
|
8482
8720
|
type: "1",
|
|
8483
|
-
children: items.map((child, index) => /* @__PURE__ */ (0,
|
|
8721
|
+
children: items.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8484
8722
|
"li",
|
|
8485
8723
|
{
|
|
8486
8724
|
className: cn(
|
|
@@ -8491,7 +8729,7 @@ var NumberedList = ({ children, className, itemClassName }) => {
|
|
|
8491
8729
|
before:text-[var(--numbered-list-marker-text)] before:content-[counter(item)]`,
|
|
8492
8730
|
itemClassName
|
|
8493
8731
|
),
|
|
8494
|
-
children: /* @__PURE__ */ (0,
|
|
8732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: child })
|
|
8495
8733
|
},
|
|
8496
8734
|
index
|
|
8497
8735
|
))
|
|
@@ -8501,7 +8739,7 @@ var NumberedList = ({ children, className, itemClassName }) => {
|
|
|
8501
8739
|
|
|
8502
8740
|
// src/overlay-loader/OverlayLoader.tsx
|
|
8503
8741
|
var import_react_i18next11 = require("react-i18next");
|
|
8504
|
-
var
|
|
8742
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8505
8743
|
function OverlayLoader({
|
|
8506
8744
|
isLoading,
|
|
8507
8745
|
children,
|
|
@@ -8513,16 +8751,16 @@ function OverlayLoader({
|
|
|
8513
8751
|
}) {
|
|
8514
8752
|
const { t } = (0, import_react_i18next11.useTranslation)();
|
|
8515
8753
|
const resolvedLabel = label || t("loading");
|
|
8516
|
-
return /* @__PURE__ */ (0,
|
|
8754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: cn("relative", className), children: [
|
|
8517
8755
|
children,
|
|
8518
|
-
isLoading && /* @__PURE__ */ (0,
|
|
8756
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8519
8757
|
"div",
|
|
8520
8758
|
{
|
|
8521
8759
|
className: cn(
|
|
8522
8760
|
"absolute inset-0 flex items-center justify-center bg-[rgb(255_255_255_/_0.6)]",
|
|
8523
8761
|
overlayClassName
|
|
8524
8762
|
),
|
|
8525
|
-
children: /* @__PURE__ */ (0,
|
|
8763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8526
8764
|
CircularLoader,
|
|
8527
8765
|
{
|
|
8528
8766
|
size: loaderSize,
|
|
@@ -8543,10 +8781,10 @@ var import_lucide_react23 = require("lucide-react");
|
|
|
8543
8781
|
var import_react59 = require("react");
|
|
8544
8782
|
|
|
8545
8783
|
// src/legacy-fields/select/components.tsx
|
|
8546
|
-
var
|
|
8784
|
+
var React24 = __toESM(require("react"), 1);
|
|
8547
8785
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
8548
8786
|
var import_lucide_react21 = require("lucide-react");
|
|
8549
|
-
var
|
|
8787
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
8550
8788
|
var LegacySelectRoot = SelectPrimitive.Root;
|
|
8551
8789
|
var LegacySelectGroup = SelectPrimitive.Group;
|
|
8552
8790
|
var LegacySelectValue = SelectPrimitive.Value;
|
|
@@ -8555,7 +8793,7 @@ var selectSizeClassNames = {
|
|
|
8555
8793
|
sm: "text-sm",
|
|
8556
8794
|
md: "text-base"
|
|
8557
8795
|
};
|
|
8558
|
-
var LegacySelectTrigger =
|
|
8796
|
+
var LegacySelectTrigger = React24.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
8559
8797
|
SelectPrimitive.Trigger,
|
|
8560
8798
|
{
|
|
8561
8799
|
ref,
|
|
@@ -8570,7 +8808,7 @@ var LegacySelectTrigger = React23.forwardRef(({ className, children, size = "sm"
|
|
|
8570
8808
|
...props,
|
|
8571
8809
|
children: [
|
|
8572
8810
|
children,
|
|
8573
|
-
/* @__PURE__ */ (0,
|
|
8811
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8574
8812
|
import_lucide_react21.ChevronDownIcon,
|
|
8575
8813
|
{
|
|
8576
8814
|
size: 16,
|
|
@@ -8582,27 +8820,27 @@ var LegacySelectTrigger = React23.forwardRef(({ className, children, size = "sm"
|
|
|
8582
8820
|
}
|
|
8583
8821
|
));
|
|
8584
8822
|
LegacySelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
8585
|
-
var LegacySelectScrollUpButton =
|
|
8823
|
+
var LegacySelectScrollUpButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8586
8824
|
SelectPrimitive.ScrollUpButton,
|
|
8587
8825
|
{
|
|
8588
8826
|
ref,
|
|
8589
8827
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
8590
8828
|
...props,
|
|
8591
|
-
children: /* @__PURE__ */ (0,
|
|
8829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react21.ChevronUpIcon, { size: 16, strokeWidth: 2 })
|
|
8592
8830
|
}
|
|
8593
8831
|
));
|
|
8594
8832
|
LegacySelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
8595
|
-
var LegacySelectScrollDownButton =
|
|
8833
|
+
var LegacySelectScrollDownButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8596
8834
|
SelectPrimitive.ScrollDownButton,
|
|
8597
8835
|
{
|
|
8598
8836
|
ref,
|
|
8599
8837
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
8600
8838
|
...props,
|
|
8601
|
-
children: /* @__PURE__ */ (0,
|
|
8839
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react21.ChevronDownIcon, { size: 16, strokeWidth: 2 })
|
|
8602
8840
|
}
|
|
8603
8841
|
));
|
|
8604
8842
|
LegacySelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
8605
|
-
var LegacySelectContent =
|
|
8843
|
+
var LegacySelectContent = React24.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
8606
8844
|
SelectPrimitive.Content,
|
|
8607
8845
|
{
|
|
8608
8846
|
ref,
|
|
@@ -8620,8 +8858,8 @@ var LegacySelectContent = React23.forwardRef(({ className, children, position =
|
|
|
8620
8858
|
position,
|
|
8621
8859
|
...props,
|
|
8622
8860
|
children: [
|
|
8623
|
-
/* @__PURE__ */ (0,
|
|
8624
|
-
/* @__PURE__ */ (0,
|
|
8861
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(LegacySelectScrollUpButton, {}),
|
|
8862
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8625
8863
|
SelectPrimitive.Viewport,
|
|
8626
8864
|
{
|
|
8627
8865
|
className: cn(
|
|
@@ -8631,12 +8869,12 @@ var LegacySelectContent = React23.forwardRef(({ className, children, position =
|
|
|
8631
8869
|
children
|
|
8632
8870
|
}
|
|
8633
8871
|
),
|
|
8634
|
-
/* @__PURE__ */ (0,
|
|
8872
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(LegacySelectScrollDownButton, {})
|
|
8635
8873
|
]
|
|
8636
8874
|
}
|
|
8637
8875
|
) }));
|
|
8638
8876
|
LegacySelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
8639
|
-
var LegacySelectLabel =
|
|
8877
|
+
var LegacySelectLabel = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8640
8878
|
SelectPrimitive.Label,
|
|
8641
8879
|
{
|
|
8642
8880
|
ref,
|
|
@@ -8648,7 +8886,7 @@ var LegacySelectLabel = React23.forwardRef(({ className, ...props }, ref) => /*
|
|
|
8648
8886
|
}
|
|
8649
8887
|
));
|
|
8650
8888
|
LegacySelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
8651
|
-
var LegacySelectItem =
|
|
8889
|
+
var LegacySelectItem = React24.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
8652
8890
|
SelectPrimitive.Item,
|
|
8653
8891
|
{
|
|
8654
8892
|
ref,
|
|
@@ -8662,13 +8900,13 @@ var LegacySelectItem = React23.forwardRef(({ className, children, size = "sm", .
|
|
|
8662
8900
|
),
|
|
8663
8901
|
...props,
|
|
8664
8902
|
children: [
|
|
8665
|
-
/* @__PURE__ */ (0,
|
|
8666
|
-
/* @__PURE__ */ (0,
|
|
8903
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react21.CheckIcon, { size: 16, strokeWidth: 2 }) }) }),
|
|
8904
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SelectPrimitive.ItemText, { children })
|
|
8667
8905
|
]
|
|
8668
8906
|
}
|
|
8669
8907
|
));
|
|
8670
8908
|
LegacySelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
8671
|
-
var LegacySelectSeparator =
|
|
8909
|
+
var LegacySelectSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8672
8910
|
SelectPrimitive.Separator,
|
|
8673
8911
|
{
|
|
8674
8912
|
ref,
|
|
@@ -8679,7 +8917,7 @@ var LegacySelectSeparator = React23.forwardRef(({ className, ...props }, ref) =>
|
|
|
8679
8917
|
LegacySelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
8680
8918
|
|
|
8681
8919
|
// src/legacy-fields/select/Select.tsx
|
|
8682
|
-
var
|
|
8920
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
8683
8921
|
var LegacySelectInner = ({
|
|
8684
8922
|
placeholder,
|
|
8685
8923
|
label,
|
|
@@ -8707,8 +8945,8 @@ var LegacySelectInner = ({
|
|
|
8707
8945
|
const handleOpenChange = (open) => {
|
|
8708
8946
|
setIsOpen(open);
|
|
8709
8947
|
};
|
|
8710
|
-
return /* @__PURE__ */ (0,
|
|
8711
|
-
label && showLabel && /* @__PURE__ */ (0,
|
|
8948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: cn("group relative w-[300px]", className, containerClassName), children: [
|
|
8949
|
+
label && showLabel && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8712
8950
|
"label",
|
|
8713
8951
|
{
|
|
8714
8952
|
htmlFor: id,
|
|
@@ -8716,7 +8954,7 @@ var LegacySelectInner = ({
|
|
|
8716
8954
|
children: label
|
|
8717
8955
|
}
|
|
8718
8956
|
),
|
|
8719
|
-
/* @__PURE__ */ (0,
|
|
8957
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
8720
8958
|
LegacySelectRoot,
|
|
8721
8959
|
{
|
|
8722
8960
|
value,
|
|
@@ -8724,8 +8962,8 @@ var LegacySelectInner = ({
|
|
|
8724
8962
|
onOpenChange: handleOpenChange,
|
|
8725
8963
|
disabled,
|
|
8726
8964
|
children: [
|
|
8727
|
-
/* @__PURE__ */ (0,
|
|
8728
|
-
/* @__PURE__ */ (0,
|
|
8965
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LegacySelectTrigger, { id, ref, size, className: triggerClassName, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LegacySelectValue, { placeholder }) }),
|
|
8966
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(LegacySelectContent, { children: children ?? options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8729
8967
|
LegacySelectItem,
|
|
8730
8968
|
{
|
|
8731
8969
|
value: String(option.value),
|
|
@@ -8738,9 +8976,9 @@ var LegacySelectInner = ({
|
|
|
8738
8976
|
]
|
|
8739
8977
|
}
|
|
8740
8978
|
),
|
|
8741
|
-
Boolean(supportingText || errorText) && /* @__PURE__ */ (0,
|
|
8742
|
-
supportingText && !errorText && /* @__PURE__ */ (0,
|
|
8743
|
-
errorText && /* @__PURE__ */ (0,
|
|
8979
|
+
Boolean(supportingText || errorText) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex min-h-[15px] justify-between pt-1", children: [
|
|
8980
|
+
supportingText && !errorText && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-xs italic leading-[15px] text-[var(--chekin-color-gray-1)]", children: supportingText }),
|
|
8981
|
+
errorText && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ml-auto text-right text-xs font-medium leading-4 text-[var(--error-message-color)]", children: errorText })
|
|
8744
8982
|
] })
|
|
8745
8983
|
] });
|
|
8746
8984
|
};
|
|
@@ -8752,7 +8990,7 @@ var LegacySelect = LegacySelectForward;
|
|
|
8752
8990
|
var SelectPrimitive2 = __toESM(require("@radix-ui/react-select"), 1);
|
|
8753
8991
|
var import_lucide_react22 = require("lucide-react");
|
|
8754
8992
|
var import_react60 = require("react");
|
|
8755
|
-
var
|
|
8993
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
8756
8994
|
var LegacyMultiSelectInner = ({
|
|
8757
8995
|
label,
|
|
8758
8996
|
value = [],
|
|
@@ -8779,8 +9017,8 @@ var LegacyMultiSelectInner = ({
|
|
|
8779
9017
|
return value.some((v) => String(v) === String(optionValue));
|
|
8780
9018
|
};
|
|
8781
9019
|
const displayText = value.length > 0 ? `${value.length} selected` : placeholder || "Select options";
|
|
8782
|
-
return /* @__PURE__ */ (0,
|
|
8783
|
-
label && showLabel && /* @__PURE__ */ (0,
|
|
9020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { ref, className: cn("group relative w-[300px]", className), children: [
|
|
9021
|
+
label && showLabel && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8784
9022
|
"label",
|
|
8785
9023
|
{
|
|
8786
9024
|
htmlFor: id,
|
|
@@ -8788,7 +9026,7 @@ var LegacyMultiSelectInner = ({
|
|
|
8788
9026
|
children: label
|
|
8789
9027
|
}
|
|
8790
9028
|
),
|
|
8791
|
-
/* @__PURE__ */ (0,
|
|
9029
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
8792
9030
|
SelectPrimitive2.Root,
|
|
8793
9031
|
{
|
|
8794
9032
|
open,
|
|
@@ -8796,11 +9034,11 @@ var LegacyMultiSelectInner = ({
|
|
|
8796
9034
|
value: "",
|
|
8797
9035
|
disabled,
|
|
8798
9036
|
children: [
|
|
8799
|
-
/* @__PURE__ */ (0,
|
|
8800
|
-
/* @__PURE__ */ (0,
|
|
9037
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(LegacySelectTrigger, { id, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "text-sm", children: displayText }) }),
|
|
9038
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(LegacySelectContent, { children: options?.map(({ value: optionValue, label: optionLabel }) => {
|
|
8801
9039
|
const stringValue = String(optionValue);
|
|
8802
9040
|
const selected = isSelected(optionValue);
|
|
8803
|
-
return /* @__PURE__ */ (0,
|
|
9041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
8804
9042
|
"div",
|
|
8805
9043
|
{
|
|
8806
9044
|
role: "option",
|
|
@@ -8815,8 +9053,8 @@ var LegacyMultiSelectInner = ({
|
|
|
8815
9053
|
selected && "bg-[var(--chekin-gray-50)]"
|
|
8816
9054
|
),
|
|
8817
9055
|
children: [
|
|
8818
|
-
/* @__PURE__ */ (0,
|
|
8819
|
-
/* @__PURE__ */ (0,
|
|
9056
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "absolute start-2 flex size-3.5 items-center justify-center", children: selected && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react22.CheckIcon, { size: 16, strokeWidth: 2 }) }),
|
|
9057
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: optionLabel })
|
|
8820
9058
|
]
|
|
8821
9059
|
},
|
|
8822
9060
|
stringValue
|
|
@@ -8832,7 +9070,7 @@ var LegacyMultiSelect = (0, import_react60.forwardRef)(LegacyMultiSelectInner);
|
|
|
8832
9070
|
// src/legacy-fields/select/InfinitySelect.tsx
|
|
8833
9071
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
8834
9072
|
var import_react61 = require("react");
|
|
8835
|
-
var
|
|
9073
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8836
9074
|
function LegacyInfinitySelect({
|
|
8837
9075
|
label,
|
|
8838
9076
|
className,
|
|
@@ -8872,8 +9110,8 @@ function LegacyInfinitySelect({
|
|
|
8872
9110
|
onValueChange?.(selectedValue);
|
|
8873
9111
|
setIsOpen(false);
|
|
8874
9112
|
};
|
|
8875
|
-
return /* @__PURE__ */ (0,
|
|
8876
|
-
/* @__PURE__ */ (0,
|
|
9113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: cn("group relative min-w-[300px]", className), children: [
|
|
9114
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8877
9115
|
"label",
|
|
8878
9116
|
{
|
|
8879
9117
|
htmlFor: id,
|
|
@@ -8881,7 +9119,7 @@ function LegacyInfinitySelect({
|
|
|
8881
9119
|
children: label
|
|
8882
9120
|
}
|
|
8883
9121
|
),
|
|
8884
|
-
/* @__PURE__ */ (0,
|
|
9122
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8885
9123
|
LegacySelectRoot,
|
|
8886
9124
|
{
|
|
8887
9125
|
value,
|
|
@@ -8889,8 +9127,8 @@ function LegacyInfinitySelect({
|
|
|
8889
9127
|
open: isOpen,
|
|
8890
9128
|
onOpenChange: setIsOpen,
|
|
8891
9129
|
children: [
|
|
8892
|
-
/* @__PURE__ */ (0,
|
|
8893
|
-
/* @__PURE__ */ (0,
|
|
9130
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LegacySelectTrigger, { id, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LegacySelectValue, { placeholder }) }),
|
|
9131
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LegacySelectContent, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8894
9132
|
"div",
|
|
8895
9133
|
{
|
|
8896
9134
|
ref: parentRef,
|
|
@@ -8898,7 +9136,7 @@ function LegacyInfinitySelect({
|
|
|
8898
9136
|
height: `${Math.min(maxHeight, virtualizer.getTotalSize())}px`,
|
|
8899
9137
|
overflow: "auto"
|
|
8900
9138
|
},
|
|
8901
|
-
children: /* @__PURE__ */ (0,
|
|
9139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8902
9140
|
"div",
|
|
8903
9141
|
{
|
|
8904
9142
|
style: {
|
|
@@ -8909,7 +9147,7 @@ function LegacyInfinitySelect({
|
|
|
8909
9147
|
children: virtualizer.getVirtualItems().map((virtualItem) => {
|
|
8910
9148
|
const isLoading = virtualItem.index >= options.length;
|
|
8911
9149
|
const option = options[virtualItem.index];
|
|
8912
|
-
return /* @__PURE__ */ (0,
|
|
9150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8913
9151
|
"div",
|
|
8914
9152
|
{
|
|
8915
9153
|
style: {
|
|
@@ -8920,10 +9158,10 @@ function LegacyInfinitySelect({
|
|
|
8920
9158
|
height: `${virtualItem.size}px`,
|
|
8921
9159
|
transform: `translateY(${virtualItem.start}px)`
|
|
8922
9160
|
},
|
|
8923
|
-
children: isLoading || !option ? /* @__PURE__ */ (0,
|
|
8924
|
-
/* @__PURE__ */ (0,
|
|
9161
|
+
children: isLoading || !option ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex items-center gap-2 text-sm text-[var(--chekin-color-gray-1)]", children: [
|
|
9162
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
8925
9163
|
"Loading more..."
|
|
8926
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
9164
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8927
9165
|
LegacySelectItem,
|
|
8928
9166
|
{
|
|
8929
9167
|
value: String(option.value),
|
|
@@ -8946,7 +9184,7 @@ function LegacyInfinitySelect({
|
|
|
8946
9184
|
}
|
|
8947
9185
|
|
|
8948
9186
|
// src/pagination/Pagination.tsx
|
|
8949
|
-
var
|
|
9187
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8950
9188
|
var pageSizeOptions = [10, 20, 25, 30, 40, 50];
|
|
8951
9189
|
function Pagination({
|
|
8952
9190
|
page,
|
|
@@ -8985,7 +9223,7 @@ function Pagination({
|
|
|
8985
9223
|
if (totalItems === 0 || !shouldShowPagination) {
|
|
8986
9224
|
return null;
|
|
8987
9225
|
}
|
|
8988
|
-
return /* @__PURE__ */ (0,
|
|
9226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8989
9227
|
"div",
|
|
8990
9228
|
{
|
|
8991
9229
|
className: cn(
|
|
@@ -8993,24 +9231,24 @@ function Pagination({
|
|
|
8993
9231
|
className
|
|
8994
9232
|
),
|
|
8995
9233
|
children: [
|
|
8996
|
-
/* @__PURE__ */ (0,
|
|
8997
|
-
/* @__PURE__ */ (0,
|
|
8998
|
-
!isSimpleVariant && showPageSizeSelector && /* @__PURE__ */ (0,
|
|
8999
|
-
/* @__PURE__ */ (0,
|
|
9000
|
-
/* @__PURE__ */ (0,
|
|
9234
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "mr-auto flex-1 self-start font-medium text-[var(--chekin-color-gray-1)] sm:self-center", children: getInfoText() }),
|
|
9235
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ml-auto flex w-full items-center gap-8 sm:w-fit", children: [
|
|
9236
|
+
!isSimpleVariant && showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "hidden items-center gap-2 sm:flex", children: [
|
|
9237
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "font-medium text-[var(--chekin-color-gray-1)]", children: t("rows_per_page") }),
|
|
9238
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9001
9239
|
LegacySelect,
|
|
9002
9240
|
{
|
|
9003
9241
|
value: pageSize.toString(),
|
|
9004
9242
|
onValueChange: (value) => onPageSizeChange(parseInt(value, 10)),
|
|
9005
9243
|
triggerClassName: "h-8 w-[67px]",
|
|
9006
9244
|
containerClassName: "w-[67px] gap-0",
|
|
9007
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0,
|
|
9245
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LegacySelectItem, { value: size.toString(), children: size }, size))
|
|
9008
9246
|
}
|
|
9009
9247
|
)
|
|
9010
9248
|
] }),
|
|
9011
|
-
!isSimpleVariant && /* @__PURE__ */ (0,
|
|
9012
|
-
/* @__PURE__ */ (0,
|
|
9013
|
-
!isSimpleVariant && /* @__PURE__ */ (0,
|
|
9249
|
+
!isSimpleVariant && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "flex w-fit items-center justify-center font-medium", children: t("page_of_pages", { page, pages }) }),
|
|
9250
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ml-auto flex items-center gap-2 sm:ml-0", children: [
|
|
9251
|
+
!isSimpleVariant && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9014
9252
|
Button,
|
|
9015
9253
|
{
|
|
9016
9254
|
variant: "outline",
|
|
@@ -9019,12 +9257,12 @@ function Pagination({
|
|
|
9019
9257
|
onClick: goToFirstPage,
|
|
9020
9258
|
disabled: !canGoPrevious,
|
|
9021
9259
|
children: [
|
|
9022
|
-
/* @__PURE__ */ (0,
|
|
9023
|
-
/* @__PURE__ */ (0,
|
|
9260
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "sr-only hidden", children: t("go_to_first_page") }),
|
|
9261
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react23.ChevronsLeft, {})
|
|
9024
9262
|
]
|
|
9025
9263
|
}
|
|
9026
9264
|
),
|
|
9027
|
-
/* @__PURE__ */ (0,
|
|
9265
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9028
9266
|
Button,
|
|
9029
9267
|
{
|
|
9030
9268
|
variant: isSimpleVariant ? "link" : "outline",
|
|
@@ -9035,12 +9273,12 @@ function Pagination({
|
|
|
9035
9273
|
onClick: goToPreviousPage,
|
|
9036
9274
|
disabled: !canGoPrevious,
|
|
9037
9275
|
children: [
|
|
9038
|
-
/* @__PURE__ */ (0,
|
|
9039
|
-
/* @__PURE__ */ (0,
|
|
9276
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "sr-only hidden", children: t("go_to_previous_page") }),
|
|
9277
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react23.ChevronLeft, {})
|
|
9040
9278
|
]
|
|
9041
9279
|
}
|
|
9042
9280
|
),
|
|
9043
|
-
/* @__PURE__ */ (0,
|
|
9281
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9044
9282
|
Button,
|
|
9045
9283
|
{
|
|
9046
9284
|
variant: isSimpleVariant ? "link" : "outline",
|
|
@@ -9051,12 +9289,12 @@ function Pagination({
|
|
|
9051
9289
|
onClick: goToNextPage,
|
|
9052
9290
|
disabled: !canGoNext,
|
|
9053
9291
|
children: [
|
|
9054
|
-
/* @__PURE__ */ (0,
|
|
9055
|
-
/* @__PURE__ */ (0,
|
|
9292
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "sr-only hidden", children: t("go_to_next_page") }),
|
|
9293
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react23.ChevronRight, {})
|
|
9056
9294
|
]
|
|
9057
9295
|
}
|
|
9058
9296
|
),
|
|
9059
|
-
!isSimpleVariant && /* @__PURE__ */ (0,
|
|
9297
|
+
!isSimpleVariant && /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
9060
9298
|
Button,
|
|
9061
9299
|
{
|
|
9062
9300
|
variant: "outline",
|
|
@@ -9065,8 +9303,8 @@ function Pagination({
|
|
|
9065
9303
|
onClick: goToLastPage,
|
|
9066
9304
|
disabled: !canGoNext,
|
|
9067
9305
|
children: [
|
|
9068
|
-
/* @__PURE__ */ (0,
|
|
9069
|
-
/* @__PURE__ */ (0,
|
|
9306
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "sr-only hidden", children: t("go_to_last_page") }),
|
|
9307
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react23.ChevronsRight, {})
|
|
9070
9308
|
]
|
|
9071
9309
|
}
|
|
9072
9310
|
)
|
|
@@ -9078,15 +9316,15 @@ function Pagination({
|
|
|
9078
9316
|
}
|
|
9079
9317
|
|
|
9080
9318
|
// src/popover/Popover.tsx
|
|
9081
|
-
var
|
|
9319
|
+
var React25 = __toESM(require("react"), 1);
|
|
9082
9320
|
var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
9083
|
-
var
|
|
9321
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
9084
9322
|
var Popover = RadixPopover.Root;
|
|
9085
9323
|
var PopoverTrigger = RadixPopover.Trigger;
|
|
9086
9324
|
var PopoverAnchor = RadixPopover.Anchor;
|
|
9087
9325
|
var PopoverPortal = RadixPopover.Portal;
|
|
9088
9326
|
var PopoverClose = RadixPopover.Close;
|
|
9089
|
-
var PopoverContent =
|
|
9327
|
+
var PopoverContent = React25.forwardRef(({ className, sideOffset = 4, align = "center", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9090
9328
|
RadixPopover.Content,
|
|
9091
9329
|
{
|
|
9092
9330
|
ref,
|
|
@@ -9106,7 +9344,7 @@ PopoverContent.displayName = "PopoverContent";
|
|
|
9106
9344
|
// src/popover/PopoverWithTooltip.tsx
|
|
9107
9345
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
9108
9346
|
var TooltipPrimitive2 = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
9109
|
-
var
|
|
9347
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9110
9348
|
function PopoverWithTooltip({
|
|
9111
9349
|
children,
|
|
9112
9350
|
popoverContent,
|
|
@@ -9116,10 +9354,10 @@ function PopoverWithTooltip({
|
|
|
9116
9354
|
popoverContentClassName,
|
|
9117
9355
|
tooltipVariant = "light"
|
|
9118
9356
|
}) {
|
|
9119
|
-
return /* @__PURE__ */ (0,
|
|
9120
|
-
/* @__PURE__ */ (0,
|
|
9121
|
-
/* @__PURE__ */ (0,
|
|
9122
|
-
/* @__PURE__ */ (0,
|
|
9357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TooltipPrimitive2.Provider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(TooltipPrimitive2.Root, { open: open ? false : void 0, children: [
|
|
9358
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(PopoverPrimitive.Root, { open, onOpenChange, children: [
|
|
9359
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TooltipPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PopoverPrimitive.Trigger, { asChild: true, children }) }),
|
|
9360
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9123
9361
|
PopoverPrimitive.Content,
|
|
9124
9362
|
{
|
|
9125
9363
|
align: "center",
|
|
@@ -9137,7 +9375,7 @@ function PopoverWithTooltip({
|
|
|
9137
9375
|
}
|
|
9138
9376
|
) })
|
|
9139
9377
|
] }),
|
|
9140
|
-
/* @__PURE__ */ (0,
|
|
9378
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TooltipPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9141
9379
|
TooltipPrimitive2.Content,
|
|
9142
9380
|
{
|
|
9143
9381
|
sideOffset: 5,
|
|
@@ -9154,7 +9392,7 @@ function PopoverWithTooltip({
|
|
|
9154
9392
|
),
|
|
9155
9393
|
children: [
|
|
9156
9394
|
tooltipContent,
|
|
9157
|
-
/* @__PURE__ */ (0,
|
|
9395
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9158
9396
|
TooltipPrimitive2.Arrow,
|
|
9159
9397
|
{
|
|
9160
9398
|
className: cn(
|
|
@@ -9176,10 +9414,10 @@ function PopoverWithTooltip({
|
|
|
9176
9414
|
var import_react63 = require("react");
|
|
9177
9415
|
|
|
9178
9416
|
// src/radio-group/RadioGroup.tsx
|
|
9179
|
-
var
|
|
9417
|
+
var React26 = __toESM(require("react"), 1);
|
|
9180
9418
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
9181
|
-
var
|
|
9182
|
-
var RadioGroup2 =
|
|
9419
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9420
|
+
var RadioGroup2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9183
9421
|
RadioGroupPrimitive.Root,
|
|
9184
9422
|
{
|
|
9185
9423
|
ref,
|
|
@@ -9198,7 +9436,7 @@ var indicatorSizeClasses = {
|
|
|
9198
9436
|
m: "h-2.5 w-2.5",
|
|
9199
9437
|
l: "h-3 w-3"
|
|
9200
9438
|
};
|
|
9201
|
-
var RadioGroupItem =
|
|
9439
|
+
var RadioGroupItem = React26.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9202
9440
|
RadioGroupPrimitive.Item,
|
|
9203
9441
|
{
|
|
9204
9442
|
ref,
|
|
@@ -9211,7 +9449,7 @@ var RadioGroupItem = React25.forwardRef(({ className, size = "default", ...props
|
|
|
9211
9449
|
className
|
|
9212
9450
|
),
|
|
9213
9451
|
...props,
|
|
9214
|
-
children: /* @__PURE__ */ (0,
|
|
9452
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9215
9453
|
RadioGroupPrimitive.Indicator,
|
|
9216
9454
|
{
|
|
9217
9455
|
className: cn(
|
|
@@ -9253,7 +9491,7 @@ function useRadioOptions({ options, defaultValue, onChange }) {
|
|
|
9253
9491
|
}
|
|
9254
9492
|
|
|
9255
9493
|
// src/radio/Radio.tsx
|
|
9256
|
-
var
|
|
9494
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
9257
9495
|
var Radio = (0, import_react63.forwardRef)(
|
|
9258
9496
|
({
|
|
9259
9497
|
options,
|
|
@@ -9276,8 +9514,8 @@ var Radio = (0, import_react63.forwardRef)(
|
|
|
9276
9514
|
}
|
|
9277
9515
|
return option.value === selectedValue;
|
|
9278
9516
|
};
|
|
9279
|
-
return /* @__PURE__ */ (0,
|
|
9280
|
-
/* @__PURE__ */ (0,
|
|
9517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9281
9519
|
RadioGroup2,
|
|
9282
9520
|
{
|
|
9283
9521
|
ref,
|
|
@@ -9285,7 +9523,7 @@ var Radio = (0, import_react63.forwardRef)(
|
|
|
9285
9523
|
onValueChange: handleValueChange,
|
|
9286
9524
|
className: cn(className, "radio"),
|
|
9287
9525
|
disabled,
|
|
9288
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
9526
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9289
9527
|
"label",
|
|
9290
9528
|
{
|
|
9291
9529
|
className: cn(
|
|
@@ -9293,8 +9531,8 @@ var Radio = (0, import_react63.forwardRef)(
|
|
|
9293
9531
|
"flex cursor-pointer items-center gap-2 transition-all duration-200",
|
|
9294
9532
|
(disabled || option.disabled) && "cursor-default opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
9295
9533
|
),
|
|
9296
|
-
children: renderOption ? renderOption({ option, isSelected: getIsSelected(option) }) : /* @__PURE__ */ (0,
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9534
|
+
children: renderOption ? renderOption({ option, isSelected: getIsSelected(option) }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
9535
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9298
9536
|
RadioGroupItem,
|
|
9299
9537
|
{
|
|
9300
9538
|
value: option.value,
|
|
@@ -9304,29 +9542,29 @@ var Radio = (0, import_react63.forwardRef)(
|
|
|
9304
9542
|
className: "radio__indicator"
|
|
9305
9543
|
}
|
|
9306
9544
|
),
|
|
9307
|
-
/* @__PURE__ */ (0,
|
|
9545
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "radio_label", children: option.label })
|
|
9308
9546
|
] })
|
|
9309
9547
|
},
|
|
9310
9548
|
option.value
|
|
9311
9549
|
))
|
|
9312
9550
|
}
|
|
9313
9551
|
),
|
|
9314
|
-
error && /* @__PURE__ */ (0,
|
|
9552
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ErrorMessage, { children: error })
|
|
9315
9553
|
] });
|
|
9316
9554
|
}
|
|
9317
9555
|
);
|
|
9318
9556
|
Radio.displayName = "Radio";
|
|
9319
9557
|
|
|
9320
9558
|
// src/radio/RadioWithBorder.tsx
|
|
9321
|
-
var
|
|
9559
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
9322
9560
|
function RadioWithBorder({ size, ...props }) {
|
|
9323
|
-
return /* @__PURE__ */ (0,
|
|
9561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9324
9562
|
Radio,
|
|
9325
9563
|
{
|
|
9326
9564
|
...props,
|
|
9327
9565
|
renderOption: ({ option, isSelected }) => {
|
|
9328
9566
|
const data = option.data;
|
|
9329
|
-
return /* @__PURE__ */ (0,
|
|
9567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9330
9568
|
"div",
|
|
9331
9569
|
{
|
|
9332
9570
|
className: cn(
|
|
@@ -9334,7 +9572,7 @@ function RadioWithBorder({ size, ...props }) {
|
|
|
9334
9572
|
isSelected && "border-[var(--chekin-color-brand-blue)] bg-[var(--chekin-color-surface-autocomplete)]"
|
|
9335
9573
|
),
|
|
9336
9574
|
children: [
|
|
9337
|
-
/* @__PURE__ */ (0,
|
|
9575
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9338
9576
|
RadioGroupItem,
|
|
9339
9577
|
{
|
|
9340
9578
|
className: "mt-1",
|
|
@@ -9344,15 +9582,15 @@ function RadioWithBorder({ size, ...props }) {
|
|
|
9344
9582
|
size
|
|
9345
9583
|
}
|
|
9346
9584
|
),
|
|
9347
|
-
/* @__PURE__ */ (0,
|
|
9348
|
-
/* @__PURE__ */ (0,
|
|
9349
|
-
/* @__PURE__ */ (0,
|
|
9585
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex min-w-0 flex-1 items-start justify-between gap-3", children: [
|
|
9586
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "min-w-0 space-y-1 leading-6", children: [
|
|
9587
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("p", { className: "flex items-center gap-3 font-semibold", children: [
|
|
9350
9588
|
option.label,
|
|
9351
|
-
data?.subLabel && /* @__PURE__ */ (0,
|
|
9589
|
+
data?.subLabel && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "rounded bg-[color-mix(in_srgb,var(--chekin-color-brand-blue)_10%,transparent)] px-2 py-1 text-sm font-semibold leading-4 text-[var(--chekin-color-brand-blue)]", children: data.subLabel })
|
|
9352
9590
|
] }),
|
|
9353
|
-
data?.description && /* @__PURE__ */ (0,
|
|
9591
|
+
data?.description && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("p", { className: "text-sm font-medium text-[var(--chekin-color-gray-1)]", children: data.description })
|
|
9354
9592
|
] }),
|
|
9355
|
-
data?.rightContent && /* @__PURE__ */ (0,
|
|
9593
|
+
data?.rightContent && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "shrink-0", children: data.rightContent })
|
|
9356
9594
|
] })
|
|
9357
9595
|
]
|
|
9358
9596
|
}
|
|
@@ -9364,7 +9602,7 @@ function RadioWithBorder({ size, ...props }) {
|
|
|
9364
9602
|
|
|
9365
9603
|
// src/radio-cards-group/RadioCardsGroup.tsx
|
|
9366
9604
|
var import_react64 = require("react");
|
|
9367
|
-
var
|
|
9605
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
9368
9606
|
var isValueSelectOption = (value) => {
|
|
9369
9607
|
return value?.value !== void 0;
|
|
9370
9608
|
};
|
|
@@ -9396,8 +9634,8 @@ var RadioCardsGroup = (0, import_react64.forwardRef)(
|
|
|
9396
9634
|
[defaultValue, onChange, options, value]
|
|
9397
9635
|
);
|
|
9398
9636
|
const currentValue = isValueSelectOption(value) ? value.value : value;
|
|
9399
|
-
return /* @__PURE__ */ (0,
|
|
9400
|
-
/* @__PURE__ */ (0,
|
|
9637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
9638
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9401
9639
|
Radio,
|
|
9402
9640
|
{
|
|
9403
9641
|
ref,
|
|
@@ -9407,7 +9645,7 @@ var RadioCardsGroup = (0, import_react64.forwardRef)(
|
|
|
9407
9645
|
disabled,
|
|
9408
9646
|
className: cn("flex flex-wrap gap-4", className),
|
|
9409
9647
|
renderOption: ({ option, isSelected }) => {
|
|
9410
|
-
return /* @__PURE__ */ (0,
|
|
9648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
9411
9649
|
"div",
|
|
9412
9650
|
{
|
|
9413
9651
|
className: cn(
|
|
@@ -9422,7 +9660,7 @@ var RadioCardsGroup = (0, import_react64.forwardRef)(
|
|
|
9422
9660
|
cardClassName
|
|
9423
9661
|
),
|
|
9424
9662
|
children: [
|
|
9425
|
-
/* @__PURE__ */ (0,
|
|
9663
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9426
9664
|
RadioGroupItem,
|
|
9427
9665
|
{
|
|
9428
9666
|
value: option.value,
|
|
@@ -9430,8 +9668,8 @@ var RadioCardsGroup = (0, import_react64.forwardRef)(
|
|
|
9430
9668
|
disabled: disabled || option.disabled
|
|
9431
9669
|
}
|
|
9432
9670
|
) }),
|
|
9433
|
-
/* @__PURE__ */ (0,
|
|
9434
|
-
/* @__PURE__ */ (0,
|
|
9671
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "w-full cursor-pointer", children: [
|
|
9672
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9435
9673
|
"label",
|
|
9436
9674
|
{
|
|
9437
9675
|
htmlFor: `radio-${option.value}`,
|
|
@@ -9442,7 +9680,7 @@ var RadioCardsGroup = (0, import_react64.forwardRef)(
|
|
|
9442
9680
|
children: option.label
|
|
9443
9681
|
}
|
|
9444
9682
|
),
|
|
9445
|
-
option.description && /* @__PURE__ */ (0,
|
|
9683
|
+
option.description && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "radioCardDescription mt-2", children: option.description })
|
|
9446
9684
|
] })
|
|
9447
9685
|
]
|
|
9448
9686
|
}
|
|
@@ -9450,14 +9688,14 @@ var RadioCardsGroup = (0, import_react64.forwardRef)(
|
|
|
9450
9688
|
}
|
|
9451
9689
|
}
|
|
9452
9690
|
),
|
|
9453
|
-
error && /* @__PURE__ */ (0,
|
|
9691
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "mt-2 text-left text-sm text-[var(--chekin-red-500)]", children: error })
|
|
9454
9692
|
] });
|
|
9455
9693
|
}
|
|
9456
9694
|
);
|
|
9457
9695
|
var MemoizedRadioCardsGroup = (0, import_react64.memo)(RadioCardsGroup);
|
|
9458
9696
|
|
|
9459
9697
|
// src/rating-progress/RatingProgress.tsx
|
|
9460
|
-
var
|
|
9698
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9461
9699
|
var getRatingColor = (score, maxScore) => {
|
|
9462
9700
|
const percentage = score / maxScore * 100;
|
|
9463
9701
|
if (percentage === 0) return "var(--chekin-rating-0)";
|
|
@@ -9476,7 +9714,7 @@ function RatingProgress({
|
|
|
9476
9714
|
}) {
|
|
9477
9715
|
const percentage = Math.max(0, Math.min(100, score / maxScore * 100));
|
|
9478
9716
|
const color = getRatingColor(score, maxScore);
|
|
9479
|
-
return /* @__PURE__ */ (0,
|
|
9717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
9480
9718
|
"div",
|
|
9481
9719
|
{
|
|
9482
9720
|
className: cn(
|
|
@@ -9484,13 +9722,13 @@ function RatingProgress({
|
|
|
9484
9722
|
className
|
|
9485
9723
|
),
|
|
9486
9724
|
children: [
|
|
9487
|
-
/* @__PURE__ */ (0,
|
|
9488
|
-
/* @__PURE__ */ (0,
|
|
9489
|
-
/* @__PURE__ */ (0,
|
|
9725
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex w-full items-start justify-between text-sm font-medium leading-6", children: [
|
|
9726
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "min-w-0 flex-1", children: label }),
|
|
9727
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "shrink-0 whitespace-pre", children: score.toFixed(1) })
|
|
9490
9728
|
] }),
|
|
9491
|
-
/* @__PURE__ */ (0,
|
|
9492
|
-
/* @__PURE__ */ (0,
|
|
9493
|
-
/* @__PURE__ */ (0,
|
|
9729
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "relative w-full", children: [
|
|
9730
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "h-1.5 w-full rounded-[24px] bg-[var(--chekin-color-gray-3)]" }),
|
|
9731
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9494
9732
|
"div",
|
|
9495
9733
|
{
|
|
9496
9734
|
className: "absolute left-0 top-0 h-1.5 rounded-[24px] transition-all duration-300 ease-out",
|
|
@@ -9522,7 +9760,7 @@ function useRatingRadioGroupContext() {
|
|
|
9522
9760
|
|
|
9523
9761
|
// src/rating-radio-group/RatingRadioGroupItem.tsx
|
|
9524
9762
|
var import_lucide_react24 = require("lucide-react");
|
|
9525
|
-
var
|
|
9763
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
9526
9764
|
var ratingRadioGroupStarSizes = {
|
|
9527
9765
|
default: 24,
|
|
9528
9766
|
lg: 32
|
|
@@ -9547,14 +9785,14 @@ function RatingRadioGroupItem({ option, size }) {
|
|
|
9547
9785
|
} = useRatingRadioGroupContext();
|
|
9548
9786
|
const starColor = getStarColor(option.value)(value, hoverValue);
|
|
9549
9787
|
const starSize = ratingRadioGroupStarSizes[size ?? contextSize];
|
|
9550
|
-
return /* @__PURE__ */ (0,
|
|
9788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
9551
9789
|
"label",
|
|
9552
9790
|
{
|
|
9553
9791
|
onMouseEnter: () => onMouseEnter(option.value),
|
|
9554
9792
|
onTouchStart: () => onTouchStart(option.value),
|
|
9555
9793
|
onTouchEnd,
|
|
9556
9794
|
children: [
|
|
9557
|
-
/* @__PURE__ */ (0,
|
|
9795
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9558
9796
|
"input",
|
|
9559
9797
|
{
|
|
9560
9798
|
className: "peer absolute h-0 w-0 opacity-0",
|
|
@@ -9565,7 +9803,7 @@ function RatingRadioGroupItem({ option, size }) {
|
|
|
9565
9803
|
onChange: () => onChange?.(option.value)
|
|
9566
9804
|
}
|
|
9567
9805
|
),
|
|
9568
|
-
/* @__PURE__ */ (0,
|
|
9806
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
9569
9807
|
import_lucide_react24.Star,
|
|
9570
9808
|
{
|
|
9571
9809
|
className: "cursor-pointer rounded peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-[var(--rating-radio-group-star-focus-color)]",
|
|
@@ -9581,17 +9819,17 @@ function RatingRadioGroupItem({ option, size }) {
|
|
|
9581
9819
|
}
|
|
9582
9820
|
|
|
9583
9821
|
// src/rating-radio-group/RatingRadioGroupLegend.tsx
|
|
9584
|
-
var
|
|
9822
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9585
9823
|
function RatingRadioGroupLegend({ children }) {
|
|
9586
9824
|
if (!children) return null;
|
|
9587
|
-
return /* @__PURE__ */ (0,
|
|
9825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("legend", { className: "mb-2 text-base", children });
|
|
9588
9826
|
}
|
|
9589
9827
|
|
|
9590
9828
|
// src/rating-radio-group/RatingRadioGroupList.tsx
|
|
9591
|
-
var
|
|
9829
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9592
9830
|
function RatingRadioGroupList({ children }) {
|
|
9593
9831
|
const { onMouseLeave } = useRatingRadioGroupContext();
|
|
9594
|
-
return /* @__PURE__ */ (0,
|
|
9832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "RatingRadioGroup__list flex gap-2", onMouseLeave, children });
|
|
9595
9833
|
}
|
|
9596
9834
|
|
|
9597
9835
|
// src/rating-radio-group/useRatingPreview.ts
|
|
@@ -9627,7 +9865,7 @@ function useRatingPreview() {
|
|
|
9627
9865
|
}
|
|
9628
9866
|
|
|
9629
9867
|
// src/rating-radio-group/RatingRadioGroup.tsx
|
|
9630
|
-
var
|
|
9868
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
9631
9869
|
function RatingRadioGroupRoot({
|
|
9632
9870
|
value,
|
|
9633
9871
|
onChange,
|
|
@@ -9645,7 +9883,7 @@ function RatingRadioGroupRoot({
|
|
|
9645
9883
|
handleTouchStart,
|
|
9646
9884
|
handleTouchEnd
|
|
9647
9885
|
} = useRatingPreview();
|
|
9648
|
-
return /* @__PURE__ */ (0,
|
|
9886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9649
9887
|
RatingRadioGroupProvider,
|
|
9650
9888
|
{
|
|
9651
9889
|
value: {
|
|
@@ -9659,9 +9897,9 @@ function RatingRadioGroupRoot({
|
|
|
9659
9897
|
onTouchStart: handleTouchStart,
|
|
9660
9898
|
onTouchEnd: handleTouchEnd
|
|
9661
9899
|
},
|
|
9662
|
-
children: /* @__PURE__ */ (0,
|
|
9663
|
-
/* @__PURE__ */ (0,
|
|
9664
|
-
/* @__PURE__ */ (0,
|
|
9900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("fieldset", { className: cn("relative [all:unset]", className), children: children ?? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9901
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RatingRadioGroup.Legend, { children: label }),
|
|
9902
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RatingRadioGroup.List, { children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(RatingRadioGroup.Item, { option }, option.value)) })
|
|
9665
9903
|
] }) })
|
|
9666
9904
|
}
|
|
9667
9905
|
);
|
|
@@ -9673,10 +9911,10 @@ var RatingRadioGroup = Object.assign(RatingRadioGroupRoot, {
|
|
|
9673
9911
|
});
|
|
9674
9912
|
|
|
9675
9913
|
// src/rating-stars/RatingStars.tsx
|
|
9676
|
-
var
|
|
9914
|
+
var React27 = __toESM(require("react"), 1);
|
|
9677
9915
|
var import_lucide_react25 = require("lucide-react");
|
|
9678
9916
|
var import_react_i18next13 = require("react-i18next");
|
|
9679
|
-
var
|
|
9917
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
9680
9918
|
function RatingStars({
|
|
9681
9919
|
rating,
|
|
9682
9920
|
maxRating = 5,
|
|
@@ -9693,7 +9931,7 @@ function RatingStars({
|
|
|
9693
9931
|
const { t } = (0, import_react_i18next13.useTranslation)();
|
|
9694
9932
|
const normalizedRating = Math.max(0, Math.min(maxRating, rating));
|
|
9695
9933
|
const stars = Array.from({ length: maxRating }, (_, index) => index + 1);
|
|
9696
|
-
const componentId =
|
|
9934
|
+
const componentId = React27.useId();
|
|
9697
9935
|
const decimal = normalizedRating - Math.floor(normalizedRating);
|
|
9698
9936
|
const partialStarIndex = decimal > 0 ? Math.ceil(normalizedRating) : -1;
|
|
9699
9937
|
const gradientId = `star-gradient-${componentId.replace(/:/g, "")}`;
|
|
@@ -9706,18 +9944,18 @@ function RatingStars({
|
|
|
9706
9944
|
}
|
|
9707
9945
|
return emptyColor;
|
|
9708
9946
|
};
|
|
9709
|
-
return /* @__PURE__ */ (0,
|
|
9710
|
-
showText && /* @__PURE__ */ (0,
|
|
9947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: cn("flex flex-col items-start gap-2", className), children: [
|
|
9948
|
+
showText && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-4xl font-medium", children: [
|
|
9711
9949
|
normalizedRating,
|
|
9712
9950
|
"/",
|
|
9713
9951
|
maxRating
|
|
9714
9952
|
] }),
|
|
9715
|
-
/* @__PURE__ */ (0,
|
|
9716
|
-
/* @__PURE__ */ (0,
|
|
9717
|
-
/* @__PURE__ */ (0,
|
|
9718
|
-
/* @__PURE__ */ (0,
|
|
9953
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
9954
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("svg", { width: "0", height: "0", style: { position: "absolute" }, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
9955
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("stop", { offset: `${decimal * 100}%`, stopColor: filledColor }),
|
|
9956
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("stop", { offset: `${decimal * 100}%`, stopColor: emptyColor })
|
|
9719
9957
|
] }) }) }),
|
|
9720
|
-
stars.map((star) => /* @__PURE__ */ (0,
|
|
9958
|
+
stars.map((star) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9721
9959
|
import_lucide_react25.Star,
|
|
9722
9960
|
{
|
|
9723
9961
|
size,
|
|
@@ -9729,22 +9967,22 @@ function RatingStars({
|
|
|
9729
9967
|
star
|
|
9730
9968
|
))
|
|
9731
9969
|
] }),
|
|
9732
|
-
(reviewCount !== void 0 || description) && /* @__PURE__ */ (0,
|
|
9733
|
-
reviewCount !== void 0 && /* @__PURE__ */ (0,
|
|
9970
|
+
(reviewCount !== void 0 || description) && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col font-medium text-[var(--chekin-color-gray-1)]", children: [
|
|
9971
|
+
reviewCount !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-xs leading-4", children: [
|
|
9734
9972
|
reviewCount,
|
|
9735
9973
|
" ",
|
|
9736
9974
|
reviewsLabel || t("reviews")
|
|
9737
9975
|
] }),
|
|
9738
|
-
description && /* @__PURE__ */ (0,
|
|
9976
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm leading-6", children: description })
|
|
9739
9977
|
] })
|
|
9740
9978
|
] });
|
|
9741
9979
|
}
|
|
9742
9980
|
|
|
9743
9981
|
// src/rotate-arrow/RotateArrow.tsx
|
|
9744
9982
|
var import_lucide_react26 = require("lucide-react");
|
|
9745
|
-
var
|
|
9983
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
9746
9984
|
function RotateArrow({ shouldRotate, className }) {
|
|
9747
|
-
return /* @__PURE__ */ (0,
|
|
9985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
9748
9986
|
import_lucide_react26.ChevronDown,
|
|
9749
9987
|
{
|
|
9750
9988
|
size: 16,
|
|
@@ -9760,9 +9998,9 @@ function RotateArrow({ shouldRotate, className }) {
|
|
|
9760
9998
|
|
|
9761
9999
|
// src/search-button/SearchButton.tsx
|
|
9762
10000
|
var import_lucide_react27 = require("lucide-react");
|
|
9763
|
-
var
|
|
10001
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
9764
10002
|
function SearchButton({ onClick, className, icon, ariaLabel }) {
|
|
9765
|
-
return /* @__PURE__ */ (0,
|
|
10003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9766
10004
|
"button",
|
|
9767
10005
|
{
|
|
9768
10006
|
onClick,
|
|
@@ -9773,7 +10011,7 @@ function SearchButton({ onClick, className, icon, ariaLabel }) {
|
|
|
9773
10011
|
"data-testid": "search-button",
|
|
9774
10012
|
"aria-label": ariaLabel,
|
|
9775
10013
|
type: "button",
|
|
9776
|
-
children: icon || /* @__PURE__ */ (0,
|
|
10014
|
+
children: icon || /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_lucide_react27.Search, { size: 12, strokeWidth: 4 })
|
|
9777
10015
|
}
|
|
9778
10016
|
);
|
|
9779
10017
|
}
|
|
@@ -9783,10 +10021,10 @@ var import_lucide_react28 = require("lucide-react");
|
|
|
9783
10021
|
var import_react_i18next14 = require("react-i18next");
|
|
9784
10022
|
|
|
9785
10023
|
// src/legacy-fields/input/Input.tsx
|
|
9786
|
-
var
|
|
9787
|
-
var
|
|
9788
|
-
var LegacyInput =
|
|
9789
|
-
({ className, type, readOnly, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10024
|
+
var React28 = __toESM(require("react"), 1);
|
|
10025
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
10026
|
+
var LegacyInput = React28.forwardRef(
|
|
10027
|
+
({ className, type, readOnly, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
9790
10028
|
"input",
|
|
9791
10029
|
{
|
|
9792
10030
|
ref,
|
|
@@ -9809,7 +10047,7 @@ var LegacyInput = React27.forwardRef(
|
|
|
9809
10047
|
LegacyInput.displayName = "LegacyInput";
|
|
9810
10048
|
|
|
9811
10049
|
// src/search-input/SearchInput.tsx
|
|
9812
|
-
var
|
|
10050
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
9813
10051
|
function SearchInput({
|
|
9814
10052
|
disabled,
|
|
9815
10053
|
invalid,
|
|
@@ -9828,15 +10066,15 @@ function SearchInput({
|
|
|
9828
10066
|
const isBlocked = Boolean(disabled) || Boolean(loading);
|
|
9829
10067
|
const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
|
|
9830
10068
|
const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
|
|
9831
|
-
return /* @__PURE__ */ (0,
|
|
9832
|
-
(label || hasLabelMeta) && /* @__PURE__ */ (0,
|
|
9833
|
-
label && /* @__PURE__ */ (0,
|
|
9834
|
-
optionalLabel && /* @__PURE__ */ (0,
|
|
9835
|
-
tooltip && /* @__PURE__ */ (0,
|
|
10069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: cn("input-wrapper", wrapperClassName), children: [
|
|
10070
|
+
(label || hasLabelMeta) && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "mb-2 inline-flex max-w-full items-center gap-1.5 text-sm font-medium text-[var(--chekin-color-brand-navy)]", children: [
|
|
10071
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "min-w-0 truncate", children: label }),
|
|
10072
|
+
optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "shrink-0 text-xs font-normal text-[var(--chekin-color-gray-2)]", children: optionalLabel }),
|
|
10073
|
+
tooltip && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(HelpTooltip, { content: tooltip, side: "top", size: 16 })
|
|
9836
10074
|
] }),
|
|
9837
|
-
/* @__PURE__ */ (0,
|
|
9838
|
-
/* @__PURE__ */ (0,
|
|
9839
|
-
/* @__PURE__ */ (0,
|
|
10075
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "relative", children: [
|
|
10076
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react28.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[var(--chekin-color-gray-2)]" }),
|
|
10077
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
9840
10078
|
LegacyInput,
|
|
9841
10079
|
{
|
|
9842
10080
|
...props,
|
|
@@ -9854,15 +10092,15 @@ function SearchInput({
|
|
|
9854
10092
|
)
|
|
9855
10093
|
}
|
|
9856
10094
|
),
|
|
9857
|
-
(loading || onReset) && /* @__PURE__ */ (0,
|
|
9858
|
-
loading && /* @__PURE__ */ (0,
|
|
10095
|
+
(loading || onReset) && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "absolute right-2 top-1/2 flex -translate-y-1/2 items-center gap-1", children: [
|
|
10096
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
9859
10097
|
import_lucide_react28.Loader2,
|
|
9860
10098
|
{
|
|
9861
10099
|
"aria-hidden": "true",
|
|
9862
10100
|
className: "h-5 w-5 animate-spin text-[var(--chekin-color-gray-2)]"
|
|
9863
10101
|
}
|
|
9864
10102
|
),
|
|
9865
|
-
onReset && /* @__PURE__ */ (0,
|
|
10103
|
+
onReset && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
9866
10104
|
Button,
|
|
9867
10105
|
{
|
|
9868
10106
|
variant: "ghost",
|
|
@@ -9870,7 +10108,7 @@ function SearchInput({
|
|
|
9870
10108
|
disabled: isBlocked,
|
|
9871
10109
|
className: "h-7 w-7 p-0 text-[var(--chekin-color-gray-2)]",
|
|
9872
10110
|
"aria-label": t("reset_search"),
|
|
9873
|
-
children: /* @__PURE__ */ (0,
|
|
10111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_lucide_react28.X, { className: "h-5 w-5" })
|
|
9874
10112
|
}
|
|
9875
10113
|
)
|
|
9876
10114
|
] })
|
|
@@ -9880,7 +10118,7 @@ function SearchInput({
|
|
|
9880
10118
|
|
|
9881
10119
|
// src/search-input/DebouncedSearchInput.tsx
|
|
9882
10120
|
var import_react67 = require("react");
|
|
9883
|
-
var
|
|
10121
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
9884
10122
|
function DebouncedSearchInput({
|
|
9885
10123
|
onChange,
|
|
9886
10124
|
placeholder,
|
|
@@ -9896,7 +10134,7 @@ function DebouncedSearchInput({
|
|
|
9896
10134
|
onChange(value);
|
|
9897
10135
|
}
|
|
9898
10136
|
});
|
|
9899
|
-
return /* @__PURE__ */ (0,
|
|
10137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
9900
10138
|
SearchInput,
|
|
9901
10139
|
{
|
|
9902
10140
|
onChange: handleInputChange,
|
|
@@ -9925,9 +10163,9 @@ var sectionTagVariants = (0, import_class_variance_authority12.cva)(
|
|
|
9925
10163
|
);
|
|
9926
10164
|
|
|
9927
10165
|
// src/section-tag/SectionTag.tsx
|
|
9928
|
-
var
|
|
10166
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
9929
10167
|
function SectionTag({ children, color = "green", className }) {
|
|
9930
|
-
return /* @__PURE__ */ (0,
|
|
10168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: cn(sectionTagVariants({ color }), className), children });
|
|
9931
10169
|
}
|
|
9932
10170
|
|
|
9933
10171
|
// src/section-tag/constants.ts
|
|
@@ -9949,9 +10187,9 @@ var SubSectionSize = /* @__PURE__ */ ((SubSectionSize2) => {
|
|
|
9949
10187
|
})(SubSectionSize || {});
|
|
9950
10188
|
|
|
9951
10189
|
// src/section/Section.tsx
|
|
9952
|
-
var
|
|
10190
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
9953
10191
|
function TooltipInfo({ content, className }) {
|
|
9954
|
-
return /* @__PURE__ */ (0,
|
|
10192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
9955
10193
|
HelpTooltip,
|
|
9956
10194
|
{
|
|
9957
10195
|
side: "right",
|
|
@@ -9980,7 +10218,7 @@ var Section = (0, import_react68.forwardRef)(
|
|
|
9980
10218
|
size
|
|
9981
10219
|
}, ref) => {
|
|
9982
10220
|
const { t } = (0, import_react_i18next15.useTranslation)();
|
|
9983
|
-
return /* @__PURE__ */ (0,
|
|
10221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
9984
10222
|
"div",
|
|
9985
10223
|
{
|
|
9986
10224
|
ref,
|
|
@@ -9992,8 +10230,8 @@ var Section = (0, import_react68.forwardRef)(
|
|
|
9992
10230
|
className
|
|
9993
10231
|
),
|
|
9994
10232
|
children: [
|
|
9995
|
-
(title || subtitle) && /* @__PURE__ */ (0,
|
|
9996
|
-
title && /* @__PURE__ */ (0,
|
|
10233
|
+
(title || subtitle) && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
10234
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
9997
10235
|
"div",
|
|
9998
10236
|
{
|
|
9999
10237
|
className: cn(
|
|
@@ -10003,17 +10241,17 @@ var Section = (0, import_react68.forwardRef)(
|
|
|
10003
10241
|
),
|
|
10004
10242
|
children: [
|
|
10005
10243
|
title,
|
|
10006
|
-
titleTooltip && /* @__PURE__ */ (0,
|
|
10007
|
-
linkContent && /* @__PURE__ */ (0,
|
|
10244
|
+
titleTooltip && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "ml-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TooltipInfo, { content: titleTooltip }) }),
|
|
10245
|
+
linkContent && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "ml-6 text-sm font-semibold text-[var(--section-link-color)] no-underline hover:opacity-70 active:opacity-100", children: linkContent })
|
|
10008
10246
|
]
|
|
10009
10247
|
}
|
|
10010
10248
|
),
|
|
10011
|
-
subtitle && /* @__PURE__ */ (0,
|
|
10012
|
-
/* @__PURE__ */ (0,
|
|
10013
|
-
subtitleTooltip && /* @__PURE__ */ (0,
|
|
10249
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "w-full max-w-[720px] md:max-w-full", children: [
|
|
10250
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "inline text-base font-normal text-[var(--section-subtitle-color)]", children: subtitle }),
|
|
10251
|
+
subtitleTooltip && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "ml-1.5 inline-block align-text-top", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(TooltipInfo, { content: subtitleTooltip }) })
|
|
10014
10252
|
] })
|
|
10015
10253
|
] }),
|
|
10016
|
-
loading && showLoader ? /* @__PURE__ */ (0,
|
|
10254
|
+
loading && showLoader ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
10017
10255
|
CircularLoader,
|
|
10018
10256
|
{
|
|
10019
10257
|
size: "md",
|
|
@@ -10028,7 +10266,7 @@ var Section = (0, import_react68.forwardRef)(
|
|
|
10028
10266
|
);
|
|
10029
10267
|
Section.displayName = "Section";
|
|
10030
10268
|
var SubSection = (0, import_react68.forwardRef)(
|
|
10031
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10269
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
10032
10270
|
Section,
|
|
10033
10271
|
{
|
|
10034
10272
|
ref,
|
|
@@ -10042,7 +10280,7 @@ var SubSection = (0, import_react68.forwardRef)(
|
|
|
10042
10280
|
);
|
|
10043
10281
|
SubSection.displayName = "SubSection";
|
|
10044
10282
|
var DividingSubsection = (0, import_react68.forwardRef)(
|
|
10045
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10283
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
10046
10284
|
SubSection,
|
|
10047
10285
|
{
|
|
10048
10286
|
ref,
|
|
@@ -10055,14 +10293,14 @@ DividingSubsection.displayName = "DividingSubsection";
|
|
|
10055
10293
|
|
|
10056
10294
|
// src/separator/Separator.tsx
|
|
10057
10295
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
10058
|
-
var
|
|
10296
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
10059
10297
|
function Separator3({
|
|
10060
10298
|
className,
|
|
10061
10299
|
orientation = "horizontal",
|
|
10062
10300
|
decorative = true,
|
|
10063
10301
|
...props
|
|
10064
10302
|
}) {
|
|
10065
|
-
return /* @__PURE__ */ (0,
|
|
10303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10066
10304
|
SeparatorPrimitive.Root,
|
|
10067
10305
|
{
|
|
10068
10306
|
"data-slot": "separator",
|
|
@@ -10078,7 +10316,7 @@ function Separator3({
|
|
|
10078
10316
|
}
|
|
10079
10317
|
|
|
10080
10318
|
// src/section-group/SectionGroup.tsx
|
|
10081
|
-
var
|
|
10319
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
10082
10320
|
var SectionGroupItem = ({
|
|
10083
10321
|
className,
|
|
10084
10322
|
contentClassName,
|
|
@@ -10087,17 +10325,17 @@ var SectionGroupItem = ({
|
|
|
10087
10325
|
children,
|
|
10088
10326
|
divider = true
|
|
10089
10327
|
}) => {
|
|
10090
|
-
return /* @__PURE__ */ (0,
|
|
10091
|
-
divider && /* @__PURE__ */ (0,
|
|
10092
|
-
(title || subtitle) && /* @__PURE__ */ (0,
|
|
10093
|
-
title && /* @__PURE__ */ (0,
|
|
10094
|
-
subtitle && /* @__PURE__ */ (0,
|
|
10328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("section", { className: cn("flex flex-col gap-5", className), children: [
|
|
10329
|
+
divider && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: cn("h-px w-full bg-[var(--section-group-divider-bg)]") }),
|
|
10330
|
+
(title || subtitle) && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-col gap-1 px-8", children: [
|
|
10331
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h3", { className: "text-base font-semibold leading-6 text-[var(--section-group-muted-text)]", children: title }),
|
|
10332
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "text-sm font-medium leading-6 text-[var(--section-group-muted-text)]", children: subtitle })
|
|
10095
10333
|
] }),
|
|
10096
|
-
/* @__PURE__ */ (0,
|
|
10334
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: cn("flex flex-col gap-4 px-8", contentClassName), children })
|
|
10097
10335
|
] });
|
|
10098
10336
|
};
|
|
10099
10337
|
var SectionGroupRoot = ({ className, title, actions, children }) => {
|
|
10100
|
-
return /* @__PURE__ */ (0,
|
|
10338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
10101
10339
|
"div",
|
|
10102
10340
|
{
|
|
10103
10341
|
className: cn(
|
|
@@ -10106,18 +10344,18 @@ var SectionGroupRoot = ({ className, title, actions, children }) => {
|
|
|
10106
10344
|
className
|
|
10107
10345
|
),
|
|
10108
10346
|
children: [
|
|
10109
|
-
(title || actions) && /* @__PURE__ */ (0,
|
|
10110
|
-
title && /* @__PURE__ */ (0,
|
|
10111
|
-
actions && /* @__PURE__ */ (0,
|
|
10347
|
+
(title || actions) && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex items-center gap-6 px-8", children: [
|
|
10348
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h2", { className: "flex-1 text-lg font-bold leading-6 text-[var(--section-group-title-color)] opacity-90", children: title }),
|
|
10349
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "flex items-center gap-2", children: actions })
|
|
10112
10350
|
] }),
|
|
10113
10351
|
children
|
|
10114
10352
|
]
|
|
10115
10353
|
}
|
|
10116
10354
|
);
|
|
10117
10355
|
};
|
|
10118
|
-
var SectionGroupLabel = ({ id, title, description }) => /* @__PURE__ */ (0,
|
|
10119
|
-
/* @__PURE__ */ (0,
|
|
10120
|
-
description && /* @__PURE__ */ (0,
|
|
10356
|
+
var SectionGroupLabel = ({ id, title, description }) => /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { id, children: [
|
|
10357
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "font-semibold leading-6", children: title }),
|
|
10358
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "text-sm font-medium leading-6 text-[var(--section-group-muted-text)]", children: description })
|
|
10121
10359
|
] });
|
|
10122
10360
|
var SectionGroup = Object.assign(SectionGroupRoot, {
|
|
10123
10361
|
Item: SectionGroupItem,
|
|
@@ -10127,24 +10365,24 @@ var SectionGroup = Object.assign(SectionGroupRoot, {
|
|
|
10127
10365
|
// src/sheet/Sheet.tsx
|
|
10128
10366
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
10129
10367
|
var import_lucide_react29 = require("lucide-react");
|
|
10130
|
-
var
|
|
10368
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
10131
10369
|
function Sheet({ ...props }) {
|
|
10132
|
-
return /* @__PURE__ */ (0,
|
|
10370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
10133
10371
|
}
|
|
10134
10372
|
function SheetTrigger({ ...props }) {
|
|
10135
|
-
return /* @__PURE__ */ (0,
|
|
10373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
10136
10374
|
}
|
|
10137
10375
|
function SheetClose({ ...props }) {
|
|
10138
|
-
return /* @__PURE__ */ (0,
|
|
10376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
10139
10377
|
}
|
|
10140
10378
|
function SheetPortal({ ...props }) {
|
|
10141
|
-
return /* @__PURE__ */ (0,
|
|
10379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
10142
10380
|
}
|
|
10143
10381
|
function SheetOverlay({
|
|
10144
10382
|
className,
|
|
10145
10383
|
...props
|
|
10146
10384
|
}) {
|
|
10147
|
-
return /* @__PURE__ */ (0,
|
|
10385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10148
10386
|
SheetPrimitive.Overlay,
|
|
10149
10387
|
{
|
|
10150
10388
|
"data-slot": "sheet-overlay",
|
|
@@ -10162,9 +10400,9 @@ function SheetContent({
|
|
|
10162
10400
|
side = "right",
|
|
10163
10401
|
...props
|
|
10164
10402
|
}) {
|
|
10165
|
-
return /* @__PURE__ */ (0,
|
|
10166
|
-
/* @__PURE__ */ (0,
|
|
10167
|
-
/* @__PURE__ */ (0,
|
|
10403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(SheetPortal, { children: [
|
|
10404
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(SheetOverlay, {}),
|
|
10405
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
10168
10406
|
SheetPrimitive.Content,
|
|
10169
10407
|
{
|
|
10170
10408
|
"data-slot": "sheet-content",
|
|
@@ -10179,9 +10417,9 @@ function SheetContent({
|
|
|
10179
10417
|
...props,
|
|
10180
10418
|
children: [
|
|
10181
10419
|
children,
|
|
10182
|
-
/* @__PURE__ */ (0,
|
|
10183
|
-
/* @__PURE__ */ (0,
|
|
10184
|
-
/* @__PURE__ */ (0,
|
|
10420
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.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: [
|
|
10421
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_lucide_react29.XIcon, { className: "size-4" }),
|
|
10422
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "sr-only", children: "Close" })
|
|
10185
10423
|
] })
|
|
10186
10424
|
]
|
|
10187
10425
|
}
|
|
@@ -10189,7 +10427,7 @@ function SheetContent({
|
|
|
10189
10427
|
] });
|
|
10190
10428
|
}
|
|
10191
10429
|
function SheetHeader({ className, ...props }) {
|
|
10192
|
-
return /* @__PURE__ */ (0,
|
|
10430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10193
10431
|
"div",
|
|
10194
10432
|
{
|
|
10195
10433
|
"data-slot": "sheet-header",
|
|
@@ -10199,7 +10437,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
10199
10437
|
);
|
|
10200
10438
|
}
|
|
10201
10439
|
function SheetFooter({ className, ...props }) {
|
|
10202
|
-
return /* @__PURE__ */ (0,
|
|
10440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10203
10441
|
"div",
|
|
10204
10442
|
{
|
|
10205
10443
|
"data-slot": "sheet-footer",
|
|
@@ -10212,7 +10450,7 @@ function SheetTitle({
|
|
|
10212
10450
|
className,
|
|
10213
10451
|
...props
|
|
10214
10452
|
}) {
|
|
10215
|
-
return /* @__PURE__ */ (0,
|
|
10453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10216
10454
|
SheetPrimitive.Title,
|
|
10217
10455
|
{
|
|
10218
10456
|
"data-slot": "sheet-title",
|
|
@@ -10225,7 +10463,7 @@ function SheetDescription({
|
|
|
10225
10463
|
className,
|
|
10226
10464
|
...props
|
|
10227
10465
|
}) {
|
|
10228
|
-
return /* @__PURE__ */ (0,
|
|
10466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10229
10467
|
SheetPrimitive.Description,
|
|
10230
10468
|
{
|
|
10231
10469
|
"data-slot": "sheet-description",
|
|
@@ -10236,15 +10474,15 @@ function SheetDescription({
|
|
|
10236
10474
|
}
|
|
10237
10475
|
|
|
10238
10476
|
// src/sidebar/Sidebar.tsx
|
|
10239
|
-
var
|
|
10477
|
+
var React29 = __toESM(require("react"), 1);
|
|
10240
10478
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
10241
10479
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
10242
10480
|
var import_lucide_react30 = require("lucide-react");
|
|
10243
10481
|
|
|
10244
10482
|
// src/skeleton/Skeleton.tsx
|
|
10245
|
-
var
|
|
10483
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
10246
10484
|
function Skeleton({ className, ...props }) {
|
|
10247
|
-
return /* @__PURE__ */ (0,
|
|
10485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
10248
10486
|
"div",
|
|
10249
10487
|
{
|
|
10250
10488
|
"data-slot": "skeleton",
|
|
@@ -10274,7 +10512,7 @@ function useSidebarMenuButton() {
|
|
|
10274
10512
|
}
|
|
10275
10513
|
|
|
10276
10514
|
// src/sidebar/SidebarIcon.tsx
|
|
10277
|
-
var
|
|
10515
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
10278
10516
|
var SidebarIcon = ({
|
|
10279
10517
|
children,
|
|
10280
10518
|
isActive: isActiveProp,
|
|
@@ -10291,7 +10529,7 @@ var SidebarIcon = ({
|
|
|
10291
10529
|
}
|
|
10292
10530
|
return highlighted ? "bg-[var(--chekin-color-surface-pressed)]" : "bg-[var(--chekin-color-surface-input-empty)]";
|
|
10293
10531
|
})();
|
|
10294
|
-
return /* @__PURE__ */ (0,
|
|
10532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10295
10533
|
"div",
|
|
10296
10534
|
{
|
|
10297
10535
|
className: cn(
|
|
@@ -10324,12 +10562,12 @@ function useSidebarSafe() {
|
|
|
10324
10562
|
}
|
|
10325
10563
|
|
|
10326
10564
|
// src/sidebar/Sidebar.tsx
|
|
10327
|
-
var
|
|
10565
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
10328
10566
|
var SIDEBAR_COOKIE_NAME_DEFAULT = "sidebar_state";
|
|
10329
10567
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
10330
10568
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
10331
10569
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
10332
|
-
var SidebarProvider =
|
|
10570
|
+
var SidebarProvider = React29.forwardRef(
|
|
10333
10571
|
({
|
|
10334
10572
|
defaultOpen = true,
|
|
10335
10573
|
open: openProp,
|
|
@@ -10341,10 +10579,10 @@ var SidebarProvider = React28.forwardRef(
|
|
|
10341
10579
|
...props
|
|
10342
10580
|
}, ref) => {
|
|
10343
10581
|
const isMobile3 = useIsMobile({ breakpoint: 641 });
|
|
10344
|
-
const [openMobile, setOpenMobile] =
|
|
10345
|
-
const [_open, _setOpen] =
|
|
10582
|
+
const [openMobile, setOpenMobile] = React29.useState(false);
|
|
10583
|
+
const [_open, _setOpen] = React29.useState(defaultOpen);
|
|
10346
10584
|
const open = openProp ?? _open;
|
|
10347
|
-
const setOpen =
|
|
10585
|
+
const setOpen = React29.useCallback(
|
|
10348
10586
|
(value) => {
|
|
10349
10587
|
const openState = typeof value === "function" ? value(open) : value;
|
|
10350
10588
|
if (setOpenProp) {
|
|
@@ -10356,10 +10594,10 @@ var SidebarProvider = React28.forwardRef(
|
|
|
10356
10594
|
},
|
|
10357
10595
|
[setOpenProp, open, stateName]
|
|
10358
10596
|
);
|
|
10359
|
-
const toggleSidebar =
|
|
10597
|
+
const toggleSidebar = React29.useCallback(() => {
|
|
10360
10598
|
return isMobile3 ? setOpenMobile((value) => !value) : setOpen((value) => !value);
|
|
10361
10599
|
}, [isMobile3, setOpen]);
|
|
10362
|
-
|
|
10600
|
+
React29.useEffect(() => {
|
|
10363
10601
|
const handleKeyDown = (event) => {
|
|
10364
10602
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
10365
10603
|
event.preventDefault();
|
|
@@ -10370,7 +10608,7 @@ var SidebarProvider = React28.forwardRef(
|
|
|
10370
10608
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
10371
10609
|
}, [toggleSidebar]);
|
|
10372
10610
|
const state = open ? "expanded" : "collapsed";
|
|
10373
|
-
const contextValue =
|
|
10611
|
+
const contextValue = React29.useMemo(
|
|
10374
10612
|
() => ({
|
|
10375
10613
|
state,
|
|
10376
10614
|
open,
|
|
@@ -10382,7 +10620,7 @@ var SidebarProvider = React28.forwardRef(
|
|
|
10382
10620
|
}),
|
|
10383
10621
|
[state, open, setOpen, isMobile3, openMobile, setOpenMobile, toggleSidebar]
|
|
10384
10622
|
);
|
|
10385
|
-
return /* @__PURE__ */ (0,
|
|
10623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10386
10624
|
"div",
|
|
10387
10625
|
{
|
|
10388
10626
|
style,
|
|
@@ -10398,7 +10636,7 @@ var SidebarProvider = React28.forwardRef(
|
|
|
10398
10636
|
}
|
|
10399
10637
|
);
|
|
10400
10638
|
SidebarProvider.displayName = "SidebarProvider";
|
|
10401
|
-
var Sidebar =
|
|
10639
|
+
var Sidebar = React29.forwardRef(
|
|
10402
10640
|
({
|
|
10403
10641
|
side = "left",
|
|
10404
10642
|
variant = "sidebar",
|
|
@@ -10409,7 +10647,7 @@ var Sidebar = React28.forwardRef(
|
|
|
10409
10647
|
}, ref) => {
|
|
10410
10648
|
const { isMobile: isMobile3, state, openMobile, setOpenMobile } = useSidebar();
|
|
10411
10649
|
if (collapsible === "none") {
|
|
10412
|
-
return /* @__PURE__ */ (0,
|
|
10650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10413
10651
|
"div",
|
|
10414
10652
|
{
|
|
10415
10653
|
className: cn(
|
|
@@ -10423,7 +10661,7 @@ var Sidebar = React28.forwardRef(
|
|
|
10423
10661
|
);
|
|
10424
10662
|
}
|
|
10425
10663
|
if (isMobile3) {
|
|
10426
|
-
return /* @__PURE__ */ (0,
|
|
10664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
10427
10665
|
SheetContent,
|
|
10428
10666
|
{
|
|
10429
10667
|
"data-sidebar": "sidebar",
|
|
@@ -10435,16 +10673,16 @@ var Sidebar = React28.forwardRef(
|
|
|
10435
10673
|
style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
|
|
10436
10674
|
side,
|
|
10437
10675
|
children: [
|
|
10438
|
-
/* @__PURE__ */ (0,
|
|
10439
|
-
/* @__PURE__ */ (0,
|
|
10440
|
-
/* @__PURE__ */ (0,
|
|
10676
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
10677
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
10678
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
10441
10679
|
] }),
|
|
10442
|
-
/* @__PURE__ */ (0,
|
|
10680
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
10443
10681
|
]
|
|
10444
10682
|
}
|
|
10445
10683
|
) });
|
|
10446
10684
|
}
|
|
10447
|
-
return /* @__PURE__ */ (0,
|
|
10685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
10448
10686
|
"div",
|
|
10449
10687
|
{
|
|
10450
10688
|
ref,
|
|
@@ -10455,7 +10693,7 @@ var Sidebar = React28.forwardRef(
|
|
|
10455
10693
|
"data-variant": variant,
|
|
10456
10694
|
"data-side": side,
|
|
10457
10695
|
children: [
|
|
10458
|
-
/* @__PURE__ */ (0,
|
|
10696
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10459
10697
|
"div",
|
|
10460
10698
|
{
|
|
10461
10699
|
className: cn(
|
|
@@ -10466,7 +10704,7 @@ var Sidebar = React28.forwardRef(
|
|
|
10466
10704
|
)
|
|
10467
10705
|
}
|
|
10468
10706
|
),
|
|
10469
|
-
/* @__PURE__ */ (0,
|
|
10707
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10470
10708
|
"div",
|
|
10471
10709
|
{
|
|
10472
10710
|
className: cn(
|
|
@@ -10476,7 +10714,7 @@ var Sidebar = React28.forwardRef(
|
|
|
10476
10714
|
className
|
|
10477
10715
|
),
|
|
10478
10716
|
...props,
|
|
10479
|
-
children: /* @__PURE__ */ (0,
|
|
10717
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10480
10718
|
"div",
|
|
10481
10719
|
{
|
|
10482
10720
|
"data-sidebar": "sidebar",
|
|
@@ -10492,9 +10730,9 @@ var Sidebar = React28.forwardRef(
|
|
|
10492
10730
|
}
|
|
10493
10731
|
);
|
|
10494
10732
|
Sidebar.displayName = "Sidebar";
|
|
10495
|
-
var SidebarTrigger =
|
|
10733
|
+
var SidebarTrigger = React29.forwardRef(({ className, onClick, icon, ...props }, ref) => {
|
|
10496
10734
|
const { toggleSidebar, open, isMobile: isMobile3, openMobile } = useSidebar();
|
|
10497
|
-
return /* @__PURE__ */ (0,
|
|
10735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
10498
10736
|
Button,
|
|
10499
10737
|
{
|
|
10500
10738
|
ref,
|
|
@@ -10512,17 +10750,17 @@ var SidebarTrigger = React28.forwardRef(({ className, onClick, icon, ...props },
|
|
|
10512
10750
|
},
|
|
10513
10751
|
...props,
|
|
10514
10752
|
children: [
|
|
10515
|
-
icon || (isMobile3 ? openMobile : open) ? icon || /* @__PURE__ */ (0,
|
|
10516
|
-
/* @__PURE__ */ (0,
|
|
10753
|
+
icon || (isMobile3 ? openMobile : open) ? icon || /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react30.ArrowLeftFromLineIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react30.ArrowRightFromLineIcon, {}),
|
|
10754
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
10517
10755
|
]
|
|
10518
10756
|
}
|
|
10519
10757
|
);
|
|
10520
10758
|
});
|
|
10521
10759
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
10522
|
-
var SidebarRail =
|
|
10760
|
+
var SidebarRail = React29.forwardRef(
|
|
10523
10761
|
({ className, ...props }, ref) => {
|
|
10524
10762
|
const { toggleSidebar } = useSidebar();
|
|
10525
|
-
return /* @__PURE__ */ (0,
|
|
10763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10526
10764
|
"button",
|
|
10527
10765
|
{
|
|
10528
10766
|
ref,
|
|
@@ -10545,8 +10783,8 @@ var SidebarRail = React28.forwardRef(
|
|
|
10545
10783
|
}
|
|
10546
10784
|
);
|
|
10547
10785
|
SidebarRail.displayName = "SidebarRail";
|
|
10548
|
-
var SidebarInset =
|
|
10549
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10786
|
+
var SidebarInset = React29.forwardRef(
|
|
10787
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10550
10788
|
"main",
|
|
10551
10789
|
{
|
|
10552
10790
|
ref,
|
|
@@ -10560,7 +10798,7 @@ var SidebarInset = React28.forwardRef(
|
|
|
10560
10798
|
)
|
|
10561
10799
|
);
|
|
10562
10800
|
SidebarInset.displayName = "SidebarInset";
|
|
10563
|
-
var SidebarInput =
|
|
10801
|
+
var SidebarInput = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10564
10802
|
LegacyInput,
|
|
10565
10803
|
{
|
|
10566
10804
|
ref,
|
|
@@ -10570,8 +10808,8 @@ var SidebarInput = React28.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
10570
10808
|
}
|
|
10571
10809
|
));
|
|
10572
10810
|
SidebarInput.displayName = "SidebarInput";
|
|
10573
|
-
var SidebarHeader =
|
|
10574
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10811
|
+
var SidebarHeader = React29.forwardRef(
|
|
10812
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10575
10813
|
"div",
|
|
10576
10814
|
{
|
|
10577
10815
|
ref,
|
|
@@ -10582,8 +10820,8 @@ var SidebarHeader = React28.forwardRef(
|
|
|
10582
10820
|
)
|
|
10583
10821
|
);
|
|
10584
10822
|
SidebarHeader.displayName = "SidebarHeader";
|
|
10585
|
-
var SidebarFooter =
|
|
10586
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10823
|
+
var SidebarFooter = React29.forwardRef(
|
|
10824
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10587
10825
|
"div",
|
|
10588
10826
|
{
|
|
10589
10827
|
ref,
|
|
@@ -10594,7 +10832,7 @@ var SidebarFooter = React28.forwardRef(
|
|
|
10594
10832
|
)
|
|
10595
10833
|
);
|
|
10596
10834
|
SidebarFooter.displayName = "SidebarFooter";
|
|
10597
|
-
var SidebarSeparator =
|
|
10835
|
+
var SidebarSeparator = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10598
10836
|
Separator3,
|
|
10599
10837
|
{
|
|
10600
10838
|
ref,
|
|
@@ -10604,8 +10842,8 @@ var SidebarSeparator = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
10604
10842
|
}
|
|
10605
10843
|
));
|
|
10606
10844
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
10607
|
-
var SidebarContent =
|
|
10608
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10845
|
+
var SidebarContent = React29.forwardRef(
|
|
10846
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10609
10847
|
"div",
|
|
10610
10848
|
{
|
|
10611
10849
|
ref,
|
|
@@ -10619,8 +10857,8 @@ var SidebarContent = React28.forwardRef(
|
|
|
10619
10857
|
)
|
|
10620
10858
|
);
|
|
10621
10859
|
SidebarContent.displayName = "SidebarContent";
|
|
10622
|
-
var SidebarGroup =
|
|
10623
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10860
|
+
var SidebarGroup = React29.forwardRef(
|
|
10861
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10624
10862
|
"div",
|
|
10625
10863
|
{
|
|
10626
10864
|
ref,
|
|
@@ -10631,9 +10869,9 @@ var SidebarGroup = React28.forwardRef(
|
|
|
10631
10869
|
)
|
|
10632
10870
|
);
|
|
10633
10871
|
SidebarGroup.displayName = "SidebarGroup";
|
|
10634
|
-
var SidebarGroupLabel =
|
|
10872
|
+
var SidebarGroupLabel = React29.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
10635
10873
|
const Comp = asChild ? import_react_slot4.Slot : "div";
|
|
10636
|
-
return /* @__PURE__ */ (0,
|
|
10874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10637
10875
|
Comp,
|
|
10638
10876
|
{
|
|
10639
10877
|
ref,
|
|
@@ -10648,9 +10886,9 @@ var SidebarGroupLabel = React28.forwardRef(({ className, asChild = false, ...pro
|
|
|
10648
10886
|
);
|
|
10649
10887
|
});
|
|
10650
10888
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
10651
|
-
var SidebarGroupAction =
|
|
10889
|
+
var SidebarGroupAction = React29.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
10652
10890
|
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
10653
|
-
return /* @__PURE__ */ (0,
|
|
10891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10654
10892
|
Comp,
|
|
10655
10893
|
{
|
|
10656
10894
|
ref,
|
|
@@ -10664,8 +10902,8 @@ var SidebarGroupAction = React28.forwardRef(({ className, asChild = false, ...pr
|
|
|
10664
10902
|
);
|
|
10665
10903
|
});
|
|
10666
10904
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
10667
|
-
var SidebarGroupContent =
|
|
10668
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10905
|
+
var SidebarGroupContent = React29.forwardRef(
|
|
10906
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10669
10907
|
"div",
|
|
10670
10908
|
{
|
|
10671
10909
|
ref,
|
|
@@ -10676,8 +10914,8 @@ var SidebarGroupContent = React28.forwardRef(
|
|
|
10676
10914
|
)
|
|
10677
10915
|
);
|
|
10678
10916
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
10679
|
-
var SidebarMenu =
|
|
10680
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10917
|
+
var SidebarMenu = React29.forwardRef(
|
|
10918
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10681
10919
|
"ul",
|
|
10682
10920
|
{
|
|
10683
10921
|
ref,
|
|
@@ -10688,8 +10926,8 @@ var SidebarMenu = React28.forwardRef(
|
|
|
10688
10926
|
)
|
|
10689
10927
|
);
|
|
10690
10928
|
SidebarMenu.displayName = "SidebarMenu";
|
|
10691
|
-
var SidebarMenuItem =
|
|
10692
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10929
|
+
var SidebarMenuItem = React29.forwardRef(
|
|
10930
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10693
10931
|
"li",
|
|
10694
10932
|
{
|
|
10695
10933
|
ref,
|
|
@@ -10720,7 +10958,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
|
10720
10958
|
}
|
|
10721
10959
|
}
|
|
10722
10960
|
);
|
|
10723
|
-
var SidebarMenuButton =
|
|
10961
|
+
var SidebarMenuButton = React29.forwardRef(
|
|
10724
10962
|
({
|
|
10725
10963
|
asChild = false,
|
|
10726
10964
|
isActive = false,
|
|
@@ -10733,7 +10971,7 @@ var SidebarMenuButton = React28.forwardRef(
|
|
|
10733
10971
|
}, ref) => {
|
|
10734
10972
|
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
10735
10973
|
const { isMobile: isMobile3, state } = useSidebar();
|
|
10736
|
-
const button = /* @__PURE__ */ (0,
|
|
10974
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10737
10975
|
Comp,
|
|
10738
10976
|
{
|
|
10739
10977
|
ref,
|
|
@@ -10746,12 +10984,12 @@ var SidebarMenuButton = React28.forwardRef(
|
|
|
10746
10984
|
}
|
|
10747
10985
|
);
|
|
10748
10986
|
if (!tooltip) {
|
|
10749
|
-
return /* @__PURE__ */ (0,
|
|
10987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SidebarMenuButtonContext.Provider, { value: { isActive, highlighted }, children: button });
|
|
10750
10988
|
}
|
|
10751
10989
|
const tooltipProps = typeof tooltip === "string" ? { children: tooltip } : tooltip;
|
|
10752
|
-
return /* @__PURE__ */ (0,
|
|
10753
|
-
/* @__PURE__ */ (0,
|
|
10754
|
-
/* @__PURE__ */ (0,
|
|
10990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SidebarMenuButtonContext.Provider, { value: { isActive, highlighted }, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Tooltip, { children: [
|
|
10991
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
10992
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10755
10993
|
TooltipContent,
|
|
10756
10994
|
{
|
|
10757
10995
|
side: "right",
|
|
@@ -10766,9 +11004,9 @@ var SidebarMenuButton = React28.forwardRef(
|
|
|
10766
11004
|
}
|
|
10767
11005
|
);
|
|
10768
11006
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
10769
|
-
var SidebarMenuAction =
|
|
11007
|
+
var SidebarMenuAction = React29.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
10770
11008
|
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
10771
|
-
return /* @__PURE__ */ (0,
|
|
11009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10772
11010
|
Comp,
|
|
10773
11011
|
{
|
|
10774
11012
|
ref,
|
|
@@ -10783,11 +11021,11 @@ var SidebarMenuAction = React28.forwardRef(({ className, asChild = false, showOn
|
|
|
10783
11021
|
);
|
|
10784
11022
|
});
|
|
10785
11023
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
10786
|
-
var SidebarMenuBadge =
|
|
11024
|
+
var SidebarMenuBadge = React29.forwardRef(
|
|
10787
11025
|
({ className, ...props }, ref) => {
|
|
10788
11026
|
const { open, isMobile: isMobile3, openMobile } = useSidebar();
|
|
10789
11027
|
const isOpen = isMobile3 ? openMobile : open;
|
|
10790
|
-
return /* @__PURE__ */ (0,
|
|
11028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10791
11029
|
"div",
|
|
10792
11030
|
{
|
|
10793
11031
|
ref,
|
|
@@ -10803,9 +11041,9 @@ var SidebarMenuBadge = React28.forwardRef(
|
|
|
10803
11041
|
}
|
|
10804
11042
|
);
|
|
10805
11043
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
10806
|
-
var SidebarMenuSkeleton =
|
|
10807
|
-
const width =
|
|
10808
|
-
return /* @__PURE__ */ (0,
|
|
11044
|
+
var SidebarMenuSkeleton = React29.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
11045
|
+
const width = React29.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
11046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
10809
11047
|
"div",
|
|
10810
11048
|
{
|
|
10811
11049
|
ref,
|
|
@@ -10813,8 +11051,8 @@ var SidebarMenuSkeleton = React28.forwardRef(({ className, showIcon = false, ...
|
|
|
10813
11051
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
10814
11052
|
...props,
|
|
10815
11053
|
children: [
|
|
10816
|
-
showIcon && /* @__PURE__ */ (0,
|
|
10817
|
-
/* @__PURE__ */ (0,
|
|
11054
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
11055
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10818
11056
|
Skeleton,
|
|
10819
11057
|
{
|
|
10820
11058
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -10827,8 +11065,8 @@ var SidebarMenuSkeleton = React28.forwardRef(({ className, showIcon = false, ...
|
|
|
10827
11065
|
);
|
|
10828
11066
|
});
|
|
10829
11067
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
10830
|
-
var SidebarMenuSub =
|
|
10831
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
11068
|
+
var SidebarMenuSub = React29.forwardRef(
|
|
11069
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10832
11070
|
"ul",
|
|
10833
11071
|
{
|
|
10834
11072
|
ref,
|
|
@@ -10842,8 +11080,8 @@ var SidebarMenuSub = React28.forwardRef(
|
|
|
10842
11080
|
)
|
|
10843
11081
|
);
|
|
10844
11082
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
10845
|
-
var SidebarMenuSubItem =
|
|
10846
|
-
({ ...props }, ref) => /* @__PURE__ */ (0,
|
|
11083
|
+
var SidebarMenuSubItem = React29.forwardRef(
|
|
11084
|
+
({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("li", { ref, ...props })
|
|
10847
11085
|
);
|
|
10848
11086
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
10849
11087
|
var sidebarMenuSubButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
@@ -10866,7 +11104,7 @@ var sidebarMenuSubButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
|
10866
11104
|
}
|
|
10867
11105
|
}
|
|
10868
11106
|
);
|
|
10869
|
-
var SidebarMenuSubButton =
|
|
11107
|
+
var SidebarMenuSubButton = React29.forwardRef(
|
|
10870
11108
|
({
|
|
10871
11109
|
asChild = false,
|
|
10872
11110
|
isActive,
|
|
@@ -10876,7 +11114,7 @@ var SidebarMenuSubButton = React28.forwardRef(
|
|
|
10876
11114
|
...props
|
|
10877
11115
|
}, ref) => {
|
|
10878
11116
|
const Comp = asChild ? import_react_slot4.Slot : "a";
|
|
10879
|
-
return /* @__PURE__ */ (0,
|
|
11117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10880
11118
|
Comp,
|
|
10881
11119
|
{
|
|
10882
11120
|
ref,
|
|
@@ -10899,7 +11137,7 @@ var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => r
|
|
|
10899
11137
|
var import_react73 = require("react");
|
|
10900
11138
|
var import_react_i18next16 = require("react-i18next");
|
|
10901
11139
|
var import_react_signature_canvas = __toESM(require("react-signature-canvas"), 1);
|
|
10902
|
-
var
|
|
11140
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
10903
11141
|
var SIGNATURE_PROPS = {
|
|
10904
11142
|
penColor: "var(--chekin-blue-900)",
|
|
10905
11143
|
minWidth: 1.5,
|
|
@@ -11033,13 +11271,13 @@ var SignatureCanvas = (0, import_react73.forwardRef)(
|
|
|
11033
11271
|
},
|
|
11034
11272
|
getCanvas: (...args) => canvasRef.current?.getCanvas(...args)
|
|
11035
11273
|
}));
|
|
11036
|
-
return /* @__PURE__ */ (0,
|
|
11274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
11037
11275
|
"div",
|
|
11038
11276
|
{
|
|
11039
11277
|
ref: containerRef,
|
|
11040
11278
|
className: cn("relative flex w-full flex-col items-center", className),
|
|
11041
11279
|
children: [
|
|
11042
|
-
/* @__PURE__ */ (0,
|
|
11280
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
11043
11281
|
"div",
|
|
11044
11282
|
{
|
|
11045
11283
|
className: cn(
|
|
@@ -11048,7 +11286,7 @@ var SignatureCanvas = (0, import_react73.forwardRef)(
|
|
|
11048
11286
|
),
|
|
11049
11287
|
style: { width: size.width, height: size.height },
|
|
11050
11288
|
children: [
|
|
11051
|
-
/* @__PURE__ */ (0,
|
|
11289
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11052
11290
|
import_react_signature_canvas.default,
|
|
11053
11291
|
{
|
|
11054
11292
|
ref: canvasRef,
|
|
@@ -11062,7 +11300,7 @@ var SignatureCanvas = (0, import_react73.forwardRef)(
|
|
|
11062
11300
|
...SIGNATURE_PROPS
|
|
11063
11301
|
}
|
|
11064
11302
|
),
|
|
11065
|
-
!enabled && /* @__PURE__ */ (0,
|
|
11303
|
+
!enabled && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11066
11304
|
"button",
|
|
11067
11305
|
{
|
|
11068
11306
|
type: "button",
|
|
@@ -11072,7 +11310,7 @@ var SignatureCanvas = (0, import_react73.forwardRef)(
|
|
|
11072
11310
|
),
|
|
11073
11311
|
onClick: onEnable,
|
|
11074
11312
|
"data-testid": "signature-placeholder",
|
|
11075
|
-
children: /* @__PURE__ */ (0,
|
|
11313
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11076
11314
|
"span",
|
|
11077
11315
|
{
|
|
11078
11316
|
className: cn(
|
|
@@ -11087,14 +11325,14 @@ var SignatureCanvas = (0, import_react73.forwardRef)(
|
|
|
11087
11325
|
]
|
|
11088
11326
|
}
|
|
11089
11327
|
),
|
|
11090
|
-
/* @__PURE__ */ (0,
|
|
11328
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11091
11329
|
"div",
|
|
11092
11330
|
{
|
|
11093
11331
|
className: cn("text-right", {
|
|
11094
11332
|
invisible: !enabled || !hasSignature
|
|
11095
11333
|
}),
|
|
11096
11334
|
style: { width: size.width },
|
|
11097
|
-
children: /* @__PURE__ */ (0,
|
|
11335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11098
11336
|
Button,
|
|
11099
11337
|
{
|
|
11100
11338
|
variant: "link",
|
|
@@ -11116,17 +11354,17 @@ var SignatureCanvas = (0, import_react73.forwardRef)(
|
|
|
11116
11354
|
SignatureCanvas.displayName = "SignatureCanvas";
|
|
11117
11355
|
|
|
11118
11356
|
// src/carousel/Carousel.tsx
|
|
11119
|
-
var
|
|
11357
|
+
var React36 = __toESM(require("react"), 1);
|
|
11120
11358
|
|
|
11121
11359
|
// src/carousel/CarouselControls.tsx
|
|
11122
|
-
var
|
|
11360
|
+
var React31 = __toESM(require("react"), 1);
|
|
11123
11361
|
var import_lucide_react31 = require("lucide-react");
|
|
11124
11362
|
|
|
11125
11363
|
// src/carousel/CarouselContext.tsx
|
|
11126
|
-
var
|
|
11127
|
-
var CarouselContext =
|
|
11364
|
+
var React30 = __toESM(require("react"), 1);
|
|
11365
|
+
var CarouselContext = React30.createContext(null);
|
|
11128
11366
|
function useCarouselContext(componentName) {
|
|
11129
|
-
const context =
|
|
11367
|
+
const context = React30.useContext(CarouselContext);
|
|
11130
11368
|
if (!context) {
|
|
11131
11369
|
throw new Error(`${componentName} must be used within CarouselRoot`);
|
|
11132
11370
|
}
|
|
@@ -11134,14 +11372,14 @@ function useCarouselContext(componentName) {
|
|
|
11134
11372
|
}
|
|
11135
11373
|
|
|
11136
11374
|
// src/carousel/CarouselControls.tsx
|
|
11137
|
-
var
|
|
11138
|
-
var CarouselPrevious =
|
|
11375
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
11376
|
+
var CarouselPrevious = React31.forwardRef(
|
|
11139
11377
|
({ className, children, onClick, ...props }, ref) => {
|
|
11140
11378
|
const { canGoPrevious, goToPrevious } = useCarouselContext("CarouselPrevious");
|
|
11141
11379
|
if (!canGoPrevious) {
|
|
11142
11380
|
return null;
|
|
11143
11381
|
}
|
|
11144
|
-
return /* @__PURE__ */ (0,
|
|
11382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11145
11383
|
"button",
|
|
11146
11384
|
{
|
|
11147
11385
|
ref,
|
|
@@ -11159,19 +11397,19 @@ var CarouselPrevious = React30.forwardRef(
|
|
|
11159
11397
|
goToPrevious();
|
|
11160
11398
|
},
|
|
11161
11399
|
...props,
|
|
11162
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
11400
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react31.ChevronLeft, { className: "size-4" })
|
|
11163
11401
|
}
|
|
11164
11402
|
);
|
|
11165
11403
|
}
|
|
11166
11404
|
);
|
|
11167
11405
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
11168
|
-
var CarouselNext =
|
|
11406
|
+
var CarouselNext = React31.forwardRef(
|
|
11169
11407
|
({ className, children, onClick, ...props }, ref) => {
|
|
11170
11408
|
const { canGoNext, goToNext } = useCarouselContext("CarouselNext");
|
|
11171
11409
|
if (!canGoNext) {
|
|
11172
11410
|
return null;
|
|
11173
11411
|
}
|
|
11174
|
-
return /* @__PURE__ */ (0,
|
|
11412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11175
11413
|
"button",
|
|
11176
11414
|
{
|
|
11177
11415
|
ref,
|
|
@@ -11189,7 +11427,7 @@ var CarouselNext = React30.forwardRef(
|
|
|
11189
11427
|
goToNext();
|
|
11190
11428
|
},
|
|
11191
11429
|
...props,
|
|
11192
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
11430
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react31.ChevronRight, { className: "size-4" })
|
|
11193
11431
|
}
|
|
11194
11432
|
);
|
|
11195
11433
|
}
|
|
@@ -11197,9 +11435,9 @@ var CarouselNext = React30.forwardRef(
|
|
|
11197
11435
|
CarouselNext.displayName = "CarouselNext";
|
|
11198
11436
|
|
|
11199
11437
|
// src/carousel/CarouselRoot.tsx
|
|
11200
|
-
var
|
|
11201
|
-
var
|
|
11202
|
-
var CarouselRoot =
|
|
11438
|
+
var React32 = __toESM(require("react"), 1);
|
|
11439
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
11440
|
+
var CarouselRoot = React32.forwardRef(
|
|
11203
11441
|
({
|
|
11204
11442
|
className,
|
|
11205
11443
|
index: controlledIndex,
|
|
@@ -11210,8 +11448,8 @@ var CarouselRoot = React31.forwardRef(
|
|
|
11210
11448
|
children,
|
|
11211
11449
|
...props
|
|
11212
11450
|
}, ref) => {
|
|
11213
|
-
const [uncontrolledIndex, setUncontrolledIndex] =
|
|
11214
|
-
const [registeredSlideCount, setRegisteredSlideCount] =
|
|
11451
|
+
const [uncontrolledIndex, setUncontrolledIndex] = React32.useState(defaultIndex);
|
|
11452
|
+
const [registeredSlideCount, setRegisteredSlideCount] = React32.useState(0);
|
|
11215
11453
|
const slideCount = controlledSlideCount ?? registeredSlideCount;
|
|
11216
11454
|
const isControlled = controlledIndex !== void 0;
|
|
11217
11455
|
const index = isControlled ? controlledIndex : uncontrolledIndex;
|
|
@@ -11219,7 +11457,7 @@ var CarouselRoot = React31.forwardRef(
|
|
|
11219
11457
|
const normalizedIndex = Math.min(Math.max(index, 0), maxIndex);
|
|
11220
11458
|
const canGoPrevious = loop ? slideCount > 1 : normalizedIndex > 0;
|
|
11221
11459
|
const canGoNext = loop ? slideCount > 1 : normalizedIndex < maxIndex;
|
|
11222
|
-
const setIndex =
|
|
11460
|
+
const setIndex = React32.useCallback(
|
|
11223
11461
|
(nextIndex) => {
|
|
11224
11462
|
const clampedIndex = Math.min(Math.max(nextIndex, 0), maxIndex);
|
|
11225
11463
|
if (!isControlled) {
|
|
@@ -11229,23 +11467,23 @@ var CarouselRoot = React31.forwardRef(
|
|
|
11229
11467
|
},
|
|
11230
11468
|
[isControlled, maxIndex, onIndexChange]
|
|
11231
11469
|
);
|
|
11232
|
-
const goToPrevious =
|
|
11470
|
+
const goToPrevious = React32.useCallback(() => {
|
|
11233
11471
|
if (!canGoPrevious) {
|
|
11234
11472
|
return;
|
|
11235
11473
|
}
|
|
11236
11474
|
setIndex(normalizedIndex === 0 ? maxIndex : normalizedIndex - 1);
|
|
11237
11475
|
}, [canGoPrevious, maxIndex, normalizedIndex, setIndex]);
|
|
11238
|
-
const goToNext =
|
|
11476
|
+
const goToNext = React32.useCallback(() => {
|
|
11239
11477
|
if (!canGoNext) {
|
|
11240
11478
|
return;
|
|
11241
11479
|
}
|
|
11242
11480
|
setIndex(normalizedIndex === maxIndex ? 0 : normalizedIndex + 1);
|
|
11243
11481
|
}, [canGoNext, maxIndex, normalizedIndex, setIndex]);
|
|
11244
|
-
const registerSlide =
|
|
11482
|
+
const registerSlide = React32.useCallback(() => {
|
|
11245
11483
|
setRegisteredSlideCount((count) => count + 1);
|
|
11246
11484
|
return () => setRegisteredSlideCount((count) => Math.max(0, count - 1));
|
|
11247
11485
|
}, []);
|
|
11248
|
-
const contextValue =
|
|
11486
|
+
const contextValue = React32.useMemo(
|
|
11249
11487
|
() => ({
|
|
11250
11488
|
index: normalizedIndex,
|
|
11251
11489
|
slideCount,
|
|
@@ -11269,7 +11507,7 @@ var CarouselRoot = React31.forwardRef(
|
|
|
11269
11507
|
registerSlide
|
|
11270
11508
|
]
|
|
11271
11509
|
);
|
|
11272
|
-
return /* @__PURE__ */ (0,
|
|
11510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(CarouselContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
11273
11511
|
"div",
|
|
11274
11512
|
{
|
|
11275
11513
|
ref,
|
|
@@ -11284,12 +11522,12 @@ var CarouselRoot = React31.forwardRef(
|
|
|
11284
11522
|
CarouselRoot.displayName = "CarouselRoot";
|
|
11285
11523
|
|
|
11286
11524
|
// src/carousel/CarouselSlide.tsx
|
|
11287
|
-
var
|
|
11288
|
-
var
|
|
11289
|
-
var CarouselSlide =
|
|
11525
|
+
var React33 = __toESM(require("react"), 1);
|
|
11526
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
11527
|
+
var CarouselSlide = React33.forwardRef(({ className, ...props }, ref) => {
|
|
11290
11528
|
const { registerSlide } = useCarouselContext("CarouselSlide");
|
|
11291
|
-
|
|
11292
|
-
return /* @__PURE__ */ (0,
|
|
11529
|
+
React33.useEffect(() => registerSlide(), [registerSlide]);
|
|
11530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
11293
11531
|
"div",
|
|
11294
11532
|
{
|
|
11295
11533
|
ref,
|
|
@@ -11302,11 +11540,11 @@ var CarouselSlide = React32.forwardRef(({ className, ...props }, ref) => {
|
|
|
11302
11540
|
CarouselSlide.displayName = "CarouselSlide";
|
|
11303
11541
|
|
|
11304
11542
|
// src/carousel/CarouselTrack.tsx
|
|
11305
|
-
var
|
|
11306
|
-
var
|
|
11307
|
-
var CarouselTrack =
|
|
11543
|
+
var React34 = __toESM(require("react"), 1);
|
|
11544
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
11545
|
+
var CarouselTrack = React34.forwardRef(({ className, style, ...props }, ref) => {
|
|
11308
11546
|
const { index } = useCarouselContext("CarouselTrack");
|
|
11309
|
-
return /* @__PURE__ */ (0,
|
|
11547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
11310
11548
|
"div",
|
|
11311
11549
|
{
|
|
11312
11550
|
ref,
|
|
@@ -11323,9 +11561,9 @@ var CarouselTrack = React33.forwardRef(({ className, style, ...props }, ref) =>
|
|
|
11323
11561
|
CarouselTrack.displayName = "CarouselTrack";
|
|
11324
11562
|
|
|
11325
11563
|
// src/carousel/CarouselViewport.tsx
|
|
11326
|
-
var
|
|
11327
|
-
var
|
|
11328
|
-
var CarouselViewport =
|
|
11564
|
+
var React35 = __toESM(require("react"), 1);
|
|
11565
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
11566
|
+
var CarouselViewport = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
11329
11567
|
"div",
|
|
11330
11568
|
{
|
|
11331
11569
|
ref,
|
|
@@ -11337,28 +11575,28 @@ var CarouselViewport = React34.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
11337
11575
|
CarouselViewport.displayName = "CarouselViewport";
|
|
11338
11576
|
|
|
11339
11577
|
// src/carousel/Carousel.tsx
|
|
11340
|
-
var
|
|
11578
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
11341
11579
|
function Carousel({ children, slideCount, ...props }) {
|
|
11342
|
-
return /* @__PURE__ */ (0,
|
|
11343
|
-
/* @__PURE__ */ (0,
|
|
11344
|
-
/* @__PURE__ */ (0,
|
|
11345
|
-
/* @__PURE__ */ (0,
|
|
11580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(CarouselRoot, { slideCount: slideCount ?? React36.Children.count(children), ...props, children: [
|
|
11581
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(CarouselViewport, { children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(CarouselTrack, { children: React36.Children.map(children, (slide) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(CarouselSlide, { children: slide })) }) }),
|
|
11582
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(CarouselPrevious, {}),
|
|
11583
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(CarouselNext, {})
|
|
11346
11584
|
] });
|
|
11347
11585
|
}
|
|
11348
11586
|
|
|
11349
11587
|
// src/slider/Slider.tsx
|
|
11350
|
-
var
|
|
11588
|
+
var React37 = __toESM(require("react"), 1);
|
|
11351
11589
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
11352
|
-
var
|
|
11353
|
-
var Slider =
|
|
11590
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
11591
|
+
var Slider = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
11354
11592
|
SliderPrimitive.Root,
|
|
11355
11593
|
{
|
|
11356
11594
|
ref,
|
|
11357
11595
|
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
11358
11596
|
...props,
|
|
11359
11597
|
children: [
|
|
11360
|
-
/* @__PURE__ */ (0,
|
|
11361
|
-
/* @__PURE__ */ (0,
|
|
11598
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-[var(--slider-track-bg)]", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-[var(--slider-range-bg)]" }) }),
|
|
11599
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border cursor-pointer border-[var(--slider-thumb-border)] bg-[var(--slider-thumb-bg)] shadow transition-all hover:brightness-110 hover:scale-105 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--slider-focus-ring)] disabled:pointer-events-none disabled:opacity-50" })
|
|
11362
11600
|
]
|
|
11363
11601
|
}
|
|
11364
11602
|
));
|
|
@@ -11368,7 +11606,7 @@ Slider.displayName = SliderPrimitive.Root.displayName;
|
|
|
11368
11606
|
var import_react74 = require("react");
|
|
11369
11607
|
var import_lucide_react32 = require("lucide-react");
|
|
11370
11608
|
var import_react_i18next17 = require("react-i18next");
|
|
11371
|
-
var
|
|
11609
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
11372
11610
|
var SmallGridSingleItem = (0, import_react74.memo)(
|
|
11373
11611
|
({
|
|
11374
11612
|
title,
|
|
@@ -11389,7 +11627,7 @@ var SmallGridSingleItem = (0, import_react74.memo)(
|
|
|
11389
11627
|
};
|
|
11390
11628
|
const hasActions = !readOnly && (onDelete || onEdit);
|
|
11391
11629
|
const hasSwitch = onActiveSwitch && !readOnly;
|
|
11392
|
-
return /* @__PURE__ */ (0,
|
|
11630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
11393
11631
|
"div",
|
|
11394
11632
|
{
|
|
11395
11633
|
onClick: handleClick,
|
|
@@ -11403,13 +11641,13 @@ var SmallGridSingleItem = (0, import_react74.memo)(
|
|
|
11403
11641
|
className
|
|
11404
11642
|
),
|
|
11405
11643
|
children: [
|
|
11406
|
-
/* @__PURE__ */ (0,
|
|
11407
|
-
/* @__PURE__ */ (0,
|
|
11408
|
-
/* @__PURE__ */ (0,
|
|
11409
|
-
subtitle && /* @__PURE__ */ (0,
|
|
11644
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex w-full items-start justify-between gap-4", children: [
|
|
11645
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex-1", children: [
|
|
11646
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "line-clamp-2 overflow-hidden text-ellipsis break-all", children: title }),
|
|
11647
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "line-clamp-2 overflow-hidden text-ellipsis text-[15px] font-medium leading-6 text-[var(--chekin-color-gray-2)]", children: subtitle })
|
|
11410
11648
|
] }),
|
|
11411
|
-
hasActions && /* @__PURE__ */ (0,
|
|
11412
|
-
onDelete && /* @__PURE__ */ (0,
|
|
11649
|
+
hasActions && /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex items-center justify-end gap-2", children: [
|
|
11650
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
11413
11651
|
Button,
|
|
11414
11652
|
{
|
|
11415
11653
|
disabled,
|
|
@@ -11417,10 +11655,10 @@ var SmallGridSingleItem = (0, import_react74.memo)(
|
|
|
11417
11655
|
className: "size-8",
|
|
11418
11656
|
size: "icon",
|
|
11419
11657
|
variant: "outline",
|
|
11420
|
-
children: /* @__PURE__ */ (0,
|
|
11658
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react32.Trash2, { className: "h-5 w-5 text-[var(--chekin-color-brand-red)]" })
|
|
11421
11659
|
}
|
|
11422
11660
|
),
|
|
11423
|
-
onEdit && /* @__PURE__ */ (0,
|
|
11661
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
11424
11662
|
Button,
|
|
11425
11663
|
{
|
|
11426
11664
|
className: "size-8",
|
|
@@ -11428,12 +11666,12 @@ var SmallGridSingleItem = (0, import_react74.memo)(
|
|
|
11428
11666
|
disabled,
|
|
11429
11667
|
onClick: onEdit,
|
|
11430
11668
|
variant: "outline",
|
|
11431
|
-
children: /* @__PURE__ */ (0,
|
|
11669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react32.Pencil, { className: "h-5 w-5 text-[var(--chekin-color-brand-blue)]" })
|
|
11432
11670
|
}
|
|
11433
11671
|
)
|
|
11434
11672
|
] })
|
|
11435
11673
|
] }),
|
|
11436
|
-
hasSwitch && /* @__PURE__ */ (0,
|
|
11674
|
+
hasSwitch && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: cn("flex items-center", !active && "opacity-60"), children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
11437
11675
|
Switch,
|
|
11438
11676
|
{
|
|
11439
11677
|
onChange: onActiveSwitch,
|
|
@@ -11443,7 +11681,7 @@ var SmallGridSingleItem = (0, import_react74.memo)(
|
|
|
11443
11681
|
onClick: (event) => event.stopPropagation()
|
|
11444
11682
|
}
|
|
11445
11683
|
) }),
|
|
11446
|
-
error && /* @__PURE__ */ (0,
|
|
11684
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "absolute bottom-1 right-2 text-xs text-[var(--chekin-color-brand-red)]", children: error })
|
|
11447
11685
|
]
|
|
11448
11686
|
}
|
|
11449
11687
|
);
|
|
@@ -11454,7 +11692,7 @@ SmallGridSingleItem.displayName = "SmallGridSingleItem";
|
|
|
11454
11692
|
// src/sorting-action/SortingAction.tsx
|
|
11455
11693
|
var import_react_i18next18 = require("react-i18next");
|
|
11456
11694
|
var import_lucide_react33 = require("lucide-react");
|
|
11457
|
-
var
|
|
11695
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
11458
11696
|
function SortingAction({
|
|
11459
11697
|
value,
|
|
11460
11698
|
onSortChange,
|
|
@@ -11464,8 +11702,8 @@ function SortingAction({
|
|
|
11464
11702
|
onOpenChange
|
|
11465
11703
|
}) {
|
|
11466
11704
|
const { t } = (0, import_react_i18next18.useTranslation)();
|
|
11467
|
-
return /* @__PURE__ */ (0,
|
|
11468
|
-
/* @__PURE__ */ (0,
|
|
11705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(DropdownMenu, { open, onOpenChange, children: [
|
|
11706
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
11469
11707
|
"button",
|
|
11470
11708
|
{
|
|
11471
11709
|
type: "button",
|
|
@@ -11474,36 +11712,36 @@ function SortingAction({
|
|
|
11474
11712
|
className
|
|
11475
11713
|
),
|
|
11476
11714
|
"aria-label": "Open sorting menu",
|
|
11477
|
-
children: /* @__PURE__ */ (0,
|
|
11715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_lucide_react33.ArrowDownUpIcon, { className: "h-4 w-4 text-[var(--chekin-color-gray-1)] group-hover/trigger:text-[var(--chekin-color-brand-navy)]" })
|
|
11478
11716
|
}
|
|
11479
11717
|
) }),
|
|
11480
|
-
/* @__PURE__ */ (0,
|
|
11481
|
-
/* @__PURE__ */ (0,
|
|
11718
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(DropdownMenuContent, { className: "w-full max-w-[256px]", align: "start", children: [
|
|
11719
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
11482
11720
|
DropdownMenuItem,
|
|
11483
11721
|
{
|
|
11484
11722
|
active: value === "asc",
|
|
11485
11723
|
className: cn(value === "asc" && "text-[var(--chekin-color-brand-blue)]"),
|
|
11486
11724
|
onClick: () => onSortChange?.("asc"),
|
|
11487
11725
|
children: [
|
|
11488
|
-
/* @__PURE__ */ (0,
|
|
11726
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_lucide_react33.ArrowUp, { className: "h-4 w-4" }),
|
|
11489
11727
|
variant === "by_text" ? t("sort_a_z") : t("sort_in_asc")
|
|
11490
11728
|
]
|
|
11491
11729
|
}
|
|
11492
11730
|
),
|
|
11493
|
-
/* @__PURE__ */ (0,
|
|
11731
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
11494
11732
|
DropdownMenuItem,
|
|
11495
11733
|
{
|
|
11496
11734
|
active: value === "desc",
|
|
11497
11735
|
className: cn(value === "desc" && "text-[var(--chekin-color-brand-blue)]"),
|
|
11498
11736
|
onClick: () => onSortChange?.("desc"),
|
|
11499
11737
|
children: [
|
|
11500
|
-
/* @__PURE__ */ (0,
|
|
11738
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_lucide_react33.ArrowDown, { className: "h-4 w-4" }),
|
|
11501
11739
|
variant === "by_text" ? t("sort_z_a") : t("sort_in_desc")
|
|
11502
11740
|
]
|
|
11503
11741
|
}
|
|
11504
11742
|
),
|
|
11505
|
-
value && /* @__PURE__ */ (0,
|
|
11506
|
-
/* @__PURE__ */ (0,
|
|
11743
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(DropdownMenuItem, { onClick: () => onSortChange?.(null), children: [
|
|
11744
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_lucide_react33.Minus, { className: "h-4 w-4" }),
|
|
11507
11745
|
t("clear_sorting")
|
|
11508
11746
|
] })
|
|
11509
11747
|
] })
|
|
@@ -11514,7 +11752,7 @@ function SortingAction({
|
|
|
11514
11752
|
var import_react75 = require("react");
|
|
11515
11753
|
var import_react_i18next19 = require("react-i18next");
|
|
11516
11754
|
var import_lucide_react34 = require("lucide-react");
|
|
11517
|
-
var
|
|
11755
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
11518
11756
|
function StatusButton({
|
|
11519
11757
|
hidden,
|
|
11520
11758
|
status,
|
|
@@ -11532,7 +11770,7 @@ function StatusButton({
|
|
|
11532
11770
|
const configMap = (0, import_react75.useMemo)(() => {
|
|
11533
11771
|
const defaultLoadingConfig = {
|
|
11534
11772
|
text: loadingText ?? `${t("saving")}...`,
|
|
11535
|
-
icon: /* @__PURE__ */ (0,
|
|
11773
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react34.Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
11536
11774
|
variant,
|
|
11537
11775
|
isLoading: true
|
|
11538
11776
|
};
|
|
@@ -11542,13 +11780,13 @@ function StatusButton({
|
|
|
11542
11780
|
validating: { ...defaultLoadingConfig, text: t("validating") },
|
|
11543
11781
|
error: {
|
|
11544
11782
|
text: t("error"),
|
|
11545
|
-
icon: /* @__PURE__ */ (0,
|
|
11783
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react34.AlertCircle, { className: "h-4 w-4" }),
|
|
11546
11784
|
variant: "destructive",
|
|
11547
11785
|
isLoading: false
|
|
11548
11786
|
},
|
|
11549
11787
|
success: {
|
|
11550
11788
|
text: successText ?? t("saved_exclamation"),
|
|
11551
|
-
icon: /* @__PURE__ */ (0,
|
|
11789
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react34.CheckCircle, { className: "h-4 w-4" }),
|
|
11552
11790
|
variant,
|
|
11553
11791
|
isLoading: false
|
|
11554
11792
|
},
|
|
@@ -11564,7 +11802,7 @@ function StatusButton({
|
|
|
11564
11802
|
if (hidden) {
|
|
11565
11803
|
return null;
|
|
11566
11804
|
}
|
|
11567
|
-
return /* @__PURE__ */ (0,
|
|
11805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
11568
11806
|
Button,
|
|
11569
11807
|
{
|
|
11570
11808
|
className: cn(
|
|
@@ -11580,7 +11818,7 @@ function StatusButton({
|
|
|
11580
11818
|
...props,
|
|
11581
11819
|
children: [
|
|
11582
11820
|
config.icon,
|
|
11583
|
-
/* @__PURE__ */ (0,
|
|
11821
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { children: config.text })
|
|
11584
11822
|
]
|
|
11585
11823
|
}
|
|
11586
11824
|
);
|
|
@@ -11588,37 +11826,37 @@ function StatusButton({
|
|
|
11588
11826
|
|
|
11589
11827
|
// src/status-box/StatusBox.tsx
|
|
11590
11828
|
var import_lucide_react35 = require("lucide-react");
|
|
11591
|
-
var
|
|
11829
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
11592
11830
|
function StatusBox({ status, title, text }) {
|
|
11593
11831
|
if (status === "success") {
|
|
11594
|
-
return /* @__PURE__ */ (0,
|
|
11595
|
-
/* @__PURE__ */ (0,
|
|
11596
|
-
/* @__PURE__ */ (0,
|
|
11597
|
-
/* @__PURE__ */ (0,
|
|
11598
|
-
/* @__PURE__ */ (0,
|
|
11832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-green-100 bg-green-50 p-4", children: [
|
|
11833
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "rounded-full bg-green-100 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.CheckIcon, { className: "h-5 w-5 text-green-600" }) }),
|
|
11834
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { children: [
|
|
11835
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "font-semibold text-green-800", children: title }),
|
|
11836
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "text-sm text-green-700", children: text })
|
|
11599
11837
|
] })
|
|
11600
11838
|
] });
|
|
11601
11839
|
}
|
|
11602
11840
|
if (status === "failed") {
|
|
11603
|
-
return /* @__PURE__ */ (0,
|
|
11604
|
-
/* @__PURE__ */ (0,
|
|
11605
|
-
/* @__PURE__ */ (0,
|
|
11606
|
-
/* @__PURE__ */ (0,
|
|
11607
|
-
/* @__PURE__ */ (0,
|
|
11841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-red-100 bg-red-50 p-4", children: [
|
|
11842
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "rounded-full bg-red-100 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.XIcon, { className: "h-5 w-5 text-red-600" }) }),
|
|
11843
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { children: [
|
|
11844
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "font-semibold text-red-800", children: title }),
|
|
11845
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "text-sm text-red-700", children: text })
|
|
11608
11846
|
] })
|
|
11609
11847
|
] });
|
|
11610
11848
|
}
|
|
11611
|
-
return /* @__PURE__ */ (0,
|
|
11612
|
-
/* @__PURE__ */ (0,
|
|
11613
|
-
/* @__PURE__ */ (0,
|
|
11614
|
-
/* @__PURE__ */ (0,
|
|
11615
|
-
/* @__PURE__ */ (0,
|
|
11849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "flex items-center gap-3 rounded-lg border border-amber-100 bg-amber-50 p-4", children: [
|
|
11850
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "rounded-full bg-amber-100 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.AlertTriangleIcon, { className: "h-5 w-5 text-amber-600" }) }),
|
|
11851
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { children: [
|
|
11852
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "font-semibold text-amber-800", children: title }),
|
|
11853
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { className: "text-sm text-amber-700", children: text })
|
|
11616
11854
|
] })
|
|
11617
11855
|
] });
|
|
11618
11856
|
}
|
|
11619
11857
|
|
|
11620
11858
|
// src/stepper/Stepper.tsx
|
|
11621
|
-
var
|
|
11859
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
11622
11860
|
function Stepper({
|
|
11623
11861
|
totalSteps,
|
|
11624
11862
|
activeStep,
|
|
@@ -11627,7 +11865,7 @@ function Stepper({
|
|
|
11627
11865
|
}) {
|
|
11628
11866
|
if (totalSteps <= 0) return null;
|
|
11629
11867
|
const clampedActiveStep = Math.max(1, Math.min(totalSteps, activeStep));
|
|
11630
|
-
return /* @__PURE__ */ (0,
|
|
11868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11631
11869
|
"div",
|
|
11632
11870
|
{
|
|
11633
11871
|
className: cn("flex w-full items-center gap-2", className),
|
|
@@ -11638,7 +11876,7 @@ function Stepper({
|
|
|
11638
11876
|
children: new Array(totalSteps).fill(null).map((_, stepIndex) => {
|
|
11639
11877
|
const stepNumber = stepIndex + 1;
|
|
11640
11878
|
const isActive = cumulative ? stepNumber <= clampedActiveStep : stepNumber === clampedActiveStep;
|
|
11641
|
-
return /* @__PURE__ */ (0,
|
|
11879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
11642
11880
|
"span",
|
|
11643
11881
|
{
|
|
11644
11882
|
className: cn(
|
|
@@ -11655,14 +11893,14 @@ function Stepper({
|
|
|
11655
11893
|
|
|
11656
11894
|
// src/switch-blocks/SwitchBlocks.tsx
|
|
11657
11895
|
var import_react76 = require("react");
|
|
11658
|
-
var
|
|
11896
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
11659
11897
|
var SwitchBlocksInternal = (0, import_react76.forwardRef)(
|
|
11660
|
-
({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */ (0,
|
|
11898
|
+
({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
11661
11899
|
"div",
|
|
11662
11900
|
{
|
|
11663
11901
|
ref,
|
|
11664
11902
|
className: cn("flex flex-wrap items-center justify-start gap-4", className),
|
|
11665
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
11903
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
11666
11904
|
BoxOptionSelector,
|
|
11667
11905
|
{
|
|
11668
11906
|
id: option.id,
|
|
@@ -11683,9 +11921,9 @@ SwitchBlocksInternal.displayName = "SwitchBlocks";
|
|
|
11683
11921
|
var SwitchBlocks = (0, import_react76.memo)(SwitchBlocksInternal);
|
|
11684
11922
|
|
|
11685
11923
|
// src/switch-group/SwitchGroup.tsx
|
|
11686
|
-
var
|
|
11687
|
-
var
|
|
11688
|
-
var SwitchGroup =
|
|
11924
|
+
var React38 = __toESM(require("react"), 1);
|
|
11925
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
11926
|
+
var SwitchGroup = React38.forwardRef(
|
|
11689
11927
|
({ options, value = [], onChange, disabled = false, className, error, ...props }, ref) => {
|
|
11690
11928
|
const handleOptionChange = (optionValue, checked) => {
|
|
11691
11929
|
if (!onChange) return;
|
|
@@ -11695,9 +11933,9 @@ var SwitchGroup = React37.forwardRef(
|
|
|
11695
11933
|
}
|
|
11696
11934
|
onChange(value.filter((selectedValue) => selectedValue !== optionValue));
|
|
11697
11935
|
};
|
|
11698
|
-
return /* @__PURE__ */ (0,
|
|
11699
|
-
options.map((option) => /* @__PURE__ */ (0,
|
|
11700
|
-
/* @__PURE__ */ (0,
|
|
11936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { ref, className: cn("w-full space-y-4", className), ...props, children: [
|
|
11937
|
+
options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11938
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
11701
11939
|
Label,
|
|
11702
11940
|
{
|
|
11703
11941
|
className: cn(
|
|
@@ -11706,7 +11944,7 @@ var SwitchGroup = React37.forwardRef(
|
|
|
11706
11944
|
),
|
|
11707
11945
|
children: [
|
|
11708
11946
|
option.label,
|
|
11709
|
-
option.description && /* @__PURE__ */ (0,
|
|
11947
|
+
option.description && /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
11710
11948
|
"span",
|
|
11711
11949
|
{
|
|
11712
11950
|
className: cn(
|
|
@@ -11723,7 +11961,7 @@ var SwitchGroup = React37.forwardRef(
|
|
|
11723
11961
|
]
|
|
11724
11962
|
}
|
|
11725
11963
|
) }),
|
|
11726
|
-
/* @__PURE__ */ (0,
|
|
11964
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
11727
11965
|
Switch,
|
|
11728
11966
|
{
|
|
11729
11967
|
value: value.includes(option.value),
|
|
@@ -11733,7 +11971,7 @@ var SwitchGroup = React37.forwardRef(
|
|
|
11733
11971
|
}
|
|
11734
11972
|
)
|
|
11735
11973
|
] }, option.value)),
|
|
11736
|
-
error && /* @__PURE__ */ (0,
|
|
11974
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ErrorMessage, { disabled, children: error })
|
|
11737
11975
|
] });
|
|
11738
11976
|
}
|
|
11739
11977
|
);
|
|
@@ -11743,7 +11981,7 @@ SwitchGroup.displayName = "SwitchGroup";
|
|
|
11743
11981
|
var import_react77 = require("react");
|
|
11744
11982
|
var TabsPrimitive2 = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
11745
11983
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
11746
|
-
var
|
|
11984
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
11747
11985
|
var Tabs = TabsPrimitive2.Root;
|
|
11748
11986
|
var tabsListVariants = (0, import_class_variance_authority14.cva)("inline-flex items-center", {
|
|
11749
11987
|
variants: {
|
|
@@ -11757,7 +11995,7 @@ var tabsListVariants = (0, import_class_variance_authority14.cva)("inline-flex i
|
|
|
11757
11995
|
}
|
|
11758
11996
|
});
|
|
11759
11997
|
var TabsList = (0, import_react77.forwardRef)(
|
|
11760
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0,
|
|
11998
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
11761
11999
|
TabsPrimitive2.List,
|
|
11762
12000
|
{
|
|
11763
12001
|
ref,
|
|
@@ -11787,7 +12025,7 @@ var TabsTrigger = (0, import_react77.forwardRef)(({ className, variant = "button
|
|
|
11787
12025
|
}
|
|
11788
12026
|
if (props.asLink) {
|
|
11789
12027
|
const { asLink: Link2, value, end, onClick: onClick2, children: children2, ...linkProps } = props;
|
|
11790
|
-
return /* @__PURE__ */ (0,
|
|
12028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
11791
12029
|
Link2,
|
|
11792
12030
|
{
|
|
11793
12031
|
relative: "route",
|
|
@@ -11805,7 +12043,7 @@ var TabsTrigger = (0, import_react77.forwardRef)(({ className, variant = "button
|
|
|
11805
12043
|
);
|
|
11806
12044
|
}
|
|
11807
12045
|
const { children, onClick, end: _end, ...triggerProps } = props;
|
|
11808
|
-
return /* @__PURE__ */ (0,
|
|
12046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
11809
12047
|
TabsPrimitive2.Trigger,
|
|
11810
12048
|
{
|
|
11811
12049
|
ref,
|
|
@@ -11821,7 +12059,7 @@ var TabsTrigger = (0, import_react77.forwardRef)(({ className, variant = "button
|
|
|
11821
12059
|
);
|
|
11822
12060
|
});
|
|
11823
12061
|
TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
|
|
11824
|
-
var TabsContent = (0, import_react77.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
12062
|
+
var TabsContent = (0, import_react77.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
11825
12063
|
TabsPrimitive2.Content,
|
|
11826
12064
|
{
|
|
11827
12065
|
ref,
|
|
@@ -11833,7 +12071,7 @@ var TabsContent = (0, import_react77.forwardRef)(({ className, ...props }, ref)
|
|
|
11833
12071
|
TabsContent.displayName = TabsPrimitive2.Content.displayName;
|
|
11834
12072
|
|
|
11835
12073
|
// src/tabbed-section/TabbedSection.tsx
|
|
11836
|
-
var
|
|
12074
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
11837
12075
|
function TabbedSection({
|
|
11838
12076
|
triggers,
|
|
11839
12077
|
value,
|
|
@@ -11855,8 +12093,8 @@ function TabbedSection({
|
|
|
11855
12093
|
"[&>div:first-child]:gap-[var(--section-gap,0.75rem)]",
|
|
11856
12094
|
className
|
|
11857
12095
|
);
|
|
11858
|
-
return /* @__PURE__ */ (0,
|
|
11859
|
-
/* @__PURE__ */ (0,
|
|
12096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(Tabs, { value: activeTab, onValueChange: onTabChange, className: "w-full", children: [
|
|
12097
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
11860
12098
|
BookmarkTabsList,
|
|
11861
12099
|
{
|
|
11862
12100
|
variant,
|
|
@@ -11864,15 +12102,15 @@ function TabbedSection({
|
|
|
11864
12102
|
children: triggers
|
|
11865
12103
|
}
|
|
11866
12104
|
),
|
|
11867
|
-
/* @__PURE__ */ (0,
|
|
12105
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: contentContainerClassName, children })
|
|
11868
12106
|
] });
|
|
11869
12107
|
}
|
|
11870
12108
|
|
|
11871
12109
|
// src/table-filter/TableFilter.tsx
|
|
11872
12110
|
var import_lucide_react36 = require("lucide-react");
|
|
11873
|
-
var
|
|
12111
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
11874
12112
|
function TableFilter({ onRemove, onClick, children, className }) {
|
|
11875
|
-
return /* @__PURE__ */ (0,
|
|
12113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
11876
12114
|
"div",
|
|
11877
12115
|
{
|
|
11878
12116
|
onClick,
|
|
@@ -11884,7 +12122,7 @@ function TableFilter({ onRemove, onClick, children, className }) {
|
|
|
11884
12122
|
),
|
|
11885
12123
|
children: [
|
|
11886
12124
|
children,
|
|
11887
|
-
/* @__PURE__ */ (0,
|
|
12125
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
11888
12126
|
import_lucide_react36.SquareX,
|
|
11889
12127
|
{
|
|
11890
12128
|
onClick: onRemove,
|
|
@@ -11901,9 +12139,9 @@ function TableFilter({ onRemove, onClick, children, className }) {
|
|
|
11901
12139
|
}
|
|
11902
12140
|
|
|
11903
12141
|
// src/table-filter/DateTableFilter.tsx
|
|
11904
|
-
var
|
|
12142
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
11905
12143
|
function DateTableFilter({ className, ...props }) {
|
|
11906
|
-
return /* @__PURE__ */ (0,
|
|
12144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
11907
12145
|
TableFilter,
|
|
11908
12146
|
{
|
|
11909
12147
|
className: cn(
|
|
@@ -11919,11 +12157,11 @@ function DateTableFilter({ className, ...props }) {
|
|
|
11919
12157
|
// src/table-loader/TableLoader.tsx
|
|
11920
12158
|
var import_react78 = require("react");
|
|
11921
12159
|
var import_react_i18next20 = require("react-i18next");
|
|
11922
|
-
var
|
|
12160
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
11923
12161
|
var LoaderComponent = (0, import_react78.forwardRef)(
|
|
11924
12162
|
({ label, className, hideBorder, variant = "primary" }, ref) => {
|
|
11925
12163
|
const { t } = (0, import_react_i18next20.useTranslation)();
|
|
11926
|
-
return /* @__PURE__ */ (0,
|
|
12164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
11927
12165
|
"div",
|
|
11928
12166
|
{
|
|
11929
12167
|
ref,
|
|
@@ -11932,7 +12170,7 @@ var LoaderComponent = (0, import_react78.forwardRef)(
|
|
|
11932
12170
|
!hideBorder && "border-t border-[var(--table-loader-border)]",
|
|
11933
12171
|
className
|
|
11934
12172
|
),
|
|
11935
|
-
children: /* @__PURE__ */ (0,
|
|
12173
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
11936
12174
|
CircularLoader,
|
|
11937
12175
|
{
|
|
11938
12176
|
size: variant === "primary" ? "lg" : "md",
|
|
@@ -11948,16 +12186,16 @@ var LoaderComponent = (0, import_react78.forwardRef)(
|
|
|
11948
12186
|
}
|
|
11949
12187
|
);
|
|
11950
12188
|
LoaderComponent.displayName = "TableLoader.Loader";
|
|
11951
|
-
function
|
|
11952
|
-
return /* @__PURE__ */ (0,
|
|
12189
|
+
function Root23({ children, columns }) {
|
|
12190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("tr", { className: "cursor-pointer hover:!bg-[var(--table-loader-row-hover-bg)]", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("td", { colSpan: columns, className: "cursor-default pl-0", children }) });
|
|
11953
12191
|
}
|
|
11954
12192
|
var TableLoader = {
|
|
11955
12193
|
Loader: LoaderComponent,
|
|
11956
|
-
Root:
|
|
12194
|
+
Root: Root23
|
|
11957
12195
|
};
|
|
11958
12196
|
|
|
11959
12197
|
// src/table-placeholder/TablePlaceholder.tsx
|
|
11960
|
-
var
|
|
12198
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
11961
12199
|
function TablePlaceholder({
|
|
11962
12200
|
children,
|
|
11963
12201
|
text,
|
|
@@ -11970,26 +12208,26 @@ function TablePlaceholder({
|
|
|
11970
12208
|
if (!visible) {
|
|
11971
12209
|
return null;
|
|
11972
12210
|
}
|
|
11973
|
-
const content = /* @__PURE__ */ (0,
|
|
11974
|
-
iconSlot && /* @__PURE__ */ (0,
|
|
11975
|
-
title && /* @__PURE__ */ (0,
|
|
11976
|
-
text && /* @__PURE__ */ (0,
|
|
11977
|
-
children && /* @__PURE__ */ (0,
|
|
12211
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col items-center justify-center px-4 py-14 text-center", children: [
|
|
12212
|
+
iconSlot && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "mb-6", children: iconSlot }),
|
|
12213
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("h3", { className: "mb-2 text-lg font-semibold", children: title }),
|
|
12214
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-md max-w-sm font-medium", children: text }),
|
|
12215
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "mt-6", children })
|
|
11978
12216
|
] });
|
|
11979
12217
|
if (insideTable) {
|
|
11980
|
-
return /* @__PURE__ */ (0,
|
|
12218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("td", { colSpan: 100, className, children: content }) });
|
|
11981
12219
|
}
|
|
11982
|
-
return /* @__PURE__ */ (0,
|
|
12220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className, children: content });
|
|
11983
12221
|
}
|
|
11984
12222
|
|
|
11985
12223
|
// src/timeline/Timeline.tsx
|
|
11986
12224
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
11987
12225
|
|
|
11988
12226
|
// src/timeline/TimelineContext.ts
|
|
11989
|
-
var
|
|
11990
|
-
var TimelineContext =
|
|
12227
|
+
var React39 = __toESM(require("react"), 1);
|
|
12228
|
+
var TimelineContext = React39.createContext(null);
|
|
11991
12229
|
function useTimeline() {
|
|
11992
|
-
const context =
|
|
12230
|
+
const context = React39.useContext(TimelineContext);
|
|
11993
12231
|
if (!context) {
|
|
11994
12232
|
throw new Error("useTimeline must be used within a <Timeline />.");
|
|
11995
12233
|
}
|
|
@@ -11997,9 +12235,9 @@ function useTimeline() {
|
|
|
11997
12235
|
}
|
|
11998
12236
|
|
|
11999
12237
|
// src/timeline/Timeline.tsx
|
|
12000
|
-
var
|
|
12238
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
12001
12239
|
function Timeline({ className, orientation = "vertical", ...props }) {
|
|
12002
|
-
return /* @__PURE__ */ (0,
|
|
12240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(TimelineContext.Provider, { value: { orientation }, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12003
12241
|
"ol",
|
|
12004
12242
|
{
|
|
12005
12243
|
"data-slot": "timeline",
|
|
@@ -12013,7 +12251,7 @@ function Timeline({ className, orientation = "vertical", ...props }) {
|
|
|
12013
12251
|
function TimelineItem({ className, asChild, ...props }) {
|
|
12014
12252
|
const { orientation } = useTimeline();
|
|
12015
12253
|
const Comp = asChild ? import_react_slot5.Slot : "li";
|
|
12016
|
-
return /* @__PURE__ */ (0,
|
|
12254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12017
12255
|
Comp,
|
|
12018
12256
|
{
|
|
12019
12257
|
"data-slot": "timeline-item",
|
|
@@ -12026,7 +12264,7 @@ function TimelineItem({ className, asChild, ...props }) {
|
|
|
12026
12264
|
function TimelineSeparator({ className, asChild, ...props }) {
|
|
12027
12265
|
const { orientation } = useTimeline();
|
|
12028
12266
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
12029
|
-
return /* @__PURE__ */ (0,
|
|
12267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12030
12268
|
Comp,
|
|
12031
12269
|
{
|
|
12032
12270
|
"data-slot": "timeline-separator",
|
|
@@ -12048,7 +12286,7 @@ function TimelineDot({
|
|
|
12048
12286
|
}) {
|
|
12049
12287
|
const { orientation } = useTimeline();
|
|
12050
12288
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
12051
|
-
return /* @__PURE__ */ (0,
|
|
12289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12052
12290
|
Comp,
|
|
12053
12291
|
{
|
|
12054
12292
|
"data-slot": "timeline-dot",
|
|
@@ -12068,7 +12306,7 @@ function TimelineDot({
|
|
|
12068
12306
|
function TimelineConnector({ className, asChild, ...props }) {
|
|
12069
12307
|
const { orientation } = useTimeline();
|
|
12070
12308
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
12071
|
-
return /* @__PURE__ */ (0,
|
|
12309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12072
12310
|
Comp,
|
|
12073
12311
|
{
|
|
12074
12312
|
"data-slot": "timeline-connector",
|
|
@@ -12086,7 +12324,7 @@ function TimelineConnector({ className, asChild, ...props }) {
|
|
|
12086
12324
|
function TimelineContent({ className, asChild, ...props }) {
|
|
12087
12325
|
const { orientation } = useTimeline();
|
|
12088
12326
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
12089
|
-
return /* @__PURE__ */ (0,
|
|
12327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12090
12328
|
Comp,
|
|
12091
12329
|
{
|
|
12092
12330
|
"data-slot": "timeline-content",
|
|
@@ -12104,7 +12342,7 @@ function TimelineContent({ className, asChild, ...props }) {
|
|
|
12104
12342
|
function TimelineTitle({ className, asChild, ...props }) {
|
|
12105
12343
|
const { orientation } = useTimeline();
|
|
12106
12344
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
12107
|
-
return /* @__PURE__ */ (0,
|
|
12345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12108
12346
|
Comp,
|
|
12109
12347
|
{
|
|
12110
12348
|
"data-slot": "timeline-title",
|
|
@@ -12117,7 +12355,7 @@ function TimelineTitle({ className, asChild, ...props }) {
|
|
|
12117
12355
|
function TimelineDescription({ className, asChild, ...props }) {
|
|
12118
12356
|
const { orientation } = useTimeline();
|
|
12119
12357
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
12120
|
-
return /* @__PURE__ */ (0,
|
|
12358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
12121
12359
|
Comp,
|
|
12122
12360
|
{
|
|
12123
12361
|
"data-slot": "timeline-description",
|
|
@@ -12168,7 +12406,7 @@ function useUpdateToast({ id }) {
|
|
|
12168
12406
|
}
|
|
12169
12407
|
|
|
12170
12408
|
// src/toggle-group/ToggleGroup.tsx
|
|
12171
|
-
var
|
|
12409
|
+
var React40 = __toESM(require("react"), 1);
|
|
12172
12410
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
12173
12411
|
|
|
12174
12412
|
// src/toggle-group/style.ts
|
|
@@ -12201,15 +12439,15 @@ var toggleVariants = (0, import_class_variance_authority15.cva)(
|
|
|
12201
12439
|
);
|
|
12202
12440
|
|
|
12203
12441
|
// src/toggle-group/ToggleGroup.tsx
|
|
12204
|
-
var
|
|
12205
|
-
var ToggleGroupContext =
|
|
12442
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
12443
|
+
var ToggleGroupContext = React40.createContext({
|
|
12206
12444
|
size: "default",
|
|
12207
12445
|
variant: "default",
|
|
12208
12446
|
theme: "default"
|
|
12209
12447
|
});
|
|
12210
|
-
var ToggleGroup =
|
|
12448
|
+
var ToggleGroup = React40.forwardRef(({ className, variant, size, theme, children, ...props }, ref) => {
|
|
12211
12449
|
const isTabVariant = variant === "tab";
|
|
12212
|
-
return /* @__PURE__ */ (0,
|
|
12450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
12213
12451
|
ToggleGroupPrimitive.Root,
|
|
12214
12452
|
{
|
|
12215
12453
|
ref,
|
|
@@ -12219,16 +12457,16 @@ var ToggleGroup = React39.forwardRef(({ className, variant, size, theme, childre
|
|
|
12219
12457
|
className
|
|
12220
12458
|
),
|
|
12221
12459
|
...props,
|
|
12222
|
-
children: /* @__PURE__ */ (0,
|
|
12460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ToggleGroupContext.Provider, { value: { variant, size, theme }, children })
|
|
12223
12461
|
}
|
|
12224
12462
|
);
|
|
12225
12463
|
});
|
|
12226
12464
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
12227
|
-
var ToggleGroupItem =
|
|
12228
|
-
const context =
|
|
12465
|
+
var ToggleGroupItem = React40.forwardRef(({ className, children, variant, size, theme, ...props }, ref) => {
|
|
12466
|
+
const context = React40.useContext(ToggleGroupContext);
|
|
12229
12467
|
const resolvedVariant = context.variant || variant;
|
|
12230
12468
|
const isTabVariant = resolvedVariant === "tab";
|
|
12231
|
-
return /* @__PURE__ */ (0,
|
|
12469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
12232
12470
|
ToggleGroupPrimitive.Item,
|
|
12233
12471
|
{
|
|
12234
12472
|
ref,
|
|
@@ -12241,9 +12479,9 @@ var ToggleGroupItem = React39.forwardRef(({ className, children, variant, size,
|
|
|
12241
12479
|
className
|
|
12242
12480
|
),
|
|
12243
12481
|
...props,
|
|
12244
|
-
children: isTabVariant ? /* @__PURE__ */ (0,
|
|
12245
|
-
/* @__PURE__ */ (0,
|
|
12246
|
-
/* @__PURE__ */ (0,
|
|
12482
|
+
children: isTabVariant ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "inline-grid", children: [
|
|
12483
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "invisible col-start-1 row-start-1 font-semibold", children }),
|
|
12484
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "col-start-1 row-start-1", children })
|
|
12247
12485
|
] }) : children
|
|
12248
12486
|
}
|
|
12249
12487
|
);
|
|
@@ -12252,7 +12490,7 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
12252
12490
|
|
|
12253
12491
|
// src/toggle-group/Toggles.tsx
|
|
12254
12492
|
var import_react80 = require("react");
|
|
12255
|
-
var
|
|
12493
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
12256
12494
|
var getValueArray = (value) => {
|
|
12257
12495
|
if (value !== void 0 && value !== null) {
|
|
12258
12496
|
return Array.isArray(value) ? value : [value];
|
|
@@ -12348,16 +12586,16 @@ function TogglesInternal({
|
|
|
12348
12586
|
onValueChange: handleValueChange,
|
|
12349
12587
|
...multiple ? { type: "multiple", value: currentValue } : { type: "single", value: currentValue[0] ?? "" }
|
|
12350
12588
|
};
|
|
12351
|
-
return /* @__PURE__ */ (0,
|
|
12352
|
-
label && /* @__PURE__ */ (0,
|
|
12353
|
-
/* @__PURE__ */ (0,
|
|
12589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { ref, className, children: [
|
|
12590
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "mb-2", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "select-none text-base font-normal text-[var(--toggles-label-text)]", children: label }) }),
|
|
12591
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ToggleGroup, { className: groupClassName, ...toggleGroupProps, children: options.map((option, index) => {
|
|
12354
12592
|
const isSelected = Boolean(
|
|
12355
12593
|
getValueArray(value).find((selectedValue) => selectedValue === option.value)
|
|
12356
12594
|
);
|
|
12357
12595
|
const isDisabled = disabled || disabledItems?.includes(option.value) || option.disabled;
|
|
12358
12596
|
const isMinSelected = getValueArray(value).length <= minSelected;
|
|
12359
12597
|
const isItemReadOnly = readOnly || isMinSelected && isSelected || readonlyItems?.includes(option.value);
|
|
12360
|
-
return /* @__PURE__ */ (0,
|
|
12598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
12361
12599
|
ToggleGroupItem,
|
|
12362
12600
|
{
|
|
12363
12601
|
value: String(option.value),
|
|
@@ -12373,34 +12611,34 @@ function TogglesInternal({
|
|
|
12373
12611
|
var Toggles = (0, import_react80.forwardRef)(TogglesInternal);
|
|
12374
12612
|
|
|
12375
12613
|
// src/three-dots-loader/ThreeDotsLoader.tsx
|
|
12376
|
-
var
|
|
12614
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
12377
12615
|
function Dots({
|
|
12378
12616
|
height,
|
|
12379
12617
|
width,
|
|
12380
12618
|
color
|
|
12381
12619
|
}) {
|
|
12382
|
-
return /* @__PURE__ */ (0,
|
|
12620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
12383
12621
|
"span",
|
|
12384
12622
|
{
|
|
12385
12623
|
className: "inline-flex items-center justify-center gap-[15%]",
|
|
12386
12624
|
style: { height, width },
|
|
12387
12625
|
"aria-hidden": "true",
|
|
12388
12626
|
children: [
|
|
12389
|
-
/* @__PURE__ */ (0,
|
|
12627
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
12390
12628
|
"span",
|
|
12391
12629
|
{
|
|
12392
12630
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full [animation-delay:-0.32s]",
|
|
12393
12631
|
style: { backgroundColor: color }
|
|
12394
12632
|
}
|
|
12395
12633
|
),
|
|
12396
|
-
/* @__PURE__ */ (0,
|
|
12634
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
12397
12635
|
"span",
|
|
12398
12636
|
{
|
|
12399
12637
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full [animation-delay:-0.16s]",
|
|
12400
12638
|
style: { backgroundColor: color }
|
|
12401
12639
|
}
|
|
12402
12640
|
),
|
|
12403
|
-
/* @__PURE__ */ (0,
|
|
12641
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
12404
12642
|
"span",
|
|
12405
12643
|
{
|
|
12406
12644
|
className: "h-[22%] w-[22%] animate-chekin-three-dots rounded-full",
|
|
@@ -12419,9 +12657,9 @@ function ThreeDotsLoader({
|
|
|
12419
12657
|
className,
|
|
12420
12658
|
labelPlacement = "right"
|
|
12421
12659
|
}) {
|
|
12422
|
-
const dots = /* @__PURE__ */ (0,
|
|
12660
|
+
const dots = /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Dots, { color, height, width });
|
|
12423
12661
|
if (label) {
|
|
12424
|
-
return /* @__PURE__ */ (0,
|
|
12662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
12425
12663
|
"div",
|
|
12426
12664
|
{
|
|
12427
12665
|
className: cn(
|
|
@@ -12429,22 +12667,22 @@ function ThreeDotsLoader({
|
|
|
12429
12667
|
className
|
|
12430
12668
|
),
|
|
12431
12669
|
role: "progressbar",
|
|
12432
|
-
children: labelPlacement === "right" ? /* @__PURE__ */ (0,
|
|
12670
|
+
children: labelPlacement === "right" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
12433
12671
|
dots,
|
|
12434
|
-
/* @__PURE__ */ (0,
|
|
12435
|
-
] }) : /* @__PURE__ */ (0,
|
|
12436
|
-
/* @__PURE__ */ (0,
|
|
12672
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { children: label })
|
|
12673
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
12674
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { children: label }),
|
|
12437
12675
|
dots
|
|
12438
12676
|
] })
|
|
12439
12677
|
}
|
|
12440
12678
|
);
|
|
12441
12679
|
}
|
|
12442
|
-
return /* @__PURE__ */ (0,
|
|
12680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { role: "progressbar", className, children: dots });
|
|
12443
12681
|
}
|
|
12444
12682
|
|
|
12445
12683
|
// src/uploaded-files-list/UploadedFilesList.tsx
|
|
12446
12684
|
var import_lucide_react37 = require("lucide-react");
|
|
12447
|
-
var
|
|
12685
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
12448
12686
|
function UploadedFilesList({
|
|
12449
12687
|
files,
|
|
12450
12688
|
onRemoveFile,
|
|
@@ -12453,20 +12691,20 @@ function UploadedFilesList({
|
|
|
12453
12691
|
if (!files.length) {
|
|
12454
12692
|
return null;
|
|
12455
12693
|
}
|
|
12456
|
-
return /* @__PURE__ */ (0,
|
|
12694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: cn("flex flex-wrap gap-2.5", className), children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
|
|
12457
12695
|
"div",
|
|
12458
12696
|
{
|
|
12459
12697
|
className: "flex cursor-default items-center gap-2 rounded border border-[var(--chekin-neutral-400)] bg-[var(--chekin-neutral-75)] py-1.5 pl-3 pr-1.5",
|
|
12460
12698
|
children: [
|
|
12461
|
-
/* @__PURE__ */ (0,
|
|
12462
|
-
/* @__PURE__ */ (0,
|
|
12699
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-nowrap text-sm font-medium leading-5 text-[var(--chekin-blue-900)]", children: file.name }),
|
|
12700
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
12463
12701
|
"button",
|
|
12464
12702
|
{
|
|
12465
12703
|
type: "button",
|
|
12466
12704
|
onClick: () => onRemoveFile(file.name),
|
|
12467
12705
|
className: "flex h-[18px] w-[18px] shrink-0 cursor-pointer items-center justify-center rounded bg-[var(--chekin-neutral-600)] transition-all hover:shadow-md active:opacity-95",
|
|
12468
12706
|
"aria-label": `Remove ${file.name}`,
|
|
12469
|
-
children: /* @__PURE__ */ (0,
|
|
12707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_lucide_react37.X, { className: "h-3.5 w-3.5 text-white", strokeWidth: 3 })
|
|
12470
12708
|
}
|
|
12471
12709
|
)
|
|
12472
12710
|
]
|
|
@@ -12477,7 +12715,7 @@ function UploadedFilesList({
|
|
|
12477
12715
|
|
|
12478
12716
|
// src/vertical-tabs/VerticalTabs.tsx
|
|
12479
12717
|
var import_react81 = require("react");
|
|
12480
|
-
var
|
|
12718
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
12481
12719
|
function getKey(index, key) {
|
|
12482
12720
|
return `${key || "step"}_${index}`;
|
|
12483
12721
|
}
|
|
@@ -12490,7 +12728,7 @@ function VerticalTabs({
|
|
|
12490
12728
|
const defaultValue = getKey(0, stepKey);
|
|
12491
12729
|
const [value, setValue] = (0, import_react81.useState)(defaultValue);
|
|
12492
12730
|
const hasImages = steps.every((step) => step.images?.length);
|
|
12493
|
-
return /* @__PURE__ */ (0,
|
|
12731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
12494
12732
|
"div",
|
|
12495
12733
|
{
|
|
12496
12734
|
className: cn(
|
|
@@ -12499,10 +12737,10 @@ function VerticalTabs({
|
|
|
12499
12737
|
className
|
|
12500
12738
|
),
|
|
12501
12739
|
children: [
|
|
12502
|
-
/* @__PURE__ */ (0,
|
|
12740
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "flex w-full flex-grow-0 flex-col flex-nowrap gap-0", children: steps.map(({ title, text }, index) => {
|
|
12503
12741
|
const stepValue = getKey(index, stepKey);
|
|
12504
12742
|
const active = value === stepValue;
|
|
12505
|
-
return /* @__PURE__ */ (0,
|
|
12743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
12506
12744
|
"button",
|
|
12507
12745
|
{
|
|
12508
12746
|
type: "button",
|
|
@@ -12514,8 +12752,8 @@ function VerticalTabs({
|
|
|
12514
12752
|
active && "border-b-[var(--vertical-tabs-step-border)] border-l-[var(--vertical-tabs-active-border)] pb-6"
|
|
12515
12753
|
),
|
|
12516
12754
|
children: [
|
|
12517
|
-
/* @__PURE__ */ (0,
|
|
12518
|
-
/* @__PURE__ */ (0,
|
|
12755
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "text-sm font-bold leading-4 text-[var(--vertical-tabs-step-label)]", children: getStepLabel(index) }),
|
|
12756
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
12519
12757
|
"span",
|
|
12520
12758
|
{
|
|
12521
12759
|
className: cn(
|
|
@@ -12525,14 +12763,14 @@ function VerticalTabs({
|
|
|
12525
12763
|
children: title
|
|
12526
12764
|
}
|
|
12527
12765
|
),
|
|
12528
|
-
/* @__PURE__ */ (0,
|
|
12766
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
12529
12767
|
"span",
|
|
12530
12768
|
{
|
|
12531
12769
|
className: cn(
|
|
12532
12770
|
"grid grid-rows-[0fr] overflow-hidden transition-[grid-template-rows] duration-300",
|
|
12533
12771
|
active && "grid-rows-[1fr]"
|
|
12534
12772
|
),
|
|
12535
|
-
children: /* @__PURE__ */ (0,
|
|
12773
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
12536
12774
|
"span",
|
|
12537
12775
|
{
|
|
12538
12776
|
className: cn(
|
|
@@ -12555,7 +12793,7 @@ function VerticalTabs({
|
|
|
12555
12793
|
if (value !== stepValue) {
|
|
12556
12794
|
return null;
|
|
12557
12795
|
}
|
|
12558
|
-
return /* @__PURE__ */ (0,
|
|
12796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Carousel, { children: images?.map((image) => /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
12559
12797
|
"img",
|
|
12560
12798
|
{
|
|
12561
12799
|
src: image,
|
|
@@ -12572,8 +12810,8 @@ function VerticalTabs({
|
|
|
12572
12810
|
|
|
12573
12811
|
// src/video-modal/VideoModal.tsx
|
|
12574
12812
|
var import_lucide_react38 = require("lucide-react");
|
|
12575
|
-
var
|
|
12576
|
-
var
|
|
12813
|
+
var React41 = __toESM(require("react"), 1);
|
|
12814
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
12577
12815
|
function VideoModal({
|
|
12578
12816
|
videoId,
|
|
12579
12817
|
isOpen,
|
|
@@ -12581,8 +12819,8 @@ function VideoModal({
|
|
|
12581
12819
|
width = "100%",
|
|
12582
12820
|
height = "100%"
|
|
12583
12821
|
}) {
|
|
12584
|
-
const iframeRef =
|
|
12585
|
-
|
|
12822
|
+
const iframeRef = React41.useRef(null);
|
|
12823
|
+
React41.useEffect(() => {
|
|
12586
12824
|
const handleEsc = (event) => {
|
|
12587
12825
|
if (event.key === "Escape") {
|
|
12588
12826
|
onClose();
|
|
@@ -12595,7 +12833,7 @@ function VideoModal({
|
|
|
12595
12833
|
window.removeEventListener("keydown", handleEsc);
|
|
12596
12834
|
};
|
|
12597
12835
|
}, [isOpen, onClose]);
|
|
12598
|
-
|
|
12836
|
+
React41.useEffect(() => {
|
|
12599
12837
|
if (!isOpen && iframeRef.current) {
|
|
12600
12838
|
iframeRef.current.contentWindow?.postMessage(
|
|
12601
12839
|
'{"event":"command","func":"pauseVideo","args":""}',
|
|
@@ -12606,15 +12844,15 @@ function VideoModal({
|
|
|
12606
12844
|
if (!isOpen) {
|
|
12607
12845
|
return null;
|
|
12608
12846
|
}
|
|
12609
|
-
return /* @__PURE__ */ (0,
|
|
12847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
12610
12848
|
"div",
|
|
12611
12849
|
{
|
|
12612
12850
|
className: "fixed inset-0 z-[9999] flex items-center justify-center bg-[var(--video-modal-overlay-bg)] px-4",
|
|
12613
12851
|
role: "dialog",
|
|
12614
12852
|
"aria-modal": "true",
|
|
12615
12853
|
"aria-label": "Video",
|
|
12616
|
-
children: /* @__PURE__ */ (0,
|
|
12617
|
-
/* @__PURE__ */ (0,
|
|
12854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "relative w-full max-w-[1075px]", children: [
|
|
12855
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
12618
12856
|
"button",
|
|
12619
12857
|
{
|
|
12620
12858
|
type: "button",
|
|
@@ -12625,10 +12863,10 @@ function VideoModal({
|
|
|
12625
12863
|
"max-sm:right-2 max-sm:top-2"
|
|
12626
12864
|
),
|
|
12627
12865
|
"aria-label": "Close",
|
|
12628
|
-
children: /* @__PURE__ */ (0,
|
|
12866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_lucide_react38.X, { className: "h-5 w-5", "aria-hidden": true })
|
|
12629
12867
|
}
|
|
12630
12868
|
),
|
|
12631
|
-
/* @__PURE__ */ (0,
|
|
12869
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "relative w-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
12632
12870
|
"iframe",
|
|
12633
12871
|
{
|
|
12634
12872
|
ref: iframeRef,
|
|
@@ -12650,7 +12888,7 @@ function VideoModal({
|
|
|
12650
12888
|
var import_react82 = require("react");
|
|
12651
12889
|
var import_react_i18next21 = require("react-i18next");
|
|
12652
12890
|
var import_lucide_react39 = require("lucide-react");
|
|
12653
|
-
var
|
|
12891
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
12654
12892
|
function VideoPlayer({
|
|
12655
12893
|
src,
|
|
12656
12894
|
poster,
|
|
@@ -12794,21 +13032,21 @@ function VideoPlayer({
|
|
|
12794
13032
|
onClose?.();
|
|
12795
13033
|
}
|
|
12796
13034
|
};
|
|
12797
|
-
return /* @__PURE__ */ (0,
|
|
13035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
12798
13036
|
"div",
|
|
12799
13037
|
{
|
|
12800
13038
|
ref: containerRef,
|
|
12801
13039
|
className: containerClasses,
|
|
12802
13040
|
onClick: isFullScreenMode ? handleBackgroundClick : void 0,
|
|
12803
13041
|
children: [
|
|
12804
|
-
isFullScreenMode && /* @__PURE__ */ (0,
|
|
12805
|
-
/* @__PURE__ */ (0,
|
|
12806
|
-
/* @__PURE__ */ (0,
|
|
12807
|
-
/* @__PURE__ */ (0,
|
|
12808
|
-
/* @__PURE__ */ (0,
|
|
12809
|
-
/* @__PURE__ */ (0,
|
|
13042
|
+
isFullScreenMode && /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden", children: [
|
|
13043
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "absolute left-1/4 top-1/4 h-2 w-2 animate-pulse rounded-full bg-white/20 duration-1000" }),
|
|
13044
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "absolute left-1/3 top-3/4 h-1 w-1 animate-pulse rounded-full bg-white/30 delay-500 duration-1000" }),
|
|
13045
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "absolute right-1/4 top-1/2 h-1.5 w-1.5 animate-pulse rounded-full bg-white/20 delay-1000 duration-1000" }),
|
|
13046
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "absolute bottom-1/4 right-1/3 h-1 w-1 animate-pulse rounded-full bg-white/25 delay-1500 duration-1000" }),
|
|
13047
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "absolute right-1/6 top-1/6 h-2 w-2 animate-pulse rounded-full bg-white/15 delay-2000 duration-1000" })
|
|
12810
13048
|
] }),
|
|
12811
|
-
isFullScreenMode && onClose && /* @__PURE__ */ (0,
|
|
13049
|
+
isFullScreenMode && onClose && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12812
13050
|
Button,
|
|
12813
13051
|
{
|
|
12814
13052
|
variant: "ghost",
|
|
@@ -12816,15 +13054,15 @@ function VideoPlayer({
|
|
|
12816
13054
|
onClick: onClose,
|
|
12817
13055
|
className: "absolute right-4 top-4 z-10 rounded-full text-white transition-all duration-300 hover:scale-110 hover:bg-white/20 active:scale-95",
|
|
12818
13056
|
"aria-label": t("close"),
|
|
12819
|
-
children: /* @__PURE__ */ (0,
|
|
13057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.X, { className: "h-6 w-6" })
|
|
12820
13058
|
}
|
|
12821
13059
|
),
|
|
12822
|
-
title && isFullScreenMode && /* @__PURE__ */ (0,
|
|
12823
|
-
isLoading && /* @__PURE__ */ (0,
|
|
12824
|
-
/* @__PURE__ */ (0,
|
|
12825
|
-
/* @__PURE__ */ (0,
|
|
13060
|
+
title && isFullScreenMode && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "absolute left-4 top-4 z-10 animate-in slide-in-from-left-4 text-white delay-200 duration-500", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("h3", { className: "text-lg font-medium drop-shadow-lg", children: title }) }),
|
|
13061
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "absolute inset-0 z-20 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex items-center gap-3 text-white", children: [
|
|
13062
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.Loader2, { className: "h-8 w-8 animate-spin" }),
|
|
13063
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { className: "text-lg font-medium", children: t("loading_video") })
|
|
12826
13064
|
] }) }),
|
|
12827
|
-
/* @__PURE__ */ (0,
|
|
13065
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: videoContainerClasses, onClick: (event) => event.stopPropagation(), children: videoSource === "youtube" ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12828
13066
|
"iframe",
|
|
12829
13067
|
{
|
|
12830
13068
|
ref: iframeRef,
|
|
@@ -12835,7 +13073,7 @@ function VideoPlayer({
|
|
|
12835
13073
|
onLoad: () => setIsLoading(false),
|
|
12836
13074
|
title: title || "YouTube video player"
|
|
12837
13075
|
}
|
|
12838
|
-
) : videoSource === "vimeo" ? /* @__PURE__ */ (0,
|
|
13076
|
+
) : videoSource === "vimeo" ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12839
13077
|
"iframe",
|
|
12840
13078
|
{
|
|
12841
13079
|
ref: iframeRef,
|
|
@@ -12846,8 +13084,8 @@ function VideoPlayer({
|
|
|
12846
13084
|
onLoad: () => setIsLoading(false),
|
|
12847
13085
|
title: title || "Vimeo video player"
|
|
12848
13086
|
}
|
|
12849
|
-
) : /* @__PURE__ */ (0,
|
|
12850
|
-
/* @__PURE__ */ (0,
|
|
13087
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(import_jsx_runtime136.Fragment, { children: [
|
|
13088
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
12851
13089
|
"video",
|
|
12852
13090
|
{
|
|
12853
13091
|
ref: videoRef,
|
|
@@ -12857,17 +13095,17 @@ function VideoPlayer({
|
|
|
12857
13095
|
playsInline: true,
|
|
12858
13096
|
autoPlay,
|
|
12859
13097
|
children: [
|
|
12860
|
-
/* @__PURE__ */ (0,
|
|
13098
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("source", { src, type: "video/mp4" }),
|
|
12861
13099
|
t("video_not_supported")
|
|
12862
13100
|
]
|
|
12863
13101
|
}
|
|
12864
13102
|
),
|
|
12865
|
-
/* @__PURE__ */ (0,
|
|
13103
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
12866
13104
|
"div",
|
|
12867
13105
|
{
|
|
12868
13106
|
className: `absolute bottom-0 left-0 right-0 rounded-b-lg bg-gradient-to-t from-black/80 via-black/60 to-transparent p-3 transition-all duration-300 hover:from-black/90 hover:via-black/70 ${isFullScreenMode ? "pb-6" : ""}`,
|
|
12869
13107
|
children: [
|
|
12870
|
-
/* @__PURE__ */ (0,
|
|
13108
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "mb-3 flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12871
13109
|
"input",
|
|
12872
13110
|
{
|
|
12873
13111
|
type: "range",
|
|
@@ -12878,9 +13116,9 @@ function VideoPlayer({
|
|
|
12878
13116
|
className: "h-2 w-full cursor-pointer appearance-none rounded-full bg-white/30 transition-all duration-200 hover:bg-white/40 [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:shadow-lg [&::-webkit-slider-thumb]:transition-all [&::-webkit-slider-thumb]:duration-200 [&::-webkit-slider-thumb]:hover:scale-125"
|
|
12879
13117
|
}
|
|
12880
13118
|
) }),
|
|
12881
|
-
/* @__PURE__ */ (0,
|
|
12882
|
-
/* @__PURE__ */ (0,
|
|
12883
|
-
/* @__PURE__ */ (0,
|
|
13119
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
13120
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
13121
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12884
13122
|
Button,
|
|
12885
13123
|
{
|
|
12886
13124
|
variant: "ghost",
|
|
@@ -12888,10 +13126,10 @@ function VideoPlayer({
|
|
|
12888
13126
|
onClick: togglePlay,
|
|
12889
13127
|
className: "h-10 w-10 rounded-full text-white transition-all duration-200 hover:scale-110 hover:bg-white/20 active:scale-95",
|
|
12890
13128
|
"aria-label": isPlaying ? t("pause") : t("play"),
|
|
12891
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
13129
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.Pause, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.Play, { className: "h-5 w-5" })
|
|
12892
13130
|
}
|
|
12893
13131
|
),
|
|
12894
|
-
/* @__PURE__ */ (0,
|
|
13132
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12895
13133
|
Button,
|
|
12896
13134
|
{
|
|
12897
13135
|
variant: "ghost",
|
|
@@ -12899,10 +13137,10 @@ function VideoPlayer({
|
|
|
12899
13137
|
onClick: skipBackward,
|
|
12900
13138
|
className: "h-10 w-10 rounded-full text-white transition-all duration-200 hover:scale-110 hover:bg-white/20 active:scale-95",
|
|
12901
13139
|
"aria-label": t("skip_backward"),
|
|
12902
|
-
children: /* @__PURE__ */ (0,
|
|
13140
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.SkipBack, { className: "h-5 w-5" })
|
|
12903
13141
|
}
|
|
12904
13142
|
),
|
|
12905
|
-
/* @__PURE__ */ (0,
|
|
13143
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12906
13144
|
Button,
|
|
12907
13145
|
{
|
|
12908
13146
|
variant: "ghost",
|
|
@@ -12910,10 +13148,10 @@ function VideoPlayer({
|
|
|
12910
13148
|
onClick: skipForward,
|
|
12911
13149
|
className: "h-10 w-10 rounded-full text-white transition-all duration-200 hover:scale-110 hover:bg-white/20 active:scale-95",
|
|
12912
13150
|
"aria-label": t("skip_forward"),
|
|
12913
|
-
children: /* @__PURE__ */ (0,
|
|
13151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.SkipForward, { className: "h-5 w-5" })
|
|
12914
13152
|
}
|
|
12915
13153
|
),
|
|
12916
|
-
/* @__PURE__ */ (0,
|
|
13154
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12917
13155
|
Button,
|
|
12918
13156
|
{
|
|
12919
13157
|
variant: "ghost",
|
|
@@ -12921,16 +13159,16 @@ function VideoPlayer({
|
|
|
12921
13159
|
onClick: toggleMute,
|
|
12922
13160
|
className: "h-10 w-10 rounded-full text-white transition-all duration-200 hover:scale-110 hover:bg-white/20 active:scale-95",
|
|
12923
13161
|
"aria-label": isMuted ? t("unmute") : t("mute"),
|
|
12924
|
-
children: isMuted ? /* @__PURE__ */ (0,
|
|
13162
|
+
children: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.VolumeX, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.Volume2, { className: "h-5 w-5" })
|
|
12925
13163
|
}
|
|
12926
13164
|
),
|
|
12927
|
-
/* @__PURE__ */ (0,
|
|
13165
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("span", { className: "text-sm font-medium text-white/90", children: [
|
|
12928
13166
|
formatTime2(currentTime),
|
|
12929
13167
|
" / ",
|
|
12930
13168
|
formatTime2(duration || 0)
|
|
12931
13169
|
] })
|
|
12932
13170
|
] }),
|
|
12933
|
-
/* @__PURE__ */ (0,
|
|
13171
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
12934
13172
|
Button,
|
|
12935
13173
|
{
|
|
12936
13174
|
variant: "ghost",
|
|
@@ -12938,7 +13176,7 @@ function VideoPlayer({
|
|
|
12938
13176
|
onClick: toggleFullScreen,
|
|
12939
13177
|
className: "h-10 w-10 rounded-full text-white transition-all duration-200 hover:scale-110 hover:bg-white/20 active:scale-95",
|
|
12940
13178
|
"aria-label": isFullScreenMode ? t("exit_full_screen") : t("enter_full_screen"),
|
|
12941
|
-
children: isFullScreenMode ? /* @__PURE__ */ (0,
|
|
13179
|
+
children: isFullScreenMode ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.Minimize, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_lucide_react39.Maximize, { className: "h-5 w-5" })
|
|
12942
13180
|
}
|
|
12943
13181
|
)
|
|
12944
13182
|
] })
|
|
@@ -13239,7 +13477,7 @@ function useErrorHandler({ onError }) {
|
|
|
13239
13477
|
}
|
|
13240
13478
|
|
|
13241
13479
|
// src/webcam/Webcam.tsx
|
|
13242
|
-
var
|
|
13480
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
13243
13481
|
var SCREENSHOT_FORMAT = "image/jpeg";
|
|
13244
13482
|
var mirroredTransformStyle = { transform: "rotateY(180deg)" };
|
|
13245
13483
|
var Webcam = (0, import_react84.memo)(
|
|
@@ -13377,7 +13615,7 @@ var Webcam = (0, import_react84.memo)(
|
|
|
13377
13615
|
},
|
|
13378
13616
|
[minScreenshotH, minScreenshotW, onUserMedia]
|
|
13379
13617
|
);
|
|
13380
|
-
return /* @__PURE__ */ (0,
|
|
13618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
13381
13619
|
"div",
|
|
13382
13620
|
{
|
|
13383
13621
|
ref: containerRef,
|
|
@@ -13388,7 +13626,7 @@ var Webcam = (0, import_react84.memo)(
|
|
|
13388
13626
|
),
|
|
13389
13627
|
style: isMirroredInCSS ? mirroredTransformStyle : void 0,
|
|
13390
13628
|
children: [
|
|
13391
|
-
!hideScanArea && /* @__PURE__ */ (0,
|
|
13629
|
+
!hideScanArea && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
13392
13630
|
"div",
|
|
13393
13631
|
{
|
|
13394
13632
|
ref: scanAreaRef,
|
|
@@ -13400,18 +13638,18 @@ var Webcam = (0, import_react84.memo)(
|
|
|
13400
13638
|
),
|
|
13401
13639
|
style: isMirroredInCSS ? mirroredTransformStyle : void 0,
|
|
13402
13640
|
children: [
|
|
13403
|
-
!roundedScanArea && /* @__PURE__ */ (0,
|
|
13404
|
-
/* @__PURE__ */ (0,
|
|
13405
|
-
/* @__PURE__ */ (0,
|
|
13406
|
-
/* @__PURE__ */ (0,
|
|
13407
|
-
/* @__PURE__ */ (0,
|
|
13641
|
+
!roundedScanArea && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, { children: [
|
|
13642
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "absolute left-[-2px] top-[-2px] h-[45px] w-[45px] rounded-tl-[15px] border-[4px] border-b-0 border-r-0 border-white" }),
|
|
13643
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "absolute right-[-2px] top-[-2px] h-[45px] w-[45px] rounded-tr-[15px] border-[4px] border-b-0 border-l-0 border-white" }),
|
|
13644
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "absolute bottom-[-2px] right-[-2px] h-[45px] w-[45px] rounded-br-[15px] border-[4px] border-l-0 border-t-0 border-white" }),
|
|
13645
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "absolute bottom-[-2px] left-[-2px] h-[45px] w-[45px] rounded-bl-[15px] border-[4px] border-r-0 border-t-0 border-white" })
|
|
13408
13646
|
] }),
|
|
13409
13647
|
placeholderImage
|
|
13410
13648
|
]
|
|
13411
13649
|
}
|
|
13412
13650
|
),
|
|
13413
|
-
/* @__PURE__ */ (0,
|
|
13414
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
13651
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("canvas", { ref: canvasRef, className: "hidden" }),
|
|
13652
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-white/30 border-t-white" }) }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
13415
13653
|
import_react_webcam.default,
|
|
13416
13654
|
{
|
|
13417
13655
|
ref: webcamRef,
|
|
@@ -13450,7 +13688,7 @@ var import_react_i18next24 = require("react-i18next");
|
|
|
13450
13688
|
// src/mobile-webcam/DeviceCamera/DeviceCamera.tsx
|
|
13451
13689
|
var import_react85 = require("react");
|
|
13452
13690
|
var import_react_i18next23 = require("react-i18next");
|
|
13453
|
-
var
|
|
13691
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
13454
13692
|
function DeviceCamera({ onChange, facingMode, className }) {
|
|
13455
13693
|
const { t } = (0, import_react_i18next23.useTranslation)();
|
|
13456
13694
|
const handleNativeScreenshot = (0, import_react85.useCallback)(
|
|
@@ -13460,7 +13698,7 @@ function DeviceCamera({ onChange, facingMode, className }) {
|
|
|
13460
13698
|
},
|
|
13461
13699
|
[onChange]
|
|
13462
13700
|
);
|
|
13463
|
-
return /* @__PURE__ */ (0,
|
|
13701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
13464
13702
|
"div",
|
|
13465
13703
|
{
|
|
13466
13704
|
className: cn(
|
|
@@ -13468,10 +13706,10 @@ function DeviceCamera({ onChange, facingMode, className }) {
|
|
|
13468
13706
|
className
|
|
13469
13707
|
),
|
|
13470
13708
|
children: [
|
|
13471
|
-
/* @__PURE__ */ (0,
|
|
13472
|
-
/* @__PURE__ */ (0,
|
|
13709
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { children: t("camera_errors.experiencing_camera_issues") }),
|
|
13710
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("label", { className: "text-[16px] font-semibold uppercase leading-6", children: [
|
|
13473
13711
|
t("open_devices_camera"),
|
|
13474
|
-
/* @__PURE__ */ (0,
|
|
13712
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
13475
13713
|
"input",
|
|
13476
13714
|
{
|
|
13477
13715
|
className: "sr-only",
|
|
@@ -13488,7 +13726,7 @@ function DeviceCamera({ onChange, facingMode, className }) {
|
|
|
13488
13726
|
}
|
|
13489
13727
|
|
|
13490
13728
|
// src/mobile-webcam/MobileWebcam.tsx
|
|
13491
|
-
var
|
|
13729
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
13492
13730
|
var webcamClasses = "fixed left-0 top-0 z-[6] h-full w-full rounded-none";
|
|
13493
13731
|
var scanAreaClasses = String.raw`[&_.webcam\_\_scan-area]:h-full [&_.webcam\_\_scan-area]:max-h-[209px] landscape:[&_.webcam\_\_scan-area]:h-[80%] landscape:[&_.webcam\_\_scan-area]:max-h-full md:[&_.webcam\_\_scan-area]:h-auto md:[&_.webcam\_\_scan-area]:max-h-none md:[&_.webcam\_\_scan-area]:aspect-[2/1]`;
|
|
13494
13732
|
var roundedWebcamClasses = String.raw`[&_.webcam\_\_scan-area]:top-[-60px] [&_.webcam\_\_scan-area]:h-full [&_.webcam\_\_scan-area]:w-full [&_.webcam\_\_scan-area]:max-h-[55%] [&_.webcam\_\_scan-area]:max-w-[80%] max-[375px]:[&_.webcam\_\_scan-area]:max-h-[369px] max-[375px]:[&_.webcam\_\_scan-area]:max-w-[261px] max-[320px]:[&_.webcam\_\_scan-area]:max-h-[318px] max-[320px]:[&_.webcam\_\_scan-area]:max-w-[220px] landscape:[&_.webcam\_\_scan-area]:h-full landscape:[&_.webcam\_\_scan-area]:w-full landscape:[&_.webcam\_\_scan-area]:max-h-[90%] landscape:[&_.webcam\_\_scan-area]:max-w-[261px] md:[&_.webcam\_\_scan-area]:aspect-square`;
|
|
@@ -13506,19 +13744,19 @@ var MobileWebcam = (0, import_react86.forwardRef)(
|
|
|
13506
13744
|
[onScreenshot]
|
|
13507
13745
|
);
|
|
13508
13746
|
return (0, import_react_dom.createPortal)(
|
|
13509
|
-
/* @__PURE__ */ (0,
|
|
13510
|
-
/* @__PURE__ */ (0,
|
|
13747
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "mobile-camera flex justify-center", children: [
|
|
13748
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
13511
13749
|
"button",
|
|
13512
13750
|
{
|
|
13513
13751
|
type: "button",
|
|
13514
13752
|
onClick: onBack,
|
|
13515
13753
|
className: "mobile-camera__back-btn fixed left-7 top-9 z-[7] flex border-0 bg-transparent p-0 landscape:left-[50px] landscape:top-[70px]",
|
|
13516
|
-
children: /* @__PURE__ */ (0,
|
|
13754
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_lucide_react40.ChevronLeft, { size: 32, strokeWidth: 3, className: "text-white" })
|
|
13517
13755
|
}
|
|
13518
13756
|
),
|
|
13519
|
-
title && /* @__PURE__ */ (0,
|
|
13520
|
-
text ? /* @__PURE__ */ (0,
|
|
13521
|
-
/* @__PURE__ */ (0,
|
|
13757
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "mobile-camera__title fixed left-1/2 top-8 z-[7] -translate-x-1/2 whitespace-nowrap text-[18px] font-bold text-white landscape:top-[5px]", children: title }),
|
|
13758
|
+
text ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "mobile-camera__subtitle fixed top-[76px] z-[7] mx-auto my-0 px-6 text-center text-white landscape:hidden [@media(min-height:838px)]:top-28", children: text }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "mobile-camera__helper fixed top-[88px] z-[7] mx-auto my-0 px-6 text-center text-xs text-white landscape:hidden [@media(min-height:700px)]:[font-size:inherit]", children: t("place_document_inside_frame") }),
|
|
13759
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
13522
13760
|
Webcam,
|
|
13523
13761
|
{
|
|
13524
13762
|
ref,
|
|
@@ -13530,18 +13768,18 @@ var MobileWebcam = (0, import_react86.forwardRef)(
|
|
|
13530
13768
|
)
|
|
13531
13769
|
}
|
|
13532
13770
|
),
|
|
13533
|
-
/* @__PURE__ */ (0,
|
|
13534
|
-
/* @__PURE__ */ (0,
|
|
13771
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "fixed bottom-5 z-[7] flex w-[calc(100%-32px)] flex-col justify-between gap-5 self-center landscape:inset-y-0 landscape:right-10 landscape:my-auto landscape:h-auto landscape:w-auto landscape:justify-normal landscape:[&_.mobile-webcam-device-camera]:hidden", children: [
|
|
13772
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
13535
13773
|
"button",
|
|
13536
13774
|
{
|
|
13537
13775
|
type: "button",
|
|
13538
13776
|
disabled,
|
|
13539
13777
|
onClick: () => onScreenshot({ isNative: false }),
|
|
13540
13778
|
className: "mobile-camera__take-btn relative flex h-[75px] w-[75px] items-center justify-center self-center rounded-full border-0 bg-white p-[10px] shadow-[0_0_10px_#ffffff] hover:opacity-80 disabled:cursor-default disabled:opacity-60 disabled:hover:opacity-60",
|
|
13541
|
-
children: /* @__PURE__ */ (0,
|
|
13779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_lucide_react40.Camera, { size: 26, className: "text-[var(--primary)]" })
|
|
13542
13780
|
}
|
|
13543
13781
|
),
|
|
13544
|
-
/* @__PURE__ */ (0,
|
|
13782
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
13545
13783
|
DeviceCamera,
|
|
13546
13784
|
{
|
|
13547
13785
|
onChange: handleNativeScreenshot,
|
|
@@ -13558,9 +13796,9 @@ MobileWebcam.displayName = "MobileWebcam";
|
|
|
13558
13796
|
|
|
13559
13797
|
// src/wide-button/WideButton.tsx
|
|
13560
13798
|
var import_react87 = require("react");
|
|
13561
|
-
var
|
|
13799
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
13562
13800
|
var WideButton = (0, import_react87.forwardRef)(
|
|
13563
|
-
({ className, disabled, ...props }, ref) => /* @__PURE__ */ (0,
|
|
13801
|
+
({ className, disabled, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13564
13802
|
Button,
|
|
13565
13803
|
{
|
|
13566
13804
|
ref,
|
|
@@ -13578,195 +13816,6 @@ var WideButton = (0, import_react87.forwardRef)(
|
|
|
13578
13816
|
);
|
|
13579
13817
|
WideButton.displayName = "WideButton";
|
|
13580
13818
|
|
|
13581
|
-
// src/drawer/Drawer.tsx
|
|
13582
|
-
var React41 = __toESM(require("react"), 1);
|
|
13583
|
-
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
13584
|
-
var import_react_draggable = __toESM(require("react-draggable"), 1);
|
|
13585
|
-
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
13586
|
-
var DRAWER_CLOSE_THRESHOLD = 72;
|
|
13587
|
-
var DRAWER_MIN_OVERLAY_OPACITY = 0.1;
|
|
13588
|
-
function Drawer({ ...props }) {
|
|
13589
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Root, { "data-slot": "drawer", ...props });
|
|
13590
|
-
}
|
|
13591
|
-
function DrawerTrigger({ ...props }) {
|
|
13592
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
13593
|
-
}
|
|
13594
|
-
function DrawerPortal({ ...props }) {
|
|
13595
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Portal, { "data-slot": "drawer-portal", ...props });
|
|
13596
|
-
}
|
|
13597
|
-
function DrawerClose({ ...props }) {
|
|
13598
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
|
|
13599
|
-
}
|
|
13600
|
-
var DrawerOverlay = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13601
|
-
DialogPrimitive2.Overlay,
|
|
13602
|
-
{
|
|
13603
|
-
ref,
|
|
13604
|
-
"data-slot": "drawer-overlay",
|
|
13605
|
-
className: cn(
|
|
13606
|
-
"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
13607
|
-
className
|
|
13608
|
-
),
|
|
13609
|
-
...props
|
|
13610
|
-
}
|
|
13611
|
-
));
|
|
13612
|
-
DrawerOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
13613
|
-
var DrawerOverlayClasses = "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0";
|
|
13614
|
-
var DrawerContent = React41.forwardRef(
|
|
13615
|
-
({
|
|
13616
|
-
className,
|
|
13617
|
-
children,
|
|
13618
|
-
container,
|
|
13619
|
-
onClose,
|
|
13620
|
-
showHandle = true,
|
|
13621
|
-
closeOnOverlayClick = true,
|
|
13622
|
-
lockScroll = true,
|
|
13623
|
-
disableDrag = false,
|
|
13624
|
-
...props
|
|
13625
|
-
}, ref) => {
|
|
13626
|
-
const finalContainer = container || getCustomContainer() || void 0;
|
|
13627
|
-
const nodeRef = React41.useRef(null);
|
|
13628
|
-
const [dragOffsetY, setDragOffsetY] = React41.useState(0);
|
|
13629
|
-
const overlayOpacity = Math.max(
|
|
13630
|
-
DRAWER_MIN_OVERLAY_OPACITY,
|
|
13631
|
-
1 - dragOffsetY / (DRAWER_CLOSE_THRESHOLD * 2)
|
|
13632
|
-
);
|
|
13633
|
-
const handleDrag = React41.useCallback(
|
|
13634
|
-
(_event, data) => {
|
|
13635
|
-
setDragOffsetY(Math.max(0, data.y));
|
|
13636
|
-
},
|
|
13637
|
-
[]
|
|
13638
|
-
);
|
|
13639
|
-
const handleStop = React41.useCallback(
|
|
13640
|
-
(_event, data) => {
|
|
13641
|
-
if (data.y > DRAWER_CLOSE_THRESHOLD) {
|
|
13642
|
-
setDragOffsetY(0);
|
|
13643
|
-
onClose?.();
|
|
13644
|
-
return;
|
|
13645
|
-
}
|
|
13646
|
-
setDragOffsetY(0);
|
|
13647
|
-
},
|
|
13648
|
-
[onClose]
|
|
13649
|
-
);
|
|
13650
|
-
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(DrawerPortal, { container: finalContainer, children: [
|
|
13651
|
-
lockScroll ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13652
|
-
DrawerOverlay,
|
|
13653
|
-
{
|
|
13654
|
-
style: { opacity: overlayOpacity },
|
|
13655
|
-
onClick: closeOnOverlayClick ? onClose : void 0
|
|
13656
|
-
}
|
|
13657
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13658
|
-
"div",
|
|
13659
|
-
{
|
|
13660
|
-
className: cn(DrawerOverlayClasses),
|
|
13661
|
-
style: { opacity: overlayOpacity },
|
|
13662
|
-
onClick: closeOnOverlayClick ? onClose : void 0
|
|
13663
|
-
}
|
|
13664
|
-
),
|
|
13665
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13666
|
-
DialogPrimitive2.Content,
|
|
13667
|
-
{
|
|
13668
|
-
asChild: true,
|
|
13669
|
-
ref,
|
|
13670
|
-
onPointerDownOutside: (event) => {
|
|
13671
|
-
if (!closeOnOverlayClick) {
|
|
13672
|
-
event.preventDefault();
|
|
13673
|
-
}
|
|
13674
|
-
},
|
|
13675
|
-
onInteractOutside: (event) => {
|
|
13676
|
-
if (!closeOnOverlayClick) {
|
|
13677
|
-
event.preventDefault();
|
|
13678
|
-
}
|
|
13679
|
-
},
|
|
13680
|
-
...props,
|
|
13681
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "fixed inset-x-0 bottom-0 top-auto z-50 outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13682
|
-
import_react_draggable.default,
|
|
13683
|
-
{
|
|
13684
|
-
axis: "y",
|
|
13685
|
-
bounds: { top: 0 },
|
|
13686
|
-
handle: "[data-drawer-handle]",
|
|
13687
|
-
nodeRef,
|
|
13688
|
-
disabled: disableDrag,
|
|
13689
|
-
onDrag: handleDrag,
|
|
13690
|
-
onStop: handleStop,
|
|
13691
|
-
position: { x: 0, y: dragOffsetY },
|
|
13692
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
13693
|
-
"div",
|
|
13694
|
-
{
|
|
13695
|
-
ref: nodeRef,
|
|
13696
|
-
className: cn(
|
|
13697
|
-
"bg-[var(--modal-background)] flex max-h-[calc(100vh-1rem)] w-full flex-col rounded-t-[32px] shadow-lg",
|
|
13698
|
-
className
|
|
13699
|
-
),
|
|
13700
|
-
children: [
|
|
13701
|
-
showHandle && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13702
|
-
"div",
|
|
13703
|
-
{
|
|
13704
|
-
"data-drawer-handle": true,
|
|
13705
|
-
className: cn(
|
|
13706
|
-
"mx-auto flex h-8 w-24 touch-none items-center justify-center",
|
|
13707
|
-
disableDrag ? "cursor-default" : "cursor-grab active:cursor-grabbing"
|
|
13708
|
-
),
|
|
13709
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "block h-1.5 w-12 rounded-full bg-[#D9D7D3]" })
|
|
13710
|
-
}
|
|
13711
|
-
),
|
|
13712
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children })
|
|
13713
|
-
]
|
|
13714
|
-
}
|
|
13715
|
-
)
|
|
13716
|
-
}
|
|
13717
|
-
) })
|
|
13718
|
-
}
|
|
13719
|
-
)
|
|
13720
|
-
] });
|
|
13721
|
-
}
|
|
13722
|
-
);
|
|
13723
|
-
DrawerContent.displayName = DialogPrimitive2.Content.displayName;
|
|
13724
|
-
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13725
|
-
"div",
|
|
13726
|
-
{
|
|
13727
|
-
className: cn("flex flex-col gap-2 px-5 pt-2 text-center", className),
|
|
13728
|
-
...props
|
|
13729
|
-
}
|
|
13730
|
-
);
|
|
13731
|
-
DrawerHeader.displayName = "DrawerHeader";
|
|
13732
|
-
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
|
|
13733
|
-
DrawerFooter.displayName = "DrawerFooter";
|
|
13734
|
-
var DrawerTitle = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13735
|
-
DialogPrimitive2.Title,
|
|
13736
|
-
{
|
|
13737
|
-
ref,
|
|
13738
|
-
"data-slot": "drawer-title",
|
|
13739
|
-
className: cn("text-lg font-semibold leading-none", className),
|
|
13740
|
-
...props
|
|
13741
|
-
}
|
|
13742
|
-
));
|
|
13743
|
-
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
13744
|
-
var DrawerDescription = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
13745
|
-
DialogPrimitive2.Description,
|
|
13746
|
-
{
|
|
13747
|
-
ref,
|
|
13748
|
-
"data-slot": "drawer-description",
|
|
13749
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
13750
|
-
...props
|
|
13751
|
-
}
|
|
13752
|
-
));
|
|
13753
|
-
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
13754
|
-
|
|
13755
|
-
// src/lib/device.ts
|
|
13756
|
-
var DEVICE = {
|
|
13757
|
-
mobileS: "320px",
|
|
13758
|
-
mobileM: "375px",
|
|
13759
|
-
mobileL: "425px",
|
|
13760
|
-
mobileXL: "479px",
|
|
13761
|
-
tablet: "768px",
|
|
13762
|
-
laptop: "1025px",
|
|
13763
|
-
laptopM: "1126px",
|
|
13764
|
-
laptopML: "1300px",
|
|
13765
|
-
laptopL: "1440px",
|
|
13766
|
-
laptopXL: "1640px",
|
|
13767
|
-
desktop: "2560px"
|
|
13768
|
-
};
|
|
13769
|
-
|
|
13770
13819
|
// src/responsive-sheet/ResponsiveSheet.tsx
|
|
13771
13820
|
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
13772
13821
|
function ResponsiveSheet({
|
|
@@ -13812,17 +13861,7 @@ function ResponsiveSheet({
|
|
|
13812
13861
|
contentClassName
|
|
13813
13862
|
),
|
|
13814
13863
|
children: [
|
|
13815
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
13816
|
-
"div",
|
|
13817
|
-
{
|
|
13818
|
-
"aria-hidden": "true",
|
|
13819
|
-
className: cn(
|
|
13820
|
-
"text-center mb-3 text-[26px] font-semibold leading-7",
|
|
13821
|
-
titleClassName
|
|
13822
|
-
),
|
|
13823
|
-
children: title
|
|
13824
|
-
}
|
|
13825
|
-
) : null,
|
|
13864
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DialogTitle, { className: cn("text-center mb-3", titleClassName), children: title }) : null,
|
|
13826
13865
|
description ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
13827
13866
|
"p",
|
|
13828
13867
|
{
|
|
@@ -13850,7 +13889,6 @@ function ResponsiveSheet({
|
|
|
13850
13889
|
onEscapeKeyDown: handleEscapeKeyDown,
|
|
13851
13890
|
className: cn(className, drawerClassName),
|
|
13852
13891
|
children: [
|
|
13853
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DrawerTitle, { className: "sr-only", children: title }) : null,
|
|
13854
13892
|
description ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DrawerDescription, { className: "sr-only", children: description }) : null,
|
|
13855
13893
|
content
|
|
13856
13894
|
]
|
|
@@ -13867,7 +13905,6 @@ function ResponsiveSheet({
|
|
|
13867
13905
|
className: cn("max-w-[560px] border-0 p-0 shadow-xl", className, dialogClassName),
|
|
13868
13906
|
lockScroll: false,
|
|
13869
13907
|
children: [
|
|
13870
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DialogTitle, { className: "sr-only", children: title }) : null,
|
|
13871
13908
|
description ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DialogDescription, { className: "sr-only", children: description }) : null,
|
|
13872
13909
|
content
|
|
13873
13910
|
]
|
|
@@ -18879,13 +18916,13 @@ var import_date_fns2 = require("date-fns");
|
|
|
18879
18916
|
var import_date_fns = require("date-fns");
|
|
18880
18917
|
var DEFAULT_DISPLAY_FORMAT = "dd-MM-yyyy";
|
|
18881
18918
|
var SUPPORTED_FORMATS = ["dd-MM-yyyy", "dd.MM.yyyy", "dd/MM/yyyy"];
|
|
18882
|
-
var formatDate = (
|
|
18919
|
+
var formatDate = (format3 = DEFAULT_DISPLAY_FORMAT) => (date) => (0, import_date_fns.format)(date, format3);
|
|
18883
18920
|
var parseDate = (displayFormat) => (dateStr) => {
|
|
18884
18921
|
if (!dateStr) return void 0;
|
|
18885
18922
|
const formats = displayFormat ? Array.from(/* @__PURE__ */ new Set([...SUPPORTED_FORMATS, displayFormat])) : SUPPORTED_FORMATS;
|
|
18886
|
-
for (const
|
|
18887
|
-
const parsed = (0, import_date_fns.parse)(dateStr,
|
|
18888
|
-
if ((0, import_date_fns.isValid)(parsed) && (0, import_date_fns.format)(parsed,
|
|
18923
|
+
for (const format3 of formats) {
|
|
18924
|
+
const parsed = (0, import_date_fns.parse)(dateStr, format3, /* @__PURE__ */ new Date());
|
|
18925
|
+
if ((0, import_date_fns.isValid)(parsed) && (0, import_date_fns.format)(parsed, format3) === dateStr) {
|
|
18889
18926
|
return parsed;
|
|
18890
18927
|
}
|
|
18891
18928
|
}
|
|
@@ -18986,14 +19023,14 @@ function useRangeValue({
|
|
|
18986
19023
|
var React66 = __toESM(require("react"), 1);
|
|
18987
19024
|
|
|
18988
19025
|
// src/fields/date-range-picker/utils/inputFormat.ts
|
|
18989
|
-
function parseDateInputFormat(
|
|
19026
|
+
function parseDateInputFormat(format3) {
|
|
18990
19027
|
const tokens = [];
|
|
18991
19028
|
let i = 0;
|
|
18992
|
-
while (i <
|
|
18993
|
-
const ch =
|
|
19029
|
+
while (i < format3.length) {
|
|
19030
|
+
const ch = format3[i];
|
|
18994
19031
|
if (/[a-zA-Z]/.test(ch)) {
|
|
18995
19032
|
let len = 1;
|
|
18996
|
-
while (i + len <
|
|
19033
|
+
while (i + len < format3.length && format3[i + len] === ch) len++;
|
|
18997
19034
|
tokens.push({ type: "digits", length: len });
|
|
18998
19035
|
i += len;
|
|
18999
19036
|
} else {
|
|
@@ -19065,8 +19102,8 @@ function autoFormatDateInput(raw, tokens) {
|
|
|
19065
19102
|
var countDigits = (text) => text.replace(/\D/g, "").length;
|
|
19066
19103
|
function useRangeTextInputs({
|
|
19067
19104
|
value,
|
|
19068
|
-
format:
|
|
19069
|
-
parse:
|
|
19105
|
+
format: format3,
|
|
19106
|
+
parse: parse4,
|
|
19070
19107
|
displayFormat,
|
|
19071
19108
|
onCommit,
|
|
19072
19109
|
onBlur,
|
|
@@ -19078,23 +19115,23 @@ function useRangeTextInputs({
|
|
|
19078
19115
|
[displayFormat]
|
|
19079
19116
|
);
|
|
19080
19117
|
const maxDigits = React66.useMemo(() => getMaxDigits(tokens), [tokens]);
|
|
19081
|
-
const [fromText, setFromText] = React66.useState(value?.from ?
|
|
19082
|
-
const [toText, setToText] = React66.useState(value?.to ?
|
|
19118
|
+
const [fromText, setFromText] = React66.useState(value?.from ? format3(value.from) : "");
|
|
19119
|
+
const [toText, setToText] = React66.useState(value?.to ? format3(value.to) : "");
|
|
19083
19120
|
React66.useEffect(() => {
|
|
19084
|
-
setFromText(value?.from ?
|
|
19085
|
-
setToText(value?.to ?
|
|
19086
|
-
}, [
|
|
19121
|
+
setFromText(value?.from ? format3(value.from) : "");
|
|
19122
|
+
setToText(value?.to ? format3(value.to) : "");
|
|
19123
|
+
}, [format3, value?.from, value?.to]);
|
|
19087
19124
|
const handleFromChange = React66.useCallback(
|
|
19088
19125
|
(raw) => {
|
|
19089
19126
|
const formatted = autoFormatDateInput(raw, tokens);
|
|
19090
19127
|
const wasComplete = countDigits(fromText) === maxDigits;
|
|
19091
19128
|
const isComplete = countDigits(formatted) === maxDigits;
|
|
19092
19129
|
setFromText(formatted);
|
|
19093
|
-
if (!wasComplete && isComplete &&
|
|
19130
|
+
if (!wasComplete && isComplete && parse4(formatted)) {
|
|
19094
19131
|
setTimeout(() => onFromComplete?.(), 0);
|
|
19095
19132
|
}
|
|
19096
19133
|
},
|
|
19097
|
-
[fromText, maxDigits, onFromComplete,
|
|
19134
|
+
[fromText, maxDigits, onFromComplete, parse4, tokens]
|
|
19098
19135
|
);
|
|
19099
19136
|
const handleToChange = React66.useCallback(
|
|
19100
19137
|
(raw) => {
|
|
@@ -19102,11 +19139,11 @@ function useRangeTextInputs({
|
|
|
19102
19139
|
const wasComplete = countDigits(toText) === maxDigits;
|
|
19103
19140
|
const isComplete = countDigits(formatted) === maxDigits;
|
|
19104
19141
|
setToText(formatted);
|
|
19105
|
-
if (!wasComplete && isComplete &&
|
|
19142
|
+
if (!wasComplete && isComplete && parse4(formatted)) {
|
|
19106
19143
|
setTimeout(() => onToComplete?.(), 0);
|
|
19107
19144
|
}
|
|
19108
19145
|
},
|
|
19109
|
-
[maxDigits, onToComplete,
|
|
19146
|
+
[maxDigits, onToComplete, parse4, toText, tokens]
|
|
19110
19147
|
);
|
|
19111
19148
|
const handleFromBlur = React66.useCallback(() => {
|
|
19112
19149
|
if (!fromText) {
|
|
@@ -19115,16 +19152,16 @@ function useRangeTextInputs({
|
|
|
19115
19152
|
onBlur?.(next);
|
|
19116
19153
|
return void 0;
|
|
19117
19154
|
}
|
|
19118
|
-
const parsed =
|
|
19155
|
+
const parsed = parse4(fromText);
|
|
19119
19156
|
if (parsed) {
|
|
19120
19157
|
const next = { from: parsed, to: value?.to };
|
|
19121
19158
|
onCommit(next);
|
|
19122
19159
|
onBlur?.(next);
|
|
19123
19160
|
return parsed;
|
|
19124
19161
|
}
|
|
19125
|
-
setFromText(value?.from ?
|
|
19162
|
+
setFromText(value?.from ? format3(value.from) : "");
|
|
19126
19163
|
return void 0;
|
|
19127
|
-
}, [
|
|
19164
|
+
}, [format3, fromText, onBlur, onCommit, parse4, value]);
|
|
19128
19165
|
const handleToBlur = React66.useCallback(() => {
|
|
19129
19166
|
if (!toText) {
|
|
19130
19167
|
const next = { from: value?.from, to: void 0 };
|
|
@@ -19132,15 +19169,15 @@ function useRangeTextInputs({
|
|
|
19132
19169
|
onBlur?.(next);
|
|
19133
19170
|
return;
|
|
19134
19171
|
}
|
|
19135
|
-
const parsed =
|
|
19172
|
+
const parsed = parse4(toText);
|
|
19136
19173
|
if (parsed) {
|
|
19137
19174
|
const next = { from: value?.from, to: parsed };
|
|
19138
19175
|
onCommit(next);
|
|
19139
19176
|
onBlur?.(next);
|
|
19140
19177
|
return;
|
|
19141
19178
|
}
|
|
19142
|
-
setToText(value?.to ?
|
|
19143
|
-
}, [
|
|
19179
|
+
setToText(value?.to ? format3(value.to) : "");
|
|
19180
|
+
}, [format3, onBlur, onCommit, parse4, toText, value]);
|
|
19144
19181
|
return {
|
|
19145
19182
|
fromText,
|
|
19146
19183
|
toText,
|
|
@@ -20325,7 +20362,7 @@ function AirbnbFieldHelperText({
|
|
|
20325
20362
|
{
|
|
20326
20363
|
id,
|
|
20327
20364
|
className: cn(
|
|
20328
|
-
"mt-2 text-[12px]
|
|
20365
|
+
"mt-2 text-[12px] leading-5 text-[var(--chekin-airbnb-gray-text)]",
|
|
20329
20366
|
disabled && "opacity-50",
|
|
20330
20367
|
className
|
|
20331
20368
|
),
|
|
@@ -22726,6 +22763,62 @@ var AirbnbSwitch = React84.forwardRef(
|
|
|
22726
22763
|
}
|
|
22727
22764
|
);
|
|
22728
22765
|
AirbnbSwitch.displayName = "AirbnbSwitch";
|
|
22766
|
+
|
|
22767
|
+
// src/airbnb-fields/time-picker/TimePicker.tsx
|
|
22768
|
+
var React85 = __toESM(require("react"), 1);
|
|
22769
|
+
var import_date_fns6 = require("date-fns");
|
|
22770
|
+
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
22771
|
+
var SHORT_TIME_FORMAT2 = "HH:mm";
|
|
22772
|
+
function parseTime2(value) {
|
|
22773
|
+
return (0, import_date_fns6.parse)(value, SHORT_TIME_FORMAT2, /* @__PURE__ */ new Date());
|
|
22774
|
+
}
|
|
22775
|
+
function getRange2(settings) {
|
|
22776
|
+
const min = parseTime2(settings.min_time);
|
|
22777
|
+
const max = settings.max_time === "00:00" && settings.addNextDay ? (0, import_date_fns6.addDays)(parseTime2(settings.max_time), 1) : parseTime2(settings.max_time);
|
|
22778
|
+
return { min, max };
|
|
22779
|
+
}
|
|
22780
|
+
function buildOptions2(settings) {
|
|
22781
|
+
const interval_unit = settings.interval_unit ?? "M";
|
|
22782
|
+
const interval = settings.interval ?? (interval_unit === "H" ? 1 : 60);
|
|
22783
|
+
const min_time = settings.min_time ?? "00:00";
|
|
22784
|
+
const max_time = settings.max_time ?? (interval_unit === "H" ? "23:00" : "23:00");
|
|
22785
|
+
const addNextDay = settings.addNextDay !== false;
|
|
22786
|
+
const { min, max } = getRange2({ interval_unit, interval, min_time, max_time, addNextDay });
|
|
22787
|
+
const options = [];
|
|
22788
|
+
let current = new Date(min.getTime());
|
|
22789
|
+
while (current.getTime() <= max.getTime()) {
|
|
22790
|
+
const text = (0, import_date_fns6.format)(current, SHORT_TIME_FORMAT2);
|
|
22791
|
+
options.push({ value: text, label: text });
|
|
22792
|
+
current = interval_unit === "H" ? (0, import_date_fns6.addHours)(current, interval) : (0, import_date_fns6.addMinutes)(current, interval);
|
|
22793
|
+
}
|
|
22794
|
+
return options;
|
|
22795
|
+
}
|
|
22796
|
+
var FORMAT_SETTINGS2 = {
|
|
22797
|
+
time: { interval_unit: "M", interval: 30, min_time: "00:00", max_time: "23:30" },
|
|
22798
|
+
timeEach15Minutes: {
|
|
22799
|
+
interval_unit: "M",
|
|
22800
|
+
interval: 15,
|
|
22801
|
+
min_time: "00:00",
|
|
22802
|
+
max_time: "23:45"
|
|
22803
|
+
},
|
|
22804
|
+
timeEach30Minutes: {
|
|
22805
|
+
interval_unit: "M",
|
|
22806
|
+
interval: 30,
|
|
22807
|
+
min_time: "00:00",
|
|
22808
|
+
max_time: "23:30"
|
|
22809
|
+
},
|
|
22810
|
+
hours: { interval_unit: "H", interval: 1, min_time: "00:00", max_time: "23:00" }
|
|
22811
|
+
};
|
|
22812
|
+
var AirbnbTimePicker = React85.forwardRef(
|
|
22813
|
+
function AirbnbTimePicker2({ format: formatName = "time", timeSettings, options, ...selectProps }, ref) {
|
|
22814
|
+
const resolvedOptions = React85.useMemo(() => {
|
|
22815
|
+
if (options) return options;
|
|
22816
|
+
const settings = timeSettings ?? FORMAT_SETTINGS2[formatName];
|
|
22817
|
+
return buildOptions2(settings);
|
|
22818
|
+
}, [formatName, options, timeSettings]);
|
|
22819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime198.jsx)(AirbnbSelect, { ref, ...selectProps, options: resolvedOptions });
|
|
22820
|
+
}
|
|
22821
|
+
);
|
|
22729
22822
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22730
22823
|
0 && (module.exports = {
|
|
22731
22824
|
ALERT_BOX_VARIANTS,
|
|
@@ -22742,6 +22835,7 @@ AirbnbSwitch.displayName = "AirbnbSwitch";
|
|
|
22742
22835
|
AirbnbSearchableSelect,
|
|
22743
22836
|
AirbnbSelect,
|
|
22744
22837
|
AirbnbSwitch,
|
|
22838
|
+
AirbnbTimePicker,
|
|
22745
22839
|
Alert,
|
|
22746
22840
|
AlertBox,
|
|
22747
22841
|
AlertDescription,
|