@ilo-org/twig 1.1.6 → 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.
- package/LICENSE +183 -183
- package/dist/components/accordion/accordion.behavior.js +10 -1
- package/dist/components/breadcrumb/breadcrumb.behavior.js +10 -1
- package/dist/components/breadcrumb/breadcrumb.twig +2 -3
- package/dist/components/button/button.behavior.js +6 -0
- package/dist/components/button/button.twig +11 -6
- package/dist/components/callout/callout.behavior.js +10 -1
- package/{src/patterns/components/callout/callout.wingsuit.yml → dist/components/callout/callout.component.yml} +6 -7
- package/dist/components/callout/callout.wingsuit.yml +6 -7
- package/{src/patterns/components/checkbox/checkbox.wingsuit.yml → dist/components/checkbox/checkbox.component.yml} +6 -6
- package/dist/components/checkbox/checkbox.wingsuit.yml +6 -6
- package/{src/patterns/components/datepicker/datepicker.wingsuit.yml → dist/components/datepicker/datepicker.component.yml} +5 -5
- package/dist/components/datepicker/datepicker.wingsuit.yml +5 -5
- package/{src/patterns/components/dropdown/dropdown.wingsuit.yml → dist/components/dropdown/dropdown.component.yml} +7 -7
- package/dist/components/dropdown/dropdown.wingsuit.yml +7 -7
- package/dist/components/fileupload/fileupload.behavior.js +10 -1
- package/{src/patterns/components/fileupload/fileupload.wingsuit.yml → dist/components/fileupload/fileupload.component.yml} +7 -7
- package/dist/components/fileupload/fileupload.wingsuit.yml +7 -7
- package/{src/patterns/components/footer/footer.wingsuit.yml → dist/components/footer/footer.component.yml} +1 -1
- package/dist/components/footer/footer.wingsuit.yml +1 -1
- package/dist/components/icon/icon.behavior.js +687 -1
- package/dist/components/icon/icon.twig +1 -4
- package/dist/components/linklist/linklist.behavior.js +8 -1
- package/{src/patterns/components/list/list-item.wingsuit.yml → dist/components/list/list-item.component.yml} +2 -4
- package/dist/components/{list-item → list}/list-item.wingsuit.yml +2 -4
- package/{src/patterns/components/list/list.wingsuit.yml → dist/components/list/list.component.yml} +1 -1
- package/dist/components/list/list.wingsuit.yml +1 -1
- package/dist/components/loading/loading.behavior.js +10 -1
- package/{src/patterns/components/loading/loading.wingsuit.yml → dist/components/loading/loading.component.yml} +1 -1
- package/dist/components/loading/loading.wingsuit.yml +1 -1
- package/{src/patterns/components/localnav/localnav.wingsuit.yml → dist/components/localnav/localnav.component.yml} +1 -1
- package/dist/components/localnav/localnav.wingsuit.yml +1 -1
- package/dist/components/modal/modal.behavior.js +10 -1
- package/{src/patterns/components/modal/modal.wingsuit.yml → dist/components/modal/modal.component.yml} +1 -1
- package/dist/components/modal/modal.wingsuit.yml +1 -1
- package/dist/components/navigation/navigation.behavior.js +10 -1
- package/{src/patterns/components/navigation/navigation.wingsuit.yml → dist/components/navigation/navigation.component.yml} +2 -2
- package/dist/components/navigation/navigation.wingsuit.yml +2 -2
- package/dist/components/notification/notification.behavior.js +10 -1
- package/{src/patterns/components/numberpicker/numberpicker.wingsuit.yml → dist/components/numberpicker/numberpicker.component.yml} +6 -6
- package/dist/components/numberpicker/numberpicker.wingsuit.yml +6 -6
- package/{src/patterns/components/pagination/pagination.wingsuit.yml → dist/components/pagination/pagination.component.yml} +6 -6
- package/dist/components/pagination/pagination.wingsuit.yml +6 -6
- package/{src/patterns/components/radio/radio.wingsuit.yml → dist/components/radio/radio.component.yml} +6 -6
- package/dist/components/radio/radio.wingsuit.yml +6 -6
- package/dist/components/readmore/readmore.behavior.js +10 -1
- package/{src/patterns/components/readmore/readmore.wingsuit.yml → dist/components/readmore/readmore.component.yml} +1 -1
- package/dist/components/readmore/readmore.wingsuit.yml +1 -1
- package/dist/components/search/search.behavior.js +10 -1
- package/{src/patterns/components/search/search.wingsuit.yml → dist/components/search/search.component.yml} +8 -8
- package/dist/components/search/search.wingsuit.yml +8 -8
- package/dist/components/table/table.behavior.js +10 -1
- package/dist/components/tableofcontents/tableofcontents.behavior.js +10 -1
- package/dist/components/tabs/tabs.behavior.js +120 -1
- package/dist/components/tags/tag.behavior.js +10 -0
- package/{src/patterns/components/tags/tag.wingsuit.yml → dist/components/tags/tag.component.yml} +3 -6
- package/dist/components/{tag → tags}/tag.wingsuit.yml +3 -6
- package/{src/patterns/components/textarea/textarea.wingsuit.yml → dist/components/textarea/textarea.component.yml} +9 -9
- package/dist/components/textarea/textarea.wingsuit.yml +9 -9
- package/{src/patterns/components/textinput/textinput.wingsuit.yml → dist/components/textinput/textinput.component.yml} +7 -7
- package/dist/components/textinput/textinput.wingsuit.yml +7 -7
- package/{src/patterns/components/toggle/toggle.wingsuit.yml → dist/components/toggle/toggle.component.yml} +5 -5
- package/dist/components/toggle/toggle.wingsuit.yml +5 -5
- package/dist/components/tooltip/tooltip.behavior.js +116 -1
- package/dist/components/video/video.behavior.js +192 -16
- package/dist/styles/global.css +2 -0
- package/dist/styles/global.css.map +1 -0
- package/dist/styles/index.css.map +1 -0
- package/dist/styles/monorepo.css +9 -0
- package/dist/styles/monorepo.css.map +1 -0
- package/package.json +43 -75
- package/README.md +0 -218
- package/dist/components/polyfill/polyfill.twig +0 -10
- package/dist/components/tag/tag.behavior.js +0 -1
- package/src/namespaces.js +0 -14
- package/src/patterns/components/accordion/accordion-item.twig +0 -22
- package/src/patterns/components/accordion/accordion.behavior.js +0 -16
- package/src/patterns/components/accordion/accordion.js +0 -200
- package/src/patterns/components/accordion/accordion.stories.jsx +0 -9
- package/src/patterns/components/accordion/accordion.twig +0 -16
- package/src/patterns/components/accordion/index.js +0 -7
- package/src/patterns/components/breadcrumb/breadcrumb.behavior.js +0 -16
- package/src/patterns/components/breadcrumb/breadcrumb.js +0 -280
- package/src/patterns/components/breadcrumb/breadcrumb.stories.jsx +0 -9
- package/src/patterns/components/breadcrumb/breadcrumb.twig +0 -55
- package/src/patterns/components/breadcrumb/index.js +0 -7
- package/src/patterns/components/button/button.stories.jsx +0 -9
- package/src/patterns/components/button/button.twig +0 -23
- package/src/patterns/components/button/index.js +0 -6
- package/src/patterns/components/callout/callout.behavior.js +0 -16
- package/src/patterns/components/callout/callout.js +0 -149
- package/src/patterns/components/callout/callout.stories.jsx +0 -9
- package/src/patterns/components/callout/callout.twig +0 -41
- package/src/patterns/components/callout/index.js +0 -7
- package/src/patterns/components/card/card.stories.jsx +0 -9
- package/src/patterns/components/card/card.twig +0 -24
- package/src/patterns/components/card/index.js +0 -6
- package/src/patterns/components/card_data/card_data.stories.jsx +0 -9
- package/src/patterns/components/card_data/card_data.twig +0 -101
- package/src/patterns/components/card_data/index.js +0 -9
- package/src/patterns/components/card_detail/card_detail.stories.jsx +0 -9
- package/src/patterns/components/card_detail/card_detail.twig +0 -37
- package/src/patterns/components/card_detail/index.js +0 -9
- package/src/patterns/components/card_factlist/card_factlist.stories.jsx +0 -9
- package/src/patterns/components/card_factlist/card_factlist.twig +0 -21
- package/src/patterns/components/card_factlist/index.js +0 -9
- package/src/patterns/components/card_feature/card_feature.stories.jsx +0 -9
- package/src/patterns/components/card_feature/card_feature.twig +0 -39
- package/src/patterns/components/card_feature/index.js +0 -9
- package/src/patterns/components/card_multilink/card_multilink.stories.jsx +0 -9
- package/src/patterns/components/card_multilink/card_multilink.twig +0 -45
- package/src/patterns/components/card_multilink/index.js +0 -9
- package/src/patterns/components/card_promo/card_promo.stories.jsx +0 -9
- package/src/patterns/components/card_promo/card_promo.twig +0 -35
- package/src/patterns/components/card_promo/index.js +0 -9
- package/src/patterns/components/card_stat/card_stat.stories.jsx +0 -9
- package/src/patterns/components/card_stat/card_stat.twig +0 -24
- package/src/patterns/components/card_stat/index.js +0 -9
- package/src/patterns/components/card_text/card_text.stories.jsx +0 -9
- package/src/patterns/components/card_text/card_text.twig +0 -35
- package/src/patterns/components/card_text/index.js +0 -9
- package/src/patterns/components/cardgroup/cardgroup.stories.jsx +0 -9
- package/src/patterns/components/cardgroup/cardgroup.twig +0 -44
- package/src/patterns/components/cardgroup/index.js +0 -6
- package/src/patterns/components/checkbox/checkbox.stories.jsx +0 -10
- package/src/patterns/components/checkbox/checkbox.twig +0 -17
- package/src/patterns/components/checkbox/index.js +0 -7
- package/src/patterns/components/contextmenu/contextmenu.stories.jsx +0 -9
- package/src/patterns/components/contextmenu/contextmenu.twig +0 -12
- package/src/patterns/components/contextmenu/index.js +0 -6
- package/src/patterns/components/datepicker/datepicker.stories.jsx +0 -9
- package/src/patterns/components/datepicker/datepicker.twig +0 -20
- package/src/patterns/components/datepicker/index.js +0 -7
- package/src/patterns/components/dropdown/dropdown.stories.jsx +0 -9
- package/src/patterns/components/dropdown/dropdown.twig +0 -22
- package/src/patterns/components/dropdown/index.js +0 -6
- package/src/patterns/components/fileupload/fileupload.behavior.js +0 -12
- package/src/patterns/components/fileupload/fileupload.js +0 -147
- package/src/patterns/components/fileupload/fileupload.stories.jsx +0 -9
- package/src/patterns/components/fileupload/fileupload.twig +0 -20
- package/src/patterns/components/fileupload/index.js +0 -8
- package/src/patterns/components/footer/footer.stories.jsx +0 -9
- package/src/patterns/components/footer/footer.twig +0 -63
- package/src/patterns/components/footer/index.js +0 -6
- package/src/patterns/components/form/fieldset.twig +0 -70
- package/src/patterns/components/form/form.stories.jsx +0 -9
- package/src/patterns/components/form/form.twig +0 -19
- package/src/patterns/components/form/formcontrol.twig +0 -89
- package/src/patterns/components/form/index.js +0 -6
- package/src/patterns/components/form/input.twig +0 -10
- package/src/patterns/components/hero/hero.stories.jsx +0 -9
- package/src/patterns/components/hero/hero.twig +0 -65
- package/src/patterns/components/hero/index.js +0 -7
- package/src/patterns/components/herocard/herocard.stories.jsx +0 -9
- package/src/patterns/components/herocard/herocard.twig +0 -30
- package/src/patterns/components/herocard/index.js +0 -6
- package/src/patterns/components/icon/icon.behavior.js +0 -16
- package/src/patterns/components/icon/icon.js +0 -128
- package/src/patterns/components/icon/icon.stories.jsx +0 -10
- package/src/patterns/components/icon/icon.twig +0 -4
- package/src/patterns/components/icon/index.js +0 -6
- package/src/patterns/components/image/image.stories.jsx +0 -9
- package/src/patterns/components/image/image.twig +0 -29
- package/src/patterns/components/image/index.js +0 -6
- package/src/patterns/components/link/index.js +0 -6
- package/src/patterns/components/link/link.stories.jsx +0 -9
- package/src/patterns/components/link/link.twig +0 -8
- package/src/patterns/components/linklist/index.js +0 -7
- package/src/patterns/components/linklist/linklist.behavior.js +0 -15
- package/src/patterns/components/linklist/linklist.js +0 -55
- package/src/patterns/components/linklist/linklist.stories.jsx +0 -14
- package/src/patterns/components/linklist/linklist.twig +0 -26
- package/src/patterns/components/list/index.js +0 -6
- package/src/patterns/components/list/list-item.twig +0 -6
- package/src/patterns/components/list/list.stories.jsx +0 -9
- package/src/patterns/components/list/list.twig +0 -35
- package/src/patterns/components/loading/index.js +0 -7
- package/src/patterns/components/loading/loading.behavior.js +0 -16
- package/src/patterns/components/loading/loading.js +0 -102
- package/src/patterns/components/loading/loading.stories.jsx +0 -9
- package/src/patterns/components/loading/loading.twig +0 -8
- package/src/patterns/components/localnav/index.js +0 -7
- package/src/patterns/components/localnav/localnav.stories.jsx +0 -9
- package/src/patterns/components/localnav/localnav.twig +0 -86
- package/src/patterns/components/logogrid/index.js +0 -6
- package/src/patterns/components/logogrid/logogrid.stories.jsx +0 -9
- package/src/patterns/components/logogrid/logogrid.twig +0 -17
- package/src/patterns/components/modal/index.js +0 -7
- package/src/patterns/components/modal/modal.behavior.js +0 -16
- package/src/patterns/components/modal/modal.js +0 -134
- package/src/patterns/components/modal/modal.stories.jsx +0 -10
- package/src/patterns/components/modal/modal.twig +0 -20
- package/src/patterns/components/navigation/index.js +0 -7
- package/src/patterns/components/navigation/navigation.behavior.js +0 -16
- package/src/patterns/components/navigation/navigation.js +0 -552
- package/src/patterns/components/navigation/navigation.stories.jsx +0 -10
- package/src/patterns/components/navigation/navigation.twig +0 -171
- package/src/patterns/components/notification/index.js +0 -7
- package/src/patterns/components/notification/notification.behavior.js +0 -16
- package/src/patterns/components/notification/notification.js +0 -97
- package/src/patterns/components/notification/notification.stories.jsx +0 -10
- package/src/patterns/components/notification/notification.twig +0 -18
- package/src/patterns/components/numberpicker/index.js +0 -7
- package/src/patterns/components/numberpicker/numberpicker.stories.jsx +0 -9
- package/src/patterns/components/numberpicker/numberpicker.twig +0 -16
- package/src/patterns/components/pagination/Pagination.stories.jsx +0 -9
- package/src/patterns/components/pagination/index.js +0 -6
- package/src/patterns/components/pagination/pagination.twig +0 -49
- package/src/patterns/components/picture/index.js +0 -6
- package/src/patterns/components/picture/picture.twig +0 -21
- package/src/patterns/components/polyfill/index.js +0 -6
- package/src/patterns/components/polyfill/polyfill.twig +0 -10
- package/src/patterns/components/profile/index.js +0 -6
- package/src/patterns/components/profile/profile.stories.jsx +0 -10
- package/src/patterns/components/profile/profile.twig +0 -26
- package/src/patterns/components/radio/index.js +0 -7
- package/src/patterns/components/radio/radio.stories.jsx +0 -10
- package/src/patterns/components/radio/radio.twig +0 -23
- package/src/patterns/components/readmore/index.js +0 -7
- package/src/patterns/components/readmore/readmore.behavior.js +0 -16
- package/src/patterns/components/readmore/readmore.js +0 -121
- package/src/patterns/components/readmore/readmore.stories.jsx +0 -10
- package/src/patterns/components/readmore/readmore.twig +0 -16
- package/src/patterns/components/richtext/index.js +0 -6
- package/src/patterns/components/richtext/richtext.stories.jsx +0 -10
- package/src/patterns/components/richtext/richtext.twig +0 -6
- package/src/patterns/components/search/index.js +0 -7
- package/src/patterns/components/search/search.behavior.js +0 -15
- package/src/patterns/components/search/search.js +0 -103
- package/src/patterns/components/search/search.stories.jsx +0 -10
- package/src/patterns/components/search/search.twig +0 -31
- package/src/patterns/components/socialmedia/index.js +0 -6
- package/src/patterns/components/socialmedia/socialmedia.mdx +0 -48
- package/src/patterns/components/socialmedia/socialmedia.stories.jsx +0 -15
- package/src/patterns/components/socialmedia/socialmedia.twig +0 -17
- package/src/patterns/components/table/index.js +0 -7
- package/src/patterns/components/table/table.behavior.js +0 -16
- package/src/patterns/components/table/table.js +0 -305
- package/src/patterns/components/table/table.stories.jsx +0 -10
- package/src/patterns/components/table/table.twig +0 -39
- package/src/patterns/components/tableofcontents/index.js +0 -7
- package/src/patterns/components/tableofcontents/tableofcontents.behavior.js +0 -16
- package/src/patterns/components/tableofcontents/tableofcontents.js +0 -172
- package/src/patterns/components/tableofcontents/tableofcontents.stories.jsx +0 -10
- package/src/patterns/components/tableofcontents/tableofcontents.twig +0 -47
- package/src/patterns/components/tabs/index.js +0 -7
- package/src/patterns/components/tabs/tabs.behavior.js +0 -27
- package/src/patterns/components/tabs/tabs.js +0 -212
- package/src/patterns/components/tabs/tabs.stories.jsx +0 -10
- package/src/patterns/components/tabs/tabs.twig +0 -29
- package/src/patterns/components/tags/index.js +0 -7
- package/src/patterns/components/tags/tag.behavior.js +0 -16
- package/src/patterns/components/tags/tag.js +0 -159
- package/src/patterns/components/tags/tag.stories.jsx +0 -10
- package/src/patterns/components/tags/tag.twig +0 -30
- package/src/patterns/components/tags/tags.twig +0 -15
- package/src/patterns/components/textarea/index.js +0 -7
- package/src/patterns/components/textarea/textarea.stories.jsx +0 -9
- package/src/patterns/components/textarea/textarea.twig +0 -14
- package/src/patterns/components/textinput/index.js +0 -7
- package/src/patterns/components/textinput/textinput.stories.jsx +0 -10
- package/src/patterns/components/textinput/textinput.twig +0 -14
- package/src/patterns/components/toggle/index.js +0 -7
- package/src/patterns/components/toggle/toggle.stories.jsx +0 -10
- package/src/patterns/components/toggle/toggle.twig +0 -36
- package/src/patterns/components/tooltip/index.js +0 -7
- package/src/patterns/components/tooltip/tooltip.behavior.js +0 -16
- package/src/patterns/components/tooltip/tooltip.js +0 -156
- package/src/patterns/components/tooltip/tooltip.stories.jsx +0 -10
- package/src/patterns/components/tooltip/tooltip.twig +0 -14
- package/src/patterns/components/video/index.js +0 -7
- package/src/patterns/components/video/video.behavior.js +0 -16
- package/src/patterns/components/video/video.js +0 -120
- package/src/patterns/components/video/video.stories.jsx +0 -10
- package/src/patterns/components/video/video.twig +0 -18
- package/src/patterns/components/video/videoplayer.twig +0 -8
- package/src/tokens/exports/_colors.scss +0 -7
- package/src/tokens/exports/_font-sizes-heading.scss +0 -10
- package/src/tokens/index.scss +0 -7
- package/src/vendorjs/lib.vendor.js +0 -1
- /package/{src/patterns/components/accordion/accordion.wingsuit.yml → dist/components/accordion/accordion.component.yml} +0 -0
- /package/{src/patterns/components/breadcrumb/breadcrumb.wingsuit.yml → dist/components/breadcrumb/breadcrumb.component.yml} +0 -0
- /package/{src/patterns/components/button/button.wingsuit.yml → dist/components/button/button.component.yml} +0 -0
- /package/{src/patterns/components/card/card.wingsuit.yml → dist/components/card/card.component.yml} +0 -0
- /package/{src/patterns/components/card_data/card_data.wingsuit.yml → dist/components/card_data/card_data.component.yml} +0 -0
- /package/{src/patterns/components/card_detail/card_detail.wingsuit.yml → dist/components/card_detail/card_detail.component.yml} +0 -0
- /package/{src/patterns/components/card_factlist/card_factlist.wingsuit.yml → dist/components/card_factlist/card_factlist.component.yml} +0 -0
- /package/{src/patterns/components/card_feature/card_feature.wingsuit.yml → dist/components/card_feature/card_feature.component.yml} +0 -0
- /package/{src/patterns/components/card_multilink/card_multilink.wingsuit.yml → dist/components/card_multilink/card_multilink.component.yml} +0 -0
- /package/{src/patterns/components/card_promo/card_promo.wingsuit.yml → dist/components/card_promo/card_promo.component.yml} +0 -0
- /package/{src/patterns/components/card_stat/card_stat.wingsuit.yml → dist/components/card_stat/card_stat.component.yml} +0 -0
- /package/{src/patterns/components/card_text/card_text.wingsuit.yml → dist/components/card_text/card_text.component.yml} +0 -0
- /package/{src/patterns/components/cardgroup/cardgroup.wingsuit.yml → dist/components/cardgroup/cardgroup.component.yml} +0 -0
- /package/{src/patterns/components/contextmenu/contextmenu.wingsuit.yml → dist/components/contextmenu/contextmenu.component.yml} +0 -0
- /package/{src/patterns/components/form/form.wingsuit.yml → dist/components/form/form.component.yml} +0 -0
- /package/{src/patterns/components/hero/hero.wingsuit.yml → dist/components/hero/hero.component.yml} +0 -0
- /package/{src/patterns/components/herocard/herocard.wingsuit.yml → dist/components/herocard/herocard.component.yml} +0 -0
- /package/{src/patterns/components/icon/icon.wingsuit.yml → dist/components/icon/icon.component.yml} +0 -0
- /package/{src/patterns/components/image/image.wingsuit.yml → dist/components/image/image.component.yml} +0 -0
- /package/{src/patterns/components/link/link.wingsuit.yml → dist/components/link/link.component.yml} +0 -0
- /package/{src/patterns/components/linklist/linklist.wingsuit.yml → dist/components/linklist/linklist.component.yml} +0 -0
- /package/{src/patterns/components/logogrid/logogrid.wingsuit.yml → dist/components/logogrid/logogrid.component.yml} +0 -0
- /package/{src/patterns/components/notification/notification.wingsuit.yml → dist/components/notification/notification.component.yml} +0 -0
- /package/{src/patterns/components/profile/profile.wingsuit.yml → dist/components/profile/profile.component.yml} +0 -0
- /package/{src/patterns/components/richtext/richtext.wingsuit.yml → dist/components/richtext/richtext.component.yml} +0 -0
- /package/{src/patterns/components/socialmedia/socialmedia.wingsuit.yml → dist/components/socialmedia/socialmedia.component.yml} +0 -0
- /package/{src/patterns/components/table/table.wingsuit.yml → dist/components/table/table.component.yml} +0 -0
- /package/{src/patterns/components/tableofcontents/tableofcontents.wingsuit.yml → dist/components/tableofcontents/tableofcontents.component.yml} +0 -0
- /package/{src/patterns/components/tabs/tabs.wingsuit.yml → dist/components/tabs/tabs.component.yml} +0 -0
- /package/{src/patterns/components/tags/tags.wingsuit.yml → dist/components/tags/tags.component.yml} +0 -0
- /package/{src/patterns/components/tooltip/tooltip.wingsuit.yml → dist/components/tooltip/tooltip.component.yml} +0 -0
- /package/{src/patterns/components/video/video.wingsuit.yml → dist/components/video/video.component.yml} +0 -0
- /package/dist/{components/accordion → styles/components}/accordion.css +0 -0
- /package/dist/{components/breadcrumb → styles/components}/breadcrumb.css +0 -0
- /package/dist/{components/button → styles/components}/button.css +0 -0
- /package/dist/{components/callout → styles/components}/callout.css +0 -0
- /package/dist/{components/card → styles/components}/card.css +0 -0
- /package/dist/{components/cardgroup → styles/components}/cardgroup.css +0 -0
- /package/dist/{components/checkbox → styles/components}/checkbox.css +0 -0
- /package/dist/{components/container → styles/components}/container.css +0 -0
- /package/dist/{components/contextmenu → styles/components}/contextmenu.css +0 -0
- /package/dist/{components/credit → styles/components}/credit.css +0 -0
- /package/dist/{components/datacard → styles/components}/datacard.css +0 -0
- /package/dist/{components/datepicker → styles/components}/datepicker.css +0 -0
- /package/dist/{components/detailcard → styles/components}/detailcard.css +0 -0
- /package/dist/{components/dropdown → styles/components}/dropdown.css +0 -0
- /package/dist/{components/empty → styles/components}/empty.css +0 -0
- /package/dist/{components/factlistcard → styles/components}/factlistcard.css +0 -0
- /package/dist/{components/featurecard → styles/components}/featurecard.css +0 -0
- /package/dist/{components/fieldset → styles/components}/fieldset.css +0 -0
- /package/dist/{components/file-upload → styles/components}/file-upload.css +0 -0
- /package/dist/{components/footer → styles/components}/footer.css +0 -0
- /package/dist/{components/form → styles/components}/form.css +0 -0
- /package/dist/{components/formcontrol → styles/components}/formcontrol.css +0 -0
- /package/dist/{components/heading → styles/components}/heading.css +0 -0
- /package/dist/{components/hero → styles/components}/hero.css +0 -0
- /package/dist/{components/herocard → styles/components}/herocard.css +0 -0
- /package/dist/{components/image → styles/components}/image.css +0 -0
- /package/dist/{components/input → styles/components}/input.css +0 -0
- /package/dist/{components/link → styles/components}/link.css +0 -0
- /package/dist/{components/linklist → styles/components}/linklist.css +0 -0
- /package/dist/{components/list → styles/components}/list.css +0 -0
- /package/dist/{components/loading → styles/components}/loading.css +0 -0
- /package/dist/{components/logo → styles/components}/logo.css +0 -0
- /package/dist/{components/logogrid → styles/components}/logogrid.css +0 -0
- /package/dist/{components/modal → styles/components}/modal.css +0 -0
- /package/dist/{components/multilinkcard → styles/components}/multilinkcard.css +0 -0
- /package/dist/{components/navigation → styles/components}/navigation.css +0 -0
- /package/dist/{components/notification → styles/components}/notification.css +0 -0
- /package/dist/{components/pagination → styles/components}/pagination.css +0 -0
- /package/dist/{components/profile → styles/components}/profile.css +0 -0
- /package/dist/{components/promocard → styles/components}/promocard.css +0 -0
- /package/dist/{components/radio → styles/components}/radio.css +0 -0
- /package/dist/{components/readmore → styles/components}/readmore.css +0 -0
- /package/dist/{components/richtext → styles/components}/richtext.css +0 -0
- /package/dist/{components/searchfield → styles/components}/searchfield.css +0 -0
- /package/dist/{components/socialmedia → styles/components}/socialmedia.css +0 -0
- /package/dist/{components/statcard → styles/components}/statcard.css +0 -0
- /package/dist/{components/table → styles/components}/table.css +0 -0
- /package/dist/{components/tableofcontents → styles/components}/tableofcontents.css +0 -0
- /package/dist/{components/tabs → styles/components}/tabs.css +0 -0
- /package/dist/{components/tag → styles/components}/tag.css +0 -0
- /package/dist/{components/textarea → styles/components}/textarea.css +0 -0
- /package/dist/{components/textcard → styles/components}/textcard.css +0 -0
- /package/dist/{components/textinput → styles/components}/textinput.css +0 -0
- /package/dist/{components/toggle → styles/components}/toggle.css +0 -0
- /package/dist/{components/tooltip → styles/components}/tooltip.css +0 -0
- /package/dist/{components/video → styles/components}/video.css +0 -0
- /package/dist/{global/styles.css → styles/index.css} +0 -0
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { EVENTS, ARIA } from "@ilo-org/utils";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The Tabs module which handles rendering field labels inline on a form.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @class Tabs
|
|
8
|
-
*/
|
|
9
|
-
export default class Tabs {
|
|
10
|
-
/**
|
|
11
|
-
* Tabs 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} Tabs 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.tabButtons = this.element.querySelectorAll(
|
|
56
|
-
`.${this.prefix}--tabs--selection--button`
|
|
57
|
-
);
|
|
58
|
-
this.tabPanels = this.element.querySelectorAll('[role="tabpanel"]');
|
|
59
|
-
this.firstTab;
|
|
60
|
-
|
|
61
|
-
return this;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Bind event handlers with the proper context of `this`.
|
|
66
|
-
*
|
|
67
|
-
* @return {Object} Tabs A reference to the current instance of the class
|
|
68
|
-
* @chainable
|
|
69
|
-
*/
|
|
70
|
-
setupHandlers() {
|
|
71
|
-
this.OnClickHandler = this.onClick.bind(this);
|
|
72
|
-
this.KeyPressHandler = this.onKeyPress.bind(this);
|
|
73
|
-
this.OnPrevHandler = this.setSelectedToPreviousTab.bind(this);
|
|
74
|
-
this.OnNextHandler = this.setSelectedToNextTab.bind(this);
|
|
75
|
-
|
|
76
|
-
return this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Creates event listeners to enable interaction with view
|
|
81
|
-
*
|
|
82
|
-
* @return {Object} Tabs A reference to the instance of the class
|
|
83
|
-
* @chainable
|
|
84
|
-
*/
|
|
85
|
-
enable() {
|
|
86
|
-
this.element.classList.add("tabs--js");
|
|
87
|
-
|
|
88
|
-
Array.from(this.tabButtons).forEach((button) => {
|
|
89
|
-
button.addEventListener(EVENTS.CLICK, (e) => this.OnClickHandler(e));
|
|
90
|
-
button.addEventListener(EVENTS.KEY_DOWN, (e) => this.KeyPressHandler(e));
|
|
91
|
-
|
|
92
|
-
if (!this.firstTab) {
|
|
93
|
-
this.firstTab = button.getAttribute(ARIA.CONTROLS);
|
|
94
|
-
}
|
|
95
|
-
this.lastTab = button.getAttribute(ARIA.CONTROLS);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
return this;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Actions performed on click of a tab
|
|
103
|
-
*
|
|
104
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
105
|
-
* @chainable
|
|
106
|
-
*/
|
|
107
|
-
onClick(e) {
|
|
108
|
-
e.preventDefault();
|
|
109
|
-
const tabid = e.currentTarget.getAttribute(ARIA.CONTROLS);
|
|
110
|
-
this.selectTab(tabid);
|
|
111
|
-
|
|
112
|
-
return this;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Actions performed on key press
|
|
117
|
-
*
|
|
118
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
119
|
-
* @chainable
|
|
120
|
-
*/
|
|
121
|
-
onKeyPress(e) {
|
|
122
|
-
let flag = false;
|
|
123
|
-
const tabid = e.currentTarget.getAttribute(ARIA.CONTROLS);
|
|
124
|
-
|
|
125
|
-
switch (e.key) {
|
|
126
|
-
case "ArrowLeft":
|
|
127
|
-
this.setSelectedToPreviousTab(tabid);
|
|
128
|
-
flag = true;
|
|
129
|
-
break;
|
|
130
|
-
|
|
131
|
-
case "ArrowRight":
|
|
132
|
-
this.setSelectedToNextTab(tabid);
|
|
133
|
-
flag = true;
|
|
134
|
-
break;
|
|
135
|
-
|
|
136
|
-
case "Home":
|
|
137
|
-
this.selectTab(this.firstTab.id);
|
|
138
|
-
flag = true;
|
|
139
|
-
break;
|
|
140
|
-
|
|
141
|
-
case "End":
|
|
142
|
-
this.selectTab(this.lastTab.id);
|
|
143
|
-
flag = true;
|
|
144
|
-
break;
|
|
145
|
-
|
|
146
|
-
default:
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (flag) {
|
|
151
|
-
e.stopPropagation();
|
|
152
|
-
e.preventDefault();
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return this;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Selects the chosen tab
|
|
160
|
-
*
|
|
161
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
162
|
-
* @chainable
|
|
163
|
-
*/
|
|
164
|
-
selectTab(tabid) {
|
|
165
|
-
const selectedTab = this.element.querySelector(
|
|
166
|
-
`[${ARIA.CONTROLS}="${tabid}"]`
|
|
167
|
-
);
|
|
168
|
-
Array.from(this.tabPanels).forEach((panel) => {
|
|
169
|
-
panel.setAttribute(ARIA.EXPANDED, false);
|
|
170
|
-
});
|
|
171
|
-
Array.from(this.tabButtons).forEach((button) => {
|
|
172
|
-
button.setAttribute(ARIA.SELECTED, false);
|
|
173
|
-
});
|
|
174
|
-
selectedTab.focus();
|
|
175
|
-
selectedTab.setAttribute(ARIA.SELECTED, true);
|
|
176
|
-
document.getElementById(tabid).setAttribute(ARIA.EXPANDED, true);
|
|
177
|
-
|
|
178
|
-
return this;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Selects the previous tab in the list of tabs
|
|
183
|
-
*
|
|
184
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
185
|
-
* @chainable
|
|
186
|
-
*/
|
|
187
|
-
setSelectedToPreviousTab(tabid) {
|
|
188
|
-
const prevTab =
|
|
189
|
-
document.getElementById(tabid).previousElementSibling !== null
|
|
190
|
-
? document.getElementById(tabid).previousElementSibling
|
|
191
|
-
: document.getElementById(this.lastTab);
|
|
192
|
-
this.selectTab(prevTab.id);
|
|
193
|
-
|
|
194
|
-
return this;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Selects the previous tab in the list of tabs
|
|
199
|
-
*
|
|
200
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
201
|
-
* @chainable
|
|
202
|
-
*/
|
|
203
|
-
setSelectedToNextTab(tabid) {
|
|
204
|
-
const nextTab =
|
|
205
|
-
document.getElementById(tabid).nextElementSibling !== null
|
|
206
|
-
? document.getElementById(tabid).nextElementSibling
|
|
207
|
-
: document.getElementById(this.firstTab);
|
|
208
|
-
this.selectTab(nextTab.id);
|
|
209
|
-
|
|
210
|
-
return this;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{% set uid = "now"|date('Uv') %}
|
|
2
|
-
{% set tabids = [] %}
|
|
3
|
-
{% for item in items %}
|
|
4
|
-
{% set tabids = tabids|merge([random(100000)]) %}
|
|
5
|
-
{% endfor %}
|
|
6
|
-
<div class="{{prefix}}--tabs" data-prefix="{{prefix}}" id="tabs--{{uid}}" data-loadcomponent="Tabs">
|
|
7
|
-
<ul class="{{prefix}}--tabs--selection" aria-controls="tabs--{{uid}}" role="tablist" style="--tabscount: {{items|length}};">
|
|
8
|
-
{% for item in items %}
|
|
9
|
-
<li class="{{prefix}}--tabs--selection--item" role="presentation"> {# changed role to presentation for list item #}
|
|
10
|
-
<a href="#tab--{{tabids[loop.index - 1]}}" class="{{prefix}}--tabs--selection--button{% if item.icon is defined %} icon{% endif %}" aria-controls="tab--{{tabids[loop.index - 1]}}" role="tab" tabindex="0" {% if loop.index == 1 %}aria-selected="true"{% else %}aria-selected="false"{% endif %} title="{{item.label}}">
|
|
11
|
-
<span class="{{prefix}}--tabs--selection--label">{{item.label}}</span>
|
|
12
|
-
{% if item.icon is defined %}
|
|
13
|
-
{% include '@components/icon/icon.twig' with {
|
|
14
|
-
name: item.icon,
|
|
15
|
-
size: '24'
|
|
16
|
-
} %}
|
|
17
|
-
{% endif %}
|
|
18
|
-
</a>
|
|
19
|
-
</li>
|
|
20
|
-
{% endfor %}
|
|
21
|
-
</ul>
|
|
22
|
-
<div class="{{prefix}}--tabs--content">
|
|
23
|
-
{% for item in items %}
|
|
24
|
-
<div id="tab--{{tabids[loop.index - 1]}}" role="tabpanel" aria-labelledby="tab--{{tabids[loop.index - 1]}}" {% if loop.index == 1 %}aria-expanded="true"{% else %}aria-expanded="false"{% endif %}>
|
|
25
|
-
{% include '@components/' ~ item.component ~ '/' ~ item.component ~ '.twig' with item.componentdata %}
|
|
26
|
-
</div>
|
|
27
|
-
{% endfor %}
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Tag from "./tag";
|
|
2
|
-
|
|
3
|
-
Drupal.behaviors.tag = {
|
|
4
|
-
attach() {
|
|
5
|
-
Array.prototype.forEach.call(
|
|
6
|
-
document.querySelectorAll(`[data-loadcomponent="Tag"]`),
|
|
7
|
-
(element) => {
|
|
8
|
-
if (!element.dataset.jsProcessed) {
|
|
9
|
-
// eslint-disable-next-line no-console
|
|
10
|
-
new Tag(element);
|
|
11
|
-
element.dataset.jsProcessed = true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { getUpdatedItems, EVENTS } from "@ilo-org/utils";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The Tag module which handles rendering field labels inline on a form.
|
|
5
|
-
*
|
|
6
|
-
* @class Tag
|
|
7
|
-
*/
|
|
8
|
-
export default class Tag {
|
|
9
|
-
/**
|
|
10
|
-
* Tag constructor which assigns the element passed into the constructor
|
|
11
|
-
* to the `this.element` property for later reference
|
|
12
|
-
*
|
|
13
|
-
* @param {HTMLElement} element - REQUIRED - the module's container
|
|
14
|
-
*/
|
|
15
|
-
constructor(element) {
|
|
16
|
-
/**
|
|
17
|
-
* Reference to the DOM element that is the root of the component
|
|
18
|
-
* @property {Object}
|
|
19
|
-
*/
|
|
20
|
-
this.element = element;
|
|
21
|
-
this.multipleActive = true;
|
|
22
|
-
this.itemStatuses = [];
|
|
23
|
-
|
|
24
|
-
// Initialize the view
|
|
25
|
-
this.init();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Initializes the view by calling the functions to
|
|
30
|
-
* create DOM references, setup event handlers and
|
|
31
|
-
* then create the event listeners
|
|
32
|
-
*
|
|
33
|
-
* @return {Object} Tag A reference to the instance of the class
|
|
34
|
-
* @chainable
|
|
35
|
-
*/
|
|
36
|
-
init() {
|
|
37
|
-
this.cacheDomReferences().setupHandlers().enable();
|
|
38
|
-
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Find all necessary DOM elements used in the view and cache them
|
|
44
|
-
*
|
|
45
|
-
* @return {Object} Tag A reference to the instance of the class
|
|
46
|
-
* @chainable
|
|
47
|
-
*/
|
|
48
|
-
cacheDomReferences() {
|
|
49
|
-
/**
|
|
50
|
-
* The field that a user interacts with on a form
|
|
51
|
-
* @type {Object}
|
|
52
|
-
*/
|
|
53
|
-
this.buttonTags = this.element.querySelectorAll(".ilo--tag--button");
|
|
54
|
-
this.multipleActive = this.element.getAttribute("data-multipleactive");
|
|
55
|
-
|
|
56
|
-
this.buttonTags.forEach((button, i) => {
|
|
57
|
-
const expanded = button.dataset["active"];
|
|
58
|
-
const id = this.buttonTags[i].getAttribute("id");
|
|
59
|
-
if (expanded === "true") {
|
|
60
|
-
this.itemStatuses = getUpdatedItems({
|
|
61
|
-
id,
|
|
62
|
-
itemStatuses: this.itemStatuses,
|
|
63
|
-
allowMultipleActive: this.multipleActive,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Bind event handlers with the proper context of `this`.
|
|
73
|
-
*
|
|
74
|
-
* @return {Object} Tag A reference to the current instance of the class
|
|
75
|
-
* @chainable
|
|
76
|
-
*/
|
|
77
|
-
setupHandlers() {
|
|
78
|
-
this.onClick = this.onClick.bind(this);
|
|
79
|
-
this.updateTagItems = this.updateTagItems.bind(this);
|
|
80
|
-
|
|
81
|
-
return this;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Creates event listeners to enable interaction with view
|
|
86
|
-
*
|
|
87
|
-
* @return {Object} Tag A reference to the instance of the class
|
|
88
|
-
* @chainable
|
|
89
|
-
*/
|
|
90
|
-
enable() {
|
|
91
|
-
if (this.buttonTags.length > 0) {
|
|
92
|
-
this.buttonTags.forEach((button, i) => {
|
|
93
|
-
button.addEventListener(EVENTS.CLICK, () => this.onClick(i));
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Onclick interaction with the tag button
|
|
102
|
-
*
|
|
103
|
-
* @return {Object} Tag A reference to the instance of the class
|
|
104
|
-
* @chainable
|
|
105
|
-
*/
|
|
106
|
-
onClick(i) {
|
|
107
|
-
const id = this.buttonTags[i].getAttribute("id");
|
|
108
|
-
|
|
109
|
-
this.itemStatuses = getUpdatedItems({
|
|
110
|
-
id,
|
|
111
|
-
itemStatuses: this.itemStatuses,
|
|
112
|
-
allowMultipleacmultipleActive: this.multipleActive,
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// this.updateTagItems();
|
|
116
|
-
this.removeParentDom(id);
|
|
117
|
-
|
|
118
|
-
return this;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
*
|
|
123
|
-
* @param {String} id The element id of the child of the node to be removed
|
|
124
|
-
*
|
|
125
|
-
* @return {Object} Tag A reference to the instance of the class
|
|
126
|
-
* @chainable
|
|
127
|
-
*/
|
|
128
|
-
removeParentDom(id) {
|
|
129
|
-
const buttonTag = document.getElementById(id);
|
|
130
|
-
|
|
131
|
-
if (buttonTag) {
|
|
132
|
-
buttonTag.parentElement.remove();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return this;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Update tag items based off of new statuses
|
|
140
|
-
*
|
|
141
|
-
* @return {Object} Tag A reference to the instance of the class
|
|
142
|
-
* @chainable
|
|
143
|
-
*/
|
|
144
|
-
updateTagItems() {
|
|
145
|
-
this.tags.forEach((item, i) => {
|
|
146
|
-
const id = item.getAttribute("id");
|
|
147
|
-
const open = this.itemStatuses.indexOf(id) > -1;
|
|
148
|
-
if (open) {
|
|
149
|
-
this.tags[i].classList.add("ilo--tag--active");
|
|
150
|
-
this.tags[i].setAttribute("data-active", "true");
|
|
151
|
-
} else {
|
|
152
|
-
this.tags[i].classList.remove("ilo--tag--active");
|
|
153
|
-
this.tags[i].setAttribute("data-active", "true");
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
return this;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{#
|
|
2
|
-
TAG COMPONENT
|
|
3
|
-
#}
|
|
4
|
-
{% if tagType == "button" and defaultActive %}
|
|
5
|
-
<li class="{{prefix}}--tags__item">
|
|
6
|
-
<button class="{{prefix}}--tag {{prefix}}--tag--button {{prefix}}--tag--active icon__position--right" id="{{ elementId }}" data-active={{ defaultActive }} type="button">
|
|
7
|
-
{{content}}
|
|
8
|
-
<span class="ilo--icon" title="Remove"></span>
|
|
9
|
-
</button>
|
|
10
|
-
</li>
|
|
11
|
-
{% elseif tagType == "reset" %}
|
|
12
|
-
<li class="{{prefix}}--tags__item">
|
|
13
|
-
<button class="{{prefix}}--tag {{prefix}}--tag--reset {{prefix}}--tag--active" id="{{ elementId }}" data-active={{ defaultActive }} type="button">
|
|
14
|
-
{{content}}
|
|
15
|
-
</button>
|
|
16
|
-
</li>
|
|
17
|
-
{% elseif tagType == "anchor" %}
|
|
18
|
-
<li class="{{prefix}}--tags__item">
|
|
19
|
-
<a class="{{prefix}}--tag {{prefix}}--tag--anchor {% if defaultActive %} {{prefix}}--tag--active{% endif %}" href="{{ url }}" id="{{ elementId }}" data-active={{ defaultActive }}>
|
|
20
|
-
{{content}}
|
|
21
|
-
</a>
|
|
22
|
-
</li>
|
|
23
|
-
{% elseif tagType == "display" %}
|
|
24
|
-
<li class="{{prefix}}--tags__item">
|
|
25
|
-
<span class="{{prefix}}--tag {% if defaultActive %} {{prefix}}--tag--active{% endif %}" id="{{ elementId }}" data-active={{ defaultActive }}>
|
|
26
|
-
{{content}}
|
|
27
|
-
</span>
|
|
28
|
-
</li>
|
|
29
|
-
{% else %}
|
|
30
|
-
{% endif %}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{#
|
|
2
|
-
TAGS COMPONENT
|
|
3
|
-
#}
|
|
4
|
-
<ul class="ilo--tags" data-loadcomponent="Tag" data-multipleactive="{{ allowMultipleActive|default(true) }}">
|
|
5
|
-
{% for item in items %}
|
|
6
|
-
{% include "@components/tags/tag.twig" with {
|
|
7
|
-
content: item.content,
|
|
8
|
-
defaultActive: item.defaultActive,
|
|
9
|
-
id: item.elementId,
|
|
10
|
-
prefix: prefix,
|
|
11
|
-
tagType: tagType,
|
|
12
|
-
url: item.url|default(null),
|
|
13
|
-
} only %}
|
|
14
|
-
{% endfor %}
|
|
15
|
-
</ul>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{# textarea.twig #}
|
|
2
|
-
|
|
3
|
-
{% extends "@components/form/formcontrol.twig" %}
|
|
4
|
-
|
|
5
|
-
{% set baseClass = prefix ~ '--textarea' %}
|
|
6
|
-
{% set textAreaClass = [baseClass] %}
|
|
7
|
-
{% if error %}
|
|
8
|
-
{% set textAreaClass = textAreaClass|merge([baseClass ~ "__error"]) %}
|
|
9
|
-
{% endif %}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{% block formfield %}
|
|
13
|
-
<textarea class="{{ textAreaClass|join(' ') }}" name="{{ name }}" id="{{ id|default(name) }}" aria-describedby="{{ ariaDescribedBy }}" {% if disabled %} disabled {% endif %} {% if required %} required {% endif %} {% if placeholder %} placeholder="{{ placeholder }}" {% endif %} {% if form %} form="{{ form }}" {% endif %} {% if maxlength %} maxlength="{{ maxlength }}" {% endif %} {% if minlength %} minlength="{{ minlength }}" {% endif %} {% if spellcheck %} spellcheck="{{ spellcheck }}" {% endif %} {% if wrap %} wrap="{{ wrap }}" {% endif %}>{{ value|default('') }}</textarea>
|
|
14
|
-
{% endblock %}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{# text-input.twig #}
|
|
2
|
-
|
|
3
|
-
{% extends "@components/form/formcontrol.twig" %}
|
|
4
|
-
|
|
5
|
-
{% set baseClass = prefix ~ "--text-input" %}
|
|
6
|
-
{% set inputClass = [baseClass] %}
|
|
7
|
-
{% if error %}
|
|
8
|
-
{% set inputClass = inputClass|merge([baseClass ~ "__error"]) %}
|
|
9
|
-
{% endif %}
|
|
10
|
-
|
|
11
|
-
{% block formfield %}
|
|
12
|
-
<input id="{{ id|default(name) }}" name="{{ name }}" type="{{ type|default("text") }}" class="{{ inputClass|join(" ") }}" {% if placeholder %} placeholder="{{ placeholder }}" {% endif %} {% if disabled %} disabled {% endif %} {% if required %} required {% endif %} {% if pattern %} pattern="{{ pattern }}" {% endif %} {% if ariaDescribedBy %} aria-describedby="{{ ariaDescribedBy }}" {% endif %}/>
|
|
13
|
-
|
|
14
|
-
{% endblock %}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{# toggle.twig #}
|
|
2
|
-
|
|
3
|
-
{% extends "@components/form/formcontrol.twig" %}
|
|
4
|
-
|
|
5
|
-
{# Define the default values, these values can be overridden when the template is included or extended. #}
|
|
6
|
-
{% set size = size|default("medium") %}
|
|
7
|
-
{% set error = error|default(false) %}
|
|
8
|
-
{% set disabled = disabled|default(false) %}
|
|
9
|
-
{% set defaultChecked = defaultChecked|default(false) %}
|
|
10
|
-
{% set required = required|default(false) %}
|
|
11
|
-
{% set name = name|default("toggle") %}
|
|
12
|
-
{% set id = id|default(name) %}
|
|
13
|
-
{% set ariaDescribedBy = ariaDescribedBy|default("") %}
|
|
14
|
-
|
|
15
|
-
{# Calculate dynamic classes based on the passed values. #}
|
|
16
|
-
{% set baseClass = prefix ~ "--input--toggle" %}
|
|
17
|
-
{% set sliderClass = baseClass ~ "--slider" %}
|
|
18
|
-
{% set toggleClass = [baseClass, class, baseClass ~ "__size__" ~ size] %}
|
|
19
|
-
|
|
20
|
-
{% if not disabled and error %}
|
|
21
|
-
{% set toggleClass = toggleClass|merge([baseClass ~ "__error"]) %}
|
|
22
|
-
{% endif %}
|
|
23
|
-
{% if disabled %}
|
|
24
|
-
{% set toggleClass = toggleClass|merge([baseClass ~ "__disabled"]) %}
|
|
25
|
-
{% endif %}
|
|
26
|
-
|
|
27
|
-
{% block formfield %}
|
|
28
|
-
|
|
29
|
-
<div class="{{ toggleClass|join(" ") }}">
|
|
30
|
-
<input {% if defaultchecked %} defaultchecked {% endif %} {% if required %} required {% endif %} {% if checked %} checked {% endif %} name="{{ name }}" id="{{ id }}" type="checkbox" role="switch" aria-describedby="{{ ariaDescribedBy }}"/>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<span class="{{ sliderClass }}"/>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
{% endblock %}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Tooltip from "./tooltip";
|
|
2
|
-
|
|
3
|
-
Drupal.behaviors.tooltip = {
|
|
4
|
-
attach() {
|
|
5
|
-
Array.prototype.forEach.call(
|
|
6
|
-
document.querySelectorAll(`[data-loadcomponent="Tooltip"]`),
|
|
7
|
-
(element) => {
|
|
8
|
-
if (!element.dataset.jsProcessed) {
|
|
9
|
-
// eslint-disable-next-line no-console
|
|
10
|
-
new Tooltip(element);
|
|
11
|
-
element.dataset.jsProcessed = true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
};
|