@qld-gov-au/qgds-bootstrap5 2.0.1 → 2.0.3
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/.storybook/preview.js +4 -1
- package/dist/assets/components/bs5/accordion/accordion.hbs +3 -6
- package/dist/assets/components/bs5/directionLinks/directionLinks.hbs +2 -1
- package/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/header/header.hbs +6 -9
- package/dist/assets/components/bs5/navbar/navbar.hbs +21 -14
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
- package/dist/assets/components/bs5/pageLayout/templates/homePage.hbs +1 -1
- package/dist/assets/components/bs5/quickexit/quickexit.hbs +1 -1
- package/dist/assets/components/bs5/sidenav/sidenav.hbs +56 -37
- package/dist/assets/css/qld.bootstrap.css +1 -6
- package/dist/assets/css/qld.bootstrap.css.map +3 -3
- package/dist/assets/js/handlebars.init.min.js +232 -179
- package/dist/assets/js/handlebars.init.min.js.map +2 -2
- package/dist/assets/js/qld.bootstrap.min.js +5 -5
- package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
- package/dist/assets/node/handlebars.init.min.js +55 -23
- package/dist/assets/node/handlebars.init.min.js.map +2 -2
- package/dist/components/bs5/accordion/accordion.hbs +3 -6
- package/dist/components/bs5/directionLinks/directionLinks.hbs +2 -1
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/header/header.hbs +6 -9
- package/dist/components/bs5/navbar/navbar.hbs +21 -14
- package/dist/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
- package/dist/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
- package/dist/components/bs5/pageLayout/templates/homePage.hbs +1 -1
- package/dist/components/bs5/quickexit/quickexit.hbs +1 -1
- package/dist/components/bs5/sidenav/sidenav.hbs +56 -37
- package/dist/package.json +2 -4
- package/dist/sample-data/accordion/accordion.data.json +24 -23
- package/dist/sample-data/navbar/navbar.data.json +91 -25
- package/dist/sample-data/pagination/pagination.data.json +19 -19
- package/dist/sample-data/sidenav/sidenav.data.json +81 -80
- package/package.json +2 -4
- package/src/components/bs5/accordion/Accordion.mdx +34 -12
- package/src/components/bs5/accordion/__snapshots__/accordion.test.js.snap +3 -6
- package/src/components/bs5/accordion/accordion.data.json +24 -23
- package/src/components/bs5/accordion/accordion.hbs +3 -6
- package/src/components/bs5/accordion/accordion.scss +19 -9
- package/src/components/bs5/accordion/accordion.stories.js +8 -0
- package/src/components/bs5/accordion/accordion.test.js +5 -0
- package/src/components/bs5/accordion/mdx/_designResources.mdx +6 -0
- package/src/components/bs5/accordion/mdx/_usageInstructions.mdx +10 -0
- package/src/components/bs5/backToTop/backToTop.mdx +4 -5
- package/src/components/bs5/banner/Banner.mdx +1 -3
- package/src/components/bs5/blockquote/Blockquote.mdx +4 -5
- package/src/components/bs5/blockquote/blockquote.scss +47 -7
- package/src/components/bs5/breadcrumbs/Breadcrumbs.mdx +1 -3
- package/src/components/bs5/button/Button.mdx +4 -5
- package/src/components/bs5/button/button.scss +13 -1
- package/src/components/bs5/callToAction/callToAction.mdx +1 -3
- package/src/components/bs5/callout/Callout.mdx +4 -5
- package/src/components/bs5/card/Card.mdx +1 -3
- package/src/components/bs5/card/card.scss +1 -25
- package/src/components/bs5/directionLinks/DirectionLinks.mdx +4 -5
- package/src/components/bs5/directionLinks/directionLinks.hbs +2 -1
- package/src/components/bs5/directionLinks/directionLinks.scss +27 -80
- package/src/components/bs5/directionLinks/directionLinks.stories.js +7 -14
- package/src/components/bs5/footer/Footer.mdx +1 -3
- package/src/components/bs5/footer/footer.scss +4 -11
- package/src/components/bs5/formcheck/stories/checkbox/Checkbox.mdx +7 -6
- package/src/components/bs5/formcheck/stories/radio/Radio.mdx +7 -6
- package/src/components/bs5/globalAlert/GlobalAlert.mdx +1 -3
- package/src/components/bs5/globalAlert/globalAlert.scss +6 -0
- package/src/components/bs5/header/Header.mdx +1 -3
- package/src/components/bs5/header/header.hbs +6 -9
- package/src/components/bs5/header/header.scss +6 -2
- package/src/components/bs5/icons/Icons.mdx +167 -7
- package/src/components/bs5/icons/_icons.sizes.scss +9 -0
- package/src/components/bs5/icons/icons.scss +23 -71
- package/src/components/bs5/icons/icons.stories.js +34 -57
- package/src/components/bs5/icons/mdx/_IconsSizes.mdx +112 -0
- package/src/components/bs5/icons/stories/storyFlexContainer.html +18 -0
- package/src/components/bs5/icons/stories/storyInlineWithText.html +18 -0
- package/src/components/bs5/icons/stories/storySizes.html +89 -0
- package/src/components/bs5/image/Image.mdx +1 -4
- package/src/components/bs5/inpageAlert/InpageAlert.mdx +1 -3
- package/src/components/bs5/inpagenav/Inpagenav.mdx +4 -5
- package/src/components/bs5/inpagenav/inpagenav.scss +7 -3
- package/src/components/bs5/link/link.mdx +1 -3
- package/src/components/bs5/link/link.scss +2 -15
- package/src/components/bs5/linkColumns/linkColumns.mdx +1 -3
- package/src/components/bs5/logo/Logo.mdx +1 -3
- package/src/components/bs5/navbar/navbar.data.json +91 -25
- package/src/components/bs5/navbar/navbar.functions.js +4 -0
- package/src/components/bs5/navbar/navbar.hbs +21 -14
- package/src/components/bs5/navbar/navbar.scss +219 -166
- package/src/components/bs5/navbar/navbar.stories.js +31 -2
- package/src/components/bs5/pageLayout/ThemeShowcase.stories.js +249 -0
- package/src/components/bs5/pageLayout/pageLayout.stories.js +3 -1
- package/src/components/bs5/pageLayout/templates/contentPageWithForm.hbs +1 -1
- package/src/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +140 -108
- package/src/components/bs5/pageLayout/templates/homePage.hbs +1 -1
- package/src/components/bs5/pagination/Pagination.mdx +4 -5
- package/src/components/bs5/pagination/pagination.data.json +19 -19
- package/src/components/bs5/pagination/pagination.scss +37 -63
- package/src/components/bs5/promotionalPanel/PromotionalPanel.mdx +1 -3
- package/src/components/bs5/promotionalPanel/promotionalPanel.scss +23 -22
- package/src/components/bs5/quickexit/quickexit.functions.js +24 -37
- package/src/components/bs5/quickexit/quickexit.hbs +1 -1
- package/src/components/bs5/quickexit/quickexit.scss +27 -10
- package/src/components/bs5/searchInput/SearchInput.mdx +5 -5
- package/src/components/bs5/sidenav/Sidenav.mdx +4 -5
- package/src/components/bs5/sidenav/sidenav.data.json +81 -80
- package/src/components/bs5/sidenav/sidenav.hbs +56 -37
- package/src/components/bs5/sidenav/sidenav.scss +236 -151
- package/src/components/bs5/skiplinks/SkipLinks.mdx +1 -3
- package/src/components/bs5/skiplinks/skipLinks.functions.js +0 -9
- package/src/components/bs5/skiplinks/skipLinks.test.js +0 -1
- package/src/components/bs5/table/Table.mdx +4 -5
- package/src/components/bs5/tabs/Tabs.mdx +4 -5
- package/src/components/bs5/tabs/tabs.scss +22 -1
- package/src/components/bs5/tag/Tag.mdx +4 -5
- package/src/components/bs5/typography/Typography.mdx +4 -5
- package/src/components/bs5/video/Video.mdx +4 -5
- package/src/components/common/layout/container.scss +5 -0
- package/src/components/common/layout/content.scss +16 -8
- package/src/css/functions/_index.scss +1 -0
- package/src/css/functions/in-list.scss +5 -0
- package/src/css/main.scss +4 -10
- package/src/css/mixins/_index.scss +3 -0
- package/src/css/mixins/make-icon.scss +87 -0
- package/src/css/qld-theme.scss +74 -31
- package/src/css/qld-type.scss +26 -140
- package/src/css/qld-utilities.scss +29 -14
- package/src/css/qld-variables.scss +4 -4
- package/src/css/utilities/_index.scss +1 -0
- package/src/css/utilities/sr-only.scss +5 -0
- package/src/css/variables/_index.scss +1 -0
- package/src/css/variables/type.scss +58 -0
- package/src/js/qld.bootstrap.js +1 -9
- package/src/stories/documentation/_storybookDocsTabs.jsx +63 -0
- package/src/stories/documentation/storybook-documentation.scss +51 -0
- package/src/components/bs5/icons/story-icon-sizing.html +0 -131
- package/src/components/bs5/icons/story-icon-usage.html +0 -89
- package/src/components/bs5/pagination/health-icon-sprite.svg +0 -156
|
@@ -1,184 +1,269 @@
|
|
|
1
1
|
.nav {
|
|
2
|
-
|
|
2
|
+
--#{$prefix}nav-link-color: var(--#{$prefix}brand-primary);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
@include color-mode(dark) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
.nav {
|
|
7
|
+
--#{$prefix}nav-link-color: #fff;
|
|
8
|
+
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
.qld-side-navigation {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
12
|
+
--sidenav-level-one-left-padding: 0;
|
|
13
|
+
--sidenav-level-two-padding: 2rem;
|
|
14
|
+
--sidenav-level-three-padding: 3.5rem;
|
|
15
|
+
--sidenav-navlink-padding: 1rem;
|
|
16
|
+
|
|
17
|
+
--sidenav-hover-bg: var(--#{$prefix}extra-light-grey);
|
|
18
|
+
--sidenav-hover-color: var(--#{$prefix}brand-primary);
|
|
19
|
+
--sidenav-hover-underline-color: var(
|
|
20
|
+
--#{$prefix}color-default-color-light-underline-hover
|
|
21
|
+
);
|
|
22
|
+
--sidenav-visited-color: var(--#{$prefix}color-default-color-light-link);
|
|
23
|
+
--sidenav-active-color: var(
|
|
24
|
+
--#{$prefix}color-default-color-light-text-heading
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
--sidenav-heading-border-color: #{$qld-brand-secondary};
|
|
28
|
+
--sidenav-item-border-color: #{$qld-soft-grey};
|
|
29
|
+
--sidenav-subitem-border-color: #{$qld-light-grey};
|
|
30
|
+
|
|
31
|
+
--sidenav-submenu-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='var(--#{$prefix}color-light-border)' d='M2 10h12v1H2zM2 5h1v5H2z'/%3E%3C/svg%3E");
|
|
32
|
+
|
|
33
|
+
--sidenav-active-item-color: var(--light-text-heading);
|
|
34
|
+
|
|
35
|
+
--#{$prefix}accordion-color: var(--#{$prefix}body-color);
|
|
36
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}body-bg);
|
|
37
|
+
--#{$prefix}accordion-border-color: var(
|
|
38
|
+
--#{$prefix}color-default-color-light-border-default
|
|
39
|
+
);
|
|
40
|
+
--#{$prefix}accordion-border-width: 1px;
|
|
41
|
+
--#{$prefix}accordion-border-radius: 0;
|
|
42
|
+
--#{$prefix}accordion-inner-border-radius: 0;
|
|
43
|
+
--#{$prefix}accordion-btn-padding-x: 1rem;
|
|
44
|
+
--#{$prefix}accordion-btn-padding-y: 1rem;
|
|
45
|
+
--#{$prefix}accordion-btn-color: var(--#{$prefix}link-color);
|
|
46
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}extra-light-grey);
|
|
47
|
+
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
|
|
48
|
+
--#{$prefix}accordion-btn-active-icon: #{escape-svg(
|
|
49
|
+
$accordion-button-active-icon
|
|
50
|
+
)};
|
|
51
|
+
--#{$prefix}accordion-btn-icon-width: 1.5rem;
|
|
52
|
+
--#{$prefix}accordion-btn-icon-transform: rotate(180deg);
|
|
53
|
+
--#{$prefix}accordion-btn-icon-transition: transform 0.25s ease-in;
|
|
54
|
+
--#{$prefix}accordion-btn-focus-box-shadow: none;
|
|
55
|
+
--#{$prefix}accordion-active-bg: var(--#{$prefix}accordion-btn-bg);
|
|
56
|
+
--#{$prefix}accordion-active-color: var(--#{$prefix}accordion-btn-color);
|
|
57
|
+
--#{$prefix}focus: var(--#{$prefix}light-focus);
|
|
58
|
+
|
|
59
|
+
.light & {
|
|
60
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}light-background);
|
|
61
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}light-background-shade);
|
|
62
|
+
--#{$prefix}accordion-border-color: var(
|
|
63
|
+
--#{$prefix}color-default-color-light-border-light
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.alt & {
|
|
68
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}light-grey-alt);
|
|
69
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}grey);
|
|
70
|
+
--#{$prefix}accordion-border-color: var(--#{$prefix}soft-grey);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Shared 'Dark' theme variables
|
|
74
|
+
.dark &,
|
|
75
|
+
.dark-alt & {
|
|
76
|
+
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon-dark)};
|
|
77
|
+
--#{$prefix}accordion-btn-active-icon: #{escape-svg(
|
|
78
|
+
$accordion-button-active-icon-dark
|
|
79
|
+
)};
|
|
80
|
+
--#{$prefix}accordion-color: var(--#{$prefix}white);
|
|
81
|
+
--#{$prefix}accordion-btn-color: var(--#{$prefix}white);
|
|
82
|
+
--#{$prefix}accordion-active-color: var(--#{$prefix}white);
|
|
83
|
+
--#{$prefix}focus: var(--#{$prefix}dark-focus);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Theme specific variables
|
|
87
|
+
.dark & {
|
|
88
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}brand-primary);
|
|
89
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-background-shade);
|
|
90
|
+
--#{$prefix}accordion-border-color: var(--#{$prefix}dark-border);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.dark-alt & {
|
|
94
|
+
--#{$prefix}accordion-bg: var(--#{$prefix}dark-blue);
|
|
95
|
+
--#{$prefix}accordion-btn-bg: var(--#{$prefix}dark-blue-shade);
|
|
96
|
+
--#{$prefix}accordion-border-color: var(--#{$prefix}dark-alt-border);
|
|
97
|
+
}
|
|
33
98
|
}
|
|
34
99
|
|
|
35
100
|
.dark,
|
|
36
101
|
.dark-alt {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
102
|
+
.qld-side-navigation {
|
|
103
|
+
--sidenav-submenu-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2309ACFE' d='M2 10h12v1H2zM2 5h1v5H2z'/%3E%3C/svg%3E");
|
|
104
|
+
|
|
105
|
+
--sidenav-hover-bg: var(
|
|
106
|
+
--#{$prefix}color-default-color-dark-background-default-shade
|
|
107
|
+
);
|
|
108
|
+
--sidenav-hover-color: var(--#{$prefix}white);
|
|
109
|
+
--sidenav-hover-underline-color: var(
|
|
110
|
+
--#{$prefix}color-default-color-dark-underline-hover
|
|
111
|
+
);
|
|
112
|
+
--sidenav-visited-color: var(--#{$prefix}white);
|
|
113
|
+
--sidenav-active-color: var(
|
|
114
|
+
--#{$prefix}color-default-color-dark-text-heading
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
--sidenav-heading-border-color: var(--#{$prefix}brand-secondary);
|
|
118
|
+
--sidenav-item-border-color: var(--#{$prefix}brand-primary-light);
|
|
119
|
+
--sidenav-subitem-border-color: var(--#{$prefix}brand-primary-light);
|
|
120
|
+
--sidenav-active-item-color: var(--#{$prefix}white);
|
|
121
|
+
}
|
|
51
122
|
}
|
|
52
123
|
|
|
53
|
-
@include color-mode(dark) {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
124
|
.qld-side-navigation {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
&:visited {
|
|
75
|
-
color: var(--#{$prefix}headings-color);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
125
|
+
border: var(--qld-accordion-border-width) solid
|
|
126
|
+
var(--qld-accordion-border-color);
|
|
127
|
+
background-color: var(--#{$prefix}accordion-bg);
|
|
128
|
+
|
|
129
|
+
.nav-title {
|
|
130
|
+
color: var(--#{$prefix}-headings-color);
|
|
131
|
+
line-height: 1.5;
|
|
132
|
+
margin: 0;
|
|
133
|
+
border-bottom: 2px solid var(--sidenav-heading-border-color);
|
|
134
|
+
|
|
135
|
+
a {
|
|
136
|
+
color: var(--#{$prefix}headings-color);
|
|
137
|
+
text-decoration: none;
|
|
138
|
+
font-weight: inherit;
|
|
139
|
+
font-size: 1rem;
|
|
78
140
|
}
|
|
79
141
|
|
|
80
142
|
.nav-link {
|
|
81
|
-
|
|
82
|
-
font-size: 0.875rem;
|
|
83
|
-
color: var(--body-color);
|
|
84
|
-
text-decoration: none;
|
|
85
|
-
transition-duration: 0s;
|
|
86
|
-
|
|
87
|
-
//.nav-link Hover state
|
|
88
|
-
&:hover {
|
|
89
|
-
background-color: var(--sidenav-hover-bg);
|
|
90
|
-
color: var(--sidenav-hover-color);
|
|
91
|
-
text-decoration: underline;
|
|
92
|
-
text-underline-offset: 0.25rem;
|
|
93
|
-
text-decoration-thickness: 2px;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
143
|
+
line-height: 1.5rem;
|
|
96
144
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
145
|
+
&:visited {
|
|
146
|
+
color: var(--#{$prefix}headings-color);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.nav-link {
|
|
152
|
+
padding: var(--sidenav-navlink-padding);
|
|
153
|
+
font-size: 0.875rem;
|
|
154
|
+
color: var(--body-color);
|
|
155
|
+
text-decoration: none;
|
|
156
|
+
transition-duration: 0s;
|
|
157
|
+
line-height: 1.25rem;
|
|
158
|
+
|
|
159
|
+
//.nav-link Hover state
|
|
160
|
+
&:hover {
|
|
161
|
+
background-color: var(--sidenav-hover-bg);
|
|
162
|
+
color: var(--sidenav-hover-color);
|
|
163
|
+
text-decoration: underline;
|
|
164
|
+
text-underline-offset: 0.25rem;
|
|
165
|
+
text-decoration-thickness: 2px;
|
|
105
166
|
}
|
|
106
167
|
|
|
107
|
-
|
|
108
|
-
|
|
168
|
+
&:focus-visible {
|
|
169
|
+
box-shadow: none;
|
|
109
170
|
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
a.nav-link {
|
|
174
|
+
&:visited {
|
|
175
|
+
color: var(--sidenav-visited-color);
|
|
176
|
+
&:hover {
|
|
177
|
+
color: var(--sidenav-hover-color);
|
|
178
|
+
text-decoration-color: var(--sidenav-hover-underline-color);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
110
182
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
//Side navigation all items remove all bullets
|
|
116
|
-
//Reset all left padding
|
|
117
|
-
ul, ol {
|
|
118
|
-
list-style: none;
|
|
119
|
-
padding-left: 0;
|
|
120
|
-
}
|
|
183
|
+
.nav-item.active {
|
|
184
|
+
color: var(--sidenav-active-color);
|
|
185
|
+
}
|
|
121
186
|
|
|
122
|
-
|
|
123
|
-
flex-direction: column;
|
|
187
|
+
//Side navigation (ul.nav)
|
|
124
188
|
|
|
125
|
-
|
|
126
|
-
|
|
189
|
+
ul.nav {
|
|
190
|
+
//Side navigation all items remove all bullets
|
|
191
|
+
//Reset all left padding
|
|
192
|
+
ul,
|
|
193
|
+
ol {
|
|
194
|
+
list-style: none;
|
|
195
|
+
padding-left: 0;
|
|
196
|
+
}
|
|
127
197
|
|
|
128
|
-
|
|
198
|
+
display: flex;
|
|
199
|
+
flex-direction: column;
|
|
129
200
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
201
|
+
//Specifically target the first level LI's only
|
|
202
|
+
> li.nav-item {
|
|
203
|
+
border-top: 1px solid var(--sidenav-item-border-color);
|
|
133
204
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
//Level two menu LI's
|
|
140
|
-
> ul > li { border-top: 1px solid var(--sidenav-subitem-border-color) }
|
|
141
|
-
> ul > li > .nav-link { padding-left: var( --sidenav-level-two-padding); }
|
|
142
|
-
|
|
143
|
-
//Level three menu LI's
|
|
144
|
-
> ul > li > ul > li { border-top: none }
|
|
145
|
-
> ul > li > ul > li > .nav-link { padding-left: var( --sidenav-level-three-padding); }
|
|
146
|
-
|
|
147
|
-
//li .nav-link.active
|
|
148
|
-
&.active {
|
|
149
|
-
.nav-link {
|
|
150
|
-
font-weight: 600;
|
|
151
|
-
color: var(--light-text-heading);
|
|
152
|
-
text-decoration: none;
|
|
153
|
-
pointer-events: none;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
205
|
+
&:first-child {
|
|
206
|
+
border-top: none;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
156
209
|
|
|
210
|
+
//All nav items, all levels
|
|
211
|
+
li.nav-item {
|
|
212
|
+
//Level two menu LI's
|
|
213
|
+
> ul > li {
|
|
214
|
+
border-top: 1px solid var(--sidenav-subitem-border-color);
|
|
215
|
+
}
|
|
216
|
+
> ul > li > .nav-link {
|
|
217
|
+
padding-left: var(--sidenav-level-two-padding);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
//Level three menu LI's
|
|
221
|
+
> ul > li > ul > li {
|
|
222
|
+
border-top: none;
|
|
223
|
+
}
|
|
224
|
+
> ul > li > ul > li > .nav-link {
|
|
225
|
+
padding-left: var(--sidenav-level-three-padding);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
//li .nav-link.active
|
|
229
|
+
&.active {
|
|
230
|
+
.nav-link {
|
|
231
|
+
font-weight: 600;
|
|
232
|
+
color: var(--light-text-heading);
|
|
233
|
+
text-decoration: none;
|
|
234
|
+
pointer-events: none;
|
|
157
235
|
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
158
238
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
bottom: 0;
|
|
176
|
-
width: 1rem;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
239
|
+
//Add stalks to a UL menu (usually level 3)
|
|
240
|
+
// <ul class="nav ... with-stalks">...</ul>
|
|
241
|
+
.with-stalks {
|
|
242
|
+
.nav-item {
|
|
243
|
+
position: relative;
|
|
244
|
+
|
|
245
|
+
&:before {
|
|
246
|
+
content: "";
|
|
247
|
+
position: absolute;
|
|
248
|
+
background: escape-svg(var(--sidenav-submenu-divider));
|
|
249
|
+
background-repeat: no-repeat;
|
|
250
|
+
// background-position: center center;
|
|
251
|
+
top: 1rem;
|
|
252
|
+
left: 2rem;
|
|
253
|
+
bottom: 0;
|
|
254
|
+
width: 1rem;
|
|
179
255
|
}
|
|
180
|
-
|
|
256
|
+
}
|
|
181
257
|
}
|
|
182
|
-
|
|
258
|
+
}
|
|
259
|
+
.nav-wrapper {
|
|
260
|
+
padding: 0.5rem 1rem;
|
|
261
|
+
}
|
|
262
|
+
@include media-breakpoint-up(lg) {
|
|
263
|
+
border: none;
|
|
264
|
+
|
|
265
|
+
.nav-wrapper {
|
|
266
|
+
padding: 0;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
183
269
|
}
|
|
184
|
-
|
|
@@ -23,9 +23,7 @@ Each skip link's `href` attribute must reference an `id` of an element on the pa
|
|
|
23
23
|
<main id="content" tabindex="-1">Main content</main>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
<Canvas
|
|
27
|
-
<Story of={Stories.Default} />
|
|
28
|
-
</Canvas>
|
|
26
|
+
<Canvas of={Stories.Default} />
|
|
29
27
|
|
|
30
28
|
## See also
|
|
31
29
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { isFocusable } from "../../../js/utils";
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Checks whether target elements in a list of skip links are valid - ie they can receive focus.
|
|
5
3
|
* @returns {boolean} Return true if skip links are valid, false if there is a problem.
|
|
@@ -17,13 +15,6 @@ export function validateSkipLinks() {
|
|
|
17
15
|
);
|
|
18
16
|
return false;
|
|
19
17
|
}
|
|
20
|
-
// check if target is focusable
|
|
21
|
-
if (!isFocusable(target)) {
|
|
22
|
-
console.error(
|
|
23
|
-
`A skip link with label "${item.textContent}" is targeting a non-focusable element with id "${targetId}". Make sure the element is natively focusable, or assign a tab index of -1.`,
|
|
24
|
-
);
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
18
|
return true;
|
|
28
19
|
});
|
|
29
20
|
}
|
|
@@ -72,7 +72,6 @@ describe("Skip Links", () => {
|
|
|
72
72
|
|
|
73
73
|
expect(resolvedMessages).toEqual([
|
|
74
74
|
'A skip link with label "Skip to nowhere" is targeting a non-existent element with id "i-dont-exist".',
|
|
75
|
-
'A skip link with label "Skip to unfocusable" is targeting a non-focusable element with id "unfocusable". Make sure the element is natively focusable, or assign a tab index of -1.',
|
|
76
75
|
]);
|
|
77
76
|
|
|
78
77
|
// JSDOM does not implement navigation so must manual test for main functionality
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from "@storybook/blocks"
|
|
2
|
-
import * as TableStories from "./table.stories"
|
|
1
|
+
import { Canvas, Meta, Story } from "@storybook/blocks";
|
|
2
|
+
import * as TableStories from "./table.stories";
|
|
3
3
|
|
|
4
4
|
<Meta of={TableStories} />
|
|
5
5
|
|
|
6
6
|
# Table
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</Canvas>
|
|
7
|
+
|
|
8
|
+
<Canvas of={TableStories.Default} />
|
|
10
9
|
|
|
11
10
|
## Design resources
|
|
12
11
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from "@storybook/blocks"
|
|
2
|
-
import * as TabsStories from "./tabs.stories"
|
|
1
|
+
import { Canvas, Meta, Story } from "@storybook/blocks";
|
|
2
|
+
import * as TabsStories from "./tabs.stories";
|
|
3
3
|
|
|
4
4
|
<Meta of={TabsStories} />
|
|
5
5
|
|
|
6
6
|
# Tabs
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</Canvas>
|
|
7
|
+
|
|
8
|
+
<Canvas of={TabsStories.SectionTabsDefaultDark} />
|
|
10
9
|
|
|
11
10
|
## Design resources
|
|
12
11
|
|
|
@@ -111,12 +111,17 @@
|
|
|
111
111
|
}
|
|
112
112
|
.tabs-area {
|
|
113
113
|
--qld-gutter-x: 0;
|
|
114
|
+
padding-inline: 0;
|
|
114
115
|
.nav-tabs {
|
|
115
116
|
margin-block-end: -1px;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
.tab-content {
|
|
119
120
|
padding: 1.25rem;
|
|
121
|
+
|
|
122
|
+
.tab-pane p:last-of-type {
|
|
123
|
+
margin-block-end: 0;
|
|
124
|
+
}
|
|
120
125
|
}
|
|
121
126
|
}
|
|
122
127
|
&.section-tabs {
|
|
@@ -135,6 +140,7 @@
|
|
|
135
140
|
@include media-breakpoint-down(sm) {
|
|
136
141
|
padding-inline: 1rem;
|
|
137
142
|
}
|
|
143
|
+
margin-inline: auto;
|
|
138
144
|
border-block-end: 1px solid;
|
|
139
145
|
.nav-tabs {
|
|
140
146
|
max-width: fit-content;
|
|
@@ -154,10 +160,25 @@
|
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
.tab-content {
|
|
163
|
+
padding-inline: 4rem;
|
|
164
|
+
|
|
165
|
+
@include media-breakpoint-down(xl) {
|
|
166
|
+
padding-inline: 3rem;
|
|
167
|
+
}
|
|
168
|
+
@include media-breakpoint-down(lg) {
|
|
169
|
+
padding-inline: 2rem;
|
|
170
|
+
}
|
|
171
|
+
@include media-breakpoint-down(sm) {
|
|
172
|
+
padding-inline: 1rem;
|
|
173
|
+
}
|
|
174
|
+
margin-inline: auto;
|
|
157
175
|
background-color: var(--qld-body-bg);
|
|
158
176
|
border: 0;
|
|
159
177
|
border-block-start: 0;
|
|
160
178
|
margin-block-start: -1px;
|
|
179
|
+
.tab-pane p:last-of-type {
|
|
180
|
+
margin-block-end: 0;
|
|
181
|
+
}
|
|
161
182
|
> article {
|
|
162
183
|
max-width: var(--max-width);
|
|
163
184
|
margin-inline: auto;
|
|
@@ -396,7 +417,7 @@
|
|
|
396
417
|
display: flex;
|
|
397
418
|
gap: 0.5rem;
|
|
398
419
|
white-space: nowrap;
|
|
399
|
-
color: var(--qld-link-color);
|
|
420
|
+
color: var(--qld-nav-link-color);
|
|
400
421
|
align-items: anchor-center;
|
|
401
422
|
i {
|
|
402
423
|
font-size: 1.125rem;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from "@storybook/blocks"
|
|
2
|
-
import * as TagStories from "./tag.stories"
|
|
1
|
+
import { Canvas, Meta, Story } from "@storybook/blocks";
|
|
2
|
+
import * as TagStories from "./tag.stories";
|
|
3
3
|
|
|
4
4
|
<Meta of={TagStories} />
|
|
5
5
|
|
|
6
6
|
# Tag
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</Canvas>
|
|
7
|
+
|
|
8
|
+
<Canvas of={TagStories.Default} />
|
|
10
9
|
|
|
11
10
|
## Design resources
|
|
12
11
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from "@storybook/blocks"
|
|
2
|
-
import * as TypographyStories from "./typography.stories"
|
|
1
|
+
import { Canvas, Meta, Story } from "@storybook/blocks";
|
|
2
|
+
import * as TypographyStories from "./typography.stories";
|
|
3
3
|
|
|
4
4
|
<Meta of={TypographyStories} />
|
|
5
5
|
|
|
6
6
|
# Typography
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</Canvas>
|
|
7
|
+
|
|
8
|
+
<Canvas of={TypographyStories.Default} />
|
|
10
9
|
|
|
11
10
|
## Design resources
|
|
12
11
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Canvas, Meta, Story } from "@storybook/blocks"
|
|
2
|
-
import * as VideoStories from "./video.stories"
|
|
1
|
+
import { Canvas, Meta, Story } from "@storybook/blocks";
|
|
2
|
+
import * as VideoStories from "./video.stories";
|
|
3
3
|
|
|
4
4
|
<Meta of={VideoStories} />
|
|
5
5
|
|
|
6
6
|
# Video
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</Canvas>
|
|
7
|
+
|
|
8
|
+
<Canvas of={VideoStories.Default} />
|
|
10
9
|
|
|
11
10
|
## Design resources
|
|
12
11
|
|
|
@@ -19,4 +19,9 @@
|
|
|
19
19
|
max-width: var(--qld-container-max-width);
|
|
20
20
|
padding-left: var(--qld-container-padding-x);
|
|
21
21
|
padding-right: var(--qld-container-padding-x);
|
|
22
|
+
|
|
23
|
+
&.is-extended {
|
|
24
|
+
// Maximum width for extended containers, 100rem (or 1600px)
|
|
25
|
+
--qld-container-max-width: 100rem;
|
|
26
|
+
}
|
|
22
27
|
}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
.content-emphasis {
|
|
2
|
+
// Negative margin on the emphasis section. Capped to outer container padding,
|
|
3
|
+
// to prevent overflow and horizontal scrollbar
|
|
4
|
+
--margin-offset: max(-2rem, calc(var(--qld-container-padding-x) * -1));
|
|
5
|
+
|
|
6
|
+
margin-left: var(--margin-offset);
|
|
7
|
+
margin-right: var(--margin-offset);
|
|
8
|
+
|
|
9
|
+
padding: 2.5rem var(--qld-container-padding-x);
|
|
10
|
+
|
|
11
|
+
@include media-breakpoint-up(lg) {
|
|
4
12
|
padding: 4rem 2rem;
|
|
5
13
|
overflow: visible;
|
|
14
|
+
}
|
|
6
15
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
16
|
+
& p:last-child,
|
|
17
|
+
& ul:last-child,
|
|
18
|
+
& ol:last-child {
|
|
19
|
+
margin-bottom: 0;
|
|
12
20
|
}
|
|
13
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward "in-list";
|