@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,19 +1,19 @@
|
|
|
1
1
|
import { css as o } from "@emotion/css";
|
|
2
2
|
import { theme as e } from "../../../utils/theme/index.js";
|
|
3
3
|
const { color: r } = e, t = o({
|
|
4
|
-
border: `1px solid ${r.border.
|
|
4
|
+
border: `1px solid ${r.border.neutral_alpha_basic}`
|
|
5
5
|
}), n = o({
|
|
6
6
|
display: "flex",
|
|
7
7
|
alignItems: "center",
|
|
8
8
|
justifyContent: "center"
|
|
9
9
|
}), l = {
|
|
10
10
|
primary: o({
|
|
11
|
-
background: r.fill.
|
|
12
|
-
border: `1px solid ${r.border.
|
|
11
|
+
background: r.fill.bg_primary,
|
|
12
|
+
border: `1px solid ${r.border.neutral_alpha_basic}`
|
|
13
13
|
}),
|
|
14
14
|
secondary: o({
|
|
15
|
-
background: r.fill.
|
|
16
|
-
border: `1px solid ${r.border.
|
|
15
|
+
background: r.fill.bg_secondary,
|
|
16
|
+
border: `1px solid ${r.border.neutral_alpha_basic}`
|
|
17
17
|
}),
|
|
18
18
|
button: o({
|
|
19
19
|
cursor: "pointer",
|
|
@@ -29,7 +29,7 @@ const { color: r } = e, t = o({
|
|
|
29
29
|
overflow: "hidden",
|
|
30
30
|
background: "none",
|
|
31
31
|
[`&:hover:not(.${t})`]: {
|
|
32
|
-
background: r.fill.
|
|
32
|
+
background: r.fill.neutral_primary_hover
|
|
33
33
|
},
|
|
34
34
|
[`& .${n} svg`]: {
|
|
35
35
|
color: r.icon.tertiary
|
|
@@ -41,10 +41,10 @@ const { color: r } = e, t = o({
|
|
|
41
41
|
}),
|
|
42
42
|
"button-active": t,
|
|
43
43
|
"button-primary": o({
|
|
44
|
-
background: r.fill.
|
|
44
|
+
background: r.fill.bg_secondary
|
|
45
45
|
}),
|
|
46
46
|
"button-secondary": o({
|
|
47
|
-
background: r.fill.
|
|
47
|
+
background: r.fill.bg_primary
|
|
48
48
|
}),
|
|
49
49
|
"button-disabled": o({
|
|
50
50
|
opacity: 0.5,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css as e } from "@emotion/css";
|
|
2
2
|
import { typography as i } from "../../../styles/utils/typography.js";
|
|
3
|
-
import { theme as
|
|
4
|
-
const { color: o, cornerRadius: r } =
|
|
5
|
-
borderColor: o.border.
|
|
3
|
+
import { theme as s } from "../../../utils/theme/index.js";
|
|
4
|
+
const { color: o, cornerRadius: r } = s, n = e({
|
|
5
|
+
borderColor: o.border.negative_primary
|
|
6
6
|
}), t = e({
|
|
7
7
|
cursor: "not-allowed",
|
|
8
8
|
opacity: 0.5
|
|
@@ -17,7 +17,7 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
17
17
|
height: 20,
|
|
18
18
|
transition: "transform 0.2s ease-in"
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
20
|
+
}), a = e({
|
|
21
21
|
[`& .${l} svg`]: {
|
|
22
22
|
transform: "rotateX(180deg)"
|
|
23
23
|
}
|
|
@@ -34,21 +34,21 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
34
34
|
width: "100%"
|
|
35
35
|
}),
|
|
36
36
|
"select-input": e({
|
|
37
|
-
border: `1px solid ${o.border.
|
|
37
|
+
border: `1px solid ${o.border.neutral_alpha_basic}`,
|
|
38
38
|
borderRadius: r.md,
|
|
39
39
|
cursor: "pointer",
|
|
40
40
|
transition: "all 0.2s ease-in-out",
|
|
41
41
|
boxSizing: "border-box",
|
|
42
42
|
[`&:hover:not(.${t})`]: {
|
|
43
|
-
borderColor: o.border.
|
|
44
|
-
backgroundColor: o.fill.
|
|
43
|
+
borderColor: o.border.neutral_alpha_high,
|
|
44
|
+
backgroundColor: o.fill.neutral_primary_hover
|
|
45
45
|
},
|
|
46
46
|
[`&:focus:not(.${t})`]: {
|
|
47
47
|
outline: "none",
|
|
48
|
-
borderColor: o.border.
|
|
48
|
+
borderColor: o.border.accent_primary
|
|
49
49
|
},
|
|
50
50
|
[`&.${n}:focus`]: {
|
|
51
|
-
boxShadow: `0 0 0 3px ${o.effect.
|
|
51
|
+
boxShadow: `0 0 0 3px ${o.effect.shadow_s}`
|
|
52
52
|
}
|
|
53
53
|
}),
|
|
54
54
|
// Size variants
|
|
@@ -69,14 +69,14 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
69
69
|
}),
|
|
70
70
|
// Background variants
|
|
71
71
|
"background-primary": e({
|
|
72
|
-
backgroundColor: o.fill.
|
|
72
|
+
backgroundColor: o.fill.bg_primary
|
|
73
73
|
}),
|
|
74
74
|
"background-secondary": e({
|
|
75
|
-
backgroundColor: o.fill.
|
|
75
|
+
backgroundColor: o.fill.bg_secondary
|
|
76
76
|
}),
|
|
77
77
|
error: n,
|
|
78
78
|
disabled: t,
|
|
79
|
-
open:
|
|
79
|
+
open: a,
|
|
80
80
|
"select-value": e({
|
|
81
81
|
flex: 1,
|
|
82
82
|
color: o.text.primary,
|
|
@@ -96,9 +96,9 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
96
96
|
"select-arrow": l,
|
|
97
97
|
"select-dropdown": e({
|
|
98
98
|
marginTop: 4,
|
|
99
|
-
backgroundColor: o.fill.
|
|
99
|
+
backgroundColor: o.fill.bg_primary,
|
|
100
100
|
borderRadius: r.md,
|
|
101
|
-
boxShadow: `0 4px 20px 0 ${o.effect.
|
|
101
|
+
boxShadow: `0 4px 20px 0 ${o.effect.shadow_s}`,
|
|
102
102
|
maxHeight: 224,
|
|
103
103
|
overflow: "hidden"
|
|
104
104
|
}),
|
|
@@ -111,7 +111,7 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
111
111
|
"&::-webkit-scrollbar-thumb": {
|
|
112
112
|
background: "#c1c1c1",
|
|
113
113
|
borderRadius: 3,
|
|
114
|
-
"&:hover": { background: o.fill.
|
|
114
|
+
"&:hover": { background: o.fill.neutral_secondary }
|
|
115
115
|
}
|
|
116
116
|
}),
|
|
117
117
|
"select-menu-item": e({
|
|
@@ -122,7 +122,7 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
122
122
|
overflow: "hidden",
|
|
123
123
|
textOverflow: "ellipsis",
|
|
124
124
|
"&:hover": {
|
|
125
|
-
backgroundColor: o.fill.
|
|
125
|
+
backgroundColor: o.fill.neutral_secondary_hover
|
|
126
126
|
}
|
|
127
127
|
}),
|
|
128
128
|
"select-menu-item-first": e({
|
|
@@ -132,7 +132,7 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
132
132
|
}
|
|
133
133
|
}),
|
|
134
134
|
selected: e({
|
|
135
|
-
backgroundColor: o.fill.
|
|
135
|
+
backgroundColor: o.fill.neutral_secondary
|
|
136
136
|
}),
|
|
137
137
|
"overflow-tooltip-container": e({
|
|
138
138
|
width: "100%",
|
|
@@ -152,7 +152,7 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
152
152
|
justifyContent: "center",
|
|
153
153
|
padding: 14
|
|
154
154
|
})
|
|
155
|
-
},
|
|
155
|
+
}, h = {
|
|
156
156
|
xs: e({
|
|
157
157
|
width: 16,
|
|
158
158
|
height: 16,
|
|
@@ -166,6 +166,6 @@ const { color: o, cornerRadius: r } = a, n = e({
|
|
|
166
166
|
md: e({})
|
|
167
167
|
};
|
|
168
168
|
export {
|
|
169
|
-
|
|
169
|
+
h as selectArrowSizesStyles,
|
|
170
170
|
b as styles
|
|
171
171
|
};
|
|
@@ -39,32 +39,32 @@ const { color: i, cornerRadius: e, height: h, spacing: c, transition: r } = s, l
|
|
|
39
39
|
// Variant classes — each handles both checked and unchecked states
|
|
40
40
|
variant_accent: t({
|
|
41
41
|
"&:has(input:not(:checked))": {
|
|
42
|
-
"--switch-bg-color": i.fill.
|
|
43
|
-
"--thumb-bg-color": i.fill.
|
|
42
|
+
"--switch-bg-color": i.fill.bg_tertiary,
|
|
43
|
+
"--thumb-bg-color": i.fill.bg_primary
|
|
44
44
|
},
|
|
45
45
|
"&:has(input:checked)": {
|
|
46
|
-
"--switch-bg-color": i.fill.
|
|
47
|
-
"--thumb-bg-color": i.fill.
|
|
46
|
+
"--switch-bg-color": i.fill.accent_primary,
|
|
47
|
+
"--thumb-bg-color": i.fill.bg_primary
|
|
48
48
|
}
|
|
49
49
|
}),
|
|
50
50
|
variant_secondary: t({
|
|
51
51
|
"&:has(input:not(:checked))": {
|
|
52
|
-
"--switch-bg-color": i.fill.
|
|
53
|
-
"--thumb-bg-color": i.fill.
|
|
52
|
+
"--switch-bg-color": i.fill.bg_tertiary,
|
|
53
|
+
"--thumb-bg-color": i.fill.bg_primary
|
|
54
54
|
},
|
|
55
55
|
"&:has(input:checked)": {
|
|
56
|
-
"--switch-bg-color": i.fill.
|
|
57
|
-
"--thumb-bg-color": i.fill.
|
|
56
|
+
"--switch-bg-color": i.fill.accent_secondary,
|
|
57
|
+
"--thumb-bg-color": i.fill.accent_primary
|
|
58
58
|
}
|
|
59
59
|
}),
|
|
60
60
|
variant_theme: t({
|
|
61
61
|
"&:has(input:not(:checked))": {
|
|
62
|
-
"--switch-bg-color": i.fill.
|
|
63
|
-
"--thumb-bg-color": i.fill.
|
|
62
|
+
"--switch-bg-color": i.fill.bg_tertiary,
|
|
63
|
+
"--thumb-bg-color": i.fill.bg_primary
|
|
64
64
|
},
|
|
65
65
|
"&:has(input:checked)": {
|
|
66
|
-
"--switch-bg-color": i.fill.
|
|
67
|
-
"--thumb-bg-color": i.fill.
|
|
66
|
+
"--switch-bg-color": i.fill.bg_secondary,
|
|
67
|
+
"--thumb-bg-color": i.fill.bg_tertiary
|
|
68
68
|
}
|
|
69
69
|
}),
|
|
70
70
|
// Size classes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as y, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { cx as f, css as i } from "@emotion/css";
|
|
3
|
-
import { useState as
|
|
3
|
+
import { useState as C, useRef as I, useEffect as S } from "react";
|
|
4
4
|
import { TabItem as k } from "./TabItem/TabItem.js";
|
|
5
5
|
import { Box as d } from "../../builders/Box/Box.js";
|
|
6
|
-
import { theme as
|
|
7
|
-
const { color: m } =
|
|
8
|
-
borderBottom: `1px solid ${m.border.
|
|
6
|
+
import { theme as R } from "../../../utils/theme/index.js";
|
|
7
|
+
const { color: m } = R, _ = i({
|
|
8
|
+
borderBottom: `1px solid ${m.border.neutral_alpha_basic}`
|
|
9
9
|
}), g = ({
|
|
10
10
|
value: a,
|
|
11
11
|
onChange: n,
|
|
@@ -17,27 +17,27 @@ const { color: m } = B, R = i({
|
|
|
17
17
|
tabTextClassName: x,
|
|
18
18
|
indicatorClassName: w
|
|
19
19
|
}) => {
|
|
20
|
-
const [l, v] =
|
|
20
|
+
const [l, v] = C({
|
|
21
21
|
left: 0,
|
|
22
22
|
width: 0
|
|
23
23
|
}), o = I([]), N = (e) => (t) => {
|
|
24
24
|
o.current[e] = t;
|
|
25
25
|
};
|
|
26
26
|
S(() => {
|
|
27
|
-
const e = s.findIndex((
|
|
27
|
+
const e = s.findIndex((p) => p.value === a), t = o.current[e];
|
|
28
28
|
t && v({
|
|
29
29
|
left: t.offsetLeft,
|
|
30
30
|
width: t.offsetWidth
|
|
31
31
|
});
|
|
32
32
|
}, [a, s]);
|
|
33
33
|
const T = (e, t = !1) => () => !t && n(e);
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ y(
|
|
35
35
|
d,
|
|
36
36
|
{
|
|
37
37
|
row: !0,
|
|
38
38
|
w: r ? "full" : "auto",
|
|
39
39
|
relative: !0,
|
|
40
|
-
className: f(
|
|
40
|
+
className: f(_, b),
|
|
41
41
|
children: [
|
|
42
42
|
s.map((e, t) => /* @__PURE__ */ c(
|
|
43
43
|
k,
|
|
@@ -62,7 +62,7 @@ const { color: m } = B, R = i({
|
|
|
62
62
|
absolute: !0,
|
|
63
63
|
bottom: -1,
|
|
64
64
|
left: l.left,
|
|
65
|
-
backgroundColor: m.border.
|
|
65
|
+
backgroundColor: m.border.accent_primary,
|
|
66
66
|
className: f(
|
|
67
67
|
i({
|
|
68
68
|
transition: "left 0.2s ease, width 0.2s ease"
|
|
@@ -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(
|
|
@@ -2,7 +2,7 @@ import { FC, MouseEvent, ReactNode } from 'react';
|
|
|
2
2
|
import { AccentType, NegativeType, NeutralType, PositiveType, Size, TransferType, WarningType } from '../../../types/tokens.types';
|
|
3
3
|
export type BadgeVariant = "filled" | "outline" | "clear";
|
|
4
4
|
export type BadgeColor = NeutralType | AccentType | WarningType | PositiveType | NegativeType | TransferType;
|
|
5
|
-
export type BadgeSize = Extract<Size, "sm" | "md" | "lg">;
|
|
5
|
+
export type BadgeSize = Extract<Size, "xs" | "sm" | "md" | "lg">;
|
|
6
6
|
export type BadgeTextAlign = "left" | "center" | "right";
|
|
7
7
|
export interface BadgeProps {
|
|
8
8
|
/** Содержимое лейбла бейджа. Текст всегда центрируется по вертикали внутри бейджа. */
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as y, css as
|
|
3
|
-
import
|
|
4
|
-
import { Box as
|
|
5
|
-
import { theme as
|
|
6
|
-
import { Ripple as
|
|
1
|
+
import { jsxs as B, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cx as y, css as x } from "@emotion/css";
|
|
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
|
},
|
|
@@ -42,32 +42,42 @@ const { color: e, cornerRadius: g, spacing: l } = $, b = {
|
|
|
42
42
|
color: "var(--text-transfer)",
|
|
43
43
|
colorName: "transfer"
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, p = {
|
|
46
|
+
xs: {
|
|
47
|
+
h: 18,
|
|
48
|
+
text: "caption-2",
|
|
49
|
+
corner: i.xs,
|
|
50
|
+
p: `3px ${a.xs}`,
|
|
51
|
+
gap: "2px"
|
|
52
|
+
},
|
|
46
53
|
sm: {
|
|
47
54
|
h: 24,
|
|
48
55
|
text: "caption-1",
|
|
49
|
-
corner:
|
|
50
|
-
p: `6px ${
|
|
56
|
+
corner: i.xs,
|
|
57
|
+
p: `6px ${a.sm}`,
|
|
58
|
+
gap: a.sm
|
|
51
59
|
},
|
|
52
60
|
md: {
|
|
53
61
|
h: 32,
|
|
54
62
|
text: "body-2",
|
|
55
|
-
corner:
|
|
56
|
-
p: `6px ${
|
|
63
|
+
corner: i.sm,
|
|
64
|
+
p: `6px ${a.md}`,
|
|
65
|
+
gap: a.sm
|
|
57
66
|
},
|
|
58
67
|
lg: {
|
|
59
68
|
h: 40,
|
|
60
69
|
text: "body-2",
|
|
61
|
-
corner:
|
|
62
|
-
p: `6px ${
|
|
70
|
+
corner: i.md,
|
|
71
|
+
p: `6px ${a.lg}`,
|
|
72
|
+
gap: a.sm
|
|
63
73
|
}
|
|
64
|
-
},
|
|
65
|
-
const t = b[
|
|
66
|
-
let r = t.bg,
|
|
67
|
-
const
|
|
74
|
+
}, I = (d, s, o, m) => {
|
|
75
|
+
const t = b[s];
|
|
76
|
+
let r = t.bg, c = "none";
|
|
77
|
+
const l = t.color;
|
|
68
78
|
switch (d) {
|
|
69
79
|
case "outline":
|
|
70
|
-
r = "transparent",
|
|
80
|
+
r = "transparent", c = `1px solid ${t.border}`;
|
|
71
81
|
break;
|
|
72
82
|
case "clear":
|
|
73
83
|
r = "transparent";
|
|
@@ -76,90 +86,89 @@ const { color: e, cornerRadius: g, spacing: l } = $, b = {
|
|
|
76
86
|
r = t.bg;
|
|
77
87
|
break;
|
|
78
88
|
}
|
|
79
|
-
return
|
|
80
|
-
cursor: o ? "not-allowed" :
|
|
89
|
+
return x({
|
|
90
|
+
cursor: o ? "not-allowed" : m ? "pointer" : "default",
|
|
81
91
|
opacity: o ? 0.5 : 1,
|
|
82
92
|
userSelect: "none",
|
|
83
93
|
position: "relative",
|
|
84
94
|
transition: "background-color 0.2s, opacity 0.2s",
|
|
85
95
|
backgroundColor: r,
|
|
86
|
-
color:
|
|
87
|
-
border:
|
|
96
|
+
color: l,
|
|
97
|
+
border: c
|
|
88
98
|
});
|
|
89
|
-
},
|
|
99
|
+
}, O = x({
|
|
90
100
|
display: "inline-flex",
|
|
91
101
|
cursor: "pointer",
|
|
92
102
|
opacity: 0.6,
|
|
93
103
|
"&:hover": { opacity: 1 }
|
|
94
|
-
}), w =
|
|
104
|
+
}), w = x({
|
|
95
105
|
display: "inline-flex",
|
|
96
106
|
alignItems: "center",
|
|
97
107
|
color: "inherit"
|
|
98
|
-
}),
|
|
108
|
+
}), T = ({
|
|
99
109
|
label: d,
|
|
100
|
-
color:
|
|
110
|
+
color: s = "neutral",
|
|
101
111
|
size: o = "md",
|
|
102
|
-
variant:
|
|
112
|
+
variant: m = "filled",
|
|
103
113
|
width: t,
|
|
104
114
|
textAlign: r = "center",
|
|
105
|
-
leftElement:
|
|
106
|
-
rightElement:
|
|
107
|
-
disabled:
|
|
108
|
-
onClick:
|
|
115
|
+
leftElement: c,
|
|
116
|
+
rightElement: l,
|
|
117
|
+
disabled: u,
|
|
118
|
+
onClick: g,
|
|
109
119
|
onDelete: f,
|
|
110
120
|
className: N,
|
|
111
|
-
labelClassName:
|
|
112
|
-
deleteButtonClassName:
|
|
121
|
+
labelClassName: _,
|
|
122
|
+
deleteButtonClassName: C
|
|
113
123
|
}) => {
|
|
114
|
-
const
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
|
|
124
|
+
const k = I(m, s, u, g);
|
|
125
|
+
return /* @__PURE__ */ B(
|
|
126
|
+
j,
|
|
117
127
|
{
|
|
118
128
|
row: !0,
|
|
119
129
|
alignItems: "center",
|
|
120
130
|
justifyContent: "center",
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
h: i[o].h,
|
|
131
|
+
p: p[o].p,
|
|
132
|
+
minHeight: p[o].h,
|
|
124
133
|
w: t,
|
|
125
134
|
overflow: "hidden",
|
|
126
|
-
borderRadius:
|
|
127
|
-
onClick:
|
|
128
|
-
className: y(
|
|
135
|
+
borderRadius: p[o].corner,
|
|
136
|
+
onClick: g,
|
|
137
|
+
className: y(k, N),
|
|
129
138
|
children: [
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
/* @__PURE__ */
|
|
139
|
+
g && /* @__PURE__ */ n(S, {}),
|
|
140
|
+
c && /* @__PURE__ */ n("span", { className: w, children: c }),
|
|
141
|
+
/* @__PURE__ */ n(
|
|
133
142
|
h,
|
|
134
143
|
{
|
|
135
|
-
variant:
|
|
136
|
-
colorName: b[
|
|
144
|
+
variant: p[o].text,
|
|
145
|
+
colorName: b[s].colorName,
|
|
137
146
|
textOverflow: "ellipsis",
|
|
138
147
|
left: r === "left",
|
|
139
148
|
center: r === "center",
|
|
140
149
|
right: r === "right",
|
|
141
150
|
flex: t ? 1 : void 0,
|
|
142
|
-
className:
|
|
151
|
+
className: _,
|
|
143
152
|
children: d
|
|
144
153
|
}
|
|
145
154
|
),
|
|
146
|
-
|
|
147
|
-
f && !
|
|
155
|
+
l && /* @__PURE__ */ n("span", { className: w, children: l }),
|
|
156
|
+
f && !u && /* @__PURE__ */ n(
|
|
148
157
|
h,
|
|
149
158
|
{
|
|
150
|
-
className: y(
|
|
151
|
-
colorName: b[
|
|
159
|
+
className: y(O, C),
|
|
160
|
+
colorName: b[s].colorName,
|
|
152
161
|
onClick: (v) => {
|
|
153
162
|
v.stopPropagation(), f(v);
|
|
154
163
|
},
|
|
155
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ n($, {})
|
|
156
165
|
}
|
|
157
166
|
)
|
|
158
167
|
]
|
|
159
168
|
}
|
|
160
169
|
);
|
|
161
170
|
};
|
|
162
|
-
|
|
171
|
+
T.displayName = "Badge";
|
|
163
172
|
export {
|
|
164
|
-
|
|
173
|
+
T as Badge
|
|
165
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
|
}
|
|
@@ -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,
|