@dss-kit/ui-kit 0.3.9 → 1.0.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/components/builders/Modal/Modal.js +3 -3
- package/dist/components/builders/Modal/ModalFooter/ModalFooter.js +7 -7
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.js +15 -15
- package/dist/components/builders/Modal/ModalMain/styles.js +3 -3
- package/dist/components/builders/Modal/styles.js +2 -2
- package/dist/components/builders/Table/Table.js +66 -58
- package/dist/components/builders/Table/Table.utils.js +5 -5
- package/dist/components/builders/Table/TableBodyRow/TableBodyRow.js +5 -5
- package/dist/components/builders/Table/TableHeadRow/TableHeadRow.js +4 -4
- package/dist/components/builders/Table/TablePagination/TablePagination.js +44 -44
- package/dist/components/builders/Table/TableWrapper/TableWrapper.js +19 -19
- package/dist/components/charts/LineChart/constants.js +16 -16
- package/dist/components/charts/LineChart/utils.js +2 -2
- package/dist/components/charts/PieProgressChart/constants.js +16 -10
- package/dist/components/controls/Button/Button.js +56 -53
- package/dist/components/controls/Button/styles.js +4 -4
- package/dist/components/controls/Button/types.d.ts +2 -1
- package/dist/components/controls/Checkbox/styles.js +7 -7
- package/dist/components/controls/IconButton/styles.js +27 -27
- package/dist/components/controls/Input/styles.js +10 -10
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.js +28 -28
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.js +13 -13
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.styles.js +2 -2
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.js +43 -43
- package/dist/components/controls/MarkdownTextEditor/nodes/CustomLinkNode/parts/CustomLinkNodeComponent/CustomLinkNodeComponent.styles.js +3 -3
- package/dist/components/controls/MarkdownTextEditor/nodes/ImageRowNode/parts/ImageRowNodeComponent/ImageRowNodeComponent.styles.js +2 -2
- package/dist/components/controls/MarkdownTextEditor/themes/editor.theme.js +1 -1
- package/dist/components/controls/OtpInput/styles.js +11 -11
- package/dist/components/controls/RadioGroup/Radio.d.ts +10 -1
- package/dist/components/controls/RadioGroup/Radio.js +78 -73
- package/dist/components/controls/SegmentControl/SegmentControl.js +12 -12
- package/dist/components/controls/SegmentControl/styles.js +8 -8
- package/dist/components/controls/Select/styles.js +19 -19
- package/dist/components/controls/Switch/styles.js +12 -12
- package/dist/components/controls/Tabs/Tabs.js +10 -10
- package/dist/components/shared/Avatar/Avatar.js +8 -8
- package/dist/components/shared/Badge/Badge.d.ts +1 -1
- package/dist/components/shared/Badge/Badge.js +75 -66
- package/dist/components/shared/Hint/styles.js +6 -6
- package/dist/components/shared/MarkdownText/MarkdownText.styles.js +4 -4
- package/dist/components/shared/Popover/PopoverContent/PopoverContent.js +2 -2
- package/dist/components/shared/Skeleton/Skeleton.js +11 -11
- package/dist/components/shared/Tag/Tag.js +14 -14
- package/dist/components/shared/Toast/Toast.js +30 -30
- package/dist/components/shared/Tooltip/Tooltip.js +28 -28
- package/dist/components/shared/Tooltip/constants.js +3 -3
- package/dist/index.js +37 -34
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.const.d.ts +8 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.d.ts +12 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.js +12 -0
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +1 -1
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.js +37 -26
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts +30 -5
- package/dist/providers/ThemeProviderScoped/index.d.ts +1 -0
- package/dist/root.css +1 -1
- package/dist/ui-kit.cjs +8 -8
- package/dist/ui-kit.css +1 -1
- package/dist/utils/theme/index.d.ts +141 -141
- package/dist/utils/theme/index.js +14 -14
- package/dist/utils/theme/palette.d.ts +184 -0
- package/dist/utils/theme/palette.js +187 -0
- package/package.json +1 -1
- package/dist/providers/ThemeProviderScoped/styles.module.scss.js +0 -7
- package/dist/utils/theme/color.d.ts +0 -184
- package/dist/utils/theme/color.js +0 -187
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as v, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { css as R, cx as G } from "@emotion/css";
|
|
3
|
-
import { useRef as
|
|
3
|
+
import { useRef as H, useState as J, useEffect as K } from "react";
|
|
4
4
|
import z from "../../../../assets/svg/table/chevron-left.svg.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { getPageNumbers as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { IconButton as
|
|
5
|
+
import M from "../../../../assets/svg/table/chevron-right.svg.js";
|
|
6
|
+
import Q from "../../../../assets/svg/table/dots.svg.js";
|
|
7
|
+
import { getPageNumbers as U } from "./TablePagination.utils.js";
|
|
8
|
+
import { Button as _ } from "../../../controls/Button/Button.js";
|
|
9
|
+
import { IconButton as B } from "../../../controls/IconButton/IconButton.js";
|
|
10
10
|
import { Box as r } from "../../Box/Box.js";
|
|
11
|
-
import { Select as
|
|
12
|
-
import { theme as
|
|
13
|
-
import { Text as
|
|
14
|
-
const { color: i, cornerRadius: tt, spacing: b } =
|
|
11
|
+
import { Select as X } from "../../../controls/Select/Select.js";
|
|
12
|
+
import { theme as Y } from "../../../../utils/theme/index.js";
|
|
13
|
+
import { Text as Z } from "../../Text/Text.js";
|
|
14
|
+
const { color: i, cornerRadius: tt, spacing: b } = Y, bt = ({
|
|
15
15
|
pageIndex: o,
|
|
16
16
|
pageSize: n,
|
|
17
17
|
totalCount: a,
|
|
@@ -21,20 +21,20 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
21
21
|
labels: d,
|
|
22
22
|
pageSizeOptions: m = [10, 20, 50, 100],
|
|
23
23
|
showPageSizeSelector: h = !0,
|
|
24
|
-
renderPageSizeSelectorDropdownItem:
|
|
25
|
-
renderPageSizeSelectorInputItem:
|
|
26
|
-
className:
|
|
24
|
+
renderPageSizeSelectorDropdownItem: L = (u) => u.label,
|
|
25
|
+
renderPageSizeSelectorInputItem: T,
|
|
26
|
+
className: V,
|
|
27
27
|
itemClassName: x,
|
|
28
|
-
activeItemClassName:
|
|
29
|
-
pageSizeSelectorClassName:
|
|
28
|
+
activeItemClassName: w,
|
|
29
|
+
pageSizeSelectorClassName: D
|
|
30
30
|
}) => {
|
|
31
|
-
const { prev: u = "Previous", next:
|
|
32
|
-
|
|
33
|
-
const t =
|
|
31
|
+
const { prev: u = "Previous", next: I = "Next" } = d ?? {}, S = H(null), [O, $] = J(0), y = Math.ceil(a / n), f = o > 0, g = o < y - 1;
|
|
32
|
+
K(() => {
|
|
33
|
+
const t = S.current;
|
|
34
34
|
if (!t) return;
|
|
35
35
|
const p = new ResizeObserver((W) => {
|
|
36
36
|
for (const C of W)
|
|
37
|
-
|
|
37
|
+
$(C.contentRect.width);
|
|
38
38
|
});
|
|
39
39
|
return p.observe(t), () => {
|
|
40
40
|
p.disconnect();
|
|
@@ -48,7 +48,7 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
48
48
|
return 1;
|
|
49
49
|
const F = Math.floor((k + 8) / 48);
|
|
50
50
|
return Math.max(1, Math.min(10, F));
|
|
51
|
-
})(
|
|
51
|
+
})(O), q = U({
|
|
52
52
|
page: o + 1,
|
|
53
53
|
count: y,
|
|
54
54
|
maxVisiblePages: E
|
|
@@ -56,7 +56,7 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
56
56
|
f && s(o - 1);
|
|
57
57
|
}, P = () => {
|
|
58
58
|
g && s(o + 1);
|
|
59
|
-
},
|
|
59
|
+
}, A = (t) => {
|
|
60
60
|
c(Number(t));
|
|
61
61
|
};
|
|
62
62
|
return a === 0 ? null : /* @__PURE__ */ v(r, { flex: 1, row: !0, justifyContent: "space-between", children: [
|
|
@@ -67,10 +67,10 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
67
67
|
row: !0,
|
|
68
68
|
gap: b.sm,
|
|
69
69
|
alignItems: "center",
|
|
70
|
-
className:
|
|
70
|
+
className: V,
|
|
71
71
|
children: [
|
|
72
72
|
/* @__PURE__ */ e(
|
|
73
|
-
|
|
73
|
+
_,
|
|
74
74
|
{
|
|
75
75
|
width: "auto",
|
|
76
76
|
size: "sm",
|
|
@@ -82,23 +82,23 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
84
|
/* @__PURE__ */ e(
|
|
85
|
-
|
|
85
|
+
j,
|
|
86
86
|
{
|
|
87
87
|
className: x,
|
|
88
|
-
activeClassName:
|
|
88
|
+
activeClassName: w,
|
|
89
89
|
children: o + 1
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
92
|
/* @__PURE__ */ e(
|
|
93
|
-
|
|
93
|
+
_,
|
|
94
94
|
{
|
|
95
95
|
width: "auto",
|
|
96
96
|
size: "sm",
|
|
97
97
|
color: "neutral",
|
|
98
|
-
iconRight: /* @__PURE__ */ e(
|
|
98
|
+
iconRight: /* @__PURE__ */ e(M, { width: 20, height: 20 }),
|
|
99
99
|
disabled: !g,
|
|
100
100
|
onClick: P,
|
|
101
|
-
children:
|
|
101
|
+
children: I
|
|
102
102
|
}
|
|
103
103
|
)
|
|
104
104
|
]
|
|
@@ -106,14 +106,14 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
106
106
|
) : /* @__PURE__ */ v(
|
|
107
107
|
r,
|
|
108
108
|
{
|
|
109
|
-
ref:
|
|
109
|
+
ref: S,
|
|
110
110
|
flex: 1,
|
|
111
111
|
row: !0,
|
|
112
112
|
overflow: "hidden",
|
|
113
113
|
gap: b.sm,
|
|
114
114
|
children: [
|
|
115
115
|
/* @__PURE__ */ e(
|
|
116
|
-
|
|
116
|
+
B,
|
|
117
117
|
{
|
|
118
118
|
onClick: N,
|
|
119
119
|
disabled: !f,
|
|
@@ -122,34 +122,34 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
122
122
|
children: /* @__PURE__ */ e(z, {})
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
/* @__PURE__ */ e(r, { row: !0, gap: b.sm, children:
|
|
126
|
-
|
|
125
|
+
/* @__PURE__ */ e(r, { row: !0, gap: b.sm, children: q.map((t) => /* @__PURE__ */ e(
|
|
126
|
+
j,
|
|
127
127
|
{
|
|
128
128
|
isDots: t === "start-dots" || t === "end-dots",
|
|
129
129
|
isCurrentPage: t === o + 1,
|
|
130
130
|
disabled: t === "start-dots" || t === "end-dots",
|
|
131
131
|
onClick: () => s(t - 1),
|
|
132
132
|
className: x,
|
|
133
|
-
activeClassName:
|
|
133
|
+
activeClassName: w,
|
|
134
134
|
children: t
|
|
135
135
|
},
|
|
136
136
|
t
|
|
137
137
|
)) }),
|
|
138
138
|
/* @__PURE__ */ e(
|
|
139
|
-
|
|
139
|
+
B,
|
|
140
140
|
{
|
|
141
141
|
color: "neutral",
|
|
142
142
|
size: "sm",
|
|
143
143
|
onClick: P,
|
|
144
144
|
disabled: !g,
|
|
145
|
-
children: /* @__PURE__ */ e(
|
|
145
|
+
children: /* @__PURE__ */ e(M, {})
|
|
146
146
|
}
|
|
147
147
|
)
|
|
148
148
|
]
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
h && /* @__PURE__ */ e(r, { alignItems: "flex-end", className:
|
|
152
|
-
|
|
151
|
+
h && /* @__PURE__ */ e(r, { alignItems: "flex-end", className: D, children: /* @__PURE__ */ e(
|
|
152
|
+
X,
|
|
153
153
|
{
|
|
154
154
|
width: "fit-content",
|
|
155
155
|
value: n.toString(),
|
|
@@ -159,13 +159,13 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
159
159
|
label: t.toString()
|
|
160
160
|
})),
|
|
161
161
|
returnedValue: (t) => t.value,
|
|
162
|
-
renderDropdownItem:
|
|
163
|
-
renderSingleInputItem:
|
|
164
|
-
onChange: (t) =>
|
|
162
|
+
renderDropdownItem: L,
|
|
163
|
+
renderSingleInputItem: T,
|
|
164
|
+
onChange: (t) => A(t)
|
|
165
165
|
}
|
|
166
166
|
) })
|
|
167
167
|
] });
|
|
168
|
-
},
|
|
168
|
+
}, j = ({
|
|
169
169
|
children: o,
|
|
170
170
|
isCurrentPage: n = !1,
|
|
171
171
|
onClick: a,
|
|
@@ -182,9 +182,9 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
182
182
|
display: "flex",
|
|
183
183
|
alignItems: "center",
|
|
184
184
|
justifyContent: "center",
|
|
185
|
-
backgroundColor: n ? i.fill.
|
|
185
|
+
backgroundColor: n ? i.fill.accent_secondary : i.fill.bg_secondary,
|
|
186
186
|
borderRadius: tt.sm,
|
|
187
|
-
border: n ? `1px solid ${i.fill.
|
|
187
|
+
border: n ? `1px solid ${i.fill.accent_secondary_hover}` : `1px solid ${i.border.neutral_alpha_basic}`
|
|
188
188
|
}), h = R({
|
|
189
189
|
width: "24px",
|
|
190
190
|
height: "24px",
|
|
@@ -199,7 +199,7 @@ const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
|
199
199
|
n && d
|
|
200
200
|
),
|
|
201
201
|
onClick: c ? void 0 : a,
|
|
202
|
-
children: s ? /* @__PURE__ */ e(
|
|
202
|
+
children: s ? /* @__PURE__ */ e(Q, { className: h }) : /* @__PURE__ */ e(Z, { center: !0, variant: "body-2", fontWeight: "medium", children: o })
|
|
203
203
|
}
|
|
204
204
|
);
|
|
205
205
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { css as n, cx as f } from "@emotion/css";
|
|
3
|
-
import { memo as k, useState as d, useRef as x, useCallback as E, useEffect as
|
|
4
|
-
import { theme as
|
|
5
|
-
import { Box as
|
|
6
|
-
const { color: o, cornerRadius:
|
|
3
|
+
import { memo as k, useState as d, useRef as x, useCallback as E, useEffect as L } from "react";
|
|
4
|
+
import { theme as W } from "../../../../utils/theme/index.js";
|
|
5
|
+
import { Box as p } from "../../Box/Box.js";
|
|
6
|
+
const { color: o, cornerRadius: $ } = W, C = n({
|
|
7
7
|
position: "relative",
|
|
8
|
-
borderRadius:
|
|
8
|
+
borderRadius: $.md,
|
|
9
9
|
overflow: "hidden",
|
|
10
10
|
"&::before, &::after": {
|
|
11
11
|
content: '""',
|
|
@@ -18,21 +18,21 @@ const { color: o, cornerRadius: C } = $, P = n({
|
|
|
18
18
|
},
|
|
19
19
|
"&::before": {
|
|
20
20
|
left: 0,
|
|
21
|
-
background: `linear-gradient(to left, transparent 0%, ${o.fill.
|
|
21
|
+
background: `linear-gradient(to left, transparent 0%, ${o.fill.bg_primary} 100%)`
|
|
22
22
|
},
|
|
23
23
|
"&::after": {
|
|
24
24
|
right: 0,
|
|
25
|
-
background: `linear-gradient(to right, transparent 0%, ${o.fill.
|
|
25
|
+
background: `linear-gradient(to right, transparent 0%, ${o.fill.bg_primary} 100%)`
|
|
26
26
|
}
|
|
27
27
|
}), N = n({
|
|
28
28
|
overflowX: "auto",
|
|
29
29
|
scrollbarWidth: "thin",
|
|
30
|
-
scrollbarColor: `${o.scrollbar.
|
|
30
|
+
scrollbarColor: `${o.scrollbar.thumb_primary} ${o.scrollbar.track_primary}`
|
|
31
31
|
}), T = k(
|
|
32
32
|
({
|
|
33
|
-
data:
|
|
34
|
-
children:
|
|
35
|
-
className:
|
|
33
|
+
data: m,
|
|
34
|
+
children: b,
|
|
35
|
+
className: h,
|
|
36
36
|
scrollContainerClassName: u,
|
|
37
37
|
showBorders: w = !1,
|
|
38
38
|
...y
|
|
@@ -45,7 +45,7 @@ const { color: o, cornerRadius: C } = $, P = n({
|
|
|
45
45
|
i && t < a - l - 1
|
|
46
46
|
);
|
|
47
47
|
}, []);
|
|
48
|
-
|
|
48
|
+
L(() => {
|
|
49
49
|
const r = s.current;
|
|
50
50
|
if (!r) return;
|
|
51
51
|
e();
|
|
@@ -53,9 +53,9 @@ const { color: o, cornerRadius: C } = $, P = n({
|
|
|
53
53
|
return t.observe(r), r.addEventListener("scroll", e), () => {
|
|
54
54
|
t.disconnect(), r.removeEventListener("scroll", e);
|
|
55
55
|
};
|
|
56
|
-
}, [e,
|
|
57
|
-
const
|
|
58
|
-
border: w ? `1px solid ${o.border.
|
|
56
|
+
}, [e, m]);
|
|
57
|
+
const _ = n({
|
|
58
|
+
border: w ? `1px solid ${o.border.neutral_alpha_low}` : "transparent",
|
|
59
59
|
"&::before": {
|
|
60
60
|
opacity: S ? 1 : 0
|
|
61
61
|
},
|
|
@@ -64,16 +64,16 @@ const { color: o, cornerRadius: C } = $, P = n({
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
return /* @__PURE__ */ c(
|
|
67
|
-
|
|
67
|
+
p,
|
|
68
68
|
{
|
|
69
|
-
className: f(
|
|
69
|
+
className: f(C, _, h),
|
|
70
70
|
...y,
|
|
71
71
|
children: /* @__PURE__ */ c(
|
|
72
|
-
|
|
72
|
+
p,
|
|
73
73
|
{
|
|
74
74
|
ref: s,
|
|
75
75
|
className: f(N, u),
|
|
76
|
-
children:
|
|
76
|
+
children: b
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { theme as l } from "../../../utils/theme/index.js";
|
|
2
|
-
const { color: i } = l,
|
|
2
|
+
const { color: i } = l, r = {
|
|
3
3
|
chart: {
|
|
4
4
|
type: "areaspline",
|
|
5
5
|
backgroundColor: "transparent",
|
|
@@ -34,44 +34,44 @@ const { color: i } = l, e = {
|
|
|
34
34
|
credits: {
|
|
35
35
|
enabled: !1
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, e = {
|
|
38
38
|
positive: {
|
|
39
|
-
color: i.fill.
|
|
39
|
+
color: i.fill.positive_primary,
|
|
40
40
|
fillColor: {
|
|
41
41
|
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
|
42
42
|
stops: [
|
|
43
|
-
[0, i.fill.
|
|
44
|
-
[1, i.fill.
|
|
43
|
+
[0, i.fill.positive_tint_high],
|
|
44
|
+
[1, i.fill.positive_transparent]
|
|
45
45
|
]
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
negative: {
|
|
49
|
-
color: i.fill.
|
|
49
|
+
color: i.fill.negative_primary,
|
|
50
50
|
fillColor: {
|
|
51
51
|
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
|
52
52
|
stops: [
|
|
53
|
-
[0, i.fill.
|
|
54
|
-
[1, i.fill.
|
|
53
|
+
[0, i.fill.negative_tint_high],
|
|
54
|
+
[1, i.fill.negative_transparent]
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
accent: {
|
|
59
|
-
color: i.fill.
|
|
59
|
+
color: i.fill.accent_primary,
|
|
60
60
|
fillColor: {
|
|
61
61
|
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
|
62
62
|
stops: [
|
|
63
|
-
[0, i.fill.
|
|
64
|
-
[1, i.fill.
|
|
63
|
+
[0, i.fill.accent_tint_high],
|
|
64
|
+
[1, i.fill.accent_transparent]
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
warning: {
|
|
69
|
-
color: i.fill.
|
|
69
|
+
color: i.fill.warning_primary,
|
|
70
70
|
fillColor: {
|
|
71
71
|
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
|
72
72
|
stops: [
|
|
73
|
-
[0, i.fill.
|
|
74
|
-
[1, i.fill.
|
|
73
|
+
[0, i.fill.warning_tint_high],
|
|
74
|
+
[1, i.fill.warning_transparent]
|
|
75
75
|
]
|
|
76
76
|
}
|
|
77
77
|
},
|
|
@@ -87,6 +87,6 @@ const { color: i } = l, e = {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
e as lineChartColorPreset,
|
|
91
|
+
r as lineChartPreset
|
|
92
92
|
};
|
|
@@ -38,12 +38,12 @@ const { color: r } = n, f = (e, s, t, a, i) => ({
|
|
|
38
38
|
alignByTranslate: !0
|
|
39
39
|
},
|
|
40
40
|
shadow: {
|
|
41
|
-
color: r.effect.
|
|
41
|
+
color: r.effect.shadow_m,
|
|
42
42
|
offsetX: 0,
|
|
43
43
|
offsetY: 0
|
|
44
44
|
},
|
|
45
45
|
borderRadius: 8,
|
|
46
|
-
backgroundColor: r.fill.
|
|
46
|
+
backgroundColor: r.fill.bg_primary,
|
|
47
47
|
useHTML: !0,
|
|
48
48
|
...e
|
|
49
49
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { theme as i } from "../../../utils/theme/index.js";
|
|
2
|
-
const { color: e } = i,
|
|
2
|
+
const { color: e } = i, l = {
|
|
3
3
|
chart: {
|
|
4
4
|
type: "pie",
|
|
5
5
|
backgroundColor: "transparent",
|
|
@@ -53,30 +53,36 @@ const { color: e } = i, r = {
|
|
|
53
53
|
credits: {
|
|
54
54
|
enabled: !1
|
|
55
55
|
}
|
|
56
|
-
},
|
|
56
|
+
}, r = {
|
|
57
57
|
positive: {
|
|
58
58
|
colors: [
|
|
59
|
-
e.fill.
|
|
60
|
-
e.fill.
|
|
59
|
+
e.fill.positive_primary,
|
|
60
|
+
e.fill.positive_tint_high
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
negative: {
|
|
64
64
|
colors: [
|
|
65
|
-
e.fill.
|
|
66
|
-
e.fill.
|
|
65
|
+
e.fill.negative_primary,
|
|
66
|
+
e.fill.negative_tint_high
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
accent: {
|
|
70
|
-
colors: [
|
|
70
|
+
colors: [
|
|
71
|
+
e.fill.accent_primary,
|
|
72
|
+
e.fill.accent_tint_high
|
|
73
|
+
]
|
|
71
74
|
},
|
|
72
75
|
warning: {
|
|
73
|
-
colors: [
|
|
76
|
+
colors: [
|
|
77
|
+
e.fill.warning_primary,
|
|
78
|
+
e.fill.warning_tint_high
|
|
79
|
+
]
|
|
74
80
|
},
|
|
75
81
|
transfer: {
|
|
76
82
|
colors: ["var(--fill-transfer-primary)", "var(--fill-transfer-tint-high)"]
|
|
77
83
|
}
|
|
78
84
|
};
|
|
79
85
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
r as pieProgressChartColorPreset,
|
|
87
|
+
l as pieProgressChartPreset
|
|
82
88
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cx as
|
|
1
|
+
import { jsx as o, jsxs as b, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { cx as _, css as k } from "@emotion/css";
|
|
3
3
|
import { motion as q } from "framer-motion";
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { cornerRadiusValues as
|
|
4
|
+
import { useMemo as n } from "react";
|
|
5
|
+
import { cornerRadiusValues as m, baseButton as D, getVariantStyles as E, typeStyles as G, sizeValues as H } from "./styles.js";
|
|
6
6
|
import { Loader as I } from "../../builders/Loader/Loader.js";
|
|
7
7
|
import { AnimatedText as J } from "../../builders/Text/Text.js";
|
|
8
8
|
import { theme as K } from "../../../utils/theme/index.js";
|
|
9
9
|
import { Box as P } from "../../builders/Box/Box.js";
|
|
10
10
|
import { Ripple as Q } from "../../builders/Ripple/Ripple.js";
|
|
11
|
-
const { color:
|
|
12
|
-
disabled:
|
|
11
|
+
const { color: u } = K, sr = ({
|
|
12
|
+
disabled: a,
|
|
13
13
|
loading: l,
|
|
14
|
-
className:
|
|
15
|
-
wrapperClassName:
|
|
16
|
-
buttonClassName:
|
|
17
|
-
buttonDisabledClassName:
|
|
18
|
-
textClassName:
|
|
14
|
+
className: w,
|
|
15
|
+
wrapperClassName: g,
|
|
16
|
+
buttonClassName: $,
|
|
17
|
+
buttonDisabledClassName: N,
|
|
18
|
+
textClassName: S,
|
|
19
19
|
children: v,
|
|
20
|
-
variant:
|
|
20
|
+
variant: e = "filled",
|
|
21
21
|
backgroundColor: f,
|
|
22
22
|
textColor: d,
|
|
23
23
|
textFontWeight: U,
|
|
24
|
-
borderColor:
|
|
25
|
-
color:
|
|
24
|
+
borderColor: i,
|
|
25
|
+
color: r = "accent",
|
|
26
26
|
opacity: p,
|
|
27
27
|
borderRadius: x,
|
|
28
|
-
width:
|
|
28
|
+
width: c = "auto",
|
|
29
29
|
size: s = "md",
|
|
30
30
|
iconLeft: B,
|
|
31
31
|
iconRight: R,
|
|
@@ -34,55 +34,58 @@ const { color: m } = K, ue = ({
|
|
|
34
34
|
type: V = "button",
|
|
35
35
|
...j
|
|
36
36
|
}) => {
|
|
37
|
-
const h =
|
|
38
|
-
switch (
|
|
37
|
+
const h = n(() => {
|
|
38
|
+
switch (c) {
|
|
39
39
|
case "full":
|
|
40
40
|
return "100%";
|
|
41
41
|
case "auto":
|
|
42
42
|
return "fit-content";
|
|
43
43
|
default:
|
|
44
|
-
return
|
|
44
|
+
return c;
|
|
45
45
|
}
|
|
46
|
-
}, [
|
|
46
|
+
}, [c]), F = n(() => f || (e === "filled" ? r === "neutral" ? u.fill.neutral_secondary : r === "neutral-primary" ? u.fill.neutral_primary : `var(--fill-${r}-${t})` : "transparent"), [e, f, r, t]), W = n(() => {
|
|
47
47
|
if (t === "primary") {
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
|
|
48
|
+
if (r === "neutral" || r === "neutral-primary")
|
|
49
|
+
return u.text.secondary;
|
|
50
|
+
if (e === "filled") return u.text.inverse;
|
|
51
|
+
} else if (r === "neutral") return u.text.secondary;
|
|
52
|
+
return `var(--text-${r})`;
|
|
53
|
+
}, [t, r, e]), y = n(() => {
|
|
53
54
|
if (t === "primary") {
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
if (r === "neutral" || r === "neutral-primary")
|
|
56
|
+
return "secondary";
|
|
57
|
+
if (e === "filled") return "inverse";
|
|
58
|
+
} else if (r === "neutral" || r === "neutral-primary")
|
|
59
|
+
return "secondary";
|
|
60
|
+
return r;
|
|
61
|
+
}, [e, r, t]), A = n(() => i || (e === "outline" ? r === "neutral-primary" ? u.border.neutral_alpha_basic : `var(--border-${r}-${t})` : "transparent"), [e, i, r, t]), C = n(() => {
|
|
59
62
|
switch (s) {
|
|
60
63
|
case "lg":
|
|
61
|
-
return
|
|
64
|
+
return m.lg;
|
|
62
65
|
case "md":
|
|
63
66
|
case "sm":
|
|
64
|
-
return
|
|
67
|
+
return m.md;
|
|
65
68
|
case "xs":
|
|
66
|
-
return
|
|
69
|
+
return m.sm;
|
|
67
70
|
default:
|
|
68
|
-
return
|
|
71
|
+
return m.md;
|
|
69
72
|
}
|
|
70
|
-
}, [s]), L =
|
|
73
|
+
}, [s]), L = _(
|
|
71
74
|
D,
|
|
72
|
-
E(
|
|
73
|
-
G[
|
|
74
|
-
|
|
75
|
+
E(e, r, t, a),
|
|
76
|
+
G[e],
|
|
77
|
+
a ? N : void 0,
|
|
75
78
|
k({
|
|
76
|
-
borderRadius: x ?
|
|
79
|
+
borderRadius: x ? m[x] : C,
|
|
77
80
|
backgroundColor: F,
|
|
78
81
|
borderColor: A,
|
|
79
|
-
color: d ?? `var(--text-${
|
|
82
|
+
color: d ?? `var(--text-${y})`,
|
|
80
83
|
width: h,
|
|
81
84
|
height: H[s],
|
|
82
|
-
opacity: p || (
|
|
85
|
+
opacity: p || (a ? 0.7 : 1)
|
|
83
86
|
}),
|
|
84
|
-
|
|
85
|
-
), M =
|
|
87
|
+
$
|
|
88
|
+
), M = n(() => {
|
|
86
89
|
switch (s) {
|
|
87
90
|
case "lg":
|
|
88
91
|
case "md":
|
|
@@ -94,36 +97,36 @@ const { color: m } = K, ue = ({
|
|
|
94
97
|
return "body-1";
|
|
95
98
|
}
|
|
96
99
|
}, [s]);
|
|
97
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ o(
|
|
98
101
|
P,
|
|
99
102
|
{
|
|
100
|
-
className:
|
|
103
|
+
className: _(g, w),
|
|
101
104
|
w: h,
|
|
102
105
|
flex: T,
|
|
103
106
|
relative: !0,
|
|
104
107
|
overflow: "hidden",
|
|
105
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ b(
|
|
106
109
|
q.button,
|
|
107
110
|
{
|
|
108
111
|
...j,
|
|
109
|
-
whileTap: !
|
|
112
|
+
whileTap: !a && !l ? {
|
|
110
113
|
scale: 0.99,
|
|
111
114
|
boxShadow: "inset 0 0 0 10000px rgba(0,0,0,0.1)",
|
|
112
115
|
transition: { duration: 0 }
|
|
113
116
|
} : {},
|
|
114
|
-
disabled:
|
|
117
|
+
disabled: a || l,
|
|
115
118
|
className: L,
|
|
116
119
|
type: V,
|
|
117
120
|
children: [
|
|
118
|
-
l ? /* @__PURE__ */
|
|
121
|
+
l ? /* @__PURE__ */ o(I, { color: W }) : /* @__PURE__ */ b(O, { children: [
|
|
119
122
|
B,
|
|
120
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ o(
|
|
121
124
|
J,
|
|
122
125
|
{
|
|
123
126
|
style: { color: d },
|
|
124
|
-
colorName:
|
|
127
|
+
colorName: y,
|
|
125
128
|
variant: M,
|
|
126
|
-
className:
|
|
129
|
+
className: S,
|
|
127
130
|
textOverflow: "ellipsis",
|
|
128
131
|
overflow: "hidden",
|
|
129
132
|
children: v
|
|
@@ -131,7 +134,7 @@ const { color: m } = K, ue = ({
|
|
|
131
134
|
),
|
|
132
135
|
R
|
|
133
136
|
] }),
|
|
134
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ o(Q, {})
|
|
135
138
|
]
|
|
136
139
|
}
|
|
137
140
|
)
|
|
@@ -139,5 +142,5 @@ const { color: m } = K, ue = ({
|
|
|
139
142
|
);
|
|
140
143
|
};
|
|
141
144
|
export {
|
|
142
|
-
|
|
145
|
+
sr as Button
|
|
143
146
|
};
|
|
@@ -38,15 +38,15 @@ const { color: t, cornerRadius: r, height: n, transition: i } = d, v = o({
|
|
|
38
38
|
border: "none"
|
|
39
39
|
}),
|
|
40
40
|
filled: o({
|
|
41
|
-
backgroundColor: t.fill.
|
|
41
|
+
backgroundColor: t.fill.accent_primary,
|
|
42
42
|
color: "white",
|
|
43
43
|
border: "none"
|
|
44
44
|
}),
|
|
45
45
|
outline: o({
|
|
46
46
|
backgroundColor: "transparent",
|
|
47
|
-
border: `1px solid ${t.border.
|
|
47
|
+
border: `1px solid ${t.border.accent_primary}`
|
|
48
48
|
})
|
|
49
|
-
},
|
|
49
|
+
}, p = (s, e, l, c) => {
|
|
50
50
|
if (c)
|
|
51
51
|
return o({
|
|
52
52
|
cursor: "not-allowed",
|
|
@@ -100,7 +100,7 @@ const { color: t, cornerRadius: r, height: n, transition: i } = d, v = o({
|
|
|
100
100
|
export {
|
|
101
101
|
v as baseButton,
|
|
102
102
|
x as cornerRadiusValues,
|
|
103
|
-
|
|
103
|
+
p as getVariantStyles,
|
|
104
104
|
f as sizeValues,
|
|
105
105
|
b as typeStyles
|
|
106
106
|
};
|