@ilo-org/twig 1.1.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/LICENSE +183 -183
  2. package/dist/components/accordion/accordion.behavior.js +10 -1
  3. package/dist/components/breadcrumb/breadcrumb.behavior.js +10 -1
  4. package/dist/components/breadcrumb/breadcrumb.twig +2 -3
  5. package/dist/components/button/button.behavior.js +6 -0
  6. package/dist/components/button/button.twig +13 -8
  7. package/dist/components/callout/callout.behavior.js +10 -1
  8. package/{src/patterns/components/callout/callout.wingsuit.yml → dist/components/callout/callout.component.yml} +6 -7
  9. package/dist/components/callout/callout.twig +8 -8
  10. package/dist/components/callout/callout.wingsuit.yml +6 -7
  11. package/{src/patterns/components/checkbox/checkbox.wingsuit.yml → dist/components/checkbox/checkbox.component.yml} +6 -6
  12. package/dist/components/checkbox/checkbox.wingsuit.yml +6 -6
  13. package/{src/patterns/components/datepicker/datepicker.wingsuit.yml → dist/components/datepicker/datepicker.component.yml} +5 -5
  14. package/dist/components/datepicker/datepicker.wingsuit.yml +5 -5
  15. package/{src/patterns/components/dropdown/dropdown.wingsuit.yml → dist/components/dropdown/dropdown.component.yml} +7 -7
  16. package/dist/components/dropdown/dropdown.wingsuit.yml +7 -7
  17. package/dist/components/fileupload/fileupload.behavior.js +10 -1
  18. package/{src/patterns/components/fileupload/fileupload.wingsuit.yml → dist/components/fileupload/fileupload.component.yml} +7 -7
  19. package/dist/components/fileupload/fileupload.wingsuit.yml +7 -7
  20. package/{src/patterns/components/footer/footer.wingsuit.yml → dist/components/footer/footer.component.yml} +1 -1
  21. package/dist/components/footer/footer.wingsuit.yml +1 -1
  22. package/dist/components/icon/icon.behavior.js +687 -1
  23. package/dist/components/icon/icon.twig +0 -3
  24. package/dist/components/linklist/linklist.behavior.js +8 -1
  25. package/{src/patterns/components/list/list-item.wingsuit.yml → dist/components/list/list-item.component.yml} +2 -4
  26. package/dist/components/{list-item → list}/list-item.wingsuit.yml +2 -4
  27. package/{src/patterns/components/list/list.wingsuit.yml → dist/components/list/list.component.yml} +1 -1
  28. package/dist/components/list/list.wingsuit.yml +1 -1
  29. package/dist/components/loading/loading.behavior.js +10 -1
  30. package/{src/patterns/components/loading/loading.wingsuit.yml → dist/components/loading/loading.component.yml} +1 -1
  31. package/dist/components/loading/loading.wingsuit.yml +1 -1
  32. package/{src/patterns/components/localnav/localnav.wingsuit.yml → dist/components/localnav/localnav.component.yml} +1 -1
  33. package/dist/components/localnav/localnav.wingsuit.yml +1 -1
  34. package/dist/components/modal/modal.behavior.js +10 -1
  35. package/{src/patterns/components/modal/modal.wingsuit.yml → dist/components/modal/modal.component.yml} +1 -1
  36. package/dist/components/modal/modal.wingsuit.yml +1 -1
  37. package/dist/components/navigation/navigation.behavior.js +10 -1
  38. package/{src/patterns/components/navigation/navigation.wingsuit.yml → dist/components/navigation/navigation.component.yml} +2 -2
  39. package/dist/components/navigation/navigation.wingsuit.yml +2 -2
  40. package/dist/components/notification/notification.behavior.js +10 -1
  41. package/{src/patterns/components/numberpicker/numberpicker.wingsuit.yml → dist/components/numberpicker/numberpicker.component.yml} +6 -6
  42. package/dist/components/numberpicker/numberpicker.wingsuit.yml +6 -6
  43. package/{src/patterns/components/pagination/pagination.wingsuit.yml → dist/components/pagination/pagination.component.yml} +6 -6
  44. package/dist/components/pagination/pagination.wingsuit.yml +6 -6
  45. package/{src/patterns/components/radio/radio.wingsuit.yml → dist/components/radio/radio.component.yml} +6 -6
  46. package/dist/components/radio/radio.wingsuit.yml +6 -6
  47. package/dist/components/readmore/readmore.behavior.js +10 -1
  48. package/{src/patterns/components/readmore/readmore.wingsuit.yml → dist/components/readmore/readmore.component.yml} +1 -1
  49. package/dist/components/readmore/readmore.wingsuit.yml +1 -1
  50. package/dist/components/search/search.behavior.js +10 -1
  51. package/{src/patterns/components/search/search.wingsuit.yml → dist/components/search/search.component.yml} +8 -8
  52. package/dist/components/search/search.wingsuit.yml +8 -8
  53. package/dist/components/table/table.behavior.js +10 -1
  54. package/dist/components/tableofcontents/tableofcontents.behavior.js +10 -1
  55. package/dist/components/tabs/tabs.behavior.js +120 -1
  56. package/dist/components/tags/tag.behavior.js +10 -0
  57. package/{src/patterns/components/tags/tag.wingsuit.yml → dist/components/tags/tag.component.yml} +3 -6
  58. package/dist/components/{tag → tags}/tag.wingsuit.yml +3 -6
  59. package/{src/patterns/components/textarea/textarea.wingsuit.yml → dist/components/textarea/textarea.component.yml} +9 -9
  60. package/dist/components/textarea/textarea.wingsuit.yml +9 -9
  61. package/{src/patterns/components/textinput/textinput.wingsuit.yml → dist/components/textinput/textinput.component.yml} +7 -7
  62. package/dist/components/textinput/textinput.wingsuit.yml +7 -7
  63. package/{src/patterns/components/toggle/toggle.wingsuit.yml → dist/components/toggle/toggle.component.yml} +5 -5
  64. package/dist/components/toggle/toggle.wingsuit.yml +5 -5
  65. package/dist/components/tooltip/tooltip.behavior.js +116 -1
  66. package/dist/components/video/video.behavior.js +192 -16
  67. package/dist/styles/components/accordion.css +1 -0
  68. package/dist/styles/components/breadcrumb.css +1 -0
  69. package/dist/styles/components/button.css +1 -0
  70. package/dist/styles/components/callout.css +1 -0
  71. package/dist/styles/components/card.css +1 -0
  72. package/dist/styles/components/checkbox.css +1 -0
  73. package/dist/styles/components/contextmenu.css +1 -0
  74. package/dist/styles/components/datacard.css +1 -0
  75. package/dist/styles/components/dropdown.css +1 -0
  76. package/dist/styles/components/featurecard.css +1 -0
  77. package/dist/styles/components/fieldset.css +1 -0
  78. package/dist/styles/components/file-upload.css +1 -0
  79. package/dist/styles/components/footer.css +1 -0
  80. package/dist/styles/components/formcontrol.css +1 -0
  81. package/dist/styles/components/heading.css +1 -0
  82. package/dist/styles/components/herocard.css +1 -0
  83. package/dist/styles/components/input.css +1 -0
  84. package/dist/styles/components/linklist.css +1 -0
  85. package/dist/styles/components/list.css +1 -0
  86. package/dist/styles/components/loading.css +1 -0
  87. package/dist/styles/components/logo.css +1 -0
  88. package/dist/styles/components/navigation.css +1 -0
  89. package/dist/styles/components/pagination.css +1 -0
  90. package/dist/styles/components/profile.css +1 -0
  91. package/dist/styles/components/readmore.css +1 -0
  92. package/dist/styles/components/richtext.css +1 -0
  93. package/dist/{components/searchfield → styles/components}/searchfield.css +1 -1
  94. package/dist/styles/components/socialmedia.css +1 -0
  95. package/dist/styles/components/statcard.css +1 -0
  96. package/dist/styles/components/table.css +1 -0
  97. package/dist/styles/components/tableofcontents.css +1 -0
  98. package/dist/styles/components/tabs.css +1 -0
  99. package/dist/styles/components/tag.css +1 -0
  100. package/dist/styles/components/textarea.css +1 -0
  101. package/dist/styles/components/textinput.css +1 -0
  102. package/dist/styles/components/tooltip.css +1 -0
  103. package/dist/styles/global.css +2 -0
  104. package/dist/styles/global.css.map +1 -0
  105. package/dist/styles/index.css +9 -0
  106. package/dist/styles/index.css.map +1 -0
  107. package/dist/styles/monorepo.css +9 -0
  108. package/dist/styles/monorepo.css.map +1 -0
  109. package/package.json +45 -77
  110. package/README.md +0 -218
  111. package/dist/components/accordion/accordion.css +0 -1
  112. package/dist/components/breadcrumb/breadcrumb.css +0 -1
  113. package/dist/components/button/button.css +0 -1
  114. package/dist/components/callout/callout.css +0 -1
  115. package/dist/components/card/card.css +0 -1
  116. package/dist/components/checkbox/checkbox.css +0 -1
  117. package/dist/components/contextmenu/contextmenu.css +0 -1
  118. package/dist/components/datacard/datacard.css +0 -1
  119. package/dist/components/dropdown/dropdown.css +0 -1
  120. package/dist/components/featurecard/featurecard.css +0 -1
  121. package/dist/components/fieldset/fieldset.css +0 -1
  122. package/dist/components/file-upload/file-upload.css +0 -1
  123. package/dist/components/footer/footer.css +0 -1
  124. package/dist/components/formcontrol/formcontrol.css +0 -1
  125. package/dist/components/heading/heading.css +0 -1
  126. package/dist/components/herocard/herocard.css +0 -1
  127. package/dist/components/icon/icon.css +0 -1
  128. package/dist/components/input/input.css +0 -1
  129. package/dist/components/linklist/linklist.css +0 -1
  130. package/dist/components/list/list.css +0 -1
  131. package/dist/components/loading/loading.css +0 -1
  132. package/dist/components/logo/logo.css +0 -1
  133. package/dist/components/navigation/navigation.css +0 -1
  134. package/dist/components/pagination/pagination.css +0 -1
  135. package/dist/components/polyfill/polyfill.twig +0 -10
  136. package/dist/components/profile/profile.css +0 -1
  137. package/dist/components/readmore/readmore.css +0 -1
  138. package/dist/components/richtext/richtext.css +0 -1
  139. package/dist/components/socialmedia/socialmedia.css +0 -1
  140. package/dist/components/statcard/statcard.css +0 -1
  141. package/dist/components/table/table.css +0 -1
  142. package/dist/components/tableofcontents/tableofcontents.css +0 -1
  143. package/dist/components/tabs/tabs.css +0 -1
  144. package/dist/components/tag/tag.behavior.js +0 -1
  145. package/dist/components/tag/tag.css +0 -1
  146. package/dist/components/textarea/textarea.css +0 -1
  147. package/dist/components/textinput/textinput.css +0 -1
  148. package/dist/components/tooltip/tooltip.css +0 -1
  149. package/dist/global/styles.css +0 -9
  150. package/src/namespaces.js +0 -14
  151. package/src/patterns/components/accordion/accordion-item.twig +0 -22
  152. package/src/patterns/components/accordion/accordion.behavior.js +0 -16
  153. package/src/patterns/components/accordion/accordion.js +0 -200
  154. package/src/patterns/components/accordion/accordion.stories.jsx +0 -9
  155. package/src/patterns/components/accordion/accordion.twig +0 -16
  156. package/src/patterns/components/accordion/index.js +0 -7
  157. package/src/patterns/components/breadcrumb/breadcrumb.behavior.js +0 -16
  158. package/src/patterns/components/breadcrumb/breadcrumb.js +0 -280
  159. package/src/patterns/components/breadcrumb/breadcrumb.stories.jsx +0 -9
  160. package/src/patterns/components/breadcrumb/breadcrumb.twig +0 -55
  161. package/src/patterns/components/breadcrumb/index.js +0 -7
  162. package/src/patterns/components/button/button.stories.jsx +0 -9
  163. package/src/patterns/components/button/button.twig +0 -23
  164. package/src/patterns/components/button/index.js +0 -6
  165. package/src/patterns/components/callout/callout.behavior.js +0 -16
  166. package/src/patterns/components/callout/callout.js +0 -149
  167. package/src/patterns/components/callout/callout.stories.jsx +0 -9
  168. package/src/patterns/components/callout/callout.twig +0 -41
  169. package/src/patterns/components/callout/index.js +0 -7
  170. package/src/patterns/components/card/card.stories.jsx +0 -9
  171. package/src/patterns/components/card/card.twig +0 -24
  172. package/src/patterns/components/card/index.js +0 -6
  173. package/src/patterns/components/card_data/card_data.stories.jsx +0 -9
  174. package/src/patterns/components/card_data/card_data.twig +0 -101
  175. package/src/patterns/components/card_data/index.js +0 -9
  176. package/src/patterns/components/card_detail/card_detail.stories.jsx +0 -9
  177. package/src/patterns/components/card_detail/card_detail.twig +0 -37
  178. package/src/patterns/components/card_detail/index.js +0 -9
  179. package/src/patterns/components/card_factlist/card_factlist.stories.jsx +0 -9
  180. package/src/patterns/components/card_factlist/card_factlist.twig +0 -21
  181. package/src/patterns/components/card_factlist/index.js +0 -9
  182. package/src/patterns/components/card_feature/card_feature.stories.jsx +0 -9
  183. package/src/patterns/components/card_feature/card_feature.twig +0 -39
  184. package/src/patterns/components/card_feature/index.js +0 -9
  185. package/src/patterns/components/card_multilink/card_multilink.stories.jsx +0 -9
  186. package/src/patterns/components/card_multilink/card_multilink.twig +0 -45
  187. package/src/patterns/components/card_multilink/index.js +0 -9
  188. package/src/patterns/components/card_promo/card_promo.stories.jsx +0 -9
  189. package/src/patterns/components/card_promo/card_promo.twig +0 -35
  190. package/src/patterns/components/card_promo/index.js +0 -9
  191. package/src/patterns/components/card_stat/card_stat.stories.jsx +0 -9
  192. package/src/patterns/components/card_stat/card_stat.twig +0 -24
  193. package/src/patterns/components/card_stat/index.js +0 -9
  194. package/src/patterns/components/card_text/card_text.stories.jsx +0 -9
  195. package/src/patterns/components/card_text/card_text.twig +0 -35
  196. package/src/patterns/components/card_text/index.js +0 -9
  197. package/src/patterns/components/cardgroup/cardgroup.stories.jsx +0 -9
  198. package/src/patterns/components/cardgroup/cardgroup.twig +0 -44
  199. package/src/patterns/components/cardgroup/index.js +0 -6
  200. package/src/patterns/components/checkbox/checkbox.stories.jsx +0 -10
  201. package/src/patterns/components/checkbox/checkbox.twig +0 -17
  202. package/src/patterns/components/checkbox/index.js +0 -7
  203. package/src/patterns/components/contextmenu/contextmenu.stories.jsx +0 -9
  204. package/src/patterns/components/contextmenu/contextmenu.twig +0 -12
  205. package/src/patterns/components/contextmenu/index.js +0 -6
  206. package/src/patterns/components/datepicker/datepicker.stories.jsx +0 -9
  207. package/src/patterns/components/datepicker/datepicker.twig +0 -20
  208. package/src/patterns/components/datepicker/index.js +0 -7
  209. package/src/patterns/components/dropdown/dropdown.stories.jsx +0 -9
  210. package/src/patterns/components/dropdown/dropdown.twig +0 -22
  211. package/src/patterns/components/dropdown/index.js +0 -6
  212. package/src/patterns/components/fileupload/fileupload.behavior.js +0 -12
  213. package/src/patterns/components/fileupload/fileupload.js +0 -147
  214. package/src/patterns/components/fileupload/fileupload.stories.jsx +0 -9
  215. package/src/patterns/components/fileupload/fileupload.twig +0 -20
  216. package/src/patterns/components/fileupload/index.js +0 -8
  217. package/src/patterns/components/footer/footer.stories.jsx +0 -9
  218. package/src/patterns/components/footer/footer.twig +0 -63
  219. package/src/patterns/components/footer/index.js +0 -6
  220. package/src/patterns/components/form/fieldset.twig +0 -70
  221. package/src/patterns/components/form/form.stories.jsx +0 -9
  222. package/src/patterns/components/form/form.twig +0 -19
  223. package/src/patterns/components/form/formcontrol.twig +0 -89
  224. package/src/patterns/components/form/index.js +0 -6
  225. package/src/patterns/components/form/input.twig +0 -10
  226. package/src/patterns/components/hero/hero.stories.jsx +0 -9
  227. package/src/patterns/components/hero/hero.twig +0 -65
  228. package/src/patterns/components/hero/index.js +0 -7
  229. package/src/patterns/components/herocard/herocard.stories.jsx +0 -9
  230. package/src/patterns/components/herocard/herocard.twig +0 -30
  231. package/src/patterns/components/herocard/index.js +0 -6
  232. package/src/patterns/components/icon/icon.behavior.js +0 -16
  233. package/src/patterns/components/icon/icon.js +0 -128
  234. package/src/patterns/components/icon/icon.stories.jsx +0 -10
  235. package/src/patterns/components/icon/icon.twig +0 -4
  236. package/src/patterns/components/icon/index.js +0 -6
  237. package/src/patterns/components/image/image.stories.jsx +0 -9
  238. package/src/patterns/components/image/image.twig +0 -29
  239. package/src/patterns/components/image/index.js +0 -6
  240. package/src/patterns/components/link/index.js +0 -6
  241. package/src/patterns/components/link/link.stories.jsx +0 -9
  242. package/src/patterns/components/link/link.twig +0 -8
  243. package/src/patterns/components/linklist/index.js +0 -7
  244. package/src/patterns/components/linklist/linklist.behavior.js +0 -15
  245. package/src/patterns/components/linklist/linklist.js +0 -55
  246. package/src/patterns/components/linklist/linklist.stories.jsx +0 -14
  247. package/src/patterns/components/linklist/linklist.twig +0 -26
  248. package/src/patterns/components/list/index.js +0 -6
  249. package/src/patterns/components/list/list-item.twig +0 -6
  250. package/src/patterns/components/list/list.stories.jsx +0 -9
  251. package/src/patterns/components/list/list.twig +0 -35
  252. package/src/patterns/components/loading/index.js +0 -7
  253. package/src/patterns/components/loading/loading.behavior.js +0 -16
  254. package/src/patterns/components/loading/loading.js +0 -102
  255. package/src/patterns/components/loading/loading.stories.jsx +0 -9
  256. package/src/patterns/components/loading/loading.twig +0 -8
  257. package/src/patterns/components/localnav/index.js +0 -7
  258. package/src/patterns/components/localnav/localnav.stories.jsx +0 -9
  259. package/src/patterns/components/localnav/localnav.twig +0 -86
  260. package/src/patterns/components/logogrid/index.js +0 -6
  261. package/src/patterns/components/logogrid/logogrid.stories.jsx +0 -9
  262. package/src/patterns/components/logogrid/logogrid.twig +0 -17
  263. package/src/patterns/components/modal/index.js +0 -7
  264. package/src/patterns/components/modal/modal.behavior.js +0 -16
  265. package/src/patterns/components/modal/modal.js +0 -134
  266. package/src/patterns/components/modal/modal.stories.jsx +0 -10
  267. package/src/patterns/components/modal/modal.twig +0 -20
  268. package/src/patterns/components/navigation/index.js +0 -7
  269. package/src/patterns/components/navigation/navigation.behavior.js +0 -16
  270. package/src/patterns/components/navigation/navigation.js +0 -552
  271. package/src/patterns/components/navigation/navigation.stories.jsx +0 -10
  272. package/src/patterns/components/navigation/navigation.twig +0 -171
  273. package/src/patterns/components/notification/index.js +0 -7
  274. package/src/patterns/components/notification/notification.behavior.js +0 -16
  275. package/src/patterns/components/notification/notification.js +0 -97
  276. package/src/patterns/components/notification/notification.stories.jsx +0 -10
  277. package/src/patterns/components/notification/notification.twig +0 -18
  278. package/src/patterns/components/numberpicker/index.js +0 -7
  279. package/src/patterns/components/numberpicker/numberpicker.stories.jsx +0 -9
  280. package/src/patterns/components/numberpicker/numberpicker.twig +0 -16
  281. package/src/patterns/components/pagination/Pagination.stories.jsx +0 -9
  282. package/src/patterns/components/pagination/index.js +0 -6
  283. package/src/patterns/components/pagination/pagination.twig +0 -49
  284. package/src/patterns/components/picture/index.js +0 -6
  285. package/src/patterns/components/picture/picture.twig +0 -21
  286. package/src/patterns/components/polyfill/index.js +0 -6
  287. package/src/patterns/components/polyfill/polyfill.twig +0 -10
  288. package/src/patterns/components/profile/index.js +0 -6
  289. package/src/patterns/components/profile/profile.stories.jsx +0 -10
  290. package/src/patterns/components/profile/profile.twig +0 -26
  291. package/src/patterns/components/radio/index.js +0 -7
  292. package/src/patterns/components/radio/radio.stories.jsx +0 -10
  293. package/src/patterns/components/radio/radio.twig +0 -23
  294. package/src/patterns/components/readmore/index.js +0 -7
  295. package/src/patterns/components/readmore/readmore.behavior.js +0 -16
  296. package/src/patterns/components/readmore/readmore.js +0 -121
  297. package/src/patterns/components/readmore/readmore.stories.jsx +0 -10
  298. package/src/patterns/components/readmore/readmore.twig +0 -16
  299. package/src/patterns/components/richtext/index.js +0 -6
  300. package/src/patterns/components/richtext/richtext.stories.jsx +0 -10
  301. package/src/patterns/components/richtext/richtext.twig +0 -6
  302. package/src/patterns/components/search/index.js +0 -7
  303. package/src/patterns/components/search/search.behavior.js +0 -15
  304. package/src/patterns/components/search/search.js +0 -103
  305. package/src/patterns/components/search/search.stories.jsx +0 -10
  306. package/src/patterns/components/search/search.twig +0 -31
  307. package/src/patterns/components/socialmedia/index.js +0 -6
  308. package/src/patterns/components/socialmedia/socialmedia.mdx +0 -48
  309. package/src/patterns/components/socialmedia/socialmedia.stories.jsx +0 -15
  310. package/src/patterns/components/socialmedia/socialmedia.twig +0 -17
  311. package/src/patterns/components/table/index.js +0 -7
  312. package/src/patterns/components/table/table.behavior.js +0 -16
  313. package/src/patterns/components/table/table.js +0 -305
  314. package/src/patterns/components/table/table.stories.jsx +0 -10
  315. package/src/patterns/components/table/table.twig +0 -39
  316. package/src/patterns/components/tableofcontents/index.js +0 -7
  317. package/src/patterns/components/tableofcontents/tableofcontents.behavior.js +0 -16
  318. package/src/patterns/components/tableofcontents/tableofcontents.js +0 -172
  319. package/src/patterns/components/tableofcontents/tableofcontents.stories.jsx +0 -10
  320. package/src/patterns/components/tableofcontents/tableofcontents.twig +0 -47
  321. package/src/patterns/components/tabs/index.js +0 -7
  322. package/src/patterns/components/tabs/tabs.behavior.js +0 -27
  323. package/src/patterns/components/tabs/tabs.js +0 -212
  324. package/src/patterns/components/tabs/tabs.stories.jsx +0 -10
  325. package/src/patterns/components/tabs/tabs.twig +0 -29
  326. package/src/patterns/components/tags/index.js +0 -7
  327. package/src/patterns/components/tags/tag.behavior.js +0 -16
  328. package/src/patterns/components/tags/tag.js +0 -159
  329. package/src/patterns/components/tags/tag.stories.jsx +0 -10
  330. package/src/patterns/components/tags/tag.twig +0 -30
  331. package/src/patterns/components/tags/tags.twig +0 -15
  332. package/src/patterns/components/textarea/index.js +0 -7
  333. package/src/patterns/components/textarea/textarea.stories.jsx +0 -9
  334. package/src/patterns/components/textarea/textarea.twig +0 -14
  335. package/src/patterns/components/textinput/index.js +0 -7
  336. package/src/patterns/components/textinput/textinput.stories.jsx +0 -10
  337. package/src/patterns/components/textinput/textinput.twig +0 -14
  338. package/src/patterns/components/toggle/index.js +0 -7
  339. package/src/patterns/components/toggle/toggle.stories.jsx +0 -10
  340. package/src/patterns/components/toggle/toggle.twig +0 -36
  341. package/src/patterns/components/tooltip/index.js +0 -7
  342. package/src/patterns/components/tooltip/tooltip.behavior.js +0 -16
  343. package/src/patterns/components/tooltip/tooltip.js +0 -156
  344. package/src/patterns/components/tooltip/tooltip.stories.jsx +0 -10
  345. package/src/patterns/components/tooltip/tooltip.twig +0 -14
  346. package/src/patterns/components/video/index.js +0 -7
  347. package/src/patterns/components/video/video.behavior.js +0 -16
  348. package/src/patterns/components/video/video.js +0 -120
  349. package/src/patterns/components/video/video.stories.jsx +0 -10
  350. package/src/patterns/components/video/video.twig +0 -18
  351. package/src/patterns/components/video/videoplayer.twig +0 -8
  352. package/src/tokens/exports/_colors.scss +0 -7
  353. package/src/tokens/exports/_font-families.scss +0 -6
  354. package/src/tokens/exports/_font-sizes-heading.scss +0 -10
  355. package/src/tokens/index.scss +0 -7
  356. package/src/vendorjs/lib.vendor.js +0 -1
  357. /package/{src/patterns/components/accordion/accordion.wingsuit.yml → dist/components/accordion/accordion.component.yml} +0 -0
  358. /package/{src/patterns/components/breadcrumb/breadcrumb.wingsuit.yml → dist/components/breadcrumb/breadcrumb.component.yml} +0 -0
  359. /package/{src/patterns/components/button/button.wingsuit.yml → dist/components/button/button.component.yml} +0 -0
  360. /package/{src/patterns/components/card/card.wingsuit.yml → dist/components/card/card.component.yml} +0 -0
  361. /package/{src/patterns/components/card_data/card_data.wingsuit.yml → dist/components/card_data/card_data.component.yml} +0 -0
  362. /package/{src/patterns/components/card_detail/card_detail.wingsuit.yml → dist/components/card_detail/card_detail.component.yml} +0 -0
  363. /package/{src/patterns/components/card_factlist/card_factlist.wingsuit.yml → dist/components/card_factlist/card_factlist.component.yml} +0 -0
  364. /package/{src/patterns/components/card_feature/card_feature.wingsuit.yml → dist/components/card_feature/card_feature.component.yml} +0 -0
  365. /package/{src/patterns/components/card_multilink/card_multilink.wingsuit.yml → dist/components/card_multilink/card_multilink.component.yml} +0 -0
  366. /package/{src/patterns/components/card_promo/card_promo.wingsuit.yml → dist/components/card_promo/card_promo.component.yml} +0 -0
  367. /package/{src/patterns/components/card_stat/card_stat.wingsuit.yml → dist/components/card_stat/card_stat.component.yml} +0 -0
  368. /package/{src/patterns/components/card_text/card_text.wingsuit.yml → dist/components/card_text/card_text.component.yml} +0 -0
  369. /package/{src/patterns/components/cardgroup/cardgroup.wingsuit.yml → dist/components/cardgroup/cardgroup.component.yml} +0 -0
  370. /package/{src/patterns/components/contextmenu/contextmenu.wingsuit.yml → dist/components/contextmenu/contextmenu.component.yml} +0 -0
  371. /package/{src/patterns/components/form/form.wingsuit.yml → dist/components/form/form.component.yml} +0 -0
  372. /package/{src/patterns/components/hero/hero.wingsuit.yml → dist/components/hero/hero.component.yml} +0 -0
  373. /package/{src/patterns/components/herocard/herocard.wingsuit.yml → dist/components/herocard/herocard.component.yml} +0 -0
  374. /package/{src/patterns/components/icon/icon.wingsuit.yml → dist/components/icon/icon.component.yml} +0 -0
  375. /package/{src/patterns/components/image/image.wingsuit.yml → dist/components/image/image.component.yml} +0 -0
  376. /package/{src/patterns/components/link/link.wingsuit.yml → dist/components/link/link.component.yml} +0 -0
  377. /package/{src/patterns/components/linklist/linklist.wingsuit.yml → dist/components/linklist/linklist.component.yml} +0 -0
  378. /package/{src/patterns/components/logogrid/logogrid.wingsuit.yml → dist/components/logogrid/logogrid.component.yml} +0 -0
  379. /package/{src/patterns/components/notification/notification.wingsuit.yml → dist/components/notification/notification.component.yml} +0 -0
  380. /package/{src/patterns/components/profile/profile.wingsuit.yml → dist/components/profile/profile.component.yml} +0 -0
  381. /package/{src/patterns/components/richtext/richtext.wingsuit.yml → dist/components/richtext/richtext.component.yml} +0 -0
  382. /package/{src/patterns/components/socialmedia/socialmedia.wingsuit.yml → dist/components/socialmedia/socialmedia.component.yml} +0 -0
  383. /package/{src/patterns/components/table/table.wingsuit.yml → dist/components/table/table.component.yml} +0 -0
  384. /package/{src/patterns/components/tableofcontents/tableofcontents.wingsuit.yml → dist/components/tableofcontents/tableofcontents.component.yml} +0 -0
  385. /package/{src/patterns/components/tabs/tabs.wingsuit.yml → dist/components/tabs/tabs.component.yml} +0 -0
  386. /package/{src/patterns/components/tags/tags.wingsuit.yml → dist/components/tags/tags.component.yml} +0 -0
  387. /package/{src/patterns/components/tooltip/tooltip.wingsuit.yml → dist/components/tooltip/tooltip.component.yml} +0 -0
  388. /package/{src/patterns/components/video/video.wingsuit.yml → dist/components/video/video.component.yml} +0 -0
  389. /package/dist/{components/cardgroup → styles/components}/cardgroup.css +0 -0
  390. /package/dist/{components/container → styles/components}/container.css +0 -0
  391. /package/dist/{components/credit → styles/components}/credit.css +0 -0
  392. /package/dist/{components/datepicker → styles/components}/datepicker.css +0 -0
  393. /package/dist/{components/detailcard → styles/components}/detailcard.css +0 -0
  394. /package/dist/{components/empty → styles/components}/empty.css +0 -0
  395. /package/dist/{components/factlistcard → styles/components}/factlistcard.css +0 -0
  396. /package/dist/{components/form → styles/components}/form.css +0 -0
  397. /package/dist/{components/hero → styles/components}/hero.css +0 -0
  398. /package/dist/{components/image → styles/components}/image.css +0 -0
  399. /package/dist/{components/link → styles/components}/link.css +0 -0
  400. /package/dist/{components/logogrid → styles/components}/logogrid.css +0 -0
  401. /package/dist/{components/modal → styles/components}/modal.css +0 -0
  402. /package/dist/{components/multilinkcard → styles/components}/multilinkcard.css +0 -0
  403. /package/dist/{components/notification → styles/components}/notification.css +0 -0
  404. /package/dist/{components/promocard → styles/components}/promocard.css +0 -0
  405. /package/dist/{components/radio → styles/components}/radio.css +0 -0
  406. /package/dist/{components/textcard → styles/components}/textcard.css +0 -0
  407. /package/dist/{components/toggle → styles/components}/toggle.css +0 -0
  408. /package/dist/{components/video → styles/components}/video.css +0 -0
@@ -1,305 +0,0 @@
1
- import { EVENTS, ARIA, MISC } from "@ilo-org/utils";
2
-
3
- /**
4
- * The Table module which handles rendering field labels inline on a form.
5
- *
6
- *
7
- * @class Table
8
- */
9
- export default class Table {
10
- /**
11
- * Table constructor which assigns the element passed into the constructor
12
- * to the `this.element` property for later reference
13
- *
14
- * @param {HTMLElement} element - REQUIRED - the module's container
15
- */
16
- constructor(element) {
17
- /**
18
- * Reference to the DOM element that is the root of the component
19
- * @property {Object}
20
- */
21
- this.element = element;
22
-
23
- // get the theme prefix
24
- this.prefix = this.element.dataset.prefix;
25
-
26
- this.sortlist = [];
27
-
28
- // Initialize the view
29
- this.init();
30
- }
31
-
32
- /**
33
- * Initializes the view by calling the functions to
34
- * create DOM references, setup event handlers and
35
- * then create the event listeners
36
- *
37
- * @return {Object} Table A reference to the instance of the class
38
- * @chainable
39
- */
40
- init() {
41
- this.cacheDomReferences().setupHandlers().setUpSorting().enable();
42
-
43
- return this;
44
- }
45
-
46
- /**
47
- * Find all necessary DOM elements used in the view and cache them
48
- *
49
- * @return {Object} ReadMore A reference to the instance of the class
50
- * @chainable
51
- */
52
- cacheDomReferences() {
53
- /**
54
- * The button for toggling Read More state
55
- * @type {Object}
56
- */
57
- this.thCells = this.element.querySelectorAll(
58
- `.${this.prefix}--table--head--cell`
59
- );
60
- this.tdCells = this.element.querySelectorAll(
61
- `.${this.prefix}--table--body--cell`
62
- );
63
- this.rows = this.element.querySelectorAll(`[class~="--row"]`);
64
- this.thRows = this.element.querySelectorAll(
65
- `.${this.prefix}--table--head--row`
66
- );
67
- this.tdRows = this.element.querySelectorAll(
68
- `.${this.prefix}--table--body--row`
69
- );
70
- this.tBody = this.element.querySelector(`.${this.prefix}--table--body`);
71
-
72
- return this;
73
- }
74
-
75
- /**
76
- * Bind event handlers with the proper context of `this`.
77
- *
78
- * @return {Object} Table A reference to the current instance of the class
79
- * @chainable
80
- */
81
- setupHandlers() {
82
- this.ClickThHandler = this.onClickTh.bind(this);
83
- this.ClickTdHandler = this.onClickTd.bind(this);
84
-
85
- return this;
86
- }
87
-
88
- /**
89
- * Evaluates which columns are sortable and adds class to th of sortable columns
90
- *
91
- * @return {Object} Table A reference to the current instance of the class
92
- * @chainable
93
- */
94
- setUpSorting() {
95
- Array.from(this.tdRows).forEach((tdrow) => {
96
- Array.from(
97
- tdrow.querySelectorAll(`.${this.prefix}--table--body--cell`)
98
- ).forEach((cell, index) => {
99
- const sortablecontent = cell.textContent.toLowerCase();
100
- if (typeof this.sortlist[index] === "undefined") {
101
- this.sortlist[index] = [];
102
- }
103
- if (cell.classList.contains("numeric")) {
104
- if (this.isDate(sortablecontent)) {
105
- this.sortlist[index].push({
106
- value: sortablecontent,
107
- node: tdrow,
108
- type: "date",
109
- });
110
- } else {
111
- this.sortlist[index].push({
112
- value: sortablecontent,
113
- node: tdrow,
114
- type: "numeric",
115
- });
116
- }
117
- } else if (cell.innerHTML.match(/^([^0-9]*)$/)) {
118
- this.sortlist[index].push({
119
- value: sortablecontent,
120
- node: tdrow,
121
- type: "string",
122
- });
123
- }
124
- });
125
- });
126
- this.sortlist.forEach((column, index) => {
127
- if (this.sortlist[index].length === this.tdRows.length) {
128
- this.thCells[index].classList.add("sortable");
129
- }
130
- });
131
-
132
- return this;
133
- }
134
-
135
- /**
136
- * Creates event listeners to enable interaction with view
137
- *
138
- * @return {Object} Table A reference to the instance of the class
139
- * @chainable
140
- */
141
- enable() {
142
- this.element.classList.add("table--js");
143
-
144
- Array.from(this.thCells).forEach((thcell) => {
145
- thcell.addEventListener(EVENTS.CLICK, (e) => this.ClickThHandler(e));
146
- });
147
-
148
- Array.from(this.tdCells).forEach((tdcell) => {
149
- tdcell.addEventListener(EVENTS.CLICK, (e) => this.ClickTdHandler(e));
150
- });
151
-
152
- return this;
153
- }
154
-
155
- /**
156
- * Actions performed on click of a tab
157
- *
158
- * @return {Object} Modal A reference to the instance of the class
159
- * @chainable
160
- */
161
- onClickTh(e) {
162
- e.preventDefault();
163
- Array.from(this.thCells).forEach((thcell, index) => {
164
- // set/remove aria-sort attribute
165
- if (thcell === e.target) {
166
- if (
167
- typeof thcell.getAttribute(ARIA.SORT) === "undefined" ||
168
- thcell.getAttribute(ARIA.SORT) === MISC.DESCENDING
169
- ) {
170
- thcell.setAttribute(ARIA.SORT, MISC.ASCENDING);
171
- this.sortColumn(index, MISC.ASCENDING);
172
- } else {
173
- thcell.setAttribute(ARIA.SORT, MISC.DESCENDING);
174
- this.sortColumn(index, MISC.DESCENDING);
175
- }
176
- } else {
177
- thcell.removeAttribute(ARIA.SORT);
178
- }
179
- });
180
-
181
- return this;
182
- }
183
-
184
- /**
185
- * Actions performed on click of a tab
186
- *
187
- * @return {Object} Modal A reference to the instance of the class
188
- * @chainable
189
- */
190
- onClickTd(e) {
191
- e.preventDefault();
192
- let currentindex = null;
193
-
194
- Array.from(this.tdRows).forEach((tdrow) => {
195
- tdrow.classList.remove("selected");
196
- });
197
-
198
- e.target.parentElement.classList.add("selected");
199
-
200
- Array.from(this.tdCells).forEach((tdcell) => {
201
- tdcell.classList.remove("selected");
202
- tdcell.classList.remove("column--selected");
203
- });
204
-
205
- Array.from(
206
- e.target.parentElement.querySelectorAll(
207
- `.${this.prefix}--table--body--cell`
208
- )
209
- ).forEach((tdcell, index) => {
210
- if (tdcell === e.target) {
211
- tdcell.classList.add("selected");
212
- currentindex = index;
213
- }
214
- });
215
-
216
- Array.from(this.tdRows).forEach((tdrow) => {
217
- Array.from(
218
- tdrow.querySelectorAll(`.${this.prefix}--table--body--cell`)
219
- ).forEach((tdcell, index) => {
220
- if (index === currentindex && tdcell !== e.target) {
221
- tdcell.classList.add("column--selected");
222
- }
223
- });
224
- });
225
-
226
- if (e.target.hasAttribute("href")) {
227
- window.location.href = e.target.getAttribute("href");
228
- }
229
-
230
- return this;
231
- }
232
-
233
- /**
234
- * Sort a column
235
- *
236
- * @return {Object} Modal A reference to the instance of the class
237
- * @chainable
238
- */
239
- sortColumn(column, sortdirection) {
240
- const sorted = this.sortlist[column].sort(this.compare(sortdirection));
241
-
242
- while (this.tBody.firstChild) {
243
- this.tBody.removeChild(this.tBody.lastChild);
244
- }
245
-
246
- sorted.forEach((row) => {
247
- this.tBody.appendChild(row.node);
248
- });
249
-
250
- return this;
251
- }
252
-
253
- /**
254
- * compare
255
- *
256
- * @return {Function} a compare function
257
- */
258
- compare(sortdirection) {
259
- return function (a, b) {
260
- if (sortdirection === MISC.ASCENDING) {
261
- if (a.value === b.value) {
262
- return 0;
263
- } else {
264
- if (a.type === "numeric") {
265
- return a.value - b.value;
266
- } else if (a.type === "date") {
267
- return new Date(a.value) - new Date(b.value);
268
- } else {
269
- return a.value < b.value ? -1 : 1;
270
- }
271
- }
272
- } else {
273
- if (a.value === b.value) {
274
- return 0;
275
- } else {
276
- if (a.type === "numeric") {
277
- return b.value - a.value;
278
- } else if (a.type === "date") {
279
- return new Date(b.value) - new Date(a.value);
280
- } else {
281
- return a.value > b.value ? -1 : 1;
282
- }
283
- }
284
- }
285
- };
286
- }
287
-
288
- /**
289
- * isDate
290
- * tests is the passed string is a date
291
- *
292
- * @return {Boolean} is it a date?
293
- */
294
- isDate(date) {
295
- let isdate = false;
296
- if (date.match(/^[0-3]?[0-9]\/[0-3]?[0-9]\/(?:[0-9]{2})?[0-9]{2}$/)) {
297
- isdate = true;
298
- }
299
- if (date.match(/^[0-3]?[0-9]-[0-3]?[0-9]-(?:[0-9]{2})?[0-9]{2}$/)) {
300
- isdate = true;
301
- }
302
-
303
- return isdate;
304
- }
305
- }
@@ -1,10 +0,0 @@
1
- import "./index";
2
-
3
- export default {};
4
- const patternDefinition = require("./table.wingsuit.yml");
5
-
6
- /* eslint-disable-next-line */
7
- /* eslint-disable-next-line */
8
- export const wingsuit = {
9
- patternDefinition,
10
- };
@@ -1,39 +0,0 @@
1
- {#
2
- TABLE COMPONENT
3
- #}
4
- <div class="{{prefix}}--table{% if zebra|boolval %} {{prefix}}--table--zebra{% endif %}{% if smallrows|boolval %} {{prefix}}--table--small{% endif %}" data-prefix="{{prefix}}" data-loadcomponent="Table">
5
- <header class="{{prefix}}--table--header">
6
- <h3 class="{{prefix}}--table--headline">
7
- {{headline}}
8
- {% if tooltip %}
9
- {% include '@components/tooltip/tooltip.twig' with tooltip %}
10
- {% endif %}
11
- </h3>
12
- {% if description is defined %}
13
- <p class="{{prefix}}--table--description">
14
- {{description}}
15
- </p>
16
- {% endif %}
17
- </header>
18
- <div class="{{prefix}}--table--wrapper">
19
- <table class="{{prefix}}--table--content">
20
- <thead class="{{prefix}}--table--head">
21
- <tr class="{{prefix}}--table--head--row">
22
- {% for column in tableheadings %}
23
- <th class="{{prefix}}--table--head--cell">{{column}}</th>
24
- {% endfor %}
25
- </tr>
26
- </thead>
27
- <tbody class="{{prefix}}--table--body">
28
- {% for row in tabledata %}
29
- <tr class="{{prefix}}--table--body--row">
30
- {% for cell in row %}
31
- {% set evaluate = cell|striptags|replace({'/': '', '-':'','_':'','.':'',}) %}
32
- <td class="{{prefix}}--table--body--cell{% if evaluate matches '/^[0-9]+$/' %} numeric{% endif %}">{{cell}}</td>
33
- {% endfor %}
34
- </tr>
35
- {% endfor %}
36
- </tbody>
37
- </table>
38
- </div>
39
- </div>
@@ -1,7 +0,0 @@
1
- /**
2
- * table of contents
3
- */
4
- // Module template
5
- import "./tableofcontents.twig";
6
- import "./tableofcontents.wingsuit.yml";
7
- import "./tableofcontents.behavior";
@@ -1,16 +0,0 @@
1
- import TableOfContents from "./tableofcontents";
2
-
3
- Drupal.behaviors.tableofcontents = {
4
- attach() {
5
- Array.prototype.forEach.call(
6
- document.querySelectorAll(`[data-loadcomponent="TableOfContents"]`),
7
- (element) => {
8
- if (!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- new TableOfContents(element);
11
- element.dataset.jsProcessed = true;
12
- }
13
- }
14
- );
15
- },
16
- };
@@ -1,172 +0,0 @@
1
- import { EVENTS } from "@ilo-org/utils";
2
-
3
- /**
4
- * The TableOfContents module which handles control and display of a TableOfContents dialog
5
- *
6
- *
7
- * @class TableOfContents
8
- */
9
- export default class TableOfContents {
10
- /**
11
- * TableOfContents constructor which assigns the element passed into the constructor
12
- * to the `this.element` property for later reference
13
- *
14
- * @param {HTMLElement} element - REQUIRED - the module's container
15
- */
16
- constructor(element) {
17
- /**
18
- * Reference to the DOM element that is the root of the component
19
- * @property {Object}
20
- */
21
- this.element = element;
22
-
23
- // get the theme prefix
24
- this.prefix = this.element.dataset.prefix;
25
-
26
- // Initialize the view
27
- this.init();
28
- }
29
-
30
- /**
31
- * Initializes the view by calling the functions to
32
- * create DOM references, setup event handlers and
33
- * then create the event listeners
34
- *
35
- * @return {Object} TableOfContents A reference to the instance of the class
36
- * @chainable
37
- */
38
- init() {
39
- this.cacheDomReferences().setupHandlers().enable();
40
-
41
- return this;
42
- }
43
-
44
- /**
45
- * Find all necessary DOM elements used in the view and cache them
46
- *
47
- * @return {Object} ReadMore A reference to the instance of the class
48
- * @chainable
49
- */
50
- cacheDomReferences() {
51
- /**
52
- * The button for toggling Read More state
53
- * @type {Object}
54
- */
55
- this.OpenButton = this.element.querySelector(`.toc--modal--open`);
56
- this.CloseButton = this.element.querySelector(`.toc--modal--close`);
57
- this.trigger = this.element.querySelector(
58
- `.${this.prefix}--table-of-contents--trigger`
59
- );
60
- this.modalUx = this.element.querySelector(
61
- `.${this.prefix}--table-of-contents--modal`
62
- );
63
- this.toc = this.element.querySelector(`.${this.prefix}--table-of-contents`);
64
- this.tocItems = this.element.querySelectorAll(
65
- `.${this.prefix}--table-of-contents--link`
66
- );
67
-
68
- return this;
69
- }
70
-
71
- /**
72
- * Bind event handlers with the proper context of `this`.
73
- *
74
- * @return {Object} TableOfContents A reference to the current instance of the class
75
- * @chainable
76
- */
77
- setupHandlers() {
78
- this.OpenButtonHandler = this.openButtonClick.bind(this);
79
- this.CloseHandler = this.closeButtonClick.bind(this);
80
- this.KeyPressHandler = this.keyPress.bind(this);
81
- this.linkClickHandler = this.linkClick.bind(this);
82
-
83
- return this;
84
- }
85
-
86
- /**
87
- * Creates event listeners to enable interaction with view
88
- *
89
- * @return {Object} TableOfContents A reference to the instance of the class
90
- * @chainable
91
- */
92
- enable() {
93
- this.OpenButton.addEventListener(EVENTS.CLICK, () =>
94
- this.OpenButtonHandler()
95
- );
96
- this.CloseButton.addEventListener(EVENTS.CLICK, () => this.CloseHandler());
97
-
98
- if (this.tocItems.length > 0) {
99
- this.tocItems.forEach((link) => {
100
- link.addEventListener(EVENTS.CLICK, () => this.linkClickHandler());
101
- });
102
- }
103
-
104
- return this;
105
- }
106
-
107
- /**
108
- * Actions performed on click of the open button
109
- *
110
- * @return {Object} TableOfContents A reference to the instance of the class
111
- * @chainable
112
- */
113
- openButtonClick() {
114
- this.trigger.classList.add("hide");
115
- this.element.classList.add("show");
116
- this.modalUx.classList.add("show");
117
- this.toc.classList.add("show");
118
- setTimeout(() => {
119
- this.modalUx.classList.add("fadein");
120
- this.toc.classList.add("fadein");
121
- }, 125);
122
- window.addEventListener(EVENTS.KEY_DOWN, (e) => this.KeyPressHandler(e));
123
-
124
- return this;
125
- }
126
-
127
- /**
128
- * Actions performed on click of the close button
129
- *
130
- * @return {Object} TableOfContents A reference to the instance of the class
131
- * @chainable
132
- */
133
- closeButtonClick() {
134
- this.modalUx.classList.remove("fadein");
135
- this.toc.classList.remove("fadein");
136
- setTimeout(() => {
137
- this.modalUx.classList.remove("show");
138
- this.toc.classList.remove("show");
139
- this.element.classList.remove("show");
140
- this.trigger.classList.remove("hide");
141
- }, 125);
142
- window.removeEventListener(EVENTS.KEY_DOWN, (e) => this.KeyPressHandler(e));
143
-
144
- return this;
145
- }
146
-
147
- /**
148
- * Actions performed on click of any link
149
- *
150
- * @return {Object} TableOfContents A reference to the instance of the class
151
- * @chainable
152
- */
153
- linkClick() {
154
- this.closeButtonClick();
155
-
156
- return this;
157
- }
158
-
159
- /**
160
- * Actions performed on key press
161
- *
162
- * @return {Object} TableOfContents A reference to the instance of the class
163
- * @chainable
164
- */
165
- keyPress(e) {
166
- if (e.key === "Escape") {
167
- this.closeButtonClick();
168
- }
169
-
170
- return this;
171
- }
172
- }
@@ -1,10 +0,0 @@
1
- import "./index";
2
-
3
- export default {};
4
- const patternDefinition = require("./tableofcontents.wingsuit.yml");
5
-
6
- /* eslint-disable-next-line */
7
- /* eslint-disable-next-line */
8
- export const wingsuit = {
9
- patternDefinition,
10
- };
@@ -1,47 +0,0 @@
1
- {# tableofcontents.twig #}
2
-
3
- {% set openbutton_size = openbutton.size|default("medium") %}
4
- {% set openbutton_type = openbutton.type|default("secondary") %}
5
- {% set openbutton_label = openbutton.label|default("Open") %}
6
- {% set openbutton_label = openbutton.label|default("Open") %}
7
- {% set closebutton_label = closebutton.label|default("Close") %}
8
-
9
- {% if items %}
10
- <div class="{{prefix}}--table-of-contents--wrapper" data-loadcomponent="TableOfContents" data-prefix="{{prefix}}">
11
- <div class="{{prefix}}--table-of-contents--trigger">
12
- {% include '@components/button/button.twig' with {
13
- prefix: prefix,
14
- size: openbutton_size,
15
- type: openbutton_type,
16
- label: openbutton_label,
17
- opensmodal: true,
18
- className: "toc--modal--open"
19
- } only %}
20
- </div>
21
- <div class="{{prefix}}--table-of-contents--modal">
22
- <h3 class="{{prefix}}--table-of-contents--headline">{{headline}}</h3>
23
- {% include '@components/button/button.twig' with {
24
- prefix: prefix,
25
- size: "large",
26
- type: "tertiary",
27
- label: closebutton_label,
28
- icon: {
29
- name: "close",
30
- size: 24,
31
- },
32
- iconPos: "center",
33
- icononly: true,
34
- className: "toc--modal--close"
35
- } only %}
36
- </div>
37
- <nav class="{{prefix}}--table-of-contents">
38
- <ul class="{{prefix}}--table-of-contents--list">
39
- {% for item in items %}
40
- <li class="{{prefix}}--table-of-contents--list--item">
41
- <a class="{{prefix}}--table-of-contents--link" href="{{item.href}}">{{item.label}}</a>
42
- </li>
43
- {% endfor %}
44
- </ul>
45
- </nav>
46
- </div>
47
- {% endif %}
@@ -1,7 +0,0 @@
1
- /**
2
- * Tabs
3
- */
4
- // Module template
5
- import "./tabs.twig";
6
- import "./tabs.wingsuit.yml";
7
- import "./tabs.behavior.js";
@@ -1,27 +0,0 @@
1
- import Tabs from "./tabs";
2
- import Tooltip from "../tooltip/tooltip";
3
-
4
- Drupal.behaviors.tabs = {
5
- attach() {
6
- Array.prototype.forEach.call(
7
- document.querySelectorAll(`[data-loadcomponent="Tabs"]`),
8
- (element) => {
9
- if (!element.dataset.jsProcessed) {
10
- // eslint-disable-next-line no-console
11
- new Tabs(element);
12
- element.dataset.jsProcessed = true;
13
- }
14
- }
15
- );
16
- Array.prototype.forEach.call(
17
- document.querySelectorAll(`[data-loadcomponent="Tooltip"]`),
18
- (element) => {
19
- if (!element.dataset.jsProcessed) {
20
- // eslint-disable-next-line no-console
21
- new Tooltip(element);
22
- element.dataset.jsProcessed = true;
23
- }
24
- }
25
- );
26
- },
27
- };