@central-design-system/components 3.0.0-beta.12 → 3.0.0-beta.13
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/dist/cds.css +1 -1
- package/dist/cds.es.js +4681 -4625
- package/dist/cds.umd.js +5 -5
- package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +24 -9
- package/dist/components/CdsBadge/CdsBadge.vue.d.ts +3 -3
- package/dist/components/CdsButton/CdsButton.vue.d.ts +8 -8
- package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +38 -13
- package/dist/components/CdsContainer/CdsContainer.vue.d.ts +5 -5
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +4 -4
- package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +44 -37
- package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +5 -5
- package/dist/components/CdsFooter/CdsFooter.vue.d.ts +12 -3
- package/dist/components/CdsHeader/CdsHeader.vue.d.ts +12 -3
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +11 -0
- package/dist/components/CdsList/CdsList.vue.d.ts +12 -3
- package/dist/components/CdsList/CdsListItem.vue.d.ts +1 -1
- package/dist/components/CdsStatus/CdsStatus.vue.d.ts +5 -5
- package/dist/components/CdsTable/composable/scroll.d.ts +4607 -0
- package/dist/components/CdsTable/utils/index.d.ts +1 -0
- package/dist/components/CdsTable/utils/vnode.d.ts +10 -0
- package/dist/components/CdsTabs/CdsTabs.vue.d.ts +3 -3
- package/dist/components/CdsToolbar/CdsToolbar.vue.d.ts +42 -0
- package/dist/composable/appearance.d.ts +1 -1
- package/dist/composable/index.d.ts +2 -1
- package/dist/composable/invertColor.d.ts +19 -0
- package/dist/composable/select.d.ts +8 -3
- package/dist/composable/transparent.d.ts +19 -0
- package/package.json +1 -1
- package/src/scss/modules/grid/_css-grid.scss +12 -19
- package/src/scss/modules/grid/_flex-grid.scss +9 -5
- package/src/scss/modules/grid/_mixins.scss +23 -31
- package/src/scss/themes/index.ts +1 -1
- package/src/scss/utility/index.scss +1 -0
- package/src/scss/utility/typography.scss +63 -0
- package/src/scss/utility/variables/exports/_display.scss +4 -4
- package/src/scss/utility/variables/exports/_typography.scss +22 -0
- package/src/scss/utility/variables/index.scss +1 -0
- package/src/scss/utility/variables/typography.scss +93 -0
- package/dist/composable/dark.d.ts +0 -19
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import type { Slots, VNodeArrayChildren } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Render slot with props and fallback (Instead of renderSlot function from Vue 3)
|
|
5
|
+
* @param slots
|
|
6
|
+
* @param name
|
|
7
|
+
* @param props
|
|
8
|
+
* @param fallback
|
|
9
|
+
*/
|
|
10
|
+
export declare function customRenderSlot(slots: Slots, name: string, props: Record<string, unknown>, fallback?: () => VNodeArrayChildren): VNode;
|
|
@@ -46,7 +46,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
46
46
|
available: readonly ["cds", "b2b", "promo", "dark"];
|
|
47
47
|
default: undefined;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
invertColor: {
|
|
50
50
|
type: PropType<boolean>;
|
|
51
51
|
default: boolean;
|
|
52
52
|
};
|
|
@@ -152,7 +152,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
152
152
|
available: readonly ["cds", "b2b", "promo", "dark"];
|
|
153
153
|
default: undefined;
|
|
154
154
|
};
|
|
155
|
-
|
|
155
|
+
invertColor: {
|
|
156
156
|
type: PropType<boolean>;
|
|
157
157
|
default: boolean;
|
|
158
158
|
};
|
|
@@ -218,7 +218,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
218
218
|
items: readonly TCdsTabItem[];
|
|
219
219
|
tag: string;
|
|
220
220
|
disabled: boolean;
|
|
221
|
-
|
|
221
|
+
invertColor: boolean;
|
|
222
222
|
required: NonNullable<boolean | "force">;
|
|
223
223
|
theme: string;
|
|
224
224
|
modelValue: any;
|
|
@@ -6,18 +6,38 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
6
6
|
available: readonly ["cds", "b2b", "promo", "dark"];
|
|
7
7
|
default: undefined;
|
|
8
8
|
};
|
|
9
|
+
invertColor: {
|
|
10
|
+
type: PropType<boolean>;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
transparent: {
|
|
14
|
+
type: PropType<boolean>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Вложенный тулбар
|
|
19
|
+
*/
|
|
9
20
|
inset: {
|
|
10
21
|
type: PropType<boolean>;
|
|
11
22
|
default: boolean;
|
|
12
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Показать границу
|
|
26
|
+
*/
|
|
13
27
|
bordered: {
|
|
14
28
|
type: PropType<boolean>;
|
|
15
29
|
default: boolean;
|
|
16
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Убрать отступ справа или слева
|
|
33
|
+
*/
|
|
17
34
|
noGutter: {
|
|
18
35
|
type: PropType<"start" | "end">;
|
|
19
36
|
default: undefined;
|
|
20
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Убрать отступы
|
|
40
|
+
*/
|
|
21
41
|
noGutters: {
|
|
22
42
|
type: PropType<boolean>;
|
|
23
43
|
default: boolean;
|
|
@@ -30,23 +50,45 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
30
50
|
available: readonly ["cds", "b2b", "promo", "dark"];
|
|
31
51
|
default: undefined;
|
|
32
52
|
};
|
|
53
|
+
invertColor: {
|
|
54
|
+
type: PropType<boolean>;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
transparent: {
|
|
58
|
+
type: PropType<boolean>;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Вложенный тулбар
|
|
63
|
+
*/
|
|
33
64
|
inset: {
|
|
34
65
|
type: PropType<boolean>;
|
|
35
66
|
default: boolean;
|
|
36
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Показать границу
|
|
70
|
+
*/
|
|
37
71
|
bordered: {
|
|
38
72
|
type: PropType<boolean>;
|
|
39
73
|
default: boolean;
|
|
40
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* Убрать отступ справа или слева
|
|
77
|
+
*/
|
|
41
78
|
noGutter: {
|
|
42
79
|
type: PropType<"start" | "end">;
|
|
43
80
|
default: undefined;
|
|
44
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Убрать отступы
|
|
84
|
+
*/
|
|
45
85
|
noGutters: {
|
|
46
86
|
type: PropType<boolean>;
|
|
47
87
|
default: boolean;
|
|
48
88
|
};
|
|
49
89
|
}>>, {
|
|
90
|
+
invertColor: boolean;
|
|
91
|
+
transparent: boolean;
|
|
50
92
|
theme: string;
|
|
51
93
|
bordered: boolean;
|
|
52
94
|
inset: boolean;
|
|
@@ -15,7 +15,7 @@ export declare const makeAppearanceProps: <Defaults extends {
|
|
|
15
15
|
* Внешний вид
|
|
16
16
|
*/
|
|
17
17
|
appearance: {
|
|
18
|
-
type: PropType<"
|
|
18
|
+
type: PropType<"transparent" | "primary" | "secondary">;
|
|
19
19
|
default: string;
|
|
20
20
|
available: readonly ["primary", "secondary", "transparent"];
|
|
21
21
|
validator: (value: TAppearance) => boolean;
|
|
@@ -8,7 +8,7 @@ export * from './appearance';
|
|
|
8
8
|
export * from './size';
|
|
9
9
|
export * from './disabled';
|
|
10
10
|
export * from './readonly';
|
|
11
|
-
export * from './
|
|
11
|
+
export * from './invertColor';
|
|
12
12
|
export * from './color';
|
|
13
13
|
export * from './status';
|
|
14
14
|
export * from './tag';
|
|
@@ -46,3 +46,4 @@ export * from './ssrBoot';
|
|
|
46
46
|
export * from './variant';
|
|
47
47
|
export * from './layout';
|
|
48
48
|
export * from './theme';
|
|
49
|
+
export * from './transparent';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
export interface IInvertColorProps {
|
|
3
|
+
invertColor: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IUseInvertColor {
|
|
6
|
+
invertColorClasses: ComputedRef<string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare const makeInvertColor: <Defaults extends {
|
|
9
|
+
invertColor?: unknown;
|
|
10
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
11
|
+
/**
|
|
12
|
+
* Инвертирует цветовую схему компонента
|
|
13
|
+
*/
|
|
14
|
+
invertColor: {
|
|
15
|
+
type: PropType<boolean>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
}, Defaults>;
|
|
19
|
+
export declare function useInvertColor(props: IInvertColorProps, name: string): IUseInvertColor;
|
|
@@ -76,7 +76,8 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
76
76
|
tag: string;
|
|
77
77
|
size: NonNullable<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
78
78
|
disabled: boolean;
|
|
79
|
-
|
|
79
|
+
invertColor: boolean;
|
|
80
|
+
transparent: boolean;
|
|
80
81
|
required: boolean;
|
|
81
82
|
selectStrategy: NonNullable<import("./nested/selectStrategies").TSelectStrategyProp>;
|
|
82
83
|
openStrategy: NonNullable<import("./nested/openStrategies").TOpenStrategyProp>;
|
|
@@ -99,7 +100,11 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
99
100
|
opened: PropType<unknown[]>;
|
|
100
101
|
selected: PropType<unknown[]>;
|
|
101
102
|
required: BooleanConstructor;
|
|
102
|
-
|
|
103
|
+
transparent: {
|
|
104
|
+
type: PropType<boolean>;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
invertColor: {
|
|
103
108
|
type: PropType<boolean>;
|
|
104
109
|
default: boolean;
|
|
105
110
|
};
|
|
@@ -168,7 +173,7 @@ export declare const makeSelectProps: <Defaults extends {
|
|
|
168
173
|
path: unknown[];
|
|
169
174
|
event: Event;
|
|
170
175
|
}) => any) | undefined;
|
|
171
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "items" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "tag" | "size" | "disabled" | "
|
|
176
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "items" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "returnObject" | "tag" | "size" | "disabled" | "invertColor" | "transparent" | "required" | "selectStrategy" | "openStrategy" | "theme" | "lines">, keyof import("vue").VNodeProps | keyof import("vue").AllowedComponentProps>>;
|
|
172
177
|
default: undefined;
|
|
173
178
|
};
|
|
174
179
|
/**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComputedRef, PropType } from 'vue';
|
|
2
|
+
export interface ITransparentProps {
|
|
3
|
+
transparent: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface IUseTransparentProps {
|
|
6
|
+
transparentClasses: ComputedRef<string | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare const makeTransparentProps: <Defaults extends {
|
|
9
|
+
transparent?: unknown;
|
|
10
|
+
} = {}>(defaults?: Defaults | undefined) => import('../utils').AppendDefault<{
|
|
11
|
+
/**
|
|
12
|
+
* Позволяет использовать компонент на прозрачном фоне
|
|
13
|
+
*/
|
|
14
|
+
transparent: {
|
|
15
|
+
type: PropType<boolean>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
}, Defaults>;
|
|
19
|
+
export declare function useTransparent(props: ITransparentProps, name: string): IUseTransparentProps;
|
package/package.json
CHANGED
|
@@ -75,20 +75,18 @@
|
|
|
75
75
|
--cds-grid-column-hang: calc(var(--cds-grid-gutter) / 2);
|
|
76
76
|
|
|
77
77
|
display: grid;
|
|
78
|
-
width: 100%;
|
|
79
|
-
max-width: get-grid-width($breakpoints, largest-breakpoint-name($breakpoints));
|
|
80
|
-
padding-right: var(--cds-grid-margin);
|
|
81
|
-
padding-left: var(--cds-grid-margin);
|
|
82
|
-
margin-right: auto;
|
|
83
|
-
margin-left: auto;
|
|
84
78
|
grid-template-columns: repeat(var(--cds-grid-columns), minmax(0, 1fr));
|
|
79
|
+
inline-size: 100%;
|
|
80
|
+
margin-inline: auto;
|
|
81
|
+
padding-inline: var(--cds-grid-margin);
|
|
82
|
+
max-inline-size: get-grid-width($breakpoints, largest-breakpoint-name($breakpoints));
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
// -----------------------------------------------------------------------------
|
|
88
86
|
// Full width
|
|
89
87
|
// -----------------------------------------------------------------------------
|
|
90
|
-
.#{$prefix}--css-grid--
|
|
91
|
-
max-
|
|
88
|
+
.#{$prefix}--css-grid--wide {
|
|
89
|
+
max-inline-size: 100%;
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
// -----------------------------------------------------------------------------
|
|
@@ -105,12 +103,10 @@
|
|
|
105
103
|
--cds-grid-mode-start: var(--cds-grid-gutter-start);
|
|
106
104
|
--cds-grid-mode-end: var(--cds-grid-gutter-end);
|
|
107
105
|
|
|
108
|
-
margin-
|
|
109
|
-
margin-left: var(--cds-grid-gutter-start);
|
|
106
|
+
margin-inline: var(--cds-grid-gutter-start) var(--cds-grid-gutter-end);
|
|
110
107
|
|
|
111
108
|
[dir='rtl'] & {
|
|
112
|
-
margin-
|
|
113
|
-
margin-left: var(--cds-grid-gutter-end);
|
|
109
|
+
margin-inline: var(--cds-grid-gutter-end) var(--cds-grid-gutter-start);
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
|
|
@@ -134,13 +130,11 @@
|
|
|
134
130
|
// -----------------------------------------------------------------------------
|
|
135
131
|
.#{$prefix}--subgrid {
|
|
136
132
|
display: grid;
|
|
137
|
-
margin-right: calc(var(--cds-grid-mode-end) * -1);
|
|
138
|
-
margin-left: calc(var(--cds-grid-mode-start) * -1);
|
|
139
133
|
grid-template-columns: repeat(var(--cds-grid-columns), minmax(0, 1fr));
|
|
134
|
+
margin-inline: calc(var(--cds-grid-mode-start) * -1) calc(var(--cds-grid-mode-end) * -1);
|
|
140
135
|
|
|
141
136
|
[dir='rtl'] & {
|
|
142
|
-
margin-
|
|
143
|
-
margin-left: calc(var(--cds-grid-mode-end) * -1);
|
|
137
|
+
margin-inline: calc(var(--cds-grid-mode-end) * -1) calc(var(--cds-grid-mode-start) * -1);
|
|
144
138
|
}
|
|
145
139
|
}
|
|
146
140
|
|
|
@@ -171,11 +165,10 @@
|
|
|
171
165
|
// Helper class to allow for text alignment in columns where the leading
|
|
172
166
|
// gutter is missing (like narrow) or is reduced (like in condensed).
|
|
173
167
|
.#{$prefix}--grid-column-hang {
|
|
174
|
-
margin-
|
|
168
|
+
margin-inline-start: var(--cds-grid-column-hang);
|
|
175
169
|
|
|
176
170
|
[dir='rtl'] & {
|
|
177
|
-
margin-
|
|
178
|
-
margin-left: initial;
|
|
171
|
+
margin-inline: initial var(--cds-grid-column-hang);
|
|
179
172
|
}
|
|
180
173
|
}
|
|
181
174
|
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
@import 'mixins';
|
|
5
5
|
|
|
6
|
+
/// Generate the CSS for a grid for the given breakpoints and gutters
|
|
7
|
+
/// @param {Map} $breakpoints [$grid-breakpoints] - The default breakpoints
|
|
8
|
+
/// @param {Number} $grid-gutter [$grid-gutter] - The default gutters
|
|
9
|
+
/// @param {Number} $condensed-gutter [$grid-gutter-condensed] - The condensed mode gutter
|
|
10
|
+
/// @access public
|
|
11
|
+
/// @group @cds/grid
|
|
6
12
|
@mixin flex-grid(
|
|
7
13
|
$breakpoints: $grid-breakpoints,
|
|
8
14
|
$grid-gutter: $grid-gutter,
|
|
@@ -14,7 +20,7 @@
|
|
|
14
20
|
|
|
15
21
|
@include cds-largest-breakpoint($breakpoints) {
|
|
16
22
|
.#{$prefix}-grid--wide {
|
|
17
|
-
max-
|
|
23
|
+
max-inline-size: 100%;
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
26
|
|
|
@@ -24,13 +30,11 @@
|
|
|
24
30
|
|
|
25
31
|
.#{$prefix}-row-padding [class*='#{$prefix}-col'],
|
|
26
32
|
.#{$prefix}-col-padding {
|
|
27
|
-
padding-
|
|
28
|
-
padding-bottom: $grid-gutter * 0.5;
|
|
33
|
+
padding-block: $grid-gutter * 0.5;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
.#{$prefix}-grid-condensed [class*='#{$prefix}-col'] {
|
|
32
|
-
padding-
|
|
33
|
-
padding-bottom: $condensed-gutter * 0.5;
|
|
37
|
+
padding-block: $condensed-gutter * 0.5;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
@include -make-grid-columns($breakpoints, $grid-gutter);
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
/// @access private
|
|
25
25
|
/// @group @cds/grid
|
|
26
26
|
@mixin -make-container($breakpoints: $grid-breakpoints) {
|
|
27
|
-
margin-
|
|
28
|
-
margin-left: auto;
|
|
27
|
+
margin-inline: auto;
|
|
29
28
|
|
|
30
29
|
@include -set-largest-breakpoint($breakpoints);
|
|
31
30
|
|
|
@@ -38,15 +37,13 @@
|
|
|
38
37
|
|
|
39
38
|
@if $prev-margin != $margin {
|
|
40
39
|
@include cds-breakpoint($name) {
|
|
41
|
-
padding-
|
|
42
|
-
padding-left: #{($grid-gutter * 0.5) + $margin};
|
|
43
|
-
}
|
|
44
|
-
} @else {
|
|
45
|
-
@include cds-breakpoint($name) {
|
|
46
|
-
padding-right: #{($grid-gutter * 0.5) + $margin};
|
|
47
|
-
padding-left: #{($grid-gutter * 0.5) + $margin};
|
|
40
|
+
padding-inline: #{($grid-gutter * 0.5) + $margin};
|
|
48
41
|
}
|
|
49
42
|
}
|
|
43
|
+
} @else {
|
|
44
|
+
@include cds-breakpoint($name) {
|
|
45
|
+
padding-inline: #{($grid-gutter * 0.5) + $margin};
|
|
46
|
+
}
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
}
|
|
@@ -57,7 +54,7 @@
|
|
|
57
54
|
/// @group @cds/grid
|
|
58
55
|
@mixin -set-largest-breakpoint($breakpoints: $grid-breakpoints) {
|
|
59
56
|
$largest-breakpoint: -last-map-item($breakpoints);
|
|
60
|
-
max-
|
|
57
|
+
max-inline-size: map.get($largest-breakpoint, 'width');
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
/// Add in the max-widths for each breakpoint to the container
|
|
@@ -67,7 +64,7 @@
|
|
|
67
64
|
@mixin -make-container-max-widths($breakpoints: $grid-breakpoints) {
|
|
68
65
|
@each $name, $value in $breakpoints {
|
|
69
66
|
@include cds-breakpoint($name) {
|
|
70
|
-
max-
|
|
67
|
+
max-inline-size: map.get($value, width);
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
}
|
|
@@ -88,22 +85,19 @@
|
|
|
88
85
|
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
|
89
86
|
// always setting `width: 100%;`. This works because we use `flex` values
|
|
90
87
|
// later on to override this initial width.
|
|
91
|
-
|
|
92
|
-
padding-
|
|
93
|
-
padding-left: ($gutter * 0.5);
|
|
88
|
+
inline-size: 100%;
|
|
89
|
+
padding-inline: $gutter * 0.5;
|
|
94
90
|
|
|
95
91
|
// For our condensed use-case, our gutters collapse to 2px solid, 1px on each side.
|
|
96
92
|
.#{$prefix}-row-condensed &,
|
|
97
93
|
.#{$prefix}-grid-condensed & {
|
|
98
|
-
padding-
|
|
99
|
-
padding-left: ($condensed-gutter * 0.5);
|
|
94
|
+
padding-inline: $condensed-gutter * 0.5;
|
|
100
95
|
}
|
|
101
96
|
|
|
102
97
|
// For our narrow use-case, our container hangs 16px into the gutter
|
|
103
98
|
.#{$prefix}-row-narrow &,
|
|
104
99
|
.#{$prefix}-grid-narrow & {
|
|
105
|
-
padding-
|
|
106
|
-
padding-left: 0;
|
|
100
|
+
padding-inline: 0 $gutter * 0.5;
|
|
107
101
|
}
|
|
108
102
|
}
|
|
109
103
|
|
|
@@ -122,8 +116,8 @@
|
|
|
122
116
|
// Add a `max-width` to ensure content within each column does not blow out
|
|
123
117
|
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
|
124
118
|
// do not appear to require this.
|
|
125
|
-
max-width: math.percentage(math.div($span, $columns));
|
|
126
119
|
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
120
|
+
max-inline-size: math.percentage(math.div($span, $columns));
|
|
127
121
|
}
|
|
128
122
|
}
|
|
129
123
|
|
|
@@ -137,9 +131,9 @@
|
|
|
137
131
|
$offset: math.div($span, $columns);
|
|
138
132
|
|
|
139
133
|
@if $offset == 0 {
|
|
140
|
-
margin-
|
|
134
|
+
margin-inline-start: 0;
|
|
141
135
|
} @else {
|
|
142
|
-
margin-
|
|
136
|
+
margin-inline-start: math.percentage($offset);
|
|
143
137
|
}
|
|
144
138
|
}
|
|
145
139
|
|
|
@@ -181,9 +175,9 @@
|
|
|
181
175
|
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
|
182
176
|
.#{$prefix}-col,
|
|
183
177
|
.#{$prefix}-col#{$infix} {
|
|
184
|
-
max-width: 100%;
|
|
185
178
|
flex-basis: 0;
|
|
186
179
|
flex-grow: 1;
|
|
180
|
+
max-inline-size: 100%;
|
|
187
181
|
}
|
|
188
182
|
|
|
189
183
|
.#{$prefix}-col-auto,
|
|
@@ -192,7 +186,7 @@
|
|
|
192
186
|
|
|
193
187
|
// Reset earlier grid tiers
|
|
194
188
|
width: auto;
|
|
195
|
-
max-
|
|
189
|
+
max-inline-size: 100%;
|
|
196
190
|
flex: 0 0 auto;
|
|
197
191
|
}
|
|
198
192
|
|
|
@@ -233,8 +227,7 @@
|
|
|
233
227
|
@mixin -make-row($gutter: $grid-gutter) {
|
|
234
228
|
display: flex;
|
|
235
229
|
flex-wrap: wrap;
|
|
236
|
-
margin-
|
|
237
|
-
margin-left: -1 * $gutter * 0.5;
|
|
230
|
+
margin-inline: -1 * $gutter * 0.5;
|
|
238
231
|
}
|
|
239
232
|
|
|
240
233
|
|
|
@@ -249,18 +242,17 @@
|
|
|
249
242
|
@mixin -no-gutter {
|
|
250
243
|
.#{$prefix}-no-gutter,
|
|
251
244
|
.#{$prefix}-row.#{$prefix}-no-gutter [class*='#{$prefix}-col'] {
|
|
252
|
-
padding-
|
|
253
|
-
padding-left: 0;
|
|
245
|
+
padding-inline: 0;
|
|
254
246
|
}
|
|
255
247
|
|
|
256
248
|
.#{$prefix}-no-gutter--start,
|
|
257
249
|
.#{$prefix}-row.#{$prefix}-no-gutter--start [class*='#{$prefix}-col'] {
|
|
258
|
-
padding-
|
|
250
|
+
padding-inline-start: 0;
|
|
259
251
|
}
|
|
260
252
|
|
|
261
253
|
.#{$prefix}-no-gutter--end,
|
|
262
254
|
.#{$prefix}-row.#{$prefix}-no-gutter--end [class*='#{$prefix}-col'] {
|
|
263
|
-
padding-
|
|
255
|
+
padding-inline-end: 0;
|
|
264
256
|
}
|
|
265
257
|
}
|
|
266
258
|
|
|
@@ -275,11 +267,11 @@
|
|
|
275
267
|
/// @group @carbon/grid
|
|
276
268
|
@mixin -hang($gutter: $grid-gutter) {
|
|
277
269
|
.#{$prefix}-hang--start {
|
|
278
|
-
padding-
|
|
270
|
+
padding-inline-start: $gutter * 0.5;
|
|
279
271
|
}
|
|
280
272
|
|
|
281
273
|
.#{$prefix}-hang--end {
|
|
282
|
-
padding-
|
|
274
|
+
padding-inline-end: $gutter * 0.5;
|
|
283
275
|
}
|
|
284
276
|
}
|
|
285
277
|
|
package/src/scss/themes/index.ts
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@import "./variables";
|
|
2
|
+
|
|
3
|
+
@each $type, $value in $typography {
|
|
4
|
+
.cds-text-#{$type} {
|
|
5
|
+
@each $name, $val in $value {
|
|
6
|
+
@if $name == 'size' {
|
|
7
|
+
font-size: $val !important;
|
|
8
|
+
} @else if $name == 'height' {
|
|
9
|
+
line-height: $val !important;
|
|
10
|
+
} @else if $name == 'weight' {
|
|
11
|
+
font-weight: $val !important;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
font-family: var(--cds-font-family-sans) !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@each $breakpoint, $map in $grid-breakpoints {
|
|
19
|
+
$breakpoint-width: map-get($map, 'width');
|
|
20
|
+
|
|
21
|
+
@media (min-width: $breakpoint-width) {
|
|
22
|
+
@each $type, $value in $typography {
|
|
23
|
+
.#{$breakpoint}\:cds-text-#{$type} {
|
|
24
|
+
@each $name, $val in $value {
|
|
25
|
+
@if $name == 'size' {
|
|
26
|
+
font-size: $val !important;
|
|
27
|
+
} @else if $name == 'height' {
|
|
28
|
+
line-height: $val !important;
|
|
29
|
+
} @else if $name == 'weight' {
|
|
30
|
+
font-weight: $val !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
font-family: var(--cds-font-family-sans) !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@each $key, $value in $typography-properties {
|
|
40
|
+
$prefix: map-get($value, 'name');
|
|
41
|
+
$propertyMap: map-get($value, 'map');
|
|
42
|
+
$cssProperty: map-get($value, 'property');
|
|
43
|
+
|
|
44
|
+
// Без брейкпоинтов
|
|
45
|
+
@each $name, $propValue in $propertyMap {
|
|
46
|
+
.cds-#{$prefix}#{$name} {
|
|
47
|
+
#{$cssProperty}: $propValue !important;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Брейкпоинты
|
|
52
|
+
@each $breakpoint, $map in $grid-breakpoints {
|
|
53
|
+
$width: map-get($map, 'width');
|
|
54
|
+
|
|
55
|
+
@media (min-width: $width) {
|
|
56
|
+
@each $name, $propValue in $propertyMap {
|
|
57
|
+
.#{$breakpoint}\:cds-#{$prefix}#{$name} {
|
|
58
|
+
#{$cssProperty}: $propValue !important;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import "../typography";
|
|
2
|
+
|
|
3
|
+
@each $name, $value in $typography {
|
|
4
|
+
.text-#{$name} {
|
|
5
|
+
font-size: map-get($value, 'size');
|
|
6
|
+
line-height: map-get($value, 'height');
|
|
7
|
+
font-weight: map-get($value, 'weight');
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@each $key, $value in $typography-properties {
|
|
12
|
+
$prefix: map-get($value, 'name');
|
|
13
|
+
$propertyMap: map-get($value, 'map');
|
|
14
|
+
$cssProperty: map-get($value, 'property');
|
|
15
|
+
|
|
16
|
+
// Без брейкпоинтов
|
|
17
|
+
@each $name, $propValue in $propertyMap {
|
|
18
|
+
.#{$prefix}#{$name} {
|
|
19
|
+
#{$cssProperty}: $propValue;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|