@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.
Files changed (63) hide show
  1. package/dist/components/builders/Modal/Modal.js +3 -3
  2. package/dist/components/builders/Modal/ModalFooter/ModalFooter.js +7 -7
  3. package/dist/components/builders/Modal/ModalHeader/ModalHeader.js +15 -15
  4. package/dist/components/builders/Modal/ModalMain/styles.js +3 -3
  5. package/dist/components/builders/Modal/styles.js +2 -2
  6. package/dist/components/builders/Table/Table.js +66 -58
  7. package/dist/components/builders/Table/Table.utils.js +5 -5
  8. package/dist/components/builders/Table/TableBodyRow/TableBodyRow.js +5 -5
  9. package/dist/components/builders/Table/TableHeadRow/TableHeadRow.js +4 -4
  10. package/dist/components/builders/Table/TablePagination/TablePagination.js +44 -44
  11. package/dist/components/builders/Table/TableWrapper/TableWrapper.js +19 -19
  12. package/dist/components/charts/LineChart/constants.js +16 -16
  13. package/dist/components/charts/LineChart/utils.js +2 -2
  14. package/dist/components/charts/PieProgressChart/constants.js +16 -10
  15. package/dist/components/controls/Button/Button.js +35 -35
  16. package/dist/components/controls/Button/styles.js +4 -4
  17. package/dist/components/controls/Checkbox/styles.js +7 -7
  18. package/dist/components/controls/IconButton/styles.js +27 -27
  19. package/dist/components/controls/Input/styles.js +10 -10
  20. package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.js +32 -32
  21. package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.js +13 -13
  22. package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.styles.js +2 -2
  23. package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/EditorToolbar.js +43 -43
  24. package/dist/components/controls/MarkdownTextEditor/nodes/CustomLinkNode/parts/CustomLinkNodeComponent/CustomLinkNodeComponent.styles.js +3 -3
  25. package/dist/components/controls/MarkdownTextEditor/nodes/ImageRowNode/parts/ImageRowNodeComponent/ImageRowNodeComponent.styles.js +2 -2
  26. package/dist/components/controls/MarkdownTextEditor/themes/editor.theme.js +1 -1
  27. package/dist/components/controls/OtpInput/styles.js +11 -11
  28. package/dist/components/controls/RadioGroup/Radio.js +48 -48
  29. package/dist/components/controls/SegmentControl/SegmentControl.js +12 -12
  30. package/dist/components/controls/SegmentControl/styles.js +8 -8
  31. package/dist/components/controls/Select/styles.js +19 -19
  32. package/dist/components/controls/Switch/styles.js +12 -12
  33. package/dist/components/controls/Tabs/Tabs.js +10 -10
  34. package/dist/components/shared/Avatar/Avatar.js +8 -8
  35. package/dist/components/shared/Badge/Badge.js +40 -40
  36. package/dist/components/shared/Hint/styles.js +6 -6
  37. package/dist/components/shared/MarkdownText/MarkdownText.js +10 -10
  38. package/dist/components/shared/MarkdownText/MarkdownText.styles.js +4 -4
  39. package/dist/components/shared/Popover/PopoverContent/PopoverContent.js +2 -2
  40. package/dist/components/shared/Skeleton/Skeleton.js +11 -11
  41. package/dist/components/shared/Tag/Tag.js +14 -14
  42. package/dist/components/shared/Toast/Toast.js +30 -30
  43. package/dist/components/shared/Tooltip/Tooltip.js +28 -28
  44. package/dist/components/shared/Tooltip/constants.js +3 -3
  45. package/dist/index.js +37 -34
  46. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.const.d.ts +8 -0
  47. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.d.ts +12 -0
  48. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.context.js +12 -0
  49. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +1 -1
  50. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.js +37 -26
  51. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts +30 -5
  52. package/dist/providers/ThemeProviderScoped/index.d.ts +1 -0
  53. package/dist/root.css +1 -1
  54. package/dist/ui-kit.cjs +8 -8
  55. package/dist/ui-kit.css +1 -1
  56. package/dist/utils/theme/index.d.ts +141 -141
  57. package/dist/utils/theme/index.js +14 -14
  58. package/dist/utils/theme/palette.d.ts +184 -0
  59. package/dist/utils/theme/palette.js +187 -0
  60. package/package.json +1 -1
  61. package/dist/providers/ThemeProviderScoped/styles.module.scss.js +0 -7
  62. package/dist/utils/theme/color.d.ts +0 -184
  63. package/dist/utils/theme/color.js +0 -187
@@ -44,75 +44,75 @@ const c = r({
44
44
  custom: r({})
45
45
  }, n = {
46
46
  primary: r({
47
- backgroundColor: o.color.fill.accentPrimary,
48
- ":where(&) svg": { color: o.color.icon.primaryInverse },
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.accentPrimaryHover,
51
- ":where(&) svg": { color: o.color.icon.primaryInverse }
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.accentSecondary,
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.accentSecondaryHover,
59
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.negativeSecondary,
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.negativeSecondaryHover,
67
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.positiveSecondary,
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.positiveSecondaryHover,
75
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.warningSecondary,
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.warningSecondaryHover,
83
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.neutralSecondary,
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.neutralSecondaryHover,
91
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.transferSecondary,
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.transferSecondaryHover,
99
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.bgPrimary,
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.bgSecondary,
107
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.bgSecondary,
115
- ":where(&) svg": { color: o.color.icon.primaryHover }
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.neutralPrimaryHover
14
+ backgroundColor: o.fill.neutral_primary_hover
15
15
  }
16
- }), g = {
16
+ }), p = {
17
17
  "input-container": r({
18
- backgroundColor: o.fill.accentSecondary,
19
- border: `1px solid ${o.border.neutralAlphaBasic}`,
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.accentPrimary,
29
+ borderColor: o.border.accent_primary,
30
30
  "&:hover": {
31
- borderColor: o.border.accentPrimary
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.negativePrimary
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.bgPrimary
69
+ background: o.fill.bg_primary
70
70
  }),
71
71
  secondary: r({
72
- background: o.fill.bgSecondary
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
- g as styles
84
+ p as styles
85
85
  };
@@ -1,17 +1,17 @@
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 B } from "@lexical/react/LexicalAutoFocusPlugin";
4
- import { LexicalComposer as D } from "@lexical/react/LexicalComposer";
5
- import { HashtagPlugin as V } from "@lexical/react/LexicalHashtagPlugin";
6
- import { ListPlugin as j } from "@lexical/react/LexicalListPlugin";
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";
10
10
  import { useState as u, useMemo as a, useCallback as p } from "react";
11
- import { getEditorConfig as K } from "./configs/editor.config.js";
12
- import { MARKDOWN_TOOLBAR_DEFAULT_ACTIONS as q } from "./MarkdownTextEditor.const.js";
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";
@@ -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 No({
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: P,
34
- defaultMarkdown: b,
33
+ toolbar: b,
34
+ defaultMarkdown: P,
35
35
  events: r = {},
36
36
  className: x,
37
- labelClassName: S,
38
- toolbarClassName: T,
39
- editorClassName: E,
37
+ labelClassName: T,
38
+ toolbarClassName: E,
39
+ editorClassName: S,
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(() => K(), []), L = a(
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: N,
47
+ setPreviewMode: A,
48
48
  markdownText: d
49
49
  }),
50
50
  [m, i, d]
51
- ), F = a(() => ({
52
- availableActions: s || q
51
+ ), L = a(() => ({
52
+ availableActions: s || K
53
53
  }), [s]), f = p(
54
54
  (t) => {
55
- A(t), r.onMarkdownChange && r.onMarkdownChange(t);
55
+ N(t), r.onMarkdownChange && r.onMarkdownChange(t);
56
56
  },
57
57
  [r]
58
- ), _ = p(
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(z, { locale: M, children: /* @__PURE__ */ o(D, { initialConfig: I, children: /* @__PURE__ */ o(G.Provider, { value: L, children: /* @__PURE__ */ c(J.Provider, { value: F, children: [
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.neutralSecondary,
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: S,
84
+ className: T,
85
85
  children: l
86
86
  }
87
87
  ) : null,
88
88
  /* @__PURE__ */ o(
89
89
  Q,
90
90
  {
91
- onImagesUpload: O,
92
- className: T
91
+ onImagesUpload: _,
92
+ className: E
93
93
  }
94
94
  ),
95
95
  /* @__PURE__ */ o(
96
96
  h,
97
97
  {
98
- backgroundColor: n.fill.neutralPrimary,
99
- border: `1px solid ${n.border.neutralAlphaBasic}`,
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: E,
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(V, {}),
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: b }),
119
+ /* @__PURE__ */ o(oo, { defaultValue: P }),
120
120
  /* @__PURE__ */ o(ro, {}),
121
121
  C
122
122
  ] }) }) }) });
123
123
  }
124
124
  export {
125
- No as MarkdownTextEditor
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 B, Fragment as I } from "react";
4
- import P from "../../../../../../assets/svg/markdown/dots-horizontal.svg.js";
5
- import { rowStyle as S, rowStyleInteractive as j } from "./ActionMenuButton.styles.js";
6
- import { IconButton as z } from "../../../../IconButton/IconButton.js";
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 A } from "../../../../../../utils/theme/index.js";
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 } = A;
12
- function K({
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(S, !r && j),
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 = B(() => n.map((t, o) => {
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(I, { children: [
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.neutralAlphaBasic
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(z, { size: "xs", color: "no-bg", disabled: r, children: /* @__PURE__ */ e(P, {}) })
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
- K as ActionMenuButton
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.bgSecondary
7
+ backgroundColor: o.fill.bg_secondary
8
8
  },
9
9
  ":active": {
10
- backgroundColor: o.fill.bgSecondary
10
+ backgroundColor: o.fill.bg_secondary
11
11
  }
12
12
  });
13
13
  export {
@@ -2,21 +2,21 @@ import { jsx as o, jsxs as w } from "react/jsx-runtime";
2
2
  import { INSERT_ORDERED_LIST_COMMAND as ie, INSERT_UNORDERED_LIST_COMMAND as se } from "@lexical/list";
3
3
  import { useLexicalComposerContext as ce } from "@lexical/react/LexicalComposerContext";
4
4
  import { INSERT_TABLE_COMMAND as le } from "@lexical/table";
5
- import { $getSelection as ae, $isRangeSelection as ue, $createTextNode as de, $insertNodes as me, FORMAT_ELEMENT_COMMAND as D, FORMAT_TEXT_COMMAND as x } from "lexical";
5
+ import { $getSelection as ae, $isRangeSelection as ue, $createTextNode as de, $insertNodes as me, FORMAT_ELEMENT_COMMAND as P, FORMAT_TEXT_COMMAND as x } from "lexical";
6
6
  import pe from "lodash.debounce";
7
- import { useState as P, useRef as V, useMemo as p, useCallback as b, Fragment as fe, useEffect as he } from "react";
7
+ import { useState as B, useRef as V, useMemo as p, useCallback as b, Fragment as fe, useEffect as he } from "react";
8
8
  import be from "../../../../../assets/svg/markdown/eye.svg.js";
9
9
  import { useMarkdownTextEditorLocale as ve } from "../../MarkdownTextEditor.locale.js";
10
10
  import { previewStyles as Ce } from "./EditorToolbar.styles.js";
11
11
  import { defaultOnImagesUpload as ge } from "./EditorToolbar.utils.js";
12
12
  import { TextSizeSelect as Ee } from "./TextSizeSelect/TextSizeSelect.js";
13
13
  import { useToolbarActions as Te } from "../../hooks/useToolbarActions/useToolbarActions.js";
14
- import { createCustomLinkNode as Ae } from "../../nodes/CustomLinkNode/CustomLinkNode.utils.js";
15
- import { createImageRowNode as Le } from "../../nodes/ImageRowNode/ImageRowNode.utils.js";
14
+ import { createCustomLinkNode as Le } from "../../nodes/CustomLinkNode/CustomLinkNode.utils.js";
15
+ import { createImageRowNode as Ne } from "../../nodes/ImageRowNode/ImageRowNode.utils.js";
16
16
  import { MarkdownToolbarAction as c } from "../../hooks/useToolbarActions/useToolbarActions.const.js";
17
17
  import { LinkPopoverContent as q } from "./LinkPopoverContent/LinkPopoverContent.js";
18
18
  import { TablePopoverContent as X } from "./TablePopoverContent/TablePopoverContent.js";
19
- import { ActionMenuButton as Ne } from "./ActionMenuButton/ActionMenuButton.js";
19
+ import { ActionMenuButton as Ae } from "./ActionMenuButton/ActionMenuButton.js";
20
20
  import { useEditorStates as Me } from "../../contexts/EditorStateContext/EditorStateContext.hook.js";
21
21
  import { Popover as I } from "../../../../shared/Popover/Popover.js";
22
22
  import { IconButton as W } from "../../../IconButton/IconButton.js";
@@ -28,12 +28,12 @@ function eo({
28
28
  onImagesUpload: U = ge,
29
29
  className: J
30
30
  }) {
31
- const [d, Q] = P(11), [v, T] = P(null), [C, A] = P(
31
+ const [d, Q] = B(11), [v, T] = B(null), [C, L] = B(
32
32
  null
33
- ), L = V(null), { toolbar: Y } = ve(), S = Y.preview, [r] = ce(), { isEditable: F, isPreviewMode: f, setPreviewMode: Z } = Me(), { availableActionGroups: N } = Te(), k = V(null), m = p(() => !F || f, [F, f]), ee = p(() => f ? S.hide : S.show, [f, S]), { toolbarGroups: y, menuGroups: $ } = p(() => {
33
+ ), N = V(null), { toolbar: Y } = ve(), _ = Y.preview, [r] = ce(), { isEditable: F, isPreviewMode: f, setPreviewMode: Z } = Me(), { availableActionGroups: A } = Te(), S = V(null), m = p(() => !F || f, [F, f]), ee = p(() => f ? _.hide : _.show, [f, _]), { toolbarGroups: k, menuGroups: $ } = p(() => {
34
34
  const e = [], t = [];
35
35
  let s = 0;
36
- for (const i of N) {
36
+ for (const i of A) {
37
37
  const l = [], n = [];
38
38
  for (const a of i)
39
39
  s += 1, s <= d ? l.push(a) : n.push(a);
@@ -43,13 +43,13 @@ function eo({
43
43
  toolbarGroups: e,
44
44
  menuGroups: t
45
45
  };
46
- }, [N, d]), oe = p(() => typeof v == "number" && v > d - 1, [v, d]), te = p(() => typeof C == "number" && C > d - 1, [C, d]), G = b(
46
+ }, [A, d]), oe = p(() => typeof v == "number" && v > d - 1, [v, d]), te = p(() => typeof C == "number" && C > d - 1, [C, d]), y = b(
47
47
  (e) => {
48
48
  const { text: t, url: s } = e;
49
49
  r.update(() => {
50
50
  const i = ae();
51
51
  if (ue(i)) {
52
- const l = Ae({
52
+ const l = Le({
53
53
  text: t,
54
54
  url: s
55
55
  });
@@ -60,17 +60,17 @@ function eo({
60
60
  }), T(null);
61
61
  },
62
62
  [r]
63
- ), _ = b(
63
+ ), G = b(
64
64
  (e) => {
65
65
  const { rows: t, columns: s } = e;
66
66
  r.dispatchCommand(le, {
67
67
  rows: t,
68
68
  columns: s
69
- }), A(null);
69
+ }), L(null);
70
70
  },
71
71
  [r]
72
72
  ), j = b(() => {
73
- k.current && k.current.click();
73
+ S.current && S.current.click();
74
74
  }, []), ne = b(
75
75
  async (e) => {
76
76
  try {
@@ -79,7 +79,7 @@ function eo({
79
79
  return;
80
80
  const s = await U(t);
81
81
  r.update(() => {
82
- const i = Le(s);
82
+ const i = Ne(s);
83
83
  i && me([i]);
84
84
  });
85
85
  } catch (t) {
@@ -105,13 +105,13 @@ function eo({
105
105
  r.dispatchCommand(x, "strikethrough");
106
106
  },
107
107
  [c.ALIGN_LEFT]: () => {
108
- r.dispatchCommand(D, "left");
108
+ r.dispatchCommand(P, "left");
109
109
  },
110
110
  [c.ALIGN_CENTER]: () => {
111
- r.dispatchCommand(D, "center");
111
+ r.dispatchCommand(P, "center");
112
112
  },
113
113
  [c.ALIGN_RIGHT]: () => {
114
- r.dispatchCommand(D, "right");
114
+ r.dispatchCommand(P, "right");
115
115
  },
116
116
  [c.LINK]: () => {
117
117
  T(t);
@@ -120,7 +120,7 @@ function eo({
120
120
  j();
121
121
  },
122
122
  [c.TABLE]: () => {
123
- A(t);
123
+ L(t);
124
124
  },
125
125
  [c.BULLET_LIST]: () => {
126
126
  r.dispatchCommand(se, void 0);
@@ -131,8 +131,8 @@ function eo({
131
131
  })[e]();
132
132
  },
133
133
  [j, r]
134
- ), re = p(() => y.map((e, t) => {
135
- const s = y.slice(0, t).reduce((n, a) => n + a.length, 0);
134
+ ), re = p(() => k.map((e, t) => {
135
+ const s = k.slice(0, t).reduce((n, a) => n + a.length, 0);
136
136
  if (!e.length)
137
137
  return null;
138
138
  const i = e.map(
@@ -141,11 +141,11 @@ function eo({
141
141
  return u === c.LINK ? /* @__PURE__ */ o(
142
142
  I,
143
143
  {
144
- content: /* @__PURE__ */ o(q, { onSave: G }),
144
+ content: /* @__PURE__ */ o(q, { onSave: y }),
145
145
  placement: "bottom",
146
146
  open: v === h,
147
- onChange: (B) => {
148
- T(B ? h : null);
147
+ onChange: (D) => {
148
+ T(D ? h : null);
149
149
  },
150
150
  children: /* @__PURE__ */ o(W, { size: "xs", color: "no-bg", disabled: m, children: /* @__PURE__ */ o(n, {}) })
151
151
  },
@@ -153,11 +153,11 @@ function eo({
153
153
  ) : u === c.TABLE ? /* @__PURE__ */ o(
154
154
  I,
155
155
  {
156
- content: /* @__PURE__ */ o(X, { onSave: _ }),
156
+ content: /* @__PURE__ */ o(X, { onSave: G }),
157
157
  placement: "bottom",
158
158
  open: C === h,
159
- onChange: (B) => {
160
- A(B ? h : null);
159
+ onChange: (D) => {
160
+ L(D ? h : null);
161
161
  },
162
162
  children: /* @__PURE__ */ o(
163
163
  W,
@@ -190,25 +190,25 @@ function eo({
190
190
  {
191
191
  w: 1,
192
192
  h: 32,
193
- backgroundColor: E.border.neutralAlphaBasic
193
+ backgroundColor: E.border.neutral_alpha_basic
194
194
  }
195
195
  )
196
196
  ] }, e.flatMap((n) => n.id).join("-"));
197
197
  }), [
198
- y,
198
+ k,
199
199
  O,
200
200
  v,
201
201
  m,
202
202
  C,
203
- G,
204
- _
203
+ y,
204
+ G
205
205
  ]), H = b(() => {
206
- const e = L.current;
206
+ const e = N.current;
207
207
  if (!e)
208
208
  return;
209
209
  const t = e.clientWidth, s = 40, i = 4, l = 1, n = i + l + i + s + i;
210
210
  let a = t - n, u = 0;
211
- for (const M of N)
211
+ for (const M of A)
212
212
  if (M.length) {
213
213
  for (const h of M) {
214
214
  const g = s + i;
@@ -220,19 +220,19 @@ function eo({
220
220
  a -= l + i;
221
221
  }
222
222
  Q(u);
223
- }, [N]), K = p(() => pe(H, 20, {}), [H]);
223
+ }, [A]), K = p(() => pe(H, 20, {}), [H]);
224
224
  return he(() => {
225
- if (!L.current)
225
+ if (!N.current)
226
226
  return;
227
227
  const e = new ResizeObserver(() => {
228
228
  K();
229
229
  });
230
- return e.observe(L.current), () => e.disconnect();
230
+ return e.observe(N.current), () => e.disconnect();
231
231
  }, [K]), /* @__PURE__ */ w(
232
232
  R,
233
233
  {
234
- backgroundColor: E.fill.neutralPrimary,
235
- border: `1px solid ${E.border.neutralAlphaBasic}`,
234
+ backgroundColor: E.fill.neutral_primary,
235
+ border: `1px solid ${E.border.neutral_alpha_basic}`,
236
236
  borderRadius: Ie.md,
237
237
  flex: !0,
238
238
  row: !0,
@@ -245,7 +245,7 @@ function eo({
245
245
  /* @__PURE__ */ o(
246
246
  "input",
247
247
  {
248
- ref: k,
248
+ ref: S,
249
249
  type: "file",
250
250
  accept: "image/*",
251
251
  hidden: !0,
@@ -258,7 +258,7 @@ function eo({
258
258
  /* @__PURE__ */ o(
259
259
  I,
260
260
  {
261
- content: /* @__PURE__ */ o(q, { onSave: G }),
261
+ content: /* @__PURE__ */ o(q, { onSave: y }),
262
262
  placement: "bottom",
263
263
  open: oe,
264
264
  onChange: (e) => {
@@ -270,11 +270,11 @@ function eo({
270
270
  /* @__PURE__ */ o(
271
271
  I,
272
272
  {
273
- content: /* @__PURE__ */ o(X, { onSave: _ }),
273
+ content: /* @__PURE__ */ o(X, { onSave: G }),
274
274
  placement: "bottom",
275
275
  open: te,
276
276
  onChange: (e) => {
277
- e || A(null);
277
+ e || L(null);
278
278
  },
279
279
  children: /* @__PURE__ */ o("div", {})
280
280
  }
@@ -289,11 +289,11 @@ function eo({
289
289
  w: "full",
290
290
  ml: z.xs,
291
291
  overflow: "hidden",
292
- ref: L,
292
+ ref: N,
293
293
  children: [
294
294
  re,
295
295
  $.length ? /* @__PURE__ */ o(
296
- Ne,
296
+ Ae,
297
297
  {
298
298
  disabled: m,
299
299
  onAction: O,