@ptsecurity/mosaic 13.6.2 → 13.8.4
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/_theming.scss +289 -59
- package/_visual.scss +85 -14
- package/design-tokens/legacy-2017/tokens/components/checkbox.json5 +4 -0
- package/design-tokens/legacy-2017/tokens/components/loader-overlay.json5 +23 -0
- package/design-tokens/legacy-2017/tokens/components/radio.json5 +11 -10
- package/design-tokens/legacy-2017/tokens/components/toast.json5 +54 -0
- package/design-tokens/legacy-2017/tokens/properties/globals.json5 +18 -18
- package/design-tokens/legacy-2017/tokens.d.ts +78 -8
- package/design-tokens/pt-2022/tokens/components/badge.json5 +1 -1
- package/design-tokens/pt-2022/tokens/components/button.json5 +1 -1
- package/design-tokens/pt-2022/tokens/components/checkbox.json5 +4 -0
- package/design-tokens/pt-2022/tokens/components/link.json5 +3 -3
- package/design-tokens/pt-2022/tokens/components/loader-overlay.json5 +23 -0
- package/design-tokens/pt-2022/tokens/components/radio.json5 +6 -3
- package/design-tokens/pt-2022/tokens/components/tags.json5 +1 -1
- package/design-tokens/pt-2022/tokens/components/toast.json5 +54 -0
- package/design-tokens/pt-2022/tokens/properties/colors.json5 +1 -1
- package/design-tokens/pt-2022/tokens/properties/globals.json5 +18 -18
- package/design-tokens/pt-2022/tokens.d.ts +85 -14
- package/design-tokens/style-dictionary/build.js +13 -0
- package/design-tokens/style-dictionary/configs/figma.js +11 -0
- package/design-tokens/style-dictionary/configs/index.js +3 -3
- package/design-tokens/style-dictionary/figma-types.js +41 -0
- package/design-tokens/style-dictionary/formats/figma.js +104 -0
- package/design-tokens/style-dictionary/transformGroups/figma.js +21 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-border.js +18 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-color.js +25 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-default.js +10 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-font.js +31 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-group.js +17 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-opacity.js +10 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-shadow.js +66 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-sizing.js +16 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-spacing.js +15 -0
- package/design-tokens/style-dictionary/transforms/attribute/figma-typography.js +24 -0
- package/design-tokens/style-dictionary/transforms/value/figma-values.js +7 -0
- package/esm2020/button/button.component.mjs +2 -2
- package/esm2020/design-tokens/legacy-2017/tokens.mjs +79 -9
- package/esm2020/design-tokens/pt-2022/tokens.mjs +86 -15
- package/esm2020/form-field/hint.mjs +18 -7
- package/esm2020/list/list-selection.component.mjs +4 -1
- package/esm2020/loader-overlay/index.mjs +2 -0
- package/esm2020/loader-overlay/loader-overlay.component.mjs +99 -0
- package/esm2020/loader-overlay/loader-overlay.module.mjs +50 -0
- package/esm2020/loader-overlay/ptsecurity-mosaic-loader-overlay.mjs +5 -0
- package/esm2020/loader-overlay/public-api.mjs +3 -0
- package/esm2020/modal/modal.component.mjs +11 -3
- package/esm2020/modal/modal.type.mjs +1 -1
- package/esm2020/navbar/navbar-item.component.mjs +29 -6
- package/esm2020/navbar/navbar.component.mjs +6 -4
- package/esm2020/navbar/vertical-navbar.component.mjs +3 -3
- package/esm2020/progress-spinner/progress-spinner.component.mjs +2 -2
- package/esm2020/radio/radio.component.mjs +3 -3
- package/esm2020/select/select.component.mjs +3 -3
- package/esm2020/toast/index.mjs +2 -0
- package/esm2020/toast/ptsecurity-mosaic-toast.mjs +5 -0
- package/esm2020/toast/public-api.mjs +6 -0
- package/esm2020/toast/toast-animations.mjs +9 -0
- package/esm2020/toast/toast-container.component.mjs +44 -0
- package/esm2020/toast/toast.component.mjs +89 -0
- package/esm2020/toast/toast.module.mjs +42 -0
- package/esm2020/toast/toast.service.mjs +178 -0
- package/esm2020/toast/toast.type.mjs +15 -0
- package/esm2020/tooltip/tooltip.component.mjs +2 -1
- package/esm2020/tree/tree-option.component.mjs +3 -2
- package/esm2020/tree/tree-selection.component.mjs +4 -2
- package/esm2020/tree-select/tree-select.component.mjs +12 -11
- package/fesm2015/ptsecurity-mosaic-button.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs +235 -24
- package/fesm2015/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-form-field.mjs +16 -6
- package/fesm2015/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-list.mjs +3 -0
- package/fesm2015/ptsecurity-mosaic-list.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs +155 -0
- package/fesm2015/ptsecurity-mosaic-loader-overlay.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-modal.mjs +11 -2
- package/fesm2015/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-navbar.mjs +37 -11
- package/fesm2015/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-radio.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-radio.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-select.mjs +2 -2
- package/fesm2015/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-toast.mjs +363 -0
- package/fesm2015/ptsecurity-mosaic-toast.mjs.map +1 -0
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs +1 -0
- package/fesm2015/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs +11 -10
- package/fesm2015/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2015/ptsecurity-mosaic-tree.mjs +5 -2
- package/fesm2015/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-button.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-button.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs +235 -24
- package/fesm2020/ptsecurity-mosaic-design-tokens.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-form-field.mjs +16 -6
- package/fesm2020/ptsecurity-mosaic-form-field.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-list.mjs +3 -0
- package/fesm2020/ptsecurity-mosaic-list.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs +153 -0
- package/fesm2020/ptsecurity-mosaic-loader-overlay.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-modal.mjs +10 -2
- package/fesm2020/ptsecurity-mosaic-modal.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-navbar.mjs +34 -9
- package/fesm2020/ptsecurity-mosaic-navbar.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-progress-spinner.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-radio.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-radio.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-select.mjs +2 -2
- package/fesm2020/ptsecurity-mosaic-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-toast.mjs +361 -0
- package/fesm2020/ptsecurity-mosaic-toast.mjs.map +1 -0
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs +1 -0
- package/fesm2020/ptsecurity-mosaic-tooltip.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs +11 -10
- package/fesm2020/ptsecurity-mosaic-tree-select.mjs.map +1 -1
- package/fesm2020/ptsecurity-mosaic-tree.mjs +5 -2
- package/fesm2020/ptsecurity-mosaic-tree.mjs.map +1 -1
- package/form-field/hint.d.ts +10 -2
- package/loader-overlay/README.md +0 -0
- package/loader-overlay/index.d.ts +1 -0
- package/loader-overlay/loader-overlay.component.d.ts +33 -0
- package/loader-overlay/loader-overlay.module.d.ts +11 -0
- package/loader-overlay/package.json +10 -0
- package/loader-overlay/ptsecurity-mosaic-loader-overlay.d.ts +5 -0
- package/loader-overlay/public-api.d.ts +2 -0
- package/modal/modal.component.d.ts +3 -1
- package/modal/modal.type.d.ts +1 -0
- package/navbar/navbar-item.component.d.ts +9 -3
- package/package.json +20 -4
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/default-theme.css +1 -1
- package/toast/index.d.ts +1 -0
- package/toast/package.json +10 -0
- package/toast/ptsecurity-mosaic-toast.d.ts +5 -0
- package/toast/public-api.d.ts +5 -0
- package/toast/toast-animations.d.ts +4 -0
- package/toast/toast-container.component.d.ts +15 -0
- package/toast/toast.component.d.ts +35 -0
- package/toast/toast.module.d.ts +13 -0
- package/toast/toast.service.d.ts +49 -0
- package/toast/toast.type.d.ts +27 -0
- package/tooltip/tooltip.component.d.ts +1 -1
- package/tree/tree-selection.component.d.ts +1 -0
- package/schematics/collection.json +0 -4
- package/schematics/migration.json +0 -10
- package/schematics/ng-update/data/attribute-selectors.d.ts +0 -2
- package/schematics/ng-update/data/attribute-selectors.js +0 -5
- package/schematics/ng-update/data/attribute-selectors.js.map +0 -1
- package/schematics/ng-update/data/class-names.d.ts +0 -2
- package/schematics/ng-update/data/class-names.js +0 -5
- package/schematics/ng-update/data/class-names.js.map +0 -1
- package/schematics/ng-update/data/constructor-checks.d.ts +0 -2
- package/schematics/ng-update/data/constructor-checks.js +0 -5
- package/schematics/ng-update/data/constructor-checks.js.map +0 -1
- package/schematics/ng-update/data/css-selectors.d.ts +0 -2
- package/schematics/ng-update/data/css-selectors.js +0 -5
- package/schematics/ng-update/data/css-selectors.js.map +0 -1
- package/schematics/ng-update/data/element-selectors.d.ts +0 -2
- package/schematics/ng-update/data/element-selectors.js +0 -5
- package/schematics/ng-update/data/element-selectors.js.map +0 -1
- package/schematics/ng-update/data/index.d.ts +0 -10
- package/schematics/ng-update/data/index.js +0 -14
- package/schematics/ng-update/data/index.js.map +0 -1
- package/schematics/ng-update/data/input-names.d.ts +0 -2
- package/schematics/ng-update/data/input-names.js +0 -35
- package/schematics/ng-update/data/input-names.js.map +0 -1
- package/schematics/ng-update/data/method-call-checks.d.ts +0 -2
- package/schematics/ng-update/data/method-call-checks.js +0 -5
- package/schematics/ng-update/data/method-call-checks.js.map +0 -1
- package/schematics/ng-update/data/output-names.d.ts +0 -2
- package/schematics/ng-update/data/output-names.js +0 -5
- package/schematics/ng-update/data/output-names.js.map +0 -1
- package/schematics/ng-update/data/property-names.d.ts +0 -2
- package/schematics/ng-update/data/property-names.js +0 -5
- package/schematics/ng-update/data/property-names.js.map +0 -1
- package/schematics/ng-update/data/symbol-removal.d.ts +0 -2
- package/schematics/ng-update/data/symbol-removal.js +0 -5
- package/schematics/ng-update/data/symbol-removal.js.map +0 -1
- package/schematics/ng-update/index.d.ts +0 -2
- package/schematics/ng-update/index.js +0 -23
- package/schematics/ng-update/index.js.map +0 -1
- package/schematics/ng-update/update-9.0.0/mosaic-symbols.json +0 -255
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.d.ts +0 -7
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js +0 -154
- package/schematics/ng-update/update-9.0.0/secondary-entry-points-migration.js.map +0 -1
- package/schematics/ng-update/upgrade-data.d.ts +0 -2
- package/schematics/ng-update/upgrade-data.js +0 -17
- package/schematics/ng-update/upgrade-data.js.map +0 -1
- package/schematics/tsconfig.json +0 -29
- package/schematics/tsconfig.lib-test.json +0 -8
- package/schematics/tsconfig.lib.json +0 -17
@@ -20,7 +20,7 @@
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
'dark-color-scheme': {
|
23
|
-
text: { value: '{dark-color-scheme.primary.palette.value.
|
23
|
+
text: { value: '{dark-color-scheme.primary.palette.value.300}' },
|
24
24
|
'border-bottom': { value: 'rgba({dark-color-scheme.foreground.text-disabled}, 0.32)' },
|
25
25
|
|
26
26
|
'state-visited': {
|
@@ -28,10 +28,10 @@
|
|
28
28
|
'border-bottom': { value: 'rgba({link.dark-color-scheme.state-visited.text}, 0.32)' }
|
29
29
|
},
|
30
30
|
'state-hover': {
|
31
|
-
'text': { value: '{dark-color-scheme.primary.palette.value.
|
31
|
+
'text': { value: '{dark-color-scheme.primary.palette.value.400}' },
|
32
32
|
'border-bottom': { value: 'rgba({link.dark-color-scheme.state-hover.text}, 0.32)' }
|
33
33
|
},
|
34
|
-
'state-active': { value: '{dark-color-scheme.primary.palette.value.
|
34
|
+
'state-active': { value: '{dark-color-scheme.primary.palette.value.500}' },
|
35
35
|
'state-focused': {
|
36
36
|
outline: { value: '{dark-color-scheme.states.focused-color}' }
|
37
37
|
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
'loader-overlay': {
|
3
|
+
'light-color-scheme': {
|
4
|
+
background: { value: 'mix({light-color-scheme.background.background}, transparent, 90%)' },
|
5
|
+
text: { value: '{light-color-scheme.foreground.text}' },
|
6
|
+
caption: { value: '{light-color-scheme.foreground.text-less-contrast}' }
|
7
|
+
},
|
8
|
+
'dark-color-scheme': {
|
9
|
+
background: { value: 'mix({dark-color-scheme.background.background}, transparent, 90%)' },
|
10
|
+
text: { value: '{dark-color-scheme.foreground.text}' },
|
11
|
+
caption: { value: '{dark-color-scheme.foreground.text-less-contrast}' }
|
12
|
+
},
|
13
|
+
size: {
|
14
|
+
'text-max-width': { value: '480px' },
|
15
|
+
'fixed-top-padding': { value: '72px' },
|
16
|
+
'center-optical-compensation': { value: '-40%' }
|
17
|
+
},
|
18
|
+
font: {
|
19
|
+
text: { value: 'body' },
|
20
|
+
caption: { value: 'caption' },
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
'light-color-scheme': {
|
4
4
|
'outer-circle-border': { value: '{light-color-scheme.foreground.border}' },
|
5
5
|
'inner-circle-border': { value: 'transparent' },
|
6
|
+
'cap-color': { value: 'white' },
|
6
7
|
|
7
8
|
states: {
|
8
9
|
checked: {
|
@@ -12,13 +13,14 @@
|
|
12
13
|
focused: {
|
13
14
|
'outer-circle-border': { value: '{light-color-scheme.states.focused-color}' },
|
14
15
|
'outer-circle-shadow': { value: '0 0 0 2px {light-color-scheme.states.focused-color}' },
|
15
|
-
'inner-circle-shadow': { value: '0 0 0
|
16
|
+
'inner-circle-shadow': { value: '0 0 0 2px {light-color-scheme.background.background}' }
|
16
17
|
}
|
17
18
|
}
|
18
19
|
},
|
19
20
|
'dark-color-scheme': {
|
20
21
|
'outer-circle-border': { value: '{dark-color-scheme.foreground.border}' },
|
21
22
|
'inner-circle-border': { value: 'transparent' },
|
23
|
+
'cap-color': { value: 'white' },
|
22
24
|
|
23
25
|
states: {
|
24
26
|
checked: {
|
@@ -29,12 +31,13 @@
|
|
29
31
|
'outer-circle-border': { value: '{dark-color-scheme.states.focused-color}' },
|
30
32
|
'outer-circle-shadow': { value: '0 0 0 2px {dark-color-scheme.states.focused-color}' },
|
31
33
|
|
32
|
-
'inner-circle-shadow': { value: '0 0 0
|
34
|
+
'inner-circle-shadow': { value: '0 0 0 2px {dark-color-scheme.background.background}' }
|
33
35
|
}
|
34
36
|
}
|
35
37
|
},
|
36
38
|
size: {
|
37
|
-
size: { value: '14px' },
|
39
|
+
'outer-size': { value: '14px' },
|
40
|
+
'inner-size': { value: '10px' },
|
38
41
|
'cap-size': { value: '6px' },
|
39
42
|
'label-margin': { value: '{margin.iconText_M-horizontal}' }
|
40
43
|
},
|
@@ -55,7 +55,7 @@
|
|
55
55
|
},
|
56
56
|
'dark-color-scheme': {
|
57
57
|
primary: {
|
58
|
-
background: { value: '{dark-color-scheme.primary.palette.value.
|
58
|
+
background: { value: '{dark-color-scheme.primary.palette.value.600}' },
|
59
59
|
border: { value: 'transparent' },
|
60
60
|
text: { value: '{dark-color-scheme.primary.palette.value.200}' },
|
61
61
|
icon: { value: '{icon.dark-color-scheme.primary.default}' },
|
@@ -0,0 +1,54 @@
|
|
1
|
+
{
|
2
|
+
toast: {
|
3
|
+
'light-color-scheme': {
|
4
|
+
background: { value: '{light-color-scheme.background.background}' },
|
5
|
+
border: { value: '{light-color-scheme.foreground.border}' },
|
6
|
+
text: { value: '{light-color-scheme.foreground.text}' },
|
7
|
+
'text-caption': { value: '{light-color-scheme.foreground.text-less-contrast}' },
|
8
|
+
'shadow': { value: '0 8px 16px 0 rgba({light-color-scheme.second.palette.value.800}, 0.2)' },
|
9
|
+
|
10
|
+
'icon_info': { value: '{icon.light-color-scheme.info.default}' },
|
11
|
+
'icon_error': { value: '{icon.light-color-scheme.error.default}' },
|
12
|
+
'icon_success': { value: '{icon.light-color-scheme.success.default}' },
|
13
|
+
'icon_warning': { value: '{icon.light-color-scheme.warning.default}' }
|
14
|
+
},
|
15
|
+
'dark-color-scheme': {
|
16
|
+
background: { value: '{dark-color-scheme.second.palette.value.700}' },
|
17
|
+
border: { value: '{dark-color-scheme.second.palette.value.A100}' },
|
18
|
+
text: { value: '{dark-color-scheme.foreground.text}' },
|
19
|
+
'text-caption': { value: '{dark-color-scheme.foreground.text-less-contrast}' },
|
20
|
+
'shadow': { value: '0 8px 16px 0 rgba({light-color-scheme.second.palette.value.800}, 0.2)' },
|
21
|
+
|
22
|
+
'icon_info': { value: '{icon.dark-color-scheme.info.default}' },
|
23
|
+
'icon_error': { value: '{icon.dark-color-scheme.error.default}' },
|
24
|
+
'icon_success': { value: '{icon.dark-color-scheme.success.default}' },
|
25
|
+
'icon_warning': { value: '{icon.dark-color-scheme.warning.default}' }
|
26
|
+
},
|
27
|
+
size: {
|
28
|
+
'border-width': { value: '1px' },
|
29
|
+
'border-radius': { value: '3px' },
|
30
|
+
|
31
|
+
'width': { value: '360px' },
|
32
|
+
'padding-vertical': { value: '{size.m}' },
|
33
|
+
'padding-left': { value: '{size.m}' },
|
34
|
+
'padding-right': { value: '{size.l}' },
|
35
|
+
|
36
|
+
'close-button-width': { value: '{size.3xl}' },
|
37
|
+
'close-button-margin': { value: '{size.s}' },
|
38
|
+
|
39
|
+
'icon-margin': { value: '{size.s}' },
|
40
|
+
'caption-margin': { value: '{size.s}' },
|
41
|
+
|
42
|
+
'actionbar-margin': { value: '{size.s}' },
|
43
|
+
'actionbar-gap': { value: '{size.m}' },
|
44
|
+
|
45
|
+
'vertical-margin': { value: '{size.l}' },
|
46
|
+
'horizontal-margin': { value: '{size.l}' },
|
47
|
+
'gap': { value: '{size.m}' }
|
48
|
+
},
|
49
|
+
font: {
|
50
|
+
title: { value: 'body' },
|
51
|
+
caption: { value: 'body' },
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
@@ -114,7 +114,7 @@
|
|
114
114
|
states: {
|
115
115
|
'focused-color': { value: '{dark-color-scheme.primary.palette.value.400}' },
|
116
116
|
'focused-color-error': { value: '{light-color-scheme.error.palette.value.560}' },
|
117
|
-
'selected-color': { value: '{dark-color-scheme.primary.palette.value.
|
117
|
+
'selected-color': { value: '{dark-color-scheme.primary.palette.value.700}' },
|
118
118
|
'pressed-shadow': { value: 'inset 1px 2px 2px 0 rgba(black, 0.2)' },
|
119
119
|
'disabled-opacity': { value: 0.3 }
|
120
120
|
}
|
@@ -14,36 +14,36 @@
|
|
14
14
|
'6xl': { value: '56px' },
|
15
15
|
'7xl': { value: '64px' },
|
16
16
|
|
17
|
-
'border-width': '1px',
|
18
|
-
'border-radius': '4px',
|
17
|
+
'border-width': { 'value': '1px' },
|
18
|
+
'border-radius': { 'value': '4px' },
|
19
19
|
|
20
20
|
// this will be deleted
|
21
|
-
'option-height': '32px',
|
22
|
-
'panel-height': '48px',
|
21
|
+
'option-height': { 'value': '32px' },
|
22
|
+
'panel-height': { 'value': '48px' },
|
23
23
|
// у radio и checkbox в макетах 20px, у тоггла есть две модификации на 16px и 14px
|
24
|
-
'control_S-height': '16px',
|
24
|
+
'control_S-height': { 'value': '16px' },
|
25
25
|
// в form-field это реализовано через отступы
|
26
|
-
'control_M-height': '32px',
|
26
|
+
'control_M-height': { 'value': '32px' },
|
27
27
|
// этого нет сейчас
|
28
|
-
'button-minWidth': '64px',
|
28
|
+
'button-minWidth': { 'value': '64px' },
|
29
29
|
// badge на padding
|
30
|
-
'badge_tag-height': '24px',
|
30
|
+
'badge_tag-height': { 'value': '24px' },
|
31
31
|
// modal; sidepanel - сейчас в этих компонентах paddings
|
32
|
-
'header-height': '56px',
|
33
|
-
'footer-height': '64px',
|
32
|
+
'header-height': { 'value': '56px' },
|
33
|
+
'footer-height': { 'value': '64px' },
|
34
34
|
// this will be deleted
|
35
35
|
},
|
36
36
|
padding: {
|
37
|
-
'control-horizontal': '16px',
|
38
|
-
'option-horizontal': '16px',
|
39
|
-
'badge_tag-horizontal': '8px',
|
40
|
-
'header-right': '8px',
|
41
|
-
'headerFooter-horizontal': '16px'
|
37
|
+
'control-horizontal': { 'value': '16px' },
|
38
|
+
'option-horizontal': { 'value': '16px' },
|
39
|
+
'badge_tag-horizontal': { 'value': '8px' },
|
40
|
+
'header-right': { 'value': '8px' },
|
41
|
+
'headerFooter-horizontal': { 'value': '16px' }
|
42
42
|
},
|
43
43
|
margin: {
|
44
44
|
// у radio-group нет таких отступов, а у checkbox вообще нет группы
|
45
|
-
'controlGroup_S-vertical': '8px',
|
46
|
-
'iconText_M-horizontal': '8px',
|
47
|
-
'iconText_S-horizontal': '4px'
|
45
|
+
'controlGroup_S-vertical': { 'value': '8px' },
|
46
|
+
'iconText_M-horizontal': { 'value': '8px' },
|
47
|
+
'iconText_S-horizontal': { 'value': '4px' }
|
48
48
|
}
|
49
49
|
}
|
@@ -5104,7 +5104,7 @@ export declare const DarkColorSchemeBackgroundOverlayActive = "rgba(black, 0.1)"
|
|
5104
5104
|
export declare const DarkColorSchemeBackgroundOverlayDisabled = "rgba(black, 0.2)";
|
5105
5105
|
export declare const DarkColorSchemeStatesFocusedColor = "#4187ff";
|
5106
5106
|
export declare const DarkColorSchemeStatesFocusedColorError = "#b9023a";
|
5107
|
-
export declare const DarkColorSchemeStatesSelectedColor = "#
|
5107
|
+
export declare const DarkColorSchemeStatesSelectedColor = "#023c7f";
|
5108
5108
|
export declare const DarkColorSchemeStatesPressedShadow = "inset 1px 2px 2px 0 rgba(black, 0.2)";
|
5109
5109
|
export declare const DarkColorSchemeStatesDisabledOpacity = 0.3;
|
5110
5110
|
export declare const FontFamilyAccent = "'TT Positive', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif";
|
@@ -5123,6 +5123,24 @@ export declare const Size4xl = "40px";
|
|
5123
5123
|
export declare const Size5xl = "48px";
|
5124
5124
|
export declare const Size6xl = "56px";
|
5125
5125
|
export declare const Size7xl = "64px";
|
5126
|
+
export declare const SizeBorderWidth = "1px";
|
5127
|
+
export declare const SizeBorderRadius = "4px";
|
5128
|
+
export declare const SizeOptionHeight = "32px";
|
5129
|
+
export declare const SizePanelHeight = "48px";
|
5130
|
+
export declare const SizeControlSHeight = "16px";
|
5131
|
+
export declare const SizeControlMHeight = "32px";
|
5132
|
+
export declare const SizeButtonMinWidth = "64px";
|
5133
|
+
export declare const SizeBadgeTagHeight = "24px";
|
5134
|
+
export declare const SizeHeaderHeight = "56px";
|
5135
|
+
export declare const SizeFooterHeight = "64px";
|
5136
|
+
export declare const PaddingControlHorizontal = "16px";
|
5137
|
+
export declare const PaddingOptionHorizontal = "16px";
|
5138
|
+
export declare const PaddingBadgeTagHorizontal = "8px";
|
5139
|
+
export declare const PaddingHeaderRight = "8px";
|
5140
|
+
export declare const PaddingHeaderFooterHorizontal = "16px";
|
5141
|
+
export declare const MarginControlGroupSVertical = "8px";
|
5142
|
+
export declare const MarginIconTextMHorizontal = "8px";
|
5143
|
+
export declare const MarginIconTextSHorizontal = "4px";
|
5126
5144
|
export declare const PaletteBlue40 = "#eff6ff";
|
5127
5145
|
export declare const PaletteBlue60 = "#e7f1ff";
|
5128
5146
|
export declare const PaletteBlue100 = "#c8dfff";
|
@@ -8450,7 +8468,7 @@ export declare const BadgeLightColorSchemePastelPrimaryBackground = "#eff6ff";
|
|
8450
8468
|
export declare const BadgeLightColorSchemePastelPrimaryBorder = "#a2c7fe";
|
8451
8469
|
export declare const BadgeLightColorSchemePastelPrimaryColor = "#4187ff";
|
8452
8470
|
export declare const BadgeLightColorSchemePastelInfoBackground = "#ebf8fd";
|
8453
|
-
export declare const BadgeLightColorSchemePastelInfoBorder = "#
|
8471
|
+
export declare const BadgeLightColorSchemePastelInfoBorder = "#6ed3f2";
|
8454
8472
|
export declare const BadgeLightColorSchemePastelInfoColor = "#2099b7";
|
8455
8473
|
export declare const BadgeLightColorSchemePastelSuccessBackground = "#ecf9ef";
|
8456
8474
|
export declare const BadgeLightColorSchemePastelSuccessBorder = "#8ed5a1";
|
@@ -8550,7 +8568,7 @@ export declare const ButtonDarkColorSchemePrimaryBackground = "#0059b8";
|
|
8550
8568
|
export declare const ButtonDarkColorSchemePrimaryIcon = "white";
|
8551
8569
|
export declare const ButtonDarkColorSchemePrimaryStatesActiveBorder = "darken(#014b9d, 5)";
|
8552
8570
|
export declare const ButtonDarkColorSchemePrimaryStatesActiveBackground = "darken(#014b9d, 5)";
|
8553
|
-
export declare const ButtonDarkColorSchemePrimaryTransparentColor = "#
|
8571
|
+
export declare const ButtonDarkColorSchemePrimaryTransparentColor = "#5697ff";
|
8554
8572
|
export declare const ButtonDarkColorSchemePrimaryTransparentIcon = "#5697ff";
|
8555
8573
|
export declare const ButtonDarkColorSchemePrimaryTransparentStatesHoverColor = "#014b9d";
|
8556
8574
|
export declare const ButtonDarkColorSchemePrimaryTransparentStatesHoverIcon = "#0374eb";
|
@@ -8603,6 +8621,7 @@ export declare const CardDarkColorSchemeInfoBackground = "#143641";
|
|
8603
8621
|
export declare const CardDarkColorSchemeInfoShadow = "#084453";
|
8604
8622
|
export declare const CardSizeVerticalLine = "4px";
|
8605
8623
|
export declare const CheckboxLightColorSchemeDefaultBorder = "#bdc7d1";
|
8624
|
+
export declare const CheckboxLightColorSchemeDefaultColor = "white";
|
8606
8625
|
export declare const CheckboxLightColorSchemeDefaultStatesCheckedBorder = "#0374eb";
|
8607
8626
|
export declare const CheckboxLightColorSchemeDefaultStatesCheckedBackground = "#0374eb";
|
8608
8627
|
export declare const CheckboxLightColorSchemeDefaultStatesFocusedBorder = "#0374eb";
|
@@ -8612,6 +8631,7 @@ export declare const CheckboxLightColorSchemeDefaultStatesCheckedFocusedBackgrou
|
|
8612
8631
|
export declare const CheckboxLightColorSchemeDefaultStatesCheckedFocusedShadow = "0 0 0 1px #0374eb";
|
8613
8632
|
export declare const CheckboxLightColorSchemeDefaultStatesCheckedFocusedOutline = "1px solid white";
|
8614
8633
|
export declare const CheckboxLightColorSchemeErrorBorder = "#db3c55";
|
8634
|
+
export declare const CheckboxLightColorSchemeErrorColor = "white";
|
8615
8635
|
export declare const CheckboxLightColorSchemeErrorStatesCheckedBorder = "#db3c55";
|
8616
8636
|
export declare const CheckboxLightColorSchemeErrorStatesCheckedBackground = "#db3c55";
|
8617
8637
|
export declare const CheckboxLightColorSchemeErrorStatesFocusedBorder = "#db3c55";
|
@@ -8621,6 +8641,7 @@ export declare const CheckboxLightColorSchemeErrorStatesCheckedFocusedBackground
|
|
8621
8641
|
export declare const CheckboxLightColorSchemeErrorStatesCheckedFocusedShadow = "0 0 0 1px #db3c55";
|
8622
8642
|
export declare const CheckboxLightColorSchemeErrorStatesCheckedFocusedOutline = "1px solid white";
|
8623
8643
|
export declare const CheckboxDarkColorSchemeDefaultBorder = "#515e69";
|
8644
|
+
export declare const CheckboxDarkColorSchemeDefaultColor = "white";
|
8624
8645
|
export declare const CheckboxDarkColorSchemeDefaultStatesCheckedBorder = "#0059b8";
|
8625
8646
|
export declare const CheckboxDarkColorSchemeDefaultStatesCheckedBackground = "#0059b8";
|
8626
8647
|
export declare const CheckboxDarkColorSchemeDefaultStatesFocusedBorder = "#4187ff";
|
@@ -8630,6 +8651,7 @@ export declare const CheckboxDarkColorSchemeDefaultStatesCheckedFocusedBackgroun
|
|
8630
8651
|
export declare const CheckboxDarkColorSchemeDefaultStatesCheckedFocusedShadow = "0 0 0 1px #4187ff";
|
8631
8652
|
export declare const CheckboxDarkColorSchemeDefaultStatesCheckedFocusedOutline = "1px solid #19252f";
|
8632
8653
|
export declare const CheckboxDarkColorSchemeErrorBorder = "#b9023a";
|
8654
|
+
export declare const CheckboxDarkColorSchemeErrorColor = "white";
|
8633
8655
|
export declare const CheckboxDarkColorSchemeErrorStatesCheckedBorder = "#b9023a";
|
8634
8656
|
export declare const CheckboxDarkColorSchemeErrorStatesCheckedBackground = "#b9023a";
|
8635
8657
|
export declare const CheckboxDarkColorSchemeErrorStatesFocusedBorder = "#b9023a";
|
@@ -8648,7 +8670,7 @@ export declare const DatepickerToggleSizeHeight = "30px";
|
|
8648
8670
|
export declare const DatepickerBodyLightColorSchemeStatesSelectedColor = "#0374eb";
|
8649
8671
|
export declare const DatepickerBodyLightColorSchemeStatesSelectedBackground = "#e7f1ff";
|
8650
8672
|
export declare const DatepickerBodyDarkColorSchemeStatesSelectedColor = "#4187ff";
|
8651
|
-
export declare const DatepickerBodyDarkColorSchemeStatesSelectedBackground = "#
|
8673
|
+
export declare const DatepickerBodyDarkColorSchemeStatesSelectedBackground = "#023c7f";
|
8652
8674
|
export declare const DatepickerBodySizeLabelPaddings = "8px 28px 12px 12px";
|
8653
8675
|
export declare const DatepickerBodySizeCellMinSize = "32px";
|
8654
8676
|
export declare const DatepickerBodySizeCellMargin = "5%";
|
@@ -8813,13 +8835,13 @@ export declare const LinkLightColorSchemeStateHoverText = "#0059b8";
|
|
8813
8835
|
export declare const LinkLightColorSchemeStateHoverBorderBottom = "rgba(#0059b8, 0.32)";
|
8814
8836
|
export declare const LinkLightColorSchemeStateActive = "#014b9d";
|
8815
8837
|
export declare const LinkLightColorSchemeStateFocusedOutline = "#0374eb";
|
8816
|
-
export declare const LinkDarkColorSchemeText = "#
|
8838
|
+
export declare const LinkDarkColorSchemeText = "#5697ff";
|
8817
8839
|
export declare const LinkDarkColorSchemeBorderBottom = "rgba(#6d7a86, 0.32)";
|
8818
8840
|
export declare const LinkDarkColorSchemeStateVisitedText = "#bb78a7";
|
8819
8841
|
export declare const LinkDarkColorSchemeStateVisitedBorderBottom = "rgba(#bb78a7, 0.32)";
|
8820
|
-
export declare const LinkDarkColorSchemeStateHoverText = "#
|
8821
|
-
export declare const LinkDarkColorSchemeStateHoverBorderBottom = "rgba(#
|
8822
|
-
export declare const LinkDarkColorSchemeStateActive = "#
|
8842
|
+
export declare const LinkDarkColorSchemeStateHoverText = "#4187ff";
|
8843
|
+
export declare const LinkDarkColorSchemeStateHoverBorderBottom = "rgba(#4187ff, 0.32)";
|
8844
|
+
export declare const LinkDarkColorSchemeStateActive = "#0374eb";
|
8823
8845
|
export declare const LinkDarkColorSchemeStateFocusedOutline = "#4187ff";
|
8824
8846
|
export declare const LinkSizeIconMargin = "4px";
|
8825
8847
|
export declare const LinkSizeStateFocusedOutlineOffset = "2px";
|
@@ -8829,6 +8851,17 @@ export declare const ListSizeHorizontalPadding = "12px";
|
|
8829
8851
|
export declare const ListSizeIconRightMargin = "8px";
|
8830
8852
|
export declare const ListSizeItemHeight = "32px";
|
8831
8853
|
export declare const ListFontItem = "body";
|
8854
|
+
export declare const LoaderOverlayLightColorSchemeBackground = "mix(white, transparent, 90%)";
|
8855
|
+
export declare const LoaderOverlayLightColorSchemeText = "#19252f";
|
8856
|
+
export declare const LoaderOverlayLightColorSchemeCaption = "#6d7a86";
|
8857
|
+
export declare const LoaderOverlayDarkColorSchemeBackground = "mix(#19252f, transparent, 90%)";
|
8858
|
+
export declare const LoaderOverlayDarkColorSchemeText = "#f2f5f9";
|
8859
|
+
export declare const LoaderOverlayDarkColorSchemeCaption = "#8c99a5";
|
8860
|
+
export declare const LoaderOverlaySizeTextMaxWidth = "480px";
|
8861
|
+
export declare const LoaderOverlaySizeFixedTopPadding = "72px";
|
8862
|
+
export declare const LoaderOverlaySizeCenterOpticalCompensation = "-40%";
|
8863
|
+
export declare const LoaderOverlayFontText = "body";
|
8864
|
+
export declare const LoaderOverlayFontCaption = "caption";
|
8832
8865
|
export declare const ModalLightColorSchemeShadow = "(0 0 0 1px #d7dee4, 0 6px 12px 0 rgba(39, 51, 62, 0.5))";
|
8833
8866
|
export declare const ModalLightColorSchemeBodyTopShadow = "0 2px 4px 0 rgba(39, 51, 62, 0.16)";
|
8834
8867
|
export declare const ModalLightColorSchemeBodyBottomShadow = "0 -2px 4px 0 rgba(39, 51, 62, 0.16)";
|
@@ -8943,19 +8976,22 @@ export declare const ProgressBarSizeHeight = "4px";
|
|
8943
8976
|
export declare const ProgressSpinnerSizeSize = "16px";
|
8944
8977
|
export declare const RadioLightColorSchemeOuterCircleBorder = "#bdc7d1";
|
8945
8978
|
export declare const RadioLightColorSchemeInnerCircleBorder = "transparent";
|
8979
|
+
export declare const RadioLightColorSchemeCapColor = "white";
|
8946
8980
|
export declare const RadioLightColorSchemeStatesCheckedOuterCircleBorder = "#0374eb";
|
8947
8981
|
export declare const RadioLightColorSchemeStatesCheckedInnerCircleBorder = "#0374eb";
|
8948
8982
|
export declare const RadioLightColorSchemeStatesFocusedOuterCircleBorder = "#0374eb";
|
8949
8983
|
export declare const RadioLightColorSchemeStatesFocusedOuterCircleShadow = "0 0 0 2px #0374eb";
|
8950
|
-
export declare const RadioLightColorSchemeStatesFocusedInnerCircleShadow = "0 0 0
|
8984
|
+
export declare const RadioLightColorSchemeStatesFocusedInnerCircleShadow = "0 0 0 2px white";
|
8951
8985
|
export declare const RadioDarkColorSchemeOuterCircleBorder = "#515e69";
|
8952
8986
|
export declare const RadioDarkColorSchemeInnerCircleBorder = "transparent";
|
8987
|
+
export declare const RadioDarkColorSchemeCapColor = "white";
|
8953
8988
|
export declare const RadioDarkColorSchemeStatesCheckedOuterCircleBorder = "#0059b8";
|
8954
8989
|
export declare const RadioDarkColorSchemeStatesCheckedInnerCircleBorder = "#0059b8";
|
8955
8990
|
export declare const RadioDarkColorSchemeStatesFocusedOuterCircleBorder = "#4187ff";
|
8956
8991
|
export declare const RadioDarkColorSchemeStatesFocusedOuterCircleShadow = "0 0 0 2px #4187ff";
|
8957
|
-
export declare const RadioDarkColorSchemeStatesFocusedInnerCircleShadow = "0 0 0
|
8958
|
-
export declare const
|
8992
|
+
export declare const RadioDarkColorSchemeStatesFocusedInnerCircleShadow = "0 0 0 2px #19252f";
|
8993
|
+
export declare const RadioSizeOuterSize = "14px";
|
8994
|
+
export declare const RadioSizeInnerSize = "10px";
|
8959
8995
|
export declare const RadioSizeCapSize = "6px";
|
8960
8996
|
export declare const RadioSizeLabelMargin = "8px";
|
8961
8997
|
export declare const RadioFontDefault = "body";
|
@@ -9022,9 +9058,9 @@ export declare const VerticalTabsLightColorSchemeStateSelectedBackground = "#e7f
|
|
9022
9058
|
export declare const VerticalTabsLightColorSchemeStateHoverBackground = "rgba(black, 0.05)";
|
9023
9059
|
export declare const VerticalTabsLightColorSchemeStateHoverSelectedBackground = "adjust-color(#e7f1ff, $saturation:-22%, $lightness:-5%)";
|
9024
9060
|
export declare const VerticalTabsDarkColorSchemeStateNormalBackground = "transparent";
|
9025
|
-
export declare const VerticalTabsDarkColorSchemeStateSelectedBackground = "#
|
9061
|
+
export declare const VerticalTabsDarkColorSchemeStateSelectedBackground = "#023c7f";
|
9026
9062
|
export declare const VerticalTabsDarkColorSchemeStateHoverBackground = "rgba(black, 0.05)";
|
9027
|
-
export declare const VerticalTabsDarkColorSchemeStateHoverSelectedBackground = "adjust-color(#
|
9063
|
+
export declare const VerticalTabsDarkColorSchemeStateHoverSelectedBackground = "adjust-color(#023c7f, $lightness:-1%)";
|
9028
9064
|
export declare const TagsLightColorSchemePrimaryBackground = "#e7f1ff";
|
9029
9065
|
export declare const TagsLightColorSchemePrimaryBorder = "transparent";
|
9030
9066
|
export declare const TagsLightColorSchemePrimaryText = "#0374eb";
|
@@ -9052,7 +9088,7 @@ export declare const TagsLightColorSchemeErrorStatesFocused = "#db3c55";
|
|
9052
9088
|
export declare const TagsLightColorSchemeErrorStatesDisabledText = "mix(#ea5868, transparent, 50%)";
|
9053
9089
|
export declare const TagsLightColorSchemeErrorStatesDisabledBackground = "mix(#ea5868, transparent, 10%)";
|
9054
9090
|
export declare const TagsLightColorSchemeErrorStatesDisabledBorder = "transparent";
|
9055
|
-
export declare const TagsDarkColorSchemePrimaryBackground = "#
|
9091
|
+
export declare const TagsDarkColorSchemePrimaryBackground = "#014b9d";
|
9056
9092
|
export declare const TagsDarkColorSchemePrimaryBorder = "transparent";
|
9057
9093
|
export declare const TagsDarkColorSchemePrimaryText = "#a2c7fe";
|
9058
9094
|
export declare const TagsDarkColorSchemePrimaryIcon = "#5697ff";
|
@@ -9097,6 +9133,41 @@ export declare const TextareaSizePadding = "5px 12px";
|
|
9097
9133
|
export declare const TextareaFontDefault = "body";
|
9098
9134
|
export declare const TextareaFontMono = "body-mono";
|
9099
9135
|
export declare const TimepickerSizePaddingRight = "16px";
|
9136
|
+
export declare const ToastLightColorSchemeBackground = "white";
|
9137
|
+
export declare const ToastLightColorSchemeBorder = "#bdc7d1";
|
9138
|
+
export declare const ToastLightColorSchemeText = "#19252f";
|
9139
|
+
export declare const ToastLightColorSchemeTextCaption = "#6d7a86";
|
9140
|
+
export declare const ToastLightColorSchemeShadow = "0 8px 16px 0 rgba(#27333e, 0.2)";
|
9141
|
+
export declare const ToastLightColorSchemeIconInfo = "#18a5c5";
|
9142
|
+
export declare const ToastLightColorSchemeIconError = "#ee6f79";
|
9143
|
+
export declare const ToastLightColorSchemeIconSuccess = "#4ba96c";
|
9144
|
+
export declare const ToastLightColorSchemeIconWarning = "#e19f12";
|
9145
|
+
export declare const ToastDarkColorSchemeBackground = "#333f4a";
|
9146
|
+
export declare const ToastDarkColorSchemeBorder = "rgba(25, 37, 47, 0.1)";
|
9147
|
+
export declare const ToastDarkColorSchemeText = "#f2f5f9";
|
9148
|
+
export declare const ToastDarkColorSchemeTextCaption = "#8c99a5";
|
9149
|
+
export declare const ToastDarkColorSchemeShadow = "0 8px 16px 0 rgba(#27333e, 0.2)";
|
9150
|
+
export declare const ToastDarkColorSchemeIconInfo = "#18a5c5";
|
9151
|
+
export declare const ToastDarkColorSchemeIconError = "#ee6f79";
|
9152
|
+
export declare const ToastDarkColorSchemeIconSuccess = "#4ba96c";
|
9153
|
+
export declare const ToastDarkColorSchemeIconWarning = "#e19f12";
|
9154
|
+
export declare const ToastSizeBorderWidth = "1px";
|
9155
|
+
export declare const ToastSizeBorderRadius = "3px";
|
9156
|
+
export declare const ToastSizeWidth = "360px";
|
9157
|
+
export declare const ToastSizePaddingVertical = "12px";
|
9158
|
+
export declare const ToastSizePaddingLeft = "12px";
|
9159
|
+
export declare const ToastSizePaddingRight = "16px";
|
9160
|
+
export declare const ToastSizeCloseButtonWidth = "32px";
|
9161
|
+
export declare const ToastSizeCloseButtonMargin = "8px";
|
9162
|
+
export declare const ToastSizeIconMargin = "8px";
|
9163
|
+
export declare const ToastSizeCaptionMargin = "8px";
|
9164
|
+
export declare const ToastSizeActionbarMargin = "8px";
|
9165
|
+
export declare const ToastSizeActionbarGap = "12px";
|
9166
|
+
export declare const ToastSizeVerticalMargin = "16px";
|
9167
|
+
export declare const ToastSizeHorizontalMargin = "16px";
|
9168
|
+
export declare const ToastSizeGap = "12px";
|
9169
|
+
export declare const ToastFontTitle = "body";
|
9170
|
+
export declare const ToastFontCaption = "body";
|
9100
9171
|
export declare const ToggleLightColorSchemeBorder = "#bdc7d1";
|
9101
9172
|
export declare const ToggleLightColorSchemeBackground = "white";
|
9102
9173
|
export declare const ToggleLightColorSchemeCircleBorder = "#bdc7d1";
|
@@ -6,6 +6,17 @@ require('./transforms/attribute/typography')(StyleDictionary);
|
|
6
6
|
require('./transforms/attribute/palette')(StyleDictionary);
|
7
7
|
require('./transforms/attribute/prefix')(StyleDictionary);
|
8
8
|
require('./transforms/attribute/size')(StyleDictionary);
|
9
|
+
require('./transforms/attribute/figma-border')(StyleDictionary);
|
10
|
+
require('./transforms/attribute/figma-font')(StyleDictionary);
|
11
|
+
require('./transforms/attribute/figma-typography')(StyleDictionary);
|
12
|
+
require('./transforms/attribute/figma-opacity')(StyleDictionary);
|
13
|
+
require('./transforms/attribute/figma-spacing')(StyleDictionary);
|
14
|
+
require('./transforms/attribute/figma-sizing')(StyleDictionary);
|
15
|
+
require('./transforms/attribute/figma-color')(StyleDictionary);
|
16
|
+
require('./transforms/attribute/figma-shadow')(StyleDictionary);
|
17
|
+
require('./transforms/attribute/figma-default')(StyleDictionary);
|
18
|
+
require('./transforms/attribute/figma-group')(StyleDictionary);
|
19
|
+
require('./transforms/value/figma-values')(StyleDictionary);
|
9
20
|
|
10
21
|
// ==== Include custom filters ====
|
11
22
|
require('./filters/palette')(StyleDictionary);
|
@@ -17,10 +28,12 @@ require('./filters/typography')(StyleDictionary);
|
|
17
28
|
require('./transformGroups/scss')(StyleDictionary);
|
18
29
|
require('./transformGroups/css')(StyleDictionary);
|
19
30
|
require('./transformGroups/ts')(StyleDictionary);
|
31
|
+
require('./transformGroups/figma')(StyleDictionary);
|
20
32
|
|
21
33
|
// ==== Include custom formats ====
|
22
34
|
require('./formats/typography')(StyleDictionary);
|
23
35
|
require('./formats/palette')(StyleDictionary);
|
36
|
+
require('./formats/figma')(StyleDictionary);
|
24
37
|
|
25
38
|
// ==== Run build ====
|
26
39
|
console.log('Build started...');
|
@@ -1,8 +1,8 @@
|
|
1
1
|
const merge = require('lodash/merge');
|
2
|
-
|
3
2
|
const scssConfig = require('./scss');
|
4
3
|
const jsConfig = require('./js');
|
5
4
|
const cssConfig = require('./css');
|
5
|
+
const figmaConfig = require('./figma');
|
6
6
|
|
7
7
|
const filterObj = {
|
8
8
|
options: {
|
@@ -29,12 +29,12 @@ function getSources(theme) {
|
|
29
29
|
}
|
30
30
|
|
31
31
|
function getConfigs(theme) {
|
32
|
-
|
33
32
|
scssConfig.scss.buildPath = theme.outputPath;
|
34
33
|
jsConfig.js.buildPath = theme.outputPath;
|
35
34
|
cssConfig.css.buildPath = theme.outputPath;
|
35
|
+
figmaConfig.figma.buildPath = theme.outputPath;
|
36
36
|
|
37
|
-
return filterOptions([scssConfig, jsConfig, cssConfig]);
|
37
|
+
return filterOptions([scssConfig, jsConfig, cssConfig, figmaConfig]);
|
38
38
|
}
|
39
39
|
|
40
40
|
module.exports = (theme) => {
|
@@ -0,0 +1,41 @@
|
|
1
|
+
const typographySingleTypes = {
|
2
|
+
textTransform: 'textTransform',
|
3
|
+
textCase: 'textCase',
|
4
|
+
fontFeatureSettings: 'fontFeatureSettings',
|
5
|
+
lineHeight: 'lineHeight',
|
6
|
+
letterSpacing: 'letterSpacing',
|
7
|
+
fontFamily: 'fontFamily',
|
8
|
+
fontSize: 'fontSize',
|
9
|
+
fontWeight: 'fontWeight'
|
10
|
+
};
|
11
|
+
|
12
|
+
const typographyPluralTypes = {
|
13
|
+
fontFamilies: 'fontFamilies',
|
14
|
+
fontWeights: 'fontWeights',
|
15
|
+
lineHeights: 'lineHeights',
|
16
|
+
fontSizes: 'fontSizes'
|
17
|
+
};
|
18
|
+
|
19
|
+
const typographyTypes = {
|
20
|
+
...typographySingleTypes,
|
21
|
+
...typographyPluralTypes
|
22
|
+
};
|
23
|
+
|
24
|
+
const figmaTypes = {
|
25
|
+
...typographyTypes,
|
26
|
+
typography: 'typography',
|
27
|
+
other: 'other',
|
28
|
+
color: 'color',
|
29
|
+
borderWidth: 'borderWidth',
|
30
|
+
borderRadius: 'borderRadius',
|
31
|
+
sizing: 'sizing',
|
32
|
+
spacing: 'spacing',
|
33
|
+
opacity: 'opacity',
|
34
|
+
boxShadow: 'boxShadow'
|
35
|
+
};
|
36
|
+
|
37
|
+
module.exports = {
|
38
|
+
figmaTypes,
|
39
|
+
typographySingleTypes,
|
40
|
+
typographyPluralTypes
|
41
|
+
};
|
@@ -0,0 +1,104 @@
|
|
1
|
+
const { typographySingleTypes, figmaTypes } = require('../figma-types');
|
2
|
+
const setProperty = require('lodash/set');
|
3
|
+
|
4
|
+
const JSON_INDENTATION = 2;
|
5
|
+
|
6
|
+
function buildTypography(tokens) {
|
7
|
+
return {
|
8
|
+
value: Object.entries(tokens).reduce(
|
9
|
+
(accum, [, item]) => {
|
10
|
+
const { value, attributes: { figmaPropType }} = item;
|
11
|
+
accum[figmaPropType] = cleanValue(value);
|
12
|
+
|
13
|
+
return accum;
|
14
|
+
},
|
15
|
+
{}
|
16
|
+
),
|
17
|
+
type: figmaTypes.typography
|
18
|
+
};
|
19
|
+
}
|
20
|
+
|
21
|
+
function rebuildTokes(tokens, parentCategory = null) {
|
22
|
+
if (tokens.value === undefined) {
|
23
|
+
const firstItemType = Object.values(tokens)[0] ?.attributes?.figmaPropType;
|
24
|
+
if (Object.values(typographySingleTypes).includes(firstItemType)) {
|
25
|
+
return buildTypography(tokens);
|
26
|
+
}
|
27
|
+
|
28
|
+
return Object.entries(tokens).reduce(
|
29
|
+
(accum, [tokenKey, tokenValue]) => {
|
30
|
+
accum[tokenKey] = cleanValue(rebuildTokes(tokenValue, parentCategory));
|
31
|
+
|
32
|
+
return accum;
|
33
|
+
},
|
34
|
+
{}
|
35
|
+
);
|
36
|
+
}
|
37
|
+
|
38
|
+
if (typeof tokens.value === 'object') {
|
39
|
+
return rebuildTokes(tokens.value, tokens.attributes.category);
|
40
|
+
}
|
41
|
+
|
42
|
+
let { category, figmaPropType, figmaValue, figmaLink } = tokens.attributes;
|
43
|
+
const { original } = tokens;
|
44
|
+
figmaValue = figmaLink ? `{${figmaValue}}` : figmaValue;
|
45
|
+
let value = figmaValue ?? original.value;
|
46
|
+
|
47
|
+
if (parentCategory && category !== parentCategory) {
|
48
|
+
value = buildRefFromAttributes(tokens.attributes);
|
49
|
+
}
|
50
|
+
|
51
|
+
return { value: cleanValue(value), type: figmaPropType };
|
52
|
+
}
|
53
|
+
|
54
|
+
function cleanValue(value) {
|
55
|
+
return typeof value === 'string' ? value.replaceAll('.value.', '.') : value;
|
56
|
+
}
|
57
|
+
|
58
|
+
function buildRefFromAttributes(attributes) {
|
59
|
+
const { category, type, item, subitem } = attributes;
|
60
|
+
const ref = [category, type, item, subitem].filter((refPart) => !!refPart);
|
61
|
+
|
62
|
+
return `{${ref.join('.')}}`;
|
63
|
+
}
|
64
|
+
|
65
|
+
function findLastLeafAttributes(property) {
|
66
|
+
if (!property.attributes) {
|
67
|
+
return findLastLeafAttributes(property[Object.keys(property)[0]]);
|
68
|
+
}
|
69
|
+
|
70
|
+
return property.attributes;
|
71
|
+
}
|
72
|
+
|
73
|
+
function prepareFigmaTitle(value) {
|
74
|
+
return value
|
75
|
+
.replaceAll('-', ' ')
|
76
|
+
.split(' ')
|
77
|
+
.map((titlePart) => titlePart.charAt(0).toUpperCase() + titlePart.slice(1))
|
78
|
+
.join(' ');
|
79
|
+
}
|
80
|
+
|
81
|
+
module.exports = (styleDictionary) => {
|
82
|
+
styleDictionary.registerFormat({
|
83
|
+
name: 'figmaTokensPlugin',
|
84
|
+
formatter: ({ dictionary }) => {
|
85
|
+
const groupedDict = Object.entries(dictionary.tokens)
|
86
|
+
.filter(([, propValue]) => typeof propValue === 'object')
|
87
|
+
.reduce(
|
88
|
+
(accum, [propName, propValue]) => {
|
89
|
+
const { group, subgroup } = findLastLeafAttributes(propValue);
|
90
|
+
const propPath = group === 'properties'
|
91
|
+
? `${prepareFigmaTitle(group)}.${propName}`
|
92
|
+
: `${prepareFigmaTitle(subgroup)}.${propName}`;
|
93
|
+
setProperty(accum, propPath, propValue);
|
94
|
+
|
95
|
+
return accum;
|
96
|
+
},
|
97
|
+
{}
|
98
|
+
);
|
99
|
+
const figmaTokens = rebuildTokes(groupedDict);
|
100
|
+
|
101
|
+
return JSON.stringify(figmaTokens, null, JSON_INDENTATION);
|
102
|
+
}
|
103
|
+
});
|
104
|
+
};
|