@designsystem-se/af 39.2.1 → 39.2.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.
Files changed (216) hide show
  1. package/components/digi-bar-chart.js +67 -17
  2. package/components/digi-calendar-datepicker.js +1 -1
  3. package/components/digi-calendar-week-view.js +51 -6
  4. package/components/digi-calendar.js +1 -1
  5. package/components/digi-chart-line.js +57 -14
  6. package/components/digi-expandable-accordion.js +18 -11
  7. package/components/digi-expandable-faq-item.js +21 -14
  8. package/components/digi-info-card.js +3 -3
  9. package/components/digi-navigation-vertical-menu.js +27 -13
  10. package/components/digi-tablist.js +36 -13
  11. package/components/{p-CrUxQ9d0.js → p-C5A2t93y.js} +1 -1
  12. package/custom-elements.json +1 -1
  13. package/dist/cjs/button-size.enum-DgyvMkwE.js +7 -0
  14. package/dist/cjs/{button-variation.enum-ngMqFLdW.js → button-variation.enum-DkUalo9f.js} +0 -6
  15. package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
  16. package/dist/cjs/digi-bar-chart.cjs.entry.js +67 -17
  17. package/dist/cjs/digi-button.cjs.entry.js +131 -0
  18. package/dist/cjs/{digi-button_5.cjs.entry.js → digi-calendar-week-view.cjs.entry.js} +117 -261
  19. package/dist/cjs/{digi-calendar-datepicker.cjs.entry.js → digi-calendar_19.cjs.entry.js} +1611 -55
  20. package/dist/cjs/digi-chart-line.cjs.entry.js +57 -14
  21. package/dist/cjs/digi-code-block_3.cjs.entry.js +6 -12
  22. package/dist/cjs/digi-code-example.cjs.entry.js +4 -3
  23. package/dist/cjs/digi-dialog.cjs.entry.js +6 -12
  24. package/dist/cjs/digi-footer.cjs.entry.js +5 -11
  25. package/dist/cjs/digi-form-error-list.cjs.entry.js +5 -11
  26. package/dist/cjs/digi-form-file-upload.cjs.entry.js +9 -10
  27. package/dist/cjs/digi-form-input-search.cjs.entry.js +5 -6
  28. package/dist/cjs/digi-form-receipt.cjs.entry.js +5 -11
  29. package/dist/cjs/digi-form-select-filter.cjs.entry.js +6 -12
  30. package/dist/cjs/digi-header-navigation.cjs.entry.js +5 -11
  31. package/dist/cjs/digi-header.cjs.entry.js +5 -11
  32. package/dist/cjs/digi-info-card.cjs.entry.js +3 -3
  33. package/dist/cjs/digi-navigation-pagination.cjs.entry.js +5 -11
  34. package/dist/cjs/digi-navigation-vertical-menu.cjs.entry.js +27 -13
  35. package/dist/cjs/digi-notification-alert.cjs.entry.js +5 -11
  36. package/dist/cjs/digi-notification-error-page.cjs.entry.js +5 -11
  37. package/dist/cjs/digi-tablist.cjs.entry.js +36 -13
  38. package/dist/cjs/digi-title-logo.cjs.entry.js +5 -11
  39. package/dist/cjs/digi-tools-feedback.cjs.entry.js +7 -13
  40. package/dist/cjs/{form-input-type.enum-DvF_MTHK.js → form-input-type.enum-CCCcY8gv.js} +7 -0
  41. package/dist/cjs/{form-file-upload-variation.enum-xcEOoggr.js → form-validation-message-variation.enum-DgkifAnP.js} +7 -0
  42. package/dist/cjs/index-Cn1hHaSy.js +6 -42
  43. package/dist/cjs/{index-Bdlw-Iuy.js → index-DUQtADgG.js} +189 -19
  44. package/dist/cjs/index.cjs.js +59 -65
  45. package/dist/cjs/loader.cjs.js +1 -1
  46. package/dist/cjs/{typography-variation.enum-BDSt7CVI.js → typography-variation.enum-CVUvogxJ.js} +86 -0
  47. package/dist/collection/components/_calendar/calendar/calendar.css +5 -6
  48. package/dist/collection/components/_calendar/week-view/calendar-week-view.js +53 -8
  49. package/dist/collection/components/_chart/bar-chart/bar-chart.css +1 -1
  50. package/dist/collection/components/_chart/bar-chart/bar-chart.js +66 -16
  51. package/dist/collection/components/_chart/chart-line/chart-line.js +57 -14
  52. package/dist/collection/components/_expandable/expandable-accordion/expandable-accordion.js +18 -11
  53. package/dist/collection/components/_expandable/expandable-faq-item/expandable-faq-item.js +21 -14
  54. package/dist/collection/components/_info-card/info-card/info-card.js +5 -5
  55. package/dist/collection/components/_navigation/navigation-tablist/navigation-tablist.js +36 -13
  56. package/dist/collection/components/_navigation/navigation-vertical-menu/navigation-vertical-menu.js +27 -13
  57. package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
  58. package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
  59. package/dist/digi-arbetsformedlingen/p-0230ec9b.entry.js +1 -0
  60. package/dist/digi-arbetsformedlingen/p-04bbbd14.entry.js +1 -0
  61. package/dist/digi-arbetsformedlingen/p-0cf25433.entry.js +1 -0
  62. package/dist/digi-arbetsformedlingen/p-17824a0b.entry.js +1 -0
  63. package/dist/digi-arbetsformedlingen/p-25815f15.entry.js +1 -0
  64. package/dist/digi-arbetsformedlingen/p-3d4ac22e.entry.js +1 -0
  65. package/dist/digi-arbetsformedlingen/p-47513f97.entry.js +1 -0
  66. package/dist/digi-arbetsformedlingen/p-4aefce1e.entry.js +1 -0
  67. package/dist/digi-arbetsformedlingen/p-6e256f0c.entry.js +1 -0
  68. package/dist/digi-arbetsformedlingen/p-870a00f8.entry.js +1 -0
  69. package/dist/digi-arbetsformedlingen/p-88dc2ed4.entry.js +1 -0
  70. package/dist/digi-arbetsformedlingen/p-9n7Okhf1.js +1 -0
  71. package/dist/digi-arbetsformedlingen/p-C6S1HfeA.js +1 -0
  72. package/dist/digi-arbetsformedlingen/p-C7xgnp99.js +1 -0
  73. package/dist/digi-arbetsformedlingen/p-Cnyfh_8_.js +1 -0
  74. package/dist/digi-arbetsformedlingen/p-Zivp2NJB.js +1 -0
  75. package/dist/digi-arbetsformedlingen/p-a1deddb1.entry.js +1 -0
  76. package/dist/digi-arbetsformedlingen/p-a29b6fff.entry.js +1 -0
  77. package/dist/digi-arbetsformedlingen/{p-375ea6f8.entry.js → p-ace2e5fd.entry.js} +1 -1
  78. package/dist/digi-arbetsformedlingen/p-b411a549.entry.js +1 -0
  79. package/dist/digi-arbetsformedlingen/p-b7712996.entry.js +1 -0
  80. package/dist/digi-arbetsformedlingen/p-bfccf413.entry.js +1 -0
  81. package/dist/digi-arbetsformedlingen/p-cdd65abb.entry.js +1 -0
  82. package/dist/digi-arbetsformedlingen/p-d4406627.entry.js +1 -0
  83. package/dist/digi-arbetsformedlingen/p-dd95c75e.entry.js +1 -0
  84. package/dist/digi-arbetsformedlingen/p-e5396b1e.entry.js +1 -0
  85. package/dist/digi-arbetsformedlingen/p-e7c10f6a.entry.js +1 -0
  86. package/dist/digi-arbetsformedlingen/p-f91295ac.entry.js +1 -0
  87. package/dist/digi-arbetsformedlingen/p-ffb4fac6.entry.js +1 -0
  88. package/dist/digi-arbetsformedlingen/p-y5Nm4oWF.js +1 -0
  89. package/dist/esm/button-size.enum-C7xgnp99.js +7 -0
  90. package/dist/esm/{button-variation.enum-BMQm4N5I.js → button-variation.enum-y5Nm4oWF.js} +1 -7
  91. package/dist/esm/digi-arbetsformedlingen.js +1 -1
  92. package/dist/esm/digi-bar-chart.entry.js +67 -17
  93. package/dist/esm/digi-button.entry.js +129 -0
  94. package/dist/esm/{digi-button_5.entry.js → digi-calendar-week-view.entry.js} +56 -196
  95. package/dist/esm/{digi-calendar-datepicker.entry.js → digi-calendar_19.entry.js} +1555 -17
  96. package/dist/esm/digi-chart-line.entry.js +57 -14
  97. package/dist/esm/digi-code-block_3.entry.js +5 -11
  98. package/dist/esm/digi-code-example.entry.js +2 -1
  99. package/dist/esm/digi-dialog.entry.js +5 -11
  100. package/dist/esm/digi-footer.entry.js +5 -11
  101. package/dist/esm/digi-form-error-list.entry.js +5 -11
  102. package/dist/esm/digi-form-file-upload.entry.js +1 -2
  103. package/dist/esm/digi-form-input-search.entry.js +1 -2
  104. package/dist/esm/digi-form-receipt.entry.js +5 -11
  105. package/dist/esm/digi-form-select-filter.entry.js +5 -11
  106. package/dist/esm/digi-header-navigation.entry.js +5 -11
  107. package/dist/esm/digi-header.entry.js +5 -11
  108. package/dist/esm/digi-info-card.entry.js +3 -3
  109. package/dist/esm/digi-navigation-pagination.entry.js +5 -11
  110. package/dist/esm/digi-navigation-vertical-menu.entry.js +27 -13
  111. package/dist/esm/digi-notification-alert.entry.js +5 -11
  112. package/dist/esm/digi-notification-error-page.entry.js +5 -11
  113. package/dist/esm/digi-tablist.entry.js +37 -14
  114. package/dist/esm/digi-title-logo.entry.js +5 -11
  115. package/dist/esm/digi-tools-feedback.entry.js +5 -11
  116. package/dist/esm/{form-input-type.enum-BSJH8Lpg.js → form-input-type.enum-C6S1HfeA.js} +8 -1
  117. package/dist/esm/{form-file-upload-variation.enum-BfyJgcLA.js → form-validation-message-variation.enum-9n7Okhf1.js} +8 -1
  118. package/dist/esm/index-BnKuq1L7.js +6 -42
  119. package/dist/esm/{index-B1Je6g2n.js → index-Cnyfh_8_.js} +170 -3
  120. package/dist/esm/index.js +5 -11
  121. package/dist/esm/loader.js +1 -1
  122. package/dist/esm/{typography-variation.enum-4smNltRI.js → typography-variation.enum-Zivp2NJB.js} +87 -1
  123. package/dist/types/components/_calendar/week-view/calendar-week-view.d.ts +4 -2
  124. package/dist/types/components/_chart/bar-chart/bar-chart.d.ts +4 -2
  125. package/dist/types/components/_chart/chart-line/chart-line.d.ts +3 -1
  126. package/dist/types/components/_info-card/info-card/info-card.d.ts +2 -2
  127. package/dist/types/components/_navigation/navigation-tablist/navigation-tablist.d.ts +4 -2
  128. package/dist/types/components/_navigation/navigation-vertical-menu/navigation-vertical-menu.d.ts +7 -2
  129. package/dist/types/components.d.ts +7 -7
  130. package/hydrate/index.js +278 -92
  131. package/hydrate/index.mjs +278 -92
  132. package/package.json +1 -1
  133. package/dist/cjs/digi-calendar_2.cjs.entry.js +0 -490
  134. package/dist/cjs/digi-expandable-accordion.cjs.entry.js +0 -121
  135. package/dist/cjs/digi-expandable-faq-item.cjs.entry.js +0 -119
  136. package/dist/cjs/digi-form-input.cjs.entry.js +0 -205
  137. package/dist/cjs/digi-form-label_3.cjs.entry.js +0 -147
  138. package/dist/cjs/digi-form-select_2.cjs.entry.js +0 -201
  139. package/dist/cjs/digi-icon-chevron-down.cjs.entry.js +0 -28
  140. package/dist/cjs/digi-icon-validation-error_2.cjs.entry.js +0 -51
  141. package/dist/cjs/digi-typography-heading-jumbo.cjs.entry.js +0 -46
  142. package/dist/cjs/digi-util-keydown-handler.cjs.entry.js +0 -81
  143. package/dist/cjs/expandable-accordion-header-level.enum-CjL9V3Kt.js +0 -11
  144. package/dist/cjs/expandable-faq-item-variation.enum-aKkYAQgd.js +0 -18
  145. package/dist/cjs/form-input-search-variation.enum-VVfvlVeM.js +0 -8
  146. package/dist/cjs/form-input-variation.enum-kpoXNUuI.js +0 -29
  147. package/dist/cjs/form-select-variation.enum-e6wjWyaS.js +0 -16
  148. package/dist/cjs/form-validation-message-variation.enum-BA5nmCiw.js +0 -8
  149. package/dist/cjs/index-Snltmefx.js +0 -174
  150. package/dist/cjs/index-r0sb9TCr.js +0 -66
  151. package/dist/cjs/typography-heading-jumbo-variation.enum-Di1Jeh0G.js +0 -17
  152. package/dist/digi-arbetsformedlingen/p-037a35bd.entry.js +0 -1
  153. package/dist/digi-arbetsformedlingen/p-09b52191.entry.js +0 -1
  154. package/dist/digi-arbetsformedlingen/p-0c88f210.entry.js +0 -1
  155. package/dist/digi-arbetsformedlingen/p-151248bf.entry.js +0 -1
  156. package/dist/digi-arbetsformedlingen/p-26099889.entry.js +0 -1
  157. package/dist/digi-arbetsformedlingen/p-3239fb1a.entry.js +0 -1
  158. package/dist/digi-arbetsformedlingen/p-3c1f9629.entry.js +0 -1
  159. package/dist/digi-arbetsformedlingen/p-4ddcae7b.entry.js +0 -1
  160. package/dist/digi-arbetsformedlingen/p-4smNltRI.js +0 -1
  161. package/dist/digi-arbetsformedlingen/p-52a27991.entry.js +0 -1
  162. package/dist/digi-arbetsformedlingen/p-626c1bf5.entry.js +0 -1
  163. package/dist/digi-arbetsformedlingen/p-674a7a94.entry.js +0 -1
  164. package/dist/digi-arbetsformedlingen/p-6931825c.entry.js +0 -1
  165. package/dist/digi-arbetsformedlingen/p-6c1fd994.entry.js +0 -1
  166. package/dist/digi-arbetsformedlingen/p-7682ad6f.entry.js +0 -1
  167. package/dist/digi-arbetsformedlingen/p-7688502e.entry.js +0 -1
  168. package/dist/digi-arbetsformedlingen/p-7f180ce2.entry.js +0 -1
  169. package/dist/digi-arbetsformedlingen/p-88bec555.entry.js +0 -1
  170. package/dist/digi-arbetsformedlingen/p-91265ee0.entry.js +0 -1
  171. package/dist/digi-arbetsformedlingen/p-9a4eecde.entry.js +0 -1
  172. package/dist/digi-arbetsformedlingen/p-B8hpiXmh.js +0 -1
  173. package/dist/digi-arbetsformedlingen/p-BMQm4N5I.js +0 -1
  174. package/dist/digi-arbetsformedlingen/p-BSJH8Lpg.js +0 -1
  175. package/dist/digi-arbetsformedlingen/p-BfyJgcLA.js +0 -1
  176. package/dist/digi-arbetsformedlingen/p-BixPaBHw.js +0 -1
  177. package/dist/digi-arbetsformedlingen/p-BvWKyXb_.js +0 -1
  178. package/dist/digi-arbetsformedlingen/p-C6B2KRZo.js +0 -1
  179. package/dist/digi-arbetsformedlingen/p-CgSR-RTl.js +0 -1
  180. package/dist/digi-arbetsformedlingen/p-DCS1KcvC.js +0 -1
  181. package/dist/digi-arbetsformedlingen/p-DNjGvZvz.js +0 -1
  182. package/dist/digi-arbetsformedlingen/p-DfWZa2Wv.js +0 -1
  183. package/dist/digi-arbetsformedlingen/p-DwNlf6Sh.js +0 -1
  184. package/dist/digi-arbetsformedlingen/p-a556608d.entry.js +0 -1
  185. package/dist/digi-arbetsformedlingen/p-a9a1bf57.entry.js +0 -1
  186. package/dist/digi-arbetsformedlingen/p-b3410fbd.entry.js +0 -1
  187. package/dist/digi-arbetsformedlingen/p-d07a1377.entry.js +0 -1
  188. package/dist/digi-arbetsformedlingen/p-d0b3c35b.entry.js +0 -1
  189. package/dist/digi-arbetsformedlingen/p-e002ceb8.entry.js +0 -1
  190. package/dist/digi-arbetsformedlingen/p-e6ee5a17.entry.js +0 -1
  191. package/dist/digi-arbetsformedlingen/p-e7b311da.entry.js +0 -1
  192. package/dist/digi-arbetsformedlingen/p-ec6dd177.entry.js +0 -1
  193. package/dist/digi-arbetsformedlingen/p-ee58a938.entry.js +0 -1
  194. package/dist/digi-arbetsformedlingen/p-eee1b91f.entry.js +0 -1
  195. package/dist/digi-arbetsformedlingen/p-fea63204.entry.js +0 -1
  196. package/dist/digi-arbetsformedlingen/p-ff73fa2f.entry.js +0 -1
  197. package/dist/digi-arbetsformedlingen/p-xwICssEK.js +0 -1
  198. package/dist/esm/digi-calendar_2.entry.js +0 -487
  199. package/dist/esm/digi-expandable-accordion.entry.js +0 -119
  200. package/dist/esm/digi-expandable-faq-item.entry.js +0 -117
  201. package/dist/esm/digi-form-input.entry.js +0 -203
  202. package/dist/esm/digi-form-label_3.entry.js +0 -143
  203. package/dist/esm/digi-form-select_2.entry.js +0 -198
  204. package/dist/esm/digi-icon-chevron-down.entry.js +0 -26
  205. package/dist/esm/digi-icon-validation-error_2.entry.js +0 -48
  206. package/dist/esm/digi-typography-heading-jumbo.entry.js +0 -44
  207. package/dist/esm/digi-util-keydown-handler.entry.js +0 -79
  208. package/dist/esm/expandable-accordion-header-level.enum-DwNlf6Sh.js +0 -11
  209. package/dist/esm/expandable-faq-item-variation.enum-C6B2KRZo.js +0 -18
  210. package/dist/esm/form-input-search-variation.enum-BvWKyXb_.js +0 -8
  211. package/dist/esm/form-input-variation.enum-DfWZa2Wv.js +0 -29
  212. package/dist/esm/form-select-variation.enum-DCS1KcvC.js +0 -16
  213. package/dist/esm/form-validation-message-variation.enum-B8hpiXmh.js +0 -8
  214. package/dist/esm/index-BixPaBHw.js +0 -170
  215. package/dist/esm/index-BsIL3T_0.js +0 -63
  216. package/dist/esm/typography-heading-jumbo-variation.enum-DNjGvZvz.js +0 -17
@@ -60,17 +60,21 @@ export class ExpandableAccordion {
60
60
  componentDidLoad() {
61
61
  const content = this.hostElement.querySelector(`#${this.afId}-content`);
62
62
  if (!this.afExpanded) {
63
- content.setAttribute('style', 'visibility: hidden;');
63
+ content.style.visibility = 'hidden';
64
64
  }
65
65
  else {
66
- content.setAttribute('style', 'height: auto;');
66
+ content.style.overflowY = 'inherit';
67
+ content.style.height = 'auto';
67
68
  }
68
69
  content.addEventListener('transitionend', () => {
69
70
  if (!this.afExpanded) {
70
- content.setAttribute('style', 'visibility: hidden; height: ' + 0 + 'px');
71
+ content.style.visibility = 'hidden';
72
+ content.style.height = '0px';
73
+ }
74
+ else {
75
+ content.style.height = 'auto';
76
+ content.style.overflowY = 'inherit';
71
77
  }
72
- else
73
- content.setAttribute('style', 'height: auto');
74
78
  });
75
79
  }
76
80
  animateContentHeight() {
@@ -78,22 +82,25 @@ export class ExpandableAccordion {
78
82
  const sectionHeight = content.firstElementChild
79
83
  .offsetHeight;
80
84
  if (!this.afExpanded && content.style.height === 'auto') {
81
- content.setAttribute('style', 'height: ' + sectionHeight + 'px');
85
+ content.style.height = sectionHeight + 'px';
82
86
  setTimeout(() => {
83
- content.setAttribute('style', 'height: 0');
87
+ content.style.height = '0';
88
+ content.style.overflowY = 'hidden';
84
89
  });
85
90
  return;
86
91
  }
87
92
  if (this.afExpanded) {
88
- content.setAttribute('style', 'visibility: visible; height:' + sectionHeight + 'px');
93
+ content.style.height = sectionHeight + 'px';
94
+ content.style.visibility = 'visible';
89
95
  if (!this.afAnimation) {
90
96
  setTimeout(() => {
91
- content.setAttribute('style', 'height: auto');
97
+ content.style.height = 'auto';
98
+ content.style.overflowY = 'inherit';
92
99
  });
93
100
  }
94
101
  }
95
102
  else {
96
- content.setAttribute('style', 'height: ' + 0 + 'px');
103
+ content.style.height = '0px';
97
104
  }
98
105
  }
99
106
  clickToggleHandler(e, resetFocus = false) {
@@ -105,7 +112,7 @@ export class ExpandableAccordion {
105
112
  this.afOnClick.emit(e);
106
113
  }
107
114
  render() {
108
- return (h("article", { key: '25e76d66020522814e7777c139c6206b1c103d4e', "aria-expanded": this.afExpanded ? 'true' : 'false', class: Object.assign({ 'digi-expandable-accordion': true }, this.cssModifiers) }, h("header", { key: '2265191f9ad2394befad5da1bdf51cd758d4adba', class: "digi-expandable-accordion__header" }, h(this.afHeadingLevel, { key: '4a26fe5cd756612c36b48a9b04abcff54ba70941', class: "digi-expandable-accordion__heading" }, h("button", { key: '8bb8e9ba1f25650b88f6fc0d26b9c94af9510eee', type: "button", class: "digi-expandable-accordion__button", onClick: (e) => this.clickToggleHandler(e), "aria-expanded": this.afExpanded ? 'true' : 'false', "aria-controls": `${this.afId}-content`, ref: (el) => (this._button = el) }, h("digi-icon-chevron-down", { key: '2b86e033967c20cecc33b34185826b06ab4189e4', class: "digi-expandable-accordion__toggle-icon" }), h("div", { key: '8d3d486567b4e073818b35e77a8f5be92ea3cdef', class: "digi-expandable-accordion__heading-text" }, this.afHeading)))), h("section", { key: '764b758a0bd68b7a02581f620dc8204b517fa991', class: "digi-expandable-accordion__content", id: `${this.afId}-content` }, h("div", { key: 'bad7d77ef14b2edcd80e54d52ffde7bf429caa59' }, h("digi-typography", { key: '15c4a8abc0f50f3521c0a9b39aeb06ce194e4a3b' }, h("slot", { key: '0718dba75edfab31158aec6bf04a8b2bfc60463e' }))))));
115
+ return (h("article", { key: '2616819e45750577fb23f430d41b2787ca2210a5', "aria-expanded": this.afExpanded ? 'true' : 'false', class: Object.assign({ 'digi-expandable-accordion': true }, this.cssModifiers) }, h("header", { key: 'c77c15183eb4bba670ea2299d5dc3c19e243ea42', class: "digi-expandable-accordion__header" }, h(this.afHeadingLevel, { key: '20dc16774240b6d258eec3d94d4b5d9b9d0a735c', class: "digi-expandable-accordion__heading" }, h("button", { key: '23c45158f203517166cd4c5efe8801b849ea04e0', type: "button", class: "digi-expandable-accordion__button", onClick: (e) => this.clickToggleHandler(e), "aria-expanded": this.afExpanded ? 'true' : 'false', "aria-controls": `${this.afId}-content`, ref: (el) => (this._button = el) }, h("digi-icon-chevron-down", { key: 'bd48367111a6aac92061bda052ffb6708d4f3967', class: "digi-expandable-accordion__toggle-icon" }), h("div", { key: '2e419d3fd48aa8fd31f33012b541a0fd86e60d78', class: "digi-expandable-accordion__heading-text" }, this.afHeading)))), h("section", { key: 'a28657a14024836c9bb1c7e825c573ed6c598eca', class: "digi-expandable-accordion__content", id: `${this.afId}-content` }, h("div", { key: 'e13b9e653c1714adefd5401300789ed89d4cc1b3' }, h("digi-typography", { key: '335442cf9f97ec3f821ab2ca296e1539b24354cf' }, h("slot", { key: '05da2edf48d9259187bb72bf73a6c60ec9077bc0' }))))));
109
116
  }
110
117
  static get is() { return "digi-expandable-accordion"; }
111
118
  static get encapsulation() { return "scoped"; }
@@ -56,17 +56,21 @@ export class ExpandableFaqItem {
56
56
  componentDidLoad() {
57
57
  const content = this.hostElement.querySelector(`#${this.afId}-content`);
58
58
  if (!this.afExpanded) {
59
- content.setAttribute('style', 'visibility: hidden;');
59
+ content.style.visibility = 'hidden';
60
60
  }
61
61
  else {
62
- content.setAttribute('style', 'height: auto;');
62
+ content.style.height = 'auto';
63
+ content.style.overflowY = 'inherit';
63
64
  }
64
65
  content.addEventListener('transitionend', () => {
65
66
  if (!this.afExpanded) {
66
- content.setAttribute('style', 'visibility: hidden; height: ' + 0 + 'px');
67
+ content.style.visibility = 'hidden';
68
+ content.style.height = '0px';
69
+ }
70
+ else {
71
+ content.style.height = 'auto';
72
+ content.style.overflowY = 'inherit';
67
73
  }
68
- else
69
- content.setAttribute('style', 'height: auto');
70
74
  });
71
75
  }
72
76
  animateContentHeight() {
@@ -74,37 +78,40 @@ export class ExpandableFaqItem {
74
78
  const sectionHeight = content.firstElementChild
75
79
  .offsetHeight;
76
80
  if (!this.afExpanded && content.style.height === 'auto') {
77
- content.setAttribute('style', 'height: ' + sectionHeight + 'px');
81
+ content.style.height = sectionHeight + 'px';
78
82
  setTimeout(() => {
79
- content.setAttribute('style', 'height: 0');
83
+ content.style.height = '0';
84
+ content.style.overflowY = 'hidden';
80
85
  });
81
86
  return;
82
87
  }
83
88
  if (this.afExpanded) {
84
- content.setAttribute('style', 'visibility: visible; height:' + sectionHeight + 'px');
89
+ content.style.height = sectionHeight + 'px';
90
+ content.style.visibility = 'visible';
85
91
  if (!this.afAnimation) {
86
92
  setTimeout(() => {
87
- content.setAttribute('style', 'height: auto');
93
+ content.style.height = 'auto';
94
+ content.style.overflowY = 'inherit';
88
95
  });
89
96
  }
90
97
  }
91
98
  else {
92
- content.setAttribute('style', 'height: ' + 0 + 'px');
99
+ content.style.height = '0px';
93
100
  }
94
101
  }
95
102
  render() {
96
- return (h("article", { key: '6d3c64be92f3bf878a6319f8bc6a74b944b9621d', "aria-expanded": this.afExpanded ? 'true' : 'false', class: Object.assign({ 'digi-expandable-faq-item': true }, this.cssModifiers) }, h("header", { key: '7c2929a9fbef5158ba44cc9822cd4592072fdeb1', class: "digi-expandable-faq-item__header" }, h(this.afHeadingLevel, { key: '79e19f80b947765f4ec9e342849ebfef121f1694' }, h("button", { key: 'e08fe43a72da2004e977ecad16383100de0b49c7', type: "button", class: "digi-expandable-faq-item__button", onClick: (e) => {
103
+ return (h("article", { key: 'e0931c4256d2c4162911fe232132b6179968425f', "aria-expanded": this.afExpanded ? 'true' : 'false', class: Object.assign({ 'digi-expandable-faq-item': true }, this.cssModifiers) }, h("header", { key: '8f6befff5c82c63d5d1f10755f444791f17dafb7', class: "digi-expandable-faq-item__header" }, h(this.afHeadingLevel, { key: 'b9d58dcd28eb430d7b84365ba1bba99d3e86ebc9' }, h("button", { key: 'b2c20566cc84a2b4cbcbe2dcc2a35e44e8f0fcc9', type: "button", class: "digi-expandable-faq-item__button", onClick: (e) => {
97
104
  e.preventDefault();
98
105
  this.afExpanded = !this.afExpanded;
99
106
  this.afOnClick.emit(e);
100
- }, "aria-expanded": this.afExpanded ? 'true' : 'false', "aria-controls": `${this.afId}-content` }, h("digi-icon-chevron-down", { key: '245e1d2578b3e15d0fc83aaf82ca5b19a292ab20', class: {
107
+ }, "aria-expanded": this.afExpanded ? 'true' : 'false', "aria-controls": `${this.afId}-content` }, h("digi-icon-chevron-down", { key: '40e0a896b3d7d44bf282e8462a24c43060a29eff', class: {
101
108
  'digi-expandable-faq-item__header--toggle-icon': true,
102
109
  'digi-expandable-faq-item__header--toggle-icon--expanded': this.afExpanded
103
- } }), h("div", { key: '6b37c5b10fee03cb1e8fbaebf4afa879131fef08', class: "digi-expandable-faq-item__header-text" }, this.afHeading)))), h("section", { key: '5d0083596a6a9d8dc17db3814dd7fc5b7672def1', class: {
110
+ } }), h("div", { key: 'f58aa361553f3063bf1e5171f8d320e6cb8189c6', class: "digi-expandable-faq-item__header-text" }, this.afHeading)))), h("section", { key: 'b4d0dd00a3e6fe9e8367ef5a6f197696de55f4fd', class: {
104
111
  'digi-expandable-faq-item__content': true,
105
112
  'digi-expandable-faq-item__content--animation': this.afAnimation,
106
113
  'digi-expandable-faq-item__content--hidden': !this.afExpanded
107
- }, id: `${this.afId}-content` }, h("div", { key: '1c11f15e328118a0adc6c5fb0cb88b7c8f3b8470' }, h("digi-typography", { key: '0253266ad670b87a5a9291101d965899f14f0b16' }, h("slot", { key: '7c277acd32d84ccc6b1c14913aebde586a2ea148' }))))));
114
+ }, id: `${this.afId}-content` }, h("div", { key: 'e9a9147164d3934584cd5da5cfc8080ba9374c76' }, h("digi-typography", { key: '398a0c4e0aa1092db5f4a2e3182218ebbe0c3624' }, h("slot", { key: 'be924dc541b7c41b19b4392d3a988b492144d585' }))))));
108
115
  }
109
116
  static get is() { return "digi-expandable-faq-item"; }
110
117
  static get encapsulation() { return "scoped"; }
@@ -30,8 +30,8 @@ export class InfoCard {
30
30
  */
31
31
  this.afBorderPosition = InfoCardBorderPosition.TOP;
32
32
  /**
33
- * Sätter variant. Kan vara 'primary' eller 'secondary'. Detta har endast genomslag om 'af-type' är 'tip'.
34
- * @en Set info card variation. Can be 'primary' or 'secondary'. This only applies if 'af-type' is 'tip'.
33
+ * Sätter variant. Kan vara 'primary' eller 'secondary'.
34
+ * @en Set info card variation. Can be 'primary' or 'secondary'.
35
35
  */
36
36
  this.afVariation = InfoCardVariation.PRIMARY;
37
37
  this.activeLink = false;
@@ -77,7 +77,7 @@ export class InfoCard {
77
77
  };
78
78
  }
79
79
  render() {
80
- return (h("div", { key: 'fbdeac4da7aa22626349c61b243f10b6a4bd3d42', class: Object.assign({ 'digi-info-card': true }, this.cssModifiers) }, h("div", { key: '44772e768e3bc80a7a5a20b7858d6970070f27db', class: "digi-info-card__content" }, h("div", { key: 'e770035d77564f3a57a39c553631d37d1c278626', class: "digi-info-card__icon" }, this.hasListIcon && (h("span", { key: '68e4ad4d7b050ac36c23647f7a65cc6b059e20d2', class: "digi-info-card__icon" }, h("slot", { key: 'a8550b30fdb6e31dbb8e9d02bb4275f0d74bf73c', name: "icon" })))), h(this.afHeadingLevel, { key: '9f4d71156595099a0825c586ae533e89ef0028a1', class: "digi-info-card__heading" }, this.afHeading), h("digi-typography", { key: '915eb7c59aba9eaa9cf36a6af281ec31c17fe77e' }, h("slot", { key: '72c6ddf7f4ec870b670183e6f2b844ec46116aaf' })), this.shouldRenderInternalLink && (h("digi-link-internal", { key: '0ad0f534ef93d7743f2a93dc21edd9bdf423548b', class: "digi-info-card__link", afHref: this.afLinkHref, onAfOnClick: (e) => this.clickLinkHandler(e), hideVisitedColor: this.hideVisitedColor }, this.afLinkText)))));
80
+ return (h("div", { key: '56dc89fe307963c3088b9e8301700a5e29d36c22', class: Object.assign({ 'digi-info-card': true }, this.cssModifiers) }, h("div", { key: '504c5b7810f922a55ef5c887b24432a3ccb9ea78', class: "digi-info-card__content" }, h("div", { key: '6adb959fadb3c8a8182e0176cca3fd02686fadfb', class: "digi-info-card__icon" }, this.hasListIcon && (h("span", { key: '3a9c35f22e32d4b30dbcc0614c602541a7349fac', class: "digi-info-card__icon" }, h("slot", { key: '601de5d168bad7d3615c8d35b8dd464a392aef6c', name: "icon" })))), h(this.afHeadingLevel, { key: 'f6006f419904c85a05ea8efa3933b32c9373b655', class: "digi-info-card__heading" }, this.afHeading), h("digi-typography", { key: '3858f2e16f6b33a9f9bd72278c199ebc5b32e762' }, h("slot", { key: '5b0c1cc00581490aa189a5dd31a7d13f05ef6ce5' })), this.shouldRenderInternalLink && (h("digi-link-internal", { key: 'fcc04567e624c939c30c27dec8d3fd58fe0042eb', class: "digi-info-card__link", afHref: this.afLinkHref, onAfOnClick: (e) => this.clickLinkHandler(e), hideVisitedColor: this.hideVisitedColor }, this.afLinkText)))));
81
81
  }
82
82
  static get is() { return "digi-info-card"; }
83
83
  static get encapsulation() { return "scoped"; }
@@ -254,9 +254,9 @@ export class InfoCard {
254
254
  "docs": {
255
255
  "tags": [{
256
256
  "name": "en",
257
- "text": "Set info card variation. Can be 'primary' or 'secondary'. This only applies if 'af-type' is 'tip'."
257
+ "text": "Set info card variation. Can be 'primary' or 'secondary'."
258
258
  }],
259
- "text": "S\u00E4tter variant. Kan vara 'primary' eller 'secondary'. Detta har endast genomslag om 'af-type' \u00E4r 'tip'."
259
+ "text": "S\u00E4tter variant. Kan vara 'primary' eller 'secondary'."
260
260
  },
261
261
  "getter": false,
262
262
  "setter": false,
@@ -98,14 +98,10 @@ export class NavigationTablist {
98
98
  }
99
99
  }
100
100
  syncPanels() {
101
- // side-effect
102
- if (this.panelsRef != null) {
103
- const panels = this.panelsRef.querySelectorAll(':scope>digi-tablist-panel');
104
- for (let i = 0; i < panels.length; i++) {
105
- const panel = panels[i];
106
- const showPanel = panel.tab === this.tabs[this.activeTab].id;
107
- panel.isVisible = showPanel;
108
- }
101
+ var _a;
102
+ const activeId = (_a = this.tabs[this.activeTab]) === null || _a === void 0 ? void 0 : _a.id;
103
+ for (const panel of this.getSlottedPanels()) {
104
+ panel.isVisible = panel.tab === activeId;
109
105
  }
110
106
  }
111
107
  handleTabPropChange(tabId) {
@@ -136,6 +132,11 @@ export class NavigationTablist {
136
132
  this.windowTab = tabIdx;
137
133
  }
138
134
  setupTabs(tabs) {
135
+ // Angular/React can connect the element before afTabs is set.
136
+ if (tabs == null || tabs === '') {
137
+ return;
138
+ }
139
+ const hadTabs = this.tabs.length > 0;
139
140
  if (typeof tabs === 'string') {
140
141
  this.tabs = JSON.parse(tabs);
141
142
  }
@@ -145,6 +146,13 @@ export class NavigationTablist {
145
146
  else {
146
147
  throw new Error('Invalid format or no tabs supplied');
147
148
  }
149
+ if (!hadTabs) {
150
+ this.setupInitialTab();
151
+ }
152
+ this.syncPanels();
153
+ }
154
+ getSlottedPanels() {
155
+ return Array.from(this.hostElement.querySelectorAll('digi-tablist-panel')).filter((panel) => panel.closest('digi-tablist') === this.hostElement);
148
156
  }
149
157
  setActiveTabById(id) {
150
158
  const tabIdx = this.tabs.findIndex((tab) => tab.id === id);
@@ -212,9 +220,23 @@ export class NavigationTablist {
212
220
  componentWillLoad() {
213
221
  this.setupTabs(this.afTabs);
214
222
  this.setupInitialTab();
223
+ // Angular attaches the host first and binds `[afTabs]` on the next frame
224
+ // (Stencil 4.36+). @Watch skips that first assignment, so if tabs are not
225
+ // here yet, wait one frame. React/vanilla that already set the prop skip
226
+ // the delay.
227
+ if (this.tabs.length === 0) {
228
+ return new Promise((resolve) => {
229
+ requestAnimationFrame(() => {
230
+ this.setupTabs(this.afTabs);
231
+ this.setupInitialTab();
232
+ resolve();
233
+ });
234
+ });
235
+ }
215
236
  }
216
237
  componentDidLoad() {
217
238
  var _a, _b, _c;
239
+ this.setupTabs(this.afTabs);
218
240
  // Also listen to window resize for viewport zoom changes
219
241
  if (window) {
220
242
  window.addEventListener('resize', this.handleResize, { passive: true });
@@ -236,14 +258,14 @@ export class NavigationTablist {
236
258
  cancelAnimationFrame(this._requestAnimationFrame);
237
259
  }
238
260
  render() {
239
- return (h(Host, { key: '8bdab05cd034b9940aefcb9f38b16d09b6f0b0c7' }, h("div", { key: '2d2266a9600dcc5817130ed4ece38868779e0b69', class: {
261
+ return (h(Host, { key: 'b2d71ff4b3f2c2fa22feffbc298360c1b3202b1d' }, h("div", { key: 'df48ffc9fdabfca380675c7232af5fef80c445b9', class: {
240
262
  'digi-tablist': true,
241
263
  'digi-tablist--overflow-scroll': this.afOverflowMode === OverflowMode.Scroll,
242
264
  'digi-tablist--overflow-controls': this.afOverflowMode === OverflowMode.Controls
243
- } }, h("div", { key: 'a96cd5d9a2eec5b2b52f0d1a00b2810c28e8d4bd', class: "control-wrapper", style: {
265
+ } }, h("div", { key: '797f70a00aa1e3dd8a3b54d43808b9515259723c', class: "control-wrapper", style: {
244
266
  left: '0',
245
267
  visibility: this.showPrev ? 'visible' : 'hidden'
246
- } }, h("button", { key: '7a9810781c300bd44aa7ce3f3f76f651b1799023', tabIndex: -1, type: "button", "aria-hidden": "true", class: { 'tab-control-button': true }, onClick: () => this.handleTabControl(Direction.Previous) }, h("digi-icon-chevron-left", { key: '8f65c019aa2a60f8d10025c147ad2448d30cdf1d' }))), h("div", { key: '7be08fe744f17f71fab7358d63d010f17e5c977d', role: "tablist", ref: (ref) => (this.tablistRef = ref), "aria-labelledby": this.afAriaLabelledby, "aria-label": this.afAriaLabel }, this.tabs.map((tab) => {
268
+ } }, h("button", { key: '415237740bc65dd5cfdb0e57eb44307c9d838670', tabIndex: -1, type: "button", "aria-hidden": "true", class: { 'tab-control-button': true }, onClick: () => this.handleTabControl(Direction.Previous) }, h("digi-icon-chevron-left", { key: '59f2d43ba38c7d4ebdd85a575b2e89c0fec62381' }))), h("div", { key: '01602338cbd7a63f48cdcf541629e76bac46dd4c', role: "tablist", ref: (ref) => (this.tablistRef = ref), "aria-labelledby": this.afAriaLabelledby, "aria-label": this.afAriaLabel }, this.tabs.map((tab) => {
247
269
  const focusable = tab.id === this.tabs[this.selectedTab].id;
248
270
  const isActive = tab.id === this.tabs[this.activeTab].id;
249
271
  const Icon = `digi-icon-${tab.icon}`;
@@ -252,10 +274,10 @@ export class NavigationTablist {
252
274
  'digi-tab': true,
253
275
  'is-active': isActive
254
276
  }, id: `tab-${tab.id}`, role: "tab", type: "button", tabindex: focusable ? '0' : '-1', "aria-label": tab.ariaLabel, "aria-selected": isActive.toString(), "aria-controls": `tabpanel-${tab.id}`, onClick: () => this.handleTabChange(tab) }, h("div", { class: "content-wrapper" }, h("span", { class: "tablist-content" }, tab.icon && h(Icon, { "aria-hidden": "true" }), h("span", { class: "title", "data-text": tab.title }, tab.title), tab.badgeValue && (h("digi-badge-notification", { afValue: badgeValue, "aria-hidden": "true" }))), h("div", { class: "indicator" }))));
255
- })), h("div", { key: 'b79ea56eb945fe5c4b2e34529d8b1985018ac46c', class: "control-wrapper", style: {
277
+ })), h("div", { key: 'db28ea61c349d7aaf057e84b607c4f851b3f6712', class: "control-wrapper", style: {
256
278
  right: '0',
257
279
  visibility: this.showNext ? 'visible' : 'hidden'
258
- } }, h("button", { key: '3d581fe07f9591f21fef85e700259d3b44332631', tabIndex: -1, type: "button", "aria-hidden": "true", class: { 'tab-control-button': true }, onClick: () => this.handleTabControl(Direction.Next) }, h("digi-icon-chevron-right", { key: '1f3a564d4eff7851ad13901c492e663c5c43d384' })))), h("div", { key: '2cd9aa7d409b36395febee9dfd26eb6e82b02f35', ref: (ref) => (this.panelsRef = ref), role: "presentation" }, h("slot", { key: 'b9f82031b00032dfb1df2358546a8a35934033a0' }))));
280
+ } }, h("button", { key: '83513f2d64cc0578155d305f21dfb1ca4a412cc6', tabIndex: -1, type: "button", "aria-hidden": "true", class: { 'tab-control-button': true }, onClick: () => this.handleTabControl(Direction.Next) }, h("digi-icon-chevron-right", { key: '9263e864c21ea5358f301214fbadda6ed7d3c74a' })))), h("div", { key: '205efbbb3aab40f51f9f85f8d74a4026970c7144', role: "presentation" }, h("slot", { key: 'e753d718f852072745f5c2a49f6189fb62f3645b', onSlotchange: () => this.syncPanels() }))));
259
281
  }
260
282
  static get is() { return "digi-tablist"; }
261
283
  static get encapsulation() { return "scoped"; }
@@ -485,6 +507,7 @@ export class NavigationTablist {
485
507
  }
486
508
  }];
487
509
  }
510
+ static get elementRef() { return "hostElement"; }
488
511
  static get watchers() {
489
512
  return [{
490
513
  "propName": "activeTab",
@@ -81,16 +81,28 @@ export class NavigationVerticalMenu {
81
81
  }
82
82
  }
83
83
  componentWillLoad() {
84
- this.getListItems();
85
- this.initNav();
86
- this.setLevelClass();
84
+ this.syncNav();
85
+ // Angular attaches the host first and slots children on the next frame
86
+ // (Stencil 4.36+). React/vanilla that already have slotted nodes skip
87
+ // the delay. Do not warn here — Angular/React may still be projecting.
88
+ if (!this.hostElement.children.length) {
89
+ return new Promise((resolve) => {
90
+ requestAnimationFrame(() => {
91
+ this.syncNav();
92
+ resolve();
93
+ });
94
+ });
95
+ }
87
96
  }
88
97
  componentDidLoad() {
89
98
  this.initCurrentActiveLevel();
90
99
  this.afOnReady.emit();
91
100
  }
92
101
  componentWillUpdate() {
93
- this.getListItems();
102
+ this.syncNav();
103
+ }
104
+ syncNav(options) {
105
+ this.getListItems(options);
94
106
  this.initNav();
95
107
  this.setLevelClass();
96
108
  }
@@ -140,12 +152,12 @@ export class NavigationVerticalMenu {
140
152
  }
141
153
  }
142
154
  setLevelClass() {
143
- this.hostElement
144
- .querySelector('ul')
145
- .classList.remove('primary', 'secondary');
146
- this.hostElement
147
- .querySelector('ul')
148
- .classList.add('digi-navigation-vertical-menu__list--root', this.afVariation);
155
+ const rootList = this.hostElement.querySelector('ul');
156
+ if (!rootList) {
157
+ return;
158
+ }
159
+ rootList.classList.remove('primary', 'secondary');
160
+ rootList.classList.add('digi-navigation-vertical-menu__list--root', this.afVariation);
149
161
  }
150
162
  initNav() {
151
163
  const $ul = this.hostElement.querySelectorAll('ul');
@@ -158,10 +170,12 @@ export class NavigationVerticalMenu {
158
170
  this.initNav();
159
171
  this.setClasses(e);
160
172
  }
161
- getListItems() {
173
+ getListItems(options) {
162
174
  const menuItems = this.hostElement.children;
163
175
  if (!menuItems || menuItems.length <= 0) {
164
- logger.warn(`The slot contains no children elements.`, this.hostElement);
176
+ if (options === null || options === void 0 ? void 0 : options.warnIfEmpty) {
177
+ logger.warn(`The slot contains no children elements.`, this.hostElement);
178
+ }
165
179
  return;
166
180
  }
167
181
  this.listItems = [...Array.from(menuItems)].map((filter) => {
@@ -180,7 +194,7 @@ export class NavigationVerticalMenu {
180
194
  };
181
195
  }
182
196
  render() {
183
- return (h("nav", { key: '0c7b96501a70d813b8d8f5b8014dc420d472f4a9', class: Object.assign({ 'digi-navigation-vertical-menu': true }, this.cssModifiers), id: this.afId, "aria-label": this.afAriaLabel }, h("slot", { key: '2b5d92cada1cde5bb5155257be77a584c2e708ec' })));
197
+ return (h("nav", { key: 'df2239de80363247c33eadf6995331a74a40966f', class: Object.assign({ 'digi-navigation-vertical-menu': true }, this.cssModifiers), id: this.afId, "aria-label": this.afAriaLabel }, h("slot", { key: 'dc2e22c2cfd00786964855ea3bc2b7271879510c', onSlotchange: () => this.syncNav() })));
184
198
  }
185
199
  static get is() { return "digi-navigation-vertical-menu"; }
186
200
  static get encapsulation() { return "scoped"; }