@dss-kit/ui-kit 0.3.10 → 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 +35 -35
- package/dist/components/controls/Button/styles.js +4 -4
- 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 +32 -32
- 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.js +48 -48
- 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.js +40 -40
- package/dist/components/shared/Hint/styles.js +6 -6
- package/dist/components/shared/MarkdownText/MarkdownText.js +10 -10
- 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
|
@@ -5,32 +5,32 @@ import { theme as b } from "../../../utils/theme/index.js";
|
|
|
5
5
|
import { Box as h } from "../../builders/Box/Box.js";
|
|
6
6
|
const { color: i, cornerRadius: o, height: t, transition: d } = b, S = {
|
|
7
7
|
primary: {
|
|
8
|
-
bg: i.fill.
|
|
8
|
+
bg: i.fill.accent_tint,
|
|
9
9
|
text: i.text.accent,
|
|
10
10
|
icon: i.icon.accent
|
|
11
11
|
},
|
|
12
12
|
secondary: {
|
|
13
|
-
bg: i.fill.
|
|
13
|
+
bg: i.fill.neutral_tint,
|
|
14
14
|
text: i.text.secondary,
|
|
15
15
|
icon: i.icon.tertiary
|
|
16
16
|
},
|
|
17
17
|
negative: {
|
|
18
|
-
bg: i.fill.
|
|
18
|
+
bg: i.fill.negative_tint,
|
|
19
19
|
text: i.text.negative,
|
|
20
20
|
icon: i.icon.negative
|
|
21
21
|
},
|
|
22
22
|
positive: {
|
|
23
|
-
bg: i.fill.
|
|
23
|
+
bg: i.fill.positive_tint,
|
|
24
24
|
text: i.text.positive,
|
|
25
25
|
icon: i.icon.positive
|
|
26
26
|
},
|
|
27
27
|
warning: {
|
|
28
|
-
bg: i.fill.
|
|
28
|
+
bg: i.fill.warning_tint,
|
|
29
29
|
text: i.text.warning,
|
|
30
30
|
icon: i.icon.warning
|
|
31
31
|
},
|
|
32
32
|
neutral: {
|
|
33
|
-
bg: i.fill.
|
|
33
|
+
bg: i.fill.neutral_tint,
|
|
34
34
|
text: i.text.tertiary,
|
|
35
35
|
icon: i.icon.tertiary
|
|
36
36
|
},
|
|
@@ -40,7 +40,7 @@ const { color: i, cornerRadius: o, height: t, transition: d } = b, S = {
|
|
|
40
40
|
icon: "var(--icon-transfer)"
|
|
41
41
|
},
|
|
42
42
|
custom: {
|
|
43
|
-
bg: i.fill.
|
|
43
|
+
bg: i.fill.accent_tint,
|
|
44
44
|
text: i.text.accent,
|
|
45
45
|
icon: i.icon.accent
|
|
46
46
|
}
|
|
@@ -126,7 +126,7 @@ const { color: i, cornerRadius: o, height: t, transition: d } = b, S = {
|
|
|
126
126
|
},
|
|
127
127
|
"&:has(img)": {
|
|
128
128
|
backgroundColor: "transparent",
|
|
129
|
-
border: `1px solid ${i.border.
|
|
129
|
+
border: `1px solid ${i.border.neutral_alpha_low}`
|
|
130
130
|
}
|
|
131
131
|
}), [n, e, c]);
|
|
132
132
|
return /* @__PURE__ */ v(
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as B, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { cx as y, css as x } from "@emotion/css";
|
|
3
|
-
import
|
|
4
|
-
import { Box as
|
|
5
|
-
import { theme as
|
|
6
|
-
import { Ripple as
|
|
3
|
+
import $ from "../../../assets/svg/shared/close-outline.svg.js";
|
|
4
|
+
import { Box as j } from "../../builders/Box/Box.js";
|
|
5
|
+
import { theme as R } from "../../../utils/theme/index.js";
|
|
6
|
+
import { Ripple as S } from "../../builders/Ripple/Ripple.js";
|
|
7
7
|
import { Text as h } from "../../builders/Text/Text.js";
|
|
8
|
-
const { color: e, cornerRadius:
|
|
8
|
+
const { color: e, cornerRadius: i, spacing: a } = R, b = {
|
|
9
9
|
neutral: {
|
|
10
|
-
border: e.border.
|
|
11
|
-
bg: e.status.
|
|
10
|
+
border: e.border.neutral_alpha_low,
|
|
11
|
+
bg: e.status.neutral_tint,
|
|
12
12
|
color: e.text.secondary,
|
|
13
13
|
colorName: "secondary"
|
|
14
14
|
},
|
|
15
15
|
accent: {
|
|
16
|
-
border: e.border.
|
|
17
|
-
bg: e.status.
|
|
16
|
+
border: e.border.accent_secondary,
|
|
17
|
+
bg: e.status.accent_tint_low,
|
|
18
18
|
color: e.text.accent,
|
|
19
19
|
colorName: "accent"
|
|
20
20
|
},
|
|
21
21
|
warning: {
|
|
22
|
-
border: e.border.
|
|
23
|
-
bg: e.status.
|
|
22
|
+
border: e.border.warning_secondary,
|
|
23
|
+
bg: e.status.warning_tint_low,
|
|
24
24
|
color: e.text.warning,
|
|
25
25
|
colorName: "warning"
|
|
26
26
|
},
|
|
27
27
|
positive: {
|
|
28
|
-
border: e.border.
|
|
29
|
-
bg: e.status.
|
|
28
|
+
border: e.border.positive_secondary,
|
|
29
|
+
bg: e.status.positive_tint_low,
|
|
30
30
|
color: e.text.positive,
|
|
31
31
|
colorName: "positive"
|
|
32
32
|
},
|
|
33
33
|
negative: {
|
|
34
|
-
border: e.border.
|
|
35
|
-
bg: e.status.
|
|
34
|
+
border: e.border.negative_secondary,
|
|
35
|
+
bg: e.status.negative_tint_low,
|
|
36
36
|
color: e.text.negative,
|
|
37
37
|
colorName: "negative"
|
|
38
38
|
},
|
|
@@ -46,35 +46,35 @@ const { color: e, cornerRadius: l, spacing: a } = $, b = {
|
|
|
46
46
|
xs: {
|
|
47
47
|
h: 18,
|
|
48
48
|
text: "caption-2",
|
|
49
|
-
corner:
|
|
49
|
+
corner: i.xs,
|
|
50
50
|
p: `3px ${a.xs}`,
|
|
51
51
|
gap: "2px"
|
|
52
52
|
},
|
|
53
53
|
sm: {
|
|
54
54
|
h: 24,
|
|
55
55
|
text: "caption-1",
|
|
56
|
-
corner:
|
|
56
|
+
corner: i.xs,
|
|
57
57
|
p: `6px ${a.sm}`,
|
|
58
58
|
gap: a.sm
|
|
59
59
|
},
|
|
60
60
|
md: {
|
|
61
61
|
h: 32,
|
|
62
62
|
text: "body-2",
|
|
63
|
-
corner:
|
|
63
|
+
corner: i.sm,
|
|
64
64
|
p: `6px ${a.md}`,
|
|
65
65
|
gap: a.sm
|
|
66
66
|
},
|
|
67
67
|
lg: {
|
|
68
68
|
h: 40,
|
|
69
69
|
text: "body-2",
|
|
70
|
-
corner:
|
|
70
|
+
corner: i.md,
|
|
71
71
|
p: `6px ${a.lg}`,
|
|
72
72
|
gap: a.sm
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, I = (d, s, o, m) => {
|
|
75
75
|
const t = b[s];
|
|
76
76
|
let r = t.bg, c = "none";
|
|
77
|
-
const
|
|
77
|
+
const l = t.color;
|
|
78
78
|
switch (d) {
|
|
79
79
|
case "outline":
|
|
80
80
|
r = "transparent", c = `1px solid ${t.border}`;
|
|
@@ -93,10 +93,10 @@ const { color: e, cornerRadius: l, spacing: a } = $, b = {
|
|
|
93
93
|
position: "relative",
|
|
94
94
|
transition: "background-color 0.2s, opacity 0.2s",
|
|
95
95
|
backgroundColor: r,
|
|
96
|
-
color:
|
|
96
|
+
color: l,
|
|
97
97
|
border: c
|
|
98
98
|
});
|
|
99
|
-
},
|
|
99
|
+
}, O = x({
|
|
100
100
|
display: "inline-flex",
|
|
101
101
|
cursor: "pointer",
|
|
102
102
|
opacity: 0.6,
|
|
@@ -105,7 +105,7 @@ const { color: e, cornerRadius: l, spacing: a } = $, b = {
|
|
|
105
105
|
display: "inline-flex",
|
|
106
106
|
alignItems: "center",
|
|
107
107
|
color: "inherit"
|
|
108
|
-
}),
|
|
108
|
+
}), T = ({
|
|
109
109
|
label: d,
|
|
110
110
|
color: s = "neutral",
|
|
111
111
|
size: o = "md",
|
|
@@ -113,30 +113,30 @@ const { color: e, cornerRadius: l, spacing: a } = $, b = {
|
|
|
113
113
|
width: t,
|
|
114
114
|
textAlign: r = "center",
|
|
115
115
|
leftElement: c,
|
|
116
|
-
rightElement:
|
|
116
|
+
rightElement: l,
|
|
117
117
|
disabled: u,
|
|
118
118
|
onClick: g,
|
|
119
119
|
onDelete: f,
|
|
120
120
|
className: N,
|
|
121
|
-
labelClassName:
|
|
122
|
-
deleteButtonClassName:
|
|
121
|
+
labelClassName: _,
|
|
122
|
+
deleteButtonClassName: C
|
|
123
123
|
}) => {
|
|
124
|
-
const
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
|
|
124
|
+
const k = I(m, s, u, g);
|
|
125
|
+
return /* @__PURE__ */ B(
|
|
126
|
+
j,
|
|
127
127
|
{
|
|
128
128
|
row: !0,
|
|
129
129
|
alignItems: "center",
|
|
130
130
|
justifyContent: "center",
|
|
131
131
|
p: p[o].p,
|
|
132
|
-
|
|
132
|
+
minHeight: p[o].h,
|
|
133
133
|
w: t,
|
|
134
134
|
overflow: "hidden",
|
|
135
135
|
borderRadius: p[o].corner,
|
|
136
136
|
onClick: g,
|
|
137
|
-
className: y(
|
|
137
|
+
className: y(k, N),
|
|
138
138
|
children: [
|
|
139
|
-
g && /* @__PURE__ */ n(
|
|
139
|
+
g && /* @__PURE__ */ n(S, {}),
|
|
140
140
|
c && /* @__PURE__ */ n("span", { className: w, children: c }),
|
|
141
141
|
/* @__PURE__ */ n(
|
|
142
142
|
h,
|
|
@@ -148,27 +148,27 @@ const { color: e, cornerRadius: l, spacing: a } = $, b = {
|
|
|
148
148
|
center: r === "center",
|
|
149
149
|
right: r === "right",
|
|
150
150
|
flex: t ? 1 : void 0,
|
|
151
|
-
className:
|
|
151
|
+
className: _,
|
|
152
152
|
children: d
|
|
153
153
|
}
|
|
154
154
|
),
|
|
155
|
-
|
|
155
|
+
l && /* @__PURE__ */ n("span", { className: w, children: l }),
|
|
156
156
|
f && !u && /* @__PURE__ */ n(
|
|
157
157
|
h,
|
|
158
158
|
{
|
|
159
|
-
className: y(
|
|
159
|
+
className: y(O, C),
|
|
160
160
|
colorName: b[s].colorName,
|
|
161
161
|
onClick: (v) => {
|
|
162
162
|
v.stopPropagation(), f(v);
|
|
163
163
|
},
|
|
164
|
-
children: /* @__PURE__ */ n(
|
|
164
|
+
children: /* @__PURE__ */ n($, {})
|
|
165
165
|
}
|
|
166
166
|
)
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
169
|
);
|
|
170
170
|
};
|
|
171
|
-
|
|
171
|
+
T.displayName = "Badge";
|
|
172
172
|
export {
|
|
173
|
-
|
|
173
|
+
T as Badge
|
|
174
174
|
};
|
|
@@ -65,27 +65,27 @@ const { color: t, cornerRadius: o, spacing: n } = i, s = {
|
|
|
65
65
|
},
|
|
66
66
|
soft: {
|
|
67
67
|
warning: e({
|
|
68
|
-
background: t.status.
|
|
68
|
+
background: t.status.warning_tint_low,
|
|
69
69
|
color: t.text.warning
|
|
70
70
|
}),
|
|
71
71
|
negative: e({
|
|
72
|
-
background: t.status.
|
|
72
|
+
background: t.status.negative_tint_low,
|
|
73
73
|
color: t.text.negative
|
|
74
74
|
}),
|
|
75
75
|
positive: e({
|
|
76
|
-
background: t.status.
|
|
76
|
+
background: t.status.positive_tint_low,
|
|
77
77
|
color: t.text.positive
|
|
78
78
|
}),
|
|
79
79
|
accent: e({
|
|
80
|
-
background: t.status.
|
|
80
|
+
background: t.status.accent_tint_low,
|
|
81
81
|
color: t.text.accent
|
|
82
82
|
}),
|
|
83
83
|
neutral: e({
|
|
84
|
-
background: t.status.
|
|
84
|
+
background: t.status.neutral_tint_low,
|
|
85
85
|
color: t.text.tertiary
|
|
86
86
|
}),
|
|
87
87
|
transfer: e({
|
|
88
|
-
background: t.status.
|
|
88
|
+
background: t.status.transfer_tint_low,
|
|
89
89
|
color: t.text.transfer
|
|
90
90
|
})
|
|
91
91
|
}
|
|
@@ -6,11 +6,11 @@ import { ContentEditable as f } from "@lexical/react/LexicalContentEditable";
|
|
|
6
6
|
import { LexicalErrorBoundary as c } from "@lexical/react/LexicalErrorBoundary";
|
|
7
7
|
import { RichTextPlugin as p } from "@lexical/react/LexicalRichTextPlugin";
|
|
8
8
|
import { useMemo as s } from "react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { EDITOR_TRANSFORMERS as u } from "../../controls/MarkdownTextEditor/transformers/index.js";
|
|
10
|
+
import { markdownTextStyle as x } from "./MarkdownText.styles.js";
|
|
11
|
+
import { Text as w } from "../../builders/Text/Text.js";
|
|
12
|
+
import { EditorStateContext as E } from "../../controls/MarkdownTextEditor/contexts/EditorStateContext/EditorStateContext.js";
|
|
13
|
+
import { getEditorConfig as k } from "../../controls/MarkdownTextEditor/configs/editor.config.js";
|
|
14
14
|
function F({
|
|
15
15
|
markdown: t,
|
|
16
16
|
className: i,
|
|
@@ -27,15 +27,15 @@ function F({
|
|
|
27
27
|
}),
|
|
28
28
|
[r]
|
|
29
29
|
);
|
|
30
|
-
return r ? /* @__PURE__ */ o(
|
|
30
|
+
return r ? /* @__PURE__ */ o(E.Provider, { value: a, children: /* @__PURE__ */ o(
|
|
31
31
|
d,
|
|
32
32
|
{
|
|
33
33
|
initialConfig: {
|
|
34
|
-
...
|
|
34
|
+
...k(),
|
|
35
35
|
editable: !1,
|
|
36
36
|
namespace: "ui-kit-markdown-text-viewer",
|
|
37
37
|
editorState: () => {
|
|
38
|
-
l(r,
|
|
38
|
+
l(r, u);
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
children: /* @__PURE__ */ o(
|
|
@@ -44,7 +44,7 @@ function F({
|
|
|
44
44
|
contentEditable: /* @__PURE__ */ o(
|
|
45
45
|
f,
|
|
46
46
|
{
|
|
47
|
-
className: m(
|
|
47
|
+
className: m(x, i),
|
|
48
48
|
"aria-placeholder": "markdown text",
|
|
49
49
|
placeholder: () => null
|
|
50
50
|
}
|
|
@@ -56,7 +56,7 @@ function F({
|
|
|
56
56
|
},
|
|
57
57
|
r
|
|
58
58
|
) }) : typeof e == "string" ? /* @__PURE__ */ o(
|
|
59
|
-
|
|
59
|
+
w,
|
|
60
60
|
{
|
|
61
61
|
variant: "body-2",
|
|
62
62
|
colorName: "tertiary",
|
|
@@ -58,7 +58,7 @@ const { color: o, cornerRadius: n, spacing: t } = l, h = i({
|
|
|
58
58
|
code: {
|
|
59
59
|
padding: `0 ${t.xs}`,
|
|
60
60
|
borderRadius: n.xs,
|
|
61
|
-
backgroundColor: o.fill.
|
|
61
|
+
backgroundColor: o.fill.neutral_secondary,
|
|
62
62
|
fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
|
|
63
63
|
},
|
|
64
64
|
"pre code": {
|
|
@@ -69,7 +69,7 @@ const { color: o, cornerRadius: n, spacing: t } = l, h = i({
|
|
|
69
69
|
blockquote: {
|
|
70
70
|
marginLeft: 0,
|
|
71
71
|
paddingLeft: t.md,
|
|
72
|
-
borderLeft: `3px solid ${o.border.
|
|
72
|
+
borderLeft: `3px solid ${o.border.neutral_alpha_basic}`,
|
|
73
73
|
color: o.text.secondary
|
|
74
74
|
},
|
|
75
75
|
table: {
|
|
@@ -77,12 +77,12 @@ const { color: o, cornerRadius: n, spacing: t } = l, h = i({
|
|
|
77
77
|
borderCollapse: "collapse"
|
|
78
78
|
},
|
|
79
79
|
"th, td": {
|
|
80
|
-
border: `1px solid ${o.border.
|
|
80
|
+
border: `1px solid ${o.border.neutral_alpha_basic}`,
|
|
81
81
|
padding: t.sm,
|
|
82
82
|
textAlign: "left"
|
|
83
83
|
},
|
|
84
84
|
th: {
|
|
85
|
-
backgroundColor: o.fill.
|
|
85
|
+
backgroundColor: o.fill.neutral_secondary
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
export {
|
|
@@ -11,7 +11,7 @@ const { color: o, cornerRadius: p } = i, f = m`
|
|
|
11
11
|
}
|
|
12
12
|
`, d = c({
|
|
13
13
|
animation: `${f} 0.2s ease-out`,
|
|
14
|
-
boxShadow: `0 4px 20px 0 ${o.effect.
|
|
14
|
+
boxShadow: `0 4px 20px 0 ${o.effect.shadow_s}`
|
|
15
15
|
}), b = ({
|
|
16
16
|
children: r,
|
|
17
17
|
className: t,
|
|
@@ -20,7 +20,7 @@ const { color: o, cornerRadius: p } = i, f = m`
|
|
|
20
20
|
n,
|
|
21
21
|
{
|
|
22
22
|
relative: !0,
|
|
23
|
-
backgroundColor: o.fill.
|
|
23
|
+
backgroundColor: o.fill.bg_primary,
|
|
24
24
|
borderRadius: p.md,
|
|
25
25
|
className: a(d, t),
|
|
26
26
|
...e,
|
|
@@ -8,7 +8,7 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
8
8
|
md: { width: 32, height: 32 },
|
|
9
9
|
lg: { width: 40, height: 40 },
|
|
10
10
|
xl: { width: 48, height: 48 }
|
|
11
|
-
},
|
|
11
|
+
}, z = {
|
|
12
12
|
zero: e.zero,
|
|
13
13
|
xs: e.xs,
|
|
14
14
|
sm: e.sm,
|
|
@@ -23,7 +23,7 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
23
23
|
"full-round": e.fullRound,
|
|
24
24
|
circular: "50%"
|
|
25
25
|
}, w = t({
|
|
26
|
-
backgroundColor: A.status.
|
|
26
|
+
backgroundColor: A.status.neutral_tint,
|
|
27
27
|
borderRadius: e.sm,
|
|
28
28
|
position: "relative",
|
|
29
29
|
overflow: "hidden",
|
|
@@ -37,7 +37,7 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
37
37
|
background: "linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent)",
|
|
38
38
|
transform: "translateX(-100%)"
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
40
|
+
}), M = t({
|
|
41
41
|
animation: "skeleton-pulse 1.5s ease-in-out infinite",
|
|
42
42
|
"@keyframes skeleton-pulse": {
|
|
43
43
|
"0%": {
|
|
@@ -50,7 +50,7 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
50
50
|
opacity: 1
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), N = t({
|
|
54
54
|
"&::before": {
|
|
55
55
|
animation: "skeleton-wave 1.6s linear infinite"
|
|
56
56
|
},
|
|
@@ -68,7 +68,7 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
68
68
|
}), b = (r, n) => {
|
|
69
69
|
if (n !== void 0)
|
|
70
70
|
return t({
|
|
71
|
-
borderRadius:
|
|
71
|
+
borderRadius: z[n]
|
|
72
72
|
});
|
|
73
73
|
switch (r) {
|
|
74
74
|
case "circular":
|
|
@@ -87,13 +87,13 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
87
87
|
}, y = (r) => {
|
|
88
88
|
switch (r) {
|
|
89
89
|
case "pulse":
|
|
90
|
-
return z;
|
|
91
|
-
case "wave":
|
|
92
90
|
return M;
|
|
91
|
+
case "wave":
|
|
92
|
+
return N;
|
|
93
93
|
default:
|
|
94
94
|
return "";
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, T = ({
|
|
97
97
|
width: r,
|
|
98
98
|
height: n,
|
|
99
99
|
variant: s = "rectangular",
|
|
@@ -111,7 +111,7 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
111
111
|
if (!d)
|
|
112
112
|
return null;
|
|
113
113
|
const h = r || k[i].width, g = n || k[i].height;
|
|
114
|
-
return s === "text" && a > 1 ? /* @__PURE__ */ o(l, { gap: X.sm, className: u, children: Array.from({ length: a }, (
|
|
114
|
+
return s === "text" && a > 1 ? /* @__PURE__ */ o(l, { gap: X.sm, className: u, children: Array.from({ length: a }, (_, p) => /* @__PURE__ */ o(
|
|
115
115
|
l,
|
|
116
116
|
{
|
|
117
117
|
className: x(
|
|
@@ -138,7 +138,7 @@ const { color: A, cornerRadius: e, spacing: X } = S, k = {
|
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
T.displayName = "Skeleton";
|
|
142
142
|
export {
|
|
143
|
-
|
|
143
|
+
T as Skeleton
|
|
144
144
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as T, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { css as x, cx as w } from "@emotion/css";
|
|
3
3
|
import { forwardRef as j, useRef as k, useMemo as B } from "react";
|
|
4
4
|
import M from "../../../assets/svg/shared/close-outline.svg.js";
|
|
@@ -35,34 +35,34 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
35
35
|
className: v,
|
|
36
36
|
labelClassName: y,
|
|
37
37
|
avatarClassName: b,
|
|
38
|
-
iconClassName:
|
|
38
|
+
iconClassName: _,
|
|
39
39
|
deleteButtonClassName: N
|
|
40
40
|
}, a) => {
|
|
41
41
|
const R = k(null), p = B(() => {
|
|
42
42
|
switch (s) {
|
|
43
43
|
case "primary":
|
|
44
44
|
return {
|
|
45
|
-
bg: t.status.
|
|
45
|
+
bg: t.status.neutral_tint_low,
|
|
46
46
|
color: t.text.primary
|
|
47
47
|
};
|
|
48
48
|
case "accent":
|
|
49
49
|
return {
|
|
50
|
-
bg: t.status.
|
|
50
|
+
bg: t.status.accent_tint_low,
|
|
51
51
|
color: t.text.accent
|
|
52
52
|
};
|
|
53
53
|
case "warning":
|
|
54
54
|
return {
|
|
55
|
-
bg: t.status.
|
|
55
|
+
bg: t.status.warning_tint_low,
|
|
56
56
|
color: t.text.warning
|
|
57
57
|
};
|
|
58
58
|
case "positive":
|
|
59
59
|
return {
|
|
60
|
-
bg: t.status.
|
|
60
|
+
bg: t.status.positive_tint_low,
|
|
61
61
|
color: t.text.positive
|
|
62
62
|
};
|
|
63
63
|
case "negative":
|
|
64
64
|
return {
|
|
65
|
-
bg: t.status.
|
|
65
|
+
bg: t.status.negative_tint_low,
|
|
66
66
|
color: t.text.negative
|
|
67
67
|
};
|
|
68
68
|
case "transfer":
|
|
@@ -72,11 +72,11 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
72
72
|
};
|
|
73
73
|
default:
|
|
74
74
|
return {
|
|
75
|
-
bg: t.status.
|
|
75
|
+
bg: t.status.neutral_tint_low,
|
|
76
76
|
color: t.text.primary
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
}, [s]),
|
|
79
|
+
}, [s]), C = x({
|
|
80
80
|
cursor: n ? "not-allowed" : l ? "pointer" : "default",
|
|
81
81
|
opacity: n ? 0.5 : 1,
|
|
82
82
|
userSelect: "none",
|
|
@@ -85,13 +85,13 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
85
85
|
"&:hover": n ? void 0 : {
|
|
86
86
|
backgroundColor: p.bg
|
|
87
87
|
}
|
|
88
|
-
}),
|
|
88
|
+
}), $ = x({
|
|
89
89
|
display: "inline-flex",
|
|
90
90
|
cursor: "pointer",
|
|
91
91
|
opacity: 0.6,
|
|
92
92
|
"&:hover": { opacity: 1 }
|
|
93
93
|
});
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ T(
|
|
95
95
|
m,
|
|
96
96
|
{
|
|
97
97
|
ref: (r) => {
|
|
@@ -108,7 +108,7 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
108
108
|
backgroundColor: p.bg,
|
|
109
109
|
color: p.color,
|
|
110
110
|
onClick: l,
|
|
111
|
-
className: w(
|
|
111
|
+
className: w(C, v),
|
|
112
112
|
children: [
|
|
113
113
|
l && /* @__PURE__ */ o(S, {}),
|
|
114
114
|
f && /* @__PURE__ */ o(
|
|
@@ -122,7 +122,7 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
122
122
|
children: f
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
d && /* @__PURE__ */ o(m, { className:
|
|
125
|
+
d && /* @__PURE__ */ o(m, { className: _, children: d }),
|
|
126
126
|
typeof i == "string" ? /* @__PURE__ */ o(
|
|
127
127
|
h,
|
|
128
128
|
{
|
|
@@ -137,7 +137,7 @@ const { color: t, cornerRadius: I, spacing: e } = O, u = {
|
|
|
137
137
|
g && !n && /* @__PURE__ */ o(
|
|
138
138
|
h,
|
|
139
139
|
{
|
|
140
|
-
className: w(
|
|
140
|
+
className: w($, N),
|
|
141
141
|
colorName: s,
|
|
142
142
|
onClick: (r) => {
|
|
143
143
|
r.stopPropagation(), g(r);
|