@madgex/design-system 9.0.1 → 9.1.1
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/_tokens/css/_tokens.css +1 -1
- package/dist/_tokens/js/_tokens-module.js +1 -1
- package/dist/assets/icons.json +1 -1
- package/dist/css/index.css +1 -1
- package/dist/js/index.js +1 -1
- package/package.json +3 -2
- package/src/components/_macro-index.njk +1 -0
- package/src/components/subnavigation/README.md +18 -0
- package/src/components/subnavigation/_macro.njk +3 -0
- package/src/components/subnavigation/_template.njk +25 -0
- package/src/components/subnavigation/subnavigation.config.js +190 -0
- package/src/components/subnavigation/subnavigation.js +104 -0
- package/src/components/subnavigation/subnavigation.njk +10 -0
- package/src/components/subnavigation/subnavigation.scss +122 -0
- package/src/js/index.js +2 -0
- package/src/layout/forms/forms.njk +2 -2
- package/src/scss/components/__index.scss +1 -0
- package/src/scss/constants/_sd-tokens.scss +1 -1
- package/tasks/css.js +2 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
.mds-subnavigation {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
border-bottom: solid 1px $constant-color-neutral-lighter;
|
|
5
|
+
background-color: var(--mds-color-background-body);
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.mds-subnavigation__link-list {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-grow: 1;
|
|
13
|
+
gap: 6px;
|
|
14
|
+
align-items: center;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
margin-bottom: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mds-subnavigation__drawer-label,
|
|
20
|
+
.mds-subnavigation__link {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
min-height: 60px;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
border: none;
|
|
28
|
+
border-radius: 0;
|
|
29
|
+
border-bottom: solid 6px rgba(0,0,0,0);
|
|
30
|
+
|
|
31
|
+
&:hover,
|
|
32
|
+
&:focus {
|
|
33
|
+
border-color: $constant-color-neutral-light;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&[aria-expanded='true'] {
|
|
37
|
+
border-color: $constant-color-neutral-light;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[aria-current="page"] {
|
|
41
|
+
color: var(--mds-color-text-headers-base);
|
|
42
|
+
border-color: $link-hover-color;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mds-subnavigation__drawer-icon,
|
|
47
|
+
.mds-subnavigation__drawer-icon--open,
|
|
48
|
+
.mds-subnavigation__drawer-label[aria-expanded='false'] + .mds-subnavigation__drawer-content,
|
|
49
|
+
.mds-subnavigation__drawer {
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mds-subnavigation__drawer-content {
|
|
54
|
+
position: absolute;
|
|
55
|
+
z-index: 1;
|
|
56
|
+
|
|
57
|
+
.mds-subnavigation__link {
|
|
58
|
+
border: solid 1px $constant-color-neutral-lighter;
|
|
59
|
+
background-color: var(--mds-color-background-body);
|
|
60
|
+
justify-content: flex-start;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mds-subnavigation__drawer-content li:not(:first-child) .mds-subnavigation__link {
|
|
65
|
+
border-top: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.mds-subnavigation__drawer-label[aria-expanded='false'] .mds-subnavigation__drawer-icon,
|
|
69
|
+
.mds-subnavigation__drawer-label[aria-expanded='true'] .mds-subnavigation__drawer-icon--open {
|
|
70
|
+
display: inline;
|
|
71
|
+
position: static;
|
|
72
|
+
margin: 0 0 0 0.4em;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mds-subnavigation__drawer-label-text--mobile,
|
|
76
|
+
.mds-subnavigation__mobile-title {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mds-subnavigation__drawer-label-text {
|
|
81
|
+
display: inline;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media only screen and (max-width: $constant-size-breakpoint-md) {
|
|
85
|
+
.mds-subnavigation__drawer-label-text {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mds-subnavigation__drawer-label-text--mobile,
|
|
90
|
+
.mds-subnavigation__mobile-title {
|
|
91
|
+
display: inline;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.mds-subnavigation__drawer {
|
|
95
|
+
margin-left: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mds-subnavigation__drawer-label {
|
|
99
|
+
border-bottom: none;
|
|
100
|
+
padding-left: 0;
|
|
101
|
+
|
|
102
|
+
&[aria-expanded='true'] {
|
|
103
|
+
color: var(--button-text-color);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.mds-subnavigation__drawer-content {
|
|
108
|
+
left: -1px;
|
|
109
|
+
right: -1px;
|
|
110
|
+
z-index: 1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
html:not(.js) {
|
|
115
|
+
.mds-subnavigation__mobile-title {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.mds-subnavigation__link {
|
|
120
|
+
min-height: auto;
|
|
121
|
+
}
|
|
122
|
+
}
|
package/src/js/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import './webpack-public-path';
|
|
|
11
11
|
import './common';
|
|
12
12
|
import tabs from '../components/tabs/tabs';
|
|
13
13
|
import accordion from '../components/accordion/accordion';
|
|
14
|
+
import subnavigation from '../components/subnavigation/subnavigation';
|
|
14
15
|
import checkboxList from '../components/inputs/checkbox-list/checkbox-list';
|
|
15
16
|
import popovers from '../components/popover/popover';
|
|
16
17
|
import modals from '../components/modal/modal';
|
|
@@ -22,6 +23,7 @@ import prose from '../helpers/prose/prose';
|
|
|
22
23
|
document.addEventListener('DOMContentLoaded', () => {
|
|
23
24
|
tabs.init();
|
|
24
25
|
accordion.init();
|
|
26
|
+
subnavigation.init();
|
|
25
27
|
checkboxList.init();
|
|
26
28
|
modals.init();
|
|
27
29
|
fileUpload.init();
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
</div>
|
|
84
84
|
</fieldset>
|
|
85
85
|
<div class="mds-clearfix">
|
|
86
|
-
{% MdsButton({
|
|
86
|
+
{% call MdsButton({
|
|
87
87
|
classes: 'mds-width-full mds-width-md-auto mds-float-md-right'
|
|
88
88
|
}) -%}
|
|
89
89
|
Submit
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
}) }}
|
|
104
104
|
</div>
|
|
105
105
|
<div class="mds-grid-col-12 mds-grid-col-md-4 mds-grid-col-lg-2">
|
|
106
|
-
{% MdsButton({
|
|
106
|
+
{% call MdsButton({
|
|
107
107
|
classes: 'mds-width-full mds-width-md-auto'
|
|
108
108
|
}) -%}
|
|
109
109
|
Submit
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@import '../../components/tabs/tabs';
|
|
6
6
|
@import '../../components/accordion/accordion';
|
|
7
7
|
@import '../../components/pagination/pagination';
|
|
8
|
+
@import '../../components/subnavigation/subnavigation';
|
|
8
9
|
@import '../../components/switch-state/switch-state';
|
|
9
10
|
@import '../../components/popover/popover';
|
|
10
11
|
@import '../../components/notification/notification';
|
package/tasks/css.js
CHANGED
|
@@ -4,6 +4,7 @@ const webpack = require('webpack');
|
|
|
4
4
|
const autoprefixer = require('autoprefixer');
|
|
5
5
|
const cssnano = require('cssnano');
|
|
6
6
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
7
|
+
const combineMediaQuery = require('postcss-combine-media-query');
|
|
7
8
|
|
|
8
9
|
async function cssWebpack(srcFilePath, distFilePath, hashFilePath = false, filename = false) {
|
|
9
10
|
let outputFilename;
|
|
@@ -45,7 +46,7 @@ async function cssWebpack(srcFilePath, distFilePath, hashFilePath = false, filen
|
|
|
45
46
|
loader: 'postcss-loader',
|
|
46
47
|
options: {
|
|
47
48
|
postcssOptions: {
|
|
48
|
-
plugins: [autoprefixer(), cssnano()],
|
|
49
|
+
plugins: [combineMediaQuery(), autoprefixer(), cssnano()],
|
|
49
50
|
},
|
|
50
51
|
},
|
|
51
52
|
},
|