@postnord/pn-marketweb-components 4.3.6 → 4.3.7

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 (417) hide show
  1. package/cjs/{convert-9361e443.js → convert-aa209554.js} +27 -17
  2. package/cjs/convert-aa209554.js.map +1 -0
  3. package/cjs/pn-find-price.cjs.entry.js +1 -1
  4. package/cjs/pn-find-service-and-price.cjs.entry.js +1 -1
  5. package/cjs/pn-product-pricelist.cjs.entry.js +1 -1
  6. package/cjs/pn-teaser-card.cjs.entry.js +1 -1
  7. package/cjs/pn-teaser-card.cjs.entry.js.map +1 -1
  8. package/collection/components/cards/pn-teaser-card/pn-teaser-card.css +2 -2
  9. package/components/convert.js +26 -16
  10. package/components/convert.js.map +1 -1
  11. package/components/pn-teaser-card.js +1 -1
  12. package/components/pn-teaser-card.js.map +1 -1
  13. package/esm/{convert-ecca01b6.js → convert-a9a18794.js} +27 -17
  14. package/esm/convert-a9a18794.js.map +1 -0
  15. package/esm/pn-find-price.entry.js +1 -1
  16. package/esm/pn-find-service-and-price.entry.js +1 -1
  17. package/esm/pn-product-pricelist.entry.js +1 -1
  18. package/esm/pn-teaser-card.entry.js +1 -1
  19. package/esm/pn-teaser-card.entry.js.map +1 -1
  20. package/package.json +1 -1
  21. package/pn-market-web-components/p-00e6bb4b.js +2 -0
  22. package/pn-market-web-components/p-00e6bb4b.js.map +1 -0
  23. package/pn-market-web-components/{p-c4059cc1.entry.js → p-181e40ee.entry.js} +2 -2
  24. package/pn-market-web-components/{p-6d263c6e.entry.js → p-96d81eb2.entry.js} +2 -2
  25. package/pn-market-web-components/p-96d81eb2.entry.js.map +1 -0
  26. package/pn-market-web-components/{p-f8ccc718.entry.js → p-a0d7154f.entry.js} +2 -2
  27. package/pn-market-web-components/{p-413afe7c.entry.js → p-c18154a4.entry.js} +2 -2
  28. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  29. package/umd/modules/@postnord/web-components/cem.json +12220 -0
  30. package/umd/modules/@postnord/web-components/cjs/{index-CfUQZtlH.js → index-DWu-2oJc.js} +144 -85
  31. package/umd/modules/@postnord/web-components/cjs/{index-CNdVg5VI.js → index-vOySuOUW.js} +1 -1
  32. package/umd/modules/@postnord/web-components/cjs/index.cjs.js +18 -16
  33. package/umd/modules/@postnord/web-components/cjs/loader.cjs.js +2 -2
  34. package/umd/modules/@postnord/web-components/cjs/pn-accordion-row.cjs.entry.js +2 -2
  35. package/umd/modules/@postnord/web-components/cjs/pn-accordion.cjs.entry.js +5 -4
  36. package/umd/modules/@postnord/web-components/cjs/pn-action-menu.cjs.entry.js +6 -6
  37. package/umd/modules/@postnord/web-components/cjs/pn-button-dropdown.cjs.entry.js +1 -1
  38. package/umd/modules/@postnord/web-components/cjs/pn-button_2.cjs.entry.js +3 -3
  39. package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +4 -4
  40. package/umd/modules/@postnord/web-components/cjs/pn-checkbox.cjs.entry.js +63 -21
  41. package/umd/modules/@postnord/web-components/cjs/pn-choice-chip.cjs.entry.js +38 -18
  42. package/umd/modules/@postnord/web-components/cjs/pn-counter.cjs.entry.js +71 -37
  43. package/umd/modules/@postnord/web-components/cjs/pn-date-picker.cjs.entry.js +185 -103
  44. package/umd/modules/@postnord/web-components/cjs/pn-fieldset.cjs.entry.js +33 -27
  45. package/umd/modules/@postnord/web-components/cjs/pn-file-upload.cjs.entry.js +73 -42
  46. package/umd/modules/@postnord/web-components/cjs/pn-footer.cjs.entry.js +2 -2
  47. package/umd/modules/@postnord/web-components/cjs/pn-header.cjs.entry.js +2 -2
  48. package/umd/modules/@postnord/web-components/cjs/pn-icon_2.cjs.entry.js +8 -10
  49. package/umd/modules/@postnord/web-components/cjs/pn-illustration.cjs.entry.js +3 -3
  50. package/umd/modules/@postnord/web-components/cjs/pn-input.cjs.entry.js +122 -89
  51. package/umd/modules/@postnord/web-components/cjs/pn-modal.cjs.entry.js +24 -12
  52. package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +136 -52
  53. package/umd/modules/@postnord/web-components/cjs/pn-ocr-search.cjs.entry.js +2 -2
  54. package/umd/modules/@postnord/web-components/cjs/pn-page-nav-dropdown-item.cjs.entry.js +3 -3
  55. package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +3 -3
  56. package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +3 -3
  57. package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +4 -4
  58. package/umd/modules/@postnord/web-components/cjs/pn-progress-bar.cjs.entry.js +2 -2
  59. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator-step.cjs.entry.js +3 -3
  60. package/umd/modules/@postnord/web-components/cjs/pn-progress-indicator.cjs.entry.js +3 -3
  61. package/umd/modules/@postnord/web-components/cjs/pn-progress-stepper.cjs.entry.js +2 -2
  62. package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +61 -20
  63. package/umd/modules/@postnord/web-components/cjs/pn-range.cjs.entry.js +88 -43
  64. package/umd/modules/@postnord/web-components/cjs/pn-read-only-button.cjs.entry.js +1 -1
  65. package/umd/modules/@postnord/web-components/cjs/pn-search-field.cjs.entry.js +42 -25
  66. package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +16 -11
  67. package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +21 -21
  68. package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +90 -35
  69. package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +15 -10
  70. package/umd/modules/@postnord/web-components/cjs/pn-table.cjs.entry.js +1 -1
  71. package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js +5 -4
  72. package/umd/modules/@postnord/web-components/cjs/pn-text-link.cjs.entry.js +2 -2
  73. package/umd/modules/@postnord/web-components/cjs/pn-textarea.cjs.entry.js +88 -34
  74. package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +3 -3
  75. package/umd/modules/@postnord/web-components/cjs/pn-toast.cjs.entry.js +5 -5
  76. package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +56 -20
  77. package/umd/modules/@postnord/web-components/cjs/pn-tooltip.cjs.entry.js +2 -2
  78. package/umd/modules/@postnord/web-components/cjs/pn-wizard.cjs.entry.js +71 -49
  79. package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +3 -3
  80. package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +3 -3
  81. package/umd/modules/@postnord/web-components/collection/collection-manifest.json +4 -1
  82. package/umd/modules/@postnord/web-components/collection/components/buttons/pn-action-menu/pn-action-menu.css +1 -10
  83. package/umd/modules/@postnord/web-components/collection/components/content/pn-accordion/pn-accordion.js +5 -4
  84. package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-icon/pn-icon.css +13 -9
  85. package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-icon/pn-icon.js +12 -14
  86. package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-illustration/pn-illustration.css +6 -2
  87. package/umd/modules/@postnord/web-components/collection/components/design-tokens/pn-illustration/pn-illustration.js +7 -1
  88. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.css +4 -1
  89. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-modal/pn-modal.js +71 -13
  90. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-bar/pn-progress-bar.js +1 -1
  91. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator-step/pn-progress-indicator-step.js +1 -1
  92. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-indicator/pn-progress-indicator.js +1 -1
  93. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-progress-stepper/pn-progress-stepper.js +1 -1
  94. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-spinner/pn-spinner.js +1 -1
  95. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-toast/pn-toast.js +1 -1
  96. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-tooltip/pn-tooltip.js +1 -1
  97. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-wizard/pn-wizard.css +5 -5
  98. package/umd/modules/@postnord/web-components/collection/components/feedback/pn-wizard/pn-wizard.js +70 -45
  99. package/umd/modules/@postnord/web-components/collection/components/input/pn-checkbox/pn-checkbox.css +3 -1
  100. package/umd/modules/@postnord/web-components/collection/components/input/pn-checkbox/pn-checkbox.js +213 -52
  101. package/umd/modules/@postnord/web-components/collection/components/input/pn-choice-chip/pn-choice-chip.css +1 -1
  102. package/umd/modules/@postnord/web-components/collection/components/input/pn-choice-chip/pn-choice-chip.js +128 -68
  103. package/umd/modules/@postnord/web-components/collection/components/input/pn-counter/pn-counter.js +305 -154
  104. package/umd/modules/@postnord/web-components/collection/components/input/pn-date-picker/pn-date-picker.js +562 -275
  105. package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.css +21 -16
  106. package/umd/modules/@postnord/web-components/collection/components/input/pn-fieldset/pn-fieldset.js +114 -54
  107. package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.css +37 -50
  108. package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/pn-file-upload.js +159 -97
  109. package/umd/modules/@postnord/web-components/collection/components/input/pn-file-upload/translation.js +7 -0
  110. package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.css +1 -1
  111. package/umd/modules/@postnord/web-components/collection/components/input/pn-input/pn-input.js +415 -264
  112. package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.css +13 -24
  113. package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +316 -131
  114. package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.css +3 -1
  115. package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.js +223 -63
  116. package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.css +3 -0
  117. package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.js +357 -191
  118. package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.css +6 -9
  119. package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.js +177 -90
  120. package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.css +1 -1
  121. package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.js +24 -24
  122. package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/segment/pn-segment.js +84 -37
  123. package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.css +18 -14
  124. package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +237 -90
  125. package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.css +6 -5
  126. package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +255 -115
  127. package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.css +5 -3
  128. package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.js +216 -68
  129. package/umd/modules/@postnord/web-components/collection/components/layout/pn-header/pn-header.js +1 -1
  130. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-card/pn-card.css +2 -2
  131. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-card/pn-card.js +1 -1
  132. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-footer/pn-footer.js +1 -1
  133. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/dropdown-item/pn-page-nav-dropdown-item.js +1 -1
  134. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/item/pn-page-nav-item.js +1 -1
  135. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js +1 -1
  136. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-pagination/pn-pagination.js +1 -1
  137. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js +4 -3
  138. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.css +3 -3
  139. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.js +11 -6
  140. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-text-link/pn-text-link.js +1 -1
  141. package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tile/pn-tile.js +1 -1
  142. package/umd/modules/@postnord/web-components/collection/components/web-components/pn-ocr-search/pn-ocr-search.js +1 -1
  143. package/umd/modules/@postnord/web-components/collection/components/web-components/pn-zipcode-search/pn-zipcode-search.js +1 -1
  144. package/umd/modules/@postnord/web-components/collection/globals/helpers.js +16 -14
  145. package/umd/modules/@postnord/web-components/components/helpers.js +1 -1
  146. package/umd/modules/@postnord/web-components/components/pn-accordion.js +1 -1
  147. package/umd/modules/@postnord/web-components/components/pn-action-menu.js +1 -1
  148. package/umd/modules/@postnord/web-components/components/pn-card.js +1 -1
  149. package/umd/modules/@postnord/web-components/components/pn-checkbox.js +1 -1
  150. package/umd/modules/@postnord/web-components/components/pn-choice-chip.js +1 -1
  151. package/umd/modules/@postnord/web-components/components/pn-counter.js +1 -1
  152. package/umd/modules/@postnord/web-components/components/pn-date-picker.js +1 -1
  153. package/umd/modules/@postnord/web-components/components/pn-fieldset.js +1 -1
  154. package/umd/modules/@postnord/web-components/components/pn-file-upload.js +1 -1
  155. package/umd/modules/@postnord/web-components/components/pn-footer.js +1 -1
  156. package/umd/modules/@postnord/web-components/components/pn-header.js +1 -1
  157. package/umd/modules/@postnord/web-components/components/pn-icon2.js +1 -1
  158. package/umd/modules/@postnord/web-components/components/pn-illustration2.js +1 -1
  159. package/umd/modules/@postnord/web-components/components/pn-input2.js +1 -1
  160. package/umd/modules/@postnord/web-components/components/pn-modal.js +1 -1
  161. package/umd/modules/@postnord/web-components/components/pn-multiselect.js +1 -1
  162. package/umd/modules/@postnord/web-components/components/pn-ocr-search.js +1 -1
  163. package/umd/modules/@postnord/web-components/components/pn-page-nav-dropdown-item.js +1 -1
  164. package/umd/modules/@postnord/web-components/components/pn-page-nav-item.js +1 -1
  165. package/umd/modules/@postnord/web-components/components/pn-page-nav.js +1 -1
  166. package/umd/modules/@postnord/web-components/components/pn-pagination.js +1 -1
  167. package/umd/modules/@postnord/web-components/components/pn-progress-bar2.js +1 -1
  168. package/umd/modules/@postnord/web-components/components/pn-progress-indicator-step.js +1 -1
  169. package/umd/modules/@postnord/web-components/components/pn-progress-indicator.js +1 -1
  170. package/umd/modules/@postnord/web-components/components/pn-progress-stepper2.js +1 -1
  171. package/umd/modules/@postnord/web-components/components/pn-radio-button.js +1 -1
  172. package/umd/modules/@postnord/web-components/components/pn-range.js +1 -1
  173. package/umd/modules/@postnord/web-components/components/pn-search-field2.js +1 -1
  174. package/umd/modules/@postnord/web-components/components/pn-segment.js +1 -1
  175. package/umd/modules/@postnord/web-components/components/pn-segmented-control.js +1 -1
  176. package/umd/modules/@postnord/web-components/components/pn-select2.js +1 -1
  177. package/umd/modules/@postnord/web-components/components/pn-spinner2.js +1 -1
  178. package/umd/modules/@postnord/web-components/components/pn-tab.js +1 -1
  179. package/umd/modules/@postnord/web-components/components/pn-tablist.js +1 -1
  180. package/umd/modules/@postnord/web-components/components/pn-text-link2.js +1 -1
  181. package/umd/modules/@postnord/web-components/components/pn-textarea.js +1 -1
  182. package/umd/modules/@postnord/web-components/components/pn-tile.js +1 -1
  183. package/umd/modules/@postnord/web-components/components/pn-toast.js +1 -1
  184. package/umd/modules/@postnord/web-components/components/pn-toggle-switch.js +1 -1
  185. package/umd/modules/@postnord/web-components/components/pn-tooltip.js +1 -1
  186. package/umd/modules/@postnord/web-components/components/pn-wizard.js +1 -1
  187. package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
  188. package/umd/modules/@postnord/web-components/esm/{index-CosyroON.js → index-DyhO6xPY.js} +1 -1
  189. package/umd/modules/@postnord/web-components/esm/{index-CAEP792y.js → index-XKg-ydzH.js} +144 -85
  190. package/umd/modules/@postnord/web-components/esm/index.js +19 -17
  191. package/umd/modules/@postnord/web-components/esm/loader.js +3 -3
  192. package/umd/modules/@postnord/web-components/esm/pn-accordion-row.entry.js +2 -2
  193. package/umd/modules/@postnord/web-components/esm/pn-accordion.entry.js +5 -4
  194. package/umd/modules/@postnord/web-components/esm/pn-action-menu.entry.js +6 -6
  195. package/umd/modules/@postnord/web-components/esm/pn-button-dropdown.entry.js +1 -1
  196. package/umd/modules/@postnord/web-components/esm/pn-button_2.entry.js +3 -3
  197. package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +4 -4
  198. package/umd/modules/@postnord/web-components/esm/pn-checkbox.entry.js +63 -21
  199. package/umd/modules/@postnord/web-components/esm/pn-choice-chip.entry.js +38 -18
  200. package/umd/modules/@postnord/web-components/esm/pn-counter.entry.js +71 -37
  201. package/umd/modules/@postnord/web-components/esm/pn-date-picker.entry.js +185 -103
  202. package/umd/modules/@postnord/web-components/esm/pn-fieldset.entry.js +33 -27
  203. package/umd/modules/@postnord/web-components/esm/pn-file-upload.entry.js +73 -42
  204. package/umd/modules/@postnord/web-components/esm/pn-footer.entry.js +2 -2
  205. package/umd/modules/@postnord/web-components/esm/pn-header.entry.js +2 -2
  206. package/umd/modules/@postnord/web-components/esm/pn-icon_2.entry.js +8 -10
  207. package/umd/modules/@postnord/web-components/esm/pn-illustration.entry.js +3 -3
  208. package/umd/modules/@postnord/web-components/esm/pn-input.entry.js +122 -89
  209. package/umd/modules/@postnord/web-components/esm/pn-modal.entry.js +24 -12
  210. package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +137 -53
  211. package/umd/modules/@postnord/web-components/esm/pn-ocr-search.entry.js +2 -2
  212. package/umd/modules/@postnord/web-components/esm/pn-page-nav-dropdown-item.entry.js +3 -3
  213. package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +3 -3
  214. package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +3 -3
  215. package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +4 -4
  216. package/umd/modules/@postnord/web-components/esm/pn-progress-bar.entry.js +2 -2
  217. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator-step.entry.js +3 -3
  218. package/umd/modules/@postnord/web-components/esm/pn-progress-indicator.entry.js +3 -3
  219. package/umd/modules/@postnord/web-components/esm/pn-progress-stepper.entry.js +2 -2
  220. package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +61 -20
  221. package/umd/modules/@postnord/web-components/esm/pn-range.entry.js +88 -43
  222. package/umd/modules/@postnord/web-components/esm/pn-read-only-button.entry.js +1 -1
  223. package/umd/modules/@postnord/web-components/esm/pn-search-field.entry.js +42 -25
  224. package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +16 -11
  225. package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +21 -21
  226. package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +90 -35
  227. package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +15 -10
  228. package/umd/modules/@postnord/web-components/esm/pn-table.entry.js +1 -1
  229. package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js +5 -4
  230. package/umd/modules/@postnord/web-components/esm/pn-text-link.entry.js +2 -2
  231. package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +88 -34
  232. package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +3 -3
  233. package/umd/modules/@postnord/web-components/esm/pn-toast.entry.js +5 -5
  234. package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +56 -20
  235. package/umd/modules/@postnord/web-components/esm/pn-tooltip.entry.js +2 -2
  236. package/umd/modules/@postnord/web-components/esm/pn-wizard.entry.js +71 -49
  237. package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +3 -3
  238. package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +4 -4
  239. package/umd/modules/@postnord/web-components/hydrate/index.js +1715 -940
  240. package/umd/modules/@postnord/web-components/hydrate/index.mjs +1715 -940
  241. package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-gnu/package.json +1 -1
  242. package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-gnu/rollup.linux-x64-gnu.node +0 -0
  243. package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-musl/package.json +1 -1
  244. package/umd/modules/@postnord/web-components/node_modules/@rollup/rollup-linux-x64-musl/rollup.linux-x64-musl.node +0 -0
  245. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +3 -2
  246. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +3 -2
  247. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +1 -1
  248. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +1 -1
  249. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +3312 -561
  250. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +1 -1
  251. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +1 -1
  252. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +2 -2
  253. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +1 -1
  254. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +1 -1
  255. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +2 -2
  256. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +1 -1
  257. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-globals/package.json +1 -1
  258. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +246 -179
  259. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +1 -1
  260. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +1 -1
  261. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +1 -1
  262. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +245 -180
  263. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +1 -1
  264. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +59 -22
  265. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +1 -1
  266. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.d.ts +1 -0
  267. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-ext-modules.d.ts +1 -1
  268. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-private.d.ts +49 -0
  269. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +51 -1
  270. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-docs.d.ts +26 -0
  271. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-runtime.d.ts +23 -2
  272. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +238 -169
  273. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +1 -1
  274. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +59 -22
  275. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +12 -3
  276. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +59 -22
  277. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +1 -1
  278. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +10 -10
  279. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +1 -1
  280. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +1 -1
  281. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +1 -1
  282. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/460.node-fetch.js +3 -3
  283. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/autoprefixer.js +2 -2
  284. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/glob.js +1 -1
  285. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/graceful-fs.js +1 -1
  286. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +32 -32
  287. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/node-fetch.js +4 -4
  288. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +1 -1
  289. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/prompts.js +1 -1
  290. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +1 -1
  291. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +33 -1
  292. package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +1 -1
  293. package/umd/modules/@postnord/web-components/package.json +16 -16
  294. package/umd/modules/@postnord/web-components/postnord-web-components/index.esm.js +1 -1
  295. package/umd/modules/@postnord/web-components/postnord-web-components/{p-ea50ecd2.entry.js → p-020ee3f4.entry.js} +1 -1
  296. package/umd/modules/@postnord/web-components/postnord-web-components/p-060b6ad2.entry.js +5 -0
  297. package/umd/modules/@postnord/web-components/postnord-web-components/p-0bf70d44.entry.js +5 -0
  298. package/umd/modules/@postnord/web-components/postnord-web-components/p-1ec52623.entry.js +5 -0
  299. package/umd/modules/@postnord/web-components/postnord-web-components/p-27c71f60.entry.js +5 -0
  300. package/umd/modules/@postnord/web-components/postnord-web-components/p-292a7591.entry.js +5 -0
  301. package/umd/modules/@postnord/web-components/postnord-web-components/{p-3d2cac86.entry.js → p-3709c995.entry.js} +1 -1
  302. package/umd/modules/@postnord/web-components/postnord-web-components/p-3db02038.entry.js +5 -0
  303. package/umd/modules/@postnord/web-components/postnord-web-components/{p-2f4ad4a4.entry.js → p-4b9fb0fc.entry.js} +1 -1
  304. package/umd/modules/@postnord/web-components/postnord-web-components/p-506a801d.entry.js +5 -0
  305. package/umd/modules/@postnord/web-components/postnord-web-components/p-518651ad.entry.js +5 -0
  306. package/umd/modules/@postnord/web-components/postnord-web-components/p-54917d9f.entry.js +5 -0
  307. package/umd/modules/@postnord/web-components/postnord-web-components/p-56ade97b.entry.js +5 -0
  308. package/umd/modules/@postnord/web-components/postnord-web-components/p-64207923.entry.js +5 -0
  309. package/umd/modules/@postnord/web-components/postnord-web-components/p-665af57e.entry.js +5 -0
  310. package/umd/modules/@postnord/web-components/postnord-web-components/p-6d85c967.entry.js +5 -0
  311. package/umd/modules/@postnord/web-components/postnord-web-components/p-6e407015.entry.js +5 -0
  312. package/umd/modules/@postnord/web-components/postnord-web-components/{p-01ac1c67.entry.js → p-720b8b90.entry.js} +1 -1
  313. package/umd/modules/@postnord/web-components/postnord-web-components/p-7aea3de5.entry.js +5 -0
  314. package/umd/modules/@postnord/web-components/postnord-web-components/p-7b6ae520.entry.js +5 -0
  315. package/umd/modules/@postnord/web-components/postnord-web-components/p-83d02093.entry.js +5 -0
  316. package/umd/modules/@postnord/web-components/postnord-web-components/p-88344f8d.entry.js +5 -0
  317. package/umd/modules/@postnord/web-components/postnord-web-components/{p-3c96cb61.entry.js → p-895acf7f.entry.js} +1 -1
  318. package/umd/modules/@postnord/web-components/postnord-web-components/p-8cedf2e0.entry.js +5 -0
  319. package/umd/modules/@postnord/web-components/postnord-web-components/p-91c6a8cf.entry.js +5 -0
  320. package/umd/modules/@postnord/web-components/postnord-web-components/p-98a37be9.entry.js +5 -0
  321. package/umd/modules/@postnord/web-components/postnord-web-components/p-9a6c90e4.entry.js +5 -0
  322. package/umd/modules/@postnord/web-components/postnord-web-components/p-9d2ee77a.entry.js +5 -0
  323. package/umd/modules/@postnord/web-components/postnord-web-components/p-9d56fb64.entry.js +5 -0
  324. package/umd/modules/@postnord/web-components/postnord-web-components/{p-BlM_xfdt.js → p-BWAVaTWQ.js} +1 -1
  325. package/umd/modules/@postnord/web-components/postnord-web-components/p-XKg-ydzH.js +6 -0
  326. package/umd/modules/@postnord/web-components/postnord-web-components/p-a1f92f19.entry.js +5 -0
  327. package/umd/modules/@postnord/web-components/postnord-web-components/p-a31d93db.entry.js +5 -0
  328. package/umd/modules/@postnord/web-components/postnord-web-components/p-aa15469e.entry.js +5 -0
  329. package/umd/modules/@postnord/web-components/postnord-web-components/{p-db2b7e5d.entry.js → p-b45e58df.entry.js} +1 -1
  330. package/umd/modules/@postnord/web-components/postnord-web-components/p-b72f9866.entry.js +5 -0
  331. package/umd/modules/@postnord/web-components/postnord-web-components/{p-b0710b87.entry.js → p-b7a2e5b0.entry.js} +1 -1
  332. package/umd/modules/@postnord/web-components/postnord-web-components/p-c09179d6.entry.js +5 -0
  333. package/umd/modules/@postnord/web-components/postnord-web-components/{p-38e44ed0.entry.js → p-ce2c2395.entry.js} +1 -1
  334. package/umd/modules/@postnord/web-components/postnord-web-components/p-d228b929.entry.js +5 -0
  335. package/umd/modules/@postnord/web-components/postnord-web-components/p-d71054df.entry.js +5 -0
  336. package/umd/modules/@postnord/web-components/postnord-web-components/p-d81b4ede.entry.js +5 -0
  337. package/umd/modules/@postnord/web-components/postnord-web-components/p-e11b4af5.entry.js +5 -0
  338. package/umd/modules/@postnord/web-components/postnord-web-components/{p-c4c4c75b.entry.js → p-e5574624.entry.js} +1 -1
  339. package/umd/modules/@postnord/web-components/postnord-web-components/p-e6ad75f9.entry.js +5 -0
  340. package/umd/modules/@postnord/web-components/postnord-web-components/p-e6cd4c7f.entry.js +5 -0
  341. package/umd/modules/@postnord/web-components/postnord-web-components/p-ede550f0.entry.js +5 -0
  342. package/umd/modules/@postnord/web-components/postnord-web-components/p-ef00ef4d.entry.js +5 -0
  343. package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
  344. package/umd/modules/@postnord/web-components/types/components/buttons/pn-action-menu/pn-action-menu.d.ts +111 -0
  345. package/umd/modules/@postnord/web-components/types/components/content/pn-accordion/pn-accordion.d.ts +2 -2
  346. package/umd/modules/@postnord/web-components/types/components/design-tokens/pn-icon/pn-icon.d.ts +5 -7
  347. package/umd/modules/@postnord/web-components/types/components/design-tokens/pn-illustration/pn-illustration.d.ts +8 -2
  348. package/umd/modules/@postnord/web-components/types/components/feedback/pn-modal/pn-modal.d.ts +17 -6
  349. package/umd/modules/@postnord/web-components/types/components/feedback/pn-toast/pn-toast.d.ts +100 -0
  350. package/umd/modules/@postnord/web-components/types/components/feedback/pn-wizard/pn-wizard.d.ts +6 -1
  351. package/umd/modules/@postnord/web-components/types/components/input/pn-checkbox/pn-checkbox.d.ts +124 -0
  352. package/umd/modules/@postnord/web-components/types/components/input/pn-choice-chip/pn-choice-chip.d.ts +31 -15
  353. package/umd/modules/@postnord/web-components/types/components/input/pn-counter/pn-counter.d.ts +51 -27
  354. package/umd/modules/@postnord/web-components/types/components/input/pn-date-picker/pn-date-picker.d.ts +338 -0
  355. package/umd/modules/@postnord/web-components/types/components/input/pn-fieldset/pn-fieldset.d.ts +24 -15
  356. package/umd/modules/@postnord/web-components/types/components/input/pn-file-upload/pn-file-upload.d.ts +36 -27
  357. package/umd/modules/@postnord/web-components/types/components/input/pn-file-upload/translation.d.ts +7 -0
  358. package/umd/modules/@postnord/web-components/types/components/input/pn-input/pn-input.d.ts +89 -66
  359. package/umd/modules/@postnord/web-components/types/components/input/pn-multiselect/pn-multiselect.d.ts +265 -0
  360. package/umd/modules/@postnord/web-components/types/components/input/pn-radio-button/pn-radio-button.d.ts +124 -0
  361. package/umd/modules/@postnord/web-components/types/components/input/pn-range/pn-range.d.ts +73 -42
  362. package/umd/modules/@postnord/web-components/types/components/input/pn-search-field/pn-search-field.d.ts +32 -21
  363. package/umd/modules/@postnord/web-components/types/components/input/pn-segmented-control/pn-segmented-control.d.ts +19 -18
  364. package/umd/modules/@postnord/web-components/types/components/input/pn-segmented-control/segment/pn-segment.d.ts +12 -9
  365. package/umd/modules/@postnord/web-components/types/components/input/pn-select/pn-select.d.ts +51 -31
  366. package/umd/modules/@postnord/web-components/types/components/input/pn-textarea/pn-textarea.d.ts +58 -27
  367. package/umd/modules/@postnord/web-components/types/components/input/pn-toggle-switch/pn-toggle-switch.d.ts +36 -14
  368. package/umd/modules/@postnord/web-components/types/components.d.ts +1851 -511
  369. package/umd/modules/@postnord/web-components/types/globals/mixins/index.d.ts +21 -0
  370. package/umd/modules/@postnord/web-components/types/stencil-public-runtime.d.ts +23 -2
  371. package/umd/modules/@postnord/web-components/vscode-data.json +218 -38
  372. package/cjs/convert-9361e443.js.map +0 -1
  373. package/esm/convert-ecca01b6.js.map +0 -1
  374. package/pn-market-web-components/p-63ff7fa2.js +0 -2
  375. package/pn-market-web-components/p-63ff7fa2.js.map +0 -1
  376. package/pn-market-web-components/p-6d263c6e.entry.js.map +0 -1
  377. package/umd/modules/@postnord/web-components/postnord-web-components/p-0dd15cc3.entry.js +0 -5
  378. package/umd/modules/@postnord/web-components/postnord-web-components/p-0e94a4dd.entry.js +0 -5
  379. package/umd/modules/@postnord/web-components/postnord-web-components/p-0ed2ee53.entry.js +0 -5
  380. package/umd/modules/@postnord/web-components/postnord-web-components/p-109ba1fc.entry.js +0 -5
  381. package/umd/modules/@postnord/web-components/postnord-web-components/p-153311c8.entry.js +0 -5
  382. package/umd/modules/@postnord/web-components/postnord-web-components/p-1a3c49ba.entry.js +0 -5
  383. package/umd/modules/@postnord/web-components/postnord-web-components/p-2610f8ab.entry.js +0 -5
  384. package/umd/modules/@postnord/web-components/postnord-web-components/p-267c323e.entry.js +0 -5
  385. package/umd/modules/@postnord/web-components/postnord-web-components/p-2a364778.entry.js +0 -5
  386. package/umd/modules/@postnord/web-components/postnord-web-components/p-2a682ff9.entry.js +0 -5
  387. package/umd/modules/@postnord/web-components/postnord-web-components/p-2cce8a9f.entry.js +0 -5
  388. package/umd/modules/@postnord/web-components/postnord-web-components/p-306ec758.entry.js +0 -5
  389. package/umd/modules/@postnord/web-components/postnord-web-components/p-3d459401.entry.js +0 -5
  390. package/umd/modules/@postnord/web-components/postnord-web-components/p-3deb5a9e.entry.js +0 -5
  391. package/umd/modules/@postnord/web-components/postnord-web-components/p-41c09d4d.entry.js +0 -5
  392. package/umd/modules/@postnord/web-components/postnord-web-components/p-484dfaa4.entry.js +0 -5
  393. package/umd/modules/@postnord/web-components/postnord-web-components/p-50116c0d.entry.js +0 -5
  394. package/umd/modules/@postnord/web-components/postnord-web-components/p-502b8430.entry.js +0 -5
  395. package/umd/modules/@postnord/web-components/postnord-web-components/p-5b7c1333.entry.js +0 -5
  396. package/umd/modules/@postnord/web-components/postnord-web-components/p-67f55491.entry.js +0 -5
  397. package/umd/modules/@postnord/web-components/postnord-web-components/p-838c17b9.entry.js +0 -5
  398. package/umd/modules/@postnord/web-components/postnord-web-components/p-849d48c6.entry.js +0 -5
  399. package/umd/modules/@postnord/web-components/postnord-web-components/p-89aaa3c8.entry.js +0 -5
  400. package/umd/modules/@postnord/web-components/postnord-web-components/p-8b2b6f5d.entry.js +0 -5
  401. package/umd/modules/@postnord/web-components/postnord-web-components/p-93db2b9e.entry.js +0 -5
  402. package/umd/modules/@postnord/web-components/postnord-web-components/p-97ffc4b3.entry.js +0 -5
  403. package/umd/modules/@postnord/web-components/postnord-web-components/p-CAEP792y.js +0 -6
  404. package/umd/modules/@postnord/web-components/postnord-web-components/p-b3c4e3e8.entry.js +0 -5
  405. package/umd/modules/@postnord/web-components/postnord-web-components/p-b8c4423b.entry.js +0 -5
  406. package/umd/modules/@postnord/web-components/postnord-web-components/p-ba59528f.entry.js +0 -5
  407. package/umd/modules/@postnord/web-components/postnord-web-components/p-c0ae367c.entry.js +0 -5
  408. package/umd/modules/@postnord/web-components/postnord-web-components/p-c843ae5e.entry.js +0 -5
  409. package/umd/modules/@postnord/web-components/postnord-web-components/p-d1e27524.entry.js +0 -5
  410. package/umd/modules/@postnord/web-components/postnord-web-components/p-d214e930.entry.js +0 -5
  411. package/umd/modules/@postnord/web-components/postnord-web-components/p-d7091312.entry.js +0 -5
  412. package/umd/modules/@postnord/web-components/postnord-web-components/p-e3fb693e.entry.js +0 -5
  413. package/umd/modules/@postnord/web-components/postnord-web-components/p-e83de0b1.entry.js +0 -5
  414. package/umd/modules/@postnord/web-components/postnord-web-components/p-edc28eee.entry.js +0 -5
  415. /package/pn-market-web-components/{p-c4059cc1.entry.js.map → p-181e40ee.entry.js.map} +0 -0
  416. /package/pn-market-web-components/{p-f8ccc718.entry.js.map → p-a0d7154f.entry.js.map} +0 -0
  417. /package/pn-market-web-components/{p-413afe7c.entry.js.map → p-c18154a4.entry.js.map} +0 -0
@@ -2,9 +2,9 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import { t as transformTag, M as Mixin, r as registerInstance, c as createEvent, g as getElement, h, a as Host } from './index-CAEP792y.js';
5
+ import { t as transformTag, M as Mixin, r as registerInstance, c as createEvent, g as getElement, f as forceUpdate, h, a as Host } from './index-XKg-ydzH.js';
6
6
  import { uuidv4, getTotalHeightOffset, getMenuWidth, awaitTopbar, en as en$2 } from './index.js';
7
- import { a as animateHeightFactory } from './index-CosyroON.js';
7
+ import { a as animateHeightFactory } from './index-DyhO6xPY.js';
8
8
  import { a as arrow_left } from './arrow_left-CQaMdITw.js';
9
9
  import { a as arrow_right } from './arrow_right-D_UyW-KH.js';
10
10
 
@@ -520,20 +520,21 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
520
520
  constructor(hostRef) {
521
521
  super();
522
522
  registerInstance(this, hostRef);
523
- this.dateselection = createEvent(this, "dateselection");
524
- this.dateSelection = createEvent(this, "dateSelection");
525
- this.dateInvalid = createEvent(this, "dateInvalid");
526
- this.toggleCalendar = createEvent(this, "toggleCalendar");
527
- this.currentView = createEvent(this, "currentView");
523
+ this.dateselection = createEvent(this, "dateselection", 7);
524
+ this.dateSelection = createEvent(this, "dateSelection", 7);
525
+ this.dateInvalid = createEvent(this, "dateInvalid", 7);
526
+ this.toggleCalendar = createEvent(this, "toggleCalendar", 7);
527
+ this.currentView = createEvent(this, "currentView", 7);
528
528
  }
529
529
  id = `pn-date-picker-${uuidv4()}`;
530
- idFrom = `${this.id}-from`;
531
- idTo = `${this.id}-to`;
532
- idFromButton = `${this.id}-from-button`;
533
- idToButton = `${this.id}-to-button`;
530
+ idStart = `${this.id}-from`;
531
+ idEnd = `${this.id}-to`;
532
+ idStartButton = `${this.id}-from-button`;
533
+ idEndButton = `${this.id}-to-button`;
534
534
  idHelper = `${this.id}-helper`;
535
535
  idError = `${this.id}-error`;
536
536
  idCalendar = `${this.id}-calendar`;
537
+ mo;
537
538
  calendarElement;
538
539
  today = getToday();
539
540
  separators = [];
@@ -543,7 +544,7 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
543
544
  get hostElement() { return getElement(this); }
544
545
  open = false;
545
546
  openUp = false;
546
- selectingTo = false;
547
+ selectingEnd = false;
547
548
  grid;
548
549
  viewYearStart = null;
549
550
  dateViewYear;
@@ -557,72 +558,67 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
557
558
  labelTo;
558
559
  /** Provide a helpertext for the date input. */
559
560
  helpertext;
560
- /** Set a predefined value for the from date. @see {@link format} */
561
+ /** Manually set language; this will be inherited from the topbar. */
562
+ language = undefined;
563
+ /** Set a predefined value for the from date (input value). @see {@link format} @category Native attributes */
561
564
  start = '';
562
565
  /**
563
- * Set a predefined value for the from date.
566
+ * Set a predefined value for the from date. (input value end)
564
567
  *
565
568
  * @see {@link range}
566
569
  * @see {@link format}
570
+ * @category Native attributes
567
571
  */
568
572
  end = '';
569
- /**
570
- * Set the date format of the value.
571
- *
572
- * While you can set any date value from the Dayjs documentation,
573
- * we strongly recommend you pick a simple format that you can also type manually.
574
- *
575
- * @since v7.6.0
576
- * @see {@link https://day.js.org/docs/en/display/format Day.js format documentation.}
577
- */
578
- format = 'YYYY-MM-DD';
579
- /** Set the date picker label as compact. If used, the `placeholder` will no longer be displayed. @since v7.21.0 */
580
- compact = false;
581
- /** Manually set language; this will be inherited from the topbar. */
582
- language = null;
583
- /** Set a custom ID for the calendar. @since v7.6.0 @category HTML attributes */
584
- dateId = this.id;
585
- /** HTML input name @since v7.6.0 @category HTML attributes */
573
+ /** HTML input name @since v7.6.0 @category Native attributes*/
586
574
  name;
575
+ /** HTML input name @since v7.25.0 @category Native attributes */
576
+ nameEnd;
587
577
  /**
588
578
  * Placeholder for the input field (defaults to the format prop).
589
579
  * @see {@link format}
590
- * @category HTML attributes
580
+ * @category Native attributes
591
581
  **/
592
- placeholder = this.format;
582
+ placeholder;
593
583
  /**
594
584
  * Placeholder for end date (defaults to the format prop).
595
585
  * @see {@link format}
596
- * @category HTML attributes
586
+ * @deprecated Use `placeholder-end` instead
587
+ * @category Native attributes
597
588
  **/
598
- endPlaceholder = this.format;
599
- /** Set the input `autocomplete` attribute. @category HTML attributes */
589
+ endPlaceholder;
590
+ /**
591
+ * Placeholder for end date (defaults to the format prop).
592
+ * @see {@link format}
593
+ * @since v7.25.0
594
+ * @category Native attributes
595
+ **/
596
+ placeholderEnd;
597
+ /** Set the input `autocomplete` attribute. @category Native attributes */
600
598
  autocomplete;
601
- /** Set the input `list` attribute for the first date input. @since v7.6.0 @category HTML attributes */
599
+ /** Set the input `list` attribute for the first date input. @since v7.6.0 @category Native attributes */
602
600
  list;
603
- /** Set the input `list` attribute for the second date input. @since v7.6.0 @category HTML attributes */
601
+ /** Set the input `list` attribute for the second date input. @since v7.6.0 @category Native attributes */
604
602
  listEnd;
605
- /** Set the HTML pattern prop on the input elements. Make sure it matches the format. @since v7.6.0 @category HTML attributes */
603
+ /** Set the HTML pattern prop on the input elements. Make sure it matches the format. @since v7.6.0 @category Native attributes */
606
604
  pattern;
607
- /** Allow the selection of a date range. @category Features */
608
- range = false;
605
+ /** Set the date picker as required. @category Native attributes */
606
+ required = false;
607
+ /** Set the date picker as readonly. @since v7.6.0 @category Native attributes */
608
+ readonly = false;
609
+ /** Set the date picker as disabled. @since v7.6.0 @category Native attributes */
610
+ disabled = false;
609
611
  /**
610
- * Set a limit on how many days one may select.
611
- * By default, you can select an unlimited range.
612
+ * Set the date format of the value.
612
613
  *
613
- * @todo Create a range limit function.
614
- * @see {@link range}
614
+ * While you can set any date value from the Dayjs documentation,
615
+ * we strongly recommend you pick a simple format that you can also type manually.
615
616
  *
617
+ * @since v7.6.0
618
+ * @see {@link https://day.js.org/docs/en/display/format Day.js format documentation.}
616
619
  * @category Features
617
- * @hide true
618
- **/
619
- rangeLimit;
620
- /** The calendar grid is shown as default. You can set either `months` or `years` as your first choice. @since v7.6.0 @category Features */
621
- view = CALENDAR;
622
- /** Make the calendar open upwards by default. Opens downwards if there is not enough space. @since v7.6.0 @category Features */
623
- calendarUp = false;
624
- /** Show weekend numbers to the left of the calendar grid. @since v7.6.0 @category Features */
625
- weekNumbers = false;
620
+ */
621
+ format = 'YYYY-MM-DD';
626
622
  /** Disable the automatic insertion of separators when typing in the input. @since v7.6.0 @category Features */
627
623
  disableTypeAhead = false;
628
624
  /** Remove the option to select dates on weekends. @category Features */
@@ -636,25 +632,72 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
636
632
  * @category Features
637
633
  **/
638
634
  disabledDates;
639
- /** If you use a format with an unknown length, disable the max length. @category Features */
635
+ /** If you use a format with an unknown length, disable the max length. @since 7.11.3 @category Features */
640
636
  disableMaxLength = false;
641
- /** Set the date picker as required. @category State */
642
- required = false;
643
- /** Set the date picker as readonly. @since v7.6.0 @category State */
644
- readonly = false;
645
- /** Set the date picker as disabled. @since v7.6.0 @category State */
646
- disabled = false;
647
- /** Set an error message for the date picker. Overwrites the helpertext if used at the same time. @since v7.6.0 @category Validation */
648
- error;
649
- /** Trigger the invalid state without an error message. @since v7.6.0 @category Validation */
637
+ /** Allow the selection of a date range. @category Features */
638
+ range = false;
639
+ /**
640
+ * Set a limit on how many days one may select.
641
+ * By default, you can select an unlimited range.
642
+ *
643
+ * @todo Create a range limit function.
644
+ * @see {@link range}
645
+ *
646
+ * @category Features
647
+ * @hide true
648
+ **/
649
+ rangeLimit;
650
+ /** Show weekend numbers to the left of the calendar grid. @since v7.6.0 @category Features */
651
+ weekNumbers = false;
652
+ /** Set the date picker label as compact. If used, the `placeholder` will no longer be displayed. @since v7.21.0 @category Features */
653
+ compact = false;
654
+ /** Make the calendar open upwards by default. Opens downwards if there is not enough space. @since v7.6.0 @category Features */
655
+ calendarUp = false;
656
+ /** The calendar grid is shown as default. You can set either `months` or `years` as your first choice. @since v7.6.0 @category Features */
657
+ view = 'calendar';
658
+ /** Trigger the invalid state without an error message. @since v7.6.0 @category Features */
650
659
  invalid = false;
660
+ /** Set an error message for the date picker. Overwrites the helpertext if used at the same time. @since v7.6.0 @category Features */
661
+ error;
662
+ /** Set a custom ID for the calendar. If you use `range`, the end input will use `${pn-id}-end`. @since v7.25.0 @category HTML attributes */
663
+ pnId;
664
+ /**
665
+ * Provide the label via an aria attribute.
666
+ * We strongly recommend you use the `label-from` prop instead.
667
+ * @since v7.25.0
668
+ * @category HTML attributes
669
+ */
670
+ pnAriaLabel;
671
+ /**
672
+ * Provide the label for the end input via an aria attribute.
673
+ * We strongly recommend you use the `label-to` prop instead.
674
+ * @since v7.25.0
675
+ * @category HTML attributes
676
+ */
677
+ pnAriaLabelEnd;
678
+ /**
679
+ * Provide the label from another element via its ID.
680
+ * We strongly recommend you use the `label-from` prop instead.
681
+ * @since v7.25.0
682
+ * @category HTML attributes
683
+ */
684
+ pnAriaLabelledby;
685
+ /**
686
+ * Provide the label for the end input from another element via its ID.
687
+ * We strongly recommend you use the `label-to` prop instead.
688
+ * @since v7.25.0
689
+ * @category HTML attributes
690
+ */
691
+ pnAriaLabelledbyEnd;
692
+ /** Set a custom ID for the calendar. @since v7.6.0 @deprecated Use `pn-id` instead. @category HTML attributes */
693
+ dateId;
651
694
  /**
652
695
  * Earliest date possible, this will determine how many years back the date picker will show.
653
696
  *
654
697
  * Remember to use the same format that you have in the `format` prop.
655
698
  * @see {@link format}
656
699
  * @example "2024-05-25"
657
- * @category Min/max date
700
+ * @category Features
658
701
  **/
659
702
  minDate = null;
660
703
  watchMin() {
@@ -669,7 +712,7 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
669
712
  * Remember to use the same format that you have in the `format` prop.
670
713
  * @see {@link format}
671
714
  * @example "2024-06-25"
672
- * @category Min/max date
715
+ * @category Features
673
716
  **/
674
717
  maxDate = null;
675
718
  watchMax() {
@@ -713,13 +756,13 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
713
756
  .forEach((item, index) => this.separatorRegex.exec(item) && this.separators.push({ name: item, index }));
714
757
  }
715
758
  watchId() {
716
- this.idFrom = `${this.dateId}-from`;
717
- this.idTo = `${this.dateId}-to`;
718
- this.idFromButton = `${this.id}-from-button`;
719
- this.idToButton = `${this.id}-to-button`;
720
- this.idHelper = `${this.dateId}-helper`;
721
- this.idError = `${this.dateId}-error`;
722
- this.idCalendar = `${this.dateId}-calendar`;
759
+ this.idStart = this.getId();
760
+ this.idEnd = `${this.getId()}-end`;
761
+ this.idStartButton = `${this.idStart}-from-button`;
762
+ this.idEndButton = `${this.idEnd}-to-button`;
763
+ this.idHelper = `${this.idStart}-helper`;
764
+ this.idError = `${this.idStart}-error`;
765
+ this.idCalendar = `${this.idStart}-calendar`;
723
766
  }
724
767
  watchView() {
725
768
  const data = this.getCurrentDateObject();
@@ -813,10 +856,18 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
813
856
  return;
814
857
  this.toggleGrid(false);
815
858
  }
859
+ connectedCallback() {
860
+ this.mo = new MutationObserver(() => {
861
+ forceUpdate(this.hostElement);
862
+ this.handleMessage();
863
+ });
864
+ this.mo.observe(this.hostElement, { childList: true, subtree: true });
865
+ }
866
+ disconnectedCallback() {
867
+ if (this.mo)
868
+ this.mo.disconnect();
869
+ }
816
870
  async componentWillLoad() {
817
- this.watchMin();
818
- this.watchMax();
819
- this.watchId();
820
871
  this.handleFormat();
821
872
  this.handleMessage();
822
873
  const valid = validateDate(this.start || this.end, this.format);
@@ -825,9 +876,29 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
825
876
  this.setViewDate({ date: data.date || date });
826
877
  this.setViewMonth({ month: data.month || month });
827
878
  this.setViewYear({ year: data.year || year });
828
- if (this.language === null)
879
+ if (this.language === undefined)
829
880
  await awaitTopbar(this.hostElement);
830
881
  }
882
+ getId() {
883
+ return this.pnId || this.dateId || this.id;
884
+ }
885
+ getAriaLabel(end) {
886
+ if (end)
887
+ return !this.labelTo && !this.pnAriaLabelledbyEnd ? this.pnAriaLabelEnd : null;
888
+ return !this.labelFrom && !this.pnAriaLabelledby ? this.pnAriaLabel : null;
889
+ }
890
+ getAriaLabelledby(end) {
891
+ if (end)
892
+ return !this.labelTo && !this.pnAriaLabelEnd ? this.pnAriaLabelledbyEnd : null;
893
+ return !this.labelFrom && !this.pnAriaLabel ? this.pnAriaLabelledby : null;
894
+ }
895
+ getPlaceholder(end) {
896
+ if (this.compact)
897
+ return ' ';
898
+ if (end)
899
+ return this.placeholderEnd || this.endPlaceholder || this.format;
900
+ return this.placeholder || this.format;
901
+ }
831
902
  dropdownHandler() {
832
903
  if (this.open)
833
904
  this.openDropdown(this.calendarElement);
@@ -859,7 +930,7 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
859
930
  }
860
931
  toggleGrid(state, selecting) {
861
932
  this.open = state ?? !this.open;
862
- this.selectingTo = selecting;
933
+ this.selectingEnd = selecting;
863
934
  }
864
935
  hasHelperText() {
865
936
  return this.helpertext?.length > 0 || this.showHelperSlot;
@@ -880,6 +951,12 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
880
951
  const slottedError = this.hostElement.querySelector('[slot=error]')?.textContent;
881
952
  this.showErrorSlot = !!slottedError?.length;
882
953
  }
954
+ hideHelpertext() {
955
+ return this.hasErrorMessage() || !this.hasHelperText();
956
+ }
957
+ hideError() {
958
+ return !this.hasErrorMessage();
959
+ }
883
960
  viewingCalendar() {
884
961
  return this.view === CALENDAR;
885
962
  }
@@ -932,8 +1009,8 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
932
1009
  getCurrentViewDate(data = this.getCurrentDateObject()) {
933
1010
  return getReadableDate(data, this.language, 'MMMM YYYY');
934
1011
  }
935
- isSelected(data, to = false) {
936
- const value = to ? this.end : this.start;
1012
+ isSelected(data, end = false) {
1013
+ const value = end ? this.end : this.start;
937
1014
  return selectedDate(value, this.getCurrentDateObject(data), this.format, this.viewType());
938
1015
  }
939
1016
  isToday(data) {
@@ -1046,24 +1123,24 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
1046
1123
  }
1047
1124
  return value;
1048
1125
  }
1049
- inputHandler(event, to = false) {
1050
- const propName = to ? 'end' : 'start';
1126
+ inputHandler(event, end = false) {
1127
+ const propName = end ? 'end' : 'start';
1051
1128
  const value = this.disableTypeAhead ? event.target.value : this.handleSeparator(event);
1052
1129
  this[propName] = value;
1053
1130
  }
1054
1131
  setValue(date) {
1055
1132
  const value = getReadableDate(this.getCurrentDateObject({ date }), this.language, this.format);
1056
- if (this.selectingTo)
1133
+ if (this.selectingEnd)
1057
1134
  this.end = value;
1058
1135
  else
1059
1136
  this.start = value;
1060
1137
  this.setViewDate({ date });
1061
- if (!this.range || this.selectingTo) {
1138
+ if (!this.range || this.selectingEnd) {
1062
1139
  this.toggleGrid(false);
1063
1140
  this.focusToggleCalendarButton();
1064
1141
  }
1065
- if (this.range && !this.selectingTo)
1066
- this.selectingTo = true;
1142
+ if (this.range && !this.selectingEnd)
1143
+ this.selectingEnd = true;
1067
1144
  }
1068
1145
  getDayAttributes(dateObject, blank) {
1069
1146
  const data = this.getCurrentDateObject(dateObject);
@@ -1118,7 +1195,7 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
1118
1195
  /** Focus the button toggling the calendar. Handles the start/from date on its own. */
1119
1196
  focusToggleCalendarButton() {
1120
1197
  requestAnimationFrame(() => {
1121
- const id = this.range ? this.idToButton : this.idFromButton;
1198
+ const id = this.range ? this.idEndButton : this.idStartButton;
1122
1199
  this.hostElement.querySelector(`#${id}`).focus({ preventScroll: true });
1123
1200
  });
1124
1201
  }
@@ -1200,37 +1277,39 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
1200
1277
  renderYearGrid() {
1201
1278
  return (h("ul", { class: "pn-date-picker-list" }, this.getYearGrid()?.map(year => (h("li", { key: year, class: "pn-date-picker-item", "data-item": "year" }, h("button", { type: "button", class: "pn-date-picker-button", ...this.getDayAttributes({ year }, false) }, h("span", null, year)))))));
1202
1279
  }
1203
- renderLabel(to = false) {
1204
- const id = to ? this.idTo : this.idFrom;
1205
- const label = to ? this.labelTo : this.labelFrom;
1280
+ renderLabel(end = false) {
1281
+ const id = end ? this.idEnd : this.idStart;
1282
+ const label = end ? this.labelTo : this.labelFrom;
1283
+ if (!label)
1284
+ return null;
1206
1285
  return (h("label", { class: "pn-date-picker-label", htmlFor: id, "data-compact": this.compact }, h("span", null, label)));
1207
1286
  }
1208
- renderInput({ to = false } = {}) {
1209
- const id = to ? this.idTo : this.idFrom;
1210
- const idButton = to ? this.idToButton : this.idFromButton;
1211
- const value = to ? this.end : this.start;
1212
- const placeholder = to ? this.endPlaceholder : this.placeholder;
1213
- const list = to ? this.listEnd : this.list;
1214
- const editing = this.open ? (this.selectingTo ? to : !to) : false;
1287
+ renderInput({ end = false } = {}) {
1288
+ const id = end ? this.idEnd : this.idStart;
1289
+ const idButton = end ? this.idEndButton : this.idStartButton;
1290
+ const value = end ? this.end : this.start;
1291
+ const list = end ? this.listEnd : this.list;
1292
+ const name = end ? this.nameEnd : this.name;
1293
+ const editing = this.open ? (this.selectingEnd ? end : !end) : false;
1215
1294
  const defaultText = this.translate('SELECT_DATE');
1216
- const textProp = this.range ? (to ? 'END_' : 'START_') : '';
1295
+ const textProp = this.range ? (end ? 'END_' : 'START_') : '';
1217
1296
  const dateText = this.translate(`SELECTED_${textProp}DATE`);
1218
1297
  let textButton = defaultText;
1219
1298
  if (value) {
1220
1299
  textButton += `, ${dateText.replace('{date}', value)}`;
1221
1300
  }
1222
1301
  const showButton = !(this.disabled || this.readonly);
1223
- return (h("div", { class: "pn-date-picker-container", "data-error": this.hasError() }, !this.compact && this.renderLabel(to), h("div", { class: "pn-date-picker-field" }, h("input", { type: "text", id: id, class: "pn-date-picker-input", name: this.name, placeholder: this.compact ? ' ' : 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(), "data-active": editing, "data-compact": this.compact, onInput: e => this.inputHandler(e, to) }), this.compact && this.renderLabel(to), 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) })))));
1302
+ return (h("div", { class: "pn-date-picker-container", "data-error": this.hasError() }, !this.compact && this.renderLabel(end), h("div", { class: "pn-date-picker-field" }, h("input", { type: "text", id: id, class: "pn-date-picker-input", name: name, placeholder: this.getPlaceholder(end), 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-label": this.getAriaLabel(end), "aria-labelledby": this.getAriaLabelledby(end), "aria-describedby": this.ariaDescribedby(), "aria-invalid": this.hasError()?.toString(), "data-active": editing, "data-compact": this.compact, onInput: e => this.inputHandler(e, end) }), this.compact && this.renderLabel(end), 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, end), onKeyDown: e => this.handleButtonBlur(e) })))));
1224
1303
  }
1225
1304
  render() {
1226
- return (h(Host, { key: '0485d508d1df7d71009ab2c22096384928750697' }, h("div", { key: '31514c4b9c216ca227ac91c90e82846992df283c', class: "pn-date-picker" }, this.renderInput(), this.range && (h("div", { key: '2d924b59e6f7e41364413935b08640db0aa1622e', class: "pn-date-picker-range-icon test" }, h("pn-icon", { key: '51ec54178bbf69c66fe17228017aeb8985e551fc', icon: arrow_right }))), this.range && this.renderInput({ to: this.range })), h("div", { key: '16d60d86b8d9c01b7732a3c7b773d1157eedbd2b', id: this.idCalendar, class: "pn-date-picker-calendar", role: "dialog", "aria-label": this.translate('CALENDAR_NAVIGATION'), "data-open": this.open, "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: '703d253840d5e9943750469c9495c3151b85f08c', class: "pn-date-picker-wrapper" }, h("nav", { key: 'e25723946681d630dffeeddbf814b3a720c9685c', class: "pn-date-picker-nav", "aria-labelledby": this.idCalendar }, h("pn-button", { key: '9dec68c96c3ab4f8ca0c29783cd1e693e43281e1', 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: '33dfc7f288f489eb814f27f61869793bf718fb6a', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(MONTHS) }, h("span", { key: '67b029ff5dae525732dc78d1be4a3c706848078c', class: "pn-date-picker-month", "data-full": true }, this.translateDateText({ date: 1 }, 'MMMM')), h("span", { key: '82b2346a120e52d3f55d40eae85d191673c4e906', class: "pn-date-picker-month", "data-abbr": true }, this.translateDateText({ date: 1 }, 'MMM'))), h("h2", { key: '64c4b74c742c62370e8fe74b7ffd0c8e10c8c8d7', hidden: this.viewingCalendar(), class: "pn-date-picker-title" }, this.translate(`SELECT_${this.viewType().toUpperCase()}`)), h("pn-button", { key: '065dcdbccfaf4f4b3eeae1bba9772a8bce804b66', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(YEARS) }, h("span", { key: '2c0b032610650aa43701a3f52052defad495569d' }, this.dateViewYear)), h("pn-button", { key: 'feb54d3c95595a39aa93eb2c74c7582a82b3031a', 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: '1d1aa223f4314d714db6e994a7f87f3f0004f472', class: "pn-date-picker-chips" }, h("slot", { key: '1239efd56b8aa01558c9671e3a1c198af8cdec28', name: "chips" })), h("nav", { key: '0410b4a1a92b1ccb56dee901be8df49933301142', class: "pn-date-picker-bottom", hidden: this.viewingCalendar() }, h("pn-button", { key: 'ec803a3af2c22f05f1416e0f62424b3341256d0f', appearance: "light", variant: "outlined", small: true, icon: pn_return, onPnClick: () => this.setView(CALENDAR) }, h("span", { key: '76b1889719347c417b5366bc511f48604aad35e1' }, this.translate('GO_CALENDAR')))))), h("p", { key: 'efb966a5373f0a1b0e300999af60a1f8b9194429', id: this.idHelper, class: "pn-date-picker-helpertext", hidden: !this.hasHelperText() || this.hasError() }, h("span", { key: 'cf169a86e1a4c9ca46d835a536971306dba5224f' }, this.helpertext), h("slot", { key: '858470af2c9febb68a7beffa3014485d91297893', name: "helpertext" })), h("p", { key: '219d57d13eebcb6d6621fe8e1a717fedcc39e641', id: this.idError, class: "pn-date-picker-error", role: "alert", hidden: !this.hasErrorMessage() }, h("span", { key: '92b84f913d27642f9487f6316040f95478a75373' }, this.error), h("slot", { key: '31a3de009f3b54f775f558ae6a9aa17ebb2bbc88', name: "error" }))));
1305
+ return (h(Host, { key: 'dbe09316ddf6365ad119afe9fd01a363aa3cf9bf' }, h("div", { key: 'b6aa1c922859c282529ff9e1297aacc79111a0f9', class: "pn-date-picker" }, this.renderInput(), this.range && (h("div", { key: '48d050a834a2df16b33759bbe117a5c378dfa069', class: "pn-date-picker-range-icon test" }, h("pn-icon", { key: '6b6507409ba5eaf3de232dff28785d9c7c0a85f0', icon: arrow_right }))), this.range && this.renderInput({ end: this.range })), h("div", { key: '9a9d31f221aabbf0927bcc8ae602d1330d75b4d3', id: this.idCalendar, class: "pn-date-picker-calendar", role: "dialog", "aria-label": this.translate('CALENDAR_NAVIGATION'), "data-open": this.open, "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: '56137ab966418bda3abd61bbcc12ff004feca5c0', class: "pn-date-picker-wrapper" }, h("nav", { key: '67a2fea072a8e4953fa9803e77d0245760b7195a', class: "pn-date-picker-nav", "aria-labelledby": this.idCalendar }, h("pn-button", { key: '9d9d0aa471baa6d6183a4b3b920cf8d05737e8a1', 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: '57988169fdd38cb05c18c6d4f8e71ded23f97f5f', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(MONTHS) }, h("span", { key: '93c98b9aeabdc4b08e59afdaf8655dfe3c440b13', class: "pn-date-picker-month", "data-full": true }, this.translateDateText({ date: 1 }, 'MMMM')), h("span", { key: '9c0b0c3378f00755ef84e5e87426c1a9bedb0651', class: "pn-date-picker-month", "data-abbr": true }, this.translateDateText({ date: 1 }, 'MMM'))), h("h2", { key: '02d40d1aa03dd69f5b344295713ec9c45431b3e9', hidden: this.viewingCalendar(), class: "pn-date-picker-title" }, this.translate(`SELECT_${this.viewType().toUpperCase()}`)), h("pn-button", { key: '4f953719a89967b10c98472b24f732c42cd61e3c', hidden: !this.viewingCalendar(), small: true, appearance: "light", onPnClick: () => this.setView(YEARS) }, h("span", { key: 'a91a0dd940b94d0f71d887508644d6acfa3ef098' }, this.dateViewYear)), h("pn-button", { key: '3eabe547992de22014f3e229c9e7e17eab395d56', 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: '6eaefead16141908688578834b1e6a2ba87e8161', class: "pn-date-picker-chips" }, h("slot", { key: '43bcfa9bb50d6dbd912ae8cfee339b642b9363a5', name: "chips" })), h("nav", { key: 'b22d7112ba5d3d012f5d2617586bd251547f4ed7', class: "pn-date-picker-bottom", hidden: this.viewingCalendar() }, h("pn-button", { key: '41031640dbac5130b3fb9029b36c5e732068c78f', appearance: "light", variant: "outlined", small: true, icon: pn_return, onPnClick: () => this.setView(CALENDAR) }, h("span", { key: '08568a439547db8728c3f110c00854d49ec7eb77' }, this.translate('GO_CALENDAR')))))), h("p", { key: 'e890351198e9eaa85e9db3bcc55bc8bdd48f3538', id: this.idHelper, class: "pn-date-picker-helpertext", hidden: this.hideHelpertext() }, h("span", { key: '0b776595b33ed64cb73b5060d023eb89421ad758' }, this.helpertext), h("slot", { key: 'e9ef3797e3baae78dca7efc2313e1b6cf9c7efd7', name: "helpertext" })), h("p", { key: 'aa43fb6eaf42251bb7dadab0f724edee0e6d42b2', id: this.idError, class: "pn-date-picker-error", role: "alert", hidden: this.hideError() }, h("span", { key: '556bfbb5e5ba697234734eb601445150b23ddcf2' }, this.error), h("slot", { key: '21dd12fd2c3f1ac814699f4785ece567136cedd2', name: "error" }))));
1227
1306
  }
1228
1307
  static get watchers() { return {
1229
1308
  "minDate": [{
1230
- "watchMin": 0
1309
+ "watchMin": 1
1231
1310
  }],
1232
1311
  "maxDate": [{
1233
- "watchMax": 0
1312
+ "watchMax": 1
1234
1313
  }],
1235
1314
  "start": [{
1236
1315
  "watchValue": 0
@@ -1241,9 +1320,12 @@ const PnDatePicker = class extends Mixin(animateHeightFactory) {
1241
1320
  "format": [{
1242
1321
  "handleFormat": 0
1243
1322
  }],
1244
- "id": [{
1323
+ "dateId": [{
1245
1324
  "watchId": 0
1246
1325
  }],
1326
+ "pnId": [{
1327
+ "watchId": 1
1328
+ }],
1247
1329
  "dateViewYear": [{
1248
1330
  "watchView": 0
1249
1331
  }],
@@ -2,12 +2,12 @@
2
2
  * Built with Stencil
3
3
  * By PostNord.
4
4
  */
5
- import { t as transformTag, r as registerInstance, g as getElement, f as forceUpdate, h, a as Host } from './index-CAEP792y.js';
5
+ import { t as transformTag, r as registerInstance, g as getElement, f as forceUpdate, h, a as Host } from './index-XKg-ydzH.js';
6
6
  import { uuidv4 } from './index.js';
7
7
  import { a as alert_exclamation_circle } from './alert_exclamation_circle-B88w-Zxn.js';
8
8
  import { a as alert_info_circle } from './alert_info_circle-BTqkgfeH.js';
9
9
 
10
- const pnFieldsetCss = () => `${transformTag("pn-fieldset")}{display:inline-block}${transformTag("pn-fieldset")} .pn-fieldset{border:0;padding:0;margin:0;color:#2d2013;display:flex;flex-direction:column;font-size:1em}${transformTag("pn-fieldset")} .pn-fieldset-legend{float:left;font-weight:500;line-height:1.4;padding:0}${transformTag("pn-fieldset")} .pn-fieldset-helpertext{color:#5e554a;margin:0}${transformTag("pn-fieldset")} .pn-fieldset-items{padding:0.75em 0;display:flex;flex-direction:column;gap:0.75em}${transformTag("pn-fieldset")} .pn-fieldset-message-wrapper{display:flex;gap:0.75em;color:#2d2013;line-height:1.4;font-weight:400}${transformTag("pn-fieldset")} .pn-fieldset-message-wrapper[hidden]{display:none}${transformTag("pn-fieldset")} .pn-fieldset-message{margin:0}${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-legend,${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-helpertext,${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-message-wrapper{color:#a70707}${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-legend>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-helpertext>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-message-wrapper>${transformTag("pn-icon")} .pn-icon-svg>path{fill:#a70707}${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-legend,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-helpertext,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message-wrapper{color:#2d2013}${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-legend>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-helpertext>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message-wrapper>${transformTag("pn-icon")} .pn-icon-svg>path{fill:#2d2013}`;
10
+ const pnFieldsetCss = () => `${transformTag("pn-fieldset")}{display:inline-block}${transformTag("pn-fieldset")} .pn-fieldset{border:0;padding:0;margin:0;color:#2d2013;display:flex;flex-direction:column;font-size:1em}${transformTag("pn-fieldset")} .pn-fieldset-legend{float:left;font-weight:500;line-height:1.4;padding:0}${transformTag("pn-fieldset")} .pn-fieldset-message{color:#5e554a;font-size:0.875em;font-weight:400;margin:0.25em 0 0 0;display:flex;flex-direction:column;gap:0.25em}${transformTag("pn-fieldset")} .pn-fieldset-message[hidden]{display:none}${transformTag("pn-fieldset")} .pn-fieldset-error{display:flex;flex-direction:row;flex-wrap:nowrap;gap:0.25em}${transformTag("pn-fieldset")} .pn-fieldset-error[hidden]{display:none}${transformTag("pn-fieldset")} .pn-fieldset-error>.pn-fieldset-message{color:#a70707}${transformTag("pn-fieldset")} .pn-fieldset-items{padding:0.75em 0;display:flex;flex-direction:column;gap:0.75em}${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-legend,${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-message-wrapper{color:#a70707}${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-legend>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset[aria-invalid=true]>.pn-fieldset-message-wrapper>${transformTag("pn-icon")} .pn-icon-svg>path{fill:#a70707}${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-legend,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-helpertext,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message-wrapper{color:#2d2013}${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-legend>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-helpertext>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message>${transformTag("pn-icon")} .pn-icon-svg>path,${transformTag("pn-fieldset")} .pn-fieldset:disabled>.pn-fieldset-message-wrapper>${transformTag("pn-icon")} .pn-icon-svg>path{fill:#2d2013}`;
11
11
 
12
12
  const PnFieldset = class {
13
13
  constructor(hostRef) {
@@ -24,57 +24,63 @@ const PnFieldset = class {
24
24
  legend;
25
25
  /** Text message underneath the legend for more instruction or hints on how to fill in controls correctly. */
26
26
  helpertext;
27
- /** Give the fieldset a custom HTML id. */
28
- fieldsetId = this.id;
27
+ /** Give the fieldset a HTML name. @category Native attributes */
28
+ name;
29
29
  /**
30
30
  * The id of the form you want the fieldset to be part of.
31
31
  * If you want the inputs inside to be associated with a specific form, you need to set on those elements directly.
32
+ * @category Native attributes
32
33
  */
33
34
  form;
34
- /** Give the fieldset a HTML name. */
35
- name;
36
- /** Disable all of the inputs inside of the fieldset. */
35
+ /** Disable all of the inputs inside of the fieldset. @category Native attributes */
37
36
  disabled = false;
38
- /** Set the fieldset as `invalid`, will add red error styles. */
37
+ /** Set the fieldset as `invalid`, will add red error styles. @category Features */
39
38
  invalid = false;
40
- /** Error message, applies warning styles and icon. */
39
+ /** Error message, applies warning styles and icon. @category Features */
41
40
  error;
41
+ /** Set a custom ID for the fieldset. @since v7.25.0 @category HTML attributes */
42
+ pnId = this.id;
43
+ /** Set a custom ID for the fieldset. @deprecated Use `pn-id` instead. @category HTML attributes */
44
+ fieldsetId = this.id;
42
45
  handleId() {
43
- this.idHelpertext = `${this.fieldsetId}-helpertext`;
46
+ this.idHelpertext = `${this.getId()}-helpertext`;
44
47
  }
45
- componentWillLoad() {
46
- this.handleId();
48
+ connectedCallback() {
49
+ this.mo = new MutationObserver(() => forceUpdate(this.hostElement));
50
+ this.mo.observe(this.hostElement, { childList: true, subtree: true });
47
51
  }
48
- componentDidLoad() {
52
+ disconnectedCallback() {
49
53
  if (this.mo)
50
54
  this.mo.disconnect();
51
- this.mo = new MutationObserver(() => forceUpdate(this.hostElement));
52
- this.mo.observe(this.hostElement.querySelector('.pn-fieldset'), { childList: true, subtree: true });
53
55
  }
54
- componentDidRender() {
55
- /**
56
- * Stencil has a known problem about rendering the `form` attribute.
57
- * Setting it via setAttribute solves it for now.
58
- * https://github.com/ionic-team/stencil/issues/2703
59
- **/
60
- if (this.form) {
61
- this.hostElement.querySelector('fieldset')?.setAttribute('form', this.form);
62
- }
56
+ getId() {
57
+ return this.pnId || this.fieldsetId || this.id;
58
+ }
59
+ hasHelpertext() {
60
+ const helpertextSlot = this.hostElement.querySelector('[slot="helpertext"]');
61
+ return !!this.helpertext || helpertextSlot?.textContent?.trim().length > 0;
63
62
  }
64
63
  hasError() {
65
- return this.invalid || !!this.error;
64
+ const errorSlot = this.hostElement.querySelector('[slot="error"]');
65
+ return !!this.error || errorSlot?.textContent?.trim().length > 0;
66
+ }
67
+ isInvalid() {
68
+ return this.invalid || this.hasError();
66
69
  }
67
- getSymbol() {
70
+ getIcon() {
68
71
  if (this.disabled)
69
72
  return alert_info_circle;
70
73
  return alert_exclamation_circle;
71
74
  }
72
75
  render() {
73
- return (h(Host, { key: '4eac26b9a4c9095888cbe548f30eddcbed3efcdf' }, h("fieldset", { key: '341684c752c43382f37d0d95f9ea8c0d2d170ef1', id: this.fieldsetId, class: "pn-fieldset", disabled: this.disabled, "aria-describedby": this.helpertext && this.idHelpertext, "aria-invalid": this.hasError().toString() }, h("legend", { key: '3f98ab3a56288cebb07cce9c49b6e1bebd2096f2', class: "pn-fieldset-legend" }, this.legend), this.helpertext && (h("p", { key: '979b9b47ae0baa2f84bf19de877149773bfd63b9', id: this.idHelpertext, class: "pn-fieldset-helpertext" }, this.helpertext)), h("div", { key: 'a67905a01003d767e26061ff8fa3af86a0900c27', class: "pn-fieldset-items" }, h("slot", { key: 'a2a02e54157e39e43cf03839c8bb2a561533eb39' })), h("div", { key: '4c618709e6a3cbaa20761368acc70b6d2e964930', class: "pn-fieldset-message-wrapper", role: "alert", hidden: !this.error }, h("pn-icon", { key: 'db1b62bccada153943c62195242e66b62d9cc2c3', icon: this.getSymbol() }), h("p", { key: '9b94853b5064d9563e39c20491d7139eead83f56', class: "pn-fieldset-message" }, this.error)))));
76
+ return (h(Host, { key: '908a403f3fb8b4779393f4ca0a4f17f518ba53a7' }, h("fieldset", { key: '97b321f776944a0d27f1b1096a967b2c9d9c9fcd', id: this.getId(), name: this.name, form: this.form, class: "pn-fieldset", disabled: this.disabled, "aria-describedby": this.hasHelpertext() ? this.idHelpertext : undefined, "aria-invalid": this.isInvalid().toString() }, h("legend", { key: 'a230416f33f787624f90977054c6492f1516dba6', class: "pn-fieldset-legend" }, this.legend), h("p", { key: '6911c6e63588c36bc0e314d7b3c8b81df2282579', id: this.idHelpertext, class: "pn-fieldset-message", hidden: !this.hasHelpertext() }, h("span", { key: '3370e13a7cf93741a4aa76880533b11c320aea03' }, this.helpertext), h("slot", { key: '0365489d121f3fcfa1211e3c2dcf2881f849940d', name: "helpertext" })), h("div", { key: '23d806e61d39d509ad07f0f68c002a1962332bf4', class: "pn-fieldset-items" }, h("slot", { key: 'a2ead121001e5f751f779957fbbb44716e64274c' })), h("div", { key: '075c709c13a8363be1b1a0b661e3621419a69333', class: "pn-fieldset-error", role: "alert", hidden: !this.hasError() }, h("pn-icon", { key: '0c4e969436033de98814135853e51388862e0812', icon: this.getIcon(), color: "warning" }), h("p", { key: 'd94095bee0a7e4fdc3962db9666dd4ffba7dfa50', class: "pn-fieldset-message" }, h("span", { key: '0c3808a66242f11afdc1ea5053517e965eeb3a93' }, this.error), h("slot", { key: 'ad9604de305ce00ef164cc999562707e923bdd83', name: "error" }))))));
74
77
  }
75
78
  static get watchers() { return {
76
79
  "fieldsetId": [{
77
80
  "handleId": 0
81
+ }],
82
+ "pnId": [{
83
+ "handleId": 1
78
84
  }]
79
85
  }; }
80
86
  };