@postnord/pn-marketweb-components 3.5.2 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/cjs/alert_exclamation_circle-24f29a5b.js +8 -0
  2. package/cjs/alert_exclamation_circle-24f29a5b.js.map +1 -0
  3. package/cjs/loader.cjs.js +1 -1
  4. package/cjs/pn-address-autofill.cjs.entry.js +47 -72
  5. package/cjs/pn-address-autofill.cjs.entry.js.map +1 -1
  6. package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +18 -6
  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/cjs/pn-marketweb-input.cjs.entry.js +2 -4
  10. package/cjs/pn-marketweb-input.cjs.entry.js.map +1 -1
  11. package/collection/components/input/pn-address-autofill/pn-address-autofill.css +6 -1
  12. package/collection/components/input/pn-address-autofill/pn-address-autofill.js +58 -68
  13. package/collection/components/input/pn-address-autofill/pn-address-autofill.js.map +1 -1
  14. package/collection/components/input/pn-address-autofill/pn-address-autofill.stories.js +2 -1
  15. package/collection/components/input/pn-address-autofill/translations.js +6 -3
  16. package/collection/components/input/pn-address-autofill/translations.js.map +1 -1
  17. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +18 -6
  18. package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
  19. package/components/alert_exclamation_circle.js +6 -0
  20. package/components/alert_exclamation_circle.js.map +1 -0
  21. package/components/pn-address-autofill.js +48 -72
  22. package/components/pn-address-autofill.js.map +1 -1
  23. package/components/pn-dropdown-choice-adds-row.js +18 -6
  24. package/components/pn-dropdown-choice-adds-row.js.map +1 -1
  25. package/components/pn-marketweb-input2.js +1 -3
  26. package/components/pn-marketweb-input2.js.map +1 -1
  27. package/esm/alert_exclamation_circle-f0fe7c7b.js +6 -0
  28. package/esm/alert_exclamation_circle-f0fe7c7b.js.map +1 -0
  29. package/esm/loader.js +1 -1
  30. package/esm/pn-address-autofill.entry.js +47 -72
  31. package/esm/pn-address-autofill.entry.js.map +1 -1
  32. package/esm/pn-dropdown-choice-adds-row.entry.js +18 -6
  33. package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
  34. package/esm/pn-market-web-components.js +1 -1
  35. package/esm/pn-marketweb-input.entry.js +1 -3
  36. package/esm/pn-marketweb-input.entry.js.map +1 -1
  37. package/package.json +1 -1
  38. package/pn-market-web-components/p-0ac30ee9.entry.js +2 -0
  39. package/pn-market-web-components/p-0ac30ee9.entry.js.map +1 -0
  40. package/pn-market-web-components/p-15d70aaf.entry.js +2 -0
  41. package/pn-market-web-components/p-15d70aaf.entry.js.map +1 -0
  42. package/pn-market-web-components/p-76c2c01f.js +2 -0
  43. package/pn-market-web-components/p-76c2c01f.js.map +1 -0
  44. package/pn-market-web-components/p-a11fdf9f.entry.js +2 -0
  45. package/pn-market-web-components/p-a11fdf9f.entry.js.map +1 -0
  46. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  47. package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
  48. package/types/components/input/pn-address-autofill/pn-address-autofill.d.ts +2 -3
  49. package/types/components/input/pn-address-autofill/translations.d.ts +3 -0
  50. package/types/components.d.ts +2 -0
  51. package/umd/modules/@postnord/web-components/cjs/{angle_down-0b63ebde.js → chevron_down-83e72319.js} +3 -3
  52. package/umd/modules/@postnord/web-components/cjs/chevron_down-83e72319.js.map +1 -0
  53. package/umd/modules/@postnord/web-components/cjs/{angle_right-c8c55b43.js → chevron_right-aeb6aef3.js} +5 -5
  54. package/umd/modules/@postnord/web-components/cjs/chevron_right-aeb6aef3.js.map +1 -0
  55. package/umd/modules/@postnord/web-components/cjs/loader.cjs.js +1 -1
  56. package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js +2 -2
  57. package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js.map +1 -1
  58. package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js +42 -12
  59. package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js.map +1 -1
  60. package/umd/modules/@postnord/web-components/cjs/pn-button_2.cjs.entry.js +1 -1
  61. package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +1 -1
  62. package/umd/modules/@postnord/web-components/cjs/pn-checkbox.cjs.entry.js +1 -1
  63. package/umd/modules/@postnord/web-components/cjs/pn-choice-chip.cjs.entry.js +1 -1
  64. package/umd/modules/@postnord/web-components/cjs/pn-counter.cjs.entry.js +1 -1
  65. package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js +22 -6
  66. package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js.map +1 -1
  67. package/umd/modules/@postnord/web-components/cjs/pn-fieldset.cjs.entry.js +1 -1
  68. package/umd/modules/@postnord/web-components/cjs/pn-file-upload.cjs.entry.js +1 -1
  69. package/umd/modules/@postnord/web-components/cjs/pn-footer.cjs.entry.js +1 -1
  70. package/umd/modules/@postnord/web-components/cjs/pn-header.cjs.entry.js +1 -1
  71. package/umd/modules/@postnord/web-components/cjs/pn-input.cjs.entry.js +2 -2
  72. package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js +21 -7
  73. package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js.map +1 -1
  74. package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +2 -2
  75. package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js.map +1 -1
  76. package/umd/modules/@postnord/web-components/cjs/pn-ocr-search.cjs.entry.js +1 -1
  77. package/umd/modules/@postnord/web-components/cjs/pn-page-nav-dropdown-item.cjs.entry.js +1 -1
  78. package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +1 -1
  79. package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +2 -2
  80. package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js.map +1 -1
  81. package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +1 -1
  82. package/umd/modules/@postnord/web-components/cjs/pn-progress-bar.cjs.entry.js +1 -1
  83. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js +1 -1
  84. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js.map +1 -1
  85. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js +1 -1
  86. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js.map +1 -1
  87. package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js +26 -41
  88. package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js.map +1 -1
  89. package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +1 -1
  90. package/umd/modules/@postnord/web-components/cjs/pn-search-field.cjs.entry.js +1 -1
  91. package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +1 -1
  92. package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +1 -1
  93. package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +2 -2
  94. package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js.map +1 -1
  95. package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +1 -1
  96. package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js +2 -2
  97. package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js.map +1 -1
  98. package/umd/modules/@postnord/web-components/cjs/pn-text-link.cjs.entry.js +1 -1
  99. package/umd/modules/@postnord/web-components/cjs/pn-textarea.cjs.entry.js +1 -1
  100. package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +1 -1
  101. package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js +25 -16
  102. package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js.map +1 -1
  103. package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +1 -1
  104. package/umd/modules/@postnord/web-components/cjs/pn-tooltip.cjs.entry.js +1 -1
  105. package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +1 -1
  106. package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +1 -1
  107. package/umd/modules/@postnord/web-components/collection/components/buttons/pn-action-menu/pn-action-menu.js +41 -11
  108. package/umd/modules/@postnord/web-components/collection/components/buttons/pn-action-menu/pn-action-menu.js.map +1 -1
  109. package/umd/modules/@postnord/web-components/collection/components/content/pn-accordion/row/pn-accordion-row.js +2 -2
  110. package/umd/modules/@postnord/web-components/collection/components/content/pn-accordion/row/pn-accordion-row.js.map +1 -1
  111. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.css +92 -40
  112. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.js +35 -9
  113. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.js.map +1 -1
  114. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-bar/pn-progress-bar.js +1 -1
  115. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.js +5 -1
  116. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.js.map +1 -1
  117. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator.js +5 -1
  118. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator.js.map +1 -1
  119. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.css +85 -9
  120. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.js +100 -97
  121. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.js.map +1 -1
  122. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-spinner/pn-spinner.js +1 -1
  123. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-toast/pn-toast.css +0 -1
  124. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-toast/pn-toast.js +24 -15
  125. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-toast/pn-toast.js.map +1 -1
  126. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-tooltip/pn-tooltip.js +1 -1
  127. package/umd/modules/@postnord/web-components/collection/components/input/pn-checkbox/pn-checkbox.js +1 -1
  128. package/umd/modules/@postnord/web-components/collection/components/input/pn-choice-chip/pn-choice-chip.js +1 -1
  129. package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.js +1 -1
  130. package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.css +2 -3
  131. package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js +22 -6
  132. package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js.map +1 -1
  133. package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.js +1 -1
  134. package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.js +1 -1
  135. package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js +2 -2
  136. package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +2 -2
  137. package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js.map +1 -1
  138. package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.js +1 -1
  139. package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.js +1 -1
  140. package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.js +1 -1
  141. package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/segment/pn-segment.js +1 -1
  142. package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +2 -2
  143. package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js.map +1 -1
  144. package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +1 -1
  145. package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.js +1 -1
  146. package/umd/modules/@postnord/web-components/collection/components/layout/pn-header/pn-header.js +1 -1
  147. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-card/pn-card.js +1 -1
  148. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-footer/pn-footer.js +1 -1
  149. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/dropdown-item/pn-page-nav-dropdown-item.js +1 -1
  150. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/item/pn-page-nav-item.js +1 -1
  151. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js +2 -2
  152. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js.map +1 -1
  153. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-pagination/pn-pagination.js +1 -1
  154. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js +2 -2
  155. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js.map +1 -1
  156. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.js +1 -1
  157. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-text-link/pn-text-link.js +1 -1
  158. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tile/pn-tile.js +1 -1
  159. package/umd/modules/@postnord/web-components/collection/components/web-components/pn-ocr-search/pn-ocr-search.js +1 -1
  160. package/umd/modules/@postnord/web-components/collection/components/web-components/pn-zipcode-search/pn-zipcode-search.js +1 -1
  161. package/umd/modules/@postnord/web-components/collection/globals/types.js.map +1 -1
  162. package/umd/modules/@postnord/web-components/components/{angle_down.js → chevron_down.js} +3 -3
  163. package/umd/modules/@postnord/web-components/components/chevron_down.js.map +1 -0
  164. package/umd/modules/@postnord/web-components/{esm/angle_right-b52095c9.js → components/chevron_right.js} +4 -4
  165. package/umd/modules/@postnord/web-components/components/chevron_right.js.map +1 -0
  166. package/umd/modules/@postnord/web-components/components/pn-accordion-row.js +2 -2
  167. package/umd/modules/@postnord/web-components/components/pn-accordion-row.js.map +1 -1
  168. package/umd/modules/@postnord/web-components/components/pn-action-menu.js +42 -12
  169. package/umd/modules/@postnord/web-components/components/pn-action-menu.js.map +1 -1
  170. package/umd/modules/@postnord/web-components/components/pn-card.js +1 -1
  171. package/umd/modules/@postnord/web-components/components/pn-checkbox.js +1 -1
  172. package/umd/modules/@postnord/web-components/components/pn-choice-chip.js +1 -1
  173. package/umd/modules/@postnord/web-components/components/pn-counter.js +1 -1
  174. package/umd/modules/@postnord/web-components/components/pn-date-picker.js +23 -7
  175. package/umd/modules/@postnord/web-components/components/pn-date-picker.js.map +1 -1
  176. package/umd/modules/@postnord/web-components/components/pn-fieldset.js +1 -1
  177. package/umd/modules/@postnord/web-components/components/pn-file-upload.js +1 -1
  178. package/umd/modules/@postnord/web-components/components/pn-footer.js +1 -1
  179. package/umd/modules/@postnord/web-components/components/pn-header.js +1 -1
  180. package/umd/modules/@postnord/web-components/components/pn-input.js +2 -2
  181. package/umd/modules/@postnord/web-components/components/pn-modal.js +25 -10
  182. package/umd/modules/@postnord/web-components/components/pn-modal.js.map +1 -1
  183. package/umd/modules/@postnord/web-components/components/pn-multiselect.js +2 -2
  184. package/umd/modules/@postnord/web-components/components/pn-multiselect.js.map +1 -1
  185. package/umd/modules/@postnord/web-components/components/pn-ocr-search.js +1 -1
  186. package/umd/modules/@postnord/web-components/components/pn-page-nav-dropdown-item.js +1 -1
  187. package/umd/modules/@postnord/web-components/components/pn-page-nav-item.js +1 -1
  188. package/umd/modules/@postnord/web-components/components/pn-page-nav.js +2 -2
  189. package/umd/modules/@postnord/web-components/components/pn-page-nav.js.map +1 -1
  190. package/umd/modules/@postnord/web-components/components/pn-pagination.js +1 -1
  191. package/umd/modules/@postnord/web-components/components/pn-progress-bar2.js +1 -1
  192. package/umd/modules/@postnord/web-components/components/pn-progress-indicator-step.js +1 -1
  193. package/umd/modules/@postnord/web-components/components/pn-progress-indicator-step.js.map +1 -1
  194. package/umd/modules/@postnord/web-components/components/pn-progress-indicator.js +1 -1
  195. package/umd/modules/@postnord/web-components/components/pn-progress-indicator.js.map +1 -1
  196. package/umd/modules/@postnord/web-components/components/pn-progress-stepper.js +34 -48
  197. package/umd/modules/@postnord/web-components/components/pn-progress-stepper.js.map +1 -1
  198. package/umd/modules/@postnord/web-components/components/pn-radio-button.js +1 -1
  199. package/umd/modules/@postnord/web-components/components/pn-search-field2.js +1 -1
  200. package/umd/modules/@postnord/web-components/components/pn-segment.js +1 -1
  201. package/umd/modules/@postnord/web-components/components/pn-segmented-control.js +1 -1
  202. package/umd/modules/@postnord/web-components/components/pn-select2.js +2 -2
  203. package/umd/modules/@postnord/web-components/components/pn-select2.js.map +1 -1
  204. package/umd/modules/@postnord/web-components/components/pn-spinner2.js +1 -1
  205. package/umd/modules/@postnord/web-components/components/pn-tab.js +1 -1
  206. package/umd/modules/@postnord/web-components/components/pn-tablist.js +2 -2
  207. package/umd/modules/@postnord/web-components/components/pn-tablist.js.map +1 -1
  208. package/umd/modules/@postnord/web-components/components/pn-text-link2.js +1 -1
  209. package/umd/modules/@postnord/web-components/components/pn-textarea.js +1 -1
  210. package/umd/modules/@postnord/web-components/components/pn-tile.js +1 -1
  211. package/umd/modules/@postnord/web-components/components/pn-toast.js +25 -16
  212. package/umd/modules/@postnord/web-components/components/pn-toast.js.map +1 -1
  213. package/umd/modules/@postnord/web-components/components/pn-toggle-switch.js +1 -1
  214. package/umd/modules/@postnord/web-components/components/pn-tooltip.js +1 -1
  215. package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
  216. package/umd/modules/@postnord/web-components/esm/{angle_down-d788f691.js → chevron_down-6e3fb42f.js} +3 -3
  217. package/umd/modules/@postnord/web-components/esm/chevron_down-6e3fb42f.js.map +1 -0
  218. package/umd/modules/@postnord/web-components/{components/angle_right.js → esm/chevron_right-9d9305e8.js} +4 -4
  219. package/umd/modules/@postnord/web-components/esm/chevron_right-9d9305e8.js.map +1 -0
  220. package/umd/modules/@postnord/web-components/esm/loader.js +1 -1
  221. package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js +2 -2
  222. package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js.map +1 -1
  223. package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js +42 -12
  224. package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js.map +1 -1
  225. package/umd/modules/@postnord/web-components/esm/pn-button_2.entry.js +1 -1
  226. package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +1 -1
  227. package/umd/modules/@postnord/web-components/esm/pn-checkbox.entry.js +1 -1
  228. package/umd/modules/@postnord/web-components/esm/pn-choice-chip.entry.js +1 -1
  229. package/umd/modules/@postnord/web-components/esm/pn-counter.entry.js +1 -1
  230. package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js +23 -7
  231. package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js.map +1 -1
  232. package/umd/modules/@postnord/web-components/esm/pn-fieldset.entry.js +1 -1
  233. package/umd/modules/@postnord/web-components/esm/pn-file-upload.entry.js +1 -1
  234. package/umd/modules/@postnord/web-components/esm/pn-footer.entry.js +1 -1
  235. package/umd/modules/@postnord/web-components/esm/pn-header.entry.js +1 -1
  236. package/umd/modules/@postnord/web-components/esm/pn-input.entry.js +2 -2
  237. package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js +22 -8
  238. package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js.map +1 -1
  239. package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +2 -2
  240. package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js.map +1 -1
  241. package/umd/modules/@postnord/web-components/esm/pn-ocr-search.entry.js +1 -1
  242. package/umd/modules/@postnord/web-components/esm/pn-page-nav-dropdown-item.entry.js +1 -1
  243. package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +1 -1
  244. package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +2 -2
  245. package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js.map +1 -1
  246. package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +1 -1
  247. package/umd/modules/@postnord/web-components/esm/pn-progress-bar.entry.js +1 -1
  248. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js +1 -1
  249. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js.map +1 -1
  250. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js +1 -1
  251. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js.map +1 -1
  252. package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js +26 -41
  253. package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js.map +1 -1
  254. package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +1 -1
  255. package/umd/modules/@postnord/web-components/esm/pn-search-field.entry.js +1 -1
  256. package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +1 -1
  257. package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +1 -1
  258. package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +2 -2
  259. package/umd/modules/@postnord/web-components/esm/pn-select.entry.js.map +1 -1
  260. package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +1 -1
  261. package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js +2 -2
  262. package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js.map +1 -1
  263. package/umd/modules/@postnord/web-components/esm/pn-text-link.entry.js +1 -1
  264. package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +1 -1
  265. package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +1 -1
  266. package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js +25 -16
  267. package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js.map +1 -1
  268. package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +1 -1
  269. package/umd/modules/@postnord/web-components/esm/pn-tooltip.entry.js +1 -1
  270. package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +1 -1
  271. package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +1 -1
  272. package/umd/modules/@postnord/web-components/hydrate/index.js +204 -137
  273. package/umd/modules/@postnord/web-components/hydrate/index.mjs +204 -137
  274. package/umd/modules/@postnord/web-components/package.json +16 -14
  275. package/umd/modules/@postnord/web-components/postnord-web-components/{p-7e88df1f.entry.js → p-01472170.entry.js} +2 -2
  276. package/umd/modules/@postnord/web-components/postnord-web-components/{p-ed4271af.entry.js → p-06c7e91b.entry.js} +2 -2
  277. package/umd/modules/@postnord/web-components/postnord-web-components/p-06c7e91b.entry.js.map +1 -0
  278. package/umd/modules/@postnord/web-components/postnord-web-components/{p-8773152d.entry.js → p-10532427.entry.js} +2 -2
  279. package/umd/modules/@postnord/web-components/postnord-web-components/{p-ffe79fa4.entry.js → p-11ef58ab.entry.js} +2 -2
  280. package/umd/modules/@postnord/web-components/postnord-web-components/p-16fb83d9.entry.js +6 -0
  281. package/umd/modules/@postnord/web-components/postnord-web-components/p-16fb83d9.entry.js.map +1 -0
  282. package/umd/modules/@postnord/web-components/postnord-web-components/{p-d74ccbb2.entry.js → p-1cd57319.entry.js} +2 -2
  283. package/umd/modules/@postnord/web-components/postnord-web-components/{p-adc6404b.entry.js → p-1e7c31ed.entry.js} +2 -2
  284. package/umd/modules/@postnord/web-components/postnord-web-components/p-1e7c31ed.entry.js.map +1 -0
  285. package/umd/modules/@postnord/web-components/postnord-web-components/{p-c2bbbcaa.entry.js → p-1fe6fc61.entry.js} +2 -2
  286. package/umd/modules/@postnord/web-components/postnord-web-components/{p-203ad7de.entry.js → p-23fdc4b6.entry.js} +2 -2
  287. package/umd/modules/@postnord/web-components/postnord-web-components/p-23fdc4b6.entry.js.map +1 -0
  288. package/umd/modules/@postnord/web-components/postnord-web-components/p-240f6613.entry.js +6 -0
  289. package/umd/modules/@postnord/web-components/postnord-web-components/{p-7ae9c053.entry.js.map → p-240f6613.entry.js.map} +1 -1
  290. package/umd/modules/@postnord/web-components/postnord-web-components/{p-4f67fffa.entry.js → p-28357e12.entry.js} +2 -2
  291. package/umd/modules/@postnord/web-components/postnord-web-components/p-28357e12.entry.js.map +1 -0
  292. package/umd/modules/@postnord/web-components/postnord-web-components/{p-c96ff403.js → p-2f7bb5e8.js} +2 -2
  293. package/umd/modules/@postnord/web-components/postnord-web-components/p-2f7bb5e8.js.map +1 -0
  294. package/umd/modules/@postnord/web-components/postnord-web-components/{p-5b0000e9.entry.js → p-363f578a.entry.js} +2 -2
  295. package/umd/modules/@postnord/web-components/postnord-web-components/{p-c0d19737.entry.js → p-37297b9a.entry.js} +2 -2
  296. package/umd/modules/@postnord/web-components/postnord-web-components/p-49a39ea1.entry.js +6 -0
  297. package/umd/modules/@postnord/web-components/postnord-web-components/p-49a39ea1.entry.js.map +1 -0
  298. package/umd/modules/@postnord/web-components/postnord-web-components/{p-bc95d4b0.entry.js → p-49f5fdd2.entry.js} +2 -2
  299. package/umd/modules/@postnord/web-components/postnord-web-components/p-49f5fdd2.entry.js.map +1 -0
  300. package/umd/modules/@postnord/web-components/postnord-web-components/{p-b556b835.entry.js → p-4d371963.entry.js} +2 -2
  301. package/umd/modules/@postnord/web-components/postnord-web-components/{p-ab29b9c0.entry.js → p-4eaab357.entry.js} +2 -2
  302. package/umd/modules/@postnord/web-components/postnord-web-components/{p-da713fc1.entry.js → p-5ed7e9b7.entry.js} +2 -2
  303. package/umd/modules/@postnord/web-components/postnord-web-components/p-617a946d.entry.js +6 -0
  304. package/umd/modules/@postnord/web-components/postnord-web-components/p-617a946d.entry.js.map +1 -0
  305. package/umd/modules/@postnord/web-components/postnord-web-components/{p-e087c5c5.entry.js → p-63aa3911.entry.js} +2 -2
  306. package/umd/modules/@postnord/web-components/postnord-web-components/p-65ae6360.entry.js +6 -0
  307. package/umd/modules/@postnord/web-components/postnord-web-components/p-65ae6360.entry.js.map +1 -0
  308. package/umd/modules/@postnord/web-components/postnord-web-components/{p-bf015c0f.entry.js → p-699b7bde.entry.js} +2 -2
  309. package/umd/modules/@postnord/web-components/postnord-web-components/{p-9bc1d14f.entry.js → p-6f9a21be.entry.js} +2 -2
  310. package/umd/modules/@postnord/web-components/postnord-web-components/p-75c5fb41.entry.js +6 -0
  311. package/umd/modules/@postnord/web-components/postnord-web-components/p-75c5fb41.entry.js.map +1 -0
  312. package/umd/modules/@postnord/web-components/postnord-web-components/{p-bd14cdca.entry.js → p-8e07bc17.entry.js} +2 -2
  313. package/umd/modules/@postnord/web-components/postnord-web-components/{p-7bd6d804.entry.js → p-8eaa2540.entry.js} +2 -2
  314. package/umd/modules/@postnord/web-components/postnord-web-components/{p-bf967b50.js → p-99600bc7.js} +2 -2
  315. package/umd/modules/@postnord/web-components/postnord-web-components/p-99600bc7.js.map +1 -0
  316. package/umd/modules/@postnord/web-components/postnord-web-components/{p-ff068744.entry.js → p-9cecd28d.entry.js} +2 -2
  317. package/umd/modules/@postnord/web-components/postnord-web-components/{p-605d99df.entry.js → p-a440734f.entry.js} +2 -2
  318. package/umd/modules/@postnord/web-components/postnord-web-components/{p-b9a494ae.entry.js → p-ab553e80.entry.js} +2 -2
  319. package/umd/modules/@postnord/web-components/postnord-web-components/{p-936ed2a1.entry.js → p-ae04e001.entry.js} +2 -2
  320. package/umd/modules/@postnord/web-components/postnord-web-components/p-ae04e001.entry.js.map +1 -0
  321. package/umd/modules/@postnord/web-components/postnord-web-components/{p-a4df55c4.entry.js → p-b202a599.entry.js} +2 -2
  322. package/umd/modules/@postnord/web-components/postnord-web-components/p-b83e6373.entry.js +6 -0
  323. package/umd/modules/@postnord/web-components/postnord-web-components/p-b83e6373.entry.js.map +1 -0
  324. package/umd/modules/@postnord/web-components/postnord-web-components/{p-fcd5028f.entry.js → p-bdb9bdc3.entry.js} +2 -2
  325. package/umd/modules/@postnord/web-components/postnord-web-components/{p-81f9f367.entry.js → p-cebe3a25.entry.js} +2 -2
  326. package/umd/modules/@postnord/web-components/postnord-web-components/{p-76b020f0.entry.js → p-d2f7b4a9.entry.js} +2 -2
  327. package/umd/modules/@postnord/web-components/postnord-web-components/{p-c45dc75d.entry.js → p-e8050420.entry.js} +2 -2
  328. package/umd/modules/@postnord/web-components/postnord-web-components/{p-412fc8d6.entry.js → p-eee2d131.entry.js} +2 -2
  329. package/umd/modules/@postnord/web-components/postnord-web-components/{p-d3521b5d.entry.js → p-fb5d6d47.entry.js} +2 -2
  330. package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
  331. package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js.map +1 -1
  332. package/umd/modules/@postnord/web-components/types/components/buttons/pn-action-menu/pn-action-menu.d.ts +3 -0
  333. package/umd/modules/@postnord/web-components/types/components/feedback/pn-modal/pn-modal.d.ts +12 -2
  334. package/umd/modules/@postnord/web-components/types/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.d.ts +4 -0
  335. package/umd/modules/@postnord/web-components/types/components/feedback/pn-progress-indicator/pn-progress-indicator.d.ts +4 -0
  336. package/umd/modules/@postnord/web-components/types/components/feedback/pn-progress-stepper/pn-progress-stepper.d.ts +27 -22
  337. package/umd/modules/@postnord/web-components/types/components/feedback/pn-toast/pn-toast.d.ts +2 -1
  338. package/umd/modules/@postnord/web-components/types/components.d.ts +60 -12
  339. package/umd/modules/@postnord/web-components/types/globals/types.d.ts +2 -1
  340. package/umd/modules/@postnord/web-components/vscode-data.json +7 -3
  341. package/vscode-data.json +4 -0
  342. package/pn-market-web-components/p-59cb7166.entry.js +0 -2
  343. package/pn-market-web-components/p-59cb7166.entry.js.map +0 -1
  344. package/pn-market-web-components/p-7c3091eb.entry.js +0 -2
  345. package/pn-market-web-components/p-7c3091eb.entry.js.map +0 -1
  346. package/pn-market-web-components/p-94a69959.entry.js +0 -2
  347. package/pn-market-web-components/p-94a69959.entry.js.map +0 -1
  348. package/umd/modules/@postnord/web-components/cjs/angle_down-0b63ebde.js.map +0 -1
  349. package/umd/modules/@postnord/web-components/cjs/angle_right-c8c55b43.js.map +0 -1
  350. package/umd/modules/@postnord/web-components/components/angle_down.js.map +0 -1
  351. package/umd/modules/@postnord/web-components/components/angle_right.js.map +0 -1
  352. package/umd/modules/@postnord/web-components/esm/angle_down-d788f691.js.map +0 -1
  353. package/umd/modules/@postnord/web-components/esm/angle_right-b52095c9.js.map +0 -1
  354. package/umd/modules/@postnord/web-components/postnord-web-components/p-203ad7de.entry.js.map +0 -1
  355. package/umd/modules/@postnord/web-components/postnord-web-components/p-2615282e.entry.js +0 -6
  356. package/umd/modules/@postnord/web-components/postnord-web-components/p-2615282e.entry.js.map +0 -1
  357. package/umd/modules/@postnord/web-components/postnord-web-components/p-3bd59ac8.entry.js +0 -6
  358. package/umd/modules/@postnord/web-components/postnord-web-components/p-3bd59ac8.entry.js.map +0 -1
  359. package/umd/modules/@postnord/web-components/postnord-web-components/p-4f67fffa.entry.js.map +0 -1
  360. package/umd/modules/@postnord/web-components/postnord-web-components/p-514107a5.entry.js +0 -6
  361. package/umd/modules/@postnord/web-components/postnord-web-components/p-514107a5.entry.js.map +0 -1
  362. package/umd/modules/@postnord/web-components/postnord-web-components/p-6a30576b.entry.js +0 -6
  363. package/umd/modules/@postnord/web-components/postnord-web-components/p-6a30576b.entry.js.map +0 -1
  364. package/umd/modules/@postnord/web-components/postnord-web-components/p-7ae9c053.entry.js +0 -6
  365. package/umd/modules/@postnord/web-components/postnord-web-components/p-8bc8f614.entry.js +0 -6
  366. package/umd/modules/@postnord/web-components/postnord-web-components/p-8bc8f614.entry.js.map +0 -1
  367. package/umd/modules/@postnord/web-components/postnord-web-components/p-936ed2a1.entry.js.map +0 -1
  368. package/umd/modules/@postnord/web-components/postnord-web-components/p-adc6404b.entry.js.map +0 -1
  369. package/umd/modules/@postnord/web-components/postnord-web-components/p-bc95d4b0.entry.js.map +0 -1
  370. package/umd/modules/@postnord/web-components/postnord-web-components/p-bf967b50.js.map +0 -1
  371. package/umd/modules/@postnord/web-components/postnord-web-components/p-c96ff403.js.map +0 -1
  372. package/umd/modules/@postnord/web-components/postnord-web-components/p-ed4271af.entry.js.map +0 -1
  373. package/umd/modules/@postnord/web-components/postnord-web-components/p-fc5f9092.entry.js +0 -6
  374. package/umd/modules/@postnord/web-components/postnord-web-components/p-fc5f9092.entry.js.map +0 -1
  375. package/umd/modules/@postnord/web-components/readme.md +0 -32
  376. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-7e88df1f.entry.js.map → p-01472170.entry.js.map} +0 -0
  377. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-8773152d.entry.js.map → p-10532427.entry.js.map} +0 -0
  378. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-ffe79fa4.entry.js.map → p-11ef58ab.entry.js.map} +0 -0
  379. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-d74ccbb2.entry.js.map → p-1cd57319.entry.js.map} +0 -0
  380. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-c2bbbcaa.entry.js.map → p-1fe6fc61.entry.js.map} +0 -0
  381. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-5b0000e9.entry.js.map → p-363f578a.entry.js.map} +0 -0
  382. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-c0d19737.entry.js.map → p-37297b9a.entry.js.map} +0 -0
  383. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-b556b835.entry.js.map → p-4d371963.entry.js.map} +0 -0
  384. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-ab29b9c0.entry.js.map → p-4eaab357.entry.js.map} +0 -0
  385. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-da713fc1.entry.js.map → p-5ed7e9b7.entry.js.map} +0 -0
  386. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-e087c5c5.entry.js.map → p-63aa3911.entry.js.map} +0 -0
  387. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-bf015c0f.entry.js.map → p-699b7bde.entry.js.map} +0 -0
  388. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-9bc1d14f.entry.js.map → p-6f9a21be.entry.js.map} +0 -0
  389. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-bd14cdca.entry.js.map → p-8e07bc17.entry.js.map} +0 -0
  390. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-7bd6d804.entry.js.map → p-8eaa2540.entry.js.map} +0 -0
  391. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-ff068744.entry.js.map → p-9cecd28d.entry.js.map} +0 -0
  392. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-605d99df.entry.js.map → p-a440734f.entry.js.map} +0 -0
  393. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-b9a494ae.entry.js.map → p-ab553e80.entry.js.map} +0 -0
  394. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-a4df55c4.entry.js.map → p-b202a599.entry.js.map} +0 -0
  395. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-fcd5028f.entry.js.map → p-bdb9bdc3.entry.js.map} +0 -0
  396. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-81f9f367.entry.js.map → p-cebe3a25.entry.js.map} +0 -0
  397. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-76b020f0.entry.js.map → p-d2f7b4a9.entry.js.map} +0 -0
  398. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-c45dc75d.entry.js.map → p-e8050420.entry.js.map} +0 -0
  399. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-412fc8d6.entry.js.map → p-eee2d131.entry.js.map} +0 -0
  400. /package/umd/modules/@postnord/web-components/postnord-web-components/{p-d3521b5d.entry.js.map → p-fb5d6d47.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"pn-progress-stepper.js","sourceRoot":"","sources":["../../../../src/components/feedback/pn-progress-stepper/pn-progress-stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG5D;;IAEI;AAKJ,MAAM,OAAO,iBAAiB;;6BAYK,CAAC;;0BAKa,IAAI,CAAC,OAAO;2BAEX,IAAI,CAAC,OAAO;;iCAIvB,EAAE;wBAKN,IAAI;;IA3BrC,EAAE,GAAW,uBAAuB,MAAM,EAAE,EAAE,CAAC;IAE/C,OAAO,GAAW,GAAG,IAAI,CAAC,EAAE,QAAQ,CAAC;IACrC,KAAK,GAAW,GAAG,IAAI,CAAC,EAAE,MAAM,CAAC;IAEjC,OAAO,GAAM,CAAC,CAAC;IACf,OAAO,GAAM,CAAC,CAAC;IAEJ,WAAW,CAAc;IAsBpC,mBAAmB,CAAC,IAAa;QAC/B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACrC,CAAC;IAGD,kBAAkB,CAAC,IAAa;QAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACpC,CAAC;IAGD,aAAa;QACX,IAAI,IAAI,CAAC,cAAc,EAAE;YAAE,OAAO;QAClC,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAGD,OAAO;QACL,IAAI,IAAI,CAAC,iBAAiB,EAAE,C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DAAG,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAC,2BAA2B;gBACpD;oBACG,IAAI,CAAC,KAAK;;oBAAG,IAAI,CAAC,WAAW;;oBAAG,IAAI,CAAC,UAAU,CAC3C;gBACN,IAAI,CAAC,QAAQ,IAAI;;oBAAU,IAAI,CAAC,QAAQ,CAAQ,CAC/C;YACJ,4DACE,KAAK,EAAC,qBAAqB,EAC3B,IAAI,EAAC,aAAa,qBACD,IAAI,CAAC,OAAO,mBACd,IAAI,CAAC,aAAa,EACjC,EAAE,EAAE,IAAI,CAAC,KAAK,eACH,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,UAAU;gBAE/C,4DAAK,KAAK,EAAC,2BAA2B,GAAO,CACzC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { translations } from './translations';\nimport { en, awaitTopbar, uuidv4 } from '@/globals/helpers';\nimport type { PnLanguages, PnSteps, PnStepProps } from '@/globals/types';\n\n/**\n * The `pn-progress-stepper` is used to visualize the users progress through a flow (checkout/survey, etc...).\n **/\n@Component({\n tag: 'pn-progress-stepper',\n styleUrl: 'pn-progress-stepper.scss',\n})\nexport class PnProgressStepper {\n id: string = `pn-progress-stepper-${uuidv4()}`;\n\n idLabel: string = `${this.id}-label`;\n idBar: string = `${this.id}-bar`;\n\n minStep: 1 = 1;\n maxStep: 7 = 7;\n\n @Element() hostElement: HTMLElement;\n\n /** Percentage calculated with currentStep / totalSteps. */\n @State() progressValue: number = 0;\n\n /** Set custom label for the stepper, recommended default label is \"Step\". */\n @Prop({ mutable: true }) label?: string;\n /** Set total amount of steps, maximum `7` is allowed. */\n @Prop({ mutable: true }) totalSteps: PnSteps = this.maxStep;\n /** The current step of the progress stepper. */\n @Prop({ mutable: true }) currentStep: PnSteps = this.minStep;\n /** You can add a custom optional string to the label if you need a name for the current step. */\n @Prop() stepName?: string;\n /** Set a custom HTML id on the progress stepper element to associate progress bar with label. */\n @Prop() progressStepperId?: string = '';\n /**\n * Set the language manually, only use this prop if the pnTopbar is not loaded.\n * Will not overwrite the `label` prop if used.\n **/\n @Prop() language?: PnLanguages = null;\n\n @Watch('currentStep')\n validateCurrentStep(step: PnSteps) {\n this.validate(step, 'currentStep');\n }\n\n @Watch('totalSteps')\n validateTotalSteps(step: PnSteps) {\n this.validate(step, 'totalSteps');\n }\n\n @Watch('language')\n watchLanguage() {\n if (this.hasCustomLabel()) return;\n this.label = translations.STEP[this.language || en];\n }\n\n @Watch('progressStepperId')\n watchId() {\n if (this.progressStepperId) {\n this.idLabel = `${this.progressStepperId}-label`;\n this.idBar = `${this.progressStepperId}-bar`;\n } else {\n this.idLabel = `${this.id}-label`;\n this.idBar = `${this.id}-bar`;\n }\n }\n\n async componentWillLoad() {\n this.watchLanguage();\n this.watchId();\n\n this.validate(this.currentStep, 'currentStep');\n this.validate(this.totalSteps, 'totalSteps');\n\n if (this.language) return;\n await awaitTopbar(this.hostElement);\n }\n\n componentWillRender() {\n this.calculateProgress();\n }\n\n hasCustomLabel(): boolean {\n if (this.label === undefined) return false;\n return !Object.keys(translations.STEP).find(step => translations.STEP[step] === this.label);\n }\n\n validate(step: PnSteps, prop: PnStepProps) {\n const componentName = this.hostElement.localName;\n if (step < this.minStep) {\n console.warn(\n `${componentName}: The ${prop} ${step} is below the minimum allowed steps of ${this.minStep}. ${prop} will default to ${this.minStep}.`,\n );\n this[prop] = this.minStep;\n }\n if (prop === 'currentStep' && step > this.totalSteps) {\n console.warn(\n `${componentName}: The ${prop} ${step} is above totalSteps ${this.totalSteps}, ${prop} will default to ${this.totalSteps}.`,\n );\n this[prop] = this.totalSteps;\n }\n if (step > this.maxStep) {\n console.warn(\n `${componentName}: The ${prop} ${step} is above the maximum allowed steps of ${this.maxStep}. ${prop} will default to ${this.maxStep}.`,\n );\n this[prop] = this.maxStep;\n }\n }\n\n calculateProgress() {\n try {\n this.progressValue = Math.floor((this.currentStep / this.totalSteps) * 100);\n this.hostElement.style.setProperty('--progress-value', `${this.progressValue}%`);\n } catch (error) {\n console.error(`${this.hostElement.localName}:`, error.message);\n }\n }\n\n render() {\n return (\n <Host>\n <p id={this.idLabel} class=\"pn-progress-stepper-label\">\n <span>\n {this.label} {this.currentStep}/{this.totalSteps}\n </span>\n {this.stepName && <span> - {this.stepName}</span>}\n </p>\n <div\n class=\"pn-progress-stepper\"\n role=\"progressbar\"\n aria-labelledby={this.idLabel}\n aria-valuenow={this.progressValue}\n id={this.idBar}\n data-full={this.currentStep === this.totalSteps}\n >\n <div class=\"pn-progress-stepper-value\"></div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pn-progress-stepper.js","sourceRoot":"","sources":["../../../../src/components/feedback/pn-progress-stepper/pn-progress-stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG5D;;IAEI;AAKJ,MAAM,OAAO,iBAAiB;;;6BAUa,CAAC;qBAGjB,EAAE;iCAEU,EAAE;wBAKN,IAAI;0BAGS,IAAI,CAAC,OAAO;2BAEX,IAAI,CAAC,OAAO;;oBAWnC,KAAK;;IAnCZ,EAAE,GAAW,uBAAuB,MAAM,EAAE,EAAE,CAAC;IAE/C,OAAO,GAAM,CAAC,CAAC;IACf,OAAO,GAAM,CAAC,CAAC;IAErB,WAAW,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AAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClG;oBACG,IAAI,CAAC,QAAQ,EAAE;;oBAAG,IAAI,CAAC,WAAW;;oBAAG,IAAI,CAAC,UAAU,CAChD;gBACN,IAAI,CAAC,QAAQ,IAAI;;oBAAU,IAAI,CAAC,QAAQ,CAAQ,CAC3C;YACR,iEAAU,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,EAAC,qBAAqB,EAAC,GAAG,EAAC,KAAK,EAAC,KAAK,EAAE,IAAI,CAAC,aAAa,GAAI;YAE9F,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CACX,WAAK,KAAK,EAAC,kBAAkB,iBAAa,MAAM,IAC7C,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACzC,WAAK,KAAK,EAAC,iBAAiB,iBAAc,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,GAAI,CAChF,CAAC,CACE,CACP,CAAC,CAAC,CAAC,CACF,0BAAiB,MAAM,EAAC,KAAK,EAAC,aAAa;gBACzC,WAAK,KAAK,EAAC,mBAAmB,eAAY,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,UAAU,GAAI,CAC9E,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { translations } from './translations';\nimport { en, awaitTopbar, uuidv4 } from '@/globals/helpers';\nimport type { PnLanguages, PnStepProps } from '@/globals/types';\n\n/**\n * The `pn-progress-stepper` is used to visualize the users progress through a flow (checkout/survey, etc...).\n **/\n@Component({\n tag: 'pn-progress-stepper',\n styleUrl: 'pn-progress-stepper.scss',\n})\nexport class PnProgressStepper {\n private readonly id: string = `pn-progress-stepper-${uuidv4()}`;\n\n private readonly minStep: 1 = 1;\n private readonly maxStep: 7 = 7;\n\n @Element() hostElement: HTMLElement;\n\n @State() private builtInLabel: string;\n /** Percentage calculated with currentStep / totalSteps. */\n @State() private progressValue: number = 0;\n\n /** Set custom label for the stepper, default label is \"Step\". */\n @Prop() label?: string = '';\n /** Set a custom HTML id on the progress stepper element to associate progress bar with label. */\n @Prop() progressStepperId?: string = '';\n /**\n * Set the language manually, only use this prop if the pnTopbar is not loaded.\n * Will not overwrite the custom `label` prop if used.\n **/\n @Prop() language?: PnLanguages = null;\n\n /** Set total amount of steps, maximum allowed is `7`. @category Steps */\n @Prop({ mutable: true }) totalSteps: number = this.maxStep;\n /** The current step of the progress stepper. @category Steps */\n @Prop({ mutable: true }) currentStep: number = this.minStep;\n /** You can add a custom optional string to the label if you need a name for the current step. @category Steps */\n @Prop() stepName?: string;\n\n /**\n * Use the dots visual, instead of the bar.\n *\n * This will hide the label from view, but is still accessible to screenreaders.\n *\n * @category Visual\n */\n @Prop() dots: boolean = false;\n\n @Watch('currentStep')\n @Watch('totalSteps')\n stepWatchers(a: number, b: number, c: 'currentStep' | 'totalSteps') {\n if (c === 'currentStep') this.validate(a, 'currentStep');\n if (c === 'totalSteps') this.validate(b, 'totalSteps');\n this.calculateProgress();\n }\n\n @Watch('language')\n watchLanguage() {\n this.builtInLabel = translations.STEP[this.language || en];\n }\n\n async componentWillLoad() {\n this.watchLanguage();\n\n this.validate(this.currentStep, 'currentStep');\n this.validate(this.totalSteps, 'totalSteps');\n\n this.calculateProgress();\n\n if (this.language === null) await awaitTopbar(this.hostElement);\n }\n\n private validate(step: number, prop: PnStepProps) {\n const componentName = this.hostElement.localName;\n if (step < this.minStep) {\n console.warn(\n `${componentName}: The ${prop} ${step} is below the minimum allowed steps of ${this.minStep}. ${prop} will default to ${this.minStep}.`,\n );\n this[prop] = this.minStep;\n }\n if (prop === 'currentStep' && step > this.totalSteps) {\n console.warn(\n `${componentName}: The ${prop} ${step} is above totalSteps ${this.totalSteps}, ${prop} will default to ${this.totalSteps}.`,\n );\n this[prop] = this.totalSteps;\n }\n if (step > this.maxStep) {\n console.warn(\n `${componentName}: The ${prop} ${step} is above the maximum allowed steps of ${this.maxStep}. ${prop} will default to ${this.maxStep}.`,\n );\n this[prop] = this.maxStep;\n }\n }\n\n private calculateProgress() {\n try {\n this.progressValue = Math.floor((this.currentStep / this.totalSteps) * 100);\n this.hostElement.style.setProperty('--pn-progress-value', `${this.progressValue}%`);\n } catch (error) {\n console.error(`${this.hostElement.localName}:`, error.message);\n }\n }\n\n private getLabel() {\n return this.label || this.builtInLabel;\n }\n\n private getId() {\n return this.progressStepperId || this.id;\n }\n\n render() {\n return (\n <Host>\n <label htmlFor={this.getId()} class={'pn-progress-label' + (this.dots ? ' pn-progress-sr-only' : '')}>\n <span>\n {this.getLabel()} {this.currentStep}/{this.totalSteps}\n </span>\n {this.stepName && <span> - {this.stepName}</span>}\n </label>\n <progress id={this.getId()} class=\"pn-progress-sr-only\" max=\"100\" value={this.progressValue} />\n\n {this.dots ? (\n <div class=\"pn-progress-dots\" aria-hidden=\"true\">\n {[...Array(this.totalSteps)].map((_, i) => (\n <div class=\"pn-progress-dot\" data-active={i + 1 <= this.currentStep} key={i} />\n ))}\n </div>\n ) : (\n <div aria-hidden=\"true\" class=\"pn-progress\">\n <div class=\"pn-progress-value\" data-full={this.currentStep === this.totalSteps} />\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -19,7 +19,7 @@ export class PnSpinner {
19
19
  return `${this.size}em`;
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '70929226e52cdda66312d599b0f8d4c83e902263' }, h("svg", { key: '0e4a3843737f29304996b5eb81b772b904f2d1c7', class: "pn-spinner", style: { '--pn-spinner-size': this.getSize(), '--pn-spinner-color': this.getColor() }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, h("circle", { key: '09d5ab69786a82fa44fc8b62aeb00b93ae4e8c0d', class: "pn-spinner-circle", cx: "12", cy: "12", r: "10", "stroke-width": "3" }), h("circle", { key: 'de94ea674640b278406a32486d8dbac3ebaec156', class: "pn-spinner-dot", cx: "21.3", cy: "16", r: "1.48" }))));
22
+ return (h(Host, { key: 'a9ecba01b5b30a660a44439c714b7ad57cf02a88' }, h("svg", { key: '03fbe990bf1ae0402fcb27707e0c1712d8a84492', class: "pn-spinner", style: { '--pn-spinner-size': this.getSize(), '--pn-spinner-color': this.getColor() }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, h("circle", { key: 'c48784865cd9c8c3d55cd9b1bd3e0dff7a4ebe35', class: "pn-spinner-circle", cx: "12", cy: "12", r: "10", "stroke-width": "3" }), h("circle", { key: '5f69d1bbbf864842f9ae54dc9a29b61603a83bff', class: "pn-spinner-dot", cx: "21.3", cy: "16", r: "1.48" }))));
23
23
  }
24
24
  static get is() { return "pn-spinner"; }
25
25
  static get originalStyleUrls() {
@@ -4,7 +4,6 @@
4
4
  pn-toast {
5
5
  position: relative;
6
6
  display: block;
7
- overflow: hidden;
8
7
  }
9
8
 
10
9
  pn-toast .pn-toast {
@@ -40,10 +40,13 @@ export class PnToast {
40
40
  this.animationDuration = 0;
41
41
  else
42
42
  this.animationDuration = this.duration;
43
- if (this.hide)
44
- this.closeToast();
45
- else
46
- this.openToast();
43
+ this.hostElement.style.overflow = 'hidden';
44
+ requestAnimationFrame(() => {
45
+ if (this.hide)
46
+ this.closeToast();
47
+ else
48
+ this.openToast();
49
+ });
47
50
  }
48
51
  /** Event fired when the close button is pressed. */
49
52
  close;
@@ -53,8 +56,10 @@ export class PnToast {
53
56
  **/
54
57
  hidden;
55
58
  async componentWillLoad() {
56
- if (this.hide)
59
+ if (this.hide) {
57
60
  this.hostElement.style.height = '0';
61
+ this.hostElement.style.overflow = 'hidden';
62
+ }
58
63
  if (this.language === null)
59
64
  await awaitTopbar(this.hostElement);
60
65
  // Any text content at this stage means there is slotted content present.
@@ -69,19 +74,18 @@ export class PnToast {
69
74
  }
70
75
  openToast() {
71
76
  requestAnimationFrame(() => {
72
- const { scrollHeight } = this.hostElement;
77
+ const { clientHeight } = this.toast;
73
78
  const { height } = this.getRect(this.hostElement);
74
79
  this.hostElement.style.height = `${height}px`;
75
80
  this.isExpanding = true;
76
- this.animateToast(true, `${height}px`, `${scrollHeight}px`);
81
+ this.animateToast(true, `${height}px`, `${clientHeight}px`);
77
82
  });
78
83
  }
79
84
  closeToast() {
80
- const { scrollHeight, clientHeight } = this.hostElement;
81
- const height = this.isExpanding ? clientHeight : scrollHeight;
85
+ const { clientHeight } = this.hostElement;
82
86
  this.hostElement.style.height = `0px`;
83
87
  this.isClosing = true;
84
- this.animateToast(false, `${height}px`, `0px`);
88
+ this.animateToast(false, `${clientHeight}px`, `0px`);
85
89
  }
86
90
  animateToast(open, startHeight, endHeight) {
87
91
  this.cancelAnimations();
@@ -96,10 +100,12 @@ export class PnToast {
96
100
  }
97
101
  animationFinish() {
98
102
  this.cancelAnimations();
99
- if (!this.hide)
100
- this.hostElement.style.height = '';
101
- else
103
+ if (this.hide)
102
104
  this.hidden.emit(this.hide);
105
+ else {
106
+ this.hostElement.style.height = '';
107
+ this.hostElement.style.overflow = '';
108
+ }
103
109
  this.isClosing = false;
104
110
  this.isExpanding = false;
105
111
  }
@@ -140,11 +146,14 @@ export class PnToast {
140
146
  translate(prop) {
141
147
  return translations?.[prop]?.[this.language || en] || prop;
142
148
  }
149
+ isMoving() {
150
+ return this.isClosing || this.isExpanding;
151
+ }
143
152
  hideToast() {
144
- return this.hide && !(this.isClosing || this.isExpanding);
153
+ return this.hide && !this.isMoving();
145
154
  }
146
155
  render() {
147
- return (h(Host, { key: 'c735e200d6cf3061569c3e55caf583abed738725' }, h("output", { key: '7911e4ca88367ea8130a20abda58449a1f7e3098', id: this.toastId, class: "pn-toast", role: this.getRole(), "data-appearance": this.appearance, "data-temporary": this.temporary, "data-hide": this.hideToast(), ref: el => (this.toast = el) }, this.showIcon() && h("pn-icon", { key: 'b064b710d21583eaba8d5ce1c3b162fb1c71f4e4', class: "pn-toast-icon", icon: this.getIcon() }), h("div", { key: '6e24b6771be924b56e2406ac92c5639f7da4b0b6', class: "pn-toast-content" }, this.showTitle() && h("h4", { key: 'eb24bcbbd70b1b77e86c2598569f443bd7d1bdfb', class: "pn-toast-heading" }, this.heading), this.text && h("p", { key: '713b372860897ef9bc55f401282765bc5684b6f6', class: "pn-toast-text" }, this.text), h("slot", { key: 'e567f676f28d20370407fc481c52c92bc34a06e1' })), this.showIllustration() && h("pn-illustration", { key: '6b0b4f9c1f588f71eb1154b6170994f59aaaae4a', illustration: this.illustration, width: "5.5em", height: "5.5em" }), this.closable && (h("button", { key: '4111381fb279dc2d5abe520188869133aa948246', class: "pn-toast-button", type: "button", "aria-label": this.translate('HIDE'), onClick: (event) => this.handleClick(event), ref: el => (this.button = el) }, h("pn-icon", { key: '020fe8b66ce1d955dcb5420c44b0b4b5b1845ab9', icon: close }))))));
156
+ return (h(Host, { key: 'b0f490bf139ccd8682e8d43f75ae99f6d5e4a054' }, h("div", { key: '8bdd1b6525b579d06b82d762e56c0ec34c4bb822', id: this.toastId, class: "pn-toast", role: this.getRole(), "data-appearance": this.appearance, "data-temporary": this.temporary, "data-hide": this.hideToast(), ref: el => (this.toast = el) }, this.showIcon() && h("pn-icon", { key: 'fc5626dbbe0f5a5939179f02be8e1e70eec22ebd', class: "pn-toast-icon", icon: this.getIcon() }), h("div", { key: 'f1aabfdd5d9e62d895cd4cfdaf31a7abb92e0749', class: "pn-toast-content" }, this.showTitle() && h("h4", { key: '6267fa5e2eb67c8a0d16506db0586f9b2fa6b18a', class: "pn-toast-heading" }, this.heading), this.text && h("p", { key: 'b1a2ee4468223afc9c43bb57f3aa72c38d86cb1c', class: "pn-toast-text" }, this.text), h("slot", { key: '2508212f2afc63d3faa5a189dd9ddba33cff3eaa' })), this.showIllustration() && h("pn-illustration", { key: 'bee93e5623aa57d1a1f765dd6ad13a8cdd1ea1d8', illustration: this.illustration, width: "5.5em", height: "5.5em" }), this.closable && (h("button", { key: '0db9441d732d60bd37446c92b0df34e44f1f61e9', class: "pn-toast-button", type: "button", "aria-label": this.translate('HIDE'), onClick: (event) => this.handleClick(event), ref: el => (this.button = el) }, h("pn-icon", { key: 'a1325ada64366284633932d4ba775e67b3ae6f59', icon: close }))))));
148
157
  }
149
158
  static get is() { return "pn-toast"; }
150
159
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"pn-toast.js","sourceRoot":"","sources":["../../../../src/components/feedback/pn-toast/pn-toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,wBAAwB,EACxB,KAAK,GACN,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;GAMG;AAKH,MAAM,OAAO,OAAO;;yBAUG,KAAK;2BACH,KAAK;iCAEU,KAAK;uBAMhB,EAAE;oBAKL,EAAE;;;yBAYG,KAAK;;;oBAgBsB,KAAK;wBAKjC,KAAK;wBAMiB,IAAI;;IA9DtD,KAAK,CAAoB;IACzB,MAAM,CAAoB;IAET,QAAQ,GAAW,GAAG,CAAC;IAChC,iBAAiB,GAAW,IAAI,CAAC,QAAQ,CAAC;I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IAAI,CAAC,QAAQ,IAAI,CAChB,+DACE,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,gBACD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAClC,OAAO,EAAE,CAAC,KAAmB,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EACzD,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;oBAE7B,gEAAS,IAAI,EAAE,KAAK,GAAI,CACjB,CACV,CACM,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { PnLanguages } from '@/index';\nimport { awaitTopbar, en, ripple, reduceMotion } from '@/index';\nimport { Component, Host, Prop, h, Element, EventEmitter, Event, State, Watch } from '@stencil/core';\nimport {\n alert_info_circle,\n check_circle,\n alert_exclamation_triangle,\n alert_exclamation_circle,\n close,\n} from 'pn-design-assets/pn-assets/icons.js';\nimport { translations } from './translation';\n\n/**\n * This component is able to fill many roles of a classic toast.\n * It has 4 different colors, a temporary state, hide button, icon and illustration support.\n *\n * The `pn-toast` will expand to its parent containers full width.\n * Either limit the parent width or set a CSS rule to your specific width if needed.\n */\n@Component({\n tag: 'pn-toast',\n styleUrl: 'pn-toast.scss',\n})\nexport class PnToast {\n toast: HTMLOutputElement;\n button: HTMLButtonElement;\n\n private readonly duration: number = 400;\n private animationDuration: number = this.duration;\n private animation: Animation;\n\n @Element() hostElement: HTMLElement;\n\n @State() isClosing = false;\n @State() isExpanding = false;\n\n @State() hasSlottedContent: boolean = false;\n\n /**\n * Set a title for the toast. Requires the `text` prop in order to work.\n * @description Can be used together with slotted content.\n */\n @Prop() heading?: string = '';\n /**\n * Set a paragraph of text for the toast.\n * @description Can be used together with slotted content.\n */\n @Prop() text?: string = '';\n /** Give the toast a HTML ID. */\n @Prop() toastId?: string;\n /**\n * Default color is blue, you also have the option of success (green), warning (orange) and error (red).\n * @category Visual\n */\n @Prop() appearance?: '' | 'success' | 'warning' | 'error';\n /**\n * This will apply a shadow and border to the toast.\n * @category Visual\n */\n @Prop() temporary: boolean = false;\n /**\n * Set an SVG icon.\n * @category Visual\n */\n @Prop() icon?: string;\n /**\n * Set an SVG illustration.\n * @category Visual\n */\n @Prop() illustration?: string;\n /**\n * Control the visibility of the toast. If the `closable` prop is active, the toast will set the `hide` prop on its own.\n * @see {@link closable}\n * @category Features\n */\n @Prop({ mutable: true, reflect: true }) hide: boolean = false;\n /**\n * Show close button.\n * @category Features\n */\n @Prop() closable: boolean = false;\n /**\n * Manually set the language, only needed if the `closable` prop is enabled.\n * @see {@link closable}\n * @category Features\n */\n @Prop({ mutable: true }) language?: PnLanguages = null;\n\n @Watch('hide')\n handleHide() {\n if (reduceMotion()) this.animationDuration = 0;\n else this.animationDuration = this.duration;\n\n if (this.hide) this.closeToast();\n else this.openToast();\n }\n\n /** Event fired when the close button is pressed. */\n @Event() close: EventEmitter<boolean>;\n /**\n * This event is fired when the toast is fully hidden after the animation is finished.\n * Triggers from the close button or if the prop `hide` is set to true.\n **/\n @Event() hidden: EventEmitter<boolean>;\n\n async componentWillLoad() {\n if (this.hide) this.hostElement.style.height = '0';\n\n if (this.language === null) await awaitTopbar(this.hostElement);\n // Any text content at this stage means there is slotted content present.\n this.hasSlottedContent = !!this.hostElement.textContent;\n }\n\n componentDidLoad() {\n if (!!this.heading && !this.text && !this.hasSlottedContent)\n console.warn('The %s prop is only available if you use the %s prop or slotted content.', 'heading', 'text');\n }\n\n private getRect(element: HTMLElement): DOMRect {\n return element.getBoundingClientRect();\n }\n\n private openToast() {\n requestAnimationFrame(() => {\n const { scrollHeight } = this.hostElement;\n const { height } = this.getRect(this.hostElement);\n\n this.hostElement.style.height = `${height}px`;\n\n this.isExpanding = true;\n this.animateToast(true, `${height}px`, `${scrollHeight}px`);\n });\n }\n\n private closeToast() {\n const { scrollHeight, clientHeight } = this.hostElement;\n const height = this.isExpanding ? clientHeight : scrollHeight;\n this.hostElement.style.height = `0px`;\n\n this.isClosing = true;\n this.animateToast(false, `${height}px`, `0px`);\n }\n\n private animateToast(open: boolean, startHeight: string, endHeight: string) {\n this.cancelAnimations();\n this.animation = this.hostElement.animate(\n {\n height: [startHeight, endHeight],\n },\n {\n duration: this.animationDuration,\n easing: 'cubic-bezier(0.6, 0, 0.2, 1)',\n },\n );\n this.animation.onfinish = () => this.animationFinish();\n this.animation.oncancel = () => (open ? (this.isExpanding = false) : (this.isClosing = false));\n }\n\n private animationFinish() {\n this.cancelAnimations();\n if (!this.hide) this.hostElement.style.height = '';\n else this.hidden.emit(this.hide);\n this.isClosing = false;\n this.isExpanding = false;\n }\n\n private cancelAnimations() {\n if (this.animation) this.animation.cancel();\n }\n\n private handleClick(event: PointerEvent) {\n this.hide = true;\n this.close.emit(this.hide);\n ripple(event, this.toast);\n }\n\n private getIcon(): string {\n if (this.illustration) return '';\n if (this.icon) return this.icon;\n if (this.appearance === 'success') return check_circle;\n if (this.appearance === 'warning') return alert_exclamation_triangle;\n if (this.appearance === 'error') return alert_exclamation_circle;\n return alert_info_circle;\n }\n\n private getRole(): string {\n return this.appearance === 'error' ? 'alert' : 'status';\n }\n\n private showIcon(): boolean {\n return !this.illustration;\n }\n\n private showIllustration(): boolean {\n return !this.showIcon();\n }\n\n private showTitle(): boolean {\n return (this.hasSlottedContent || !!this.text) && !!this.heading;\n }\n\n private translate(prop: string): string {\n return translations?.[prop]?.[this.language || en] || prop;\n }\n\n private hideToast() {\n return this.hide && !(this.isClosing || this.isExpanding);\n }\n\n render() {\n return (\n <Host>\n <output\n id={this.toastId}\n class=\"pn-toast\"\n role={this.getRole()}\n data-appearance={this.appearance}\n data-temporary={this.temporary}\n data-hide={this.hideToast()}\n ref={el => (this.toast = el)}\n >\n {this.showIcon() && <pn-icon class=\"pn-toast-icon\" icon={this.getIcon()} />}\n\n <div class=\"pn-toast-content\">\n {this.showTitle() && <h4 class=\"pn-toast-heading\">{this.heading}</h4>}\n {this.text && <p class=\"pn-toast-text\">{this.text}</p>}\n <slot />\n </div>\n\n {this.showIllustration() && <pn-illustration illustration={this.illustration} width=\"5.5em\" height=\"5.5em\" />}\n\n {this.closable && (\n <button\n class=\"pn-toast-button\"\n type=\"button\"\n aria-label={this.translate('HIDE')}\n onClick={(event: PointerEvent) => this.handleClick(event)}\n ref={el => (this.button = el)}\n >\n <pn-icon icon={close} />\n </button>\n )}\n </output>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pn-toast.js","sourceRoot":"","sources":["../../../../src/components/feedback/pn-toast/pn-toast.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAgB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,wBAAwB,EACxB,KAAK,GACN,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;GAMG;AAKH,MAAM,OAAO,OAAO;;yBAUG,KAAK;2BACH,KAAK;iCAEU,KAAK;uBAMhB,EAAE;oBAKL,EAAE;;;yBAYG,KAAK;;;oBAgBsB,KAAK;wBAKjC,KAAK;wBAMiB,IAAI;;IA9DtD,K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kBAAkB;oBAC1B,IAAI,CAAC,SAAS,EAAE,IAAI,2DAAI,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,OAAO,CAAM;oBACpE,IAAI,CAAC,IAAI,IAAI,0DAAG,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,IAAI,CAAK;oBACtD,8DAAQ,CACJ;gBAEL,IAAI,CAAC,gBAAgB,EAAE,IAAI,wEAAiB,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,OAAO,GAAG;gBAE5G,IAAI,CAAC,QAAQ,IAAI,CAChB,+DACE,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,gBACD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAClC,OAAO,EAAE,CAAC,KAAmB,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EACzD,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;oBAE7B,gEAAS,IAAI,EAAE,KAAK,GAAI,CACjB,CACV,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { PnLanguages } from '@/index';\nimport { awaitTopbar, en, ripple, reduceMotion } from '@/index';\nimport { Component, Host, Prop, h, Element, EventEmitter, Event, State, Watch } from '@stencil/core';\nimport {\n alert_info_circle,\n check_circle,\n alert_exclamation_triangle,\n alert_exclamation_circle,\n close,\n} from 'pn-design-assets/pn-assets/icons.js';\nimport { translations } from './translation';\n\n/**\n * This component is able to fill many roles of a classic toast.\n * It has 4 different colors, a temporary state, hide button, icon and illustration support.\n *\n * The `pn-toast` will expand to its parent containers full width.\n * Either limit the parent width or set a CSS rule to your specific width if needed.\n */\n@Component({\n tag: 'pn-toast',\n styleUrl: 'pn-toast.scss',\n})\nexport class PnToast {\n toast: HTMLDivElement;\n button: HTMLButtonElement;\n\n private readonly duration: number = 400;\n private animationDuration: number = this.duration;\n private animation: Animation;\n\n @Element() hostElement: HTMLElement;\n\n @State() isClosing = false;\n @State() isExpanding = false;\n\n @State() hasSlottedContent: boolean = false;\n\n /**\n * Set a title for the toast. Requires the `text` prop in order to work.\n * @description Can be used together with slotted content.\n */\n @Prop() heading?: string = '';\n /**\n * Set a paragraph of text for the toast.\n * @description Can be used together with slotted content.\n */\n @Prop() text?: string = '';\n /** Give the toast a HTML ID. */\n @Prop() toastId?: string;\n /**\n * Default color is blue, you also have the option of success (green), warning (orange) and error (red).\n * @category Visual\n */\n @Prop() appearance?: '' | 'success' | 'warning' | 'error';\n /**\n * This will apply a shadow and border to the toast.\n * @category Visual\n */\n @Prop() temporary: boolean = false;\n /**\n * Set an SVG icon.\n * @category Visual\n */\n @Prop() icon?: string;\n /**\n * Set an SVG illustration.\n * @category Visual\n */\n @Prop() illustration?: string;\n /**\n * Control the visibility of the toast. If the `closable` prop is active, the toast will set the `hide` prop on its own.\n * @see {@link closable}\n * @category Features\n */\n @Prop({ mutable: true, reflect: true }) hide: boolean = false;\n /**\n * Show close button.\n * @category Features\n */\n @Prop() closable: boolean = false;\n /**\n * Manually set the language, only needed if the `closable` prop is enabled.\n * @see {@link closable}\n * @category Features\n */\n @Prop({ mutable: true }) language?: PnLanguages = null;\n\n @Watch('hide')\n handleHide() {\n if (reduceMotion()) this.animationDuration = 0;\n else this.animationDuration = this.duration;\n\n this.hostElement.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n if (this.hide) this.closeToast();\n else this.openToast();\n });\n }\n\n /** Event fired when the close button is pressed. */\n @Event() close: EventEmitter<boolean>;\n /**\n * This event is fired when the toast is fully hidden after the animation is finished.\n * Triggers from the close button or if the prop `hide` is set to true.\n **/\n @Event() hidden: EventEmitter<boolean>;\n\n async componentWillLoad() {\n if (this.hide) {\n this.hostElement.style.height = '0';\n this.hostElement.style.overflow = 'hidden';\n }\n\n if (this.language === null) await awaitTopbar(this.hostElement);\n // Any text content at this stage means there is slotted content present.\n this.hasSlottedContent = !!this.hostElement.textContent;\n }\n\n componentDidLoad() {\n if (!!this.heading && !this.text && !this.hasSlottedContent)\n console.warn('The %s prop is only available if you use the %s prop or slotted content.', 'heading', 'text');\n }\n\n private getRect(element: HTMLElement): DOMRect {\n return element.getBoundingClientRect();\n }\n\n private openToast() {\n requestAnimationFrame(() => {\n const { clientHeight } = this.toast;\n const { height } = this.getRect(this.hostElement);\n\n this.hostElement.style.height = `${height}px`;\n\n this.isExpanding = true;\n this.animateToast(true, `${height}px`, `${clientHeight}px`);\n });\n }\n\n private closeToast() {\n const { clientHeight } = this.hostElement;\n this.hostElement.style.height = `0px`;\n\n this.isClosing = true;\n this.animateToast(false, `${clientHeight}px`, `0px`);\n }\n\n private animateToast(open: boolean, startHeight: string, endHeight: string) {\n this.cancelAnimations();\n this.animation = this.hostElement.animate(\n {\n height: [startHeight, endHeight],\n },\n {\n duration: this.animationDuration,\n easing: 'cubic-bezier(0.6, 0, 0.2, 1)',\n },\n );\n this.animation.onfinish = () => this.animationFinish();\n this.animation.oncancel = () => (open ? (this.isExpanding = false) : (this.isClosing = false));\n }\n\n private animationFinish() {\n this.cancelAnimations();\n if (this.hide) this.hidden.emit(this.hide);\n else {\n this.hostElement.style.height = '';\n this.hostElement.style.overflow = '';\n }\n this.isClosing = false;\n this.isExpanding = false;\n }\n\n private cancelAnimations() {\n if (this.animation) this.animation.cancel();\n }\n\n private handleClick(event: PointerEvent) {\n this.hide = true;\n this.close.emit(this.hide);\n ripple(event, this.toast);\n }\n\n private getIcon(): string {\n if (this.illustration) return '';\n if (this.icon) return this.icon;\n if (this.appearance === 'success') return check_circle;\n if (this.appearance === 'warning') return alert_exclamation_triangle;\n if (this.appearance === 'error') return alert_exclamation_circle;\n return alert_info_circle;\n }\n\n private getRole(): string {\n return this.appearance === 'error' ? 'alert' : 'status';\n }\n\n private showIcon(): boolean {\n return !this.illustration;\n }\n\n private showIllustration(): boolean {\n return !this.showIcon();\n }\n\n private showTitle(): boolean {\n return (this.hasSlottedContent || !!this.text) && !!this.heading;\n }\n\n private translate(prop: string): string {\n return translations?.[prop]?.[this.language || en] || prop;\n }\n\n private isMoving(): boolean {\n return this.isClosing || this.isExpanding;\n }\n\n private hideToast(): boolean {\n return this.hide && !this.isMoving();\n }\n\n render() {\n return (\n <Host>\n <div\n id={this.toastId}\n class=\"pn-toast\"\n role={this.getRole()}\n data-appearance={this.appearance}\n data-temporary={this.temporary}\n data-hide={this.hideToast()}\n ref={el => (this.toast = el)}\n >\n {this.showIcon() && <pn-icon class=\"pn-toast-icon\" icon={this.getIcon()} />}\n\n <div class=\"pn-toast-content\">\n {this.showTitle() && <h4 class=\"pn-toast-heading\">{this.heading}</h4>}\n {this.text && <p class=\"pn-toast-text\">{this.text}</p>}\n <slot />\n </div>\n\n {this.showIllustration() && <pn-illustration illustration={this.illustration} width=\"5.5em\" height=\"5.5em\" />}\n\n {this.closable && (\n <button\n class=\"pn-toast-button\"\n type=\"button\"\n aria-label={this.translate('HIDE')}\n onClick={(event: PointerEvent) => this.handleClick(event)}\n ref={el => (this.button = el)}\n >\n <pn-icon icon={close} />\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -75,7 +75,7 @@ export class PnTooltip {
75
75
  }, time);
76
76
  }
77
77
  render() {
78
- return (h("button", { key: '7b0253721fbc44e83afc6daa41d984e9dbf16c0b', class: "pn-tooltip", "data-light": this.light, "data-warning": this.warning, "data-downwards": this.downwards, "data-open": this.open, ref: el => (this.button = el) }, h("pn-icon", { key: 'd6086755274289dad52757b42aa508927d0746d2', icon: this.getSymbol(), "data-simple": !!this.tooltip }), h("div", { key: 'e155c88aa2ee2b33c5622741efa59bb07ba548c7', class: "pn-tooltip-content", "data-simple": !!this.tooltip, ref: el => (this.content = el) }, this.tooltip, h("div", { key: '62a3db64ee0d4e3da5d3e2f414850f3792235f1c', hidden: !!this.tooltip }, h("slot", { key: 'e769400a4d5e1ceddc7fb6a953fe37eeea1b4218' })))));
78
+ return (h("button", { key: 'a421dbdcba2a38e9adc8f7364c5ff185372f1deb', class: "pn-tooltip", "data-light": this.light, "data-warning": this.warning, "data-downwards": this.downwards, "data-open": this.open, ref: el => (this.button = el) }, h("pn-icon", { key: '61409db0c58289bf1b606e0dc323266c0322b64b', icon: this.getSymbol(), "data-simple": !!this.tooltip }), h("div", { key: '2164d90ba6dabac1309d751772c9ae20c9c118c1', class: "pn-tooltip-content", "data-simple": !!this.tooltip, ref: el => (this.content = el) }, this.tooltip, h("div", { key: 'e30e4bdee6fe1666b5ad6154773a06fd5649dd92', hidden: !!this.tooltip }, h("slot", { key: '4456ff966d227bbca13599565c9ceb0adb6c91d6' })))));
79
79
  }
80
80
  static get is() { return "pn-tooltip"; }
81
81
  static get originalStyleUrls() {
@@ -38,7 +38,7 @@ export class PnCheckbox {
38
38
  this.handleId();
39
39
  }
40
40
  render() {
41
- return (h(Host, { key: 'f0639bf5c45347c39ef933b7f4967be10e671e46' }, h("input", { key: '560e64e32b38b40a847b3b7283255dc9e9f36f72', type: "checkbox", id: this.checkboxid, value: this.value, name: this.name || this.checkboxid, disabled: this.disabled, checked: this.checked, required: this.required, indeterminate: this.indeterminate, "aria-invalid": this.invalid?.toString(), "aria-describedby": this.helpertext && this.idHelpertext }), h("div", { key: 'ac86d6c2bd460ce3b29fe8862b9a7b64ca23e2dd', class: "pn-checkbox", "data-tile": this.tile, "data-invalid": this.invalid }, h("div", { key: '6df97a9582503dc04946f3e590dff276bf87d885', class: "pn-checkbox-outer" }, h("svg", { key: '37d8212ac1b0088ebcbe28cd02d5cc6e59352e63', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, h("polyline", { key: 'b19a548634e5fe186291a0d24c4c3f81efe8eab1', class: "pn-checkbox-checkmark-path", points: "4,12 9,17 20,6", "stroke-width": "3" }), h("polyline", { key: '040639fc42060dff6db8fab45dc713ccf81631bf', class: "pn-checkbox-indeterminate-path", points: "4,12 20,12", "stroke-width": "3" }))), (!!this.label || !!this.helpertext) && (h("p", { key: '3006b0ba0826003608453423259914a3b9622168', class: "pn-checkbox-content" }, !!this.label && (h("label", { key: '2de986fd9df0d639e5b398c24b4aa95e6e416c5d', htmlFor: this.checkboxid, class: "pn-checkbox-label" }, this.label)), !!this.helpertext && (h("span", { key: '13c417fef46e456a1e036a22c9655da2fa19de24', id: this.idHelpertext, class: "pn-checkbox-helpertext" }, this.helpertext)))), this.tile && this.icon && h("pn-icon", { key: '204b119d1bf7da4ce2fb90d1f53114b6a5ada7dd', icon: this.icon, color: "gray900" }))));
41
+ return (h(Host, { key: 'c3bcdee583919c5f6f11f2e21cb5362f96ac1633' }, h("input", { key: '10e34d60ff748c2d99c9e3740c69a17016ca3223', type: "checkbox", id: this.checkboxid, value: this.value, name: this.name || this.checkboxid, disabled: this.disabled, checked: this.checked, required: this.required, indeterminate: this.indeterminate, "aria-invalid": this.invalid?.toString(), "aria-describedby": this.helpertext && this.idHelpertext }), h("div", { key: '15e4f62557b23b99ab344f32dcfa2103c395b9ed', class: "pn-checkbox", "data-tile": this.tile, "data-invalid": this.invalid }, h("div", { key: '98e4eb05092b3fe4d9e30b748e89d3bd104925ff', class: "pn-checkbox-outer" }, h("svg", { key: 'a39edd1e675ba5b131059f1bd8b0d7f6fea9370b', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, h("polyline", { key: 'a355d7729c12497f133cde364c7ff9601f9940db', class: "pn-checkbox-checkmark-path", points: "4,12 9,17 20,6", "stroke-width": "3" }), h("polyline", { key: '18c274c70036a5a3aae8b333c513d053061945cf', class: "pn-checkbox-indeterminate-path", points: "4,12 20,12", "stroke-width": "3" }))), (!!this.label || !!this.helpertext) && (h("p", { key: '1499f1e5d14dc15cc5691429fd8565c1e16b4fda', class: "pn-checkbox-content" }, !!this.label && (h("label", { key: '87ca925b4af005c6cbec279a3209fcd5d92a4ae8', htmlFor: this.checkboxid, class: "pn-checkbox-label" }, this.label)), !!this.helpertext && (h("span", { key: '6808421c4151d5ad4711477d165e0d8a9bdaceae', id: this.idHelpertext, class: "pn-checkbox-helpertext" }, this.helpertext)))), this.tile && this.icon && h("pn-icon", { key: '0f182a49401f04adf6944a82490d838bd114f38b', icon: this.icon, color: "gray900" }))));
42
42
  }
43
43
  static get is() { return "pn-checkbox"; }
44
44
  static get originalStyleUrls() {
@@ -28,7 +28,7 @@ export class PnChoiceChip {
28
28
  }
29
29
  hostElement;
30
30
  render() {
31
- return (h(Host, { key: '5ff90532fb75531aa8fcb23fd4dd0ae0dfc7d33a' }, h("div", { key: '500cb322689763c229ac303d1d62643a620c74ed', class: "pn-choice-chip" }, h("input", { key: '88feb0c54e20951c8c6e9d761323e1806e4583bd', type: this.radio ? 'radio' : 'checkbox', id: this.choiceid, value: this.value, name: this.name, checked: this.checked, required: this.required, disabled: this.disabled }), h("div", { key: 'd1ed91ded7233f9229bdbde4f9c40b5c86a67fba', class: "pn-choice-chip-container", "data-icon": !!this.icon, "data-small": this.small, "data-large": this.large }, h("div", { key: '29f8378c640a6553416507e2ca0454bca47c557c', class: "pn-choice-chip-icon" }, h("pn-icon", { key: 'f70f7191ade89323265b312cc881141edffc4296', color: "blue700", class: "pn-choice-chip-icon-check", icon: check }), !!this.icon && h("pn-icon", { key: '87d85e74effe1b65d949b0735a50f5b4a56acf25', color: "blue700", class: "pn-choice-chip-icon-user", icon: this.icon })), h("label", { key: '772f0726fcaada44af2c10ab922bb3eb151886b7', class: "pn-choice-chip-label", htmlFor: this.choiceid }, h("span", { key: '7c5bf78b2811a70308663bfb1be95420ce7ca30d' }, this.label), h("slot", { key: '6fd6ee5beb63f38285b273f0a73d41e5895cc8e6' }))))));
31
+ return (h(Host, { key: '163abbbcca43588ea04866d4826bd7b30b88324d' }, h("div", { key: '2af33c1a26f70b59d22db00a943c09b43eaf3523', class: "pn-choice-chip" }, h("input", { key: '23dbbfe5102e681efbf6d08c30e64fb6f8761300', type: this.radio ? 'radio' : 'checkbox', id: this.choiceid, value: this.value, name: this.name, checked: this.checked, required: this.required, disabled: this.disabled }), h("div", { key: 'c57f848d0458880a41f030691e9fa6bef497bf18', class: "pn-choice-chip-container", "data-icon": !!this.icon, "data-small": this.small, "data-large": this.large }, h("div", { key: '2978e8c81a0f4057a70e1cb29d94768040ecfd95', class: "pn-choice-chip-icon" }, h("pn-icon", { key: '62101eaa67f7351df8657b4df56e145d54ca4468', color: "blue700", class: "pn-choice-chip-icon-check", icon: check }), !!this.icon && h("pn-icon", { key: '06c50dad1d7e2b78a36d4c923878633d489b0d55', color: "blue700", class: "pn-choice-chip-icon-user", icon: this.icon })), h("label", { key: '502b02b9c9e30d56a39aa425af8b6c9bf755b8c9', class: "pn-choice-chip-label", htmlFor: this.choiceid }, h("span", { key: '79f7c5b812fbd06c54af2d14f08d2e0a7ae1f520' }, this.label), h("slot", { key: 'f90c14659d035a662fca81e4045e7523b60f8a46' }))))));
32
32
  }
33
33
  static get is() { return "pn-choice-chip"; }
34
34
  static get originalStyleUrls() {
@@ -175,7 +175,7 @@ export class PnCounter {
175
175
  this.counterElement.style.setProperty('--pn-counter-ch', '0ch');
176
176
  }
177
177
  render() {
178
- return (h(Host, { key: '2fe59aa7c06e3005cd3f9c8b633bf3ee3c85833b' }, h("div", { key: '206308ce9ff21a303013164a3ec4015074d494b2', class: "pn-counter", role: "group", "aria-labelledby": this.idLabel, "aria-describedby": this.describedbyIds() }, h("label", { key: '6843e23ed0c46cf33aaa6b83c9c7304775dba549', htmlFor: this.counterid, class: "pn-counter-label", id: this.idLabel }, h("span", { key: 'cbc609092923ef8806d7b5e77beb26021b490d44' }, this.label)), h("div", { key: 'df51b364dc11c020d390f3bed823caf7063a9c94', class: "pn-counter-items", "data-hidebuttons": this.noButtons() }, h("pn-button", { key: '52413b869322b9398eddfb81713609205594d59f', "data-decrease": true, appearance: "light", variant: "outlined", "no-tab": this.noButtons(), icon: minus, iconOnly: true, arialabel: this.labelDecrease || this.translate('DECREASE'), onClick: () => this.decreaseAmount() }), h("input", { key: '8c9dd73dba29a17df0515758a48be4f4f8798bbf', id: this.counterid, class: "pn-counter-input", type: "number", min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, required: this.required, readonly: this.readonly, disabled: this.disabled, "aria-describedby": this.describedbyIds(), onInput: e => this.setVal(e), onKeyDown: (e) => this.keyBoardInput(e) }), h("pn-button", { key: 'c10fc2e4f25708ed81dc95b8ea07c0c07803df1f', "data-increase": true, appearance: "light", variant: "outlined", "no-tab": this.noButtons(), icon: plus, iconOnly: true, arialabel: this.labelIncrease || this.translate('INCREASE'), onClick: () => this.increaseAmount() })), !!this.getTextMessage() && (h("p", { key: 'e01ab71ae17a042681b5c3a87766bac914c6be10', id: this.idText, class: "pn-counter-helpertext" }, h("span", { key: 'd51a1a0e851e7a6afe79a3c384167324c906939a' }, this.getTextMessage()))), h("p", { key: 'c89af26fd950c7166cec80b08feb1651feb54bba', id: this.idAmount, class: "pn-counter-sr-only", "aria-live": "assertive" }, this.displaySrValue ? this.getTextMessage(true) : ''))));
178
+ return (h(Host, { key: 'ae9451959e2ebc720b69af2942deaa5d94e36565' }, h("div", { key: 'f631dd7d8c7acbb4a459b46da53ea3445ae96480', class: "pn-counter", role: "group", "aria-labelledby": this.idLabel, "aria-describedby": this.describedbyIds() }, h("label", { key: '2538568f65666aedc3a0f9e2f3f681b4b9647cd6', htmlFor: this.counterid, class: "pn-counter-label", id: this.idLabel }, h("span", { key: '73abf4ec6f185201f95799910a70518f61f85577' }, this.label)), h("div", { key: '8e99e77f67aae105b90052ed74ba6c3a438e22ca', class: "pn-counter-items", "data-hidebuttons": this.noButtons() }, h("pn-button", { key: '8d6f5c4af2a524bb43a3023c130b2a6e1814c53d', "data-decrease": true, appearance: "light", variant: "outlined", "no-tab": this.noButtons(), icon: minus, iconOnly: true, arialabel: this.labelDecrease || this.translate('DECREASE'), onClick: () => this.decreaseAmount() }), h("input", { key: '93ab63799f90cdecdbf3694ca56dfe92a5fe9e80', id: this.counterid, class: "pn-counter-input", type: "number", min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, required: this.required, readonly: this.readonly, disabled: this.disabled, "aria-describedby": this.describedbyIds(), onInput: e => this.setVal(e), onKeyDown: (e) => this.keyBoardInput(e) }), h("pn-button", { key: 'a39f90c5ace631d8973a700f72d57a2490cad342', "data-increase": true, appearance: "light", variant: "outlined", "no-tab": this.noButtons(), icon: plus, iconOnly: true, arialabel: this.labelIncrease || this.translate('INCREASE'), onClick: () => this.increaseAmount() })), !!this.getTextMessage() && (h("p", { key: '0ed6cc20cb56637faa7d70c6fe903a5e412fff0e', id: this.idText, class: "pn-counter-helpertext" }, h("span", { key: 'def00a454a70d4ebc952cdfbfdb5b11eece74452' }, this.getTextMessage()))), h("p", { key: 'eef2cf6b2f193779d616e09c32a9fc0ece4c5104', id: this.idAmount, class: "pn-counter-sr-only", "aria-live": "assertive" }, this.displaySrValue ? this.getTextMessage(true) : ''))));
179
179
  }
180
180
  static get is() { return "pn-counter"; }
181
181
  static get originalStyleUrls() {
@@ -243,7 +243,6 @@ pn-date-picker .pn-date-picker-calendar {
243
243
  box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.1);
244
244
  }
245
245
  pn-date-picker .pn-date-picker-calendar[data-range] {
246
- width: 100%;
247
246
  max-width: unset;
248
247
  }
249
248
  pn-date-picker .pn-date-picker-calendar[data-open], pn-date-picker .pn-date-picker-calendar[data-moving] {
@@ -379,8 +378,8 @@ pn-date-picker .pn-date-picker-td[aria-selected=true][data-single]:before {
379
378
  }
380
379
  pn-date-picker .pn-date-picker-td[aria-selected=true][data-range]:before {
381
380
  border-radius: 0;
382
- border-left: 0;
383
- border-right: 0;
381
+ border-left-width: 0;
382
+ border-right-width: 0;
384
383
  }
385
384
  pn-date-picker .pn-date-picker-td[aria-selected=true][data-range-from]:before {
386
385
  border-radius: 0.5em 0 0 0.5em;
@@ -3,7 +3,7 @@
3
3
  * By PostNord.
4
4
  */
5
5
  import { h, Host } from "@stencil/core";
6
- import { awaitTopbar, uuidv4, en, getTotalHeightOffset, reduceMotion } from "../../../index";
6
+ import { awaitTopbar, uuidv4, en, getTotalHeightOffset, reduceMotion, getMenuWidth } from "../../../index";
7
7
  import { translations } from "./translations";
8
8
  import { CALENDAR, MONTHS, YEARS, validateDate, isBefore, isAfter, selectedDate, getDateObject, getDiff, getToday, getDate, getReadableDate, getGrid, setYear, setMonth, navigateGrid, } from "../../../globals/date/index";
9
9
  import { calendar, arrow_left, arrow_right, pn_return } from "pn-design-assets/pn-assets/icons.js";
@@ -165,11 +165,27 @@ export class PnDatePicker {
165
165
  const fitDownwards = spaceDownwards > scrollHeight;
166
166
  const openTop = (this.openUp && (fitUpwards || spaceUpwards > spaceDownwards)) || (!fitDownwards && fitUpwards);
167
167
  this.openUp = openTop;
168
- // Calc y-axis
168
+ // Calc horizontal positioning - center calendar relative to host element
169
169
  const rectCal = this.getRect(this.calendarElement);
170
- const widthMinusRight = innerWidth - rectCal.right;
171
- const offset = 0 > widthMinusRight ? widthMinusRight - 8 : 0;
172
- this.calendarElement.style.setProperty('--pn-calendar-offset-left', `${Math.floor(offset)}px`);
170
+ const menuWidth = getMenuWidth();
171
+ // Calculate center position: host center minus half of calendar width
172
+ const hostCenterX = rectHost.x + rectHost.width / 2;
173
+ const calendarHalfWidth = rectCal.width / 2;
174
+ const idealCenterOffset = hostCenterX - calendarHalfWidth - rectCal.x;
175
+ // Check boundaries, accounting for menu width on the left
176
+ const calendarLeftEdge = rectCal.x + idealCenterOffset;
177
+ const calendarRightEdge = calendarLeftEdge + rectCal.width;
178
+ const leftBoundary = menuWidth + 16; // Menu width + buffer
179
+ let finalOffset = idealCenterOffset;
180
+ // Adjust if calendar would go beyond left edge of viewport or over the menu
181
+ if (calendarLeftEdge < leftBoundary) {
182
+ finalOffset = leftBoundary - rectCal.x;
183
+ }
184
+ // Adjust if calendar would go beyond right edge of viewport
185
+ else if (calendarRightEdge > innerWidth - 16) {
186
+ finalOffset = innerWidth - 16 - rectCal.width - rectCal.x;
187
+ }
188
+ this.calendarElement.style.setProperty('--pn-calendar-offset-left', `${Math.floor(finalOffset)}px`);
173
189
  });
174
190
  }
175
191
  handleMessage() {
@@ -662,7 +678,7 @@ export class PnDatePicker {
662
678
  return (h("div", { class: "pn-date-picker-container", "data-error": this.hasError() }, h("label", { class: "pn-date-picker-label", htmlFor: id }, h("span", null, label)), h("div", { class: "pn-date-picker-field" }, h("input", { type: "text", id: id, class: "pn-date-picker-input", name: this.name, placeholder: placeholder, autocomplete: this.autocomplete, maxlength: this.disableMaxLength ? null : this.format.length, list: list, pattern: this.pattern, value: value, disabled: this.disabled, required: this.required, readonly: this.readonly, "aria-describedby": this.ariaDescribedby(), "aria-invalid": this.hasError()?.toString(), onInput: e => this.inputHandler(e, to), "data-active": editing }), showButton && (h("pn-button", { class: "pn-date-picker-toggle", buttonId: idButton, icon: calendar, iconOnly: true, appearance: "light", arialabel: textButton, ariaexpanded: this.open.toString(), ariacontrols: this.idCalendar, "data-active": this.open, "data-input": true, small: true, onPnClick: () => this.toggleGrid(null, to), onKeyDown: e => this.handleButtonBlur(e) })))));
663
679
  }
664
680
  render() {
665
- return (h(Host, { key: '6122e6224b4aa8570a714522dc323088074f5185' }, h("div", { key: 'd7d3c86378c680d3ddd14d9f3cb073f4bb42e2cf', class: "pn-date-picker" }, this.renderInput(), this.range && (h("div", { key: '3f02b31a0e03aef31b84777d6047d1b328ff633d', class: "pn-date-picker-range-icon test" }, h("pn-icon", { key: 'ad328bd870726dea04b2496d2059a67de218ceac', icon: arrow_right }))), this.range && this.renderInput({ to: this.range })), h("div", { key: '71c8518c6500591a4c0d7dc72681d9bcad264641', id: this.idCalendar, class: "pn-date-picker-calendar", role: "dialog", "aria-label": this.translate('CALENDAR_NAVIGATION'), "data-open": this.open, "data-moving": this.isClosing || this.isExpanding, "data-direction": this.openUp ? 'top' : 'bottom', "data-range": this.range, style: { height: '0px' }, ref: el => (this.calendarElement = el), onKeyDown: e => this.handleCalendarTabEsc(e) }, h("div", { key: '277f45e3372d096521889fa4bca4c1971346f0d3', class: "pn-date-picker-wrapper" }, h("nav", { key: '06336288e1d9a65ba4aa796328b09003cb79271d', class: "pn-date-picker-nav", "aria-labelledby": this.idCalendar }, h("pn-button", { key: '6361907855287330a3e9c537ce02bd948baccaa4', hidden: this.viewingMonth(), small: true, appearance: "light", arialabel: this.translate(`PREVIOUS_${this.viewType().toUpperCase()}`), icon: arrow_left, iconOnly: true, onPnClick: () => this.setNavView({ minus: true }) }), h("pn-button", { key: '21ae6b846df3bd12b314cb6b40f6d60dc8a0cc02', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(MONTHS) }, h("span", { key: '9f555bfea7f07abb32d8e96e6d84b547b4946899', class: "pn-date-picker-month", "data-full": true }, this.translateDateText({ date: 1 }, 'MMMM')), h("span", { key: '0a434038cb6ceb7fb52e89161408da00c8f3e0e3', class: "pn-date-picker-month", "data-abbr": true }, this.translateDateText({ date: 1 }, 'MMM'))), h("h2", { key: 'c63bfdcb83caf9fe9aec34416060d4ffe6ae6b08', hidden: this.viewingCalendar(), class: "pn-date-picker-title" }, this.translate(`SELECT_${this.viewType().toUpperCase()}`)), h("pn-button", { key: '502e44a09ca6194365542c1223e3e994e2fbe9d0', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(YEARS) }, h("span", { key: 'e0e9bbe7234ae0ce544fc3b89c94c798f3a60123' }, this.dateViewYear)), h("pn-button", { key: 'f93f7301ab9b61cd386dcdb19df482a7b1f4a15d', hidden: this.viewingMonth(), small: true, appearance: "light", arialabel: this.translate(`NEXT_${this.viewType().toUpperCase()}`), icon: arrow_right, iconOnly: true, onPnClick: () => this.setNavView({ plus: true }) })), this.viewingYears() && this.renderYearGrid(), this.viewingMonth() && this.renderMonthGrid(), this.viewingCalendar() && this.renderDateGrid(), h("aside", { key: '3473b9b53b3d0007828a367f05dcbb6fb3959e7e', class: "pn-date-picker-chips" }, h("slot", { key: '94e47d8d7feb1caa5db4fd24d97500258e1c4f98', name: "chips" })), h("nav", { key: '2245cab78f67e9ecf3932bda19075b13cfa27d61', class: "pn-date-picker-bottom", hidden: this.viewingCalendar() }, h("pn-button", { key: 'e8163e75c8197331f7ab77ed6a2fb94fde445131', appearance: "light", variant: "outlined", small: true, icon: pn_return, onPnClick: () => this.setView(CALENDAR) }, h("span", { key: '3a9028867b88cb831ef4cfc35039a10299c8fdeb' }, this.translate('GO_CALENDAR')))))), h("p", { key: 'dd4412fdfff7ef9c1c254a09c38831908c10c010', id: this.idHelper, class: "pn-date-picker-helpertext", hidden: !this.hasHelperText() || this.hasError() }, h("span", { key: 'd61ee102ecb131c481e220c073fe268b9228ebbb' }, this.helpertext), h("slot", { key: '3d54b17455d0e7a2a72564856978eee3e3f8ef45', name: "helpertext" })), h("p", { key: 'f42fd4bdff5c0ad22c3de99725bf1dbedd5788c8', id: this.idError, class: "pn-date-picker-error", role: "alert", hidden: !this.hasErrorMessage() }, h("span", { key: '69d7fd68b1157960d095ace9a423a1a3a08702fc' }, this.error), h("slot", { key: 'd2676dccff19ee3a22fe62b077f44c509500f267', name: "error" }))));
681
+ return (h(Host, { key: '683125ae4363ce235cc3aec68a1d4003593425d1' }, h("div", { key: 'cf4cf8baae7d387533013fe59722bb4401431dbd', class: "pn-date-picker" }, this.renderInput(), this.range && (h("div", { key: 'fae36c22bd631fde3313c2240cd33e6f871ff405', class: "pn-date-picker-range-icon test" }, h("pn-icon", { key: 'd0f18d8a7ff81248471b27975eb24242fc8b5157', icon: arrow_right }))), this.range && this.renderInput({ to: this.range })), h("div", { key: '6f4f250edc36dd15d4a5a330bf5d8c5125289a09', id: this.idCalendar, class: "pn-date-picker-calendar", role: "dialog", "aria-label": this.translate('CALENDAR_NAVIGATION'), "data-open": this.open, "data-moving": this.isClosing || this.isExpanding, "data-direction": this.openUp ? 'top' : 'bottom', "data-range": this.range, style: { height: '0px' }, ref: el => (this.calendarElement = el), onKeyDown: e => this.handleCalendarTabEsc(e) }, h("div", { key: 'a8821cca04a6301bd148c3dbfee28bf86c94e543', class: "pn-date-picker-wrapper" }, h("nav", { key: '38f404ea6187d754ac44160bcda2291e0739610d', class: "pn-date-picker-nav", "aria-labelledby": this.idCalendar }, h("pn-button", { key: '923845f5df9f35ff74ffeb2ed63c903696a4399d', hidden: this.viewingMonth(), small: true, appearance: "light", arialabel: this.translate(`PREVIOUS_${this.viewType().toUpperCase()}`), icon: arrow_left, iconOnly: true, onPnClick: () => this.setNavView({ minus: true }) }), h("pn-button", { key: '32e6f337bc1b82adcf11b2668974c0c4b9f2c730', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(MONTHS) }, h("span", { key: 'e1bcc4e89726d5c25e94d87b283b543987674f2d', class: "pn-date-picker-month", "data-full": true }, this.translateDateText({ date: 1 }, 'MMMM')), h("span", { key: 'b93becc6c92ef4693f158e08276aa21e496d10c3', class: "pn-date-picker-month", "data-abbr": true }, this.translateDateText({ date: 1 }, 'MMM'))), h("h2", { key: '1aa3fc4c553858c947205610a4958fc153f63527', hidden: this.viewingCalendar(), class: "pn-date-picker-title" }, this.translate(`SELECT_${this.viewType().toUpperCase()}`)), h("pn-button", { key: '16fdeb8efb9744d9fb5db3b41eea172ad9b49c32', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(YEARS) }, h("span", { key: '491246d413dd42fe794d155720f847d9339bf81f' }, this.dateViewYear)), h("pn-button", { key: '8a2acfd530f049d13972125dd6e6fc8120020b18', hidden: this.viewingMonth(), small: true, appearance: "light", arialabel: this.translate(`NEXT_${this.viewType().toUpperCase()}`), icon: arrow_right, iconOnly: true, onPnClick: () => this.setNavView({ plus: true }) })), this.viewingYears() && this.renderYearGrid(), this.viewingMonth() && this.renderMonthGrid(), this.viewingCalendar() && this.renderDateGrid(), h("aside", { key: '7905780579fdbea9ff9bc03c05208c6714a1b690', class: "pn-date-picker-chips" }, h("slot", { key: '3aacde33dde852b97b75327c378248395bf74b03', name: "chips" })), h("nav", { key: '37bf1f4447f480986bf905375149d40d42318374', class: "pn-date-picker-bottom", hidden: this.viewingCalendar() }, h("pn-button", { key: '0ba2954cf4f994e5befcf0546e45333b1a0030c2', appearance: "light", variant: "outlined", small: true, icon: pn_return, onPnClick: () => this.setView(CALENDAR) }, h("span", { key: 'f6af5dbb4dff963d6b07147f1573f22797abd4e4' }, this.translate('GO_CALENDAR')))))), h("p", { key: '4ceaeea86eeeb3e6cafa2b09343ee1b3ff7fada8', id: this.idHelper, class: "pn-date-picker-helpertext", hidden: !this.hasHelperText() || this.hasError() }, h("span", { key: 'b40445ded778af04b0313e84645226fe59e0bc9a' }, this.helpertext), h("slot", { key: '0cf4aee251e8aaf33618c9f318451069b6bfe22f', name: "helpertext" })), h("p", { key: 'dbcc74e7fdea8f7b1053226448cbc419ebaf9498', id: this.idError, class: "pn-date-picker-error", role: "alert", hidden: !this.hasErrorMessage() }, h("span", { key: '9cc3055b8389abadd3f7d2303cc755b71cc238b3' }, this.error), h("slot", { key: '4c1eef7f48dba08b33f05b836f55abcc39b5abe3', name: "error" }))));
666
682
  }
667
683
  static get is() { return "pn-date-picker"; }
668
684
  static get originalStyleUrls() {