@central-design-system/components 3.0.0-beta.4 → 3.0.0-beta.6

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 (39) hide show
  1. package/dist/cds.css +1 -1
  2. package/dist/cds.es.js +3095 -3046
  3. package/dist/cds.umd.js +2 -2
  4. package/dist/components/CdsBadge/CdsBadge.vue.d.ts +17 -2
  5. package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +49 -3
  6. package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +1 -1
  7. package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +1 -1
  8. package/dist/components/CdsTable/CdsTable.vue.d.ts +1 -1
  9. package/dist/components/CdsTable/components/Table/InternalTable.d.ts +1 -1
  10. package/dist/components/CdsTable/components/TableProvider.d.ts +1 -1
  11. package/dist/components/CdsUploader/CdsUploader.vue.d.ts +1 -1
  12. package/package.json +1 -1
  13. package/src/scss/themes/b2b/tokens.json +104 -104
  14. package/src/scss/themes/cds/tokens.json +104 -104
  15. package/src/scss/themes/index.ts +1 -1
  16. package/src/scss/utility/display.scss +56 -5
  17. package/src/scss/utility/flexbox.scss +26 -28
  18. package/src/scss/utility/index.scss +0 -2
  19. package/src/scss/utility/layout.scss +65 -3
  20. package/src/scss/utility/spacing.scss +46 -86
  21. package/src/scss/utility/variables/display.scss +11 -0
  22. package/src/scss/utility/variables/exports/_display.scss +7 -0
  23. package/src/scss/utility/variables/exports/_flex.scss +13 -0
  24. package/src/scss/utility/variables/exports/_overflow.scss +7 -0
  25. package/src/scss/utility/variables/exports/_position.scss +7 -0
  26. package/src/scss/utility/variables/exports/_spacing.scss +14 -0
  27. package/src/scss/utility/variables/exports/_visibility.scss +7 -0
  28. package/src/scss/utility/variables/exports/_widthHeight.scss +7 -0
  29. package/src/scss/utility/variables/flex.scss +99 -0
  30. package/src/scss/utility/variables/index.scss +11 -0
  31. package/src/scss/utility/variables/overflow.scss +6 -0
  32. package/src/scss/utility/variables/position.scss +7 -0
  33. package/src/scss/utility/variables/spacing.scss +37 -0
  34. package/src/scss/utility/variables/visibility.scss +5 -0
  35. package/src/scss/utility/variables/widthHeight.scss +69 -0
  36. package/src/scss/utility/generatedFiles/generatedStyles.json +0 -1
  37. package/src/scss/utility/generatedFiles/generatedStyles.scss +0 -300
  38. package/src/scss/utility/typography.scss +0 -16
  39. package/src/scss/utility/variables.scss +0 -116
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Automatically generated by CDS CLI
3
- * Generated on 10/18/2023, 11:05:39 AM
3
+ * Generated on 11/7/2023, 11:30:49 AM
4
4
  **/
5
5
 
6
6
  /**
@@ -1,13 +1,64 @@
1
- @import "variables";
1
+ @import "./variables";
2
2
 
3
- @each $name, $display in $displays {
3
+ /*
4
+ * При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
5
+ * Для всех утилитарных классов необходимо указывать !important
6
+ * Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
7
+ * Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
8
+ */
9
+
10
+ // Без брейкпоинтов
11
+ @each $name, $value in $displays {
12
+ .cds-#{$name} {
13
+ display: $value !important;
14
+ }
15
+ }
16
+
17
+ @each $name, $value in $overflow {
18
+ .cds-overflow-#{$name} {
19
+ overflow: $value !important;
20
+ }
21
+ }
22
+
23
+ @each $name, $value in $positions {
4
24
  .cds-#{$name} {
5
- display: $display !important;
25
+ position: $value !important;
6
26
  }
7
27
  }
8
28
 
9
- @each $name, $visibility in $visibility {
29
+ @each $name, $value in $visibility {
10
30
  .cds-#{$name} {
11
- visibility: $visibility !important;
31
+ visibility: $value !important;
32
+ }
33
+ }
34
+
35
+ // С брейкпоинтами
36
+ @each $breakpoint, $map in $grid-breakpoints {
37
+ $width: map-get($map, 'width');
38
+
39
+ @media (min-width: $width) {
40
+ @each $name, $value in $displays {
41
+ .#{$breakpoint}\:cds-#{$name} {
42
+ display: $value !important;
43
+ }
44
+ }
45
+
46
+ @each $name, $value in $overflow {
47
+ .#{$breakpoint}\:cds-overflow-#{$name} {
48
+ overflow: $value !important;
49
+ }
50
+ }
51
+
52
+ @each $name, $value in $visibility {
53
+ .#{$breakpoint}\cds-#{$name} {
54
+ visibility: $value !important;
55
+ }
56
+ }
57
+
58
+ @each $name, $value in $positions {
59
+ .#{$breakpoint}\:cds-#{$name} {
60
+ position: $value !important;
61
+ }
62
+ }
12
63
  }
13
64
  }
@@ -1,37 +1,35 @@
1
- @import "variables";
1
+ @import "./variables";
2
2
 
3
- @each $name, $direction in $flex-direction {
4
- .cds-#{$name} {
5
- flex-direction: $direction !important;
6
- }
7
- }
3
+ /*
4
+ * При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
5
+ * Для всех утилитарных классов необходимо указывать !important
6
+ * Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
7
+ * Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
8
+ */
8
9
 
9
- @each $name, $value in $justify-content {
10
- .cds-justify-#{$name} {
11
- justify-content: $value !important;
12
- }
13
- }
10
+ @each $key, $value in $flex-properties {
11
+ $prefix: map-get($value, 'name');
12
+ $propertyMap: map-get($value, 'map');
13
+ $cssProperty: map-get($value, 'property');
14
14
 
15
- @each $name, $value in $align-items {
16
- .cds-items-#{$name} {
17
- align-items: $value !important;
15
+ // без брейкпоинтов
16
+ @each $name, $propValue in $propertyMap {
17
+ .cds-#{$prefix}#{$name} {
18
+ #{$cssProperty}: $propValue !important;
19
+ }
18
20
  }
19
- }
20
21
 
21
- @each $name, $value in $align-content {
22
- .cds-content-#{$name} {
23
- align-content: $value !important;
24
- }
25
- }
22
+ // брейкпоинты
23
+ @each $breakpoint, $map in $grid-breakpoints {
24
+ $width: map-get($map, 'width');
26
25
 
27
- @each $name, $value in $flex-wrap {
28
- .cds-flex-#{$name} {
29
- flex-wrap: $value !important;
26
+ @media (min-width: $width) {
27
+ @each $name, $propValue in $propertyMap {
28
+ .#{$breakpoint}\:cds-#{$prefix}#{$name} {
29
+ #{$cssProperty}: $propValue !important;
30
+ }
31
+ }
32
+ }
30
33
  }
31
34
  }
32
35
 
33
- @each $name, $value in $align-self {
34
- .cds-self-#{$name} {
35
- align-self: $value !important;
36
- }
37
- }
@@ -1,7 +1,5 @@
1
- @import 'generatedFiles/generatedStyles';
2
1
  @import 'display';
3
2
  @import 'layout';
4
3
  @import 'spacing';
5
- @import 'typography';
6
4
  @import 'flexbox';
7
5
  @import 'lists';
@@ -1,4 +1,11 @@
1
- @import "variables";
1
+ @import "./variables";
2
+
3
+ /*
4
+ * При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
5
+ * Для всех утилитарных классов необходимо указывать !important
6
+ * Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
7
+ * Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
8
+ */
2
9
 
3
10
  @each $name, $index in $z-indexes {
4
11
  .#{$name} {
@@ -6,6 +13,61 @@
6
13
  }
7
14
  }
8
15
 
9
- .cds-fullwidth {
10
- width: 100%;
16
+ @each $name, $value in $widthHeight {
17
+ .cds-h-#{$name} {
18
+ height: $value !important;
19
+ }
20
+
21
+ .cds-w-#{$name} {
22
+ width: $value !important;
23
+ }
24
+
25
+ .cds-max-h-#{$name} {
26
+ max-height: $value !important;
27
+ }
28
+
29
+ .cds-max-w-#{$name} {
30
+ max-width: $value !important;
31
+ }
32
+
33
+ .cds-min-h-#{$name} {
34
+ min-height: $value !important;
35
+ }
36
+
37
+ .cds-min-w-#{$name} {
38
+ min-width: $value !important;
39
+ }
40
+ }
41
+
42
+
43
+ @each $breakpoint, $map in $grid-breakpoints {
44
+ $width: map-get($map, 'width');
45
+
46
+ @media (min-width: $width) {
47
+ @each $name, $value in $widthHeight {
48
+ .#{$breakpoint}\:cds-w-#{$name} {
49
+ width: $value !important;
50
+ }
51
+
52
+ .#{$breakpoint}\:cds-min-w-#{$name} {
53
+ min-width: $value !important;
54
+ }
55
+
56
+ .#{$breakpoint}\:cds-max-w-#{$name} {
57
+ max-width: $value !important;
58
+ }
59
+
60
+ .#{$breakpoint}\:cds-h-#{$name} {
61
+ height: $value !important;
62
+ }
63
+
64
+ .#{$breakpoint}\:cds-min-h-#{$name} {
65
+ min-height: $value !important;
66
+ }
67
+
68
+ .#{$breakpoint}\:cds-max-h-#{$name} {
69
+ max-height: $value !important;
70
+ }
71
+ }
72
+ }
11
73
  }
@@ -1,89 +1,49 @@
1
- @import "variables";
2
-
3
- @each $name, $space in $spaces {
4
- .cds-pa-#{$name} {
5
- padding: $space !important;
6
- }
7
- }
8
-
9
- @each $name, $space in $spaces {
10
- .cds-pt-#{$name} {
11
- padding-top: $space !important;
12
- }
13
- }
14
-
15
- @each $name, $space in $spaces {
16
- .cds-pb-#{$name} {
17
- padding-bottom: $space !important;
18
- }
19
- }
20
-
21
- @each $name, $space in $spaces {
22
- .cds-pr-#{$name} {
23
- padding-right: $space !important;
1
+ @import "./variables";
2
+
3
+ /*
4
+ * При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
5
+ * Для всех утилитарных классов необходимо указывать !important
6
+ * Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
7
+ * Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
8
+ */
9
+
10
+ // Базовые классы, без брейкпоинтов
11
+ @each $abbr, $cssProp in map-merge($padding-map, $margin-map) {
12
+ @each $name, $space in $spaces {
13
+ @if type-of($cssProp) == 'list' {
14
+ .cds-#{$abbr}-#{$name} {
15
+ @each $prop in $cssProp {
16
+ #{$prop}: $space !important;
17
+ }
18
+ }
19
+ } @else {
20
+ .cds-#{$abbr}-#{$name} {
21
+ #{$cssProp}: $space !important;
22
+ }
23
+ }
24
+ }
25
+ }
26
+
27
+ // Классы с брейкпоинтами
28
+ @each $breakpoint, $map in $grid-breakpoints {
29
+ $width: map-get($map, 'width');
30
+
31
+ @media (min-width: $width) {
32
+ @each $abbr, $cssProp in map-merge($padding-map, $margin-map) {
33
+ @each $name, $space in $spaces {
34
+ @if type-of($cssProp) == 'list' {
35
+ .#{$breakpoint}\:cds-#{$abbr}-#{$name} {
36
+ @each $prop in $cssProp {
37
+ #{$prop}: $space !important;
38
+ }
39
+ }
40
+ } @else {
41
+ .#{$breakpoint}\:cds-#{$abbr}-#{$name} {
42
+ #{$cssProp}: $space !important;
43
+ }
44
+ }
45
+ }
46
+ }
24
47
  }
25
48
  }
26
49
 
27
- @each $name, $space in $spaces {
28
- .cds-pl-#{$name} {
29
- padding-left: $space !important;
30
- }
31
- }
32
-
33
- @each $name, $space in $spaces {
34
- .cds-px-#{$name} {
35
- padding-right: $space !important;
36
- padding-left: $space !important;
37
- }
38
- }
39
-
40
- @each $name, $space in $spaces {
41
- .cds-py-#{$name} {
42
- padding-top: $space !important;
43
- padding-bottom: $space !important;
44
- }
45
- }
46
-
47
- @each $name, $space in $spaces {
48
- .cds-ma-#{$name} {
49
- margin: $space !important;
50
- }
51
- }
52
-
53
- @each $name, $space in $spaces {
54
- .cds-mt-#{$name} {
55
- margin-top: $space !important;
56
- }
57
- }
58
-
59
- @each $name, $space in $spaces {
60
- .cds-mb-#{$name} {
61
- margin-bottom: $space !important;
62
- }
63
- }
64
-
65
- @each $name, $space in $spaces {
66
- .cds-mr-#{$name} {
67
- margin-right: $space !important;
68
- }
69
- }
70
-
71
- @each $name, $space in $spaces {
72
- .cds-ml-#{$name} {
73
- margin-left: $space !important;
74
- }
75
- }
76
-
77
- @each $name, $space in $spaces {
78
- .cds-mx-#{$name} {
79
- margin-right: $space !important;
80
- margin-left: $space !important;
81
- }
82
- }
83
-
84
- @each $name, $space in $spaces {
85
- .cds-my-#{$name} {
86
- margin-top: $space !important;
87
- margin-bottom: $space !important;
88
- }
89
- }
@@ -0,0 +1,11 @@
1
+ $displays: (
2
+ block: block,
3
+ inline-block: inline-block,
4
+ inline: inline,
5
+ flex: flex,
6
+ inline-flex: inline-flex,
7
+ table: table,
8
+ table-row: table-row,
9
+ table-cell: table-cell,
10
+ none: none
11
+ );
@@ -0,0 +1,7 @@
1
+ @import "../display";
2
+
3
+ :export {
4
+ @each $name, $value in $displays {
5
+ #{$name}: display/#{$value}
6
+ };
7
+ };
@@ -0,0 +1,13 @@
1
+ @import "../flex";
2
+
3
+ :export {
4
+ @each $key, $value in $flex-properties {
5
+ $prefix: map-get($value, 'name');
6
+ $propertyMap: map-get($value, 'map');
7
+ $cssProperty: map-get($value, 'property');
8
+
9
+ @each $name, $value in $propertyMap {
10
+ #{$prefix}#{$name}: #{$cssProperty}/#{$value}
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,7 @@
1
+ @import "../overflow";
2
+
3
+ :export {
4
+ @each $name, $value in $overflow {
5
+ #{$name}: #{overflow}/#{$value}
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ @import "../position";
2
+
3
+ :export {
4
+ @each $name, $value in $positions {
5
+ #{$name}: #{position}/#{$value}
6
+ }
7
+ }
@@ -0,0 +1,14 @@
1
+ @use 'sass:list';
2
+ @import "../spacing";
3
+
4
+ :export {
5
+ @each $abbr, $cssProp in $padding-map {
6
+ @each $name, $space in $spaces {
7
+ @if type-of($cssProp) == 'list' {
8
+ #{$abbr}-#{$name}: list.nth($cssProp, 1)/#{$space}_ list.nth($cssProp, 2)/#{$space}
9
+ } @else {
10
+ #{$abbr}-#{$name}: #{$cssProp}/#{$space}
11
+ }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ @import "../visibility";
2
+
3
+ :export {
4
+ @each $name, $value in $visibility {
5
+ #{$name}: #{visibility}/#{$value}
6
+ }
7
+ }
@@ -0,0 +1,7 @@
1
+ @import "../widthHeight";
2
+
3
+ :export {
4
+ @each $name, $value in $widthHeight {
5
+ w-#{$name}: #{width}/#{$value}
6
+ }
7
+ }
@@ -0,0 +1,99 @@
1
+ $flex-direction: (
2
+ 'flex-col': column,
3
+ 'flex-row': row,
4
+ 'flex-row-reverse': row-reverse,
5
+ 'flex-col-reverse': column-reverse
6
+ );
7
+
8
+ $justify-content: (
9
+ 'center': center,
10
+ 'start': flex-start,
11
+ 'end': flex-end,
12
+ 'between': space-between,
13
+ 'around': space-around,
14
+ 'stretch': stretch
15
+ );
16
+
17
+ $align-items: (
18
+ 'start': flex-start,
19
+ 'end': flex-end,
20
+ 'center': center,
21
+ 'baseline': baseline,
22
+ 'stretch': stretch
23
+ );
24
+
25
+ $align-content: (
26
+ 'start': flex-start,
27
+ 'end': flex-end,
28
+ 'center': center,
29
+ 'between': space-between,
30
+ 'around': space-around,
31
+ 'stretch': stretch,
32
+ );
33
+
34
+ $align-self: (
35
+ 'start': flex-start,
36
+ 'end': flex-end,
37
+ 'center': center,
38
+ 'baseline': baseline,
39
+ 'stretch': stretch,
40
+ 'auto': auto,
41
+ 'normal': normal,
42
+ 'first-baseline': first baseline,
43
+ 'last-baseline': last baseline
44
+ );
45
+
46
+ $flex-wrap: (
47
+ 'wrap': wrap,
48
+ 'nowrap': nowrap,
49
+ 'wrap-reverse': wrap-reverse
50
+ );
51
+
52
+ $flex-grow: (
53
+ '0': 0,
54
+ '1': 1,
55
+ '2': 2,
56
+ '3': 3
57
+ );
58
+
59
+ $flex-shrink: (
60
+ '0': 0,
61
+ '1': 1,
62
+ '2': 2,
63
+ '3': 3
64
+ );
65
+
66
+ $flex-basis: (
67
+ 'auto': auto,
68
+ '0': 0,
69
+ '10': 10%,
70
+ '20': 20%,
71
+ '30': 30%,
72
+ '40': 40%
73
+ );
74
+
75
+ $order: (
76
+ 'first': -1,
77
+ '0': 0,
78
+ '1': 1,
79
+ '2': 2,
80
+ '3': 3,
81
+ '4': 4,
82
+ '5': 5,
83
+ '6': 6,
84
+ '7': 7,
85
+ 'last': 999
86
+ );
87
+
88
+ $flex-properties: (
89
+ 'direction': ('name': '', 'map': $flex-direction, 'property': 'flex-direction'),
90
+ 'justify': ('name': 'justify-', 'map': $justify-content, 'property': 'justify-content'),
91
+ 'items': ('name': 'items-', 'map': $align-items, 'property': 'align-items'),
92
+ 'content': ('name': 'content-', 'map': $align-content, 'property': 'align-content'),
93
+ 'flex': ('name': 'flex-', 'map': $flex-wrap, 'property': 'flex-wrap'),
94
+ 'self': ('name': 'self-', 'map': $align-self, 'property': 'align-self'),
95
+ 'grow': ('name': 'grow-', 'map': $flex-grow, 'property': 'flex-grow'),
96
+ 'shrink': ('name': 'shrink-', 'map': $flex-shrink, 'property': 'flex-shrink'),
97
+ 'basis': ('name': 'basis-', 'map': $flex-basis, 'property': 'flex-basis'),
98
+ 'order': ('name': 'order-', 'map': $order, 'property': 'order')
99
+ );
@@ -0,0 +1,11 @@
1
+ @import "../../mixins/layout/layout";
2
+ @import "../../mixins/layout/spacing";
3
+ @import "../../mixins/typo";
4
+ @import "../../modules/grid/_config";
5
+ @import "visibility";
6
+ @import "widthHeight";
7
+ @import "display";
8
+ @import "overflow";
9
+ @import "position";
10
+ @import "flex";
11
+ @import "spacing";
@@ -0,0 +1,6 @@
1
+ $overflow: (
2
+ 'hidden': hidden,
3
+ 'scroll': scroll,
4
+ 'auto': auto,
5
+ 'visible': visible
6
+ );
@@ -0,0 +1,7 @@
1
+ $positions: (
2
+ 'static': static,
3
+ 'relative': relative,
4
+ 'absolute': absolute,
5
+ 'fixed': fixed,
6
+ 'sticky': sticky
7
+ );
@@ -0,0 +1,37 @@
1
+ @import "../../mixins/layout/spacing";
2
+
3
+ $spaces: (
4
+ 'none': 0,
5
+ '3xs': $cds-spacing-3xs,
6
+ 'xxs': $cds-spacing-xxs,
7
+ 'xs': $cds-spacing-xs,
8
+ 's': $cds-spacing-s,
9
+ 'm': $cds-spacing-m,
10
+ 'l': $cds-spacing-l,
11
+ 'xl': $cds-spacing-xl,
12
+ 'xxl': $cds-spacing-xxl,
13
+ '3xl': $cds-spacing-3xl,
14
+ '4xl': $cds-spacing-4xl,
15
+ '5xl': $cds-spacing-5xl,
16
+ '6xl': $cds-spacing-6xl
17
+ );
18
+
19
+ $padding-map: (
20
+ 'pa': 'padding',
21
+ 'pt': 'padding-top',
22
+ 'pb': 'padding-bottom',
23
+ 'pr': 'padding-right',
24
+ 'pl': 'padding-left',
25
+ 'px': (padding-right, padding-left),
26
+ 'py': (padding-top, padding-bottom),
27
+ );
28
+
29
+ $margin-map: (
30
+ 'ma': 'margin',
31
+ 'mt': 'margin-top',
32
+ 'mb': 'margin-bottom',
33
+ 'mr': 'margin-right',
34
+ 'ml': 'margin-left',
35
+ 'mx': (margin-right, margin-left),
36
+ 'my': (margin-top, margin-bottom),
37
+ );
@@ -0,0 +1,5 @@
1
+ $visibility: (
2
+ 'invisible': hidden,
3
+ 'visible': visible,
4
+ 'collapse': collapse
5
+ );