nsw-design-system 3.5.2 → 3.6.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.
@@ -0,0 +1,414 @@
1
+ /* stylelint-disable declaration-no-important, string-quotes, number-leading-zero, scss/dollar-variable-default */
2
+ $utilities: () !default;
3
+
4
+ $utilities: map-merge((
5
+ "align": (
6
+ property: vertical-align,
7
+ class: nsw-align,
8
+ values: baseline top middle bottom text-bottom text-top
9
+ ),
10
+ "float": (
11
+ responsive: true,
12
+ property: float,
13
+ class: nsw-float,
14
+ values: left right none
15
+ ),
16
+ "object-fit": (
17
+ responsive: true,
18
+ property: object-fit,
19
+ class: nsw-object-fit,
20
+ values: (
21
+ contain: contain,
22
+ cover: cover,
23
+ fill: fill,
24
+ scale: scale-down,
25
+ none: none,
26
+ )
27
+ ),
28
+ "opacity": (
29
+ property: opacity,
30
+ class: nsw-opacity,
31
+ state: hover,
32
+ values: (
33
+ 0: 0,
34
+ 25: .25,
35
+ 50: .5,
36
+ 75: .75,
37
+ 100: 1,
38
+ )
39
+ ),
40
+ "overflow": (
41
+ property: overflow,
42
+ class: nsw-overflow,
43
+ values: auto hidden visible scroll,
44
+ ),
45
+ "overflow-x": (
46
+ property: overflow-x,
47
+ class: nsw-overflow-x,
48
+ values: auto hidden visible scroll,
49
+ ),
50
+ "overflow-y": (
51
+ property: overflow-y,
52
+ class: nsw-overflow-y,
53
+ values: auto hidden visible scroll,
54
+ ),
55
+ "display": (
56
+ responsive: true,
57
+ print: true,
58
+ property: display,
59
+ class: nsw-display,
60
+ values: inline inline-block block grid inline-grid table table-row table-cell flex inline-flex none
61
+ ),
62
+ "position": (
63
+ property: position,
64
+ class: nsw-position,
65
+ values: static relative absolute fixed sticky
66
+ ),
67
+ "top": (
68
+ property: top,
69
+ class: nsw-top,
70
+ values: $nsw-position-values
71
+ ),
72
+ "bottom": (
73
+ property: bottom,
74
+ class: nsw-bottom,
75
+ values: $nsw-position-values
76
+ ),
77
+ "left": (
78
+ property: left,
79
+ class: nsw-left,
80
+ values: $nsw-position-values
81
+ ),
82
+ "right": (
83
+ property: right,
84
+ class: nsw-right,
85
+ values: $nsw-position-values
86
+ ),
87
+ "translate-middle": (
88
+ property: transform,
89
+ class: nsw-translate-middle,
90
+ values: (
91
+ null: translate(-50%, -50%),
92
+ x: translateX(-50%),
93
+ y: translateY(-50%),
94
+ )
95
+ ),
96
+ "border": (
97
+ property: border,
98
+ class: nsw-border,
99
+ values: (
100
+ null: var(--nsw-border-width) var(--nsw-border-style) var(--nsw-border-color),
101
+ 0: 0,
102
+ )
103
+ ),
104
+ "border-top": (
105
+ property: border-top,
106
+ class: nsw-border-top,
107
+ values: (
108
+ null: var(--nsw-border-width) var(--nsw-border-style) var(--nsw-border-color),
109
+ 0: 0,
110
+ )
111
+ ),
112
+ "border-right": (
113
+ property: border-right,
114
+ class: nsw-border-right,
115
+ values: (
116
+ null: var(--nsw-border-width) var(--nsw-border-style) var(--nsw-border-color),
117
+ 0: 0,
118
+ )
119
+ ),
120
+ "border-bottom": (
121
+ property: border-bottom,
122
+ class: nsw-border-bottom,
123
+ values: (
124
+ null: var(--nsw-border-width) var(--nsw-border-style) var(--nsw-border-color),
125
+ 0: 0,
126
+ )
127
+ ),
128
+ "border-left": (
129
+ property: border-left,
130
+ class: nsw-border-left,
131
+ values: (
132
+ null: var(--nsw-border-width) var(--nsw-border-style) var(--nsw-border-color),
133
+ 0: 0,
134
+ )
135
+ ),
136
+ "border-color": (
137
+ property: border-color,
138
+ class: nsw-border,
139
+ state: hover,
140
+ values: $nsw-base-colours,
141
+ ),
142
+ "border-width": (
143
+ property: border-width,
144
+ class: nsw-border,
145
+ values: $nsw-border-widths,
146
+ ),
147
+ "border-radius": (
148
+ property: border-radius,
149
+ class: nsw-border-radius,
150
+ values: (
151
+ null: var(--nsw-border-radius),
152
+ 0: 0,
153
+ circle: 50%,
154
+ )
155
+ ),
156
+ "box-shadow": (
157
+ property: box-shadow,
158
+ class: nsw-box-shadow,
159
+ values: (
160
+ null: var(--nsw-box-shadow),
161
+ none: none,
162
+ )
163
+ ),
164
+ "width": (
165
+ property: width,
166
+ class: nsw-width,
167
+ values: (
168
+ 25: 25%,
169
+ 50: 50%,
170
+ 75: 75%,
171
+ 100: 100%,
172
+ auto: auto
173
+ )
174
+ ),
175
+ "max-width": (
176
+ property: max-width,
177
+ class: nsw-mw,
178
+ values: (100: 100%)
179
+ ),
180
+ "viewport-width": (
181
+ property: width,
182
+ class: nsw-vw,
183
+ values: (100: 100vw)
184
+ ),
185
+ "min-viewport-width": (
186
+ property: min-width,
187
+ class: nsw-min-vw,
188
+ values: (100: 100vw)
189
+ ),
190
+ "height": (
191
+ property: height,
192
+ class: nsw-height,
193
+ values: (
194
+ 25: 25%,
195
+ 50: 50%,
196
+ 75: 75%,
197
+ 100: 100%,
198
+ auto: auto
199
+ )
200
+ ),
201
+ "max-height": (
202
+ property: max-height,
203
+ class: nsw-mh,
204
+ values: (100: 100%)
205
+ ),
206
+ "viewport-height": (
207
+ property: height,
208
+ class: nsw-vh,
209
+ values: (100: 100vh)
210
+ ),
211
+ "min-viewport-height": (
212
+ property: min-height,
213
+ class: nsw-min-vh,
214
+ values: (100: 100vh)
215
+ ),
216
+ "flex": (
217
+ responsive: true,
218
+ property: flex,
219
+ class: nsw-flex,
220
+ values: (fill: 1 1 auto)
221
+ ),
222
+ "flex-direction": (
223
+ responsive: true,
224
+ property: flex-direction,
225
+ class: nsw-flex,
226
+ values: row column row-reverse column-reverse
227
+ ),
228
+ "flex-grow": (
229
+ responsive: true,
230
+ property: flex-grow,
231
+ class: nsw-flex,
232
+ values: (
233
+ grow-0: 0,
234
+ grow-1: 1,
235
+ )
236
+ ),
237
+ "flex-shrink": (
238
+ responsive: true,
239
+ property: flex-shrink,
240
+ class: nsw-flex,
241
+ values: (
242
+ shrink-0: 0,
243
+ shrink-1: 1,
244
+ )
245
+ ),
246
+ "flex-wrap": (
247
+ responsive: true,
248
+ property: flex-wrap,
249
+ class: nsw-flex,
250
+ values: wrap nowrap wrap-reverse
251
+ ),
252
+ "justify-content": (
253
+ responsive: true,
254
+ property: justify-content,
255
+ class: nsw-justify-content,
256
+ values: (
257
+ start: flex-start,
258
+ end: flex-end,
259
+ center: center,
260
+ between: space-between,
261
+ around: space-around,
262
+ evenly: space-evenly,
263
+ )
264
+ ),
265
+ "align-items": (
266
+ responsive: true,
267
+ property: align-items,
268
+ class: nsw-align-items,
269
+ values: (
270
+ start: flex-start,
271
+ end: flex-end,
272
+ center: center,
273
+ baseline: baseline,
274
+ stretch: stretch,
275
+ )
276
+ ),
277
+ "align-content": (
278
+ responsive: true,
279
+ property: align-content,
280
+ class: nsw-align-content,
281
+ values: (
282
+ start: flex-start,
283
+ end: flex-end,
284
+ center: center,
285
+ between: space-between,
286
+ around: space-around,
287
+ stretch: stretch,
288
+ )
289
+ ),
290
+ "align-self": (
291
+ responsive: true,
292
+ property: align-self,
293
+ class: nsw-align-self,
294
+ values: (
295
+ auto: auto,
296
+ start: flex-start,
297
+ end: flex-end,
298
+ center: center,
299
+ baseline: baseline,
300
+ stretch: stretch,
301
+ )
302
+ ),
303
+ "order": (
304
+ responsive: true,
305
+ property: order,
306
+ class: nsw-order,
307
+ values: (
308
+ first: -1,
309
+ 0: 0,
310
+ 1: 1,
311
+ 2: 2,
312
+ 3: 3,
313
+ 4: 4,
314
+ 5: 5,
315
+ last: 6,
316
+ ),
317
+ ),
318
+ "font-style": (
319
+ property: font-style,
320
+ class: nsw-text,
321
+ values: italic normal
322
+ ),
323
+ "font-weight": (
324
+ property: font-weight,
325
+ class: nsw-font-weight,
326
+ values: (
327
+ lighter: $nsw-font-weight-lighter,
328
+ light: $nsw-font-weight-light,
329
+ normal: $nsw-font-weight-normal,
330
+ medium: $nsw-font-weight-medium,
331
+ semibold: $nsw-font-weight-semibold,
332
+ bold: $nsw-font-weight-bold,
333
+ bolder: $nsw-font-weight-bolder
334
+ )
335
+ ),
336
+ "text-align": (
337
+ responsive: true,
338
+ property: text-align,
339
+ class: nsw-text,
340
+ values: left right center
341
+ ),
342
+ "text-decoration": (
343
+ property: text-decoration,
344
+ class: nsw-text,
345
+ values: none underline line-through
346
+ ),
347
+ "text-transform": (
348
+ property: text-transform,
349
+ class: nsw-text,
350
+ values: lowercase uppercase capitalize
351
+ ),
352
+ "white-space": (
353
+ property: white-space,
354
+ class: nsw-text,
355
+ values: (
356
+ wrap: normal,
357
+ nowrap: nowrap,
358
+ )
359
+ ),
360
+ "overflow-wrap": (
361
+ responsive: true,
362
+ property: overflow-wrap,
363
+ class: nsw-overflow,
364
+ values: (
365
+ break: break-word,
366
+ ),
367
+ rtl: false
368
+ ),
369
+ "word-break": (
370
+ responsive: true,
371
+ property: word-break,
372
+ class: nsw-word-break,
373
+ values: normal break-all keep-all,
374
+ rtl: false
375
+ ),
376
+ "background-color": (
377
+ property: background-color,
378
+ class: nsw-bg,
379
+ state: hover,
380
+ values: $nsw-bg-colours,
381
+ ),
382
+ "fill": (
383
+ property: fill,
384
+ class: nsw-fill,
385
+ state: hover,
386
+ values: $nsw-base-colours,
387
+ ),
388
+ "stroke": (
389
+ property: stroke,
390
+ class: nsw-stroke,
391
+ state: hover,
392
+ values: $nsw-base-colours,
393
+ ),
394
+ "user-select": (
395
+ property: user-select,
396
+ class: nsw-user-select,
397
+ values: all auto none
398
+ ),
399
+ "pointer-events": (
400
+ property: pointer-events,
401
+ class: nsw-pointer,
402
+ values: none auto,
403
+ ),
404
+ "visibility": (
405
+ property: visibility,
406
+ class: nsw,
407
+ values: visible hidden
408
+ ),
409
+ "z-index": (
410
+ property: z-index,
411
+ class: nsw-z,
412
+ values: $nsw-z-index,
413
+ )),
414
+ $utilities);
@@ -1,3 +1,6 @@
1
+ $prefix: 'nsw-';
2
+ $enable-important-utilities: true !default;
3
+
1
4
  // Breakpoints
2
5
  $nsw-breakpoints: (
3
6
  xs: 0,
@@ -14,6 +17,14 @@ $nsw-desktop-breakpoint: lg;
14
17
  $nsw-base-font-size: 16px;
15
18
  $nsw-font-size-reponsive-breakpoint: lg !default;
16
19
 
20
+ $nsw-font-weight-lighter: lighter !default;
21
+ $nsw-font-weight-light: 300 !default;
22
+ $nsw-font-weight-normal: 400 !default;
23
+ $nsw-font-weight-medium: 500 !default;
24
+ $nsw-font-weight-semibold: 600 !default;
25
+ $nsw-font-weight-bold: 700 !default;
26
+ $nsw-font-weight-bolder: bolder !default;
27
+
17
28
  // Grid
18
29
  $grid-gutters: 8px;
19
30
 
@@ -26,5 +37,57 @@ $nsw-z-index: (
26
37
  below: -100,
27
38
  ) !default;
28
39
 
40
+ // Base Colours
41
+ $nsw-base-colours: (
42
+ brand-dark: var(--nsw-brand-dark),
43
+ brand-light: var(--nsw-brand-light),
44
+ brand-supplementary: var(--nsw-brand-supplementary),
45
+ brand-accent: var(--nsw-brand-accent),
46
+ black: var(--nsw-black),
47
+ white: var(--nsw-white),
48
+ off-white: var(--nsw-off-white),
49
+ grey-01: var(--nsw-grey-01),
50
+ grey-02: var(--nsw-grey-02),
51
+ grey-03: var(--nsw-grey-03),
52
+ grey-04: var(--nsw-grey-04)
53
+ );
54
+
55
+ // Background Colours
56
+ $nsw-bg-colours: map-merge($nsw-base-colours, (
57
+ transparent: transparent,
58
+ info: var(--nsw-status-info),
59
+ info-bg: var(--nsw-status-info-bg),
60
+ success: var(--nsw-status-success),
61
+ success-bg: var(--nsw-status-success-bg),
62
+ warning: var(--nsw-status-warning),
63
+ warning-bg: var(--nsw-status-warning-bg),
64
+ error: var(--nsw-status-error),
65
+ error-bg: var(--nsw-status-error-bg)
66
+ ));
67
+
68
+ // Text Colours
69
+ $nsw-text-colours: map-merge($nsw-base-colours, (
70
+ dark: var(--nsw-text-dark),
71
+ light: var(--nsw-text-light),
72
+ ));
73
+
74
+ $nsw-border-widths: (
75
+ 1: 1px,
76
+ 2: 2px,
77
+ 3: 3px,
78
+ 4: 4px,
79
+ 5: 5px
80
+ ) !default;
81
+
82
+ // Box shadow
83
+ $nsw-box-shadow: var(--nsw-box-shadow) !default;
84
+
85
+ // Position
86
+ $nsw-position-values: (
87
+ 0: 0,
88
+ 50: 50%,
89
+ 100: 100%
90
+ ) !default;
91
+
29
92
  // Transitions
30
93
  $nsw-transition-duration: 0.15s ease-in-out !default;
@@ -80,6 +80,9 @@
80
80
  --nsw-line-height-xxl-desktop: 1.25;
81
81
 
82
82
  /* Borders */
83
+ --nsw-border-width: 1px;
84
+ --nsw-border-style: solid;
85
+ --nsw-border-color: var(--nsw-brand-accent);
83
86
  --nsw-border-radius: #{rem(4px)};
84
87
 
85
88
  /* Shadows */
@@ -1,3 +0,0 @@
1
- .nsw-box-shadow {
2
- box-shadow: var(--nsw-box-shadow);
3
- }