@dss-kit/ui-kit 1.0.1 → 1.0.2

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.
@@ -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 { 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";
@@ -40,7 +40,7 @@ function Ao({
40
40
  fieldClassName: R,
41
41
  previewClassName: v
42
42
  }) {
43
- const [d, N] = u(""), [i, A] = u(!1), { availableActions: s, onImagesUpload: _ } = b || {}, O = a(() => K(), []), I = 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,
@@ -49,7 +49,7 @@ function Ao({
49
49
  }),
50
50
  [m, i, d]
51
51
  ), L = a(() => ({
52
- availableActions: s || q
52
+ availableActions: s || K
53
53
  }), [s]), f = p(
54
54
  (t) => {
55
55
  N(t), r.onMarkdownChange && r.onMarkdownChange(t);
@@ -64,7 +64,7 @@ function Ao({
64
64
  },
65
65
  [f, r]
66
66
  );
67
- return /* @__PURE__ */ o(z, { locale: M, children: /* @__PURE__ */ o(V, { initialConfig: O, children: /* @__PURE__ */ o(G.Provider, { value: I, children: /* @__PURE__ */ c(J.Provider, { value: L, 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
  {
@@ -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 { getEditorConfig as u } from "../../controls/MarkdownTextEditor/configs/editor.config.js";
10
- import { EDITOR_TRANSFORMERS as x } from "../../controls/MarkdownTextEditor/transformers/index.js";
11
- import { markdownTextStyle as w } from "./MarkdownText.styles.js";
12
- import { Text as E } from "../../builders/Text/Text.js";
13
- import { EditorStateContext as k } from "../../controls/MarkdownTextEditor/contexts/EditorStateContext/EditorStateContext.js";
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(k.Provider, { value: a, children: /* @__PURE__ */ o(
30
+ return r ? /* @__PURE__ */ o(E.Provider, { value: a, children: /* @__PURE__ */ o(
31
31
  d,
32
32
  {
33
33
  initialConfig: {
34
- ...u(),
34
+ ...k(),
35
35
  editable: !1,
36
36
  namespace: "ui-kit-markdown-text-viewer",
37
37
  editorState: () => {
38
- l(r, x);
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(w, i),
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
- E,
59
+ w,
60
60
  {
61
61
  variant: "body-2",
62
62
  colorName: "tertiary",
@@ -1,11 +1,11 @@
1
- @mixin breakpoint($breakpoint, $direction: max) {
2
- @if $direction == min {
3
- @media (min-width: $breakpoint) {
4
- @content;
5
- }
6
- } @else if $direction == max {
7
- @media (max-width: ($breakpoint - 1px)) {
8
- @content;
9
- }
10
- }
11
- }
1
+ @mixin breakpoint($breakpoint, $direction: max) {
2
+ @if $direction == min {
3
+ @media (min-width: $breakpoint) {
4
+ @content;
5
+ }
6
+ } @else if $direction == max {
7
+ @media (max-width: ($breakpoint - 1px)) {
8
+ @content;
9
+ }
10
+ }
11
+ }
@@ -1,3 +1,3 @@
1
- @forward "base";
2
- @forward "screen";
3
- @forward "semantic";
1
+ @forward "base";
2
+ @forward "screen";
3
+ @forward "semantic";
@@ -1,61 +1,61 @@
1
- @use "./base.scss";
2
-
3
- @mixin bp-1920($direction: max) {
4
- @include base.breakpoint(1920px, $direction) {
5
- @content;
6
- }
7
- }
8
-
9
- @mixin bp-1440($direction: max) {
10
- @include base.breakpoint(1440px, $direction) {
11
- @content;
12
- }
13
- }
14
-
15
- @mixin bp-1280($direction: max) {
16
- @include base.breakpoint(1280px, $direction) {
17
- @content;
18
- }
19
- }
20
-
21
- @mixin bp-1200($direction: max) {
22
- @include base.breakpoint(1200px, $direction) {
23
- @content;
24
- }
25
- }
26
-
27
- @mixin bp-1024($direction: max) {
28
- @include base.breakpoint(1024px, $direction) {
29
- @content;
30
- }
31
- }
32
-
33
- @mixin bp-992($direction: max) {
34
- @include base.breakpoint(992px, $direction) {
35
- @content;
36
- }
37
- }
38
-
39
- @mixin bp-768($direction: max) {
40
- @include base.breakpoint(768px, $direction) {
41
- @content;
42
- }
43
- }
44
-
45
- @mixin bp-576($direction: max) {
46
- @include base.breakpoint(576px, $direction) {
47
- @content;
48
- }
49
- }
50
-
51
- @mixin bp-480($direction: max) {
52
- @include base.breakpoint(480px, $direction) {
53
- @content;
54
- }
55
- }
56
-
57
- @mixin bp-375($direction: max) {
58
- @include base.breakpoint(375px, $direction) {
59
- @content;
60
- }
61
- }
1
+ @use "./base.scss";
2
+
3
+ @mixin bp-1920($direction: max) {
4
+ @include base.breakpoint(1920px, $direction) {
5
+ @content;
6
+ }
7
+ }
8
+
9
+ @mixin bp-1440($direction: max) {
10
+ @include base.breakpoint(1440px, $direction) {
11
+ @content;
12
+ }
13
+ }
14
+
15
+ @mixin bp-1280($direction: max) {
16
+ @include base.breakpoint(1280px, $direction) {
17
+ @content;
18
+ }
19
+ }
20
+
21
+ @mixin bp-1200($direction: max) {
22
+ @include base.breakpoint(1200px, $direction) {
23
+ @content;
24
+ }
25
+ }
26
+
27
+ @mixin bp-1024($direction: max) {
28
+ @include base.breakpoint(1024px, $direction) {
29
+ @content;
30
+ }
31
+ }
32
+
33
+ @mixin bp-992($direction: max) {
34
+ @include base.breakpoint(992px, $direction) {
35
+ @content;
36
+ }
37
+ }
38
+
39
+ @mixin bp-768($direction: max) {
40
+ @include base.breakpoint(768px, $direction) {
41
+ @content;
42
+ }
43
+ }
44
+
45
+ @mixin bp-576($direction: max) {
46
+ @include base.breakpoint(576px, $direction) {
47
+ @content;
48
+ }
49
+ }
50
+
51
+ @mixin bp-480($direction: max) {
52
+ @include base.breakpoint(480px, $direction) {
53
+ @content;
54
+ }
55
+ }
56
+
57
+ @mixin bp-375($direction: max) {
58
+ @include base.breakpoint(375px, $direction) {
59
+ @content;
60
+ }
61
+ }
@@ -1,31 +1,31 @@
1
- @use "./screen.scss";
2
-
3
- @mixin bp-xs($direction: max) {
4
- @include screen.bp-480($direction) {
5
- @content;
6
- }
7
- }
8
-
9
- @mixin bp-sm($direction: max) {
10
- @include screen.bp-576($direction) {
11
- @content;
12
- }
13
- }
14
-
15
- @mixin bp-md($direction: max) {
16
- @include screen.bp-768($direction) {
17
- @content;
18
- }
19
- }
20
-
21
- @mixin bp-lg($direction: max) {
22
- @include screen.bp-992($direction) {
23
- @content;
24
- }
25
- }
26
-
27
- @mixin bp-xl($direction: max) {
28
- @include screen.bp-1200($direction) {
29
- @content;
30
- }
31
- }
1
+ @use "./screen.scss";
2
+
3
+ @mixin bp-xs($direction: max) {
4
+ @include screen.bp-480($direction) {
5
+ @content;
6
+ }
7
+ }
8
+
9
+ @mixin bp-sm($direction: max) {
10
+ @include screen.bp-576($direction) {
11
+ @content;
12
+ }
13
+ }
14
+
15
+ @mixin bp-md($direction: max) {
16
+ @include screen.bp-768($direction) {
17
+ @content;
18
+ }
19
+ }
20
+
21
+ @mixin bp-lg($direction: max) {
22
+ @include screen.bp-992($direction) {
23
+ @content;
24
+ }
25
+ }
26
+
27
+ @mixin bp-xl($direction: max) {
28
+ @include screen.bp-1200($direction) {
29
+ @content;
30
+ }
31
+ }
@@ -1,3 +1,3 @@
1
- @mixin Inter {
2
- font-family: Inter, sans-serif;
3
- }
1
+ @mixin Inter {
2
+ font-family: Inter, sans-serif;
3
+ }
@@ -1 +1 @@
1
- @forward "font-family";
1
+ @forward "font-family";
@@ -1,5 +1,5 @@
1
- @forward "breakpoints";
2
- @forward "fonts";
3
- @forward "size";
4
- @forward "typography";
5
- @forward "style";
1
+ @forward "breakpoints";
2
+ @forward "fonts";
3
+ @forward "size";
4
+ @forward "typography";
5
+ @forward "style";
@@ -1 +1 @@
1
- @forward "modifiers";
1
+ @forward "modifiers";
@@ -1,41 +1,41 @@
1
- @mixin xxs-modifier {
2
- &_2xsSize {
3
- @content;
4
- }
5
- }
6
-
7
- @mixin xs-modifier {
8
- &_xsSize {
9
- @content;
10
- }
11
- }
12
-
13
- @mixin sm-modifier {
14
- &_smSize {
15
- @content;
16
- }
17
- }
18
-
19
- @mixin md-modifier {
20
- &_mdSize {
21
- @content;
22
- }
23
- }
24
-
25
- @mixin lg-modifier {
26
- &_lgSize {
27
- @content;
28
- }
29
- }
30
-
31
- @mixin xl-modifier {
32
- &_xlSize {
33
- @content;
34
- }
35
- }
36
-
37
- @mixin xxl-modifier {
38
- &_2xlSize {
39
- @content;
40
- }
1
+ @mixin xxs-modifier {
2
+ &_2xsSize {
3
+ @content;
4
+ }
5
+ }
6
+
7
+ @mixin xs-modifier {
8
+ &_xsSize {
9
+ @content;
10
+ }
11
+ }
12
+
13
+ @mixin sm-modifier {
14
+ &_smSize {
15
+ @content;
16
+ }
17
+ }
18
+
19
+ @mixin md-modifier {
20
+ &_mdSize {
21
+ @content;
22
+ }
23
+ }
24
+
25
+ @mixin lg-modifier {
26
+ &_lgSize {
27
+ @content;
28
+ }
29
+ }
30
+
31
+ @mixin xl-modifier {
32
+ &_xlSize {
33
+ @content;
34
+ }
35
+ }
36
+
37
+ @mixin xxl-modifier {
38
+ &_2xlSize {
39
+ @content;
40
+ }
41
41
  }
@@ -1 +1 @@
1
- @forward "variants";
1
+ @forward "variants";
@@ -1,34 +1,34 @@
1
- @mixin style-variant-text($map, $pseudo-class: null, $postfix: "") {
2
- @each $style, $color in $map {
3
- &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
4
- color: $color;
5
- }
6
- }
7
- }
8
-
9
- @mixin style-variant-border($width: 1px, $map, $pseudo-class: null, $postfix: "") {
10
- border: $width solid transparent;
11
- @each $style, $color in $map {
12
- &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
13
- border-color: $color;
14
- }
15
- }
16
- }
17
-
18
- @mixin style-variant-bg($map, $pseudo-class: null, $postfix: "") {
19
- @each $style, $color in $map {
20
- &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
21
- background-color: $color;
22
- }
23
- }
24
- }
25
-
26
- @mixin style-variant-svg($map, $pseudo-class: null, $postfix: "") {
27
- @each $style, $color in $map {
28
- &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
29
- svg {
30
- color: $color;
31
- }
32
- }
33
- }
34
- }
1
+ @mixin style-variant-text($map, $pseudo-class: null, $postfix: "") {
2
+ @each $style, $color in $map {
3
+ &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
4
+ color: $color;
5
+ }
6
+ }
7
+ }
8
+
9
+ @mixin style-variant-border($width: 1px, $map, $pseudo-class: null, $postfix: "") {
10
+ border: $width solid transparent;
11
+ @each $style, $color in $map {
12
+ &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
13
+ border-color: $color;
14
+ }
15
+ }
16
+ }
17
+
18
+ @mixin style-variant-bg($map, $pseudo-class: null, $postfix: "") {
19
+ @each $style, $color in $map {
20
+ &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
21
+ background-color: $color;
22
+ }
23
+ }
24
+ }
25
+
26
+ @mixin style-variant-svg($map, $pseudo-class: null, $postfix: "") {
27
+ @each $style, $color in $map {
28
+ &_#{$style}#{$postfix}#{if($pseudo-class, ':' + $pseudo-class, '')} {
29
+ svg {
30
+ color: $color;
31
+ }
32
+ }
33
+ }
34
+ }
@@ -1,33 +1,33 @@
1
- @use "sass:map";
2
-
3
- $font-weight: (
4
- regular: 400,
5
- medium: 500,
6
- semibold: 600,
7
- bold: 700,
8
- ) !default;
9
-
10
- @function font-weight-token($name) {
11
- @if not map.has-key($font-weight, $name) {
12
- @error "Unknown font-weight token `#{$name}`";
13
- }
14
- @return map.get($font-weight, $name);
15
- }
16
-
17
- @mixin font-weight($name) {
18
- font-weight: font-weight-token($name);
19
- }
20
-
21
- // опциональные алиасы ради DX/совместимости
22
- @mixin font-regular {
23
- @include font-weight(regular);
24
- }
25
- @mixin font-medium {
26
- @include font-weight(medium);
27
- }
28
- @mixin font-semibold {
29
- @include font-weight(semibold);
30
- }
31
- @mixin font-bold {
32
- @include font-weight(bold);
33
- }
1
+ @use "sass:map";
2
+
3
+ $font-weight: (
4
+ regular: 400,
5
+ medium: 500,
6
+ semibold: 600,
7
+ bold: 700,
8
+ ) !default;
9
+
10
+ @function font-weight-token($name) {
11
+ @if not map.has-key($font-weight, $name) {
12
+ @error "Unknown font-weight token `#{$name}`";
13
+ }
14
+ @return map.get($font-weight, $name);
15
+ }
16
+
17
+ @mixin font-weight($name) {
18
+ font-weight: font-weight-token($name);
19
+ }
20
+
21
+ // опциональные алиасы ради DX/совместимости
22
+ @mixin font-regular {
23
+ @include font-weight(regular);
24
+ }
25
+ @mixin font-medium {
26
+ @include font-weight(medium);
27
+ }
28
+ @mixin font-semibold {
29
+ @include font-weight(semibold);
30
+ }
31
+ @mixin font-bold {
32
+ @include font-weight(bold);
33
+ }