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