@komensal/ui 0.10.0 → 0.11.1
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.d.ts +26 -5
- package/dist/index.js +251 -187
- package/dist/index.js.map +1 -1
- package/package.json +9 -7
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// src/components/
|
|
2
|
-
import
|
|
1
|
+
// src/components/add-tile.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
// src/utils/cn.ts
|
|
5
5
|
import { clsx } from "clsx";
|
|
@@ -65,8 +65,29 @@ var zDialogContent = "z-70";
|
|
|
65
65
|
var zPopoverAboveDialog = "z-100";
|
|
66
66
|
var zToast = "z-4000";
|
|
67
67
|
|
|
68
|
-
// src/components/
|
|
68
|
+
// src/components/add-tile.tsx
|
|
69
69
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
70
|
+
var AddTile = React.forwardRef(({ className, icon, label, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
className: cn(
|
|
74
|
+
"border-border text-muted hover:border-primary hover:text-primary focus-visible:ring-ring flex min-h-48 cursor-pointer flex-col items-center justify-center gap-2 rounded-2xl border-2 border-dashed transition-colors focus-visible:ring-2 focus-visible:outline-none",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
ref,
|
|
78
|
+
type: "button",
|
|
79
|
+
...props,
|
|
80
|
+
children: [
|
|
81
|
+
icon,
|
|
82
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: label })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
));
|
|
86
|
+
AddTile.displayName = "AddTile";
|
|
87
|
+
|
|
88
|
+
// src/components/alert.tsx
|
|
89
|
+
import { CheckCircleIcon, InfoIcon, WarningCircleIcon, WarningIcon } from "@phosphor-icons/react";
|
|
90
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
70
91
|
var variantStyles = {
|
|
71
92
|
destructive: { container: "bg-destructive-subtle text-destructive", icon: "text-destructive" },
|
|
72
93
|
info: { container: "bg-info-subtle text-info", icon: "text-info" },
|
|
@@ -82,7 +103,7 @@ var variantIcons = {
|
|
|
82
103
|
var Alert = ({ children, className, variant = "destructive", ...props }) => {
|
|
83
104
|
const styles = variantStyles[variant];
|
|
84
105
|
const Icon = variantIcons[variant];
|
|
85
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ jsxs2(
|
|
86
107
|
"div",
|
|
87
108
|
{
|
|
88
109
|
"aria-live": "polite",
|
|
@@ -94,15 +115,15 @@ var Alert = ({ children, className, variant = "destructive", ...props }) => {
|
|
|
94
115
|
role: "alert",
|
|
95
116
|
...props,
|
|
96
117
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ jsx2(Icon, { className: cn("h-5 w-5 shrink-0", styles.icon) }),
|
|
119
|
+
/* @__PURE__ */ jsx2("span", { children })
|
|
99
120
|
]
|
|
100
121
|
}
|
|
101
122
|
);
|
|
102
123
|
};
|
|
103
124
|
|
|
104
125
|
// src/components/auth-header.tsx
|
|
105
|
-
import { Fragment, jsx as
|
|
126
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
106
127
|
var AuthHeader = ({
|
|
107
128
|
children,
|
|
108
129
|
desktopLogoSrc = "/logo_color.svg",
|
|
@@ -110,19 +131,19 @@ var AuthHeader = ({
|
|
|
110
131
|
mobileClassName,
|
|
111
132
|
mobileLogoSrc = "/logotipo_color.svg"
|
|
112
133
|
}) => {
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ jsxs3("div", { className: cn("flex min-h-0 shrink flex-col lg:hidden", mobileClassName), children: [
|
|
136
|
+
/* @__PURE__ */ jsx3("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ jsx3("img", { alt: logoAlt, className: "h-11 md:h-12", src: mobileLogoSrc }) }),
|
|
116
137
|
children
|
|
117
138
|
] }),
|
|
118
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ jsx3("div", { className: "absolute hidden p-10 lg:flex", children: /* @__PURE__ */ jsx3("img", { alt: logoAlt, className: "h-12.5 w-12.5", src: desktopLogoSrc }) })
|
|
119
140
|
] });
|
|
120
141
|
};
|
|
121
142
|
|
|
122
143
|
// src/components/button.tsx
|
|
123
144
|
import { Slot } from "@radix-ui/react-slot";
|
|
124
145
|
import { cva } from "class-variance-authority";
|
|
125
|
-
import * as
|
|
146
|
+
import * as React3 from "react";
|
|
126
147
|
|
|
127
148
|
// src/components/spinner.tsx
|
|
128
149
|
import clsx2 from "clsx";
|
|
@@ -173,7 +194,7 @@ var setUiLanguage = (lng) => uiI18n.changeLanguage(lng);
|
|
|
173
194
|
var useUiT = () => useTranslation("ui", { i18n: uiI18n }).t;
|
|
174
195
|
|
|
175
196
|
// src/components/spinner.tsx
|
|
176
|
-
import { Fragment as Fragment2, jsx as
|
|
197
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
177
198
|
var sizes = {
|
|
178
199
|
lg: "70",
|
|
179
200
|
md: "50",
|
|
@@ -188,8 +209,8 @@ var variants = {
|
|
|
188
209
|
};
|
|
189
210
|
var Spinner = ({ className = "", loadingLabel, size = "md", variant = "primary" }) => {
|
|
190
211
|
const t = useUiT();
|
|
191
|
-
return /* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
212
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
213
|
+
/* @__PURE__ */ jsx4(
|
|
193
214
|
"svg",
|
|
194
215
|
{
|
|
195
216
|
fill: "currentColor",
|
|
@@ -198,9 +219,9 @@ var Spinner = ({ className = "", loadingLabel, size = "md", variant = "primary"
|
|
|
198
219
|
viewBox: "0 0 100 100",
|
|
199
220
|
width: sizes[size],
|
|
200
221
|
xmlns: "http://www.w3.org/2000/svg",
|
|
201
|
-
children: /* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ jsxs4("g", { className: clsx2("spinner_V8m1", className), children: [
|
|
223
|
+
/* @__PURE__ */ jsx4("circle", { cx: "50", cy: "50", fill: "none", opacity: "0.25", r: "35", stroke: "currentColor", strokeWidth: "10" }),
|
|
224
|
+
/* @__PURE__ */ jsx4(
|
|
204
225
|
"circle",
|
|
205
226
|
{
|
|
206
227
|
cx: "50",
|
|
@@ -210,7 +231,7 @@ var Spinner = ({ className = "", loadingLabel, size = "md", variant = "primary"
|
|
|
210
231
|
stroke: "currentColor",
|
|
211
232
|
strokeDasharray: "164.93361431346415 56.97787143782138",
|
|
212
233
|
strokeWidth: "10",
|
|
213
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ jsx4(
|
|
214
235
|
"animateTransform",
|
|
215
236
|
{
|
|
216
237
|
attributeName: "transform",
|
|
@@ -226,18 +247,18 @@ var Spinner = ({ className = "", loadingLabel, size = "md", variant = "primary"
|
|
|
226
247
|
] })
|
|
227
248
|
}
|
|
228
249
|
),
|
|
229
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ jsx4("span", { className: "sr-only", children: loadingLabel ?? t("spinner.loading") })
|
|
230
251
|
] });
|
|
231
252
|
};
|
|
232
253
|
|
|
233
254
|
// src/components/tooltip.tsx
|
|
234
255
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
235
|
-
import * as
|
|
236
|
-
import { jsx as
|
|
256
|
+
import * as React2 from "react";
|
|
257
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
237
258
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
238
259
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
239
260
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
240
|
-
var TooltipContent =
|
|
261
|
+
var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx5(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx5(
|
|
241
262
|
TooltipPrimitive.Content,
|
|
242
263
|
{
|
|
243
264
|
className: cn(
|
|
@@ -250,18 +271,18 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
250
271
|
}
|
|
251
272
|
) }));
|
|
252
273
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
253
|
-
var Tooltip =
|
|
274
|
+
var Tooltip = React2.forwardRef(
|
|
254
275
|
({ children, childrenClassName, className, message, sideTooltip = "top" }, ref) => {
|
|
255
|
-
return /* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */ jsx5(TooltipProvider, { children: /* @__PURE__ */ jsxs5(TooltipRoot, { children: [
|
|
277
|
+
/* @__PURE__ */ jsx5(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx5("div", { className: cn("", childrenClassName), ref, children }) }),
|
|
278
|
+
/* @__PURE__ */ jsx5(TooltipContent, { className: cn("", className), side: sideTooltip, children: /* @__PURE__ */ jsx5("p", { children: message }) })
|
|
258
279
|
] }) });
|
|
259
280
|
}
|
|
260
281
|
);
|
|
261
282
|
Tooltip.displayName = "Tooltip";
|
|
262
283
|
|
|
263
284
|
// src/components/button.tsx
|
|
264
|
-
import { jsx as
|
|
285
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
265
286
|
var buttonVariants = cva(
|
|
266
287
|
"w-full inline-flex items-center justify-center gap-[10px] whitespace-nowrap rounded-[12px] border border-transparent text-base font-semibold transition-all duration-300 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:bg-inactive disabled:text-inactive-text disabled:border-transparent cursor-pointer",
|
|
267
288
|
{
|
|
@@ -306,7 +327,7 @@ var buttonVariants = cva(
|
|
|
306
327
|
}
|
|
307
328
|
}
|
|
308
329
|
);
|
|
309
|
-
var Button =
|
|
330
|
+
var Button = React3.forwardRef(
|
|
310
331
|
({
|
|
311
332
|
asChild = false,
|
|
312
333
|
children,
|
|
@@ -325,7 +346,7 @@ var Button = React2.forwardRef(
|
|
|
325
346
|
...props
|
|
326
347
|
}, ref) => {
|
|
327
348
|
const Comp = asChild ? Slot : "button";
|
|
328
|
-
const buttonNode = /* @__PURE__ */
|
|
349
|
+
const buttonNode = /* @__PURE__ */ jsxs6(
|
|
329
350
|
Comp,
|
|
330
351
|
{
|
|
331
352
|
"aria-busy": isLoading || void 0,
|
|
@@ -336,32 +357,53 @@ var Button = React2.forwardRef(
|
|
|
336
357
|
children: [
|
|
337
358
|
iconLeft,
|
|
338
359
|
icon,
|
|
339
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ jsx6("span", { className: cn("flex w-full items-center justify-center gap-2", childrenClassName), children }),
|
|
340
361
|
iconRight,
|
|
341
|
-
isLoading && /* @__PURE__ */
|
|
362
|
+
isLoading && /* @__PURE__ */ jsx6("div", { className: "absolute inset-0 flex items-center justify-center bg-black/10 backdrop-blur-sm", children: /* @__PURE__ */ jsx6(Spinner, { size: "sm" }) })
|
|
342
363
|
]
|
|
343
364
|
}
|
|
344
365
|
);
|
|
345
|
-
return tooltip ? /* @__PURE__ */
|
|
366
|
+
return tooltip ? /* @__PURE__ */ jsx6(Tooltip, { childrenClassName: "flex items-center justify-center", message: tooltip, sideTooltip, children: buttonNode }) : buttonNode;
|
|
346
367
|
}
|
|
347
368
|
);
|
|
348
369
|
Button.displayName = "Button";
|
|
349
370
|
|
|
371
|
+
// src/components/chip.tsx
|
|
372
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
373
|
+
import * as React4 from "react";
|
|
374
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
375
|
+
var chipVariants = cva2(
|
|
376
|
+
"focus-visible:ring-ring inline-flex cursor-pointer items-center justify-center rounded-full px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:outline-none",
|
|
377
|
+
{
|
|
378
|
+
defaultVariants: {
|
|
379
|
+
active: false
|
|
380
|
+
},
|
|
381
|
+
variants: {
|
|
382
|
+
active: {
|
|
383
|
+
false: "bg-inactive text-inactive-text hover:bg-hover",
|
|
384
|
+
true: "bg-primary text-inverse"
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
);
|
|
389
|
+
var Chip = React4.forwardRef(({ active, className, ...props }, ref) => /* @__PURE__ */ jsx7("button", { className: cn(chipVariants({ active }), className), ref, type: "button", ...props }));
|
|
390
|
+
Chip.displayName = "Chip";
|
|
391
|
+
|
|
350
392
|
// src/components/command.tsx
|
|
351
393
|
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
352
394
|
import { Command as CommandPrimitive } from "cmdk";
|
|
353
|
-
import * as
|
|
395
|
+
import * as React6 from "react";
|
|
354
396
|
|
|
355
397
|
// src/components/dialog.tsx
|
|
356
398
|
import { XIcon } from "@phosphor-icons/react";
|
|
357
399
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
358
|
-
import * as
|
|
359
|
-
import { jsx as
|
|
400
|
+
import * as React5 from "react";
|
|
401
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
360
402
|
var Dialog = DialogPrimitive.Root;
|
|
361
403
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
362
404
|
var DialogPortal = DialogPrimitive.Portal;
|
|
363
405
|
var DialogClose = DialogPrimitive.Close;
|
|
364
|
-
var DialogOverlay =
|
|
406
|
+
var DialogOverlay = React5.forwardRef(({ className, isAbsolute = false, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
365
407
|
DialogPrimitive.Overlay,
|
|
366
408
|
{
|
|
367
409
|
className: cn(
|
|
@@ -374,12 +416,12 @@ var DialogOverlay = React3.forwardRef(({ className, isAbsolute = false, ...props
|
|
|
374
416
|
}
|
|
375
417
|
));
|
|
376
418
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
377
|
-
var DialogContent =
|
|
419
|
+
var DialogContent = React5.forwardRef(
|
|
378
420
|
({ children, className, closeLabel, container, isAbsolute = false, isCloseIcon = false, overlayClassName, ...props }, ref) => {
|
|
379
421
|
const t = useUiT();
|
|
380
|
-
return /* @__PURE__ */
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
422
|
+
return /* @__PURE__ */ jsxs7(DialogPortal, { container, children: [
|
|
423
|
+
/* @__PURE__ */ jsx8(DialogOverlay, { className: overlayClassName, isAbsolute }),
|
|
424
|
+
/* @__PURE__ */ jsxs7(
|
|
383
425
|
DialogPrimitive.Content,
|
|
384
426
|
{
|
|
385
427
|
className: cn(
|
|
@@ -391,9 +433,9 @@ var DialogContent = React3.forwardRef(
|
|
|
391
433
|
...props,
|
|
392
434
|
children: [
|
|
393
435
|
children,
|
|
394
|
-
isCloseIcon && /* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
436
|
+
isCloseIcon && /* @__PURE__ */ jsxs7(DialogPrimitive.Close, { className: "data-[state=open]:text-muted ring-offset-surface focus:ring-ring data-[state=open]:bg-hover hover:bg-hover absolute top-5 right-5 flex h-8 w-8 min-w-8 cursor-pointer items-center justify-center rounded-full bg-transparent opacity-70 transition-all hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [
|
|
437
|
+
/* @__PURE__ */ jsx8(XIcon, { className: "text-body h-4 w-4" }),
|
|
438
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: closeLabel ?? t("dialog.close") })
|
|
397
439
|
] })
|
|
398
440
|
]
|
|
399
441
|
}
|
|
@@ -402,9 +444,9 @@ var DialogContent = React3.forwardRef(
|
|
|
402
444
|
}
|
|
403
445
|
);
|
|
404
446
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
405
|
-
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
447
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx8("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
406
448
|
DialogHeader.displayName = "DialogHeader";
|
|
407
|
-
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
449
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx8(
|
|
408
450
|
"div",
|
|
409
451
|
{
|
|
410
452
|
className: cn("flex flex-col-reverse justify-center gap-2 rounded-2xl sm:flex-row", className),
|
|
@@ -412,22 +454,22 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx6(
|
|
|
412
454
|
}
|
|
413
455
|
);
|
|
414
456
|
DialogFooter.displayName = "DialogFooter";
|
|
415
|
-
var DialogTitle =
|
|
457
|
+
var DialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
416
458
|
DialogPrimitive.Title,
|
|
417
459
|
{
|
|
418
460
|
className: cn("text-lg leading-none font-semibold tracking-tight", className),
|
|
419
461
|
ref,
|
|
420
462
|
...props,
|
|
421
|
-
children: /* @__PURE__ */
|
|
463
|
+
children: /* @__PURE__ */ jsx8("span", { children: props.children })
|
|
422
464
|
}
|
|
423
465
|
));
|
|
424
466
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
425
|
-
var DialogDescription =
|
|
467
|
+
var DialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(DialogPrimitive.Description, { className: cn("text-muted text-sm", className), ref, ...props, children: /* @__PURE__ */ jsx8("span", { children: props.children }) }));
|
|
426
468
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
427
469
|
|
|
428
470
|
// src/components/command.tsx
|
|
429
|
-
import { jsx as
|
|
430
|
-
var Command =
|
|
471
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
472
|
+
var Command = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
431
473
|
CommandPrimitive,
|
|
432
474
|
{
|
|
433
475
|
className: cn("bg-surface text-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
@@ -437,11 +479,11 @@ var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
437
479
|
));
|
|
438
480
|
Command.displayName = CommandPrimitive.displayName;
|
|
439
481
|
var CommandDialog = ({ children, ...props }) => {
|
|
440
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ jsx9(Dialog, { ...props, children: /* @__PURE__ */ jsx9(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx9(Command, { className: "**:[[cmdk-group-heading]]:text-muted [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group]]:px-2 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3", children }) }) });
|
|
441
483
|
};
|
|
442
|
-
var CommandInput =
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
484
|
+
var CommandInput = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs8("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
485
|
+
/* @__PURE__ */ jsx9(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
486
|
+
/* @__PURE__ */ jsx9(
|
|
445
487
|
CommandPrimitive.Input,
|
|
446
488
|
{
|
|
447
489
|
className: cn(
|
|
@@ -454,11 +496,11 @@ var CommandInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
454
496
|
)
|
|
455
497
|
] }));
|
|
456
498
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
457
|
-
var CommandList =
|
|
499
|
+
var CommandList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(CommandPrimitive.List, { className: cn("max-h-75 overflow-x-hidden overflow-y-auto", className), ref, ...props }));
|
|
458
500
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
459
|
-
var CommandEmpty =
|
|
501
|
+
var CommandEmpty = React6.forwardRef((props, ref) => /* @__PURE__ */ jsx9(CommandPrimitive.Empty, { className: "py-6 text-center text-sm", ref, ...props }));
|
|
460
502
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
461
|
-
var CommandGroup =
|
|
503
|
+
var CommandGroup = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
462
504
|
CommandPrimitive.Group,
|
|
463
505
|
{
|
|
464
506
|
className: cn(
|
|
@@ -470,9 +512,9 @@ var CommandGroup = React4.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
470
512
|
}
|
|
471
513
|
));
|
|
472
514
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
473
|
-
var CommandSeparator =
|
|
515
|
+
var CommandSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(CommandPrimitive.Separator, { className: cn("bg-border -mx-1 h-px", className), ref, ...props }));
|
|
474
516
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
475
|
-
var CommandItem =
|
|
517
|
+
var CommandItem = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
476
518
|
CommandPrimitive.Item,
|
|
477
519
|
{
|
|
478
520
|
className: cn(
|
|
@@ -485,25 +527,25 @@ var CommandItem = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
485
527
|
));
|
|
486
528
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
487
529
|
var CommandShortcut = ({ className, ...props }) => {
|
|
488
|
-
return /* @__PURE__ */
|
|
530
|
+
return /* @__PURE__ */ jsx9("span", { className: cn("text-muted ml-auto text-xs tracking-widest", className), ...props });
|
|
489
531
|
};
|
|
490
532
|
CommandShortcut.displayName = "CommandShortcut";
|
|
491
533
|
|
|
492
534
|
// src/components/form.tsx
|
|
493
535
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
494
|
-
import * as
|
|
536
|
+
import * as React7 from "react";
|
|
495
537
|
import { Controller, FormProvider, useFormContext } from "react-hook-form";
|
|
496
|
-
import { jsx as
|
|
538
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
497
539
|
var Form = FormProvider;
|
|
498
|
-
var FormFieldContext =
|
|
540
|
+
var FormFieldContext = React7.createContext(null);
|
|
499
541
|
var FormField = ({
|
|
500
542
|
...props
|
|
501
543
|
}) => {
|
|
502
|
-
return /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ jsx10(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx10(Controller, { ...props }) });
|
|
503
545
|
};
|
|
504
546
|
var useFormField = () => {
|
|
505
|
-
const fieldContext =
|
|
506
|
-
const itemContext =
|
|
547
|
+
const fieldContext = React7.useContext(FormFieldContext);
|
|
548
|
+
const itemContext = React7.useContext(FormItemContext);
|
|
507
549
|
const { formState, getFieldState } = useFormContext();
|
|
508
550
|
if (!fieldContext) {
|
|
509
551
|
throw new Error("useFormField must be used within <FormField>");
|
|
@@ -522,18 +564,18 @@ var useFormField = () => {
|
|
|
522
564
|
...fieldState
|
|
523
565
|
};
|
|
524
566
|
};
|
|
525
|
-
var FormItemContext =
|
|
526
|
-
var FormItem =
|
|
567
|
+
var FormItemContext = React7.createContext(null);
|
|
568
|
+
var FormItem = React7.forwardRef(
|
|
527
569
|
({ className, ...props }, ref) => {
|
|
528
|
-
const id =
|
|
529
|
-
return /* @__PURE__ */
|
|
570
|
+
const id = React7.useId();
|
|
571
|
+
return /* @__PURE__ */ jsx10(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx10("div", { className: cn("space-y-1", className), ref, ...props }) });
|
|
530
572
|
}
|
|
531
573
|
);
|
|
532
574
|
FormItem.displayName = "FormItem";
|
|
533
|
-
var FormControl =
|
|
575
|
+
var FormControl = React7.forwardRef(
|
|
534
576
|
({ ...props }, ref) => {
|
|
535
577
|
const { error, formDescriptionId, formItemId, formMessageId } = useFormField();
|
|
536
|
-
return /* @__PURE__ */
|
|
578
|
+
return /* @__PURE__ */ jsx10(
|
|
537
579
|
Slot2,
|
|
538
580
|
{
|
|
539
581
|
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
@@ -546,14 +588,14 @@ var FormControl = React5.forwardRef(
|
|
|
546
588
|
}
|
|
547
589
|
);
|
|
548
590
|
FormControl.displayName = "FormControl";
|
|
549
|
-
var FormMessage =
|
|
591
|
+
var FormMessage = React7.forwardRef(
|
|
550
592
|
({ children, className, ...props }, ref) => {
|
|
551
593
|
const { error, formMessageId } = useFormField();
|
|
552
594
|
const body = error?.message ? String(error.message) : children;
|
|
553
595
|
if (!body) {
|
|
554
596
|
return null;
|
|
555
597
|
}
|
|
556
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ jsx10(
|
|
557
599
|
"p",
|
|
558
600
|
{
|
|
559
601
|
className: cn("text-destructive text-[0.8rem] font-medium", className),
|
|
@@ -572,10 +614,10 @@ import { useState } from "react";
|
|
|
572
614
|
import { EyeIcon, EyeSlashIcon, XIcon as XIcon2 } from "@phosphor-icons/react";
|
|
573
615
|
|
|
574
616
|
// src/components/input.tsx
|
|
575
|
-
import * as
|
|
576
|
-
import { jsx as
|
|
577
|
-
var Input =
|
|
578
|
-
return /* @__PURE__ */
|
|
617
|
+
import * as React8 from "react";
|
|
618
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
619
|
+
var Input = React8.forwardRef(({ className, onKeyDown, type, ...props }, ref) => {
|
|
620
|
+
return /* @__PURE__ */ jsx11(
|
|
579
621
|
"input",
|
|
580
622
|
{
|
|
581
623
|
className: cn(
|
|
@@ -606,32 +648,32 @@ Input.displayName = "Input";
|
|
|
606
648
|
|
|
607
649
|
// src/components/label.tsx
|
|
608
650
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
609
|
-
import { cva as
|
|
610
|
-
import * as
|
|
611
|
-
import { jsx as
|
|
612
|
-
var labelVariants =
|
|
613
|
-
var Label =
|
|
651
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
652
|
+
import * as React9 from "react";
|
|
653
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
654
|
+
var labelVariants = cva3("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
655
|
+
var Label = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(LabelPrimitive.Root, { className: cn(labelVariants(), className), ref, ...props }));
|
|
614
656
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
615
657
|
|
|
616
658
|
// src/components/form-fields/label-field.tsx
|
|
617
|
-
import { jsx as
|
|
659
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
618
660
|
var LabelField = ({ label, labelClassName, name, visualRequired }) => {
|
|
619
|
-
return /* @__PURE__ */
|
|
661
|
+
return /* @__PURE__ */ jsxs9(
|
|
620
662
|
Label,
|
|
621
663
|
{
|
|
622
664
|
className: cn("text-body mb-2 text-start text-sm leading-none font-normal tracking-normal", labelClassName),
|
|
623
665
|
htmlFor: name,
|
|
624
666
|
children: [
|
|
625
|
-
/* @__PURE__ */
|
|
667
|
+
/* @__PURE__ */ jsx13("span", { children: label }),
|
|
626
668
|
" ",
|
|
627
|
-
visualRequired && /* @__PURE__ */
|
|
669
|
+
visualRequired && /* @__PURE__ */ jsx13("span", { className: "text-destructive", children: " *" })
|
|
628
670
|
]
|
|
629
671
|
}
|
|
630
672
|
);
|
|
631
673
|
};
|
|
632
674
|
|
|
633
675
|
// src/components/form-fields/form-field-shell.tsx
|
|
634
|
-
import { jsx as
|
|
676
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
635
677
|
var FormFieldShell = ({
|
|
636
678
|
children,
|
|
637
679
|
hasError,
|
|
@@ -640,8 +682,8 @@ var FormFieldShell = ({
|
|
|
640
682
|
mainClassName,
|
|
641
683
|
name,
|
|
642
684
|
visualRequired
|
|
643
|
-
}) => /* @__PURE__ */
|
|
644
|
-
/* @__PURE__ */
|
|
685
|
+
}) => /* @__PURE__ */ jsxs10(FormItem, { className: cn("flex flex-col", mainClassName), children: [
|
|
686
|
+
/* @__PURE__ */ jsx14(
|
|
645
687
|
LabelField,
|
|
646
688
|
{
|
|
647
689
|
label,
|
|
@@ -650,12 +692,12 @@ var FormFieldShell = ({
|
|
|
650
692
|
visualRequired
|
|
651
693
|
}
|
|
652
694
|
),
|
|
653
|
-
/* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ jsx14(FormControl, { children }),
|
|
696
|
+
/* @__PURE__ */ jsx14(FormMessage, {})
|
|
655
697
|
] });
|
|
656
698
|
|
|
657
699
|
// src/components/form-fields/input-field.tsx
|
|
658
|
-
import { jsx as
|
|
700
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
659
701
|
var InputField = ({
|
|
660
702
|
clearLabel,
|
|
661
703
|
control,
|
|
@@ -680,14 +722,14 @@ var InputField = ({
|
|
|
680
722
|
};
|
|
681
723
|
const isPassword = type === "password";
|
|
682
724
|
const inputType = isPassword ? isPasswordVisible ? "text" : "password" : type;
|
|
683
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ jsx15(
|
|
684
726
|
FormField,
|
|
685
727
|
{
|
|
686
728
|
control,
|
|
687
729
|
name,
|
|
688
730
|
render: ({ field, fieldState }) => {
|
|
689
731
|
const hasError = !!fieldState.error;
|
|
690
|
-
return /* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ jsx15(
|
|
691
733
|
FormFieldShell,
|
|
692
734
|
{
|
|
693
735
|
hasError,
|
|
@@ -696,8 +738,8 @@ var InputField = ({
|
|
|
696
738
|
mainClassName,
|
|
697
739
|
name,
|
|
698
740
|
visualRequired,
|
|
699
|
-
children: /* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
741
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "relative", children: [
|
|
742
|
+
/* @__PURE__ */ jsx15(
|
|
701
743
|
Input,
|
|
702
744
|
{
|
|
703
745
|
...field,
|
|
@@ -717,25 +759,25 @@ var InputField = ({
|
|
|
717
759
|
value: field.value ?? ""
|
|
718
760
|
}
|
|
719
761
|
),
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
field.value && isClearable && /* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ jsxs11("div", { className: "absolute inset-y-0 right-0 flex items-center space-x-2 pr-2", children: [
|
|
763
|
+
field.value && isClearable && /* @__PURE__ */ jsx15(
|
|
722
764
|
"button",
|
|
723
765
|
{
|
|
724
766
|
className: "focus:outline-none",
|
|
725
767
|
onClick: onClear,
|
|
726
768
|
title: clearLabel ?? t("inputField.clear"),
|
|
727
769
|
type: "button",
|
|
728
|
-
children: /* @__PURE__ */
|
|
770
|
+
children: /* @__PURE__ */ jsx15(XIcon2, { size: 18 })
|
|
729
771
|
}
|
|
730
772
|
),
|
|
731
|
-
type === "password" && /* @__PURE__ */
|
|
773
|
+
type === "password" && /* @__PURE__ */ jsx15(
|
|
732
774
|
"button",
|
|
733
775
|
{
|
|
734
776
|
className: "focus:outline-none",
|
|
735
777
|
onClick: togglePasswordVisibility,
|
|
736
778
|
title: isPasswordVisible ? hidePasswordLabel ?? t("inputField.hidePassword") : showPasswordLabel ?? t("inputField.showPassword"),
|
|
737
779
|
type: "button",
|
|
738
|
-
children: isPasswordVisible ? /* @__PURE__ */
|
|
780
|
+
children: isPasswordVisible ? /* @__PURE__ */ jsx15(EyeIcon, { size: 18 }) : /* @__PURE__ */ jsx15(EyeSlashIcon, { size: 20 })
|
|
739
781
|
}
|
|
740
782
|
)
|
|
741
783
|
] })
|
|
@@ -961,7 +1003,7 @@ function useGoogleMapPicker({
|
|
|
961
1003
|
}
|
|
962
1004
|
|
|
963
1005
|
// src/components/google-map-picker.tsx
|
|
964
|
-
import { jsx as
|
|
1006
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
965
1007
|
var DEFAULT_CENTER = { lat: 4.711, lng: -74.0721 };
|
|
966
1008
|
var MapPickerContent = (props) => {
|
|
967
1009
|
const { disabled, hasError, mapId, placeholder } = props;
|
|
@@ -977,9 +1019,9 @@ var MapPickerContent = (props) => {
|
|
|
977
1019
|
showDropdown,
|
|
978
1020
|
suggestions
|
|
979
1021
|
} = useGoogleMapPicker(props);
|
|
980
|
-
return /* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-3", children: [
|
|
1023
|
+
/* @__PURE__ */ jsxs12("div", { className: "relative", children: [
|
|
1024
|
+
/* @__PURE__ */ jsx16(
|
|
983
1025
|
"input",
|
|
984
1026
|
{
|
|
985
1027
|
className: cn(inputBase, inputFocus, hasError && "border-destructive"),
|
|
@@ -992,7 +1034,7 @@ var MapPickerContent = (props) => {
|
|
|
992
1034
|
value: inputValue
|
|
993
1035
|
}
|
|
994
1036
|
),
|
|
995
|
-
showDropdown && suggestions.length > 0 && /* @__PURE__ */
|
|
1037
|
+
showDropdown && suggestions.length > 0 && /* @__PURE__ */ jsx16("ul", { className: cn("border-border bg-surface absolute mt-1 w-full overflow-hidden rounded-[10px] border shadow-md", zPopover), children: suggestions.map((suggestion) => /* @__PURE__ */ jsx16("li", { children: /* @__PURE__ */ jsx16(
|
|
996
1038
|
"button",
|
|
997
1039
|
{
|
|
998
1040
|
className: "text-foreground hover:bg-hover w-full px-4 py-3 text-left text-sm transition-colors",
|
|
@@ -1002,7 +1044,7 @@ var MapPickerContent = (props) => {
|
|
|
1002
1044
|
}
|
|
1003
1045
|
) }, suggestion.placePrediction?.placeId ?? suggestion.placePrediction?.text.text)) })
|
|
1004
1046
|
] }),
|
|
1005
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ jsx16("div", { className: "border-border h-59 overflow-hidden rounded-[10px] border md:h-87.5", children: /* @__PURE__ */ jsx16(
|
|
1006
1048
|
Map2,
|
|
1007
1049
|
{
|
|
1008
1050
|
defaultCenter: DEFAULT_CENTER,
|
|
@@ -1013,23 +1055,23 @@ var MapPickerContent = (props) => {
|
|
|
1013
1055
|
mapId: mapId ?? import.meta.env.VITE_GOOGLE_MAPS_MAP_ID ?? "DEMO_MAP_ID",
|
|
1014
1056
|
onClick: handleMapClick,
|
|
1015
1057
|
style: { height: "100%", width: "100%" },
|
|
1016
|
-
children: position && /* @__PURE__ */
|
|
1058
|
+
children: position && /* @__PURE__ */ jsx16(AdvancedMarker, { draggable: !disabled, onDragEnd: handleMarkerDragEnd, position })
|
|
1017
1059
|
}
|
|
1018
1060
|
) })
|
|
1019
1061
|
] });
|
|
1020
1062
|
};
|
|
1021
|
-
var GoogleMapPicker = (props) => /* @__PURE__ */
|
|
1063
|
+
var GoogleMapPicker = (props) => /* @__PURE__ */ jsx16(
|
|
1022
1064
|
APIProvider,
|
|
1023
1065
|
{
|
|
1024
1066
|
apiKey: props.apiKey ?? import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? "",
|
|
1025
1067
|
language: "es",
|
|
1026
1068
|
region: "CO",
|
|
1027
|
-
children: /* @__PURE__ */
|
|
1069
|
+
children: /* @__PURE__ */ jsx16(MapPickerContent, { ...props })
|
|
1028
1070
|
}
|
|
1029
1071
|
);
|
|
1030
1072
|
|
|
1031
1073
|
// src/components/form-fields/map-picker-field.tsx
|
|
1032
|
-
import { jsx as
|
|
1074
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1033
1075
|
var MapPickerField = ({
|
|
1034
1076
|
control,
|
|
1035
1077
|
label,
|
|
@@ -1038,12 +1080,12 @@ var MapPickerField = ({
|
|
|
1038
1080
|
name,
|
|
1039
1081
|
visualRequired,
|
|
1040
1082
|
...pickerProps
|
|
1041
|
-
}) => /* @__PURE__ */
|
|
1083
|
+
}) => /* @__PURE__ */ jsx17(
|
|
1042
1084
|
FormField,
|
|
1043
1085
|
{
|
|
1044
1086
|
control,
|
|
1045
1087
|
name,
|
|
1046
|
-
render: ({ field, fieldState }) => /* @__PURE__ */
|
|
1088
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ jsx17(
|
|
1047
1089
|
FormFieldShell,
|
|
1048
1090
|
{
|
|
1049
1091
|
hasError: !!fieldState.error,
|
|
@@ -1052,7 +1094,7 @@ var MapPickerField = ({
|
|
|
1052
1094
|
mainClassName,
|
|
1053
1095
|
name,
|
|
1054
1096
|
visualRequired,
|
|
1055
|
-
children: /* @__PURE__ */
|
|
1097
|
+
children: /* @__PURE__ */ jsx17(
|
|
1056
1098
|
GoogleMapPicker,
|
|
1057
1099
|
{
|
|
1058
1100
|
...pickerProps,
|
|
@@ -1068,14 +1110,14 @@ var MapPickerField = ({
|
|
|
1068
1110
|
|
|
1069
1111
|
// src/components/otp-input.tsx
|
|
1070
1112
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1071
|
-
import
|
|
1072
|
-
import { jsx as
|
|
1113
|
+
import React10 from "react";
|
|
1114
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1073
1115
|
function InputOTP({
|
|
1074
1116
|
className,
|
|
1075
1117
|
containerClassName,
|
|
1076
1118
|
...props
|
|
1077
1119
|
}) {
|
|
1078
|
-
return /* @__PURE__ */
|
|
1120
|
+
return /* @__PURE__ */ jsx18(
|
|
1079
1121
|
OTPInput,
|
|
1080
1122
|
{
|
|
1081
1123
|
className: cn("disabled:cursor-not-allowed", className),
|
|
@@ -1086,16 +1128,16 @@ function InputOTP({
|
|
|
1086
1128
|
);
|
|
1087
1129
|
}
|
|
1088
1130
|
function InputOTPGroup({ className, ...props }) {
|
|
1089
|
-
return /* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ jsx18("div", { className: cn("flex items-center gap-2", className), "data-slot": "input-otp-group", ...props });
|
|
1090
1132
|
}
|
|
1091
1133
|
function InputOTPSlot({
|
|
1092
1134
|
className,
|
|
1093
1135
|
index,
|
|
1094
1136
|
...props
|
|
1095
1137
|
}) {
|
|
1096
|
-
const inputOTPContext =
|
|
1138
|
+
const inputOTPContext = React10.useContext(OTPInputContext);
|
|
1097
1139
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] ?? {};
|
|
1098
|
-
return /* @__PURE__ */
|
|
1140
|
+
return /* @__PURE__ */ jsxs13(
|
|
1099
1141
|
"div",
|
|
1100
1142
|
{
|
|
1101
1143
|
className: cn(
|
|
@@ -1110,14 +1152,14 @@ function InputOTPSlot({
|
|
|
1110
1152
|
...props,
|
|
1111
1153
|
children: [
|
|
1112
1154
|
char,
|
|
1113
|
-
hasFakeCaret && /* @__PURE__ */
|
|
1155
|
+
hasFakeCaret && /* @__PURE__ */ jsx18("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx18("div", { className: "animate-caret-blink bg-foreground h-6 w-px duration-1000" }) })
|
|
1114
1156
|
]
|
|
1115
1157
|
}
|
|
1116
1158
|
);
|
|
1117
1159
|
}
|
|
1118
1160
|
|
|
1119
1161
|
// src/components/form-fields/otp-field.tsx
|
|
1120
|
-
import { jsx as
|
|
1162
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1121
1163
|
function OTPField({
|
|
1122
1164
|
autoFocus,
|
|
1123
1165
|
className,
|
|
@@ -1130,13 +1172,13 @@ function OTPField({
|
|
|
1130
1172
|
otpLength = 6,
|
|
1131
1173
|
visualRequired
|
|
1132
1174
|
}) {
|
|
1133
|
-
return /* @__PURE__ */
|
|
1175
|
+
return /* @__PURE__ */ jsx19(
|
|
1134
1176
|
FormField,
|
|
1135
1177
|
{
|
|
1136
1178
|
control,
|
|
1137
1179
|
name,
|
|
1138
|
-
render: ({ field, fieldState }) => /* @__PURE__ */
|
|
1139
|
-
label ? /* @__PURE__ */
|
|
1180
|
+
render: ({ field, fieldState }) => /* @__PURE__ */ jsxs14(FormItem, { className: cn("flex flex-col", className), children: [
|
|
1181
|
+
label ? /* @__PURE__ */ jsx19(
|
|
1140
1182
|
LabelField,
|
|
1141
1183
|
{
|
|
1142
1184
|
label,
|
|
@@ -1145,7 +1187,7 @@ function OTPField({
|
|
|
1145
1187
|
visualRequired
|
|
1146
1188
|
}
|
|
1147
1189
|
) : null,
|
|
1148
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ jsx19(FormControl, { children: /* @__PURE__ */ jsx19(
|
|
1149
1191
|
InputOTP,
|
|
1150
1192
|
{
|
|
1151
1193
|
"aria-invalid": fieldState.invalid || void 0,
|
|
@@ -1160,10 +1202,10 @@ function OTPField({
|
|
|
1160
1202
|
onPaste: (e) => field.onChange(e.clipboardData.getData("text")),
|
|
1161
1203
|
pattern: "[0-9]*",
|
|
1162
1204
|
value: field.value ?? "",
|
|
1163
|
-
children: /* @__PURE__ */
|
|
1205
|
+
children: /* @__PURE__ */ jsx19(InputOTPGroup, { children: Array.from({ length: otpLength }).map((_, i) => /* @__PURE__ */ jsx19(InputOTPSlot, { "aria-invalid": fieldState.invalid || void 0, index: i }, i)) })
|
|
1164
1206
|
}
|
|
1165
1207
|
) }),
|
|
1166
|
-
/* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ jsx19(FormMessage, {})
|
|
1167
1209
|
] })
|
|
1168
1210
|
}
|
|
1169
1211
|
);
|
|
@@ -1175,11 +1217,11 @@ import { cloneElement, useCallback as useCallback2, useEffect as useEffect3, use
|
|
|
1175
1217
|
|
|
1176
1218
|
// src/components/popover.tsx
|
|
1177
1219
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1178
|
-
import * as
|
|
1179
|
-
import { jsx as
|
|
1220
|
+
import * as React11 from "react";
|
|
1221
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1180
1222
|
var Popover = PopoverPrimitive.Root;
|
|
1181
1223
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1182
|
-
var PopoverContent =
|
|
1224
|
+
var PopoverContent = React11.forwardRef(({ align = "center", className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx20(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx20(
|
|
1183
1225
|
PopoverPrimitive.Content,
|
|
1184
1226
|
{
|
|
1185
1227
|
align,
|
|
@@ -1230,7 +1272,7 @@ function usePopoverWidth() {
|
|
|
1230
1272
|
}
|
|
1231
1273
|
|
|
1232
1274
|
// src/components/select-input.tsx
|
|
1233
|
-
import { Fragment as Fragment3, jsx as
|
|
1275
|
+
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1234
1276
|
var SelectInput = (props) => {
|
|
1235
1277
|
const t = useUiT();
|
|
1236
1278
|
const {
|
|
@@ -1293,9 +1335,9 @@ var SelectInput = (props) => {
|
|
|
1293
1335
|
useEffect3(() => {
|
|
1294
1336
|
setValueItem(value);
|
|
1295
1337
|
}, [value]);
|
|
1296
|
-
return /* @__PURE__ */
|
|
1297
|
-
/* @__PURE__ */
|
|
1298
|
-
/* @__PURE__ */
|
|
1338
|
+
return /* @__PURE__ */ jsx21("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ jsxs15("div", { className: "relative flex flex-col justify-center", children: [
|
|
1339
|
+
/* @__PURE__ */ jsxs15(Popover, { onOpenChange: setOpen, open, children: [
|
|
1340
|
+
/* @__PURE__ */ jsx21(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx21(
|
|
1299
1341
|
Button,
|
|
1300
1342
|
{
|
|
1301
1343
|
"aria-controls": listboxId,
|
|
@@ -1308,31 +1350,31 @@ var SelectInput = (props) => {
|
|
|
1308
1350
|
ref: divRef,
|
|
1309
1351
|
role: "combobox",
|
|
1310
1352
|
variant: "primary",
|
|
1311
|
-
children: loading ? /* @__PURE__ */
|
|
1353
|
+
children: loading ? /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
1312
1354
|
loadingLabel ?? t("selectInput.loading"),
|
|
1313
1355
|
" ",
|
|
1314
|
-
/* @__PURE__ */
|
|
1315
|
-
] }) : /* @__PURE__ */
|
|
1316
|
-
/* @__PURE__ */
|
|
1317
|
-
leftIcon && /* @__PURE__ */
|
|
1318
|
-
valueItem ? filteredOptions.find((i) => i[valueKey] === valueItem)?.[labelKey] : /* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ jsx21(Spinner, {})
|
|
1357
|
+
] }) : /* @__PURE__ */ jsxs15("div", { className: "relative flex h-5 w-full items-center", children: [
|
|
1358
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex w-full max-w-[90%] items-center truncate", children: [
|
|
1359
|
+
leftIcon && /* @__PURE__ */ jsx21("span", { className: "mr-2 shrink-0", children: cloneElement(leftIcon, { size: 20, strokeWidth: 1 }) }),
|
|
1360
|
+
valueItem ? filteredOptions.find((i) => i[valueKey] === valueItem)?.[labelKey] : /* @__PURE__ */ jsx21("span", { className: cn(inputPlaceholder, placeholderClassName), children: resolvedPlaceholder })
|
|
1319
1361
|
] }),
|
|
1320
|
-
timeField ? /* @__PURE__ */
|
|
1321
|
-
ableDeleteOption && /* @__PURE__ */
|
|
1322
|
-
!open ? /* @__PURE__ */
|
|
1362
|
+
timeField ? /* @__PURE__ */ jsx21("div", { className: "absolute top-0.5 right-0", children: /* @__PURE__ */ jsx21(ClockIcon, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" }) }) : /* @__PURE__ */ jsxs15("div", { className: "absolute top-0.5 right-0 flex gap-2", children: [
|
|
1363
|
+
ableDeleteOption && /* @__PURE__ */ jsx21("div", { "aria-hidden": true, className: "h-4 w-4 shrink-0" }),
|
|
1364
|
+
!open ? /* @__PURE__ */ jsx21(CaretDownIcon, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" }) : /* @__PURE__ */ jsx21(CaretUpIcon, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1323
1365
|
] })
|
|
1324
1366
|
] })
|
|
1325
1367
|
}
|
|
1326
1368
|
) }),
|
|
1327
|
-
/* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ jsx21(
|
|
1328
1370
|
PopoverContent,
|
|
1329
1371
|
{
|
|
1330
1372
|
className: cn("bg-surface border-border rounded-sm p-1", zPopoverAboveDialog),
|
|
1331
1373
|
id: listboxId,
|
|
1332
1374
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
1333
1375
|
style: { maxWidth: "auto", minWidth: `${width}px`, width: `${width}px` },
|
|
1334
|
-
children: /* @__PURE__ */
|
|
1335
|
-
search && /* @__PURE__ */
|
|
1376
|
+
children: /* @__PURE__ */ jsxs15(Command, { className: "flex w-full flex-col gap-2", children: [
|
|
1377
|
+
search && /* @__PURE__ */ jsx21(
|
|
1336
1378
|
Input,
|
|
1337
1379
|
{
|
|
1338
1380
|
className: "mb-1 rounded-sm",
|
|
@@ -1341,11 +1383,11 @@ var SelectInput = (props) => {
|
|
|
1341
1383
|
value: query
|
|
1342
1384
|
}
|
|
1343
1385
|
),
|
|
1344
|
-
/* @__PURE__ */
|
|
1345
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ jsx21(CommandEmpty, { className: "text-center", children: noResultsLabel ?? t("selectInput.noResults") }),
|
|
1387
|
+
/* @__PURE__ */ jsx21(CommandList, { children: /* @__PURE__ */ jsx21(CommandGroup, { className: "p-0", children: filteredOptions.map((item) => {
|
|
1346
1388
|
const labelValue = item[labelKey];
|
|
1347
1389
|
const valueValue = item[valueKey];
|
|
1348
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ jsx21(
|
|
1349
1391
|
CommandItem,
|
|
1350
1392
|
{
|
|
1351
1393
|
className: cn(
|
|
@@ -1368,7 +1410,7 @@ var SelectInput = (props) => {
|
|
|
1368
1410
|
}
|
|
1369
1411
|
)
|
|
1370
1412
|
] }),
|
|
1371
|
-
ableDeleteOption && !loading && !timeField && /* @__PURE__ */
|
|
1413
|
+
ableDeleteOption && !loading && !timeField && /* @__PURE__ */ jsx21(
|
|
1372
1414
|
"button",
|
|
1373
1415
|
{
|
|
1374
1416
|
"aria-label": t("selectInput.clear"),
|
|
@@ -1381,14 +1423,14 @@ var SelectInput = (props) => {
|
|
|
1381
1423
|
setOpen(false);
|
|
1382
1424
|
},
|
|
1383
1425
|
type: "button",
|
|
1384
|
-
children: /* @__PURE__ */
|
|
1426
|
+
children: /* @__PURE__ */ jsx21(XIcon3, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
1385
1427
|
}
|
|
1386
1428
|
)
|
|
1387
1429
|
] }) });
|
|
1388
1430
|
};
|
|
1389
1431
|
|
|
1390
1432
|
// src/components/form-fields/select-field.tsx
|
|
1391
|
-
import { jsx as
|
|
1433
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1392
1434
|
var SelectField = ({
|
|
1393
1435
|
ableDeleteOption,
|
|
1394
1436
|
className,
|
|
@@ -1404,14 +1446,14 @@ var SelectField = ({
|
|
|
1404
1446
|
search,
|
|
1405
1447
|
visualRequired
|
|
1406
1448
|
}) => {
|
|
1407
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ jsx22(
|
|
1408
1450
|
FormField,
|
|
1409
1451
|
{
|
|
1410
1452
|
control,
|
|
1411
1453
|
name,
|
|
1412
1454
|
render: ({ field, fieldState }) => {
|
|
1413
1455
|
const hasError = !!fieldState.error;
|
|
1414
|
-
return /* @__PURE__ */
|
|
1456
|
+
return /* @__PURE__ */ jsx22(
|
|
1415
1457
|
FormFieldShell,
|
|
1416
1458
|
{
|
|
1417
1459
|
hasError,
|
|
@@ -1420,7 +1462,7 @@ var SelectField = ({
|
|
|
1420
1462
|
mainClassName,
|
|
1421
1463
|
name,
|
|
1422
1464
|
visualRequired,
|
|
1423
|
-
children: /* @__PURE__ */
|
|
1465
|
+
children: /* @__PURE__ */ jsx22(
|
|
1424
1466
|
SelectInput,
|
|
1425
1467
|
{
|
|
1426
1468
|
ableDeleteOption,
|
|
@@ -1446,13 +1488,13 @@ var SelectField = ({
|
|
|
1446
1488
|
|
|
1447
1489
|
// src/components/password-checklist.tsx
|
|
1448
1490
|
import { CheckCircleIcon as CheckCircleIcon2, XCircleIcon } from "@phosphor-icons/react";
|
|
1449
|
-
import { jsx as
|
|
1491
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1450
1492
|
var PasswordChecklist = ({ className, rules, value }) => {
|
|
1451
1493
|
if (rules.length === 0) return null;
|
|
1452
|
-
return /* @__PURE__ */
|
|
1494
|
+
return /* @__PURE__ */ jsx23("ul", { className: cn("flex flex-col gap-1", className), children: rules.map((rule) => {
|
|
1453
1495
|
const isMet = rule.test(value);
|
|
1454
1496
|
const Icon = isMet ? CheckCircleIcon2 : XCircleIcon;
|
|
1455
|
-
return /* @__PURE__ */
|
|
1497
|
+
return /* @__PURE__ */ jsxs16(
|
|
1456
1498
|
"li",
|
|
1457
1499
|
{
|
|
1458
1500
|
className: cn(
|
|
@@ -1460,8 +1502,8 @@ var PasswordChecklist = ({ className, rules, value }) => {
|
|
|
1460
1502
|
isMet ? "text-success" : "text-inactive-text"
|
|
1461
1503
|
),
|
|
1462
1504
|
children: [
|
|
1463
|
-
/* @__PURE__ */
|
|
1464
|
-
/* @__PURE__ */
|
|
1505
|
+
/* @__PURE__ */ jsx23(Icon, { "aria-hidden": "true", className: "h-4 w-4 shrink-0" }),
|
|
1506
|
+
/* @__PURE__ */ jsx23("span", { children: rule.label })
|
|
1465
1507
|
]
|
|
1466
1508
|
},
|
|
1467
1509
|
rule.key
|
|
@@ -1470,22 +1512,22 @@ var PasswordChecklist = ({ className, rules, value }) => {
|
|
|
1470
1512
|
};
|
|
1471
1513
|
|
|
1472
1514
|
// src/components/step-header.tsx
|
|
1473
|
-
import { jsx as
|
|
1474
|
-
var StepHeader = ({ subtitle, subtitleClassName, title }) => /* @__PURE__ */
|
|
1475
|
-
/* @__PURE__ */
|
|
1476
|
-
subtitle !== void 0 && /* @__PURE__ */
|
|
1515
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1516
|
+
var StepHeader = ({ subtitle, subtitleClassName, title }) => /* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-1", children: [
|
|
1517
|
+
/* @__PURE__ */ jsx24("h1", { className: "text-title text-2xl font-bold", children: title }),
|
|
1518
|
+
subtitle !== void 0 && /* @__PURE__ */ jsx24("p", { className: cn("text-subtitle text-sm", subtitleClassName), children: subtitle })
|
|
1477
1519
|
] });
|
|
1478
1520
|
|
|
1479
1521
|
// src/components/stepper.tsx
|
|
1480
1522
|
import { CheckIcon } from "@phosphor-icons/react";
|
|
1481
|
-
import { jsx as
|
|
1523
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1482
1524
|
var Stepper = ({ activeIndex, className, intermediate = false, steps }) => {
|
|
1483
|
-
return /* @__PURE__ */
|
|
1525
|
+
return /* @__PURE__ */ jsx25("div", { className: cn("flex w-full items-start", className), children: steps.map((step, index) => {
|
|
1484
1526
|
const isCompleted = intermediate ? index <= activeIndex : index < activeIndex;
|
|
1485
1527
|
const isActive = !intermediate && index === activeIndex;
|
|
1486
|
-
return /* @__PURE__ */
|
|
1487
|
-
/* @__PURE__ */
|
|
1488
|
-
/* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex flex-1 flex-col items-center", children: [
|
|
1529
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex w-full items-center", children: [
|
|
1530
|
+
/* @__PURE__ */ jsx25(
|
|
1489
1531
|
"div",
|
|
1490
1532
|
{
|
|
1491
1533
|
className: cn(
|
|
@@ -1495,7 +1537,7 @@ var Stepper = ({ activeIndex, className, intermediate = false, steps }) => {
|
|
|
1495
1537
|
)
|
|
1496
1538
|
}
|
|
1497
1539
|
),
|
|
1498
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ jsx25(
|
|
1499
1541
|
"div",
|
|
1500
1542
|
{
|
|
1501
1543
|
"aria-current": isActive ? "step" : void 0,
|
|
@@ -1505,10 +1547,10 @@ var Stepper = ({ activeIndex, className, intermediate = false, steps }) => {
|
|
|
1505
1547
|
isActive && "bg-primary border-primary text-inverse",
|
|
1506
1548
|
!isCompleted && !isActive && "bg-inactive border-inactive text-surface"
|
|
1507
1549
|
),
|
|
1508
|
-
children: isCompleted ? /* @__PURE__ */
|
|
1550
|
+
children: isCompleted ? /* @__PURE__ */ jsx25(CheckIcon, { className: "h-4 w-4" }) : index + 1
|
|
1509
1551
|
}
|
|
1510
1552
|
),
|
|
1511
|
-
/* @__PURE__ */
|
|
1553
|
+
/* @__PURE__ */ jsx25(
|
|
1512
1554
|
"div",
|
|
1513
1555
|
{
|
|
1514
1556
|
className: cn(
|
|
@@ -1516,7 +1558,7 @@ var Stepper = ({ activeIndex, className, intermediate = false, steps }) => {
|
|
|
1516
1558
|
isCompleted ? "bg-primary" : "bg-inactive",
|
|
1517
1559
|
index === steps.length - 1 && "rounded-r-full"
|
|
1518
1560
|
),
|
|
1519
|
-
children: index === 0 && /* @__PURE__ */
|
|
1561
|
+
children: index === 0 && /* @__PURE__ */ jsx25(
|
|
1520
1562
|
"div",
|
|
1521
1563
|
{
|
|
1522
1564
|
className: cn(
|
|
@@ -1528,15 +1570,33 @@ var Stepper = ({ activeIndex, className, intermediate = false, steps }) => {
|
|
|
1528
1570
|
}
|
|
1529
1571
|
)
|
|
1530
1572
|
] }),
|
|
1531
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ jsx25("span", { className: cn("mt-1 text-xs font-normal", isCompleted || isActive ? "text-primary" : "text-muted"), children: step.label })
|
|
1532
1574
|
] }, step.label);
|
|
1533
1575
|
}) });
|
|
1534
1576
|
};
|
|
1535
1577
|
|
|
1578
|
+
// src/components/switch.tsx
|
|
1579
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
1580
|
+
import * as React12 from "react";
|
|
1581
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1582
|
+
var Switch = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1583
|
+
SwitchPrimitive.Root,
|
|
1584
|
+
{
|
|
1585
|
+
className: cn(
|
|
1586
|
+
"focus-visible:ring-ring relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full transition-colors focus-visible:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-success data-[state=unchecked]:bg-inactive",
|
|
1587
|
+
className
|
|
1588
|
+
),
|
|
1589
|
+
ref,
|
|
1590
|
+
...props,
|
|
1591
|
+
children: /* @__PURE__ */ jsx26(SwitchPrimitive.Thumb, { className: "bg-surface pointer-events-none block h-5 w-5 translate-x-0.5 rounded-full shadow-lg transition-transform data-[state=checked]:translate-x-5" })
|
|
1592
|
+
}
|
|
1593
|
+
));
|
|
1594
|
+
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
1595
|
+
|
|
1536
1596
|
// src/components/toast/toast.tsx
|
|
1537
1597
|
import { CheckIcon as CheckIcon2, FileLockIcon, InfoIcon as InfoIcon2, WarningIcon as WarningIcon2, XIcon as XIcon4 } from "@phosphor-icons/react";
|
|
1538
1598
|
import { useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
|
|
1539
|
-
import { jsx as
|
|
1599
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1540
1600
|
var EXIT_ANIMATION_MS = 200;
|
|
1541
1601
|
var typeIcons = {
|
|
1542
1602
|
destructive: XIcon4,
|
|
@@ -1573,7 +1633,7 @@ function Toast({ duration = 2500, id, onClose, subtitle, title, type }) {
|
|
|
1573
1633
|
if (exitRef.current) clearTimeout(exitRef.current);
|
|
1574
1634
|
};
|
|
1575
1635
|
}, [id, duration, onClose]);
|
|
1576
|
-
return /* @__PURE__ */
|
|
1636
|
+
return /* @__PURE__ */ jsxs19(
|
|
1577
1637
|
"div",
|
|
1578
1638
|
{
|
|
1579
1639
|
"aria-live": "polite",
|
|
@@ -1591,13 +1651,13 @@ function Toast({ duration = 2500, id, onClose, subtitle, title, type }) {
|
|
|
1591
1651
|
),
|
|
1592
1652
|
role: "status",
|
|
1593
1653
|
children: [
|
|
1594
|
-
/* @__PURE__ */
|
|
1595
|
-
subtitle ? /* @__PURE__ */
|
|
1596
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ jsx27("div", { className: "min-w-0 pr-4", children: /* @__PURE__ */ jsx27("h4", { className: cn("text-[16px] leading-normal font-semibold", "text-foreground", "line-clamp-2"), children: title }) }),
|
|
1655
|
+
subtitle ? /* @__PURE__ */ jsx27("div", { className: "shrink-0 pr-4 text-left", children: /* @__PURE__ */ jsx27("div", { className: cn("max-w-28 text-[14px] leading-[19.5px] font-normal", "text-body"), children: subtitle }) }) : null,
|
|
1656
|
+
/* @__PURE__ */ jsx27(
|
|
1597
1657
|
"div",
|
|
1598
1658
|
{
|
|
1599
1659
|
className: cn("shrink-0", "flex h-8 w-8 min-w-8 items-center justify-center rounded-full border-2", styles.iconBorder),
|
|
1600
|
-
children: /* @__PURE__ */
|
|
1660
|
+
children: /* @__PURE__ */ jsx27(Icon, { className: cn("h-5 w-5", styles.icon) })
|
|
1601
1661
|
}
|
|
1602
1662
|
)
|
|
1603
1663
|
]
|
|
@@ -1607,7 +1667,7 @@ function Toast({ duration = 2500, id, onClose, subtitle, title, type }) {
|
|
|
1607
1667
|
|
|
1608
1668
|
// src/components/toast/toast-provider.tsx
|
|
1609
1669
|
import { useCallback as useCallback3, useEffect as useEffect5, useLayoutEffect, useMemo as useMemo4, useRef as useRef4, useState as useState6 } from "react";
|
|
1610
|
-
import { Fragment as Fragment4, jsx as
|
|
1670
|
+
import { Fragment as Fragment4, jsx as jsx28 } from "react/jsx-runtime";
|
|
1611
1671
|
function ToastProvider() {
|
|
1612
1672
|
const [toasts, setToasts] = useState6([]);
|
|
1613
1673
|
const itemRefs = useRef4(/* @__PURE__ */ new Map());
|
|
@@ -1668,7 +1728,7 @@ function ToastProvider() {
|
|
|
1668
1728
|
itemRefs.current.set(id, el);
|
|
1669
1729
|
};
|
|
1670
1730
|
}, []);
|
|
1671
|
-
return /* @__PURE__ */
|
|
1731
|
+
return /* @__PURE__ */ jsx28(Fragment4, { children: Object.entries(grouped).map(([position, list]) => /* @__PURE__ */ jsx28("div", { className: `fixed ${zToast} ${getPositionClass(position)}`, children: /* @__PURE__ */ jsx28("div", { className: "relative flex flex-col gap-3", children: list.map((toast2) => /* @__PURE__ */ jsx28("div", { ref: setItemRef(toast2.id), children: /* @__PURE__ */ jsx28(
|
|
1672
1732
|
Toast,
|
|
1673
1733
|
{
|
|
1674
1734
|
duration: toast2.duration,
|
|
@@ -1696,14 +1756,16 @@ function getPositionClass(position) {
|
|
|
1696
1756
|
}
|
|
1697
1757
|
|
|
1698
1758
|
// src/components/wrapper.tsx
|
|
1699
|
-
import { jsx as
|
|
1759
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1700
1760
|
var Wrapper = ({ children, className }) => {
|
|
1701
|
-
return /* @__PURE__ */
|
|
1761
|
+
return /* @__PURE__ */ jsx29("div", { className: cn("mx-auto h-full w-full", className), children });
|
|
1702
1762
|
};
|
|
1703
1763
|
export {
|
|
1764
|
+
AddTile,
|
|
1704
1765
|
Alert,
|
|
1705
1766
|
AuthHeader,
|
|
1706
1767
|
Button,
|
|
1768
|
+
Chip,
|
|
1707
1769
|
Command,
|
|
1708
1770
|
CommandDialog,
|
|
1709
1771
|
CommandEmpty,
|
|
@@ -1747,11 +1809,13 @@ export {
|
|
|
1747
1809
|
Spinner,
|
|
1748
1810
|
StepHeader,
|
|
1749
1811
|
Stepper,
|
|
1812
|
+
Switch,
|
|
1750
1813
|
Toast,
|
|
1751
1814
|
ToastProvider,
|
|
1752
1815
|
Tooltip,
|
|
1753
1816
|
Wrapper,
|
|
1754
1817
|
buttonVariants,
|
|
1818
|
+
chipVariants,
|
|
1755
1819
|
cn,
|
|
1756
1820
|
inputBase,
|
|
1757
1821
|
inputCompact,
|