@central-design-system/components 3.0.0-beta.3 → 3.0.0-beta.31
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.d.ts +6 -1
- package/dist/cds.es.js +17699 -13545
- package/dist/cds.umd.js +7 -3
- package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +88 -37
- package/dist/components/CdsBadge/CdsBadge.vue.d.ts +40 -12
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +11 -0
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +14 -3
- package/dist/components/CdsButton/CdsButton.vue.d.ts +37 -26
- package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +68 -3
- package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +13 -0
- package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +275 -114
- package/dist/components/CdsContainer/CdsContainer.vue.d.ts +41 -24
- package/dist/components/CdsContainer/context.d.ts +1 -1
- package/dist/components/CdsContentSwitcher/CdsContentSwitcher.vue.d.ts +66 -0
- package/dist/components/CdsContentSwitcher/CdsContentSwitcherItem.vue.d.ts +212 -0
- package/dist/components/CdsContentSwitcher/index.d.ts +2 -0
- package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +12 -1
- package/dist/components/CdsDatePicker/composable/calendar.d.ts +2 -2
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +70 -4
- package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +241 -113
- package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +1 -1
- package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +13 -13
- package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +10 -10
- package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +16 -5
- package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +3 -3
- package/dist/components/CdsFooter/CdsFooter.vue.d.ts +23 -3
- package/dist/components/CdsForm/CdsForm.vue.d.ts +11 -0
- package/dist/components/CdsGrid/composable/column.d.ts +1 -1
- package/dist/components/CdsGrid/composable/subgrid.d.ts +1 -1
- package/dist/components/CdsGrid/mode/CSSGrid.d.ts +1 -1
- package/dist/components/CdsGrid/mode/FlexGrid.d.ts +1 -1
- package/dist/components/CdsHeader/CdsHeader.vue.d.ts +23 -3
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +27 -3
- package/dist/components/CdsInput/CdsInput.vue.d.ts +26 -21
- package/dist/components/CdsInput/CdsInputDescription.vue.d.ts +3 -3
- package/dist/components/CdsInput/CdsInputLabel.vue.d.ts +3 -3
- package/dist/components/CdsLayout/CdsLayout.vue.d.ts +12 -1
- package/dist/components/CdsLayout/context.d.ts +1 -1
- package/dist/components/CdsLink/CdsLink.vue.d.ts +15 -3
- package/dist/components/CdsList/CdsList.vue.d.ts +31 -19
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
- package/dist/components/CdsList/CdsListItem.vue.d.ts +12 -12
- package/dist/components/CdsList/composable/list.d.ts +1 -1
- package/dist/components/CdsLoader/CdsLoader.vue.d.ts +12 -0
- package/dist/components/CdsMenu/CdsMenu.vue.d.ts +36 -7
- package/dist/components/CdsModal/CdsModal.vue.d.ts +38 -5
- package/dist/components/CdsNotification/CdsNotification.vue.d.ts +38 -27
- package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +51 -22
- package/dist/components/CdsNotification/composable/notification.d.ts +4 -4
- package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +35 -3
- package/dist/components/CdsOverlay/composable/activator.d.ts +19 -6
- package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +6 -5
- package/dist/components/CdsOverlay/composable/scrollStrategies.d.ts +1 -1
- package/dist/components/CdsOverlay/composable/teleport.d.ts +25 -1
- package/dist/components/CdsOverlay/constants.d.ts +2 -0
- package/dist/components/CdsPagination/CdsPagination.vue.d.ts +11 -0
- package/dist/components/CdsProgress/CdsProgress.vue.d.ts +12 -1
- package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +26 -11
- package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +13 -0
- package/dist/components/CdsSelect/CdsSelect.vue.d.ts +81 -61
- package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +30 -8
- package/dist/components/CdsSkeletonLoader/CdsSkeletonLoader.vue.d.ts +14 -3
- package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +19 -19
- package/dist/components/CdsStages/CdsStages.vue.d.ts +13 -1
- package/dist/components/CdsStatus/CdsStatus.vue.d.ts +20 -8
- package/dist/components/CdsSteps/CdsSteps.vue.d.ts +30 -23
- package/dist/components/CdsSteps/CdsStepsItem.vue.d.ts +3 -3
- package/dist/components/CdsSteps/context.d.ts +1 -1
- package/dist/components/CdsTable/CdsTable.vue.d.ts +99 -31
- package/dist/components/CdsTable/components/Footer/Footer.d.ts +1 -1
- package/dist/components/CdsTable/components/Header/DragHandle.d.ts +1 -1
- package/dist/components/CdsTable/components/Table/InternalTable.d.ts +89 -23
- package/dist/components/CdsTable/components/TableProvider.d.ts +101 -24
- package/dist/components/CdsTable/composable/filter.d.ts +1 -1
- package/dist/components/CdsTable/composable/flat.d.ts +1 -1
- package/dist/components/CdsTable/composable/pagination.d.ts +1 -1
- package/dist/components/CdsTable/composable/scroll.d.ts +4607 -0
- package/dist/components/CdsTable/composable/selection.d.ts +1 -1
- package/dist/components/CdsTable/composable/sorter.d.ts +1 -1
- package/dist/components/CdsTable/composable/sticky.d.ts +1 -1
- package/dist/components/CdsTable/composable/table.d.ts +42 -14
- package/dist/components/CdsTable/constants.d.ts +1 -0
- package/dist/components/CdsTable/context/summary.d.ts +1 -1
- package/dist/components/CdsTable/context/table.d.ts +1 -1
- package/dist/components/CdsTable/interface.d.ts +4 -7
- package/dist/components/CdsTable/utils/column.d.ts +1 -3
- package/dist/components/CdsTable/utils/index.d.ts +1 -1
- package/dist/components/CdsTable/utils/vnode.d.ts +10 -0
- package/dist/components/CdsTabs/CdsTab.vue.d.ts +13 -13
- package/dist/components/CdsTabs/CdsTabs.vue.d.ts +50 -39
- package/dist/components/CdsTag/CdsTag.vue.d.ts +15 -3
- package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +101 -89
- package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +93 -57
- package/dist/components/CdsTimePicker/CdsTimePicker.vue.d.ts +11 -0
- package/dist/components/CdsTimePicker/composable/time.d.ts +2 -2
- package/dist/components/CdsToggle/CdsToggle.vue.d.ts +13 -8
- package/dist/components/CdsToolbar/CdsToolbar.vue.d.ts +53 -0
- package/dist/components/CdsTooltip/CdsTooltip.vue.d.ts +39 -10
- package/dist/components/CdsTree/CdsTree.vue.d.ts +698 -0
- package/dist/components/CdsTree/CdsTreeDirectory.vue.d.ts +446 -0
- package/dist/components/CdsTree/CdsTreeNode.vue.d.ts +119 -0
- package/dist/components/CdsTree/components/DropIndicator.d.ts +9 -0
- package/dist/components/CdsTree/components/Indent.d.ts +10 -0
- package/dist/components/CdsTree/components/MotionTreeNode.d.ts +128 -0
- package/dist/components/CdsTree/components/NodeList.d.ts +191 -0
- package/dist/components/CdsTree/components/SwitcherIcon.d.ts +12 -0
- package/dist/components/CdsTree/components/TreeContext.d.ts +81 -0
- package/dist/components/CdsTree/components/TreeProvider.d.ts +619 -0
- package/dist/components/CdsTree/components/VirtualList/Filler.d.ts +12 -0
- package/dist/components/CdsTree/components/VirtualList/Item.d.ts +6 -0
- package/dist/components/CdsTree/components/VirtualList/ScrollBar.d.ts +33 -0
- package/dist/components/CdsTree/components/VirtualList/VirtualList.d.ts +84 -0
- package/dist/components/CdsTree/components/VirtualList/features/index.d.ts +5 -0
- package/dist/components/CdsTree/components/VirtualList/features/useFrameWheel.d.ts +10 -0
- package/dist/components/CdsTree/components/VirtualList/features/useHeights.d.ts +9 -0
- package/dist/components/CdsTree/components/VirtualList/features/useMobileTouchMove.d.ts +2 -0
- package/dist/components/CdsTree/components/VirtualList/features/useOriginScroll.d.ts +2 -0
- package/dist/components/CdsTree/components/VirtualList/features/useScrollTo.d.ts +4 -0
- package/dist/components/CdsTree/components/VirtualList/index.d.ts +2 -0
- package/dist/components/CdsTree/components/VirtualList/interface.d.ts +10 -0
- package/dist/components/CdsTree/composable/events.d.ts +133 -0
- package/dist/components/CdsTree/composable/index.d.ts +2 -0
- package/dist/components/CdsTree/composable/tree.d.ts +273 -0
- package/dist/components/CdsTree/composable/treeNode.d.ts +75 -0
- package/dist/components/CdsTree/index.d.ts +5 -0
- package/dist/components/CdsTree/interface.d.ts +104 -4
- package/dist/components/CdsTree/utils/data.d.ts +70 -0
- package/dist/components/CdsTree/utils/diff.d.ts +6 -0
- package/dist/components/CdsTree/utils/directory.d.ts +9 -0
- package/dist/components/CdsTree/utils/index.d.ts +2 -0
- package/dist/components/CdsUploader/CdsUploader.vue.d.ts +62 -41
- package/dist/components/CdsUploader/components/AjaxUploader.d.ts +15 -15
- package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +40 -22
- package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +39 -21
- package/dist/components/CdsUploader/composable/upload.d.ts +25 -15
- package/dist/components/CdsUploader/index.d.ts +1 -0
- package/dist/components/CdsUploader/interface.d.ts +1 -1
- package/dist/components/index.d.ts +8 -1
- package/dist/composable/appearance.d.ts +2 -2
- package/dist/composable/datetime.d.ts +4 -4
- package/dist/composable/delay.d.ts +3 -2
- package/dist/composable/direction.d.ts +1 -1
- package/dist/composable/display.d.ts +2 -0
- package/dist/composable/domObserver.d.ts +5 -0
- package/dist/composable/field.d.ts +7 -5
- package/dist/composable/filter.d.ts +30 -0
- package/dist/composable/form.d.ts +2 -2
- package/dist/composable/group.d.ts +3 -3
- package/dist/composable/icon.d.ts +3 -3
- package/dist/composable/index.d.ts +5 -1
- package/dist/composable/invertColor.d.ts +19 -0
- package/dist/composable/layout.d.ts +20 -20
- package/dist/composable/loading.d.ts +2 -2
- package/dist/composable/menu.d.ts +1 -1
- package/dist/composable/nested/nested.d.ts +2 -2
- package/dist/composable/overlay.d.ts +9 -1
- package/dist/{components/CdsDropdown/composable → composable}/scrolling.d.ts +2 -2
- package/dist/composable/select.d.ts +29 -11
- package/dist/composable/size.d.ts +1 -1
- package/dist/composable/tag.d.ts +0 -3
- package/dist/composable/text.d.ts +2 -2
- package/dist/composable/theme.d.ts +82 -0
- package/dist/composable/transition.d.ts +2 -0
- package/dist/composable/transparent.d.ts +19 -0
- package/dist/composable/validation.d.ts +2 -2
- package/dist/composable/variant.d.ts +1 -1
- package/dist/create.d.ts +7 -1
- package/dist/globals.d.ts +7 -0
- package/dist/locale/index.d.ts +1 -1
- package/dist/themes/b2b.d.ts +26 -0
- package/dist/themes/cds.d.ts +26 -0
- package/dist/themes/dark.d.ts +26 -0
- package/dist/themes/index.d.ts +5 -0
- package/dist/themes/promo.d.ts +26 -0
- package/dist/themes/themes.d.ts +10 -0
- package/dist/transitions/collapseTransition.d.ts +11 -0
- package/dist/transitions/index.d.ts +1 -0
- package/dist/utils/colors.d.ts +368 -0
- package/dist/utils/colorsUtils/APCA.d.ts +7 -0
- package/dist/utils/colorsUtils/index.d.ts +1 -0
- package/dist/utils/colorsUtils/transformCIELAB.d.ts +3 -0
- package/dist/utils/colorsUtils/transformSRGB.d.ts +3 -0
- package/dist/utils/colorsUtils/utils.d.ts +41 -0
- package/dist/utils/dom/bindProps.d.ts +2 -0
- package/dist/utils/dom/box.d.ts +1 -0
- package/dist/utils/helpers.d.ts +31 -6
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/propsFactory.d.ts +1 -1
- package/dist/utils/use/flattenChildren.d.ts +3 -0
- package/nuxt.js +2 -1
- package/package.json +1 -1
- package/src/scss/mixins/typo.scss +0 -3
- package/src/scss/modules/_transition.scss +31 -0
- 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 +27 -33
- package/src/scss/themes/b2b/tokens.json +104 -104
- package/src/scss/themes/cds/tokens.json +104 -104
- package/src/scss/themes/index.ts +1 -1
- package/src/scss/utility/display.scss +56 -5
- package/src/scss/utility/flexbox.scss +26 -28
- package/src/scss/utility/index.scss +1 -2
- package/src/scss/utility/layout.scss +65 -3
- package/src/scss/utility/spacing.scss +46 -86
- package/src/scss/utility/typography.scss +48 -1
- package/src/scss/utility/variables/display.scss +10 -0
- package/src/scss/utility/variables/exports/_display.scss +7 -0
- package/src/scss/utility/variables/exports/_flex.scss +13 -0
- package/src/scss/utility/variables/exports/_overflow.scss +7 -0
- package/src/scss/utility/variables/exports/_position.scss +7 -0
- package/src/scss/utility/variables/exports/_spacing.scss +14 -0
- package/src/scss/utility/variables/exports/_typography.scss +22 -0
- package/src/scss/utility/variables/exports/_visibility.scss +7 -0
- package/src/scss/utility/variables/exports/_widthHeight.scss +7 -0
- package/src/scss/utility/variables/flex.scss +140 -0
- package/src/scss/utility/variables/index.scss +12 -0
- package/src/scss/utility/variables/overflow.scss +6 -0
- package/src/scss/utility/variables/position.scss +7 -0
- package/src/scss/utility/variables/spacing.scss +37 -0
- package/src/scss/utility/{variables.scss → variables/typography.scss} +48 -71
- package/src/scss/utility/variables/visibility.scss +5 -0
- package/src/scss/utility/variables/widthHeight.scss +69 -0
- package/dist/components/CdsDropdown/composable/index.d.ts +0 -1
- package/dist/composable/dark.d.ts +0 -19
- package/dist/plugins/index.d.ts +0 -2
- package/src/scss/utility/generatedFiles/generatedStyles.json +0 -1
- package/src/scss/utility/generatedFiles/generatedStyles.scss +0 -300
- /package/dist/{components/CdsTable/utils → utils/use}/listener.d.ts +0 -0
package/src/scss/themes/index.ts
CHANGED
|
@@ -1,13 +1,64 @@
|
|
|
1
|
-
@import "variables";
|
|
1
|
+
@import "./variables";
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
25
|
+
position: $value !important;
|
|
6
26
|
}
|
|
7
27
|
}
|
|
8
28
|
|
|
9
|
-
@each $name, $
|
|
29
|
+
@each $name, $value in $visibility {
|
|
10
30
|
.cds-#{$name} {
|
|
11
|
-
visibility: $
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/*
|
|
4
|
+
* При добавлении утилитарных классов необходимо разделять переменные/формирование. Переменные хранятся в папке ./variables и также используются для формирования документации.
|
|
5
|
+
* Для всех утилитарных классов необходимо указывать !important
|
|
6
|
+
* Также, в данном файле необходимо указывать классы как без брейкпоинтов, так и с ними. Пример ниже.
|
|
7
|
+
* Чтобы утилитарные стили начали работать, необходимо экспортировать этот файл в index.scss, который в дальнейшем окажется в основном бандле.
|
|
8
|
+
*/
|
|
8
9
|
|
|
9
|
-
@each $
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
// без брейкпоинтов
|
|
16
|
+
@each $name, $propValue in $propertyMap {
|
|
17
|
+
.cds-#{$prefix}#{$name} {
|
|
18
|
+
#{$cssProperty}: $propValue !important;
|
|
19
|
+
}
|
|
18
20
|
}
|
|
19
|
-
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}
|
|
22
|
+
// брейкпоинты
|
|
23
|
+
@each $breakpoint, $map in $grid-breakpoints {
|
|
24
|
+
$width: map-get($map, 'width');
|
|
26
25
|
|
|
27
|
-
@
|
|
28
|
-
|
|
29
|
-
|
|
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,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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@each $
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import "variables";
|
|
1
|
+
@import "./variables";
|
|
2
2
|
|
|
3
3
|
@each $type, $value in $typography {
|
|
4
4
|
.cds-text-#{$type} {
|
|
@@ -14,3 +14,50 @@
|
|
|
14
14
|
font-family: var(--cds-font-family-sans) !important;
|
|
15
15
|
}
|
|
16
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,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,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,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
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
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
|
+
$gap-sizes: (
|
|
89
|
+
'0': 0,
|
|
90
|
+
'px': 1px,
|
|
91
|
+
'0\\.5': 0.125rem, // 2px
|
|
92
|
+
'1': 0.25rem, // 4px
|
|
93
|
+
'1\\.5': 0.375rem, // 6px
|
|
94
|
+
'2': 0.5rem, // 8px
|
|
95
|
+
'2\\.5': 0.625rem, // 10px
|
|
96
|
+
'3': 0.75rem, // 12px
|
|
97
|
+
'3\\.5': 0.875rem, // 14px
|
|
98
|
+
'4': 1rem, // 16px
|
|
99
|
+
'5': 1.25rem, // 20px
|
|
100
|
+
'6': 1.5rem, // 24px
|
|
101
|
+
'7': 1.75rem, // 28px
|
|
102
|
+
'8': 2rem, // 32px
|
|
103
|
+
'9': 2.25rem, // 36px
|
|
104
|
+
'10': 2.5rem, // 40px
|
|
105
|
+
'11': 2.75rem, // 44px
|
|
106
|
+
'12': 3rem, // 48px
|
|
107
|
+
'14': 3.5rem, // 56px
|
|
108
|
+
'16': 4rem, // 64px
|
|
109
|
+
'20': 5rem, // 80px
|
|
110
|
+
'24': 6rem, // 96px
|
|
111
|
+
'28': 7rem, // 112px
|
|
112
|
+
'32': 8rem, // 128px
|
|
113
|
+
'36': 9rem, // 144px
|
|
114
|
+
'40': 10rem, // 160px
|
|
115
|
+
'44': 11rem, // 176px
|
|
116
|
+
'48': 12rem, // 192px
|
|
117
|
+
'52': 13rem, // 208px
|
|
118
|
+
'56': 14rem, // 224px
|
|
119
|
+
'60': 15rem, // 240px
|
|
120
|
+
'64': 16rem, // 256px
|
|
121
|
+
'72': 18rem, // 288px
|
|
122
|
+
'80': 20rem, // 320px
|
|
123
|
+
'96': 24rem // 384px
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
$flex-properties: (
|
|
127
|
+
'direction': ('name': '', 'map': $flex-direction, 'property': 'flex-direction'),
|
|
128
|
+
'justify': ('name': 'justify-', 'map': $justify-content, 'property': 'justify-content'),
|
|
129
|
+
'items': ('name': 'items-', 'map': $align-items, 'property': 'align-items'),
|
|
130
|
+
'content': ('name': 'content-', 'map': $align-content, 'property': 'align-content'),
|
|
131
|
+
'flex': ('name': 'flex-', 'map': $flex-wrap, 'property': 'flex-wrap'),
|
|
132
|
+
'self': ('name': 'self-', 'map': $align-self, 'property': 'align-self'),
|
|
133
|
+
'grow': ('name': 'grow-', 'map': $flex-grow, 'property': 'flex-grow'),
|
|
134
|
+
'shrink': ('name': 'shrink-', 'map': $flex-shrink, 'property': 'flex-shrink'),
|
|
135
|
+
'basis': ('name': 'basis-', 'map': $flex-basis, 'property': 'flex-basis'),
|
|
136
|
+
'order': ('name': 'order-', 'map': $order, 'property': 'order'),
|
|
137
|
+
'gap': ('name': 'gap-', 'map': $gap-sizes, 'property': 'gap'),
|
|
138
|
+
'gap-y': ('name': 'gap-y-', 'map': $gap-sizes, 'property': 'row-gap'),
|
|
139
|
+
'gap-x': ('name': 'gap-x-', 'map': $gap-sizes, 'property': 'column-gap'),
|
|
140
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
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";
|
|
12
|
+
@import "typography";
|