@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
|
@@ -11,8 +11,9 @@ export type ButtonType = "clear" | "filled" | "outline";
|
|
|
11
11
|
* Использует системные токены:
|
|
12
12
|
* - `accent` — акцентный цвет
|
|
13
13
|
* - `neutral` — нейтральный
|
|
14
|
+
* - `neutral-primary` — нейтральный основной
|
|
14
15
|
* - `negative` — негативный (ошибки/отмена)
|
|
15
16
|
* - `positive` — позитивный (успех)
|
|
16
17
|
* - `warning` — предупреждение
|
|
17
18
|
*/
|
|
18
|
-
export type ButtonColor = AccentType | NeutralType | NegativeType | PositiveType | WarningType | TransferType;
|
|
19
|
+
export type ButtonColor = AccentType | NeutralType | "neutral-primary" | NegativeType | PositiveType | WarningType | TransferType;
|
|
@@ -24,22 +24,22 @@ const { color: r } = e, t = {
|
|
|
24
24
|
alignItems: "center",
|
|
25
25
|
justifyContent: "center",
|
|
26
26
|
borderRadius: 4,
|
|
27
|
-
border: `1px solid ${r.border.
|
|
28
|
-
backgroundColor: r.fill.
|
|
27
|
+
border: `1px solid ${r.border.neutral_alpha_high}`,
|
|
28
|
+
backgroundColor: r.fill.bg_secondary,
|
|
29
29
|
opacity: 1,
|
|
30
30
|
transition: "all 0.15s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
31
31
|
position: "relative",
|
|
32
32
|
"& svg": {
|
|
33
|
-
color: r.border.
|
|
33
|
+
color: r.border.accent_primary
|
|
34
34
|
}
|
|
35
35
|
}),
|
|
36
36
|
checked: o({
|
|
37
|
-
borderColor: `${r.border.
|
|
38
|
-
backgroundColor: `${r.fill.
|
|
37
|
+
borderColor: `${r.border.accent_primary} !important`,
|
|
38
|
+
backgroundColor: `${r.fill.accent_secondary} !important`
|
|
39
39
|
}),
|
|
40
40
|
error: o({
|
|
41
|
-
borderColor: r.border.
|
|
42
|
-
backgroundColor: r.fill.
|
|
41
|
+
borderColor: r.border.negative_primary,
|
|
42
|
+
backgroundColor: r.fill.negative_secondary
|
|
43
43
|
})
|
|
44
44
|
}, a = {
|
|
45
45
|
primary: o({}),
|
|
@@ -44,75 +44,75 @@ const c = r({
|
|
|
44
44
|
custom: r({})
|
|
45
45
|
}, n = {
|
|
46
46
|
primary: r({
|
|
47
|
-
backgroundColor: o.color.fill.
|
|
48
|
-
":where(&) svg": { color: o.color.icon.
|
|
47
|
+
backgroundColor: o.color.fill.accent_primary,
|
|
48
|
+
":where(&) svg": { color: o.color.icon.primary_inverse },
|
|
49
49
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
50
|
-
backgroundColor: o.color.fill.
|
|
51
|
-
":where(&) svg": { color: o.color.icon.
|
|
50
|
+
backgroundColor: o.color.fill.accent_primary_hover,
|
|
51
|
+
":where(&) svg": { color: o.color.icon.primary_inverse }
|
|
52
52
|
}
|
|
53
53
|
}),
|
|
54
54
|
secondary: r({
|
|
55
|
-
backgroundColor: o.color.fill.
|
|
55
|
+
backgroundColor: o.color.fill.accent_secondary,
|
|
56
56
|
":where(&) svg": { color: o.color.icon.primary },
|
|
57
57
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
58
|
-
backgroundColor: o.color.fill.
|
|
59
|
-
":where(&) svg": { color: o.color.icon.
|
|
58
|
+
backgroundColor: o.color.fill.accent_secondary_hover,
|
|
59
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
60
60
|
}
|
|
61
61
|
}),
|
|
62
62
|
negative: r({
|
|
63
|
-
backgroundColor: o.color.fill.
|
|
63
|
+
backgroundColor: o.color.fill.negative_secondary,
|
|
64
64
|
":where(&) svg": { color: o.color.icon.primary },
|
|
65
65
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
66
|
-
backgroundColor: o.color.fill.
|
|
67
|
-
":where(&) svg": { color: o.color.icon.
|
|
66
|
+
backgroundColor: o.color.fill.negative_secondary_hover,
|
|
67
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
68
68
|
}
|
|
69
69
|
}),
|
|
70
70
|
positive: r({
|
|
71
|
-
backgroundColor: o.color.fill.
|
|
71
|
+
backgroundColor: o.color.fill.positive_secondary,
|
|
72
72
|
":where(&) svg": { color: o.color.icon.primary },
|
|
73
73
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
74
|
-
backgroundColor: o.color.fill.
|
|
75
|
-
":where(&) svg": { color: o.color.icon.
|
|
74
|
+
backgroundColor: o.color.fill.positive_secondary_hover,
|
|
75
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
76
76
|
}
|
|
77
77
|
}),
|
|
78
78
|
warning: r({
|
|
79
|
-
backgroundColor: o.color.fill.
|
|
79
|
+
backgroundColor: o.color.fill.warning_secondary,
|
|
80
80
|
":where(&) svg": { color: o.color.icon.primary },
|
|
81
81
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
82
|
-
backgroundColor: o.color.fill.
|
|
83
|
-
":where(&) svg": { color: o.color.icon.
|
|
82
|
+
backgroundColor: o.color.fill.warning_secondary_hover,
|
|
83
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
84
84
|
}
|
|
85
85
|
}),
|
|
86
86
|
neutral: r({
|
|
87
|
-
backgroundColor: o.color.fill.
|
|
87
|
+
backgroundColor: o.color.fill.neutral_secondary,
|
|
88
88
|
":where(&) svg": { color: o.color.icon.primary },
|
|
89
89
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
90
|
-
backgroundColor: o.color.fill.
|
|
91
|
-
":where(&) svg": { color: o.color.icon.
|
|
90
|
+
backgroundColor: o.color.fill.neutral_secondary_hover,
|
|
91
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
92
92
|
}
|
|
93
93
|
}),
|
|
94
94
|
transfer: r({
|
|
95
|
-
backgroundColor: o.color.fill.
|
|
95
|
+
backgroundColor: o.color.fill.transfer_secondary,
|
|
96
96
|
":where(&) svg": { color: o.color.icon.primary },
|
|
97
97
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
98
|
-
backgroundColor: o.color.fill.
|
|
99
|
-
":where(&) svg": { color: o.color.icon.
|
|
98
|
+
backgroundColor: o.color.fill.transfer_secondary_hover,
|
|
99
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
100
100
|
}
|
|
101
101
|
}),
|
|
102
102
|
"neutral-white": r({
|
|
103
|
-
backgroundColor: o.color.fill.
|
|
103
|
+
backgroundColor: o.color.fill.bg_primary,
|
|
104
104
|
":where(&) svg": { color: o.color.icon.primary },
|
|
105
105
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
106
|
-
backgroundColor: o.color.fill.
|
|
107
|
-
":where(&) svg": { color: o.color.icon.
|
|
106
|
+
backgroundColor: o.color.fill.bg_secondary,
|
|
107
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
108
108
|
}
|
|
109
109
|
}),
|
|
110
110
|
"no-bg": r({
|
|
111
111
|
backgroundColor: "transparent",
|
|
112
112
|
":where(&) svg": { color: o.color.icon.primary },
|
|
113
113
|
"&:hover:not(:disabled), &:active:not(:disabled)": {
|
|
114
|
-
backgroundColor: o.color.fill.
|
|
115
|
-
":where(&) svg": { color: o.color.icon.
|
|
114
|
+
backgroundColor: o.color.fill.bg_secondary,
|
|
115
|
+
":where(&) svg": { color: o.color.icon.primary_hover }
|
|
116
116
|
}
|
|
117
117
|
}),
|
|
118
118
|
custom: r({})
|
|
@@ -11,12 +11,12 @@ const { color: o, spacing: e } = i, a = r({
|
|
|
11
11
|
}
|
|
12
12
|
}), l = r({
|
|
13
13
|
"&:hover": {
|
|
14
|
-
backgroundColor: o.fill.
|
|
14
|
+
backgroundColor: o.fill.neutral_primary_hover
|
|
15
15
|
}
|
|
16
|
-
}),
|
|
16
|
+
}), p = {
|
|
17
17
|
"input-container": r({
|
|
18
|
-
backgroundColor: o.fill.
|
|
19
|
-
border: `1px solid ${o.border.
|
|
18
|
+
backgroundColor: o.fill.accent_secondary,
|
|
19
|
+
border: `1px solid ${o.border.neutral_alpha_basic}`,
|
|
20
20
|
padding: `${e.md} ${e.lg}`,
|
|
21
21
|
borderRadius: 12,
|
|
22
22
|
minHeight: 40,
|
|
@@ -26,9 +26,9 @@ const { color: o, spacing: e } = i, a = r({
|
|
|
26
26
|
resize: "none"
|
|
27
27
|
},
|
|
28
28
|
"&:focus-within": {
|
|
29
|
-
borderColor: o.border.
|
|
29
|
+
borderColor: o.border.accent_primary,
|
|
30
30
|
"&:hover": {
|
|
31
|
-
borderColor: o.border.
|
|
31
|
+
borderColor: o.border.accent_primary
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}),
|
|
@@ -57,7 +57,7 @@ const { color: o, spacing: e } = i, a = r({
|
|
|
57
57
|
padding: `14px ${e.lg} 14px ${e.lg}`
|
|
58
58
|
}),
|
|
59
59
|
error: r({
|
|
60
|
-
borderColor: o.border.
|
|
60
|
+
borderColor: o.border.negative_primary
|
|
61
61
|
}),
|
|
62
62
|
disabled: a,
|
|
63
63
|
readOnly: n,
|
|
@@ -66,10 +66,10 @@ const { color: o, spacing: e } = i, a = r({
|
|
|
66
66
|
height: "auto"
|
|
67
67
|
}),
|
|
68
68
|
primary: r({
|
|
69
|
-
background: o.fill.
|
|
69
|
+
background: o.fill.bg_primary
|
|
70
70
|
}),
|
|
71
71
|
secondary: r({
|
|
72
|
-
background: o.fill.
|
|
72
|
+
background: o.fill.bg_secondary
|
|
73
73
|
}),
|
|
74
74
|
"clear-button": r({
|
|
75
75
|
cursor: "pointer",
|
|
@@ -81,5 +81,5 @@ const { color: o, spacing: e } = i, a = r({
|
|
|
81
81
|
})
|
|
82
82
|
};
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
p as styles
|
|
85
85
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { $convertToMarkdownString as y } from "@lexical/markdown";
|
|
3
|
-
import { AutoFocusPlugin as
|
|
4
|
-
import { LexicalComposer as
|
|
5
|
-
import { HashtagPlugin as
|
|
6
|
-
import { ListPlugin as
|
|
3
|
+
import { AutoFocusPlugin as D } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
4
|
+
import { LexicalComposer as V } from "@lexical/react/LexicalComposer";
|
|
5
|
+
import { HashtagPlugin as j } from "@lexical/react/LexicalHashtagPlugin";
|
|
6
|
+
import { ListPlugin as B } from "@lexical/react/LexicalListPlugin";
|
|
7
7
|
import { MarkdownShortcutPlugin as U } from "@lexical/react/LexicalMarkdownShortcutPlugin";
|
|
8
8
|
import { OnChangePlugin as W } from "@lexical/react/LexicalOnChangePlugin";
|
|
9
9
|
import { TablePlugin as H } from "@lexical/react/LexicalTablePlugin";
|
|
@@ -24,38 +24,38 @@ import { Box as h } from "../../builders/Box/Box.js";
|
|
|
24
24
|
import { theme as to } from "../../../utils/theme/index.js";
|
|
25
25
|
import { Text as eo } from "../../builders/Text/Text.js";
|
|
26
26
|
const { color: n, cornerRadius: w, spacing: e } = to;
|
|
27
|
-
function
|
|
27
|
+
function Ao({
|
|
28
28
|
label: l,
|
|
29
29
|
plugins: C,
|
|
30
30
|
field: k,
|
|
31
31
|
disabled: m = !1,
|
|
32
32
|
locale: M,
|
|
33
|
-
toolbar:
|
|
34
|
-
defaultMarkdown:
|
|
33
|
+
toolbar: b,
|
|
34
|
+
defaultMarkdown: P,
|
|
35
35
|
events: r = {},
|
|
36
36
|
className: x,
|
|
37
|
-
labelClassName:
|
|
38
|
-
toolbarClassName:
|
|
39
|
-
editorClassName:
|
|
37
|
+
labelClassName: T,
|
|
38
|
+
toolbarClassName: E,
|
|
39
|
+
editorClassName: S,
|
|
40
40
|
fieldClassName: R,
|
|
41
41
|
previewClassName: v
|
|
42
42
|
}) {
|
|
43
|
-
const [d,
|
|
43
|
+
const [d, N] = u(""), [i, A] = u(!1), { availableActions: s, onImagesUpload: _ } = b || {}, O = a(() => z(), []), I = a(
|
|
44
44
|
() => ({
|
|
45
45
|
isEditable: !m,
|
|
46
46
|
isPreviewMode: i,
|
|
47
|
-
setPreviewMode:
|
|
47
|
+
setPreviewMode: A,
|
|
48
48
|
markdownText: d
|
|
49
49
|
}),
|
|
50
50
|
[m, i, d]
|
|
51
|
-
),
|
|
51
|
+
), L = a(() => ({
|
|
52
52
|
availableActions: s || K
|
|
53
53
|
}), [s]), f = p(
|
|
54
54
|
(t) => {
|
|
55
|
-
|
|
55
|
+
N(t), r.onMarkdownChange && r.onMarkdownChange(t);
|
|
56
56
|
},
|
|
57
57
|
[r]
|
|
58
|
-
),
|
|
58
|
+
), F = p(
|
|
59
59
|
(t) => {
|
|
60
60
|
t.read(() => {
|
|
61
61
|
const $ = y(g);
|
|
@@ -64,7 +64,7 @@ function No({
|
|
|
64
64
|
},
|
|
65
65
|
[f, r]
|
|
66
66
|
);
|
|
67
|
-
return /* @__PURE__ */ o(q, { locale: M, children: /* @__PURE__ */ o(
|
|
67
|
+
return /* @__PURE__ */ o(q, { locale: M, children: /* @__PURE__ */ o(V, { initialConfig: O, children: /* @__PURE__ */ o(G.Provider, { value: I, children: /* @__PURE__ */ c(J.Provider, { value: L, children: [
|
|
68
68
|
/* @__PURE__ */ c(
|
|
69
69
|
h,
|
|
70
70
|
{
|
|
@@ -73,7 +73,7 @@ function No({
|
|
|
73
73
|
borderRadius: w.lg,
|
|
74
74
|
p: e.lg,
|
|
75
75
|
gap: e.sm,
|
|
76
|
-
backgroundColor: n.fill.
|
|
76
|
+
backgroundColor: n.fill.neutral_secondary,
|
|
77
77
|
className: x,
|
|
78
78
|
children: [
|
|
79
79
|
l ? /* @__PURE__ */ o(
|
|
@@ -81,46 +81,46 @@ function No({
|
|
|
81
81
|
{
|
|
82
82
|
variant: "headline-3",
|
|
83
83
|
fontWeight: "semibold",
|
|
84
|
-
className:
|
|
84
|
+
className: T,
|
|
85
85
|
children: l
|
|
86
86
|
}
|
|
87
87
|
) : null,
|
|
88
88
|
/* @__PURE__ */ o(
|
|
89
89
|
Q,
|
|
90
90
|
{
|
|
91
|
-
onImagesUpload:
|
|
92
|
-
className:
|
|
91
|
+
onImagesUpload: _,
|
|
92
|
+
className: E
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
95
|
/* @__PURE__ */ o(
|
|
96
96
|
h,
|
|
97
97
|
{
|
|
98
|
-
backgroundColor: n.fill.
|
|
99
|
-
border: `1px solid ${n.border.
|
|
98
|
+
backgroundColor: n.fill.neutral_primary,
|
|
99
|
+
border: `1px solid ${n.border.neutral_alpha_basic}`,
|
|
100
100
|
borderRadius: w.md,
|
|
101
101
|
p: `${e.md} ${e.lg}`,
|
|
102
102
|
w: "full",
|
|
103
103
|
h: 144,
|
|
104
104
|
overflow: "auto",
|
|
105
|
-
className:
|
|
105
|
+
className: S,
|
|
106
106
|
children: i ? /* @__PURE__ */ o(X, { className: v }) : /* @__PURE__ */ o(Y, { ...k, className: R })
|
|
107
107
|
}
|
|
108
108
|
)
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
|
+
/* @__PURE__ */ o(D, {}),
|
|
112
113
|
/* @__PURE__ */ o(B, {}),
|
|
113
|
-
/* @__PURE__ */ o(j, {}),
|
|
114
114
|
/* @__PURE__ */ o(H, {}),
|
|
115
|
-
/* @__PURE__ */ o(
|
|
115
|
+
/* @__PURE__ */ o(j, {}),
|
|
116
116
|
/* @__PURE__ */ o(U, { transformers: g }),
|
|
117
|
-
/* @__PURE__ */ o(W, { onChange:
|
|
117
|
+
/* @__PURE__ */ o(W, { onChange: F }),
|
|
118
118
|
/* @__PURE__ */ o(Z, {}),
|
|
119
|
-
/* @__PURE__ */ o(oo, { defaultValue:
|
|
119
|
+
/* @__PURE__ */ o(oo, { defaultValue: P }),
|
|
120
120
|
/* @__PURE__ */ o(ro, {}),
|
|
121
121
|
C
|
|
122
122
|
] }) }) }) });
|
|
123
123
|
}
|
|
124
124
|
export {
|
|
125
|
-
|
|
125
|
+
Ao as MarkdownTextEditor
|
|
126
126
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { cx as k } from "@emotion/css";
|
|
3
|
-
import { useState as y, useCallback as h, useMemo as
|
|
4
|
-
import
|
|
5
|
-
import { rowStyle as
|
|
6
|
-
import { IconButton as
|
|
3
|
+
import { useState as y, useCallback as h, useMemo as I, Fragment as P } from "react";
|
|
4
|
+
import S from "../../../../../../assets/svg/markdown/dots-horizontal.svg.js";
|
|
5
|
+
import { rowStyle as j, rowStyleInteractive as B } from "./ActionMenuButton.styles.js";
|
|
6
|
+
import { IconButton as b } from "../../../../IconButton/IconButton.js";
|
|
7
7
|
import { Box as c } from "../../../../../builders/Box/Box.js";
|
|
8
|
-
import { theme as
|
|
8
|
+
import { theme as z } from "../../../../../../utils/theme/index.js";
|
|
9
9
|
import { Text as O } from "../../../../../builders/Text/Text.js";
|
|
10
10
|
import { Popover as T } from "../../../../../shared/Popover/Popover.js";
|
|
11
|
-
const { color: x, spacing: v } =
|
|
12
|
-
function
|
|
11
|
+
const { color: x, spacing: v } = z;
|
|
12
|
+
function J({
|
|
13
13
|
groups: n,
|
|
14
14
|
toolbarVisibleActionsCount: m,
|
|
15
15
|
onAction: s,
|
|
@@ -24,7 +24,7 @@ function K({
|
|
|
24
24
|
({ IconComponent: t, ...o }, l) => /* @__PURE__ */ u(
|
|
25
25
|
c,
|
|
26
26
|
{
|
|
27
|
-
className: k(
|
|
27
|
+
className: k(j, !r && B),
|
|
28
28
|
p: v.sm,
|
|
29
29
|
alignItems: "center",
|
|
30
30
|
flex: !0,
|
|
@@ -46,7 +46,7 @@ function K({
|
|
|
46
46
|
o.id
|
|
47
47
|
),
|
|
48
48
|
[r, s, p]
|
|
49
|
-
), g =
|
|
49
|
+
), g = I(() => n.map((t, o) => {
|
|
50
50
|
const l = o === n.length - 1;
|
|
51
51
|
if (!t.length)
|
|
52
52
|
return null;
|
|
@@ -54,14 +54,14 @@ function K({
|
|
|
54
54
|
const M = (o ? n.slice(0, o).flat().length : 0) + d + m;
|
|
55
55
|
return f(i, M);
|
|
56
56
|
});
|
|
57
|
-
return /* @__PURE__ */ u(
|
|
57
|
+
return /* @__PURE__ */ u(P, { children: [
|
|
58
58
|
C,
|
|
59
59
|
l ? null : /* @__PURE__ */ e(
|
|
60
60
|
c,
|
|
61
61
|
{
|
|
62
62
|
w: "full",
|
|
63
63
|
h: 1,
|
|
64
|
-
backgroundColor: x.border.
|
|
64
|
+
backgroundColor: x.border.neutral_alpha_basic
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
67
|
] }, t.flatMap((i) => i.id).join("-"));
|
|
@@ -73,10 +73,10 @@ function K({
|
|
|
73
73
|
placement: "bottom",
|
|
74
74
|
open: w,
|
|
75
75
|
onChange: a,
|
|
76
|
-
children: /* @__PURE__ */ e(
|
|
76
|
+
children: /* @__PURE__ */ e(b, { size: "xs", color: "no-bg", disabled: r, children: /* @__PURE__ */ e(S, {}) })
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
J as ActionMenuButton
|
|
82
82
|
};
|
|
@@ -4,10 +4,10 @@ const { color: o } = t, l = r({
|
|
|
4
4
|
cursor: "pointer"
|
|
5
5
|
}), n = r({
|
|
6
6
|
":hover": {
|
|
7
|
-
backgroundColor: o.fill.
|
|
7
|
+
backgroundColor: o.fill.bg_secondary
|
|
8
8
|
},
|
|
9
9
|
":active": {
|
|
10
|
-
backgroundColor: o.fill.
|
|
10
|
+
backgroundColor: o.fill.bg_secondary
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
export {
|