@qld-gov-au/qgds-bootstrap5 1.1.21 → 1.1.23

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 (46) hide show
  1. package/dist/assets/components/bs5/backToTop/backToTop.hbs +14 -0
  2. package/dist/assets/components/bs5/button/button.hbs +38 -27
  3. package/dist/assets/components/bs5/directionLinks/directionLinks.hbs +9 -0
  4. package/dist/assets/components/bs5/head/head.hbs +1 -1
  5. package/dist/assets/css/qld.bootstrap.css +1 -1
  6. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  7. package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
  8. package/dist/assets/js/handlebars.helpers.bundle.js.map +3 -3
  9. package/dist/assets/js/handlebars.helpers.js +7 -0
  10. package/dist/assets/js/handlebars.init.min.js +98 -66
  11. package/dist/assets/js/handlebars.init.min.js.map +4 -4
  12. package/dist/assets/js/handlebars.partials.js +4 -0
  13. package/dist/assets/js/qld.bootstrap.min.js +2 -2
  14. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  15. package/dist/assets/node/handlebars.init.min.js +63 -29
  16. package/dist/assets/node/handlebars.init.min.js.map +3 -3
  17. package/dist/components/bs5/backToTop/backToTop.hbs +14 -0
  18. package/dist/components/bs5/button/button.hbs +38 -27
  19. package/dist/components/bs5/directionLinks/directionLinks.hbs +9 -0
  20. package/dist/components/bs5/head/head.hbs +1 -1
  21. package/dist/components/handlebars.helpers.js +7 -0
  22. package/dist/components/handlebars.partials.js +4 -0
  23. package/dist/package.json +7 -7
  24. package/dist/sample-data/backToTop/backToTop.data.json +10 -0
  25. package/dist/sample-data/directionLinks/directionLinks.data.json +7 -0
  26. package/package.json +7 -7
  27. package/src/components/bs5/backToTop/backToTop.data.json +10 -0
  28. package/src/components/bs5/backToTop/backToTop.functions.js +23 -0
  29. package/src/components/bs5/backToTop/backToTop.hbs +14 -0
  30. package/src/components/bs5/backToTop/backToTop.js +10 -0
  31. package/src/components/bs5/backToTop/backToTop.mdx +15 -0
  32. package/src/components/bs5/backToTop/backToTop.scss +101 -0
  33. package/src/components/bs5/backToTop/backToTop.stories.js +37 -0
  34. package/src/components/bs5/button/button.hbs +38 -27
  35. package/src/components/bs5/directionLinks/DirectionLinks.mdx +15 -0
  36. package/src/components/bs5/directionLinks/directionLinks.data.json +7 -0
  37. package/src/components/bs5/directionLinks/directionLinks.hbs +9 -0
  38. package/src/components/bs5/directionLinks/directionLinks.js +11 -0
  39. package/src/components/bs5/directionLinks/directionLinks.scss +116 -0
  40. package/src/components/bs5/directionLinks/directionLinks.stories.js +157 -0
  41. package/src/css/main.scss +2 -0
  42. package/src/css/qld-type.scss +67 -40
  43. package/src/css/qld-variables.scss +15 -3
  44. package/src/js/handlebars.helpers.js +7 -0
  45. package/src/js/handlebars.partials.js +4 -0
  46. package/src/js/qld.bootstrap.js +2 -0
@@ -127,6 +127,9 @@ function handlebarsHelpers(handlebars) {
127
127
  }
128
128
  return durationString;
129
129
  });
130
+ handlebars.registerHelper("isdefined", function(value, defaultValue) {
131
+ return value !== void 0 ? value : defaultValue;
132
+ });
130
133
  handlebars.registerHelper("getClassNames", function(names, array) {
131
134
  let nameList = names.split(",").map((name) => name.trim());
132
135
  let matchedItems = [];
@@ -163,6 +166,14 @@ var init_accordion = __esm({
163
166
  }
164
167
  });
165
168
 
169
+ // src/components/bs5/backToTop/backToTop.hbs?raw
170
+ var backToTop_default;
171
+ var init_backToTop = __esm({
172
+ "src/components/bs5/backToTop/backToTop.hbs?raw"() {
173
+ backToTop_default = '{{#unless hide_back_to_top}}\n <div class="qld__widgets" data-min-page-height="{{isdefined min_page_height 0}}">\n {{> button \n variantClass=(isdefined button.variantClass "back-to-top")\n islink=(isdefined button.islink true)\n isdisabled=(isdefined button.isdisabled false)\n iconClass=(isdefined button.iconClass "")\n iconPosition=(isdefined button.iconPosition "trailing")\n label=(isdefined button.label "Back to top")\n href=(isdefined button.href "#")\n target=(isdefined button.target "_self")\n }}\n </div>\n{{/unless}}';
174
+ }
175
+ });
176
+
166
177
  // src/components/bs5/banner/banner.hbs?raw
167
178
  var banner_default;
168
179
  var init_banner = __esm({
@@ -199,37 +210,48 @@ var init_breadcrumbsWrapper = __esm({
199
210
  var button_default;
200
211
  var init_button = __esm({
201
212
  "src/components/bs5/button/button.hbs?raw"() {
202
- button_default = `{{#unless islink}}
203
- <button class="btn {{variantClass}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}}>
204
- {{#if iconClass}}
205
- {{#ifCond iconPosition '==' 'leading'}}
206
- <span class="btn-icon {{iconClass}}"></span>
207
- {{/ifCond}}
208
- {{/if}}
209
- {{label}}
210
- {{#if iconClass}}
211
- {{#ifCond iconPosition '==' 'trailing'}}
212
- <span class="btn-icon {{iconClass}}"></span>
213
- {{/ifCond}}
214
- {{/if}}
215
- </button>
213
+ button_default = `{{!-- Button icon partial --}}
214
+ {{#*inline "buttonIcon"~}}
215
+ <span class="btn-icon {{iconClass}} {{iconPosition}}"></span>
216
+ {{~/inline}}
217
+
218
+ {{#unless islink}}
219
+
220
+ <button class="btn {{variantClass}} {{label}}" onclick="{{{onclick}}}" {{#if isdisabled}}disabled{{/if}} {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}}>
221
+ {{#if iconClass~}}
222
+ {{#ifCond iconPosition '==' 'leading'}}
223
+ {{~>buttonIcon~}}
224
+ {{/ifCond}}
225
+ {{/if}}
226
+
227
+ {{~label~}}
228
+
229
+ {{#if iconClass~}}
230
+ {{#ifCond iconPosition '==' 'trailing'}}
231
+ {{>buttonIcon~}}
232
+ {{/ifCond}}
233
+ {{/if}}
234
+ </button>
216
235
 
217
236
  {{else}}
218
237
 
219
- <a class="btn {{variantClass}} {{#if isdisabled}} disabled {{/if}}" {{#if isdisabled}} aria-disabled="true" {{/if}} href="{{href}}" target="{{target}}" {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}}>
220
- {{#if iconClass}}
221
- {{#ifCond iconPosition '==' 'leading'}}
222
- <span class="btn-icon {{iconClass}}"></span>
223
- {{~/ifCond~}}
224
- {{~/if~}}
225
- {{~label~}}
226
- {{#if iconClass}}
227
- {{#ifCond iconPosition '==' 'trailing'}}
228
- <span class="btn-icon {{iconClass}}"></span>
229
- {{/ifCond}}
230
- {{/if}}
231
- </a>
232
- {{/unless }}`;
238
+ <a class="btn {{variantClass}} {{#if isdisabled}} disabled {{/if}}" {{#if isdisabled}}aria-disabled="true"{{/if}} href="{{href}}" target="{{target}}" {{#if arialabel}}aria-label="{{arialabel}}"{{/if}} {{{dataatts}}}>
239
+ {{#if iconClass~}}
240
+ {{#ifCond iconPosition '==' 'leading'}}
241
+ {{~> buttonIcon~}}
242
+ {{/ifCond}}
243
+ {{/if}}
244
+
245
+ {{~label~}}
246
+
247
+ {{#if iconClass~}}
248
+ {{#ifCond iconPosition '==' 'trailing'}}
249
+ {{~> buttonIcon~}}
250
+ {{/ifCond}}
251
+ {{/if}}
252
+ </a>
253
+
254
+ {{/unless}}`;
233
255
  }
234
256
  });
235
257
 
@@ -363,6 +385,14 @@ var init_dateinput = __esm({
363
385
  }
364
386
  });
365
387
 
388
+ // src/components/bs5/directionLinks/directionLinks.hbs?raw
389
+ var directionLinks_default;
390
+ var init_directionLinks = __esm({
391
+ "src/components/bs5/directionLinks/directionLinks.hbs?raw"() {
392
+ directionLinks_default = '{{! valid class values are: up, down, left, right}}\n<a class="qld-dir-link {{class}}" \n {{~#if id}} id="{{id}}" {{/if~}} \n href="{{href}}" \n {{~#if target}} target="{{target}}"{{/if~}}\n {{~#if arialabel}} aria-label="{{arialabel}}" {{/if~}}>\n {{{label}}}\n <span class="icon" aria-hidden="true"></span>\n</a>';
393
+ }
394
+ });
395
+
366
396
  // src/components/bs5/footer/footer.hbs?raw
367
397
  var footer_default;
368
398
  var init_footer = __esm({
@@ -408,7 +438,7 @@ var head_default;
408
438
  var init_head = __esm({
409
439
  "src/components/bs5/head/head.hbs?raw"() {
410
440
  head_default = `
411
- <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"1.1.21","branch":"HEAD","tag":"v1.1.21","commit":"a3f1a8cf0304d6c7f562866d133b170b491e720c","majorVersion":"v1"} -->
441
+ <!-- VERSION_DETAILS={"project_id":"@qld-gov-au/qgds-bootstrap5","version":"1.1.23","branch":"HEAD","tag":"v1.1.23","commit":"7368a2c584a90cba60069072b6d04939847510fa","majorVersion":"v1"} -->
412
442
 
413
443
  {{! Select environment, used verbatium if not using predefind key
414
444
  cdn := PROD|STAGING|BETA|TEST|DEV|???
@@ -651,6 +681,7 @@ var init_video = __esm({
651
681
  // src/js/handlebars.partials.js
652
682
  function handlebarsPartials(handlebars) {
653
683
  handlebars.registerPartial("accordion", accordion_default);
684
+ handlebars.registerPartial("backToTop", backToTop_default);
654
685
  handlebars.registerPartial("banner", banner_default);
655
686
  handlebars.registerPartial("blockquote", blockquote_default);
656
687
  handlebars.registerPartial("breadcrumbs", breadcrumbs_default);
@@ -664,6 +695,7 @@ function handlebarsPartials(handlebars) {
664
695
  handlebars.registerPartial("contentWrapper", contentWrapper_default);
665
696
  handlebars.registerPartial("correctincorrect", correctincorrect_default);
666
697
  handlebars.registerPartial("dateinput", dateinput_default);
698
+ handlebars.registerPartial("directionLinks", directionLinks_default);
667
699
  handlebars.registerPartial("footer", footer_default);
668
700
  handlebars.registerPartial("footerForgov", footerForgov_default);
669
701
  handlebars.registerPartial("formcheck", formcheck_default);
@@ -696,6 +728,7 @@ var init_handlebars_partials = __esm({
696
728
  "src/js/handlebars.partials.js"() {
697
729
  "use strict";
698
730
  init_accordion();
731
+ init_backToTop();
699
732
  init_banner();
700
733
  init_blockquote();
701
734
  init_breadcrumbs();
@@ -709,6 +742,7 @@ var init_handlebars_partials = __esm({
709
742
  init_contentWrapper();
710
743
  init_correctincorrect();
711
744
  init_dateinput();
745
+ init_directionLinks();
712
746
  init_footer();
713
747
  init_footerForgov();
714
748
  init_formcheck();