@spw-ds/spw-stencil-library 1.3.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (470) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/index-CyRE8-Qe.js +3128 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/spw-accordion_4.cjs.entry.js +2 -2
  5. package/dist/cjs/spw-breadcrumb-item.cjs.entry.js +1 -1
  6. package/dist/cjs/spw-breadcrumb.cjs.entry.js +2 -2
  7. package/dist/cjs/spw-button_2.cjs.entry.js +1 -1
  8. package/dist/cjs/spw-card-content.cjs.entry.js +1 -1
  9. package/dist/cjs/spw-card-excerpt.cjs.entry.js +1 -1
  10. package/dist/cjs/spw-card-image.cjs.entry.js +2 -2
  11. package/dist/cjs/spw-card-subtag-item.cjs.entry.js +2 -2
  12. package/dist/cjs/spw-card-subtags.cjs.entry.js +2 -2
  13. package/dist/cjs/spw-card-title.cjs.entry.js +1 -1
  14. package/dist/cjs/spw-card.cjs.entry.js +2 -2
  15. package/dist/cjs/spw-checkbox.cjs.entry.js +1 -1
  16. package/dist/cjs/spw-cookies.cjs.entry.js +1 -1
  17. package/dist/cjs/spw-custom-select.cjs.entry.js +4 -4
  18. package/dist/cjs/spw-date-picker.cjs.entry.js +1 -1
  19. package/dist/cjs/spw-dropdown-container.cjs.entry.js +1 -1
  20. package/dist/cjs/spw-dropdown-item.cjs.entry.js +2 -2
  21. package/dist/cjs/spw-dropdown.cjs.entry.js +2 -2
  22. package/dist/cjs/spw-field-label_6.cjs.entry.js +2 -2
  23. package/dist/cjs/spw-field-message.cjs.entry.js +1 -1
  24. package/dist/cjs/spw-file-upload.cjs.entry.js +3 -3
  25. package/dist/cjs/spw-footer-bottom.cjs.entry.js +1 -1
  26. package/dist/cjs/spw-footer-content-col.cjs.entry.js +1 -1
  27. package/dist/cjs/spw-footer-content.cjs.entry.js +1 -1
  28. package/dist/cjs/spw-footer-link.cjs.entry.js +1 -1
  29. package/dist/cjs/spw-footer.cjs.entry.js +1 -1
  30. package/dist/cjs/spw-grid-item.cjs.entry.js +1 -1
  31. package/dist/cjs/spw-grid.cjs.entry.js +1 -1
  32. package/dist/cjs/spw-header-lang-item.cjs.entry.js +1 -1
  33. package/dist/cjs/spw-header-lang.cjs.entry.js +2 -2
  34. package/dist/cjs/spw-header-navigation-dropdown.cjs.entry.js +1 -1
  35. package/dist/cjs/spw-header-navigation-item.cjs.entry.js +1 -1
  36. package/dist/cjs/spw-header-navigation.cjs.entry.js +1 -1
  37. package/dist/cjs/spw-header-persona-item.cjs.entry.js +1 -1
  38. package/dist/cjs/spw-header-persona.cjs.entry.js +2 -2
  39. package/dist/cjs/spw-header.cjs.entry.js +1 -1
  40. package/dist/cjs/spw-hero.cjs.entry.js +1 -1
  41. package/dist/cjs/spw-illustration.cjs.entry.js +1 -1
  42. package/dist/cjs/spw-list-description.cjs.entry.js +1 -1
  43. package/dist/cjs/spw-list-item.cjs.entry.js +2 -2
  44. package/dist/cjs/spw-list-title.cjs.entry.js +1 -1
  45. package/dist/cjs/spw-list.cjs.entry.js +1 -1
  46. package/dist/cjs/spw-message.cjs.entry.js +1 -1
  47. package/dist/cjs/spw-modal.cjs.entry.js +1 -1
  48. package/dist/cjs/spw-mosaic-item.cjs.entry.js +2 -2
  49. package/dist/cjs/spw-mosaic.cjs.entry.js +2 -2
  50. package/dist/cjs/spw-pagination.cjs.entry.js +1 -1
  51. package/dist/cjs/spw-radio.cjs.entry.js +1 -1
  52. package/dist/cjs/spw-search-field.cjs.entry.js +3 -3
  53. package/dist/cjs/spw-select.cjs.entry.js +2 -2
  54. package/dist/cjs/spw-sidebar-navigation-dropdown.cjs.entry.js +1 -1
  55. package/dist/cjs/spw-sidebar-navigation-item.cjs.entry.js +4 -4
  56. package/dist/cjs/spw-sidebar-navigation-separator.cjs.entry.js +1 -1
  57. package/dist/cjs/spw-sidebar.cjs.entry.js +2 -2
  58. package/dist/cjs/spw-skeleton.cjs.entry.js +1 -1
  59. package/dist/cjs/spw-slider-item.cjs.entry.js +1 -1
  60. package/dist/cjs/spw-slider.cjs.entry.js +4 -4
  61. package/dist/cjs/spw-socials.cjs.entry.js +1 -1
  62. package/dist/cjs/spw-stencil-library.cjs.js +1 -1
  63. package/dist/cjs/spw-table-body.cjs.entry.js +2 -2
  64. package/dist/cjs/spw-table-cell.cjs.entry.js +2 -2
  65. package/dist/cjs/spw-table-container.cjs.entry.js +1 -1
  66. package/dist/cjs/spw-table-footer.cjs.entry.js +1 -1
  67. package/dist/cjs/spw-table-head.cjs.entry.js +1 -1
  68. package/dist/cjs/spw-table-header.cjs.entry.js +1 -1
  69. package/dist/cjs/spw-table-row.cjs.entry.js +1 -1
  70. package/dist/cjs/spw-table-sidebar.cjs.entry.js +1 -1
  71. package/dist/cjs/spw-table.cjs.entry.js +3 -3
  72. package/dist/cjs/spw-tabs-content.cjs.entry.js +1 -1
  73. package/dist/cjs/spw-tabs-navigation-item.cjs.entry.js +2 -2
  74. package/dist/cjs/spw-tabs-navigation.cjs.entry.js +2 -2
  75. package/dist/cjs/spw-tabs.cjs.entry.js +8 -8
  76. package/dist/cjs/spw-tag.cjs.entry.js +2 -2
  77. package/dist/cjs/spw-text-field.cjs.entry.js +1 -1
  78. package/dist/cjs/spw-textarea.cjs.entry.js +1 -1
  79. package/dist/cjs/spw-tile-description.cjs.entry.js +1 -1
  80. package/dist/cjs/spw-tile-title.cjs.entry.js +1 -1
  81. package/dist/cjs/spw-tile.cjs.entry.js +1 -1
  82. package/dist/cjs/spw-toc-container.cjs.entry.js +2 -2
  83. package/dist/cjs/spw-toc-navigation.cjs.entry.js +1 -1
  84. package/dist/cjs/spw-toc.cjs.entry.js +1 -1
  85. package/dist/cjs/spw-tooltip.cjs.entry.js +2 -2
  86. package/dist/cjs/spw-topbar.cjs.entry.js +1 -1
  87. package/dist/cjs/spw-wizard-item.cjs.entry.js +1 -1
  88. package/dist/cjs/spw-wizard.cjs.entry.js +1 -1
  89. package/dist/collection/assets/images/logo.svg +3 -3
  90. package/dist/collection/components/spw-accordion/spw-accordion.js +1 -1
  91. package/dist/collection/components/spw-breadcrumb/spw-breadcrumb.js +1 -1
  92. package/dist/collection/components/spw-card/spw-card-image/spw-card-image.js +1 -1
  93. package/dist/collection/components/spw-card/spw-card-subtag-item/spw-card-subtag-item.js +1 -1
  94. package/dist/collection/components/spw-card/spw-card-subtags/spw-card-subtags.js +1 -1
  95. package/dist/collection/components/spw-card/spw-card.js +1 -1
  96. package/dist/collection/components/spw-custom-select/spw-custom-select.js +3 -3
  97. package/dist/collection/components/spw-dropdown/spw-dropdown-item/spw-dropdown-item.js +1 -1
  98. package/dist/collection/components/spw-dropdown/spw-dropdown.js +1 -1
  99. package/dist/collection/components/spw-file-upload/spw-file-upload.js +2 -2
  100. package/dist/collection/components/spw-header/spw-header-lang/spw-header-lang.js +1 -1
  101. package/dist/collection/components/spw-header/spw-header-persona/spw-header-persona.js +1 -1
  102. package/dist/collection/components/spw-icon/assets/fontawesome/LICENSE.txt +165 -165
  103. package/dist/collection/components/spw-icon/assets/fontawesome/css/all.css +21649 -21649
  104. package/dist/collection/components/spw-icon/assets/fontawesome/css/all.min.css +8 -8
  105. package/dist/collection/components/spw-icon/assets/fontawesome/css/brands.css +2218 -2218
  106. package/dist/collection/components/spw-icon/assets/fontawesome/css/brands.min.css +5 -5
  107. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone-light.css +70 -70
  108. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone-light.min.css +5 -5
  109. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone-regular.css +70 -70
  110. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone-regular.min.css +5 -5
  111. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone-thin.css +70 -70
  112. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone-thin.min.css +5 -5
  113. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone.css +61 -61
  114. package/dist/collection/components/spw-icon/assets/fontawesome/css/duotone.min.css +5 -5
  115. package/dist/collection/components/spw-icon/assets/fontawesome/css/fontawesome.css +19230 -19230
  116. package/dist/collection/components/spw-icon/assets/fontawesome/css/fontawesome.min.css +8 -8
  117. package/dist/collection/components/spw-icon/assets/fontawesome/css/light.css +30 -30
  118. package/dist/collection/components/spw-icon/assets/fontawesome/css/light.min.css +5 -5
  119. package/dist/collection/components/spw-icon/assets/fontawesome/css/regular.css +30 -30
  120. package/dist/collection/components/spw-icon/assets/fontawesome/css/regular.min.css +5 -5
  121. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-light.css +70 -70
  122. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-light.min.css +5 -5
  123. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-regular.css +70 -70
  124. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-regular.min.css +5 -5
  125. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-solid.css +70 -70
  126. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-solid.min.css +5 -5
  127. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-thin.css +70 -70
  128. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-duotone-thin.min.css +5 -5
  129. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-light.css +30 -30
  130. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-light.min.css +5 -5
  131. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-regular.css +30 -30
  132. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-regular.min.css +5 -5
  133. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-solid.css +30 -30
  134. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-solid.min.css +5 -5
  135. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-thin.css +30 -30
  136. package/dist/collection/components/spw-icon/assets/fontawesome/css/sharp-thin.min.css +5 -5
  137. package/dist/collection/components/spw-icon/assets/fontawesome/css/solid.css +30 -30
  138. package/dist/collection/components/spw-icon/assets/fontawesome/css/solid.min.css +5 -5
  139. package/dist/collection/components/spw-icon/assets/fontawesome/css/svg-with-js.css +553 -553
  140. package/dist/collection/components/spw-icon/assets/fontawesome/css/svg-with-js.min.css +5 -5
  141. package/dist/collection/components/spw-icon/assets/fontawesome/css/svg.css +181 -181
  142. package/dist/collection/components/spw-icon/assets/fontawesome/css/svg.min.css +5 -5
  143. package/dist/collection/components/spw-icon/assets/fontawesome/css/thin.css +30 -30
  144. package/dist/collection/components/spw-icon/assets/fontawesome/css/thin.min.css +5 -5
  145. package/dist/collection/components/spw-icon/assets/fontawesome/css/v4-font-face.css +26 -26
  146. package/dist/collection/components/spw-icon/assets/fontawesome/css/v4-font-face.min.css +5 -5
  147. package/dist/collection/components/spw-icon/assets/fontawesome/css/v4-shims.css +2817 -2817
  148. package/dist/collection/components/spw-icon/assets/fontawesome/css/v4-shims.min.css +5 -5
  149. package/dist/collection/components/spw-icon/assets/fontawesome/css/v5-font-face.css +34 -34
  150. package/dist/collection/components/spw-icon/assets/fontawesome/css/v5-font-face.min.css +5 -5
  151. package/dist/collection/components/spw-illustration/spw-illustration.js +1 -1
  152. package/dist/collection/components/spw-list/spw-list-item/spw-list-item.js +1 -1
  153. package/dist/collection/components/spw-mosaic/spw-mosaic-item/spw-mosaic-item.js +1 -1
  154. package/dist/collection/components/spw-mosaic/spw-mosaic.js +1 -1
  155. package/dist/collection/components/spw-search-field/spw-search-field.js +2 -2
  156. package/dist/collection/components/spw-select/spw-select.js +2 -2
  157. package/dist/collection/components/spw-sidebar/spw-sidebar-navigation-item/spw-sidebar-navigation-item.js +3 -3
  158. package/dist/collection/components/spw-sidebar/spw-sidebar.js +1 -1
  159. package/dist/collection/components/spw-slider/spw-slider.js +3 -3
  160. package/dist/collection/components/spw-table/spw-table-body/spw-table-body.js +1 -1
  161. package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.js +1 -1
  162. package/dist/collection/components/spw-table/spw-table.js +4 -4
  163. package/dist/collection/components/spw-tabs/spw-tabs-navigation/spw-tabs-navigation.js +1 -1
  164. package/dist/collection/components/spw-tabs/spw-tabs-navigation-item/spw-tabs-navigation-item.js +1 -1
  165. package/dist/collection/components/spw-tabs/spw-tabs.js +7 -7
  166. package/dist/collection/components/spw-tag/spw-tag.js +1 -1
  167. package/dist/collection/components/spw-theme-provider/spw-theme-provider.js +1 -1
  168. package/dist/collection/components/spw-toc/spw-toc-container/spw-toc-container.js +3 -3
  169. package/dist/collection/components/spw-tooltip/spw-tooltip.js +1 -1
  170. package/dist/collection/stories/assets/accessibility.svg +4 -4
  171. package/dist/collection/stories/assets/discord.svg +15 -15
  172. package/dist/collection/stories/assets/github.svg +3 -3
  173. package/dist/collection/stories/assets/logo.svg +18 -18
  174. package/dist/collection/stories/assets/tutorials.svg +12 -12
  175. package/dist/collection/stories/assets/youtube.svg +4 -4
  176. package/dist/collection/stories/organisms/spw-card/spw-card.stories.js +140 -140
  177. package/dist/collection/stories/organisms/spw-grid/spw-grid.stories.js +293 -293
  178. package/dist/collection/stories/organisms/spw-mosaic/spw-mosaic.stories.js +299 -299
  179. package/dist/components/index.js +1 -1
  180. package/dist/components/{p-DqVJZx2h.js → p-7Bcqzg2C.js} +1 -1
  181. package/dist/components/{p-DXhSiVOD.js → p-BHShiqTJ.js} +1 -1
  182. package/dist/components/spw-accordion.js +1 -1
  183. package/dist/components/spw-breadcrumb.js +1 -1
  184. package/dist/components/spw-card-image.js +1 -1
  185. package/dist/components/spw-card-subtag-item.js +1 -1
  186. package/dist/components/spw-card-subtags.js +1 -1
  187. package/dist/components/spw-card.js +1 -1
  188. package/dist/components/spw-cookies.js +1 -1
  189. package/dist/components/spw-custom-select.js +1 -1
  190. package/dist/components/spw-dropdown-item.js +1 -1
  191. package/dist/components/spw-dropdown.js +1 -1
  192. package/dist/components/spw-file-upload.js +1 -1
  193. package/dist/components/spw-header-lang.js +1 -1
  194. package/dist/components/spw-header-persona.js +1 -1
  195. package/dist/components/spw-list-item.js +1 -1
  196. package/dist/components/spw-mosaic-item.js +1 -1
  197. package/dist/components/spw-mosaic.js +1 -1
  198. package/dist/components/spw-search-field.js +1 -1
  199. package/dist/components/spw-select.js +1 -1
  200. package/dist/components/spw-sidebar-navigation-item.js +1 -1
  201. package/dist/components/spw-sidebar.js +1 -1
  202. package/dist/components/spw-slider.js +1 -1
  203. package/dist/components/spw-table-body.js +1 -1
  204. package/dist/components/spw-table-cell.js +1 -1
  205. package/dist/components/spw-table-header.js +1 -1
  206. package/dist/components/spw-table.js +1 -1
  207. package/dist/components/spw-tabs-navigation-item.js +1 -1
  208. package/dist/components/spw-tabs-navigation.js +1 -1
  209. package/dist/components/spw-tabs.js +1 -1
  210. package/dist/components/spw-tag.js +1 -1
  211. package/dist/components/spw-theme-provider.js +1 -1
  212. package/dist/components/spw-toc-container.js +1 -1
  213. package/dist/components/spw-tooltip.js +1 -1
  214. package/dist/components_json.json +103 -103
  215. package/dist/esm/index-DHpdsNBR.js +3099 -0
  216. package/dist/esm/loader.js +2 -2
  217. package/dist/esm/spw-accordion_4.entry.js +2 -2
  218. package/dist/esm/spw-breadcrumb-item.entry.js +1 -1
  219. package/dist/esm/spw-breadcrumb.entry.js +2 -2
  220. package/dist/esm/spw-button_2.entry.js +1 -1
  221. package/dist/esm/spw-card-content.entry.js +1 -1
  222. package/dist/esm/spw-card-excerpt.entry.js +1 -1
  223. package/dist/esm/spw-card-image.entry.js +2 -2
  224. package/dist/esm/spw-card-subtag-item.entry.js +2 -2
  225. package/dist/esm/spw-card-subtags.entry.js +2 -2
  226. package/dist/esm/spw-card-title.entry.js +1 -1
  227. package/dist/esm/spw-card.entry.js +2 -2
  228. package/dist/esm/spw-checkbox.entry.js +1 -1
  229. package/dist/esm/spw-cookies.entry.js +1 -1
  230. package/dist/esm/spw-custom-select.entry.js +4 -4
  231. package/dist/esm/spw-date-picker.entry.js +1 -1
  232. package/dist/esm/spw-dropdown-container.entry.js +1 -1
  233. package/dist/esm/spw-dropdown-item.entry.js +2 -2
  234. package/dist/esm/spw-dropdown.entry.js +2 -2
  235. package/dist/esm/spw-field-label_6.entry.js +2 -2
  236. package/dist/esm/spw-field-message.entry.js +1 -1
  237. package/dist/esm/spw-file-upload.entry.js +3 -3
  238. package/dist/esm/spw-footer-bottom.entry.js +1 -1
  239. package/dist/esm/spw-footer-content-col.entry.js +1 -1
  240. package/dist/esm/spw-footer-content.entry.js +1 -1
  241. package/dist/esm/spw-footer-link.entry.js +1 -1
  242. package/dist/esm/spw-footer.entry.js +1 -1
  243. package/dist/esm/spw-grid-item.entry.js +1 -1
  244. package/dist/esm/spw-grid.entry.js +1 -1
  245. package/dist/esm/spw-header-lang-item.entry.js +1 -1
  246. package/dist/esm/spw-header-lang.entry.js +2 -2
  247. package/dist/esm/spw-header-navigation-dropdown.entry.js +1 -1
  248. package/dist/esm/spw-header-navigation-item.entry.js +1 -1
  249. package/dist/esm/spw-header-navigation.entry.js +1 -1
  250. package/dist/esm/spw-header-persona-item.entry.js +1 -1
  251. package/dist/esm/spw-header-persona.entry.js +2 -2
  252. package/dist/esm/spw-header.entry.js +1 -1
  253. package/dist/esm/spw-hero.entry.js +1 -1
  254. package/dist/esm/spw-illustration.entry.js +1 -1
  255. package/dist/esm/spw-list-description.entry.js +1 -1
  256. package/dist/esm/spw-list-item.entry.js +2 -2
  257. package/dist/esm/spw-list-title.entry.js +1 -1
  258. package/dist/esm/spw-list.entry.js +1 -1
  259. package/dist/esm/spw-message.entry.js +1 -1
  260. package/dist/esm/spw-modal.entry.js +1 -1
  261. package/dist/esm/spw-mosaic-item.entry.js +2 -2
  262. package/dist/esm/spw-mosaic.entry.js +2 -2
  263. package/dist/esm/spw-pagination.entry.js +1 -1
  264. package/dist/esm/spw-radio.entry.js +1 -1
  265. package/dist/esm/spw-search-field.entry.js +3 -3
  266. package/dist/esm/spw-select.entry.js +2 -2
  267. package/dist/esm/spw-sidebar-navigation-dropdown.entry.js +1 -1
  268. package/dist/esm/spw-sidebar-navigation-item.entry.js +4 -4
  269. package/dist/esm/spw-sidebar-navigation-separator.entry.js +1 -1
  270. package/dist/esm/spw-sidebar.entry.js +2 -2
  271. package/dist/esm/spw-skeleton.entry.js +1 -1
  272. package/dist/esm/spw-slider-item.entry.js +1 -1
  273. package/dist/esm/spw-slider.entry.js +4 -4
  274. package/dist/esm/spw-socials.entry.js +1 -1
  275. package/dist/esm/spw-stencil-library.js +2 -2
  276. package/dist/esm/spw-table-body.entry.js +2 -2
  277. package/dist/esm/spw-table-cell.entry.js +2 -2
  278. package/dist/esm/spw-table-container.entry.js +1 -1
  279. package/dist/esm/spw-table-footer.entry.js +1 -1
  280. package/dist/esm/spw-table-head.entry.js +1 -1
  281. package/dist/esm/spw-table-header.entry.js +1 -1
  282. package/dist/esm/spw-table-row.entry.js +1 -1
  283. package/dist/esm/spw-table-sidebar.entry.js +1 -1
  284. package/dist/esm/spw-table.entry.js +3 -3
  285. package/dist/esm/spw-tabs-content.entry.js +1 -1
  286. package/dist/esm/spw-tabs-navigation-item.entry.js +2 -2
  287. package/dist/esm/spw-tabs-navigation.entry.js +2 -2
  288. package/dist/esm/spw-tabs.entry.js +8 -8
  289. package/dist/esm/spw-tag.entry.js +2 -2
  290. package/dist/esm/spw-text-field.entry.js +1 -1
  291. package/dist/esm/spw-textarea.entry.js +1 -1
  292. package/dist/esm/spw-tile-description.entry.js +1 -1
  293. package/dist/esm/spw-tile-title.entry.js +1 -1
  294. package/dist/esm/spw-tile.entry.js +1 -1
  295. package/dist/esm/spw-toc-container.entry.js +2 -2
  296. package/dist/esm/spw-toc-navigation.entry.js +1 -1
  297. package/dist/esm/spw-toc.entry.js +1 -1
  298. package/dist/esm/spw-tooltip.entry.js +2 -2
  299. package/dist/esm/spw-topbar.entry.js +1 -1
  300. package/dist/esm/spw-wizard-item.entry.js +1 -1
  301. package/dist/esm/spw-wizard.entry.js +1 -1
  302. package/dist/spw-stencil-library/assets/fontawesome/LICENSE.txt +165 -165
  303. package/dist/spw-stencil-library/assets/fontawesome/css/all.css +21649 -21649
  304. package/dist/spw-stencil-library/assets/fontawesome/css/all.min.css +8 -8
  305. package/dist/spw-stencil-library/assets/fontawesome/css/brands.css +2218 -2218
  306. package/dist/spw-stencil-library/assets/fontawesome/css/brands.min.css +5 -5
  307. package/dist/spw-stencil-library/assets/fontawesome/css/duotone-light.css +70 -70
  308. package/dist/spw-stencil-library/assets/fontawesome/css/duotone-light.min.css +5 -5
  309. package/dist/spw-stencil-library/assets/fontawesome/css/duotone-regular.css +70 -70
  310. package/dist/spw-stencil-library/assets/fontawesome/css/duotone-regular.min.css +5 -5
  311. package/dist/spw-stencil-library/assets/fontawesome/css/duotone-thin.css +70 -70
  312. package/dist/spw-stencil-library/assets/fontawesome/css/duotone-thin.min.css +5 -5
  313. package/dist/spw-stencil-library/assets/fontawesome/css/duotone.css +61 -61
  314. package/dist/spw-stencil-library/assets/fontawesome/css/duotone.min.css +5 -5
  315. package/dist/spw-stencil-library/assets/fontawesome/css/fontawesome.css +19230 -19230
  316. package/dist/spw-stencil-library/assets/fontawesome/css/fontawesome.min.css +8 -8
  317. package/dist/spw-stencil-library/assets/fontawesome/css/light.css +30 -30
  318. package/dist/spw-stencil-library/assets/fontawesome/css/light.min.css +5 -5
  319. package/dist/spw-stencil-library/assets/fontawesome/css/regular.css +30 -30
  320. package/dist/spw-stencil-library/assets/fontawesome/css/regular.min.css +5 -5
  321. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-light.css +70 -70
  322. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-light.min.css +5 -5
  323. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-regular.css +70 -70
  324. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-regular.min.css +5 -5
  325. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-solid.css +70 -70
  326. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-solid.min.css +5 -5
  327. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-thin.css +70 -70
  328. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-duotone-thin.min.css +5 -5
  329. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-light.css +30 -30
  330. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-light.min.css +5 -5
  331. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-regular.css +30 -30
  332. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-regular.min.css +5 -5
  333. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-solid.css +30 -30
  334. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-solid.min.css +5 -5
  335. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-thin.css +30 -30
  336. package/dist/spw-stencil-library/assets/fontawesome/css/sharp-thin.min.css +5 -5
  337. package/dist/spw-stencil-library/assets/fontawesome/css/solid.css +30 -30
  338. package/dist/spw-stencil-library/assets/fontawesome/css/solid.min.css +5 -5
  339. package/dist/spw-stencil-library/assets/fontawesome/css/svg-with-js.css +553 -553
  340. package/dist/spw-stencil-library/assets/fontawesome/css/svg-with-js.min.css +5 -5
  341. package/dist/spw-stencil-library/assets/fontawesome/css/svg.css +181 -181
  342. package/dist/spw-stencil-library/assets/fontawesome/css/svg.min.css +5 -5
  343. package/dist/spw-stencil-library/assets/fontawesome/css/thin.css +30 -30
  344. package/dist/spw-stencil-library/assets/fontawesome/css/thin.min.css +5 -5
  345. package/dist/spw-stencil-library/assets/fontawesome/css/v4-font-face.css +26 -26
  346. package/dist/spw-stencil-library/assets/fontawesome/css/v4-font-face.min.css +5 -5
  347. package/dist/spw-stencil-library/assets/fontawesome/css/v4-shims.css +2817 -2817
  348. package/dist/spw-stencil-library/assets/fontawesome/css/v4-shims.min.css +5 -5
  349. package/dist/spw-stencil-library/assets/fontawesome/css/v5-font-face.css +34 -34
  350. package/dist/spw-stencil-library/assets/fontawesome/css/v5-font-face.min.css +5 -5
  351. package/dist/spw-stencil-library/assets/images/logo.svg +3 -3
  352. package/dist/spw-stencil-library/{p-94aa0e26.entry.js → p-01c7be3b.entry.js} +1 -1
  353. package/dist/spw-stencil-library/{p-efb0ac80.entry.js → p-01d4645e.entry.js} +1 -1
  354. package/dist/spw-stencil-library/{p-4bfb9fe7.entry.js → p-03c0824b.entry.js} +1 -1
  355. package/dist/spw-stencil-library/{p-ecbb2e9a.entry.js → p-06db55be.entry.js} +1 -1
  356. package/dist/spw-stencil-library/{p-80eab1b0.entry.js → p-07fef503.entry.js} +1 -1
  357. package/dist/spw-stencil-library/{p-de798509.entry.js → p-09d41ad7.entry.js} +1 -1
  358. package/dist/spw-stencil-library/{p-06faf7dd.entry.js → p-0f08e3b5.entry.js} +1 -1
  359. package/dist/spw-stencil-library/{p-f22e24d7.entry.js → p-20ad68eb.entry.js} +1 -1
  360. package/dist/spw-stencil-library/{p-e0f6f758.entry.js → p-2684ad4e.entry.js} +1 -1
  361. package/dist/spw-stencil-library/{p-88fc6448.entry.js → p-2d217da1.entry.js} +1 -1
  362. package/dist/spw-stencil-library/{p-363a2f26.entry.js → p-2ea41c47.entry.js} +1 -1
  363. package/dist/spw-stencil-library/{p-adb783f5.entry.js → p-33152447.entry.js} +1 -1
  364. package/dist/spw-stencil-library/{p-7cb2f275.entry.js → p-378588ee.entry.js} +1 -1
  365. package/dist/spw-stencil-library/{p-e77926c1.entry.js → p-3d60cfa3.entry.js} +1 -1
  366. package/dist/spw-stencil-library/{p-63777231.entry.js → p-3e8e3e76.entry.js} +1 -1
  367. package/dist/spw-stencil-library/{p-db33ceff.entry.js → p-40ece319.entry.js} +1 -1
  368. package/dist/spw-stencil-library/{p-b29a5f6d.entry.js → p-40fc0c6d.entry.js} +1 -1
  369. package/dist/spw-stencil-library/{p-fa4bf37b.entry.js → p-4405d2a3.entry.js} +1 -1
  370. package/dist/spw-stencil-library/{p-24de9d6f.entry.js → p-449f99fc.entry.js} +1 -1
  371. package/dist/spw-stencil-library/{p-6c5fed80.entry.js → p-4832a21c.entry.js} +1 -1
  372. package/dist/spw-stencil-library/{p-3733b5aa.entry.js → p-4f9e145d.entry.js} +1 -1
  373. package/dist/spw-stencil-library/{p-14ae8c47.entry.js → p-529b6ef3.entry.js} +1 -1
  374. package/dist/spw-stencil-library/{p-45bd7e3f.entry.js → p-54f3d08e.entry.js} +1 -1
  375. package/dist/spw-stencil-library/{p-c9b33019.entry.js → p-563aabba.entry.js} +1 -1
  376. package/dist/spw-stencil-library/{p-25991392.entry.js → p-57b26fb9.entry.js} +1 -1
  377. package/dist/spw-stencil-library/{p-09e6a285.entry.js → p-58eaaadd.entry.js} +1 -1
  378. package/dist/spw-stencil-library/{p-1318262e.entry.js → p-5d5a81e4.entry.js} +1 -1
  379. package/dist/spw-stencil-library/{p-335213ab.entry.js → p-6793abcd.entry.js} +1 -1
  380. package/dist/spw-stencil-library/{p-f9eaa983.entry.js → p-67ced918.entry.js} +1 -1
  381. package/dist/spw-stencil-library/{p-ee3be870.entry.js → p-68adf678.entry.js} +1 -1
  382. package/dist/spw-stencil-library/{p-abd0df84.entry.js → p-6c3a1614.entry.js} +1 -1
  383. package/dist/spw-stencil-library/{p-520fdc55.entry.js → p-7204e08e.entry.js} +1 -1
  384. package/dist/spw-stencil-library/{p-0b1cd208.entry.js → p-75746d63.entry.js} +1 -1
  385. package/dist/spw-stencil-library/{p-76939fb5.entry.js → p-7bd4e77f.entry.js} +1 -1
  386. package/dist/spw-stencil-library/{p-153a8379.entry.js → p-81cc6bb3.entry.js} +1 -1
  387. package/dist/spw-stencil-library/{p-40a288b5.entry.js → p-85a47392.entry.js} +1 -1
  388. package/dist/spw-stencil-library/{p-665fd904.entry.js → p-88a9eccb.entry.js} +1 -1
  389. package/dist/spw-stencil-library/{p-db2f9ef2.entry.js → p-89125b91.entry.js} +1 -1
  390. package/dist/spw-stencil-library/{p-051d07e3.entry.js → p-8b5ebe42.entry.js} +1 -1
  391. package/dist/spw-stencil-library/{p-0208e5fc.entry.js → p-8c45daa0.entry.js} +1 -1
  392. package/dist/spw-stencil-library/p-8e12828a.entry.js +1 -0
  393. package/dist/spw-stencil-library/{p-079623b3.entry.js → p-908f3658.entry.js} +1 -1
  394. package/dist/spw-stencil-library/{p-9e96cfab.entry.js → p-909c4623.entry.js} +1 -1
  395. package/dist/spw-stencil-library/{p-2770164c.entry.js → p-94286ed7.entry.js} +1 -1
  396. package/dist/spw-stencil-library/{p-6a46c406.entry.js → p-96589719.entry.js} +1 -1
  397. package/dist/spw-stencil-library/{p-16005257.entry.js → p-9bf610ae.entry.js} +1 -1
  398. package/dist/spw-stencil-library/{p-ecbd9504.entry.js → p-9e7dc508.entry.js} +1 -1
  399. package/dist/spw-stencil-library/{p-7889e1ae.entry.js → p-9ed07ee5.entry.js} +1 -1
  400. package/dist/spw-stencil-library/{p-7eeac846.entry.js → p-9f3b3377.entry.js} +1 -1
  401. package/dist/spw-stencil-library/{p-e6150dda.entry.js → p-9f808264.entry.js} +1 -1
  402. package/dist/spw-stencil-library/p-DHpdsNBR.js +2 -0
  403. package/dist/spw-stencil-library/{p-b14ddb08.entry.js → p-a0a6d78f.entry.js} +1 -1
  404. package/dist/spw-stencil-library/{p-3e8d5ced.entry.js → p-a3787817.entry.js} +1 -1
  405. package/dist/spw-stencil-library/{p-3e951a12.entry.js → p-aa3ee9ec.entry.js} +1 -1
  406. package/dist/spw-stencil-library/{p-d126356c.entry.js → p-b4314720.entry.js} +1 -1
  407. package/dist/spw-stencil-library/{p-48d208ee.entry.js → p-b4fe4211.entry.js} +1 -1
  408. package/dist/spw-stencil-library/{p-24b404bc.entry.js → p-b53e5660.entry.js} +1 -1
  409. package/dist/spw-stencil-library/{p-1e806b7c.entry.js → p-b5c0302a.entry.js} +1 -1
  410. package/dist/spw-stencil-library/{p-51dee6d1.entry.js → p-b75cf4fd.entry.js} +1 -1
  411. package/dist/spw-stencil-library/{p-36122fda.entry.js → p-b8b9676e.entry.js} +1 -1
  412. package/dist/spw-stencil-library/p-be30e58c.entry.js +1 -0
  413. package/dist/spw-stencil-library/{p-fbfb718d.entry.js → p-c1a09e2d.entry.js} +2 -2
  414. package/dist/spw-stencil-library/{p-c2f883a7.entry.js → p-ca3b52ab.entry.js} +1 -1
  415. package/dist/spw-stencil-library/{p-572fbe20.entry.js → p-cb38e925.entry.js} +1 -1
  416. package/dist/spw-stencil-library/{p-245ec14d.entry.js → p-d1e8dd4f.entry.js} +1 -1
  417. package/dist/spw-stencil-library/{p-0f0e0865.entry.js → p-d6103b6d.entry.js} +1 -1
  418. package/dist/spw-stencil-library/{p-fc294645.entry.js → p-d650c077.entry.js} +1 -1
  419. package/dist/spw-stencil-library/{p-82bdad54.entry.js → p-d79c1219.entry.js} +1 -1
  420. package/dist/spw-stencil-library/{p-545a148a.entry.js → p-d92d1a33.entry.js} +1 -1
  421. package/dist/spw-stencil-library/{p-7368447c.entry.js → p-dbef139b.entry.js} +1 -1
  422. package/dist/spw-stencil-library/{p-601d8677.entry.js → p-dcd08aba.entry.js} +1 -1
  423. package/dist/spw-stencil-library/{p-551ec5c3.entry.js → p-ddcd2d9a.entry.js} +1 -1
  424. package/dist/spw-stencil-library/{p-c3f43f82.entry.js → p-de7380c0.entry.js} +1 -1
  425. package/dist/spw-stencil-library/{p-78c4b828.entry.js → p-e2eff4ab.entry.js} +1 -1
  426. package/dist/spw-stencil-library/{p-4a2c3f75.entry.js → p-e405b30d.entry.js} +1 -1
  427. package/dist/spw-stencil-library/{p-28914c6c.entry.js → p-e7ac119a.entry.js} +1 -1
  428. package/dist/spw-stencil-library/{p-6b8b8146.entry.js → p-ecac5934.entry.js} +1 -1
  429. package/dist/spw-stencil-library/{p-ebeaaedd.entry.js → p-eea03e8c.entry.js} +1 -1
  430. package/dist/spw-stencil-library/{p-af000e35.entry.js → p-ef1ed112.entry.js} +1 -1
  431. package/dist/spw-stencil-library/{p-d4b91d0b.entry.js → p-f00bf484.entry.js} +1 -1
  432. package/dist/spw-stencil-library/{p-5b5e643f.entry.js → p-f05aec64.entry.js} +1 -1
  433. package/dist/spw-stencil-library/{p-907bb470.entry.js → p-f8daf171.entry.js} +1 -1
  434. package/dist/spw-stencil-library/{p-c8870b5a.entry.js → p-f9aa9f25.entry.js} +1 -1
  435. package/dist/spw-stencil-library/{p-bc3ff922.entry.js → p-fb965a79.entry.js} +1 -1
  436. package/dist/spw-stencil-library/{p-e03d5d7c.entry.js → p-fdcb54e5.entry.js} +1 -1
  437. package/dist/spw-stencil-library/spw-stencil-library.css +22 -22
  438. package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
  439. package/dist/stats.json +987 -987
  440. package/dist/types/components/spw-accordion/spw-accordion.d.ts +1 -1
  441. package/dist/types/components/spw-breadcrumb/spw-breadcrumb.d.ts +1 -1
  442. package/dist/types/components/spw-card/spw-card-subtag-item/spw-card-subtag-item.d.ts +1 -1
  443. package/dist/types/components/spw-dropdown/spw-dropdown-item/spw-dropdown-item.d.ts +1 -1
  444. package/dist/types/components/spw-dropdown/spw-dropdown.d.ts +1 -1
  445. package/dist/types/components/spw-header/spw-header-lang/spw-header-lang.d.ts +1 -1
  446. package/dist/types/components/spw-header/spw-header-persona/spw-header-persona.d.ts +1 -1
  447. package/dist/types/components/spw-list/spw-list-item/spw-list-item.d.ts +1 -1
  448. package/dist/types/components/spw-search-field/spw-search-field.d.ts +1 -1
  449. package/dist/types/components/spw-sidebar/spw-sidebar-navigation-item/spw-sidebar-navigation-item.d.ts +1 -1
  450. package/dist/types/components/spw-sidebar/spw-sidebar.d.ts +1 -1
  451. package/dist/types/components/spw-slider/spw-slider.d.ts +1 -1
  452. package/dist/types/components/spw-table/spw-table-body/spw-table-body.d.ts +1 -1
  453. package/dist/types/components/spw-table/spw-table-cell/spw-table-cell.d.ts +1 -1
  454. package/dist/types/components/spw-tabs/spw-tabs-navigation/spw-tabs-navigation.d.ts +1 -1
  455. package/dist/types/components/spw-tabs/spw-tabs-navigation-item/spw-tabs-navigation-item.d.ts +1 -1
  456. package/dist/types/components/spw-tabs/spw-tabs.d.ts +1 -1
  457. package/dist/types/components/spw-tag/spw-tag.d.ts +1 -1
  458. package/dist/types/components/spw-toc/spw-toc-container/spw-toc-container.d.ts +1 -1
  459. package/dist/types/components/spw-toc/spw-toc-navigation/spw-toc-navigation.d.ts +1 -1
  460. package/dist/types/components/spw-tooltip/spw-tooltip.d.ts +1 -1
  461. package/hydrate/package.json +1 -1
  462. package/package.json +13 -4
  463. package/{README.md → readme.md} +16 -16
  464. package/dist/cjs/index-DFv_X5OO.js +0 -3128
  465. package/dist/esm/index-BhcwOlgO.js +0 -3099
  466. package/dist/spw-stencil-library/p-95ad5b00.entry.js +0 -1
  467. package/dist/spw-stencil-library/p-BhcwOlgO.js +0 -2
  468. package/dist/spw-stencil-library/p-e1f204c9.entry.js +0 -1
  469. package/hydrate/index.js +0 -37851
  470. package/hydrate/index.mjs +0 -37841
@@ -1 +1 @@
1
- import{p as e,t,H as n,h as i,a as o}from"./index.js";const s=e(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.background="white"}componentDidLoad(){this.applyBackgroundToChildren()}backgroundChanged(){this.applyBackgroundToChildren()}applyBackgroundToChildren(){this.el.querySelectorAll("spw-accordion-item").forEach((e=>{this.background?e.style.setProperty("--spw-accordion-item-background",this.background):e.style.removeProperty("--spw-accordion-item-background")}))}render(){return i(o,{key:"e712ffafeb0ffd35327f40a99d4e6b96152fccfc"},i("div",{key:"0d18fdd150b61da3369cde542154572568f5e9ff",class:"spw-accordion"},i("slot",{key:"89d8e9766300158bcb0cded5f6c96b28f69a5feb"})))}get el(){return this}static get watchers(){return{background:[{backgroundChanged:0}]}}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;position:relative}'}},[257,"spw-accordion",{background:[1]},void 0,{background:[{backgroundChanged:0}]}]);function a(){"undefined"!=typeof customElements&&["spw-accordion"].forEach((e=>{"spw-accordion"===e&&(customElements.get(t(e))||customElements.define(t(e),s))}))}export{s as S,a as d}
1
+ import{p as e,t,H as n,h as i,a as o}from"./index.js";const s=e(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.background="white"}componentDidLoad(){this.applyBackgroundToChildren()}backgroundChanged(){this.applyBackgroundToChildren()}applyBackgroundToChildren(){this.el.querySelectorAll("spw-accordion-item").forEach((e=>{this.background?e.style.setProperty("--spw-accordion-item-background",this.background):e.style.removeProperty("--spw-accordion-item-background")}))}render(){return i(o,{key:"6ee5c6133437405d4f93dc8e26d074fa143d8863"},i("div",{key:"df3c85eda551857c9cd2675cb088e6af4610aa60",class:"spw-accordion"},i("slot",{key:"5fc8ef189bccb34e381993b30e56eae22df7e153"})))}get el(){return this}static get watchers(){return{background:[{backgroundChanged:0}]}}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;position:relative}'}},[257,"spw-accordion",{background:[1]},void 0,{background:[{backgroundChanged:0}]}]);function a(){"undefined"!=typeof customElements&&["spw-accordion"].forEach((e=>{"spw-accordion"===e&&(customElements.get(t(e))||customElements.define(t(e),s))}))}export{s as S,a as d}
@@ -1 +1 @@
1
- import{p as t,H as e,h as i,t as o}from"./index.js";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tooltipTitle="",this.tooltipText="",this.direction="top",this.cursor="help",this.visible=!0,this.isVisible=!1,this.showTooltip=()=>{this.visible&&(this.isVisible=!0,this.createTooltip(),requestAnimationFrame((()=>{this.positionTooltip()})),window.addEventListener("scroll",this.handleScrollOrResize,!0),window.addEventListener("resize",this.handleScrollOrResize))},this.hideTooltip=()=>{this.isVisible=!1,this.removeTooltipFromDOM(),window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize)}}connectedCallback(){this.handleScrollOrResize=this.handleScrollOrResize.bind(this)}disconnectedCallback(){window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize),this.removeTooltipFromDOM()}updateTooltipVisibility(){this.tooltipEl&&(this.tooltipEl.style.display=this.visible?"flex":"none")}componentWillRender(){this.updateTooltipVisibility()}componentDidUpdate(){this.updateTooltipVisibility()}handleScrollOrResize(){this.isVisible&&this.positionTooltip()}createTooltip(){if(!this.tooltipEl){if(this.tooltipEl=document.createElement("div"),this.tooltipEl.className=`spw-tooltip-fixed spw-tooltip-fixed--${this.direction}`,this.tooltipEl.setAttribute("role","tooltip"),this.tooltipTitle){const t=document.createElement("strong");t.className="spw-tooltip__title",t.textContent=this.tooltipTitle,this.tooltipEl.appendChild(t)}if(this.tooltipText){const t=document.createElement("div");t.textContent=this.tooltipText,this.tooltipEl.appendChild(t)}document.body.appendChild(this.tooltipEl)}}removeTooltipFromDOM(){this.tooltipEl&&this.tooltipEl.parentNode&&this.tooltipEl.parentNode.removeChild(this.tooltipEl),this.tooltipEl=null}positionTooltip(){var t;if(!this.tooltipEl)return;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".spw-tooltip__target");if(!e)return;const i=e.getBoundingClientRect(),o=this.tooltipEl;o.style.visibility="hidden",o.style.display="flex",o.style.position="fixed",o.style.top="0px",o.style.left="0px",o.style.maxWidth=this.maxWidth+"px"||"100%";const s=o.getBoundingClientRect();let n=0,r=0;switch(this.direction){case"top":n=i.top-s.height-8,r=i.left+(i.width-s.width)/2;break;case"bottom":n=i.bottom+8,r=i.left+(i.width-s.width)/2;break;case"left":n=i.top+(i.height-s.height)/2,r=i.left-s.width-8;break;default:n=i.top+(i.height-s.height)/2,r=i.right+8}o.style.top=`${n}px`,o.style.left=`${r}px`,o.style.zIndex="9999",o.style.visibility="visible"}get classes(){return{"spw-tooltip__target":!0,[`spw-tooltip__target--${this.cursor}`]:!0}}render(){return i("div",{key:"6a8ed4b17413ec1e406b035c993fa2abd9b5a749",class:this.classes,onMouseEnter:this.showTooltip,onMouseLeave:this.hideTooltip},i("slot",{key:"13e4a8b70c6750107322a665db2212346ef2ec04"}))}get host(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline-block}.spw-tooltip__target--pointer{cursor:pointer}.spw-tooltip__target--default{cursor:default}.spw-tooltip__target--help{cursor:help}.spw-tooltip__target--disabled{cursor:not-allowed}:host(.spw-tooltip--has-ellipsis) .spw-tooltip__target{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}'}},[257,"spw-tooltip",{tooltipTitle:[1,"tooltip-title"],tooltipText:[1,"tooltip-text"],maxWidth:[1,"max-width"],direction:[1],cursor:[1],visible:[4],isVisible:[32]}]);function n(){"undefined"!=typeof customElements&&["spw-tooltip"].forEach((t=>{"spw-tooltip"===t&&(customElements.get(o(t))||customElements.define(o(t),s))}))}export{s as S,n as d}
1
+ import{p as t,H as e,h as i,t as o}from"./index.js";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tooltipTitle="",this.tooltipText="",this.direction="top",this.cursor="help",this.visible=!0,this.isVisible=!1,this.showTooltip=()=>{this.visible&&(this.isVisible=!0,this.createTooltip(),requestAnimationFrame((()=>{this.positionTooltip()})),window.addEventListener("scroll",this.handleScrollOrResize,!0),window.addEventListener("resize",this.handleScrollOrResize))},this.hideTooltip=()=>{this.isVisible=!1,this.removeTooltipFromDOM(),window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize)}}connectedCallback(){this.handleScrollOrResize=this.handleScrollOrResize.bind(this)}disconnectedCallback(){window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize),this.removeTooltipFromDOM()}updateTooltipVisibility(){this.tooltipEl&&(this.tooltipEl.style.display=this.visible?"flex":"none")}componentWillRender(){this.updateTooltipVisibility()}componentDidUpdate(){this.updateTooltipVisibility()}handleScrollOrResize(){this.isVisible&&this.positionTooltip()}createTooltip(){if(!this.tooltipEl){if(this.tooltipEl=document.createElement("div"),this.tooltipEl.className=`spw-tooltip-fixed spw-tooltip-fixed--${this.direction}`,this.tooltipEl.setAttribute("role","tooltip"),this.tooltipTitle){const t=document.createElement("strong");t.className="spw-tooltip__title",t.textContent=this.tooltipTitle,this.tooltipEl.appendChild(t)}if(this.tooltipText){const t=document.createElement("div");t.textContent=this.tooltipText,this.tooltipEl.appendChild(t)}document.body.appendChild(this.tooltipEl)}}removeTooltipFromDOM(){this.tooltipEl&&this.tooltipEl.parentNode&&this.tooltipEl.parentNode.removeChild(this.tooltipEl),this.tooltipEl=null}positionTooltip(){var t;if(!this.tooltipEl)return;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".spw-tooltip__target");if(!e)return;const i=e.getBoundingClientRect(),o=this.tooltipEl;o.style.visibility="hidden",o.style.display="flex",o.style.position="fixed",o.style.top="0px",o.style.left="0px",o.style.maxWidth=this.maxWidth+"px"||"100%";const s=o.getBoundingClientRect();let n=0,r=0;switch(this.direction){case"top":n=i.top-s.height-8,r=i.left+(i.width-s.width)/2;break;case"bottom":n=i.bottom+8,r=i.left+(i.width-s.width)/2;break;case"left":n=i.top+(i.height-s.height)/2,r=i.left-s.width-8;break;default:n=i.top+(i.height-s.height)/2,r=i.right+8}o.style.top=`${n}px`,o.style.left=`${r}px`,o.style.zIndex="9999",o.style.visibility="visible"}get classes(){return{"spw-tooltip__target":!0,[`spw-tooltip__target--${this.cursor}`]:!0}}render(){return i("div",{key:"429b24dd5190bcc387f6a9a828a429a51ec95409",class:this.classes,onMouseEnter:this.showTooltip,onMouseLeave:this.hideTooltip},i("slot",{key:"bbb8cd0a22d7bbf22bebd29a4fb9ebbb86b10068"}))}get host(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline-block}.spw-tooltip__target--pointer{cursor:pointer}.spw-tooltip__target--default{cursor:default}.spw-tooltip__target--help{cursor:help}.spw-tooltip__target--disabled{cursor:not-allowed}:host(.spw-tooltip--has-ellipsis) .spw-tooltip__target{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}'}},[257,"spw-tooltip",{tooltipTitle:[1,"tooltip-title"],tooltipText:[1,"tooltip-text"],maxWidth:[1,"max-width"],direction:[1],cursor:[1],visible:[4],isVisible:[32]}]);function n(){"undefined"!=typeof customElements&&["spw-tooltip"].forEach((t=>{"spw-tooltip"===t&&(customElements.get(o(t))||customElements.define(o(t),s))}))}export{s as S,n as d}
@@ -1 +1 @@
1
- import{S as o,d as s}from"./p-DqVJZx2h.js";const p=o,r=s;export{p as SpwAccordion,r as defineCustomElement}
1
+ import{S as o,d as s}from"./p-7Bcqzg2C.js";const p=o,r=s;export{p as SpwAccordion,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as i,a as s,t as a}from"./index.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.maxItems=9999,this.variant="default",this.surface="light",this.fontSize="small"}componentDidLoad(){this.updateBreadcrumbVisibility()}componentDidUpdate(){this.updateBreadcrumbVisibility()}updateBreadcrumbVisibility(){const e=this.host.querySelectorAll("spw-breadcrumb-item"),t=e.length;if(e.forEach((e=>{e.classList.remove("hidden-item","collapsed-item")})),t>this.maxItems){const i=this.maxItems-1;e.forEach(((e,s)=>{s>=i&&s<t-1&&e.classList.add(s===t-2?"collapsed-item":"hidden-item")}))}}render(){return i(s,{key:"bce4927922adb869deb64d789af0a4569a34d47a"},i("nav",{key:"ea0931107eef9ab337dbb2ce82349a2f12dde289","aria-label":this.accAriaLabel,class:{"spw-breadcrumb":!0,["spw-breadcrumb--surface-"+this.surface]:!0,["spw-breadcrumb--font-size-"+this.fontSize]:!0,["spw-breadcrumb--"+this.variant]:!0}},i("div",{key:"f4b29bb6c08eda5a6660f55a7a1471eded51c2e1",role:"list",class:"spw-breadcrumb__list"},i("slot",{key:"b79be699d875f54e6287d2b5258213791919d6a7"}))))}get host(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-breadcrumb{font-size:16px;max-width:100%;width:100%}.spw-breadcrumb--font-size-small{font-size:14px}.spw-breadcrumb__list{display:flex;list-style:none;padding:0;margin:0;width:100%;max-width:100%}@media (min-width: 1024px){.spw-breadcrumb--multiline .spw-breadcrumb__list{display:block}}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:last-child){display:block;margin-top:12px}}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)):after{display:none !important}}::slotted(spw-breadcrumb-item){margin-right:10px;padding-left:24px;position:relative;display:none}::slotted(spw-breadcrumb-item):after{position:absolute;top:50%;transform:translateY(-50%);left:0;font-family:var(--spw-ds-font-icons-solid);font-weight:700;content:"\\f060";font-size:14px}@media (min-width: 1024px){::slotted(spw-breadcrumb-item):after{right:0;left:auto;transform:translateY(-50%);content:"\\f054";font-size:12px}}@media (min-width: 1024px){::slotted(spw-breadcrumb-item){display:inline-block;padding-left:0;padding-right:16px}}::slotted(spw-breadcrumb-item:last-child){flex:1;overflow:hidden;display:none;margin-right:0;-webkit-box-orient:vertical;text-overflow:ellipsis;-webkit-line-clamp:1;line-clamp:1;padding-right:0}::slotted(spw-breadcrumb-item:last-child):after{display:none}@media (min-width: 1024px){::slotted(spw-breadcrumb-item:last-child){display:-webkit-box}}.spw-breadcrumb:not(.spw-breadcrumb--multiline):not(.spw-breadcrumb--one-line) ::slotted(spw-breadcrumb-item:nth-last-child(2)){display:-webkit-box !important}.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item){display:none}@media (min-width: 1024px){.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item){display:inline-block}}.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child){overflow:initial;display:-webkit-box !important}.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child):after{display:block}@media (min-width: 1024px){.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child):after{display:none}}@media (min-width: 1024px){.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child){display:inline-block}}.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item){display:none}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item){display:inline-block}}.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)){overflow:initial;display:-webkit-box !important}.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)):after{display:block}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)){display:inline-block !important}}::slotted(.hidden-item){display:none}::slotted(.collapsed-item){font-size:0;position:relative}::slotted(.collapsed-item):before{font-family:var(--spw-ds-font-icons-solid);font-weight:700;content:"\\f141";font-size:16px;color:var(--spw-color-themes-grey-grey-500)}.spw-breadcrumb--surface-light ::slotted(spw-breadcrumb-item):after{opacity:1;color:var(--spw-ds-primary)}@media (min-width: 1024px){.spw-breadcrumb--surface-light ::slotted(spw-breadcrumb-item):after{color:var(--spw-color-themes-grey-grey-600)}}.spw-breadcrumb--surface-dark{color:var(--spw-ds-white) !important}.spw-breadcrumb--surface-dark ::slotted(spw-breadcrumb-item):after{opacity:0.7;color:var(--spw-ds-white)}.spw-breadcrumb--surface-dark ::slotted(.collapsed-item):before{opacity:0.7;color:var(--spw-ds-white)}'}},[257,"spw-breadcrumb",{variant:[1],surface:[1],fontSize:[1,"font-size"],accAriaLabel:[1,"acc-aria-label"]}]),o=r,n=function(){"undefined"!=typeof customElements&&["spw-breadcrumb"].forEach((e=>{"spw-breadcrumb"===e&&(customElements.get(a(e))||customElements.define(a(e),r))}))};export{o as SpwBreadcrumb,n as defineCustomElement}
1
+ import{p as e,H as t,h as i,a as s,t as a}from"./index.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.maxItems=9999,this.variant="default",this.surface="light",this.fontSize="small"}componentDidLoad(){this.updateBreadcrumbVisibility()}componentDidUpdate(){this.updateBreadcrumbVisibility()}updateBreadcrumbVisibility(){const e=this.host.querySelectorAll("spw-breadcrumb-item"),t=e.length;if(e.forEach((e=>{e.classList.remove("hidden-item","collapsed-item")})),t>this.maxItems){const i=this.maxItems-1;e.forEach(((e,s)=>{s>=i&&s<t-1&&e.classList.add(s===t-2?"collapsed-item":"hidden-item")}))}}render(){return i(s,{key:"e964f56f7642802e0c442bc30b3252c111fb8b10"},i("nav",{key:"17a7f3426cac84d888b78700d0c2b6cfe11a2ed1","aria-label":this.accAriaLabel,class:{"spw-breadcrumb":!0,["spw-breadcrumb--surface-"+this.surface]:!0,["spw-breadcrumb--font-size-"+this.fontSize]:!0,["spw-breadcrumb--"+this.variant]:!0}},i("div",{key:"a3cbcf109b5cf518029691ad950116df0b88943b",role:"list",class:"spw-breadcrumb__list"},i("slot",{key:"f274e8483d6214d98d5a7e1aabbb06cd959e45cc"}))))}get host(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-breadcrumb{font-size:16px;max-width:100%;width:100%}.spw-breadcrumb--font-size-small{font-size:14px}.spw-breadcrumb__list{display:flex;list-style:none;padding:0;margin:0;width:100%;max-width:100%}@media (min-width: 1024px){.spw-breadcrumb--multiline .spw-breadcrumb__list{display:block}}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:last-child){display:block;margin-top:12px}}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)):after{display:none !important}}::slotted(spw-breadcrumb-item){margin-right:10px;padding-left:24px;position:relative;display:none}::slotted(spw-breadcrumb-item):after{position:absolute;top:50%;transform:translateY(-50%);left:0;font-family:var(--spw-ds-font-icons-solid);font-weight:700;content:"\\f060";font-size:14px}@media (min-width: 1024px){::slotted(spw-breadcrumb-item):after{right:0;left:auto;transform:translateY(-50%);content:"\\f054";font-size:12px}}@media (min-width: 1024px){::slotted(spw-breadcrumb-item){display:inline-block;padding-left:0;padding-right:16px}}::slotted(spw-breadcrumb-item:last-child){flex:1;overflow:hidden;display:none;margin-right:0;-webkit-box-orient:vertical;text-overflow:ellipsis;-webkit-line-clamp:1;line-clamp:1;padding-right:0}::slotted(spw-breadcrumb-item:last-child):after{display:none}@media (min-width: 1024px){::slotted(spw-breadcrumb-item:last-child){display:-webkit-box}}.spw-breadcrumb:not(.spw-breadcrumb--multiline):not(.spw-breadcrumb--one-line) ::slotted(spw-breadcrumb-item:nth-last-child(2)){display:-webkit-box !important}.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item){display:none}@media (min-width: 1024px){.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item){display:inline-block}}.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child){overflow:initial;display:-webkit-box !important}.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child):after{display:block}@media (min-width: 1024px){.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child):after{display:none}}@media (min-width: 1024px){.spw-breadcrumb--one-line ::slotted(spw-breadcrumb-item:last-child){display:inline-block}}.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item){display:none}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item){display:inline-block}}.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)){overflow:initial;display:-webkit-box !important}.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)):after{display:block}@media (min-width: 1024px){.spw-breadcrumb--multiline ::slotted(spw-breadcrumb-item:nth-last-child(2)){display:inline-block !important}}::slotted(.hidden-item){display:none}::slotted(.collapsed-item){font-size:0;position:relative}::slotted(.collapsed-item):before{font-family:var(--spw-ds-font-icons-solid);font-weight:700;content:"\\f141";font-size:16px;color:var(--spw-color-themes-grey-grey-500)}.spw-breadcrumb--surface-light ::slotted(spw-breadcrumb-item):after{opacity:1;color:var(--spw-ds-primary)}@media (min-width: 1024px){.spw-breadcrumb--surface-light ::slotted(spw-breadcrumb-item):after{color:var(--spw-color-themes-grey-grey-600)}}.spw-breadcrumb--surface-dark{color:var(--spw-ds-white) !important}.spw-breadcrumb--surface-dark ::slotted(spw-breadcrumb-item):after{opacity:0.7;color:var(--spw-ds-white)}.spw-breadcrumb--surface-dark ::slotted(.collapsed-item):before{opacity:0.7;color:var(--spw-ds-white)}'}},[257,"spw-breadcrumb",{variant:[1],surface:[1],fontSize:[1,"font-size"],accAriaLabel:[1,"acc-aria-label"]}]),o=r,n=function(){"undefined"!=typeof customElements&&["spw-breadcrumb"].forEach((e=>{"spw-breadcrumb"===e&&(customElements.get(a(e))||customElements.define(a(e),r))}))};export{o as SpwBreadcrumb,n as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as i,t as o}from"./index.js";import{d as a}from"./p-Dzw3OiMu.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}componentDidLoad(){const e=this.el.closest("spw-card");e&&(e.addEventListener("mouseenter",(()=>this.onCardHover(!0))),e.addEventListener("mouseleave",(()=>this.onCardHover(!1))))}onCardHover(e){const t=this.el.shadowRoot.querySelector(".spw-card-image");t&&(e?t.classList.add("--is-hovered"):t.classList.remove("--is-hovered"))}get hasRatio(){return!!(this.ratio||this.ratioMobile||this.ratioTablet||this.ratioDesktop)}get elementClass(){return{"spw-card-image":!0,"spw-card-image--ratio":this.hasRatio}}render(){const e={};return this.ratio&&(e["--spw-card-image-ratio"]=this.ratio,e["--spw-card-image-ratio-mobile"]=this.ratio,e["--spw-card-image-ratio-tablet"]=this.ratio,e["--spw-card-image-ratio-desktop"]=this.ratio),this.ratioMobile&&(e["--spw-card-image-ratio-mobile"]=this.ratioMobile),this.ratioTablet&&(e["--spw-card-image-ratio-tablet"]=this.ratioTablet),this.ratioDesktop&&(e["--spw-card-image-ratio-desktop"]=this.ratioDesktop),i("div",{key:"9eccd1cf76ae67c9d55fc09b06729199cef04d30",class:this.elementClass,style:e},this.label&&i("span",{key:"03a6afd8b38bc2a4069adc1be87eebc081ebc526",class:"spw-card-image__label"},this.label),i("slot",{key:"65cbfd02d2497cce0173fd38ebbb0da82b0a4df6"}),i("div",{key:"c96e34df588007c2ae4782118f4de76b4973e9d2",class:"spw-card-image__icon"},i("spw-icon",{key:"3b6c4a3f20e248c2f74f1549f4341bd99376f368",icon:"fa-plus"})))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host(.--video):after,:host(.--highlighted):after{content:"";background:black;opacity:0.4;transition:all linear 0.2s;border-radius:5px;position:absolute;top:0;left:0;width:100%;height:100%}:host{width:100%;line-height:1;--spw-card-image-display:block}:host(.--people){width:112px;max-width:112px}.spw-card-image{position:relative;overflow:hidden;border-radius:5px 5px 0 0;display:var(--spw-card-image-display)}:host(.--vertical) .spw-card-image,:host(.--event) .spw-card-image{border-radius:5px 0 0 5px}:host(.--highlighted) .spw-card-image,:host(.--people) .spw-card-image{border-radius:5px}:host(.--video) .spw-card-image,:host(.--sidebar) .spw-card-image{border-radius:5px}.spw-card-image ::slotted(img),.spw-card-image img{width:100%;height:auto;transition:all 0.3s ease;transform-origin:center center}.spw-card-image--ratio{aspect-ratio:var(--spw-card-image-ratio-mobile, var(--spw-card-image-ratio))}@media (min-width: 768px){.spw-card-image--ratio{aspect-ratio:var(--spw-card-image-ratio-tablet, var(--spw-card-image-ratio))}}@media (min-width: 1024px){.spw-card-image--ratio{aspect-ratio:var(--spw-card-image-ratio-desktop, var(--spw-card-image-ratio))}}.spw-card-image--ratio ::slotted(img),.spw-card-image--ratio img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center}.spw-card-image__icon:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:black;opacity:0.4}.spw-card-image__icon{position:absolute;z-index:2;display:flex;visibility:hidden;width:100%;height:100%;font-size:30px;font-weight:300;opacity:0;top:0;left:0;color:white;justify-content:center;align-items:center;transition:all 0.3s ease}.spw-card-image__icon spw-icon{transform:scale(1.5);transition:all 0.3s ease}.spw-card-image__label{position:absolute;top:10px;right:10px;display:inline-flex;padding:8px 12px;align-items:center;border-radius:9999px;color:var(--spw-color-themes-grey-grey-900);box-shadow:var(--spw-effect-elevation-3);font-size:14px;background:var(--spw-ds-white);z-index:3;line-height:1}:host(.--hovered:not(.--video)) .spw-card-image .spw-card-image__icon,:host(.--hovered:not(.--video)) .spw-card-image.--is-hovered .spw-card-image__icon{visibility:visible;opacity:1}:host(.--hovered:not(.--video)) .spw-card-image .spw-card-image__icon spw-icon,:host(.--hovered:not(.--video)) .spw-card-image.--is-hovered .spw-card-image__icon spw-icon{transform:scale(1)}:host(.--hovered:not(.--video)) .spw-card-image ::slotted(img),:host(.--hovered:not(.--video)) .spw-card-image.--is-hovered ::slotted(img){transform:scale(1.1)}:host(.--vertical),:host(.--event){width:170px;min-width:170px;position:relative;overflow:hidden}:host(.--vertical) .spw-card-image,:host(.--event) .spw-card-image{height:100%}:host(.--vertical) .spw-card-image ::slotted(img),:host(.--event) .spw-card-image ::slotted(img){position:absolute;top:0;left:0;width:100%;height:100% !important;object-fit:cover;object-position:center}:host(.--sidebar){width:75px;min-width:75px;height:75px;min-height:75px;position:relative;overflow:hidden}:host(.--sidebar) .spw-card-image{height:100%}:host(.--sidebar) .spw-card-image ::slotted(img){position:absolute;top:0;left:0;width:100%;height:100% !important;object-fit:cover;object-position:center}:host(.--highlighted){position:relative}:host(.--highlighted):after{opacity:0}:host(.--video){width:100%;height:100%;position:absolute;overflow:hidden;top:0;left:0}:host(.--video):after{opacity:0}:host(.--video) .spw-card-image{height:100%}:host(.--video) .spw-card-image ::slotted(img){position:absolute;top:0;left:0;width:100%;height:100% !important;object-fit:cover;object-position:center}:host(.--video.--hovered):after{opacity:0.2}'}},[257,"spw-card-image",{label:[1],ratio:[1],ratioMobile:[1,"ratio-mobile"],ratioTablet:[1,"ratio-tablet"],ratioDesktop:[1,"ratio-desktop"]}]),r=s,n=function(){"undefined"!=typeof customElements&&["spw-card-image","spw-icon"].forEach((e=>{switch(e){case"spw-card-image":customElements.get(o(e))||customElements.define(o(e),s);break;case"spw-icon":customElements.get(o(e))||a()}}))};export{r as SpwCardImage,n as defineCustomElement}
1
+ import{p as e,H as t,h as i,t as o}from"./index.js";import{d as a}from"./p-Dzw3OiMu.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}componentDidLoad(){const e=this.el.closest("spw-card");e&&(e.addEventListener("mouseenter",(()=>this.onCardHover(!0))),e.addEventListener("mouseleave",(()=>this.onCardHover(!1))))}onCardHover(e){const t=this.el.shadowRoot.querySelector(".spw-card-image");t&&(e?t.classList.add("--is-hovered"):t.classList.remove("--is-hovered"))}get hasRatio(){return!!(this.ratio||this.ratioMobile||this.ratioTablet||this.ratioDesktop)}get elementClass(){return{"spw-card-image":!0,"spw-card-image--ratio":this.hasRatio}}render(){const e={};return this.ratio&&(e["--spw-card-image-ratio"]=this.ratio,e["--spw-card-image-ratio-mobile"]=this.ratio,e["--spw-card-image-ratio-tablet"]=this.ratio,e["--spw-card-image-ratio-desktop"]=this.ratio),this.ratioMobile&&(e["--spw-card-image-ratio-mobile"]=this.ratioMobile),this.ratioTablet&&(e["--spw-card-image-ratio-tablet"]=this.ratioTablet),this.ratioDesktop&&(e["--spw-card-image-ratio-desktop"]=this.ratioDesktop),i("div",{key:"4e13f69085dd932acf0cc0f46e2110200ff71577",class:this.elementClass,style:e},this.label&&i("span",{key:"e88dc3952df0eae004d73df78efffee4856abc74",class:"spw-card-image__label"},this.label),i("slot",{key:"a366a17ed53bf66384e9cc7521bf896d78917864"}),i("div",{key:"00ed5b4164641b7257d643208398436b67b0dc2e",class:"spw-card-image__icon"},i("spw-icon",{key:"2d4e7e6327032fcf33c9e06d7f149a04a076b22d",icon:"fa-plus"})))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host(.--video):after,:host(.--highlighted):after{content:"";background:black;opacity:0.4;transition:all linear 0.2s;border-radius:5px;position:absolute;top:0;left:0;width:100%;height:100%}:host{width:100%;line-height:1;--spw-card-image-display:block}:host(.--people){width:112px;max-width:112px}.spw-card-image{position:relative;overflow:hidden;border-radius:5px 5px 0 0;display:var(--spw-card-image-display)}:host(.--vertical) .spw-card-image,:host(.--event) .spw-card-image{border-radius:5px 0 0 5px}:host(.--highlighted) .spw-card-image,:host(.--people) .spw-card-image{border-radius:5px}:host(.--video) .spw-card-image,:host(.--sidebar) .spw-card-image{border-radius:5px}.spw-card-image ::slotted(img),.spw-card-image img{width:100%;height:auto;transition:all 0.3s ease;transform-origin:center center}.spw-card-image--ratio{aspect-ratio:var(--spw-card-image-ratio-mobile, var(--spw-card-image-ratio))}@media (min-width: 768px){.spw-card-image--ratio{aspect-ratio:var(--spw-card-image-ratio-tablet, var(--spw-card-image-ratio))}}@media (min-width: 1024px){.spw-card-image--ratio{aspect-ratio:var(--spw-card-image-ratio-desktop, var(--spw-card-image-ratio))}}.spw-card-image--ratio ::slotted(img),.spw-card-image--ratio img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center}.spw-card-image__icon:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:black;opacity:0.4}.spw-card-image__icon{position:absolute;z-index:2;display:flex;visibility:hidden;width:100%;height:100%;font-size:30px;font-weight:300;opacity:0;top:0;left:0;color:white;justify-content:center;align-items:center;transition:all 0.3s ease}.spw-card-image__icon spw-icon{transform:scale(1.5);transition:all 0.3s ease}.spw-card-image__label{position:absolute;top:10px;right:10px;display:inline-flex;padding:8px 12px;align-items:center;border-radius:9999px;color:var(--spw-color-themes-grey-grey-900);box-shadow:var(--spw-effect-elevation-3);font-size:14px;background:var(--spw-ds-white);z-index:3;line-height:1}:host(.--hovered:not(.--video)) .spw-card-image .spw-card-image__icon,:host(.--hovered:not(.--video)) .spw-card-image.--is-hovered .spw-card-image__icon{visibility:visible;opacity:1}:host(.--hovered:not(.--video)) .spw-card-image .spw-card-image__icon spw-icon,:host(.--hovered:not(.--video)) .spw-card-image.--is-hovered .spw-card-image__icon spw-icon{transform:scale(1)}:host(.--hovered:not(.--video)) .spw-card-image ::slotted(img),:host(.--hovered:not(.--video)) .spw-card-image.--is-hovered ::slotted(img){transform:scale(1.1)}:host(.--vertical),:host(.--event){width:170px;min-width:170px;position:relative;overflow:hidden}:host(.--vertical) .spw-card-image,:host(.--event) .spw-card-image{height:100%}:host(.--vertical) .spw-card-image ::slotted(img),:host(.--event) .spw-card-image ::slotted(img){position:absolute;top:0;left:0;width:100%;height:100% !important;object-fit:cover;object-position:center}:host(.--sidebar){width:75px;min-width:75px;height:75px;min-height:75px;position:relative;overflow:hidden}:host(.--sidebar) .spw-card-image{height:100%}:host(.--sidebar) .spw-card-image ::slotted(img){position:absolute;top:0;left:0;width:100%;height:100% !important;object-fit:cover;object-position:center}:host(.--highlighted){position:relative}:host(.--highlighted):after{opacity:0}:host(.--video){width:100%;height:100%;position:absolute;overflow:hidden;top:0;left:0}:host(.--video):after{opacity:0}:host(.--video) .spw-card-image{height:100%}:host(.--video) .spw-card-image ::slotted(img){position:absolute;top:0;left:0;width:100%;height:100% !important;object-fit:cover;object-position:center}:host(.--video.--hovered):after{opacity:0.2}'}},[257,"spw-card-image",{label:[1],ratio:[1],ratioMobile:[1,"ratio-mobile"],ratioTablet:[1,"ratio-tablet"],ratioDesktop:[1,"ratio-desktop"]}]),r=s,n=function(){"undefined"!=typeof customElements&&["spw-card-image","spw-icon"].forEach((e=>{switch(e){case"spw-card-image":customElements.get(o(e))||customElements.define(o(e),s);break;case"spw-icon":customElements.get(o(e))||a()}}))};export{r as SpwCardImage,n as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as i,a as n,t as o}from"./index.js";const s=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}handleClick(){this.link&&(window.location.href=this.link)}get elementClass(){return{"spw-card-subtag-item":!0,"spw-card-subtag-item--has-link":!!this.link}}render(){return i(n,{key:"36ba7eba49c04f670603bb3daacef93e9b2d93ec"},i("span",{key:"eb4f408366fedf55a75cd46cea6f7ee43689fae6",class:this.elementClass,onClick:()=>this.handleClick()},i("slot",{key:"54f81a9c1e941414e46c274ee52c4c6e90b79975"})))}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline}:host(.--link) .spw-card-subtag-item{font-size:15px;color:var(--spw-ds-primary);font-weight:700}:host(.--link) .spw-card-subtag-item--has-link{text-decoration:underline}:host(.--link) .spw-card-subtag-item--has-link:hover{text-decoration:none}:host(.--link.--highlighted) .spw-card-subtag-item{color:white}:host(.--tag) .spw-card-subtag-item{display:inline-block;padding:8px 12px;border-radius:9999px;background:var(--spw-color-themes-grey-grey-200);transition:all 0.2s linear;line-height:1;font-size:14px;color:var(--spw-color-themes-grey-grey-900)}:host(.--tag) .spw-card-subtag-item:hover{background:var(--spw-color-themes-grey-grey-300)}'}},[257,"spw-card-subtag-item",{link:[1]}]),a=s,r=function(){"undefined"!=typeof customElements&&["spw-card-subtag-item"].forEach((e=>{"spw-card-subtag-item"===e&&(customElements.get(o(e))||customElements.define(o(e),s))}))};export{a as SpwCardSubtagItem,r as defineCustomElement}
1
+ import{p as t,H as e,h as i,a as n,t as o}from"./index.js";const s=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}handleClick(){this.link&&(window.location.href=this.link)}get elementClass(){return{"spw-card-subtag-item":!0,"spw-card-subtag-item--has-link":!!this.link}}render(){return i(n,{key:"4dfbda5365b2d9b603c1d1e7f06e38dc8c4ea6f1"},i("span",{key:"3b5124ad292e1b0a22ebbdc88f2d779a76c098b7",class:this.elementClass,onClick:()=>this.handleClick()},i("slot",{key:"b762380291e4a4be84fc61bdc56e53687f9cfbb4"})))}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline}:host(.--link) .spw-card-subtag-item{font-size:15px;color:var(--spw-ds-primary);font-weight:700}:host(.--link) .spw-card-subtag-item--has-link{text-decoration:underline}:host(.--link) .spw-card-subtag-item--has-link:hover{text-decoration:none}:host(.--link.--highlighted) .spw-card-subtag-item{color:white}:host(.--tag) .spw-card-subtag-item{display:inline-block;padding:8px 12px;border-radius:9999px;background:var(--spw-color-themes-grey-grey-200);transition:all 0.2s linear;line-height:1;font-size:14px;color:var(--spw-color-themes-grey-grey-900)}:host(.--tag) .spw-card-subtag-item:hover{background:var(--spw-color-themes-grey-grey-300)}'}},[257,"spw-card-subtag-item",{link:[1]}]),a=s,r=function(){"undefined"!=typeof customElements&&["spw-card-subtag-item"].forEach((t=>{"spw-card-subtag-item"===t&&(customElements.get(o(t))||customElements.define(o(t),s))}))};export{a as SpwCardSubtagItem,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,h as i,a as s,t as n}from"./index.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.variant="link"}componentWillLoad(){this.applyVariantToChildren()}applyVariantToChildren(){requestAnimationFrame((()=>{const t="--"+this.variant;this.el.querySelectorAll("spw-card-subtag-item").forEach((e=>{e.classList.add(t),this.el.classList.contains("--highlighted")&&e.classList.add("--highlighted")}))}))}get elementClass(){return{"spw-card-subtags":!0,["spw-card-subtags--"+this.variant]:!0}}render(){return i(s,{key:"f77ffa5b4f5fe8a47ede2bc8aad7774805e6b92b"},i("div",{key:"b2271dfdb69baf4902ac7725e7276bfa4c48341d",class:this.elementClass},i("slot",{key:"e372a3a027c94ec0e62cf59e144d9128ef1eedfb"})))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:contents}.spw-card-subtags{margin-bottom:8px;color:var(--spw-ds-primary)}.--highlighted .spw-card-subtags{color:white}.spw-card-subtags spw-card-subtag-item:after,.spw-card-subtags .spw-card-subtag-item:after{content:",";margin-right:2px;display:inline}.spw-card-subtags spw-card-subtag-item:last-child:after,.spw-card-subtags .spw-card-subtag-item:last-child:after{display:none}.spw-card-subtags--tag spw-card-subtag-item:after,.spw-card-subtags--tag .spw-card-subtag-item:after{content:"";margin-right:4px}'}},[260,"spw-card-subtags",{variant:[1]}]),o=a,r=function(){"undefined"!=typeof customElements&&["spw-card-subtags"].forEach((t=>{"spw-card-subtags"===t&&(customElements.get(n(t))||customElements.define(n(t),a))}))};export{o as SpwCardSubtags,r as defineCustomElement}
1
+ import{p as t,H as e,h as i,a as s,t as n}from"./index.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.variant="link"}componentWillLoad(){this.applyVariantToChildren()}applyVariantToChildren(){requestAnimationFrame((()=>{const t="--"+this.variant;this.el.querySelectorAll("spw-card-subtag-item").forEach((e=>{e.classList.add(t),this.el.classList.contains("--highlighted")&&e.classList.add("--highlighted")}))}))}get elementClass(){return{"spw-card-subtags":!0,["spw-card-subtags--"+this.variant]:!0}}render(){return i(s,{key:"72621f8eee1cc5b5969670842913eff4f5f5e69b"},i("div",{key:"6c9041b1e3c78fb4f93f7e34361b8e63970fbd47",class:this.elementClass},i("slot",{key:"590107f4c452742b0510f69aeab0547291ace00f"})))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:contents}.spw-card-subtags{margin-bottom:8px;color:var(--spw-ds-primary)}.--highlighted .spw-card-subtags{color:white}.spw-card-subtags spw-card-subtag-item:after,.spw-card-subtags .spw-card-subtag-item:after{content:",";margin-right:2px;display:inline}.spw-card-subtags spw-card-subtag-item:last-child:after,.spw-card-subtags .spw-card-subtag-item:last-child:after{display:none}.spw-card-subtags--tag spw-card-subtag-item:after,.spw-card-subtags--tag .spw-card-subtag-item:after{content:"";margin-right:4px}'}},[260,"spw-card-subtags",{variant:[1]}]),o=a,r=function(){"undefined"!=typeof customElements&&["spw-card-subtags"].forEach((t=>{"spw-card-subtags"===t&&(customElements.get(n(t))||customElements.define(n(t),a))}))};export{o as SpwCardSubtags,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as i,a as s,t as a}from"./index.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.hasImage=!1,this.childHoveredCount=0,this.variant="news",this.elementType="a",this.target="_self",this.fullHeight=!1,this.disabled=!1,this.onNestedCardEnter=()=>{this.childHoveredCount++,this.setImageHovered(!1)},this.onNestedCardLeave=()=>{this.childHoveredCount=Math.max(0,this.childHoveredCount-1),0===this.childHoveredCount&&this.isPointerInside(this.el)&&this.setImageHovered(!0)}}componentWillLoad(){this.checkForImage(),this.applyVariantToChildren(),this.attachNestedCardListeners()}slotChanged(){this.checkForImage(),this.applyVariantToChildren(),this.attachNestedCardListeners()}onMouseEnter(){0===this.childHoveredCount&&this.setImageHovered(!0)}onMouseLeave(){this.setImageHovered(!1)}attachNestedCardListeners(){requestAnimationFrame((()=>{this.el.querySelectorAll("spw-card").forEach((e=>{e.addEventListener("mouseenter",this.onNestedCardEnter.bind(this),!0),e.addEventListener("mouseleave",this.onNestedCardLeave.bind(this),!0)}))}))}isPointerInside(e){const t=e.getBoundingClientRect(),{left:i,top:s,right:a,bottom:n}=t,{clientX:o,clientY:r}=window;return o>=i&&o<=a&&r>=s&&r<=n}checkForImage(){requestAnimationFrame((()=>{const e=this.el.querySelector("spw-card-image"),t=this.el.querySelector("spw-card-content");this.hasImage=!!e,this.hasImage||null==t||t.classList.add("--no-image")}))}formatDate(e){if(!e)return[];const t=e.split("/");return t.flatMap(((e,s)=>s<t.length-1?[i("span",null,e),i("span",null,"/")]:[i("span",null,e)]))}applyVariantToChildren(){requestAnimationFrame((()=>{const e="--"+this.variant,t=this.el.querySelector("spw-card-content"),i=this.el.querySelector("spw-card-image"),s=this.el.querySelector("spw-card-title"),a=this.el.querySelector("spw-card-excerpt"),n=this.el.querySelector("spw-card-subtags");null==t||t.classList.add(e),null==i||i.classList.add(e),null==s||s.classList.add(e),null==a||a.classList.add(e),null==n||n.classList.add(e)}))}setImageHovered(e){const t=this.el.querySelector("spw-card-image"),i=this.el.querySelector("spw-card-title");t&&this.href&&t.classList.toggle("--hovered",e),i&&this.href&&i.classList.toggle("--hovered",e)}get elementClass(){return{"spw-card":!0,"spw-card--hoverable":!!this.href,"spw-card--no-image":!this.hasImage,["spw-card--"+this.variant]:!0}}render(){const{href:e,rel:t,target:a,dateStart:n,dateEnd:o,variant:r}=this,d=void 0===this.href?"div":"a",l="div"===d?{}:{href:e,rel:t,target:a},p={"aria-label":null==this?void 0:this.accAriaLabel,"aria-disabled":this.disabled?"true":null};return i(s,{key:"dd696a972dce8b2dd24bf4a32a91c48d647c8847",class:{"--is-full-height":this.fullHeight}},i("article",{key:"3bedcc715c5ce3999bdd683aec295cf4a5f78afd",class:this.elementClass},"event"===r&&i(d,Object.assign({key:"a562384022c312afe368de3b28d1746a3b0f5398"},l,{class:"spw-card__dates"}),n&&i("div",{key:"1f91f1d6a773c48ff00fb71b0867eafa7b25a53e",class:"spw-card__date-item"},this.formatDate(n)),o&&i("div",{key:"bdce357cf092475ee1792950a686d02601d634bf",class:"spw-card__date-item"},this.formatDate(o))),i(d,Object.assign({key:"8bae3ef221cf1edc713e89d23db08dda41bf22d8"},l,p,{class:"spw-card__link"}),i("slot",{key:"89d675393747eadf75c55396cba1513566c9eace"}))))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;position:relative;width:100%;--spw-card-background:var(--spw-ds-white);--spw-card-box-shadow:var(--spw-effect-elevation-6);--spw-card-border:none}:host[data-modal-trigger]{cursor:pointer}:host(.--is-full-height){height:100%}.spw-card{display:block;border-radius:5px;background:var(--spw-card-background);box-shadow:var(--spw-card-box-shadow);border:var(--spw-card-border);transition:all 0.3s ease-in-out}:host(.--is-full-height) .spw-card{height:100%}.spw-card--hoverable:hover{box-shadow:var(--spw-effect-elevation-4);transform:translateY(-5px)}.spw-card__dates{cursor:pointer;position:absolute;top:50%;left:0;transform:translate(-50%, -50%);flex-direction:column;line-height:1.1;width:80px;height:80px;text-align:center;color:white;display:inline-flex;align-items:center;justify-content:center;background:var(--spw-ds-primary);border-radius:50%;font-size:18px;text-decoration:none;z-index:2}.spw-card__date-item span:first-of-type{font-weight:bold}.spw-card__link{display:block;height:100%;width:100%;color:inherit;text-decoration:none}.spw-card--no-image .spw-card__link{padding-top:15px}.spw-card__link:focus-visible{outline:3px solid white;outline-offset:-1px;box-shadow:0 0 0 5px black;border-radius:5px}.spw-card--vertical .spw-card__link,.spw-card--video .spw-card__link{display:flex;min-height:240px}.spw-card--event .spw-card__link{display:flex}.spw-card--sidebar{box-shadow:none}.spw-card--sidebar:hover{box-shadow:none}.spw-card--sidebar .spw-card__link{display:flex;gap:16px}.spw-card--event{position:relative;width:calc(100% - 40px);left:40px}'}},[257,"spw-card",{variant:[1],elementType:[1,"element-type"],href:[1],target:[1],rel:[1],dateStart:[1,"date-start"],dateEnd:[1,"date-end"],fullHeight:[4,"full-height"],disabled:[4],accAriaLabel:[1,"acc-aria-label"],hasImage:[32]},[[0,"slotchange","slotChanged"],[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]]),o=n,r=function(){"undefined"!=typeof customElements&&["spw-card"].forEach((e=>{"spw-card"===e&&(customElements.get(a(e))||customElements.define(a(e),n))}))};export{o as SpwCard,r as defineCustomElement}
1
+ import{p as e,H as t,h as i,a as s,t as a}from"./index.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.hasImage=!1,this.childHoveredCount=0,this.variant="news",this.elementType="a",this.target="_self",this.fullHeight=!1,this.disabled=!1,this.onNestedCardEnter=()=>{this.childHoveredCount++,this.setImageHovered(!1)},this.onNestedCardLeave=()=>{this.childHoveredCount=Math.max(0,this.childHoveredCount-1),0===this.childHoveredCount&&this.isPointerInside(this.el)&&this.setImageHovered(!0)}}componentWillLoad(){this.checkForImage(),this.applyVariantToChildren(),this.attachNestedCardListeners()}slotChanged(){this.checkForImage(),this.applyVariantToChildren(),this.attachNestedCardListeners()}onMouseEnter(){0===this.childHoveredCount&&this.setImageHovered(!0)}onMouseLeave(){this.setImageHovered(!1)}attachNestedCardListeners(){requestAnimationFrame((()=>{this.el.querySelectorAll("spw-card").forEach((e=>{e.addEventListener("mouseenter",this.onNestedCardEnter.bind(this),!0),e.addEventListener("mouseleave",this.onNestedCardLeave.bind(this),!0)}))}))}isPointerInside(e){const t=e.getBoundingClientRect(),{left:i,top:s,right:a,bottom:n}=t,{clientX:o,clientY:r}=window;return o>=i&&o<=a&&r>=s&&r<=n}checkForImage(){requestAnimationFrame((()=>{const e=this.el.querySelector("spw-card-image"),t=this.el.querySelector("spw-card-content");this.hasImage=!!e,this.hasImage||null==t||t.classList.add("--no-image")}))}formatDate(e){if(!e)return[];const t=e.split("/");return t.flatMap(((e,s)=>s<t.length-1?[i("span",null,e),i("span",null,"/")]:[i("span",null,e)]))}applyVariantToChildren(){requestAnimationFrame((()=>{const e="--"+this.variant,t=this.el.querySelector("spw-card-content"),i=this.el.querySelector("spw-card-image"),s=this.el.querySelector("spw-card-title"),a=this.el.querySelector("spw-card-excerpt"),n=this.el.querySelector("spw-card-subtags");null==t||t.classList.add(e),null==i||i.classList.add(e),null==s||s.classList.add(e),null==a||a.classList.add(e),null==n||n.classList.add(e)}))}setImageHovered(e){const t=this.el.querySelector("spw-card-image"),i=this.el.querySelector("spw-card-title");t&&this.href&&t.classList.toggle("--hovered",e),i&&this.href&&i.classList.toggle("--hovered",e)}get elementClass(){return{"spw-card":!0,"spw-card--hoverable":!!this.href,"spw-card--no-image":!this.hasImage,["spw-card--"+this.variant]:!0}}render(){const{href:e,rel:t,target:a,dateStart:n,dateEnd:o,variant:r}=this,d=void 0===this.href?"div":"a",l="div"===d?{}:{href:e,rel:t,target:a},p={"aria-label":null==this?void 0:this.accAriaLabel,"aria-disabled":this.disabled?"true":null};return i(s,{key:"24344a34270d6431e71f708b75832214e41f3e89",class:{"--is-full-height":this.fullHeight}},i("article",{key:"d1ef75924fffb9749bac81520934816e47e7710c",class:this.elementClass},"event"===r&&i(d,Object.assign({key:"2be2276157748ac20b6adc7517e001e1e59bfe12"},l,{class:"spw-card__dates"}),n&&i("div",{key:"3bfdd2dfcac5cd6150785a22a452cee36db42e86",class:"spw-card__date-item"},this.formatDate(n)),o&&i("div",{key:"ae3db95befc2a1a58bb68dc9972fb4000e4d446e",class:"spw-card__date-item"},this.formatDate(o))),i(d,Object.assign({key:"c297beceafa94baa697a29d6ee0b4a22c7baef55"},l,p,{class:"spw-card__link"}),i("slot",{key:"b753d837b41fb9e338ffbee0932bf747aced361f"}))))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block;position:relative;width:100%;--spw-card-background:var(--spw-ds-white);--spw-card-box-shadow:var(--spw-effect-elevation-6);--spw-card-border:none}:host[data-modal-trigger]{cursor:pointer}:host(.--is-full-height){height:100%}.spw-card{display:block;border-radius:5px;background:var(--spw-card-background);box-shadow:var(--spw-card-box-shadow);border:var(--spw-card-border);transition:all 0.3s ease-in-out}:host(.--is-full-height) .spw-card{height:100%}.spw-card--hoverable:hover{box-shadow:var(--spw-effect-elevation-4);transform:translateY(-5px)}.spw-card__dates{cursor:pointer;position:absolute;top:50%;left:0;transform:translate(-50%, -50%);flex-direction:column;line-height:1.1;width:80px;height:80px;text-align:center;color:white;display:inline-flex;align-items:center;justify-content:center;background:var(--spw-ds-primary);border-radius:50%;font-size:18px;text-decoration:none;z-index:2}.spw-card__date-item span:first-of-type{font-weight:bold}.spw-card__link{display:block;height:100%;width:100%;color:inherit;text-decoration:none}.spw-card--no-image .spw-card__link{padding-top:15px}.spw-card__link:focus-visible{outline:3px solid white;outline-offset:-1px;box-shadow:0 0 0 5px black;border-radius:5px}.spw-card--vertical .spw-card__link,.spw-card--video .spw-card__link{display:flex;min-height:240px}.spw-card--event .spw-card__link{display:flex}.spw-card--sidebar{box-shadow:none}.spw-card--sidebar:hover{box-shadow:none}.spw-card--sidebar .spw-card__link{display:flex;gap:16px}.spw-card--event{position:relative;width:calc(100% - 40px);left:40px}'}},[257,"spw-card",{variant:[1],elementType:[1,"element-type"],href:[1],target:[1],rel:[1],dateStart:[1,"date-start"],dateEnd:[1,"date-end"],fullHeight:[4,"full-height"],disabled:[4],accAriaLabel:[1,"acc-aria-label"],hasImage:[32]},[[0,"slotchange","slotChanged"],[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"]]]),o=n,r=function(){"undefined"!=typeof customElements&&["spw-card"].forEach((e=>{"spw-card"===e&&(customElements.get(a(e))||customElements.define(a(e),n))}))};export{o as SpwCard,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as o,t as s}from"./index.js";import{d as i}from"./p-DqVJZx2h.js";import{d as n}from"./p-C2ydf78-.js";import{d as a}from"./p-qFTB0lrN.js";import{d as c}from"./p-D6ir2BZs.js";import{d as r}from"./p-CZVOV-PN.js";import{d as p}from"./p-CbTnWZks.js";import{d as l}from"./p-Dzw3OiMu.js";import{d}from"./p-7EG4w8ub.js";const u=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.cookiesTitle="Nous utilisons des cookies",this.cookiesDescription="Ce site web utilise des cookies essentiels pour assurer son bon fonctionnement et des cookies de suivi pour comprendre comment vous interagissez avec lui. Ces derniers ne seront installés qu'après avoir obtenu votre consentement.",this.acceptAllButtonText="Accepter tous les cookies",this.acceptRequiredButtonText="Accepter uniquement les cookies fonctionnels",this.isVisible=!1,this.analyticsEnabled=!1}componentWillLoad(){this.initializeCookieSettings(),this.checkCookieSettings()}initializeCookieSettings(){null===localStorage.getItem("spw-cookie-settings__required")&&localStorage.setItem("spw-cookie-settings__required","false"),null===localStorage.getItem("spw-cookie-settings__analytics")&&localStorage.setItem("spw-cookie-settings__analytics","false"),null===localStorage.getItem("spw-cookie-settings__saved")&&localStorage.setItem("spw-cookie-settings__saved","false")}checkCookieSettings(){const e=this.getCookieSettings();e["spw-cookie-settings__saved"]||(this.isVisible=!0),this.analyticsEnabled=e["spw-cookie-settings__analytics"]}getCookieSettings(){return{"spw-cookie-settings__required":JSON.parse(localStorage.getItem("spw-cookie-settings__required")),"spw-cookie-settings__analytics":JSON.parse(localStorage.getItem("spw-cookie-settings__analytics")),"spw-cookie-settings__saved":JSON.parse(localStorage.getItem("spw-cookie-settings__saved"))}}setCookieSettings(e){Object.keys(e).forEach((t=>{localStorage.setItem(t,JSON.stringify(e[t]))}))}toggleAnalytics(){this.analyticsEnabled=!this.analyticsEnabled,this.setCookieSettings({"spw-cookie-settings__analytics":this.analyticsEnabled})}acceptAllCookies(){this.setCookieSettings({"spw-cookie-settings__required":!0,"spw-cookie-settings__analytics":!0,"spw-cookie-settings__saved":!0}),this.isVisible=!1}acceptRequiredCookies(){this.setCookieSettings({"spw-cookie-settings__required":!0,"spw-cookie-settings__analytics":!1,"spw-cookie-settings__saved":!0}),this.isVisible=!1}render(){return this.isVisible?o("div",{class:"spw-cookies"},o("div",{class:"spw-cookies__container"},o("div",{class:"spw-cookies__content"},o("h2",{class:"spw-cookies__title"},this.cookiesTitle),o("p",{class:"spw-cookies__text"},this.cookiesDescription),o("spw-accordion",null,o("spw-accordion-item",null,o("spw-accordion-title",{slot:"title"},"Paramétrer les cookies"),o("spw-accordion-content",{slot:"content"},o("div",{class:"spw-cookies__checkbox"},o("spw-checkbox",{checked:this.analyticsEnabled,onSpwChange:()=>this.toggleAnalytics()},o("span",{class:"spw-cookies__checkbox-text"},'Les cookies de statistiques proviennent de sociétés de externes ("cookies tiers") et sont utilisés pour collecter des informations sur les sites web visités par l\'utilisateur.'))))))),o("div",{class:"spw-cookies__buttons"},o("spw-button",{"is-full-width":"true",onClick:()=>this.acceptAllCookies()},this.acceptAllButtonText),o("spw-button",{"is-full-width":"true",variant:"secondary",onClick:()=>this.acceptRequiredCookies()},this.acceptRequiredButtonText)))):null}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-cookies{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:flex-end;justify-content:end;z-index:9999}.spw-cookies__container{background:white;border-radius:5px;box-shadow:0 2px 10px rgba(0, 0, 0, 0.1);max-width:400px;width:100%;margin:12px;line-height:1.5;max-height:calc(-24px + 100vh);overflow-y:auto}.spw-cookies__content,.spw-cookies__buttons{padding:16px}@media (min-width: 768px){.spw-cookies__content,.spw-cookies__buttons{padding:24px}}.spw-cookies__content{padding-bottom:0}.spw-cookies__buttons{position:sticky;z-index:10;bottom:0;background:#fff;display:flex;flex-direction:column;gap:12px;text-align:center}.spw-cookies__buttons spw-button{--spw-button-py-medium:var(--spw-button-py-large)}.spw-cookies__title{font-size:24px;line-height:1.2;color:var(--spw-colors-support-grey-grey-900);margin-bottom:8px}.spw-cookies__text{color:var(--spw-color-themes-grey-grey-600);margin-bottom:16px}.spw-cookies__checkbox{padding-top:4px}.spw-cookies__checkbox-text{color:var(--spw-color-themes-grey-grey-600)}'}},[1,"spw-cookies",{cookiesTitle:[1,"cookies-title"],cookiesDescription:[1,"cookies-description"],acceptAllButtonText:[1,"accept-all-button-text"],acceptRequiredButtonText:[1,"accept-required-button-text"],isVisible:[32],analyticsEnabled:[32]}]),m=u,w=function(){"undefined"!=typeof customElements&&["spw-cookies","spw-accordion","spw-accordion-content","spw-accordion-item","spw-accordion-title","spw-button","spw-checkbox","spw-icon","spw-loading"].forEach((e=>{switch(e){case"spw-cookies":customElements.get(s(e))||customElements.define(s(e),u);break;case"spw-accordion":customElements.get(s(e))||i();break;case"spw-accordion-content":customElements.get(s(e))||n();break;case"spw-accordion-item":customElements.get(s(e))||a();break;case"spw-accordion-title":customElements.get(s(e))||c();break;case"spw-button":customElements.get(s(e))||r();break;case"spw-checkbox":customElements.get(s(e))||p();break;case"spw-icon":customElements.get(s(e))||l();break;case"spw-loading":customElements.get(s(e))||d()}}))};export{m as SpwCookies,w as defineCustomElement}
1
+ import{p as e,H as t,h as o,t as s}from"./index.js";import{d as i}from"./p-7Bcqzg2C.js";import{d as n}from"./p-C2ydf78-.js";import{d as c}from"./p-qFTB0lrN.js";import{d as a}from"./p-D6ir2BZs.js";import{d as r}from"./p-CZVOV-PN.js";import{d as p}from"./p-CbTnWZks.js";import{d as l}from"./p-Dzw3OiMu.js";import{d}from"./p-7EG4w8ub.js";const u=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.cookiesTitle="Nous utilisons des cookies",this.cookiesDescription="Ce site web utilise des cookies essentiels pour assurer son bon fonctionnement et des cookies de suivi pour comprendre comment vous interagissez avec lui. Ces derniers ne seront installés qu'après avoir obtenu votre consentement.",this.acceptAllButtonText="Accepter tous les cookies",this.acceptRequiredButtonText="Accepter uniquement les cookies fonctionnels",this.isVisible=!1,this.analyticsEnabled=!1}componentWillLoad(){this.initializeCookieSettings(),this.checkCookieSettings()}initializeCookieSettings(){null===localStorage.getItem("spw-cookie-settings__required")&&localStorage.setItem("spw-cookie-settings__required","false"),null===localStorage.getItem("spw-cookie-settings__analytics")&&localStorage.setItem("spw-cookie-settings__analytics","false"),null===localStorage.getItem("spw-cookie-settings__saved")&&localStorage.setItem("spw-cookie-settings__saved","false")}checkCookieSettings(){const e=this.getCookieSettings();e["spw-cookie-settings__saved"]||(this.isVisible=!0),this.analyticsEnabled=e["spw-cookie-settings__analytics"]}getCookieSettings(){return{"spw-cookie-settings__required":JSON.parse(localStorage.getItem("spw-cookie-settings__required")),"spw-cookie-settings__analytics":JSON.parse(localStorage.getItem("spw-cookie-settings__analytics")),"spw-cookie-settings__saved":JSON.parse(localStorage.getItem("spw-cookie-settings__saved"))}}setCookieSettings(e){Object.keys(e).forEach((t=>{localStorage.setItem(t,JSON.stringify(e[t]))}))}toggleAnalytics(){this.analyticsEnabled=!this.analyticsEnabled,this.setCookieSettings({"spw-cookie-settings__analytics":this.analyticsEnabled})}acceptAllCookies(){this.setCookieSettings({"spw-cookie-settings__required":!0,"spw-cookie-settings__analytics":!0,"spw-cookie-settings__saved":!0}),this.isVisible=!1}acceptRequiredCookies(){this.setCookieSettings({"spw-cookie-settings__required":!0,"spw-cookie-settings__analytics":!1,"spw-cookie-settings__saved":!0}),this.isVisible=!1}render(){return this.isVisible?o("div",{class:"spw-cookies"},o("div",{class:"spw-cookies__container"},o("div",{class:"spw-cookies__content"},o("h2",{class:"spw-cookies__title"},this.cookiesTitle),o("p",{class:"spw-cookies__text"},this.cookiesDescription),o("spw-accordion",null,o("spw-accordion-item",null,o("spw-accordion-title",{slot:"title"},"Paramétrer les cookies"),o("spw-accordion-content",{slot:"content"},o("div",{class:"spw-cookies__checkbox"},o("spw-checkbox",{checked:this.analyticsEnabled,onSpwChange:()=>this.toggleAnalytics()},o("span",{class:"spw-cookies__checkbox-text"},'Les cookies de statistiques proviennent de sociétés de externes ("cookies tiers") et sont utilisés pour collecter des informations sur les sites web visités par l\'utilisateur.'))))))),o("div",{class:"spw-cookies__buttons"},o("spw-button",{"is-full-width":"true",onClick:()=>this.acceptAllCookies()},this.acceptAllButtonText),o("spw-button",{"is-full-width":"true",variant:"secondary",onClick:()=>this.acceptRequiredCookies()},this.acceptRequiredButtonText)))):null}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-cookies{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:flex-end;justify-content:end;z-index:9999}.spw-cookies__container{background:white;border-radius:5px;box-shadow:0 2px 10px rgba(0, 0, 0, 0.1);max-width:400px;width:100%;margin:12px;line-height:1.5;max-height:calc(-24px + 100vh);overflow-y:auto}.spw-cookies__content,.spw-cookies__buttons{padding:16px}@media (min-width: 768px){.spw-cookies__content,.spw-cookies__buttons{padding:24px}}.spw-cookies__content{padding-bottom:0}.spw-cookies__buttons{position:sticky;z-index:10;bottom:0;background:#fff;display:flex;flex-direction:column;gap:12px;text-align:center}.spw-cookies__buttons spw-button{--spw-button-py-medium:var(--spw-button-py-large)}.spw-cookies__title{font-size:24px;line-height:1.2;color:var(--spw-colors-support-grey-grey-900);margin-bottom:8px}.spw-cookies__text{color:var(--spw-color-themes-grey-grey-600);margin-bottom:16px}.spw-cookies__checkbox{padding-top:4px}.spw-cookies__checkbox-text{color:var(--spw-color-themes-grey-grey-600)}'}},[1,"spw-cookies",{cookiesTitle:[1,"cookies-title"],cookiesDescription:[1,"cookies-description"],acceptAllButtonText:[1,"accept-all-button-text"],acceptRequiredButtonText:[1,"accept-required-button-text"],isVisible:[32],analyticsEnabled:[32]}]),m=u,w=function(){"undefined"!=typeof customElements&&["spw-cookies","spw-accordion","spw-accordion-content","spw-accordion-item","spw-accordion-title","spw-button","spw-checkbox","spw-icon","spw-loading"].forEach((e=>{switch(e){case"spw-cookies":customElements.get(s(e))||customElements.define(s(e),u);break;case"spw-accordion":customElements.get(s(e))||i();break;case"spw-accordion-content":customElements.get(s(e))||n();break;case"spw-accordion-item":customElements.get(s(e))||c();break;case"spw-accordion-title":customElements.get(s(e))||a();break;case"spw-button":customElements.get(s(e))||r();break;case"spw-checkbox":customElements.get(s(e))||p();break;case"spw-icon":customElements.get(s(e))||l();break;case"spw-loading":customElements.get(s(e))||d()}}))};export{m as SpwCookies,w as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as s,c as t,h as i,t as o}from"./index.js";import{d as n}from"./p-CbTnWZks.js";import{d as c}from"./p-CIfmnXXp.js";import{d as r}from"./p-DikxciH1.js";import{d as a}from"./p-Dzw3OiMu.js";const l=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.valueChanged=t(this,"valueChanged",7),this.internals=this.attachInternals(),this.isOpen=!1,this.parsedOptions=[],this.focusedOptionIndex=null,this.searchText="",this.dropdownDirection="down",this.hasSelectedValue=!1,this.value=[],this.label="",this.placeholder="Sélectionnez une option",this.required=!1,this.size="medium",this.multiple=!1,this.isSearch=!1,this.error="",this.hint="",this.success="",this.warning="",this.showErrorIcon=!0,this.showHintIcon=!0,this.showSuccessIcon=!0,this.showWarningIcon=!0,this.handleOtherSelectOpened=e=>{e.detail.instance!==this.host&&this.isOpen&&this.closeDropdown()},this.handleClickOutside=e=>{var s,t;if(this.isOpen){const i=e.composedPath()[0],o=this.host.contains(i),n=null===(s=this.host.shadowRoot)||void 0===s?void 0:s.querySelector(".spw-custom-select__search-input"),c=null==n?void 0:n.contains(i);if(!o&&!c){if(this.multiple){const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".spw-custom-select__options");if(e&&e.contains(i))return}this.closeDropdown()}}}}componentWillLoad(){if(this.multiple)if("string"==typeof this.value)try{this.internalValue=JSON.parse(this.value)}catch(e){this.internalValue=[]}else this.internalValue=Array.isArray(this.value)?this.value:[];else this.internalValue=this.value;this.items&&this.parseOptions(this.items),this.updateSelectedOption()}async resetSelect(){this.multiple?(this.internalValue=[],this.value=[]):(this.internalValue="",this.value=""),this.searchText="",this.focusedOptionIndex=null,this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue),this.updateSelectedOption()}async setValue(e){this.multiple?(this.internalValue=Array.isArray(e)?e:[e],this.value=this.internalValue):(this.internalValue=e,this.value=e),this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue),this.updateSelectedOption()}async getValue(){return this.internalValue}formResetCallback(){this.resetSelect()}componentDidLoad(){document.addEventListener("click",this.handleClickOutside),document.addEventListener("spw-custom-select-opened",this.handleOtherSelectOpened),this.internals.setFormValue(this.getFormValue())}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("spw-custom-select-opened",this.handleOtherSelectOpened)}parseOptions(e){try{this.parsedOptions=Array.isArray(e)?e.map((e=>({value:e.value,label:e.label,disabled:e.disabled||!1}))):"string"==typeof e?JSON.parse(e).map((e=>({value:e.value,label:e.label,disabled:e.disabled||!1}))):[],this.updateSelectedOption()}catch(e){this.parsedOptions=[]}}valueChangedHandler(e){this.internalValue=this.multiple?Array.isArray(e)?e:[e]:e,this.updateSelectedOption(),this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue)}updateSelectedOption(){this.internals.setFormValue(this.getFormValue()),this.multiple||void 0===this.internalValue?this.multiple&&Array.isArray(this.internalValue)&&(this.internalValue=this.internalValue.filter((e=>this.parsedOptions.some((s=>s.value+""==e+"")))).sort(((e,s)=>this.parsedOptions.findIndex((s=>s.value+""==e+""))-this.parsedOptions.findIndex((e=>e.value+""==s+""))))):this.focusedOptionIndex=this.parsedOptions.findIndex((e=>e.value+""==this.internalValue+""))}internalValueChanged(){this.hasSelectedValue=Array.isArray(this.internalValue)?this.internalValue.length>0:!!this.internalValue}getFormValue(){return this.multiple?Array.isArray(this.internalValue)&&this.internalValue.length>0?this.internalValue.map((e=>e+"")).join(","):null:this.internalValue?this.internalValue+"":null}toggleDropdown(e){if(!this.disabled){if(e){if(e.composedPath()[0].classList.contains("spw-custom-select__search-input"))return;e.stopPropagation()}this.determineDropdownDirection();const s=this.isOpen;this.isOpen=!this.isOpen,this.isOpen&&!s&&this.notifyOtherSelects(),this.isOpen||(this.focusedOptionIndex=null)}}notifyOtherSelects(){const e=new CustomEvent("spw-custom-select-opened",{detail:{instance:this.host},bubbles:!0,composed:!0});document.dispatchEvent(e)}determineDropdownDirection(){const e=this.selectContainer.getBoundingClientRect(),s=window.innerHeight;this.dropdownDirection=e.bottom+200>s&&e.top>200?"up":"down"}openDropdownWithKeyboard(){this.determineDropdownDirection(),this.isOpen=!0,this.focusedOptionIndex=0,this.notifyOtherSelects()}closeDropdown(){this.isOpen=!1,this.focusedOptionIndex=null,this.searchText=""}selectOption(e,s){s&&s.stopPropagation();const t=this.parsedOptions.find((s=>s.value+""==e+""));if(!(null==t?void 0:t.disabled)){if(this.multiple){const s=this.internalValue.findIndex((s=>s+""==e+""));this.internalValue=s>-1?[...this.internalValue.slice(0,s),...this.internalValue.slice(s+1)]:[...this.internalValue,e],this.internalValue=this.internalValue.sort(((e,s)=>this.parsedOptions.findIndex((s=>s.value+""==e+""))-this.parsedOptions.findIndex((e=>e.value+""==s+""))))}else this.internalValue=e,this.closeDropdown();this.value=this.internalValue,this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue),this.updateSelectedOption()}}handleOptionKeyDown(e,s){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.selectOption(s))}handleKeyDown(e){var s,t;if(!e.target.classList.contains("spw-custom-select__search-input"))switch(e.key){case" ":e.preventDefault(),this.isOpen||this.openDropdownWithKeyboard();break;case"ArrowDown":if(e.preventDefault(),this.isOpen){let e=null===this.focusedOptionIndex?0:(this.focusedOptionIndex+1)%this.parsedOptions.length;for(;(null===(s=this.parsedOptions[e])||void 0===s?void 0:s.disabled)&&e!==this.focusedOptionIndex;)e=(e+1)%this.parsedOptions.length;this.focusedOptionIndex=e}else this.openDropdownWithKeyboard();break;case"ArrowUp":if(e.preventDefault(),this.isOpen){let e=null===this.focusedOptionIndex?this.parsedOptions.length-1:(this.focusedOptionIndex-1+this.parsedOptions.length)%this.parsedOptions.length;for(;(null===(t=this.parsedOptions[e])||void 0===t?void 0:t.disabled)&&e!==this.focusedOptionIndex;)e=(e-1+this.parsedOptions.length)%this.parsedOptions.length;this.focusedOptionIndex=e}break;case"Enter":e.preventDefault(),this.isOpen&&null!==this.focusedOptionIndex&&this.selectOption(this.parsedOptions[this.focusedOptionIndex].value);break;case"Escape":this.isOpen&&this.closeDropdown()}}renderErrorMessage(){if(this.error)return i("spw-field-message",{variant:"error",showIcon:this.showErrorIcon},this.error)}renderHintMessage(){if(this.hint)return i("spw-field-message",{variant:"hint",showIcon:this.showHintIcon},this.hint)}renderWarningMessage(){if(this.warning)return i("spw-field-message",{variant:"warning",showIcon:this.showWarningIcon},this.warning)}renderSuccessMessage(){if(this.success)return i("spw-field-message",{variant:"success",showIcon:this.showSuccessIcon},this.success)}get elementClass(){return{"spw-custom-select":!0,["spw-custom-select--"+this.size]:!0,"spw-custom-select--is-error":!!this.error,"spw-custom-select--disabled":this.disabled,"spw-custom-select--is-opened":this.isOpen,"spw-custom-select--has-value":this.hasSelectedValue,"spw-custom-select--no-value":!this.hasSelectedValue,"spw-custom-select--is-searchable":this.isSearch,"spw-custom-select--not-searchable":!this.isSearch}}normalizeString(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}getSelectedLabels(){if(this.multiple)return Array.isArray(this.internalValue)&&this.internalValue.length>0?this.internalValue.map((e=>{var s;return null===(s=this.parsedOptions.find((s=>s.value+""==e+"")))||void 0===s?void 0:s.label})).filter(Boolean).join(", "):null;{const e=this.parsedOptions.find((e=>e.value+""==this.internalValue+""));return e?e.label:null}}getFilteredOptions(){const e=this.normalizeString(this.searchText);return this.parsedOptions.filter((s=>this.normalizeString(s.label).includes(e)))}handleSearchInput(e){this.searchText=e.target.value,this.focusedOptionIndex=0,this.isOpen||(this.isOpen=!0,this.notifyOtherSelects())}isSearchVisible(){return!!this.isSearch&&(!this.hasSelectedValue&&!this.isOpen||!(!this.isSearch||!this.isOpen)||this.isOpen)}showPlaceholder(){return!this.isSearch&&!this.hasSelectedValue}render(){const e=this.getFilteredOptions(),s=this.showPlaceholder();return i("div",{key:"5f7702579283fa011eba5c445de1fe29283a0239",class:this.elementClass,ref:e=>this.host=e},this.label&&i("spw-field-label",{key:"451743b7254038fe4257378ac4f7c2206a47c60d",label:this.label,name:this.name,required:this.required}),this.assistiveText&&i("spw-field-message",{key:"817a94b7d7d2a1abd93986f3e03d0f769a6567d0",class:"spw-custom-select__field-message",variant:"hint",showIcon:!1},this.assistiveText),i("div",{key:"cf9e2cd0bcaf1a5bd9143fdf54046a241bd1a527",class:"spw-custom-select__wrapper"},i("div",{key:"21a8fb2e0bb3dba93c582735db2072b150b157e4",class:"spw-custom-select__container",id:this.name,ref:e=>this.selectContainer=e,onClick:e=>this.toggleDropdown(e),onKeyDown:e=>this.handleKeyDown(e),tabindex:this.disabled?-1:0},i("div",{key:"7acaa25439202ea6f30dd3542a757005534b2804",class:"spw-custom-select__selected"},this.isSearchVisible()&&i("div",{key:"e97c879fa5c70402ba331785f73747262e8854e1",class:"spw-custom-select__search"},i("input",{key:"7047f755e5a4aaacf66a78ce80e1ad3520be1b85",class:"spw-custom-select__search-input",placeholder:"Entrez votre recherche",onInput:e=>this.handleSearchInput(e),value:this.searchText})),s&&i("span",{key:"772afa04f989241e8e96c0ed25d444b66f72b282"},this.placeholder),this.multiple&&this.internalValue.length>0&&i("div",{key:"5d101958ee7f28ba19938a9dfbd137067d0c5a45",class:"spw-custom-select__selected-items"},this.internalValue.map((e=>{var s;return i("span",{class:"spw-custom-select__selected-item"},null===(s=this.parsedOptions.find((s=>s.value+""==e+"")))||void 0===s?void 0:s.label,i("spw-icon",{icon:"fa-times",class:"spw-custom-select__deselect-icon",onClick:s=>this.selectOption(e,s)}))}))),!this.multiple&&i("span",{key:"d6e00ae63c72be4e2bd86c4a46f3966cb7681592"},this.getSelectedLabels()))),i("div",{key:"2dbf6b83c3c479e6251291ce13f77f43e1525841",class:"spw-custom-select__arrow"},i("spw-icon",{key:"42e9d62768469dd064ccfca75dcfb45b0e6caf7b",icon:this.isOpen?"fa-chevron-up":"fa-chevron-down"})),this.isOpen&&i("div",{key:"9b53310eda74ea2ee34888a64f43ca5cfb48bca1",class:"spw-custom-select__options spw-custom-select__options--"+this.dropdownDirection},!!e.length&&i("ul",{key:"f30eb6a1d7839f241b9905ee3591ab9eed32e7df"},e.map(((e,s)=>i("li",{class:{"spw-custom-select__option":!0,"spw-custom-select__option--selected":this.multiple?this.internalValue.some((s=>s+""==e.value+"")):e.value===this.internalValue,"spw-custom-select__option--focused":s===this.focusedOptionIndex,"spw-custom-select__option--disabled":e.disabled},onClick:()=>this.selectOption(e.value)},this.multiple&&i("spw-checkbox",{onKeyDown:s=>this.handleOptionKeyDown(s,e.value),class:"spw-custom-select__checkbox",checked:this.internalValue.some((s=>s+""==e.value+"")),disabled:e.disabled}),e.label)))),!e.length&&i("p",{key:"2b8efa73852cff382f97fa73e0f4bf0080b8dee9",class:"spw-custom-select__no-results"},"Pas de résultats pour cette recherche."))),this.renderErrorMessage(),this.renderHintMessage(),this.renderSuccessMessage(),this.renderWarningMessage())}static get formAssociated(){return!0}static get watchers(){return{items:[{parseOptions:0}],value:[{valueChangedHandler:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-custom-select{position:relative}.spw-custom-select__field-message{margin-bottom:8px;margin-top:-4px}.spw-custom-select__checkbox{margin-right:8px}.spw-custom-select__container{display:flex;justify-content:space-between;align-items:center;width:100%;height:40px;padding:0 12px;line-height:40px;border-radius:4px;border:1px solid var(--spw-color-themes-grey-grey-800);background-color:#fff}.spw-custom-select__container:hover{outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-custom-select__container:focus-within,.spw-custom-select__container:focus-visible{outline:3px solid white;outline-offset:0;box-shadow:0 0 0 6px black}.spw-custom-select--disabled .spw-custom-select__container{border-color:var(--spw-color-themes-grey-grey-400);background:var(--spw-color-themes-grey-grey-100);color:var(--spw-color-themes-grey-grey-500);cursor:not-allowed}.spw-custom-select--disabled .spw-custom-select__container::placeholder{color:var(--spw-color-themes-grey-grey-500)}.spw-custom-select--disabled .spw-custom-select__container:hover,.spw-custom-select--disabled .spw-custom-select__container:focus,.spw-custom-select--disabled .spw-custom-select__container:focus-visible{outline:none}.spw-custom-select--is-error .spw-custom-select__container{border-color:var(--spw-colors-states-error-error-300)}.spw-custom-select--large .spw-custom-select__container{height:60px;padding:0 24px;line-height:60px}.spw-custom-select--is-opened .spw-custom-select__container{height:auto;line-height:1;min-height:40px;border-radius:4px 4px 0 0;border-bottom-color:transparent}.spw-custom-select__selected{flex:1;padding-right:30px;max-width:100%}.spw-custom-select__selected-item{display:inline-flex;align-items:center;gap:6px;color:var(--spw-color-themes-grey-grey-900);border:1px solid var(--spw-color-themes-grey-grey-900);background:var(--spw-color-themes-grey-grey-200);line-height:24px;height:24px;padding:0 8px;margin:4px 6px 2px 0;border-radius:999px;font-size:14px;user-select:none}.spw-custom-select__selected-items{flex:1;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.spw-custom-select--is-opened .spw-custom-select__selected-items{padding-top:3px;padding-bottom:4px;overflow:visible;text-overflow:initial;text-wrap:initial}.spw-custom-select__arrow{position:absolute;right:12px;top:10px;font-size:16px;color:var(--spw-color-themes-grey-grey-600);pointer-events:none}.spw-custom-select__wrapper{position:relative}.spw-custom-select--is-opened .spw-custom-select__search{position:absolute;top:0;left:0;z-index:11;width:100%;margin-top:1px}.spw-custom-select--has-value.spw-custom-select--is-opened .spw-custom-select__search{top:auto;top:100%;margin-top:-3px}.spw-custom-select__search-input{padding:0;height:38px;line-height:40px;border:none;margin:0;width:calc(100% - 30px);text-overflow:ellipsis}.spw-custom-select__search-input:focus{outline:none}.spw-custom-select--is-opened .spw-custom-select__search-input{border-left:1px solid var(--spw-color-themes-grey-grey-800);padding:0 12px}.spw-custom-select--is-opened.spw-custom-select--has-value .spw-custom-select__search-input{border-right:1px solid var(--spw-color-themes-grey-grey-800);width:100%}.spw-custom-select__options{position:absolute;width:100%;background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:0 0 4px 4px;max-height:200px;overflow-y:auto;z-index:12}.spw-custom-select__options--down{top:100%;transform:translateY(0)}.spw-custom-select__options--up{top:100%;transform:translateY(0)}.spw-custom-select--has-value.spw-custom-select--is-opened:not(.spw-custom-select--not-searchable) .spw-custom-select__options{margin-top:35px}.spw-custom-select__no-results{padding:12px;cursor:not-allowed;color:var(--spw-color-themes-grey-grey-600)}.spw-custom-select__option{border-bottom:1px solid var(--spw-color-themes-grey-grey-900);padding:12px;cursor:pointer}.spw-custom-select__option:hover{background-color:var(--spw-color-themes-grey-grey-200)}.spw-custom-select__option:last-child{border-bottom:none}.spw-custom-select__option--selected{font-weight:700}.spw-custom-select__option--disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.spw-custom-select__option--disabled:hover{background-color:transparent}.spw-custom-select__error{display:block;font-size:12px;color:var(--spw-color-themes-grey-grey-600);margin-top:8px}.spw-custom-select__option--focused{background-color:var(--spw-color-themes-grey-grey-300)}'}},[65,"spw-custom-select",{value:[1544],label:[1],placeholder:[1],disabled:[4],name:[1],required:[4],items:[1],size:[1],multiple:[4],isSearch:[4,"is-search"],assistiveText:[1,"assistive-text"],error:[1],hint:[1],success:[1],warning:[1],showErrorIcon:[4,"show-error-icon"],showHintIcon:[4,"show-hint-icon"],showSuccessIcon:[4,"show-success-icon"],showWarningIcon:[4,"show-warning-icon"],internalValue:[32],isOpen:[32],parsedOptions:[32],focusedOptionIndex:[32],searchText:[32],dropdownDirection:[32],hasSelectedValue:[32],resetSelect:[64],setValue:[64],getValue:[64]},void 0,{items:[{parseOptions:0}],value:[{valueChangedHandler:0}],internalValue:[{internalValueChanged:0}]}]),h=l,p=function(){"undefined"!=typeof customElements&&["spw-custom-select","spw-checkbox","spw-field-label","spw-field-message","spw-icon"].forEach((e=>{switch(e){case"spw-custom-select":customElements.get(o(e))||customElements.define(o(e),l);break;case"spw-checkbox":customElements.get(o(e))||n();break;case"spw-field-label":customElements.get(o(e))||c();break;case"spw-field-message":customElements.get(o(e))||r();break;case"spw-icon":customElements.get(o(e))||a()}}))};export{h as SpwCustomSelect,p as defineCustomElement}
1
+ import{p as e,H as s,c as t,h as i,t as o}from"./index.js";import{d as c}from"./p-CbTnWZks.js";import{d as n}from"./p-CIfmnXXp.js";import{d as r}from"./p-DikxciH1.js";import{d as a}from"./p-Dzw3OiMu.js";const l=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.valueChanged=t(this,"valueChanged",7),this.internals=this.attachInternals(),this.isOpen=!1,this.parsedOptions=[],this.focusedOptionIndex=null,this.searchText="",this.dropdownDirection="down",this.hasSelectedValue=!1,this.value=[],this.label="",this.placeholder="Sélectionnez une option",this.required=!1,this.size="medium",this.multiple=!1,this.isSearch=!1,this.error="",this.hint="",this.success="",this.warning="",this.showErrorIcon=!0,this.showHintIcon=!0,this.showSuccessIcon=!0,this.showWarningIcon=!0,this.handleOtherSelectOpened=e=>{e.detail.instance!==this.host&&this.isOpen&&this.closeDropdown()},this.handleClickOutside=e=>{var s,t;if(this.isOpen){const i=e.composedPath()[0],o=this.host.contains(i),c=null===(s=this.host.shadowRoot)||void 0===s?void 0:s.querySelector(".spw-custom-select__search-input"),n=null==c?void 0:c.contains(i);if(!o&&!n){if(this.multiple){const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".spw-custom-select__options");if(e&&e.contains(i))return}this.closeDropdown()}}}}componentWillLoad(){if(this.multiple)if("string"==typeof this.value)try{this.internalValue=JSON.parse(this.value)}catch(e){this.internalValue=[]}else this.internalValue=Array.isArray(this.value)?this.value:[];else this.internalValue=this.value;this.items&&this.parseOptions(this.items),this.updateSelectedOption()}async resetSelect(){this.multiple?(this.internalValue=[],this.value=[]):(this.internalValue="",this.value=""),this.searchText="",this.focusedOptionIndex=null,this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue),this.updateSelectedOption()}async setValue(e){this.multiple?(this.internalValue=Array.isArray(e)?e:[e],this.value=this.internalValue):(this.internalValue=e,this.value=e),this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue),this.updateSelectedOption()}async getValue(){return this.internalValue}formResetCallback(){this.resetSelect()}componentDidLoad(){document.addEventListener("click",this.handleClickOutside),document.addEventListener("spw-custom-select-opened",this.handleOtherSelectOpened),this.internals.setFormValue(this.getFormValue())}disconnectedCallback(){document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("spw-custom-select-opened",this.handleOtherSelectOpened)}parseOptions(e){try{this.parsedOptions=Array.isArray(e)?e.map((e=>({value:e.value,label:e.label,disabled:e.disabled||!1}))):"string"==typeof e?JSON.parse(e).map((e=>({value:e.value,label:e.label,disabled:e.disabled||!1}))):[],this.updateSelectedOption()}catch(e){this.parsedOptions=[]}}valueChangedHandler(e){this.internalValue=this.multiple?Array.isArray(e)?e:[e]:e,this.updateSelectedOption(),this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue)}updateSelectedOption(){this.internals.setFormValue(this.getFormValue()),this.multiple||void 0===this.internalValue?this.multiple&&Array.isArray(this.internalValue)&&(this.internalValue=this.internalValue.filter((e=>this.parsedOptions.some((s=>s.value+""==e+"")))).sort(((e,s)=>this.parsedOptions.findIndex((s=>s.value+""==e+""))-this.parsedOptions.findIndex((e=>e.value+""==s+""))))):this.focusedOptionIndex=this.parsedOptions.findIndex((e=>e.value+""==this.internalValue+""))}internalValueChanged(){this.hasSelectedValue=Array.isArray(this.internalValue)?this.internalValue.length>0:!!this.internalValue}getFormValue(){return this.multiple?Array.isArray(this.internalValue)&&this.internalValue.length>0?this.internalValue.map((e=>e+"")).join(","):null:this.internalValue?this.internalValue+"":null}toggleDropdown(e){if(!this.disabled){if(e){if(e.composedPath()[0].classList.contains("spw-custom-select__search-input"))return;e.stopPropagation()}this.determineDropdownDirection();const s=this.isOpen;this.isOpen=!this.isOpen,this.isOpen&&!s&&this.notifyOtherSelects(),this.isOpen||(this.focusedOptionIndex=null)}}notifyOtherSelects(){const e=new CustomEvent("spw-custom-select-opened",{detail:{instance:this.host},bubbles:!0,composed:!0});document.dispatchEvent(e)}determineDropdownDirection(){const e=this.selectContainer.getBoundingClientRect(),s=window.innerHeight;this.dropdownDirection=e.bottom+200>s&&e.top>200?"up":"down"}openDropdownWithKeyboard(){this.determineDropdownDirection(),this.isOpen=!0,this.focusedOptionIndex=0,this.notifyOtherSelects()}closeDropdown(){this.isOpen=!1,this.focusedOptionIndex=null,this.searchText=""}selectOption(e,s){s&&s.stopPropagation();const t=this.parsedOptions.find((s=>s.value+""==e+""));if(!(null==t?void 0:t.disabled)){if(this.multiple){const s=this.internalValue.findIndex((s=>s+""==e+""));this.internalValue=s>-1?[...this.internalValue.slice(0,s),...this.internalValue.slice(s+1)]:[...this.internalValue,e],this.internalValue=this.internalValue.sort(((e,s)=>this.parsedOptions.findIndex((s=>s.value+""==e+""))-this.parsedOptions.findIndex((e=>e.value+""==s+""))))}else this.internalValue=e,this.closeDropdown();this.value=this.internalValue,this.internals.setFormValue(this.getFormValue()),this.valueChanged.emit(this.internalValue),this.updateSelectedOption()}}handleOptionKeyDown(e,s){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.selectOption(s))}handleKeyDown(e){var s,t;if(!e.target.classList.contains("spw-custom-select__search-input"))switch(e.key){case" ":e.preventDefault(),this.isOpen||this.openDropdownWithKeyboard();break;case"ArrowDown":if(e.preventDefault(),this.isOpen){let e=null===this.focusedOptionIndex?0:(this.focusedOptionIndex+1)%this.parsedOptions.length;for(;(null===(s=this.parsedOptions[e])||void 0===s?void 0:s.disabled)&&e!==this.focusedOptionIndex;)e=(e+1)%this.parsedOptions.length;this.focusedOptionIndex=e}else this.openDropdownWithKeyboard();break;case"ArrowUp":if(e.preventDefault(),this.isOpen){let e=null===this.focusedOptionIndex?this.parsedOptions.length-1:(this.focusedOptionIndex-1+this.parsedOptions.length)%this.parsedOptions.length;for(;(null===(t=this.parsedOptions[e])||void 0===t?void 0:t.disabled)&&e!==this.focusedOptionIndex;)e=(e-1+this.parsedOptions.length)%this.parsedOptions.length;this.focusedOptionIndex=e}break;case"Enter":e.preventDefault(),this.isOpen&&null!==this.focusedOptionIndex&&this.selectOption(this.parsedOptions[this.focusedOptionIndex].value);break;case"Escape":this.isOpen&&this.closeDropdown()}}renderErrorMessage(){if(this.error)return i("spw-field-message",{variant:"error",showIcon:this.showErrorIcon},this.error)}renderHintMessage(){if(this.hint)return i("spw-field-message",{variant:"hint",showIcon:this.showHintIcon},this.hint)}renderWarningMessage(){if(this.warning)return i("spw-field-message",{variant:"warning",showIcon:this.showWarningIcon},this.warning)}renderSuccessMessage(){if(this.success)return i("spw-field-message",{variant:"success",showIcon:this.showSuccessIcon},this.success)}get elementClass(){return{"spw-custom-select":!0,["spw-custom-select--"+this.size]:!0,"spw-custom-select--is-error":!!this.error,"spw-custom-select--disabled":this.disabled,"spw-custom-select--is-opened":this.isOpen,"spw-custom-select--has-value":this.hasSelectedValue,"spw-custom-select--no-value":!this.hasSelectedValue,"spw-custom-select--is-searchable":this.isSearch,"spw-custom-select--not-searchable":!this.isSearch}}normalizeString(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}getSelectedLabels(){if(this.multiple)return Array.isArray(this.internalValue)&&this.internalValue.length>0?this.internalValue.map((e=>{var s;return null===(s=this.parsedOptions.find((s=>s.value+""==e+"")))||void 0===s?void 0:s.label})).filter(Boolean).join(", "):null;{const e=this.parsedOptions.find((e=>e.value+""==this.internalValue+""));return e?e.label:null}}getFilteredOptions(){const e=this.normalizeString(this.searchText);return this.parsedOptions.filter((s=>this.normalizeString(s.label).includes(e)))}handleSearchInput(e){this.searchText=e.target.value,this.focusedOptionIndex=0,this.isOpen||(this.isOpen=!0,this.notifyOtherSelects())}isSearchVisible(){return!!this.isSearch&&(!this.hasSelectedValue&&!this.isOpen||!(!this.isSearch||!this.isOpen)||this.isOpen)}showPlaceholder(){return!this.isSearch&&!this.hasSelectedValue}render(){const e=this.getFilteredOptions(),s=this.showPlaceholder();return i("div",{key:"9e8ad9421b890c01da6db48c1b4d49799bc2d985",class:this.elementClass,ref:e=>this.host=e},this.label&&i("spw-field-label",{key:"466413e6081d5f476417e72d9662a94e8d63f549",label:this.label,name:this.name,required:this.required}),this.assistiveText&&i("spw-field-message",{key:"6af1ee76975fc4775140cbf68fd9eea1b2648893",class:"spw-custom-select__field-message",variant:"hint",showIcon:!1},this.assistiveText),i("div",{key:"c93dec2b6a8904fad6863fa6fffbaf10b49ec1e7",class:"spw-custom-select__wrapper"},i("div",{key:"b630fba4aa40dd0f94577ecdc27439648ece6bd5",class:"spw-custom-select__container",id:this.name,ref:e=>this.selectContainer=e,onClick:e=>this.toggleDropdown(e),onKeyDown:e=>this.handleKeyDown(e),tabindex:this.disabled?-1:0},i("div",{key:"f1de2543619966d3200968caabe1c4c818af24ed",class:"spw-custom-select__selected"},this.isSearchVisible()&&i("div",{key:"ad9c2dcf001c9455aef3c1db3f08d0ad0da09bd6",class:"spw-custom-select__search"},i("input",{key:"139e95b2a15cb743ee9b93ba31b8f6e5920605f3",class:"spw-custom-select__search-input",placeholder:"Entrez votre recherche",onInput:e=>this.handleSearchInput(e),value:this.searchText})),s&&i("span",{key:"87af236c4ea1cf79fa6aa84037facc7f64149797"},this.placeholder),this.multiple&&this.internalValue.length>0&&i("div",{key:"6cf2553f22d7610caa642d8c84ab37c4a64b4868",class:"spw-custom-select__selected-items"},this.internalValue.map((e=>{var s;return i("span",{class:"spw-custom-select__selected-item"},null===(s=this.parsedOptions.find((s=>s.value+""==e+"")))||void 0===s?void 0:s.label,i("spw-icon",{icon:"fa-times",class:"spw-custom-select__deselect-icon",onClick:s=>this.selectOption(e,s)}))}))),!this.multiple&&i("span",{key:"b2d36d752809b5676dfc2bfe15b8165184184859"},this.getSelectedLabels()))),i("div",{key:"cb8bbe9b649409602c57e1ef56a308e8be038989",class:"spw-custom-select__arrow"},i("spw-icon",{key:"bd44c92e2ec38b64a6ba463068f8b79977e32cce",icon:this.isOpen?"fa-chevron-up":"fa-chevron-down"})),this.isOpen&&i("div",{key:"ef71f6efd4407830dd75616dc779dec6d68b7db7",class:"spw-custom-select__options spw-custom-select__options--"+this.dropdownDirection},!!e.length&&i("ul",{key:"239dd6312064da82e2d8c0fcb4baf8a921736a5a"},e.map(((e,s)=>i("li",{class:{"spw-custom-select__option":!0,"spw-custom-select__option--selected":this.multiple?this.internalValue.some((s=>s+""==e.value+"")):e.value===this.internalValue,"spw-custom-select__option--focused":s===this.focusedOptionIndex,"spw-custom-select__option--disabled":e.disabled},onClick:()=>this.selectOption(e.value)},this.multiple&&i("spw-checkbox",{onKeyDown:s=>this.handleOptionKeyDown(s,e.value),class:"spw-custom-select__checkbox",checked:this.internalValue.some((s=>s+""==e.value+"")),disabled:e.disabled}),e.label)))),!e.length&&i("p",{key:"0abb249edcd3b8aa06e14b99406c6579d0a1e76b",class:"spw-custom-select__no-results"},"Pas de résultats pour cette recherche."))),this.renderErrorMessage(),this.renderHintMessage(),this.renderSuccessMessage(),this.renderWarningMessage())}static get formAssociated(){return!0}static get watchers(){return{items:[{parseOptions:0}],value:[{valueChangedHandler:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-custom-select{position:relative}.spw-custom-select__field-message{margin-bottom:8px;margin-top:-4px}.spw-custom-select__checkbox{margin-right:8px}.spw-custom-select__container{display:flex;justify-content:space-between;align-items:center;width:100%;height:40px;padding:0 12px;line-height:40px;border-radius:4px;border:1px solid var(--spw-color-themes-grey-grey-800);background-color:#fff}.spw-custom-select__container:hover{outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-custom-select__container:focus-within,.spw-custom-select__container:focus-visible{outline:3px solid white;outline-offset:0;box-shadow:0 0 0 6px black}.spw-custom-select--disabled .spw-custom-select__container{border-color:var(--spw-color-themes-grey-grey-400);background:var(--spw-color-themes-grey-grey-100);color:var(--spw-color-themes-grey-grey-500);cursor:not-allowed}.spw-custom-select--disabled .spw-custom-select__container::placeholder{color:var(--spw-color-themes-grey-grey-500)}.spw-custom-select--disabled .spw-custom-select__container:hover,.spw-custom-select--disabled .spw-custom-select__container:focus,.spw-custom-select--disabled .spw-custom-select__container:focus-visible{outline:none}.spw-custom-select--is-error .spw-custom-select__container{border-color:var(--spw-colors-states-error-error-300)}.spw-custom-select--large .spw-custom-select__container{height:60px;padding:0 24px;line-height:60px}.spw-custom-select--is-opened .spw-custom-select__container{height:auto;line-height:1;min-height:40px;border-radius:4px 4px 0 0;border-bottom-color:transparent}.spw-custom-select__selected{flex:1;padding-right:30px;max-width:100%}.spw-custom-select__selected-item{display:inline-flex;align-items:center;gap:6px;color:var(--spw-color-themes-grey-grey-900);border:1px solid var(--spw-color-themes-grey-grey-900);background:var(--spw-color-themes-grey-grey-200);line-height:24px;height:24px;padding:0 8px;margin:4px 6px 2px 0;border-radius:999px;font-size:14px;user-select:none}.spw-custom-select__selected-items{flex:1;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.spw-custom-select--is-opened .spw-custom-select__selected-items{padding-top:3px;padding-bottom:4px;overflow:visible;text-overflow:initial;text-wrap:initial}.spw-custom-select__arrow{position:absolute;right:12px;top:10px;font-size:16px;color:var(--spw-color-themes-grey-grey-600);pointer-events:none}.spw-custom-select__wrapper{position:relative}.spw-custom-select--is-opened .spw-custom-select__search{position:absolute;top:0;left:0;z-index:11;width:100%;margin-top:1px}.spw-custom-select--has-value.spw-custom-select--is-opened .spw-custom-select__search{top:auto;top:100%;margin-top:-3px}.spw-custom-select__search-input{padding:0;height:38px;line-height:40px;border:none;margin:0;width:calc(100% - 30px);text-overflow:ellipsis}.spw-custom-select__search-input:focus{outline:none}.spw-custom-select--is-opened .spw-custom-select__search-input{border-left:1px solid var(--spw-color-themes-grey-grey-800);padding:0 12px}.spw-custom-select--is-opened.spw-custom-select--has-value .spw-custom-select__search-input{border-right:1px solid var(--spw-color-themes-grey-grey-800);width:100%}.spw-custom-select__options{position:absolute;width:100%;background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:0 0 4px 4px;max-height:200px;overflow-y:auto;z-index:12}.spw-custom-select__options--down{top:100%;transform:translateY(0)}.spw-custom-select__options--up{top:100%;transform:translateY(0)}.spw-custom-select--has-value.spw-custom-select--is-opened:not(.spw-custom-select--not-searchable) .spw-custom-select__options{margin-top:35px}.spw-custom-select__no-results{padding:12px;cursor:not-allowed;color:var(--spw-color-themes-grey-grey-600)}.spw-custom-select__option{border-bottom:1px solid var(--spw-color-themes-grey-grey-900);padding:12px;cursor:pointer}.spw-custom-select__option:hover{background-color:var(--spw-color-themes-grey-grey-200)}.spw-custom-select__option:last-child{border-bottom:none}.spw-custom-select__option--selected{font-weight:700}.spw-custom-select__option--disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.spw-custom-select__option--disabled:hover{background-color:transparent}.spw-custom-select__error{display:block;font-size:12px;color:var(--spw-color-themes-grey-grey-600);margin-top:8px}.spw-custom-select__option--focused{background-color:var(--spw-color-themes-grey-grey-300)}'}},[65,"spw-custom-select",{value:[1544],label:[1],placeholder:[1],disabled:[4],name:[1],required:[4],items:[1],size:[1],multiple:[4],isSearch:[4,"is-search"],assistiveText:[1,"assistive-text"],error:[1],hint:[1],success:[1],warning:[1],showErrorIcon:[4,"show-error-icon"],showHintIcon:[4,"show-hint-icon"],showSuccessIcon:[4,"show-success-icon"],showWarningIcon:[4,"show-warning-icon"],internalValue:[32],isOpen:[32],parsedOptions:[32],focusedOptionIndex:[32],searchText:[32],dropdownDirection:[32],hasSelectedValue:[32],resetSelect:[64],setValue:[64],getValue:[64]},void 0,{items:[{parseOptions:0}],value:[{valueChangedHandler:0}],internalValue:[{internalValueChanged:0}]}]),h=l,p=function(){"undefined"!=typeof customElements&&["spw-custom-select","spw-checkbox","spw-field-label","spw-field-message","spw-icon"].forEach((e=>{switch(e){case"spw-custom-select":customElements.get(o(e))||customElements.define(o(e),l);break;case"spw-checkbox":customElements.get(o(e))||c();break;case"spw-field-label":customElements.get(o(e))||n();break;case"spw-field-message":customElements.get(o(e))||r();break;case"spw-icon":customElements.get(o(e))||a()}}))};export{h as SpwCustomSelect,p as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as o,a as i,t as s}from"./index.js";import{d as n}from"./p-Dzw3OiMu.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.disabled=!1,this.iconVariant="fa-regular",this.hasSubItems=!1,this.subItemsOpen=!1,this.handleToggleSubItems=e=>{e.preventDefault(),e.stopPropagation(),this.disabled||(this.subItemsOpen=!this.subItemsOpen)},this.handleItemClick=e=>{this.disabled||this.hasSubItems&&!this.href&&(e.preventDefault(),e.stopPropagation(),this.subItemsOpen=!this.subItemsOpen)}}componentDidLoad(){this.checkForSubItems(),this.setupMutationObserver(),setTimeout((()=>{this.checkForSubItems()}),0)}componentDidUpdate(){this.checkForSubItems()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}setupMutationObserver(){this.mutationObserver=new MutationObserver((()=>{this.checkForSubItems()})),this.mutationObserver.observe(this.el,{childList:!0,subtree:!0})}checkForSubItems(){const e=this.el.querySelector('[slot="sub-items"]'),t=null!==e&&(e.children.length>0||e.childNodes.length>0);this.hasSubItems!==t&&(this.hasSubItems=t)}get classes(){return{"spw-dropdown-item":!0,"spw-dropdown-item--disabled":this.disabled,"spw-dropdown-item--has-sub-items":this.hasSubItems,"spw-dropdown-item--sub-items-open":this.subItemsOpen}}render(){const e={"spw-dropdown-item__toggle":!0,"spw-dropdown-item__toggle--open":this.subItemsOpen};return o(i,{key:"d44160317d430c93995b98afaff6c4c09603fca0"},o(this.href&&!this.disabled?"a":"div",{key:"72947a545d788d884d729c53fe4e91e464eda0db",class:this.classes,href:this.href,"aria-disabled":this.disabled?"true":void 0,onClick:this.handleItemClick},this.icon&&o("div",{key:"1f19b647031fa00bc64578c7857fa14a5631991e",class:"spw-dropdown-item__icon"},o("spw-icon",{key:"25124a05ccb6887c3e32ab4bc6a578d0e987928d",variant:this.iconVariant,icon:this.icon})),o("div",{key:"eb1bef3390b270c5e1cb442bbdd62e80b709dfcf",class:"spw-dropdown-item__content"},o("div",{key:"95d8e477ca2916447071f82f3e2e4539fe68b2c8",class:"spw-dropdown-item__label"},o("slot",{key:"6a1cd7541ccb0a21a6fb1678778aa3bc015ce940"})),this.hasSubItems&&o("div",{key:"d1f2c73b1c3f509d413078925b33f12b90cd57f3",class:e,onClick:this.handleToggleSubItems},o("spw-icon",{key:"83d5cf85feed81cf7065ceb95dda64b6ff75cd69",icon:"fa-chevron-down"})))),this.hasSubItems&&o("div",{key:"fc1320d21d08a8efa13c90ec85c4b5bfb15314f8",class:"spw-dropdown-item__sub-items",style:{display:this.subItemsOpen?"block":"none"}},o("slot",{key:"03474d7f5dfc2d47958da92e589b10f58bf8f47d",name:"sub-items"})))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-dropdown-item{cursor:pointer;position:relative;display:flex;align-items:center;gap:8px;padding:8px 12px;color:var(--spw-colors-support-grey-grey-900);text-decoration:none;transition:background-color 0.2s ease;font-size:14px;border-radius:4px}.spw-dropdown-item:hover{background-color:var(--spw-colors-support-grey-grey-200)}.spw-dropdown-item--disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}.spw-dropdown-item--has-sub-items{padding-right:32px}.spw-dropdown-item--sub-items-open{background-color:var(--spw-colors-support-grey-grey-100)}.spw-dropdown-item__icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:14px;color:var(--spw-colors-support-grey-grey-700)}.spw-dropdown-item__content{flex:1;display:flex;align-items:center;justify-content:space-between;position:relative}.spw-dropdown-item__label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spw-dropdown-item__toggle{position:absolute;right:-24px;top:50%;transform:translateY(-50%);width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;transition:background-color 0.2s ease, transform 0.2s ease}.spw-dropdown-item__toggle:hover{background-color:var(--spw-colors-support-grey-grey-300)}.spw-dropdown-item__toggle spw-icon{font-size:12px;color:var(--spw-colors-support-grey-grey-900);transition:transform 0.2s ease}.spw-dropdown-item__toggle--open spw-icon{transform:rotate(180deg)}.spw-dropdown-item__sub-items{padding-left:16px;margin-top:4px}.spw-dropdown-item__sub-items spw-dropdown-item{font-size:13px}'}},[260,"spw-dropdown-item",{href:[1],disabled:[4],icon:[1],iconVariant:[1,"icon-variant"],hasSubItems:[32],subItemsOpen:[32]}]),a=r,d=function(){"undefined"!=typeof customElements&&["spw-dropdown-item","spw-icon"].forEach((e=>{switch(e){case"spw-dropdown-item":customElements.get(s(e))||customElements.define(s(e),r);break;case"spw-icon":customElements.get(s(e))||n()}}))};export{a as SpwDropdownItem,d as defineCustomElement}
1
+ import{p as e,H as t,h as o,a as i,t as s}from"./index.js";import{d as n}from"./p-Dzw3OiMu.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.disabled=!1,this.iconVariant="fa-regular",this.hasSubItems=!1,this.subItemsOpen=!1,this.handleToggleSubItems=e=>{e.preventDefault(),e.stopPropagation(),this.disabled||(this.subItemsOpen=!this.subItemsOpen)},this.handleItemClick=e=>{this.disabled||this.hasSubItems&&!this.href&&(e.preventDefault(),e.stopPropagation(),this.subItemsOpen=!this.subItemsOpen)}}componentDidLoad(){this.checkForSubItems(),this.setupMutationObserver(),setTimeout((()=>{this.checkForSubItems()}),0)}componentDidUpdate(){this.checkForSubItems()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}setupMutationObserver(){this.mutationObserver=new MutationObserver((()=>{this.checkForSubItems()})),this.mutationObserver.observe(this.el,{childList:!0,subtree:!0})}checkForSubItems(){const e=this.el.querySelector('[slot="sub-items"]'),t=null!==e&&(e.children.length>0||e.childNodes.length>0);this.hasSubItems!==t&&(this.hasSubItems=t)}get classes(){return{"spw-dropdown-item":!0,"spw-dropdown-item--disabled":this.disabled,"spw-dropdown-item--has-sub-items":this.hasSubItems,"spw-dropdown-item--sub-items-open":this.subItemsOpen}}render(){const e={"spw-dropdown-item__toggle":!0,"spw-dropdown-item__toggle--open":this.subItemsOpen};return o(i,{key:"a3ad23ee1723bd9d11337f7933b935f8b62b5017"},o(this.href&&!this.disabled?"a":"div",{key:"ef025bcac0a64c8d40d0aafa763539a294e5deb4",class:this.classes,href:this.href,"aria-disabled":this.disabled?"true":void 0,onClick:this.handleItemClick},this.icon&&o("div",{key:"2e608044a532dc26b09014d332fc4f5a500a0fc5",class:"spw-dropdown-item__icon"},o("spw-icon",{key:"fcea445e3e88595512fb4ed357df06575dd340d1",variant:this.iconVariant,icon:this.icon})),o("div",{key:"2f73e6fdc41d3dc442985d615ff2a47eedeab94b",class:"spw-dropdown-item__content"},o("div",{key:"e3e5cec8abb930ce40ff9dd8dfaed3f866c972d5",class:"spw-dropdown-item__label"},o("slot",{key:"b20249bac004ca6434aeff1824b249942efec918"})),this.hasSubItems&&o("div",{key:"416f27013f698d984d7daa8a0d61ea7c8df3b226",class:e,onClick:this.handleToggleSubItems},o("spw-icon",{key:"644ae818d42ee1041678fa122c97c8b99c13a0d4",icon:"fa-chevron-down"})))),this.hasSubItems&&o("div",{key:"ceb4358c371e7f61a2231eeef9db1f8afe20c621",class:"spw-dropdown-item__sub-items",style:{display:this.subItemsOpen?"block":"none"}},o("slot",{key:"9ee40f987b988539b0482a7f9dcbd944f2593c1a",name:"sub-items"})))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-dropdown-item{cursor:pointer;position:relative;display:flex;align-items:center;gap:8px;padding:8px 12px;color:var(--spw-colors-support-grey-grey-900);text-decoration:none;transition:background-color 0.2s ease;font-size:14px;border-radius:4px}.spw-dropdown-item:hover{background-color:var(--spw-colors-support-grey-grey-200)}.spw-dropdown-item--disabled{cursor:not-allowed;opacity:0.5;pointer-events:none}.spw-dropdown-item--has-sub-items{padding-right:32px}.spw-dropdown-item--sub-items-open{background-color:var(--spw-colors-support-grey-grey-100)}.spw-dropdown-item__icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:14px;color:var(--spw-colors-support-grey-grey-700)}.spw-dropdown-item__content{flex:1;display:flex;align-items:center;justify-content:space-between;position:relative}.spw-dropdown-item__label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spw-dropdown-item__toggle{position:absolute;right:-24px;top:50%;transform:translateY(-50%);width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;transition:background-color 0.2s ease, transform 0.2s ease}.spw-dropdown-item__toggle:hover{background-color:var(--spw-colors-support-grey-grey-300)}.spw-dropdown-item__toggle spw-icon{font-size:12px;color:var(--spw-colors-support-grey-grey-900);transition:transform 0.2s ease}.spw-dropdown-item__toggle--open spw-icon{transform:rotate(180deg)}.spw-dropdown-item__sub-items{padding-left:16px;margin-top:4px}.spw-dropdown-item__sub-items spw-dropdown-item{font-size:13px}'}},[260,"spw-dropdown-item",{href:[1],disabled:[4],icon:[1],iconVariant:[1,"icon-variant"],hasSubItems:[32],subItemsOpen:[32]}]),a=r,d=function(){"undefined"!=typeof customElements&&["spw-dropdown-item","spw-icon"].forEach((e=>{switch(e){case"spw-dropdown-item":customElements.get(s(e))||customElements.define(s(e),r);break;case"spw-icon":customElements.get(s(e))||n()}}))};export{a as SpwDropdownItem,d as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,h as i,t as o}from"./index.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.direction="bottom",this.hasPadding=!0,this.contentWidth=300,this.open=!1,this.isVisible=!1,this.dropdownEl=null,this.movedContentEl=null,this.showDropdown=()=>{if(this.isVisible)return;const t=this.host.querySelector('[slot="dropdownContent"]');t&&(this.isVisible=!0,this.dropdownEl=document.createElement("div"),this.dropdownEl.className="spw-dropdown-fixed spw-dropdown-fixed--"+this.direction,this.hasPadding&&this.dropdownEl.classList.add("spw-dropdown-fixed--padded"),this.dropdownEl.setAttribute("role","menu"),this.dropdownEl.style.width=(this.contentWidth||200)+"px",this.movedContentEl=t,this.dropdownEl.appendChild(this.movedContentEl),document.body.appendChild(this.dropdownEl),requestAnimationFrame((()=>{this.positionDropdown(),this.addListeners()})))},this.hideDropdown=()=>{var t;this.isVisible&&(this.isVisible=!1,this.open=!1,this.dropdownEl&&this.movedContentEl&&this.host.appendChild(this.movedContentEl),(null===(t=this.dropdownEl)||void 0===t?void 0:t.parentNode)&&this.dropdownEl.parentNode.removeChild(this.dropdownEl),this.dropdownEl=null,this.movedContentEl=null,this.removeListeners())}}async close(){this.open=!1,this.hideDropdown()}onOpenChange(t){t?this.showDropdown():this.hideDropdown()}connectedCallback(){this.handleClickOutside=this.handleClickOutside.bind(this),this.handleScrollOrResize=this.handleScrollOrResize.bind(this)}componentDidLoad(){this.open&&this.showDropdown()}disconnectedCallback(){this.removeListeners()}addListeners(){document.addEventListener("click",this.handleClickOutside,!0),window.addEventListener("scroll",this.handleScrollOrResize,!0),window.addEventListener("resize",this.handleScrollOrResize)}removeListeners(){document.removeEventListener("click",this.handleClickOutside,!0),window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize)}handleClickOutside(t){var e;this.host.contains(t.target)||(null===(e=this.dropdownEl)||void 0===e?void 0:e.contains(t.target))||this.close()}handleScrollOrResize(){this.isVisible&&this.positionDropdown()}positionDropdown(){var t;if(!this.dropdownEl)return;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".spw-dropdown__trigger");if(!e)return;const i=e.getBoundingClientRect(),o=this.dropdownEl;o.style.visibility="hidden",o.style.position="fixed",o.style.display="flex";const n=o.getBoundingClientRect();let s=0,r=0;switch(this.direction){case"top":s=i.top-n.height-8,r=i.left+(i.width-n.width)/2;break;case"bottom":s=i.bottom+8,r=i.left+(i.width-n.width)/2;break;case"left":s=i.top+(i.height-n.height)/2,r=i.left-n.width-8;break;default:s=i.top+(i.height-n.height)/2,r=i.right+8}o.style.top=s+"px",o.style.left=r+"px",o.style.zIndex="9999",o.style.visibility="visible"}render(){return i("div",{key:"69c3594047723f14564ba343af4f015f78ff298b",class:"spw-dropdown__trigger",onClick:()=>this.open=!this.open},i("slot",{key:"547e455db35bcc5b94c049930fa23b4fc57a45cb"}))}get host(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline-block;line-height:1}:host([open]){--spw-dropdown-icon-color:var(--spw-color-themes-grey-grey-900)}.spw-dropdown__trigger{cursor:pointer}.spw-dropdown__trigger:hover{--spw-dropdown-icon-color:var(--spw-color-themes-grey-grey-900)}.spw-dropdown__trigger ::slotted(spw-icon){color:var(--spw-dropdown-icon-color, inherit)}'}},[257,"spw-dropdown",{direction:[1],hasPadding:[4,"has-padding"],contentWidth:[2,"content-width"],open:[1540],isVisible:[32],close:[64]},void 0,{open:[{onOpenChange:0}]}]),s=n,r=function(){"undefined"!=typeof customElements&&["spw-dropdown"].forEach((t=>{"spw-dropdown"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))};export{s as SpwDropdown,r as defineCustomElement}
1
+ import{p as t,H as e,h as i,t as o}from"./index.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.direction="bottom",this.hasPadding=!0,this.contentWidth=300,this.open=!1,this.isVisible=!1,this.dropdownEl=null,this.movedContentEl=null,this.showDropdown=()=>{if(this.isVisible)return;const t=this.host.querySelector('[slot="dropdownContent"]');t&&(this.isVisible=!0,this.dropdownEl=document.createElement("div"),this.dropdownEl.className="spw-dropdown-fixed spw-dropdown-fixed--"+this.direction,this.hasPadding&&this.dropdownEl.classList.add("spw-dropdown-fixed--padded"),this.dropdownEl.setAttribute("role","menu"),this.dropdownEl.style.width=(this.contentWidth||200)+"px",this.movedContentEl=t,this.dropdownEl.appendChild(this.movedContentEl),document.body.appendChild(this.dropdownEl),requestAnimationFrame((()=>{this.positionDropdown(),this.addListeners()})))},this.hideDropdown=()=>{var t;this.isVisible&&(this.isVisible=!1,this.open=!1,this.dropdownEl&&this.movedContentEl&&this.host.appendChild(this.movedContentEl),(null===(t=this.dropdownEl)||void 0===t?void 0:t.parentNode)&&this.dropdownEl.parentNode.removeChild(this.dropdownEl),this.dropdownEl=null,this.movedContentEl=null,this.removeListeners())}}async close(){this.open=!1,this.hideDropdown()}onOpenChange(t){t?this.showDropdown():this.hideDropdown()}connectedCallback(){this.handleClickOutside=this.handleClickOutside.bind(this),this.handleScrollOrResize=this.handleScrollOrResize.bind(this)}componentDidLoad(){this.open&&this.showDropdown()}disconnectedCallback(){this.removeListeners()}addListeners(){document.addEventListener("click",this.handleClickOutside,!0),window.addEventListener("scroll",this.handleScrollOrResize,!0),window.addEventListener("resize",this.handleScrollOrResize)}removeListeners(){document.removeEventListener("click",this.handleClickOutside,!0),window.removeEventListener("scroll",this.handleScrollOrResize,!0),window.removeEventListener("resize",this.handleScrollOrResize)}handleClickOutside(t){var e;this.host.contains(t.target)||(null===(e=this.dropdownEl)||void 0===e?void 0:e.contains(t.target))||this.close()}handleScrollOrResize(){this.isVisible&&this.positionDropdown()}positionDropdown(){var t;if(!this.dropdownEl)return;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".spw-dropdown__trigger");if(!e)return;const i=e.getBoundingClientRect(),o=this.dropdownEl;o.style.visibility="hidden",o.style.position="fixed",o.style.display="flex";const n=o.getBoundingClientRect();let s=0,r=0;switch(this.direction){case"top":s=i.top-n.height-8,r=i.left+(i.width-n.width)/2;break;case"bottom":s=i.bottom+8,r=i.left+(i.width-n.width)/2;break;case"left":s=i.top+(i.height-n.height)/2,r=i.left-n.width-8;break;default:s=i.top+(i.height-n.height)/2,r=i.right+8}o.style.top=s+"px",o.style.left=r+"px",o.style.zIndex="9999",o.style.visibility="visible"}render(){return i("div",{key:"7ee419bf57352a89e547b2c516b97f4d398025e0",class:"spw-dropdown__trigger",onClick:()=>this.open=!this.open},i("slot",{key:"84aa7de5999cde1e1d35bfc72227a2f7c6a72a06"}))}get host(){return this}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:inline-block;line-height:1}:host([open]){--spw-dropdown-icon-color:var(--spw-color-themes-grey-grey-900)}.spw-dropdown__trigger{cursor:pointer}.spw-dropdown__trigger:hover{--spw-dropdown-icon-color:var(--spw-color-themes-grey-grey-900)}.spw-dropdown__trigger ::slotted(spw-icon){color:var(--spw-dropdown-icon-color, inherit)}'}},[257,"spw-dropdown",{direction:[1],hasPadding:[4,"has-padding"],contentWidth:[2,"content-width"],open:[1540],isVisible:[32],close:[64]},void 0,{open:[{onOpenChange:0}]}]),s=n,r=function(){"undefined"!=typeof customElements&&["spw-dropdown"].forEach((t=>{"spw-dropdown"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))};export{s as SpwDropdown,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as i,c as s,h as t,t as o}from"./index.js";import{a}from"./p-BBi01mKM.js";import{d as r}from"./p-CZVOV-PN.js";import{d as n}from"./p-Dzw3OiMu.js";import{d as l}from"./p-7EG4w8ub.js";const p=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.spwFileChange=s(this,"spwFileChange",7),this.internals=this.attachInternals(),this.disabled=!1,this.error=!1,this.enableDropZone=!1,this.multiple=!1,this.accept="",this.refuse="",this.maxFileSize=100,this.maxFiles=1/0,this.selectedFiles=[],this.fileTypeErrors=[],this.fileLimitErrors=[],this.isDragging=!1,this.isMaxFilesReachedExact=!1}componentWillLoad(){this.internalValue=this.value,this.maxFileSize=1024*this.maxFileSize*1024,this.accept&&this.refuse&&console.warn('spw-file-upload: Vous ne pouvez pas utiliser "accept" et "refuse" en même temps. Seul "accept" sera pris en compte.')}componentWillUpdate(){this.value!==this.internalValue&&(this.internalValue=this.value)}get isMaxFilesReached(){return this.selectedFiles.length>=this.maxFiles}handleFileChange(e){const i=e.target,s=i.files?Array.from(i.files):[];this.processFiles(s),i.value=""}processFiles(e){this.fileTypeErrors=[],this.fileLimitErrors=[],this.isMaxFilesReachedExact=!1,this.multiple||(this.selectedFiles=[],e=e.slice(0,1));const i=e.filter((e=>{const i=this.isFileAccepted(e),s=this.isFileSizeValid(e);return i||s?i?!!s||(this.fileTypeErrors.push(e.name+" n'a pas été pris en compte car il dépasse la taille maximale autorisée."),!1):(this.fileTypeErrors.push(e.name+" n'a pas été pris en compte car le format n'est pas autorisé."),!1):(this.fileTypeErrors.push(e.name+" n’a pas été pris en compte car le format n’est pas autorisé et la limite de poids est dépassée."),!1)}));if(this.selectedFiles.length+i.length>=this.maxFiles){const e=this.maxFiles-this.selectedFiles.length;this.selectedFiles.length+i.length===this.maxFiles?(this.isMaxFilesReachedExact=!0,this.fileLimitErrors.push("Vous avez atteint la limite autorisée de fichiers.")):(i.splice(e),this.fileLimitErrors.push(`Vous ne pouvez pas télécharger plus de ${this.maxFiles} ${this.maxFiles>1?"fichiers":"fichier"}.`))}this.selectedFiles=[...this.selectedFiles,...i],this.spwFileChange.emit({files:this.selectedFiles}),this.updateFormValue()}isFileAccepted(e){if(this.accept&&this.refuse){const i=this.accept.split(",").map((e=>e.trim()));return i.includes(e.type)||i.some((i=>e.name.endsWith(i)))}if(this.accept){const i=this.accept.split(",").map((e=>e.trim()));return i.includes(e.type)||i.some((i=>e.name.endsWith(i)))}if(this.refuse){const i=this.refuse.split(",").map((e=>e.trim()));return!(i.includes(e.type)||i.some((i=>e.name.endsWith(i))))}return!0}isFileSizeValid(e){return e.size<=this.maxFileSize}updateFormValue(){if(this.selectedFiles.length>0){const e=new FormData;this.selectedFiles.forEach(((i,s)=>{e.append(`${this.name}[${s}]`,i)})),this.internalValue=""+e,this.internals.setFormValue(e)}else this.internalValue="",this.internals.setFormValue(null)}async resetInput(){this.inputElement.value="",this.selectedFiles=[],this.fileLimitErrors=[],this.fileTypeErrors=[],this.updateFormValue()}formResetCallback(){this.resetInput()}handleDragOver(e){e.preventDefault(),this.disabled||!this.enableDropZone||this.isMaxFilesReached||(this.isDragging=!0)}handleDragLeave(){!this.disabled&&this.enableDropZone&&(this.isDragging=!1)}handleDrop(e){var i;if(e.preventDefault(),!this.disabled&&this.enableDropZone&&!this.isMaxFilesReached){this.isDragging=!1;const s=(null===(i=e.dataTransfer)||void 0===i?void 0:i.files)?Array.from(e.dataTransfer.files):[];this.processFiles(s)}}removeFile(e){this.selectedFiles=this.selectedFiles.filter(((i,s)=>s!==e)),this.fileLimitErrors=[],this.updateFormValue(),this.spwFileChange.emit({files:this.selectedFiles})}handleKeydown(e){" "!==e.key&&"Enter"!==e.key||this.isMaxFilesReached||(e.preventDefault(),!this.disabled&&this.inputElement.click())}get elementClass(){return{"spw-file-upload__wrapper":!0,"spw-file-upload__wrapper--disabled":this.disabled||this.isMaxFilesReached,"spw-file-upload__wrapper--error":this.error,"spw-file-upload--has-dropzone":this.enableDropZone,"spw-file-upload--is-dragging":this.isDragging}}get hintsMessages(){const e=[];let i=`Taille maximale par fichier : ${this.maxFileSize/1048576} Mo`;return i+=this.multiple&&this.maxFiles!==1/0?` - ${this.maxFiles} ${this.maxFiles>1?"fichiers":"fichier"} maximum.`:".",e.push(i),e.push(this.accept&&this.refuse||this.accept?`Formats autorisés : ${this.accept}.`:this.refuse?`Formats refusés : ${this.refuse}.`:"Formats autorisés : tous les formats."),e}render(){const e=this.multiple?"Choisir vos fichiers...":"Choisir votre fichier...",i=this.multiple?"Déposez vos fichiers ici":"Déposez votre fichier ici";return t("div",{key:"501bc95288cc670462c4545d44db80758195ddda",class:this.elementClass,onDragOver:this.handleDragOver.bind(this),onDragLeave:this.handleDragLeave.bind(this),onDrop:this.handleDrop.bind(this)},t("input",{key:"6bf6586de3919a1f913ad7b371d83d322f6385a3",type:"file",ref:e=>this.inputElement=e,onChange:this.handleFileChange.bind(this),name:this.name,multiple:this.multiple,accept:this.accept,style:{display:"none"},disabled:this.isMaxFilesReached}),this.enableDropZone?t("div",{tabindex:this.disabled||this.isMaxFilesReached?-1:0,onKeyDown:this.handleKeydown.bind(this),onClick:()=>!this.disabled&&!this.isMaxFilesReached&&this.inputElement.click(),class:"spw-file-upload__dropzone"},i," ou ",t("span",{class:"spw-file-upload__dropzone-link"},"choisissez sur votre ordinateur...")):t("spw-button",{variant:"secondary",onClick:()=>!this.disabled&&!this.isMaxFilesReached&&this.inputElement.click(),disabled:this.disabled||this.isMaxFilesReached},e),t("div",{key:"082e5f3f10f27b6435dcf47b5688d03b42d034f5",class:"spw-file-upload__hints"},this.hintsMessages.length>0&&t("ul",{key:"62495fffa5ee797c7787535af7c349e18a3076b5"},this.hintsMessages.map(((e,i)=>t("li",{key:i},e))))),t("div",{key:"d21de5e0f796829746ae8d3dc981e3150219f72e",class:"spw-file-upload__info"},this.selectedFiles.length>0?t("ul",{class:"spw-file-upload__info-list"},this.selectedFiles.map(((e,i)=>t("li",{key:i},t("span",{class:"spw-file-upload__info-list-name"},e.name),t("div",{class:"spw-file-upload__info-list-actions"},t("span",{class:"spw-file-upload__spacing"},a(e.size)),t("a",{class:"spw-file-upload__info-list-delete",href:"#",onClick:e=>{e.preventDefault(),this.removeFile(i)}},"Supprimer")))))):"",this.fileLimitErrors.length>0&&t("ul",{key:"7b4415ba4316aec17e08d91a6057505877686c2e",class:"spw-file-upload__errors "+(this.isMaxFilesReachedExact?"spw-file-upload__errors--warning":"")},this.fileLimitErrors.map(((e,i)=>t("li",{key:i},t("spw-icon",{class:"spw-file-upload__spacing",icon:this.isMaxFilesReachedExact?"fa-circle-exclamation":"fa-warning"}),e)))),this.fileTypeErrors.length>0&&t("ul",{key:"0372034644a7a3158dc32933f8e431e487543d9a",class:"spw-file-upload__errors"},this.fileTypeErrors.map(((e,i)=>t("li",{key:i},t("spw-icon",{class:"spw-file-upload__spacing",icon:"fa-warning"}),e))))))}static get formAssociated(){return!0}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-file-upload{display:block;position:relative}.spw-file-upload__spacing{margin-right:8px}.spw-file-upload__wrapper--error{border-color:#ff4d4d;background-color:#ffe6e6}.spw-file-upload__wrapper--dragging{background-color:#e0f7fa;border-color:#00acc1}.spw-file-upload spw-button{display:inline-block;margin-bottom:8px}.spw-file-upload__errors{font-size:14px;color:var(--spw-colors-dark-themes-red-red-500);font-weight:600}.spw-file-upload__errors li{margin-top:16px}.spw-file-upload__errors--warning{color:var(--spw-color-themes-grey-grey-800);font-weight:400}.spw-file-upload__hints{font-size:14px;color:var(--spw-color-themes-grey-grey-600);margin-top:16px}.spw-file-upload__dropzone{cursor:pointer;color:#555;background:var(--spw-colors-dark-themes-blue-grey-blue-grey-50);padding:20px;border-radius:8px;border:1px dashed #333;font-weight:bold;text-align:center}.spw-file-upload__dropzone:not(.spw-file-upload--disabled):hover{outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-file-upload__dropzone:not(.spw-file-upload__wrapper--disabled):focus-visible,.spw-file-upload__dropzone:not(.spw-file-upload__wrapper--disabled):active,.spw-file-upload__dropzone:not(.spw-file-upload__wrapper--disabled):focus-within{outline:2px solid var(--spw-ds-focus)}.spw-file-upload__dropzone-link{color:var(--spw-ds-primary);text-decoration:underline}.spw-file-upload__dropzone-link:hover{text-decoration:none}.spw-file-upload__wrapper--disabled .spw-file-upload__dropzone-link{color:inherit;text-decoration:none}.spw-file-upload__wrapper--disabled .spw-file-upload__dropzone{cursor:not-allowed;background:var(--spw-color-themes-grey-grey-100);color:var(--spw-color-themes-grey-grey-400);border-color:var(--spw-color-themes-grey-grey-300);outline:none !important}.spw-file-upload--is-dragging .spw-file-upload__dropzone{background:var(--spw-colors-dark-themes-blue-grey-blue-grey-200)}.spw-file-upload__info-list{margin-top:16px;border-top:1px solid #eee}.spw-file-upload__info-list li{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center;padding:16px 8px;border-bottom:1px solid #eee;color:var(--spw-color-themes-grey-grey-900);font-size:14px}@media (min-width: 768px){.spw-file-upload__info-list li{flex-wrap:nowrap;gap:16px}}.spw-file-upload__info-list-actions{display:flex;gap:8px}@media (min-width: 768px){.spw-file-upload__info-list-actions{gap:16px}}.spw-file-upload__info-list-delete{color:inherit}.spw-file-upload__info-list-delete:hover{text-decoration:none}'}},[65,"spw-file-upload",{disabled:[4],error:[4],name:[1],value:[1],enableDropZone:[4,"enable-drop-zone"],multiple:[4],accept:[1],refuse:[1],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],internalValue:[32],selectedFiles:[32],fileTypeErrors:[32],fileLimitErrors:[32],isDragging:[32],isMaxFilesReachedExact:[32],resetInput:[64]}]),d=p,h=function(){"undefined"!=typeof customElements&&["spw-file-upload","spw-button","spw-icon","spw-loading"].forEach((e=>{switch(e){case"spw-file-upload":customElements.get(o(e))||customElements.define(o(e),p);break;case"spw-button":customElements.get(o(e))||r();break;case"spw-icon":customElements.get(o(e))||n();break;case"spw-loading":customElements.get(o(e))||l()}}))};export{d as SpwFileUpload,h as defineCustomElement}
1
+ import{p as e,H as i,c as s,h as t,t as o}from"./index.js";import{a}from"./p-BBi01mKM.js";import{d as r}from"./p-CZVOV-PN.js";import{d as n}from"./p-Dzw3OiMu.js";import{d as l}from"./p-7EG4w8ub.js";const p=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.spwFileChange=s(this,"spwFileChange",7),this.internals=this.attachInternals(),this.disabled=!1,this.error=!1,this.enableDropZone=!1,this.multiple=!1,this.accept="",this.refuse="",this.maxFileSize=100,this.maxFiles=1/0,this.selectedFiles=[],this.fileTypeErrors=[],this.fileLimitErrors=[],this.isDragging=!1,this.isMaxFilesReachedExact=!1}componentWillLoad(){this.internalValue=this.value,this.maxFileSize=1024*this.maxFileSize*1024,this.accept&&this.refuse&&console.warn('spw-file-upload: Vous ne pouvez pas utiliser "accept" et "refuse" en même temps. Seul "accept" sera pris en compte.')}componentWillUpdate(){this.value!==this.internalValue&&(this.internalValue=this.value)}get isMaxFilesReached(){return this.selectedFiles.length>=this.maxFiles}handleFileChange(e){const i=e.target,s=i.files?Array.from(i.files):[];this.processFiles(s),i.value=""}processFiles(e){this.fileTypeErrors=[],this.fileLimitErrors=[],this.isMaxFilesReachedExact=!1,this.multiple||(this.selectedFiles=[],e=e.slice(0,1));const i=e.filter((e=>{const i=this.isFileAccepted(e),s=this.isFileSizeValid(e);return i||s?i?!!s||(this.fileTypeErrors.push(e.name+" n'a pas été pris en compte car il dépasse la taille maximale autorisée."),!1):(this.fileTypeErrors.push(e.name+" n'a pas été pris en compte car le format n'est pas autorisé."),!1):(this.fileTypeErrors.push(e.name+" n’a pas été pris en compte car le format n’est pas autorisé et la limite de poids est dépassée."),!1)}));if(this.selectedFiles.length+i.length>=this.maxFiles){const e=this.maxFiles-this.selectedFiles.length;this.selectedFiles.length+i.length===this.maxFiles?(this.isMaxFilesReachedExact=!0,this.fileLimitErrors.push("Vous avez atteint la limite autorisée de fichiers.")):(i.splice(e),this.fileLimitErrors.push(`Vous ne pouvez pas télécharger plus de ${this.maxFiles} ${this.maxFiles>1?"fichiers":"fichier"}.`))}this.selectedFiles=[...this.selectedFiles,...i],this.spwFileChange.emit({files:this.selectedFiles}),this.updateFormValue()}isFileAccepted(e){if(this.accept&&this.refuse){const i=this.accept.split(",").map((e=>e.trim()));return i.includes(e.type)||i.some((i=>e.name.endsWith(i)))}if(this.accept){const i=this.accept.split(",").map((e=>e.trim()));return i.includes(e.type)||i.some((i=>e.name.endsWith(i)))}if(this.refuse){const i=this.refuse.split(",").map((e=>e.trim()));return!(i.includes(e.type)||i.some((i=>e.name.endsWith(i))))}return!0}isFileSizeValid(e){return e.size<=this.maxFileSize}updateFormValue(){if(this.selectedFiles.length>0){const e=new FormData;this.selectedFiles.forEach(((i,s)=>{e.append(`${this.name}[${s}]`,i)})),this.internalValue=""+e,this.internals.setFormValue(e)}else this.internalValue="",this.internals.setFormValue(null)}async resetInput(){this.inputElement.value="",this.selectedFiles=[],this.fileLimitErrors=[],this.fileTypeErrors=[],this.updateFormValue()}formResetCallback(){this.resetInput()}handleDragOver(e){e.preventDefault(),this.disabled||!this.enableDropZone||this.isMaxFilesReached||(this.isDragging=!0)}handleDragLeave(){!this.disabled&&this.enableDropZone&&(this.isDragging=!1)}handleDrop(e){var i;if(e.preventDefault(),!this.disabled&&this.enableDropZone&&!this.isMaxFilesReached){this.isDragging=!1;const s=(null===(i=e.dataTransfer)||void 0===i?void 0:i.files)?Array.from(e.dataTransfer.files):[];this.processFiles(s)}}removeFile(e){this.selectedFiles=this.selectedFiles.filter(((i,s)=>s!==e)),this.fileLimitErrors=[],this.updateFormValue(),this.spwFileChange.emit({files:this.selectedFiles})}handleKeydown(e){" "!==e.key&&"Enter"!==e.key||this.isMaxFilesReached||(e.preventDefault(),!this.disabled&&this.inputElement.click())}get elementClass(){return{"spw-file-upload__wrapper":!0,"spw-file-upload__wrapper--disabled":this.disabled||this.isMaxFilesReached,"spw-file-upload__wrapper--error":this.error,"spw-file-upload--has-dropzone":this.enableDropZone,"spw-file-upload--is-dragging":this.isDragging}}get hintsMessages(){const e=[];let i=`Taille maximale par fichier : ${this.maxFileSize/1048576} Mo`;return i+=this.multiple&&this.maxFiles!==1/0?` - ${this.maxFiles} ${this.maxFiles>1?"fichiers":"fichier"} maximum.`:".",e.push(i),e.push(this.accept&&this.refuse||this.accept?`Formats autorisés : ${this.accept}.`:this.refuse?`Formats refusés : ${this.refuse}.`:"Formats autorisés : tous les formats."),e}render(){const e=this.multiple?"Choisir vos fichiers...":"Choisir votre fichier...",i=this.multiple?"Déposez vos fichiers ici":"Déposez votre fichier ici";return t("div",{key:"18f204928dd7c56a9c99f6b097070a054975f378",class:this.elementClass,onDragOver:this.handleDragOver.bind(this),onDragLeave:this.handleDragLeave.bind(this),onDrop:this.handleDrop.bind(this)},t("input",{key:"6df02f18e4090be6378c738a7dfd0769bb4f27fa",type:"file",ref:e=>this.inputElement=e,onChange:this.handleFileChange.bind(this),name:this.name,multiple:this.multiple,accept:this.accept,style:{display:"none"},disabled:this.isMaxFilesReached}),this.enableDropZone?t("div",{tabindex:this.disabled||this.isMaxFilesReached?-1:0,onKeyDown:this.handleKeydown.bind(this),onClick:()=>!this.disabled&&!this.isMaxFilesReached&&this.inputElement.click(),class:"spw-file-upload__dropzone"},i," ou ",t("span",{class:"spw-file-upload__dropzone-link"},"choisissez sur votre ordinateur...")):t("spw-button",{variant:"secondary",onClick:()=>!this.disabled&&!this.isMaxFilesReached&&this.inputElement.click(),disabled:this.disabled||this.isMaxFilesReached},e),t("div",{key:"e119e70c6233f9b3a7e8405a47f97bc9bab5c94a",class:"spw-file-upload__hints"},this.hintsMessages.length>0&&t("ul",{key:"fce1e6c7460a884c20ae12dea026405bff696044"},this.hintsMessages.map(((e,i)=>t("li",{key:i},e))))),t("div",{key:"afb1c5d5f8e77c3b16643678b1b0882a9733059c",class:"spw-file-upload__info"},this.selectedFiles.length>0?t("ul",{class:"spw-file-upload__info-list"},this.selectedFiles.map(((e,i)=>t("li",{key:i},t("span",{class:"spw-file-upload__info-list-name"},e.name),t("div",{class:"spw-file-upload__info-list-actions"},t("span",{class:"spw-file-upload__spacing"},a(e.size)),t("a",{class:"spw-file-upload__info-list-delete",href:"#",onClick:e=>{e.preventDefault(),this.removeFile(i)}},"Supprimer")))))):"",this.fileLimitErrors.length>0&&t("ul",{key:"5e3e60356f48164586ede8c2516f92cb6c02ea36",class:"spw-file-upload__errors "+(this.isMaxFilesReachedExact?"spw-file-upload__errors--warning":"")},this.fileLimitErrors.map(((e,i)=>t("li",{key:i},t("spw-icon",{class:"spw-file-upload__spacing",icon:this.isMaxFilesReachedExact?"fa-circle-exclamation":"fa-warning"}),e)))),this.fileTypeErrors.length>0&&t("ul",{key:"003cbe073e94f02e4069ecc8275b54ab775dd333",class:"spw-file-upload__errors"},this.fileTypeErrors.map(((e,i)=>t("li",{key:i},t("spw-icon",{class:"spw-file-upload__spacing",icon:"fa-warning"}),e))))))}static get formAssociated(){return!0}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-file-upload{display:block;position:relative}.spw-file-upload__spacing{margin-right:8px}.spw-file-upload__wrapper--error{border-color:#ff4d4d;background-color:#ffe6e6}.spw-file-upload__wrapper--dragging{background-color:#e0f7fa;border-color:#00acc1}.spw-file-upload spw-button{display:inline-block;margin-bottom:8px}.spw-file-upload__errors{font-size:14px;color:var(--spw-colors-dark-themes-red-red-500);font-weight:600}.spw-file-upload__errors li{margin-top:16px}.spw-file-upload__errors--warning{color:var(--spw-color-themes-grey-grey-800);font-weight:400}.spw-file-upload__hints{font-size:14px;color:var(--spw-color-themes-grey-grey-600);margin-top:16px}.spw-file-upload__dropzone{cursor:pointer;color:#555;background:var(--spw-colors-dark-themes-blue-grey-blue-grey-50);padding:20px;border-radius:8px;border:1px dashed #333;font-weight:bold;text-align:center}.spw-file-upload__dropzone:not(.spw-file-upload--disabled):hover{outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-file-upload__dropzone:not(.spw-file-upload__wrapper--disabled):focus-visible,.spw-file-upload__dropzone:not(.spw-file-upload__wrapper--disabled):active,.spw-file-upload__dropzone:not(.spw-file-upload__wrapper--disabled):focus-within{outline:2px solid var(--spw-ds-focus)}.spw-file-upload__dropzone-link{color:var(--spw-ds-primary);text-decoration:underline}.spw-file-upload__dropzone-link:hover{text-decoration:none}.spw-file-upload__wrapper--disabled .spw-file-upload__dropzone-link{color:inherit;text-decoration:none}.spw-file-upload__wrapper--disabled .spw-file-upload__dropzone{cursor:not-allowed;background:var(--spw-color-themes-grey-grey-100);color:var(--spw-color-themes-grey-grey-400);border-color:var(--spw-color-themes-grey-grey-300);outline:none !important}.spw-file-upload--is-dragging .spw-file-upload__dropzone{background:var(--spw-colors-dark-themes-blue-grey-blue-grey-200)}.spw-file-upload__info-list{margin-top:16px;border-top:1px solid #eee}.spw-file-upload__info-list li{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;align-items:center;padding:16px 8px;border-bottom:1px solid #eee;color:var(--spw-color-themes-grey-grey-900);font-size:14px}@media (min-width: 768px){.spw-file-upload__info-list li{flex-wrap:nowrap;gap:16px}}.spw-file-upload__info-list-actions{display:flex;gap:8px}@media (min-width: 768px){.spw-file-upload__info-list-actions{gap:16px}}.spw-file-upload__info-list-delete{color:inherit}.spw-file-upload__info-list-delete:hover{text-decoration:none}'}},[65,"spw-file-upload",{disabled:[4],error:[4],name:[1],value:[1],enableDropZone:[4,"enable-drop-zone"],multiple:[4],accept:[1],refuse:[1],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],internalValue:[32],selectedFiles:[32],fileTypeErrors:[32],fileLimitErrors:[32],isDragging:[32],isMaxFilesReachedExact:[32],resetInput:[64]}]),d=p,h=function(){"undefined"!=typeof customElements&&["spw-file-upload","spw-button","spw-icon","spw-loading"].forEach((e=>{switch(e){case"spw-file-upload":customElements.get(o(e))||customElements.define(o(e),p);break;case"spw-button":customElements.get(o(e))||r();break;case"spw-icon":customElements.get(o(e))||n();break;case"spw-loading":customElements.get(o(e))||l()}}))};export{d as SpwFileUpload,h as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as t,h as i,a as n,t as a}from"./index.js";import{d as o}from"./p-CZVOV-PN.js";import{d as s}from"./p-Dzw3OiMu.js";import{d}from"./p-7EG4w8ub.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.activeLang="",this.options=[],this.handleButtonKeyDown=e=>{var t;" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),null===(t=this.selectEl)||void 0===t||t.click())},this.handleButtonClick=()=>{var e;null===(e=this.selectEl)||void 0===e||e.click()},this.handleOptionClick=e=>{this.setActiveLangAndRedirect(e)}}componentWillLoad(){this.updateActiveLangFromDOM()}componentDidLoad(){this.moveOptionsToSelect()}updateActiveLangFromDOM(){var e;const t=this.el.querySelector("option[selected]");this.activeLang=(null===(e=null==t?void 0:t.textContent)||void 0===e?void 0:e.trim())||""}moveOptionsToSelect(){const e=Array.from(this.el.querySelectorAll("option"));this.options=e,e.forEach((e=>{this.selectEl.appendChild(e)}))}handleChange(e){this.setActiveLangAndRedirect(e.target.selectedOptions[0])}setActiveLangAndRedirect(e){var t;this.activeLang=(null===(t=null==e?void 0:e.textContent)||void 0===t?void 0:t.trim())||"";const i=null==e?void 0:e.getAttribute("data-link");i&&(window.location.href=i)}render(){return i(n,{key:"df86f1355e734b1fe0a213f045b8c8939dee4ddb"},i("div",{key:"b2e2b8e2ca4612d60e8a71f2af3c3b7f670f3395",class:"spw-header-lang"},i("spw-button",{key:"a267a97cb47d3e41d30299c521278700158c254b",variant:"tertiary",surface:"light",icon:"fa-chevron-down",class:"spw-header-lang__active-lang",onKeyDown:this.handleButtonKeyDown,onClick:this.handleButtonClick},this.activeLang),i("select",{key:"b337fac1c3b2b9296c94de68321eab15a15d81a9","aria-label":this.accAriaLabel||"Lang",class:"spw-header-lang__select",onChange:e=>this.handleChange(e),ref:e=>this.selectEl=e,tabIndex:-1}),i("ul",{key:"edfb39af1dd5b4895b16a1479604e97383158d6d",class:"spw-header-lang__options"},this.options.map((e=>{var t;const n=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",a=e.getAttribute("value")||"";return i("li",{class:{"spw-header-lang__option":!0,"spw-header-lang__option--selected":n===this.activeLang},"data-value":a,onClick:()=>this.handleOptionClick(e)},n)})))))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-header-lang{position:relative}@media (max-width: 1023px){.spw-header-lang{margin-bottom:0}}@media (min-width: 1024px){.spw-header-lang{margin-left:16px}}@media (min-width: 1024px){.spw-header-lang:hover .spw-header-lang__dropdown{display:block}}.spw-header-lang__select{display:none}@media (min-width: 1024px){.spw-header-lang__select{display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}}.spw-header-lang__active-lang{display:none}@media (min-width: 1024px){.spw-header-lang__active-lang{display:block}}.spw-header-lang__options{display:flex;gap:24px;text-transform:uppercase}@media (min-width: 1024px){.spw-header-lang__options{display:none}}.spw-header-lang__option{padding:16px 0;font-weight:bold;text-decoration:underline}.spw-header-lang__option--selected{color:var(--spw-ds-primary);text-decoration:none}@media (min-width: 1024px){.spw-header-lang__option{padding:24px 0}}.spw-header-lang__dropdown{display:flex}@media (min-width: 1024px){.spw-header-lang__dropdown{display:none;z-index:99999;position:absolute;overflow:hidden;top:100%;width:max-content;right:0;background:white;border-radius:4px;box-shadow:var(--spw-effect-elevation-8)}}'}},[1,"spw-header-lang",{accAriaLabel:[1,"acc-aria-label"],activeLang:[32],options:[32]}]),p=r,l=function(){"undefined"!=typeof customElements&&["spw-header-lang","spw-button","spw-icon","spw-loading"].forEach((e=>{switch(e){case"spw-header-lang":customElements.get(a(e))||customElements.define(a(e),r);break;case"spw-button":customElements.get(a(e))||o();break;case"spw-icon":customElements.get(a(e))||s();break;case"spw-loading":customElements.get(a(e))||d()}}))};export{p as SpwHeaderLang,l as defineCustomElement}
1
+ import{p as e,H as t,h as i,a as n,t as a}from"./index.js";import{d as o}from"./p-CZVOV-PN.js";import{d as s}from"./p-Dzw3OiMu.js";import{d}from"./p-7EG4w8ub.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.activeLang="",this.options=[],this.handleButtonKeyDown=e=>{var t;" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),null===(t=this.selectEl)||void 0===t||t.click())},this.handleButtonClick=()=>{var e;null===(e=this.selectEl)||void 0===e||e.click()},this.handleOptionClick=e=>{this.setActiveLangAndRedirect(e)}}componentWillLoad(){this.updateActiveLangFromDOM()}componentDidLoad(){this.moveOptionsToSelect()}updateActiveLangFromDOM(){var e;const t=this.el.querySelector("option[selected]");this.activeLang=(null===(e=null==t?void 0:t.textContent)||void 0===e?void 0:e.trim())||""}moveOptionsToSelect(){const e=Array.from(this.el.querySelectorAll("option"));this.options=e,e.forEach((e=>{this.selectEl.appendChild(e)}))}handleChange(e){this.setActiveLangAndRedirect(e.target.selectedOptions[0])}setActiveLangAndRedirect(e){var t;this.activeLang=(null===(t=null==e?void 0:e.textContent)||void 0===t?void 0:t.trim())||"";const i=null==e?void 0:e.getAttribute("data-link");i&&(window.location.href=i)}render(){return i(n,{key:"c10f1b8323e6ab80ce091d38e1875d50382f6d44"},i("div",{key:"dfdc78a3560abcd7bcf1c61db8b9068f22c4e738",class:"spw-header-lang"},i("spw-button",{key:"9c08c2ac1ea02ab389b7a86b56f3baed02b3c1ba",variant:"tertiary",surface:"light",icon:"fa-chevron-down",class:"spw-header-lang__active-lang",onKeyDown:this.handleButtonKeyDown,onClick:this.handleButtonClick},this.activeLang),i("select",{key:"edadf76d65ab62a8c7973d055418de52e8b7dfd1","aria-label":this.accAriaLabel||"Lang",class:"spw-header-lang__select",onChange:e=>this.handleChange(e),ref:e=>this.selectEl=e,tabIndex:-1}),i("ul",{key:"4c25871fa4bded6e2a04d715c1c6ee32e486eaca",class:"spw-header-lang__options"},this.options.map((e=>{var t;const n=(null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",a=e.getAttribute("value")||"";return i("li",{class:{"spw-header-lang__option":!0,"spw-header-lang__option--selected":n===this.activeLang},"data-value":a,onClick:()=>this.handleOptionClick(e)},n)})))))}get el(){return this}static get style(){return'html{line-height:1.3;-webkit-text-size-adjust:100%;}h1,h2,h3,h4,h5,h6,p,ul,li{padding:0;margin:0}ul{list-style:none}:host{box-sizing:border-box;line-height:1.3;-webkit-text-size-adjust:100%;font-size:100%}:host *,:host *::before,:host *::after{box-sizing:inherit;font-family:"Nunito Sans"}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--spw-ds-container-xl:1232px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{width:100%;padding-left:16px;padding-right:16px;margin-left:auto;margin-right:auto}@media (min-width: 460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width: 768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width: 1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width: 1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host{display:block}.spw-header-lang{position:relative}@media (max-width: 1023px){.spw-header-lang{margin-bottom:0}}@media (min-width: 1024px){.spw-header-lang{margin-left:16px}}@media (min-width: 1024px){.spw-header-lang:hover .spw-header-lang__dropdown{display:block}}.spw-header-lang__select{display:none}@media (min-width: 1024px){.spw-header-lang__select{display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}}.spw-header-lang__active-lang{display:none}@media (min-width: 1024px){.spw-header-lang__active-lang{display:block}}.spw-header-lang__options{display:flex;gap:24px;text-transform:uppercase}@media (min-width: 1024px){.spw-header-lang__options{display:none}}.spw-header-lang__option{padding:16px 0;font-weight:bold;text-decoration:underline}.spw-header-lang__option--selected{color:var(--spw-ds-primary);text-decoration:none}@media (min-width: 1024px){.spw-header-lang__option{padding:24px 0}}.spw-header-lang__dropdown{display:flex}@media (min-width: 1024px){.spw-header-lang__dropdown{display:none;z-index:99999;position:absolute;overflow:hidden;top:100%;width:max-content;right:0;background:white;border-radius:4px;box-shadow:var(--spw-effect-elevation-8)}}'}},[1,"spw-header-lang",{accAriaLabel:[1,"acc-aria-label"],activeLang:[32],options:[32]}]),p=r,l=function(){"undefined"!=typeof customElements&&["spw-header-lang","spw-button","spw-icon","spw-loading"].forEach((e=>{switch(e){case"spw-header-lang":customElements.get(a(e))||customElements.define(a(e),r);break;case"spw-button":customElements.get(a(e))||o();break;case"spw-icon":customElements.get(a(e))||s();break;case"spw-loading":customElements.get(a(e))||d()}}))};export{p as SpwHeaderLang,l as defineCustomElement}