@spw-ds/spw-stencil-library 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (469) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/spw-accordion.spw-accordion-content.spw-accordion-item.spw-accordion-title.entry.cjs.js.map +1 -1
  3. package/dist/cjs/spw-accordion_4.cjs.entry.js +2 -2
  4. package/dist/cjs/spw-accordion_4.cjs.entry.js.map +1 -1
  5. package/dist/cjs/spw-button_2.cjs.entry.js +1 -1
  6. package/dist/cjs/spw-card-content.cjs.entry.js +1 -1
  7. package/dist/cjs/spw-card-content.cjs.entry.js.map +1 -1
  8. package/dist/cjs/spw-card-content.entry.cjs.js.map +1 -1
  9. package/dist/cjs/spw-card-excerpt.cjs.entry.js +1 -1
  10. package/dist/cjs/spw-card-excerpt.cjs.entry.js.map +1 -1
  11. package/dist/cjs/spw-card-excerpt.entry.cjs.js.map +1 -1
  12. package/dist/cjs/spw-card-image.cjs.entry.js +1 -1
  13. package/dist/cjs/spw-card-image.cjs.entry.js.map +1 -1
  14. package/dist/cjs/spw-card-image.entry.cjs.js.map +1 -1
  15. package/dist/cjs/spw-card-title.cjs.entry.js +1 -1
  16. package/dist/cjs/spw-card-title.cjs.entry.js.map +1 -1
  17. package/dist/cjs/spw-card-title.entry.cjs.js.map +1 -1
  18. package/dist/cjs/spw-card.cjs.entry.js +39 -9
  19. package/dist/cjs/spw-card.cjs.entry.js.map +1 -1
  20. package/dist/cjs/spw-card.entry.cjs.js.map +1 -1
  21. package/dist/cjs/spw-field-label_6.cjs.entry.js +3 -3
  22. package/dist/cjs/spw-header-lang-item.cjs.entry.js +1 -1
  23. package/dist/cjs/spw-header-lang.cjs.entry.js +1 -1
  24. package/dist/cjs/spw-header-navigation-dropdown.cjs.entry.js +1 -1
  25. package/dist/cjs/spw-header-navigation-item.cjs.entry.js +1 -1
  26. package/dist/cjs/spw-header-navigation.cjs.entry.js +1 -1
  27. package/dist/cjs/spw-header-persona-item.cjs.entry.js +1 -1
  28. package/dist/cjs/spw-header-persona.cjs.entry.js +3 -1
  29. package/dist/cjs/spw-header-persona.cjs.entry.js.map +1 -1
  30. package/dist/cjs/spw-header-persona.entry.cjs.js.map +1 -1
  31. package/dist/cjs/spw-header.cjs.entry.js +20 -2
  32. package/dist/cjs/spw-header.cjs.entry.js.map +1 -1
  33. package/dist/cjs/spw-header.entry.cjs.js.map +1 -1
  34. package/dist/cjs/spw-hero.cjs.entry.js +16 -2
  35. package/dist/cjs/spw-hero.cjs.entry.js.map +1 -1
  36. package/dist/cjs/spw-hero.entry.cjs.js.map +1 -1
  37. package/dist/cjs/spw-iodda.cjs.entry.js +1 -1
  38. package/dist/cjs/spw-list-description.cjs.entry.js +1 -1
  39. package/dist/cjs/spw-list-item.cjs.entry.js +6 -2
  40. package/dist/cjs/spw-list-item.cjs.entry.js.map +1 -1
  41. package/dist/cjs/spw-list-item.entry.cjs.js.map +1 -1
  42. package/dist/cjs/spw-list-title.cjs.entry.js +2 -2
  43. package/dist/cjs/spw-list-title.cjs.entry.js.map +1 -1
  44. package/dist/cjs/spw-list-title.entry.cjs.js.map +1 -1
  45. package/dist/cjs/spw-list.cjs.entry.js +20 -1
  46. package/dist/cjs/spw-list.cjs.entry.js.map +1 -1
  47. package/dist/cjs/spw-list.entry.cjs.js.map +1 -1
  48. package/dist/cjs/spw-modal.cjs.entry.js +9 -2
  49. package/dist/cjs/spw-modal.cjs.entry.js.map +1 -1
  50. package/dist/cjs/spw-modal.entry.cjs.js.map +1 -1
  51. package/dist/cjs/spw-mosaic-item.cjs.entry.js +1 -1
  52. package/dist/cjs/spw-mosaic.cjs.entry.js +1 -1
  53. package/dist/cjs/spw-pagination.cjs.entry.js +6 -6
  54. package/dist/cjs/spw-radio.cjs.entry.js +1 -1
  55. package/dist/cjs/spw-search-field.cjs.entry.js +2 -2
  56. package/dist/cjs/spw-sidebar-navigation-dropdown.cjs.entry.js +1 -1
  57. package/dist/cjs/spw-sidebar-navigation-item.cjs.entry.js +3 -3
  58. package/dist/cjs/spw-sidebar-navigation-separator.cjs.entry.js +1 -1
  59. package/dist/cjs/spw-sidebar.cjs.entry.js +1 -1
  60. package/dist/cjs/spw-skeleton.cjs.entry.js +1 -1
  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 +1 -1
  64. package/dist/cjs/spw-table-cell.cjs.entry.js +1 -1
  65. package/dist/cjs/spw-table-footer.cjs.entry.js +1 -1
  66. package/dist/cjs/spw-table-head.cjs.entry.js +1 -1
  67. package/dist/cjs/spw-table-header.cjs.entry.js +2 -2
  68. package/dist/cjs/spw-table-row.cjs.entry.js +1 -1
  69. package/dist/cjs/spw-tabs-navigation-item.cjs.entry.js +2 -2
  70. package/dist/cjs/spw-tabs-navigation-item.cjs.entry.js.map +1 -1
  71. package/dist/cjs/spw-tabs-navigation-item.entry.cjs.js.map +1 -1
  72. package/dist/cjs/spw-tabs-navigation.cjs.entry.js +1 -1
  73. package/dist/cjs/spw-tabs.cjs.entry.js +1 -1
  74. package/dist/cjs/spw-tag.cjs.entry.js +1 -1
  75. package/dist/cjs/spw-text-field.cjs.entry.js +1 -1
  76. package/dist/cjs/spw-textarea.cjs.entry.js +1 -1
  77. package/dist/cjs/spw-tile-description.cjs.entry.js +1 -1
  78. package/dist/cjs/spw-tile-title.cjs.entry.js +2 -2
  79. package/dist/cjs/spw-tile-title.cjs.entry.js.map +1 -1
  80. package/dist/cjs/spw-tile-title.entry.cjs.js.map +1 -1
  81. package/dist/cjs/spw-tile.cjs.entry.js +1 -1
  82. package/dist/cjs/spw-tooltip.cjs.entry.js +1 -1
  83. package/dist/cjs/spw-topbar.cjs.entry.js +1 -1
  84. package/dist/collection/components/spw-accordion/spw-accordion-item/spw-accordion-item.css +1 -1
  85. package/dist/collection/components/spw-accordion/spw-accordion-title/spw-accordion-title.css +1 -1
  86. package/dist/collection/components/spw-card/spw-card-content/spw-card-content.css +1 -1
  87. package/dist/collection/components/spw-card/spw-card-excerpt/spw-card-excerpt.css +1 -1
  88. package/dist/collection/components/spw-card/spw-card-image/spw-card-image.css +1 -1
  89. package/dist/collection/components/spw-card/spw-card-title/spw-card-title.css +1 -1
  90. package/dist/collection/components/spw-card/spw-card.css +1 -1
  91. package/dist/collection/components/spw-card/spw-card.js +38 -8
  92. package/dist/collection/components/spw-card/spw-card.js.map +1 -1
  93. package/dist/collection/components/spw-header/spw-header-lang/spw-header-lang.js +1 -1
  94. package/dist/collection/components/spw-header/spw-header-lang-item/spw-header-lang-item.js +1 -1
  95. package/dist/collection/components/spw-header/spw-header-navigation/spw-header-navigation.js +1 -1
  96. package/dist/collection/components/spw-header/spw-header-navigation-dropdown/spw-header-navigation-dropdown.js +1 -1
  97. package/dist/collection/components/spw-header/spw-header-navigation-item/spw-header-navigation-item.js +1 -1
  98. package/dist/collection/components/spw-header/spw-header-persona/spw-header-persona.js +27 -1
  99. package/dist/collection/components/spw-header/spw-header-persona/spw-header-persona.js.map +1 -1
  100. package/dist/collection/components/spw-header/spw-header-persona-item/spw-header-persona-item.js +1 -1
  101. package/dist/collection/components/spw-header/spw-header.css +1 -1
  102. package/dist/collection/components/spw-header/spw-header.js +199 -1
  103. package/dist/collection/components/spw-header/spw-header.js.map +1 -1
  104. package/dist/collection/components/spw-hero/spw-hero.css +1 -1
  105. package/dist/collection/components/spw-hero/spw-hero.js +54 -1
  106. package/dist/collection/components/spw-hero/spw-hero.js.map +1 -1
  107. package/dist/collection/components/spw-iodda/spw-iodda.js +1 -1
  108. package/dist/collection/components/spw-link/spw-link.js +1 -1
  109. package/dist/collection/components/spw-list/spw-list-description/spw-list-description.js +1 -1
  110. package/dist/collection/components/spw-list/spw-list-item/spw-list-item.css +1 -1
  111. package/dist/collection/components/spw-list/spw-list-item/spw-list-item.js +25 -1
  112. package/dist/collection/components/spw-list/spw-list-item/spw-list-item.js.map +1 -1
  113. package/dist/collection/components/spw-list/spw-list-title/spw-list-title.css +1 -1
  114. package/dist/collection/components/spw-list/spw-list-title/spw-list-title.js +1 -1
  115. package/dist/collection/components/spw-list/spw-list.js +49 -1
  116. package/dist/collection/components/spw-list/spw-list.js.map +1 -1
  117. package/dist/collection/components/spw-loading/spw-loading.js +1 -1
  118. package/dist/collection/components/spw-modal/spw-modal.css +1 -1
  119. package/dist/collection/components/spw-modal/spw-modal.js +8 -1
  120. package/dist/collection/components/spw-modal/spw-modal.js.map +1 -1
  121. package/dist/collection/components/spw-mosaic/spw-mosaic-item/spw-mosaic-item.js +1 -1
  122. package/dist/collection/components/spw-mosaic/spw-mosaic.js +1 -1
  123. package/dist/collection/components/spw-pagination/spw-pagination.js +6 -6
  124. package/dist/collection/components/spw-radio/spw-radio.js +1 -1
  125. package/dist/collection/components/spw-search-field/spw-search-field.js +2 -2
  126. package/dist/collection/components/spw-separator/spw-separator.js +1 -1
  127. package/dist/collection/components/spw-sidebar/spw-sidebar-navigation-dropdown/spw-sidebar-navigation-dropdown.js +1 -1
  128. package/dist/collection/components/spw-sidebar/spw-sidebar-navigation-item/spw-sidebar-navigation-item.js +3 -3
  129. package/dist/collection/components/spw-sidebar/spw-sidebar-navigation-separator/spw-sidebar-navigation-separator.js +1 -1
  130. package/dist/collection/components/spw-sidebar/spw-sidebar.js +1 -1
  131. package/dist/collection/components/spw-skeleton/spw-skeleton.js +1 -1
  132. package/dist/collection/components/spw-socials/spw-socials.js +1 -1
  133. package/dist/collection/components/spw-table/spw-table-body/spw-table-body.js +1 -1
  134. package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.js +1 -1
  135. package/dist/collection/components/spw-table/spw-table-footer/spw-table-footer.js +1 -1
  136. package/dist/collection/components/spw-table/spw-table-head/spw-table-head.js +1 -1
  137. package/dist/collection/components/spw-table/spw-table-header/spw-table-header.js +2 -2
  138. package/dist/collection/components/spw-table/spw-table-row/spw-table-row.js +1 -1
  139. package/dist/collection/components/spw-tabs/spw-tabs-navigation/spw-tabs-navigation.js +1 -1
  140. package/dist/collection/components/spw-tabs/spw-tabs-navigation-item/spw-tabs-navigation-item.css +1 -1
  141. package/dist/collection/components/spw-tabs/spw-tabs-navigation-item/spw-tabs-navigation-item.js +1 -1
  142. package/dist/collection/components/spw-tabs/spw-tabs.js +1 -1
  143. package/dist/collection/components/spw-tag/spw-tag.js +1 -1
  144. package/dist/collection/components/spw-text-field/spw-text-field.js +1 -1
  145. package/dist/collection/components/spw-textarea/spw-textarea.js +1 -1
  146. package/dist/collection/components/spw-theme-provider/spw-theme-provider.js +1 -1
  147. package/dist/collection/components/spw-tile/spw-tile-description/spw-tile-description.js +1 -1
  148. package/dist/collection/components/spw-tile/spw-tile-title/spw-tile-title.css +1 -1
  149. package/dist/collection/components/spw-tile/spw-tile-title/spw-tile-title.js +1 -1
  150. package/dist/collection/components/spw-tile/spw-tile.js +1 -1
  151. package/dist/collection/components/spw-tooltip/spw-tooltip.js +1 -1
  152. package/dist/collection/components/spw-topbar/spw-topbar.js +1 -1
  153. package/dist/components/{p-BvWTgY8c.js → p-B-sLKmnT.js} +3 -3
  154. package/dist/components/{p-BvWTgY8c.js.map → p-B-sLKmnT.js.map} +1 -1
  155. package/dist/components/{p-z27d6ASx.js → p-B3OQ2nRI.js} +3 -3
  156. package/dist/components/p-B3OQ2nRI.js.map +1 -0
  157. package/dist/components/{p-DPUqdUk8.js → p-BDRCqK1w.js} +3 -3
  158. package/dist/components/{p-DPUqdUk8.js.map → p-BDRCqK1w.js.map} +1 -1
  159. package/dist/components/{p-BQKQ0k0G.js → p-DIhULKFM.js} +3 -3
  160. package/dist/components/{p-BQKQ0k0G.js.map → p-DIhULKFM.js.map} +1 -1
  161. package/dist/components/{p-CMFyBNvH.js → p-DaosfSzT.js} +9 -9
  162. package/dist/components/{p-CMFyBNvH.js.map → p-DaosfSzT.js.map} +1 -1
  163. package/dist/components/{p-5qcE_Ljw.js → p-Dku0Cksp.js} +3 -3
  164. package/dist/components/{p-5qcE_Ljw.js.map → p-Dku0Cksp.js.map} +1 -1
  165. package/dist/components/{p-BsulPKjc.js → p-GUYao_6w.js} +3 -3
  166. package/dist/components/{p-BsulPKjc.js.map → p-GUYao_6w.js.map} +1 -1
  167. package/dist/components/{p-BbuJ0hsQ.js → p-c0hJPgjJ.js} +3 -3
  168. package/dist/components/p-c0hJPgjJ.js.map +1 -0
  169. package/dist/components/{p-8jCY8rtJ.js → p-fNRoK67L.js} +3 -3
  170. package/dist/components/{p-8jCY8rtJ.js.map → p-fNRoK67L.js.map} +1 -1
  171. package/dist/components/spw-accordion-item.js +1 -1
  172. package/dist/components/spw-accordion-title.js +1 -1
  173. package/dist/components/spw-breadcrumb-item.js +1 -1
  174. package/dist/components/spw-button.js +1 -1
  175. package/dist/components/spw-card-content.js +1 -1
  176. package/dist/components/spw-card-content.js.map +1 -1
  177. package/dist/components/spw-card-excerpt.js +1 -1
  178. package/dist/components/spw-card-excerpt.js.map +1 -1
  179. package/dist/components/spw-card-image.js +1 -1
  180. package/dist/components/spw-card-image.js.map +1 -1
  181. package/dist/components/spw-card-title.js +1 -1
  182. package/dist/components/spw-card-title.js.map +1 -1
  183. package/dist/components/spw-card.js +39 -9
  184. package/dist/components/spw-card.js.map +1 -1
  185. package/dist/components/spw-cookies.js +4 -4
  186. package/dist/components/spw-file-upload.js +2 -2
  187. package/dist/components/spw-header-lang-item.js +1 -1
  188. package/dist/components/spw-header-lang.js +3 -3
  189. package/dist/components/spw-header-navigation-dropdown.js +1 -1
  190. package/dist/components/spw-header-navigation-item.js +1 -1
  191. package/dist/components/spw-header-navigation.js +1 -1
  192. package/dist/components/spw-header-persona-item.js +1 -1
  193. package/dist/components/spw-header-persona.js +4 -1
  194. package/dist/components/spw-header-persona.js.map +1 -1
  195. package/dist/components/spw-header.js +31 -4
  196. package/dist/components/spw-header.js.map +1 -1
  197. package/dist/components/spw-hero.js +25 -3
  198. package/dist/components/spw-hero.js.map +1 -1
  199. package/dist/components/spw-iodda.js +4 -4
  200. package/dist/components/spw-link.js +1 -1
  201. package/dist/components/spw-list-description.js +1 -1
  202. package/dist/components/spw-list-item.js +8 -3
  203. package/dist/components/spw-list-item.js.map +1 -1
  204. package/dist/components/spw-list-title.js +2 -2
  205. package/dist/components/spw-list-title.js.map +1 -1
  206. package/dist/components/spw-list.js +23 -3
  207. package/dist/components/spw-list.js.map +1 -1
  208. package/dist/components/spw-loading.js +1 -1
  209. package/dist/components/spw-message.js +1 -1
  210. package/dist/components/spw-modal.js +9 -2
  211. package/dist/components/spw-modal.js.map +1 -1
  212. package/dist/components/spw-mosaic-item.js +1 -1
  213. package/dist/components/spw-mosaic.js +1 -1
  214. package/dist/components/spw-pagination.js +1 -1
  215. package/dist/components/spw-radio.js +1 -1
  216. package/dist/components/spw-search-field.js +3 -3
  217. package/dist/components/spw-separator.js +1 -1
  218. package/dist/components/spw-sidebar-navigation-dropdown.js +1 -1
  219. package/dist/components/spw-sidebar-navigation-item.js +4 -4
  220. package/dist/components/spw-sidebar-navigation-separator.js +2 -2
  221. package/dist/components/spw-sidebar.js +1 -1
  222. package/dist/components/spw-skeleton.js +1 -1
  223. package/dist/components/spw-socials.js +1 -1
  224. package/dist/components/spw-table-body.js +1 -1
  225. package/dist/components/spw-table-cell.js +1 -1
  226. package/dist/components/spw-table-footer.js +1 -1
  227. package/dist/components/spw-table-head.js +1 -1
  228. package/dist/components/spw-table-header.js +3 -3
  229. package/dist/components/spw-table-row.js +1 -1
  230. package/dist/components/spw-tabs-navigation-item.js +3 -3
  231. package/dist/components/spw-tabs-navigation-item.js.map +1 -1
  232. package/dist/components/spw-tabs-navigation.js +1 -1
  233. package/dist/components/spw-tabs.js +1 -1
  234. package/dist/components/spw-tag.js +1 -1
  235. package/dist/components/spw-text-field.js +1 -1
  236. package/dist/components/spw-textarea.js +1 -1
  237. package/dist/components/spw-theme-provider.js +1 -1
  238. package/dist/components/spw-tile-description.js +1 -1
  239. package/dist/components/spw-tile-title.js +2 -2
  240. package/dist/components/spw-tile-title.js.map +1 -1
  241. package/dist/components/spw-tile.js +1 -1
  242. package/dist/components/spw-tooltip.js +1 -1
  243. package/dist/components/spw-topbar.js +1 -1
  244. package/dist/components_json.json +367 -5
  245. package/dist/esm/loader.js +1 -1
  246. package/dist/esm/spw-accordion.spw-accordion-content.spw-accordion-item.spw-accordion-title.entry.js.map +1 -1
  247. package/dist/esm/spw-accordion_4.entry.js +2 -2
  248. package/dist/esm/spw-accordion_4.entry.js.map +1 -1
  249. package/dist/esm/spw-button_2.entry.js +1 -1
  250. package/dist/esm/spw-card-content.entry.js +1 -1
  251. package/dist/esm/spw-card-content.entry.js.map +1 -1
  252. package/dist/esm/spw-card-excerpt.entry.js +1 -1
  253. package/dist/esm/spw-card-excerpt.entry.js.map +1 -1
  254. package/dist/esm/spw-card-image.entry.js +1 -1
  255. package/dist/esm/spw-card-image.entry.js.map +1 -1
  256. package/dist/esm/spw-card-title.entry.js +1 -1
  257. package/dist/esm/spw-card-title.entry.js.map +1 -1
  258. package/dist/esm/spw-card.entry.js +39 -9
  259. package/dist/esm/spw-card.entry.js.map +1 -1
  260. package/dist/esm/spw-field-label_6.entry.js +3 -3
  261. package/dist/esm/spw-header-lang-item.entry.js +1 -1
  262. package/dist/esm/spw-header-lang.entry.js +1 -1
  263. package/dist/esm/spw-header-navigation-dropdown.entry.js +1 -1
  264. package/dist/esm/spw-header-navigation-item.entry.js +1 -1
  265. package/dist/esm/spw-header-navigation.entry.js +1 -1
  266. package/dist/esm/spw-header-persona-item.entry.js +1 -1
  267. package/dist/esm/spw-header-persona.entry.js +3 -1
  268. package/dist/esm/spw-header-persona.entry.js.map +1 -1
  269. package/dist/esm/spw-header.entry.js +20 -2
  270. package/dist/esm/spw-header.entry.js.map +1 -1
  271. package/dist/esm/spw-hero.entry.js +16 -2
  272. package/dist/esm/spw-hero.entry.js.map +1 -1
  273. package/dist/esm/spw-iodda.entry.js +1 -1
  274. package/dist/esm/spw-list-description.entry.js +1 -1
  275. package/dist/esm/spw-list-item.entry.js +6 -2
  276. package/dist/esm/spw-list-item.entry.js.map +1 -1
  277. package/dist/esm/spw-list-title.entry.js +2 -2
  278. package/dist/esm/spw-list-title.entry.js.map +1 -1
  279. package/dist/esm/spw-list.entry.js +21 -2
  280. package/dist/esm/spw-list.entry.js.map +1 -1
  281. package/dist/esm/spw-modal.entry.js +9 -2
  282. package/dist/esm/spw-modal.entry.js.map +1 -1
  283. package/dist/esm/spw-mosaic-item.entry.js +1 -1
  284. package/dist/esm/spw-mosaic.entry.js +1 -1
  285. package/dist/esm/spw-pagination.entry.js +6 -6
  286. package/dist/esm/spw-radio.entry.js +1 -1
  287. package/dist/esm/spw-search-field.entry.js +2 -2
  288. package/dist/esm/spw-sidebar-navigation-dropdown.entry.js +1 -1
  289. package/dist/esm/spw-sidebar-navigation-item.entry.js +3 -3
  290. package/dist/esm/spw-sidebar-navigation-separator.entry.js +1 -1
  291. package/dist/esm/spw-sidebar.entry.js +1 -1
  292. package/dist/esm/spw-skeleton.entry.js +1 -1
  293. package/dist/esm/spw-socials.entry.js +1 -1
  294. package/dist/esm/spw-stencil-library.js +1 -1
  295. package/dist/esm/spw-table-body.entry.js +1 -1
  296. package/dist/esm/spw-table-cell.entry.js +1 -1
  297. package/dist/esm/spw-table-footer.entry.js +1 -1
  298. package/dist/esm/spw-table-head.entry.js +1 -1
  299. package/dist/esm/spw-table-header.entry.js +2 -2
  300. package/dist/esm/spw-table-row.entry.js +1 -1
  301. package/dist/esm/spw-tabs-navigation-item.entry.js +2 -2
  302. package/dist/esm/spw-tabs-navigation-item.entry.js.map +1 -1
  303. package/dist/esm/spw-tabs-navigation.entry.js +1 -1
  304. package/dist/esm/spw-tabs.entry.js +1 -1
  305. package/dist/esm/spw-tag.entry.js +1 -1
  306. package/dist/esm/spw-text-field.entry.js +1 -1
  307. package/dist/esm/spw-textarea.entry.js +1 -1
  308. package/dist/esm/spw-tile-description.entry.js +1 -1
  309. package/dist/esm/spw-tile-title.entry.js +2 -2
  310. package/dist/esm/spw-tile-title.entry.js.map +1 -1
  311. package/dist/esm/spw-tile.entry.js +1 -1
  312. package/dist/esm/spw-tooltip.entry.js +1 -1
  313. package/dist/esm/spw-topbar.entry.js +1 -1
  314. package/dist/spw-stencil-library/p-02151d7e.entry.js +2 -0
  315. package/dist/spw-stencil-library/p-02151d7e.entry.js.map +1 -0
  316. package/dist/spw-stencil-library/{p-e1a459eb.entry.js → p-0226ad72.entry.js} +2 -2
  317. package/dist/spw-stencil-library/{p-328fb48c.entry.js → p-04274072.entry.js} +2 -2
  318. package/dist/spw-stencil-library/{p-2c8e65e5.entry.js → p-09a2d080.entry.js} +2 -2
  319. package/dist/spw-stencil-library/{p-5426464a.entry.js → p-09d27c4b.entry.js} +2 -2
  320. package/dist/spw-stencil-library/{p-b726755c.entry.js → p-11805364.entry.js} +2 -2
  321. package/dist/spw-stencil-library/{p-96fac544.entry.js → p-181ae002.entry.js} +2 -2
  322. package/dist/spw-stencil-library/p-181ae002.entry.js.map +1 -0
  323. package/dist/spw-stencil-library/{p-274ce2d2.entry.js → p-19a69f36.entry.js} +2 -2
  324. package/dist/spw-stencil-library/p-1d93e0d8.entry.js +2 -0
  325. package/dist/spw-stencil-library/p-1d93e0d8.entry.js.map +1 -0
  326. package/dist/spw-stencil-library/p-1d9ef3d5.entry.js +2 -0
  327. package/dist/spw-stencil-library/p-1d9ef3d5.entry.js.map +1 -0
  328. package/dist/spw-stencil-library/{p-991d5382.entry.js → p-1f382434.entry.js} +2 -2
  329. package/dist/spw-stencil-library/{p-49be45a2.entry.js → p-272dc0ee.entry.js} +2 -2
  330. package/dist/spw-stencil-library/{p-44124a37.entry.js → p-2fd3eb76.entry.js} +2 -2
  331. package/dist/spw-stencil-library/{p-c1a30fb7.entry.js → p-3450855b.entry.js} +2 -2
  332. package/dist/spw-stencil-library/p-3450855b.entry.js.map +1 -0
  333. package/dist/spw-stencil-library/{p-4526bef6.entry.js → p-376b1e84.entry.js} +2 -2
  334. package/dist/spw-stencil-library/{p-228a413d.entry.js → p-403fe46c.entry.js} +2 -2
  335. package/dist/spw-stencil-library/p-403fe46c.entry.js.map +1 -0
  336. package/dist/spw-stencil-library/{p-573393ab.entry.js → p-42658e0a.entry.js} +2 -2
  337. package/dist/spw-stencil-library/{p-aa364a44.entry.js → p-44d87d3f.entry.js} +2 -2
  338. package/dist/spw-stencil-library/{p-be3b1d65.entry.js → p-4d61f200.entry.js} +2 -2
  339. package/dist/spw-stencil-library/p-532314d2.entry.js +2 -0
  340. package/dist/spw-stencil-library/p-532314d2.entry.js.map +1 -0
  341. package/dist/spw-stencil-library/{p-f2008faa.entry.js → p-554af1e3.entry.js} +2 -2
  342. package/dist/spw-stencil-library/{p-4e7df891.entry.js → p-5a034423.entry.js} +2 -2
  343. package/dist/spw-stencil-library/{p-57851ceb.entry.js → p-5f82570e.entry.js} +2 -2
  344. package/dist/spw-stencil-library/{p-b64a003c.entry.js → p-64670b2e.entry.js} +2 -2
  345. package/dist/spw-stencil-library/{p-35ef6489.entry.js → p-74b4aea0.entry.js} +2 -2
  346. package/dist/spw-stencil-library/p-74b4aea0.entry.js.map +1 -0
  347. package/dist/spw-stencil-library/{p-a2b3dd47.entry.js → p-7cd55113.entry.js} +2 -2
  348. package/dist/spw-stencil-library/{p-ca672774.entry.js → p-7d80a44e.entry.js} +2 -2
  349. package/dist/spw-stencil-library/p-817e139e.entry.js +2 -0
  350. package/dist/spw-stencil-library/p-817e139e.entry.js.map +1 -0
  351. package/dist/spw-stencil-library/{p-8d94697c.entry.js → p-8c6c9db5.entry.js} +2 -2
  352. package/dist/spw-stencil-library/p-8dca994a.entry.js +2 -0
  353. package/dist/spw-stencil-library/p-8dca994a.entry.js.map +1 -0
  354. package/dist/spw-stencil-library/{p-74d118ec.entry.js → p-8ef8864e.entry.js} +2 -2
  355. package/dist/spw-stencil-library/{p-ad5f01e4.entry.js → p-9219fe7c.entry.js} +2 -2
  356. package/dist/spw-stencil-library/{p-1e725439.entry.js → p-9356f8c9.entry.js} +2 -2
  357. package/dist/spw-stencil-library/p-9356f8c9.entry.js.map +1 -0
  358. package/dist/spw-stencil-library/{p-d8078491.entry.js → p-a30563ff.entry.js} +2 -2
  359. package/dist/spw-stencil-library/{p-a27ed650.entry.js → p-a8311acd.entry.js} +2 -2
  360. package/dist/spw-stencil-library/{p-3cfcf070.entry.js → p-a93f21f9.entry.js} +2 -2
  361. package/dist/spw-stencil-library/{p-4fa98537.entry.js → p-a950bce8.entry.js} +2 -2
  362. package/dist/spw-stencil-library/{p-0e310e7a.entry.js → p-ba27b9b0.entry.js} +2 -2
  363. package/dist/spw-stencil-library/{p-e5c9fb8e.entry.js → p-bf2d0cf4.entry.js} +2 -2
  364. package/dist/spw-stencil-library/{p-af49292e.entry.js → p-c2de4206.entry.js} +2 -2
  365. package/dist/spw-stencil-library/{p-5cb1344b.entry.js → p-c54fee67.entry.js} +2 -2
  366. package/dist/spw-stencil-library/{p-68f9c5bf.entry.js → p-cb269271.entry.js} +2 -2
  367. package/dist/spw-stencil-library/p-cb269271.entry.js.map +1 -0
  368. package/dist/spw-stencil-library/{p-c7fecad8.entry.js → p-db2354cf.entry.js} +2 -2
  369. package/dist/spw-stencil-library/{p-3240c1a4.entry.js → p-dd4bf12d.entry.js} +2 -2
  370. package/dist/spw-stencil-library/p-e00468aa.entry.js +2 -0
  371. package/dist/spw-stencil-library/p-e00468aa.entry.js.map +1 -0
  372. package/dist/spw-stencil-library/{p-10269c11.entry.js → p-e2f03a02.entry.js} +2 -2
  373. package/dist/spw-stencil-library/p-e2f03a02.entry.js.map +1 -0
  374. package/dist/spw-stencil-library/{p-e1c4d94e.entry.js → p-e72c6410.entry.js} +2 -2
  375. package/dist/spw-stencil-library/{p-1e07197c.entry.js → p-f5de314e.entry.js} +2 -2
  376. package/dist/spw-stencil-library/{p-07cadb86.entry.js → p-fabf41a2.entry.js} +2 -2
  377. package/dist/spw-stencil-library/{p-a093ab2f.entry.js → p-fbe468de.entry.js} +2 -2
  378. package/dist/spw-stencil-library/p-fda153e0.entry.js +2 -0
  379. package/dist/spw-stencil-library/p-fda153e0.entry.js.map +1 -0
  380. package/dist/spw-stencil-library/spw-accordion.spw-accordion-content.spw-accordion-item.spw-accordion-title.entry.esm.js.map +1 -1
  381. package/dist/spw-stencil-library/spw-card-content.entry.esm.js.map +1 -1
  382. package/dist/spw-stencil-library/spw-card-excerpt.entry.esm.js.map +1 -1
  383. package/dist/spw-stencil-library/spw-card-image.entry.esm.js.map +1 -1
  384. package/dist/spw-stencil-library/spw-card-title.entry.esm.js.map +1 -1
  385. package/dist/spw-stencil-library/spw-card.entry.esm.js.map +1 -1
  386. package/dist/spw-stencil-library/spw-header-persona.entry.esm.js.map +1 -1
  387. package/dist/spw-stencil-library/spw-header.entry.esm.js.map +1 -1
  388. package/dist/spw-stencil-library/spw-hero.entry.esm.js.map +1 -1
  389. package/dist/spw-stencil-library/spw-list-item.entry.esm.js.map +1 -1
  390. package/dist/spw-stencil-library/spw-list-title.entry.esm.js.map +1 -1
  391. package/dist/spw-stencil-library/spw-list.entry.esm.js.map +1 -1
  392. package/dist/spw-stencil-library/spw-modal.entry.esm.js.map +1 -1
  393. package/dist/spw-stencil-library/spw-stencil-library.css +1 -1
  394. package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
  395. package/dist/spw-stencil-library/spw-tabs-navigation-item.entry.esm.js.map +1 -1
  396. package/dist/spw-stencil-library/spw-tile-title.entry.esm.js.map +1 -1
  397. package/dist/stats.json +1063 -410
  398. package/dist/types/components/spw-card/spw-card.d.ts +5 -0
  399. package/dist/types/components/spw-header/spw-header-persona/spw-header-persona.d.ts +2 -0
  400. package/dist/types/components/spw-header/spw-header.d.ts +18 -0
  401. package/dist/types/components/spw-hero/spw-hero.d.ts +6 -0
  402. package/dist/types/components/spw-list/spw-list-item/spw-list-item.d.ts +2 -0
  403. package/dist/types/components/spw-list/spw-list.d.ts +6 -0
  404. package/dist/types/components/spw-modal/spw-modal.d.ts +1 -0
  405. package/dist/types/components.d.ts +112 -0
  406. package/hydrate/index.js +189 -81
  407. package/hydrate/index.mjs +189 -81
  408. package/package.json +1 -1
  409. package/dist/components/p-BbuJ0hsQ.js.map +0 -1
  410. package/dist/components/p-z27d6ASx.js.map +0 -1
  411. package/dist/spw-stencil-library/p-10269c11.entry.js.map +0 -1
  412. package/dist/spw-stencil-library/p-1e725439.entry.js.map +0 -1
  413. package/dist/spw-stencil-library/p-228a413d.entry.js.map +0 -1
  414. package/dist/spw-stencil-library/p-35ef6489.entry.js.map +0 -1
  415. package/dist/spw-stencil-library/p-57d83f8b.entry.js +0 -2
  416. package/dist/spw-stencil-library/p-57d83f8b.entry.js.map +0 -1
  417. package/dist/spw-stencil-library/p-68f9c5bf.entry.js.map +0 -1
  418. package/dist/spw-stencil-library/p-6b291009.entry.js +0 -2
  419. package/dist/spw-stencil-library/p-6b291009.entry.js.map +0 -1
  420. package/dist/spw-stencil-library/p-6d08bcc3.entry.js +0 -2
  421. package/dist/spw-stencil-library/p-6d08bcc3.entry.js.map +0 -1
  422. package/dist/spw-stencil-library/p-6ee69164.entry.js +0 -2
  423. package/dist/spw-stencil-library/p-6ee69164.entry.js.map +0 -1
  424. package/dist/spw-stencil-library/p-96fac544.entry.js.map +0 -1
  425. package/dist/spw-stencil-library/p-aaffdc4f.entry.js +0 -2
  426. package/dist/spw-stencil-library/p-aaffdc4f.entry.js.map +0 -1
  427. package/dist/spw-stencil-library/p-bf14b880.entry.js +0 -2
  428. package/dist/spw-stencil-library/p-bf14b880.entry.js.map +0 -1
  429. package/dist/spw-stencil-library/p-bf43d61c.entry.js +0 -2
  430. package/dist/spw-stencil-library/p-bf43d61c.entry.js.map +0 -1
  431. package/dist/spw-stencil-library/p-c1a30fb7.entry.js.map +0 -1
  432. package/dist/spw-stencil-library/p-f1d04cc1.entry.js +0 -2
  433. package/dist/spw-stencil-library/p-f1d04cc1.entry.js.map +0 -1
  434. /package/dist/spw-stencil-library/{p-e1a459eb.entry.js.map → p-0226ad72.entry.js.map} +0 -0
  435. /package/dist/spw-stencil-library/{p-328fb48c.entry.js.map → p-04274072.entry.js.map} +0 -0
  436. /package/dist/spw-stencil-library/{p-2c8e65e5.entry.js.map → p-09a2d080.entry.js.map} +0 -0
  437. /package/dist/spw-stencil-library/{p-5426464a.entry.js.map → p-09d27c4b.entry.js.map} +0 -0
  438. /package/dist/spw-stencil-library/{p-b726755c.entry.js.map → p-11805364.entry.js.map} +0 -0
  439. /package/dist/spw-stencil-library/{p-274ce2d2.entry.js.map → p-19a69f36.entry.js.map} +0 -0
  440. /package/dist/spw-stencil-library/{p-991d5382.entry.js.map → p-1f382434.entry.js.map} +0 -0
  441. /package/dist/spw-stencil-library/{p-49be45a2.entry.js.map → p-272dc0ee.entry.js.map} +0 -0
  442. /package/dist/spw-stencil-library/{p-44124a37.entry.js.map → p-2fd3eb76.entry.js.map} +0 -0
  443. /package/dist/spw-stencil-library/{p-4526bef6.entry.js.map → p-376b1e84.entry.js.map} +0 -0
  444. /package/dist/spw-stencil-library/{p-573393ab.entry.js.map → p-42658e0a.entry.js.map} +0 -0
  445. /package/dist/spw-stencil-library/{p-aa364a44.entry.js.map → p-44d87d3f.entry.js.map} +0 -0
  446. /package/dist/spw-stencil-library/{p-be3b1d65.entry.js.map → p-4d61f200.entry.js.map} +0 -0
  447. /package/dist/spw-stencil-library/{p-f2008faa.entry.js.map → p-554af1e3.entry.js.map} +0 -0
  448. /package/dist/spw-stencil-library/{p-4e7df891.entry.js.map → p-5a034423.entry.js.map} +0 -0
  449. /package/dist/spw-stencil-library/{p-57851ceb.entry.js.map → p-5f82570e.entry.js.map} +0 -0
  450. /package/dist/spw-stencil-library/{p-b64a003c.entry.js.map → p-64670b2e.entry.js.map} +0 -0
  451. /package/dist/spw-stencil-library/{p-a2b3dd47.entry.js.map → p-7cd55113.entry.js.map} +0 -0
  452. /package/dist/spw-stencil-library/{p-ca672774.entry.js.map → p-7d80a44e.entry.js.map} +0 -0
  453. /package/dist/spw-stencil-library/{p-8d94697c.entry.js.map → p-8c6c9db5.entry.js.map} +0 -0
  454. /package/dist/spw-stencil-library/{p-74d118ec.entry.js.map → p-8ef8864e.entry.js.map} +0 -0
  455. /package/dist/spw-stencil-library/{p-ad5f01e4.entry.js.map → p-9219fe7c.entry.js.map} +0 -0
  456. /package/dist/spw-stencil-library/{p-d8078491.entry.js.map → p-a30563ff.entry.js.map} +0 -0
  457. /package/dist/spw-stencil-library/{p-a27ed650.entry.js.map → p-a8311acd.entry.js.map} +0 -0
  458. /package/dist/spw-stencil-library/{p-3cfcf070.entry.js.map → p-a93f21f9.entry.js.map} +0 -0
  459. /package/dist/spw-stencil-library/{p-4fa98537.entry.js.map → p-a950bce8.entry.js.map} +0 -0
  460. /package/dist/spw-stencil-library/{p-0e310e7a.entry.js.map → p-ba27b9b0.entry.js.map} +0 -0
  461. /package/dist/spw-stencil-library/{p-e5c9fb8e.entry.js.map → p-bf2d0cf4.entry.js.map} +0 -0
  462. /package/dist/spw-stencil-library/{p-af49292e.entry.js.map → p-c2de4206.entry.js.map} +0 -0
  463. /package/dist/spw-stencil-library/{p-5cb1344b.entry.js.map → p-c54fee67.entry.js.map} +0 -0
  464. /package/dist/spw-stencil-library/{p-c7fecad8.entry.js.map → p-db2354cf.entry.js.map} +0 -0
  465. /package/dist/spw-stencil-library/{p-3240c1a4.entry.js.map → p-dd4bf12d.entry.js.map} +0 -0
  466. /package/dist/spw-stencil-library/{p-e1c4d94e.entry.js.map → p-e72c6410.entry.js.map} +0 -0
  467. /package/dist/spw-stencil-library/{p-1e07197c.entry.js.map → p-f5de314e.entry.js.map} +0 -0
  468. /package/dist/spw-stencil-library/{p-07cadb86.entry.js.map → p-fabf41a2.entry.js.map} +0 -0
  469. /package/dist/spw-stencil-library/{p-a093ab2f.entry.js.map → p-fbe468de.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"spw-list-item.entry.cjs.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,krGAAkrG;;MCO5rG,WAAW,GAA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AAA,EAChBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACL,CACP,CACA;;;;;;;;","names":["h","Host"],"sources":["src/components/spw-list/spw-list-item/spw-list-item.scss?tag=spw-list-item&encapsulation=shadow","src/components/spw-list/spw-list-item/spw-list-item.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.spw-list-item {\n position: relative;\n color: var(--spw-color-themes-grey-grey-900);\n transition: all 0.3s ease-in-out;\n text-decoration: none;\n &--hoverable:hover {\n transform: translateX(5px);\n }\n a {\n text-decoration: none;\n }\n &--icon {\n padding-left: 28px;\n }\n &__category {\n display: inline-block;\n position: relative;\n margin-bottom: 6px;\n color: var(--spw-ds-primary);\n font-weight: 700;\n font-size: 16px;\n line-height: 1.5;\n spw-icon {\n position: absolute;\n top: 2px;\n left: -28px;\n }\n &--hoverable {\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n }\n }\n}\n","import { Component, Host, Element, Listen, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-item',\n styleUrl: 'spw-list-item.scss',\n shadow: true,\n})\nexport class SpwListItem {\n @Element() el: HTMLSpwListItemElement;\n\n /** Type de variante d'élément de liste */\n @Prop() variant?: 'shortcut' | 'default' = 'default';\n /** Spécifie le lien si nécessaire */\n @Prop() href?: string;\n /** Attribut target, s'applique uniquement si href est rempli */\n @Prop() target: string = '_self';\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string = 'fa-arrow-right';\n /** Permet de limiter le nombre de lignes du titre et de la description */\n @Prop() lineClamp: string | 'none' = '3';\n /** Permet de spécifier une catégorie pour l'élément de liste */\n @Prop() category?: string;\n /** Permet de spécifier un lien pour la catégorie */\n @Prop() categoryLink?: string;\n /** Permet de spécifier une icône pour la catégorie */\n @Prop() categoryIcon?: string = 'fa-file-signature';\n\n componentWillLoad() {\n this.applyVariantToChildren();\n }\n\n @Listen('slotchange')\n slotChanged() {\n this.applyVariantToChildren();\n }\n\n private applyVariantToChildren() {\n requestAnimationFrame(() => {\n const variantClass = `--${this.variant}`;\n const iconClass = `--icon`;\n const titleElement = this.el.querySelector('spw-list-title');\n const descriptionElement = this.el.querySelector('spw-list-description');\n\n titleElement && titleElement.classList.add(variantClass);\n titleElement && this.icon && titleElement.setAttribute('icon', this.icon);\n titleElement && titleElement.setAttribute('line-clamp', this.lineClamp);\n descriptionElement && descriptionElement.classList.add(variantClass);\n descriptionElement && this.icon && descriptionElement.classList.add(iconClass);\n descriptionElement && descriptionElement.setAttribute('line-clamp', this.lineClamp);\n });\n }\n\n @Listen('mouseenter')\n onMouseEnter() {\n this.setHovered(true);\n }\n\n @Listen('mouseleave')\n onMouseLeave() {\n this.setHovered(false);\n this.setActive(false);\n }\n\n @Listen('touchstart', { passive: true })\n onTouchStart() {\n this.setActive(true);\n }\n\n @Listen('touchend')\n onTouchEnd() {\n this.setActive(false);\n }\n\n @Listen('mousedown')\n onMouseDown() {\n this.setActive(true);\n }\n\n @Listen('mouseup')\n onMouseUp() {\n this.setActive(false);\n }\n\n @Listen('blur')\n onBlur() {\n this.setActive(false);\n }\n\n @Listen('focus')\n onFocus() {\n this.setActive(true);\n }\n\n private setHovered(isHovered: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--hovered', isHovered);\n }\n }\n\n private setActive(isActive: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--active', isActive);\n }\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item': true,\n 'spw-list-item--hoverable': !!this.href,\n 'spw-list-item--icon': !!this.icon || !!this.categoryIcon,\n [`spw-list-item--${this.variant}`]: true,\n };\n }\n\n private get elementCatClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item__category': true,\n 'spw-list-item__category--icon': !!this.categoryIcon,\n 'spw-list-item__category--hoverable': !!this.categoryLink,\n };\n }\n\n handleClick() {\n if (this.categoryLink) {\n window.location.href = this.categoryLink;\n }\n }\n\n render() {\n const { href, target } = this;\n const TagType = this.href === undefined ? 'div' : 'a';\n const attrs =\n TagType === 'div'\n ? {}\n : {\n href,\n target,\n };\n return (\n <Host>\n <li class={this.elementClass}>\n {this.category && (\n <span class={this.elementCatClass} onClick={() => this.handleClick()}>\n {this.categoryIcon && <spw-icon icon={this.categoryIcon}></spw-icon>} {this.category}\n </span>\n )}\n <TagType {...attrs}>\n <slot></slot>\n </TagType>\n </li>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"spw-list-item.entry.cjs.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,0uGAA0uG;;MCOpvG,WAAW,GAAA,MAAA;AALxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AASU,QAAA,IAAO,CAAA,OAAA,GAA4B,SAAS;;AAI5C,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO;;AAExB,QAAA,IAAI,CAAA,IAAA,GAAY,gBAAgB;;AAEhC,QAAA,IAAS,CAAA,SAAA,GAAoB,GAAG;;AAMhC,QAAA,IAAY,CAAA,YAAA,GAAY,mBAAmB;;AAE3C,QAAA,IAAO,CAAA,OAAA,GAAsB,OAAO;AAoI7C;IAlIC,iBAAiB,GAAA;QACf,IAAI,CAAC,sBAAsB,EAAE;;IAI/B,WAAW,GAAA;QACT,IAAI,CAAC,sBAAsB,EAAE;;IAGvB,sBAAsB,GAAA;QAC5B,qBAAqB,CAAC,MAAK;AACzB,YAAA,MAAM,YAAY,GAAG,CAAA,EAAA,EAAK,IAAI,CAAC,OAAO,EAAE;AACxC,YAAA,MAAM,YAAY,GAAG,CAAA,EAAA,EAAK,IAAI,CAAC,OAAO,EAAE;YACxC,MAAM,SAAS,GAAG,CAAA,MAAA,CAAQ;YAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC;YAC5D,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa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,MAAM,KAAK,GACT,OAAO,KAAK;AACV,cAAE;AACF,cAAE;gBACE,IAAI;gBACJ,MAAM;aACP;QACP,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EACzB,IAAI,CAAC,QAAQ,KACZA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EAAA,EACjE,IAAI,CAAC,YAAY,IAAIA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,YAAY,EAAa,CAAA,OAAG,IAAI,CAAC,QAAQ,CAC/E,CACR,EACDA,OAAC,CAAA,OAAO,qEAAK,KAAK,CAAA,EAChBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACL,CACP,CACA;;;;;;;;","names":["h","Host"],"sources":["src/components/spw-list/spw-list-item/spw-list-item.scss?tag=spw-list-item&encapsulation=shadow","src/components/spw-list/spw-list-item/spw-list-item.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.spw-list-item {\n position: relative;\n color: var(--spw-color-themes-grey-grey-900);\n transition: all 0.3s ease-in-out;\n text-decoration: none;\n :host(.--dark) & {\n color: var(--spw-ds-white);\n }\n &--hoverable:hover {\n transform: translateX(5px);\n }\n a {\n text-decoration: none;\n }\n &--icon {\n padding-left: 28px;\n }\n &__category {\n display: inline-block;\n position: relative;\n margin-bottom: 6px;\n color: var(--spw-ds-primary);\n font-weight: 700;\n font-size: 16px;\n line-height: 1.5;\n spw-icon {\n position: absolute;\n top: 2px;\n left: -28px;\n }\n &--hoverable {\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n }\n }\n}\n","import { Component, Host, Element, Listen, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-item',\n styleUrl: 'spw-list-item.scss',\n shadow: true,\n})\nexport class SpwListItem {\n @Element() el: HTMLSpwListItemElement;\n\n /** Type de variante d'élément de liste */\n @Prop() variant?: 'shortcut' | 'default' = 'default';\n /** Spécifie le lien si nécessaire */\n @Prop() href?: string;\n /** Attribut target, s'applique uniquement si href est rempli */\n @Prop() target: string = '_self';\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string = 'fa-arrow-right';\n /** Permet de limiter le nombre de lignes du titre et de la description */\n @Prop() lineClamp: string | 'none' = '3';\n /** Permet de spécifier une catégorie pour l'élément de liste */\n @Prop() category?: string;\n /** Permet de spécifier un lien pour la catégorie */\n @Prop() categoryLink?: string;\n /** Permet de spécifier une icône pour la catégorie */\n @Prop() categoryIcon?: string = 'fa-file-signature';\n /** Permet de choisir la surface d'arrière-plan de la liste */\n @Prop() surface?: 'light' | 'dark' = 'light';\n\n componentWillLoad() {\n this.applyVariantToChildren();\n }\n\n @Listen('slotchange')\n slotChanged() {\n this.applyVariantToChildren();\n }\n\n private applyVariantToChildren() {\n requestAnimationFrame(() => {\n const variantClass = `--${this.variant}`;\n const surfaceClass = `--${this.surface}`;\n const iconClass = `--icon`;\n const titleElement = this.el.querySelector('spw-list-title');\n const descriptionElement = this.el.querySelector('spw-list-description');\n\n titleElement && titleElement.classList.add(variantClass);\n titleElement && titleElement.classList.add(surfaceClass);\n titleElement && this.icon && titleElement.setAttribute('icon', this.icon);\n titleElement && titleElement.setAttribute('line-clamp', this.lineClamp);\n descriptionElement && descriptionElement.classList.add(variantClass);\n descriptionElement && this.icon && descriptionElement.classList.add(iconClass);\n descriptionElement && descriptionElement.setAttribute('line-clamp', this.lineClamp);\n });\n }\n\n @Listen('mouseenter')\n onMouseEnter() {\n this.setHovered(true);\n }\n\n @Listen('mouseleave')\n onMouseLeave() {\n this.setHovered(false);\n this.setActive(false);\n }\n\n @Listen('touchstart', { passive: true })\n onTouchStart() {\n this.setActive(true);\n }\n\n @Listen('touchend')\n onTouchEnd() {\n this.setActive(false);\n }\n\n @Listen('mousedown')\n onMouseDown() {\n this.setActive(true);\n }\n\n @Listen('mouseup')\n onMouseUp() {\n this.setActive(false);\n }\n\n @Listen('blur')\n onBlur() {\n this.setActive(false);\n }\n\n @Listen('focus')\n onFocus() {\n this.setActive(true);\n }\n\n private setHovered(isHovered: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--hovered', isHovered);\n }\n }\n\n private setActive(isActive: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--active', isActive);\n }\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item': true,\n 'spw-list-item--hoverable': !!this.href,\n 'spw-list-item--icon': !!this.icon || !!this.categoryIcon,\n [`spw-list-item--${this.variant}`]: true,\n };\n }\n\n private get elementCatClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item__category': true,\n 'spw-list-item__category--icon': !!this.categoryIcon,\n 'spw-list-item__category--hoverable': !!this.categoryLink,\n };\n }\n\n handleClick() {\n if (this.categoryLink) {\n window.location.href = this.categoryLink;\n }\n }\n\n render() {\n const { href, target } = this;\n const TagType = this.href === undefined ? 'div' : 'a';\n const attrs =\n TagType === 'div'\n ? {}\n : {\n href,\n target,\n };\n return (\n <Host>\n <li class={this.elementClass}>\n {this.category && (\n <span class={this.elementCatClass} onClick={() => this.handleClick()}>\n {this.categoryIcon && <spw-icon icon={this.categoryIcon}></spw-icon>} {this.category}\n </span>\n )}\n <TagType {...attrs}>\n <slot></slot>\n </TagType>\n </li>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"spw-list-item.entry.cjs.js","sources":["src/components/spw-list/spw-list-item/spw-list-item.scss?tag=spw-list-item&encapsulation=shadow","src/components/spw-list/spw-list-item/spw-list-item.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.spw-list-item {\n position: relative;\n color: var(--spw-color-themes-grey-grey-900);\n transition: all 0.3s ease-in-out;\n text-decoration: none;\n &--hoverable:hover {\n transform: translateX(5px);\n }\n a {\n text-decoration: none;\n }\n &--icon {\n padding-left: 28px;\n }\n &__category {\n display: inline-block;\n position: relative;\n margin-bottom: 6px;\n color: var(--spw-ds-primary);\n font-weight: 700;\n font-size: 16px;\n line-height: 1.5;\n spw-icon {\n position: absolute;\n top: 2px;\n left: -28px;\n }\n &--hoverable {\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n }\n }\n}\n","import { Component, Host, Element, Listen, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-item',\n styleUrl: 'spw-list-item.scss',\n shadow: true,\n})\nexport class SpwListItem {\n @Element() el: HTMLSpwListItemElement;\n\n /** Type de variante d'élément de liste */\n @Prop() variant?: 'shortcut' | 'default' = 'default';\n /** Spécifie le lien si nécessaire */\n @Prop() href?: string;\n /** Attribut target, s'applique uniquement si href est rempli */\n @Prop() target: string = '_self';\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string = 'fa-arrow-right';\n /** Permet de limiter le nombre de lignes du titre et de la description */\n @Prop() lineClamp: string | 'none' = '3';\n /** Permet de spécifier une catégorie pour l'élément de liste */\n @Prop() category?: string;\n /** Permet de spécifier un lien pour la catégorie */\n @Prop() categoryLink?: string;\n /** Permet de spécifier une icône pour la catégorie */\n @Prop() categoryIcon?: string = 'fa-file-signature';\n\n componentWillLoad() {\n this.applyVariantToChildren();\n }\n\n @Listen('slotchange')\n slotChanged() {\n this.applyVariantToChildren();\n }\n\n private applyVariantToChildren() {\n requestAnimationFrame(() => {\n const variantClass = `--${this.variant}`;\n const iconClass = `--icon`;\n const titleElement = this.el.querySelector('spw-list-title');\n const descriptionElement = this.el.querySelector('spw-list-description');\n\n titleElement && titleElement.classList.add(variantClass);\n titleElement && this.icon && titleElement.setAttribute('icon', this.icon);\n titleElement && titleElement.setAttribute('line-clamp', this.lineClamp);\n descriptionElement && descriptionElement.classList.add(variantClass);\n descriptionElement && this.icon && descriptionElement.classList.add(iconClass);\n descriptionElement && descriptionElement.setAttribute('line-clamp', this.lineClamp);\n });\n }\n\n @Listen('mouseenter')\n onMouseEnter() {\n this.setHovered(true);\n }\n\n @Listen('mouseleave')\n onMouseLeave() {\n this.setHovered(false);\n this.setActive(false);\n }\n\n @Listen('touchstart', { passive: true })\n onTouchStart() {\n this.setActive(true);\n }\n\n @Listen('touchend')\n onTouchEnd() {\n this.setActive(false);\n }\n\n @Listen('mousedown')\n onMouseDown() {\n this.setActive(true);\n }\n\n @Listen('mouseup')\n onMouseUp() {\n this.setActive(false);\n }\n\n @Listen('blur')\n onBlur() {\n this.setActive(false);\n }\n\n @Listen('focus')\n onFocus() {\n this.setActive(true);\n }\n\n private setHovered(isHovered: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--hovered', isHovered);\n }\n }\n\n private setActive(isActive: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--active', isActive);\n }\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item': true,\n 'spw-list-item--hoverable': !!this.href,\n 'spw-list-item--icon': !!this.icon || !!this.categoryIcon,\n [`spw-list-item--${this.variant}`]: true,\n };\n }\n\n private get elementCatClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item__category': true,\n 'spw-list-item__category--icon': !!this.categoryIcon,\n 'spw-list-item__category--hoverable': !!this.categoryLink,\n };\n }\n\n handleClick() {\n if (this.categoryLink) {\n window.location.href = this.categoryLink;\n }\n }\n\n render() {\n const { href, target } = this;\n const TagType = this.href === undefined ? 'div' : 'a';\n const attrs =\n TagType === 'div'\n ? {}\n : {\n href,\n target,\n };\n return (\n <Host>\n <li class={this.elementClass}>\n {this.category && (\n <span class={this.elementCatClass} onClick={() => this.handleClick()}>\n {this.categoryIcon && <spw-icon icon={this.categoryIcon}></spw-icon>} {this.category}\n </span>\n )}\n <TagType {...attrs}>\n <slot></slot>\n </TagType>\n </li>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,cAAc,GAAG,krGAAkrG;;MCO5rG,WAAW,GAAA,MAAA;AALxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AASU,QAAA,IAAO,CAAA,OAAA,GAA4B,SAAS;;AAI5C,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO;;AAExB,QAAA,IAAI,CAAA,IAAA,GAAY,gBAAgB;;AAEhC,QAAA,IAAS,CAAA,SAAA,GAAoB,GAAG;;AAMhC,QAAA,IAAY,CAAA,YAAA,GAAY,mBAAmB;AAkIpD;IAhIC,iBAAiB,GAAA;QACf,IAAI,CAAC,sBAAsB,EAAE;;IAI/B,WAAW,GAAA;QACT,IAAI,CAAC,sBAAsB,EAAE;;IAGvB,sBAAsB,GAAA;QAC5B,qBAAqB,CAAC,MAAK;AACzB,YAAA,MAAM,YAAY,GAAG,CAAA,EAAA,EAAK,IAAI,CAAC,OAAO,EAAE;YACxC,MAAM,SAAS,GAAG,CAAA,MAAA,CAAQ;YAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC;YAC5D,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC;YAExE,YAAY,IAAI,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;AACxD,YAAA,YAAY,IAAI,IAAI,CAAC,IAAI,IAAI,YAAY,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;YACzE,YAAY,IAAI,YAAY,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;YACvE,kBAAkB,IAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAA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,EAAE,EAAA,EACjE,IAAI,CAAC,YAAY,IAAIA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,YAAY,EAAa,CAAA,OAAG,IAAI,CAAC,QAAQ,CAC/E,CACR,EACDA,OAAC,CAAA,OAAO,qEAAK,KAAK,CAAA,EAChBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACL,CACP,CACA;;;;;;;;"}
1
+ {"version":3,"file":"spw-list-item.entry.cjs.js","sources":["src/components/spw-list/spw-list-item/spw-list-item.scss?tag=spw-list-item&encapsulation=shadow","src/components/spw-list/spw-list-item/spw-list-item.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.spw-list-item {\n position: relative;\n color: var(--spw-color-themes-grey-grey-900);\n transition: all 0.3s ease-in-out;\n text-decoration: none;\n :host(.--dark) & {\n color: var(--spw-ds-white);\n }\n &--hoverable:hover {\n transform: translateX(5px);\n }\n a {\n text-decoration: none;\n }\n &--icon {\n padding-left: 28px;\n }\n &__category {\n display: inline-block;\n position: relative;\n margin-bottom: 6px;\n color: var(--spw-ds-primary);\n font-weight: 700;\n font-size: 16px;\n line-height: 1.5;\n spw-icon {\n position: absolute;\n top: 2px;\n left: -28px;\n }\n &--hoverable {\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n }\n }\n}\n","import { Component, Host, Element, Listen, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-item',\n styleUrl: 'spw-list-item.scss',\n shadow: true,\n})\nexport class SpwListItem {\n @Element() el: HTMLSpwListItemElement;\n\n /** Type de variante d'élément de liste */\n @Prop() variant?: 'shortcut' | 'default' = 'default';\n /** Spécifie le lien si nécessaire */\n @Prop() href?: string;\n /** Attribut target, s'applique uniquement si href est rempli */\n @Prop() target: string = '_self';\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string = 'fa-arrow-right';\n /** Permet de limiter le nombre de lignes du titre et de la description */\n @Prop() lineClamp: string | 'none' = '3';\n /** Permet de spécifier une catégorie pour l'élément de liste */\n @Prop() category?: string;\n /** Permet de spécifier un lien pour la catégorie */\n @Prop() categoryLink?: string;\n /** Permet de spécifier une icône pour la catégorie */\n @Prop() categoryIcon?: string = 'fa-file-signature';\n /** Permet de choisir la surface d'arrière-plan de la liste */\n @Prop() surface?: 'light' | 'dark' = 'light';\n\n componentWillLoad() {\n this.applyVariantToChildren();\n }\n\n @Listen('slotchange')\n slotChanged() {\n this.applyVariantToChildren();\n }\n\n private applyVariantToChildren() {\n requestAnimationFrame(() => {\n const variantClass = `--${this.variant}`;\n const surfaceClass = `--${this.surface}`;\n const iconClass = `--icon`;\n const titleElement = this.el.querySelector('spw-list-title');\n const descriptionElement = this.el.querySelector('spw-list-description');\n\n titleElement && titleElement.classList.add(variantClass);\n titleElement && titleElement.classList.add(surfaceClass);\n titleElement && this.icon && titleElement.setAttribute('icon', this.icon);\n titleElement && titleElement.setAttribute('line-clamp', this.lineClamp);\n descriptionElement && descriptionElement.classList.add(variantClass);\n descriptionElement && this.icon && descriptionElement.classList.add(iconClass);\n descriptionElement && descriptionElement.setAttribute('line-clamp', this.lineClamp);\n });\n }\n\n @Listen('mouseenter')\n onMouseEnter() {\n this.setHovered(true);\n }\n\n @Listen('mouseleave')\n onMouseLeave() {\n this.setHovered(false);\n this.setActive(false);\n }\n\n @Listen('touchstart', { passive: true })\n onTouchStart() {\n this.setActive(true);\n }\n\n @Listen('touchend')\n onTouchEnd() {\n this.setActive(false);\n }\n\n @Listen('mousedown')\n onMouseDown() {\n this.setActive(true);\n }\n\n @Listen('mouseup')\n onMouseUp() {\n this.setActive(false);\n }\n\n @Listen('blur')\n onBlur() {\n this.setActive(false);\n }\n\n @Listen('focus')\n onFocus() {\n this.setActive(true);\n }\n\n private setHovered(isHovered: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--hovered', isHovered);\n }\n }\n\n private setActive(isActive: boolean) {\n const titleElement = this.el.querySelector('spw-list-title');\n if (titleElement && this.href) {\n titleElement.classList.toggle('--active', isActive);\n }\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item': true,\n 'spw-list-item--hoverable': !!this.href,\n 'spw-list-item--icon': !!this.icon || !!this.categoryIcon,\n [`spw-list-item--${this.variant}`]: true,\n };\n }\n\n private get elementCatClass(): { [className: string]: boolean } {\n return {\n 'spw-list-item__category': true,\n 'spw-list-item__category--icon': !!this.categoryIcon,\n 'spw-list-item__category--hoverable': !!this.categoryLink,\n };\n }\n\n handleClick() {\n if (this.categoryLink) {\n window.location.href = this.categoryLink;\n }\n }\n\n render() {\n const { href, target } = this;\n const TagType = this.href === undefined ? 'div' : 'a';\n const attrs =\n TagType === 'div'\n ? {}\n : {\n href,\n target,\n };\n return (\n <Host>\n <li class={this.elementClass}>\n {this.category && (\n <span class={this.elementCatClass} onClick={() => this.handleClick()}>\n {this.categoryIcon && <spw-icon icon={this.categoryIcon}></spw-icon>} {this.category}\n </span>\n )}\n <TagType {...attrs}>\n <slot></slot>\n </TagType>\n </li>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,cAAc,GAAG,0uGAA0uG;;MCOpvG,WAAW,GAAA,MAAA;AALxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AASU,QAAA,IAAO,CAAA,OAAA,GAA4B,SAAS;;AAI5C,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO;;AAExB,QAAA,IAAI,CAAA,IAAA,GAAY,gBAAgB;;AAEhC,QAAA,IAAS,CAAA,SAAA,GAAoB,GAAG;;AAMhC,QAAA,IAAY,CAAA,YAAA,GAAY,mBAAmB;;AAE3C,QAAA,IAAO,CAAA,OAAA,GAAsB,OAAO;AAoI7C;IAlIC,iBAAiB,GAAA;QACf,IAAI,CAAC,sBAAsB,EAAE;;IAI/B,WAAW,GAAA;QACT,IAAI,CAAC,sBAAsB,EAA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AC,YAAY;AACpD,YAAA,oCAAoC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY;SAC1D;;IAGH,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY;;;IAI5C,MAAM,GAAA;AACJ,QAAA,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;AAC7B,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,KAAK,SAAS,GAAG,KAAK,GAAG,GAAG;AACrD,QAAA,MAAM,KAAK,GACT,OAAO,KAAK;AACV,cAAE;AACF,cAAE;gBACE,IAAI;gBACJ,MAAM;aACP;QACP,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EACzB,IAAI,CAAC,QAAQ,KACZA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EAAA,EACjE,IAAI,CAAC,YAAY,IAAIA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,YAAY,EAAa,CAAA,OAAG,IAAI,CAAC,QAAQ,CAC/E,CACR,EACDA,OAAC,CAAA,OAAO,qEAAK,KAAK,CAAA,EAChBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACL,CACP,CACA;;;;;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-iVhYitTd.js');
4
4
 
5
- const spwListTitleCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:block;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.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;-webkit-text-decoration:underline dotted;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:-.25em}sup{top:-.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}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .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}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@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)}}.spw-ds-typography,[class*=spw-ds-typography-]{font-family:Nunito Sans}.spw-ds-typography-display-1{font-size:56px;font-weight:400;line-height:1.2}@media (min-width:1024px){.spw-ds-typography-display-1{font-size:68px;font-weight:400;line-height:1.1}}.spw-ds-typography-display-2{font-size:40px;font-weight:400;line-height:1.25}@media (min-width:1024px){.spw-ds-typography-display-2{font-size:56px;font-weight:400;line-height:1.2}}.spw-ds-typography-display-3{font-size:32px;font-weight:400;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-display-3{font-size:48px;font-weight:400;line-height:1.2}}.spw-ds-typography-heading-01{font-size:28px;font-weight:700;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-heading-01{font-size:32px;font-weight:700;line-height:1.25}}.spw-ds-typography-heading-02{font-size:24px;font-weight:700;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-heading-02{font-size:28px;font-weight:700;line-height:1.3}}.spw-ds-typography-heading-03{font-size:20px;font-weight:700;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-heading-03{font-size:20px;font-weight:700;line-height:1.4}}.spw-ds-typography-heading-04,:host(.--default) .spw-list-title{font-size:18px;font-weight:700;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-heading-04,:host(.--default) .spw-list-title{font-size:18px;font-weight:700;line-height:1.5}}.spw-ds-typography-heading-05,:host(.--shortcut) .spw-list-title{font-size:16px;font-weight:700;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-heading-05,:host(.--shortcut) .spw-list-title{font-size:16px;font-weight:700;line-height:1.6}}.spw-ds-typography-heading-06{font-size:14px;font-weight:700;line-height:1.7}@media (min-width:1024px){.spw-ds-typography-heading-06{font-size:14px;font-weight:700;line-height:1.6}}.spw-ds-typography-lead-body{font-size:20px!important;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-lead-body{font-size:20px;font-weight:400;line-height:1.5}}.spw-ds-typography-lead-body-compact{font-size:20px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-lead-body-compact{font-size:20px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-1{font-size:18px;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-body-1{font-size:18px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-1{font-size:18px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-body-compact-1{font-size:18px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-2{font-size:16px;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-body-2{font-size:16px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-2{font-size:16px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-body-compact-2{font-size:16px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-3{font-size:14px;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-body-3{font-size:14px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-3{font-size:14px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-body-compact-3{font-size:14px;font-weight:400;line-height:1.25}}.spw-ds-typography-tag{font-size:14px;font-weight:700;line-height:1.2}.spw-ds-typography-label{font-size:16px;font-weight:600;line-height:1.2}.spw-ds-typography-date{font-size:16px;font-weight:300;line-height:1}.spw-ds-typography-caption{font-size:14px;font-style:italic;font-weight:300;line-height:1}.spw-ds-typography-link{border-bottom:1px solid var(--spw-ds-primary);color:var(--spw-ds-primary);font-size:inherit;font-weight:700;line-height:1.2}.spw-ds-typography-link:hover{color:var(--spw-ds-variant)}.spw-ds-typography-link:active{color:var(--spw-ds-active)}.spw-ds-typography-link:active,.spw-ds-typography-link:hover{border-color:currentColor;border-width:2px}.spw-ds-typography-hint{font-size:14px;font-weight:400;line-height:1.5}.spw-ds-typography-code{font-family:monospace;font-size:14px;font-weight:400;line-height:1.2}.spw-ds-typography-overline{font-size:10px;font-weight:800;line-height:1;text-transform:uppercase}.spw-list-title{display:inline-flex;position:relative;transition:all .2s linear}.spw-list-title spw-icon{color:var(--spw-ds-primary);left:-28px;position:absolute;top:4px;transition:all .2s linear}:host(.--active) .spw-list-title spw-icon{color:var(--spw-ds-active)}.spw-list-title__content-text{border-bottom:1px solid transparent;display:inline;transition:all .2s linear}:host(.--hovered) .spw-list-title__content-text{border-color:var(--spw-ds-primary)}:host(.--active) .spw-list-title__content-text{border-color:var(--spw-ds-active)}:host(.--default) .spw-list-title{color:var(--spw-color-themes-grey-grey-900)}:host(.--shortcut) .spw-list-title{color:var(--spw-ds-primary)}:host(.--hovered) .spw-list-title{color:var(--spw-ds-primary)}:host(.--active) .spw-list-title{color:var(--spw-ds-active)}.spw-list-title--has-clamp .spw-list-title__content{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.spw-list-title--clamp-1 .spw-list-title__content{-webkit-line-clamp:1;line-clamp:1}.spw-list-title--clamp-2 .spw-list-title__content{-webkit-line-clamp:2;line-clamp:2}.spw-list-title--clamp-3 .spw-list-title__content{-webkit-line-clamp:3;line-clamp:3}.spw-list-title--clamp-4 .spw-list-title__content{-webkit-line-clamp:4;line-clamp:4}.spw-list-title--clamp-5 .spw-list-title__content{-webkit-line-clamp:5;line-clamp:5}.spw-list-title--clamp-6 .spw-list-title__content{-webkit-line-clamp:6;line-clamp:6}.spw-list-title--clamp-7 .spw-list-title__content{-webkit-line-clamp:7;line-clamp:7}.spw-list-title--clamp-8 .spw-list-title__content{-webkit-line-clamp:8;line-clamp:8}.spw-list-title--clamp-9 .spw-list-title__content{-webkit-line-clamp:9;line-clamp:9}.spw-list-title--clamp-10 .spw-list-title__content{-webkit-line-clamp:10;line-clamp:10}";
5
+ const spwListTitleCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:block;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.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;-webkit-text-decoration:underline dotted;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:-.25em}sup{top:-.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}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .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}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@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)}}.spw-ds-typography,[class*=spw-ds-typography-]{font-family:Nunito Sans}.spw-ds-typography-display-1{font-size:56px;font-weight:400;line-height:1.2}@media (min-width:1024px){.spw-ds-typography-display-1{font-size:68px;font-weight:400;line-height:1.1}}.spw-ds-typography-display-2{font-size:40px;font-weight:400;line-height:1.25}@media (min-width:1024px){.spw-ds-typography-display-2{font-size:56px;font-weight:400;line-height:1.2}}.spw-ds-typography-display-3{font-size:32px;font-weight:400;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-display-3{font-size:48px;font-weight:400;line-height:1.2}}.spw-ds-typography-heading-01{font-size:28px;font-weight:700;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-heading-01{font-size:32px;font-weight:700;line-height:1.25}}.spw-ds-typography-heading-02{font-size:24px;font-weight:700;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-heading-02{font-size:28px;font-weight:700;line-height:1.3}}.spw-ds-typography-heading-03{font-size:20px;font-weight:700;line-height:1.4}@media (min-width:1024px){.spw-ds-typography-heading-03{font-size:20px;font-weight:700;line-height:1.4}}.spw-ds-typography-heading-04,:host(.--default) .spw-list-title{font-size:18px;font-weight:700;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-heading-04,:host(.--default) .spw-list-title{font-size:18px;font-weight:700;line-height:1.5}}.spw-ds-typography-heading-05,:host(.--shortcut) .spw-list-title{font-size:16px;font-weight:700;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-heading-05,:host(.--shortcut) .spw-list-title{font-size:16px;font-weight:700;line-height:1.6}}.spw-ds-typography-heading-06{font-size:14px;font-weight:700;line-height:1.7}@media (min-width:1024px){.spw-ds-typography-heading-06{font-size:14px;font-weight:700;line-height:1.6}}.spw-ds-typography-lead-body{font-size:20px!important;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-lead-body{font-size:20px;font-weight:400;line-height:1.5}}.spw-ds-typography-lead-body-compact{font-size:20px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-lead-body-compact{font-size:20px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-1{font-size:18px;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-body-1{font-size:18px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-1{font-size:18px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-body-compact-1{font-size:18px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-2{font-size:16px;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-body-2{font-size:16px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-2{font-size:16px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-body-compact-2{font-size:16px;font-weight:400;line-height:1.25}}.spw-ds-typography-body-3{font-size:14px;font-weight:400;line-height:1.6}@media (min-width:1024px){.spw-ds-typography-body-3{font-size:14px;font-weight:400;line-height:1.5}}.spw-ds-typography-body-compact-3{font-size:14px;font-weight:400;line-height:1.5}@media (min-width:1024px){.spw-ds-typography-body-compact-3{font-size:14px;font-weight:400;line-height:1.25}}.spw-ds-typography-tag{font-size:14px;font-weight:700;line-height:1.2}.spw-ds-typography-label{font-size:16px;font-weight:600;line-height:1.2}.spw-ds-typography-date{font-size:16px;font-weight:300;line-height:1}.spw-ds-typography-caption{font-size:14px;font-style:italic;font-weight:300;line-height:1}.spw-ds-typography-link{border-bottom:1px solid var(--spw-ds-primary);color:var(--spw-ds-primary);font-size:inherit;font-weight:700;line-height:1.2}.spw-ds-typography-link:hover{color:var(--spw-ds-variant)}.spw-ds-typography-link:active{color:var(--spw-ds-active)}.spw-ds-typography-link:active,.spw-ds-typography-link:hover{border-color:currentColor;border-width:2px}.spw-ds-typography-hint{font-size:14px;font-weight:400;line-height:1.5}.spw-ds-typography-code{font-family:monospace;font-size:14px;font-weight:400;line-height:1.2}.spw-ds-typography-overline{font-size:10px;font-weight:800;line-height:1;text-transform:uppercase}.spw-list-title{display:inline-flex;position:relative;transition:all .2s linear}.spw-list-title spw-icon{color:var(--spw-ds-primary);left:-28px;position:absolute;top:4px;transition:all .2s linear}:host(.--active) .spw-list-title spw-icon{color:var(--spw-ds-active)}:host(.--dark) .spw-list-title spw-icon{color:var(--spw-ds-white)}.spw-list-title__content-text{border-bottom:1px solid transparent;display:inline;transition:all .2s linear}:host(.--hovered) .spw-list-title__content-text{border-color:var(--spw-ds-primary)}:host(.--active) .spw-list-title__content-text{border-color:var(--spw-ds-active)}:host(.--default) .spw-list-title{color:var(--spw-color-themes-grey-grey-900)}:host(.--shortcut) .spw-list-title{color:var(--spw-ds-primary)}:host(.--hovered) .spw-list-title{color:var(--spw-ds-primary)}:host(.--active) .spw-list-title{color:var(--spw-ds-active)}:host(.--dark) .spw-list-title{color:var(--spw-ds-white)}.spw-list-title--has-clamp .spw-list-title__content{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.spw-list-title--clamp-1 .spw-list-title__content{-webkit-line-clamp:1;line-clamp:1}.spw-list-title--clamp-2 .spw-list-title__content{-webkit-line-clamp:2;line-clamp:2}.spw-list-title--clamp-3 .spw-list-title__content{-webkit-line-clamp:3;line-clamp:3}.spw-list-title--clamp-4 .spw-list-title__content{-webkit-line-clamp:4;line-clamp:4}.spw-list-title--clamp-5 .spw-list-title__content{-webkit-line-clamp:5;line-clamp:5}.spw-list-title--clamp-6 .spw-list-title__content{-webkit-line-clamp:6;line-clamp:6}.spw-list-title--clamp-7 .spw-list-title__content{-webkit-line-clamp:7;line-clamp:7}.spw-list-title--clamp-8 .spw-list-title__content{-webkit-line-clamp:8;line-clamp:8}.spw-list-title--clamp-9 .spw-list-title__content{-webkit-line-clamp:9;line-clamp:9}.spw-list-title--clamp-10 .spw-list-title__content{-webkit-line-clamp:10;line-clamp:10}";
6
6
 
7
7
  const SpwListTitle = class {
8
8
  constructor(hostRef) {
@@ -18,7 +18,7 @@ const SpwListTitle = class {
18
18
  };
19
19
  }
20
20
  render() {
21
- return (index.h(index.Host, { key: '27a216b5f2528a19a2d6ea1005da441945f60b3c' }, index.h("div", { key: 'd3563c6655136e698231eb9b592c13d60eb9ea47', class: this.elementClass }, this.icon && index.h("spw-icon", { key: 'bbe74eb639a3646587cf2a35bb103901a5ede59f', icon: this.icon }), index.h("div", { key: 'e6f8ac9c569ca843a082caf65cecb97ae5830614', class: "spw-list-title__content" }, index.h("div", { key: '0b12989d788bedc8393248c612f20e9bdf67bf05', class: "spw-list-title__content-text" }, index.h("slot", { key: '2c53dc6eaa074cd48e5f2bffe11a0390b077c2a4' }))))));
21
+ return (index.h(index.Host, { key: 'c9c3901f829d7b5f2a3177ca556c018406d6ea73' }, index.h("div", { key: 'cf79b9d13b1924112e722313bf6047e8dd38a928', class: this.elementClass }, this.icon && index.h("spw-icon", { key: '8c7c3e1aebad500d2cc9f61397f9aaecce10813a', icon: this.icon }), index.h("div", { key: 'b4ebd2d41241bf1c3d12e0585967dd49b3b1e16a', class: "spw-list-title__content" }, index.h("div", { key: '8fa9a3410f155dd978758b25d8265fd2116b5dee', class: "spw-list-title__content-text" }, index.h("slot", { key: '23e919d7c182a801221cd3bc856e4443b4601795' }))))));
22
22
  }
23
23
  };
24
24
  SpwListTitle.style = spwListTitleCss;
@@ -1 +1 @@
1
- {"file":"spw-list-title.entry.cjs.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,g9QAAg9Q;;MCO39Q,YAAY,GAAA,MAAA;;;;AAMvB,IAAA,IAAY,YAAY,GAAA;AACtB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM;QAC9C,OAAO;AACL,YAAA,gBAAgB,EAAE,IAAI;YACtB,CAAC,CAAA,yBAAA,CAA2B,GAAG,YAAY;AAC3C,YAAA,CAAC,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI;AACrC,YAAA,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAE,CAAA,GAAG,IAAI;SAClD;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1B,IAAI,CAAC,IAAI,IAAIA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAa,CAAA,EACpDA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,yBAAyB,EAAA,EAClCA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,8BAA8B,EAAA,EACvCA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACF,CACF,CACD;;;;;;;","names":["h","Host"],"sources":["src/components/spw-list/spw-list-title/spw-list-title.scss?tag=spw-list-title&encapsulation=shadow","src/components/spw-list/spw-list-title/spw-list-title.tsx"],"sourcesContent":["@import '../../../scss/utils/foundations/typography';\n\n:host {\n display: block;\n}\n\n.spw-list-title {\n position: relative;\n transition: all 0.2s linear;\n display: inline-flex;\n spw-icon {\n transition: all 0.2s linear;\n position: absolute;\n top: 4px;\n left: -28px;\n color: var(--spw-ds-primary);\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n }\n &__content-text {\n display: inline;\n border-bottom: 1px solid transparent;\n transition: all 0.2s linear;\n :host(.--hovered) & {\n border-color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n border-color: var(--spw-ds-active);\n }\n }\n :host(.--default) & {\n @extend .spw-ds-typography-heading-04;\n color: var(--spw-color-themes-grey-grey-900);\n }\n :host(.--shortcut) & {\n @extend .spw-ds-typography-heading-05;\n color: var(--spw-ds-primary);\n }\n :host(.--hovered) & {\n color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n &--has-clamp {\n .spw-list-title__content {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n }\n }\n @for $i from 1 through 10 {\n &--clamp-#{$i} {\n .spw-list-title__content {\n -webkit-line-clamp: $i;\n line-clamp: $i;\n }\n }\n }\n}\n","import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-title',\n styleUrl: 'spw-list-title.scss',\n shadow: true,\n})\nexport class SpwListTitle {\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string;\n /** Spécifie un nombre de ligne maximum à afficher */\n @Prop() lineClamp?: string;\n\n private get elementClass(): { [className: string]: boolean } {\n const hasLineClamp = this.lineClamp !== 'none';\n return {\n 'spw-list-title': true,\n [`spw-list-title--has-clamp`]: hasLineClamp,\n [`spw-list-title--icon`]: !!this.icon,\n [`spw-list-title--clamp-${this.lineClamp}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <div class={this.elementClass}>\n {this.icon && <spw-icon icon={this.icon}></spw-icon>}\n <div class=\"spw-list-title__content\">\n <div class=\"spw-list-title__content-text\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"spw-list-title.entry.cjs.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,2kRAA2kR;;MCOtlR,YAAY,GAAA,MAAA;;;;AAMvB,IAAA,IAAY,YAAY,GAAA;AACtB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM;QAC9C,OAAO;AACL,YAAA,gBAAgB,EAAE,IAAI;YACtB,CAAC,CAAA,yBAAA,CAA2B,GAAG,YAAY;AAC3C,YAAA,CAAC,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI;AACrC,YAAA,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAE,CAAA,GAAG,IAAI;SAClD;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1B,IAAI,CAAC,IAAI,IAAIA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAa,CAAA,EACpDA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,yBAAyB,EAAA,EAClCA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,8BAA8B,EAAA,EACvCA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACF,CACF,CACD;;;;;;;","names":["h","Host"],"sources":["src/components/spw-list/spw-list-title/spw-list-title.scss?tag=spw-list-title&encapsulation=shadow","src/components/spw-list/spw-list-title/spw-list-title.tsx"],"sourcesContent":["@import '../../../scss/utils/foundations/typography';\n\n:host {\n display: block;\n}\n\n.spw-list-title {\n position: relative;\n transition: all 0.2s linear;\n display: inline-flex;\n spw-icon {\n transition: all 0.2s linear;\n position: absolute;\n top: 4px;\n left: -28px;\n color: var(--spw-ds-primary);\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n :host(.--dark) & {\n color: var(--spw-ds-white);\n }\n }\n &__content-text {\n display: inline;\n border-bottom: 1px solid transparent;\n transition: all 0.2s linear;\n :host(.--hovered) & {\n border-color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n border-color: var(--spw-ds-active);\n }\n }\n :host(.--default) & {\n @extend .spw-ds-typography-heading-04;\n color: var(--spw-color-themes-grey-grey-900);\n }\n :host(.--shortcut) & {\n @extend .spw-ds-typography-heading-05;\n color: var(--spw-ds-primary);\n }\n :host(.--hovered) & {\n color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n :host(.--dark) & {\n color: var(--spw-ds-white);\n }\n &--has-clamp {\n .spw-list-title__content {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n }\n }\n @for $i from 1 through 10 {\n &--clamp-#{$i} {\n .spw-list-title__content {\n -webkit-line-clamp: $i;\n line-clamp: $i;\n }\n }\n }\n}\n","import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-title',\n styleUrl: 'spw-list-title.scss',\n shadow: true,\n})\nexport class SpwListTitle {\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string;\n /** Spécifie un nombre de ligne maximum à afficher */\n @Prop() lineClamp?: string;\n\n private get elementClass(): { [className: string]: boolean } {\n const hasLineClamp = this.lineClamp !== 'none';\n return {\n 'spw-list-title': true,\n [`spw-list-title--has-clamp`]: hasLineClamp,\n [`spw-list-title--icon`]: !!this.icon,\n [`spw-list-title--clamp-${this.lineClamp}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <div class={this.elementClass}>\n {this.icon && <spw-icon icon={this.icon}></spw-icon>}\n <div class=\"spw-list-title__content\">\n <div class=\"spw-list-title__content-text\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"spw-list-title.entry.cjs.js","sources":["src/components/spw-list/spw-list-title/spw-list-title.scss?tag=spw-list-title&encapsulation=shadow","src/components/spw-list/spw-list-title/spw-list-title.tsx"],"sourcesContent":["@import '../../../scss/utils/foundations/typography';\n\n:host {\n display: block;\n}\n\n.spw-list-title {\n position: relative;\n transition: all 0.2s linear;\n display: inline-flex;\n spw-icon {\n transition: all 0.2s linear;\n position: absolute;\n top: 4px;\n left: -28px;\n color: var(--spw-ds-primary);\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n }\n &__content-text {\n display: inline;\n border-bottom: 1px solid transparent;\n transition: all 0.2s linear;\n :host(.--hovered) & {\n border-color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n border-color: var(--spw-ds-active);\n }\n }\n :host(.--default) & {\n @extend .spw-ds-typography-heading-04;\n color: var(--spw-color-themes-grey-grey-900);\n }\n :host(.--shortcut) & {\n @extend .spw-ds-typography-heading-05;\n color: var(--spw-ds-primary);\n }\n :host(.--hovered) & {\n color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n &--has-clamp {\n .spw-list-title__content {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n }\n }\n @for $i from 1 through 10 {\n &--clamp-#{$i} {\n .spw-list-title__content {\n -webkit-line-clamp: $i;\n line-clamp: $i;\n }\n }\n }\n}\n","import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-title',\n styleUrl: 'spw-list-title.scss',\n shadow: true,\n})\nexport class SpwListTitle {\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string;\n /** Spécifie un nombre de ligne maximum à afficher */\n @Prop() lineClamp?: string;\n\n private get elementClass(): { [className: string]: boolean } {\n const hasLineClamp = this.lineClamp !== 'none';\n return {\n 'spw-list-title': true,\n [`spw-list-title--has-clamp`]: hasLineClamp,\n [`spw-list-title--icon`]: !!this.icon,\n [`spw-list-title--clamp-${this.lineClamp}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <div class={this.elementClass}>\n {this.icon && <spw-icon icon={this.icon}></spw-icon>}\n <div class=\"spw-list-title__content\">\n <div class=\"spw-list-title__content-text\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,eAAe,GAAG,g9QAAg9Q;;MCO39Q,YAAY,GAAA,MAAA;;;;AAMvB,IAAA,IAAY,YAAY,GAAA;AACtB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM;QAC9C,OAAO;AACL,YAAA,gBAAgB,EAAE,IAAI;YACtB,CAAC,CAAA,yBAAA,CAA2B,GAAG,YAAY;AAC3C,YAAA,CAAC,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI;AACrC,YAAA,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAE,CAAA,GAAG,IAAI;SAClD;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1B,IAAI,CAAC,IAAI,IAAIA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAa,CAAA,EACpDA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,yBAAyB,EAAA,EAClCA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,8BAA8B,EAAA,EACvCA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACF,CACF,CACD;;;;;;;"}
1
+ {"version":3,"file":"spw-list-title.entry.cjs.js","sources":["src/components/spw-list/spw-list-title/spw-list-title.scss?tag=spw-list-title&encapsulation=shadow","src/components/spw-list/spw-list-title/spw-list-title.tsx"],"sourcesContent":["@import '../../../scss/utils/foundations/typography';\n\n:host {\n display: block;\n}\n\n.spw-list-title {\n position: relative;\n transition: all 0.2s linear;\n display: inline-flex;\n spw-icon {\n transition: all 0.2s linear;\n position: absolute;\n top: 4px;\n left: -28px;\n color: var(--spw-ds-primary);\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n :host(.--dark) & {\n color: var(--spw-ds-white);\n }\n }\n &__content-text {\n display: inline;\n border-bottom: 1px solid transparent;\n transition: all 0.2s linear;\n :host(.--hovered) & {\n border-color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n border-color: var(--spw-ds-active);\n }\n }\n :host(.--default) & {\n @extend .spw-ds-typography-heading-04;\n color: var(--spw-color-themes-grey-grey-900);\n }\n :host(.--shortcut) & {\n @extend .spw-ds-typography-heading-05;\n color: var(--spw-ds-primary);\n }\n :host(.--hovered) & {\n color: var(--spw-ds-primary);\n }\n :host(.--active) & {\n color: var(--spw-ds-active);\n }\n :host(.--dark) & {\n color: var(--spw-ds-white);\n }\n &--has-clamp {\n .spw-list-title__content {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n }\n }\n @for $i from 1 through 10 {\n &--clamp-#{$i} {\n .spw-list-title__content {\n -webkit-line-clamp: $i;\n line-clamp: $i;\n }\n }\n }\n}\n","import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list-title',\n styleUrl: 'spw-list-title.scss',\n shadow: true,\n})\nexport class SpwListTitle {\n /** Spécifie une icône à côté du titre */\n @Prop() icon?: string;\n /** Spécifie un nombre de ligne maximum à afficher */\n @Prop() lineClamp?: string;\n\n private get elementClass(): { [className: string]: boolean } {\n const hasLineClamp = this.lineClamp !== 'none';\n return {\n 'spw-list-title': true,\n [`spw-list-title--has-clamp`]: hasLineClamp,\n [`spw-list-title--icon`]: !!this.icon,\n [`spw-list-title--clamp-${this.lineClamp}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <div class={this.elementClass}>\n {this.icon && <spw-icon icon={this.icon}></spw-icon>}\n <div class=\"spw-list-title__content\">\n <div class=\"spw-list-title__content-text\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,eAAe,GAAG,2kRAA2kR;;MCOtlR,YAAY,GAAA,MAAA;;;;AAMvB,IAAA,IAAY,YAAY,GAAA;AACtB,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,KAAK,MAAM;QAC9C,OAAO;AACL,YAAA,gBAAgB,EAAE,IAAI;YACtB,CAAC,CAAA,yBAAA,CAA2B,GAAG,YAAY;AAC3C,YAAA,CAAC,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI;AACrC,YAAA,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAE,CAAA,GAAG,IAAI;SAClD;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1B,IAAI,CAAC,IAAI,IAAIA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAa,CAAA,EACpDA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,yBAAyB,EAAA,EAClCA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,8BAA8B,EAAA,EACvCA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACF,CACF,CACD;;;;;;;"}
@@ -9,6 +9,24 @@ const SpwList = class {
9
9
  index.registerInstance(this, hostRef);
10
10
  /** Spécifie l'écart entre les éléments de liste */
11
11
  this.gap = 'medium';
12
+ /** Permet de choisir la surface d'arrière-plan de la liste */
13
+ this.surface = 'light';
14
+ }
15
+ componentWillLoad() {
16
+ this.applyVariantToChildren();
17
+ }
18
+ slotChanged() {
19
+ this.applyVariantToChildren();
20
+ }
21
+ applyVariantToChildren() {
22
+ requestAnimationFrame(() => {
23
+ const variantClass = `--${this.surface}`;
24
+ const contentElements = this.el.querySelectorAll('spw-list-item');
25
+ contentElements.forEach(contentElement => {
26
+ contentElement.classList.add(variantClass);
27
+ contentElement.setAttribute('surface', this.surface);
28
+ });
29
+ });
12
30
  }
13
31
  get elementClass() {
14
32
  return {
@@ -17,8 +35,9 @@ const SpwList = class {
17
35
  };
18
36
  }
19
37
  render() {
20
- return (index.h(index.Host, { key: '7474a92f800b0e42ee4f7ae928602fab40678129' }, index.h("ul", { key: 'bb478eb83d2b3533c70f74a6c4054bd5c8985883', class: this.elementClass }, index.h("slot", { key: 'ec64155dd2191f5f751611729b814e4228c19ec3' }))));
38
+ return (index.h(index.Host, { key: 'b4148947174922198db9c5d900e0bd3e12dc3463' }, index.h("ul", { key: '100ab0ec463be6a6c94aa5853c6b4cadc95f8f55', class: this.elementClass }, index.h("slot", { key: 'b0a7ee73af4a21f35aa90b0eb77522b0d9679e27' }))));
21
39
  }
40
+ get el() { return index.getElement(this); }
22
41
  };
23
42
  SpwList.style = spwListCss;
24
43
 
@@ -1 +1 @@
1
- {"file":"spw-list.entry.cjs.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,wsFAAwsF;;MCO9sF,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAOU,QAAA,IAAG,CAAA,GAAA,GAAkC,QAAQ;AAkBtD;AAhBC,IAAA,IAAY,YAAY,GAAA;QACtB,OAAO;AACL,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,CAAC,aAAa,IAAI,CAAC,GAAG,CAAE,CAAA,GAAG,IAAI;SAChC;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1BA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACV,CACA;;;;;;;","names":["h","Host"],"sources":["src/components/spw-list/spw-list.scss?tag=spw-list&encapsulation=shadow","src/components/spw-list/spw-list.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.spw-list {\n display: flex;\n flex-direction: column;\n &--small {\n gap: 12px;\n }\n &--medium {\n gap: 24px;\n }\n &--large {\n gap: 32px;\n }\n}\n","import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list',\n styleUrl: 'spw-list.scss',\n shadow: true,\n})\nexport class SpwList {\n /** Spécifie l'écart entre les éléments de liste */\n @Prop() gap?: 'small' | 'medium' | 'large' = 'medium';\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list': true,\n [`spw-list--${this.gap}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <ul class={this.elementClass}>\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"spw-list.entry.cjs.js","mappings":";;;;AAAA,MAAM,UAAU,GAAG,wsFAAwsF;;MCO9sF,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAQU,QAAA,IAAG,CAAA,GAAA,GAAkC,QAAQ;;AAE7C,QAAA,IAAO,CAAA,OAAA,GAAsB,OAAO;AAuC7C;IArCC,iBAAiB,GAAA;QACf,IAAI,CAAC,sBAAsB,EAAE;;IAI/B,WAAW,GAAA;QACT,IAAI,CAAC,sBAAsB,EAAE;;IAGvB,sBAAsB,GAAA;QAC5B,qBAAqB,CAAC,MAAK;AACzB,YAAA,MAAM,YAAY,GAAG,CAAA,EAAA,EAAK,IAAI,CAAC,OAAO,EAAE;YACxC,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,eAAe,CAAC;AAEjE,YAAA,eAAe,CAAC,OAAO,CAAC,cAAc,IAAG;AACvC,gBAAA,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;gBAC1C,cAAc,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC;AACtD,aAAC,CAAC;AACJ,SAAC,CAAC;;AAGJ,IAAA,IAAY,YAAY,GAAA;QACtB,OAAO;AACL,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,CAAC,aAAa,IAAI,CAAC,GAAG,CAAE,CAAA,GAAG,IAAI;SAChC;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1BA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACV,CACA;;;;;;;;","names":["h","Host"],"sources":["src/components/spw-list/spw-list.scss?tag=spw-list&encapsulation=shadow","src/components/spw-list/spw-list.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.spw-list {\n display: flex;\n flex-direction: column;\n &--small {\n gap: 12px;\n }\n &--medium {\n gap: 24px;\n }\n &--large {\n gap: 32px;\n }\n}\n","import { Component, Prop, Element, Listen, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list',\n styleUrl: 'spw-list.scss',\n shadow: true,\n})\nexport class SpwList {\n @Element() el: HTMLSpwListElement;\n /** Spécifie l'écart entre les éléments de liste */\n @Prop() gap?: 'small' | 'medium' | 'large' = 'medium';\n /** Permet de choisir la surface d'arrière-plan de la liste */\n @Prop() surface?: 'light' | 'dark' = 'light';\n\n componentWillLoad() {\n this.applyVariantToChildren();\n }\n\n @Listen('slotchange')\n slotChanged() {\n this.applyVariantToChildren();\n }\n\n private applyVariantToChildren() {\n requestAnimationFrame(() => {\n const variantClass = `--${this.surface}`;\n const contentElements = this.el.querySelectorAll('spw-list-item');\n\n contentElements.forEach(contentElement => {\n contentElement.classList.add(variantClass);\n contentElement.setAttribute('surface', this.surface);\n });\n });\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list': true,\n [`spw-list--${this.gap}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <ul class={this.elementClass}>\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"spw-list.entry.cjs.js","sources":["src/components/spw-list/spw-list.scss?tag=spw-list&encapsulation=shadow","src/components/spw-list/spw-list.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.spw-list {\n display: flex;\n flex-direction: column;\n &--small {\n gap: 12px;\n }\n &--medium {\n gap: 24px;\n }\n &--large {\n gap: 32px;\n }\n}\n","import { Component, Prop, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list',\n styleUrl: 'spw-list.scss',\n shadow: true,\n})\nexport class SpwList {\n /** Spécifie l'écart entre les éléments de liste */\n @Prop() gap?: 'small' | 'medium' | 'large' = 'medium';\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list': true,\n [`spw-list--${this.gap}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <ul class={this.elementClass}>\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,UAAU,GAAG,wsFAAwsF;;MCO9sF,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAOU,QAAA,IAAG,CAAA,GAAA,GAAkC,QAAQ;AAkBtD;AAhBC,IAAA,IAAY,YAAY,GAAA;QACtB,OAAO;AACL,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,CAAC,aAAa,IAAI,CAAC,GAAG,CAAE,CAAA,GAAG,IAAI;SAChC;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1BA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACV,CACA;;;;;;;"}
1
+ {"version":3,"file":"spw-list.entry.cjs.js","sources":["src/components/spw-list/spw-list.scss?tag=spw-list&encapsulation=shadow","src/components/spw-list/spw-list.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.spw-list {\n display: flex;\n flex-direction: column;\n &--small {\n gap: 12px;\n }\n &--medium {\n gap: 24px;\n }\n &--large {\n gap: 32px;\n }\n}\n","import { Component, Prop, Element, Listen, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'spw-list',\n styleUrl: 'spw-list.scss',\n shadow: true,\n})\nexport class SpwList {\n @Element() el: HTMLSpwListElement;\n /** Spécifie l'écart entre les éléments de liste */\n @Prop() gap?: 'small' | 'medium' | 'large' = 'medium';\n /** Permet de choisir la surface d'arrière-plan de la liste */\n @Prop() surface?: 'light' | 'dark' = 'light';\n\n componentWillLoad() {\n this.applyVariantToChildren();\n }\n\n @Listen('slotchange')\n slotChanged() {\n this.applyVariantToChildren();\n }\n\n private applyVariantToChildren() {\n requestAnimationFrame(() => {\n const variantClass = `--${this.surface}`;\n const contentElements = this.el.querySelectorAll('spw-list-item');\n\n contentElements.forEach(contentElement => {\n contentElement.classList.add(variantClass);\n contentElement.setAttribute('surface', this.surface);\n });\n });\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-list': true,\n [`spw-list--${this.gap}`]: true,\n };\n }\n\n render() {\n return (\n <Host>\n <ul class={this.elementClass}>\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,UAAU,GAAG,wsFAAwsF;;MCO9sF,OAAO,GAAA,MAAA;AALpB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAQU,QAAA,IAAG,CAAA,GAAA,GAAkC,QAAQ;;AAE7C,QAAA,IAAO,CAAA,OAAA,GAAsB,OAAO;AAuC7C;IArCC,iBAAiB,GAAA;QACf,IAAI,CAAC,sBAAsB,EAAE;;IAI/B,WAAW,GAAA;QACT,IAAI,CAAC,sBAAsB,EAAE;;IAGvB,sBAAsB,GAAA;QAC5B,qBAAqB,CAAC,MAAK;AACzB,YAAA,MAAM,YAAY,GAAG,CAAA,EAAA,EAAK,IAAI,CAAC,OAAO,EAAE;YACxC,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,eAAe,CAAC;AAEjE,YAAA,eAAe,CAAC,OAAO,CAAC,cAAc,IAAG;AACvC,gBAAA,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;gBAC1C,cAAc,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC;AACtD,aAAC,CAAC;AACJ,SAAC,CAAC;;AAGJ,IAAA,IAAY,YAAY,GAAA;QACtB,OAAO;AACL,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,CAAC,aAAa,IAAI,CAAC,GAAG,CAAE,CAAA,GAAG,IAAI;SAChC;;IAGH,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAE,IAAI,CAAC,YAAY,EAAA,EAC1BA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACV,CACA;;;;;;;;"}
@@ -138,7 +138,7 @@ const KEYFRAMES = {
138
138
  ],
139
139
  };
140
140
 
141
- const spwModalCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.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;-webkit-text-decoration:underline dotted;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:-.25em}sup{top:-.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}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .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}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@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)}}.spw-modal{align-items:center;display:none;height:100%;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:1060}.spw-modal--opened{display:flex}.spw-modal__overlay{background:#000;height:100%;left:0;opacity:.7;position:absolute;top:0;width:100%;z-index:0}.spw-modal__content-container{align-items:stretch;background-color:#fff;border-radius:var(--spw-spacings-border-radius-lg);box-shadow:var(--spw-effect-elevation-6);box-sizing:border-box;display:flex;justify-content:center;overflow:hidden;position:absolute;width:90%}.spw-modal__content-container--small{max-width:480px}.spw-modal__content-container--medium{max-width:600px}.spw-modal__content-container--large{max-width:768px}.spw-modal__content-container--fluid{max-width:100%}.spw-modal__content{border:1px solid var(--spw-color-themes-grey-grey-300);display:flex;flex-direction:column;max-height:90vh;overflow-y:auto;width:100%}.spw-modal--sticky-buttons .spw-modal__content{overflow-y:visible}.spw-modal__icon-container{align-items:center;align-self:stretch;background-color:#fff;display:flex;justify-content:center;width:32px}.spw-modal__header{align-items:center;border-radius:1px 1px 0 0;box-sizing:border-box;color:var(--spw-colors-support-grey-grey-900);display:flex;justify-content:space-between;margin-bottom:12px;margin-top:6px;padding:24px 24px 0}.spw-modal__caption{word-wrap:break-word;overflow:hidden;white-space:pre-wrap}.spw-modal__header h2{color:var(--spw-colors-support-grey-grey-900);font-size:18px;margin:0}.spw-modal__header button{background:none;border:none;cursor:pointer;font-size:1.5em;padding:0}.spw-modal__close-button{cursor:pointer;font-size:21px;position:absolute;right:12px;top:12px}.spw-modal__close-button:hover{opacity:.7}.spw-modal__body{box-sizing:border-box;color:var(--spw-colors-support-grey-grey-700);flex:1;font-size:16px;margin-bottom:12px;padding:0 24px}.spw-modal--sticky-buttons .spw-modal__body{overflow-y:auto}.spw-modal__buttons ::slotted([slot=buttons]){padding:12px 24px 24px}.spw-modal__footer--buttons-present ::slotted(*){display:flex;gap:12px;justify-content:flex-end;padding:8px 24px 24px}.spw-modal__content-container--small .spw-modal__footer--buttons-present ::slotted(*){flex-direction:column;gap:8px}.spw-modal__content-container--medium .spw-modal__footer--buttons-present ::slotted(*){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.spw-modal__border{align-items:center;display:flex;flex-grow:1;font-size:1.5em;justify-content:center;width:100%}";
141
+ const spwModalCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.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;-webkit-text-decoration:underline dotted;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:-.25em}sup{top:-.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}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .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}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@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)}}.spw-modal{align-items:center;display:none;height:100%;justify-content:center;left:0;overflow-y:auto;position:fixed;top:0;width:100%;z-index:1060}.spw-modal--opened{display:flex}.spw-modal__overlay{background:#000;height:100%;left:0;opacity:.7;position:absolute;top:0;width:100%;z-index:0}.spw-modal__content-container{align-items:stretch;background-color:#fff;border-radius:var(--spw-spacings-border-radius-lg);box-shadow:var(--spw-effect-elevation-6);box-sizing:border-box;display:flex;justify-content:center;overflow:hidden;position:absolute;width:90%}.spw-modal__content-container--small{max-width:480px}.spw-modal__content-container--medium{max-width:600px}.spw-modal__content-container--large{max-width:768px}.spw-modal__content-container--fluid{max-width:100%}.spw-modal__content{border:1px solid var(--spw-color-themes-grey-grey-300);display:flex;flex-direction:column;max-height:90vh;overflow-y:auto;width:100%}.spw-modal--sticky-buttons .spw-modal__content{overflow-y:visible}.spw-modal__icon-container{align-items:center;align-self:stretch;background-color:#fff;display:flex;justify-content:center;width:32px}.spw-modal__header{align-items:center;border-radius:1px 1px 0 0;box-sizing:border-box;color:var(--spw-colors-support-grey-grey-900);display:flex;justify-content:space-between;margin-bottom:12px;margin-top:6px;padding:24px 24px 0}.spw-modal__caption{word-wrap:break-word;overflow:hidden;white-space:pre-wrap}.spw-modal__header h2{color:var(--spw-colors-support-grey-grey-900);font-size:18px;margin:0}.spw-modal__header button{background:none;border:none;cursor:pointer;font-size:1.5em;padding:0}.spw-modal__close-button{cursor:pointer;font-size:21px;position:absolute;right:12px;top:12px}.spw-modal__close-button:hover{opacity:.7}.spw-modal__body{box-sizing:border-box;color:var(--spw-colors-support-grey-grey-700);flex:1;font-size:16px;margin-bottom:12px;padding:0 24px}.spw-modal--sticky-buttons .spw-modal__body{overflow-y:auto}.spw-modal__buttons{padding-top:12px}.spw-modal__buttons ::slotted([slot=buttons]){padding:0 24px 24px}.spw-modal__footer--buttons-present ::slotted(*){display:flex;gap:12px;justify-content:flex-end;padding:8px 24px 24px}.spw-modal__content-container--small .spw-modal__footer--buttons-present ::slotted(*){flex-direction:column;gap:8px}.spw-modal__content-container--medium .spw-modal__footer--buttons-present ::slotted(*){display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.spw-modal__border{align-items:center;display:flex;flex-grow:1;font-size:1.5em;justify-content:center;width:100%}";
142
142
 
143
143
  const SpwModal = class {
144
144
  constructor(hostRef) {
@@ -256,6 +256,7 @@ const SpwModal = class {
256
256
  }
257
257
  }
258
258
  close() {
259
+ this.stopAllVideos();
259
260
  try {
260
261
  const anim = animationTo(this.modalContainer, KEYFRAMES.fadeOut, {
261
262
  duration: 200,
@@ -270,6 +271,12 @@ const SpwModal = class {
270
271
  this.spwModalClose.emit();
271
272
  }
272
273
  }
274
+ stopAllVideos() {
275
+ const iframes = this.hostElement.querySelectorAll('iframe');
276
+ iframes.forEach(iframe => {
277
+ iframe.src = iframe.src;
278
+ });
279
+ }
273
280
  doBeforeClose(trigger) {
274
281
  const triggers = [];
275
282
  triggers.push(trigger);
@@ -294,7 +301,7 @@ const SpwModal = class {
294
301
  };
295
302
  }
296
303
  render() {
297
- return (index.h(index.Host, { key: 'ef3f979574368eb716f783a10b0df51de505844d' }, index.h("div", { key: 'd3de3986ed767588fbbc33771f5a2ec96950c814', ref: el => (this.modalContainer = el), class: this.elementClass }, index.h("div", { key: 'e838b0d47874973d88bd325cadafcbccecd62e71', class: "spw-modal__overlay", onClick: () => this.handleOverlayClick() }), index.h("div", { key: '959a56f373b62d3905ca072f842270d50f7974e9', "data-focus-trap-edge": true, onFocus: this.handleTopFocus, tabindex: "0" }), index.h("div", { key: '5a4e4d7e92007969e2bdfbccb8a30901448edaa4', class: `spw-modal__content-container spw-modal__content-container--${this.size}`, role: "dialog", "aria-modal": "true", "aria-label": this.caption }, index.h("div", { key: 'ff3c6bd78a3aa647a5fc10b007219bfa0a406fbc', class: "spw-modal__content" }, index.h("div", { key: '78448d8952820d8d1b32c8633642daca6e6eaa61', class: "spw-modal__header" }, index.h("h2", { key: '64cd4b7a37899ff59b94cdfaeb24841c185ff68d', class: "spw-modal__caption" }, this.caption), this.showCloseButton && (index.h("spw-icon", { key: '6ccf7739a69cc24dd7d05ee73851bdc9391e63d0', class: "spw-modal__close-button", ref: el => (this.closeButton = el), icon: "fa-xmark", onClick: () => this.doBeforeClose('CLOSE_BUTTON') }))), index.h("div", { key: '588bb35bb2dc1cdff8d85911851fa3acbd2e36c4', class: "spw-modal__body" }, index.h("slot", { key: 'b9e689f2f08aa6456eaeb4481ac09bf7841ded24', name: "content" })), index.h("div", { key: '7d66d94b7de6b109d9897d44329c897822f70179', class: "spw-modal__buttons" }, index.h("slot", { key: '052f64558204a71b45cf367026c5213939645ba4', name: "buttons" })))), index.h("div", { key: '65632a2bcb8d66ab99f45a20e159caaf44a3cec7', "data-focus-trap-edge": true, onFocus: this.handleBottomFocus, tabindex: "0" }))));
304
+ return (index.h(index.Host, { key: '48c698e01ba5d0545c04246eaddbde29a9cae6b9' }, index.h("div", { key: 'a82e49fb97ee9d19dd1fc4fcde824e408cbdef09', ref: el => (this.modalContainer = el), class: this.elementClass }, index.h("div", { key: '35eb6c15f52d877cf0089904238651f39d66c964', class: "spw-modal__overlay", onClick: () => this.handleOverlayClick() }), index.h("div", { key: 'cff9c1866bfba1349853f075868ae1cddb8f4a03', "data-focus-trap-edge": true, onFocus: this.handleTopFocus, tabindex: "0" }), index.h("div", { key: '44c011464dbea7f7e41c33d36c703689f0953dff', class: `spw-modal__content-container spw-modal__content-container--${this.size}`, role: "dialog", "aria-modal": "true", "aria-label": this.caption }, index.h("div", { key: '2b8c969ed7a5d0ff31b1993ba3cf6582dcfd3a4a', class: "spw-modal__content" }, index.h("div", { key: '9a8857bfae65ab5faa7df24591090a073e7b8a7f', class: "spw-modal__header" }, index.h("h2", { key: 'adb8a929be3706f248767beac148efd1c5ab02ba', class: "spw-modal__caption" }, this.caption), this.showCloseButton && (index.h("spw-icon", { key: '0a295da24d9deec49c7cb6dca7c9b02478aaedf8', class: "spw-modal__close-button", ref: el => (this.closeButton = el), icon: "fa-xmark", onClick: () => this.doBeforeClose('CLOSE_BUTTON') }))), index.h("div", { key: '81a2f2838737c49291eea6c571db70d2c5858141', class: "spw-modal__body" }, index.h("slot", { key: '2641d4d98bb5e4b3a2bd0b4fcff1587a7e071337', name: "content" })), index.h("div", { key: '640ae662d1b7e4a9d3fac0abe71a6e548d80a298', class: "spw-modal__buttons" }, index.h("slot", { key: '1cc48d97165b66e05dc2cce809ac9b66f9893a64', name: "buttons" })))), index.h("div", { key: 'c6bf055784ae5808d82b0fea5fac6e34ca9d9eca', "data-focus-trap-edge": true, onFocus: this.handleBottomFocus, tabindex: "0" }))));
298
305
  }
299
306
  get hostElement() { return index.getElement(this); }
300
307
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"spw-modal.entry.cjs.js","mappings":";;;;AAAA;;AAEG;AAEH;;;;;;;;;;;AAWG;AACa,SAAA,eAAe,CAC7B,IAA8B,EAC9B,QAAyC,EACzC,OAAwC,EACxC,QAAA,GAAmB,EAAE,EACrB,QAAgB,CAAC,EAAA;IAEjB,MAAM,OAAO,GAAkB,EAAE;;AAGjC,IAAA,IAAI,KAAK,IAAI,QAAQ,EAAE;AACrB,QAAA,OAAO,OAAO;;;AAIhB,IAAA,MAAM,YAAY,GAAG,CAAC,KAAsB,KAAI;;;AAG9C,QA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components/spw-modal/spw-modal.tsx"],"sourcesContent":["/**\n * Copy/pasted from https://github.com/andreasbm/focus-trap\n */\n\n/**\n * Traverses the slots of the open shadowroots and returns all children matching the query.\n * We need to traverse each child-depth one at a time because if an element should be skipped\n * (for example because it is hidden) we need to skip all of it's children. If we use querySelectorAll(\"*\")\n * the information of whether the children is within a hidden parent is lost.\n * @param {ShadowRoot | HTMLElement} root\n * @param skipNode\n * @param isMatch\n * @param {number} maxDepth\n * @param {number} depth\n * @returns {HTMLElement[]}\n */\nexport function queryShadowRoot(\n root: ShadowRoot | HTMLElement,\n skipNode: ($elem: HTMLElement) => boolean,\n isMatch: ($elem: HTMLElement) => boolean,\n maxDepth: number = 20,\n depth: number = 0,\n): HTMLElement[] {\n const matches: HTMLElement[] = [];\n\n // If the depth is above the max depth, abort the searching here.\n if (depth >= maxDepth) {\n return matches;\n }\n\n // Traverses a slot element\n const traverseSlot = ($slot: HTMLSlotElement) => {\n // Only check nodes that are of the type Node.ELEMENT_NODE\n // Read more here https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const assignedNodes = $slot.assignedNodes().filter(node => node.nodeType === 1);\n if (assignedNodes.length > 0) {\n const $slotParent = assignedNodes[0].parentElement!;\n return queryShadowRoot($slotParent, skipNode, isMatch, maxDepth, depth + 1);\n }\n\n return [];\n };\n\n // Go through each child and continue the traversing if necessary\n // Even though the typing says that children can't be undefined, Edge 15 sometimes gives an undefined value.\n // Therefore we fallback to an empty array if it is undefined.\n const children = Array.from(root.children || []) as HTMLElement[];\n for (const $child of children) {\n // Check if the element and its descendants should be skipped\n if (skipNode($child)) {\n // console.log('-- SKIP', $child);\n continue;\n }\n\n // console.log('$child', $child);\n\n // If the element matches we always add it\n if (isMatch($child)) {\n matches.push($child);\n }\n\n if ($child.shadowRoot != null) {\n // If the element has a shadow root we need to traverse it\n matches.push(...queryShadowRoot($child.shadowRoot, skipNode, isMatch, maxDepth, depth + 1));\n } else if ($child.tagName === 'SLOT') {\n // If the child is a slot we need to traverse each assigned node\n matches.push(...traverseSlot($child as HTMLSlotElement));\n } else {\n // Traverse the children of the element\n matches.push(...queryShadowRoot($child, skipNode, isMatch, maxDepth, depth + 1));\n }\n }\n\n return matches;\n}\n\n/**\n * Returns whether the element is hidden.\n * @param $elem\n */\nexport function isHidden($elem: HTMLElement): boolean {\n return (\n $elem.hasAttribute('hidden') ||\n ($elem.hasAttribute('aria-hidden') && $elem.getAttribute('aria-hidden') !== 'false') ||\n // A quick and dirty way to check whether the element is hidden.\n // For a more fine-grained check we could use \"window.getComputedStyle\" but we don't because of bad performance.\n // If the element has visibility set to \"hidden\" or \"collapse\", display set to \"none\" or opacity set to \"0\" through CSS\n // we won't be able to catch it here. We accept it due to the huge performance benefits.\n $elem.style.display === `none` ||\n $elem.style.opacity === `0` ||\n $elem.style.visibility === `hidden` ||\n $elem.style.visibility === `collapse`\n );\n\n // If offsetParent is null we can assume that the element is hidden\n // https://stackoverflow.com/questions/306305/what-would-make-offsetparent-null\n // || $elem.offsetParent == null;\n}\n\n/**\n * Returns whether the element is disabled.\n * @param $elem\n */\nexport function isDisabled($elem: HTMLElement): boolean {\n return $elem.hasAttribute('disabled') || ($elem.hasAttribute('aria-disabled') && $elem.getAttribute('aria-disabled') !== 'false');\n}\n\n/**\n * Determines whether an element is focusable.\n * Read more here: https://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus/1600194#1600194\n * Or here: https://stackoverflow.com/questions/18261595/how-to-check-if-a-dom-element-is-focusable\n * @param $elem\n */\nexport function isFocusable($elem: HTMLElement): boolean {\n // Discard elements that are removed from the tab order.\n if ($elem.getAttribute('tabindex') === '-1' || isHidden($elem) || isDisabled($elem)) {\n return false;\n }\n\n return (\n // At this point we know that the element can have focus (eg. won't be -1) if the tabindex attribute exists\n $elem.hasAttribute('tabindex') ||\n // Anchor tags or area tags with a href set\n (($elem instanceof HTMLAnchorElement || $elem instanceof HTMLAreaElement) && $elem.hasAttribute('href')) ||\n // Form elements which are not disabled\n $elem instanceof HTMLButtonElement ||\n $elem instanceof HTMLInputElement ||\n $elem instanceof HTMLTextAreaElement ||\n $elem instanceof HTMLSelectElement ||\n // IFrames\n $elem instanceof HTMLIFrameElement\n );\n}\n","export function animationTo(element: HTMLElement, keyframes: Keyframe | Keyframe[], options?: KeyframeAnimationOptions) {\n const animated = element.animate(keyframes, { ...options, fill: 'both' });\n animated.addEventListener('finish', () => {\n // @ts-ignore\n animated.commitStyles();\n animated.cancel();\n });\n\n return animated;\n}\n\nconst keyframeDefaults = {\n easing: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n};\n\nexport const KEYFRAMES = {\n fadeIn: [\n {\n offset: 0,\n ...keyframeDefaults,\n opacity: 0,\n },\n {\n offset: 1,\n ...keyframeDefaults,\n opacity: 1,\n },\n ],\n fadeOut: [\n {\n offset: 0,\n ...keyframeDefaults,\n opacity: 1,\n },\n {\n offset: 1,\n ...keyframeDefaults,\n opacity: 0,\n },\n ],\n};\n",":host {\n display: contents;\n}\n\n.spw-modal {\n display: none;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1060;\n overflow-y: auto;\n\n &--opened {\n display: flex;\n }\n}\n\n.spw-modal__overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: black;\n opacity: 0.7;\n z-index: 0;\n}\n\n.spw-modal__content-container {\n position: absolute;\n display: flex;\n justify-content: center;\n width: 90%;\n background-color: #fff;\n box-shadow: var(--spw-effect-elevation-6);\n overflow: hidden;\n box-sizing: border-box;\n align-items: stretch;\n border-radius: var(--spw-spacings-border-radius-lg);\n\n &--small {\n max-width: 480px;\n }\n\n &--medium {\n max-width: 600px;\n }\n\n &--large {\n max-width: 768px;\n }\n\n &--fluid {\n max-width: 100%;\n }\n}\n\n.spw-modal__content {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--spw-color-themes-grey-grey-300);\n width: 100%;\n max-height: 90vh;\n overflow-y: auto;\n\n .spw-modal--sticky-buttons & {\n overflow-y: visible;\n }\n}\n\n.spw-modal__icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n background-color: #fff;\n align-self: stretch;\n}\n\n.spw-modal__header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 24px;\n padding-bottom: 0;\n margin-top: 6px;\n margin-bottom: 12px;\n box-sizing: border-box;\n border-radius: 1px 1px 0px 0px;\n color: var(--spw-colors-support-grey-grey-900);\n}\n\n.spw-modal__caption {\n overflow: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n.spw-modal__header h2 {\n margin: 0;\n font-size: 18px;\n color: var(--spw-colors-support-grey-grey-900);\n}\n\n.spw-modal__header button {\n background: none;\n border: none;\n font-size: 1.5em;\n padding: 0;\n cursor: pointer;\n}\n\n.spw-modal__close-button {\n position: absolute;\n top: 12px;\n right: 12px;\n cursor: pointer;\n font-size: 21px;\n &:hover {\n opacity: 0.7;\n }\n}\n\n.spw-modal__body {\n padding: 0 24px;\n margin-bottom: 12px;\n box-sizing: border-box;\n flex: 1;\n font-size: 16px;\n color: var(--spw-colors-support-grey-grey-700);\n\n .spw-modal--sticky-buttons & {\n overflow-y: auto;\n }\n}\n\n.spw-modal__buttons {\n ::slotted([slot='buttons']) {\n padding: 24px;\n padding-top: 12px;\n }\n}\n\n.spw-modal__footer--buttons-present ::slotted(*) {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 24px;\n padding-top: 8px;\n\n .spw-modal__content-container--small & {\n flex-direction: column;\n gap: 8px;\n }\n\n .spw-modal__content-container--medium & {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n\n.spw-modal__border {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n font-size: 1.5em;\n flex-grow: 1;\n}\n","import { Component, Prop, Element, State, Event, Host, EventEmitter, h, Watch, Method } from '@stencil/core';\nimport { queryShadowRoot, isHidden, isFocusable } from '@utils/focus-trap';\nimport { animationTo, KEYFRAMES } from '@utils/animation';\n\ntype CloseEventTrigger = 'CLOSE_BUTTON' | 'ESCAPE_KEY' | 'BACKDROP' | 'PROGRAMMATIC';\n\nexport interface BeforeCloseEventDetail {\n trigger: CloseEventTrigger;\n}\n\n@Component({\n tag: 'spw-modal',\n styleUrl: 'spw-modal.scss',\n shadow: true,\n})\nexport class SpwModal {\n /** Indique si la modal est ouverte ou fermée, mutable et reflétée dans le DOM */\n @Prop({ reflect: true, mutable: true }) opened?: boolean = false;\n\n @State() showModal: boolean = this.opened || false;\n\n /** Titre de la modal */\n @Prop() caption: string = 'Titre de la modal';\n /** Indique si la fermeture de la modal est possible en cliquant sur l'overlay */\n @Prop() closeOnOverlayClick: boolean = true;\n /** Rend les boutons en bas de la modal \"collants\" (toujours visibles) si vrai */\n @Prop() stickyButtons: boolean = false;\n /** Événement déclenché lors de l'ouverture de la modal */\n @Event() spwModalOpen: EventEmitter;\n /** Événement déclenché lors de la fermeture de la modal */\n @Event() spwModalClose: EventEmitter;\n /** Définit la taille de la modal : 'small', 'medium', 'large' ou 'fluid' */\n @Prop() size: 'small' | 'medium' | 'large' | 'fluid' = 'small';\n /** Icône d'alerte à afficher dans la modal */\n @Prop() alertIcon: string = '';\n\n @Element() hostElement: HTMLSpwModalElement;\n\n @State() slotButtonsPresent: boolean = false;\n\n /** Indique si le bouton de fermeture est visible */\n @Prop() showCloseButton: boolean = true;\n\n private modalContainer: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n private closeButton: HTMLSpwIconElement;\n\n /**\n * Méthode publique pour fermer la modal programmatiquement\n * @returns Promise qui se résout quand la modal est fermée\n */\n @Method()\n async closeModal(): Promise<void> {\n this.doBeforeClose('PROGRAMMATIC');\n }\n\n /**\n * Méthode publique pour ouvrir la modal programmatiquement\n * @returns Promise qui se résout quand la modal est ouverte\n */\n @Method()\n async openModal(): Promise<void> {\n this.opened = true;\n }\n\n componentDidLoad() {\n this.focusableElements = queryShadowRoot(this.hostElement.shadowRoot, el => isHidden(el) || el.matches('[data-focus-trap-edge]'), isFocusable);\n window.addEventListener('click', this.handleClick, { capture: true });\n window.addEventListener('click', this.handleClose, { capture: true });\n window.addEventListener('keydown', this.handleKeypress);\n }\n\n disconnectedCallback() {\n window.removeEventListener('click', this.handleClick);\n window.removeEventListener('click', this.handleClose);\n window.removeEventListener('keydown', this.handleKeypress);\n }\n\n private handleClick = (event: MouseEvent) => {\n const path = event.composedPath() as HTMLElement[];\n const trigger = path.find(el => el instanceof HTMLElement && el.hasAttribute?.('data-modal-trigger')) as HTMLElement | undefined;\n\n if (trigger) {\n const modalId = trigger.getAttribute('data-modal-trigger');\n if (modalId === this.hostElement.id) {\n this.opened = true;\n }\n }\n };\n\n private handleClose = (event: MouseEvent) => {\n const path = event.composedPath() as HTMLElement[];\n const trigger = path.find(el => el instanceof HTMLElement && el.hasAttribute?.('data-modal-close')) as HTMLElement | undefined;\n\n if (trigger) {\n const modalId = trigger.getAttribute('data-modal-close');\n if (modalId === this.hostElement.id) {\n this.opened = false;\n }\n }\n };\n\n private getFirstFocusableElement(): HTMLElement | null {\n return this.focusableElements[0];\n }\n\n private getLastFocusableElement(): HTMLElement | null {\n return this.focusableElements[this.focusableElements.length - 1];\n }\n\n private handleTopFocus = () => {\n this.attemptFocus(this.getLastFocusableElement());\n };\n\n private handleBottomFocus = () => {\n this.attemptFocus(this.getFirstFocusableElement());\n };\n\n private attemptFocus(element: HTMLElement | null) {\n if (element == null) {\n setTimeout(() => {\n this.closeButton.focus();\n });\n return;\n }\n\n setTimeout(() => {\n element.focus();\n }, 0);\n }\n\n private open() {\n this.showModal = true;\n try {\n const anim = animationTo(this.modalContainer, KEYFRAMES.fadeIn, {\n duration: 200,\n });\n anim.addEventListener('finish', () => {\n setTimeout(() => {\n this.getLastFocusableElement()?.focus();\n this.getLastFocusableElement()?.blur();\n }, 0);\n\n this.spwModalOpen.emit();\n });\n } catch (err) {\n this.spwModalOpen.emit();\n }\n }\n\n private close() {\n try {\n const anim = animationTo(this.modalContainer, KEYFRAMES.fadeOut, {\n duration: 200,\n });\n anim.addEventListener('finish', () => {\n this.showModal = false;\n this.spwModalClose.emit();\n });\n } catch (err) {\n this.showModal = false;\n this.spwModalClose.emit();\n }\n }\n\n private handleKeypress = (event: KeyboardEvent) => {\n if (this.showModal && event.key === 'Escape') {\n this.doBeforeClose('ESCAPE_KEY');\n }\n };\n\n private doBeforeClose(trigger: CloseEventTrigger) {\n const triggers = [];\n triggers.push(trigger);\n const prevented = triggers.some(event => event.defaultPrevented);\n if (!prevented) {\n this.opened = false;\n }\n }\n\n @Watch('opened')\n openedChanged(newValue: boolean) {\n newValue === true ? this.open() : this.close();\n }\n\n private handleOverlayClick() {\n if (this.closeOnOverlayClick) {\n this.doBeforeClose('BACKDROP');\n }\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-modal': true,\n 'spw-modal--opened': this.showModal,\n 'spw-modal--sticky-buttons': this.stickyButtons,\n };\n }\n\n render() {\n return (\n <Host>\n <div ref={el => (this.modalContainer = el)} class={this.elementClass}>\n <div class=\"spw-modal__overlay\" onClick={() => this.handleOverlayClick()}></div>\n <div data-focus-trap-edge onFocus={this.handleTopFocus} tabindex=\"0\"></div>\n <div class={`spw-modal__content-container spw-modal__content-container--${this.size}`} role=\"dialog\" aria-modal=\"true\" aria-label={this.caption}>\n <div class=\"spw-modal__content\">\n <div class=\"spw-modal__header\">\n <h2 class=\"spw-modal__caption\">{this.caption}</h2>\n {this.showCloseButton && (\n <spw-icon class=\"spw-modal__close-button\" ref={el => (this.closeButton = el)} icon=\"fa-xmark\" onClick={() => this.doBeforeClose('CLOSE_BUTTON')}></spw-icon>\n )}\n </div>\n <div class=\"spw-modal__body\">\n <slot name=\"content\" />\n </div>\n <div class=\"spw-modal__buttons\">\n <slot name=\"buttons\"></slot>\n </div>\n </div>\n </div>\n <div data-focus-trap-edge onFocus={this.handleBottomFocus} tabindex=\"0\"></div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+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C,iBAAiB,EAAA,EAC1BA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAG,CACnB,EACNA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oBAAoB,EAAA,EAC7BA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAQ,CAAA,CACxB,CACF,CACF,EACNA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,sBAAA,EAAA,IAAA,EAA0B,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,EAAC,GAAG,EAAA,CAAO,CAC1E,CACD;;;;;;;;;;;","names":["h","Host"],"sources":["src/utils/focus-trap.ts","src/utils/animation.ts","src/components/spw-modal/spw-modal.scss?tag=spw-modal&encapsulation=shadow","src/components/spw-modal/spw-modal.tsx"],"sourcesContent":["/**\n * Copy/pasted from https://github.com/andreasbm/focus-trap\n */\n\n/**\n * Traverses the slots of the open shadowroots and returns all children matching the query.\n * We need to traverse each child-depth one at a time because if an element should be skipped\n * (for example because it is hidden) we need to skip all of it's children. If we use querySelectorAll(\"*\")\n * the information of whether the children is within a hidden parent is lost.\n * @param {ShadowRoot | HTMLElement} root\n * @param skipNode\n * @param isMatch\n * @param {number} maxDepth\n * @param {number} depth\n * @returns {HTMLElement[]}\n */\nexport function queryShadowRoot(\n root: ShadowRoot | HTMLElement,\n skipNode: ($elem: HTMLElement) => boolean,\n isMatch: ($elem: HTMLElement) => boolean,\n maxDepth: number = 20,\n depth: number = 0,\n): HTMLElement[] {\n const matches: HTMLElement[] = [];\n\n // If the depth is above the max depth, abort the searching here.\n if (depth >= maxDepth) {\n return matches;\n }\n\n // Traverses a slot element\n const traverseSlot = ($slot: HTMLSlotElement) => {\n // Only check nodes that are of the type Node.ELEMENT_NODE\n // Read more here https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const assignedNodes = $slot.assignedNodes().filter(node => node.nodeType === 1);\n if (assignedNodes.length > 0) {\n const $slotParent = assignedNodes[0].parentElement!;\n return queryShadowRoot($slotParent, skipNode, isMatch, maxDepth, depth + 1);\n }\n\n return [];\n };\n\n // Go through each child and continue the traversing if necessary\n // Even though the typing says that children can't be undefined, Edge 15 sometimes gives an undefined value.\n // Therefore we fallback to an empty array if it is undefined.\n const children = Array.from(root.children || []) as HTMLElement[];\n for (const $child of children) {\n // Check if the element and its descendants should be skipped\n if (skipNode($child)) {\n // console.log('-- SKIP', $child);\n continue;\n }\n\n // console.log('$child', $child);\n\n // If the element matches we always add it\n if (isMatch($child)) {\n matches.push($child);\n }\n\n if ($child.shadowRoot != null) {\n // If the element has a shadow root we need to traverse it\n matches.push(...queryShadowRoot($child.shadowRoot, skipNode, isMatch, maxDepth, depth + 1));\n } else if ($child.tagName === 'SLOT') {\n // If the child is a slot we need to traverse each assigned node\n matches.push(...traverseSlot($child as HTMLSlotElement));\n } else {\n // Traverse the children of the element\n matches.push(...queryShadowRoot($child, skipNode, isMatch, maxDepth, depth + 1));\n }\n }\n\n return matches;\n}\n\n/**\n * Returns whether the element is hidden.\n * @param $elem\n */\nexport function isHidden($elem: HTMLElement): boolean {\n return (\n $elem.hasAttribute('hidden') ||\n ($elem.hasAttribute('aria-hidden') && $elem.getAttribute('aria-hidden') !== 'false') ||\n // A quick and dirty way to check whether the element is hidden.\n // For a more fine-grained check we could use \"window.getComputedStyle\" but we don't because of bad performance.\n // If the element has visibility set to \"hidden\" or \"collapse\", display set to \"none\" or opacity set to \"0\" through CSS\n // we won't be able to catch it here. We accept it due to the huge performance benefits.\n $elem.style.display === `none` ||\n $elem.style.opacity === `0` ||\n $elem.style.visibility === `hidden` ||\n $elem.style.visibility === `collapse`\n );\n\n // If offsetParent is null we can assume that the element is hidden\n // https://stackoverflow.com/questions/306305/what-would-make-offsetparent-null\n // || $elem.offsetParent == null;\n}\n\n/**\n * Returns whether the element is disabled.\n * @param $elem\n */\nexport function isDisabled($elem: HTMLElement): boolean {\n return $elem.hasAttribute('disabled') || ($elem.hasAttribute('aria-disabled') && $elem.getAttribute('aria-disabled') !== 'false');\n}\n\n/**\n * Determines whether an element is focusable.\n * Read more here: https://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus/1600194#1600194\n * Or here: https://stackoverflow.com/questions/18261595/how-to-check-if-a-dom-element-is-focusable\n * @param $elem\n */\nexport function isFocusable($elem: HTMLElement): boolean {\n // Discard elements that are removed from the tab order.\n if ($elem.getAttribute('tabindex') === '-1' || isHidden($elem) || isDisabled($elem)) {\n return false;\n }\n\n return (\n // At this point we know that the element can have focus (eg. won't be -1) if the tabindex attribute exists\n $elem.hasAttribute('tabindex') ||\n // Anchor tags or area tags with a href set\n (($elem instanceof HTMLAnchorElement || $elem instanceof HTMLAreaElement) && $elem.hasAttribute('href')) ||\n // Form elements which are not disabled\n $elem instanceof HTMLButtonElement ||\n $elem instanceof HTMLInputElement ||\n $elem instanceof HTMLTextAreaElement ||\n $elem instanceof HTMLSelectElement ||\n // IFrames\n $elem instanceof HTMLIFrameElement\n );\n}\n","export function animationTo(element: HTMLElement, keyframes: Keyframe | Keyframe[], options?: KeyframeAnimationOptions) {\n const animated = element.animate(keyframes, { ...options, fill: 'both' });\n animated.addEventListener('finish', () => {\n // @ts-ignore\n animated.commitStyles();\n animated.cancel();\n });\n\n return animated;\n}\n\nconst keyframeDefaults = {\n easing: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n};\n\nexport const KEYFRAMES = {\n fadeIn: [\n {\n offset: 0,\n ...keyframeDefaults,\n opacity: 0,\n },\n {\n offset: 1,\n ...keyframeDefaults,\n opacity: 1,\n },\n ],\n fadeOut: [\n {\n offset: 0,\n ...keyframeDefaults,\n opacity: 1,\n },\n {\n offset: 1,\n ...keyframeDefaults,\n opacity: 0,\n },\n ],\n};\n",":host {\n display: contents;\n}\n\n.spw-modal {\n display: none;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1060;\n overflow-y: auto;\n\n &--opened {\n display: flex;\n }\n}\n\n.spw-modal__overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: black;\n opacity: 0.7;\n z-index: 0;\n}\n\n.spw-modal__content-container {\n position: absolute;\n display: flex;\n justify-content: center;\n width: 90%;\n background-color: #fff;\n box-shadow: var(--spw-effect-elevation-6);\n overflow: hidden;\n box-sizing: border-box;\n align-items: stretch;\n border-radius: var(--spw-spacings-border-radius-lg);\n\n &--small {\n max-width: 480px;\n }\n\n &--medium {\n max-width: 600px;\n }\n\n &--large {\n max-width: 768px;\n }\n\n &--fluid {\n max-width: 100%;\n }\n}\n\n.spw-modal__content {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--spw-color-themes-grey-grey-300);\n width: 100%;\n max-height: 90vh;\n overflow-y: auto;\n\n .spw-modal--sticky-buttons & {\n overflow-y: visible;\n }\n}\n\n.spw-modal__icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n background-color: #fff;\n align-self: stretch;\n}\n\n.spw-modal__header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 24px;\n padding-bottom: 0;\n margin-top: 6px;\n margin-bottom: 12px;\n box-sizing: border-box;\n border-radius: 1px 1px 0px 0px;\n color: var(--spw-colors-support-grey-grey-900);\n}\n\n.spw-modal__caption {\n overflow: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n.spw-modal__header h2 {\n margin: 0;\n font-size: 18px;\n color: var(--spw-colors-support-grey-grey-900);\n}\n\n.spw-modal__header button {\n background: none;\n border: none;\n font-size: 1.5em;\n padding: 0;\n cursor: pointer;\n}\n\n.spw-modal__close-button {\n position: absolute;\n top: 12px;\n right: 12px;\n cursor: pointer;\n font-size: 21px;\n &:hover {\n opacity: 0.7;\n }\n}\n\n.spw-modal__body {\n padding: 0 24px;\n margin-bottom: 12px;\n box-sizing: border-box;\n flex: 1;\n font-size: 16px;\n color: var(--spw-colors-support-grey-grey-700);\n\n .spw-modal--sticky-buttons & {\n overflow-y: auto;\n }\n}\n\n.spw-modal__buttons {\n padding-top: 12px;\n ::slotted([slot='buttons']) {\n padding: 24px;\n padding-top: 0;\n }\n}\n\n.spw-modal__footer--buttons-present ::slotted(*) {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 24px;\n padding-top: 8px;\n\n .spw-modal__content-container--small & {\n flex-direction: column;\n gap: 8px;\n }\n\n .spw-modal__content-container--medium & {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n\n.spw-modal__border {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n font-size: 1.5em;\n flex-grow: 1;\n}\n","import { Component, Prop, Element, State, Event, Host, EventEmitter, h, Watch, Method } from '@stencil/core';\nimport { queryShadowRoot, isHidden, isFocusable } from '@utils/focus-trap';\nimport { animationTo, KEYFRAMES } from '@utils/animation';\n\ntype CloseEventTrigger = 'CLOSE_BUTTON' | 'ESCAPE_KEY' | 'BACKDROP' | 'PROGRAMMATIC';\n\nexport interface BeforeCloseEventDetail {\n trigger: CloseEventTrigger;\n}\n\n@Component({\n tag: 'spw-modal',\n styleUrl: 'spw-modal.scss',\n shadow: true,\n})\nexport class SpwModal {\n /** Indique si la modal est ouverte ou fermée, mutable et reflétée dans le DOM */\n @Prop({ reflect: true, mutable: true }) opened?: boolean = false;\n\n @State() showModal: boolean = this.opened || false;\n\n /** Titre de la modal */\n @Prop() caption: string = 'Titre de la modal';\n /** Indique si la fermeture de la modal est possible en cliquant sur l'overlay */\n @Prop() closeOnOverlayClick: boolean = true;\n /** Rend les boutons en bas de la modal \"collants\" (toujours visibles) si vrai */\n @Prop() stickyButtons: boolean = false;\n /** Événement déclenché lors de l'ouverture de la modal */\n @Event() spwModalOpen: EventEmitter;\n /** Événement déclenché lors de la fermeture de la modal */\n @Event() spwModalClose: EventEmitter;\n /** Définit la taille de la modal : 'small', 'medium', 'large' ou 'fluid' */\n @Prop() size: 'small' | 'medium' | 'large' | 'fluid' = 'small';\n /** Icône d'alerte à afficher dans la modal */\n @Prop() alertIcon: string = '';\n\n @Element() hostElement: HTMLSpwModalElement;\n\n @State() slotButtonsPresent: boolean = false;\n\n /** Indique si le bouton de fermeture est visible */\n @Prop() showCloseButton: boolean = true;\n\n private modalContainer: HTMLElement;\n private focusableElements: HTMLElement[] = [];\n private closeButton: HTMLSpwIconElement;\n\n /**\n * Méthode publique pour fermer la modal programmatiquement\n * @returns Promise qui se résout quand la modal est fermée\n */\n @Method()\n async closeModal(): Promise<void> {\n this.doBeforeClose('PROGRAMMATIC');\n }\n\n /**\n * Méthode publique pour ouvrir la modal programmatiquement\n * @returns Promise qui se résout quand la modal est ouverte\n */\n @Method()\n async openModal(): Promise<void> {\n this.opened = true;\n }\n\n componentDidLoad() {\n this.focusableElements = queryShadowRoot(this.hostElement.shadowRoot, el => isHidden(el) || el.matches('[data-focus-trap-edge]'), isFocusable);\n window.addEventListener('click', this.handleClick, { capture: true });\n window.addEventListener('click', this.handleClose, { capture: true });\n window.addEventListener('keydown', this.handleKeypress);\n }\n\n disconnectedCallback() {\n window.removeEventListener('click', this.handleClick);\n window.removeEventListener('click', this.handleClose);\n window.removeEventListener('keydown', this.handleKeypress);\n }\n\n private handleClick = (event: MouseEvent) => {\n const path = event.composedPath() as HTMLElement[];\n const trigger = path.find(el => el instanceof HTMLElement && el.hasAttribute?.('data-modal-trigger')) as HTMLElement | undefined;\n\n if (trigger) {\n const modalId = trigger.getAttribute('data-modal-trigger');\n if (modalId === this.hostElement.id) {\n this.opened = true;\n }\n }\n };\n\n private handleClose = (event: MouseEvent) => {\n const path = event.composedPath() as HTMLElement[];\n const trigger = path.find(el => el instanceof HTMLElement && el.hasAttribute?.('data-modal-close')) as HTMLElement | undefined;\n\n if (trigger) {\n const modalId = trigger.getAttribute('data-modal-close');\n if (modalId === this.hostElement.id) {\n this.opened = false;\n }\n }\n };\n\n private getFirstFocusableElement(): HTMLElement | null {\n return this.focusableElements[0];\n }\n\n private getLastFocusableElement(): HTMLElement | null {\n return this.focusableElements[this.focusableElements.length - 1];\n }\n\n private handleTopFocus = () => {\n this.attemptFocus(this.getLastFocusableElement());\n };\n\n private handleBottomFocus = () => {\n this.attemptFocus(this.getFirstFocusableElement());\n };\n\n private attemptFocus(element: HTMLElement | null) {\n if (element == null) {\n setTimeout(() => {\n this.closeButton.focus();\n });\n return;\n }\n\n setTimeout(() => {\n element.focus();\n }, 0);\n }\n\n private open() {\n this.showModal = true;\n try {\n const anim = animationTo(this.modalContainer, KEYFRAMES.fadeIn, {\n duration: 200,\n });\n anim.addEventListener('finish', () => {\n setTimeout(() => {\n this.getLastFocusableElement()?.focus();\n this.getLastFocusableElement()?.blur();\n }, 0);\n\n this.spwModalOpen.emit();\n });\n } catch (err) {\n this.spwModalOpen.emit();\n }\n }\n\n private close() {\n this.stopAllVideos();\n try {\n const anim = animationTo(this.modalContainer, KEYFRAMES.fadeOut, {\n duration: 200,\n });\n anim.addEventListener('finish', () => {\n this.showModal = false;\n this.spwModalClose.emit();\n });\n } catch (err) {\n this.showModal = false;\n this.spwModalClose.emit();\n }\n }\n\n private stopAllVideos() {\n const iframes = this.hostElement.querySelectorAll('iframe');\n iframes.forEach(iframe => {\n iframe.src = iframe.src;\n });\n }\n\n private handleKeypress = (event: KeyboardEvent) => {\n if (this.showModal && event.key === 'Escape') {\n this.doBeforeClose('ESCAPE_KEY');\n }\n };\n\n private doBeforeClose(trigger: CloseEventTrigger) {\n const triggers = [];\n triggers.push(trigger);\n const prevented = triggers.some(event => event.defaultPrevented);\n if (!prevented) {\n this.opened = false;\n }\n }\n\n @Watch('opened')\n openedChanged(newValue: boolean) {\n newValue === true ? this.open() : this.close();\n }\n\n private handleOverlayClick() {\n if (this.closeOnOverlayClick) {\n this.doBeforeClose('BACKDROP');\n }\n }\n\n private get elementClass(): { [className: string]: boolean } {\n return {\n 'spw-modal': true,\n 'spw-modal--opened': this.showModal,\n 'spw-modal--sticky-buttons': this.stickyButtons,\n };\n }\n\n render() {\n return (\n <Host>\n <div ref={el => (this.modalContainer = el)} class={this.elementClass}>\n <div class=\"spw-modal__overlay\" onClick={() => this.handleOverlayClick()}></div>\n <div data-focus-trap-edge onFocus={this.handleTopFocus} tabindex=\"0\"></div>\n <div class={`spw-modal__content-container spw-modal__content-container--${this.size}`} role=\"dialog\" aria-modal=\"true\" aria-label={this.caption}>\n <div class=\"spw-modal__content\">\n <div class=\"spw-modal__header\">\n <h2 class=\"spw-modal__caption\">{this.caption}</h2>\n {this.showCloseButton && (\n <spw-icon class=\"spw-modal__close-button\" ref={el => (this.closeButton = el)} icon=\"fa-xmark\" onClick={() => this.doBeforeClose('CLOSE_BUTTON')}></spw-icon>\n )}\n </div>\n <div class=\"spw-modal__body\">\n <slot name=\"content\" />\n </div>\n <div class=\"spw-modal__buttons\">\n <slot name=\"buttons\"></slot>\n </div>\n </div>\n </div>\n <div data-focus-trap-edge onFocus={this.handleBottomFocus} tabindex=\"0\"></div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}