@adamosuiteservices/ui 2.18.6 → 2.19.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/README.md +1 -1
- package/dist/accordion-rounded.cjs +8 -8
- package/dist/accordion-rounded.js +12 -12
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/alert.cjs +32 -23
- package/dist/alert.js +53 -43
- package/dist/amount-input.cjs +8 -0
- package/dist/amount-input.js +191 -0
- package/dist/avatar.cjs +7 -7
- package/dist/avatar.js +18 -18
- package/dist/badge.cjs +24 -28
- package/dist/badge.js +45 -42
- package/dist/breadcrumb.cjs +3 -4
- package/dist/breadcrumb.js +17 -18
- package/dist/button-CPm4-98H.cjs +87 -0
- package/dist/button-D4ddrxyp.js +156 -0
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/{calendar-Dorq3-wv.cjs → calendar-DXq90PYV.cjs} +20 -22
- package/dist/{calendar-xBaFu2sB.js → calendar-DgfO9zab.js} +239 -240
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.cjs +3 -3
- package/dist/card.js +4 -4
- package/dist/checkbox-CIzBdqN7.cjs +24 -0
- package/dist/{checkbox-DL_jFvgl.js → checkbox-DPlUjwLi.js} +54 -52
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/colors.css +1 -1
- package/dist/combobox-DG9u4g84.js +692 -0
- package/dist/combobox-DylTjGrw.cjs +57 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/components/layout/sidebar/sidebar.d.ts +2 -1
- package/dist/components/layout/toaster/toaster.d.ts +1 -1
- package/dist/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/amount-input/amount-input.d.ts +32 -0
- package/dist/components/ui/amount-input/index.d.ts +1 -0
- package/dist/components/ui/badge/badge.d.ts +3 -2
- package/dist/components/ui/calendar/calendar.d.ts +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +3 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +3 -1
- package/dist/components/ui/selectable-card/index.d.ts +1 -0
- package/dist/components/ui/selectable-card/selectable-card.d.ts +22 -0
- package/dist/components/ui/timeline/index.d.ts +1 -0
- package/dist/components/ui/timeline/timeline.d.ts +30 -0
- package/dist/components/ui/typography/typography.d.ts +1 -1
- package/dist/context-menu.cjs +18 -19
- package/dist/context-menu.js +37 -38
- package/dist/date-picker-selector.cjs +1 -1
- package/dist/date-picker-selector.js +3 -3
- package/dist/dialog.cjs +7 -9
- package/dist/dialog.js +36 -38
- package/dist/dropdown-menu.cjs +57 -36
- package/dist/dropdown-menu.js +206 -173
- package/dist/field.cjs +12 -7
- package/dist/field.js +51 -45
- package/dist/file-upload-v2.cjs +11 -5
- package/dist/file-upload-v2.js +75 -60
- package/dist/file-upload.cjs +11 -5
- package/dist/file-upload.js +118 -110
- package/dist/full-screen-loader.cjs +1 -1
- package/dist/full-screen-loader.js +1 -1
- package/dist/{icon-B7joBr0A.cjs → icon-C5Q2b1Am.cjs} +1 -1
- package/dist/{icon-BFQz1tQC.js → icon-t4jt1Z2h.js} +1 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.js +1 -1
- package/dist/index-BBT2EGq8.js +18 -0
- package/dist/index-DCsgSkBj.cjs +1 -0
- package/dist/input-8sEO5zwD.js +44 -0
- package/dist/input-AONeSXcs.cjs +22 -0
- package/dist/input-group-BLffLxyg.cjs +86 -0
- package/dist/input-group-DmevJAqa.js +240 -0
- package/dist/input-group.cjs +1 -84
- package/dist/input-group.js +7 -234
- package/dist/input-otp.cjs +5 -7
- package/dist/input-otp.js +58 -60
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/kbd.cjs +6 -7
- package/dist/kbd.js +14 -15
- package/dist/{label-DqfX9cHc.cjs → label-B7Z1D5-Q.cjs} +5 -4
- package/dist/{label-C6zVnc3d.js → label-_BWRIH7C.js} +14 -13
- package/dist/label.cjs +1 -1
- package/dist/label.js +1 -1
- package/dist/pagination.cjs +5 -5
- package/dist/pagination.js +18 -18
- package/dist/radio-group.cjs +12 -9
- package/dist/radio-group.js +66 -63
- package/dist/select.cjs +18 -16
- package/dist/select.js +18 -16
- package/dist/selectable-card.cjs +29 -0
- package/dist/selectable-card.js +129 -0
- package/dist/separator-DXdc7LcC.cjs +7 -0
- package/dist/{separator-CsaqP20m.js → separator-DZfXXbNt.js} +1 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +1 -1
- package/dist/{sheet-Cnq7TCzu.cjs → sheet-Cp6JGhWC.cjs} +10 -10
- package/dist/{sheet-C9vce0ut.js → sheet-hWerE8S1.js} +9 -6
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.cjs +10 -10
- package/dist/sidebar.js +83 -92
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-C7q7NthY.cjs → spinner-DUZ2vcus.cjs} +1 -1
- package/dist/{spinner-DQ5JLL3U.js → spinner-_-J3zJ_g.js} +1 -1
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch.cjs +2 -4
- package/dist/switch.js +71 -73
- package/dist/table.cjs +14 -14
- package/dist/table.js +12 -12
- package/dist/tabs-underline.cjs +11 -15
- package/dist/tabs-underline.js +20 -24
- package/dist/tabs.cjs +10 -14
- package/dist/tabs.js +20 -24
- package/dist/tailwind-colors.css +1 -1
- package/dist/tailwind-theme.css +1 -1
- package/dist/textarea-BSooGyp-.cjs +18 -0
- package/dist/textarea-D_sj6ivo.js +39 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/themes.css +1 -1
- package/dist/timeline.cjs +4 -0
- package/dist/timeline.js +189 -0
- package/dist/toaster.cjs +5 -4
- package/dist/toaster.js +33 -32
- package/dist/toggle.cjs +4 -4
- package/dist/toggle.js +17 -17
- package/dist/tooltip.cjs +5 -6
- package/dist/tooltip.js +4 -5
- package/docs/components/layout/sidebar.md +81 -53
- package/docs/components/layout/toaster.md +35 -55
- package/docs/components/ui/accordion-rounded.md +12 -11
- package/docs/components/ui/alert.md +66 -36
- package/docs/components/ui/amount-input.md +229 -0
- package/docs/components/ui/avatar.md +28 -32
- package/docs/components/ui/badge.md +85 -32
- package/docs/components/ui/breadcrumb.md +5 -7
- package/docs/components/ui/button-group.md +16 -16
- package/docs/components/ui/button.md +23 -36
- package/docs/components/ui/calendar.md +54 -27
- package/docs/components/ui/card.md +5 -4
- package/docs/components/ui/checkbox.md +3 -3
- package/docs/components/ui/combobox.md +35 -1
- package/docs/components/ui/command.md +7 -7
- package/docs/components/ui/context-menu.md +14 -15
- package/docs/components/ui/date-picker-selector.md +31 -31
- package/docs/components/ui/dialog.md +47 -49
- package/docs/components/ui/dropdown-menu.md +34 -37
- package/docs/components/ui/field.md +25 -31
- package/docs/components/ui/file-upload-v2.md +11 -0
- package/docs/components/ui/file-upload.md +105 -108
- package/docs/components/ui/hover-card.md +28 -6
- package/docs/components/ui/icon.md +10 -9
- package/docs/components/ui/input-group.md +9 -9
- package/docs/components/ui/input.md +30 -33
- package/docs/components/ui/kbd.md +10 -9
- package/docs/components/ui/label.md +6 -6
- package/docs/components/ui/pagination.md +3 -3
- package/docs/components/ui/popover.md +1 -0
- package/docs/components/ui/progress.md +3 -3
- package/docs/components/ui/radio-group.md +18 -6
- package/docs/components/ui/scroll-area.md +4 -4
- package/docs/components/ui/select.md +14 -12
- package/docs/components/ui/selectable-card.md +204 -0
- package/docs/components/ui/separator.md +4 -4
- package/docs/components/ui/sheet.md +21 -3
- package/docs/components/ui/slider.md +3 -3
- package/docs/components/ui/switch.md +7 -7
- package/docs/components/ui/table.md +7 -4
- package/docs/components/ui/tabs-underline.md +36 -36
- package/docs/components/ui/tabs.md +6 -4
- package/docs/components/ui/textarea.md +6 -4
- package/docs/components/ui/timeline.md +214 -0
- package/docs/components/ui/toggle.md +1 -1
- package/docs/components/ui/tooltip.md +3 -3
- package/llm.txt +7 -4
- package/package.json +13 -1
- package/dist/button-BnUlAtuD.js +0 -132
- package/dist/button-CFJs0esR.cjs +0 -63
- package/dist/checkbox-3RIZX2HF.cjs +0 -22
- package/dist/combobox-MkeJiTXj.js +0 -637
- package/dist/combobox-jJRxvUsB.cjs +0 -40
- package/dist/input-BCiOr4Fy.js +0 -44
- package/dist/input-Bz5k4w94.cjs +0 -22
- package/dist/separator-CCGaTo09.cjs +0 -7
- package/dist/textarea-BRCnIxdB.js +0 -33
- package/dist/textarea-DkFUS_oS.cjs +0 -14
package/dist/context-menu.js
CHANGED
|
@@ -6,8 +6,8 @@ import { c as X } from "./index-FxyLF8MY.js";
|
|
|
6
6
|
import { P as H } from "./index-BMWt1NBG.js";
|
|
7
7
|
import { c as b, R as W, A as K, P as Y, C as q, I as J, a as Q, b as V, d as Z, L as ee, S as te, G as ae, e as ne, f as oe, g as re, h as de, i as se } from "./index-wujanfX3.js";
|
|
8
8
|
import { u as me } from "./index-0ioNhtNM.js";
|
|
9
|
-
import { I as h } from "./icon-
|
|
10
|
-
import { c as
|
|
9
|
+
import { I as h } from "./icon-t4jt1Z2h.js";
|
|
10
|
+
import { c as l } from "./index-CRiPKpXj.js";
|
|
11
11
|
var M = "ContextMenu", [ie] = X(M, [
|
|
12
12
|
b
|
|
13
13
|
]), s = b(), [ue, _] = ie(M), R = (e) => {
|
|
@@ -46,8 +46,8 @@ var N = "ContextMenuTrigger", P = d.forwardRef(
|
|
|
46
46
|
}), f = d.useRef(0), i = d.useCallback(
|
|
47
47
|
() => window.clearTimeout(f.current),
|
|
48
48
|
[]
|
|
49
|
-
), v = (
|
|
50
|
-
m.current = { x:
|
|
49
|
+
), v = (x) => {
|
|
50
|
+
m.current = { x: x.clientX, y: x.clientY }, c.onOpenChange(!0);
|
|
51
51
|
};
|
|
52
52
|
return d.useEffect(() => i, [i]), d.useEffect(() => void (a && i()), [a, i]), /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
53
53
|
/* @__PURE__ */ o.jsx(K, { ...u, virtualRef: p }),
|
|
@@ -59,13 +59,13 @@ var N = "ContextMenuTrigger", P = d.forwardRef(
|
|
|
59
59
|
...r,
|
|
60
60
|
ref: t,
|
|
61
61
|
style: { WebkitTouchCallout: "none", ...e.style },
|
|
62
|
-
onContextMenu: a ? e.onContextMenu : C(e.onContextMenu, (
|
|
63
|
-
i(), v(
|
|
62
|
+
onContextMenu: a ? e.onContextMenu : C(e.onContextMenu, (x) => {
|
|
63
|
+
i(), v(x), x.preventDefault();
|
|
64
64
|
}),
|
|
65
65
|
onPointerDown: a ? e.onPointerDown : C(
|
|
66
66
|
e.onPointerDown,
|
|
67
|
-
g((
|
|
68
|
-
i(), f.current = window.setTimeout(() => v(
|
|
67
|
+
g((x) => {
|
|
68
|
+
i(), f.current = window.setTimeout(() => v(x), 700);
|
|
69
69
|
})
|
|
70
70
|
),
|
|
71
71
|
onPointerMove: a ? e.onPointerMove : C(e.onPointerMove, g(i)),
|
|
@@ -113,20 +113,20 @@ var j = "ContextMenuContent", w = d.forwardRef(
|
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
w.displayName = j;
|
|
116
|
-
var
|
|
116
|
+
var le = "ContextMenuGroup", I = d.forwardRef(
|
|
117
117
|
(e, t) => {
|
|
118
118
|
const { __scopeContextMenu: n, ...a } = e, r = s(n);
|
|
119
119
|
return /* @__PURE__ */ o.jsx(ae, { ...r, ...a, ref: t });
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
|
-
I.displayName =
|
|
123
|
-
var
|
|
122
|
+
I.displayName = le;
|
|
123
|
+
var xe = "ContextMenuLabel", y = d.forwardRef(
|
|
124
124
|
(e, t) => {
|
|
125
125
|
const { __scopeContextMenu: n, ...a } = e, r = s(n);
|
|
126
126
|
return /* @__PURE__ */ o.jsx(ee, { ...r, ...a, ref: t });
|
|
127
127
|
}
|
|
128
128
|
);
|
|
129
|
-
y.displayName =
|
|
129
|
+
y.displayName = xe;
|
|
130
130
|
var pe = "ContextMenuItem", E = d.forwardRef(
|
|
131
131
|
(e, t) => {
|
|
132
132
|
const { __scopeContextMenu: n, ...a } = e, r = s(n);
|
|
@@ -252,16 +252,15 @@ function Qe({
|
|
|
252
252
|
{
|
|
253
253
|
"data-slot": "context-menu-sub-trigger",
|
|
254
254
|
"data-inset": t,
|
|
255
|
-
className:
|
|
255
|
+
className: l(
|
|
256
256
|
`
|
|
257
|
-
adm:flex adm:h-
|
|
258
|
-
adm:
|
|
257
|
+
adm:flex adm:h-11 adm:cursor-default adm:items-center adm:gap-3
|
|
258
|
+
adm:pr-10 adm:pl-4 adm:text-sm adm:outline-hidden adm:select-none
|
|
259
259
|
adm:first:rounded-t-sm
|
|
260
260
|
adm:last:rounded-b-sm
|
|
261
|
-
adm:focus:bg-
|
|
261
|
+
adm:focus:bg-muted adm:focus:text-foreground
|
|
262
262
|
adm:data-inset:pl-8
|
|
263
|
-
adm:data-[state=open]:bg-
|
|
264
|
-
adm:data-[state=open]:text-accent-foreground
|
|
263
|
+
adm:data-[state=open]:bg-muted adm:data-[state=open]:text-foreground
|
|
265
264
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
266
265
|
`,
|
|
267
266
|
e
|
|
@@ -290,7 +289,7 @@ function Ve({
|
|
|
290
289
|
Ge,
|
|
291
290
|
{
|
|
292
291
|
"data-slot": "context-menu-sub-content",
|
|
293
|
-
className:
|
|
292
|
+
className: l(
|
|
294
293
|
`
|
|
295
294
|
adm:z-50 adm:min-w-[8rem]
|
|
296
295
|
adm:origin-(--radix-context-menu-content-transform-origin)
|
|
@@ -319,7 +318,7 @@ function Ze({
|
|
|
319
318
|
Se,
|
|
320
319
|
{
|
|
321
320
|
"data-slot": "context-menu-content",
|
|
322
|
-
className:
|
|
321
|
+
className: l(
|
|
323
322
|
`
|
|
324
323
|
adm:z-50 adm:max-h-(--radix-context-menu-content-available-height)
|
|
325
324
|
adm:min-w-[8rem]
|
|
@@ -354,13 +353,14 @@ function et({
|
|
|
354
353
|
"data-slot": "context-menu-item",
|
|
355
354
|
"data-inset": t,
|
|
356
355
|
"data-variant": n,
|
|
357
|
-
className:
|
|
356
|
+
className: l(
|
|
358
357
|
`
|
|
359
|
-
adm:relative adm:flex adm:h-
|
|
360
|
-
adm:gap-
|
|
358
|
+
adm:relative adm:flex adm:h-11 adm:cursor-default adm:items-center
|
|
359
|
+
adm:gap-3 adm:pr-10 adm:pl-4 adm:text-sm adm:outline-hidden
|
|
360
|
+
adm:select-none
|
|
361
361
|
adm:first:rounded-t-sm
|
|
362
362
|
adm:last:rounded-b-sm
|
|
363
|
-
adm:focus:bg-
|
|
363
|
+
adm:focus:bg-muted adm:focus:text-foreground
|
|
364
364
|
adm:data-disabled:pointer-events-none adm:data-disabled:opacity-50
|
|
365
365
|
adm:data-inset:pl-8
|
|
366
366
|
adm:data-[variant=destructive]:text-destructive
|
|
@@ -386,14 +386,14 @@ function tt({
|
|
|
386
386
|
ye,
|
|
387
387
|
{
|
|
388
388
|
"data-slot": "context-menu-checkbox-item",
|
|
389
|
-
className:
|
|
389
|
+
className: l(
|
|
390
390
|
`
|
|
391
|
-
adm:relative adm:flex adm:h-
|
|
392
|
-
adm:gap-
|
|
391
|
+
adm:relative adm:flex adm:h-11 adm:cursor-default adm:items-center
|
|
392
|
+
adm:gap-3 adm:pr-10 adm:pl-8 adm:text-sm adm:outline-hidden
|
|
393
393
|
adm:select-none
|
|
394
394
|
adm:first:rounded-t-sm
|
|
395
395
|
adm:last:rounded-b-sm
|
|
396
|
-
adm:focus:bg-
|
|
396
|
+
adm:focus:bg-muted adm:focus:text-foreground
|
|
397
397
|
adm:data-disabled:pointer-events-none adm:data-disabled:opacity-50
|
|
398
398
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
399
399
|
`,
|
|
@@ -409,7 +409,7 @@ function tt({
|
|
|
409
409
|
adm:pointer-events-none adm:absolute adm:left-2 adm:flex adm:size-3.5
|
|
410
410
|
adm:items-center adm:justify-center
|
|
411
411
|
`,
|
|
412
|
-
children: /* @__PURE__ */ o.jsx(B, { children: /* @__PURE__ */ o.jsx(h, { symbol: "check", className: "adm:text-
|
|
412
|
+
children: /* @__PURE__ */ o.jsx(B, { children: /* @__PURE__ */ o.jsx(h, { symbol: "check", className: "adm:text-xl adm:text-success" }) })
|
|
413
413
|
}
|
|
414
414
|
),
|
|
415
415
|
t
|
|
@@ -426,14 +426,14 @@ function at({
|
|
|
426
426
|
Ae,
|
|
427
427
|
{
|
|
428
428
|
"data-slot": "context-menu-radio-item",
|
|
429
|
-
className:
|
|
429
|
+
className: l(
|
|
430
430
|
`
|
|
431
|
-
adm:relative adm:flex adm:h-
|
|
432
|
-
adm:gap-
|
|
431
|
+
adm:relative adm:flex adm:h-11 adm:cursor-default adm:items-center
|
|
432
|
+
adm:gap-3 adm:pr-10 adm:pl-8 adm:text-sm adm:outline-hidden
|
|
433
433
|
adm:select-none
|
|
434
434
|
adm:first:rounded-t-sm
|
|
435
435
|
adm:last:rounded-b-sm
|
|
436
|
-
adm:focus:bg-
|
|
436
|
+
adm:focus:bg-muted adm:focus:text-foreground
|
|
437
437
|
adm:data-disabled:pointer-events-none adm:data-disabled:opacity-50
|
|
438
438
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
439
439
|
`,
|
|
@@ -466,10 +466,9 @@ function nt({
|
|
|
466
466
|
{
|
|
467
467
|
"data-slot": "context-menu-label",
|
|
468
468
|
"data-inset": t,
|
|
469
|
-
className:
|
|
469
|
+
className: l(
|
|
470
470
|
`
|
|
471
|
-
adm:
|
|
472
|
-
adm:font-medium adm:text-foreground
|
|
471
|
+
adm:px-2 adm:py-1.5 adm:text-xs adm:text-muted-foreground
|
|
473
472
|
adm:data-inset:pl-8
|
|
474
473
|
`,
|
|
475
474
|
e
|
|
@@ -486,7 +485,7 @@ function ot({
|
|
|
486
485
|
Oe,
|
|
487
486
|
{
|
|
488
487
|
"data-slot": "context-menu-separator",
|
|
489
|
-
className:
|
|
488
|
+
className: l("adm:h-px adm:bg-border", e),
|
|
490
489
|
...t
|
|
491
490
|
}
|
|
492
491
|
);
|
|
@@ -499,7 +498,7 @@ function rt({
|
|
|
499
498
|
"span",
|
|
500
499
|
{
|
|
501
500
|
"data-slot": "context-menu-shortcut",
|
|
502
|
-
className:
|
|
501
|
+
className: l(
|
|
503
502
|
"adm:ml-auto adm:text-xs adm:tracking-widest adm:text-muted-foreground",
|
|
504
503
|
e
|
|
505
504
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),h=require("./button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),h=require("./button-CPm4-98H.cjs"),n=require("./calendar-DXq90PYV.cjs"),L=require("./combobox-DylTjGrw.cjs"),x=require("./popover-cGp_rNLg.cjs"),r=require("react");function D(a,u,m){return n.addDays(a,-u,m)}function T({dateRange:a,onDateRangeChange:u,labels:m,combobox:R,calendar:C,"aria-invalid":g,disabled:E}){const f=r.useRef(null),p=r.useRef(void 0),v=e=>{if(!e.from||!e.to)return;const l=n.startOfDay(new Date),j=[{value:"7_days",days:7},{value:"30_days",days:30},{value:"90_days",days:90}];for(const c of j){const q=D(l,c.days);if(n.startOfDay(e.from).getTime()===q.getTime()&&n.startOfDay(e.to).getTime()===l.getTime())return c.value}return"custom"},[y,o]=r.useState(()=>v(a)),[_,d]=r.useState(!1),[i,S]=r.useState(a);r.useEffect(()=>{const e=v(a);o(e)},[a]);const s={...{last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",custom:"Custom",placeholder:"Date",cancel:"Cancel",apply:"Apply"},...m},k=e=>{const l=n.startOfDay(new Date),c={"7_days":7,"30_days":30,"90_days":90}[e];return c?{from:D(l,c),to:l}:{from:void 0,to:void 0}},b=e=>{o(p.current),d(!1)},O=e=>{if(e==="custom"){p.current=y,o(e),d(!0);return}o(e),u(k(e))},P=()=>{if(i?.from&&i?.to){u(i),o("custom"),d(!1);return}o(p.current),d(!1)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(L.Combobox,{alwaysShowPlaceholder:!0,selectedFeedback:"check",icon:"calendar_today",options:[{label:s.last7Days,value:"7_days"},{label:s.last30Days,value:"30_days"},{label:s.last90Days,value:"90_days"},{label:s.custom,value:"custom"}],labels:{placeholder:s.placeholder},value:y,onValueChange:O,"aria-invalid":g,disabled:E,ref:e=>{f.current=e},...R}),t.jsxRuntimeExports.jsxs(x.Popover,{open:_,onOpenChange:e=>{!e&&y==="custom"&&b()},children:[t.jsxRuntimeExports.jsx(x.PopoverAnchor,{virtualRef:f}),t.jsxRuntimeExports.jsxs(x.PopoverContent,{align:"start",children:[t.jsxRuntimeExports.jsx(n.Calendar,{required:!0,mode:"range",selected:i,onSelect:S,captionLayout:"dropdown",classNames:{root:"adm:p-0!"},...C}),t.jsxRuntimeExports.jsxs("div",{className:"adm:mt-2 adm:flex adm:justify-end adm:gap-2",children:[t.jsxRuntimeExports.jsx(h.Button,{variant:"link",onClick:()=>b(),children:s.cancel}),t.jsxRuntimeExports.jsx(h.Button,{variant:"link",onClick:P,children:s.apply})]})]})]})]})}exports.DatePickerSelector=T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { B as x } from "./button-
|
|
3
|
-
import { b as V, C as A, s as i } from "./calendar-
|
|
4
|
-
import { C as F } from "./combobox-
|
|
2
|
+
import { B as x } from "./button-D4ddrxyp.js";
|
|
3
|
+
import { b as V, C as A, s as i } from "./calendar-DgfO9zab.js";
|
|
4
|
+
import { C as F } from "./combobox-DG9u4g84.js";
|
|
5
5
|
import { P as w, c as B, b as E } from "./popover-DcQ18EVl.js";
|
|
6
6
|
import { useRef as D, useState as y, useEffect as M } from "react";
|
|
7
7
|
function C(t, n, u) {
|
package/dist/dialog.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),e=require("./index-Ca99LLZF.cjs"),r=require("./icon-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),e=require("./index-Ca99LLZF.cjs"),r=require("./icon-C5Q2b1Am.cjs"),s=require("./index-DoxiiusW.cjs");require("react");function x({...a}){return t.jsxRuntimeExports.jsx(e.Root,{"data-slot":"dialog",...a})}function c({...a}){return t.jsxRuntimeExports.jsx(e.Trigger,{"data-slot":"dialog-trigger",...a})}function d({...a}){return t.jsxRuntimeExports.jsx(e.Portal,{"data-slot":"dialog-portal",...a})}function u({...a}){return t.jsxRuntimeExports.jsx(e.Close,{"data-slot":"dialog-close",...a})}function i({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Overlay,{"data-slot":"dialog-overlay",className:s.cn(`
|
|
2
2
|
adm:fixed adm:inset-0 adm:z-50 adm:bg-black/50
|
|
3
3
|
adm:data-[state=closed]:animate-out adm:data-[state=closed]:fade-out-0
|
|
4
4
|
adm:data-[state=open]:animate-in adm:data-[state=open]:fade-in-0
|
|
5
|
-
`,a),...o})}function g({className:a,children:o,showCloseButton:
|
|
5
|
+
`,a),...o})}function g({className:a,children:o,showCloseButton:n=!0,theme:l,...m}){return t.jsxRuntimeExports.jsxs(d,{"data-slot":"dialog-portal",children:[t.jsxRuntimeExports.jsx(i,{}),t.jsxRuntimeExports.jsxs(e.Content,{"data-theme":l,"data-slot":"dialog-content",className:s.cn(`
|
|
6
6
|
adm:fixed adm:top-[50%] adm:left-[50%] adm:z-50 adm:flex
|
|
7
7
|
adm:max-h-[calc(100dvh-32px)] adm:w-full adm:max-w-[calc(100%-2rem)]
|
|
8
8
|
adm:translate-x-[-50%] adm:translate-y-[-50%] adm:flex-col adm:gap-4
|
|
@@ -13,22 +13,20 @@
|
|
|
13
13
|
adm:data-[state=closed]:zoom-out-95
|
|
14
14
|
adm:data-[state=open]:animate-in adm:data-[state=open]:fade-in-0
|
|
15
15
|
adm:data-[state=open]:zoom-in-95
|
|
16
|
-
adm:sm:max-w-
|
|
17
|
-
`,a),...m,children:[o,
|
|
16
|
+
adm:sm:max-w-[610px]
|
|
17
|
+
`,a),...m,children:[o,n&&t.jsxRuntimeExports.jsxs(e.Close,{"data-slot":"dialog-close",className:`
|
|
18
18
|
adm:absolute adm:top-4 adm:right-4 adm:flex adm:rounded-xs
|
|
19
|
-
adm:opacity-70 adm:
|
|
19
|
+
adm:opacity-70 adm:transition-opacity
|
|
20
20
|
adm:hover:opacity-100
|
|
21
|
-
adm:focus:ring-
|
|
21
|
+
adm:focus:ring-4 adm:focus:ring-primary/10
|
|
22
22
|
adm:focus:outline-hidden
|
|
23
23
|
adm:disabled:pointer-events-none
|
|
24
24
|
adm:**:data-[slot=icon]:pointer-events-none
|
|
25
25
|
adm:**:data-[slot=icon]:shrink-0
|
|
26
|
-
adm:data-[state=open]:bg-accent
|
|
27
|
-
adm:data-[state=open]:text-muted-foreground
|
|
28
26
|
adm:[&_[data-slot=icon]:not([class*=text-])]:text-lg
|
|
29
27
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
30
28
|
adm:[&_svg:not([class*=size-])]:size-4
|
|
31
29
|
`,children:[t.jsxRuntimeExports.jsx(r.Icon,{symbol:"close"}),t.jsxRuntimeExports.jsx("span",{className:"adm:sr-only",children:"Close"})]})]})]})}function p({className:a,...o}){return t.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-header",className:s.cn("adm:flex adm:flex-col adm:gap-2",a),...o})}function f({className:a,...o}){return t.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-footer",className:s.cn(`
|
|
32
30
|
adm:flex adm:gap-6
|
|
33
31
|
adm:sm:flex-row adm:sm:justify-start
|
|
34
|
-
`,a),...o})}function j({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Title,{"data-slot":"dialog-title",className:s.cn("adm:text-sm adm:font-semibold adm:text-foreground",a),...o})}function D({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Description,{"data-slot":"dialog-description",className:s.cn("adm:text-sm adm:text-
|
|
32
|
+
`,a),...o})}function j({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Title,{"data-slot":"dialog-title",className:s.cn("adm:text-sm adm:font-semibold adm:text-foreground",a),...o})}function D({className:a,...o}){return t.jsxRuntimeExports.jsx(e.Description,{"data-slot":"dialog-description",className:s.cn("adm:text-sm adm:text-foreground",a),...o})}function R({className:a,...o}){return t.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-body",className:s.cn("adm:mt-4 adm:mb-10",a),...o})}exports.Dialog=x;exports.DialogBody=R;exports.DialogClose=u;exports.DialogContent=g;exports.DialogDescription=D;exports.DialogFooter=f;exports.DialogHeader=p;exports.DialogOverlay=i;exports.DialogPortal=d;exports.DialogTitle=j;exports.DialogTrigger=c;
|
package/dist/dialog.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
-
import { R as
|
|
4
|
-
import { I as
|
|
5
|
-
import { c as
|
|
3
|
+
import { R as n, C as e, a as i, D as r, O as c, P as g, b as u, T as x } from "./index-BIydBVaH.js";
|
|
4
|
+
import { I as f } from "./icon-t4jt1Z2h.js";
|
|
5
|
+
import { c as d } from "./index-CRiPKpXj.js";
|
|
6
6
|
import "react";
|
|
7
7
|
function N({
|
|
8
8
|
...a
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */ t.jsx(
|
|
10
|
+
return /* @__PURE__ */ t.jsx(n, { "data-slot": "dialog", ...a });
|
|
11
11
|
}
|
|
12
12
|
function z({
|
|
13
13
|
...a
|
|
14
14
|
}) {
|
|
15
|
-
return /* @__PURE__ */ t.jsx(
|
|
15
|
+
return /* @__PURE__ */ t.jsx(x, { "data-slot": "dialog-trigger", ...a });
|
|
16
16
|
}
|
|
17
17
|
function p({
|
|
18
18
|
...a
|
|
@@ -26,13 +26,13 @@ function C({
|
|
|
26
26
|
}
|
|
27
27
|
function j({
|
|
28
28
|
className: a,
|
|
29
|
-
...
|
|
29
|
+
...o
|
|
30
30
|
}) {
|
|
31
31
|
return /* @__PURE__ */ t.jsx(
|
|
32
32
|
c,
|
|
33
33
|
{
|
|
34
34
|
"data-slot": "dialog-overlay",
|
|
35
|
-
className:
|
|
35
|
+
className: d(
|
|
36
36
|
`
|
|
37
37
|
adm:fixed adm:inset-0 adm:z-50 adm:bg-black/50
|
|
38
38
|
adm:data-[state=closed]:animate-out adm:data-[state=closed]:fade-out-0
|
|
@@ -40,16 +40,16 @@ function j({
|
|
|
40
40
|
`,
|
|
41
41
|
a
|
|
42
42
|
),
|
|
43
|
-
...
|
|
43
|
+
...o
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function w({
|
|
48
48
|
className: a,
|
|
49
|
-
children:
|
|
49
|
+
children: o,
|
|
50
50
|
showCloseButton: s = !0,
|
|
51
51
|
theme: m,
|
|
52
|
-
...
|
|
52
|
+
...l
|
|
53
53
|
}) {
|
|
54
54
|
return /* @__PURE__ */ t.jsxs(p, { "data-slot": "dialog-portal", children: [
|
|
55
55
|
/* @__PURE__ */ t.jsx(j, {}),
|
|
@@ -58,7 +58,7 @@ function k({
|
|
|
58
58
|
{
|
|
59
59
|
"data-theme": m,
|
|
60
60
|
"data-slot": "dialog-content",
|
|
61
|
-
className:
|
|
61
|
+
className: d(
|
|
62
62
|
`
|
|
63
63
|
adm:fixed adm:top-[50%] adm:left-[50%] adm:z-50 adm:flex
|
|
64
64
|
adm:max-h-[calc(100dvh-32px)] adm:w-full adm:max-w-[calc(100%-2rem)]
|
|
@@ -70,34 +70,32 @@ function k({
|
|
|
70
70
|
adm:data-[state=closed]:zoom-out-95
|
|
71
71
|
adm:data-[state=open]:animate-in adm:data-[state=open]:fade-in-0
|
|
72
72
|
adm:data-[state=open]:zoom-in-95
|
|
73
|
-
adm:sm:max-w-
|
|
73
|
+
adm:sm:max-w-[610px]
|
|
74
74
|
`,
|
|
75
75
|
a
|
|
76
76
|
),
|
|
77
|
-
...
|
|
77
|
+
...l,
|
|
78
78
|
children: [
|
|
79
|
-
|
|
79
|
+
o,
|
|
80
80
|
s && /* @__PURE__ */ t.jsxs(
|
|
81
81
|
e,
|
|
82
82
|
{
|
|
83
83
|
"data-slot": "dialog-close",
|
|
84
84
|
className: `
|
|
85
85
|
adm:absolute adm:top-4 adm:right-4 adm:flex adm:rounded-xs
|
|
86
|
-
adm:opacity-70 adm:
|
|
86
|
+
adm:opacity-70 adm:transition-opacity
|
|
87
87
|
adm:hover:opacity-100
|
|
88
|
-
adm:focus:ring-
|
|
88
|
+
adm:focus:ring-4 adm:focus:ring-primary/10
|
|
89
89
|
adm:focus:outline-hidden
|
|
90
90
|
adm:disabled:pointer-events-none
|
|
91
91
|
adm:**:data-[slot=icon]:pointer-events-none
|
|
92
92
|
adm:**:data-[slot=icon]:shrink-0
|
|
93
|
-
adm:data-[state=open]:bg-accent
|
|
94
|
-
adm:data-[state=open]:text-muted-foreground
|
|
95
93
|
adm:[&_[data-slot=icon]:not([class*=text-])]:text-lg
|
|
96
94
|
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
97
95
|
adm:[&_svg:not([class*=size-])]:size-4
|
|
98
96
|
`,
|
|
99
97
|
children: [
|
|
100
|
-
/* @__PURE__ */ t.jsx(
|
|
98
|
+
/* @__PURE__ */ t.jsx(f, { symbol: "close" }),
|
|
101
99
|
/* @__PURE__ */ t.jsx("span", { className: "adm:sr-only", children: "Close" })
|
|
102
100
|
]
|
|
103
101
|
}
|
|
@@ -107,68 +105,68 @@ function k({
|
|
|
107
105
|
)
|
|
108
106
|
] });
|
|
109
107
|
}
|
|
110
|
-
function
|
|
108
|
+
function T({ className: a, ...o }) {
|
|
111
109
|
return /* @__PURE__ */ t.jsx(
|
|
112
110
|
"div",
|
|
113
111
|
{
|
|
114
112
|
"data-slot": "dialog-header",
|
|
115
|
-
className:
|
|
116
|
-
...
|
|
113
|
+
className: d("adm:flex adm:flex-col adm:gap-2", a),
|
|
114
|
+
...o
|
|
117
115
|
}
|
|
118
116
|
);
|
|
119
117
|
}
|
|
120
|
-
function
|
|
118
|
+
function k({ className: a, ...o }) {
|
|
121
119
|
return /* @__PURE__ */ t.jsx(
|
|
122
120
|
"div",
|
|
123
121
|
{
|
|
124
122
|
"data-slot": "dialog-footer",
|
|
125
|
-
className:
|
|
123
|
+
className: d(
|
|
126
124
|
`
|
|
127
125
|
adm:flex adm:gap-6
|
|
128
126
|
adm:sm:flex-row adm:sm:justify-start
|
|
129
127
|
`,
|
|
130
128
|
a
|
|
131
129
|
),
|
|
132
|
-
...
|
|
130
|
+
...o
|
|
133
131
|
}
|
|
134
132
|
);
|
|
135
133
|
}
|
|
136
134
|
function _({
|
|
137
135
|
className: a,
|
|
138
|
-
...
|
|
136
|
+
...o
|
|
139
137
|
}) {
|
|
140
138
|
return /* @__PURE__ */ t.jsx(
|
|
141
139
|
u,
|
|
142
140
|
{
|
|
143
141
|
"data-slot": "dialog-title",
|
|
144
|
-
className:
|
|
145
|
-
...
|
|
142
|
+
className: d("adm:text-sm adm:font-semibold adm:text-foreground", a),
|
|
143
|
+
...o
|
|
146
144
|
}
|
|
147
145
|
);
|
|
148
146
|
}
|
|
149
147
|
function O({
|
|
150
148
|
className: a,
|
|
151
|
-
...
|
|
149
|
+
...o
|
|
152
150
|
}) {
|
|
153
151
|
return /* @__PURE__ */ t.jsx(
|
|
154
152
|
r,
|
|
155
153
|
{
|
|
156
154
|
"data-slot": "dialog-description",
|
|
157
|
-
className:
|
|
158
|
-
...
|
|
155
|
+
className: d("adm:text-sm adm:text-foreground", a),
|
|
156
|
+
...o
|
|
159
157
|
}
|
|
160
158
|
);
|
|
161
159
|
}
|
|
162
160
|
function P({
|
|
163
161
|
className: a,
|
|
164
|
-
...
|
|
162
|
+
...o
|
|
165
163
|
}) {
|
|
166
164
|
return /* @__PURE__ */ t.jsx(
|
|
167
165
|
"div",
|
|
168
166
|
{
|
|
169
167
|
"data-slot": "dialog-body",
|
|
170
|
-
className:
|
|
171
|
-
...
|
|
168
|
+
className: d("adm:mt-4 adm:mb-10", a),
|
|
169
|
+
...o
|
|
172
170
|
}
|
|
173
171
|
);
|
|
174
172
|
}
|
|
@@ -176,10 +174,10 @@ export {
|
|
|
176
174
|
N as Dialog,
|
|
177
175
|
P as DialogBody,
|
|
178
176
|
C as DialogClose,
|
|
179
|
-
|
|
177
|
+
w as DialogContent,
|
|
180
178
|
O as DialogDescription,
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
k as DialogFooter,
|
|
180
|
+
T as DialogHeader,
|
|
183
181
|
j as DialogOverlay,
|
|
184
182
|
p as DialogPortal,
|
|
185
183
|
_ as DialogTitle,
|