@central-design-system/components 2.30.0 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cds.css +1 -111
- package/dist/cds.d.ts +31 -0
- package/dist/cds.es.js +2159 -0
- package/dist/cds.umd.js +1 -0
- package/dist/components/CdsBadge/CdsBadge.vue.d.ts +32 -0
- package/dist/components/CdsButton/CdsButton.vue.d.ts +140 -0
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +179 -0
- package/dist/components/CdsGrid/CdsCol.vue.d.ts +73 -0
- package/dist/components/CdsGrid/CdsGrid.vue.d.ts +55 -0
- package/dist/components/CdsGrid/CdsRow.vue.d.ts +37 -0
- package/dist/components/CdsGrid/composable/column.d.ts +84 -0
- package/dist/components/CdsGrid/composable/grid.d.ts +24 -0
- package/dist/components/CdsGrid/composable/index.d.ts +4 -0
- package/dist/components/CdsGrid/composable/subgrid.d.ts +20 -0
- package/dist/components/CdsGrid/composable/wide.d.ts +12 -0
- package/dist/components/CdsGrid/mode/CSSGrid.d.ts +5 -0
- package/dist/components/CdsGrid/mode/FlexGrid.d.ts +5 -0
- package/dist/components/CdsGrid/types.d.ts +27 -0
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +44 -0
- package/dist/components/CdsIcon/index.d.ts +1 -0
- package/dist/components/CdsLink/CdsLink.vue.d.ts +50 -0
- package/dist/components/CdsList/CdsList.vue.d.ts +170 -0
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +125 -0
- package/dist/components/CdsList/CdsListItem.vue.d.ts +172 -0
- package/dist/components/CdsList/composable/depth.d.ts +3 -0
- package/dist/components/CdsList/composable/index.d.ts +2 -0
- package/dist/components/CdsList/composable/list.d.ts +19 -0
- package/dist/components/CdsList/index.d.ts +3 -0
- package/dist/components/CdsLoader/CdsLoader.vue.d.ts +62 -0
- package/dist/components/CdsLoader/index.d.ts +1 -0
- package/dist/components/CdsStatus/CdsStatus.vue.d.ts +46 -0
- package/dist/components/CdsTag/CdsTag.vue.d.ts +96 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/composable/appearance.d.ts +24 -0
- package/dist/composable/color.d.ts +21 -0
- package/dist/composable/dark.d.ts +19 -0
- package/dist/composable/disabled.d.ts +19 -0
- package/dist/composable/focus.d.ts +12 -0
- package/dist/composable/icon.d.ts +32 -0
- package/dist/composable/index.d.ts +17 -0
- package/dist/composable/items.d.ts +78 -0
- package/dist/composable/link.d.ts +36 -0
- package/dist/composable/loading.d.ts +19 -0
- package/dist/composable/nested/nested.d.ts +85 -0
- package/dist/composable/nested/openStrategies.d.ts +25 -0
- package/dist/composable/nested/selectStrategies.d.ts +21 -0
- package/dist/composable/proxyModel.d.ts +8 -0
- package/dist/composable/render.d.ts +2 -0
- package/dist/composable/size.d.ts +24 -0
- package/dist/composable/status.d.ts +21 -0
- package/dist/composable/tag.d.ts +16 -0
- package/dist/composable/text.d.ts +17 -0
- package/dist/composable/toggleScope.d.ts +2 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/shims-vue.d.ts +24 -0
- package/dist/transitions/createTransition.d.ts +9 -0
- package/dist/transitions/expandTransition.d.ts +19 -0
- package/dist/transitions/index.d.ts +14 -0
- package/dist/types/CdsOptions.d.ts +3 -0
- package/dist/utils/changeCase/lowerCase.d.ts +8 -0
- package/dist/utils/changeCase/noCase.d.ts +10 -0
- package/dist/utils/changeCase/paramCase.d.ts +3 -0
- package/dist/utils/changeCase/pascalCase.d.ts +5 -0
- package/dist/utils/getCurrentInstance.d.ts +13 -0
- package/dist/utils/helpers.d.ts +49 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/propsFactory.d.ts +52 -0
- package/nuxt.js +13 -0
- package/package.json +37 -80
- package/src/scss/index.scss +10 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/_convert.scss +4 -2
- package/{dist/mixins/scss → src/scss/mixins}/layout/_layout.scss +0 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/_mini-unit.scss +0 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/_spacing.scss +0 -0
- package/src/scss/mixins/layout/exports/_mini-unit.module.scss +5 -0
- package/src/scss/mixins/layout/exports/_spacing-all.module.scss +3 -0
- package/src/scss/mixins/layout/exports/_spacing-fluid.module.scss +8 -0
- package/src/scss/mixins/layout/exports/_spacing-layout.module.scss +11 -0
- package/src/scss/mixins/layout/exports/_spacing.module.scss +16 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/index.scss +0 -2
- package/{dist/mixins/scss → src/scss/mixins}/motion.scss +0 -0
- package/{dist/mixins/scss → src/scss/mixins}/typo.scss +0 -67
- package/src/scss/modules/_reset.scss +113 -0
- package/src/scss/modules/_transition.scss +26 -0
- package/src/scss/modules/_typography.scss +36 -0
- package/src/scss/modules/_variables.scss +9 -0
- package/src/scss/modules/grid/_aspect-ratio.scss +62 -0
- package/src/scss/modules/grid/_breakpoint.scss +195 -0
- package/src/scss/modules/grid/_config.scss +88 -0
- package/src/scss/modules/grid/_css-grid.scss +445 -0
- package/src/scss/modules/grid/_flex-grid.scss +39 -0
- package/src/scss/modules/grid/_mixins.scss +307 -0
- package/src/scss/modules/grid/exports/_config.module.scss +9 -0
- package/src/scss/modules/grid/index.scss +5 -0
- package/src/scss/themes/b2b/tokens-map.scss +139 -0
- package/src/scss/themes/b2b/tokens.json +2190 -0
- package/{dist/tokens → src/scss/themes}/b2b/variables.css +0 -0
- package/src/scss/themes/cds/tokens-map.scss +138 -0
- package/src/scss/themes/cds/tokens.json +2184 -0
- package/{dist/tokens → src/scss/themes}/cds/variables.css +0 -1
- package/src/scss/themes/index.ts +43 -0
- package/src/scss/utility/display.scss +13 -0
- package/src/scss/utility/flexbox.scss +37 -0
- package/src/scss/utility/generatedFiles/generatedStyles.json +1 -0
- package/src/scss/utility/generatedFiles/generatedStyles.scss +300 -0
- package/src/scss/utility/index.scss +7 -0
- package/src/scss/utility/layout.scss +11 -0
- package/src/scss/utility/lists.scss +76 -0
- package/src/scss/utility/spacing.scss +89 -0
- package/src/scss/utility/typography.scss +16 -0
- package/src/scss/utility/variables.scss +116 -0
- package/README.md +0 -87
- package/build/utils/postInstall.js +0 -20
- package/build/utils/print.js +0 -38
- package/dist/CdsAccordion/index.js +0 -8
- package/dist/CdsAccordion/styles.css +0 -11
- package/dist/CdsBadge/index.js +0 -8
- package/dist/CdsBadge/styles.css +0 -9
- package/dist/CdsBreadcrumbs/index.js +0 -8
- package/dist/CdsBreadcrumbs/styles.css +0 -11
- package/dist/CdsButton/index.js +0 -8
- package/dist/CdsButton/styles.css +0 -11
- package/dist/CdsCheckbox/index.js +0 -8
- package/dist/CdsCheckbox/styles.css +0 -15
- package/dist/CdsCombobox/index.js +0 -8
- package/dist/CdsCombobox/styles.css +0 -15
- package/dist/CdsContainer/index.js +0 -8
- package/dist/CdsContainer/styles.css +0 -11
- package/dist/CdsContentSwitcher/index.js +0 -8
- package/dist/CdsContentSwitcher/styles.css +0 -15
- package/dist/CdsDataTable/index.js +0 -8
- package/dist/CdsDataTable/styles.css +0 -21
- package/dist/CdsDatePicker/index.js +0 -24
- package/dist/CdsDatePicker/styles.css +0 -15
- package/dist/CdsDrawer/index.js +0 -8
- package/dist/CdsDrawer/styles.css +0 -17
- package/dist/CdsDropdown/index.js +0 -8
- package/dist/CdsDropdown/styles.css +0 -15
- package/dist/CdsEmptyState/index.js +0 -8
- package/dist/CdsEmptyState/styles.css +0 -9
- package/dist/CdsFooter/index.js +0 -8
- package/dist/CdsFooter/styles.css +0 -17
- package/dist/CdsForm/index.js +0 -8
- package/dist/CdsForm/styles.css +0 -15
- package/dist/CdsGrid/index.js +0 -8
- package/dist/CdsGrid/styles.css +0 -9
- package/dist/CdsHeader/index.js +0 -8
- package/dist/CdsHeader/styles.css +0 -11
- package/dist/CdsIcon/index.js +0 -8
- package/dist/CdsIcon/styles.css +0 -9
- package/dist/CdsImage/index.js +0 -8
- package/dist/CdsImage/styles.css +0 -9
- package/dist/CdsInput/index.js +0 -8
- package/dist/CdsInput/styles.css +0 -13
- package/dist/CdsLink/index.js +0 -8
- package/dist/CdsLink/styles.css +0 -9
- package/dist/CdsList/index.js +0 -8
- package/dist/CdsList/styles.css +0 -9
- package/dist/CdsLoading/index.js +0 -8
- package/dist/CdsLoading/styles.css +0 -9
- package/dist/CdsModal/index.js +0 -8
- package/dist/CdsModal/styles.css +0 -15
- package/dist/CdsMultiselect/index.js +0 -8
- package/dist/CdsMultiselect/styles.css +0 -17
- package/dist/CdsNotification/index.js +0 -8
- package/dist/CdsNotification/styles.css +0 -21
- package/dist/CdsOverflowMenu/index.js +0 -8
- package/dist/CdsOverflowMenu/styles.css +0 -21
- package/dist/CdsPagination/index.js +0 -8
- package/dist/CdsPagination/styles.css +0 -13
- package/dist/CdsRadioButton/index.js +0 -8
- package/dist/CdsRadioButton/styles.css +0 -15
- package/dist/CdsSearch/index.js +0 -8
- package/dist/CdsSearch/styles.css +0 -19
- package/dist/CdsSelect/index.js +0 -8
- package/dist/CdsSelect/styles.css +0 -15
- package/dist/CdsSidebar/index.js +0 -8
- package/dist/CdsSidebar/styles.css +0 -15
- package/dist/CdsSkeleton/index.js +0 -8
- package/dist/CdsSkeleton/styles.css +0 -9
- package/dist/CdsStages/index.js +0 -8
- package/dist/CdsStages/styles.css +0 -9
- package/dist/CdsStatus/index.js +0 -8
- package/dist/CdsStatus/styles.css +0 -15
- package/dist/CdsSteps/index.js +0 -8
- package/dist/CdsSteps/styles.css +0 -19
- package/dist/CdsTable/index.js +0 -16
- package/dist/CdsTable/styles.css +0 -21
- package/dist/CdsTabs/index.js +0 -8
- package/dist/CdsTabs/styles.css +0 -9
- package/dist/CdsTag/index.js +0 -8
- package/dist/CdsTag/styles.css +0 -11
- package/dist/CdsTextArea/index.js +0 -8
- package/dist/CdsTextArea/styles.css +0 -17
- package/dist/CdsTextInput/index.js +0 -8
- package/dist/CdsTextInput/styles.css +0 -15
- package/dist/CdsToggle/index.js +0 -8
- package/dist/CdsToggle/styles.css +0 -9
- package/dist/CdsTooltip/index.js +0 -8
- package/dist/CdsTooltip/styles.css +0 -13
- package/dist/CdsUploader/index.js +0 -14
- package/dist/CdsUploader/styles.css +0 -25
- package/dist/cds.js +0 -38
- package/dist/cds.min.css +0 -7
- package/dist/cds.min.js +0 -38
- package/dist/index.html +0 -60
- package/dist/mixins/scss/layout/_breakpoint.scss +0 -237
- package/dist/mixins/scss/layout/_key-height.scss +0 -90
- package/dist/mixins/scss/layout/_spacing-export.scss +0 -34
- package/dist/mixins/scss/layout/_utilities.scss +0 -33
- package/dist/types/CdsAccordion.ts +0 -4
- package/dist/types/CdsAccordionItem.ts +0 -10
- package/dist/types/CdsBreadcrumbs.ts +0 -11
- package/dist/types/CdsBreadcrumbsItem.ts +0 -12
- package/dist/types/CdsButton.ts +0 -30
- package/dist/types/CdsCheckbox.ts +0 -20
- package/dist/types/CdsCheckboxGroup.ts +0 -14
- package/dist/types/CdsCol.ts +0 -38
- package/dist/types/CdsCombobox.ts +0 -42
- package/dist/types/CdsContainer.ts +0 -32
- package/dist/types/CdsContentSwitcher.ts +0 -4
- package/dist/types/CdsContentSwitcherButton.ts +0 -21
- package/dist/types/CdsDataTable.ts +0 -48
- package/dist/types/CdsDatePicker.ts +0 -40
- package/dist/types/CdsDrawer.ts +0 -25
- package/dist/types/CdsDrawerGroup.ts +0 -8
- package/dist/types/CdsDrawerItem.ts +0 -12
- package/dist/types/CdsDrawerLabel.ts +0 -4
- package/dist/types/CdsDropdown.ts +0 -14
- package/dist/types/CdsEmptyState.ts +0 -10
- package/dist/types/CdsFooter.ts +0 -17
- package/dist/types/CdsFooterService.ts +0 -16
- package/dist/types/CdsForm.ts +0 -4
- package/dist/types/CdsFormGroup.ts +0 -8
- package/dist/types/CdsFormItem.ts +0 -4
- package/dist/types/CdsGrid.ts +0 -16
- package/dist/types/CdsHeader.ts +0 -27
- package/dist/types/CdsHeaderService.ts +0 -4
- package/dist/types/CdsIcon.ts +0 -6
- package/dist/types/CdsLink.ts +0 -22
- package/dist/types/CdsList.ts +0 -6
- package/dist/types/CdsLoading.ts +0 -14
- package/dist/types/CdsModal.ts +0 -17
- package/dist/types/CdsMultiselect.ts +0 -33
- package/dist/types/CdsNotification.ts +0 -22
- package/dist/types/CdsOverflowMenu.ts +0 -16
- package/dist/types/CdsPagination.ts +0 -12
- package/dist/types/CdsRadioButton.ts +0 -29
- package/dist/types/CdsRow.ts +0 -18
- package/dist/types/CdsSearch.ts +0 -24
- package/dist/types/CdsSelect.ts +0 -37
- package/dist/types/CdsSkeleton.ts +0 -14
- package/dist/types/CdsStages.ts +0 -10
- package/dist/types/CdsStatus.ts +0 -22
- package/dist/types/CdsSteps.ts +0 -22
- package/dist/types/CdsStepsItem.ts +0 -12
- package/dist/types/CdsTable.ts +0 -46
- package/dist/types/CdsTabs.ts +0 -19
- package/dist/types/CdsTabsItem.ts +0 -18
- package/dist/types/CdsTag.ts +0 -20
- package/dist/types/CdsTextArea.ts +0 -26
- package/dist/types/CdsTextInput.ts +0 -32
- package/dist/types/CdsToggle.ts +0 -18
- package/dist/types/CdsTooltip.ts +0 -18
- package/dist/types/CdsTooltipDefinition.ts +0 -16
- package/dist/types/CdsTooltipInteractive.ts +0 -11
- package/dist/types/CdsUploader.ts +0 -44
- package/dist/types/Sidebar.ts +0 -17
- package/dist/types/types.ts +0 -2
- package/dist/utils/convertRemToPx.js +0 -9
- package/dist/utils/deepFind.js +0 -14
- package/dist/utils/expiringStorage.js +0 -28
- package/dist/utils/helpers.js +0 -33
- package/dist/utils/index.js +0 -1
- package/dist/utils/isCorrectTag.js +0 -5
- package/dist/utils/isRightProps.js +0 -5
- package/dist/utils/memoize.js +0 -8
- package/dist/utils/suffixPropName.js +0 -12
- package/dist/utils/test/deepFind.test.js +0 -18
- package/dist/utils/test/isCorrectTag.test.js +0 -9
- package/dist/utils/test/isCorrectTagDataSet.js +0 -51
- package/dist/utils/validationProps.js +0 -7
package/package.json
CHANGED
|
@@ -1,92 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@central-design-system/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
|
+
"description": "Central Design System on the Vue 3.0 and TypeScript",
|
|
5
|
+
"author": "magersoft",
|
|
4
6
|
"license": "ISC",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
7
|
+
"main": "./dist/cds.umd.js",
|
|
8
|
+
"module": "./dist/cds.es.js",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">= 16"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/cds.es.js",
|
|
15
|
+
"require": "./dist/cds.umd.js"
|
|
14
16
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
],
|
|
19
|
-
"main": "dist/cds.js",
|
|
17
|
+
"./nuxt": "./nuxt.js",
|
|
18
|
+
"./dist/cds.css": "./dist/cds.css"
|
|
19
|
+
},
|
|
20
20
|
"files": [
|
|
21
21
|
"dist",
|
|
22
|
-
"
|
|
22
|
+
"src/scss",
|
|
23
|
+
"nuxt.js"
|
|
23
24
|
],
|
|
25
|
+
"types": "./dist/cds.d.ts",
|
|
24
26
|
"scripts": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"build": "node build/index.js",
|
|
29
|
-
"build:components": "npx webpack --config build/webpack.components.js",
|
|
30
|
-
"demo": "http-server ./dist",
|
|
31
|
-
"postinstall": "node build/utils/postInstall.js"
|
|
27
|
+
"build": "rimraf dist && vue-tsc --noEmit && vite build",
|
|
28
|
+
"type-check": "npx vue-tsc --noEmit -p tsconfig.json --composite false",
|
|
29
|
+
"bump": "npx bumpp"
|
|
32
30
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"flatpickr": "4.6.9",
|
|
36
|
-
"v-runtime-template": "1.10.0",
|
|
37
|
-
"vanilla-masker": "1.2.0",
|
|
38
|
-
"vue": "2.6.14",
|
|
39
|
-
"vue-upload-component": "git+https://github.com/b2bcenter/vue-upload-component#vue2"
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"vue": "3.2.45"
|
|
40
33
|
},
|
|
41
34
|
"devDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
"css-minimizer-webpack-plugin": "1.3.0",
|
|
57
|
-
"cssnano": "4.1.11",
|
|
58
|
-
"expect": "24.9.0",
|
|
59
|
-
"flush-promises": "1.0.2",
|
|
60
|
-
"html-webpack-plugin": "5.5.0",
|
|
61
|
-
"identity-obj-proxy": "3.0.0",
|
|
62
|
-
"jest": "24.9.0",
|
|
63
|
-
"jest-css-modules": "2.1.0",
|
|
64
|
-
"jest-fetch-mock": "2.1.2",
|
|
65
|
-
"jest-serializer-vue": "2.0.2",
|
|
66
|
-
"jest-transform-stub": "2.0.0",
|
|
67
|
-
"mini-css-extract-plugin": "2.5.3",
|
|
68
|
-
"node-sass": "6.0.1",
|
|
69
|
-
"postcss-loader": "3.0.0",
|
|
70
|
-
"sass-loader": "10.2.0",
|
|
71
|
-
"sass-rem": "3.0.0",
|
|
72
|
-
"sinon": "7.5.0",
|
|
73
|
-
"style-loader": "1.3.0",
|
|
74
|
-
"terser-webpack-plugin": "5.2.1",
|
|
75
|
-
"vue-jest": "3.0.7",
|
|
76
|
-
"vue-loader": "15.9.8",
|
|
77
|
-
"vue-property-decorator": "9.1.2",
|
|
78
|
-
"vue-style-loader": "4.1.3",
|
|
79
|
-
"vue-template-compiler": "2.6.14",
|
|
80
|
-
"webpack": "5.65.0",
|
|
81
|
-
"webpack-bundle-analyzer": "4.5.0",
|
|
82
|
-
"webpack-cli": "4.9.1",
|
|
83
|
-
"webpack-merge": "5.8.0",
|
|
84
|
-
"webpackbar": "5.0.2"
|
|
85
|
-
},
|
|
86
|
-
"browserslist": [
|
|
87
|
-
"last 2 version",
|
|
88
|
-
">0.5%",
|
|
89
|
-
"ie>=11",
|
|
90
|
-
"not dead"
|
|
91
|
-
]
|
|
35
|
+
"@types/node": "16.18.3",
|
|
36
|
+
"@vitejs/plugin-vue": "3.0.0",
|
|
37
|
+
"bumpp": "8.2.1",
|
|
38
|
+
"rimraf": "3.0.2",
|
|
39
|
+
"rollup": "2.78.1",
|
|
40
|
+
"rollup-plugin-visualizer": "5.8.2",
|
|
41
|
+
"typescript": "4.8.4",
|
|
42
|
+
"vite": "3.1.7",
|
|
43
|
+
"vite-plugin-dts": "1.6.5",
|
|
44
|
+
"vite-tsconfig-paths": "3.5.1",
|
|
45
|
+
"vue": "3.2.45",
|
|
46
|
+
"vue-router": "4.1.6",
|
|
47
|
+
"vue-tsc": "1.0.9"
|
|
48
|
+
}
|
|
92
49
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
/// @type Number
|
|
3
3
|
/// @access public
|
|
4
4
|
/// @group @cds/layout
|
|
5
|
+
@use "sass:math";
|
|
6
|
+
|
|
5
7
|
$cds-base-font-size: 16px !default;
|
|
6
8
|
|
|
7
9
|
/// Convert a given px unit to a rem unit
|
|
@@ -10,7 +12,7 @@ $cds-base-font-size: 16px !default;
|
|
|
10
12
|
/// @access public
|
|
11
13
|
/// @group @cds/layout
|
|
12
14
|
@function toRem($px) {
|
|
13
|
-
@return ($px
|
|
15
|
+
@return math.div($px, $cds-base-font-size) * 1rem;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
/// Convert a given px unit to a em unit
|
|
@@ -19,5 +21,5 @@ $cds-base-font-size: 16px !default;
|
|
|
19
21
|
/// @access public
|
|
20
22
|
/// @group @cds/layout
|
|
21
23
|
@function toEm($px) {
|
|
22
|
-
@return ($px
|
|
24
|
+
@return math.div($px, $cds-base-font-size) * 1em;
|
|
23
25
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@import '../spacing';
|
|
2
|
+
|
|
3
|
+
:export {
|
|
4
|
+
cds-layout-xs: $cds-layout-xs;
|
|
5
|
+
cds-layout-s: $cds-layout-s;
|
|
6
|
+
cds-layout-m: $cds-layout-m;
|
|
7
|
+
cds-layout-l: $cds-layout-l;
|
|
8
|
+
cds-layout-xl: $cds-layout-xl;
|
|
9
|
+
cds-layout-xxl: $cds-layout-xxl;
|
|
10
|
+
cds-layout-3xl: $cds-layout-3xl;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@import '../spacing';
|
|
2
|
+
|
|
3
|
+
:export {
|
|
4
|
+
cds-spacing-3xs: $cds-spacing-3xs;
|
|
5
|
+
cds-spacing-xxs: $cds-spacing-xxs;
|
|
6
|
+
cds-spacing-xs: $cds-spacing-xs;
|
|
7
|
+
cds-spacing-s: $cds-spacing-s;
|
|
8
|
+
cds-spacing-m: $cds-spacing-m;
|
|
9
|
+
cds-spacing-l: $cds-spacing-l;
|
|
10
|
+
cds-spacing-xl: $cds-spacing-xl;
|
|
11
|
+
cds-spacing-xxl: $cds-spacing-xxl;
|
|
12
|
+
cds-spacing-3xl: $cds-spacing-3xl;
|
|
13
|
+
cds-spacing-4xl: $cds-spacing-4xl;
|
|
14
|
+
cds-spacing-5xl: $cds-spacing-5xl;
|
|
15
|
+
cds-spacing-6x: $cds-spacing-6xl;
|
|
16
|
+
}
|
|
File without changes
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
@import '../../mixins/scss/layout/breakpoint';
|
|
2
|
-
|
|
3
|
-
|
|
4
1
|
/// Placeholder
|
|
5
2
|
/// @param {string} $color - The color of placeholder
|
|
6
3
|
/// @access public
|
|
@@ -29,57 +26,23 @@
|
|
|
29
26
|
line-height: var(--cds-font-height-body);
|
|
30
27
|
font-weight: var(--cds-font-weight-light);
|
|
31
28
|
}
|
|
32
|
-
|
|
33
29
|
@mixin cds-body-text-s() {
|
|
34
30
|
font-family: var(--cds-font-family-sans);
|
|
35
31
|
font-size: var(--cds-font-body-size-s);
|
|
36
32
|
line-height: var(--cds-font-height-body);
|
|
37
33
|
font-weight: var(--cds-font-weight-light);
|
|
38
|
-
|
|
39
|
-
@include cds-breakpoint-down('sm') {
|
|
40
|
-
font-size: var(--cds-font-body-size-xs);
|
|
41
|
-
}
|
|
42
34
|
}
|
|
43
35
|
@mixin cds-body-text-m() {
|
|
44
36
|
font-family: var(--cds-font-family-sans);
|
|
45
37
|
font-size: var(--cds-font-body-size-m);
|
|
46
38
|
line-height: var(--cds-font-height-body);
|
|
47
39
|
font-weight: var(--cds-font-weight-light);
|
|
48
|
-
|
|
49
|
-
@include cds-breakpoint-down('sm') {
|
|
50
|
-
font-size: var(--cds-font-body-size-s);
|
|
51
|
-
}
|
|
52
40
|
}
|
|
53
41
|
@mixin cds-body-text-l() {
|
|
54
42
|
font-family: var(--cds-font-family-sans);
|
|
55
43
|
font-size: var(--cds-font-body-size-l);
|
|
56
44
|
line-height: var(--cds-font-height-body);
|
|
57
45
|
font-weight: var(--cds-font-weight-normal);
|
|
58
|
-
|
|
59
|
-
@include cds-breakpoint-down('sm') {
|
|
60
|
-
font-size: var(--cds-font-body-size-m);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
@mixin cds-body-text-xl() {
|
|
64
|
-
font-family: var(--cds-font-family-sans);
|
|
65
|
-
font-size: var(--cds-font-body-size-xl);
|
|
66
|
-
line-height: var(--cds-font-height-body);
|
|
67
|
-
font-weight: var(--cds-font-weight-normal);
|
|
68
|
-
|
|
69
|
-
@include cds-breakpoint-down('sm') {
|
|
70
|
-
font-size: var(--cds-font-body-size-l);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@mixin cds-body-text-xl() {
|
|
75
|
-
font-family: var(--cds-font-family-sans);
|
|
76
|
-
font-size: var(--cds-font-body-size-xl);
|
|
77
|
-
line-height: var(--cds-font-height-body);
|
|
78
|
-
font-weight: var(--cds-font-weight-normal);
|
|
79
|
-
|
|
80
|
-
@include cds-breakpoint-down('sm') {
|
|
81
|
-
font-size: var(--cds-font-body-size-l);
|
|
82
|
-
}
|
|
83
46
|
}
|
|
84
47
|
|
|
85
48
|
/// HEADING
|
|
@@ -90,66 +53,36 @@
|
|
|
90
53
|
font-size: var(--cds-font-heading-1);
|
|
91
54
|
line-height: var(--cds-font-height-heading);
|
|
92
55
|
font-weight: var(--cds-font-weight-light);
|
|
93
|
-
|
|
94
|
-
@include cds-breakpoint-down('sm') {
|
|
95
|
-
font-size: var(--cds-font-heading-2);
|
|
96
|
-
}
|
|
97
56
|
}
|
|
98
57
|
@mixin cds-font-heading-2() {
|
|
99
58
|
font-family: var(--cds-font-family-sans);
|
|
100
59
|
font-size: var(--cds-font-heading-2);
|
|
101
60
|
line-height: var(--cds-font-height-heading);
|
|
102
61
|
font-weight: var(--cds-font-weight-light);
|
|
103
|
-
|
|
104
|
-
@include cds-breakpoint-down('sm') {
|
|
105
|
-
font-size: var(--cds-font-heading-3);
|
|
106
|
-
}
|
|
107
62
|
}
|
|
108
63
|
@mixin cds-font-heading-3() {
|
|
109
64
|
font-family: var(--cds-font-family-sans);
|
|
110
65
|
font-size: var(--cds-font-heading-3);
|
|
111
66
|
line-height: var(--cds-font-height-heading);
|
|
112
67
|
font-weight: var(--cds-font-weight-light);
|
|
113
|
-
|
|
114
|
-
@include cds-breakpoint-down('sm') {
|
|
115
|
-
font-size: var(--cds-font-heading-4);
|
|
116
|
-
}
|
|
117
68
|
}
|
|
118
69
|
@mixin cds-font-heading-4() {
|
|
119
70
|
font-family: var(--cds-font-family-sans);
|
|
120
71
|
font-size: var(--cds-font-heading-4);
|
|
121
72
|
line-height: var(--cds-font-height-heading);
|
|
122
73
|
font-weight: var(--cds-font-weight-bold);
|
|
123
|
-
|
|
124
|
-
@include cds-breakpoint-down('sm') {
|
|
125
|
-
font-size: var(--cds-font-heading-5);
|
|
126
|
-
}
|
|
127
74
|
}
|
|
128
75
|
@mixin cds-font-heading-5() {
|
|
129
76
|
font-family: var(--cds-font-family-sans);
|
|
130
77
|
font-size: var(--cds-font-heading-5);
|
|
131
78
|
line-height: var(--cds-font-height-heading);
|
|
132
79
|
font-weight: var(--cds-font-weight-bold);
|
|
133
|
-
|
|
134
|
-
@include cds-breakpoint-down('sm') {
|
|
135
|
-
font-size: var(--cds-font-heading-6);
|
|
136
|
-
}
|
|
137
80
|
}
|
|
138
81
|
@mixin cds-font-heading-6() {
|
|
139
82
|
font-family: var(--cds-font-family-sans);
|
|
140
83
|
font-size: var(--cds-font-heading-6);
|
|
141
84
|
line-height: var(--cds-font-height-heading);
|
|
142
85
|
font-weight: var(--cds-font-weight-bold);
|
|
143
|
-
|
|
144
|
-
@include cds-breakpoint-down('sm') {
|
|
145
|
-
font-size: var(--cds-font-body-size-xs);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
@mixin cds-font-heading-6-adaptive() {
|
|
149
|
-
font-family: var(--cds-font-family-sans);
|
|
150
|
-
font-size: var(--cds-font-body-size-xs);
|
|
151
|
-
line-height: var(--cds-font-height-heading);
|
|
152
|
-
font-weight: var(--cds-font-weight-bold);
|
|
153
86
|
}
|
|
154
87
|
@mixin cds-font-heading-eyebrow() {
|
|
155
88
|
font-family: var(--cds-font-family-sans);
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@mixin reset {
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
html {
|
|
9
|
+
font-size: var(--cds-font-base);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
font-family: var(--cds-font-family-sans), Arial, sans-serif;
|
|
14
|
+
font-size: var(--cds-font-family-size);
|
|
15
|
+
line-height: var(--cds-font-height-body);
|
|
16
|
+
scroll-behavior: smooth;
|
|
17
|
+
text-rendering: optimizeSpeed;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body,
|
|
21
|
+
h1,
|
|
22
|
+
h2,
|
|
23
|
+
h3,
|
|
24
|
+
h4,
|
|
25
|
+
p,
|
|
26
|
+
ul,
|
|
27
|
+
ol,
|
|
28
|
+
li,
|
|
29
|
+
figure,
|
|
30
|
+
figcaption,
|
|
31
|
+
blockquote,
|
|
32
|
+
dl,
|
|
33
|
+
dd {
|
|
34
|
+
margin: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ol, ul {
|
|
38
|
+
padding: 0;
|
|
39
|
+
list-style: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
blockquote, q {
|
|
43
|
+
quotes: none;
|
|
44
|
+
|
|
45
|
+
&:before,
|
|
46
|
+
&:after {
|
|
47
|
+
content: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
a:not([class]) {
|
|
52
|
+
text-decoration-skip-ink: auto;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
table {
|
|
56
|
+
border-collapse: collapse;
|
|
57
|
+
border-spacing: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
img {
|
|
61
|
+
max-width: 100%;
|
|
62
|
+
display: block;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
input,
|
|
66
|
+
button,
|
|
67
|
+
textarea,
|
|
68
|
+
select {
|
|
69
|
+
font-family: inherit;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
Если пользователь отключил анимацию в ОС
|
|
74
|
+
@see https://developer.mozilla.org/ru/docs/Web/CSS/@media/prefers-reduced-motion
|
|
75
|
+
*/
|
|
76
|
+
@media (prefers-reduced-motion: reduce) {
|
|
77
|
+
* {
|
|
78
|
+
animation-duration: 0.01ms !important;
|
|
79
|
+
animation-iteration-count: 1 !important;
|
|
80
|
+
transition-duration: 0.01ms !important;
|
|
81
|
+
scroll-behavior: auto !important;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
Internet Explorer 11 :|
|
|
87
|
+
*/
|
|
88
|
+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
89
|
+
details, summary, main {
|
|
90
|
+
display: block;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
template {
|
|
94
|
+
display: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
svg:not(:root) {
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
button {
|
|
102
|
+
overflow: visible;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
textarea {
|
|
106
|
+
overflow: auto;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
input::-ms-clear {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import '../mixins/motion';
|
|
2
|
+
|
|
3
|
+
$standard-easing: map-get(map-get($easing, 'ease-in-out'), 'basic');
|
|
4
|
+
|
|
5
|
+
@mixin transition-default() {
|
|
6
|
+
&-enter-active {
|
|
7
|
+
transition: 0.3s $standard-easing;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&-leave-active {
|
|
11
|
+
transition: 0.3s $standard-easing;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-move {
|
|
15
|
+
transition: transform .5s $standard-easing;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Generic transitions
|
|
20
|
+
.expand-transition {
|
|
21
|
+
@include transition-default();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.expand-x-transition {
|
|
25
|
+
@include transition-default();
|
|
26
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@import "../mixins/typo";
|
|
2
|
+
@import "../mixins/layout/spacing";
|
|
3
|
+
|
|
4
|
+
@mixin typography {
|
|
5
|
+
h1, .h1 {
|
|
6
|
+
@include cds-font-heading-1();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
h2, .h2 {
|
|
10
|
+
@include cds-font-heading-2();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
h3, .h3 {
|
|
14
|
+
@include cds-font-heading-3();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
h4, .h4 {
|
|
18
|
+
@include cds-font-heading-4();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
h5, .h5 {
|
|
22
|
+
@include cds-font-heading-5();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
h6, .h6 {
|
|
26
|
+
@include cds-font-heading-6();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
p {
|
|
30
|
+
@include cds-body-text-s();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
small, .small {
|
|
34
|
+
@include cds-body-text-xs();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use 'config' as *;
|
|
5
|
+
|
|
6
|
+
/// The aspect ratios that are used to generate corresponding aspect ratio
|
|
7
|
+
/// classes in code
|
|
8
|
+
/// @type List
|
|
9
|
+
/// @access public
|
|
10
|
+
/// @group @cds/grid
|
|
11
|
+
$aspect-ratios: (
|
|
12
|
+
(16, 9),
|
|
13
|
+
(9, 16),
|
|
14
|
+
(2, 1),
|
|
15
|
+
(1, 2),
|
|
16
|
+
(4, 3),
|
|
17
|
+
(3, 4),
|
|
18
|
+
(3, 2),
|
|
19
|
+
(2, 3),
|
|
20
|
+
(1, 1)
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
/// Generates the CSS classname utilities for the aspect ratios
|
|
24
|
+
///
|
|
25
|
+
/// CSS Tricks article on aspect ratios and all the different ways it can be done.
|
|
26
|
+
/// https://css-tricks.com/aspect-ratio-boxes/#article-header-id-6
|
|
27
|
+
///
|
|
28
|
+
/// That article references an earlier article on the topic.
|
|
29
|
+
/// https://keithjgrant.com/posts/2017/03/aspect-ratios/
|
|
30
|
+
///
|
|
31
|
+
/// @param {Number} $width width from an aspect ratio
|
|
32
|
+
/// @param {Number} $height height from an aspect ratio
|
|
33
|
+
/// @access private
|
|
34
|
+
/// @group @cds/grid
|
|
35
|
+
@mixin aspect-ratio($aspect-ratios: $aspect-ratios) {
|
|
36
|
+
.#{$prefix}-aspect-ratio {
|
|
37
|
+
position: relative;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{$prefix}-aspect-ratio::before {
|
|
41
|
+
width: 1px;
|
|
42
|
+
height: 0;
|
|
43
|
+
margin-left: -1px;
|
|
44
|
+
content: '';
|
|
45
|
+
float: left;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$prefix}-aspect-ratio::after {
|
|
49
|
+
display: table;
|
|
50
|
+
clear: both;
|
|
51
|
+
content: '';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@each $aspect-ratio in $aspect-ratios {
|
|
55
|
+
$width: list.nth($aspect-ratio, 1);
|
|
56
|
+
$height: list.nth($aspect-ratio, 2);
|
|
57
|
+
|
|
58
|
+
.#{$prefix}-aspect-ratio--#{$width}x#{$height}::before {
|
|
59
|
+
padding-top: math.percentage(math.div($height, $width));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|