@snack-uikit/markdown 0.2.0 → 0.3.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/CHANGELOG.md +11 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/components/Markdown/styles.module.scss +20 -20
- package/src/components/MarkdownEditor/styles.module.scss +15 -15
- package/src/helperComponents/Blockquote/styles.module.scss +5 -5
- package/src/helperComponents/Code/styles.module.scss +6 -6
- package/src/helperComponents/Divider/styles.module.scss +2 -2
- package/src/helperComponents/Table/styles.module.scss +7 -7
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Markdown",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.3.0",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"license": "Apache-2.0",
|
|
36
36
|
"scripts": {},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@snack-uikit/code-editor": "0.
|
|
39
|
-
"@snack-uikit/divider": "3.
|
|
40
|
-
"@snack-uikit/fields": "0.
|
|
41
|
-
"@snack-uikit/link": "0.
|
|
42
|
-
"@snack-uikit/toggles": "0.
|
|
43
|
-
"@snack-uikit/typography": "0.
|
|
38
|
+
"@snack-uikit/code-editor": "0.4.0",
|
|
39
|
+
"@snack-uikit/divider": "3.2.0",
|
|
40
|
+
"@snack-uikit/fields": "0.31.0",
|
|
41
|
+
"@snack-uikit/link": "0.15.0",
|
|
42
|
+
"@snack-uikit/toggles": "0.12.0",
|
|
43
|
+
"@snack-uikit/typography": "0.8.0",
|
|
44
44
|
"@snack-uikit/utils": "3.5.0",
|
|
45
45
|
"classnames": "2.3.2",
|
|
46
46
|
"react-markdown": "7.1.1",
|
|
47
47
|
"remark-gfm": "3.0.1"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "8499829efa0c118b704de17411ae2328a024adb5"
|
|
50
50
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-markdown';
|
|
2
2
|
|
|
3
3
|
.markdown {
|
|
4
4
|
overflow: auto;
|
|
5
5
|
height: 100%;
|
|
6
|
-
color:
|
|
6
|
+
color: styles-tokens-markdown.$sys-neutral-text-main;
|
|
7
7
|
|
|
8
8
|
>:first-child {
|
|
9
9
|
padding-top: 0;
|
|
@@ -16,33 +16,33 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
h1 {
|
|
19
|
-
@include composite-var(
|
|
20
|
-
@include composite-var(
|
|
19
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-headline-l);
|
|
20
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-headings-level1);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
h2 {
|
|
24
|
-
@include composite-var(
|
|
25
|
-
@include composite-var(
|
|
24
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-headline-m);
|
|
25
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-headings-level2);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
h3 {
|
|
29
|
-
@include composite-var(
|
|
30
|
-
@include composite-var(
|
|
29
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-headline-s);
|
|
30
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-headings-level3);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
h4 {
|
|
34
|
-
@include composite-var(
|
|
35
|
-
@include composite-var(
|
|
34
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-title-l);
|
|
35
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-headings-level4);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
h5 {
|
|
39
|
-
@include composite-var(
|
|
40
|
-
@include composite-var(
|
|
39
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-title-m);
|
|
40
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-headings-level5);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
h6 {
|
|
44
|
-
@include composite-var(
|
|
45
|
-
@include composite-var(
|
|
44
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-title-s);
|
|
45
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-headings-level6);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
h1,
|
|
@@ -55,25 +55,25 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
p {
|
|
58
|
-
@include composite-var(
|
|
59
|
-
@include composite-var(
|
|
58
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-body-m);
|
|
59
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-paragraphs);
|
|
60
60
|
|
|
61
61
|
margin: 0;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
li {
|
|
65
|
-
@include composite-var(
|
|
65
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-body-m);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
strong {
|
|
69
|
-
@include composite-var(
|
|
69
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-label-l);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
ul,
|
|
73
73
|
ol {
|
|
74
|
-
@include composite-var(
|
|
74
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-list);
|
|
75
75
|
|
|
76
|
-
padding-inline-start: calc(
|
|
76
|
+
padding-inline-start: calc(styles-tokens-markdown.$dimension-3m - styles-tokens-markdown.$dimension-050m);
|
|
77
77
|
|
|
78
78
|
p {
|
|
79
79
|
padding-top: 0;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-markdown';
|
|
2
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
|
|
3
3
|
|
|
4
4
|
@mixin validationState($state, $rainbowColor, $bgDefault) {
|
|
5
5
|
&[data-validation='#{$state}'] {
|
|
6
|
-
background-color: simple-var(
|
|
7
|
-
border-color: simple-var(
|
|
6
|
+
background-color: styles-tokens-markdown.simple-var(styles-tokens-markdown.$theme-variables, 'sys', $bgDefault, 'background1-level');
|
|
7
|
+
border-color: styles-tokens-markdown.simple-var(styles-tokens-markdown.$theme-variables, 'sys', $bgDefault, 'decor-default');
|
|
8
8
|
|
|
9
9
|
&:hover {
|
|
10
|
-
background-color:
|
|
11
|
-
border-color: simple-var(
|
|
10
|
+
background-color: styles-tokens-markdown.$sys-neutral-background2-level;
|
|
11
|
+
border-color: styles-tokens-markdown.simple-var(styles-tokens-markdown.$theme-variables, 'sys', $rainbowColor, 'decor-hovered');
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&:focus-within,
|
|
15
15
|
&[data-focused] {
|
|
16
16
|
&:not([data-disabled]) {
|
|
17
|
-
@include outline-var(
|
|
17
|
+
@include styles-tokens-markdown.outline-var(styles-tokens-element.$container-focused-m);
|
|
18
18
|
|
|
19
|
-
background-color: simple-var(
|
|
20
|
-
border-color: simple-var(
|
|
21
|
-
outline-color: simple-var(
|
|
19
|
+
background-color: styles-tokens-markdown.simple-var(styles-tokens-markdown.$sys-neutral-background2-level);
|
|
20
|
+
border-color: styles-tokens-markdown.simple-var(styles-tokens-markdown.$theme-variables, 'sys', $rainbowColor, 'accent-default');
|
|
21
|
+
outline-color: styles-tokens-markdown.simple-var(styles-tokens-markdown.$theme-variables, 'sys', $rainbowColor, 'decor-activated');
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.viewWrapper {
|
|
28
|
-
@include composite-var(
|
|
28
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-preview-container);
|
|
29
29
|
@include validationState('default', 'primary', 'neutral');
|
|
30
30
|
@include validationState('error', 'red', 'red');
|
|
31
31
|
|
|
@@ -35,23 +35,23 @@
|
|
|
35
35
|
.editor {
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
|
-
gap:
|
|
38
|
+
gap: styles-tokens-markdown.$dimension-1m;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.control {
|
|
42
42
|
display: flex;
|
|
43
|
-
gap:
|
|
43
|
+
gap: styles-tokens-markdown.$dimension-1m;
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: space-between;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.switchWrapper {
|
|
49
49
|
display: flex;
|
|
50
|
-
gap:
|
|
50
|
+
gap: styles-tokens-markdown.$dimension-1m;
|
|
51
51
|
align-items: center;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.tip {
|
|
55
|
-
color:
|
|
55
|
+
color: styles-tokens-markdown.$sys-neutral-text-light;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-markdown';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
|
-
@include composite-var(
|
|
4
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-quote);
|
|
5
5
|
|
|
6
6
|
.blockquote > p {
|
|
7
7
|
padding-top: 0;
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.blockquote {
|
|
12
|
-
@include composite-var(
|
|
12
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-quote-container);
|
|
13
13
|
|
|
14
14
|
box-sizing: border-box;
|
|
15
15
|
margin: 0;
|
|
16
16
|
|
|
17
|
-
background-color:
|
|
18
|
-
border-left-color:
|
|
17
|
+
background-color: styles-tokens-markdown.$sys-neutral-background;
|
|
18
|
+
border-left-color: styles-tokens-markdown.$sys-neutral-decor-default;
|
|
19
19
|
border-left-style: solid;
|
|
20
20
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-markdown';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
|
-
@include composite-var(
|
|
4
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-code-editor);
|
|
5
5
|
|
|
6
6
|
display: flex;
|
|
7
7
|
max-height: 200px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.code {
|
|
11
|
-
@include composite-var(
|
|
12
|
-
@include composite-var(
|
|
11
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-inline-code-container);
|
|
12
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$mono-body-s);
|
|
13
13
|
|
|
14
|
-
color:
|
|
14
|
+
color: styles-tokens-markdown.$sys-neutral-text-support;
|
|
15
15
|
text-shadow: none;
|
|
16
|
-
background-color:
|
|
16
|
+
background-color: styles-tokens-markdown.$sys-neutral-background;
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-markdown';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
|
-
@include composite-var(
|
|
4
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-divider);
|
|
5
5
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-markdown';
|
|
2
2
|
|
|
3
3
|
.wrapper {
|
|
4
|
-
@include composite-var(
|
|
4
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-syntax-table);
|
|
5
5
|
|
|
6
6
|
border-spacing: 0;
|
|
7
7
|
width: 100%;
|
|
8
8
|
|
|
9
9
|
th, td {
|
|
10
|
-
@include composite-var(
|
|
10
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$markdown-table-cell-container);
|
|
11
11
|
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
text-align: left;
|
|
14
14
|
text-overflow: ellipsis;
|
|
15
|
-
border-bottom: 1px solid
|
|
15
|
+
border-bottom: 1px solid styles-tokens-markdown.$sys-neutral-decor-default;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
th {
|
|
19
|
-
@include composite-var(
|
|
19
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-label-l);
|
|
20
20
|
|
|
21
|
-
background-color:
|
|
21
|
+
background-color: styles-tokens-markdown.$sys-neutral-background;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
td {
|
|
25
|
-
@include composite-var(
|
|
25
|
+
@include styles-tokens-markdown.composite-var(styles-tokens-markdown.$sans-body-m);
|
|
26
26
|
}
|
|
27
27
|
}
|