@qld-gov-au/qgds-bootstrap5 2.1.3 → 2.1.4

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 (41) hide show
  1. package/.storybook/main.mjs +1 -0
  2. package/.storybook/manager.js +31 -0
  3. package/dist/assets/components/bs5/globalAlert/globalAlert.hbs +2 -2
  4. package/dist/assets/components/bs5/head/head.hbs +1 -1
  5. package/dist/assets/components/bs5/navbar/navbar.hbs +1 -1
  6. package/dist/assets/css/qld.bootstrap.css +2 -2
  7. package/dist/assets/css/qld.bootstrap.css.map +2 -2
  8. package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
  9. package/dist/assets/css/qld.bootstrap.legacy.css.map +2 -2
  10. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  11. package/dist/assets/js/handlebars.init.min.js +5 -5
  12. package/dist/assets/js/handlebars.init.min.js.map +1 -1
  13. package/dist/assets/js/handlebars.partials.js +5 -5
  14. package/dist/assets/js/handlebars.partials.js.map +1 -1
  15. package/dist/assets/js/qld.bootstrap.min.js +6 -6
  16. package/dist/assets/js/qld.bootstrap.min.js.map +3 -3
  17. package/dist/assets/node/handlebars.init.min.js +4 -4
  18. package/dist/assets/node/handlebars.init.min.js.map +1 -1
  19. package/dist/components/bs5/globalAlert/globalAlert.hbs +2 -2
  20. package/dist/components/bs5/head/head.hbs +1 -1
  21. package/dist/components/bs5/navbar/navbar.hbs +1 -1
  22. package/dist/package.json +2 -1
  23. package/dist/sample-data/globalAlert/globalAlert.data.json +9 -9
  24. package/package.json +2 -1
  25. package/src/components/bs5/globalAlert/globalAlert.data.json +9 -9
  26. package/src/components/bs5/globalAlert/globalAlert.hbs +2 -2
  27. package/src/components/bs5/globalAlert/globalAlert.scss +24 -9
  28. package/src/components/bs5/globalAlert/globalAlert.stories.js +1 -1
  29. package/src/components/bs5/globalAlert/globalAlert.test.js +0 -14
  30. package/src/components/bs5/inpageAlert/inpageAlert.stories.js +1 -1
  31. package/src/components/bs5/linkColumns/linkColumns.stories.js +11 -10
  32. package/src/components/bs5/navbar/navbar.functions.js +52 -67
  33. package/src/components/bs5/navbar/navbar.hbs +1 -1
  34. package/src/components/bs5/navbar/navbar.scss +50 -39
  35. package/src/components/bs5/promotionalPanel/promotionalPanel.stories.js +17 -15
  36. package/src/components/bs5/quickexit/quickexit.stories.js +1 -1
  37. package/src/components/bs5/searchInput/searchInput.stories.js +1 -1
  38. package/src/components/bs5/spinner/Spinner.stories.js +14 -19
  39. package/src/components/bs5/table/table.stories.js +1 -1
  40. package/src/components/bs5/video/video.stories.js +1 -1
  41. package/src/stories/Introduction.mdx +15 -6
@@ -1,4 +1,5 @@
1
1
  @use "../../../css/mixins" as m;
2
+ @use "../../../css/functions" as f;
2
3
 
3
4
  @mixin repeatedVerticalStyles {
4
5
  .nav-header {
@@ -128,6 +129,7 @@
128
129
  display: block;
129
130
  padding: 0;
130
131
  box-shadow: none;
132
+ columns: unset;
131
133
  &::before {
132
134
  display: none;
133
135
  }
@@ -211,6 +213,7 @@
211
213
  }
212
214
  a.dropdown-item {
213
215
  background-color: transparent;
216
+ border-radius: 0;
214
217
  &:hover {
215
218
  background-color: transparent;
216
219
  }
@@ -548,19 +551,23 @@
548
551
  background-color: var(--action-icon-color);
549
552
  }
550
553
  }
554
+
551
555
  .navbar-nav a.nav-link {
552
556
  color: var(--text-color);
553
557
  padding-block: var(--nav-link-padding-block);
554
558
  padding-inline: 0.75rem;
555
559
  display: flex;
556
- line-height: 2rem;
560
+ line-height: f.snap-line-height(1.4);
557
561
  gap: 0.5rem;
558
562
  align-items: center;
559
563
  &:hover {
560
564
  color: var(--link-color);
561
- text-decoration: underline;
562
- text-underline-offset: 0.3rem;
563
- text-decoration-thickness: 0.125rem;
565
+ text-decoration-line: underline;
566
+ text-decoration-color: currentColor;
567
+ }
568
+ &:focus {
569
+ z-index: 1;
570
+ outline-offset: -3px;
564
571
  }
565
572
  }
566
573
 
@@ -569,17 +576,18 @@
569
576
  padding-block: var(--nav-link-padding-block);
570
577
  padding-inline: 0.75rem;
571
578
  display: flex;
572
- line-height: 2rem;
579
+ line-height: f.snap-line-height(1.4);
573
580
  gap: 0.5rem;
574
- align-items: center;
581
+ align-items: flex-start;
582
+ border-radius: 0.25rem;
575
583
  &:hover {
576
584
  color: var(--link-color);
577
- text-decoration: underline;
578
- text-underline-offset: 0.3rem;
579
- text-decoration-thickness: 0.125rem;
585
+ text-decoration-line: underline;
586
+ text-decoration-color: currentColor;
580
587
  }
581
588
  @include m.focusable($offsetOutline: -3px) {
582
589
  box-shadow: none;
590
+ background-color: transparent;
583
591
  }
584
592
  }
585
593
  a.dropdown-toggle {
@@ -608,6 +616,8 @@
608
616
  }
609
617
  }
610
618
  .dropdown-menu.show {
619
+ display: block;
620
+ columns: 3;
611
621
  margin-block-start: calc(
612
622
  var(--horizontal-bar-border-width) - var(--border-width)
613
623
  );
@@ -617,21 +627,20 @@
617
627
  border-radius: 0.75rem;
618
628
  border-start-start-radius: 0;
619
629
  border-start-end-radius: 0;
630
+ border-width: 0;
620
631
  color: var(--text-color);
621
632
  box-shadow: var(--shadow-dropdown);
622
- display: grid;
623
- grid-template-columns: repeat(3, 1fr);
624
633
  column-gap: 2rem;
625
- row-gap: 0;
626
634
  z-index: 999;
627
- border-width: 0;
628
- @include media-breakpoint-up(xl) {
629
- column-gap: 4rem;
630
- row-gap: 0;
631
- }
635
+
632
636
  @include media-breakpoint-up(md) {
633
637
  padding-block: 3rem;
634
638
  }
639
+
640
+ @include media-breakpoint-up(xl) {
641
+ column-gap: 4rem;
642
+ }
643
+
635
644
  &::before {
636
645
  content: "";
637
646
  position: absolute;
@@ -640,21 +649,26 @@
640
649
  inset-block-start: 0;
641
650
  background-color: var(--dropdown-bg-color);
642
651
  }
652
+
643
653
  li {
644
- display: flex;
654
+ break-inside: avoid-column;
655
+
645
656
  &.mobile-only {
646
657
  display: var(--mobile-only-display);
647
658
  }
648
- &:has(p) {
649
- flex-direction: column;
650
- row-gap: 20px;
651
- p {
652
- font-size: 0.875rem;
659
+
660
+ p {
661
+ font-size: 0.875rem;
662
+ margin-block: f.remify(16px);
663
+
664
+ &:first-of-type {
665
+ margin-block-start: f.remify(20px);
653
666
  }
654
667
  }
668
+
655
669
  a {
656
670
  display: flex;
657
- align-items: center;
671
+ align-items: flex-start;
658
672
  padding-inline-start: 0;
659
673
  padding-inline-end: 0.5rem;
660
674
  white-space: normal;
@@ -672,7 +686,7 @@
672
686
  mask-repeat: no-repeat;
673
687
  mask-position: 0;
674
688
  background-color: var(--action-icon-color);
675
- height: 1.25rem;
689
+ height: 1lh;
676
690
  width: 1.25rem;
677
691
  min-width: 1.25rem;
678
692
  margin-inline-start: auto;
@@ -690,24 +704,18 @@
690
704
  box-shadow: none;
691
705
  }
692
706
  }
693
- p {
694
- text-align: start;
695
- margin-block-start: 1rem;
696
- }
697
- p:first-of-type {
698
- margin-block-start: 0;
699
- }
700
- p:last-of-type {
701
- margin-block-end: 0;
702
- }
703
707
  }
708
+
704
709
  li:has(.parent-link) {
705
710
  border-block-end: 2px solid var(--border-color);
706
711
  padding-block-end: 2rem;
707
712
  margin-block-end: 2rem;
708
713
  gap: 1rem;
709
- grid-column: 1 / -1;
714
+ column-span: all;
715
+
710
716
  .dropdown-item {
717
+ width: auto;
718
+ display: inline-flex;
711
719
  border-block-end: 0;
712
720
  padding-block: 0;
713
721
  gap: 1rem;
@@ -733,11 +741,15 @@
733
741
  border-block-start: 2px solid var(--border-color);
734
742
  padding-block-start: 2rem;
735
743
  margin-block-start: 2rem;
736
- grid-column: 1 / -1;
744
+ text-align: end;
745
+ column-span: all;
746
+
737
747
  .dropdown-item {
738
748
  border-block-end: 0;
739
- display: flex;
749
+ display: inline-flex;
750
+ width: auto;
740
751
  flex-direction: row-reverse;
752
+ align-items: center;
741
753
  padding-inline-end: 0.5rem;
742
754
  gap: 0.5rem;
743
755
  font-size: 1.25rem;
@@ -755,7 +767,6 @@
755
767
  transform: scaleX(var(--icon-dir));
756
768
  }
757
769
  &::after {
758
- content: "";
759
770
  content: none;
760
771
  }
761
772
  &:hover {
@@ -11,33 +11,34 @@ import defaultdata from "./promotionalPanel.data.json";
11
11
  export default {
12
12
  tags: ["autodocs"],
13
13
  title: "3. Components/Promotional Panel",
14
-
14
+
15
15
  render: (args) => new PromotionalPanel(args).html,
16
16
  args: defaultdata,
17
17
  argTypes: {
18
18
  type: {
19
- description: 'The types of layouts that this component supports',
19
+ description: "The types of layouts that this component supports",
20
20
  control: "select",
21
21
  options: ["promo", "contained", "indent-text", "indent-img"],
22
22
  },
23
23
  variantClass: {
24
- description: 'The types of themes that this component supports',
24
+ description: "The types of themes that this component supports",
25
25
  control: "select",
26
26
  options: ["light", "alt", "dark", "dark-alt"],
27
- },
27
+ },
28
28
  promoImage: {
29
29
  control: "text",
30
30
  description: "The image to be displayed in the promotional panel.",
31
- defaultValue:"./assets/img/banner-example-3-to-2.jpg",
31
+ defaultValue: "./assets/img/banner-example-3-to-2.jpg",
32
32
  },
33
33
  contentAlignment: {
34
- description: 'Position of the content in the panel within this component',
34
+ description: "Position of the content in the panel within this component",
35
35
  control: "select",
36
- options: ["content-left","content-right"],
36
+ options: ["content-left", "content-right"],
37
37
  },
38
38
  icon: {
39
39
  control: "select",
40
- description: "Current list of usable icons available in the icon component.",
40
+ description:
41
+ "Current list of usable icons available in the icon component.",
41
42
  options: ["icon-dot-grid", "icon-phone", "icon-email", "icon-search"],
42
43
  },
43
44
  title: {
@@ -48,20 +49,22 @@ export default {
48
49
  abstract: {
49
50
  control: "text",
50
51
  description: "The abstract of the promotional panel.",
51
- defaultValue:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis.",
52
+ defaultValue:
53
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis.",
52
54
  },
53
55
  body: {
54
56
  control: "text",
55
57
  description: "The body of the promotional panel.",
56
- defaultValue:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis. Vel suspendisse mi quisque consequat aliquet egestas.",
58
+ defaultValue:
59
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor, leo vulputate ut odio mattis. Vel suspendisse mi quisque consequat aliquet egestas.",
57
60
  },
58
61
  cta: {
59
- description: 'The call to action objects for the promotional panel.',
60
- control: 'object',
62
+ description: "The call to action objects for the promotional panel.",
63
+ control: "object",
61
64
  },
62
65
  btn: {
63
- description: 'The button objects for the promotional panel.',
64
- control: 'object',
66
+ description: "The button objects for the promotional panel.",
67
+ control: "object",
65
68
  },
66
69
  },
67
70
 
@@ -120,4 +123,3 @@ export const DarkAlternative = {
120
123
  variantClass: "dark-alt",
121
124
  },
122
125
  };
123
-
@@ -3,7 +3,7 @@ import { Quickexit } from "./Quickexit.js";
3
3
  import defaultdata from "./quickexit.data.json";
4
4
 
5
5
  export default {
6
- tags: ["autodocs"],
6
+ tags: ["autodocs", "extended"],
7
7
  title: "3. Components/Quickexit",
8
8
  render: (args) => {
9
9
  //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
@@ -6,7 +6,7 @@ import defaultdata from "./searchInput.data.json";
6
6
  const initData = defaultdata.defaultSuggestions || null;
7
7
 
8
8
  export default {
9
- tags: ["autodocs"],
9
+ tags: ["autodocs", "extended"],
10
10
  title: "3. Components/Search Input",
11
11
  render: (args) => {
12
12
  return `<form action="https://uat.forgov.qld.gov.au/search" class="site-search p-3">${new SearchInput(args).html}</form>`;
@@ -6,18 +6,16 @@ export default {
6
6
  tags: ["autodocs"],
7
7
  title: "3. Components/Spinner",
8
8
  render: (args) => {
9
-
10
- //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
9
+ //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
11
10
  //We can't use commas on our class="..." attribute, so we need to replace the commas with spaces.
12
11
 
13
- if( typeof(args.customClass) === 'string' ) {
14
- args.customClass = args.customClass.replaceAll(","," ");
15
- } else if ( typeof(args.customClass) === 'object' ) {
12
+ if (typeof args.customClass === "string") {
13
+ args.customClass = args.customClass.replaceAll(",", " ");
14
+ } else if (typeof args.customClass === "object") {
16
15
  args.customClass = args.customClass.join(" ");
17
16
  }
18
-
17
+
19
18
  return new Spinner(args).html;
20
-
21
19
  },
22
20
  };
23
21
 
@@ -32,15 +30,13 @@ export const Default = {
32
30
  * Dark themed Loading Spinner
33
31
  */
34
32
  export const Dark = {
35
- args: {
36
- ...defaultdata,
33
+ args: {
34
+ ...defaultdata,
37
35
  },
38
36
  parameters: {
39
37
  backgrounds: {
40
- default: 'Dark',
41
- values: [
42
- { name: 'Dark', value: 'var(--qld-brand-primary)' },
43
- ],
38
+ default: "Dark",
39
+ values: [{ name: "Dark", value: "var(--qld-brand-primary)" }],
44
40
  },
45
41
  },
46
42
  decorators: [
@@ -59,8 +55,8 @@ export const Dark = {
59
55
  */
60
56
  export const Minimal = {
61
57
  args: {
62
- ...defaultdata,
63
- ...{minimal: true},
58
+ ...defaultdata,
59
+ ...{ minimal: true },
64
60
  },
65
61
  };
66
62
 
@@ -68,9 +64,8 @@ export const Minimal = {
68
64
  * Stacked Loading Spinner
69
65
  */
70
66
  export const Stacked = {
71
- args: {
72
- ...defaultdata,
73
- ...{stacked: true},
67
+ args: {
68
+ ...defaultdata,
69
+ ...{ stacked: true },
74
70
  },
75
71
  };
76
-
@@ -3,7 +3,7 @@ import { Table } from "./Table.js";
3
3
  import defaultdata from "./table.data.json";
4
4
 
5
5
  export default {
6
- tags: ["autodocs"],
6
+ tags: ["autodocs", "extended"],
7
7
  title: "3. Components/Table",
8
8
  render: (args) => {
9
9
 
@@ -10,7 +10,7 @@ import { Accordion } from "../accordion/Accordion.js";
10
10
  * which is based on YouTube arguments.
11
11
  */
12
12
  export default {
13
- tags: ["autodocs"],
13
+ tags: ["autodocs", "extended"],
14
14
  title: "3. Components/Video",
15
15
  args: defaultdata.youtube,
16
16
  render: (args) => {
@@ -1,14 +1,23 @@
1
1
  import { Meta, Markdown } from "@storybook/addon-docs/blocks";
2
2
 
3
- import Readme from "../../README.md?raw"
3
+ import Readme from "../../README.md?raw";
4
4
 
5
5
  <Meta title="Welcome" />
6
6
 
7
- [//]: # (# Welcome to QGDS QOL BS MVP Storybook)
7
+ [//]: # "# Welcome to QGDS QOL BS MVP Storybook"
8
+ [//]: #
9
+ [//]: # "Welcome to Queensland Government Design System Qld Online Mvp Storybook, this documentation is mainly for development and testing purposes."
10
+ [//]: # "For user orientated documentation, please visit https://www.forgov.qld.gov.au/swe."
8
11
 
9
- [//]: # ()
10
- [//]: # (Welcome to Queensland Government Design System Qld Online Mvp Storybook, this documentation is mainly for development and testing purposes.)
12
+ <Markdown>{Readme}</Markdown>
11
13
 
12
- [//]: # (For user orientated documentation, please visit https://www.forgov.qld.gov.au/swe.)
14
+ ---
13
15
 
14
- <Markdown>{Readme}</Markdown>
16
+ ## Component Badges
17
+
18
+ Components are labelled as:
19
+
20
+ - **Core** — Essential, broadly applicable components that serve as the single source of truth for the Queensland Government design system.
21
+ - **Extended** — Specialised components for needs not covered by the core set.
22
+
23
+ Further information is available in the [QGDS UI Kit](https://www.figma.com/design/qKsxl3ogIlBp7dafgxXuCA/QGDS-UI-kit?node-id=8701-244248&m=dev).