@dss-kit/ui-kit 0.3.6 → 0.3.8
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 +57 -51
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.js +27 -27
- package/dist/components/builders/Modal/styles.d.ts +0 -1
- package/dist/components/builders/Modal/styles.js +6 -12
- package/dist/components/builders/Table/TablePagination/TablePagination.js +1 -1
- package/dist/components/charts/LineChart/LineChart.js +17 -15
- package/dist/components/charts/PieProgressChart/PieProgressChart.js +16 -14
- package/dist/components/controls/Button/Button.js +6 -6
- package/dist/components/controls/IconButton/IconButton.d.ts +17 -2
- package/dist/components/controls/IconButton/IconButton.js +17 -24
- package/dist/components/controls/IconButton/index.d.ts +2 -2
- package/dist/components/controls/Input/Input.js +147 -133
- package/dist/components/controls/Input/styles.d.ts +2 -0
- package/dist/components/controls/Input/styles.js +36 -28
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.js +6 -6
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.js +8 -8
- package/dist/components/shared/MarkdownText/MarkdownText.js +10 -10
- package/dist/node_modules/@highcharts/react/Highcharts.js +161 -0
- package/dist/node_modules/@highcharts/react/options/Title.js +14 -0
- package/dist/node_modules/@highcharts/react/options/Tooltip.js +14 -0
- package/dist/ui-kit.cjs +8 -8
- package/dist/utils/theme/spacing.d.ts +15 -0
- package/dist/utils/theme/spacing.js +15 -0
- package/package.json +1 -1
- package/dist/components/controls/IconButton/IconButton.types.d.ts +0 -11
|
@@ -1,204 +1,218 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { useMergeRefs as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
6
|
-
import { styles as
|
|
7
|
-
import { useControlled as
|
|
8
|
-
import { Box as
|
|
9
|
-
import { theme as
|
|
10
|
-
import { Text as
|
|
11
|
-
const { spacing:
|
|
12
|
-
function
|
|
1
|
+
import { jsxs as N, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cx as w } from "@emotion/css";
|
|
3
|
+
import { useMergeRefs as k } from "@floating-ui/react";
|
|
4
|
+
import { forwardRef as Y, useRef as R, useEffect as Z, useMemo as ee } from "react";
|
|
5
|
+
import te from "../../../assets/svg/shared/close-circle.svg.js";
|
|
6
|
+
import { styles as e } from "./styles.js";
|
|
7
|
+
import { useControlled as ne } from "../../../utils/hooks/useControlled.js";
|
|
8
|
+
import { Box as u } from "../../builders/Box/Box.js";
|
|
9
|
+
import { theme as re } from "../../../utils/theme/index.js";
|
|
10
|
+
import { Text as y } from "../../builders/Text/Text.js";
|
|
11
|
+
const { spacing: j } = re;
|
|
12
|
+
function F(t) {
|
|
13
13
|
return {
|
|
14
14
|
...new Event("input", { bubbles: !0 }),
|
|
15
|
-
target:
|
|
16
|
-
currentTarget:
|
|
15
|
+
target: t,
|
|
16
|
+
currentTarget: t
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const ae = Y((t, v) => {
|
|
20
20
|
const {
|
|
21
|
-
label:
|
|
22
|
-
prompt:
|
|
23
|
-
error:
|
|
24
|
-
errorText:
|
|
25
|
-
size:
|
|
26
|
-
prefix:
|
|
21
|
+
label: d,
|
|
22
|
+
prompt: h,
|
|
23
|
+
error: I,
|
|
24
|
+
errorText: E,
|
|
25
|
+
size: M = "md",
|
|
26
|
+
prefix: O,
|
|
27
27
|
suffix: _,
|
|
28
|
-
background:
|
|
29
|
-
showClearButton:
|
|
30
|
-
disabled:
|
|
31
|
-
value:
|
|
32
|
-
defaultValue:
|
|
33
|
-
className:
|
|
34
|
-
wrapperClassName:
|
|
35
|
-
labelClassName:
|
|
36
|
-
fieldContainerClassName:
|
|
37
|
-
promptClassName:
|
|
38
|
-
errorClassName:
|
|
39
|
-
textAlign:
|
|
28
|
+
background: x = "primary",
|
|
29
|
+
showClearButton: W,
|
|
30
|
+
disabled: l,
|
|
31
|
+
value: p,
|
|
32
|
+
defaultValue: m,
|
|
33
|
+
className: B,
|
|
34
|
+
wrapperClassName: A,
|
|
35
|
+
labelClassName: H,
|
|
36
|
+
fieldContainerClassName: P,
|
|
37
|
+
promptClassName: q,
|
|
38
|
+
errorClassName: G,
|
|
39
|
+
textAlign: C = "left",
|
|
40
40
|
...T
|
|
41
|
-
} =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
} = t, o = t.multiline === !0, i = !!t.readOnly, $ = (r) => {
|
|
42
|
+
i && r.preventDefault();
|
|
43
|
+
}, z = R(null), c = R(null), J = k([
|
|
44
|
+
z,
|
|
45
|
+
v
|
|
46
|
+
]), K = k([
|
|
47
|
+
c,
|
|
48
|
+
v
|
|
49
|
+
]), { current: D } = R(p !== void 0), [f, S] = ne(
|
|
50
|
+
typeof p == "string" || typeof p == "number" ? String(p) : void 0,
|
|
51
|
+
typeof m == "string" || typeof m == "number" ? String(m) : ""
|
|
52
|
+
), V = (r) => {
|
|
53
|
+
if (S(r.target.value), o) {
|
|
54
|
+
const a = t.onChange;
|
|
55
|
+
a?.(r);
|
|
54
56
|
} else {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
+
const a = t.onChange;
|
|
58
|
+
a?.(r);
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
61
|
+
Z(() => {
|
|
62
|
+
o && t.autoResize && c.current && (c.current.style.height = "auto", c.current.style.height = `${c.current.scrollHeight}px`);
|
|
63
|
+
}, [f, o, t.autoResize]);
|
|
64
|
+
const Q = () => {
|
|
65
|
+
if (S(""), !o) {
|
|
66
|
+
const a = z.current;
|
|
67
|
+
if (a) {
|
|
68
|
+
a.value = "";
|
|
69
|
+
const s = F(a), g = t.onChange;
|
|
70
|
+
g?.(s);
|
|
69
71
|
}
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
74
|
+
const r = c.current;
|
|
75
|
+
if (r) {
|
|
76
|
+
r.value = "";
|
|
77
|
+
const a = F(r), s = t.onChange;
|
|
78
|
+
s?.(a);
|
|
77
79
|
}
|
|
78
|
-
},
|
|
79
|
-
if (
|
|
80
|
+
}, U = () => {
|
|
81
|
+
if (o) {
|
|
80
82
|
const {
|
|
81
|
-
rows:
|
|
82
|
-
autoResize:
|
|
83
|
-
onChange:
|
|
84
|
-
multiline:
|
|
85
|
-
...
|
|
83
|
+
rows: g,
|
|
84
|
+
autoResize: oe,
|
|
85
|
+
onChange: le,
|
|
86
|
+
multiline: ie,
|
|
87
|
+
...b
|
|
86
88
|
} = T;
|
|
87
89
|
return /* @__PURE__ */ n(
|
|
88
90
|
"textarea",
|
|
89
91
|
{
|
|
90
|
-
ref:
|
|
91
|
-
rows:
|
|
92
|
-
className:
|
|
93
|
-
[
|
|
94
|
-
[
|
|
92
|
+
ref: K,
|
|
93
|
+
rows: t.rows ?? 3,
|
|
94
|
+
className: w(e.input, B, {
|
|
95
|
+
[e.disabled]: l,
|
|
96
|
+
[e.readOnly]: i,
|
|
97
|
+
[e[`input-text-align_${C}`]]: !!C
|
|
95
98
|
}),
|
|
96
|
-
disabled:
|
|
97
|
-
maxLength:
|
|
98
|
-
...
|
|
99
|
-
...
|
|
100
|
-
onChange:
|
|
99
|
+
disabled: l,
|
|
100
|
+
maxLength: t.maxLength,
|
|
101
|
+
...b,
|
|
102
|
+
...D ? { value: f } : { defaultValue: String(m ?? "") },
|
|
103
|
+
onChange: V,
|
|
104
|
+
tabIndex: i ? -1 : b.tabIndex,
|
|
105
|
+
onMouseDown: (L) => {
|
|
106
|
+
$(L), b.onMouseDown?.(L);
|
|
107
|
+
}
|
|
101
108
|
}
|
|
102
109
|
);
|
|
103
110
|
}
|
|
104
111
|
const {
|
|
105
|
-
onChange:
|
|
106
|
-
multiline:
|
|
107
|
-
...
|
|
112
|
+
onChange: r,
|
|
113
|
+
multiline: a,
|
|
114
|
+
...s
|
|
108
115
|
} = T;
|
|
109
116
|
return /* @__PURE__ */ n(
|
|
110
117
|
"input",
|
|
111
118
|
{
|
|
112
|
-
...
|
|
113
|
-
ref:
|
|
114
|
-
className:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
...s,
|
|
120
|
+
ref: J,
|
|
121
|
+
className: w(
|
|
122
|
+
e.input,
|
|
123
|
+
e[`input-text-size_${M}`],
|
|
124
|
+
B,
|
|
118
125
|
{
|
|
119
|
-
[
|
|
120
|
-
[
|
|
126
|
+
[e.disabled]: l,
|
|
127
|
+
[e.readOnly]: i,
|
|
128
|
+
[e[`input-text-align_${C}`]]: !!C
|
|
121
129
|
}
|
|
122
130
|
),
|
|
123
|
-
disabled:
|
|
124
|
-
type:
|
|
125
|
-
...
|
|
126
|
-
onChange:
|
|
131
|
+
disabled: l,
|
|
132
|
+
type: t.type ?? "text",
|
|
133
|
+
...D ? { value: f } : { defaultValue: String(m ?? "") },
|
|
134
|
+
onChange: V,
|
|
135
|
+
tabIndex: i ? -1 : s.tabIndex,
|
|
136
|
+
onMouseDown: (g) => {
|
|
137
|
+
$(g), s.onMouseDown?.(g);
|
|
138
|
+
}
|
|
127
139
|
}
|
|
128
140
|
);
|
|
129
|
-
},
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
typeof
|
|
132
|
-
|
|
141
|
+
}, X = ee(() => x === "white" ? e.primary : x === "gray" ? e.secondary : e[x], [x]);
|
|
142
|
+
return /* @__PURE__ */ N(u, { w: "full", gap: j.sm, className: A, children: [
|
|
143
|
+
typeof d == "string" ? /* @__PURE__ */ n(
|
|
144
|
+
y,
|
|
133
145
|
{
|
|
134
146
|
variant: "body-2",
|
|
135
147
|
fontWeight: "regular",
|
|
136
148
|
colorName: "tertiary",
|
|
137
|
-
className:
|
|
138
|
-
children:
|
|
149
|
+
className: H,
|
|
150
|
+
children: d
|
|
139
151
|
}
|
|
140
|
-
) :
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
152
|
+
) : d,
|
|
153
|
+
/* @__PURE__ */ N(
|
|
154
|
+
u,
|
|
143
155
|
{
|
|
144
156
|
row: !0,
|
|
145
|
-
alignItems:
|
|
157
|
+
alignItems: o ? "flex-start" : "center",
|
|
146
158
|
w: "full",
|
|
147
|
-
gap:
|
|
148
|
-
className:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
159
|
+
gap: j.md,
|
|
160
|
+
className: w(
|
|
161
|
+
e["input-container"],
|
|
162
|
+
X,
|
|
163
|
+
e[M],
|
|
152
164
|
{
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
165
|
+
[e.error]: I,
|
|
166
|
+
[e.disabled]: l,
|
|
167
|
+
[e.multiline]: o,
|
|
168
|
+
[e.readOnly]: i,
|
|
169
|
+
[e["container-hover"]]: !l && !i
|
|
156
170
|
},
|
|
157
|
-
|
|
171
|
+
P
|
|
158
172
|
),
|
|
159
173
|
children: [
|
|
160
|
-
|
|
161
|
-
/* @__PURE__ */ n(
|
|
162
|
-
|
|
163
|
-
_ && /* @__PURE__ */ n(
|
|
174
|
+
O && /* @__PURE__ */ n(u, { flex: "none", children: O }),
|
|
175
|
+
/* @__PURE__ */ n(u, { flex: "1", children: U() }),
|
|
176
|
+
W && f && !l && /* @__PURE__ */ n(u, { flex: "none", children: /* @__PURE__ */ n("span", { className: e["clear-button"], onClick: Q, children: /* @__PURE__ */ n(te, {}) }) }),
|
|
177
|
+
_ && /* @__PURE__ */ n(u, { flex: "none", children: _ })
|
|
164
178
|
]
|
|
165
179
|
}
|
|
166
180
|
),
|
|
167
|
-
(
|
|
168
|
-
typeof
|
|
169
|
-
|
|
181
|
+
(h || o) && /* @__PURE__ */ N(u, { row: !0, gap: 10, w: "full", children: [
|
|
182
|
+
typeof h == "string" ? /* @__PURE__ */ n(
|
|
183
|
+
y,
|
|
170
184
|
{
|
|
171
185
|
variant: "caption-1",
|
|
172
186
|
colorName: "tertiary",
|
|
173
|
-
className:
|
|
174
|
-
children:
|
|
187
|
+
className: q,
|
|
188
|
+
children: h
|
|
175
189
|
}
|
|
176
|
-
) :
|
|
177
|
-
|
|
178
|
-
|
|
190
|
+
) : h,
|
|
191
|
+
o && t.maxLength && /* @__PURE__ */ n(
|
|
192
|
+
y,
|
|
179
193
|
{
|
|
180
194
|
right: !0,
|
|
181
195
|
ml: "auto",
|
|
182
196
|
flex: "none",
|
|
183
197
|
variant: "caption-1",
|
|
184
198
|
colorName: "tertiary",
|
|
185
|
-
children: `${
|
|
199
|
+
children: `${f.length}/${t.maxLength}`
|
|
186
200
|
}
|
|
187
201
|
)
|
|
188
202
|
] }),
|
|
189
|
-
|
|
190
|
-
|
|
203
|
+
E && I && /* @__PURE__ */ n(
|
|
204
|
+
y,
|
|
191
205
|
{
|
|
192
206
|
variant: "body-2",
|
|
193
207
|
colorName: "negative",
|
|
194
208
|
fontWeight: "regular",
|
|
195
|
-
className:
|
|
196
|
-
children:
|
|
209
|
+
className: G,
|
|
210
|
+
children: E
|
|
197
211
|
}
|
|
198
212
|
)
|
|
199
213
|
] });
|
|
200
214
|
});
|
|
201
|
-
|
|
215
|
+
ae.displayName = "Input";
|
|
202
216
|
export {
|
|
203
|
-
|
|
217
|
+
ae as Input
|
|
204
218
|
};
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { css as r } from "@emotion/css";
|
|
2
|
-
import { typography as
|
|
3
|
-
import { theme as
|
|
4
|
-
const { color:
|
|
2
|
+
import { typography as t } from "../../../styles/utils/typography.js";
|
|
3
|
+
import { theme as i } from "../../../utils/theme/index.js";
|
|
4
|
+
const { color: o, spacing: e } = i, a = r({
|
|
5
5
|
opacity: 0.6,
|
|
6
6
|
cursor: "not-allowed"
|
|
7
|
-
}),
|
|
7
|
+
}), n = r({
|
|
8
|
+
cursor: "default",
|
|
9
|
+
"&:hover": {
|
|
10
|
+
cursor: "default"
|
|
11
|
+
}
|
|
12
|
+
}), l = r({
|
|
13
|
+
"&:hover": {
|
|
14
|
+
backgroundColor: o.fill.neutralPrimaryHover
|
|
15
|
+
}
|
|
16
|
+
}), g = {
|
|
8
17
|
"input-container": r({
|
|
9
|
-
backgroundColor:
|
|
10
|
-
border: `1px solid ${
|
|
11
|
-
padding: `${
|
|
18
|
+
backgroundColor: o.fill.accentSecondary,
|
|
19
|
+
border: `1px solid ${o.border.neutralAlphaBasic}`,
|
|
20
|
+
padding: `${e.md} ${e.lg}`,
|
|
12
21
|
borderRadius: 12,
|
|
13
22
|
minHeight: 40,
|
|
14
23
|
width: "100%",
|
|
@@ -16,62 +25,61 @@ const { color: t, spacing: o } = n, i = r({
|
|
|
16
25
|
"& textarea": {
|
|
17
26
|
resize: "none"
|
|
18
27
|
},
|
|
19
|
-
[`&:not(.${i}):hover`]: {
|
|
20
|
-
backgroundColor: t.fill.neutralPrimaryHover
|
|
21
|
-
},
|
|
22
28
|
"&:focus-within": {
|
|
23
|
-
borderColor:
|
|
24
|
-
|
|
25
|
-
borderColor:
|
|
29
|
+
borderColor: o.border.accentPrimary,
|
|
30
|
+
"&:hover": {
|
|
31
|
+
borderColor: o.border.accentPrimary
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
}),
|
|
29
35
|
input: r({
|
|
30
|
-
...
|
|
31
|
-
...
|
|
36
|
+
...t.common,
|
|
37
|
+
...t.body1,
|
|
32
38
|
background: "transparent",
|
|
33
39
|
width: "100%",
|
|
34
|
-
color:
|
|
40
|
+
color: o.text.primary,
|
|
35
41
|
"&::placeholder": {
|
|
36
|
-
color:
|
|
42
|
+
color: o.text.tertiary,
|
|
37
43
|
textOverflow: "ellipsis"
|
|
38
44
|
}
|
|
39
45
|
}),
|
|
40
|
-
"input-text-size_sm": r({ ...
|
|
41
|
-
"input-text-size_md": r({ ...
|
|
46
|
+
"input-text-size_sm": r({ ...t.body2 }),
|
|
47
|
+
"input-text-size_md": r({ ...t.body2 }),
|
|
42
48
|
"input-text-align_left": r({ textAlign: "left" }),
|
|
43
49
|
"input-text-align_center": r({ textAlign: "center" }),
|
|
44
50
|
"input-text-align_right": r({ textAlign: "right" }),
|
|
45
51
|
sm: r({
|
|
46
52
|
height: 40,
|
|
47
|
-
padding:
|
|
53
|
+
padding: e.md
|
|
48
54
|
}),
|
|
49
55
|
md: r({
|
|
50
56
|
height: 48,
|
|
51
|
-
padding: `14px ${
|
|
57
|
+
padding: `14px ${e.lg} 14px ${e.lg}`
|
|
52
58
|
}),
|
|
53
59
|
error: r({
|
|
54
|
-
borderColor:
|
|
60
|
+
borderColor: o.border.negativePrimary
|
|
55
61
|
}),
|
|
56
|
-
disabled:
|
|
62
|
+
disabled: a,
|
|
63
|
+
readOnly: n,
|
|
64
|
+
"container-hover": l,
|
|
57
65
|
multiline: r({
|
|
58
66
|
height: "auto"
|
|
59
67
|
}),
|
|
60
68
|
primary: r({
|
|
61
|
-
background:
|
|
69
|
+
background: o.fill.bgPrimary
|
|
62
70
|
}),
|
|
63
71
|
secondary: r({
|
|
64
|
-
background:
|
|
72
|
+
background: o.fill.bgSecondary
|
|
65
73
|
}),
|
|
66
74
|
"clear-button": r({
|
|
67
75
|
cursor: "pointer",
|
|
68
|
-
color:
|
|
76
|
+
color: o.text.tertiary,
|
|
69
77
|
height: 20,
|
|
70
78
|
"&:hover": {
|
|
71
|
-
color:
|
|
79
|
+
color: o.text.primary
|
|
72
80
|
}
|
|
73
81
|
})
|
|
74
82
|
};
|
|
75
83
|
export {
|
|
76
|
-
|
|
84
|
+
g as styles
|
|
77
85
|
};
|
|
@@ -8,10 +8,10 @@ import { MarkdownShortcutPlugin as U } from "@lexical/react/LexicalMarkdownShort
|
|
|
8
8
|
import { OnChangePlugin as W } from "@lexical/react/LexicalOnChangePlugin";
|
|
9
9
|
import { TablePlugin as H } from "@lexical/react/LexicalTablePlugin";
|
|
10
10
|
import { useState as u, useMemo as a, useCallback as p } from "react";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { MarkdownTextEditorLocaleProvider as z } from "./MarkdownTextEditor.locale.js";
|
|
11
|
+
import { MARKDOWN_TOOLBAR_DEFAULT_ACTIONS as K } from "./MarkdownTextEditor.const.js";
|
|
12
|
+
import { MarkdownTextEditorLocaleProvider as q } from "./MarkdownTextEditor.locale.js";
|
|
14
13
|
import { EDITOR_TRANSFORMERS as g } from "./transformers/index.js";
|
|
14
|
+
import { getEditorConfig as z } from "./configs/editor.config.js";
|
|
15
15
|
import { EditorStateContext as G } from "./contexts/EditorStateContext/EditorStateContext.js";
|
|
16
16
|
import { ToolbarContext as J } from "./contexts/ToolbarContext/ToolbarContext.js";
|
|
17
17
|
import { EditorToolbar as Q } from "./components/EditorToolbar/EditorToolbar.js";
|
|
@@ -40,7 +40,7 @@ function No({
|
|
|
40
40
|
fieldClassName: R,
|
|
41
41
|
previewClassName: v
|
|
42
42
|
}) {
|
|
43
|
-
const [d, A] = u(""), [i, N] = u(!1), { availableActions: s, onImagesUpload: O } = P || {}, I = a(() =>
|
|
43
|
+
const [d, A] = u(""), [i, N] = u(!1), { availableActions: s, onImagesUpload: O } = P || {}, I = a(() => z(), []), L = a(
|
|
44
44
|
() => ({
|
|
45
45
|
isEditable: !m,
|
|
46
46
|
isPreviewMode: i,
|
|
@@ -49,7 +49,7 @@ function No({
|
|
|
49
49
|
}),
|
|
50
50
|
[m, i, d]
|
|
51
51
|
), F = a(() => ({
|
|
52
|
-
availableActions: s ||
|
|
52
|
+
availableActions: s || K
|
|
53
53
|
}), [s]), f = p(
|
|
54
54
|
(t) => {
|
|
55
55
|
A(t), r.onMarkdownChange && r.onMarkdownChange(t);
|
|
@@ -64,7 +64,7 @@ function No({
|
|
|
64
64
|
},
|
|
65
65
|
[f, r]
|
|
66
66
|
);
|
|
67
|
-
return /* @__PURE__ */ o(
|
|
67
|
+
return /* @__PURE__ */ o(q, { locale: M, children: /* @__PURE__ */ o(D, { initialConfig: I, children: /* @__PURE__ */ o(G.Provider, { value: L, children: /* @__PURE__ */ c(J.Provider, { value: F, children: [
|
|
68
68
|
/* @__PURE__ */ c(
|
|
69
69
|
h,
|
|
70
70
|
{
|
|
@@ -3,12 +3,12 @@ import { cx as k } from "@emotion/css";
|
|
|
3
3
|
import { useState as y, useCallback as h, useMemo as B, Fragment as I } from "react";
|
|
4
4
|
import P from "../../../../../../assets/svg/markdown/dots-horizontal.svg.js";
|
|
5
5
|
import { rowStyle as S, rowStyleInteractive as j } from "./ActionMenuButton.styles.js";
|
|
6
|
+
import { IconButton as z } from "../../../../IconButton/IconButton.js";
|
|
6
7
|
import { Box as c } from "../../../../../builders/Box/Box.js";
|
|
7
|
-
import { theme as
|
|
8
|
-
import { Text as
|
|
9
|
-
import { Popover as
|
|
10
|
-
|
|
11
|
-
const { color: x, spacing: v } = z;
|
|
8
|
+
import { theme as A } from "../../../../../../utils/theme/index.js";
|
|
9
|
+
import { Text as O } from "../../../../../builders/Text/Text.js";
|
|
10
|
+
import { Popover as T } from "../../../../../shared/Popover/Popover.js";
|
|
11
|
+
const { color: x, spacing: v } = A;
|
|
12
12
|
function K({
|
|
13
13
|
groups: n,
|
|
14
14
|
toolbarVisibleActionsCount: m,
|
|
@@ -40,7 +40,7 @@ function K({
|
|
|
40
40
|
color: x.icon.tertiary
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
43
|
+
/* @__PURE__ */ e(O, { variant: "body-2", children: o.label })
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
46
|
o.id
|
|
@@ -67,13 +67,13 @@ function K({
|
|
|
67
67
|
] }, t.flatMap((i) => i.id).join("-"));
|
|
68
68
|
}), [n, f, m]);
|
|
69
69
|
return /* @__PURE__ */ e(
|
|
70
|
-
|
|
70
|
+
T,
|
|
71
71
|
{
|
|
72
72
|
content: /* @__PURE__ */ e(c, { flex: !0, children: g }),
|
|
73
73
|
placement: "bottom",
|
|
74
74
|
open: w,
|
|
75
75
|
onChange: a,
|
|
76
|
-
children: /* @__PURE__ */ e(
|
|
76
|
+
children: /* @__PURE__ */ e(z, { size: "xs", color: "no-bg", disabled: r, children: /* @__PURE__ */ e(P, {}) })
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
@@ -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",
|