nsw-design-system 2.14.2 → 3.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/CHANGELOG.md +586 -350
- package/README.md +28 -34
- package/dist/css/core.css +2 -0
- package/dist/css/main.css +1 -1
- package/dist/js/main.js +65 -112
- package/package.json +4 -2
- package/src/components/_all.scss +9 -14
- package/src/components/accordion/_accordion.scss +23 -28
- package/src/components/accordion/accordion.js +4 -4
- package/src/components/breadcrumbs/_breadcrumbs.scss +35 -40
- package/src/components/button/_button.scss +167 -26
- package/src/components/callout/_callout.scss +2 -79
- package/src/components/card/_card.scss +139 -168
- package/src/components/content-block/_content-block.scss +8 -39
- package/src/components/filters/_filters.scss +11 -77
- package/src/components/filters/filters.js +0 -5
- package/src/components/footer/_footer.scss +77 -132
- package/src/components/{forms/_forms.scss → form/_form.scss} +71 -50
- package/src/components/global-alert/_global-alert.scss +68 -0
- package/src/components/{site-wide-message/site-wide-message.js → global-alert/global-alert.js} +3 -3
- package/src/components/header/_header.scss +140 -253
- package/src/components/hero-banner/_hero-banner.scss +150 -84
- package/src/components/hero-search/_hero-search.scss +23 -44
- package/src/components/in-page-alert/_in-page-alert.scss +66 -0
- package/src/components/in-page-nav/_in-page-nav.scss +22 -0
- package/src/components/link-list/_link-list.scss +26 -41
- package/src/components/list-item/_list-item.scss +28 -44
- package/src/components/main-nav/_main-nav.scss +272 -0
- package/src/components/{main-navigation/main-navigation.js → main-nav/main-nav.js} +40 -39
- package/src/components/masthead/_masthead.scss +9 -18
- package/src/components/media/_media.scss +0 -1
- package/src/components/pagination/_pagination.scss +35 -46
- package/src/components/progress-indicator/_progress-indicator.scss +11 -12
- package/src/components/results-bar/_results-bar.scss +0 -1
- package/src/components/side-nav/_side-nav.scss +73 -0
- package/src/components/table/_table.scss +56 -0
- package/src/components/tables/_tables.scss +0 -86
- package/src/components/tabs/_tabs.scss +79 -0
- package/src/components/{tab-navigation/tab-navigation.js → tabs/tabs.js} +6 -8
- package/src/components/tag/_tag.scss +60 -0
- package/src/{styles → core}/_all.scss +3 -0
- package/src/core/grid/_grid.scss +117 -0
- package/src/core/iconography/_icon.scss +83 -0
- package/src/core/layout/_layout.scss +42 -0
- package/src/{styles → core}/section/_section.scss +0 -40
- package/src/{styles → core}/spacing/_spacing.scss +0 -8
- package/src/core/typography/_typography.scss +324 -0
- package/src/global/scss/base/_all.scss +4 -0
- package/src/global/scss/base/_functions.scss +44 -0
- package/src/global/scss/{style/_base.scss → base/_global.scss} +0 -0
- package/src/global/scss/base/_mixins.scss +241 -0
- package/src/global/scss/{tools → base}/_print.scss +1 -1
- package/src/global/scss/helpers/_all.scss +3 -1
- package/src/global/scss/helpers/_colour.scss +2 -1
- package/src/global/scss/helpers/_list.scss +21 -0
- package/src/global/scss/helpers/_text.scss +9 -0
- package/src/global/scss/helpers/_visibility.scss +31 -0
- package/src/global/scss/settings/_palette.scss +2 -1
- package/src/global/scss/settings/_settings.scss +9 -317
- package/src/global/scss/settings/_theme.scss +5 -1
- package/src/main.js +8 -11
- package/src/main.scss +13 -21
- package/dist/assets/svg/sprite.svg +0 -1
- package/src/components/banner/_banner.scss +0 -205
- package/src/components/direction-links/_direction-links.scss +0 -63
- package/src/components/feature-tile/_feature-tile.scss +0 -170
- package/src/components/forms/_forms-prev.scss +0 -356
- package/src/components/in-page-navigation/_in-page-navigation.scss +0 -27
- package/src/components/main-navigation/_main-navigation.scss +0 -406
- package/src/components/notification/_notification.scss +0 -92
- package/src/components/side-navigation/_side-navigation.scss +0 -86
- package/src/components/site-wide-message/_site-wide-message.scss +0 -163
- package/src/components/social-bar/_social-bar.scss +0 -28
- package/src/components/social-bar/social-bar.js +0 -24
- package/src/components/tab-navigation/_tab-navigation.scss +0 -69
- package/src/components/tags/_tags.scss +0 -69
- package/src/global/scss/helpers/_sr-only.scss +0 -7
- package/src/global/scss/style/_all.scss +0 -3
- package/src/global/scss/style/_grid.scss +0 -171
- package/src/global/scss/style/_icons.scss +0 -44
- package/src/global/scss/tools/_all.scss +0 -10
- package/src/global/scss/tools/_breakpoint.scss +0 -16
- package/src/global/scss/tools/_buttons.scss +0 -36
- package/src/global/scss/tools/_focus.scss +0 -25
- package/src/global/scss/tools/_general.scss +0 -163
- package/src/global/scss/tools/_grid.scss +0 -129
- package/src/global/scss/tools/_links.scss +0 -33
- package/src/global/scss/tools/_spacing.scss +0 -37
- package/src/global/scss/tools/_sr-only.scss +0 -21
- package/src/global/scss/tools/_typography.scss +0 -71
- package/src/styles/layout/_layout.scss +0 -0
- package/src/styles/typography/_typography.scss +0 -325
|
@@ -1,68 +1,63 @@
|
|
|
1
|
-
.nsw-
|
|
1
|
+
.nsw-breadcrumbs {
|
|
2
2
|
@include font-size('xs');
|
|
3
|
-
|
|
4
|
-
font-family: var(--nsw-font-family);
|
|
3
|
+
margin-top: rem(24px);
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
ol {
|
|
7
6
|
margin: 0;
|
|
8
7
|
padding-left: 0;
|
|
9
8
|
list-style: none;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
li {
|
|
13
12
|
display: none;
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
&::before {
|
|
15
|
+
@include material-icons;
|
|
16
|
+
content: 'keyboard_arrow_right';
|
|
17
|
+
font-size: rem(map-get($nsw-icon-sizes, 20));
|
|
18
|
+
line-height: rem(8px);
|
|
17
19
|
display: inline-block;
|
|
18
|
-
border-right: 2px solid currentColor;
|
|
19
|
-
border-bottom: 2px solid currentColor;
|
|
20
|
-
width: rem(6px);
|
|
21
|
-
height: rem(6px);
|
|
22
|
-
transform: rotate(-45deg);
|
|
23
|
-
margin-right: rem(6px);
|
|
24
|
-
margin-left: rem(6px);
|
|
25
|
-
top: -1px;
|
|
26
20
|
position: relative;
|
|
21
|
+
top: rem(6px);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
@include breakpoint('md') {
|
|
30
25
|
display: inline;
|
|
31
26
|
}
|
|
32
|
-
}
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
&:nth-last-child(2),
|
|
29
|
+
&:last-child {
|
|
30
|
+
display: inline;
|
|
31
|
+
}
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
&:nth-last-child(2) {
|
|
34
|
+
&::before {
|
|
35
|
+
display: none;
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
@include breakpoint('md') {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
}
|
|
45
40
|
}
|
|
46
41
|
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&__link {
|
|
50
|
-
color: var(--nsw-brand-dark);
|
|
51
|
-
text-decoration: underline;
|
|
52
|
-
text-decoration-skip-ink: auto;
|
|
53
42
|
|
|
54
|
-
&:
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
&:first-child {
|
|
44
|
+
&::before {
|
|
45
|
+
display: none;
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
@include breakpoint('md') {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
60
51
|
}
|
|
61
52
|
}
|
|
62
53
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
54
|
+
a {
|
|
55
|
+
font-weight: var(--nsw-font-normal);
|
|
56
|
+
|
|
57
|
+
&.current {
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
color: var(--nsw-text-dark);
|
|
61
|
+
}
|
|
67
62
|
}
|
|
68
63
|
}
|
|
@@ -1,13 +1,91 @@
|
|
|
1
|
+
$nsw-buttons: (
|
|
2
|
+
dark: (
|
|
3
|
+
text-color: var(--nsw-text-light),
|
|
4
|
+
text-color-hover: var(--nsw-text-light),
|
|
5
|
+
background: var(--nsw-brand-dark),
|
|
6
|
+
background-hover: var(--nsw-brand-dark),
|
|
7
|
+
border: transparent,
|
|
8
|
+
border-hover: transparent,
|
|
9
|
+
focus: var(--nsw-focus),
|
|
10
|
+
hover: white
|
|
11
|
+
),
|
|
12
|
+
dark-outline: (
|
|
13
|
+
text-color: var(--nsw-brand-dark),
|
|
14
|
+
text-color-hover: var(--nsw-text-light),
|
|
15
|
+
background: transparent,
|
|
16
|
+
background-hover: var(--nsw-brand-dark),
|
|
17
|
+
border: var(--nsw-brand-dark),
|
|
18
|
+
focus: var(--nsw-focus),
|
|
19
|
+
border-hover: transparent
|
|
20
|
+
),
|
|
21
|
+
dark-outline-solid: (
|
|
22
|
+
text-color: var(--nsw-brand-dark),
|
|
23
|
+
text-color-hover: var(--nsw-text-light),
|
|
24
|
+
background: var(--nsw-white),
|
|
25
|
+
background-hover: var(--nsw-brand-dark),
|
|
26
|
+
border: var(--nsw-brand-dark),
|
|
27
|
+
focus: var(--nsw-focus),
|
|
28
|
+
border-hover: transparent
|
|
29
|
+
),
|
|
30
|
+
light: (
|
|
31
|
+
text-color: var(--nsw-text-dark),
|
|
32
|
+
text-color-hover: var(--nsw-text-dark),
|
|
33
|
+
background: var(--nsw-brand-light),
|
|
34
|
+
background-hover: var(--nsw-brand-light),
|
|
35
|
+
border: transparent,
|
|
36
|
+
border-hover: transparent,
|
|
37
|
+
focus: var(--nsw-focus),
|
|
38
|
+
hover: black
|
|
39
|
+
),
|
|
40
|
+
light-outline: (
|
|
41
|
+
text-color: var(--nsw-brand-light),
|
|
42
|
+
text-color-hover: var(--nsw-text-dark),
|
|
43
|
+
background: transparent,
|
|
44
|
+
background-hover: var(--nsw-brand-light),
|
|
45
|
+
border: var(--nsw-brand-light),
|
|
46
|
+
focus: var(--nsw-focus),
|
|
47
|
+
border-hover: transparent
|
|
48
|
+
),
|
|
49
|
+
white: (
|
|
50
|
+
text-color: var(--nsw-text-dark),
|
|
51
|
+
text-color-hover: var(--nsw-text-dark),
|
|
52
|
+
background: var(--nsw-white),
|
|
53
|
+
background-hover: var(--nsw-white),
|
|
54
|
+
border: transparent,
|
|
55
|
+
border-hover: transparent,
|
|
56
|
+
focus: var(--nsw-white),
|
|
57
|
+
hover: black
|
|
58
|
+
),
|
|
59
|
+
danger: (
|
|
60
|
+
text-color: var(--nsw-text-light),
|
|
61
|
+
text-color-hover: var(--nsw-text-light),
|
|
62
|
+
background: var(--nsw-status-error),
|
|
63
|
+
background-hover: var(--nsw-status-error),
|
|
64
|
+
border: transparent,
|
|
65
|
+
border-hover: transparent,
|
|
66
|
+
focus: var(--nsw-focus),
|
|
67
|
+
hover: white
|
|
68
|
+
),
|
|
69
|
+
info: (
|
|
70
|
+
text-color: var(--nsw-text-light),
|
|
71
|
+
text-color-hover: var(--nsw-text-light),
|
|
72
|
+
background: var(--nsw-status-info),
|
|
73
|
+
background-hover: var(--nsw-status-info),
|
|
74
|
+
border: transparent,
|
|
75
|
+
border-hover: transparent,
|
|
76
|
+
focus: var(--nsw-focus),
|
|
77
|
+
hover: white
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
|
|
1
81
|
.nsw-button {
|
|
2
82
|
@include font-size('sm');
|
|
3
|
-
@include nsw-spacing(margin, lg md none none);
|
|
4
83
|
border-radius: var(--nsw-border-radius);
|
|
5
|
-
font-family: var(--nsw-font-family);
|
|
6
84
|
font-weight: var(--nsw-font-bold);
|
|
7
85
|
border: solid 2px transparent;
|
|
8
86
|
white-space: normal;
|
|
9
87
|
text-decoration: none;
|
|
10
|
-
padding: rem(
|
|
88
|
+
padding: rem(10px) rem(22px);
|
|
11
89
|
cursor: pointer;
|
|
12
90
|
-webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
|
|
13
91
|
text-decoration: none;
|
|
@@ -21,34 +99,65 @@
|
|
|
21
99
|
min-width: rem(124px);
|
|
22
100
|
}
|
|
23
101
|
|
|
102
|
+
&:hover {
|
|
103
|
+
outline: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
24
106
|
&:focus {
|
|
25
107
|
@include nsw-focus;
|
|
26
108
|
}
|
|
27
109
|
|
|
28
|
-
@each $color, $
|
|
110
|
+
@each $color, $property-map in $nsw-buttons {
|
|
29
111
|
&--#{"" + $color} {
|
|
30
|
-
|
|
112
|
+
color: map-get($property-map, text-color);
|
|
113
|
+
background-color: map-get($property-map, background);
|
|
114
|
+
border-color: map-get($property-map, border);
|
|
115
|
+
|
|
116
|
+
&:visited {
|
|
117
|
+
color: map-get($property-map, text-color);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:focus {
|
|
121
|
+
outline-color: map-get($property-map, focus);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:hover {
|
|
125
|
+
color: map-get($property-map, text-color-hover);
|
|
126
|
+
background-color: map-get($property-map, background-hover);
|
|
127
|
+
border-color: map-get($property-map, border-hover);
|
|
128
|
+
@if map-get($property-map, hover) == white {
|
|
129
|
+
background-image: linear-gradient(rgba(var(--nsw-white-rgb), 0.15), rgba(var(--nsw-white-rgb), 0.15));
|
|
130
|
+
}
|
|
131
|
+
@if map-get($property-map, hover) == black {
|
|
132
|
+
background-image: linear-gradient(rgba(var(--nsw-black-rgb), 0.07), rgba(var(--nsw-black-rgb), 0.07));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.nsw-material-icons {
|
|
136
|
+
color: map-get($property-map, text-color-hover);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:disabled,
|
|
141
|
+
&.disabled {
|
|
142
|
+
color: map-get($property-map, text-color);
|
|
143
|
+
background-color: map-get($property-map, background);
|
|
144
|
+
border-color: map-get($property-map, border);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.nsw-material-icons {
|
|
148
|
+
color: map-get($property-map, text-color);
|
|
149
|
+
}
|
|
31
150
|
}
|
|
32
151
|
}
|
|
33
152
|
|
|
34
153
|
&:disabled,
|
|
35
154
|
&.disabled {
|
|
36
|
-
opacity: 0.
|
|
155
|
+
opacity: 0.4;
|
|
37
156
|
cursor: not-allowed;
|
|
38
157
|
}
|
|
39
158
|
|
|
40
|
-
&--full-width {
|
|
41
|
-
display: block;
|
|
42
|
-
width: 100%;
|
|
43
|
-
|
|
44
|
-
@include breakpoint($desktop-breakpoint) {
|
|
45
|
-
display: inline-block;
|
|
46
|
-
width: auto;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
159
|
.nsw-material-icons {
|
|
51
|
-
font-size: rem(
|
|
160
|
+
font-size: rem(map-get($nsw-icon-sizes, 24));
|
|
52
161
|
line-height: rem(10px);
|
|
53
162
|
position: relative;
|
|
54
163
|
bottom: rem(-7px);
|
|
@@ -60,18 +169,50 @@
|
|
|
60
169
|
&:last-child {
|
|
61
170
|
margin-left: rem(8px);
|
|
62
171
|
}
|
|
172
|
+
|
|
173
|
+
&:only-child {
|
|
174
|
+
margin: 0;
|
|
175
|
+
}
|
|
63
176
|
}
|
|
64
|
-
}
|
|
65
177
|
|
|
66
|
-
|
|
178
|
+
&--small {
|
|
179
|
+
@include font-size('xs');
|
|
180
|
+
padding: rem(5px);
|
|
181
|
+
|
|
182
|
+
.nsw-material-icons {
|
|
183
|
+
font-size: rem(map-get($nsw-icon-sizes, 20));
|
|
184
|
+
|
|
185
|
+
&:first-child {
|
|
186
|
+
margin-right: rem(4px);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:last-child {
|
|
190
|
+
margin-left: rem(4px);
|
|
191
|
+
}
|
|
67
192
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
193
|
+
&:only-child {
|
|
194
|
+
margin: 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&--flex {
|
|
200
|
+
display: flex;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
align-items: center;
|
|
71
203
|
|
|
72
|
-
|
|
73
|
-
|
|
204
|
+
.nsw-material-icons {
|
|
205
|
+
position: static;
|
|
206
|
+
}
|
|
74
207
|
}
|
|
75
|
-
}
|
|
76
208
|
|
|
77
|
-
|
|
209
|
+
&--full-width {
|
|
210
|
+
display: block;
|
|
211
|
+
width: 100%;
|
|
212
|
+
|
|
213
|
+
@include breakpoint($nsw-desktop-breakpoint) {
|
|
214
|
+
display: inline-block;
|
|
215
|
+
width: auto;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -1,82 +1,5 @@
|
|
|
1
1
|
.nsw-callout {
|
|
2
|
-
@include nsw-spacing(padding, md);
|
|
3
2
|
@include component-spacing();
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
position: relative;
|
|
7
|
-
border-left: solid 6px var(--nsw-brand-dark);
|
|
8
|
-
|
|
9
|
-
@include breakpoint('md') {
|
|
10
|
-
@include nsw-spacing(padding, lg lg lg md);
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: row;
|
|
13
|
-
flex-wrap: nowrap;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&__icon {
|
|
17
|
-
+ .nsw-callout__content {
|
|
18
|
-
margin-top: 10px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@include breakpoint('md') {
|
|
22
|
-
margin-right: 10px;
|
|
23
|
-
flex: 0 0 auto;
|
|
24
|
-
|
|
25
|
-
+ .nsw-callout__content {
|
|
26
|
-
margin-top: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.nsw-icon {
|
|
30
|
-
width: rem(32px);
|
|
31
|
-
height: rem(32px);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.nsw-material-icons {
|
|
36
|
-
position: relative;
|
|
37
|
-
top: -3px;
|
|
38
|
-
left: -3px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.nsw-icon {
|
|
42
|
-
width: rem(24px);
|
|
43
|
-
height: rem(24px);
|
|
44
|
-
|
|
45
|
-
+ .nsw-callout__content {
|
|
46
|
-
@include nsw-spacing(margin-top, md);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@include breakpoint('md') {
|
|
50
|
-
@include nsw-spacing(margin-right, md);
|
|
51
|
-
|
|
52
|
-
+ .nsw-callout__content {
|
|
53
|
-
@include nsw-spacing(margin-top, none);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&__content {
|
|
60
|
-
@include breakpoint('md') {
|
|
61
|
-
@include nsw-spacing(margin-top, none);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
p:not([class]) {
|
|
65
|
-
@include nsw-spacing(margin, sm none none none);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
a:not([class]) {
|
|
69
|
-
@include text-link;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.nsw-text-link {
|
|
73
|
-
@include nsw-spacing(margin-top, sm);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&__title {
|
|
78
|
-
@include font-size('md');
|
|
79
|
-
font-weight: var(--nsw-font-bold);
|
|
80
|
-
margin: 0;
|
|
81
|
-
}
|
|
3
|
+
padding: rem(16px);
|
|
4
|
+
border-left: solid 4px var(--nsw-brand-dark);
|
|
82
5
|
}
|