@qld-gov-au/qgds-bootstrap5 2.0.9 → 2.0.11

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.
Files changed (54) hide show
  1. package/.storybook/main.mjs +2 -2
  2. package/dist/assets/components/bs5/banner/banner.hbs +3 -6
  3. package/dist/assets/components/bs5/card/card.hbs +2 -2
  4. package/dist/assets/components/bs5/head/head.hbs +1 -1
  5. package/dist/assets/components/bs5/tag/tag.hbs +1 -1
  6. package/dist/assets/css/qld.bootstrap.css +2 -1
  7. package/dist/assets/css/qld.bootstrap.css.map +2 -2
  8. package/dist/assets/css/qld.bootstrap.legacy.css +2 -1
  9. package/dist/assets/css/qld.bootstrap.legacy.css.map +2 -2
  10. package/dist/assets/js/handlebars.helpers.bundle.js +2 -1
  11. package/dist/assets/js/handlebars.helpers.bundle.js.map +2 -2
  12. package/dist/assets/js/handlebars.init.min.js +9 -11
  13. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  14. package/dist/assets/js/handlebars.partials.js +9 -11
  15. package/dist/assets/js/handlebars.partials.js.map +2 -2
  16. package/dist/assets/js/qld.bootstrap.min.js +6 -5
  17. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  18. package/dist/assets/node/handlebars.init.min.js +9 -5
  19. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  20. package/dist/components/bs5/banner/banner.hbs +3 -6
  21. package/dist/components/bs5/card/card.hbs +2 -2
  22. package/dist/components/bs5/head/head.hbs +1 -1
  23. package/dist/components/bs5/tag/tag.hbs +1 -1
  24. package/dist/package.json +1 -1
  25. package/dist/sample-data/card/card.data.json +4 -1
  26. package/dist/sample-data/tag/tag.data.json +149 -143
  27. package/esbuild.js +8 -0
  28. package/package.json +1 -1
  29. package/src/components/bs5/banner/banner.hbs +3 -6
  30. package/src/components/bs5/banner/banner.scss +10 -7
  31. package/src/components/bs5/banner/banner.stories.js +2 -5
  32. package/src/components/bs5/button/button.scss +4 -11
  33. package/src/components/bs5/button/button.stories.js +17 -15
  34. package/src/components/bs5/card/Card.js +31 -2
  35. package/src/components/bs5/card/Card.mdx +4 -0
  36. package/src/components/bs5/card/card--icon-list-footer.stories.js +2 -24
  37. package/src/components/bs5/card/card--multi-action.stories.js +9 -28
  38. package/src/components/bs5/card/card--no-action.stories.js +5 -27
  39. package/src/components/bs5/card/card--single-action.stories.js +4 -33
  40. package/src/components/bs5/card/card.data.json +4 -1
  41. package/src/components/bs5/card/card.hbs +2 -2
  42. package/src/components/bs5/footer/footer_formio.scss +5 -5
  43. package/src/components/bs5/modal/modal.scss +106 -99
  44. package/src/components/bs5/navbar/navbar.functions.js +122 -19
  45. package/src/components/bs5/tag/tag--status.stories.js +1 -0
  46. package/src/components/bs5/tag/tag.data.json +149 -143
  47. package/src/components/bs5/tag/tag.hbs +1 -1
  48. package/src/components/bs5/tag/tag.scss +2 -5
  49. package/src/components/bs5/tag/tag.stories.js +1 -0
  50. package/src/components/bs5/typography/typography.stories.js +1 -1
  51. package/src/css/mixins/focusable.scss +1 -1
  52. package/src/css/mixins/make-icon.scss +1 -1
  53. package/src/js/handlebars.helpers.js +9 -1
  54. package/src/js/utils.js +142 -0
@@ -45,7 +45,7 @@ function buttonVariantsMarkup() {
45
45
  )
46
46
  .join("");
47
47
 
48
- return `<div class="d-grid mb-4">
48
+ return `<div class="d-grid p-32">
49
49
  <div class="fw-bold">${variantLabel}</div>
50
50
  <div class="d-flex gap-3">
51
51
  ${variantButtons}
@@ -61,7 +61,7 @@ export default {
61
61
  args: defaultdata,
62
62
  render: (args) => {
63
63
  return `
64
- <div class="d-flex gap-3">
64
+ <div class="d-flex gap-3 p-32">
65
65
  ${new Button(args).html}
66
66
  ${new Button({ ...args, isdisabled: true }).html}
67
67
  ${new Button({ ...args, isprogress: true, iconClass: "", label: "Loading button", progressLabel: "Loading...", islink: false, dataatts: 'data-loading-btn="true"' }).html}
@@ -113,6 +113,9 @@ export default {
113
113
  type: "figma",
114
114
  url: "https://www.figma.com/file/qKsxl3ogIlBp7dafgxXuCA/QLD-GOV-DDS?type=design&node-id=5990-98058&mode=design&t=YBUAJHIxqF46Um9y-0",
115
115
  },
116
+ backgrounds: {
117
+ disabled: false,
118
+ },
116
119
  },
117
120
  };
118
121
 
@@ -125,10 +128,9 @@ export const Default = {};
125
128
  * Dark Button story
126
129
  * */
127
130
  export const Dark = {
128
- parameters: {
131
+ globals: {
129
132
  backgrounds: {
130
- default: "Dark",
131
- values: [{ name: "Dark", value: "var(--qld-sapphire-blue)" }],
133
+ value: "dark",
132
134
  },
133
135
  },
134
136
  decorators: [
@@ -208,7 +210,7 @@ export const LongLabelsWrapping = {
208
210
  isdisabled: true,
209
211
  }).html;
210
212
 
211
- return `<div class="d-grid mb-4" style="max-width: 300px;">
213
+ return `<div class="d-grid mb-4 " style="max-width: 300px;">
212
214
  <div class="fw-bold">${variantLabel} - Long Labels</div>
213
215
  <div class="d-grid gap-2">
214
216
  ${longLabelButton}
@@ -219,7 +221,7 @@ export const LongLabelsWrapping = {
219
221
  .join("");
220
222
 
221
223
  return `
222
- <div class="d-grid gap-4">
224
+ <div class="d-grid gap-4 p-32">
223
225
  <div>
224
226
  <h5 class="mb-3">Buttons with Long Labels (300px container)</h5>
225
227
  <div class="d-flex flex-wrap gap-4">
@@ -229,14 +231,14 @@ export const LongLabelsWrapping = {
229
231
  <div style="max-width: 200px;">
230
232
  <h5 class="mb-3">Even Narrower Container (200px)</h5>
231
233
  ${
232
- new Button({
233
- ...defaultdata,
234
- iconClass: "", // no icon for this demo
235
- variantClass: "btn-primary",
236
- label: "Long button text in a narrow container",
237
- isdisabled: false,
238
- }).html
239
- }
234
+ new Button({
235
+ ...defaultdata,
236
+ iconClass: "", // no icon for this demo
237
+ variantClass: "btn-primary",
238
+ label: "Long button text in a narrow container",
239
+ isdisabled: false,
240
+ }).html
241
+ }
240
242
  </div>
241
243
  </div>
242
244
  `;
@@ -1,8 +1,37 @@
1
- import Component from '../../../js/QGDSComponent.js'
1
+ import Component from "../../../js/QGDSComponent.js";
2
2
  import template from "./card.hbs?raw";
3
3
 
4
4
  export class Card {
5
- constructor( data = {} ) {
5
+ constructor(data = {}) {
6
6
  return new Component(template, data);
7
7
  }
8
8
  }
9
+
10
+ export const argTypes = {
11
+ headingTag: {
12
+ description: "Heading tag. Can be h2, h3, h4, h5 or h6.",
13
+ control: "select",
14
+ options: ["h2", "h3", "h4", "h5", "h6"],
15
+ },
16
+ date: {
17
+ control: "text",
18
+ },
19
+ variantClass: {
20
+ control: "select",
21
+ options: {
22
+ Default: "default",
23
+ Light: "light",
24
+ Alternative: "alt",
25
+ Dark: "dark",
26
+ "Dark alternative": "dark-alt",
27
+ },
28
+ },
29
+ action: {
30
+ control: "select",
31
+ options: {
32
+ None: "no",
33
+ Single: "single",
34
+ Multi: "multi",
35
+ },
36
+ },
37
+ };
@@ -6,6 +6,10 @@ import defaultdata from "./card.data.json";
6
6
 
7
7
  # Cards
8
8
 
9
+ ## Accessibility considerations - heading level
10
+
11
+ Use the field `headingTag` to apply the correct heading level of your card title (h1 should be followed by h2, then h3 etc) and keep the semantic structure of your page correct.
12
+
9
13
  <Canvas of={CardStories.Default} />
10
14
 
11
15
  ## Design resources
@@ -1,5 +1,5 @@
1
1
  // card--icon-list-footer.stories.js
2
- import { Card } from "./Card.js";
2
+ import { Card, argTypes } from "./Card.js";
3
3
  import { Link } from "../link/link.js";
4
4
  import defaultdata from "./card.data.json";
5
5
 
@@ -95,29 +95,7 @@ export default {
95
95
  description:
96
96
  "This card demonstrates the proper nesting of an Icon List component into the Card Footer following the Figma design pattern with 0.75rem gap spacing between links and 12px gap between icons and text.",
97
97
  },
98
- argTypes: {
99
- date: {
100
- control: "text",
101
- },
102
- variantClass: {
103
- control: "select",
104
- options: {
105
- Default: "default",
106
- Light: "light",
107
- Alternative: "alt",
108
- Dark: "dark",
109
- "Dark alternative": "dark-alt",
110
- },
111
- },
112
- action: {
113
- control: "select",
114
- options: {
115
- None: "no",
116
- Single: "single",
117
- Multi: "multi",
118
- },
119
- },
120
- },
98
+ argTypes,
121
99
  parameters: {
122
100
  docs: {
123
101
  description: {
@@ -1,6 +1,6 @@
1
1
  // card--multi-action.stories.js
2
- import { Card } from './Card.js';
3
- import defaultdata from './card.data.json';
2
+ import { Card, argTypes } from "./Card.js";
3
+ import defaultdata from "./card.data.json";
4
4
 
5
5
  // include tags for footer option
6
6
  import { Tag } from "../tag/Tag.js";
@@ -11,14 +11,17 @@ export default {
11
11
  tags: ["autodocs"],
12
12
  title: "3. Components/Card/Multi action",
13
13
  render: (args) => {
14
- const tags = new Tag(tagdata.action).html;
14
+ const tags = new Tag({
15
+ ...tagdata.action,
16
+ classes: "",
17
+ }).html;
15
18
  const cta = new CallToAction({ label: "View all", href: "#" }).html;
16
19
 
17
20
  return `
18
21
  <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
19
22
  ${new Card(args).html}
20
23
  ${new Card({ ...args, iconClasses: "qld-icon-design", iconPosition: "icon-left", footer: "Footer content" }).html}
21
- ${new Card({ ...args, description: "Card body text lorem ipsum dolor sit amet.", footer: '' }).html}
24
+ ${new Card({ ...args, description: "Card body text lorem ipsum dolor sit amet.", footer: "" }).html}
22
25
  ${new Card({ ...args, footer: tags }).html}
23
26
  ${new Card({ ...args, description: "<ul><li><a href='javascript:void(0)'>Link text</a></li><li><a href='javascript:void(0)'>Link text</a></li><li><a href='javascript:void(0)'>Link text</a></li></ul>", footer: cta }).html}
24
27
  ${new Card({ ...args, iconClasses: "qld-icon-design", iconPosition: "icon-top", footer: "Footer content" }).html}
@@ -35,29 +38,7 @@ export default {
35
38
  `;
36
39
  },
37
40
  args: defaultdata.multiAction,
38
- argTypes: {
39
- date: {
40
- control: "text",
41
- },
42
- variantClass: {
43
- control: "select",
44
- options: {
45
- Default: "default",
46
- Light: "light",
47
- Alternative: "alt",
48
- Dark: "dark",
49
- "Dark alternative": "dark-alt",
50
- },
51
- },
52
- action: {
53
- control: "select",
54
- options: {
55
- None: "no",
56
- Single: "single",
57
- Multi: "multi",
58
- },
59
- },
60
- },
41
+ argTypes,
61
42
  parameters: {
62
43
  docs: {
63
44
  controls: {
@@ -67,7 +48,7 @@ export default {
67
48
  },
68
49
  };
69
50
 
70
- export const Default = { };
51
+ export const Default = {};
71
52
  export const Light = {
72
53
  name: "Light theme",
73
54
  args: {
@@ -1,6 +1,6 @@
1
1
  // card--no-action.stories.js
2
- import { Card } from './Card.js';
3
- import defaultdata from './card.data.json';
2
+ import { Card, argTypes } from "./Card.js";
3
+ import defaultdata from "./card.data.json";
4
4
 
5
5
  export default {
6
6
  tags: ["autodocs"],
@@ -15,7 +15,7 @@ export default {
15
15
  ${new Card({ ...args, iconClasses: "qld-icon-design", iconPosition: "icon-left", footer: "Footer content" }).html}
16
16
  <div class="col" id="placeholder"></div>
17
17
  ${new Card({ ...args, iconClasses: "qld-icon-design", iconPosition: "icon-top" }).html}
18
- ${new Card({ ...args, iconClasses: "qld-icon-design", iconPosition: "icon-top", footer: "Footer content"}).html}
18
+ ${new Card({ ...args, iconClasses: "qld-icon-design", iconPosition: "icon-top", footer: "Footer content" }).html}
19
19
  <div class="col" id="placeholder"></div>
20
20
  ${new Card({ ...args, image: "./assets/img/image-placeholder.png", imageAlt: "A grey placeholder image with an icon in the centre." }).html}
21
21
  ${new Card({ ...args, image: "./assets/img/image-placeholder.png", imageAlt: "A grey placeholder image with an icon in the centre.", footer: "Footer content" }).html}
@@ -23,32 +23,10 @@ export default {
23
23
  `;
24
24
  },
25
25
  args: defaultdata.noAction,
26
- argTypes: {
27
- date: {
28
- control: "text",
29
- },
30
- variantClass: {
31
- control: "select",
32
- options: {
33
- Default: "default",
34
- Light: "light",
35
- Alternative: "alt",
36
- Dark: "dark",
37
- "Dark alternative": "dark-alt",
38
- },
39
- },
40
- action: {
41
- control: "select",
42
- options: {
43
- None: "no",
44
- Single: "single",
45
- Multi: "multi",
46
- },
47
- },
48
- },
26
+ argTypes,
49
27
  };
50
28
 
51
- export const Default = { };
29
+ export const Default = {};
52
30
  export const Light = {
53
31
  name: "Light theme",
54
32
  args: {
@@ -1,6 +1,6 @@
1
1
  // card--single-action.stories.js
2
- import { Card } from './Card.js';
3
- import defaultdata from './card.data.json';
2
+ import { Card, argTypes } from "./Card.js";
3
+ import defaultdata from "./card.data.json";
4
4
 
5
5
  export default {
6
6
  tags: ["autodocs"],
@@ -20,39 +20,10 @@ export default {
20
20
  `;
21
21
  },
22
22
  args: defaultdata.singleAction,
23
- argTypes: {
24
- date: {
25
- control: "text",
26
- },
27
- variantClass: {
28
- control: "select",
29
- options: {
30
- Default: "default",
31
- Light: "light",
32
- Alternative: "alt",
33
- Dark: "dark",
34
- "Dark alternative": "dark-alt",
35
- },
36
- },
37
- action: {
38
- control: "select",
39
- options: {
40
- None: "no",
41
- Single: "single",
42
- Multi: "multi",
43
- },
44
- },
45
- },
46
- parameters: {
47
- docs: {
48
- controls: {
49
- exclude: ["link", "arrow", "iconPosition"],
50
- },
51
- },
52
- },
23
+ argTypes,
53
24
  };
54
25
 
55
- export const Default = { };
26
+ export const Default = {};
56
27
  export const Light = {
57
28
  name: "Light theme",
58
29
  args: {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "noAction": {
3
3
  "title": "Card title",
4
+ "headingTag": "h3",
4
5
  "description": "Card body text",
5
6
  "date": "",
6
7
  "variantClass": "default",
@@ -20,6 +21,7 @@
20
21
  },
21
22
  "singleAction": {
22
23
  "title": "Card title",
24
+ "headingTag": "h3",
23
25
  "description": "Card body text",
24
26
  "date": "",
25
27
  "variantClass": "default",
@@ -39,6 +41,7 @@
39
41
  },
40
42
  "multiAction": {
41
43
  "title": "Card title",
44
+ "headingTag": "h3",
42
45
  "description": "Card body text <a href='javascript:void(0)'>lorem ipsum</a> dolor sit amet.",
43
46
  "date": "",
44
47
  "variantClass": "default",
@@ -56,4 +59,4 @@
56
59
  "footer": "<ul><li><a href='javascript:void(0)'>Link text</a></li><li><a href='javascript:void(0)'>Link text</a></li><li><a href='javascript:void(0)'>Link text</a></li></ul>",
57
60
  "equalHeight": false
58
61
  }
59
- }
62
+ }
@@ -35,13 +35,13 @@
35
35
  {{#if date}}
36
36
  <div class="card-date">{{date}}</div>
37
37
  {{/if}}
38
- <h3 class="card-title">
38
+ <{{isdefined headingTag 'h3'}} class="card-title">
39
39
  {{#if link}}
40
40
  <a href="{{link}}" {{#ifCond action '===' 'single'}}class="stretched-link"{{/ifCond}}>{{title}}</a>
41
41
  {{else}}
42
42
  {{ title }}
43
43
  {{/if }}
44
- </h3>
44
+ </{{isdefined headingTag 'h3'}}>
45
45
  {{#if description}}
46
46
  <div class="card-text">
47
47
  {{{description}}}
@@ -141,7 +141,7 @@
141
141
  border-color: $qld-textbox-border-color;
142
142
  }
143
143
  &:focus {
144
- outline: 3px solid var(--#{$prefix}light-blue);
144
+ outline: 3px solid var(--#{$prefix}focus-color);
145
145
  outline-offset: 2px;
146
146
  background-color: var(--#{$prefix}white);
147
147
  border: 2px solid var(--#{$prefix}light-grey);
@@ -157,7 +157,7 @@
157
157
  box-shadow: none; // Overrides Bootstrap5 styling for invalid input.
158
158
 
159
159
  &:focus {
160
- outline: 3px solid var(--#{$prefix}light-blue);
160
+ outline: 3px solid var(--#{$prefix}focus-color);
161
161
  }
162
162
  }
163
163
  }
@@ -255,7 +255,7 @@
255
255
  outline: none;
256
256
 
257
257
  &:focus {
258
- outline: 3px solid var(--#{$prefix}light-blue);
258
+ outline: 3px solid var(--#{$prefix}focus-color);
259
259
  outline-offset: 3px;
260
260
  }
261
261
  }
@@ -273,7 +273,7 @@
273
273
  border-color: $qld-textbox-border-color;
274
274
  }
275
275
  &:focus {
276
- outline: 3px solid var(--#{$prefix}light-blue);
276
+ outline: 3px solid var(--#{$prefix}focus-color);
277
277
  outline-offset: 2px;
278
278
  background-color: var(--#{$prefix}white);
279
279
  border: 2px solid var(--#{$prefix}light-grey);
@@ -289,7 +289,7 @@
289
289
  box-shadow: none; // Overrides Bootstrap5 styling for invalid input.
290
290
 
291
291
  &:focus {
292
- outline: 3px solid var(--#{$prefix}light-blue);
292
+ outline: 3px solid var(--#{$prefix}focus-color);
293
293
  }
294
294
  }
295
295
 
@@ -4,117 +4,124 @@
4
4
 
5
5
  // QGDS specific modal variables.
6
6
  .modal {
7
- --#{$prefix}modal-zindex: #{$zindex-modal};
8
- --#{$prefix}modal-width: #{$modal-md};
9
-
10
- --#{$prefix}modal-margin: #{$modal-dialog-margin};
11
- --#{$prefix}modal-color: #{$modal-content-color};
12
- --#{$prefix}modal-bg: #{$modal-content-bg};
13
- --#{$prefix}modal-padding: 1.5rem 2rem;
14
-
15
- --#{$prefix}modal-border-color: var(--#{$prefix}light-grey);
16
- --#{$prefix}modal-border-width: 1px;
17
- --#{$prefix}modal-border-radius: 0.75rem;
18
-
19
- --#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-xs};
20
- --#{$prefix}modal-inner-border-radius: #{$modal-content-inner-border-radius};
21
-
22
- --#{$prefix}modal-header-padding: 2rem 2rem 0;
23
- --#{$prefix}modal-header-border-width: 0px;
24
-
25
- --#{$prefix}modal-title-line-height: 2rem;
26
-
27
- --#{$prefix}modal-footer-gap: 0;
28
- --#{$prefix}modal-footer-bg: none;
29
- --#{$prefix}modal-footer-border-color: none;
30
- --#{$prefix}modal-footer-border-width: none;
31
-
32
- .btn-close {
33
- --#{$prefix}btn-close-icon: "data:image/svg+xml,%3Csvg width='13' height='13' viewBox='0 0 13 13' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.0547 18.5938C17.8203 18.8281 17.3906 18.8281 17.1562 18.5938L12 13.3984L6.80469 18.5938C6.57031 18.8281 6.14062 18.8281 5.90625 18.5938C5.67188 18.3594 5.67188 17.9297 5.90625 17.6953L11.1016 12.5L5.90625 7.34375C5.67188 7.10938 5.67188 6.67969 5.90625 6.44531C6.14062 6.21094 6.57031 6.21094 6.80469 6.44531L12 11.6406L17.1562 6.44531C17.3906 6.21094 17.8203 6.21094 18.0547 6.44531C18.2891 6.67969 18.2891 7.10938 18.0547 7.34375L12.8594 12.5L18.0547 17.6953C18.2891 17.9297 18.2891 18.3594 18.0547 18.5938Z' /%3E%3C/svg%3E%0A";
34
- --#{$prefix}btn-close-color: var(--#{$prefix}color-default-color-light-text-lighter);
35
- --#{$prefix}btn-close-width: 40px;
36
- --#{$prefix}btn-border-radius: 50%;
37
-
38
- //Hover state
39
- --#{$prefix}btn-close-hover-color: var(--#{$prefix}color-default-color-light-text-heading);
40
- --#{$prefix}btn-close-hover-bg: var(--#{$prefix}core-default-color-neutral-lightest);
41
- --#{$prefix}btn-close-hover-bg-size: 15px;
42
-
43
- //Focus state
44
- --#{$prefix}btn-close-focus-color: var(--#{$prefix}color-default-color-light-text-heading);
45
- --#{$prefix}btn-close-focus-shadow: none;
46
- --#{$prefix}btn-close-focus-border: var(--#{$prefix}light-blue) solid 3px;
47
- }
7
+ --#{$prefix}modal-zindex: #{$zindex-modal};
8
+ --#{$prefix}modal-width: #{$modal-md};
9
+
10
+ --#{$prefix}modal-margin: #{$modal-dialog-margin};
11
+ --#{$prefix}modal-color: #{$modal-content-color};
12
+ --#{$prefix}modal-bg: #{$modal-content-bg};
13
+ --#{$prefix}modal-padding: 1.5rem 2rem;
14
+
15
+ --#{$prefix}modal-border-color: var(--#{$prefix}light-grey);
16
+ --#{$prefix}modal-border-width: 1px;
17
+ --#{$prefix}modal-border-radius: 0.75rem;
18
+
19
+ --#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-xs};
20
+ --#{$prefix}modal-inner-border-radius: #{$modal-content-inner-border-radius};
21
+
22
+ --#{$prefix}modal-header-padding: 2rem 2rem 0;
23
+ --#{$prefix}modal-header-border-width: 0px;
24
+
25
+ --#{$prefix}modal-title-line-height: 2rem;
26
+
27
+ --#{$prefix}modal-footer-gap: 0;
28
+ --#{$prefix}modal-footer-bg: none;
29
+ --#{$prefix}modal-footer-border-color: none;
30
+ --#{$prefix}modal-footer-border-width: none;
31
+
32
+ .btn-close {
33
+ --#{$prefix}btn-close-icon: "data:image/svg+xml,%3Csvg width='13' height='13' viewBox='0 0 13 13' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.0547 18.5938C17.8203 18.8281 17.3906 18.8281 17.1562 18.5938L12 13.3984L6.80469 18.5938C6.57031 18.8281 6.14062 18.8281 5.90625 18.5938C5.67188 18.3594 5.67188 17.9297 5.90625 17.6953L11.1016 12.5L5.90625 7.34375C5.67188 7.10938 5.67188 6.67969 5.90625 6.44531C6.14062 6.21094 6.57031 6.21094 6.80469 6.44531L12 11.6406L17.1562 6.44531C17.3906 6.21094 17.8203 6.21094 18.0547 6.44531C18.2891 6.67969 18.2891 7.10938 18.0547 7.34375L12.8594 12.5L18.0547 17.6953C18.2891 17.9297 18.2891 18.3594 18.0547 18.5938Z' /%3E%3C/svg%3E%0A";
34
+ --#{$prefix}btn-close-color: var(
35
+ --#{$prefix}color-default-color-light-text-lighter
36
+ );
37
+ --#{$prefix}btn-close-width: 40px;
38
+ --#{$prefix}btn-border-radius: 50%;
39
+
40
+ //Hover state
41
+ --#{$prefix}btn-close-hover-color: var(
42
+ --#{$prefix}color-default-color-light-text-heading
43
+ );
44
+ --#{$prefix}btn-close-hover-bg: var(
45
+ --#{$prefix}core-default-color-neutral-lightest
46
+ );
47
+ --#{$prefix}btn-close-hover-bg-size: 15px;
48
+
49
+ //Focus state
50
+ --#{$prefix}btn-close-focus-color: var(
51
+ --#{$prefix}color-default-color-light-text-heading
52
+ );
53
+ --#{$prefix}btn-close-focus-shadow: none;
54
+ --#{$prefix}btn-close-focus-border: var(--#{$prefix}focus-color) solid 3px;
55
+ }
48
56
  }
49
57
 
50
58
  // General styling rules.
51
59
  .modal {
52
- .btn-close {
53
- width: var(--#{$prefix}btn-close-width);
54
- height: var(--#{$prefix}btn-close-width);
55
- border-radius: var(--#{$prefix}btn-border-radius);
56
- background-size: 12px;
57
- padding: 0;
58
- flex-shrink: 0; //Flex, do not shrink this perfectly round button.
59
-
60
- &:hover {
61
- width: var(--#{$prefix}btn-close-width);
62
- height: var(--#{$prefix}btn-close-width);
63
- color: var(--#{$prefix}btn-close-hover-color);
64
- background-size: var(--#{$prefix}btn-close-hover-bg-size);
65
- background-color: var(--#{$prefix}btn-close-hover-bg);
66
- }
67
- &:focus {
68
- width: var(--#{$prefix}btn-close-width);
69
- height: var(--#{$prefix}btn-close-width);
70
- color: var(--#{$prefix}btn-close-focus-color);
71
- background-size: var(--#{$prefix}btn-close-hover-bg-size);
72
- background-color: var(--#{$prefix}btn-close-hover-bg);
73
- outline: var(--#{$prefix}btn-close-focus-border);
74
- outline-offset: 2px;
75
- }
76
- }
60
+ .btn-close {
61
+ width: var(--#{$prefix}btn-close-width);
62
+ height: var(--#{$prefix}btn-close-width);
63
+ border-radius: var(--#{$prefix}btn-border-radius);
64
+ background-size: 12px;
65
+ padding: 0;
66
+ flex-shrink: 0; //Flex, do not shrink this perfectly round button.
77
67
 
78
- .modal-header {
79
- .modal-title {
80
- line-height: var(--#{$prefix}modal-title-line-height);
81
- font-size: 1.5rem;
82
- }
68
+ &:hover {
69
+ width: var(--#{$prefix}btn-close-width);
70
+ height: var(--#{$prefix}btn-close-width);
71
+ color: var(--#{$prefix}btn-close-hover-color);
72
+ background-size: var(--#{$prefix}btn-close-hover-bg-size);
73
+ background-color: var(--#{$prefix}btn-close-hover-bg);
74
+ }
75
+ &:focus {
76
+ width: var(--#{$prefix}btn-close-width);
77
+ height: var(--#{$prefix}btn-close-width);
78
+ color: var(--#{$prefix}btn-close-focus-color);
79
+ background-size: var(--#{$prefix}btn-close-hover-bg-size);
80
+ background-color: var(--#{$prefix}btn-close-hover-bg);
81
+ outline: var(--#{$prefix}btn-close-focus-border);
82
+ outline-offset: 2px;
83
83
  }
84
+ }
84
85
 
85
- .modal-footer {
86
- padding: 0 2rem 2rem;
87
- flex-direction: row;
88
- flex-wrap: nowrap;
89
- justify-content: flex-end;
90
-
91
- .btn {
92
- margin: 0 0 0 1.5rem;
93
- }
86
+ .modal-header {
87
+ .modal-title {
88
+ line-height: var(--#{$prefix}modal-title-line-height);
89
+ font-size: 1.5rem;
94
90
  }
91
+ }
95
92
 
96
- //Rescope for smaller modals
97
- .modal-dialog {
98
- &.modal-sm {
99
- .modal-footer {
100
- flex-wrap: wrap;
101
- .btn {
102
- width: 100%;
103
- margin: 1rem 0;
104
- }
105
- }
106
- }
93
+ .modal-footer {
94
+ padding: 0 2rem 2rem;
95
+ flex-direction: row;
96
+ flex-wrap: nowrap;
97
+ justify-content: flex-end;
98
+
99
+ .btn {
100
+ margin: 0 0 0 1.5rem;
107
101
  }
102
+ }
108
103
 
109
- //Rescope for smaller viewports
110
- @include media-breakpoint-down(md) {
111
- .modal-footer {
112
- flex-wrap: wrap;
113
- .btn {
114
- width: 100%;
115
- margin: 1rem 0;
116
- }
104
+ //Rescope for smaller modals
105
+ .modal-dialog {
106
+ &.modal-sm {
107
+ .modal-footer {
108
+ flex-wrap: wrap;
109
+ .btn {
110
+ width: 100%;
111
+ margin: 1rem 0;
117
112
  }
113
+ }
118
114
  }
115
+ }
119
116
 
117
+ //Rescope for smaller viewports
118
+ @include media-breakpoint-down(md) {
119
+ .modal-footer {
120
+ flex-wrap: wrap;
121
+ .btn {
122
+ width: 100%;
123
+ margin: 1rem 0;
124
+ }
125
+ }
126
+ }
120
127
  }