@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
|
@@ -8,7 +8,7 @@ const { color: o, cornerRadius: r, spacing: n, transition: c } = t, a = e({
|
|
|
8
8
|
}), l = e({
|
|
9
9
|
color: o.text.accent,
|
|
10
10
|
":hover": {
|
|
11
|
-
color: o.text.
|
|
11
|
+
color: o.text.accent_hover
|
|
12
12
|
}
|
|
13
13
|
}), p = e({
|
|
14
14
|
width: "16px",
|
|
@@ -17,10 +17,10 @@ const { color: o, cornerRadius: r, spacing: n, transition: c } = t, a = e({
|
|
|
17
17
|
cursor: "pointer",
|
|
18
18
|
transition: c.general,
|
|
19
19
|
":hover": {
|
|
20
|
-
color: o.icon.
|
|
20
|
+
color: o.icon.negative_hover
|
|
21
21
|
}
|
|
22
22
|
}), x = e({
|
|
23
|
-
boxShadow: `0 2px 10px 4px ${o.effect.
|
|
23
|
+
boxShadow: `0 2px 10px 4px ${o.effect.shadow_l}`,
|
|
24
24
|
borderRadius: r.md,
|
|
25
25
|
padding: n.sm
|
|
26
26
|
});
|
|
@@ -12,10 +12,10 @@ const { color: o, cornerRadius: t, spacing: i, transition: s } = r, p = e({
|
|
|
12
12
|
cursor: "pointer",
|
|
13
13
|
transition: s.general,
|
|
14
14
|
":hover": {
|
|
15
|
-
color: o.icon.
|
|
15
|
+
color: o.icon.negative_hover
|
|
16
16
|
}
|
|
17
17
|
}), d = e({
|
|
18
|
-
boxShadow: `0 2px 10px 4px ${o.effect.
|
|
18
|
+
boxShadow: `0 2px 10px 4px ${o.effect.shadow_l}`,
|
|
19
19
|
borderRadius: t.xs,
|
|
20
20
|
padding: i.xs
|
|
21
21
|
});
|
|
@@ -5,7 +5,7 @@ const { color: o, spacing: r } = l, n = t({
|
|
|
5
5
|
borderSpacing: "0",
|
|
6
6
|
borderCollapse: "separate"
|
|
7
7
|
}), i = t({
|
|
8
|
-
border: `1px solid ${o.border.
|
|
8
|
+
border: `1px solid ${o.border.neutral_primary}`,
|
|
9
9
|
padding: `${r.sm} ${r.sm}`
|
|
10
10
|
}), a = t({
|
|
11
11
|
color: o.text.accent
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as o } from "@emotion/css";
|
|
2
2
|
import { typography as e } from "../../../styles/utils/typography.js";
|
|
3
3
|
import { theme as i } from "../../../utils/theme/index.js";
|
|
4
|
-
const { color: r } = i,
|
|
4
|
+
const { color: r } = i, s = {
|
|
5
5
|
input: o({
|
|
6
6
|
...e.common,
|
|
7
7
|
...e.body1,
|
|
@@ -9,7 +9,7 @@ const { color: r } = i, l = {
|
|
|
9
9
|
height: 48,
|
|
10
10
|
textAlign: "center",
|
|
11
11
|
borderRadius: 12,
|
|
12
|
-
border: `1px solid ${r.border.
|
|
12
|
+
border: `1px solid ${r.border.neutral_alpha_basic}`,
|
|
13
13
|
color: r.text.primary,
|
|
14
14
|
outline: "none",
|
|
15
15
|
transition: "border-color 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease",
|
|
@@ -17,11 +17,11 @@ const { color: r } = i, l = {
|
|
|
17
17
|
color: r.text.tertiary
|
|
18
18
|
},
|
|
19
19
|
"&:focus-visible": {
|
|
20
|
-
borderColor: r.border.
|
|
21
|
-
boxShadow: `0 0 0 1px ${r.border.
|
|
20
|
+
borderColor: r.border.accent_primary,
|
|
21
|
+
boxShadow: `0 0 0 1px ${r.border.accent_primary}`
|
|
22
22
|
},
|
|
23
23
|
"&:not(.disabled):hover": {
|
|
24
|
-
backgroundColor: r.fill.
|
|
24
|
+
backgroundColor: r.fill.neutral_primary_hover
|
|
25
25
|
},
|
|
26
26
|
"&:disabled": {
|
|
27
27
|
opacity: 0.6,
|
|
@@ -29,20 +29,20 @@ const { color: r } = i, l = {
|
|
|
29
29
|
}
|
|
30
30
|
}),
|
|
31
31
|
error: o({
|
|
32
|
-
borderColor: r.border.
|
|
32
|
+
borderColor: r.border.negative_primary
|
|
33
33
|
}),
|
|
34
34
|
success: o({
|
|
35
|
-
borderColor: r.border.
|
|
35
|
+
borderColor: r.border.positive_primary
|
|
36
36
|
}),
|
|
37
37
|
disabled: o({
|
|
38
38
|
pointerEvents: "none",
|
|
39
39
|
opacity: 0.5
|
|
40
40
|
}),
|
|
41
41
|
white: o({
|
|
42
|
-
background: r.fill.
|
|
42
|
+
background: r.fill.bg_primary
|
|
43
43
|
}),
|
|
44
44
|
gray: o({
|
|
45
|
-
background: r.fill.
|
|
45
|
+
background: r.fill.bg_secondary
|
|
46
46
|
}),
|
|
47
47
|
glow: o({
|
|
48
48
|
position: "absolute",
|
|
@@ -51,9 +51,9 @@ const { color: r } = i, l = {
|
|
|
51
51
|
pointerEvents: "none",
|
|
52
52
|
opacity: 0,
|
|
53
53
|
transformOrigin: "center",
|
|
54
|
-
background: r.fill.
|
|
54
|
+
background: r.fill.accent_primary
|
|
55
55
|
})
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
s as styles
|
|
59
59
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useRadioGroupContext as
|
|
1
|
+
import { jsxs as _, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { cx as K } from "@emotion/css";
|
|
3
|
+
import { forwardRef as L } from "react";
|
|
4
|
+
import { useRadioGroupContext as P } from "./context.js";
|
|
5
5
|
import { styles as n } from "./styles.js";
|
|
6
|
-
import { useControlled as
|
|
7
|
-
import { theme as
|
|
6
|
+
import { useControlled as Q } from "../../../utils/hooks/useControlled.js";
|
|
7
|
+
import { theme as X } from "../../../utils/theme/index.js";
|
|
8
8
|
import { Box as u } from "../../builders/Box/Box.js";
|
|
9
|
-
import { Text as
|
|
10
|
-
const { color: r, cornerRadius:
|
|
9
|
+
import { Text as x } from "../../builders/Text/Text.js";
|
|
10
|
+
const { color: r, cornerRadius: R } = X, m = {
|
|
11
11
|
sm: {
|
|
12
12
|
inner: 12,
|
|
13
13
|
// neutral: точка вдвое меньше, чем у accent (см. md — подтверждено в Figma)
|
|
@@ -20,93 +20,93 @@ const { color: r, cornerRadius: N } = Y, m = {
|
|
|
20
20
|
neutralInner: 8,
|
|
21
21
|
outer: 24
|
|
22
22
|
}
|
|
23
|
-
},
|
|
23
|
+
}, Y = L(
|
|
24
24
|
({
|
|
25
25
|
value: s,
|
|
26
|
-
children:
|
|
26
|
+
children: N,
|
|
27
27
|
checked: d,
|
|
28
|
-
defaultChecked:
|
|
29
|
-
onChange:
|
|
30
|
-
disabled:
|
|
31
|
-
className:
|
|
28
|
+
defaultChecked: v,
|
|
29
|
+
onChange: C,
|
|
30
|
+
disabled: k,
|
|
31
|
+
className: B,
|
|
32
32
|
description: f,
|
|
33
|
-
size:
|
|
33
|
+
size: I,
|
|
34
34
|
side: w,
|
|
35
35
|
readOnly: z,
|
|
36
36
|
error: O,
|
|
37
|
-
color:
|
|
38
|
-
outerCircleClassName:
|
|
39
|
-
innerCircleClassName:
|
|
40
|
-
labelContainerClassName:
|
|
41
|
-
labelClassName:
|
|
37
|
+
color: V = "accent",
|
|
38
|
+
outerCircleClassName: j,
|
|
39
|
+
innerCircleClassName: G,
|
|
40
|
+
labelContainerClassName: S,
|
|
41
|
+
labelClassName: T,
|
|
42
42
|
descriptionClassName: W
|
|
43
|
-
},
|
|
44
|
-
const o =
|
|
43
|
+
}, D) => {
|
|
44
|
+
const o = P(), b = !!o, p = d !== void 0, [M, U] = Q(
|
|
45
45
|
d,
|
|
46
|
-
|
|
47
|
-
), e = b ? o.value === s :
|
|
48
|
-
c ||
|
|
49
|
-
},
|
|
46
|
+
v
|
|
47
|
+
), e = b ? o.value === s : p ? d : M, c = o?.disabled || k, a = I ?? o?.size ?? "md", q = w ?? o?.side ?? "left", y = z ?? o?.readOnly ?? !1, i = O ?? o?.error ?? !1, t = V === "neutral", h = m[a].outer, g = t ? m[a].neutralInner : m[a].inner, A = () => {
|
|
48
|
+
c || y || (b ? o.setValue?.(s) : (p || U(!e), C?.(!e)));
|
|
49
|
+
}, E = i ? e ? r.fill.negative_tint : r.fill.bg_secondary : e ? t ? r.fill.neutral_primary : r.fill.accent_tint : r.fill.bg_secondary, F = e ? i ? r.fill.negative_primary : t ? r.icon.secondary : r.fill.accent_primary : void 0, H = i ? r.border.negative_secondary : e && t ? r.border.neutral_primary : r.border.neutral_alpha_low, J = e && (!t || i) ? 0 : 1;
|
|
50
50
|
return (
|
|
51
51
|
// biome-ignore lint/a11y/useSemanticElements: <нарочное допущение тк с button проще работать чем с input>
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ _(
|
|
53
53
|
"button",
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
55
|
+
ref: D,
|
|
56
56
|
role: "radio",
|
|
57
57
|
type: "button",
|
|
58
58
|
"data-value": s,
|
|
59
59
|
"aria-checked": e,
|
|
60
60
|
"aria-disabled": c || void 0,
|
|
61
61
|
tabIndex: e ? 0 : -1,
|
|
62
|
-
className:
|
|
62
|
+
className: K([
|
|
63
63
|
n.radio,
|
|
64
64
|
e && n.checked,
|
|
65
65
|
c && n.disabled,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
q === "right" && n.sideRight,
|
|
67
|
+
y && n.readOnly,
|
|
68
|
+
B
|
|
69
69
|
]),
|
|
70
|
-
onClick:
|
|
70
|
+
onClick: A,
|
|
71
71
|
children: [
|
|
72
72
|
/* @__PURE__ */ l(
|
|
73
73
|
u,
|
|
74
74
|
{
|
|
75
75
|
w: h,
|
|
76
76
|
h,
|
|
77
|
-
backgroundColor:
|
|
78
|
-
borderWidth:
|
|
79
|
-
borderColor:
|
|
77
|
+
backgroundColor: E,
|
|
78
|
+
borderWidth: J,
|
|
79
|
+
borderColor: H,
|
|
80
80
|
borderStyle: "solid",
|
|
81
81
|
center: !0,
|
|
82
|
-
borderRadius:
|
|
83
|
-
className:
|
|
82
|
+
borderRadius: R.fullRound,
|
|
83
|
+
className: j,
|
|
84
84
|
children: /* @__PURE__ */ l(
|
|
85
85
|
u,
|
|
86
86
|
{
|
|
87
87
|
w: g,
|
|
88
88
|
h: g,
|
|
89
|
-
backgroundColor:
|
|
90
|
-
borderRadius:
|
|
89
|
+
backgroundColor: F,
|
|
90
|
+
borderRadius: R.fullRound,
|
|
91
91
|
"aria-hidden": !0,
|
|
92
|
-
className:
|
|
92
|
+
className: G
|
|
93
93
|
}
|
|
94
94
|
)
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ _(u, { alignItems: "flex-start", className: S, children: [
|
|
98
98
|
/* @__PURE__ */ l(
|
|
99
|
-
|
|
99
|
+
x,
|
|
100
100
|
{
|
|
101
101
|
variant: a === "sm" ? "body-2" : "body-1",
|
|
102
102
|
tag: "span",
|
|
103
103
|
left: !0,
|
|
104
|
-
className:
|
|
105
|
-
children:
|
|
104
|
+
className: T,
|
|
105
|
+
children: N
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
108
|
f && /* @__PURE__ */ l(
|
|
109
|
-
|
|
109
|
+
x,
|
|
110
110
|
{
|
|
111
111
|
tag: "span",
|
|
112
112
|
variant: "body-2",
|
|
@@ -122,7 +122,7 @@ const { color: r, cornerRadius: N } = Y, m = {
|
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
|
-
|
|
125
|
+
Y.displayName = "Radio";
|
|
126
126
|
export {
|
|
127
|
-
|
|
127
|
+
Y as Radio
|
|
128
128
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { cx as l } from "@emotion/css";
|
|
3
|
-
import
|
|
3
|
+
import _ from "react";
|
|
4
4
|
import { styles as e } from "./styles.js";
|
|
5
5
|
import { Box as i } from "../../builders/Box/Box.js";
|
|
6
|
-
import { theme as
|
|
7
|
-
import { Text as
|
|
8
|
-
import { Ripple as
|
|
9
|
-
const { color: m, cornerRadius:
|
|
10
|
-
function
|
|
6
|
+
import { theme as C } from "../../../utils/theme/index.js";
|
|
7
|
+
import { Text as R } from "../../builders/Text/Text.js";
|
|
8
|
+
import { Ripple as j } from "../../builders/Ripple/Ripple.js";
|
|
9
|
+
const { color: m, cornerRadius: k, spacing: d } = C;
|
|
10
|
+
function q({
|
|
11
11
|
value: u,
|
|
12
12
|
onChange: f,
|
|
13
13
|
options: b,
|
|
@@ -26,13 +26,13 @@ function P({
|
|
|
26
26
|
{
|
|
27
27
|
row: !0,
|
|
28
28
|
alignItems: "center",
|
|
29
|
-
borderRadius:
|
|
29
|
+
borderRadius: k.md,
|
|
30
30
|
p: d.xs,
|
|
31
31
|
gap: d.md,
|
|
32
32
|
className: l(e[n], s && e["full-width"], p),
|
|
33
33
|
children: b.map((r) => {
|
|
34
34
|
const a = r.value === u, o = r.disabled, w = r.separatorAfter ?? !1;
|
|
35
|
-
return /* @__PURE__ */ c(
|
|
35
|
+
return /* @__PURE__ */ c(_.Fragment, { children: [
|
|
36
36
|
/* @__PURE__ */ c(
|
|
37
37
|
"button",
|
|
38
38
|
{
|
|
@@ -60,14 +60,14 @@ function P({
|
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
62
|
r.label && /* @__PURE__ */ t(
|
|
63
|
-
|
|
63
|
+
R,
|
|
64
64
|
{
|
|
65
65
|
colorName: a ? "primary" : "tertiary",
|
|
66
66
|
className: N,
|
|
67
67
|
children: r.label
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
!o && /* @__PURE__ */ t(
|
|
70
|
+
!o && /* @__PURE__ */ t(j, { color: m.fill.bg_overlay_primary })
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
73
|
),
|
|
@@ -76,7 +76,7 @@ function P({
|
|
|
76
76
|
{
|
|
77
77
|
w: 1,
|
|
78
78
|
h: 24,
|
|
79
|
-
backgroundColor: m.fill.
|
|
79
|
+
backgroundColor: m.fill.bg_tertiary,
|
|
80
80
|
className: v
|
|
81
81
|
}
|
|
82
82
|
)
|
|
@@ -86,5 +86,5 @@ function P({
|
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
88
|
export {
|
|
89
|
-
|
|
89
|
+
q as SegmentControl
|
|
90
90
|
};
|
|
@@ -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"
|