@postnord/pn-marketweb-components 4.1.1 → 4.2.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.
Files changed (337) hide show
  1. package/cjs/loader.cjs.js +1 -1
  2. package/cjs/pn-chat-message_2.cjs.entry.js +5 -5
  3. package/cjs/pn-chat-message_2.cjs.entry.js.map +1 -1
  4. package/cjs/pn-chat.cjs.entry.js +18 -6
  5. package/cjs/pn-chat.cjs.entry.js.map +1 -1
  6. package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +17 -3
  7. package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js.map +1 -1
  8. package/cjs/pn-market-web-components.cjs.js +1 -1
  9. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +53 -3
  10. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
  11. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.stories.js +4 -0
  12. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.css +27 -10
  13. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js +3 -3
  14. package/collection/components/widgets/pn-chat/pn-chat-message/pn-chat-message.js.map +1 -1
  15. package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js +18 -0
  16. package/collection/components/widgets/pn-chat/pn-chat-stories-constants.js.map +1 -1
  17. package/collection/components/widgets/pn-chat/pn-chat.css +24 -13
  18. package/collection/components/widgets/pn-chat/pn-chat.js +17 -5
  19. package/collection/components/widgets/pn-chat/pn-chat.js.map +1 -1
  20. package/collection/components/widgets/pn-chat/pn-chat.stories.js +43 -0
  21. package/collection/components/widgets/pn-chat/pn-chat.stories.js.map +1 -1
  22. package/components/pn-chat-message2.js +5 -5
  23. package/components/pn-chat-message2.js.map +1 -1
  24. package/components/pn-chat.js +18 -6
  25. package/components/pn-chat.js.map +1 -1
  26. package/components/pn-dropdown-choice-adds-row.js +19 -3
  27. package/components/pn-dropdown-choice-adds-row.js.map +1 -1
  28. package/esm/loader.js +1 -1
  29. package/esm/pn-chat-message_2.entry.js +5 -5
  30. package/esm/pn-chat-message_2.entry.js.map +1 -1
  31. package/esm/pn-chat.entry.js +18 -6
  32. package/esm/pn-chat.entry.js.map +1 -1
  33. package/esm/pn-dropdown-choice-adds-row.entry.js +17 -3
  34. package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
  35. package/esm/pn-market-web-components.js +1 -1
  36. package/package.json +14 -17
  37. package/pn-market-web-components/p-4a8ef165.entry.js +2 -0
  38. package/pn-market-web-components/p-4a8ef165.entry.js.map +1 -0
  39. package/pn-market-web-components/p-62ce6700.entry.js +2 -0
  40. package/pn-market-web-components/p-62ce6700.entry.js.map +1 -0
  41. package/pn-market-web-components/p-6f6ed930.entry.js +2 -0
  42. package/pn-market-web-components/p-6f6ed930.entry.js.map +1 -0
  43. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  44. package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
  45. package/types/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.d.ts +2 -0
  46. package/types/components/widgets/pn-chat/pn-chat-stories-constants.d.ts +18 -0
  47. package/types/components/widgets/pn-chat/pn-chat.stories.d.ts +1 -0
  48. package/types/components.d.ts +4 -0
  49. package/umd/modules/@postnord/web-components/cjs/{index-BNXSyZmU.js → index-CNdVg5VI.js} +1 -1
  50. package/umd/modules/@postnord/web-components/cjs/{index-CAMqnx70.js → index-CfUQZtlH.js} +245 -1884
  51. package/umd/modules/@postnord/web-components/cjs/index.cjs.js +8 -5
  52. package/umd/modules/@postnord/web-components/cjs/loader.cjs.js +2 -2
  53. package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js +1 -1
  54. package/umd/modules/@postnord/web-components/cjs/pn-accordion.cjs.entry.js +1 -1
  55. package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js +2 -2
  56. package/umd/modules/@postnord/web-components/cjs/pn-button-dropdown.cjs.entry.js +1 -1
  57. package/umd/modules/@postnord/web-components/cjs/pn-button_2.cjs.entry.js +1 -1
  58. package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +2 -2
  59. package/umd/modules/@postnord/web-components/cjs/pn-checkbox.cjs.entry.js +2 -2
  60. package/umd/modules/@postnord/web-components/cjs/pn-choice-chip.cjs.entry.js +1 -1
  61. package/umd/modules/@postnord/web-components/cjs/pn-counter.cjs.entry.js +13 -15
  62. package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js +12 -6
  63. package/umd/modules/@postnord/web-components/cjs/pn-fieldset.cjs.entry.js +2 -2
  64. package/umd/modules/@postnord/web-components/cjs/pn-file-upload.cjs.entry.js +2 -2
  65. package/umd/modules/@postnord/web-components/cjs/pn-footer.cjs.entry.js +2 -2
  66. package/umd/modules/@postnord/web-components/cjs/pn-header.cjs.entry.js +2 -2
  67. package/umd/modules/@postnord/web-components/cjs/pn-icon_2.cjs.entry.js +1 -1
  68. package/umd/modules/@postnord/web-components/cjs/pn-illustration.cjs.entry.js +1 -1
  69. package/umd/modules/@postnord/web-components/cjs/pn-input.cjs.entry.js +33 -16
  70. package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js +1 -1
  71. package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +16 -5
  72. package/umd/modules/@postnord/web-components/cjs/pn-ocr-search.cjs.entry.js +2 -2
  73. package/umd/modules/@postnord/web-components/cjs/pn-page-nav-dropdown-item.cjs.entry.js +2 -2
  74. package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +2 -2
  75. package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +2 -2
  76. package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +2 -2
  77. package/umd/modules/@postnord/web-components/cjs/pn-progress-bar.cjs.entry.js +1 -1
  78. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js +1 -1
  79. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js +1 -1
  80. package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js +1 -1
  81. package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +3 -3
  82. package/umd/modules/@postnord/web-components/cjs/pn-range.cjs.entry.js +3 -3
  83. package/umd/modules/@postnord/web-components/cjs/pn-read-only-button.cjs.entry.js +1 -1
  84. package/umd/modules/@postnord/web-components/cjs/pn-search-field.cjs.entry.js +2 -2
  85. package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +2 -2
  86. package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +2 -2
  87. package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +10 -3
  88. package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +2 -2
  89. package/umd/modules/@postnord/web-components/cjs/pn-table.cjs.entry.js +1 -1
  90. package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js +2 -2
  91. package/umd/modules/@postnord/web-components/cjs/pn-text-link.cjs.entry.js +2 -2
  92. package/umd/modules/@postnord/web-components/cjs/pn-textarea.cjs.entry.js +19 -9
  93. package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +2 -2
  94. package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js +2 -2
  95. package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +3 -3
  96. package/umd/modules/@postnord/web-components/cjs/pn-tooltip.cjs.entry.js +1 -1
  97. package/umd/modules/@postnord/web-components/cjs/pn-wizard.cjs.entry.js +1 -1
  98. package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +2 -2
  99. package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +3 -3
  100. package/umd/modules/@postnord/web-components/collection/collection-manifest.json +1 -1
  101. package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.css +69 -27
  102. package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.js +34 -13
  103. package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.css +38 -1
  104. package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js +32 -3
  105. package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.js +1 -1
  106. package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.js +1 -1
  107. package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.css +48 -9
  108. package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js +55 -15
  109. package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.css +63 -22
  110. package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +36 -2
  111. package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.js +1 -1
  112. package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.css +1 -1
  113. package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.js +1 -1
  114. package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.js +1 -1
  115. package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.js +1 -1
  116. package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/segment/pn-segment.js +1 -1
  117. package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.css +53 -14
  118. package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +31 -1
  119. package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.css +54 -5
  120. package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +45 -13
  121. package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.css +1 -1
  122. package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.js +1 -1
  123. package/umd/modules/@postnord/web-components/collection/components/layout/pn-header/pn-header.js +1 -1
  124. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-card/pn-card.js +1 -1
  125. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-footer/pn-footer.js +1 -1
  126. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/dropdown-item/pn-page-nav-dropdown-item.js +1 -1
  127. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/item/pn-page-nav-item.js +1 -1
  128. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js +1 -1
  129. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-pagination/pn-pagination.js +1 -1
  130. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js +1 -1
  131. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.js +1 -1
  132. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-text-link/pn-text-link.js +1 -1
  133. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tile/pn-tile.js +1 -1
  134. package/umd/modules/@postnord/web-components/collection/components/web-components/pn-ocr-search/pn-ocr-search.js +1 -1
  135. package/umd/modules/@postnord/web-components/collection/components/web-components/pn-zipcode-search/pn-zipcode-search.js +1 -1
  136. package/umd/modules/@postnord/web-components/components/helpers.js +1 -1
  137. package/umd/modules/@postnord/web-components/components/pn-card.js +1 -1
  138. package/umd/modules/@postnord/web-components/components/pn-counter.js +1 -1
  139. package/umd/modules/@postnord/web-components/components/pn-date-picker.js +1 -1
  140. package/umd/modules/@postnord/web-components/components/pn-fieldset.js +1 -1
  141. package/umd/modules/@postnord/web-components/components/pn-file-upload.js +1 -1
  142. package/umd/modules/@postnord/web-components/components/pn-footer.js +1 -1
  143. package/umd/modules/@postnord/web-components/components/pn-header.js +1 -1
  144. package/umd/modules/@postnord/web-components/components/pn-input2.js +1 -1
  145. package/umd/modules/@postnord/web-components/components/pn-multiselect.js +1 -1
  146. package/umd/modules/@postnord/web-components/components/pn-ocr-search.js +1 -1
  147. package/umd/modules/@postnord/web-components/components/pn-page-nav-dropdown-item.js +1 -1
  148. package/umd/modules/@postnord/web-components/components/pn-page-nav-item.js +1 -1
  149. package/umd/modules/@postnord/web-components/components/pn-page-nav.js +1 -1
  150. package/umd/modules/@postnord/web-components/components/pn-pagination.js +1 -1
  151. package/umd/modules/@postnord/web-components/components/pn-radio-button.js +1 -1
  152. package/umd/modules/@postnord/web-components/components/pn-range.js +1 -1
  153. package/umd/modules/@postnord/web-components/components/pn-search-field2.js +1 -1
  154. package/umd/modules/@postnord/web-components/components/pn-segment.js +1 -1
  155. package/umd/modules/@postnord/web-components/components/pn-segmented-control.js +1 -1
  156. package/umd/modules/@postnord/web-components/components/pn-select2.js +1 -1
  157. package/umd/modules/@postnord/web-components/components/pn-tab.js +1 -1
  158. package/umd/modules/@postnord/web-components/components/pn-tablist.js +1 -1
  159. package/umd/modules/@postnord/web-components/components/pn-text-link2.js +1 -1
  160. package/umd/modules/@postnord/web-components/components/pn-textarea.js +1 -1
  161. package/umd/modules/@postnord/web-components/components/pn-tile.js +1 -1
  162. package/umd/modules/@postnord/web-components/components/pn-toggle-switch.js +1 -1
  163. package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
  164. package/umd/modules/@postnord/web-components/esm/{index-DWsprozV.js → index-CAEP792y.js} +245 -1884
  165. package/umd/modules/@postnord/web-components/esm/{index-BhpZuCL7.js → index-CosyroON.js} +1 -1
  166. package/umd/modules/@postnord/web-components/esm/index.js +9 -6
  167. package/umd/modules/@postnord/web-components/esm/loader.js +3 -3
  168. package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js +1 -1
  169. package/umd/modules/@postnord/web-components/esm/pn-accordion.entry.js +1 -1
  170. package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js +2 -2
  171. package/umd/modules/@postnord/web-components/esm/pn-button-dropdown.entry.js +1 -1
  172. package/umd/modules/@postnord/web-components/esm/pn-button_2.entry.js +1 -1
  173. package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +2 -2
  174. package/umd/modules/@postnord/web-components/esm/pn-checkbox.entry.js +2 -2
  175. package/umd/modules/@postnord/web-components/esm/pn-choice-chip.entry.js +1 -1
  176. package/umd/modules/@postnord/web-components/esm/pn-counter.entry.js +13 -15
  177. package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js +12 -6
  178. package/umd/modules/@postnord/web-components/esm/pn-fieldset.entry.js +2 -2
  179. package/umd/modules/@postnord/web-components/esm/pn-file-upload.entry.js +2 -2
  180. package/umd/modules/@postnord/web-components/esm/pn-footer.entry.js +2 -2
  181. package/umd/modules/@postnord/web-components/esm/pn-header.entry.js +2 -2
  182. package/umd/modules/@postnord/web-components/esm/pn-icon_2.entry.js +1 -1
  183. package/umd/modules/@postnord/web-components/esm/pn-illustration.entry.js +1 -1
  184. package/umd/modules/@postnord/web-components/esm/pn-input.entry.js +33 -16
  185. package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js +1 -1
  186. package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +16 -5
  187. package/umd/modules/@postnord/web-components/esm/pn-ocr-search.entry.js +2 -2
  188. package/umd/modules/@postnord/web-components/esm/pn-page-nav-dropdown-item.entry.js +2 -2
  189. package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +2 -2
  190. package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +2 -2
  191. package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +2 -2
  192. package/umd/modules/@postnord/web-components/esm/pn-progress-bar.entry.js +1 -1
  193. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js +1 -1
  194. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js +1 -1
  195. package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js +1 -1
  196. package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +3 -3
  197. package/umd/modules/@postnord/web-components/esm/pn-range.entry.js +3 -3
  198. package/umd/modules/@postnord/web-components/esm/pn-read-only-button.entry.js +1 -1
  199. package/umd/modules/@postnord/web-components/esm/pn-search-field.entry.js +2 -2
  200. package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +2 -2
  201. package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +2 -2
  202. package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +10 -3
  203. package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +2 -2
  204. package/umd/modules/@postnord/web-components/esm/pn-table.entry.js +1 -1
  205. package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js +2 -2
  206. package/umd/modules/@postnord/web-components/esm/pn-text-link.entry.js +2 -2
  207. package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +19 -9
  208. package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +2 -2
  209. package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js +2 -2
  210. package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +3 -3
  211. package/umd/modules/@postnord/web-components/esm/pn-tooltip.entry.js +1 -1
  212. package/umd/modules/@postnord/web-components/esm/pn-wizard.entry.js +1 -1
  213. package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +2 -2
  214. package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +4 -4
  215. package/umd/modules/@postnord/web-components/hydrate/index.js +3597 -3562
  216. package/umd/modules/@postnord/web-components/hydrate/index.mjs +3597 -3562
  217. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +1 -18
  218. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +1 -18
  219. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +1 -1
  220. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +1 -1
  221. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +70 -12
  222. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +1 -1
  223. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +1 -1
  224. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +2 -2
  225. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +1 -1
  226. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +1 -1
  227. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +2 -19
  228. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +1 -1
  229. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-globals/package.json +1 -1
  230. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +214 -1832
  231. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +1 -1
  232. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +1 -1
  233. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +3 -3
  234. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +5172 -5086
  235. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +1 -1
  236. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +234 -263
  237. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +1 -1
  238. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +10 -0
  239. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +113 -74
  240. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-dev-runtime.d.ts +2 -0
  241. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-dev-runtime.js +8 -0
  242. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-runtime.d.ts +2 -0
  243. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/jsx-runtime.js +9 -0
  244. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +1 -1
  245. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +13 -25
  246. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +4 -3
  247. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +13 -25
  248. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +1 -1
  249. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +13 -2
  250. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +1 -18
  251. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +1 -1
  252. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +1 -1
  253. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +34 -34
  254. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +1 -1
  255. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +1 -1
  256. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +19 -1
  257. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +1 -1
  258. package/umd/modules/@postnord/web-components/package.json +19 -19
  259. package/umd/modules/@postnord/web-components/postnord-web-components/index.esm.js +1 -1
  260. package/umd/modules/@postnord/web-components/postnord-web-components/{p-215a8bab.entry.js → p-01ac1c67.entry.js} +1 -1
  261. package/umd/modules/@postnord/web-components/postnord-web-components/p-0dd15cc3.entry.js +5 -0
  262. package/umd/modules/@postnord/web-components/postnord-web-components/{p-f94947bd.entry.js → p-0e94a4dd.entry.js} +1 -1
  263. package/umd/modules/@postnord/web-components/postnord-web-components/{p-511bdc31.entry.js → p-0ed2ee53.entry.js} +1 -1
  264. package/umd/modules/@postnord/web-components/postnord-web-components/{p-e545c35d.entry.js → p-109ba1fc.entry.js} +1 -1
  265. package/umd/modules/@postnord/web-components/postnord-web-components/p-153311c8.entry.js +5 -0
  266. package/umd/modules/@postnord/web-components/postnord-web-components/{p-9d3890d0.entry.js → p-1a3c49ba.entry.js} +1 -1
  267. package/umd/modules/@postnord/web-components/postnord-web-components/{p-c9b8ed0a.entry.js → p-2610f8ab.entry.js} +1 -1
  268. package/umd/modules/@postnord/web-components/postnord-web-components/p-267c323e.entry.js +5 -0
  269. package/umd/modules/@postnord/web-components/postnord-web-components/{p-dfa861a7.entry.js → p-2a364778.entry.js} +1 -1
  270. package/umd/modules/@postnord/web-components/postnord-web-components/{p-5cbd90c0.entry.js → p-2a682ff9.entry.js} +1 -1
  271. package/umd/modules/@postnord/web-components/postnord-web-components/{p-b54f1a65.entry.js → p-2cce8a9f.entry.js} +1 -1
  272. package/umd/modules/@postnord/web-components/postnord-web-components/{p-44a6fe18.entry.js → p-2f4ad4a4.entry.js} +1 -1
  273. package/umd/modules/@postnord/web-components/postnord-web-components/{p-c867fce9.entry.js → p-306ec758.entry.js} +1 -1
  274. package/umd/modules/@postnord/web-components/postnord-web-components/{p-1d7b9fe8.entry.js → p-38e44ed0.entry.js} +1 -1
  275. package/umd/modules/@postnord/web-components/postnord-web-components/{p-66b77e7e.entry.js → p-3c96cb61.entry.js} +1 -1
  276. package/umd/modules/@postnord/web-components/postnord-web-components/{p-7ec29574.entry.js → p-3d2cac86.entry.js} +1 -1
  277. package/umd/modules/@postnord/web-components/postnord-web-components/{p-499ce292.entry.js → p-3d459401.entry.js} +1 -1
  278. package/umd/modules/@postnord/web-components/postnord-web-components/{p-795f8d58.entry.js → p-3deb5a9e.entry.js} +1 -1
  279. package/umd/modules/@postnord/web-components/postnord-web-components/p-41c09d4d.entry.js +5 -0
  280. package/umd/modules/@postnord/web-components/postnord-web-components/p-484dfaa4.entry.js +5 -0
  281. package/umd/modules/@postnord/web-components/postnord-web-components/{p-61af0540.entry.js → p-50116c0d.entry.js} +1 -1
  282. package/umd/modules/@postnord/web-components/postnord-web-components/{p-b8b5201d.entry.js → p-502b8430.entry.js} +1 -1
  283. package/umd/modules/@postnord/web-components/postnord-web-components/{p-96871fc2.entry.js → p-5b7c1333.entry.js} +1 -1
  284. package/umd/modules/@postnord/web-components/postnord-web-components/{p-3bc56c7f.entry.js → p-67f55491.entry.js} +1 -1
  285. package/umd/modules/@postnord/web-components/postnord-web-components/{p-cc1291a6.entry.js → p-838c17b9.entry.js} +1 -1
  286. package/umd/modules/@postnord/web-components/postnord-web-components/{p-e221d65e.entry.js → p-849d48c6.entry.js} +1 -1
  287. package/umd/modules/@postnord/web-components/postnord-web-components/{p-584c2057.entry.js → p-89aaa3c8.entry.js} +1 -1
  288. package/umd/modules/@postnord/web-components/postnord-web-components/{p-2becf18d.entry.js → p-8b2b6f5d.entry.js} +1 -1
  289. package/umd/modules/@postnord/web-components/postnord-web-components/p-93db2b9e.entry.js +5 -0
  290. package/umd/modules/@postnord/web-components/postnord-web-components/{p-99d7a33d.entry.js → p-97ffc4b3.entry.js} +1 -1
  291. package/umd/modules/@postnord/web-components/postnord-web-components/{p-0j4cY0b7.js → p-BlM_xfdt.js} +1 -1
  292. package/umd/modules/@postnord/web-components/postnord-web-components/p-CAEP792y.js +6 -0
  293. package/umd/modules/@postnord/web-components/postnord-web-components/{p-26233654.entry.js → p-b0710b87.entry.js} +1 -1
  294. package/umd/modules/@postnord/web-components/postnord-web-components/p-b3c4e3e8.entry.js +5 -0
  295. package/umd/modules/@postnord/web-components/postnord-web-components/{p-e5d0281b.entry.js → p-b8c4423b.entry.js} +1 -1
  296. package/umd/modules/@postnord/web-components/postnord-web-components/p-ba59528f.entry.js +5 -0
  297. package/umd/modules/@postnord/web-components/postnord-web-components/{p-92aa5cfa.entry.js → p-c0ae367c.entry.js} +1 -1
  298. package/umd/modules/@postnord/web-components/postnord-web-components/{p-ddc430a5.entry.js → p-c4c4c75b.entry.js} +1 -1
  299. package/umd/modules/@postnord/web-components/postnord-web-components/p-c843ae5e.entry.js +5 -0
  300. package/umd/modules/@postnord/web-components/postnord-web-components/{p-323e7706.entry.js → p-d1e27524.entry.js} +1 -1
  301. package/umd/modules/@postnord/web-components/postnord-web-components/{p-190d83cf.entry.js → p-d214e930.entry.js} +1 -1
  302. package/umd/modules/@postnord/web-components/postnord-web-components/{p-66fdb323.entry.js → p-d7091312.entry.js} +1 -1
  303. package/umd/modules/@postnord/web-components/postnord-web-components/{p-8f732dd9.entry.js → p-db2b7e5d.entry.js} +1 -1
  304. package/umd/modules/@postnord/web-components/postnord-web-components/p-e3fb693e.entry.js +5 -0
  305. package/umd/modules/@postnord/web-components/postnord-web-components/{p-10cb744b.entry.js → p-e83de0b1.entry.js} +1 -1
  306. package/umd/modules/@postnord/web-components/postnord-web-components/{p-bde90f4f.entry.js → p-ea50ecd2.entry.js} +1 -1
  307. package/umd/modules/@postnord/web-components/postnord-web-components/{p-1c376e6a.entry.js → p-edc28eee.entry.js} +1 -1
  308. package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
  309. package/umd/modules/@postnord/web-components/types/components/input/pn-counter/pn-counter.d.ts +27 -26
  310. package/umd/modules/@postnord/web-components/types/components/input/pn-input/pn-input.d.ts +9 -0
  311. package/umd/modules/@postnord/web-components/types/components/input/pn-select/pn-select.d.ts +3 -0
  312. package/umd/modules/@postnord/web-components/types/components/input/pn-textarea/pn-textarea.d.ts +10 -8
  313. package/umd/modules/@postnord/web-components/types/components.d.ts +72 -0
  314. package/umd/modules/@postnord/web-components/vscode-data.json +24 -0
  315. package/umd/pn-marketweb-init.js +1 -1
  316. package/umd/pn-marketweb-salesforce.js +1 -1
  317. package/vscode-data.json +8 -0
  318. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.test.js +0 -95
  319. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.test.js.map +0 -1
  320. package/pn-market-web-components/p-22a8fd6e.entry.js +0 -2
  321. package/pn-market-web-components/p-22a8fd6e.entry.js.map +0 -1
  322. package/pn-market-web-components/p-8afc2d30.entry.js +0 -2
  323. package/pn-market-web-components/p-8afc2d30.entry.js.map +0 -1
  324. package/pn-market-web-components/p-f97e58b8.entry.js +0 -2
  325. package/pn-market-web-components/p-f97e58b8.entry.js.map +0 -1
  326. package/types/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.test.d.ts +0 -1
  327. package/umd/modules/@postnord/web-components/postnord-web-components/p-1bd12040.entry.js +0 -5
  328. package/umd/modules/@postnord/web-components/postnord-web-components/p-5a36a4ce.entry.js +0 -5
  329. package/umd/modules/@postnord/web-components/postnord-web-components/p-5ca4200c.entry.js +0 -5
  330. package/umd/modules/@postnord/web-components/postnord-web-components/p-8751c301.entry.js +0 -5
  331. package/umd/modules/@postnord/web-components/postnord-web-components/p-DWsprozV.js +0 -6
  332. package/umd/modules/@postnord/web-components/postnord-web-components/p-a6363f85.entry.js +0 -5
  333. package/umd/modules/@postnord/web-components/postnord-web-components/p-b46922c6.entry.js +0 -5
  334. package/umd/modules/@postnord/web-components/postnord-web-components/p-de3ae08d.entry.js +0 -5
  335. package/umd/modules/@postnord/web-components/postnord-web-components/p-e6c7e352.entry.js +0 -5
  336. package/umd/modules/@postnord/web-components/postnord-web-components/p-ee6a305b.entry.js +0 -5
  337. package/umd/modules/@postnord/web-components/postnord-web-components/p-f667cb91.entry.js +0 -5
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t,r as e,c as n,g as a,f as i,h as r,a as o}from"./p-DWsprozV.js";import{ripple as s}from"./index.esm.js";const c=class{constructor(t){e(this,t),this.setActiveTab=n(this,"setActiveTab"),this.tabEnter=n(this,"tabEnter"),this.tabLeave=n(this,"tabLeave")}mo;tag="button";get hostElement(){return a(this)}label;value;href;icon;ariacontrols;tabid;activeTab;setActiveTab;setActiveTabHandler({click:t=!1,element:e}={}){(t||this.isActive())&&this.setActiveTab.emit({val:e?.value||this.value,el:e?.value&&e||this.hostElement})}tabEnter;triggerEnter(t){this.tabEnter.emit(t)}tabLeave;triggerLeave(t){this.tabLeave.emit(t)}connectedCallback(){this.mo=new MutationObserver((()=>i(this.hostElement))),this.mo.observe(this.hostElement,{subtree:!0,childList:!0})}disconnectedCallback(){this.mo?.disconnect()}componentWillLoad(){this.tabTag()}componentDidUpdate(){this.setActiveTabHandler()}componentDidLoad(){this.setActiveTabHandler()}arrowKeyNav(e){if(!/^(ArrowRight|ArrowLeft|Home|End)$/.test(e.key))return;e.preventDefault();const n=e.target.closest(`${t("pn-tablist")}`),a=Array.from(n.querySelectorAll(`${t("pn-tab")}`)),i=a[0],r=a[a.length-1],o=this.hostElement.nextElementSibling,s=this.hostElement.previousElementSibling;"Home"===e.key&&this.setActiveTabHandler({element:i}),"End"===e.key&&this.setActiveTabHandler({element:r}),"ArrowRight"===e.key&&this.setActiveTabHandler({element:o?.value?o:i}),"ArrowLeft"===e.key&&this.setActiveTabHandler({element:s?.value?s:r})}isActive(){return this.activeTab===this.value}tabTag(){const e=this.hostElement.closest(`${t("pn-tablist")}`);this.tag="menu"===e.slot?"a":"button"}renderProperties(){return"a"===this.tag?{href:this.href,"aria-current":this.isActive()?"page":"false"}:{tabindex:this.isActive()?0:-1,type:"button",role:"tab","aria-selected":this.isActive().toString(),"aria-controls":this.ariacontrols}}iconColor(){return this.isActive()?"blue700":"gray900"}handleClick(t){this.setActiveTabHandler({click:!0}),s(t,this.hostElement,".pn-tab")}render(){return r(o,{key:"6018f7f4ba6a860a4f8e176b115a586d1968aa14"},r(this.tag,{key:"484708ad0b9007f3183d42000ccf18b34693fe7a",id:this.tabid,class:"pn-tab",...this.renderProperties(),onClick:t=>this.handleClick(t),onMouseEnter:t=>this.triggerEnter(t),onFocus:t=>this.triggerEnter(t),onMouseLeave:t=>this.triggerLeave(t),onBlur:t=>this.triggerLeave(t),onKeyDown:t=>this.arrowKeyNav(t)},!!this.icon&&r("pn-icon",{key:"d40438f0c464d2549faa141edb9ff9768eacc502",icon:this.icon,color:this.iconColor()}),r("slot",{key:"998d73d40785109b36dbcb515addf5bd2f4505b3"}),r("span",{key:"f2a01837ccf6dd0f28c63741361f05e3d875dae4",class:"pn-tab-label"},this.label)))}};c.style=`${t("pn-tab")}{position:relative;overflow:hidden;flex-shrink:0;scroll-snap-align:center;display:inline-block;border-radius:0.5em}${t("pn-tab")} .pn-tab{position:relative;cursor:pointer;margin:1em 0.25em;padding:0 0.25em;border:none;border-radius:0.5em;color:#2d2013;background-color:transparent;font-family:inherit;font-size:1em;font-weight:500;text-decoration:none;display:flex;gap:0.5em;align-items:center;justify-content:center;-webkit-tap-highlight-color:transparent}${t("pn-tab")} .pn-tab .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${t("pn-tab")} .pn-tab{transition-property:color, outline-color, background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tab")} .pn-tab{transition-duration:0s;transition-delay:0s}}${t("pn-tab")} .pn-tab{outline:0.2rem solid transparent;outline-offset:0.2rem}${t("pn-tab")} .pn-tab-label{line-height:1.5em}${t("pn-tab")} .pn-tab:focus-visible{overflow:hidden;outline-color:#005d92;background-color:#ffffff}${t("pn-tab")} .pn-tab[aria-selected=true],${t("pn-tab")} .pn-tab[aria-current=page]{color:#005d92}${t("pn-tab")} .pn-tab[aria-selected=true]:focus,${t("pn-tab")} .pn-tab[aria-current=page]:focus{color:#0d234b}${t("pn-tab")} .pn-tab[aria-selected=true]:focus ${t("pn-icon")}>.pn-icon-svg path,${t("pn-tab")} .pn-tab[aria-selected=true]:focus ${t("pn-icon")}>.pn-icon-svg polygon,${t("pn-tab")} .pn-tab[aria-current=page]:focus ${t("pn-icon")}>.pn-icon-svg path,${t("pn-tab")} .pn-tab[aria-current=page]:focus ${t("pn-icon")}>.pn-icon-svg polygon{fill:#0d234b}`;export{c as pn_tab}
5
+ import{t,r as e,c as n,g as a,f as i,h as r,a as o}from"./p-CAEP792y.js";import{ripple as s}from"./index.esm.js";const c=class{constructor(t){e(this,t),this.setActiveTab=n(this,"setActiveTab"),this.tabEnter=n(this,"tabEnter"),this.tabLeave=n(this,"tabLeave")}mo;tag="button";get hostElement(){return a(this)}label;value;href;icon;ariacontrols;tabid;activeTab;setActiveTab;setActiveTabHandler({click:t=!1,element:e}={}){(t||this.isActive())&&this.setActiveTab.emit({val:e?.value||this.value,el:e?.value&&e||this.hostElement})}tabEnter;triggerEnter(t){this.tabEnter.emit(t)}tabLeave;triggerLeave(t){this.tabLeave.emit(t)}connectedCallback(){this.mo=new MutationObserver((()=>i(this.hostElement))),this.mo.observe(this.hostElement,{subtree:!0,childList:!0})}disconnectedCallback(){this.mo?.disconnect()}componentWillLoad(){this.tabTag()}componentDidUpdate(){this.setActiveTabHandler()}componentDidLoad(){this.setActiveTabHandler()}arrowKeyNav(e){if(!/^(ArrowRight|ArrowLeft|Home|End)$/.test(e.key))return;e.preventDefault();const n=e.target.closest(`${t("pn-tablist")}`),a=Array.from(n.querySelectorAll(`${t("pn-tab")}`)),i=a[0],r=a[a.length-1],o=this.hostElement.nextElementSibling,s=this.hostElement.previousElementSibling;"Home"===e.key&&this.setActiveTabHandler({element:i}),"End"===e.key&&this.setActiveTabHandler({element:r}),"ArrowRight"===e.key&&this.setActiveTabHandler({element:o?.value?o:i}),"ArrowLeft"===e.key&&this.setActiveTabHandler({element:s?.value?s:r})}isActive(){return this.activeTab===this.value}tabTag(){const e=this.hostElement.closest(`${t("pn-tablist")}`);this.tag="menu"===e.slot?"a":"button"}renderProperties(){return"a"===this.tag?{href:this.href,"aria-current":this.isActive()?"page":"false"}:{tabindex:this.isActive()?0:-1,type:"button",role:"tab","aria-selected":this.isActive().toString(),"aria-controls":this.ariacontrols}}iconColor(){return this.isActive()?"blue700":"gray900"}handleClick(t){this.setActiveTabHandler({click:!0}),s(t,this.hostElement,".pn-tab")}render(){return r(o,{key:"a3d1810848574a33819d13fa281d85eb08f1ce80"},r(this.tag,{key:"08548598375643778185f9ea3900b6b16e079c23",id:this.tabid,class:"pn-tab",...this.renderProperties(),onClick:t=>this.handleClick(t),onMouseEnter:t=>this.triggerEnter(t),onFocus:t=>this.triggerEnter(t),onMouseLeave:t=>this.triggerLeave(t),onBlur:t=>this.triggerLeave(t),onKeyDown:t=>this.arrowKeyNav(t)},!!this.icon&&r("pn-icon",{key:"ed1076eaf2ea4fc6f56ae86e2947b656808d1c02",icon:this.icon,color:this.iconColor()}),r("slot",{key:"48a7a902e8e2712b0595ac88f3b906149703f92c"}),r("span",{key:"cde1646f13a5fe4f553dcfa919268f62286d3f5c",class:"pn-tab-label"},this.label)))}};c.style=`${t("pn-tab")}{position:relative;overflow:hidden;flex-shrink:0;scroll-snap-align:center;display:inline-block;border-radius:0.5em}${t("pn-tab")} .pn-tab{position:relative;cursor:pointer;margin:1em 0.25em;padding:0 0.25em;border:none;border-radius:0.5em;color:#2d2013;background-color:transparent;font-family:inherit;font-size:1em;font-weight:500;text-decoration:none;display:flex;gap:0.5em;align-items:center;justify-content:center;-webkit-tap-highlight-color:transparent}${t("pn-tab")} .pn-tab .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${t("pn-tab")} .pn-tab{transition-property:color, outline-color, background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tab")} .pn-tab{transition-duration:0s;transition-delay:0s}}${t("pn-tab")} .pn-tab{outline:0.2rem solid transparent;outline-offset:0.2rem}${t("pn-tab")} .pn-tab-label{line-height:1.5em}${t("pn-tab")} .pn-tab:focus-visible{overflow:hidden;outline-color:#005d92;background-color:#ffffff}${t("pn-tab")} .pn-tab[aria-selected=true],${t("pn-tab")} .pn-tab[aria-current=page]{color:#005d92}${t("pn-tab")} .pn-tab[aria-selected=true]:focus,${t("pn-tab")} .pn-tab[aria-current=page]:focus{color:#0d234b}${t("pn-tab")} .pn-tab[aria-selected=true]:focus ${t("pn-icon")}>.pn-icon-svg path,${t("pn-tab")} .pn-tab[aria-selected=true]:focus ${t("pn-icon")}>.pn-icon-svg polygon,${t("pn-tab")} .pn-tab[aria-current=page]:focus ${t("pn-icon")}>.pn-icon-svg path,${t("pn-tab")} .pn-tab[aria-current=page]:focus ${t("pn-icon")}>.pn-icon-svg polygon{fill:#0d234b}`;export{c as pn_tab}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t as o,r as i,c as t,g as n,h as r,a}from"./p-DWsprozV.js";import{c as e}from"./p-DrYFvs2M.js";import{ripple as c,reduceMotion as s}from"./index.esm.js";const d=class{constructor(o){i(this,o),this.togglerow=t(this,"togglerow")}details;summary;content;animation;defaultAnimationDuration=400;animationDuration=this.defaultAnimationDuration;get hostElement(){return n(this)}isClosing=!1;isExpanding=!1;label;state=!1;buttonid;contentid;transparent=!1;togglerow;handleRowState(o){o.detail!==this.state&&(this.details.style.overflow="hidden",this.closeAccordion())}componentWillLoad(){const o=!!this.hostElement.querySelector('[slot="label"]');this.label=o?null:this.label}toggleOpen(o){const i=o??!this.state;this.state!==o&&this.togglerow.emit({element:this.details,state:i}),this.state=i}clickHandler(o){o.preventDefault(),this.details.style.overflow="hidden",this.isClosing||!this.state?this.openAccordion():(this.isClosing||this.state)&&this.closeAccordion();const{x:i,width:t,y:n,top:r}=this.hostElement.getBoundingClientRect();c(0===o.clientX&&0===o.clientY?{clientX:i+t-24,clientY:n-r}:o,this.hostElement,".pn-accordion-row-text")}openAccordion(){this.details.style.height=`${this.details.offsetHeight}px`,this.toggleOpen(!0),requestAnimationFrame((()=>{this.isExpanding=!0;const o=`${this.details.offsetHeight}px`,i=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.cancelAnimations(),this.animate(!0,o,i)}))}closeAccordion(){this.isClosing=!0;const o=`${this.details.offsetHeight}px`,i=`${this.summary.offsetHeight}px`;this.cancelAnimations(),this.animate(!1,o,i)}animate(o,i,t){this.animationDuration=s()?0:this.defaultAnimationDuration,this.animation=this.details.animate({height:[i,t]},{duration:this.animationDuration,easing:"cubic-bezier(0.6, 0, 0.2, 1)"}),this.animation.onfinish=()=>this.animationFinish(o),this.animation.oncancel=()=>{o?this.isExpanding=!1:this.isClosing=!1}}animationFinish(o){this.toggleOpen(o),this.cancelAnimations(),this.isClosing=!1,this.isExpanding=!1,this.details.style.height="",this.details.style.overflow=""}cancelAnimations(){this.animation&&this.animation.cancel()}render(){return r(a,{key:"2b50f9026275b623128e0a441ec4434c50a54338"},r("details",{key:"d60df44b58cd5c27306ec97dd42750bf1f01486c",class:"pn-accordion-row",open:this.state,ref:o=>this.details=o},r("summary",{key:"448587e8102df440a0d633702ea4af8cfe1d9da3",id:this.buttonid,class:"pn-accordion-row-summary",onClick:o=>this.clickHandler(o),ref:o=>this.summary=o},r("div",{key:"bef1fa9595b890919445a6631742c03fd7e18f3f",class:"pn-accordion-row-text","data-transparent":this.transparent},this.label?this.label:"",r("slot",{key:"30742c10f2f557f39f80e97ec3e1c5473400d128",name:"label"}),r("pn-icon",{key:"cfde3e68aab8348a0773c7aa41e02bb905a47e07",class:"pn-accordion-row-icon",icon:e}))),r("div",{key:"054aae1bcf9fb3bf9a050c9fdf7cefef38f164d0",id:this.contentid,class:"pn-accordion-row-content",ref:o=>this.content=o},r("slot",{key:"69378af205ca6c4c159c718f497a2ecf319be959"}))))}};d.style=`${o("pn-accordion-row")}{position:relative;margin:0 -0.25em 0}${o("pn-accordion-row")} .pn-accordion-row{width:100%;display:flex;flex-direction:column}${o("pn-accordion-row")} .pn-accordion-row-summary{color:#2d2013;position:relative;border:none;outline:0;cursor:pointer;-webkit-tap-highlight-color:transparent;width:100%;padding:0.25em;font-size:1em;font-weight:400;border-radius:0.5em;list-style:none}${o("pn-accordion-row")} .pn-accordion-row-summary:hover>.pn-accordion-row-text{background-color:#e0f8ff}${o("pn-accordion-row")} .pn-accordion-row-summary:focus-visible>.pn-accordion-row-text{outline-color:#005d92}${o("pn-accordion-row")} .pn-accordion-row-summary::-webkit-details-marker{display:none}${o("pn-accordion-row")} .pn-accordion-row-text{position:relative;overflow:hidden;display:flex;align-items:center;padding:0.75em;background-color:#ffffff;border-radius:0.5em;-webkit-tap-highlight-color:transparent}${o("pn-accordion-row")} .pn-accordion-row-text[data-transparent]{background-color:transparent}${o("pn-accordion-row")} .pn-accordion-row-text{outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${o("pn-accordion-row")} .pn-accordion-row-text{transition-duration:0s;transition-delay:0s}}${o("pn-accordion-row")} .pn-accordion-row-text .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${o("pn-accordion-row")} .pn-accordion-row-icon{margin-left:auto;flex-shrink:0;transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${o("pn-accordion-row")} .pn-accordion-row-icon{transition-duration:0s;transition-delay:0s}}${o("pn-accordion-row")} .pn-accordion-row-icon path{fill:#005d92}${o("pn-accordion-row")} .pn-accordion-row[open] .pn-accordion-row-icon{transform:rotate(-180deg)}${o("pn-accordion-row")} .pn-accordion-row-content{color:#2d2013;display:block;padding:1em}`;export{d as pn_accordion_row}
5
+ import{t as o,r as i,c as t,g as n,h as r,a}from"./p-CAEP792y.js";import{c as e}from"./p-DrYFvs2M.js";import{ripple as c,reduceMotion as s}from"./index.esm.js";const d=class{constructor(o){i(this,o),this.togglerow=t(this,"togglerow")}details;summary;content;animation;defaultAnimationDuration=400;animationDuration=this.defaultAnimationDuration;get hostElement(){return n(this)}isClosing=!1;isExpanding=!1;label;state=!1;buttonid;contentid;transparent=!1;togglerow;handleRowState(o){o.detail!==this.state&&(this.details.style.overflow="hidden",this.closeAccordion())}componentWillLoad(){const o=!!this.hostElement.querySelector('[slot="label"]');this.label=o?null:this.label}toggleOpen(o){const i=o??!this.state;this.state!==o&&this.togglerow.emit({element:this.details,state:i}),this.state=i}clickHandler(o){o.preventDefault(),this.details.style.overflow="hidden",this.isClosing||!this.state?this.openAccordion():(this.isClosing||this.state)&&this.closeAccordion();const{x:i,width:t,y:n,top:r}=this.hostElement.getBoundingClientRect();c(0===o.clientX&&0===o.clientY?{clientX:i+t-24,clientY:n-r}:o,this.hostElement,".pn-accordion-row-text")}openAccordion(){this.details.style.height=`${this.details.offsetHeight}px`,this.toggleOpen(!0),requestAnimationFrame((()=>{this.isExpanding=!0;const o=`${this.details.offsetHeight}px`,i=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.cancelAnimations(),this.animate(!0,o,i)}))}closeAccordion(){this.isClosing=!0;const o=`${this.details.offsetHeight}px`,i=`${this.summary.offsetHeight}px`;this.cancelAnimations(),this.animate(!1,o,i)}animate(o,i,t){this.animationDuration=s()?0:this.defaultAnimationDuration,this.animation=this.details.animate({height:[i,t]},{duration:this.animationDuration,easing:"cubic-bezier(0.6, 0, 0.2, 1)"}),this.animation.onfinish=()=>this.animationFinish(o),this.animation.oncancel=()=>{o?this.isExpanding=!1:this.isClosing=!1}}animationFinish(o){this.toggleOpen(o),this.cancelAnimations(),this.isClosing=!1,this.isExpanding=!1,this.details.style.height="",this.details.style.overflow=""}cancelAnimations(){this.animation&&this.animation.cancel()}render(){return r(a,{key:"2b50f9026275b623128e0a441ec4434c50a54338"},r("details",{key:"d60df44b58cd5c27306ec97dd42750bf1f01486c",class:"pn-accordion-row",open:this.state,ref:o=>this.details=o},r("summary",{key:"448587e8102df440a0d633702ea4af8cfe1d9da3",id:this.buttonid,class:"pn-accordion-row-summary",onClick:o=>this.clickHandler(o),ref:o=>this.summary=o},r("div",{key:"bef1fa9595b890919445a6631742c03fd7e18f3f",class:"pn-accordion-row-text","data-transparent":this.transparent},this.label?this.label:"",r("slot",{key:"30742c10f2f557f39f80e97ec3e1c5473400d128",name:"label"}),r("pn-icon",{key:"cfde3e68aab8348a0773c7aa41e02bb905a47e07",class:"pn-accordion-row-icon",icon:e}))),r("div",{key:"054aae1bcf9fb3bf9a050c9fdf7cefef38f164d0",id:this.contentid,class:"pn-accordion-row-content",ref:o=>this.content=o},r("slot",{key:"69378af205ca6c4c159c718f497a2ecf319be959"}))))}};d.style=`${o("pn-accordion-row")}{position:relative;margin:0 -0.25em 0}${o("pn-accordion-row")} .pn-accordion-row{width:100%;display:flex;flex-direction:column}${o("pn-accordion-row")} .pn-accordion-row-summary{color:#2d2013;position:relative;border:none;outline:0;cursor:pointer;-webkit-tap-highlight-color:transparent;width:100%;padding:0.25em;font-size:1em;font-weight:400;border-radius:0.5em;list-style:none}${o("pn-accordion-row")} .pn-accordion-row-summary:hover>.pn-accordion-row-text{background-color:#e0f8ff}${o("pn-accordion-row")} .pn-accordion-row-summary:focus-visible>.pn-accordion-row-text{outline-color:#005d92}${o("pn-accordion-row")} .pn-accordion-row-summary::-webkit-details-marker{display:none}${o("pn-accordion-row")} .pn-accordion-row-text{position:relative;overflow:hidden;display:flex;align-items:center;padding:0.75em;background-color:#ffffff;border-radius:0.5em;-webkit-tap-highlight-color:transparent}${o("pn-accordion-row")} .pn-accordion-row-text[data-transparent]{background-color:transparent}${o("pn-accordion-row")} .pn-accordion-row-text{outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${o("pn-accordion-row")} .pn-accordion-row-text{transition-duration:0s;transition-delay:0s}}${o("pn-accordion-row")} .pn-accordion-row-text .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${o("pn-accordion-row")} .pn-accordion-row-icon{margin-left:auto;flex-shrink:0;transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${o("pn-accordion-row")} .pn-accordion-row-icon{transition-duration:0s;transition-delay:0s}}${o("pn-accordion-row")} .pn-accordion-row-icon path{fill:#005d92}${o("pn-accordion-row")} .pn-accordion-row[open] .pn-accordion-row-icon{transform:rotate(-180deg)}${o("pn-accordion-row")} .pn-accordion-row-content{color:#2d2013;display:block;padding:1em}`;export{d as pn_accordion_row}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t as e,r as t,g as n,f as r,h as s,a as o}from"./p-DWsprozV.js";import{a as i}from"./p-CQaMdITw.js";import{a}from"./p-D_UyW-KH.js";const c=class{constructor(e){t(this,e)}mo;segmentContainer;segments=[];activeBg;hoverBg;scrollRegistered=!1;get hostElement(){return n(this)}showScrollArrows=!1;showLeftArrow=!1;showRightArrow=!1;name;value;valueHandler(){this.setActiveSegment()}changeHandler(e){this.value=e.target.value,this.setActiveSegment()}handleResize(){this.rerender()}handleHover(e){const{target:t}=e.detail;this.calcHighlight(t,!0)}componentDidLoad(){this.mo&&this.mo.disconnect(),this.mo=new MutationObserver((()=>{r(this.hostElement),this.setSegments()})),this.mo.observe(this.hostElement,{childList:!0}),this.setSegments()}setSegments(){this.segments=Array.from(this.hostElement.querySelectorAll(`${e("pn-segment")}`)),this.setActiveSegment()}setActiveSegment(){this.segments.forEach((e=>{this.value===e.value?e.setAttribute("selected","true"):e.removeAttribute("selected")})),this.rerender()}rerender(){requestAnimationFrame((()=>{this.calcHighlight(),this.scrollArrowRender()}))}calcHighlight(t,n){const r=n?this.hoverBg:this.activeBg;requestAnimationFrame((()=>{const n=t||this.segments.find((({value:e})=>e===this.value)),s=n?.closest(`${e("pn-segment")}`);if(!s)return;const o=s.getBoundingClientRect(),{left:i}=this.segmentContainer.getBoundingClientRect(),{left:a,height:c,width:d}=o;r.style.setProperty("transform",`translate(${a-i+this.segmentContainer.scrollLeft}px, -50%`),r.style.setProperty("width",`${d}px`),r.style.setProperty("height",`${c}px`),n.disabled?r.dataset.disabled="":delete r.dataset.disabled}))}scrollArrowRender(){if(this.segmentContainer.scrollWidth>this.segmentContainer.clientWidth){this.showScrollArrows=!0,this.scrollRegistered||(this.segmentContainer.addEventListener("scroll",this.scrollArrowRender.bind(this)),this.scrollRegistered=!0);const e=Math.round(this.segmentContainer.scrollWidth-this.segmentContainer.scrollLeft)-this.segmentContainer.clientWidth;return this.showLeftArrow=this.segmentContainer.scrollLeft>0,void(this.showRightArrow=e>0)}this.showLeftArrow=!1,this.showRightArrow=!1,this.showScrollArrows=!1}scroll(e){this.segmentContainer.scroll({left:this.segmentContainer.scrollLeft+e,behavior:"smooth"})}scrollArrowClasses(){const e=["pn-sc-arrows"];return this.showLeftArrow&&e.push("pn-sc-left-visible"),this.showRightArrow&&e.push("pn-sc-right-visible"),e.join(" ")}render(){return s(o,{key:"a43ed5a11b854e8f7d0ec9fa4f134480a510de63"},s("div",{key:"d838f7a86ab63e80874eda6ca12885657127ed33",class:"pn-segmented-control",ref:e=>this.segmentContainer=e},s("slot",{key:"edc2ab83406cf25a6f3854f3e6886e3ab658af63"}),s("div",{key:"e56e19761edf88813a423a986e8f82c56c8b252c",class:"pn-sc-bg","data-active":!0,ref:e=>this.activeBg=e}),s("div",{key:"c7ffc7f04d456d72418684715015ead88f65bc72",class:"pn-sc-bg","data-hover":!0,ref:e=>this.hoverBg=e})),s("div",{key:"4c5eecbd2f70a2ee159a465265071d5705370232",class:this.scrollArrowClasses(),hidden:!this.showScrollArrows},s("button",{key:"4f987e124f74b1a24871f81fa07eeb0d8cebe913","aria-label":"Left",class:"pn-sc-arrow pn-sc-arrow-left",onClick:()=>this.scroll(-120),tabindex:"-1"},s("pn-icon",{key:"a1e6cc5963fb758e5ba74668856e5addeb22052c",icon:i})),s("button",{key:"3eb57c028b2d547b14cd700cf162708ff3a4b1ab","aria-label":"Right",class:"pn-sc-arrow pn-sc-arrow-right",onClick:()=>this.scroll(120),tabindex:"-1"},s("pn-icon",{key:"aefbe98d26875fbff30c4001468730dcb9d777e7",icon:a}))))}static get watchers(){return{value:[{valueHandler:0}]}}};c.style=`${e("pn-segmented-control")}{position:relative;display:inline-block;max-width:100%;overflow:hidden;border-radius:3em;transform:translateZ(0);transition-property:outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-segmented-control")}{transition-duration:0s;transition-delay:0s}}${e("pn-segmented-control")}{outline:0.2rem solid transparent;outline-offset:0.2rem}${e("pn-segmented-control")}:focus-within,${e("pn-segmented-control")}:active{outline-color:#005d92}${e("pn-segmented-control")} .pn-segmented-control{display:flex;align-items:center;border-radius:3em;min-height:3em;padding:0.25em;background:#f3f2f2;position:relative;overflow-x:auto;scroll-snap-type:x mandatory}${e("pn-segmented-control")} .pn-segmented-control:hover .pn-sc-bg[data-hover]{opacity:1}${e("pn-segmented-control")} .pn-segmented-control::-webkit-scrollbar{display:none}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg{position:absolute;top:50%;transform:translateY(-50%);will-change:transform;left:0;border-radius:inherit;transition-property:width, transform, background-color, opacity, box-shadow;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg{transition-duration:0s;transition-delay:0s}}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-active]{box-shadow:0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13);border:0.0625em solid #005d92;background-color:#ffffff;z-index:1}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-hover]{background-color:#e0f8ff;opacity:0;border:0.25em solid transparent;z-index:0}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-hover][data-disabled]{border-color:#e9e6e5;background-color:#e9e6e5}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-disabled]{border-color:#e9e6e5;background-color:#e9e6e5}${e("pn-segmented-control")} .pn-sc-arrows{position:absolute;top:50%;transform:translateY(-50%);left:0;height:100%;width:100%;z-index:3;display:flex;justify-content:space-between;align-items:center;pointer-events:none}${e("pn-segmented-control")} .pn-sc-arrows svg{width:1.5em}${e("pn-segmented-control")} .pn-sc-arrows svg.pn-icon-svg path{fill:#005d92}${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow{cursor:pointer;pointer-events:all;width:2.5em;height:2.5em;background:#ffffff;border:none;outline:none;display:flex;align-items:center;justify-content:center;opacity:0;will-change:transform;-webkit-tap-highlight-color:transparent;transition-property:transform, opacity, background-color, box-shadow;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow{transition-duration:0s;transition-delay:0s}}${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow.pn-sc-arrow-left{transform:translateX(-100%);border-radius:0 50% 50% 0;padding:0 0.3em 0 0;box-shadow:0.2rem 0.3rem 0.2rem rgba(0, 0, 0, 0.4)}${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow.pn-sc-arrow-right{transform:translateX(100%);border-radius:50% 0 0 50%;box-shadow:-0.2rem 0.3rem 0.2rem rgba(0, 0, 0, 0.4)}${e("pn-segmented-control")} .pn-sc-arrows.pn-sc-left-visible .pn-sc-arrow-left,${e("pn-segmented-control")} .pn-sc-arrows.pn-sc-right-visible .pn-sc-arrow-right{opacity:1;transform:translateX(0)}`;export{c as pn_segmented_control}
5
+ import{t as e,r as t,g as n,f as r,h as s,a as o}from"./p-CAEP792y.js";import{a as i}from"./p-CQaMdITw.js";import{a}from"./p-D_UyW-KH.js";const c=class{constructor(e){t(this,e)}mo;segmentContainer;segments=[];activeBg;hoverBg;scrollRegistered=!1;get hostElement(){return n(this)}showScrollArrows=!1;showLeftArrow=!1;showRightArrow=!1;name;value;valueHandler(){this.setActiveSegment()}changeHandler(e){this.value=e.target.value,this.setActiveSegment()}handleResize(){this.rerender()}handleHover(e){const{target:t}=e.detail;this.calcHighlight(t,!0)}componentDidLoad(){this.mo&&this.mo.disconnect(),this.mo=new MutationObserver((()=>{r(this.hostElement),this.setSegments()})),this.mo.observe(this.hostElement,{childList:!0}),this.setSegments()}setSegments(){this.segments=Array.from(this.hostElement.querySelectorAll(`${e("pn-segment")}`)),this.setActiveSegment()}setActiveSegment(){this.segments.forEach((e=>{this.value===e.value?e.setAttribute("selected","true"):e.removeAttribute("selected")})),this.rerender()}rerender(){requestAnimationFrame((()=>{this.calcHighlight(),this.scrollArrowRender()}))}calcHighlight(t,n){const r=n?this.hoverBg:this.activeBg;requestAnimationFrame((()=>{const n=t||this.segments.find((({value:e})=>e===this.value)),s=n?.closest(`${e("pn-segment")}`);if(!s)return;const o=s.getBoundingClientRect(),{left:i}=this.segmentContainer.getBoundingClientRect(),{left:a,height:c,width:d}=o;r.style.setProperty("transform",`translate(${a-i+this.segmentContainer.scrollLeft}px, -50%`),r.style.setProperty("width",`${d}px`),r.style.setProperty("height",`${c}px`),n.disabled?r.dataset.disabled="":delete r.dataset.disabled}))}scrollArrowRender(){if(this.segmentContainer.scrollWidth>this.segmentContainer.clientWidth){this.showScrollArrows=!0,this.scrollRegistered||(this.segmentContainer.addEventListener("scroll",this.scrollArrowRender.bind(this)),this.scrollRegistered=!0);const e=Math.round(this.segmentContainer.scrollWidth-this.segmentContainer.scrollLeft)-this.segmentContainer.clientWidth;return this.showLeftArrow=this.segmentContainer.scrollLeft>0,void(this.showRightArrow=e>0)}this.showLeftArrow=!1,this.showRightArrow=!1,this.showScrollArrows=!1}scroll(e){this.segmentContainer.scroll({left:this.segmentContainer.scrollLeft+e,behavior:"smooth"})}scrollArrowClasses(){const e=["pn-sc-arrows"];return this.showLeftArrow&&e.push("pn-sc-left-visible"),this.showRightArrow&&e.push("pn-sc-right-visible"),e.join(" ")}render(){return s(o,{key:"4ff48c9a0556397894d55f7d3dc0a266349ef8fc"},s("div",{key:"82ef8456eda4724b55705f9a662577eb172df89d",class:"pn-segmented-control",ref:e=>this.segmentContainer=e},s("slot",{key:"9b2949cf6e7976795543f6f8a67c126bee02e59d"}),s("div",{key:"42ab10791de502f48aac3a16766425b435c1c52e",class:"pn-sc-bg","data-active":!0,ref:e=>this.activeBg=e}),s("div",{key:"24060bf183aabe485b7ff66bbad9b44a7704df12",class:"pn-sc-bg","data-hover":!0,ref:e=>this.hoverBg=e})),s("div",{key:"31790d3f9fccd0c4242b5584ba2ff6ee32df4297",class:this.scrollArrowClasses(),hidden:!this.showScrollArrows},s("button",{key:"8ffa7498550bc0f052b77f5297b349b84efbccb8","aria-label":"Left",class:"pn-sc-arrow pn-sc-arrow-left",onClick:()=>this.scroll(-120),tabindex:"-1"},s("pn-icon",{key:"89d4ee843ade39e7264e08c31ad83c2dd32f7931",icon:i})),s("button",{key:"8f1707b0e2debb84451210d03187b51eba3f2897","aria-label":"Right",class:"pn-sc-arrow pn-sc-arrow-right",onClick:()=>this.scroll(120),tabindex:"-1"},s("pn-icon",{key:"4fa0fcd57eb268e3c9cd9e42f5d4e84b433fafee",icon:a}))))}static get watchers(){return{value:[{valueHandler:0}]}}};c.style=`${e("pn-segmented-control")}{position:relative;display:inline-block;max-width:100%;overflow:hidden;border-radius:3em;transform:translateZ(0);transition-property:outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-segmented-control")}{transition-duration:0s;transition-delay:0s}}${e("pn-segmented-control")}{outline:0.2rem solid transparent;outline-offset:0.2rem}${e("pn-segmented-control")}:focus-within,${e("pn-segmented-control")}:active{outline-color:#005d92}${e("pn-segmented-control")} .pn-segmented-control{display:flex;align-items:center;border-radius:3em;min-height:3em;padding:0.25em;background:#f3f2f2;position:relative;overflow-x:auto;scroll-snap-type:x mandatory}${e("pn-segmented-control")} .pn-segmented-control:hover .pn-sc-bg[data-hover]{opacity:1}${e("pn-segmented-control")} .pn-segmented-control::-webkit-scrollbar{display:none}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg{position:absolute;top:50%;transform:translateY(-50%);will-change:transform;left:0;border-radius:inherit;transition-property:width, transform, background-color, opacity, box-shadow;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg{transition-duration:0s;transition-delay:0s}}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-active]{box-shadow:0px 0.3px 0.9px rgba(0, 0, 0, 0.1), 0px 1.6px 3.6px rgba(0, 0, 0, 0.13);border:0.0625em solid #005d92;background-color:#ffffff;z-index:1}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-hover]{background-color:#e0f8ff;opacity:0;border:0.25em solid transparent;z-index:0}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-hover][data-disabled]{border-color:#e9e6e5;background-color:#e9e6e5}${e("pn-segmented-control")} .pn-segmented-control .pn-sc-bg[data-disabled]{border-color:#e9e6e5;background-color:#e9e6e5}${e("pn-segmented-control")} .pn-sc-arrows{position:absolute;top:50%;transform:translateY(-50%);left:0;height:100%;width:100%;z-index:3;display:flex;justify-content:space-between;align-items:center;pointer-events:none}${e("pn-segmented-control")} .pn-sc-arrows svg{width:1.5em}${e("pn-segmented-control")} .pn-sc-arrows svg.pn-icon-svg path{fill:#005d92}${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow{cursor:pointer;pointer-events:all;width:2.5em;height:2.5em;background:#ffffff;border:none;outline:none;display:flex;align-items:center;justify-content:center;opacity:0;will-change:transform;-webkit-tap-highlight-color:transparent;transition-property:transform, opacity, background-color, box-shadow;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow{transition-duration:0s;transition-delay:0s}}${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow.pn-sc-arrow-left{transform:translateX(-100%);border-radius:0 50% 50% 0;padding:0 0.3em 0 0;box-shadow:0.2rem 0.3rem 0.2rem rgba(0, 0, 0, 0.4)}${e("pn-segmented-control")} .pn-sc-arrows>.pn-sc-arrow.pn-sc-arrow-right{transform:translateX(100%);border-radius:50% 0 0 50%;box-shadow:-0.2rem 0.3rem 0.2rem rgba(0, 0, 0, 0.4)}${e("pn-segmented-control")} .pn-sc-arrows.pn-sc-left-visible .pn-sc-arrow-left,${e("pn-segmented-control")} .pn-sc-arrows.pn-sc-right-visible .pn-sc-arrow-right{opacity:1;transform:translateX(0)}`;export{c as pn_segmented_control}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t as r,r as e,g as s,h as a,a as t}from"./p-DWsprozV.js";import{a as i}from"./p-B88w-Zxn.js";import{c as o}from"./p-D4GZ__oQ.js";import{uuidv4 as n}from"./index.esm.js";const d=class{constructor(r){e(this,r)}uniqueId=n();idProgress=`pn-progress-bar-${this.uniqueId}`;idLabel=`${this.idProgress}-label`;idText=`${this.idProgress}-text`;get hostElement(){return s(this)}progressPercentage;label;progress=0;progressText;successText;error;progressId=this.idProgress;setProgress(){if(!Number.isInteger(this.progress))return;const r=this.progress<100?Math.ceil(this.progress):100;this.progressPercentage=`${r.toString()}%`,this.hostElement.style.setProperty("--progress-value",this.progressPercentage)}componentWillLoad(){this.setProgress()}hasLabel(){return!!this.label?.length}hasText(){return!!this.successText?.length}hasError(){return!!this.error?.length}isValid(){return 100===this.progress}hasIcon(){return this.isValid()||this.hasError()}getSubtext(){return this.hasError()?this.error:this.isValid()&&this.hasText()?this.successText:this.progressText?this.progressText:this.progressPercentage}getIconSvg(){return this.hasError()?i:o}getIconColor(){return this.hasError()?"warning":"green500"}render(){return a(t,{key:"141fef1da768dc423cf53dfa8088f1b98429236c"},this.hasLabel()&&a("p",{key:"294199499037e6ed0e816f8a68850dfede795884",id:this.idLabel,class:"pn-progress-bar-label"},a("span",{key:"f292e951e29878d186b7f7896d7346fd41677006"},this.label),this.hasIcon()&&a("pn-icon",{key:"47b8065b97a8cd0f0d3e57ea4f68b07ad09c12a5",icon:this.getIconSvg(),color:this.getIconColor()})),a("div",{key:"0dd5189948aad2e501ee10076ed212987a52e4d8",id:this.progressId,class:"pn-progress-bar-container",role:"progressbar","aria-labelledby":this.idLabel,"aria-describedby":this.hasIcon()?this.idText:null,"aria-valuenow":this.progress,"aria-valuetext":this.progressPercentage},a("div",{key:"51ceae38d589385687dd3e25c86526b4758f2792",class:"pn-progress-bar-meter"},a("div",{key:"714d0aa19a487bf625ae10bcdd68d21d54b6f48a",class:"pn-progress-bar-value","data-error":this.hasError(),"data-valid":this.isValid()}))),a("p",{key:"b540a56c9d7fdfae49f508472d315ce1eeda5e99",id:this.idText,class:"pn-progress-bar-subtext",role:this.hasError()?"alert":null},a("span",{key:"35d515a823d117a6ab31e3cda778a2ada8093233"},this.getSubtext())))}static get watchers(){return{progress:[{setProgress:0}]}}};d.style=`${r("pn-progress-bar")} .pn-progress-bar-label{margin-bottom:0.5em;color:#2d2013;font-weight:500;display:flex;justify-content:space-between;align-items:center;gap:0.5em}${r("pn-progress-bar")} .pn-progress-bar-subtext{margin-top:0.5em;color:#5e554a;font-weight:400}${r("pn-progress-bar")} .pn-progress-bar-container{overflow:hidden;padding:0.0625em;height:0.75em;border-radius:0.5em}${r("pn-progress-bar")} .pn-progress-bar-meter{position:relative;width:100%;background:#f3f2f2;height:0.625em;border-radius:0.5em;box-shadow:0 0 0 0.0625em #969087}${r("pn-progress-bar")} .pn-progress-bar-value{position:absolute;top:-0.0625em;left:-0.0625em;height:0.75em;background-color:#005d92;width:var(--progress-value);border-radius:0.5em 0 0 0.5em;transition-property:width, border-radius, background-color;transition-duration:0.2s, 0.2s, 0.5s;transition-timing-function:linear}@media (prefers-reduced-motion: reduce){${r("pn-progress-bar")} .pn-progress-bar-value{transition-duration:0s}}${r("pn-progress-bar")} .pn-progress-bar-value[data-valid]{width:calc(var(--progress-value) + 0.125em);background-color:#0aa85c;border-top-right-radius:0.5em;border-bottom-right-radius:0.5em}${r("pn-progress-bar")} .pn-progress-bar-value[data-error]{background-color:#a70707}`;export{d as pn_progress_bar}
5
+ import{t as r,r as e,g as s,h as a,a as t}from"./p-CAEP792y.js";import{a as i}from"./p-B88w-Zxn.js";import{c as o}from"./p-D4GZ__oQ.js";import{uuidv4 as n}from"./index.esm.js";const d=class{constructor(r){e(this,r)}uniqueId=n();idProgress=`pn-progress-bar-${this.uniqueId}`;idLabel=`${this.idProgress}-label`;idText=`${this.idProgress}-text`;get hostElement(){return s(this)}progressPercentage;label;progress=0;progressText;successText;error;progressId=this.idProgress;setProgress(){if(!Number.isInteger(this.progress))return;const r=this.progress<100?Math.ceil(this.progress):100;this.progressPercentage=`${r.toString()}%`,this.hostElement.style.setProperty("--progress-value",this.progressPercentage)}componentWillLoad(){this.setProgress()}hasLabel(){return!!this.label?.length}hasText(){return!!this.successText?.length}hasError(){return!!this.error?.length}isValid(){return 100===this.progress}hasIcon(){return this.isValid()||this.hasError()}getSubtext(){return this.hasError()?this.error:this.isValid()&&this.hasText()?this.successText:this.progressText?this.progressText:this.progressPercentage}getIconSvg(){return this.hasError()?i:o}getIconColor(){return this.hasError()?"warning":"green500"}render(){return a(t,{key:"141fef1da768dc423cf53dfa8088f1b98429236c"},this.hasLabel()&&a("p",{key:"294199499037e6ed0e816f8a68850dfede795884",id:this.idLabel,class:"pn-progress-bar-label"},a("span",{key:"f292e951e29878d186b7f7896d7346fd41677006"},this.label),this.hasIcon()&&a("pn-icon",{key:"47b8065b97a8cd0f0d3e57ea4f68b07ad09c12a5",icon:this.getIconSvg(),color:this.getIconColor()})),a("div",{key:"0dd5189948aad2e501ee10076ed212987a52e4d8",id:this.progressId,class:"pn-progress-bar-container",role:"progressbar","aria-labelledby":this.idLabel,"aria-describedby":this.hasIcon()?this.idText:null,"aria-valuenow":this.progress,"aria-valuetext":this.progressPercentage},a("div",{key:"51ceae38d589385687dd3e25c86526b4758f2792",class:"pn-progress-bar-meter"},a("div",{key:"714d0aa19a487bf625ae10bcdd68d21d54b6f48a",class:"pn-progress-bar-value","data-error":this.hasError(),"data-valid":this.isValid()}))),a("p",{key:"b540a56c9d7fdfae49f508472d315ce1eeda5e99",id:this.idText,class:"pn-progress-bar-subtext",role:this.hasError()?"alert":null},a("span",{key:"35d515a823d117a6ab31e3cda778a2ada8093233"},this.getSubtext())))}static get watchers(){return{progress:[{setProgress:0}]}}};d.style=`${r("pn-progress-bar")} .pn-progress-bar-label{margin-bottom:0.5em;color:#2d2013;font-weight:500;display:flex;justify-content:space-between;align-items:center;gap:0.5em}${r("pn-progress-bar")} .pn-progress-bar-subtext{margin-top:0.5em;color:#5e554a;font-weight:400}${r("pn-progress-bar")} .pn-progress-bar-container{overflow:hidden;padding:0.0625em;height:0.75em;border-radius:0.5em}${r("pn-progress-bar")} .pn-progress-bar-meter{position:relative;width:100%;background:#f3f2f2;height:0.625em;border-radius:0.5em;box-shadow:0 0 0 0.0625em #969087}${r("pn-progress-bar")} .pn-progress-bar-value{position:absolute;top:-0.0625em;left:-0.0625em;height:0.75em;background-color:#005d92;width:var(--progress-value);border-radius:0.5em 0 0 0.5em;transition-property:width, border-radius, background-color;transition-duration:0.2s, 0.2s, 0.5s;transition-timing-function:linear}@media (prefers-reduced-motion: reduce){${r("pn-progress-bar")} .pn-progress-bar-value{transition-duration:0s}}${r("pn-progress-bar")} .pn-progress-bar-value[data-valid]{width:calc(var(--progress-value) + 0.125em);background-color:#0aa85c;border-top-right-radius:0.5em;border-bottom-right-radius:0.5em}${r("pn-progress-bar")} .pn-progress-bar-value[data-error]{background-color:#a70707}`;export{d as pn_progress_bar}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t,r as i,c as e,h as r,a as s}from"./p-DWsprozV.js";import{w as o}from"./p-C_nYl55V.js";const n=class{constructor(t){i(this,t),this.setactivestep=e(this,"setactivestep")}activated;done;activeStep;index;name;checked=!1;active;setactivestep;setActiveStepHandler(){(this.done||this.activated)&&this.setactivestep.emit(this.index)}componentWillLoad(){this.checkStatus()}componentDidUpdate(){this.checkStatus()}checkStatus(){this.done||(this.done=this.checked||this.activeStep>this.index),"yes"===this.active?this.activated=!0:"no"===this.active?(this.activated=!1,this.done=!1):this.activated||(this.activated=this.activeStep>=this.index)}getClassNames(){let t="pn-progress-indicator-step";return(this.done||this.checked)&&(t+=" done"),this.activated&&(t+=" activated"),this.activeStep===this.index&&(t+=" active"),t}render(){return r(s,{key:"e5518f2d8c21c889738beb3a42e6865e7c64ac76",class:this.getClassNames(),onClick:()=>this.setActiveStepHandler()},r("div",{key:"b0f5f684ca12fda2b22b51945d3b0b41ab490fa3",class:"progress-line"}),r("div",{key:"8d05494d4cc77145e44270666b678cf48eb05a96",class:"info-container"},r("slot",{key:"864bea1ce3dd348be1abadcc3f8fb3757ac009b9"}),this.name),r("div",{key:"7d8394e5a4919404a137fd30ce125dfda5ed3034",class:"circle"},this.done||this.checked?r("svg",{xmlns:"http://www.w3.org/2000/svg","enable-background":"new 0 0 24 24",id:"checkmark",version:"1.0",viewBox:"0 0 24 24"},r("polyline",{class:"checkmark-path",fill:"none",points:"20,6 9,17 4,12",stroke:o,"stroke-miterlimit":"10","stroke-width":"3"})):""))}};n.style=`${t("pn-progress-indicator-step")}{display:flex;flex:1 0 4em}${t("pn-progress-indicator-step")}:first-child{flex:0 0 auto}${t("pn-progress-indicator-step")}:first-child .progress-line{display:none}${t("pn-progress-indicator-step")}:first-child .info-container{transform:translateX(-50%);left:50%}.pn-progress-indicator-step{position:relative;display:flex;flex:1 0 4em;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent}.pn-progress-indicator-step .circle{width:1.5em;height:1.5em;padding:0.3rem;border-radius:50%;background-color:#f3f2f2;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .circle{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container{position:absolute;bottom:-2.5em;right:0;transform:translateX(50%) translateX(-1.2rem);white-space:nowrap;color:#f3f2f2;display:flex;align-items:center;flex-direction:column;font-size:1em;font-weight:normal;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .info-container{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container .pn-icon-svg{height:1.7em;width:1.7em;margin-bottom:0.1em}.pn-progress-indicator-step .info-container .pn-icon-svg path,.pn-progress-indicator-step .info-container .pn-icon-svg polygon{fill:#f3f2f2}.pn-progress-indicator-step .progress-line{flex:1 1 auto;margin:auto 4px;height:0.8rem;background-color:#f3f2f2;position:relative;overflow:hidden;pointer-events:none;border-radius:10rem}.pn-progress-indicator-step .progress-line:after{content:"";position:absolute;top:0;left:0;height:0.8rem;width:100%;background-color:#005d92;transform:translateX(-100%);transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .progress-line:after{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .progress-line:after{transition-delay:0.2s}.pn-progress-indicator-step.active .info-container{color:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg path{fill:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg polygon{fill:#000000}.pn-progress-indicator-step.activated{cursor:pointer}.pn-progress-indicator-step.done .progress-line:after,.pn-progress-indicator-step.active .progress-line:after{transform:translateX(0)}.pn-progress-indicator-step.done .circle,.pn-progress-indicator-step.active .circle{background-color:#005d92}.pn-progress-indicator-step.done .checkmark-path{stroke-linecap:round;stroke-dasharray:27;stroke-dashoffset:-23;animation:dash 0.2s cubic-bezier(0.55, 0, 0.1, 1) both}@keyframes dash{to{stroke-dashoffset:0}}`;export{n as pn_progress_indicator_step}
5
+ import{t,r as i,c as e,h as r,a as s}from"./p-CAEP792y.js";import{w as o}from"./p-C_nYl55V.js";const n=class{constructor(t){i(this,t),this.setactivestep=e(this,"setactivestep")}activated;done;activeStep;index;name;checked=!1;active;setactivestep;setActiveStepHandler(){(this.done||this.activated)&&this.setactivestep.emit(this.index)}componentWillLoad(){this.checkStatus()}componentDidUpdate(){this.checkStatus()}checkStatus(){this.done||(this.done=this.checked||this.activeStep>this.index),"yes"===this.active?this.activated=!0:"no"===this.active?(this.activated=!1,this.done=!1):this.activated||(this.activated=this.activeStep>=this.index)}getClassNames(){let t="pn-progress-indicator-step";return(this.done||this.checked)&&(t+=" done"),this.activated&&(t+=" activated"),this.activeStep===this.index&&(t+=" active"),t}render(){return r(s,{key:"e5518f2d8c21c889738beb3a42e6865e7c64ac76",class:this.getClassNames(),onClick:()=>this.setActiveStepHandler()},r("div",{key:"b0f5f684ca12fda2b22b51945d3b0b41ab490fa3",class:"progress-line"}),r("div",{key:"8d05494d4cc77145e44270666b678cf48eb05a96",class:"info-container"},r("slot",{key:"864bea1ce3dd348be1abadcc3f8fb3757ac009b9"}),this.name),r("div",{key:"7d8394e5a4919404a137fd30ce125dfda5ed3034",class:"circle"},this.done||this.checked?r("svg",{xmlns:"http://www.w3.org/2000/svg","enable-background":"new 0 0 24 24",id:"checkmark",version:"1.0",viewBox:"0 0 24 24"},r("polyline",{class:"checkmark-path",fill:"none",points:"20,6 9,17 4,12",stroke:o,"stroke-miterlimit":"10","stroke-width":"3"})):""))}};n.style=`${t("pn-progress-indicator-step")}{display:flex;flex:1 0 4em}${t("pn-progress-indicator-step")}:first-child{flex:0 0 auto}${t("pn-progress-indicator-step")}:first-child .progress-line{display:none}${t("pn-progress-indicator-step")}:first-child .info-container{transform:translateX(-50%);left:50%}.pn-progress-indicator-step{position:relative;display:flex;flex:1 0 4em;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent}.pn-progress-indicator-step .circle{width:1.5em;height:1.5em;padding:0.3rem;border-radius:50%;background-color:#f3f2f2;transition-property:background-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .circle{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container{position:absolute;bottom:-2.5em;right:0;transform:translateX(50%) translateX(-1.2rem);white-space:nowrap;color:#f3f2f2;display:flex;align-items:center;flex-direction:column;font-size:1em;font-weight:normal;transition-property:color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .info-container{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .info-container .pn-icon-svg{height:1.7em;width:1.7em;margin-bottom:0.1em}.pn-progress-indicator-step .info-container .pn-icon-svg path,.pn-progress-indicator-step .info-container .pn-icon-svg polygon{fill:#f3f2f2}.pn-progress-indicator-step .progress-line{flex:1 1 auto;margin:auto 4px;height:0.8rem;background-color:#f3f2f2;position:relative;overflow:hidden;pointer-events:none;border-radius:10rem}.pn-progress-indicator-step .progress-line:after{content:"";position:absolute;top:0;left:0;height:0.8rem;width:100%;background-color:#005d92;transform:translateX(-100%);transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){.pn-progress-indicator-step .progress-line:after{transition-duration:0s;transition-delay:0s}}.pn-progress-indicator-step .progress-line:after{transition-delay:0.2s}.pn-progress-indicator-step.active .info-container{color:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg path{fill:#000000}.pn-progress-indicator-step.active .info-container .pn-icon-svg polygon{fill:#000000}.pn-progress-indicator-step.activated{cursor:pointer}.pn-progress-indicator-step.done .progress-line:after,.pn-progress-indicator-step.active .progress-line:after{transform:translateX(0)}.pn-progress-indicator-step.done .circle,.pn-progress-indicator-step.active .circle{background-color:#005d92}.pn-progress-indicator-step.done .checkmark-path{stroke-linecap:round;stroke-dasharray:27;stroke-dashoffset:-23;animation:dash 0.2s cubic-bezier(0.55, 0, 0.1, 1) both}@keyframes dash{to{stroke-dashoffset:0}}`;export{n as pn_progress_indicator_step}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t,r as i,c as e,g as n,f as l,h as a,a as o}from"./p-DWsprozV.js";import{o as r}from"./p-IFVOY5Gf.js";import{ripple as s}from"./index.esm.js";const p=class{constructor(t){i(this,t),this.pnTile=e(this,"pnTile")}mo;tile;illustrationSlot;visibleOutline=!1;get hostElement(){return n(this)}label;text;url;target;rel="noopener noreferrer";illustration;icon;horizontal=!1;pnTile;connectedCallback(){this.mo=new MutationObserver((()=>l(this.hostElement))),this.mo.observe(this.hostElement,{subtree:!0,childList:!0})}disconnectedCallback(){this.mo?.disconnect()}isExternal(){return"_blank"===this.target}showIcon(){return!!this.icon&&!this.showSlotIllustration()}showPropIllustration(){return!!this.illustration&&!this.showSlotIllustration()}showSlotIllustration(){return!!this.illustrationSlot?.querySelector('[slot="illustration"]')}showImage(){return this.showIcon()||this.showPropIllustration()||this.showSlotIllustration()}handleFocus({type:t,target:i}){this.visibleOutline="focus"===t&&i.matches(":focus-visible")}clickHandler(t){s(t,this.tile),this.pnTile.emit({click:t})}render(){return a(o,{key:"08be79249da65274656e90f5712babf4811c8c54"},a("div",{key:"29758442a6da5849d7fc920e811c15ec0aaf01ab",class:"pn-tile","data-horizontal":this.horizontal,"data-href":!!this.url,"data-focus":this.visibleOutline,ref:t=>this.tile=t},a("div",{key:"9db26483510dd6fb18a155555649edcb99aab3ab",class:"pn-tile-illustration","data-circle":!!this.url,"data-icon":this.showIcon(),role:"presentation",hidden:!this.showImage()},this.showPropIllustration()?a("pn-illustration",{illustration:this.illustration}):this.showIcon()&&a("pn-icon",{color:"blue700",icon:this.icon}),a("div",{key:"c9c30bfd0e4650caaac888bffc8877203bb22bee",class:"pn-tile-illustration-slot",hidden:!this.showSlotIllustration(),ref:t=>this.illustrationSlot=t},a("slot",{key:"6f8b24bfdbc809d1525a9b26518a94bc1d54e8b3",name:"illustration"}))),a("div",{key:"9780c0bcfbcf9d13581a0e0a680fd5222852a202",class:"pn-tile-text"},a("h3",{key:"26cde96074fa4425b4e47af2c558b10c28b25a64",class:"pn-tile-title"},this.url?a("a",{class:"pn-tile-link",href:this.url,target:this.target,rel:!this.rel&&this.isExternal()?"noopener noreferrer":this.rel,onClick:t=>this.clickHandler(t),onFocus:t=>this.handleFocus(t),onBlur:t=>this.handleFocus(t)},this.label):this.label,this.isExternal()&&a("pn-icon",{key:"e6d1fdcd52357d5c83a499be6bebad6ffaf183b0",icon:r,small:!0,color:"blue700"})),a("div",{key:"86583c570242905f506c0196909d4a805be8eab5",class:"pn-tile-slot"},!!this.text&&a("p",{key:"2da94d451c30ef1aaee0e4527ab31d6e301cb19f",class:"pn-tile-paragraph"},this.text),a("slot",{key:"bfb995e2608d30ca77b4c88e51d64a3ae20243f7"})))))}};p.style=`${t("pn-tile")}{position:relative;display:block}${t("pn-tile")} .pn-tile{position:relative;overflow:hidden;word-break:break-word;text-align:center;border-radius:0.5em;padding:clamp(0.75em, 3vw, 1.5em);height:100%;color:#2d2013;background-color:#ffffff;box-shadow:0em 0.0625em 0.125em 0em rgba(20, 20, 20, 0.11), 0em 0.1875em 0.4375em 0em rgba(0, 0, 0, 0.13);display:flex;flex-wrap:wrap;flex-direction:column;align-items:center;justify-content:flex-start;gap:clamp(1em, 5vw, 1.5em);outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:box-shadow, background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tile")} .pn-tile{transition-duration:0s;transition-delay:0s}}${t("pn-tile")} .pn-tile .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${t("pn-tile")} .pn-tile[data-horizontal]{text-align:left;flex-direction:row;flex-wrap:nowrap;gap:clamp(1em, 5vw, 1.5em)}${t("pn-tile")} .pn-tile[data-horizontal] .pn-tile-illustration[data-circle]:before{clip-path:ellipse(0% 100% at 0% 50%)}${t("pn-tile")} .pn-tile[data-horizontal] .pn-tile-text{flex-grow:2}${t("pn-tile")} .pn-tile[data-href][data-focus]{outline-color:#005d92;box-shadow:0em 0em 0em 0em rgba(20, 20, 20, 0.11), 0em 0em 0em 0em rgba(0, 0, 0, 0.13)}${t("pn-tile")} .pn-tile[data-href]:hover{background-color:rgba(183, 235, 252, 0.3)}${t("pn-tile")} .pn-tile[data-href]:hover .pn-tile-illustration[data-circle]:before,${t("pn-tile")} .pn-tile[data-href]:focus-within .pn-tile-illustration[data-circle]:before{clip-path:ellipse(100% 50% at 50% -25%)}${t("pn-tile")} .pn-tile[data-href]:hover[data-horizontal] .pn-tile-illustration[data-circle]:before,${t("pn-tile")} .pn-tile[data-href]:focus-within[data-horizontal] .pn-tile-illustration[data-circle]:before{clip-path:ellipse(50% 100% at -25% 50%)}${t("pn-tile")} .pn-tile[data-href]:hover .pn-tile-link,${t("pn-tile")} .pn-tile[data-href]:focus-within .pn-tile-link{color:#0d234b;text-decoration-color:#0d234b}${t("pn-tile")} .pn-tile[data-href]:hover ${t("pn-icon")} .pn-icon-svg path,${t("pn-tile")} .pn-tile[data-href]:focus-within ${t("pn-icon")} .pn-icon-svg path{fill:#0d234b}${t("pn-tile")} .pn-tile-illustration{z-index:2;flex:1 1;max-width:7.5em;max-height:7.5em}${t("pn-tile")} .pn-tile-illustration[data-icon]{flex:0 0}${t("pn-tile")} .pn-tile-illustration[data-icon] ${t("pn-icon")}{padding:1em;border-radius:50%;background-color:#e0f8ff}${t("pn-tile")} .pn-tile-illustration[data-icon] ${t("pn-icon")}>svg{font-size:2em}${t("pn-tile")} .pn-tile-illustration-slot{display:block;height:100%;width:100%}${t("pn-tile")} .pn-tile-illustration[data-circle]:before{content:"";position:absolute;z-index:-1;top:0;left:0;width:100%;height:100%;background-color:rgba(183, 235, 252, 0.7);background-color:rgba(183, 235, 252, 0.7);clip-path:ellipse(100% 0% at 50% 0%);transition-property:clip-path;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tile")} .pn-tile-illustration[data-circle]:before{transition-duration:0s;transition-delay:0s}}${t("pn-tile")} .pn-tile-text{z-index:3;flex:1 1;display:flex;flex-direction:column;gap:0.5em}${t("pn-tile")} .pn-tile-link{cursor:pointer;color:#005d92;text-decoration:underline;text-decoration-color:transparent;-webkit-tap-highlight-color:transparent;transition-property:color, text-decoration-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tile")} .pn-tile-link{transition-duration:0s;transition-delay:0s}}${t("pn-tile")} .pn-tile-link:focus{outline:0;text-decoration-color:#0d234b;color:#0d234b}${t("pn-tile")} .pn-tile-link:after{content:"";position:absolute;top:0;left:0;height:100%;width:100%;opacity:0}${t("pn-tile")} .pn-tile-title{font-family:inherit;font-weight:700;font-size:clamp(1.25em, 3vw, 1.5em);margin:0em}${t("pn-tile")} .pn-tile-title ${t("pn-icon")}{margin-left:0.25em;vertical-align:middle}${t("pn-tile")} .pn-tile-slot{font-weight:400;color:#5e554a;display:flex;flex-direction:column;gap:0.25em}${t("pn-tile")} .pn-tile-paragraph,${t("pn-tile")} .pn-tile p{font-size:0.875em}${t("pn-tile")} .pn-tile-paragraph:last-child,${t("pn-tile")} .pn-tile p:last-child{margin:0em}`;export{p as pn_tile}
5
+ import{t,r as e,c as i,g as n,f as l,h as a,a as o}from"./p-CAEP792y.js";import{o as r}from"./p-IFVOY5Gf.js";import{ripple as s}from"./index.esm.js";const p=class{constructor(t){e(this,t),this.pnTile=i(this,"pnTile")}mo;tile;illustrationSlot;visibleOutline=!1;get hostElement(){return n(this)}label;text;url;target;rel="noopener noreferrer";illustration;icon;horizontal=!1;pnTile;connectedCallback(){this.mo=new MutationObserver((()=>l(this.hostElement))),this.mo.observe(this.hostElement,{subtree:!0,childList:!0})}disconnectedCallback(){this.mo?.disconnect()}isExternal(){return"_blank"===this.target}showIcon(){return!!this.icon&&!this.showSlotIllustration()}showPropIllustration(){return!!this.illustration&&!this.showSlotIllustration()}showSlotIllustration(){return!!this.illustrationSlot?.querySelector('[slot="illustration"]')}showImage(){return this.showIcon()||this.showPropIllustration()||this.showSlotIllustration()}handleFocus({type:t,target:e}){this.visibleOutline="focus"===t&&e.matches(":focus-visible")}clickHandler(t){s(t,this.tile),this.pnTile.emit({click:t})}render(){return a(o,{key:"eb3815f93d4355e80969c381cadd22789b1a5b05"},a("div",{key:"a8dad16643d664975ee27f3fc3e0249730662efb",class:"pn-tile","data-horizontal":this.horizontal,"data-href":!!this.url,"data-focus":this.visibleOutline,ref:t=>this.tile=t},a("div",{key:"474e4c248a0ddfab550be16dcff172fc01f84e0a",class:"pn-tile-illustration","data-circle":!!this.url,"data-icon":this.showIcon(),role:"presentation",hidden:!this.showImage()},this.showPropIllustration()?a("pn-illustration",{illustration:this.illustration}):this.showIcon()&&a("pn-icon",{color:"blue700",icon:this.icon}),a("div",{key:"2d5962def32bc5d7a3432cd5062d0a164f167454",class:"pn-tile-illustration-slot",hidden:!this.showSlotIllustration(),ref:t=>this.illustrationSlot=t},a("slot",{key:"ceb86fe161d9256249fdc65c83199a0231899e9b",name:"illustration"}))),a("div",{key:"74ad199309a7ae8f6c576bc2c97c958f364dc868",class:"pn-tile-text"},a("h3",{key:"eb6e12a3496d11c3ecb79bf122cbfd604b8081ef",class:"pn-tile-title"},this.url?a("a",{class:"pn-tile-link",href:this.url,target:this.target,rel:!this.rel&&this.isExternal()?"noopener noreferrer":this.rel,onClick:t=>this.clickHandler(t),onFocus:t=>this.handleFocus(t),onBlur:t=>this.handleFocus(t)},this.label):this.label,this.isExternal()&&a("pn-icon",{key:"13c2495d9a94dc9d3f530543e47549683b985c59",icon:r,small:!0,color:"blue700"})),a("div",{key:"4ce12374c5bbdf54809d8b1d2f99cb6efbc01266",class:"pn-tile-slot"},!!this.text&&a("p",{key:"2cdbc99beff7480c18f561b2f16f72953367b43f",class:"pn-tile-paragraph"},this.text),a("slot",{key:"f786d7b65a270acb9be13ce0cfb1d2e3bfe34b8a"})))))}};p.style=`${t("pn-tile")}{position:relative;display:block}${t("pn-tile")} .pn-tile{position:relative;overflow:hidden;word-break:break-word;text-align:center;border-radius:0.5em;padding:clamp(0.75em, 3vw, 1.5em);height:100%;color:#2d2013;background-color:#ffffff;box-shadow:0em 0.0625em 0.125em 0em rgba(20, 20, 20, 0.11), 0em 0.1875em 0.4375em 0em rgba(0, 0, 0, 0.13);display:flex;flex-wrap:wrap;flex-direction:column;align-items:center;justify-content:flex-start;gap:clamp(1em, 5vw, 1.5em);outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:box-shadow, background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tile")} .pn-tile{transition-duration:0s;transition-delay:0s}}${t("pn-tile")} .pn-tile .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${t("pn-tile")} .pn-tile[data-horizontal]{text-align:left;flex-direction:row;flex-wrap:nowrap;gap:clamp(1em, 5vw, 1.5em)}${t("pn-tile")} .pn-tile[data-horizontal] .pn-tile-illustration[data-circle]:before{clip-path:ellipse(0% 100% at 0% 50%)}${t("pn-tile")} .pn-tile[data-horizontal] .pn-tile-text{flex-grow:2}${t("pn-tile")} .pn-tile[data-href][data-focus]{outline-color:#005d92;box-shadow:0em 0em 0em 0em rgba(20, 20, 20, 0.11), 0em 0em 0em 0em rgba(0, 0, 0, 0.13)}${t("pn-tile")} .pn-tile[data-href]:hover{background-color:rgba(183, 235, 252, 0.3)}${t("pn-tile")} .pn-tile[data-href]:hover .pn-tile-illustration[data-circle]:before,${t("pn-tile")} .pn-tile[data-href]:focus-within .pn-tile-illustration[data-circle]:before{clip-path:ellipse(100% 50% at 50% -25%)}${t("pn-tile")} .pn-tile[data-href]:hover[data-horizontal] .pn-tile-illustration[data-circle]:before,${t("pn-tile")} .pn-tile[data-href]:focus-within[data-horizontal] .pn-tile-illustration[data-circle]:before{clip-path:ellipse(50% 100% at -25% 50%)}${t("pn-tile")} .pn-tile[data-href]:hover .pn-tile-link,${t("pn-tile")} .pn-tile[data-href]:focus-within .pn-tile-link{color:#0d234b;text-decoration-color:#0d234b}${t("pn-tile")} .pn-tile[data-href]:hover ${t("pn-icon")} .pn-icon-svg path,${t("pn-tile")} .pn-tile[data-href]:focus-within ${t("pn-icon")} .pn-icon-svg path{fill:#0d234b}${t("pn-tile")} .pn-tile-illustration{z-index:2;flex:1 1;max-width:7.5em;max-height:7.5em}${t("pn-tile")} .pn-tile-illustration[data-icon]{flex:0 0}${t("pn-tile")} .pn-tile-illustration[data-icon] ${t("pn-icon")}{padding:1em;border-radius:50%;background-color:#e0f8ff}${t("pn-tile")} .pn-tile-illustration[data-icon] ${t("pn-icon")}>svg{font-size:2em}${t("pn-tile")} .pn-tile-illustration-slot{display:block;height:100%;width:100%}${t("pn-tile")} .pn-tile-illustration[data-circle]:before{content:"";position:absolute;z-index:-1;top:0;left:0;width:100%;height:100%;background-color:rgba(183, 235, 252, 0.7);background-color:rgba(183, 235, 252, 0.7);clip-path:ellipse(100% 0% at 50% 0%);transition-property:clip-path;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tile")} .pn-tile-illustration[data-circle]:before{transition-duration:0s;transition-delay:0s}}${t("pn-tile")} .pn-tile-text{z-index:3;flex:1 1;display:flex;flex-direction:column;gap:0.5em}${t("pn-tile")} .pn-tile-link{cursor:pointer;color:#005d92;text-decoration:underline;text-decoration-color:transparent;-webkit-tap-highlight-color:transparent;transition-property:color, text-decoration-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-tile")} .pn-tile-link{transition-duration:0s;transition-delay:0s}}${t("pn-tile")} .pn-tile-link:focus{outline:0;text-decoration-color:#0d234b;color:#0d234b}${t("pn-tile")} .pn-tile-link:after{content:"";position:absolute;top:0;left:0;height:100%;width:100%;opacity:0}${t("pn-tile")} .pn-tile-title{font-family:inherit;font-weight:700;font-size:clamp(1.25em, 3vw, 1.5em);margin:0em}${t("pn-tile")} .pn-tile-title ${t("pn-icon")}{margin-left:0.25em;vertical-align:middle}${t("pn-tile")} .pn-tile-slot{font-weight:400;color:#5e554a;display:flex;flex-direction:column;gap:0.25em}${t("pn-tile")} .pn-tile-paragraph,${t("pn-tile")} .pn-tile p{font-size:0.875em}${t("pn-tile")} .pn-tile-paragraph:last-child,${t("pn-tile")} .pn-tile p:last-child{margin:0em}`;export{p as pn_tile}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * By PostNord.
4
+ */
5
+ import{t as e,r as i,c as t,g as l,h as n,a}from"./p-CAEP792y.js";import{uuidv4 as s,getBytesFromHumanReadableFileSize as o,awaitTopbar as r,ripple as d,en as p}from"./index.esm.js";import{a as h}from"./p-B88w-Zxn.js";import{c as f}from"./p-BpI8peGn.js";class c extends Error{element;code;data;constructor(e,i,t="INVALID",l=null){super(e),this.name="PNFileUploadError",this.element=i,this.code=t,this.data=l}}const u={CLICKORDRAG:{sv:"Klicka eller dra en fil hit",en:"Click or drag a file here",da:"Klik eller træk en fil hertil",fi:"Klikkaa tai vedä tiedosto tähän",no:"Klikk eller dra en fil hit"},ACCEPTEDFORMATS:{sv:"Filformat som stöds",en:"Supported formats",da:"Støttede filformater",fi:"Tuetut tiedostomuodot",no:"Understøttede filformater"},MAXFILESIZE:{sv:"Max filstorlek",en:"Max filesize",da:"Max filstørrelse",fi:"Maksimitiedostokoko",no:"Maks filstørrelse"},REMOVE_FILE:{sv:"Ta bort filen",en:"Remove file",da:"Fjern fil",fi:"Poista tiedosto",no:"Fjern fil"}},m=class{constructor(e){i(this,e),this.filesAdded=t(this,"filesAdded"),this.update=t(this,"update"),this.fileuploaderror=t(this,"fileuploaderror"),this.valid=t(this,"valid"),this.uploadFile=t(this,"uploadFile"),this.uploadCancelled=t(this,"uploadCancelled"),this.uploadCompleted=t(this,"uploadCompleted")}id=`pn-file-upload-${s()}`;idFileUpload=`${this.id}-label`;idHelpertext=`${this.id}-helpertext`;idAccepttext=`${this.id}-accept`;fileInputElement;invalid=!1;maxSizeInBytes=0;get hostElement(){return l(this)}files=[];isHovering=!1;label;helpertext;language=null;hideProgress=!1;name;accept;maxSize="";capture;limit=1;multiple;required=!1;disabled=!1;handleLimit(){this.multiple=this.limit>1}handleMaxBytes(){this.maxSizeInBytes=o(this.maxSize)}filesAdded;update;fileuploaderror;valid;uploadFile;uploadCancelled;uploadCompleted;async componentWillLoad(){this.handleLimit(),this.handleMaxBytes(),null===this.language&&await r(this.hostElement)}async startUpload(){if(!this.files.length)return;this.files=this.files.map(((e,i)=>("queue"===e.status&&(e.status="start",this.uploadFile.emit({file:e,index:i,uploader:this})),e)));const e=this.files.map((e=>e.xhrPromise().catch((()=>{}))));return Promise.all(e).then((e=>{const i=e.filter((e=>e));this.uploadCompleted.emit(i)}))}async clearUpload(){this.files=[],this.fileInputElement.value="",this.invalid=!1,this.filesAdded.emit([])}async removeFile(e){let i=!0;const t=[];for(const l in this.files){const n=this.files[l];if(n.filename)if(n.uuid!==e.uuid){try{this._validateFileSize(n),this._validateFileType(n),i=!0}catch(e){i=!1,n.error=e,n.progress=0,n.status="error"}t.push(n)}else"start"===n.status&&(n.xhr.abort(),this.uploadCancelled.emit(n))}this.filesAdded.emit(t),this.files=t,this.invalid=!i||!this._isNotGreaterThanLimit(),this._checkValidity(),this._emitUpdateEvent()}async updateFile(e,i=null){let t=this.files;if(null===i)for(const l in t)if(t[l].uuid===e.uuid){i=l;break}t[i]&&(e.progress>=100?(e.progress=100,e.status="completed"):e.progress<0&&(e.status="start",e.progress=0),e.error&&(e.progress=0,e.status="error",e.errorMessage=e.errorMessage||"There was an error uploading your file, please try again"),t[i]=e),this.files=[...t]}async _addFilesFromFileList(e){if(this.disabled||this.invalid)return;const i=Array.from(e),t=[];if(this.multiple)i.forEach((e=>t.push(this._addFile(e))));else{const e=i[0];1===this.limit?(this.files=[],t.push(this._addFile(e))):t.push(this._addFile(e))}return Promise.all(t).then((()=>{this.filesAdded.emit(this.files),this._isNotGreaterThanLimit(),this._checkValidity(),this._emitUpdateEvent()}))}async _onAddFile(){const e=this.fileInputElement.files;return await this._addFilesFromFileList(e)}_onDragOverFile(e){e.preventDefault(),e.stopPropagation(),this.isHovering=!0}_onDragLeaveFile(e){e.preventDefault(),e.stopPropagation(),this.isHovering=!1}_onDropFile(e){e.preventDefault(),e.stopPropagation(),this.isHovering=!1,d(e,this.hostElement,".pn-dropzone-inner"),this._addFilesFromFileList(e.dataTransfer.files)}_validateFileType(e){const i=this.accept?this.accept.split(","):[];if(i.length){let t=!1;for(const l of i){const i=l.trim().toLowerCase(),n=/^\w+\/[a-z\.\-]+$/i,a=e.filename.match(/\.\w{3,4}($|\?)/)?.[0]?.toLowerCase();if(n.test(i)&&e.contentType===i||a===i){t=!0;break}}if(!t){const i=new c("Invalid file type.",this.hostElement,"INVALID_FILE_TYPE",e);throw this.invalid=!0,this.fileuploaderror.emit(i),i}}}_validateFileSize(e){if(this.maxSizeInBytes>0&&e.filesize>this.maxSizeInBytes){const i=new c(`You can only add up to ${this.maxSize}.`,this.hostElement,"MAX_FILE_SIZE",e);throw this.invalid=!0,this.fileuploaderror.emit(i),i}}_validateLimit(){if(this.limit&&this.files.length>this.limit){const e=new c(`You can only add up to ${this.limit} files.`,this.hostElement,"MAX_LIMIT",this.files);throw this.invalid=!0,this.fileuploaderror.emit(e),e}}_isNotGreaterThanLimit(){try{return this._validateLimit(),!0}catch(e){return!1}}_checkValidity(){return this.invalid||this.valid.emit(this),!this.invalid}_createBase64FromFile(e){return new Promise(((i,t)=>{const l=new FileReader;l.onload=()=>i(l.result),l.onerror=e=>t(e),l.onabort=()=>t("ABORTED"),l.readAsDataURL(e)}))}async _addFile(e){return this._createBase64FromFile(e).then((i=>{const t=i.split(","),l=t[1],n=t[0].split(":")[1].split(";")[0],a=new XMLHttpRequest,o={uuid:s(),filename:e.name,filesize:e.size,progress:0,status:"queue",base64:l,contentType:n,error:null,errorMessage:"",file:e,xhr:a};try{this._validateFileSize(o),this._validateFileType(o)}catch(e){o.error=e,o.progress=0,o.status="error"}return o.xhrPromise=()=>new Promise(((e,i)=>{a.responseType="json",a.addEventListener("progress",(e=>{e.lengthComputable?(o.progress=e.loaded/e.total*100,this.updateFile(o)):(o.progress=100,this.updateFile(o))})),a.addEventListener("load",(i=>e(i.target.response))),a.addEventListener("error",(e=>{o.error=e,o.errorMessage="There was an error uploading your file, please try again",this.updateFile(o);const t=new c("There was an error uploading your file, please try again",this.hostElement,"UPLOAD_SERVER_ERROR",o);this.fileuploaderror.emit(t),i(e)}))})),this.files=[...this.files,o],o}))}_emitUpdateEvent(){this.update.emit({files:this.files,element:this.hostElement})}translate(e){return u?.[e]?.[this.language||p]||e}isLoading(e){return"start"===e.status}getFileItemClass=e=>{let i="files-list-item";return e.error&&(i+=" files-list-item-error"),i};getFileIcon(e){return e.error?h:100===e.progress?f:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M9 7.5a4.5 4.5 0 1 1 9 0V16a6 6 0 0 1-12 0v-3a1 1 0 1 1 2 0v3a4 4 0 0 0 8 0V7.5a2.5 2.5 0 0 0-5 0V16a1 1 0 1 0 2 0v-6a1 1 0 1 1 2 0v6a3 3 0 1 1-6 0zM7 9a1 1 0 0 1 1 1v.1a1 1 0 1 1-2 0V10a1 1 0 0 1 1-1" clip-rule="evenodd"/></svg>'}getFileColor(e){return e.error?"warning":100===e.progress?"green700":"gray900"}describedBy(){const e=[this.accept&&this.idAccepttext,this.helpertext&&this.idHelpertext].filter(Boolean);return e.length?e.join(","):null}render(){return n(a,{key:"bce5d5c3684f31a2841ecf631155ab384f318879"},n("div",{key:"07abc549d0ad86fb818f446e4fa223e3b4ea6c84",class:"pn-file-upload-container"},n("div",{key:"1a9d09dd8cf39db11dc741732a7c04276e10a6a9",class:"pn-dropzone-container"},n("input",{key:"387071f47d9aa658929448b041285c01d5187da4",id:this.idFileUpload,class:"pn-file-upload-input",type:"file",name:this.name,multiple:this.multiple,accept:this.accept,capture:this.capture,disabled:this.disabled,required:this.required,"aria-describedby":this.describedBy(),"aria-invalid":this.invalid?.toString(),onClick:e=>d(e,this.hostElement,".pn-dropzone-inner"),onChange:()=>this._onAddFile(),onDragOver:e=>this._onDragOverFile(e),onDragLeave:e=>this._onDragLeaveFile(e),onDrop:e=>this._onDropFile(e),ref:e=>this.fileInputElement=e}),n("div",{key:"71c627aa6044908835b0f6e2227d7744da76680e",class:"pn-dropzone-inner","data-hover":this.isHovering,"data-invalid":this.invalid},n("pn-icon",{key:"a621fd0abb16c8c7b2efcb67932a0e50e12942dd",class:"pn-file-upload-icon-element",icon:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M3 8a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v7a3 3 0 0 1-3 3h-2a1 1 0 1 1 0-2h2a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2a1 1 0 1 1 0 2H6a3 3 0 0 1-3-3zm9 0a1 1 0 0 1 .707.293l4 4a1 1 0 0 1-1.414 1.414L13 11.414V17a1 1 0 1 1-2 0v-5.586l-2.293 2.293a1 1 0 0 1-1.414-1.414l4-4A1 1 0 0 1 12 8m-1 12.1V20a1 1 0 1 1 2 0v.1a1 1 0 1 1-2 0" clip-rule="evenodd"/></svg>',color:"blue700"}),n("label",{key:"cc90d1af83fe3814b8ea9991bcdf85c40f48f874",htmlFor:this.idFileUpload,class:"pn-file-upload-title"},this.label||this.translate("CLICKORDRAG")),this.helpertext&&n("p",{key:"8d4032bcd909516779d07f042be878105f3479a1",id:this.idHelpertext,class:"pn-file-upload-subtitle"},this.helpertext),this.accept&&n("p",{key:"715cc9ed4c8878068182a30affa8649c904f041d",id:this.idAccepttext,class:"pn-file-upload-subtitle"},this.translate("ACCEPTEDFORMATS"),": ",this.accept,this.maxSize&&n("span",{key:"a217dcfd8528d86deb9aee37b7750eb574936a56"}," ","(",this.translate("MAXFILESIZE"),": ",this.maxSize,")")))),!!this.files.length&&n("ul",{key:"c1a1cd0c816992c6f524eaf82296ad4fd3300a6b",class:"files-list"},this.files.map((e=>n("li",{class:"files-list-item-container",key:e.uuid},n("div",{class:this.getFileItemClass(e)},n("div",{class:"file-list-item-title"},n("pn-icon",{icon:this.getFileIcon(e),color:this.getFileColor(e)}),this.hideProgress||0===e.progress?n("div",{class:"filename"},e.filename):n("pn-progress-bar",{label:e.filename,progress:e.progress,error:e.error&&e.errorMessage})),n("pn-button",{small:!0,variant:"borderless",arialabel:`${this.translate("REMOVE_FILE")} ${e.filename}`,appearance:e.error?"warning":"light",icon:'<svg class="pn-icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="#000" fill-rule="evenodd" d="M10.5 4a1 1 0 0 0-1 1h5a1 1 0 0 0-1-1zm6 1a3 3 0 0 0-3-3h-3a3 3 0 0 0-3 3h-2A2.5 2.5 0 0 0 5 9.95V19a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V9.95A2.5 2.5 0 0 0 18.5 5zm.5 5H7v9a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1zM5.5 7a.5.5 0 0 0 0 1h13a.5.5 0 0 0 0-1zm4.5 5a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1m4 0a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1" clip-rule="evenodd"/></svg>',iconOnly:!0,tooltip:this.translate("REMOVE_FILE"),loading:this.isLoading(e),onClick:()=>this.removeFile(e)})),e.error?n("div",{class:"files-list-item-text-error"},e.errorMessage||e.error.message):null)))),n("slot",{key:"2690ccdc2c5e97a41c99a3b385e68739bb69cecb"})))}static get watchers(){return{limit:[{handleLimit:0}],maxSize:[{handleMaxBytes:0}]}}};m.style=`${e("pn-file-upload")}.hover .pn-file-upload-container .pn-dropzone-container{background-color:#e0f8ff}${e("pn-file-upload")} .pn-file-upload-input{position:absolute;z-index:1;left:0;top:0;opacity:0;height:100%;width:100%;-webkit-tap-highlight-color:transparent}${e("pn-file-upload")} .pn-file-upload-input:hover{cursor:pointer}${e("pn-file-upload")} .pn-file-upload-input:hover+.pn-dropzone-inner{border-color:#005d92;background-color:#e0f8ff}${e("pn-file-upload")} .pn-file-upload-input:focus-visible+.pn-dropzone-inner{border-color:#005d92;outline-color:#005d92}${e("pn-file-upload")} .pn-file-upload-input:disabled{pointer-events:none}${e("pn-file-upload")} .pn-file-upload-input:disabled+.pn-dropzone-inner{pointer-events:none;background-color:#f3f2f2;border-color:#2d2013}${e("pn-file-upload")} .pn-file-upload-input:disabled+.pn-dropzone-inner .headline a{color:#5e554a}${e("pn-file-upload")} .pn-file-upload-input:disabled+.pn-dropzone-inner .pn-icon-svg path{fill:#5e554a}${e("pn-file-upload")} .pn-file-upload-container{position:relative;display:flex;flex-direction:column;gap:1em}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-container{position:relative}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner{position:relative;text-align:center;overflow:hidden;padding:2.5em;border:0.0625em #969087 dashed;border-radius:0.5em;display:flex;flex-direction:column;align-items:center;gap:0.5em;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, outline-color, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner{transition-duration:0s;transition-delay:0s}}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#005d92;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner[data-hover]{background-color:#e0f8ff;border-color:#005d92}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner[data-invalid]{border-color:#a70707}${e("pn-file-upload")} .pn-file-upload-container .pn-dropzone-inner .pn-file-upload-dropzone{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:0.5em}${e("pn-file-upload")} .files-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:1em}${e("pn-file-upload")} .files-list .filename{font-weight:400;font-size:0.75em}${e("pn-file-upload")} .files-list .files-list-item{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;background:#f9f8f8;padding:1em;border-radius:0.5em}${e("pn-file-upload")} .files-list .files-list-item .file-list-item-title{display:flex;align-items:center;gap:0.5em;margin-right:0.5em}${e("pn-file-upload")} .files-list .files-list-item>${e("pn-progress-bar")}{margin-right:25em;flex:1}${e("pn-file-upload")} .files-list .files-list-item.files-list-item-error{color:#a70707;background-color:#fdefee}${e("pn-file-upload")} .files-list .files-list-item-text-error{color:#a70707;font-size:0.875em;font-weight:300;margin-top:0.25em}${e("pn-file-upload")} .pn-file-upload-title{color:#2d2013}${e("pn-file-upload")} .pn-file-upload-subtitle{color:#5e554a;font-size:0.75em}`;export{m as pn_file_upload}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t as n,M as t,r as i,c as e,g as o,h as a,a as r}from"./p-DWsprozV.js";import{a as c}from"./p-0j4cY0b7.js";import{uuidv4 as u,awaitTopbar as s,en as p,isSmallScreen as m,getTotalHeightOffset as l,getMenuWidth as d,ripple as b}from"./index.esm.js";import{c as h}from"./p-DrYFvs2M.js";import{c as f,a as g}from"./p-B6SVpr61.js";import{o as $}from"./p-IFVOY5Gf.js";const k={BACK:{sv:"Tillbaka",en:"Back",da:"Tilbage",fi:"Takaisin",no:"Tilbake"}},v=class extends(t(c)){constructor(n){super(),i(this,n),this.menuToggle=e(this,"menuToggle"),this.menuVisible=e(this,"menuVisible"),this.menuOption=e(this,"menuOption")}id=`pn-action-menu-${u()}`;menuButtonId=`${this.id}-button`;menuListId=`${this.id}-list`;menuTrigger;menuContainer;menuList;timeout;menuWidth=256;get hostElement(){return o(this)}smallMenu=null;upwards=!1;activeSubmenu=[];options=[];button;menuId=this.id;language=null;open=!1;menuUp=!1;menuLeft=!1;menuToggle;menuVisible;menuOption;handleOptions(){this.setMenuLayout()}openHandler(){this.setAnimationDuration(),requestAnimationFrame((()=>{this.open&&!this.isMoving()&&(this.setOffset(),this.setMenuLayout()),this.dropdownHandler(),this.menuToggle.emit({open:this.open}),clearTimeout(this.timeout),this.timeout=setTimeout((()=>{if(!this.open){this.activeSubmenu=[];const n=this.hostElement.querySelectorAll("[data-x]");Array.from(n).forEach((n=>{n.removeAttribute("data-x"),n.removeAttribute("data-y")}))}this.menuVisible.emit({visible:this.open})}),this.animationDuration)}))}handleMenuId(){this.menuButtonId=`${this.menuId}-button`,this.menuListId=`${this.menuId}-list`}handleResize(){this.open&&this.toggleActionMenu(!1)}async componentWillLoad(){this.options.length||console.warn(`${this.hostElement.localName}: No options set.`),this.handleMenuId(),this.setAnimationDuration(),null!==this.language&&await s(this.hostElement)}componentDidLoad(){this.setOffset(),requestAnimationFrame((()=>this.open&&this.dropdownHandler()))}translate(n){return k[n][this.language||p]}globalEvents=n=>{const t=n.target,i=t?.closest(this.hostElement.localName);i||this.closeEachSubMenu(!0)};addGlobalEventListeners(){this.hostElement.getRootNode().addEventListener("click",this.globalEvents)}removeGlobalEventListeners(){this.hostElement.getRootNode().removeEventListener("click",this.globalEvents)}toggleActionMenu(n){this.open=n??!this.open}setMenuLayout(){if(!this.menuContainer)return;this.isMoving()||this.resetMaxHeight();const n=this.getMenuMeasurements();this.setDirection(n),this.setMenuSize(n),this.setMaxHeight(n)}setDirection({hUp:n,hDown:t,sUp:i,sDown:e}){this.upwards=this.menuUp&&i>n||!(e>t)&&!(e>i)}setMenuSize({hUp:n,hDown:t,sUp:i,sDown:e}){const o=m()||!(this.upwards?i>n:e>t);o!==this.smallMenu&&(this.smallMenu=o)}setMaxHeight({hUp:n,hDown:t,sUp:i,sDown:e}){this.smallMenu?this.hostElement.style.setProperty("--pn-menu-height",`${this.upwards?n>i?n-16:n:t>e?t-8:t}px`):this.resetMaxHeight()}resetMaxHeight(){this.hostElement.style.setProperty("--pn-menu-height","unset")}getRect(n){return n.getBoundingClientRect()}getMenuMeasurements(){const n=Array.from(this.menuContainer.querySelectorAll("menu")),t=Math.max(...n.map((n=>n.scrollHeight))),i=this.getRect(this.menuTrigger),e=this.getRect(this.menuContainer),o=i.top-l(),a=innerHeight-e.top;return{hUp:o>t?t:o,hDown:a>t?t:a,sUp:o,sDown:a}}setOffset(){const n=this.getRect(this.hostElement),t=d(),i=n.left,e=n.left+this.menuWidth,o=t+16,a=innerWidth-16;let r=0;i<o?r=o-i:e>a&&(r=a-e),this.menuContainer&&this.menuContainer.style.setProperty("--pn-action-menu-offset",`${r}px`)}getListId(n){return`pn-menu-${n.value}-list`}getButtonId(n){return`pn-menu-${n.value}-button`}getTriggerIcon(){if(!this.button?.icon)return h}getSubMenuPath(n,t,i=[]){for(const e of n){const n=[...i,e.value];if(e.value===t)return n;if(e.options||e.group){const i=this.getSubMenuPath(e.options||e.group,t,n);if(i)return i}}return null}closeEachSubMenu(n=!1){n||this.menuTrigger?.querySelector("button")?.focus({preventScroll:!0});const t=setInterval((()=>{this.smallMenu||0===this.activeSubmenu.length?(clearInterval(t),this.toggleActionMenu(!1)):(this.activeSubmenu.pop(),this.activeSubmenu=[...this.activeSubmenu])}),150)}escButton(n,t){const{key:i}=n;"Escape"===i&&(n.preventDefault(),n.stopImmediatePropagation(),this.isSubmenuActive(t.value)?this.toggleSub(t):this.toggleActionMenu())}dropdownHandler(){this.open?(this.addGlobalEventListeners(),this.openDropdown(this.menuContainer,this.menuList.clientHeight)):(this.removeGlobalEventListeners(),this.closeDropdown(this.menuContainer,this.menuList.clientHeight))}async optionSelect(n,t){const i=n?.options?.length?"submenu":n.input?"input":n.href?"link":"button",e="submenu"===i;e?this.toggleSub(n):"button"===i?this.closeEachSubMenu():"input"===i&&(n.checked=t.target.checked),this.menuOption.emit({option:n,type:i,click:t,open:e?this.isSubmenuActive(n.value):null});const o=t.target,a="input"===o.localName?o.nextElementSibling:"pn-action-menu-button"===o.className?o:o.closest(".pn-action-menu-button"),{x:r,width:c,y:u,top:s}=this.getRect(a);b("click"===t.type?t:{clientX:r+c-24,clientY:u-s},a),this.menuContainer.scrollTo({top:0})}toggleSub(n){const{value:t}=n,i=this.getSubMenuPath(this.options,t),e=this.activeSubmenu.includes(t);e&&i.splice(this.activeSubmenu.indexOf(t),1);const o=this.hostElement.querySelector(`#${this.getListId(n)}`),a=this.getRect(o),r=innerWidth-a.right-8,c=a.left>a.width,u=this.menuUp&&a.top-a.height>0?"top":"bottom";e||o.dataset.x||o.setAttribute("data-x",this.menuLeft&&c?"left":r>a.width?"right":c?"left":"center"),e||o.dataset.y||o.setAttribute("data-y",u),this.activeSubmenu=JSON.stringify(i)===JSON.stringify(this.activeSubmenu)?this.activeSubmenu.filter((n=>n!==t)):[...i]}isSubmenuActive(n){return this.activeSubmenu.includes(n)}isMenuActive(){const n=this.options.find((({value:n})=>this.activeSubmenu.every((t=>t===n))));return this.smallMenu&&(0===this.activeSubmenu?.length||n)}isCurrentSubMenu(n){return Boolean(this.activeSubmenu[this.activeSubmenu.length-1]===n)}getOptionTrailing(n){const t=n.options?.length&&f||n.trailingIcon||"_blank"===n.target&&$;return t?a("pn-icon",{icon:t,color:"blue700","data-suffix":!0,"data-active":this.isSubmenuActive(n.value)}):n.suffix?a("span",{class:"pn-action-menu-item-suffix"},n.suffix):void 0}renderCheckbox(n){const t=`pn-menu-${n.value}-label`,i=`pn-menu-${n.value}-helpertext`;return a("div",{class:"pn-action-menu-item-content"},a("input",{type:n.input,id:t,class:"pn-action-menu-input",name:n.name,value:n.value,checked:n.checked,disabled:n.disabled,"aria-describedby":n.helpertext?i:null,onInput:t=>this.optionSelect(n,t),tabIndex:this.open?null:-1}),a("div",{class:"pn-action-menu-button"},!!n.icon&&a("pn-icon",{icon:n.icon,color:"blue700"}),a("div",{class:"pn-action-menu-item-text"},a("label",{htmlFor:t,class:"pn-action-menu-item-label"},n.label),n.helpertext&&a("p",{id:i,class:"pn-action-menu-item-helpertext"},a("span",null,n.helpertext))),"checkbox"===n.input?a("div",{class:"pn-action-menu-checkbox"},a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},a("polyline",{class:"pn-action-menu-checkbox-checkmark-path",points:"4,12 9,17 20,6","stroke-width":"3"}))):a("div",{class:"pn-action-menu-radio"},a("div",{class:"pn-action-menu-radio-outer"},a("div",{class:"pn-action-menu-radio-inner"})))))}renderButton(n){const t="BACK"===n.label,i=!!n?.options?.length,e=!!n?.group?.length,o=!!n.href&&!i&&!e,r=t?"-close":"",c=t||!!n.icon,u=t?null:this.getOptionTrailing(n),s=this.isSubmenuActive(n.value),p=i?{"aria-haspopup":"true","aria-controls":s?this.getListId(n):null,"aria-expanded":s?.toString()}:{},m=o?{href:n.href,target:n.target}:{disabled:n.disabled},l=o?"a":"button";return e?a("div",{class:"pn-action-menu-group-label"},a("p",{class:"pn-action-menu-p"},n.label),n.helpertext&&a("p",{class:"pn-action-menu-group-helpertext"},n.helpertext)):a("div",{class:"pn-action-menu-item-content","data-close":t},a(l,{id:this.getButtonId(n)+r,class:"pn-action-menu-button",...p,...m,tabIndex:this.open?null:-1,onClick:t=>this.optionSelect(n,t),onKeyDown:t=>this.escButton(t,n)},c&&a("pn-icon",{icon:t?g:n.icon,color:"blue700"}),a("div",{class:"pn-action-menu-item-text"},a("span",{class:"pn-action-menu-item-label"},t?this.translate("BACK"):n.label),n.helpertext&&!o&&a("span",{class:"pn-action-menu-item-helpertext"},n.helpertext)),u))}renderSub(n){return a("menu",{id:this.getListId(n),"aria-labelledby":this.getButtonId(n),class:"pn-action-menu-sub","data-open":this.isSubmenuActive(n.value)?.toString(),"data-current":this.isCurrentSubMenu(n.value)},this.smallMenu&&a("li",{class:"pn-action-menu-item"},this.renderButton({label:"BACK",value:n.value,options:n.options})),n.options.map((n=>this.renderMenuItem(n))))}renderGroup(n){return a("menu",{class:"pn-action-menu-group"},n.group.map((n=>this.renderMenuItem(n))))}renderMenuItem(n){const t=!!n?.options?.length,i=!t&&!!n?.group?.length;return a("li",{class:"pn-action-menu-item","data-group":i,"data-sub":t},!n.input||t||i?this.renderButton(n):this.renderCheckbox(n),t?this.renderSub(n):i&&this.renderGroup(n))}renderMenu(){return a("div",{id:this.menuListId,class:"pn-action-menu-container",role:"region","aria-labelledby":this.menuButtonId,"data-open":this.open,"data-upwards":this.upwards,"data-small":this.smallMenu,style:{height:"0px"},ref:n=>this.menuContainer=n},a("menu",{class:"pn-action-menu-list","data-current":this.isMenuActive(),ref:n=>this.menuList=n},this.options?.map((n=>this.renderMenuItem(n)))))}render(){return a(r,{key:"d77e6c7f658e2552260f5a8a30034a8d68d9bfa2"},a("div",{key:"3d2584a7c12abf5948cec24c967ab573d33dafa0",id:this.menuId!==this.id?this.menuId:null,class:"pn-action-menu"},a("pn-button",{key:"f8460fca3784d2cb04ac55bfa0070935006c864d",icon:this.getTriggerIcon(),...this.button,buttonId:this.menuButtonId,tooltipUp:!this.upwards,ariahaspopup:"true",ariacontrols:this.open?this.menuListId:null,ariaexpanded:this.open.toString(),"data-default-icon":!this.button?.icon,onPnClick:()=>this.toggleActionMenu(),ref:n=>this.menuTrigger=n}),this.renderMenu()))}static get watchers(){return{options:[{handleOptions:0}],open:[{openHandler:0}],menuId:[{handleMenuId:0}]}}};v.style=`${n("pn-action-menu")}{--pn-menu-height:unset;display:inline-block;position:relative}${n("pn-action-menu")} .pn-action-menu{position:relative}${n("pn-action-menu")} .pn-action-menu-container{--pn-action-menu-offset:0;scroll-behavior:smooth;list-style:none;text-align:left;position:absolute;z-index:100;top:calc(100% + 0.5em);left:var(--pn-action-menu-offset);right:0;background-color:#ffffff;box-shadow:0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1), 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);border-radius:0.5em;margin:0;padding:0;width:16em;visibility:hidden;overflow:hidden}${n("pn-action-menu")} .pn-action-menu-container[data-open]{visibility:visible;overflow:unset}${n("pn-action-menu")} .pn-action-menu-container[data-left]{right:0;left:unset}${n("pn-action-menu")} .pn-action-menu-container[data-upwards]{top:unset;bottom:calc(100% + 0.5em);transform-origin:bottom left}${n("pn-action-menu")} .pn-action-menu-container[data-moving]{overflow:hidden;visibility:visible;pointer-events:none}${n("pn-action-menu")} .pn-action-menu-container{}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list{border-radius:0.5em;visibility:hidden;transition-property:visibility;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list{transition-delay:0.2s}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list[data-current]{overflow-x:auto;visibility:visible;transition-delay:0s}${n("pn-action-menu")} .pn-action-menu-container[data-small][data-moving]>.pn-action-menu-list{visibility:visible}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-item{position:unset}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-sub{left:0;height:100%;box-shadow:unset;transform:translateX(0);visibility:hidden}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-sub[data-current]{visibility:visible;overflow-x:auto}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-corner,${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-button{display:none}${n("pn-action-menu")} .pn-action-menu-list{margin:0;padding:0;list-style:none;height:var(--pn-menu-height)}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-corner,${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-button{display:none}${n("pn-action-menu")} .pn-action-menu-group{margin:0;padding:0;list-style:none}${n("pn-action-menu")} .pn-action-menu-group-label{display:block;color:#2d2013;font-weight:700;font-size:0.875em;padding:1em 1em 0.5em}${n("pn-action-menu")} .pn-action-menu-group-helpertext{display:block;color:#5e554a;font-weight:400;margin:0.25em 0 0}${n("pn-action-menu")} .pn-action-menu-sub{z-index:110;position:absolute;top:0;width:100%;min-width:12em;margin:0;padding:0;list-style:none;background:#ffffff;border-radius:0.5em;box-shadow:0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1), 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);transform:translateX(-0.5em);opacity:0;visibility:hidden}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-corner,${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-button{display:none}${n("pn-action-menu")} .pn-action-menu-sub{transition-property:transform, opacity, visibility;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-sub{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-sub{transition-delay:0s, 0s, 0.2s}${n("pn-action-menu")} .pn-action-menu-sub[data-open=true]{transform:translateX(0);opacity:1;visibility:visible;transition-delay:0s, 0s, 0s}${n("pn-action-menu")} .pn-action-menu-sub[data-open=false]{pointer-events:none}${n("pn-action-menu")} .pn-action-menu-sub[data-x=left]{left:-100%}${n("pn-action-menu")} .pn-action-menu-sub[data-x=center]{left:0}${n("pn-action-menu")} .pn-action-menu-sub[data-x=right]{left:100%}${n("pn-action-menu")} .pn-action-menu-sub[data-y=top]{top:unset;bottom:0}${n("pn-action-menu")} .pn-action-menu-sub[data-y=bottom]{top:0}${n("pn-action-menu")} .pn-action-menu-item{position:relative}${n("pn-action-menu")} .pn-action-menu-item:first-child>.pn-action-menu-item-content>.pn-action-menu-button{border-top-left-radius:0.5em;border-top-right-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-item:last-child>.pn-action-menu-item-content>.pn-action-menu-button{border-bottom-right-radius:0.5em;border-bottom-left-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-item-text{display:flex;flex-direction:column;margin-right:auto}${n("pn-action-menu")} .pn-action-menu-item-label{color:#005d92;font-weight:500;text-decoration:none}${n("pn-action-menu")} .pn-action-menu-item-suffix{margin-left:auto;font-weight:400;color:#5e554a}${n("pn-action-menu")} .pn-action-menu-item-helpertext{color:#5e554a;font-weight:400}${n("pn-action-menu")} .pn-action-menu-item-content{display:flex;align-items:center;flex-direction:row;flex:1 1 100%;gap:0.5em;position:relative}${n("pn-action-menu")} .pn-action-menu-item-content[data-close]{border-bottom:0.0625em solid #d3cecb}${n("pn-action-menu")} .pn-action-menu-item-content>${n("pn-icon")}{padding:0 0.25em}${n("pn-action-menu")} .pn-action-menu-item[data-group],${n("pn-action-menu")} .pn-action-menu-item[data-sub]{flex-direction:column}${n("pn-action-menu")} .pn-action-menu-button{cursor:pointer;position:relative;-webkit-tap-highlight-color:transparent;line-height:1.5;padding:0.75em 1em;border:0;width:100%;text-align:left;text-decoration-color:transparent;overflow:hidden;display:flex;align-items:center;flex:1 1 100%;gap:0.5em;font-size:1em;min-height:1.5em;background-color:#ffffff;transition-property:background-color, color, outline-color, text-decoration-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-button{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-button .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#0d234b;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${n("pn-action-menu")} .pn-action-menu-button{outline:0.2rem solid transparent;outline-offset:0.2rem}${n("pn-action-menu")} .pn-action-menu-button:focus-visible{outline-color:#005d92}${n("pn-action-menu")} .pn-action-menu-button{outline-offset:-0.2rem}${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")} .pn-icon-svg>path{transform-origin:center;transform:rotate(0deg);transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")} .pn-icon-svg>path{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")}[data-suffix][data-active]>.pn-icon-svg>path{transform:rotate(180deg)}${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")}:last-child{margin-left:auto}${n("pn-action-menu")} .pn-action-menu-button:disabled{pointer-events:none;color:#5e554a;background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-button:hover{background-color:#effbff}${n("pn-action-menu")} .pn-action-menu-button:focus{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-button[href]:hover,${n("pn-action-menu")} .pn-action-menu-button[href]:focus{text-decoration-color:#005d92}${n("pn-action-menu")} .pn-action-menu-button{}${n("pn-action-menu")} .pn-action-menu-checkbox{background-color:#ffffff;flex:0 0 1.5em;width:1.5em;height:1.5em;border:0.0625em solid #969087;border-radius:0.25em;margin-left:auto;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, border-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-checkbox{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline{stroke:#ffffff;stroke-linecap:round;stroke-dasharray:23;transition-property:stroke-dashoffset;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline{transition-delay:0s}${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline.pn-action-menu-checkbox-checkmark-path{stroke-dashoffset:23}${n("pn-action-menu")} .pn-action-menu-radio{display:flex;gap:0.75em;padding:0;margin-left:auto}${n("pn-action-menu")} .pn-action-menu-radio-outer{background-color:#ffffff;border:0.0625em solid #969087;border-radius:50%;height:1.5em;width:1.5em;display:flex;justify-content:center;align-items:center;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:border-color, background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-radio-outer{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-radio-inner{transform:scale(0);height:0.75em;width:0.75em;background-color:#005d92;border-radius:50%;transform-origin:center center;transition-property:background-color, transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-radio-inner{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-input{position:absolute;z-index:10;cursor:pointer;height:100%;width:100%;top:0;left:0;margin:0;opacity:0;-webkit-tap-highlight-color:transparent}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button{background-color:#effbff}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-checkbox{border-color:#005d92;background-color:#005d92}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-checkbox polyline.pn-action-menu-checkbox-checkmark-path{transition-delay:0.2s;stroke-dashoffset:0}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-radio-outer{border-color:#005d92}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-radio-inner{transform:scale(1);background-color:#005d92}${n("pn-action-menu")} .pn-action-menu-input:checked:hover{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:disabled{pointer-events:none}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button{pointer-events:none;color:#5e554a;background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-action-menu-item-label{color:#5e554a}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-action-menu-checkbox{background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-action-menu-radio-outer{border-color:#969087;background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-icon-svg path{fill:#5e554a}${n("pn-action-menu")} .pn-action-menu-input:disabled:checked+.pn-action-menu-button .pn-action-menu-radio-inner{background-color:#969087}${n("pn-action-menu")} .pn-action-menu-input:disabled:checked+.pn-action-menu-button .pn-action-menu-checkbox{border-color:#969087;background-color:#969087}${n("pn-action-menu")} .pn-action-menu-input:hover+.pn-action-menu-button{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:hover+.pn-action-menu-button .pn-action-menu-radio-outer{border-color:#005d92;background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button .pn-action-menu-checkbox,${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button .pn-action-menu-radio .pn-action-menu-radio-outer{outline-color:#005d92}${n("pn-action-menu")} .pn-action-menu-p{margin:0}${n("pn-action-menu")} .pn-action-menu>${n("pn-button")}[data-default-icon] .pn-button[aria-expanded=true] .pn-icon-svg{transform:rotate(180deg);transition-delay:0s}${n("pn-action-menu")} .pn-action-menu>${n("pn-button")}[data-default-icon] .pn-button .pn-icon-svg{transform:rotate(0deg);transition-delay:0.2s;transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu>${n("pn-button")}[data-default-icon] .pn-button .pn-icon-svg{transition-duration:0s;transition-delay:0s}}`;export{v as pn_action_menu}
5
+ import{t as n,M as t,r as i,c as e,g as o,h as a,a as r}from"./p-CAEP792y.js";import{a as c}from"./p-BlM_xfdt.js";import{uuidv4 as u,awaitTopbar as s,en as p,isSmallScreen as m,getTotalHeightOffset as l,getMenuWidth as d,ripple as b}from"./index.esm.js";import{c as h}from"./p-DrYFvs2M.js";import{c as f,a as g}from"./p-B6SVpr61.js";import{o as $}from"./p-IFVOY5Gf.js";const k={BACK:{sv:"Tillbaka",en:"Back",da:"Tilbage",fi:"Takaisin",no:"Tilbake"}},v=class extends(t(c)){constructor(n){super(),i(this,n),this.menuToggle=e(this,"menuToggle"),this.menuVisible=e(this,"menuVisible"),this.menuOption=e(this,"menuOption")}id=`pn-action-menu-${u()}`;menuButtonId=`${this.id}-button`;menuListId=`${this.id}-list`;menuTrigger;menuContainer;menuList;timeout;menuWidth=256;get hostElement(){return o(this)}smallMenu=null;upwards=!1;activeSubmenu=[];options=[];button;menuId=this.id;language=null;open=!1;menuUp=!1;menuLeft=!1;menuToggle;menuVisible;menuOption;handleOptions(){this.setMenuLayout()}openHandler(){this.setAnimationDuration(),requestAnimationFrame((()=>{this.open&&!this.isMoving()&&(this.setOffset(),this.setMenuLayout()),this.dropdownHandler(),this.menuToggle.emit({open:this.open}),clearTimeout(this.timeout),this.timeout=setTimeout((()=>{if(!this.open){this.activeSubmenu=[];const n=this.hostElement.querySelectorAll("[data-x]");Array.from(n).forEach((n=>{n.removeAttribute("data-x"),n.removeAttribute("data-y")}))}this.menuVisible.emit({visible:this.open})}),this.animationDuration)}))}handleMenuId(){this.menuButtonId=`${this.menuId}-button`,this.menuListId=`${this.menuId}-list`}handleResize(){this.open&&this.toggleActionMenu(!1)}async componentWillLoad(){this.options.length||console.warn(`${this.hostElement.localName}: No options set.`),this.handleMenuId(),this.setAnimationDuration(),null!==this.language&&await s(this.hostElement)}componentDidLoad(){this.setOffset(),requestAnimationFrame((()=>this.open&&this.dropdownHandler()))}translate(n){return k[n][this.language||p]}globalEvents=n=>{const t=n.target,i=t?.closest(this.hostElement.localName);i||this.closeEachSubMenu(!0)};addGlobalEventListeners(){this.hostElement.getRootNode().addEventListener("click",this.globalEvents)}removeGlobalEventListeners(){this.hostElement.getRootNode().removeEventListener("click",this.globalEvents)}toggleActionMenu(n){this.open=n??!this.open}setMenuLayout(){if(!this.menuContainer)return;this.isMoving()||this.resetMaxHeight();const n=this.getMenuMeasurements();this.setDirection(n),this.setMenuSize(n),this.setMaxHeight(n)}setDirection({hUp:n,hDown:t,sUp:i,sDown:e}){this.upwards=this.menuUp&&i>n||!(e>t)&&!(e>i)}setMenuSize({hUp:n,hDown:t,sUp:i,sDown:e}){const o=m()||!(this.upwards?i>n:e>t);o!==this.smallMenu&&(this.smallMenu=o)}setMaxHeight({hUp:n,hDown:t,sUp:i,sDown:e}){this.smallMenu?this.hostElement.style.setProperty("--pn-menu-height",`${this.upwards?n>i?n-16:n:t>e?t-8:t}px`):this.resetMaxHeight()}resetMaxHeight(){this.hostElement.style.setProperty("--pn-menu-height","unset")}getRect(n){return n.getBoundingClientRect()}getMenuMeasurements(){const n=Array.from(this.menuContainer.querySelectorAll("menu")),t=Math.max(...n.map((n=>n.scrollHeight))),i=this.getRect(this.menuTrigger),e=this.getRect(this.menuContainer),o=i.top-l(),a=innerHeight-e.top;return{hUp:o>t?t:o,hDown:a>t?t:a,sUp:o,sDown:a}}setOffset(){const n=this.getRect(this.hostElement),t=d(),i=n.left,e=n.left+this.menuWidth,o=t+16,a=innerWidth-16;let r=0;i<o?r=o-i:e>a&&(r=a-e),this.menuContainer&&this.menuContainer.style.setProperty("--pn-action-menu-offset",`${r}px`)}getListId(n){return`pn-menu-${n.value}-list`}getButtonId(n){return`pn-menu-${n.value}-button`}getTriggerIcon(){if(!this.button?.icon)return h}getSubMenuPath(n,t,i=[]){for(const e of n){const n=[...i,e.value];if(e.value===t)return n;if(e.options||e.group){const i=this.getSubMenuPath(e.options||e.group,t,n);if(i)return i}}return null}closeEachSubMenu(n=!1){n||this.menuTrigger?.querySelector("button")?.focus({preventScroll:!0});const t=setInterval((()=>{this.smallMenu||0===this.activeSubmenu.length?(clearInterval(t),this.toggleActionMenu(!1)):(this.activeSubmenu.pop(),this.activeSubmenu=[...this.activeSubmenu])}),150)}escButton(n,t){const{key:i}=n;"Escape"===i&&(n.preventDefault(),n.stopImmediatePropagation(),this.isSubmenuActive(t.value)?this.toggleSub(t):this.toggleActionMenu())}dropdownHandler(){this.open?(this.addGlobalEventListeners(),this.openDropdown(this.menuContainer,this.menuList.clientHeight)):(this.removeGlobalEventListeners(),this.closeDropdown(this.menuContainer,this.menuList.clientHeight))}async optionSelect(n,t){const i=n?.options?.length?"submenu":n.input?"input":n.href?"link":"button",e="submenu"===i;e?this.toggleSub(n):"button"===i?this.closeEachSubMenu():"input"===i&&(n.checked=t.target.checked),this.menuOption.emit({option:n,type:i,click:t,open:e?this.isSubmenuActive(n.value):null});const o=t.target,a="input"===o.localName?o.nextElementSibling:"pn-action-menu-button"===o.className?o:o.closest(".pn-action-menu-button"),{x:r,width:c,y:u,top:s}=this.getRect(a);b("click"===t.type?t:{clientX:r+c-24,clientY:u-s},a),this.menuContainer.scrollTo({top:0})}toggleSub(n){const{value:t}=n,i=this.getSubMenuPath(this.options,t),e=this.activeSubmenu.includes(t);e&&i.splice(this.activeSubmenu.indexOf(t),1);const o=this.hostElement.querySelector(`#${this.getListId(n)}`),a=this.getRect(o),r=innerWidth-a.right-8,c=a.left>a.width,u=this.menuUp&&a.top-a.height>0?"top":"bottom";e||o.dataset.x||o.setAttribute("data-x",this.menuLeft&&c?"left":r>a.width?"right":c?"left":"center"),e||o.dataset.y||o.setAttribute("data-y",u),this.activeSubmenu=JSON.stringify(i)===JSON.stringify(this.activeSubmenu)?this.activeSubmenu.filter((n=>n!==t)):[...i]}isSubmenuActive(n){return this.activeSubmenu.includes(n)}isMenuActive(){const n=this.options.find((({value:n})=>this.activeSubmenu.every((t=>t===n))));return this.smallMenu&&(0===this.activeSubmenu?.length||n)}isCurrentSubMenu(n){return Boolean(this.activeSubmenu[this.activeSubmenu.length-1]===n)}getOptionTrailing(n){const t=n.options?.length&&f||n.trailingIcon||"_blank"===n.target&&$;return t?a("pn-icon",{icon:t,color:"blue700","data-suffix":!0,"data-active":this.isSubmenuActive(n.value)}):n.suffix?a("span",{class:"pn-action-menu-item-suffix"},n.suffix):void 0}renderCheckbox(n){const t=`pn-menu-${n.value}-label`,i=`pn-menu-${n.value}-helpertext`;return a("div",{class:"pn-action-menu-item-content"},a("input",{type:n.input,id:t,class:"pn-action-menu-input",name:n.name,value:n.value,checked:n.checked,disabled:n.disabled,"aria-describedby":n.helpertext?i:null,onInput:t=>this.optionSelect(n,t),tabIndex:this.open?null:-1}),a("div",{class:"pn-action-menu-button"},!!n.icon&&a("pn-icon",{icon:n.icon,color:"blue700"}),a("div",{class:"pn-action-menu-item-text"},a("label",{htmlFor:t,class:"pn-action-menu-item-label"},n.label),n.helpertext&&a("p",{id:i,class:"pn-action-menu-item-helpertext"},a("span",null,n.helpertext))),"checkbox"===n.input?a("div",{class:"pn-action-menu-checkbox"},a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},a("polyline",{class:"pn-action-menu-checkbox-checkmark-path",points:"4,12 9,17 20,6","stroke-width":"3"}))):a("div",{class:"pn-action-menu-radio"},a("div",{class:"pn-action-menu-radio-outer"},a("div",{class:"pn-action-menu-radio-inner"})))))}renderButton(n){const t="BACK"===n.label,i=!!n?.options?.length,e=!!n?.group?.length,o=!!n.href&&!i&&!e,r=t?"-close":"",c=t||!!n.icon,u=t?null:this.getOptionTrailing(n),s=this.isSubmenuActive(n.value),p=i?{"aria-haspopup":"true","aria-controls":s?this.getListId(n):null,"aria-expanded":s?.toString()}:{},m=o?{href:n.href,target:n.target}:{disabled:n.disabled},l=o?"a":"button";return e?a("div",{class:"pn-action-menu-group-label"},a("p",{class:"pn-action-menu-p"},n.label),n.helpertext&&a("p",{class:"pn-action-menu-group-helpertext"},n.helpertext)):a("div",{class:"pn-action-menu-item-content","data-close":t},a(l,{id:this.getButtonId(n)+r,class:"pn-action-menu-button",...p,...m,tabIndex:this.open?null:-1,onClick:t=>this.optionSelect(n,t),onKeyDown:t=>this.escButton(t,n)},c&&a("pn-icon",{icon:t?g:n.icon,color:"blue700"}),a("div",{class:"pn-action-menu-item-text"},a("span",{class:"pn-action-menu-item-label"},t?this.translate("BACK"):n.label),n.helpertext&&!o&&a("span",{class:"pn-action-menu-item-helpertext"},n.helpertext)),u))}renderSub(n){return a("menu",{id:this.getListId(n),"aria-labelledby":this.getButtonId(n),class:"pn-action-menu-sub","data-open":this.isSubmenuActive(n.value)?.toString(),"data-current":this.isCurrentSubMenu(n.value)},this.smallMenu&&a("li",{class:"pn-action-menu-item"},this.renderButton({label:"BACK",value:n.value,options:n.options})),n.options.map((n=>this.renderMenuItem(n))))}renderGroup(n){return a("menu",{class:"pn-action-menu-group"},n.group.map((n=>this.renderMenuItem(n))))}renderMenuItem(n){const t=!!n?.options?.length,i=!t&&!!n?.group?.length;return a("li",{class:"pn-action-menu-item","data-group":i,"data-sub":t},!n.input||t||i?this.renderButton(n):this.renderCheckbox(n),t?this.renderSub(n):i&&this.renderGroup(n))}renderMenu(){return a("div",{id:this.menuListId,class:"pn-action-menu-container",role:"region","aria-labelledby":this.menuButtonId,"data-open":this.open,"data-upwards":this.upwards,"data-small":this.smallMenu,style:{height:"0px"},ref:n=>this.menuContainer=n},a("menu",{class:"pn-action-menu-list","data-current":this.isMenuActive(),ref:n=>this.menuList=n},this.options?.map((n=>this.renderMenuItem(n)))))}render(){return a(r,{key:"d77e6c7f658e2552260f5a8a30034a8d68d9bfa2"},a("div",{key:"3d2584a7c12abf5948cec24c967ab573d33dafa0",id:this.menuId!==this.id?this.menuId:null,class:"pn-action-menu"},a("pn-button",{key:"f8460fca3784d2cb04ac55bfa0070935006c864d",icon:this.getTriggerIcon(),...this.button,buttonId:this.menuButtonId,tooltipUp:!this.upwards,ariahaspopup:"true",ariacontrols:this.open?this.menuListId:null,ariaexpanded:this.open.toString(),"data-default-icon":!this.button?.icon,onPnClick:()=>this.toggleActionMenu(),ref:n=>this.menuTrigger=n}),this.renderMenu()))}static get watchers(){return{options:[{handleOptions:0}],open:[{openHandler:0}],menuId:[{handleMenuId:0}]}}};v.style=`${n("pn-action-menu")}{--pn-menu-height:unset;display:inline-block;position:relative}${n("pn-action-menu")} .pn-action-menu{position:relative}${n("pn-action-menu")} .pn-action-menu-container{--pn-action-menu-offset:0;scroll-behavior:smooth;list-style:none;text-align:left;position:absolute;z-index:100;top:calc(100% + 0.5em);left:var(--pn-action-menu-offset);right:0;background-color:#ffffff;box-shadow:0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1), 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);border-radius:0.5em;margin:0;padding:0;width:16em;visibility:hidden;overflow:hidden}${n("pn-action-menu")} .pn-action-menu-container[data-open]{visibility:visible;overflow:unset}${n("pn-action-menu")} .pn-action-menu-container[data-left]{right:0;left:unset}${n("pn-action-menu")} .pn-action-menu-container[data-upwards]{top:unset;bottom:calc(100% + 0.5em);transform-origin:bottom left}${n("pn-action-menu")} .pn-action-menu-container[data-moving]{overflow:hidden;visibility:visible;pointer-events:none}${n("pn-action-menu")} .pn-action-menu-container{}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list{border-radius:0.5em;visibility:hidden;transition-property:visibility;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list{transition-delay:0.2s}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-list[data-current]{overflow-x:auto;visibility:visible;transition-delay:0s}${n("pn-action-menu")} .pn-action-menu-container[data-small][data-moving]>.pn-action-menu-list{visibility:visible}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-item{position:unset}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-sub{left:0;height:100%;box-shadow:unset;transform:translateX(0);visibility:hidden}${n("pn-action-menu")} .pn-action-menu-container[data-small] .pn-action-menu-sub[data-current]{visibility:visible;overflow-x:auto}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-corner,${n("pn-action-menu")} .pn-action-menu-container::-webkit-scrollbar-button{display:none}${n("pn-action-menu")} .pn-action-menu-list{margin:0;padding:0;list-style:none;height:var(--pn-menu-height)}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-corner,${n("pn-action-menu")} .pn-action-menu-list::-webkit-scrollbar-button{display:none}${n("pn-action-menu")} .pn-action-menu-group{margin:0;padding:0;list-style:none}${n("pn-action-menu")} .pn-action-menu-group-label{display:block;color:#2d2013;font-weight:700;font-size:0.875em;padding:1em 1em 0.5em}${n("pn-action-menu")} .pn-action-menu-group-helpertext{display:block;color:#5e554a;font-weight:400;margin:0.25em 0 0}${n("pn-action-menu")} .pn-action-menu-sub{z-index:110;position:absolute;top:0;width:100%;min-width:12em;margin:0;padding:0;list-style:none;background:#ffffff;border-radius:0.5em;box-shadow:0em 0.075em 0.225em 0em rgba(0, 0, 0, 0.1), 0em 0.4em 0.9em 0em rgba(0, 0, 0, 0.13);transform:translateX(-0.5em);opacity:0;visibility:hidden}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar{background-color:#ffffff;width:0.875em;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-track{background-color:#ffffff;border-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-thumb{cursor:pointer;background-color:#969087;border-radius:1em;border:0.25em solid #ffffff}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-thumb:hover{background-color:#5e554a}${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-corner,${n("pn-action-menu")} .pn-action-menu-sub::-webkit-scrollbar-button{display:none}${n("pn-action-menu")} .pn-action-menu-sub{transition-property:transform, opacity, visibility;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-sub{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-sub{transition-delay:0s, 0s, 0.2s}${n("pn-action-menu")} .pn-action-menu-sub[data-open=true]{transform:translateX(0);opacity:1;visibility:visible;transition-delay:0s, 0s, 0s}${n("pn-action-menu")} .pn-action-menu-sub[data-open=false]{pointer-events:none}${n("pn-action-menu")} .pn-action-menu-sub[data-x=left]{left:-100%}${n("pn-action-menu")} .pn-action-menu-sub[data-x=center]{left:0}${n("pn-action-menu")} .pn-action-menu-sub[data-x=right]{left:100%}${n("pn-action-menu")} .pn-action-menu-sub[data-y=top]{top:unset;bottom:0}${n("pn-action-menu")} .pn-action-menu-sub[data-y=bottom]{top:0}${n("pn-action-menu")} .pn-action-menu-item{position:relative}${n("pn-action-menu")} .pn-action-menu-item:first-child>.pn-action-menu-item-content>.pn-action-menu-button{border-top-left-radius:0.5em;border-top-right-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-item:last-child>.pn-action-menu-item-content>.pn-action-menu-button{border-bottom-right-radius:0.5em;border-bottom-left-radius:0.5em}${n("pn-action-menu")} .pn-action-menu-item-text{display:flex;flex-direction:column;margin-right:auto}${n("pn-action-menu")} .pn-action-menu-item-label{color:#005d92;font-weight:500;text-decoration:none}${n("pn-action-menu")} .pn-action-menu-item-suffix{margin-left:auto;font-weight:400;color:#5e554a}${n("pn-action-menu")} .pn-action-menu-item-helpertext{color:#5e554a;font-weight:400}${n("pn-action-menu")} .pn-action-menu-item-content{display:flex;align-items:center;flex-direction:row;flex:1 1 100%;gap:0.5em;position:relative}${n("pn-action-menu")} .pn-action-menu-item-content[data-close]{border-bottom:0.0625em solid #d3cecb}${n("pn-action-menu")} .pn-action-menu-item-content>${n("pn-icon")}{padding:0 0.25em}${n("pn-action-menu")} .pn-action-menu-item[data-group],${n("pn-action-menu")} .pn-action-menu-item[data-sub]{flex-direction:column}${n("pn-action-menu")} .pn-action-menu-button{cursor:pointer;position:relative;-webkit-tap-highlight-color:transparent;line-height:1.5;padding:0.75em 1em;border:0;width:100%;text-align:left;text-decoration-color:transparent;overflow:hidden;display:flex;align-items:center;flex:1 1 100%;gap:0.5em;font-size:1em;min-height:1.5em;background-color:#ffffff;transition-property:background-color, color, outline-color, text-decoration-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-button{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-button .pn-ripple{animation:ripple 0.4s cubic-bezier(0.7, 0, 0.3, 1);position:absolute;border-radius:50%;background-color:#0d234b;transform:translate(-50%, -50%) scale(0);opacity:0.1;pointer-events:none;z-index:3}@keyframes ripple{to{transform:translate(-50%, -50%) scale(1);opacity:0}}${n("pn-action-menu")} .pn-action-menu-button{outline:0.2rem solid transparent;outline-offset:0.2rem}${n("pn-action-menu")} .pn-action-menu-button:focus-visible{outline-color:#005d92}${n("pn-action-menu")} .pn-action-menu-button{outline-offset:-0.2rem}${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")} .pn-icon-svg>path{transform-origin:center;transform:rotate(0deg);transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")} .pn-icon-svg>path{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")}[data-suffix][data-active]>.pn-icon-svg>path{transform:rotate(180deg)}${n("pn-action-menu")} .pn-action-menu-button>${n("pn-icon")}:last-child{margin-left:auto}${n("pn-action-menu")} .pn-action-menu-button:disabled{pointer-events:none;color:#5e554a;background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-button:hover{background-color:#effbff}${n("pn-action-menu")} .pn-action-menu-button:focus{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-button[href]:hover,${n("pn-action-menu")} .pn-action-menu-button[href]:focus{text-decoration-color:#005d92}${n("pn-action-menu")} .pn-action-menu-button{}${n("pn-action-menu")} .pn-action-menu-checkbox{background-color:#ffffff;flex:0 0 1.5em;width:1.5em;height:1.5em;border:0.0625em solid #969087;border-radius:0.25em;margin-left:auto;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:background-color, border-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-checkbox{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline{stroke:#ffffff;stroke-linecap:round;stroke-dasharray:23;transition-property:stroke-dashoffset;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline{transition-delay:0s}${n("pn-action-menu")} .pn-action-menu-checkbox svg polyline.pn-action-menu-checkbox-checkmark-path{stroke-dashoffset:23}${n("pn-action-menu")} .pn-action-menu-radio{display:flex;gap:0.75em;padding:0;margin-left:auto}${n("pn-action-menu")} .pn-action-menu-radio-outer{background-color:#ffffff;border:0.0625em solid #969087;border-radius:50%;height:1.5em;width:1.5em;display:flex;justify-content:center;align-items:center;outline:0.2rem solid transparent;outline-offset:0.2rem;transition-property:border-color, background-color, outline-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-radio-outer{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-radio-inner{transform:scale(0);height:0.75em;width:0.75em;background-color:#005d92;border-radius:50%;transform-origin:center center;transition-property:background-color, transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu-radio-inner{transition-duration:0s;transition-delay:0s}}${n("pn-action-menu")} .pn-action-menu-input{position:absolute;z-index:10;cursor:pointer;height:100%;width:100%;top:0;left:0;margin:0;opacity:0;-webkit-tap-highlight-color:transparent}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button{background-color:#effbff}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-checkbox{border-color:#005d92;background-color:#005d92}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-checkbox polyline.pn-action-menu-checkbox-checkmark-path{transition-delay:0.2s;stroke-dashoffset:0}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-radio-outer{border-color:#005d92}${n("pn-action-menu")} .pn-action-menu-input:checked+.pn-action-menu-button .pn-action-menu-radio-inner{transform:scale(1);background-color:#005d92}${n("pn-action-menu")} .pn-action-menu-input:checked:hover{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:disabled{pointer-events:none}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button{pointer-events:none;color:#5e554a;background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-action-menu-item-label{color:#5e554a}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-action-menu-checkbox{background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-action-menu-radio-outer{border-color:#969087;background-color:#f3f2f2}${n("pn-action-menu")} .pn-action-menu-input:disabled+.pn-action-menu-button .pn-icon-svg path{fill:#5e554a}${n("pn-action-menu")} .pn-action-menu-input:disabled:checked+.pn-action-menu-button .pn-action-menu-radio-inner{background-color:#969087}${n("pn-action-menu")} .pn-action-menu-input:disabled:checked+.pn-action-menu-button .pn-action-menu-checkbox{border-color:#969087;background-color:#969087}${n("pn-action-menu")} .pn-action-menu-input:hover+.pn-action-menu-button{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:hover+.pn-action-menu-button .pn-action-menu-radio-outer{border-color:#005d92;background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button{background-color:#e0f8ff}${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button .pn-action-menu-checkbox,${n("pn-action-menu")} .pn-action-menu-input:focus-visible+.pn-action-menu-button .pn-action-menu-radio .pn-action-menu-radio-outer{outline-color:#005d92}${n("pn-action-menu")} .pn-action-menu-p{margin:0}${n("pn-action-menu")} .pn-action-menu>${n("pn-button")}[data-default-icon] .pn-button[aria-expanded=true] .pn-icon-svg{transform:rotate(180deg);transition-delay:0s}${n("pn-action-menu")} .pn-action-menu>${n("pn-button")}[data-default-icon] .pn-button .pn-icon-svg{transform:rotate(0deg);transition-delay:0.2s;transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${n("pn-action-menu")} .pn-action-menu>${n("pn-button")}[data-default-icon] .pn-button .pn-icon-svg{transition-duration:0s;transition-delay:0s}}`;export{v as pn_action_menu}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{r as i}from"./p-DWsprozV.js";import{reduceMotion as t}from"./index.esm.js";function s(s){return class extends s{constructor(t){super(),i(this,t)}animation;animationDurationDefault=400;animationDuration=this.animationDurationDefault;isClosing=!1;isExpanding=!1;animateDropdown(i,t,s,n){this.cancelAnimations(),this.setAnimationDuration(),i.dataset.moving="",this.animation=i.animate({height:[s,n]},{duration:this.animationDuration,easing:"cubic-bezier(0.6, 0, 0.2, 1)"}),this.animation.onfinish=()=>this.animationFinish(i),this.animation.oncancel=()=>t?this.isExpanding=!1:this.isClosing=!1}openDropdown(i,t){const{clientHeight:s,scrollHeight:n}=i,h=this.isClosing?s:0;i.style.height=`${n}px`,this.isExpanding=!0,this.animateDropdown(i,!0,`${h}px`,`${t||i.scrollHeight}px`)}closeDropdown(i,t){const{scrollHeight:s,clientHeight:n}=i,h=this.isExpanding?n:s;i.style.height="0px",this.isClosing=!0,this.animateDropdown(i,!1,`${t||h}px`,"0px")}animationFinish(i){this.cancelAnimations(),i.style.height=this.isClosing?"0px":"",delete i.dataset.moving,this.isClosing=!1,this.isExpanding=!1}cancelAnimations(){this.animation&&this.animation.cancel()}setAnimationDuration(){this.animationDuration=t()?0:this.animationDurationDefault}isMoving(){return this.isClosing||this.isExpanding}}}export{s as a}
5
+ import{r as i}from"./p-CAEP792y.js";import{reduceMotion as t}from"./index.esm.js";function s(s){return class extends s{constructor(t){super(),i(this,t)}animation;animationDurationDefault=400;animationDuration=this.animationDurationDefault;isClosing=!1;isExpanding=!1;animateDropdown(i,t,s,n){this.cancelAnimations(),this.setAnimationDuration(),i.dataset.moving="",this.animation=i.animate({height:[s,n]},{duration:this.animationDuration,easing:"cubic-bezier(0.6, 0, 0.2, 1)"}),this.animation.onfinish=()=>this.animationFinish(i),this.animation.oncancel=()=>t?this.isExpanding=!1:this.isClosing=!1}openDropdown(i,t){const{clientHeight:s,scrollHeight:n}=i,h=this.isClosing?s:0;i.style.height=`${n}px`,this.isExpanding=!0,this.animateDropdown(i,!0,`${h}px`,`${t||i.scrollHeight}px`)}closeDropdown(i,t){const{scrollHeight:s,clientHeight:n}=i,h=this.isExpanding?n:s;i.style.height="0px",this.isClosing=!0,this.animateDropdown(i,!1,`${t||h}px`,"0px")}animationFinish(i){this.cancelAnimations(),i.style.height=this.isClosing?"0px":"",delete i.dataset.moving,this.isClosing=!1,this.isExpanding=!1}cancelAnimations(){this.animation&&this.animation.cancel()}setAnimationDuration(){this.animationDuration=t()?0:this.animationDurationDefault}isMoving(){return this.isClosing||this.isExpanding}}}export{s as a}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * By PostNord.
4
+ */
5
+ var t=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(t||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),e="type",l="value",o="serialized:",s=(t,n)=>{var e;Object.entries(null!=(e=n.l.t)?e:{}).map((([e,[l]])=>{if(31&l||32&l){const l=t[e],o=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(t,e,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.o.has(e)?n.o.get(e):l}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},r=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.l.u&&s(t,n))},c=(t,n)=>n in t,u=(t,n)=>(0,console.error)(t,n),f=new Map,a=new Map,d="s-id",h="c-id",p="slot-fb{display:contents}slot-fb[hidden]{display:none}",v="http://www.w3.org/1999/xlink",$="undefined"!=typeof window?window:{},m=$.HTMLElement||class{},b={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},y=t=>Promise.resolve(t),g=(()=>{try{return!!$.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),w=!!g&&(()=>!!$.document&&Object.getOwnPropertyDescriptor($.document.adoptedStyleSheets,"length").writable)(),j=!1,O=[],S=[],N=(t,n)=>e=>{t.push(e),j||(j=!0,n&&4&b.u?C(x):b.raf(x))},k=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){u(t)}t.length=0},x=()=>{k(O),k(S),(j=O.length>0)&&b.raf(x)},C=t=>y().then(t),E=N(S,!0),M=t=>{const n=W(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&T(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!L(t,F(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&W(t,"childNodes").length&&M(t)}},I=t=>{const n=[];for(let e=0;e<t.length;e++){const l=t[e]["s-nr"]||void 0;l&&l.isConnected&&n.push(l)}return n};function T(t,n,e){let l,o=0,s=[];for(;o<t.length;o++){if(l=t[o],l["s-sr"]&&(!n||l["s-hn"]===n)&&(void 0===e||F(l)===e)&&(s.push(l),void 0!==e))return s;s=[...s,...T(l.childNodes,n,e)]}return s}var L=(t,n,e=!0)=>{const l=[];(e&&t["s-sr"]||!t["s-sr"])&&l.push(t);let o=t;for(;o=o.nextSibling;)F(o)!==n||!e&&o["s-sr"]||l.push(o);return l},R=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,A=(t,n,e,l)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=W(s,"appendChild");if(void 0!==l){o["s-oo"]=l;const t=W(s,"childNodes"),n=[o];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,o);t["s-ol"]=o,t["s-sh"]=n["s-hn"]},F=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function D(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],l=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:I(o.childNodes)).forEach((t=>{l===F(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}var P=t=>{if(t.__cloneNode)return;const n=t.__cloneNode=t.cloneNode;t.cloneNode=function(t){const e=n.call(this,!1);if(t){let t,n,l=0;const o=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],s=this.__childNodes||this.childNodes;for(;l<s.length;l++)t=s[l]["s-nr"],n=o.every((t=>!s[l][t])),t&&e.appendChild(t.cloneNode(!0)),n&&e.appendChild(s[l].cloneNode(!0))}return e}},_=t=>{class n extends Array{item(t){return this[t]}}B("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),B("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),B("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),B("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new n;return t.push(...I(this.__childNodes)),t}})},V=["children","nextElementSibling","previousElementSibling"],U=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function B(t,n){if(!globalThis.Node||!globalThis.Element)return;let e;V.includes(t)?e=Object.getOwnPropertyDescriptor(Element.prototype,t):U.includes(t)&&(e=Object.getOwnPropertyDescriptor(Node.prototype,t)),e||(e=Object.getOwnPropertyDescriptor(n,t)),e&&Object.defineProperty(n,"__"+t,e)}function W(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function z(t){var n,e,l;return null!=(l=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?l:void 0}var H=new WeakMap,q=t=>"sc-"+t.p,Y=t=>"object"==(t=typeof t)||"function"===t,G=(t,n,...e)=>{"string"==typeof t&&(t=pn(t));let l=null,o=null,s=null,i=!1,r=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)l=n[e],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof t&&!Y(l))&&(l+=""),i&&r?c[c.length-1].v+=l:c.push(i?J(null,l):l),r=i)};if(u(e),n){n.key&&(o=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,Q);const f=J(t,null);return f.$=n,c.length>0&&(f.m=c),f.j=o,f.O=s,f},J=(t,n)=>({u:0,S:t,v:null!=n?n:null,N:null,m:null,$:null,j:null,O:null}),K={},Q={forEach:(t,n)=>t.map(X).forEach(n),map:(t,n)=>t.map(X).map(n).map(Z)},X=t=>({vattrs:t.$,vchildren:t.m,vkey:t.j,vname:t.O,vtag:t.S,vtext:t.v}),Z=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),G(t.vtag,n,...t.vchildren||[])}const n=J(t.vtag,t.vtext);return n.$=t.vattrs,n.m=t.vchildren,n.j=t.vkey,n.O=t.vname,n},tt=(t,n,e,l,o,s,i,r=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(h),c&&(u=c.split("."),u[0]===i||"0"===u[0])){f=et({u:0,k:u[0],C:u[1],M:u[2],I:u[3],S:s.tagName.toLowerCase(),N:s,$:{class:s.className||""}}),n.push(f),s.removeAttribute(h),t.m||(t.m=[]);const l=f.N.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===f.S&&lt(l,u[2],f,s,t,n,e,0,r),f.N["s-sn"]=l,f.N.removeAttribute("s-sn")),void 0!==f.I&&(t.m[f.I]=f),t=f}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)tt(t,n,e,l,o,s.shadowRoot.childNodes[a],i,r);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)tt(t,n,e,l,o,d[a],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],f=et({k:u[1],C:u[2],M:u[3],I:u[4]||"0",N:s,$:null,m:null,j:null,O:null,S:null,v:null}),"t"===c?(f.N=rt(s,3),f.N&&3===f.N.nodeType&&(f.v=f.N.textContent,n.push(f),s.remove(),i===f.k&&(t.m||(t.m=[]),t.m[f.I]=f))):"c"===c?(f.N=rt(s,8),f.N&&8===f.N.nodeType&&(n.push(f),s.remove())):f.k===i&&("s"===c?lt(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,0,r):"r"===c&&(o["s-cr"]=s,s["s-cn"]=!0)));else if(t&&"style"===t.S){const n=J(null,s.textContent);n.N=s,n.I="0",t.m=[n]}return t},nt=(t,n)=>{if(1===t.nodeType){const e=t[d]||t.getAttribute(d);e&&n.set(e,t);let l=0;if(t.shadowRoot)for(;l<t.shadowRoot.childNodes.length;l++)nt(t.shadowRoot.childNodes[l],n);const o=t.__childNodes||t.childNodes;for(l=0;l<o.length;l++)nt(o[l],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},et=t=>({u:0,k:null,C:null,M:null,I:"0",N:null,$:null,m:null,j:null,O:null,S:null,v:null,...t});function lt(t,n,e,l,o,s,i,r,c){l["s-sr"]=!0,e.O=t||null,e.S="slot";const u=(null==o?void 0:o.N)?o.N["s-id"]||o.N.getAttribute("s-id"):"";{const s=e.N,i=u&&u!==e.k&&o.N.shadowRoot;it(c,n,t,l,i?u:e.k),D(l),i&&o.N.insertBefore(s,o.N.children[0])}s.push(e),i.push(e),o.m||(o.m=[]),o.m[e.I]=e}var ot,st,it=(t,n,e,l,o)=>{var s,i;let r=l.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:l,node:r,hostId:o})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},rt=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},ct=class o{static fromLocalValue(t){const n=t[e],s=l in t?t[l]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((t=>o.fromLocalValue(t)));case"date":return new Date(s);case"map":const t=new Map;for(const[n,e]of s){const l="object"==typeof n&&null!==n?o.fromLocalValue(n):n,s=o.fromLocalValue(e);t.set(l,s)}return t;case"object":const e={};for(const[t,n]of s)e[t]=o.fromLocalValue(n);return e;case"regexp":const{pattern:l,flags:i}=s;return RegExp(l,i);case"set":const r=new Set;for(const t of s)r.add(o.fromLocalValue(t));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(t){return t.map((t=>o.fromLocalValue(t)))}static isLocalValueObject(o){if("object"!=typeof o||null===o)return!1;if(!o.hasOwnProperty(e))return!1;const s=o[e];return!!Object.values({...t,...n}).includes(s)&&("null"===s||"undefined"===s||o.hasOwnProperty(l))}},ut=(t,n)=>"string"==typeof t&&t.startsWith(o)?t=function(t){return"string"==typeof t&&t.startsWith(o)?ct.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||Y(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,ft=t=>{var n;return null==(n=i(t))?void 0:n.$hostElement$},at=(t,n)=>{const e=ft(t);return{emit:t=>dt(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},dt=(t,n,e)=>{const l=b.ce(n,e);return t.dispatchEvent(l),l},ht=(t,n,e,l,o,s,i)=>{if(e===l)return;let r=c(t,n),u=n.toLowerCase();if("class"===n){const n=t.classList,o=vt(e);let s=vt(l);if((t["s-si"]||t["s-sc"])&&i){const e=t["s-sc"]||t["s-si"];s.push(e),o.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...o.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===n){for(const n in e)l&&null!=l[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in l)e&&l[n]===e[n]||(n.includes("-")?t.style.setProperty(n,l[n]):t.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&Dt(l,t);else if(r||"o"!==n[0]||"n"!==n[1]){const i=Y(l);if((r||i&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[n]!==l&&(t[n]=l);else{const o=null==l?"":l;"list"===n?r=!1:null!=e&&t[n]==o||("function"==typeof t.__lookupSetter__(n)?t[n]=o:t.setAttribute(n,o))}}catch(t){}let c=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,c=!0),null==l||!1===l?!1===l&&""!==t.getAttribute(n)||(c?t.removeAttributeNS(v,n):t.removeAttribute(n)):(!r||4&s||o)&&!i&&1===t.nodeType&&(l=!0===l?"":l,c?t.setAttributeNS(v,n,l):t.setAttribute(n,l))}else if(n="-"===n[2]?n.slice(3):c($,u)?u.slice(2):u[2]+n.slice(3),e||l){const o=n.endsWith($t);n=n.replace(mt,""),e&&b.rel(t,n,e,o),l&&b.ael(t,n,l,o)}},pt=/\s/,vt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(pt):[]),$t="Capture",mt=RegExp($t+"$"),bt=(t,n,e,l)=>{const o=11===n.N.nodeType&&n.N.host?n.N.host:n.N,s=t&&t.$||{},i=n.$||{};for(const t of yt(Object.keys(s)))t in i||ht(o,t,s[t],void 0,e,n.u,l);for(const t of yt(Object.keys(i)))ht(o,t,s[t],i[t],e,n.u,l)};function yt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var gt=!1,wt=!1,jt=!1,Ot=!1,St=[],Nt=[],kt=(t,n,e)=>{var l;const o=n.m[e];let s,i,r,c=0;if(gt||(jt=!0,"slot"===o.S&&(o.u|=o.m?2:1)),null!=o.v)s=o.N=$.document.createTextNode(o.v);else if(1&o.u)s=o.N=$.document.createTextNode(""),bt(null,o,Ot);else{if(Ot||(Ot="svg"===o.S),!$.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=o.N=$.document.createElementNS(Ot?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!gt&&2&o.u?"slot-fb":o.S),Ot&&"foreignObject"===o.S&&(Ot=!1),bt(null,o,Ot),o.m){const n="template"===o.S?s.content:s;for(c=0;c<o.m.length;++c)i=kt(t,o,c),i&&n.appendChild(i)}"svg"===o.S?Ot=!1:"foreignObject"===s.tagName&&(Ot=!0)}return s["s-hn"]=st,3&o.u&&(s["s-sr"]=!0,s["s-cr"]=ot,s["s-sn"]=o.O||"",s["s-rf"]=null==(l=o.$)?void 0:l.ref,D(s),r=t&&t.m&&t.m[e],r&&r.S===o.S&&t.N&&xt(t.N)),s},xt=t=>{b.u|=1;const n=t.closest(st.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of e?l.reverse():l)null!=t["s-sh"]&&(Pt(n,t,null!=e?e:null),t["s-sh"]=void 0,jt=!0)}b.u&=-2},Ct=(t,n)=>{b.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===st&&e.push(n)}for(let t=e.length-1;t>=0;t--){const l=e[t];l["s-hn"]!==st&&l["s-ol"]&&(Pt(Tt(l).parentNode,l,Tt(l)),l["s-ol"].remove(),l["s-ol"]=void 0,l["s-sh"]=void 0,jt=!0),n&&Ct(l,n)}b.u&=-2},Et=(t,n,e,l,o,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.S&&(r=r.content);o<=s;++o)l[o]&&(i=kt(null,e,o),i&&(l[o].N=i,Pt(r,i,Tt(n))))},Mt=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.N;Ft(n),t&&(wt=!0,t["s-ol"]?t["s-ol"].remove():Ct(t,!0),t.remove())}}},It=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),Tt=t=>t&&t["s-ol"]||t,Lt=(t,n,e=!1)=>{const l=n.N=t.N,o=t.m,s=n.m,i=n.S,r=n.v;let c;null==r?(Ot="svg"===i||"foreignObject"!==i&&Ot,"slot"!==i||gt||t.O!==n.O&&(n.N["s-sn"]=n.O||"",xt(n.N.parentElement)),bt(t,n,Ot,e),null!==o&&null!==s?((t,n,e,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],h=n[a],p=l.length-1,v=l[0],$=l[p];const m="template"===e.S?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=n[++r];else if(null==h)h=n[--a];else if(null==v)v=l[++c];else if(null==$)$=l[--p];else if(It(d,v,o))Lt(d,v,o),d=n[++r],v=l[++c];else if(It(h,$,o))Lt(h,$,o),h=n[--a],$=l[--p];else if(It(d,$,o))"slot"!==d.S&&"slot"!==$.S||Ct(d.N.parentNode,!1),Lt(d,$,o),Pt(m,d.N,h.N.nextSibling),d=n[++r],$=l[--p];else if(It(h,v,o))"slot"!==d.S&&"slot"!==$.S||Ct(h.N.parentNode,!1),Lt(h,v,o),Pt(m,h.N,d.N),h=n[--a],v=l[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===v.j){u=f;break}u>=0?(i=n[u],i.S!==v.S?s=kt(n&&n[c],e,u):(Lt(i,v,o),n[u]=void 0,s=i.N),v=l[++c]):(s=kt(n&&n[c],e,c),v=l[++c]),s&&Pt(Tt(d.N).parentNode,s,Tt(d.N))}r>a?Et(t,null==l[p+1]?null:l[p+1].N,e,l,c,p):c>p&&Mt(n,r,a)})(l,o,n,s,e):null!==s?(null!==t.v&&(l.textContent=""),Et(l,null,n,s,0,s.length-1)):e||null===o?e&&null!==o&&null===s&&(n.m=o):Mt(o,0,o.length-1),Ot&&"svg"===i&&(Ot=!1)):(c=l["s-cr"])?c.parentNode.textContent=r:t.v!==r&&(l.data=r)},Rt=[],At=t=>{let n,e,l;const o=t.__childNodes||t.childNodes;for(const t of o){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const o=t["s-sn"];for(l=e.length-1;l>=0;l--)if(n=e[l],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(R(n,o)){let e=Rt.find((t=>t.T===n));wt=!0,n["s-sn"]=n["s-sn"]||o,e?(e.T["s-sh"]=t["s-hn"],e.L=t):(n["s-sh"]=t["s-hn"],Rt.push({L:t,T:n})),n["s-sr"]&&Rt.map((t=>{R(t.T,n["s-sn"])&&(e=Rt.find((t=>t.T===n)),e&&!t.L&&(t.L=e.L))}))}else Rt.some((t=>t.T===n))||Rt.push({T:n})}1===t.nodeType&&At(t)}},Ft=t=>{t.$&&t.$.ref&&St.push((()=>t.$.ref(null))),t.m&&t.m.map(Ft)},Dt=(t,n)=>{Nt.push((()=>t(n)))},Pt=(t,n,e,l)=>{if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:o}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const l=t["s-sn"]=F(t)||"";return{slotNode:T(W(n,"childNodes"),n.tagName,l)[0],slotName:l}}(n);return o&&!l&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(o),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)},_t=(t,n)=>{if(n&&!t.R&&n["s-p"]){const e=n["s-p"].push(new Promise((l=>t.R=()=>{n["s-p"].splice(e-1,1),l()})))}},Vt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);_t(t,t.A);const e=()=>Ut(t,n);if(!n)return E(e);queueMicrotask((()=>{e()}))},Ut=(t,n)=>{const e=t.$hostElement$,l=t.i;if(!l)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return n?(t.F&&(t.F=!1,Jt(l,"connectedCallback",void 0,e)),t.u|=256,t.D&&(t.D.map((([t,n])=>Jt(l,t,n,e))),t.D=void 0),t.P.length&&t.P.forEach((t=>t(e))),o=Jt(l,"componentWillLoad",void 0,e)):o=Jt(l,"componentWillUpdate",void 0,e),o=Bt(o,(()=>Jt(l,"componentWillRender",void 0,e))),Bt(o,(()=>zt(t,l,n)))},Bt=(t,n)=>Wt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Wt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,zt=async(t,n,e)=>{var l;const o=t.$hostElement$,s=o["s-rc"];e&&(t=>{const n=t.l;((t,n)=>{var e,l,o;const s=q(n),i=a.get(s);if(!$.document)return s;if(t=11===t.nodeType?t:$.document,i)if("string"==typeof i){let o,r=H.get(t=t.head||t);r||H.set(t,r=new Set);const c=t.querySelector(`[sty-id="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){o=$.document.createElement("style"),o.textContent=i;const c=null!=(e=b._)?e:z($.document);if(null!=c&&o.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(g){const n=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),w?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(o)}else t.append(o);1&n.u&&t.insertBefore(o,null),4&n.u&&(o.textContent+=p),r&&r.add(s)}}else{let n=H.get(t);if(n||H.set(t,n=new Set),!n.has(s)){const e=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(i.constructor===e.CSSStyleSheet)l=i;else{l=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)l.insertRule(i.cssRules[t].cssText,t)}w?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],n.add(s)}}})(t.$hostElement$.getRootNode(),n)})(t);Ht(t,n,o,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!=(l=o["s-p"])?l:[],e=()=>qt(t);0===n.length?e():(Promise.all(n).then(e),t.u|=4,n.length=0)}},Ht=(t,n,e,l)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var l,o,s,i,r;const c=t.$hostElement$,u=t.l,f=t.V||J(null,null),a=(t=>t&&t.S===K)(n)?n:G(null,null,n);if(st=c.tagName,u.U&&(a.$=a.$||{},u.U.forEach((([t,n])=>{a.$[n]=c[t]}))),e&&a.$)for(const t of Object.keys(a.$))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.$[t]=c[t]);if(a.S=null,a.u|=4,t.V=a,a.N=f.N=c,gt=!1,ot=c["s-cr"],wt=!1,Lt(f,a,e),b.u|=1,jt){At(a.N);for(const t of Rt){const n=t.T;if(!n["s-ol"]&&$.document){const t=$.document.createTextNode("");t["s-nr"]=n,Pt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of Rt){const n=t.T,r=t.L;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(l=n.hidden)&&l),r){const t=r.parentNode;let l=r.nextSibling;if(l&&1===l.nodeType){let e=null==(o=n["s-ol"])?void 0:o.previousSibling;for(;e;){let o=null!=(s=e["s-nr"])?s:null;if(o&&o["s-sn"]===n["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===n||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){l=o;break}}e=e.previousSibling}}if((!l&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==l)&&n!==l){if(Pt(t,n,l,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=$.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Pt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(wt&&M(a.N),b.u&=-2,Rt.length=0,!gt&&!(1&u.u)&&c["s-cr"]){const t=a.N.__childNodes||a.N.childNodes;for(const n of t)if(n["s-hn"]!==st&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=$.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Pt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}ot=void 0,St.forEach((t=>t())),St.length=0,Nt.forEach((t=>t())),Nt.length=0})(t,n,l)}catch(n){u(n,t.$hostElement$)}return null},qt=t=>{const n=t.$hostElement$,e=t.i,l=t.A;Jt(e,"componentDidRender",void 0,n),64&t.u?Jt(e,"componentDidUpdate",void 0,n):(t.u|=64,Kt(n),Jt(e,"componentDidLoad",void 0,n),t.B(n),l||Gt()),t.W(n),t.R&&(t.R(),t.R=void 0),512&t.u&&C((()=>Vt(t,!1))),t.u&=-517},Yt=t=>{var n;{const e=i(t),l=null==(n=null==e?void 0:e.$hostElement$)?void 0:n.isConnected;return l&&2==(18&e.u)&&Vt(e,!1),l}},Gt=()=>{var t;C((()=>dt($,"appload",{detail:{namespace:"postnord-web-components"}}))),(null==(t=b.H)?void 0:t.size)&&b.H.clear()},Jt=(t,n,e,l)=>{if(t&&t[n])try{return t[n](e)}catch(t){u(t,l)}},Kt=t=>t.classList.add("hydrated"),Qt=(t,n,e,l)=>{const o=i(t);if(!o)return;if(!o)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=o.$hostElement$,r=o.o.get(n),c=o.u,f=o.i;if(e=ut(e,l.t[n][0]),!(8&c&&void 0!==r||e===r||Number.isNaN(r)&&Number.isNaN(e))){if(o.o.set(n,e),l.q){const t=l.q[n];t&&t.map((t=>{try{const[[l,s]]=Object.entries(t);(128&c||1&s)&&(f?f[l](e,r,n):o.P.push((()=>{o.i[l](e,r,n)})))}catch(t){u(t,s)}}))}if(2==(18&c)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(e,r,n))return;Vt(o,!1)}}},Xt=(t,n,e)=>{var l,o;const s=t.prototype;{t.watchers&&!n.q&&(n.q=t.watchers),t.deserializers&&!n.Y&&(n.Y=t.deserializers),t.serializers&&!n.G&&(n.G=t.serializers);const r=Object.entries(null!=(l=n.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&e&&32&l){const{get:o,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};o&&(n.t[t][0]|=2048),r&&(n.t[t][0]|=4096),(1&e||!o)&&Object.defineProperty(s,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>i(this).o.get(n))(0,t);const e=i(this),l=e?e.i:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(o){const s=i(this);if(s){if(r)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.o.get(t)&&(o=s.o.get(t)),r.call(this,ut(o,l)),void Qt(this,t,o=32&l?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return Qt(this,t,o,n),void(1&e&&!s.i&&s.P.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.o.get(t)&&(s.i[t]=o)})));const i=()=>{const e=s.i[t];!s.o.get(t)&&e&&s.o.set(t,e),s.i[t]=ut(o,l),Qt(this,t,s.i[t],n)};s.i?i():s.P.push((()=>{i()}))}}}})}else 1&e&&64&l&&Object.defineProperty(s,t,{value(...n){var e;const l=i(this);return null==(e=null==l?void 0:l.J)?void 0:e.then((()=>{var e;return null==(e=l.i)?void 0:e[t](...n)}))}})})),1&e){const e=new Map;s.attributeChangedCallback=function(t,l,o){b.jmp((()=>{var c;const u=e.get(t),f=i(this);if(this.hasOwnProperty(u)&&(o=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==o)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&o!==l){const s=f.i,i=null==(c=n.q)?void 0:c[t];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=s[i]&&(128&e||1&r)&&s[i].call(s,o,l,t)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(o=null!==o&&"false"!==o);const d=Object.getOwnPropertyDescriptor(s,u);o==this[u]||d.get&&!d.set||(this[u]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=n.q)?o:{}),...r.filter((([t,n])=>31&n[0])).map((([t,l])=>{var o;const s=l[1]||t;return e.set(s,t),512&l[0]&&(null==(o=n.U)||o.push([t,s])),s}))]))}}return t},Zt=(t,n)=>{Jt(t,"connectedCallback",void 0,n)},tn=t=>{if(!(1&b.u)){const n=i(t);if(!n)return;const e=n.l,l=()=>{};if(1&n.u)sn(t,n,e.K),(null==n?void 0:n.i)?Zt(n.i,t):(null==n?void 0:n.X)&&n.X.then((()=>Zt(n.i,t)));else{let l;n.u|=1,l=t.getAttribute(d),l&&((t,n,e,l)=>{var o,s,r,c;const u=t.shadowRoot,f=[],a=[],h=J(n,null);h.N=t,!$.document||b.H&&b.H.size||nt($.document.body,b.H=new Map),t[d]=e,t.removeAttribute(d),l.V=tt(h,f,[],null,t,t,e,a);let p=0;const v=f.length;let m;for(;p<v;p++){m=f[p];const e=m.k+"."+m.C,l=b.H.get(e),s=m.N;if(u){if((null==(o=m.S)?void 0:(""+o).includes("-"))&&"slot-fb"!==m.S&&!m.N.shadowRoot){const t=i(m.N);if(t){const n=q(t.l),e=$.document.querySelector(`style[sty-id="${n}"]`);e&&null.unshift(e.cloneNode(!0))}}}else s["s-hn"]=pn(n).toUpperCase(),"slot"===m.S&&(s["s-cr"]=t["s-cr"]);"slot"===m.S&&(m.O=m.N["s-sn"]||m.N.name||null,m.m?(m.u|=2,m.N.childNodes.length||m.m.forEach((t=>{m.N.appendChild(t.N)}))):m.u|=1),l&&l.isConnected&&(l.parentElement.shadowRoot&&""===l["s-en"]&&l.parentNode.insertBefore(s,l.nextSibling),l.parentNode.removeChild(l),u||(s["s-oo"]=parseInt(m.C))),l&&!l["s-id"]&&b.H.delete(e)}const y=[],g=a.length;let w,j,O,S,N=0,k=0;for(;N<g;N++)if(w=a[N],w&&w.length)for(O=w.length,j=0;j<O;j++){if(S=w[j],y[S.hostId]||(y[S.hostId]=b.H.get(S.hostId)),!y[S.hostId])continue;const t=y[S.hostId];t.shadowRoot&&S.node.parentElement!==t&&t.insertBefore(S.node,null==(r=null==(s=w[j-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(S.slot["s-cr"]||(S.slot["s-cr"]=t["s-cr"],S.slot["s-cr"]=!S.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),A(S.node,S.slot,0,S.node["s-oo"]||k),(null==(c=S.node.parentElement)?void 0:c.shadowRoot)&&S.node.getAttribute&&S.node.getAttribute("slot")&&S.node.removeAttribute("slot")),k=(S.node["s-oo"]||k)+1}l.$hostElement$=t})(t,e.p,l,n),l||12&e.u&&nn(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){_t(n,n.A=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let l;if(!(32&n.u)){if(n.u|=32,e.Z){const o=((t,n)=>{const e=t.p.replace(/-/g,"_"),l=t.Z;if(!l)return;const o=f.get(l);return o?o[e]:import(`./${l}.entry.js`).then((t=>(f.set(l,t),t[e])),(t=>{u(t,n.$hostElement$)}))
6
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(o&&"then"in o){const t=()=>{};l=await o,t()}else l=o;if(!l)throw Error(`Constructor for "${e.p}#${n.tt}" was not found`);l.isProxied||(e.q=l.watchers,e.G=l.serializers,e.Y=l.deserializers,Xt(l,e,2),l.isProxied=!0);const s=()=>{};n.u|=8;try{new l(n)}catch(n){u(n,t)}n.u&=-9,n.u|=128,s(),4&e.u?n.F=!0:Zt(n.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const n=q(e);if(!a.has(n)){const l=()=>{};((t,n,e)=>{let l=a.get(t);g&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,a.set(t,l)})(n,t,!!(1&e.u)),l()}}}const o=n.A,s=()=>Vt(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(t,n,e)}l()}},nn=t=>{if(!$.document)return;const n=t["s-cr"]=$.document.createComment("");n["s-cn"]=!0,Pt(t,n,t.firstChild)},en=(t,n)=>{Jt(t,"disconnectedCallback",void 0,n||t)},ln=(t,n={})=>{var e;if(!$.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],o=n.exclude||[],s=$.customElements,r=$.document.head,c=r.querySelector("meta[charset]"),u=$.document.createElement("style"),f=[];let a,d=!0;Object.assign(b,n),b.h=new URL(n.resourcesUrl||"./",$.document.baseURI).href,b.u|=2;let h=!1;if(t.map((t=>{t[1].map((e=>{var r,c,u;const p={u:e[0],p:e[1],t:e[2],K:e[3]};4&p.u&&(h=!0),p.t=e[2],p.K=e[3],p.U=[],p.q=null!=(r=e[4])?r:{},p.G=null!=(c=e[5])?c:{},p.Y=null!=(u=e[6])?u:{};const v=n.transformTagName?n.transformTagName(p.p):pn(p.p),$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,n)=>{const e={u:0,$hostElement$:t,l:n,o:new Map,nt:new Map};e.J=new Promise((t=>e.W=t)),e.X=new Promise((t=>e.B=t)),t["s-p"]=[],t["s-rc"]=[],e.P=[];const l=e;t.__stencil__getHostRef=()=>l})(t=this,p)}connectedCallback(){const t=i(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,sn(this,t,p.K)),a&&(clearTimeout(a),a=null),d?f.push(this):b.jmp((()=>tn(this))))}disconnectedCallback(){b.jmp((()=>(async t=>{if(!(1&b.u)){const n=i(t);(null==n?void 0:n.et)&&(n.et.map((t=>t())),n.et=void 0),(null==n?void 0:n.i)?en(n.i,t):(null==n?void 0:n.X)&&n.X.then((()=>en(n.i,t)))}H.has(t)&&H.delete(t),t.shadowRoot&&H.has(t.shadowRoot)&&H.delete(t.shadowRoot)})(this))),b.raf((()=>{var t;const n=i(this);if(!n)return;const e=f.findIndex((t=>t===this));e>-1&&f.splice(e,1),(null==(t=null==n?void 0:n.V)?void 0:t.N)instanceof Node&&!n.V.N.isConnected&&delete n.V.N}))}componentOnReady(){var t;return null==(t=i(this))?void 0:t.X}};!(1&p.u)&&256&p.u?(_($.prototype),P($.prototype)):P($.prototype),p.Z=t[0],o.includes(v)||s.get(v)||(l.push(v),s.define(v,Xt($,p,1)))}))})),l.length>0&&(h&&(u.textContent+=p),u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=b._)?e:z($.document);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):b.jmp((()=>a=setTimeout(Gt,30)))},on=(t,n)=>n,sn=(t,n,e)=>{e&&$.document&&e.map((([e,l,o])=>{const s=cn($.document,t,e),i=rn(n,o),r=un(e);b.ael(s,l,i,r),(n.et=n.et||[]).push((()=>b.rel(s,l,i,r)))}))},rn=(t,n)=>e=>{var l;try{256&t.u?null==(l=t.i)||l[n](e):(t.D=t.D||[]).push([n,e])}catch(n){u(n,t.$hostElement$)}},cn=(t,n,e)=>8&e?$:n,un=t=>({passive:!!(1&t),capture:!!(2&t)}),fn=class{};function an(...t){return t.reduceRight(((t,n)=>n(t)),fn)}var dn=t=>b._=t,hn=void 0;function pn(t){return hn?hn(t):t}function vn(t){hn&&console.warn("\n A tagTransformer has already been set. \n Overwriting it may lead to error and unexpected results if your components have already been defined.\n "),hn=t}export{on as F,m as H,an as M,K as a,ln as b,at as c,vn as d,Yt as f,ft as g,G as h,y as p,r,dn as s,pn as t}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t,r as n,g as o,h as e,a as i}from"./p-DWsprozV.js";import{awaitTopbar as a}from"./index.esm.js";const s=class{constructor(t){n(this,t)}get hostElement(){return o(this)}readOnlyModeText="";tooltipOpen=!1;tooltipEl;tooltipDx;icon;leftIcon=!1;iconOnly=!1;small=!1;language=null;setReadOnlyModeText(){this.readOnlyModeText={en:"You cannot complete this action while in read only mode",sv:"Du kan inte utföra denna handling i skrivskyddat läge",da:"Du kan ikke gennemføre denne handling i skrivebeskyttet tilstand",fi:"Et voi suorittaa tätä toimintoa vain luku -tilassa",no:"Du kan ikke utføre denne handlingen i skrivebeskyttet modus"}[this.language]}async componentWillLoad(){this.setReadOnlyModeText(),this.language||await a(this.hostElement)}componentDidLoad(){this.initTooltip()}openHandler(){this.tooltipOpen?this.checkTooltipPosition():this.setTooltipOffset()}initTooltip(){this.tooltipEl=this.hostElement.querySelector(".button-tooltip");const t=this.hostElement,n=["mouseenter","focus"],o=["mouseleave","blur"];[...n,...o].forEach((e=>{t.addEventListener(e,(t=>{n.includes(t.type)?this.tooltipOpen=!0:o.includes(t.type)&&(this.tooltipOpen=!1)}))}))}setTooltipOffset(){this.tooltipEl.style.transform=`translateX(-50%) translateX(${this.tooltipDx}px)`}checkTooltipPosition(){this.tooltipEl.style.transform="translateX(-50%)",requestAnimationFrame((()=>{const{x:t,right:n}=this.tooltipEl.getBoundingClientRect();this.tooltipDx="0",this.tooltipEl.style.transform="",t<0&&(this.tooltipDx=""+(-1*t+8)),n>window.innerWidth&&(this.tooltipDx=""+(window.innerWidth-n-8)),requestAnimationFrame((()=>{this.setTooltipOffset()}))}))}getClassNames(){let t="pn-button ";return this.small&&(t+="pn-button-small "),this.leftIcon&&(t+="pn-button-left-icon "),this.iconOnly&&(t+="icon-only "),t}render(){return e(i,{key:"050c438370b6d5c86e327be03d206880f2f572e5",class:"pn-read-only-button"},e("button",{key:"a6cd36bc8f112d3ff7cb6ea65768339dd789813c",class:this.getClassNames(),"data-tooltip-open":this.tooltipOpen,disabled:!0},!this.iconOnly&&e("slot",{key:"94979edec979712e7ecc1f683dcf2f32a7889f48"}),this.icon&&e("pn-icon",{key:"14012e9a320767c993fab05c614c659f188783e3",icon:this.icon,color:"gray700"}),this.iconOnly&&e("span",{key:"4f75372bf50ec504504ecbd808d3bf1e746c1418",class:"read-only-icon-only"},e("slot",{key:"a12bca58ae471729cbb2442b1791bb4ee16c7db5"})),e("div",{key:"3ec03d46dc7c44229112a90b0df8ea4737a09e79",class:"button-tooltip"},this.readOnlyModeText)))}static get watchers(){return{language:[{setReadOnlyModeText:0}],tooltipOpen:[{openHandler:0}]}}};s.style=`${t("pn-read-only-button")}{display:inline-block}${t("pn-read-only-button")} button{cursor:not-allowed;color:#5e554a;background:#f3f2f2;padding:0.75em 1.2em;width:100%;border:none;border-radius:3em;outline:none;position:relative;font-size:1em;min-height:3em;min-width:5.5em;font-weight:500;display:flex;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent}${t("pn-read-only-button")} button ${t("pn-icon")}{flex-shrink:0;margin:0 0 0 0.5em}${t("pn-read-only-button")} button .button-tooltip{position:absolute;bottom:calc(100% + 0.35em);left:50%;background:#a70707;color:#ffffff;padding:0.25em 0.75em;font-size:0.875em;font-weight:300;border-radius:1em;box-shadow:0 1.2px 3.6px rgba(0, 0, 0, 0.1), 0 6.4px 14.4px rgba(0, 0, 0, 0.13);z-index:5;max-width:min(95vw, 40em);transform:translateX(-50%);width:max-content;pointer-events:none;opacity:0;transition-property:opacity;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-read-only-button")} button .button-tooltip{transition-duration:0s;transition-delay:0s}}${t("pn-read-only-button")} button[data-tooltip-open] .button-tooltip{opacity:1}${t("pn-read-only-button")} button.pn-button-left-icon{flex-direction:row-reverse}${t("pn-read-only-button")} button.pn-button-left-icon ${t("pn-icon")}{margin:0 0.5em 0 0}${t("pn-read-only-button")} button.icon-only{width:3em;min-width:0}${t("pn-read-only-button")} button.icon-only ${t("pn-icon")}{margin:0}${t("pn-read-only-button")} button.icon-only.pn-button-small{width:2.286em;min-width:0;padding:0}${t("pn-read-only-button")} button.icon-only span.read-only-icon-only{display:none}${t("pn-read-only-button")} button.pn-button-small{font-size:0.875em;padding:0.5em 1em;font-weight:normal;min-height:2.286em;min-width:none}${t("pn-read-only-button")} button.pn-button-small ${t("pn-icon")} .pn-icon-svg{height:1.28em;width:1.28em}`;export{s as pn_read_only_button}
5
+ import{t,r as n,g as o,h as e,a as i}from"./p-CAEP792y.js";import{awaitTopbar as a}from"./index.esm.js";const s=class{constructor(t){n(this,t)}get hostElement(){return o(this)}readOnlyModeText="";tooltipOpen=!1;tooltipEl;tooltipDx;icon;leftIcon=!1;iconOnly=!1;small=!1;language=null;setReadOnlyModeText(){this.readOnlyModeText={en:"You cannot complete this action while in read only mode",sv:"Du kan inte utföra denna handling i skrivskyddat läge",da:"Du kan ikke gennemføre denne handling i skrivebeskyttet tilstand",fi:"Et voi suorittaa tätä toimintoa vain luku -tilassa",no:"Du kan ikke utføre denne handlingen i skrivebeskyttet modus"}[this.language]}async componentWillLoad(){this.setReadOnlyModeText(),this.language||await a(this.hostElement)}componentDidLoad(){this.initTooltip()}openHandler(){this.tooltipOpen?this.checkTooltipPosition():this.setTooltipOffset()}initTooltip(){this.tooltipEl=this.hostElement.querySelector(".button-tooltip");const t=this.hostElement,n=["mouseenter","focus"],o=["mouseleave","blur"];[...n,...o].forEach((e=>{t.addEventListener(e,(t=>{n.includes(t.type)?this.tooltipOpen=!0:o.includes(t.type)&&(this.tooltipOpen=!1)}))}))}setTooltipOffset(){this.tooltipEl.style.transform=`translateX(-50%) translateX(${this.tooltipDx}px)`}checkTooltipPosition(){this.tooltipEl.style.transform="translateX(-50%)",requestAnimationFrame((()=>{const{x:t,right:n}=this.tooltipEl.getBoundingClientRect();this.tooltipDx="0",this.tooltipEl.style.transform="",t<0&&(this.tooltipDx=""+(-1*t+8)),n>window.innerWidth&&(this.tooltipDx=""+(window.innerWidth-n-8)),requestAnimationFrame((()=>{this.setTooltipOffset()}))}))}getClassNames(){let t="pn-button ";return this.small&&(t+="pn-button-small "),this.leftIcon&&(t+="pn-button-left-icon "),this.iconOnly&&(t+="icon-only "),t}render(){return e(i,{key:"050c438370b6d5c86e327be03d206880f2f572e5",class:"pn-read-only-button"},e("button",{key:"a6cd36bc8f112d3ff7cb6ea65768339dd789813c",class:this.getClassNames(),"data-tooltip-open":this.tooltipOpen,disabled:!0},!this.iconOnly&&e("slot",{key:"94979edec979712e7ecc1f683dcf2f32a7889f48"}),this.icon&&e("pn-icon",{key:"14012e9a320767c993fab05c614c659f188783e3",icon:this.icon,color:"gray700"}),this.iconOnly&&e("span",{key:"4f75372bf50ec504504ecbd808d3bf1e746c1418",class:"read-only-icon-only"},e("slot",{key:"a12bca58ae471729cbb2442b1791bb4ee16c7db5"})),e("div",{key:"3ec03d46dc7c44229112a90b0df8ea4737a09e79",class:"button-tooltip"},this.readOnlyModeText)))}static get watchers(){return{language:[{setReadOnlyModeText:0}],tooltipOpen:[{openHandler:0}]}}};s.style=`${t("pn-read-only-button")}{display:inline-block}${t("pn-read-only-button")} button{cursor:not-allowed;color:#5e554a;background:#f3f2f2;padding:0.75em 1.2em;width:100%;border:none;border-radius:3em;outline:none;position:relative;font-size:1em;min-height:3em;min-width:5.5em;font-weight:500;display:flex;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent}${t("pn-read-only-button")} button ${t("pn-icon")}{flex-shrink:0;margin:0 0 0 0.5em}${t("pn-read-only-button")} button .button-tooltip{position:absolute;bottom:calc(100% + 0.35em);left:50%;background:#a70707;color:#ffffff;padding:0.25em 0.75em;font-size:0.875em;font-weight:300;border-radius:1em;box-shadow:0 1.2px 3.6px rgba(0, 0, 0, 0.1), 0 6.4px 14.4px rgba(0, 0, 0, 0.13);z-index:5;max-width:min(95vw, 40em);transform:translateX(-50%);width:max-content;pointer-events:none;opacity:0;transition-property:opacity;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${t("pn-read-only-button")} button .button-tooltip{transition-duration:0s;transition-delay:0s}}${t("pn-read-only-button")} button[data-tooltip-open] .button-tooltip{opacity:1}${t("pn-read-only-button")} button.pn-button-left-icon{flex-direction:row-reverse}${t("pn-read-only-button")} button.pn-button-left-icon ${t("pn-icon")}{margin:0 0.5em 0 0}${t("pn-read-only-button")} button.icon-only{width:3em;min-width:0}${t("pn-read-only-button")} button.icon-only ${t("pn-icon")}{margin:0}${t("pn-read-only-button")} button.icon-only.pn-button-small{width:2.286em;min-width:0;padding:0}${t("pn-read-only-button")} button.icon-only span.read-only-icon-only{display:none}${t("pn-read-only-button")} button.pn-button-small{font-size:0.875em;padding:0.5em 1em;font-weight:normal;min-height:2.286em;min-width:none}${t("pn-read-only-button")} button.pn-button-small ${t("pn-icon")} .pn-icon-svg{height:1.28em;width:1.28em}`;export{s as pn_read_only_button}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * By PostNord.
4
+ */
5
+ import{t as e,r as t,g as n,f as l,h as s,a as o}from"./p-CAEP792y.js";import{a as c}from"./p-B88w-Zxn.js";import{c as a}from"./p-DrYFvs2M.js";import{uuidv4 as i}from"./index.esm.js";const r=class{constructor(e){t(this,e)}id=`pn-select-${i()}`;idHelpertext=`${this.id}-text`;select;mo;get hostElement(){return n(this)}label;helpertext;selectId=this.id;icon;compact=!1;name;form;autocomplete;required=!1;disabled=!1;invalid=!1;error;componentDidLoad(){this.mo&&this.mo.disconnect(),this.mo=new MutationObserver((()=>l(this.hostElement))),this.mo.observe(this.hostElement,{childList:!0,subtree:!0})}hasError(){return this.invalid||!!this.error}hasMessage(){return!!this.helpertext||!!this.error}renderLabel(){return this.label?s("label",{htmlFor:this.selectId,class:"pn-select-label","data-compact":this.compact,"data-icon":!!this.icon},s("span",null,this.label)):null}render(){return s(o,{key:"59c8dba79bf97e55cdf0bb63242bab619729e182"},s("div",{key:"08ee599ef117480e98506e6594bb798931dade58",class:"pn-select","data-error":this.hasError()},!this.compact&&this.renderLabel(),s("div",{key:"4416853996ab6849ef128f3abd7d53861e3d6bbe",class:"pn-select-input"},this.icon&&s("pn-icon",{key:"8af79d8f23f6e7b9853130ca77d2ac00f264afe7",class:"pn-select-icon",icon:this.icon,"data-custom":!0,"aria-hidden":"true"}),this.hasError()&&s("pn-icon",{key:"ad674903cc8cefb0864b425a4f6bd6540b5164f3",class:"pn-select-icon",icon:c,color:"warning","data-error":!0,"aria-hidden":"true"}),s("select",{key:"fc84d7571dc544030770dd8ea88c87e3a1d58bc5",id:this.selectId,class:"pn-select-element",name:this.name,form:this.form,autocomplete:this.autocomplete,"aria-describedby":this.hasMessage()&&this.idHelpertext,"aria-invalid":this.hasError().toString(),disabled:this.disabled,"data-placeholder":""===this.select?.value,"data-compact":this.compact,ref:e=>this.select=e},s("slot",{key:"1cca39bd8954649b1a558876d31509c3be0f4763"})),this.compact&&this.renderLabel(),s("pn-icon",{key:"a5efd954143ce705d806a1a7a1b37b09714d1657",class:"pn-select-icon",icon:a,color:"blue700","data-default":!0,"aria-hidden":"true"})),this.hasMessage()&&s("p",{key:"54e7855163fc3c91cb2bdac99aaa7ed9bfd14fc9",id:this.idHelpertext,class:"pn-select-helper",role:this.error?"alert":null},s("span",{key:"21397e124292c51dfe3113b526626059dc9b513d"},this.error||this.helpertext))))}};r.style=`${e("pn-select")}{display:inline-block}${e("pn-select")} .pn-select-label{cursor:pointer;display:flex;justify-content:space-between;align-items:flex-end;font-weight:400;color:#2d2013;margin:0 0 0.25em 0;gap:0.5em;-webkit-tap-highlight-color:transparent;transition-property:color, transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-select")} .pn-select-label{transition-duration:0s;transition-delay:0s}}${e("pn-select")} .pn-select-label[data-compact]{position:absolute;top:1.5625em;left:calc(var(--pn-input-offset-left, 0px) + 0.75em + 0.0625em);margin:0;pointer-events:none;align-items:center;height:1.5em;max-width:calc(100% - (var(--pn-input-offset-left, 0px) + 0.75em) - (var(--pn-input-offset-right, 0px) + 0.75em));transform:translateY(-50%) scale(1) translateZ(0);transform-origin:0 0;transition-delay:0.2s}${e("pn-select")} .pn-select-label[data-compact]>span{font-size:1em;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;line-height:1.5em}${e("pn-select")} .pn-select-label>span{font-size:0.875em}${e("pn-select")} .pn-select-label[data-compact][data-icon]{--pn-input-offset-left:calc(2em)}${e("pn-select")} .pn-select-input{position:relative}${e("pn-select")} .pn-select-icon{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);width:1.5em;height:1.5em;border-radius:50%;background-color:transparent}${e("pn-select")} .pn-select-icon[data-default]{right:1em}${e("pn-select")} .pn-select-icon[data-custom]{left:0.75em}${e("pn-select")} .pn-select-icon[data-custom]~.pn-select-element{padding-left:2.75em}${e("pn-select")} .pn-select-icon[data-error]{right:3.5em}${e("pn-select")} .pn-select-icon[data-error]~.pn-select-element{padding-right:5.5em}${e("pn-select")} .pn-select-icon>.pn-icon-svg{transition-property:transform;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-select")} .pn-select-icon>.pn-icon-svg{transition-duration:0s;transition-delay:0s}}${e("pn-select")} .pn-select-element{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;text-overflow:ellipsis;white-space:nowrap;color:#2d2013;background-color:#ffffff;border:0.0625em solid #969087;border-radius:0.5em;padding:0.75em 3em 0.75em 0.75em;font-family:inherit;font-size:1em;font-weight:500;line-height:1.5em;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}${e("pn-select")} .pn-select-element:-webkit-autofill,${e("pn-select")} .pn-select-element:-webkit-autofill:hover,${e("pn-select")} .pn-select-element:-webkit-autofill:focus,${e("pn-select")} .pn-select-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #e0f8ff inset;-webkit-text-fill-color:#2d2013}${e("pn-select")} .pn-select-element{outline:0.2rem solid transparent;outline-offset:0.2rem}${e("pn-select")} .pn-select-element:focus-visible{outline-color:#005d92;background-color:#ffffff;border-color:#005d92}${e("pn-select")} .pn-select-element{transition-property:outline-color, background-color, border-color, color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.7, 0, 0.3, 1)}@media (prefers-reduced-motion: reduce){${e("pn-select")} .pn-select-element{transition-duration:0s;transition-delay:0s}}${e("pn-select")} .pn-select-element[data-compact]{text-align:left;padding-top:1.125em;padding-bottom:0.375em;max-width:unset}${e("pn-select")} .pn-select-element[data-compact]::placeholder{color:transparent}${e("pn-select")} .pn-select-element[data-compact]:focus+.pn-select-label,${e("pn-select")} .pn-select-element[data-compact]:not(:placeholder-shown)+.pn-select-label{transform:translateY(-85%) scale(0.75);transition-delay:0s}${e("pn-select")} .pn-select-element::placeholder{color:#5e554a;font-weight:normal}${e("pn-select")} .pn-select-element:hover{border-color:#005d92}${e("pn-select")} .pn-select-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${e("pn-select")} .pn-select-element:open~.pn-select-icon .pn-icon-svg{transform:rotate(180deg)}${e("pn-select")} .pn-select-element:disabled{color:#5e554a;background-color:#f3f2f2;border-color:#f3f2f2}${e("pn-select")} .pn-select-element[data-placeholder]{color:#5e554a;font-weight:normal}${e("pn-select")} .pn-select-element:hover{color:#2d2013;background-color:#effbff}${e("pn-select")} .pn-select-no-results{margin:0;padding:0.75em}${e("pn-select")} .pn-select-helper{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}${e("pn-select")} .pn-select-helper[role=alert]{color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-label{color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element{border-color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:hover{border-color:#500715}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:focus-visible{background-color:#ffffff;border-color:#a70707;outline-color:#a70707}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:-webkit-autofill,${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:-webkit-autofill:hover,${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:-webkit-autofill:focus,${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:-webkit-autofill:active{-webkit-box-shadow:0 0 0 10em #fef7f6 inset;-webkit-text-fill-color:#2d2013}${e("pn-select")} .pn-select[data-error]>.pn-select-input>.pn-select-element:hover{background-color:#fdefee}`;export{r as pn_select}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import{t as e,r as t,c as n,g as s,h as a,a as i}from"./p-DWsprozV.js";import{uuidv4 as r}from"./index.esm.js";const o=class{constructor(e){t(this,e),this.segmentHover=n(this,"segmentHover")}id=`pn-segment-${r()}`;get hostElement(){return s(this)}label;name;value;selected=!1;segmentid=this.id;icon;disabled=!1;segmentHover;handleHover(e){this.segmentHover.emit(e)}render(){return a(i,{key:"ac169c10456f5cadd62bdebbe97f416f81a7633b",onMouseEnter:e=>this.handleHover(e)},a("input",{key:"b58b8ba98292e44516f23a8f78da408ab4ed6eed",class:"pn-segment",id:this.segmentid,name:this.name,checked:this.selected,type:"radio",value:this.value,disabled:this.disabled}),a("label",{key:"60bdaff95de6dabd3fbc435c1f2ed6e732866057",htmlFor:this.segmentid,class:"pn-segment-label"},this.icon&&a("pn-icon",{key:"aba84b5c75e1245a92f37f89e9bfd79c7406092e",icon:this.icon,color:"blue700"}),a("span",{key:"a8bb1c78d27c62ebd1ba11a60721781cfb1ecfeb",class:"pn-segment-text"},this.label,a("slot",{key:"2bc3e624fa41960578f685b785b457c2953b562c"}))))}};o.style=`${e("pn-segment")}{position:relative;color:#005d92;margin-right:0.5em;z-index:2;white-space:nowrap;scroll-snap-align:center;outline:none;-webkit-tap-highlight-color:transparent;transform:translateZ(0)}${e("pn-segment")}:last-of-type{margin-right:0}${e("pn-segment")} .pn-segment{cursor:pointer;margin:0;padding:0;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-tap-highlight-color:transparent}${e("pn-segment")} .pn-segment:disabled{cursor:not-allowed}${e("pn-segment")} .pn-segment:disabled~.pn-segment-label{color:#5e554a}${e("pn-segment")} .pn-segment:disabled~.pn-segment-label ${e("pn-icon")} .pn-icon-svg path{fill:#5e554a}${e("pn-segment")} .pn-segment-label{height:100%;width:100%;padding:0.5em;border-radius:3em;font-weight:500;border:0.0625em solid transparent;display:inline-flex;gap:0.5em;align-items:center;-webkit-tap-highlight-color:transparent}`;export{o as pn_segment}
5
+ import{t as e,r as t,c as n,g as s,h as a,a as i}from"./p-CAEP792y.js";import{uuidv4 as r}from"./index.esm.js";const l=class{constructor(e){t(this,e),this.segmentHover=n(this,"segmentHover")}id=`pn-segment-${r()}`;get hostElement(){return s(this)}label;name;value;selected=!1;segmentid=this.id;icon;disabled=!1;segmentHover;handleHover(e){this.segmentHover.emit(e)}render(){return a(i,{key:"b98bb414de20d14fc2ee9d087be192d5f17bf1f9",onMouseEnter:e=>this.handleHover(e)},a("input",{key:"0b6117d85bb547c249a402cc26494355f3dc3e95",class:"pn-segment",id:this.segmentid,name:this.name,checked:this.selected,type:"radio",value:this.value,disabled:this.disabled}),a("label",{key:"8570c7c62ccfcfdd5dca9d8e1a6e016ca9c6a304",htmlFor:this.segmentid,class:"pn-segment-label"},this.icon&&a("pn-icon",{key:"e10a1ea4ca26f71e6caadbeeda6bf5d68cfc266f",icon:this.icon,color:"blue700"}),a("span",{key:"8ec12157e0ca6f62772743e06beefc677f9f9f87",class:"pn-segment-text"},this.label,a("slot",{key:"6342dfb17f71cae05318a3c19a19fdb6e46bb157"}))))}};l.style=`${e("pn-segment")}{position:relative;color:#005d92;margin-right:0.5em;z-index:2;white-space:nowrap;scroll-snap-align:center;outline:none;-webkit-tap-highlight-color:transparent;transform:translateZ(0)}${e("pn-segment")}:last-of-type{margin-right:0}${e("pn-segment")} .pn-segment{cursor:pointer;margin:0;padding:0;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-tap-highlight-color:transparent}${e("pn-segment")} .pn-segment:disabled{cursor:not-allowed}${e("pn-segment")} .pn-segment:disabled~.pn-segment-label{color:#5e554a}${e("pn-segment")} .pn-segment:disabled~.pn-segment-label ${e("pn-icon")} .pn-icon-svg path{fill:#5e554a}${e("pn-segment")} .pn-segment-label{height:100%;width:100%;padding:0.5em;border-radius:3em;font-weight:500;border:0.0625em solid transparent;display:inline-flex;gap:0.5em;align-items:center;-webkit-tap-highlight-color:transparent}`;export{l as pn_segment}