@adamosuiteservices/ui 2.18.5 → 2.19.0
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/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 +2 -3
- package/dist/breadcrumb.js +16 -17
- package/dist/button-CXFZVTXF.cjs +87 -0
- package/dist/button-dT8nqgU3.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-xBaFu2sB.js → calendar-6NvJv-sP.js} +238 -239
- package/dist/{calendar-Dorq3-wv.cjs → calendar-B8S5a0TG.cjs} +20 -22
- 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-BBlvCoB1.cjs +24 -0
- package/dist/{checkbox-DL_jFvgl.js → checkbox-BuzBXARX.js} +54 -52
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/colors.css +1 -1
- package/dist/combobox-B002BLsg.js +692 -0
- package/dist/combobox-B2BkUl7v.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 +36 -37
- 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 +205 -172
- 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 +117 -109
- 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-13VFVAxD.cjs +86 -0
- package/dist/input-group-D4S18xiq.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 +65 -62
- package/dist/select.cjs +18 -16
- package/dist/select.js +17 -15
- 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-C9vce0ut.js → sheet-DNwg4a6M.js} +8 -5
- package/dist/{sheet-Cnq7TCzu.cjs → sheet-va7o2x0w.cjs} +10 -10
- 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/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/README.md
CHANGED
|
@@ -70,7 +70,7 @@ function App() {
|
|
|
70
70
|
|
|
71
71
|
## Key features
|
|
72
72
|
|
|
73
|
-
- ✅ **
|
|
73
|
+
- ✅ **49+ production-ready components** (UI + Layout)
|
|
74
74
|
- ✅ **Built-in accessibility** (ARIA attributes, keyboard navigation)
|
|
75
75
|
- ✅ **Dark mode support** across all components
|
|
76
76
|
- ✅ **Type-safe** with full TypeScript definitions
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-BB_1_6y_.cjs"),d=require("./index-BnkHpTJs.cjs"),
|
|
2
|
-
adm:mb-4 adm:rounded-2xl adm:bg-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-BB_1_6y_.cjs"),d=require("./index-BnkHpTJs.cjs"),m=require("./icon-B7joBr0A.cjs"),o=require("./index-DoxiiusW.cjs");require("react");function i({...t}){return e.jsxRuntimeExports.jsx(d.Root2,{"data-slot":"accordion",...t})}function c({className:t,...a}){return e.jsxRuntimeExports.jsx(d.Item,{"data-slot":"accordion-item",className:o.cn(`
|
|
2
|
+
adm:mb-4 adm:rounded-2xl adm:bg-accent
|
|
3
3
|
adm:last:mb-0
|
|
4
|
-
`,t),...a})}function x({className:t,children:a,title:n,badge:
|
|
4
|
+
`,t),...a})}function x({className:t,children:a,title:n,badge:s,...r}){return e.jsxRuntimeExports.jsx(d.Header,{className:"adm:flex adm:h-16",children:e.jsxRuntimeExports.jsxs(d.Trigger2,{"data-slot":"accordion-trigger",className:o.cn(`
|
|
5
5
|
adm:group adm:flex adm:flex-1 adm:items-center adm:gap-4
|
|
6
6
|
adm:rounded-2xl adm:px-4 adm:transition-all adm:outline-none
|
|
7
7
|
adm:disabled:pointer-events-none adm:disabled:opacity-50
|
|
8
8
|
`,t),...r,children:[e.jsxRuntimeExports.jsx("div",{className:`
|
|
9
9
|
adm:line-clamp-1 adm:flex adm:flex-1 adm:items-center
|
|
10
10
|
adm:justify-start adm:text-left adm:text-xs adm:leading-5
|
|
11
|
-
adm:font-semibold adm:text-
|
|
12
|
-
`,children:n||a}),
|
|
13
|
-
adm:text-lg adm:text-
|
|
11
|
+
adm:font-semibold adm:text-accent-foreground adm:uppercase
|
|
12
|
+
`,children:n||a}),s&&e.jsxRuntimeExports.jsx("div",{className:"adm:shrink-0",children:s}),e.jsxRuntimeExports.jsxs("div",{className:"adm:flex adm:shrink-0 adm:items-center adm:justify-end",children:[e.jsxRuntimeExports.jsx(m.Icon,{symbol:"add",className:`
|
|
13
|
+
adm:text-lg adm:text-accent-foreground adm:transition-transform
|
|
14
14
|
adm:duration-200
|
|
15
15
|
adm:group-data-[state=open]:hidden
|
|
16
|
-
`}),e.jsxRuntimeExports.jsx(
|
|
17
|
-
adm:hidden adm:text-lg adm:text-
|
|
16
|
+
`}),e.jsxRuntimeExports.jsx(m.Icon,{symbol:"remove",className:`
|
|
17
|
+
adm:hidden adm:text-lg adm:text-accent-foreground
|
|
18
18
|
adm:group-data-[state=open]:block
|
|
19
19
|
`})]})]})})}function l({className:t,children:a,...n}){return e.jsxRuntimeExports.jsx(d.Content2,{"data-slot":"accordion-content",className:`
|
|
20
20
|
adm:overflow-hidden adm:text-sm
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
-
import { R as r, I as
|
|
4
|
-
import { I as
|
|
3
|
+
import { R as r, I as c, H as i, T as l, C as x } from "./index-D_hmhfRp.js";
|
|
4
|
+
import { I as o } from "./icon-BFQz1tQC.js";
|
|
5
5
|
import { c as m } from "./index-CRiPKpXj.js";
|
|
6
6
|
import "react";
|
|
7
7
|
function h({
|
|
@@ -14,12 +14,12 @@ function N({
|
|
|
14
14
|
...e
|
|
15
15
|
}) {
|
|
16
16
|
return /* @__PURE__ */ a.jsx(
|
|
17
|
-
|
|
17
|
+
c,
|
|
18
18
|
{
|
|
19
19
|
"data-slot": "accordion-item",
|
|
20
20
|
className: m(
|
|
21
21
|
`
|
|
22
|
-
adm:mb-4 adm:rounded-2xl adm:bg-
|
|
22
|
+
adm:mb-4 adm:rounded-2xl adm:bg-accent
|
|
23
23
|
adm:last:mb-0
|
|
24
24
|
`,
|
|
25
25
|
d
|
|
@@ -32,10 +32,10 @@ function b({
|
|
|
32
32
|
className: d,
|
|
33
33
|
children: e,
|
|
34
34
|
title: t,
|
|
35
|
-
badge:
|
|
35
|
+
badge: n,
|
|
36
36
|
...s
|
|
37
37
|
}) {
|
|
38
|
-
return /* @__PURE__ */ a.jsx(
|
|
38
|
+
return /* @__PURE__ */ a.jsx(i, { className: "adm:flex adm:h-16", children: /* @__PURE__ */ a.jsxs(
|
|
39
39
|
l,
|
|
40
40
|
{
|
|
41
41
|
"data-slot": "accordion-trigger",
|
|
@@ -55,30 +55,30 @@ function b({
|
|
|
55
55
|
className: `
|
|
56
56
|
adm:line-clamp-1 adm:flex adm:flex-1 adm:items-center
|
|
57
57
|
adm:justify-start adm:text-left adm:text-xs adm:leading-5
|
|
58
|
-
adm:font-semibold adm:text-
|
|
58
|
+
adm:font-semibold adm:text-accent-foreground adm:uppercase
|
|
59
59
|
`,
|
|
60
60
|
children: t || e
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
|
-
|
|
63
|
+
n && /* @__PURE__ */ a.jsx("div", { className: "adm:shrink-0", children: n }),
|
|
64
64
|
/* @__PURE__ */ a.jsxs("div", { className: "adm:flex adm:shrink-0 adm:items-center adm:justify-end", children: [
|
|
65
65
|
/* @__PURE__ */ a.jsx(
|
|
66
|
-
|
|
66
|
+
o,
|
|
67
67
|
{
|
|
68
68
|
symbol: "add",
|
|
69
69
|
className: `
|
|
70
|
-
adm:text-lg adm:text-
|
|
70
|
+
adm:text-lg adm:text-accent-foreground adm:transition-transform
|
|
71
71
|
adm:duration-200
|
|
72
72
|
adm:group-data-[state=open]:hidden
|
|
73
73
|
`
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
76
|
/* @__PURE__ */ a.jsx(
|
|
77
|
-
|
|
77
|
+
o,
|
|
78
78
|
{
|
|
79
79
|
symbol: "remove",
|
|
80
80
|
className: `
|
|
81
|
-
adm:hidden adm:text-lg adm:text-
|
|
81
|
+
adm:hidden adm:text-lg adm:text-accent-foreground
|
|
82
82
|
adm:group-data-[state=open]:block
|
|
83
83
|
`
|
|
84
84
|
}
|
package/dist/alert.cjs
CHANGED
|
@@ -1,29 +1,38 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-BB_1_6y_.cjs"),
|
|
2
|
-
adm:relative adm:grid adm:w-full adm:grid-cols-[
|
|
3
|
-
adm:gap-
|
|
4
|
-
adm:
|
|
5
|
-
adm:
|
|
6
|
-
adm:
|
|
7
|
-
adm:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-BB_1_6y_.cjs"),r=require("./index-DoxiiusW.cjs"),o=require("./index-BTzZJcis.cjs");require("react");const n=o.cva(`
|
|
2
|
+
adm:relative adm:grid adm:w-full adm:grid-cols-[auto_1fr] adm:items-center
|
|
3
|
+
adm:gap-x-3 adm:gap-y-2 adm:rounded-3xl adm:p-6 adm:text-sm
|
|
4
|
+
adm:[&>[data-slot=icon]]:col-start-1 adm:[&>[data-slot=icon]]:row-start-1
|
|
5
|
+
adm:[&>[data-slot=icon]]:self-start adm:[&>[data-slot=icon]]:text-2xl
|
|
6
|
+
adm:[&>svg]:col-start-1 adm:[&>svg]:row-start-1 adm:[&>svg]:size-4
|
|
7
|
+
adm:[&>svg]:self-start
|
|
8
|
+
`,{variants:{variant:{default:`
|
|
9
|
+
adm:border-border adm:bg-card adm:text-card-foreground
|
|
10
|
+
adm:[&>[data-slot=icon]]:text-card-foreground
|
|
11
|
+
adm:[&>svg]:text-card-foreground
|
|
12
|
+
`,info:`
|
|
13
|
+
adm:border-border adm:bg-accent adm:text-foreground
|
|
14
|
+
adm:[&>[data-slot=icon]]:text-foreground
|
|
15
|
+
adm:[&>svg]:text-foreground
|
|
16
|
+
`,destructive:`
|
|
11
17
|
adm:border-destructive/30 adm:bg-destructive-50
|
|
12
|
-
adm:
|
|
13
|
-
adm:[&>
|
|
18
|
+
adm:text-destructive-foreground-subtle
|
|
19
|
+
adm:[&>[data-slot=icon]]:text-destructive-foreground-subtle
|
|
20
|
+
adm:[&>svg]:text-destructive-foreground-subtle
|
|
14
21
|
`,success:`
|
|
15
22
|
adm:border-success/30 adm:bg-success-50
|
|
16
|
-
adm:
|
|
17
|
-
adm:[&>
|
|
23
|
+
adm:text-success-foreground-subtle
|
|
24
|
+
adm:[&>[data-slot=icon]]:text-success-foreground-subtle
|
|
25
|
+
adm:[&>svg]:text-success-foreground-subtle
|
|
18
26
|
`,warning:`
|
|
19
27
|
adm:border-warning/30 adm:bg-warning-50
|
|
20
|
-
adm:
|
|
21
|
-
adm:[&>
|
|
22
|
-
|
|
23
|
-
adm:
|
|
24
|
-
adm:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
adm:
|
|
28
|
+
adm:text-warning-foreground-subtle
|
|
29
|
+
adm:[&>[data-slot=icon]]:text-warning-foreground-subtle
|
|
30
|
+
adm:[&>svg]:text-warning-foreground-subtle
|
|
31
|
+
`},border:{default:"adm:border",transparent:"adm:border adm:border-transparent"}},defaultVariants:{variant:"default",border:"default"}});function m({className:t,variant:a,border:d,...s}){return e.jsxRuntimeExports.jsx("div",{"data-slot":"alert",role:"alert",className:r.cn(n({variant:a,border:d}),t),...s})}function i({className:t,...a}){return e.jsxRuntimeExports.jsx("div",{"data-slot":"alert-title",className:r.cn(`
|
|
32
|
+
adm:row-start-1 adm:min-h-4 adm:self-center adm:text-sm
|
|
33
|
+
adm:font-semibold adm:tracking-tight
|
|
34
|
+
`,t),...a})}function l({className:t,...a}){return e.jsxRuntimeExports.jsx("div",{"data-slot":"alert-description",className:r.cn(`
|
|
35
|
+
adm:col-span-2 adm:row-start-2 adm:grid adm:justify-items-start
|
|
36
|
+
adm:gap-1 adm:text-sm
|
|
28
37
|
adm:[&_p]:leading-relaxed
|
|
29
|
-
`,
|
|
38
|
+
`,t),...a})}exports.Alert=m;exports.AlertDescription=l;exports.AlertTitle=i;
|
package/dist/alert.js
CHANGED
|
@@ -1,37 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import { c as
|
|
4
|
-
import { c as
|
|
2
|
+
import { j as r } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
+
import { c as d } from "./index-CRiPKpXj.js";
|
|
4
|
+
import { c as o } from "./index-BqtVL8d-.js";
|
|
5
5
|
import "react";
|
|
6
|
-
const
|
|
6
|
+
const m = o(
|
|
7
7
|
`
|
|
8
|
-
adm:relative adm:grid adm:w-full adm:grid-cols-[
|
|
9
|
-
adm:gap-
|
|
10
|
-
adm:
|
|
11
|
-
adm:
|
|
12
|
-
adm:
|
|
13
|
-
adm:
|
|
14
|
-
adm:[&>[data-slot=icon]]:translate-y-0.5 adm:[&>[data-slot=icon]]:text-lg
|
|
15
|
-
adm:[&>svg]:size-4 adm:[&>svg]:translate-y-0.5
|
|
8
|
+
adm:relative adm:grid adm:w-full adm:grid-cols-[auto_1fr] adm:items-center
|
|
9
|
+
adm:gap-x-3 adm:gap-y-2 adm:rounded-3xl adm:p-6 adm:text-sm
|
|
10
|
+
adm:[&>[data-slot=icon]]:col-start-1 adm:[&>[data-slot=icon]]:row-start-1
|
|
11
|
+
adm:[&>[data-slot=icon]]:self-start adm:[&>[data-slot=icon]]:text-2xl
|
|
12
|
+
adm:[&>svg]:col-start-1 adm:[&>svg]:row-start-1 adm:[&>svg]:size-4
|
|
13
|
+
adm:[&>svg]:self-start
|
|
16
14
|
`,
|
|
17
15
|
{
|
|
18
16
|
variants: {
|
|
19
17
|
variant: {
|
|
20
|
-
default:
|
|
18
|
+
default: `
|
|
19
|
+
adm:border-border adm:bg-card adm:text-card-foreground
|
|
20
|
+
adm:[&>[data-slot=icon]]:text-card-foreground
|
|
21
|
+
adm:[&>svg]:text-card-foreground
|
|
22
|
+
`,
|
|
23
|
+
info: `
|
|
24
|
+
adm:border-border adm:bg-accent adm:text-foreground
|
|
25
|
+
adm:[&>[data-slot=icon]]:text-foreground
|
|
26
|
+
adm:[&>svg]:text-foreground
|
|
27
|
+
`,
|
|
21
28
|
destructive: `
|
|
22
29
|
adm:border-destructive/30 adm:bg-destructive-50
|
|
23
|
-
adm:
|
|
24
|
-
adm:[&>
|
|
30
|
+
adm:text-destructive-foreground-subtle
|
|
31
|
+
adm:[&>[data-slot=icon]]:text-destructive-foreground-subtle
|
|
32
|
+
adm:[&>svg]:text-destructive-foreground-subtle
|
|
25
33
|
`,
|
|
26
34
|
success: `
|
|
27
35
|
adm:border-success/30 adm:bg-success-50
|
|
28
|
-
adm:
|
|
29
|
-
adm:[&>
|
|
36
|
+
adm:text-success-foreground-subtle
|
|
37
|
+
adm:[&>[data-slot=icon]]:text-success-foreground-subtle
|
|
38
|
+
adm:[&>svg]:text-success-foreground-subtle
|
|
30
39
|
`,
|
|
31
40
|
warning: `
|
|
32
41
|
adm:border-warning/30 adm:bg-warning-50
|
|
33
|
-
adm:
|
|
34
|
-
adm:[&>
|
|
42
|
+
adm:text-warning-foreground-subtle
|
|
43
|
+
adm:[&>[data-slot=icon]]:text-warning-foreground-subtle
|
|
44
|
+
adm:[&>svg]:text-warning-foreground-subtle
|
|
35
45
|
`
|
|
36
46
|
},
|
|
37
47
|
border: {
|
|
@@ -45,60 +55,60 @@ const i = m(
|
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
);
|
|
48
|
-
function
|
|
49
|
-
className:
|
|
50
|
-
variant:
|
|
58
|
+
function u({
|
|
59
|
+
className: t,
|
|
60
|
+
variant: a,
|
|
51
61
|
border: e,
|
|
52
62
|
...s
|
|
53
63
|
}) {
|
|
54
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ r.jsx(
|
|
55
65
|
"div",
|
|
56
66
|
{
|
|
57
67
|
"data-slot": "alert",
|
|
58
68
|
role: "alert",
|
|
59
|
-
className:
|
|
69
|
+
className: d(m({ variant: a, border: e }), t),
|
|
60
70
|
...s
|
|
61
71
|
}
|
|
62
72
|
);
|
|
63
73
|
}
|
|
64
|
-
function
|
|
65
|
-
return /* @__PURE__ */
|
|
74
|
+
function g({ className: t, ...a }) {
|
|
75
|
+
return /* @__PURE__ */ r.jsx(
|
|
66
76
|
"div",
|
|
67
77
|
{
|
|
68
78
|
"data-slot": "alert-title",
|
|
69
|
-
className:
|
|
79
|
+
className: d(
|
|
70
80
|
`
|
|
71
|
-
adm:
|
|
72
|
-
adm:font-
|
|
81
|
+
adm:row-start-1 adm:min-h-4 adm:self-center adm:text-sm
|
|
82
|
+
adm:font-semibold adm:tracking-tight
|
|
73
83
|
`,
|
|
74
|
-
|
|
84
|
+
t
|
|
75
85
|
),
|
|
76
|
-
...
|
|
86
|
+
...a
|
|
77
87
|
}
|
|
78
88
|
);
|
|
79
89
|
}
|
|
80
|
-
function
|
|
81
|
-
className:
|
|
82
|
-
...
|
|
90
|
+
function f({
|
|
91
|
+
className: t,
|
|
92
|
+
...a
|
|
83
93
|
}) {
|
|
84
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ r.jsx(
|
|
85
95
|
"div",
|
|
86
96
|
{
|
|
87
97
|
"data-slot": "alert-description",
|
|
88
|
-
className:
|
|
98
|
+
className: d(
|
|
89
99
|
`
|
|
90
|
-
adm:col-start-2 adm:grid adm:justify-items-start
|
|
91
|
-
adm:text-
|
|
100
|
+
adm:col-span-2 adm:row-start-2 adm:grid adm:justify-items-start
|
|
101
|
+
adm:gap-1 adm:text-sm
|
|
92
102
|
adm:[&_p]:leading-relaxed
|
|
93
103
|
`,
|
|
94
|
-
|
|
104
|
+
t
|
|
95
105
|
),
|
|
96
|
-
...
|
|
106
|
+
...a
|
|
97
107
|
}
|
|
98
108
|
);
|
|
99
109
|
}
|
|
100
110
|
export {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
u as Alert,
|
|
112
|
+
f as AlertDescription,
|
|
113
|
+
g as AlertTitle
|
|
104
114
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./jsx-runtime-BB_1_6y_.cjs"),i=require("./input-group-13VFVAxD.cjs"),b=require("./index-DoxiiusW.cjs"),F=require("react");function O(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const d=O(F),A={ae:"AED",ar:"ARS",at:"EUR",au:"AUD",be:"EUR",br:"BRL",ca:"CAD",ch:"CHF",cl:"CLP",cn:"CNY",co:"COP",cy:"EUR",cz:"CZK",de:"EUR",dk:"DKK",ee:"EUR",eg:"EGP",es:"EUR",fi:"EUR",fr:"EUR",gb:"GBP",hk:"HKD",hu:"HUF",id:"IDR",ie:"EUR",il:"ILS",in:"INR",it:"EUR",jp:"JPY",kr:"KRW",lt:"EUR",lu:"EUR",lv:"EUR",ma:"MAD",mt:"EUR",mx:"MXN",my:"MYR",nl:"EUR",no:"NOK",nz:"NZD",pa:"PAB",pe:"PEN",ph:"PHP",pl:"PLN",pt:"EUR",ro:"RON",ru:"RUB",sa:"SAR",se:"SEK",sg:"SGD",si:"EUR",sk:"EUR",th:"THB",tr:"TRY",tw:"TWD",us:"USD",uy:"UYU",ve:"VES",za:"ZAR"};function j(t){try{return new Intl.Locale(t).region?.toLowerCase()??null}catch{return null}}function I(t){return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).formatToParts(0).find(e=>e.type==="currency")?.value??t}function U(t){return t.replace(/[^0-9.-]/g,"")}function g(t,e,n,o){const u=parseFloat(t);return Number.isNaN(u)?t:new Intl.NumberFormat(e,{maximumFractionDigits:o,minimumFractionDigits:n}).format(u)}function G({className:t,disabled:e,...n}){return s.jsxRuntimeExports.jsx(i.InputGroup,{"data-disabled":e||void 0,className:b.cn("adm:h-14 adm:rounded-full",t),...n})}function B({locale:t,currencySymbol:e}){const n=j(t),o=n?A[n]??null:null,u=e??(o?I(o):null);return s.jsxRuntimeExports.jsxs(i.InputGroupAddon,{align:"inline-start",className:"adm:pl-4",children:[n&&s.jsxRuntimeExports.jsx("img",{src:`https://flagcdn.com/${n}.svg`,alt:t,className:"adm:size-5 adm:rounded-full adm:object-cover"}),u&&s.jsxRuntimeExports.jsx("span",{className:"adm:text-base adm:text-foreground-secondary",children:u})]})}function L({className:t,value:e,defaultValue:n,onValueChange:o,locale:u="en-US",minimumFractionDigits:m=2,maximumFractionDigits:p=2,disabled:S,onFocus:h,onBlur:C,...P}){const R=e!==void 0,f=d.useCallback(r=>{if(r===void 0||r==="")return"";const a=typeof r=="number"?r:parseFloat(String(r));return Number.isNaN(a)?String(r):g(String(a),u,m,p)},[u,m,p]),[c,l]=d.useState(()=>f(R?e:n)),[N,x]=d.useState(!1);d.useEffect(()=>{R&&!N&&l(f(e))},[R,e,N,f]);const v=r=>{x(!0),l(U(c)),h?.(r)},w=r=>{l(r.target.value)},D=r=>{x(!1);const a=U(c),E=a===""?void 0:parseFloat(a),y=E!==void 0&&!Number.isNaN(E);l(y?g(a,u,m,p):a===""?"":c),o?.(y?E:void 0),C?.(r)};return s.jsxRuntimeExports.jsx("input",{type:"text",inputMode:"decimal","data-slot":"input-group-control",disabled:S,value:c,onFocus:v,onChange:w,onBlur:D,className:b.cn(`
|
|
2
|
+
adm:h-full adm:min-w-0 adm:flex-1 adm:border-none adm:bg-transparent
|
|
3
|
+
adm:pr-4 adm:pl-1! adm:text-sm adm:text-input-foreground
|
|
4
|
+
adm:shadow-none adm:outline-none
|
|
5
|
+
adm:placeholder:text-foreground-secondary
|
|
6
|
+
adm:disabled:cursor-not-allowed
|
|
7
|
+
adm:disabled:text-input-foreground-disabled
|
|
8
|
+
`,t),...P})}function M({className:t,type:e="button",...n}){return s.jsxRuntimeExports.jsx(i.InputGroupAddon,{align:"inline-end",className:"adm:pr-4",children:s.jsxRuntimeExports.jsx(i.InputGroupButton,{type:e,variant:"link",className:b.cn("adm:whitespace-nowrap",t),...n})})}exports.AmountInput=L;exports.AmountInputAction=M;exports.AmountInputContainer=G;exports.AmountInputFlag=B;exports.REGION_CURRENCY_MAP=A;exports.formatAmount=g;exports.getCurrencySymbol=I;exports.getRegionFromLocale=j;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as s } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
+
import { a as h, b as v, I as w } from "./input-group-D4S18xiq.js";
|
|
4
|
+
import { c as N } from "./index-CRiPKpXj.js";
|
|
5
|
+
import * as c from "react";
|
|
6
|
+
const D = {
|
|
7
|
+
ae: "AED",
|
|
8
|
+
ar: "ARS",
|
|
9
|
+
at: "EUR",
|
|
10
|
+
au: "AUD",
|
|
11
|
+
be: "EUR",
|
|
12
|
+
br: "BRL",
|
|
13
|
+
ca: "CAD",
|
|
14
|
+
ch: "CHF",
|
|
15
|
+
cl: "CLP",
|
|
16
|
+
cn: "CNY",
|
|
17
|
+
co: "COP",
|
|
18
|
+
cy: "EUR",
|
|
19
|
+
cz: "CZK",
|
|
20
|
+
de: "EUR",
|
|
21
|
+
dk: "DKK",
|
|
22
|
+
ee: "EUR",
|
|
23
|
+
eg: "EGP",
|
|
24
|
+
es: "EUR",
|
|
25
|
+
fi: "EUR",
|
|
26
|
+
fr: "EUR",
|
|
27
|
+
gb: "GBP",
|
|
28
|
+
hk: "HKD",
|
|
29
|
+
hu: "HUF",
|
|
30
|
+
id: "IDR",
|
|
31
|
+
ie: "EUR",
|
|
32
|
+
il: "ILS",
|
|
33
|
+
in: "INR",
|
|
34
|
+
it: "EUR",
|
|
35
|
+
jp: "JPY",
|
|
36
|
+
kr: "KRW",
|
|
37
|
+
lt: "EUR",
|
|
38
|
+
lu: "EUR",
|
|
39
|
+
lv: "EUR",
|
|
40
|
+
ma: "MAD",
|
|
41
|
+
mt: "EUR",
|
|
42
|
+
mx: "MXN",
|
|
43
|
+
my: "MYR",
|
|
44
|
+
nl: "EUR",
|
|
45
|
+
no: "NOK",
|
|
46
|
+
nz: "NZD",
|
|
47
|
+
pa: "PAB",
|
|
48
|
+
pe: "PEN",
|
|
49
|
+
ph: "PHP",
|
|
50
|
+
pl: "PLN",
|
|
51
|
+
pt: "EUR",
|
|
52
|
+
ro: "RON",
|
|
53
|
+
ru: "RUB",
|
|
54
|
+
sa: "SAR",
|
|
55
|
+
se: "SEK",
|
|
56
|
+
sg: "SGD",
|
|
57
|
+
si: "EUR",
|
|
58
|
+
sk: "EUR",
|
|
59
|
+
th: "THB",
|
|
60
|
+
tr: "TRY",
|
|
61
|
+
tw: "TWD",
|
|
62
|
+
us: "USD",
|
|
63
|
+
uy: "UYU",
|
|
64
|
+
ve: "VES",
|
|
65
|
+
za: "ZAR"
|
|
66
|
+
};
|
|
67
|
+
function F(n) {
|
|
68
|
+
try {
|
|
69
|
+
return new Intl.Locale(n).region?.toLowerCase() ?? null;
|
|
70
|
+
} catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function B(n) {
|
|
75
|
+
return new Intl.NumberFormat("en-US", { style: "currency", currency: n }).formatToParts(0).find((e) => e.type === "currency")?.value ?? n;
|
|
76
|
+
}
|
|
77
|
+
function g(n) {
|
|
78
|
+
return n.replace(/[^0-9.-]/g, "");
|
|
79
|
+
}
|
|
80
|
+
function y(n, e, t, u) {
|
|
81
|
+
const a = parseFloat(n);
|
|
82
|
+
return Number.isNaN(a) ? n : new Intl.NumberFormat(e, { maximumFractionDigits: u, minimumFractionDigits: t }).format(a);
|
|
83
|
+
}
|
|
84
|
+
function k({ className: n, disabled: e, ...t }) {
|
|
85
|
+
return /* @__PURE__ */ s.jsx(
|
|
86
|
+
w,
|
|
87
|
+
{
|
|
88
|
+
"data-disabled": e || void 0,
|
|
89
|
+
className: N("adm:h-14 adm:rounded-full", n),
|
|
90
|
+
...t
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function Y({ locale: n, currencySymbol: e }) {
|
|
95
|
+
const t = F(n), u = t ? D[t] ?? null : null, a = e ?? (u ? B(u) : null);
|
|
96
|
+
return /* @__PURE__ */ s.jsxs(h, { align: "inline-start", className: "adm:pl-4", children: [
|
|
97
|
+
t && /* @__PURE__ */ s.jsx(
|
|
98
|
+
"img",
|
|
99
|
+
{
|
|
100
|
+
src: `https://flagcdn.com/${t}.svg`,
|
|
101
|
+
alt: n,
|
|
102
|
+
className: "adm:size-5 adm:rounded-full adm:object-cover"
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
a && /* @__PURE__ */ s.jsx("span", { className: "adm:text-base adm:text-foreground-secondary", children: a })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
function H({
|
|
109
|
+
className: n,
|
|
110
|
+
value: e,
|
|
111
|
+
defaultValue: t,
|
|
112
|
+
onValueChange: u,
|
|
113
|
+
locale: a = "en-US",
|
|
114
|
+
minimumFractionDigits: m = 2,
|
|
115
|
+
maximumFractionDigits: i = 2,
|
|
116
|
+
disabled: x,
|
|
117
|
+
onFocus: A,
|
|
118
|
+
onBlur: I,
|
|
119
|
+
...S
|
|
120
|
+
}) {
|
|
121
|
+
const p = e !== void 0, f = c.useCallback(
|
|
122
|
+
(r) => {
|
|
123
|
+
if (r === void 0 || r === "") return "";
|
|
124
|
+
const o = typeof r == "number" ? r : parseFloat(String(r));
|
|
125
|
+
return Number.isNaN(o) ? String(r) : y(String(o), a, m, i);
|
|
126
|
+
},
|
|
127
|
+
[a, m, i]
|
|
128
|
+
), [d, l] = c.useState(
|
|
129
|
+
() => f(p ? e : t)
|
|
130
|
+
), [E, U] = c.useState(!1);
|
|
131
|
+
c.useEffect(() => {
|
|
132
|
+
p && !E && l(f(e));
|
|
133
|
+
}, [p, e, E, f]);
|
|
134
|
+
const C = (r) => {
|
|
135
|
+
U(!0), l(g(d)), A?.(r);
|
|
136
|
+
}, P = (r) => {
|
|
137
|
+
l(r.target.value);
|
|
138
|
+
}, j = (r) => {
|
|
139
|
+
U(!1);
|
|
140
|
+
const o = g(d), R = o === "" ? void 0 : parseFloat(o), b = R !== void 0 && !Number.isNaN(R);
|
|
141
|
+
l(
|
|
142
|
+
b ? y(o, a, m, i) : o === "" ? "" : d
|
|
143
|
+
), u?.(b ? R : void 0), I?.(r);
|
|
144
|
+
};
|
|
145
|
+
return /* @__PURE__ */ s.jsx(
|
|
146
|
+
"input",
|
|
147
|
+
{
|
|
148
|
+
type: "text",
|
|
149
|
+
inputMode: "decimal",
|
|
150
|
+
"data-slot": "input-group-control",
|
|
151
|
+
disabled: x,
|
|
152
|
+
value: d,
|
|
153
|
+
onFocus: C,
|
|
154
|
+
onChange: P,
|
|
155
|
+
onBlur: j,
|
|
156
|
+
className: N(
|
|
157
|
+
`
|
|
158
|
+
adm:h-full adm:min-w-0 adm:flex-1 adm:border-none adm:bg-transparent
|
|
159
|
+
adm:pr-4 adm:pl-1! adm:text-sm adm:text-input-foreground
|
|
160
|
+
adm:shadow-none adm:outline-none
|
|
161
|
+
adm:placeholder:text-foreground-secondary
|
|
162
|
+
adm:disabled:cursor-not-allowed
|
|
163
|
+
adm:disabled:text-input-foreground-disabled
|
|
164
|
+
`,
|
|
165
|
+
n
|
|
166
|
+
),
|
|
167
|
+
...S
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
function M({ className: n, type: e = "button", ...t }) {
|
|
172
|
+
return /* @__PURE__ */ s.jsx(h, { align: "inline-end", className: "adm:pr-4", children: /* @__PURE__ */ s.jsx(
|
|
173
|
+
v,
|
|
174
|
+
{
|
|
175
|
+
type: e,
|
|
176
|
+
variant: "link",
|
|
177
|
+
className: N("adm:whitespace-nowrap", n),
|
|
178
|
+
...t
|
|
179
|
+
}
|
|
180
|
+
) });
|
|
181
|
+
}
|
|
182
|
+
export {
|
|
183
|
+
H as AmountInput,
|
|
184
|
+
M as AmountInputAction,
|
|
185
|
+
k as AmountInputContainer,
|
|
186
|
+
Y as AmountInputFlag,
|
|
187
|
+
D as REGION_CURRENCY_MAP,
|
|
188
|
+
y as formatAmount,
|
|
189
|
+
B as getCurrencySymbol,
|
|
190
|
+
F as getRegionFromLocale
|
|
191
|
+
};
|
package/dist/avatar.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./jsx-runtime-BB_1_6y_.cjs"),A=require("react"),G=require("./index-cwZN7ZY3.cjs"),V=require("./index-CzY-WZXL.cjs"),O=require("./index-MQ0c3ZX_.cjs"),R=require("./index-CocSS1YK.cjs"),b=require("./index-DoxiiusW.cjs");function P(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const E=P(A);var g={exports:{}},h={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var w;function H(){if(w)return h;w=1;var e=A;function t(o,d){return o===d&&(o!==0||1/o===1/d)||o!==o&&d!==d}var a=typeof Object.is=="function"?Object.is:t,s=e.useState,u=e.useEffect,r=e.useLayoutEffect,v=e.useDebugValue;function l(o,d){var n=d(),i=s({inst:{value:n,getSnapshot:d}}),c=i[0].inst,
|
|
9
|
+
*/var w;function H(){if(w)return h;w=1;var e=A;function t(o,d){return o===d&&(o!==0||1/o===1/d)||o!==o&&d!==d}var a=typeof Object.is=="function"?Object.is:t,s=e.useState,u=e.useEffect,r=e.useLayoutEffect,v=e.useDebugValue;function l(o,d){var n=d(),i=s({inst:{value:n,getSnapshot:d}}),c=i[0].inst,S=i[1];return r(function(){c.value=n,c.getSnapshot=d,f(c)&&S({inst:c})},[o,n,d]),u(function(){return f(c)&&S({inst:c}),o(function(){f(c)&&S({inst:c})})},[o]),v(n),n}function f(o){var d=o.getSnapshot;o=o.value;try{var n=d();return!a(o,n)}catch{return!0}}function m(o,d){return d()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:l;return h.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,h}var L={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* use-sync-external-store-shim.development.js
|
|
12
12
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var I;function U(){return I||(I=1,process.env.NODE_ENV!=="production"&&(function(){function e(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}function t(n,i){_||u.startTransition===void 0||(_=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var c=i();if(!o){var
|
|
17
|
+
*/var I;function U(){return I||(I=1,process.env.NODE_ENV!=="production"&&(function(){function e(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}function t(n,i){_||u.startTransition===void 0||(_=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var c=i();if(!o){var S=i();r(c,S)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),o=!0)}S=v({inst:{value:c,getSnapshot:i}});var p=S[0].inst,y=S[1];return f(function(){p.value=c,p.getSnapshot=i,a(p)&&y({inst:p})},[n,c,i]),l(function(){return a(p)&&y({inst:p}),n(function(){a(p)&&y({inst:p})})},[n]),m(c),c}function a(n){var i=n.getSnapshot;n=n.value;try{var c=i();return!r(n,c)}catch{return!0}}function s(n,i){return i()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=A,r=typeof Object.is=="function"?Object.is:e,v=u.useState,l=u.useEffect,f=u.useLayoutEffect,m=u.useDebugValue,_=!1,o=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:t;L.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),L}var T;function B(){return T||(T=1,process.env.NODE_ENV==="production"?g.exports=H():g.exports=U()),g.exports}var K=B();function F(){return K.useSyncExternalStore(z,()=>!0,()=>!1)}function z(){return()=>{}}var j="Avatar",[W]=G.createContextScope(j),[Y,q]=W(j),D=E.forwardRef((e,t)=>{const{__scopeAvatar:a,...s}=e,[u,r]=E.useState("idle");return x.jsxRuntimeExports.jsx(Y,{scope:a,imageLoadingStatus:u,onImageLoadingStatusChange:r,children:x.jsxRuntimeExports.jsx(R.Primitive.span,{...s,ref:t})})});D.displayName=j;var N="AvatarImage",k=E.forwardRef((e,t)=>{const{__scopeAvatar:a,src:s,onLoadingStatusChange:u=()=>{},...r}=e,v=q(N,a),l=J(s,r),f=V.useCallbackRef(m=>{u(m),v.onImageLoadingStatusChange(m)});return O.useLayoutEffect2(()=>{l!=="idle"&&f(l)},[l,f]),l==="loaded"?x.jsxRuntimeExports.jsx(R.Primitive.img,{...r,ref:t,src:s}):null});k.displayName=N;var $="AvatarFallback",M=E.forwardRef((e,t)=>{const{__scopeAvatar:a,delayMs:s,...u}=e,r=q($,a),[v,l]=E.useState(s===void 0);return E.useEffect(()=>{if(s!==void 0){const f=window.setTimeout(()=>l(!0),s);return()=>window.clearTimeout(f)}},[s]),v&&r.imageLoadingStatus!=="loaded"?x.jsxRuntimeExports.jsx(R.Primitive.span,{...u,ref:t}):null});M.displayName=$;function C(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function J(e,{referrerPolicy:t,crossOrigin:a}){const s=F(),u=E.useRef(null),r=s?(u.current||(u.current=new window.Image),u.current):null,[v,l]=E.useState(()=>C(r,e));return O.useLayoutEffect2(()=>{l(C(r,e))},[r,e]),O.useLayoutEffect2(()=>{const f=o=>()=>{l(o)};if(!r)return;const m=f("loaded"),_=f("error");return r.addEventListener("load",m),r.addEventListener("error",_),t&&(r.referrerPolicy=t),typeof a=="string"&&(r.crossOrigin=a),()=>{r.removeEventListener("load",m),r.removeEventListener("error",_)}},[r,a,t]),v}var Q=D,X=k,Z=M;function ee({className:e,...t}){return x.jsxRuntimeExports.jsx(Q,{"data-slot":"avatar",className:b.cn(`
|
|
18
18
|
adm:relative adm:flex adm:size-8 adm:shrink-0 adm:overflow-hidden
|
|
19
|
-
adm:rounded-
|
|
20
|
-
`,e),...t})}function te({className:e,...t}){return
|
|
19
|
+
adm:rounded-xl
|
|
20
|
+
`,e),...t})}function te({className:e,...t}){return x.jsxRuntimeExports.jsx(X,{"data-slot":"avatar-image",className:b.cn("adm:aspect-square adm:size-full adm:object-cover",e),...t})}function re({className:e,...t}){return x.jsxRuntimeExports.jsx(Z,{"data-slot":"avatar-fallback",className:b.cn(`
|
|
21
21
|
adm:flex adm:size-full adm:items-center adm:justify-center
|
|
22
|
-
adm:rounded-
|
|
23
|
-
adm
|
|
22
|
+
adm:rounded-xl adm:bg-primary-100 adm:font-bold adm:text-primary
|
|
23
|
+
adm:*:data-[slot=icon]:text-lg adm:*:data-[slot=icon]:text-current
|
|
24
24
|
adm:[&>svg]:size-4 adm:[&>svg]:text-current
|
|
25
25
|
`,e),...t})}exports.Avatar=ee;exports.AvatarFallback=re;exports.AvatarImage=te;
|