@qld-gov-au/qgds-bootstrap5 1.0.2 → 1.0.8
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 +2 -1
- package/dist/assets/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +2 -2
- package/dist/assets/js/handlebars.helpers.bundle.js +1 -22
- package/dist/assets/js/handlebars.helpers.bundle.js.map +4 -4
- package/dist/assets/js/handlebars.helpers.js +15 -1
- package/dist/assets/js/qld.bootstrap.min.js +16 -1
- package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
- package/dist/components/bs5/dateinput/dateinput.hbs +12 -12
- package/dist/components/bs5/header/header.hbs +131 -33
- package/dist/components/bs5/navbar/navbar.hbs +65 -3
- package/dist/components/bs5/select/select.hbs +3 -3
- package/dist/components/bs5/tag/tag.hbs +2 -2
- package/dist/components/bs5/textarea/textarea.hbs +8 -8
- package/dist/components/bs5/textbox/textbox.hbs +7 -6
- package/dist/components/handlebars.helpers.js +15 -1
- package/dist/components/{handlebars.helpers.bundle.js → handlebars.init.bundle.js} +8 -8
- package/dist/components/{handlebars.helpers.bundle.js.map → handlebars.init.bundle.js.map} +3 -3
- package/dist/sample-data/dateinput/dateinput.data.json +1 -0
- package/dist/sample-data/header/header.data.json +245 -31
- package/dist/sample-data/select/select.data.json +1 -0
- package/dist/sample-data/textarea/textarea.data.json +1 -0
- package/dist/sample-data/textbox/textbox.data.json +1 -0
- package/esbuild.js +2 -2
- package/package.json +24 -20
- package/src/components/bs5/dateinput/Dateinput.stories.js +2 -32
- package/src/components/bs5/dateinput/dateinput.data.json +1 -0
- package/src/components/bs5/dateinput/dateinput.hbs +12 -12
- package/src/components/bs5/header/_colours.scss +31 -15
- package/src/components/bs5/header/_icons.scss +1 -1
- package/src/components/bs5/header/_search.json +45 -0
- package/src/components/bs5/header/header.data.json +245 -31
- package/src/components/bs5/header/header.functions.js +143 -8
- package/src/components/bs5/header/header.hbs +131 -33
- package/src/components/bs5/header/header.scss +178 -35
- package/src/components/bs5/navbar/_colours.scss +19 -19
- package/src/components/bs5/navbar/navbar.functions.js +59 -52
- package/src/components/bs5/navbar/navbar.hbs +65 -3
- package/src/components/bs5/navbar/navbar.scss +73 -27
- package/src/components/bs5/select/Select.stories.js +4 -4
- package/src/components/bs5/select/select.data.json +1 -0
- package/src/components/bs5/select/select.hbs +3 -3
- package/src/components/bs5/tag/tag.hbs +2 -2
- package/src/components/bs5/textarea/Textarea.stories.js +2 -32
- package/src/components/bs5/textarea/textarea.data.json +1 -0
- package/src/components/bs5/textarea/textarea.hbs +8 -8
- package/src/components/bs5/textbox/Textbox.stories.js +2 -15
- package/src/components/bs5/textbox/textInput.scss +10 -2
- package/src/components/bs5/textbox/textbox.data.json +1 -0
- package/src/components/bs5/textbox/textbox.hbs +7 -6
- package/src/js/handlebars.helpers.js +15 -1
- package/src/main.js +26 -2
- package/src/stories/templates/ContentPage/ContentPage.mdx +0 -40
- package/src/stories/templates/ContentPage/ContentPage.stories.js +0 -36
- package/src/stories/templates/LandingPage/LandingPage.mdx +0 -20
- package/src/stories/templates/LandingPage/LandingPage.stories.js +0 -25
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createPopper } from '@popperjs/core';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* Initializes a Popper.js instance for dropdown elements.
|
|
4
5
|
*
|
|
@@ -18,7 +19,7 @@ export function initializeDropdownPopper(referenceElement, popperElement) {
|
|
|
18
19
|
}, {
|
|
19
20
|
name: 'preventOverflow',
|
|
20
21
|
options: {
|
|
21
|
-
|
|
22
|
+
boundary: 'viewport',
|
|
22
23
|
},
|
|
23
24
|
}],
|
|
24
25
|
});
|
|
@@ -37,68 +38,74 @@ let activePoppers = [];
|
|
|
37
38
|
export function initializeNavbar() {
|
|
38
39
|
const dropdownToggles = document.querySelectorAll('.navbar .dropdown-toggle');
|
|
39
40
|
const navbarCollapse = document.getElementById('navbarSupportedContent');
|
|
41
|
+
const dropdownItems = document.querySelectorAll('ul.dropdown-menu');
|
|
40
42
|
const overlay = document.getElementById('overlay');
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
// If open, close it
|
|
48
|
-
navbarCollapse.classList.remove('show');
|
|
49
|
-
overlay.classList.remove('show');
|
|
50
|
-
}
|
|
44
|
+
// Add event listeners to each dropdown item
|
|
45
|
+
dropdownItems.forEach(item => {
|
|
46
|
+
item.addEventListener('click', function(event) {
|
|
47
|
+
// Stop the event from propagating - Bootstrap default click closes
|
|
48
|
+
event.stopPropagation();
|
|
51
49
|
});
|
|
52
|
-
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Overlay on mobile open
|
|
53
|
+
overlay.addEventListener('click', function () {
|
|
54
|
+
// Check if the navbar is open
|
|
55
|
+
if (navbarCollapse.classList.contains('show')) {
|
|
56
|
+
// If open, close it
|
|
57
|
+
navbarCollapse.classList.remove('show');
|
|
58
|
+
overlay.classList.remove('show');
|
|
59
|
+
}
|
|
60
|
+
});
|
|
53
61
|
|
|
54
62
|
// Overlay show/hide events
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
overlay.classList.add('show'); // Show the overlay
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
navbarCollapse.addEventListener('hide.bs.collapse', function () {
|
|
62
|
-
overlay.classList.remove('show'); // Hide the overlay
|
|
63
|
-
});
|
|
63
|
+
navbarCollapse.addEventListener('show.bs.collapse', function () {
|
|
64
|
+
overlay.classList.add('show'); // Show the overlay
|
|
65
|
+
});
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
navbarCollapse.addEventListener('hide.bs.collapse', function () {
|
|
68
|
+
overlay.classList.remove('show'); // Hide the overlay
|
|
69
|
+
});
|
|
66
70
|
|
|
67
71
|
// Initialize Popper and toggle handling
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
} else {
|
|
84
|
-
// If the Popper instance exists, update its position
|
|
85
|
-
activePoppers.forEach(popperInstance => {
|
|
86
|
-
popperInstance.update();
|
|
87
|
-
});
|
|
88
|
-
}
|
|
72
|
+
dropdownToggles.forEach(toggle => {
|
|
73
|
+
toggle.addEventListener('click', (event) => {
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
const parentUl = toggle.closest('ul.navbar-nav');
|
|
76
|
+
const firstLi = parentUl.querySelector('.nav-item-home');
|
|
77
|
+
const dropdownMenu = toggle.parentNode.querySelector('.dropdown-menu');
|
|
78
|
+
|
|
79
|
+
// Check if a Popper instance should be activated or not
|
|
80
|
+
const resizeHandler = () => {
|
|
81
|
+
if (window.innerWidth > 992) {
|
|
82
|
+
if (!dropdownMenu.dataset.popperActive) {
|
|
83
|
+
let popperInstance = initializeDropdownPopper(firstLi, dropdownMenu);
|
|
84
|
+
console.log(popperInstance);
|
|
85
|
+
dropdownMenu.dataset.popperActive = 'true';
|
|
86
|
+
activePoppers.push(popperInstance);
|
|
89
87
|
} else {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
// If the Popper instance exists, update its position
|
|
89
|
+
activePoppers.forEach(popperInstance => {
|
|
90
|
+
popperInstance.update();
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
const dropdownMenu = toggle.closest('.nav-item').querySelector('.dropdown-menu');
|
|
95
|
+
if (dropdownMenu.dataset.popperActive) {
|
|
96
|
+
activePoppers.forEach(popperInstance => popperInstance.destroy());
|
|
97
|
+
activePoppers = []; // Clear out the array after destroying instances
|
|
98
|
+
delete dropdownMenu.dataset.popperActive;
|
|
95
99
|
}
|
|
96
100
|
}
|
|
101
|
+
}
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
});
|
|
103
|
+
// Attach resize listener to update Popper on resize
|
|
104
|
+
window.addEventListener('resize', resizeHandler);
|
|
105
|
+
resizeHandler(); // Call handler immediately to apply correct setting on init
|
|
102
106
|
});
|
|
103
|
-
}
|
|
107
|
+
});
|
|
104
108
|
}
|
|
109
|
+
|
|
110
|
+
// Initialize the navbar (see main.js)
|
|
111
|
+
// document.addEventListener('DOMContentLoaded', initializeNavbar);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- QGDS Partial: Primary navigation -->
|
|
2
2
|
|
|
3
3
|
<!-- Primary Navigation / Desktop -->
|
|
4
|
-
<nav class="navbar navbar-expand-lg" aria-label="Website navigation" role="navigation">
|
|
4
|
+
<nav id="main-nav" class="navbar navbar-expand-lg" aria-label="Website navigation" role="navigation">
|
|
5
5
|
<div class="container navbar-contain">
|
|
6
6
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
7
7
|
<div class="navbar__header">
|
|
@@ -31,14 +31,15 @@
|
|
|
31
31
|
{{#each navigation}}
|
|
32
32
|
{{#if dropdown_enabled}}
|
|
33
33
|
<li class="nav-item dropdown">
|
|
34
|
-
|
|
34
|
+
<!-- Desktop primary dropdown style and behaviour -->
|
|
35
|
+
<a class="nav-link dropdown-toggle desktop-only" href="{{target_url}}" id="menuDropdown" role="button"
|
|
35
36
|
aria-controls="" data-bs-toggle="dropdown" aria-expanded="false" aria-selected="false"
|
|
36
37
|
aria-label="Toggle navigation">
|
|
37
38
|
{{title}}
|
|
38
39
|
<svg class="toggle_icon">
|
|
39
40
|
<use href="{{@root.metadata.options.icon-root}}#qld__icon__chevron-down"></use>
|
|
40
41
|
</svg>
|
|
41
|
-
|
|
42
|
+
</a>
|
|
42
43
|
{{#if navigation_items}}
|
|
43
44
|
<ul id="dropdown-menu" class="dropdown-menu" aria-labelledby="menuDropdown" role="menu" data-bs-popper="none">
|
|
44
45
|
<div class="row dropdown-menu__inner">
|
|
@@ -85,6 +86,67 @@
|
|
|
85
86
|
</div>
|
|
86
87
|
</ul>
|
|
87
88
|
{{/if}}
|
|
89
|
+
<!-- Mobile only -->
|
|
90
|
+
<div class="nav-item-group mobile-only">
|
|
91
|
+
<!-- Primary dropdown style and behaviour -->
|
|
92
|
+
<a class="nav-link first-element" href="{{target_url}}">
|
|
93
|
+
{{title}}
|
|
94
|
+
</a>
|
|
95
|
+
<a class="nav-link dropdown-toggle second-element" id="menuDropdown" role="button"
|
|
96
|
+
aria-controls="" data-bs-toggle="dropdown" aria-expanded="false" aria-selected="false"
|
|
97
|
+
aria-label="Toggle navigation">
|
|
98
|
+
<svg class="toggle_icon">
|
|
99
|
+
<use href="{{@root.metadata.options.icon-root}}#qld__icon__chevron-down"></use>
|
|
100
|
+
</svg>
|
|
101
|
+
<span class="visually-hidden">Expand</span>
|
|
102
|
+
</a>
|
|
103
|
+
{{#if navigation_items}}
|
|
104
|
+
<ul id="dropdown-menu" class="dropdown-menu" aria-labelledby="menuDropdown" role="menu" data-bs-popper="none">
|
|
105
|
+
<div class="row dropdown-menu__inner">
|
|
106
|
+
{{#if dropdown_options}}
|
|
107
|
+
<div class="col-12">
|
|
108
|
+
<a class="dropdown-menu__featured" href="{{dropdown_options.feature_link_href}}">
|
|
109
|
+
<span class="">{{dropdown_options.feature_link_value}}</span>
|
|
110
|
+
<svg class="chevron__icon">
|
|
111
|
+
<use href="{{@root.metadata.options.icon-root}}#qld__icon__arrow-right"></use>
|
|
112
|
+
</svg>
|
|
113
|
+
</a>
|
|
114
|
+
{{#if dropdown_options.feature_link_description}}
|
|
115
|
+
<p class="dropdown-menu__description">{{dropdown_options.feature_link_description}}</p>
|
|
116
|
+
{{/if}}
|
|
117
|
+
<hr>
|
|
118
|
+
</div>
|
|
119
|
+
{{/if}}
|
|
120
|
+
{{#each navigation_items}}
|
|
121
|
+
<li class="col-lg-4 col-sm-12">
|
|
122
|
+
<a href="{{target_url}}" class="dropdown-item">
|
|
123
|
+
{{title}}
|
|
124
|
+
<svg class="chevron__icon">
|
|
125
|
+
<use href="{{@root.metadata.options.icon-root}}#qld__icon__arrow-right"></use>
|
|
126
|
+
</svg>
|
|
127
|
+
</a>
|
|
128
|
+
{{#if description}}
|
|
129
|
+
<p class="dropdown-item__description">{{description}}</p>
|
|
130
|
+
{{/if}}
|
|
131
|
+
</li>
|
|
132
|
+
{{/each }}
|
|
133
|
+
{{#if dropdown_options.view_value}}
|
|
134
|
+
<li class="col-12 text-end">
|
|
135
|
+
<hr>
|
|
136
|
+
<a class="dropdown-menu__view_all" href="{{dropdown_options.view_href}}">
|
|
137
|
+
<span>
|
|
138
|
+
{{dropdown_options.view_value}}
|
|
139
|
+
<svg class="chevron__icon">
|
|
140
|
+
<use href="{{@root.metadata.options.icon-root}}#qld__icon__arrow-right"></use>
|
|
141
|
+
</svg>
|
|
142
|
+
</span>
|
|
143
|
+
</a>
|
|
144
|
+
</li>
|
|
145
|
+
{{/if}}
|
|
146
|
+
</div>
|
|
147
|
+
</ul>
|
|
148
|
+
{{/if}}
|
|
149
|
+
</div>
|
|
88
150
|
</li>
|
|
89
151
|
{{else}}
|
|
90
152
|
<li class="nav-item">
|
|
@@ -13,6 +13,41 @@
|
|
|
13
13
|
border-bottom: var(--#{$prefix}navbar-border-width) solid var(--#{$prefix}navbar-border-accent);
|
|
14
14
|
align-items: center;
|
|
15
15
|
|
|
16
|
+
// Helpers for responsive sizes
|
|
17
|
+
@include media-breakpoint-up(lg) {
|
|
18
|
+
.desktop-only {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
.nav-item-group {
|
|
22
|
+
display: block;
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
@include media-breakpoint-down(lg) {
|
|
27
|
+
.desktop-only {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
.nav-item-group {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
width: 100%;
|
|
34
|
+
a.first-element {
|
|
35
|
+
flex: 1 1;
|
|
36
|
+
}
|
|
37
|
+
a.second-element {
|
|
38
|
+
flex: 1 1 auto;
|
|
39
|
+
}
|
|
40
|
+
ul.dropdown-menu {
|
|
41
|
+
flex: 1 1 100%;
|
|
42
|
+
}
|
|
43
|
+
.dropdown-toggle {
|
|
44
|
+
max-width: 3.5rem;
|
|
45
|
+
border-left: solid 1px var(--#{$prefix}navbar-border-color);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
16
51
|
&-collapse {
|
|
17
52
|
@include media-breakpoint-down(md) {
|
|
18
53
|
width: 320px;
|
|
@@ -30,7 +65,7 @@
|
|
|
30
65
|
bottom: 0;
|
|
31
66
|
overflow: auto;
|
|
32
67
|
background-color: var(--#{$prefix}navbar-bg-color);
|
|
33
|
-
|
|
68
|
+
|
|
34
69
|
/* Initially positioned off-screen to the right */
|
|
35
70
|
transition: transform .25s ease-in-out;
|
|
36
71
|
transform: translateX(100%);
|
|
@@ -49,7 +84,7 @@
|
|
|
49
84
|
|
|
50
85
|
&__header {
|
|
51
86
|
display: flex;
|
|
52
|
-
background-color: var(--#{$prefix}navbar-bg-color);
|
|
87
|
+
background-color: var(--#{$prefix}navbar-mobile-header-bg-color);
|
|
53
88
|
color: var(--#{$prefix}navbar-text-color);
|
|
54
89
|
align-items: center;
|
|
55
90
|
box-shadow: 0px 1px 2px rgba(0, 0, 0, .2), 0px 1px 3px 1px rgba(0, 0, 0, .1);
|
|
@@ -78,6 +113,10 @@
|
|
|
78
113
|
@include media-breakpoint-up(lg) {
|
|
79
114
|
display: none;
|
|
80
115
|
}
|
|
116
|
+
|
|
117
|
+
@include media-breakpoint-down(lg) {
|
|
118
|
+
color: var(--#{$prefix}navbar-mobile-text-color);
|
|
119
|
+
}
|
|
81
120
|
}
|
|
82
121
|
|
|
83
122
|
// Menu open and close toggles
|
|
@@ -93,20 +132,27 @@
|
|
|
93
132
|
background-color: transparent;
|
|
94
133
|
cursor: pointer;
|
|
95
134
|
align-items: center;
|
|
96
|
-
|
|
97
|
-
border-left: solid 1px var(--#{$prefix}navbar-border-color);
|
|
98
|
-
|
|
135
|
+
|
|
99
136
|
@include media-breakpoint-up(lg) {
|
|
137
|
+
color: var(--#{$prefix}navbar-text-color);
|
|
138
|
+
border-left: solid 1px var(--#{$prefix}navbar-border-color);
|
|
100
139
|
&:focus {
|
|
101
140
|
outline: 2px solid var(--#{$prefix}navbar-text-focus-color);
|
|
102
141
|
outline-offset: 2px;
|
|
103
142
|
}
|
|
104
143
|
}
|
|
105
144
|
|
|
145
|
+
@include media-breakpoint-down(lg) {
|
|
146
|
+
color: var(--#{$prefix}navbar-mobile-text-color);
|
|
147
|
+
border-left: solid 1px var(--#{$prefix}navbar-mobile-border-color);
|
|
148
|
+
}
|
|
149
|
+
|
|
106
150
|
&:hover {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
151
|
+
@include media-breakpoint-down(lg) {
|
|
152
|
+
background-color: var(--#{$prefix}navbar-mobile-menuitem-hover);
|
|
153
|
+
}
|
|
154
|
+
@include media-breakpoint-up(lg) {
|
|
155
|
+
background-color: var(--#{$prefix}navbar-menuitem-hover);
|
|
110
156
|
}
|
|
111
157
|
}
|
|
112
158
|
|
|
@@ -138,7 +184,14 @@
|
|
|
138
184
|
height: 1rem;
|
|
139
185
|
width: 1rem;
|
|
140
186
|
margin: 1px auto;
|
|
141
|
-
|
|
187
|
+
|
|
188
|
+
@include media-breakpoint-up(lg) {
|
|
189
|
+
color: var(--#{$prefix}navbar-svg-color);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@include media-breakpoint-down(lg) {
|
|
193
|
+
color: var(--#{$prefix}navbar-mobile-svg-color);
|
|
194
|
+
}
|
|
142
195
|
|
|
143
196
|
@include media-breakpoint-up(md) {
|
|
144
197
|
height: 1.25rem;
|
|
@@ -194,7 +247,7 @@
|
|
|
194
247
|
}
|
|
195
248
|
}
|
|
196
249
|
|
|
197
|
-
|
|
250
|
+
&-nav {
|
|
198
251
|
$navbar-padding-x: 0;
|
|
199
252
|
$navbar-padding-y: 0;
|
|
200
253
|
--#{$prefix}navbar-padding-x: #{if($navbar-padding-x == null, 0, $navbar-padding-x)};
|
|
@@ -211,13 +264,12 @@
|
|
|
211
264
|
|
|
212
265
|
.dropdown {
|
|
213
266
|
&-menu {
|
|
214
|
-
|
|
267
|
+
background-color: var(--#{$prefix}navbar-dropdown-bg-color);
|
|
268
|
+
|
|
215
269
|
// Override the default bs-popper margin
|
|
216
270
|
&[data-bs-popper] {
|
|
217
271
|
margin-top: 0;
|
|
218
272
|
}
|
|
219
|
-
|
|
220
|
-
background-color: var(--#{$prefix}navbar-dropdown-bg-color);
|
|
221
273
|
|
|
222
274
|
@include media-breakpoint-up(lg) {
|
|
223
275
|
left: 0;
|
|
@@ -238,7 +290,6 @@
|
|
|
238
290
|
-webkit-box-shadow: none;
|
|
239
291
|
padding: 0;
|
|
240
292
|
&.show {
|
|
241
|
-
border-right: solid 2px var(--#{$prefix}navbar-border-color);
|
|
242
293
|
border-left: solid 0.25rem var(--#{$prefix}navbar-dropdown-bg-color);
|
|
243
294
|
margin-left: -0.25rem;
|
|
244
295
|
}
|
|
@@ -251,12 +302,7 @@
|
|
|
251
302
|
text-decoration: none;
|
|
252
303
|
font-weight: 700;
|
|
253
304
|
|
|
254
|
-
&:hover
|
|
255
|
-
text-decoration: underline;
|
|
256
|
-
text-underline-offset: 5px;
|
|
257
|
-
background-color: inherit;
|
|
258
|
-
}
|
|
259
|
-
|
|
305
|
+
&:hover,
|
|
260
306
|
&:focus {
|
|
261
307
|
text-decoration: underline;
|
|
262
308
|
text-underline-offset: 5px;
|
|
@@ -289,13 +335,19 @@
|
|
|
289
335
|
}
|
|
290
336
|
|
|
291
337
|
li {
|
|
338
|
+
|
|
339
|
+
@include media-breakpoint-down(lg) {
|
|
340
|
+
padding-right: 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
292
343
|
a.dropdown-item {
|
|
293
344
|
font-weight: 600;
|
|
294
345
|
padding: 1rem 0;
|
|
295
346
|
color: var(--#{$prefix}navbar-link-color);
|
|
296
347
|
border-bottom: solid 1px var(--#{$prefix}navbar-border-color);
|
|
297
348
|
|
|
298
|
-
&:hover
|
|
349
|
+
&:hover,
|
|
350
|
+
&:focus {
|
|
299
351
|
text-decoration: underline;
|
|
300
352
|
text-underline-offset: 5px;
|
|
301
353
|
background-color: inherit;
|
|
@@ -306,12 +358,6 @@
|
|
|
306
358
|
}
|
|
307
359
|
}
|
|
308
360
|
|
|
309
|
-
&:focus {
|
|
310
|
-
text-decoration: underline;
|
|
311
|
-
text-underline-offset: 5px;
|
|
312
|
-
background-color: inherit;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
361
|
&::after {
|
|
316
362
|
width: 1.25rem;
|
|
317
363
|
height: 1.25rem;
|
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
|
|
23
23
|
//https://storybook.js.org/docs/api/arg-types
|
|
24
24
|
argTypes: {
|
|
25
|
-
customClass: {
|
|
25
|
+
/*customClass: {
|
|
26
26
|
name: "Classes",
|
|
27
27
|
description: 'Settable classes for the component',
|
|
28
28
|
control: {
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
"qld-input-success",
|
|
52
52
|
"qld-input-error",
|
|
53
53
|
],
|
|
54
|
-
}
|
|
54
|
+
},*/
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -116,7 +116,7 @@ export const Disabled = {
|
|
|
116
116
|
export const Valid = {
|
|
117
117
|
args: {
|
|
118
118
|
...defaultdata,
|
|
119
|
-
...{
|
|
119
|
+
...{customClass: "qld-input-success"},
|
|
120
120
|
},
|
|
121
121
|
};
|
|
122
122
|
|
|
@@ -126,6 +126,6 @@ export const Valid = {
|
|
|
126
126
|
export const Invalid = {
|
|
127
127
|
args: {
|
|
128
128
|
...defaultdata,
|
|
129
|
-
...{
|
|
129
|
+
...{customClass: "qld-input-error"},
|
|
130
130
|
},
|
|
131
131
|
};
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
<span class="qld-hint-text" id="example-1-hint">{{hint-text}}</span>
|
|
13
13
|
{{/if}}
|
|
14
14
|
|
|
15
|
-
{{#contains "qld-input-success"
|
|
15
|
+
{{#contains "qld-input-success" customClass}}
|
|
16
16
|
<span id="text-field-success" class="qld-input-success">
|
|
17
17
|
{{successMessageText}}
|
|
18
18
|
</span>
|
|
19
19
|
{{/contains}}
|
|
20
20
|
|
|
21
|
-
{{#contains "qld-input-error"
|
|
21
|
+
{{#contains "qld-input-error" customClass}}
|
|
22
22
|
<span id="text-field-error" class="qld-input-error">
|
|
23
23
|
{{errorMessageText}}
|
|
24
24
|
</span>
|
|
25
25
|
{{/contains}}
|
|
26
26
|
|
|
27
27
|
<!-- First text input field, described by the hint text above -->
|
|
28
|
-
<select class="qld-text-input form-select qld-select qld-field-width-1-quarter {{customClass}}
|
|
28
|
+
<select class="qld-text-input form-select qld-select qld-field-width-1-quarter {{customClass}}"
|
|
29
29
|
aria-label="Default select example" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required aria-required="true"{{/if}}>
|
|
30
30
|
<option selected>{{placeholder}}</option>
|
|
31
31
|
<option value="1">Option 1</option>
|
|
@@ -22,36 +22,6 @@ export default {
|
|
|
22
22
|
|
|
23
23
|
//https://storybook.js.org/docs/api/arg-types
|
|
24
24
|
argTypes: {
|
|
25
|
-
customClass: {
|
|
26
|
-
name: "Classes",
|
|
27
|
-
description: 'Settable classes for the component',
|
|
28
|
-
control: {
|
|
29
|
-
type: "check",
|
|
30
|
-
labels: {
|
|
31
|
-
"form-style-filled": "Filled",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
options: [
|
|
35
|
-
"form-style-filled",
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
states: {
|
|
39
|
-
name: "States",
|
|
40
|
-
description: `Valid/Invalid states`,
|
|
41
|
-
control: {
|
|
42
|
-
type: "radio",
|
|
43
|
-
labels: {
|
|
44
|
-
"default": "Default",
|
|
45
|
-
"qld-input-success": "Success",
|
|
46
|
-
"qld-input-error": "Error",
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
options: [
|
|
50
|
-
"default",
|
|
51
|
-
"qld-input-success",
|
|
52
|
-
"qld-input-error",
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
25
|
},
|
|
56
26
|
};
|
|
57
27
|
|
|
@@ -116,7 +86,7 @@ export const Disabled = {
|
|
|
116
86
|
export const Valid = {
|
|
117
87
|
args: {
|
|
118
88
|
...defaultdata,
|
|
119
|
-
...{
|
|
89
|
+
...{customClass: "qld-input-success"},
|
|
120
90
|
},
|
|
121
91
|
};
|
|
122
92
|
|
|
@@ -126,6 +96,6 @@ export const Valid = {
|
|
|
126
96
|
export const Invalid = {
|
|
127
97
|
args: {
|
|
128
98
|
...defaultdata,
|
|
129
|
-
...{
|
|
99
|
+
...{customClass: "qld-input-error"},
|
|
130
100
|
},
|
|
131
101
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<!-- QGDS Component: Textarea -->
|
|
2
2
|
|
|
3
3
|
<!-- Label for the first input field -->
|
|
4
|
-
<label class="qld-text-input-label {{#if isRequired}}field-required{{/if}} {{#if isDisabled}}field-disabled{{/if}}"
|
|
4
|
+
<label class="qld-text-input-label {{#if isRequired}}field-required{{/if}} {{#if isDisabled}}field-disabled{{/if}}"
|
|
5
|
+
for="example-1">
|
|
5
6
|
{{label-text}}
|
|
6
7
|
{{#if optional-text}}
|
|
7
8
|
<span class="label-text-optional">({{optional-text}})</span>
|
|
@@ -13,20 +14,19 @@
|
|
|
13
14
|
<span class="qld-hint-text" id="example-1-hint">{{hint-text}}</span>
|
|
14
15
|
{{/if}}
|
|
15
16
|
|
|
16
|
-
{{#contains "qld-input-success"
|
|
17
|
-
<span class="qld-input-success">
|
|
17
|
+
{{#contains "qld-input-success" customClass}}
|
|
18
|
+
<span id="text-field-success" class="qld-input-success">
|
|
18
19
|
{{successMessageText}}
|
|
19
20
|
</span>
|
|
20
21
|
{{/contains}}
|
|
21
22
|
|
|
22
|
-
{{#contains "qld-input-error"
|
|
23
|
-
<span class="qld-input-error">
|
|
23
|
+
{{#contains "qld-input-error" customClass}}
|
|
24
|
+
<span id="text-field-error" class="qld-input-error">
|
|
24
25
|
{{errorMessageText}}
|
|
25
26
|
</span>
|
|
26
27
|
{{/contains}}
|
|
27
28
|
|
|
28
29
|
<!-- First text input field, described by the hint text above -->
|
|
29
|
-
<textarea id="example-1" class="qld-text-input form-control {{customClass}} {{
|
|
30
|
+
<textarea id="example-1" class="qld-text-input form-control {{customClass}} {{#if isFilled}}form-style-filled{{/if}}"
|
|
30
31
|
placeholder="{{placeholder}}" rows="{{rows}}" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required
|
|
31
|
-
aria-required="true" {{/if}}></textarea>
|
|
32
|
-
|
|
32
|
+
aria-required="true" {{/if}}></textarea>
|
|
@@ -22,19 +22,6 @@ export default {
|
|
|
22
22
|
|
|
23
23
|
//https://storybook.js.org/docs/api/arg-types
|
|
24
24
|
argTypes: {
|
|
25
|
-
customClass: {
|
|
26
|
-
name: "Classes",
|
|
27
|
-
description: 'Settable classes for the component',
|
|
28
|
-
control: {
|
|
29
|
-
type: "check",
|
|
30
|
-
labels: {
|
|
31
|
-
"form-style-filled": "Filled",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
options: [
|
|
35
|
-
"form-style-filled",
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
25
|
states: {
|
|
39
26
|
name: "States",
|
|
40
27
|
description: `Valid/Invalid states`,
|
|
@@ -116,7 +103,7 @@ export const Disabled = {
|
|
|
116
103
|
export const Valid = {
|
|
117
104
|
args: {
|
|
118
105
|
...defaultdata,
|
|
119
|
-
...{
|
|
106
|
+
...{customClass: "qld-input-success"},
|
|
120
107
|
},
|
|
121
108
|
};
|
|
122
109
|
|
|
@@ -126,6 +113,6 @@ export const Valid = {
|
|
|
126
113
|
export const Invalid = {
|
|
127
114
|
args: {
|
|
128
115
|
...defaultdata,
|
|
129
|
-
...{
|
|
116
|
+
...{customClass: "qld-input-error"},
|
|
130
117
|
},
|
|
131
118
|
};
|