@code0-tech/pictor 0.15.0 → 0.17.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/dist/assets/components/alert/Alert.style.css +1 -1
- package/dist/assets/components/avatar/Avatar.style.css +1 -1
- package/dist/assets/components/badge/Badge.style.css +1 -1
- package/dist/assets/components/breadcrumb/Breadcrumb.style.css +1 -1
- package/dist/assets/components/button/Button.style.css +1 -1
- package/dist/assets/components/button-group/ButtonGroup.style.css +1 -1
- package/dist/assets/components/card/Card.style.css +1 -1
- package/dist/assets/components/chart/Chart.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -1
- package/dist/assets/components/context-menu/ContextMenu.style.css +1 -1
- package/dist/assets/components/data-table/DataTable.style.css +1 -1
- package/dist/assets/components/dialog/Dialog.style.css +1 -1
- package/dist/assets/components/editor/Editor.styles.css +1 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
- package/dist/assets/components/form/ColorInput.style.css +1 -0
- package/dist/assets/components/form/DateInput.style.css +1 -1
- package/dist/assets/components/form/EditorInput.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/form/InputWrapper.style.css +1 -1
- package/dist/assets/components/form/SelectInput.style.css +1 -1
- package/dist/assets/components/json-view/JsonView.style.css +1 -1
- package/dist/assets/components/menu/Menu.style.css +1 -1
- package/dist/assets/components/resizable/Resizable.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
- package/dist/assets/components/spacing/Spacing.style.css +1 -1
- package/dist/assets/components/tab/Tab.style.css +1 -1
- package/dist/assets/components/text/Text.style.css +1 -1
- package/dist/assets/components/toast/Toast.style.css +1 -1
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -1
- package/dist/components/alert/Alert.js +33 -31
- package/dist/components/chart/Chart.d.ts +32 -0
- package/dist/components/chart/Chart.js +157 -0
- package/dist/components/chart/LineChart.d.ts +27 -0
- package/dist/components/chart/LineChart.js +76 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.js +8 -0
- package/dist/components/command/Command.js +20 -22
- package/dist/components/form/ColorInput.d.ts +33 -0
- package/dist/components/form/ColorInput.js +355 -0
- package/dist/components/form/DateInput.js +82 -86
- package/dist/components/form/EditorInput.d.ts +26 -10
- package/dist/components/form/EditorInput.js +520 -148
- package/dist/components/form/EmailInput.js +16 -15
- package/dist/components/form/Input.d.ts +0 -20
- package/dist/components/form/Input.js +48 -425
- package/dist/components/form/InputLabel.d.ts +2 -1
- package/dist/components/form/InputLabel.js +20 -9
- package/dist/components/form/InputWrapper.d.ts +0 -1
- package/dist/components/form/InputWrapper.js +52 -48
- package/dist/components/form/NumberInput.js +17 -16
- package/dist/components/form/PasswordInput.js +23 -22
- package/dist/components/form/TagInput.d.ts +30 -0
- package/dist/components/form/TagInput.js +117 -0
- package/dist/components/form/TextInput.js +12 -11
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form/index.js +83 -69
- package/dist/components/layout/Layout.js +37 -37
- package/dist/components/menu/Menu.d.ts +2 -2
- package/dist/components/menu/Menu.js +87 -87
- package/dist/components/scroll-area/ScrollArea.js +1 -1
- package/dist/components/toast/Toast.js +61 -61
- package/dist/index.d.ts +1 -0
- package/dist/index.js +247 -227
- package/dist/utils/index.js +11 -11
- package/dist/utils/size.d.ts +3 -3
- package/dist/utils/size.js +12 -6
- package/package.json +26 -20
- package/dist/components/form/Input.syntax.hook.d.ts +0 -10
- package/dist/components/form/Input.syntax.hook.js +0 -14
- package/dist/components/form/InputContentEditable.hook.d.ts +0 -52
- package/dist/components/form/InputContentEditable.hook.js +0 -449
- package/dist/components/form/InputSuggestion.d.ts +0 -27
- package/dist/components/form/InputSuggestion.js +0 -218
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as s, jsxs as G } from "react/jsx-runtime";
|
|
2
|
+
import { c as A } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import "../../utils/contextStore.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { mergeComponentProps as
|
|
5
|
+
import { mergeComponentProps as B } from "../../utils/component.js";
|
|
6
6
|
import "js-md5";
|
|
7
|
-
import {
|
|
8
|
-
import { Flex as
|
|
7
|
+
import { getSize as D } from "../../utils/size.js";
|
|
8
|
+
import { Flex as E } from "../flex/Flex.js";
|
|
9
9
|
import '../../assets/components/layout/Layout.style.css';/* empty css */
|
|
10
|
-
const
|
|
11
|
-
const t =
|
|
12
|
-
let l, n,
|
|
13
|
-
if (t[0] !==
|
|
10
|
+
const V = (S) => {
|
|
11
|
+
const t = A.c(56);
|
|
12
|
+
let l, n, r, i, o, e, d, a;
|
|
13
|
+
if (t[0] !== S) {
|
|
14
14
|
const {
|
|
15
|
-
children:
|
|
16
|
-
topContent:
|
|
17
|
-
bottomContent:
|
|
18
|
-
leftContent:
|
|
19
|
-
rightContent:
|
|
15
|
+
children: F,
|
|
16
|
+
topContent: P,
|
|
17
|
+
bottomContent: R,
|
|
18
|
+
leftContent: $,
|
|
19
|
+
rightContent: k,
|
|
20
20
|
showLayoutSplitter: j,
|
|
21
21
|
layoutGap: w,
|
|
22
|
-
...
|
|
23
|
-
} =
|
|
24
|
-
n =
|
|
22
|
+
...q
|
|
23
|
+
} = S;
|
|
24
|
+
n = F, a = P, l = R, i = $, o = k, e = j === void 0 ? !0 : j, r = w === void 0 ? "xl" : w, d = B("d-layout", q), t[0] = S, t[1] = l, t[2] = n, t[3] = r, t[4] = i, t[5] = o, t[6] = e, t[7] = d, t[8] = a;
|
|
25
25
|
} else
|
|
26
|
-
l = t[1], n = t[2],
|
|
26
|
+
l = t[1], n = t[2], r = t[3], i = t[4], o = t[5], e = t[6], d = t[7], a = t[8];
|
|
27
27
|
let m;
|
|
28
|
-
t[9] !==
|
|
28
|
+
t[9] !== r ? (m = D(r), t[9] = r, t[10] = m) : m = t[10];
|
|
29
29
|
let c;
|
|
30
30
|
t[11] !== m ? (c = {
|
|
31
31
|
flexDirection: "column",
|
|
32
32
|
gap: m
|
|
33
33
|
}, t[11] = m, t[12] = c) : c = t[12];
|
|
34
34
|
let f;
|
|
35
|
-
t[13] !== a ? (f = a && /* @__PURE__ */
|
|
35
|
+
t[13] !== a ? (f = a && /* @__PURE__ */ s("div", { className: "d-layout__top", children: a }), t[13] = a, t[14] = f) : f = t[14];
|
|
36
36
|
let p;
|
|
37
|
-
t[15] !== e || t[16] !== a ? (p = a && e && /* @__PURE__ */
|
|
37
|
+
t[15] !== e || t[16] !== a ? (p = a && e && /* @__PURE__ */ s("div", { className: "d-layout__splitter", "aria-orientation": "horizontal" }), t[15] = e, t[16] = a, t[17] = p) : p = t[17];
|
|
38
38
|
let _;
|
|
39
|
-
t[18] !==
|
|
39
|
+
t[18] !== r ? (_ = D(r), t[18] = r, t[19] = _) : _ = t[19];
|
|
40
40
|
let u;
|
|
41
41
|
t[20] !== _ ? (u = {
|
|
42
42
|
gap: _
|
|
43
43
|
}, t[20] = _, t[21] = u) : u = t[21];
|
|
44
44
|
let y;
|
|
45
|
-
t[22] !== i ? (y = i && /* @__PURE__ */
|
|
45
|
+
t[22] !== i ? (y = i && /* @__PURE__ */ s("div", { className: "d-layout__left", children: i }), t[22] = i, t[23] = y) : y = t[23];
|
|
46
46
|
let h;
|
|
47
|
-
t[24] !== i || t[25] !== e ? (h = i && e && /* @__PURE__ */
|
|
47
|
+
t[24] !== i || t[25] !== e ? (h = i && e && /* @__PURE__ */ s("div", { className: "d-layout__splitter", "aria-orientation": "vertical" }), t[24] = i, t[25] = e, t[26] = h) : h = t[26];
|
|
48
48
|
let v;
|
|
49
|
-
t[27] !== n ? (v = /* @__PURE__ */
|
|
49
|
+
t[27] !== n ? (v = /* @__PURE__ */ s("div", { className: "d-layout__content", children: n }), t[27] = n, t[28] = v) : v = t[28];
|
|
50
50
|
let N;
|
|
51
|
-
t[29] !== o || t[30] !== e ? (N = o && e && /* @__PURE__ */
|
|
51
|
+
t[29] !== o || t[30] !== e ? (N = o && e && /* @__PURE__ */ s("div", { className: "d-layout__splitter", "aria-orientation": "vertical" }), t[29] = o, t[30] = e, t[31] = N) : N = t[31];
|
|
52
52
|
let C;
|
|
53
|
-
t[32] !== o ? (C = o && /* @__PURE__ */
|
|
53
|
+
t[32] !== o ? (C = o && /* @__PURE__ */ s("div", { className: "d-layout__right", children: o }), t[32] = o, t[33] = C) : C = t[33];
|
|
54
54
|
let g;
|
|
55
|
-
t[34] !== N || t[35] !== C || t[36] !== u || t[37] !== y || t[38] !== h || t[39] !== v ? (g = /* @__PURE__ */
|
|
55
|
+
t[34] !== N || t[35] !== C || t[36] !== u || t[37] !== y || t[38] !== h || t[39] !== v ? (g = /* @__PURE__ */ G(E, { className: "d-layout__middle", style: u, children: [
|
|
56
56
|
y,
|
|
57
57
|
h,
|
|
58
58
|
v,
|
|
@@ -60,20 +60,20 @@ const U = (L) => {
|
|
|
60
60
|
C
|
|
61
61
|
] }), t[34] = N, t[35] = C, t[36] = u, t[37] = y, t[38] = h, t[39] = v, t[40] = g) : g = t[40];
|
|
62
62
|
let x;
|
|
63
|
-
t[41] !== l || t[42] !== e ? (x = l && e && /* @__PURE__ */
|
|
63
|
+
t[41] !== l || t[42] !== e ? (x = l && e && /* @__PURE__ */ s("div", { className: "d-layout__splitter", "aria-orientation": "horizontal" }), t[41] = l, t[42] = e, t[43] = x) : x = t[43];
|
|
64
|
+
let b;
|
|
65
|
+
t[44] !== l ? (b = l && /* @__PURE__ */ s("div", { className: "d-layout__bottom", children: l }), t[44] = l, t[45] = b) : b = t[45];
|
|
64
66
|
let z;
|
|
65
|
-
t[
|
|
66
|
-
let S;
|
|
67
|
-
t[46] !== g || t[47] !== x || t[48] !== z || t[49] !== c || t[50] !== f || t[51] !== p ? (S = /* @__PURE__ */ D(G, { className: "d-layout__inner", style: c, children: [
|
|
67
|
+
t[46] !== g || t[47] !== x || t[48] !== b || t[49] !== c || t[50] !== f || t[51] !== p ? (z = /* @__PURE__ */ G(E, { className: "d-layout__inner", style: c, children: [
|
|
68
68
|
f,
|
|
69
69
|
p,
|
|
70
70
|
g,
|
|
71
71
|
x,
|
|
72
|
-
|
|
73
|
-
] }), t[46] = g, t[47] = x, t[48] =
|
|
74
|
-
let
|
|
75
|
-
return t[53] !== d || t[54] !==
|
|
72
|
+
b
|
|
73
|
+
] }), t[46] = g, t[47] = x, t[48] = b, t[49] = c, t[50] = f, t[51] = p, t[52] = z) : z = t[52];
|
|
74
|
+
let L;
|
|
75
|
+
return t[53] !== d || t[54] !== z ? (L = /* @__PURE__ */ s("div", { ...d, children: z }), t[53] = d, t[54] = z, t[55] = L) : L = t[55], L;
|
|
76
76
|
};
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
V as Layout
|
|
79
79
|
};
|
|
@@ -24,10 +24,10 @@ export declare const MenuTrigger: React.FC<MenuTriggerProps>;
|
|
|
24
24
|
export declare const MenuPortal: React.FC<MenuPortalProps>;
|
|
25
25
|
export declare const MenuContent: React.FC<MenuContentProps>;
|
|
26
26
|
export declare const MenuLabel: React.FC<MenuLabelProps>;
|
|
27
|
-
export declare const MenuItem: React.
|
|
27
|
+
export declare const MenuItem: React.ForwardRefExoticComponent<ComponentProps & DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
28
|
export declare const MenuGroup: React.FC<MenuGroupProps>;
|
|
29
29
|
export declare const MenuSub: React.FC<MenuSubProps>;
|
|
30
|
-
export declare const MenuSubTrigger: React.
|
|
30
|
+
export declare const MenuSubTrigger: React.ForwardRefExoticComponent<ComponentProps & DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
31
|
export declare const MenuSubContent: React.FC<MenuSubContentProps>;
|
|
32
32
|
export declare const MenuSeparator: React.FC<MenuSeparatorProps>;
|
|
33
33
|
export declare const MenuCheckboxItem: React.FC<MenuCheckboxItemProps>;
|
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import M from "react";
|
|
3
4
|
import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
4
5
|
import "../../utils/contextStore.js";
|
|
5
|
-
import "
|
|
6
|
-
import { mergeComponentProps as u } from "../../utils/component.js";
|
|
6
|
+
import { mergeComponentProps as i } from "../../utils/component.js";
|
|
7
7
|
import "js-md5";
|
|
8
|
-
import { DropdownMenuItem as
|
|
9
|
-
import { AutoScrollArea as
|
|
10
|
-
const
|
|
11
|
-
const e =
|
|
8
|
+
import { DropdownMenuItem as w, DropdownMenuSubTrigger as b, DropdownMenu as g, DropdownMenuArrow as $, DropdownMenuCheckboxItem as D, DropdownMenuGroup as h, DropdownMenuItemIndicator as S, DropdownMenuLabel as I, DropdownMenuPortal as C, DropdownMenuSeparator as x, DropdownMenuSub as T, DropdownMenuTrigger as A, DropdownMenuContent as R, DropdownMenuSubContent as k } from "@radix-ui/react-dropdown-menu";
|
|
9
|
+
import { AutoScrollArea as a } from "../scroll-area/ScrollArea.js";
|
|
10
|
+
const B = (l) => {
|
|
11
|
+
const e = u.c(4);
|
|
12
12
|
let t;
|
|
13
|
-
e[0] !== l ? (t =
|
|
13
|
+
e[0] !== l ? (t = i("menu", l), e[0] = l, e[1] = t) : t = e[1];
|
|
14
14
|
const o = t;
|
|
15
15
|
let n;
|
|
16
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
17
|
-
},
|
|
18
|
-
const e =
|
|
16
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(g, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
17
|
+
}, F = (l) => {
|
|
18
|
+
const e = u.c(4);
|
|
19
19
|
let t;
|
|
20
|
-
e[0] !== l ? (t =
|
|
20
|
+
e[0] !== l ? (t = i("menu__trigger", l), e[0] = l, e[1] = t) : t = e[1];
|
|
21
21
|
const o = t;
|
|
22
22
|
let n;
|
|
23
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
24
|
-
},
|
|
25
|
-
const e =
|
|
23
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(A, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
24
|
+
}, H = (l) => {
|
|
25
|
+
const e = u.c(4);
|
|
26
26
|
let t;
|
|
27
|
-
e[0] !== l ? (t =
|
|
27
|
+
e[0] !== l ? (t = i("menu__portal", l), e[0] = l, e[1] = t) : t = e[1];
|
|
28
28
|
const o = t;
|
|
29
29
|
let n;
|
|
30
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
31
|
-
},
|
|
32
|
-
const e =
|
|
33
|
-
let t, o, n,
|
|
30
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(C, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
31
|
+
}, J = (l) => {
|
|
32
|
+
const e = u.c(12);
|
|
33
|
+
let t, o, n, c;
|
|
34
34
|
if (e[0] !== l) {
|
|
35
35
|
const {
|
|
36
36
|
children: _,
|
|
37
37
|
...d
|
|
38
38
|
} = l;
|
|
39
|
-
o = _, t =
|
|
39
|
+
o = _, t = R, c = l.align, n = i(`menu__content menu__content--${l.color ?? "primary"}`, d), e[0] = l, e[1] = t, e[2] = o, e[3] = n, e[4] = c;
|
|
40
40
|
} else
|
|
41
|
-
t = e[1], o = e[2], n = e[3],
|
|
41
|
+
t = e[1], o = e[2], n = e[3], c = e[4];
|
|
42
42
|
const m = n;
|
|
43
|
-
let
|
|
44
|
-
e[5] !== o ? (
|
|
43
|
+
let s;
|
|
44
|
+
e[5] !== o ? (s = /* @__PURE__ */ r(a, { children: o }), e[5] = o, e[6] = s) : s = e[6];
|
|
45
45
|
let f;
|
|
46
|
-
return e[7] !== t || e[8] !==
|
|
47
|
-
}, J = (l) => {
|
|
48
|
-
const e = r.c(4);
|
|
49
|
-
let t;
|
|
50
|
-
e[0] !== l ? (t = u("menu__label", l), e[0] = l, e[1] = t) : t = e[1];
|
|
51
|
-
const o = t;
|
|
52
|
-
let n;
|
|
53
|
-
return e[2] !== o ? (n = /* @__PURE__ */ c(w, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
46
|
+
return e[7] !== t || e[8] !== c || e[9] !== m || e[10] !== s ? (f = /* @__PURE__ */ r(t, { align: c, ...m, children: s }), e[7] = t, e[8] = c, e[9] = m, e[10] = s, e[11] = f) : f = e[11], f;
|
|
54
47
|
}, K = (l) => {
|
|
55
|
-
const e =
|
|
48
|
+
const e = u.c(4);
|
|
56
49
|
let t;
|
|
57
|
-
e[0] !== l ? (t =
|
|
50
|
+
e[0] !== l ? (t = i("menu__label", l), e[0] = l, e[1] = t) : t = e[1];
|
|
58
51
|
const o = t;
|
|
59
52
|
let n;
|
|
60
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
61
|
-
}, N = (l) => {
|
|
62
|
-
const
|
|
53
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(I, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
54
|
+
}, N = M.forwardRef((l, e) => {
|
|
55
|
+
const t = u.c(5);
|
|
56
|
+
let o;
|
|
57
|
+
t[0] !== l ? (o = i("menu__item", l), t[0] = l, t[1] = o) : o = t[1];
|
|
58
|
+
const n = o;
|
|
59
|
+
let c;
|
|
60
|
+
return t[2] !== e || t[3] !== n ? (c = /* @__PURE__ */ r(w, { ref: e, ...n }), t[2] = e, t[3] = n, t[4] = c) : c = t[4], c;
|
|
61
|
+
}), O = (l) => {
|
|
62
|
+
const e = u.c(4);
|
|
63
63
|
let t;
|
|
64
|
-
e[0] !== l ? (t =
|
|
64
|
+
e[0] !== l ? (t = i("menu__group", l), e[0] = l, e[1] = t) : t = e[1];
|
|
65
65
|
const o = t;
|
|
66
66
|
let n;
|
|
67
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
68
|
-
}, O = (l) => {
|
|
69
|
-
const e = r.c(4);
|
|
70
|
-
let t;
|
|
71
|
-
e[0] !== l ? (t = u("menu__sub", l), e[0] = l, e[1] = t) : t = e[1];
|
|
72
|
-
const o = t;
|
|
73
|
-
let n;
|
|
74
|
-
return e[2] !== o ? (n = /* @__PURE__ */ c(x, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
67
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(h, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
75
68
|
}, Q = (l) => {
|
|
76
|
-
const e =
|
|
69
|
+
const e = u.c(4);
|
|
77
70
|
let t;
|
|
78
|
-
e[0] !== l ? (t =
|
|
71
|
+
e[0] !== l ? (t = i("menu__sub", l), e[0] = l, e[1] = t) : t = e[1];
|
|
79
72
|
const o = t;
|
|
80
73
|
let n;
|
|
81
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
82
|
-
}, U = (l) => {
|
|
83
|
-
const
|
|
74
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(T, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
75
|
+
}, U = M.forwardRef((l, e) => {
|
|
76
|
+
const t = u.c(5);
|
|
77
|
+
let o;
|
|
78
|
+
t[0] !== l ? (o = i("menu__sub-trigger", l), t[0] = l, t[1] = o) : o = t[1];
|
|
79
|
+
const n = o;
|
|
80
|
+
let c;
|
|
81
|
+
return t[2] !== e || t[3] !== n ? (c = /* @__PURE__ */ r(b, { ref: e, ...n }), t[2] = e, t[3] = n, t[4] = c) : c = t[4], c;
|
|
82
|
+
}), V = (l) => {
|
|
83
|
+
const e = u.c(10);
|
|
84
84
|
let t, o, n;
|
|
85
85
|
if (e[0] !== l) {
|
|
86
86
|
const {
|
|
87
87
|
children: f,
|
|
88
88
|
..._
|
|
89
89
|
} = l;
|
|
90
|
-
o = f, t = k, n =
|
|
90
|
+
o = f, t = k, n = i(`menu__sub-content menu__sub-content--${l.color ?? "primary"}`, _), e[0] = l, e[1] = t, e[2] = o, e[3] = n;
|
|
91
91
|
} else
|
|
92
92
|
t = e[1], o = e[2], n = e[3];
|
|
93
|
-
const
|
|
93
|
+
const c = n;
|
|
94
94
|
let m;
|
|
95
|
-
e[4] !== o ? (m = /* @__PURE__ */
|
|
96
|
-
let
|
|
97
|
-
return e[6] !== t || e[7] !==
|
|
98
|
-
}, V = (l) => {
|
|
99
|
-
const e = r.c(4);
|
|
100
|
-
let t;
|
|
101
|
-
e[0] !== l ? (t = u("menu__separator", l), e[0] = l, e[1] = t) : t = e[1];
|
|
102
|
-
const o = t;
|
|
103
|
-
let n;
|
|
104
|
-
return e[2] !== o ? (n = /* @__PURE__ */ c(C, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
95
|
+
e[4] !== o ? (m = /* @__PURE__ */ r(a, { children: o }), e[4] = o, e[5] = m) : m = e[5];
|
|
96
|
+
let s;
|
|
97
|
+
return e[6] !== t || e[7] !== c || e[8] !== m ? (s = /* @__PURE__ */ r(t, { ...c, children: m }), e[6] = t, e[7] = c, e[8] = m, e[9] = s) : s = e[9], s;
|
|
105
98
|
}, W = (l) => {
|
|
106
|
-
const e =
|
|
99
|
+
const e = u.c(4);
|
|
107
100
|
let t;
|
|
108
|
-
e[0] !== l ? (t =
|
|
101
|
+
e[0] !== l ? (t = i("menu__separator", l), e[0] = l, e[1] = t) : t = e[1];
|
|
109
102
|
const o = t;
|
|
110
103
|
let n;
|
|
111
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
104
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(x, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
112
105
|
}, X = (l) => {
|
|
113
|
-
const e =
|
|
106
|
+
const e = u.c(4);
|
|
114
107
|
let t;
|
|
115
|
-
e[0] !== l ? (t =
|
|
108
|
+
e[0] !== l ? (t = i("menu__checkbox-item", l), e[0] = l, e[1] = t) : t = e[1];
|
|
116
109
|
const o = t;
|
|
117
110
|
let n;
|
|
118
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
111
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(D, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
119
112
|
}, Y = (l) => {
|
|
120
|
-
const e =
|
|
113
|
+
const e = u.c(4);
|
|
114
|
+
let t;
|
|
115
|
+
e[0] !== l ? (t = i("menu__item-indicator", l), e[0] = l, e[1] = t) : t = e[1];
|
|
116
|
+
const o = t;
|
|
117
|
+
let n;
|
|
118
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r(S, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
119
|
+
}, Z = (l) => {
|
|
120
|
+
const e = u.c(4);
|
|
121
121
|
let t;
|
|
122
|
-
e[0] !== l ? (t =
|
|
122
|
+
e[0] !== l ? (t = i("menu__arrow", l), e[0] = l, e[1] = t) : t = e[1];
|
|
123
123
|
const o = t;
|
|
124
124
|
let n;
|
|
125
|
-
return e[2] !== o ? (n = /* @__PURE__ */
|
|
125
|
+
return e[2] !== o ? (n = /* @__PURE__ */ r($, { ...o }), e[2] = o, e[3] = n) : n = e[3], n;
|
|
126
126
|
};
|
|
127
127
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
B as Menu,
|
|
129
|
+
Z as MenuArrow,
|
|
130
|
+
X as MenuCheckboxItem,
|
|
131
|
+
J as MenuContent,
|
|
132
|
+
O as MenuGroup,
|
|
133
|
+
N as MenuItem,
|
|
134
|
+
Y as MenuItemIndicator,
|
|
135
|
+
K as MenuLabel,
|
|
136
|
+
H as MenuPortal,
|
|
137
|
+
W as MenuSeparator,
|
|
138
|
+
Q as MenuSub,
|
|
139
|
+
V as MenuSubContent,
|
|
140
|
+
U as MenuSubTrigger,
|
|
141
|
+
F as MenuTrigger
|
|
142
142
|
};
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import { toast as
|
|
1
|
+
import { jsxs as I, jsx as o, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { c as v } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { toast as F } from "sonner";
|
|
4
4
|
import '../../assets/components/toast/Toast.style.css';/* empty css */
|
|
5
5
|
import "../../utils/contextStore.js";
|
|
6
6
|
import "react";
|
|
7
|
-
import { mergeComponentProps as
|
|
7
|
+
import { mergeComponentProps as P } from "../../utils/component.js";
|
|
8
8
|
import "js-md5";
|
|
9
|
-
import { IconCircleX as
|
|
10
|
-
import { Text as
|
|
11
|
-
import { Flex as
|
|
12
|
-
const
|
|
13
|
-
function
|
|
9
|
+
import { IconCircleX as S, IconAlertCircle as b, IconCircleCheck as k, IconInfoCircle as A, IconCircleDot as y } from "@tabler/icons-react";
|
|
10
|
+
import { Text as D } from "../text/Text.js";
|
|
11
|
+
import { Flex as x } from "../flex/Flex.js";
|
|
12
|
+
const E = ["primary", "secondary", "tertiary", "info", "success", "warning", "error"], R = (r) => E.includes(r);
|
|
13
|
+
function Y({
|
|
14
14
|
wrapper: r,
|
|
15
|
-
...
|
|
15
|
+
...t
|
|
16
16
|
}) {
|
|
17
|
-
return
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */ o(
|
|
17
|
+
return F.custom((s) => {
|
|
18
|
+
const e = /* @__PURE__ */ o(X, { id: s, ...t, children: t.children });
|
|
19
|
+
return /* @__PURE__ */ o(w, { children: r ? r(e) : e });
|
|
20
20
|
}, {
|
|
21
|
-
duration:
|
|
21
|
+
duration: t.duration ?? 4e3
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const
|
|
26
|
-
let s,
|
|
27
|
-
if (
|
|
24
|
+
function X(r) {
|
|
25
|
+
const t = v.c(28);
|
|
26
|
+
let s, e, c, i, l, n, a, m;
|
|
27
|
+
if (t[0] !== r) {
|
|
28
28
|
const {
|
|
29
|
-
color:
|
|
30
|
-
icon:
|
|
31
|
-
title:
|
|
32
|
-
children:
|
|
33
|
-
duration:
|
|
34
|
-
...
|
|
29
|
+
color: C,
|
|
30
|
+
icon: g,
|
|
31
|
+
title: $,
|
|
32
|
+
children: T,
|
|
33
|
+
duration: B,
|
|
34
|
+
...N
|
|
35
35
|
} = r;
|
|
36
|
-
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
const
|
|
36
|
+
c = g, m = $, s = T, e = C === void 0 ? "secondary" : C;
|
|
37
|
+
let h;
|
|
38
|
+
t[9] !== e ? (h = R(e), t[9] = e, t[10] = h) : h = t[10], i = h;
|
|
39
|
+
const j = i ? {} : {
|
|
40
40
|
style: {
|
|
41
|
-
color:
|
|
42
|
-
...
|
|
41
|
+
color: e,
|
|
42
|
+
...N.style
|
|
43
43
|
}
|
|
44
|
-
};
|
|
45
|
-
n =
|
|
46
|
-
...
|
|
47
|
-
|
|
48
|
-
}),
|
|
44
|
+
}, z = e === "error";
|
|
45
|
+
l = z ? "alert" : "status", n = z ? "assertive" : "polite", a = P(`toast toast--${i ? e : "secondary"}`, {
|
|
46
|
+
...N,
|
|
47
|
+
...j
|
|
48
|
+
}), t[0] = r, t[1] = s, t[2] = e, t[3] = c, t[4] = i, t[5] = l, t[6] = n, t[7] = a, t[8] = m;
|
|
49
49
|
} else
|
|
50
|
-
s =
|
|
51
|
-
let a;
|
|
52
|
-
e[9] !== t || e[10] !== i || e[11] !== c ? (a = i ?? (c && /* @__PURE__ */ o(E, { color: t })), e[9] = t, e[10] = i, e[11] = c, e[12] = a) : a = e[12];
|
|
53
|
-
let m;
|
|
54
|
-
e[13] !== l ? (m = /* @__PURE__ */ o(b, { size: "md", hierarchy: "primary", children: l }), e[13] = l, e[14] = m) : m = e[14];
|
|
50
|
+
s = t[1], e = t[2], c = t[3], i = t[4], l = t[5], n = t[6], a = t[7], m = t[8];
|
|
55
51
|
let d;
|
|
56
|
-
e[
|
|
57
|
-
a,
|
|
58
|
-
m
|
|
59
|
-
] }) }), e[15] = a, e[16] = m, e[17] = d) : d = e[17];
|
|
52
|
+
t[11] !== e || t[12] !== c || t[13] !== i ? (d = c ?? (i && /* @__PURE__ */ o(q, { color: e })), t[11] = e, t[12] = c, t[13] = i, t[14] = d) : d = t[14];
|
|
60
53
|
let _;
|
|
61
|
-
|
|
54
|
+
t[15] !== m ? (_ = /* @__PURE__ */ o(D, { size: "md", hierarchy: "primary", children: m }), t[15] = m, t[16] = _) : _ = t[16];
|
|
62
55
|
let f;
|
|
63
|
-
|
|
56
|
+
t[17] !== d || t[18] !== _ ? (f = /* @__PURE__ */ o(x, { className: "toast__header", children: /* @__PURE__ */ I(x, { className: "toast__header-wrapper", children: [
|
|
64
57
|
d,
|
|
65
58
|
_
|
|
66
|
-
] })
|
|
59
|
+
] }) }), t[17] = d, t[18] = _, t[19] = f) : f = t[19];
|
|
60
|
+
let p;
|
|
61
|
+
t[20] !== s ? (p = s && /* @__PURE__ */ o("div", { className: "toast__content", children: s }), t[20] = s, t[21] = p) : p = t[21];
|
|
62
|
+
let u;
|
|
63
|
+
return t[22] !== l || t[23] !== n || t[24] !== a || t[25] !== f || t[26] !== p ? (u = /* @__PURE__ */ I("div", { role: l, "aria-live": n, ...a, children: [
|
|
64
|
+
f,
|
|
65
|
+
p
|
|
66
|
+
] }), t[22] = l, t[23] = n, t[24] = a, t[25] = f, t[26] = p, t[27] = u) : u = t[27], u;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
const
|
|
68
|
+
const q = (r) => {
|
|
69
|
+
const t = v.c(1), {
|
|
70
70
|
color: s
|
|
71
71
|
} = r;
|
|
72
|
-
let
|
|
73
|
-
return
|
|
74
|
-
primary: /* @__PURE__ */ o(
|
|
75
|
-
secondary: /* @__PURE__ */ o(
|
|
76
|
-
tertiary: /* @__PURE__ */ o(
|
|
77
|
-
info: /* @__PURE__ */ o(
|
|
78
|
-
success: /* @__PURE__ */ o(
|
|
79
|
-
warning: /* @__PURE__ */ o(
|
|
80
|
-
error: /* @__PURE__ */ o(
|
|
81
|
-
},
|
|
72
|
+
let e;
|
|
73
|
+
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
74
|
+
primary: /* @__PURE__ */ o(y, { className: "toast__icon", size: 16 }),
|
|
75
|
+
secondary: /* @__PURE__ */ o(y, { className: "toast__icon", size: 16 }),
|
|
76
|
+
tertiary: /* @__PURE__ */ o(y, { className: "toast__icon", size: 16 }),
|
|
77
|
+
info: /* @__PURE__ */ o(A, { className: "toast__icon", size: 16 }),
|
|
78
|
+
success: /* @__PURE__ */ o(k, { className: "toast__icon", size: 16 }),
|
|
79
|
+
warning: /* @__PURE__ */ o(b, { className: "toast__icon", size: 16 }),
|
|
80
|
+
error: /* @__PURE__ */ o(S, { className: "toast__icon", size: 16 })
|
|
81
|
+
}, t[0] = e) : e = t[0], e[s] ?? null;
|
|
82
82
|
};
|
|
83
83
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
X as Toast,
|
|
85
|
+
Y as toast
|
|
86
86
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './components/breadcrumb/Breadcrumb';
|
|
|
6
6
|
export * from './components/button/Button';
|
|
7
7
|
export * from './components/button-group/ButtonGroup';
|
|
8
8
|
export * from './components/card/Card';
|
|
9
|
+
export * from './components/chart/index';
|
|
9
10
|
export * from './components/col/Col';
|
|
10
11
|
export * from './components/command/Command';
|
|
11
12
|
export * from './components/container/Container';
|