@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.
- 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 +13 -8
- 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.twig +8 -8
- 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 +0 -3
- 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/components/accordion.css +1 -0
- package/dist/styles/components/breadcrumb.css +1 -0
- package/dist/styles/components/button.css +1 -0
- package/dist/styles/components/callout.css +1 -0
- package/dist/styles/components/card.css +1 -0
- package/dist/styles/components/checkbox.css +1 -0
- package/dist/styles/components/contextmenu.css +1 -0
- package/dist/styles/components/datacard.css +1 -0
- package/dist/styles/components/dropdown.css +1 -0
- package/dist/styles/components/featurecard.css +1 -0
- package/dist/styles/components/fieldset.css +1 -0
- package/dist/styles/components/file-upload.css +1 -0
- package/dist/styles/components/footer.css +1 -0
- package/dist/styles/components/formcontrol.css +1 -0
- package/dist/styles/components/heading.css +1 -0
- package/dist/styles/components/herocard.css +1 -0
- package/dist/styles/components/input.css +1 -0
- package/dist/styles/components/linklist.css +1 -0
- package/dist/styles/components/list.css +1 -0
- package/dist/styles/components/loading.css +1 -0
- package/dist/styles/components/logo.css +1 -0
- package/dist/styles/components/navigation.css +1 -0
- package/dist/styles/components/pagination.css +1 -0
- package/dist/styles/components/profile.css +1 -0
- package/dist/styles/components/readmore.css +1 -0
- package/dist/styles/components/richtext.css +1 -0
- package/dist/{components/searchfield → styles/components}/searchfield.css +1 -1
- package/dist/styles/components/socialmedia.css +1 -0
- package/dist/styles/components/statcard.css +1 -0
- package/dist/styles/components/table.css +1 -0
- package/dist/styles/components/tableofcontents.css +1 -0
- package/dist/styles/components/tabs.css +1 -0
- package/dist/styles/components/tag.css +1 -0
- package/dist/styles/components/textarea.css +1 -0
- package/dist/styles/components/textinput.css +1 -0
- package/dist/styles/components/tooltip.css +1 -0
- package/dist/styles/global.css +2 -0
- package/dist/styles/global.css.map +1 -0
- package/dist/styles/index.css +9 -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 +45 -77
- package/README.md +0 -218
- package/dist/components/accordion/accordion.css +0 -1
- package/dist/components/breadcrumb/breadcrumb.css +0 -1
- package/dist/components/button/button.css +0 -1
- package/dist/components/callout/callout.css +0 -1
- package/dist/components/card/card.css +0 -1
- package/dist/components/checkbox/checkbox.css +0 -1
- package/dist/components/contextmenu/contextmenu.css +0 -1
- package/dist/components/datacard/datacard.css +0 -1
- package/dist/components/dropdown/dropdown.css +0 -1
- package/dist/components/featurecard/featurecard.css +0 -1
- package/dist/components/fieldset/fieldset.css +0 -1
- package/dist/components/file-upload/file-upload.css +0 -1
- package/dist/components/footer/footer.css +0 -1
- package/dist/components/formcontrol/formcontrol.css +0 -1
- package/dist/components/heading/heading.css +0 -1
- package/dist/components/herocard/herocard.css +0 -1
- package/dist/components/icon/icon.css +0 -1
- package/dist/components/input/input.css +0 -1
- package/dist/components/linklist/linklist.css +0 -1
- package/dist/components/list/list.css +0 -1
- package/dist/components/loading/loading.css +0 -1
- package/dist/components/logo/logo.css +0 -1
- package/dist/components/navigation/navigation.css +0 -1
- package/dist/components/pagination/pagination.css +0 -1
- package/dist/components/polyfill/polyfill.twig +0 -10
- package/dist/components/profile/profile.css +0 -1
- package/dist/components/readmore/readmore.css +0 -1
- package/dist/components/richtext/richtext.css +0 -1
- package/dist/components/socialmedia/socialmedia.css +0 -1
- package/dist/components/statcard/statcard.css +0 -1
- package/dist/components/table/table.css +0 -1
- package/dist/components/tableofcontents/tableofcontents.css +0 -1
- package/dist/components/tabs/tabs.css +0 -1
- package/dist/components/tag/tag.behavior.js +0 -1
- package/dist/components/tag/tag.css +0 -1
- package/dist/components/textarea/textarea.css +0 -1
- package/dist/components/textinput/textinput.css +0 -1
- package/dist/components/tooltip/tooltip.css +0 -1
- package/dist/global/styles.css +0 -9
- 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-families.scss +0 -6
- 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/cardgroup → styles/components}/cardgroup.css +0 -0
- /package/dist/{components/container → styles/components}/container.css +0 -0
- /package/dist/{components/credit → styles/components}/credit.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/empty → styles/components}/empty.css +0 -0
- /package/dist/{components/factlistcard → styles/components}/factlistcard.css +0 -0
- /package/dist/{components/form → styles/components}/form.css +0 -0
- /package/dist/{components/hero → styles/components}/hero.css +0 -0
- /package/dist/{components/image → styles/components}/image.css +0 -0
- /package/dist/{components/link → styles/components}/link.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/notification → styles/components}/notification.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/textcard → styles/components}/textcard.css +0 -0
- /package/dist/{components/toggle → styles/components}/toggle.css +0 -0
- /package/dist/{components/video → styles/components}/video.css +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{#
|
|
2
|
-
LINK LIST COMPONENT
|
|
3
|
-
#}
|
|
4
|
-
<div class="{{prefix}}--link-list {{prefix}}--link-list--{{theme}}" data-loadcomponent="LinkList" data-prefix="{{prefix}}">
|
|
5
|
-
{% if headline %}
|
|
6
|
-
<h3 class="{{prefix}}--link-list--headline">{{headline}}</h3>
|
|
7
|
-
{% endif %}
|
|
8
|
-
<ul class="{{prefix}}--link-list--linkgroups">
|
|
9
|
-
{% for group in linkgroup %}
|
|
10
|
-
<li class="{{prefix}}--link-list--linkgroups-item">
|
|
11
|
-
{% if group.headline is not empty %}
|
|
12
|
-
<h4 class="{{prefix}}--link-list--links--headline">{{group.headline}}</h4>
|
|
13
|
-
{% endif %}
|
|
14
|
-
<ul class="{{prefix}}--link-list--links">
|
|
15
|
-
{% for link in group.links %}
|
|
16
|
-
<li class="{{prefix}}--link-list--links--item{{ link.indented|boolval ? ' indented'}}">
|
|
17
|
-
<a href="{{link.url}}" class="{{prefix}}--link-list--link">
|
|
18
|
-
<span class="{{prefix}}--link-list--label">{{link.label}}</span>
|
|
19
|
-
</a>
|
|
20
|
-
</li>
|
|
21
|
-
{% endfor %}
|
|
22
|
-
</ul>
|
|
23
|
-
</li>
|
|
24
|
-
{% endfor %}
|
|
25
|
-
</ul>
|
|
26
|
-
</div>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{# list.twig #}
|
|
2
|
-
|
|
3
|
-
{% if not ordered %}
|
|
4
|
-
{% set ordered = "unstyled" %}
|
|
5
|
-
{% endif %}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<div class="{{prefix}}--list {% if ordered == 'unstyled' %} {{prefix}}--list__unstyled {% endif %} {% if alignment == 'horizontal' %} {{prefix}}--list__horizontal {% endif %}">
|
|
9
|
-
{% if title %}
|
|
10
|
-
<h2 class="{{prefix}}--list--title">{{ title }}</h2>
|
|
11
|
-
{% endif %}
|
|
12
|
-
{% if ordered == "ordered" %}
|
|
13
|
-
<ol>
|
|
14
|
-
{% for item in items %}
|
|
15
|
-
{% include "@components/list/list-item.twig" with {
|
|
16
|
-
prefix: prefix,
|
|
17
|
-
label: item.label,
|
|
18
|
-
content: item.content,
|
|
19
|
-
elementId: item.id,
|
|
20
|
-
} only %}
|
|
21
|
-
{% endfor %}
|
|
22
|
-
</ol>
|
|
23
|
-
{% else %}
|
|
24
|
-
<ul>
|
|
25
|
-
{% for item in items %}
|
|
26
|
-
{% include "@components/list/list-item.twig" with {
|
|
27
|
-
prefix: prefix,
|
|
28
|
-
label: item.label,
|
|
29
|
-
content: item.content,
|
|
30
|
-
elementId: item.id,
|
|
31
|
-
} only %}
|
|
32
|
-
{% endfor %}
|
|
33
|
-
</ul>
|
|
34
|
-
{% endif %}
|
|
35
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Loading from "./loading";
|
|
2
|
-
|
|
3
|
-
Drupal.behaviors.loading = {
|
|
4
|
-
attach() {
|
|
5
|
-
Array.prototype.forEach.call(
|
|
6
|
-
document.querySelectorAll(`[data-loadcomponent="Loading"]`),
|
|
7
|
-
(element) => {
|
|
8
|
-
if (!element.dataset.jsProcessed) {
|
|
9
|
-
// eslint-disable-next-line no-console
|
|
10
|
-
new Loading(element);
|
|
11
|
-
element.dataset.jsProcessed = true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { EVENTS } from "@ilo-org/utils";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The Loading module which handles rendering field labels inline on a form.
|
|
5
|
-
*
|
|
6
|
-
* To use this, you'll need to have the Javascript that's making the API call send custom events equal to
|
|
7
|
-
* the constants EVENTS.ITEMSLOADED and EVENTS.ITEMSLOADING to the document. Send EVENTS.ITEMSLOADING when the * API call is made, and EVENTS.ITEMSLOADED when the data has successfully loaded.
|
|
8
|
-
*
|
|
9
|
-
* @class Loading
|
|
10
|
-
*/
|
|
11
|
-
export default class Loading {
|
|
12
|
-
/**
|
|
13
|
-
* Loading constructor which assigns the element passed into the constructor
|
|
14
|
-
* to the `this.element` property for later reference
|
|
15
|
-
*
|
|
16
|
-
* @param {HTMLElement} element - REQUIRED - the module's container
|
|
17
|
-
*/
|
|
18
|
-
constructor(element) {
|
|
19
|
-
/**
|
|
20
|
-
* Reference to the DOM element that is the root of the component
|
|
21
|
-
* @property {Object}
|
|
22
|
-
*/
|
|
23
|
-
this.element = element;
|
|
24
|
-
|
|
25
|
-
// get the theme prefix
|
|
26
|
-
this.prefix = `${this.element.dataset.prefix}--loading`;
|
|
27
|
-
|
|
28
|
-
// set some values
|
|
29
|
-
this.status = "idle";
|
|
30
|
-
|
|
31
|
-
// Initialize the view
|
|
32
|
-
this.init();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Initializes the view by calling the functions to
|
|
37
|
-
* create DOM references, setup event handlers and
|
|
38
|
-
* then create the event listeners
|
|
39
|
-
*
|
|
40
|
-
* @return {Object} Loading A reference to the instance of the class
|
|
41
|
-
* @chainable
|
|
42
|
-
*/
|
|
43
|
-
init() {
|
|
44
|
-
this.setupHandlers().enable();
|
|
45
|
-
|
|
46
|
-
return this;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Bind event handlers with the proper context of `this`.
|
|
51
|
-
*
|
|
52
|
-
* @return {Object} Loading A reference to the current instance of the class
|
|
53
|
-
* @chainable
|
|
54
|
-
*/
|
|
55
|
-
setupHandlers() {
|
|
56
|
-
this.LoadingHandler = this.loading.bind(this);
|
|
57
|
-
this.LoadedHandler = this.loaded.bind(this);
|
|
58
|
-
|
|
59
|
-
return this;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Creates event listeners to enable interaction with view
|
|
64
|
-
*
|
|
65
|
-
* @return {Object} Loading A reference to the instance of the class
|
|
66
|
-
* @chainable
|
|
67
|
-
*/
|
|
68
|
-
enable() {
|
|
69
|
-
document.addEventListener(EVENTS.ITEMSLOADING, () => this.LoadingHandler);
|
|
70
|
-
document.addEventListener(EVENTS.ITEMSLOADED, () => this.LoadedHandler);
|
|
71
|
-
|
|
72
|
-
return this;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Items are loading
|
|
77
|
-
*
|
|
78
|
-
* @return {Object} Loading A reference to the instance of the class
|
|
79
|
-
* @chainable
|
|
80
|
-
*/
|
|
81
|
-
loading() {
|
|
82
|
-
this.element.classList.remove(`${this.prefix}--idle`);
|
|
83
|
-
this.element.classList.add(`${this.prefix}--loading`);
|
|
84
|
-
|
|
85
|
-
return this;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* What happens when the items have loaded
|
|
90
|
-
*
|
|
91
|
-
* @return {Object} Loading A reference to the instance of the class
|
|
92
|
-
* @chainable
|
|
93
|
-
*/
|
|
94
|
-
loaded() {
|
|
95
|
-
this.element.classList.remove(`${this.prefix}--loading`);
|
|
96
|
-
this.element.classList.add(`${this.prefix}--loaded`);
|
|
97
|
-
this.element.querySelector(`.${this.prefix}--copy`).innerHTML =
|
|
98
|
-
this.element.dataset.loadedmessage;
|
|
99
|
-
|
|
100
|
-
return this;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{#
|
|
2
|
-
LOADING COMPONENT
|
|
3
|
-
#}
|
|
4
|
-
<div class="storybook {{prefix}}--loading {{prefix}}--loading--{{size}} {{prefix}}--loading--{{status}}" role="alert" aria-live="assertive" data-loadcomponent="Loading" data-prefix="{{prefix}}">
|
|
5
|
-
{% if message or loadedmessage %}
|
|
6
|
-
<p class="{{prefix}}--loading--copy">{% if message and not status == 'loaded' %}{{message}}{% endif %}{% if loadedmessage and status == 'loaded' %}{{loadedmessage}}{% endif %}</p>
|
|
7
|
-
{% endif %}
|
|
8
|
-
</div>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
{#
|
|
2
|
-
LOCALNAV COMPONENT
|
|
3
|
-
#}
|
|
4
|
-
<header class="{{prefix}}--header {{prefix}}--header--local" data-loadcomponent="Navigation" data-prefix="{{prefix}}">
|
|
5
|
-
<div class="{{prefix}}--header--utility-bar {{prefix}}--header--utility-bar--local" {% if background %} style="background: {{background}};"{% endif %}>
|
|
6
|
-
<nav class="{{prefix}}--nav--local">
|
|
7
|
-
<div class="{{prefix}}--nav--local--logo-wrapper">
|
|
8
|
-
<a href="{{siteurl}}" class="{{prefix}}--nav--local--logo-link">
|
|
9
|
-
<img src="{{logo.image}}" alt="{{logo.alt}}" class="{{prefix}}--nav--local--logo">
|
|
10
|
-
</a>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<ul class="{{prefix}}--nav--local--set">
|
|
14
|
-
{% for item in primarynav.items %}
|
|
15
|
-
<li class="{{prefix}}--nav--local--item">
|
|
16
|
-
<a href="{{item.link}}" class="{{prefix}}--nav--local--link">
|
|
17
|
-
<span>{{item.label}}</span>
|
|
18
|
-
</a>
|
|
19
|
-
</li>
|
|
20
|
-
{% endfor %}
|
|
21
|
-
</ul>
|
|
22
|
-
</nav>
|
|
23
|
-
<div class="{{prefix}}--language-switcher">
|
|
24
|
-
<div class="{{prefix}}--language-switcher--wrap">
|
|
25
|
-
{% if mainlink is defined %}
|
|
26
|
-
<span class="{{prefix}}--language-switcher--link--wrap">
|
|
27
|
-
<a href="{{mainlink.url}}" class="{{prefix}}--language-switcher--link">{{mainlink.label}}</a>
|
|
28
|
-
</span>
|
|
29
|
-
{% endif %}
|
|
30
|
-
{% if languagecontextmenu.links is not empty %}
|
|
31
|
-
<button class="{{prefix}}--language-switcher--button" type="button">
|
|
32
|
-
{{languagelabel}}
|
|
33
|
-
</button>
|
|
34
|
-
{% include '@components/contextmenu/contextmenu.twig' with {
|
|
35
|
-
links: languagecontextmenu.links,
|
|
36
|
-
prefix: prefix
|
|
37
|
-
}
|
|
38
|
-
%}
|
|
39
|
-
{% endif %}
|
|
40
|
-
</div> <!-- /.{{prefix}}--language-switcher--wrap -->
|
|
41
|
-
</div> <!-- /.{{prefix}}--language-switcher -->
|
|
42
|
-
<button class="{{prefix}}--header--menu">Menu</button>
|
|
43
|
-
</div> <!-- /.{{prefix}}--header--utility-bar -->
|
|
44
|
-
|
|
45
|
-
<div class="{{prefix}}--header--navigation">
|
|
46
|
-
<div class="{{prefix}}--header--inner">
|
|
47
|
-
<div class="{{prefix}}--mobile--nav">
|
|
48
|
-
<div class="{{prefix}}--mobile--nav--logo">
|
|
49
|
-
<a href="{{siteurl}}" class="{{prefix}}--header--logo-link">
|
|
50
|
-
<img class="{{prefix}}--header--logo" src="{{mobilelogo.image}}" alt="{{mobilelogo.alt}}">
|
|
51
|
-
</a>
|
|
52
|
-
<button class="{{prefix}}--header--menu--close">{{menucloselabel}}</button>
|
|
53
|
-
</div> <!-- /.{{prefix}}--mobile--logo -->
|
|
54
|
-
{% if languagecontextmenu.links is not empty %}
|
|
55
|
-
<div class="{{prefix}}--mobile--nav--language--switcher">
|
|
56
|
-
<button class="{{prefix}}--mobile--nav--language--switcher--button" type="button">{{languagelabel}}</button>
|
|
57
|
-
</div> <!-- /.{{prefix}}--mobile--nav--language--switcher -->
|
|
58
|
-
<div class="{{prefix}}--mobile--nav--language--select">
|
|
59
|
-
<div class="{{prefix}}--header--inner">
|
|
60
|
-
<div class="{{prefix}}--mobile--subnav--menu">
|
|
61
|
-
<button class="{{prefix}}--mobile--subnav--back" type="button">{{subnav.mobilebacklabel}}</button>
|
|
62
|
-
<button class="{{prefix}}--header--menu--close">{{subnav.mobilecloselabel}}</button>
|
|
63
|
-
<h6 class="{{prefix}}--mobile--subnav--label">{{languagelabel}}</h6>
|
|
64
|
-
</div> <!-- /{{prefix}}--mobile--subnav--menu -->
|
|
65
|
-
<ul class="{{prefix}}--nav--set">
|
|
66
|
-
{% for item in languagecontextmenu.links %}
|
|
67
|
-
<li class="{{prefix}}--nav--items">
|
|
68
|
-
<a href="{{item.url}}" class="{{prefix}}--nav--link {{prefix}}--nav--language">{{item.label}}</a>
|
|
69
|
-
</li>
|
|
70
|
-
{% endfor %}
|
|
71
|
-
</ul>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
{% endif %}
|
|
75
|
-
</div> <!-- /.{{prefix}}--mobile--nav -->
|
|
76
|
-
<nav class="{{prefix}}--nav" aria-labelledby="primary-navigation">
|
|
77
|
-
<h2 class="{{prefix}}--nav--label" id="primary-navigation">{{primarynav.navlabel}}</h2>
|
|
78
|
-
<ul class="{{prefix}}--nav--set">
|
|
79
|
-
{% for item in primarynav.items %}
|
|
80
|
-
<li class="{{prefix}}--nav--items">
|
|
81
|
-
<a href="{{item.link}}" class="{{prefix}}--nav--link">{{item.label}}</a>
|
|
82
|
-
</li>
|
|
83
|
-
{% endfor %}
|
|
84
|
-
</ul>
|
|
85
|
-
</nav>
|
|
86
|
-
</header>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<div class="{{prefix}}--logo-grid {{prefix}}--logo-grid__theme__{{ theme }}">
|
|
2
|
-
<div class="{{prefix}}--logo-grid--logos">
|
|
3
|
-
{% for logo in logos %}
|
|
4
|
-
{% if logo.url %}
|
|
5
|
-
<a href="{{ logo.url }}" class="{{prefix}}--logo-grid--item {{prefix}}--logo-grid--link">
|
|
6
|
-
{% else %}
|
|
7
|
-
<div class="{{prefix}}--logo-grid--item">
|
|
8
|
-
{% endif %}
|
|
9
|
-
<img src="{{ logo.src }}" alt="{{ logo.label }}" class="{{prefix}}--logo-grid--logo__image">
|
|
10
|
-
{% if logo.url %}
|
|
11
|
-
</a>
|
|
12
|
-
{% else %}
|
|
13
|
-
</div>
|
|
14
|
-
{% endif %}
|
|
15
|
-
{% endfor %}
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Modal from "./modal";
|
|
2
|
-
|
|
3
|
-
Drupal.behaviors.modal = {
|
|
4
|
-
attach() {
|
|
5
|
-
Array.prototype.forEach.call(
|
|
6
|
-
document.querySelectorAll(`[data-loadcomponent="Modal"]`),
|
|
7
|
-
(element) => {
|
|
8
|
-
if (!element.dataset.jsProcessed) {
|
|
9
|
-
// eslint-disable-next-line no-console
|
|
10
|
-
new Modal(element);
|
|
11
|
-
element.dataset.jsProcessed = true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { EVENTS } from "@ilo-org/utils";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The Modal module which handles control and display of a modal dialog
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @class Modal
|
|
8
|
-
*/
|
|
9
|
-
export default class Modal {
|
|
10
|
-
/**
|
|
11
|
-
* Modal 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
|
-
// Initialize the view
|
|
24
|
-
this.init();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Initializes the view by calling the functions to
|
|
29
|
-
* create DOM references, setup event handlers and
|
|
30
|
-
* then create the event listeners
|
|
31
|
-
*
|
|
32
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
33
|
-
* @chainable
|
|
34
|
-
*/
|
|
35
|
-
init() {
|
|
36
|
-
this.cacheDomReferences().setupHandlers().enable();
|
|
37
|
-
|
|
38
|
-
return this;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Find all necessary DOM elements used in the view and cache them
|
|
43
|
-
*
|
|
44
|
-
* @return {Object} ReadMore A reference to the instance of the class
|
|
45
|
-
* @chainable
|
|
46
|
-
*/
|
|
47
|
-
cacheDomReferences() {
|
|
48
|
-
/**
|
|
49
|
-
* The button for toggling Read More state
|
|
50
|
-
* @type {Object}
|
|
51
|
-
*/
|
|
52
|
-
this.OpenButton = this.element.querySelector(`.modal--open`);
|
|
53
|
-
this.CloseButton = this.element.querySelector(`.modal--close`);
|
|
54
|
-
|
|
55
|
-
return this;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Bind event handlers with the proper context of `this`.
|
|
60
|
-
*
|
|
61
|
-
* @return {Object} Modal A reference to the current instance of the class
|
|
62
|
-
* @chainable
|
|
63
|
-
*/
|
|
64
|
-
setupHandlers() {
|
|
65
|
-
this.OpenButtonHandler = this.openButtonClick.bind(this);
|
|
66
|
-
this.CloseHandler = this.closeButtonClick.bind(this);
|
|
67
|
-
this.KeyPressHandler = this.keyPress.bind(this);
|
|
68
|
-
|
|
69
|
-
return this;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Creates event listeners to enable interaction with view
|
|
74
|
-
*
|
|
75
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
76
|
-
* @chainable
|
|
77
|
-
*/
|
|
78
|
-
enable() {
|
|
79
|
-
if (!this.OpenButton || !this.CloseButton) return this;
|
|
80
|
-
|
|
81
|
-
this.OpenButton.addEventListener(EVENTS.CLICK, () =>
|
|
82
|
-
this.OpenButtonHandler()
|
|
83
|
-
);
|
|
84
|
-
this.CloseButton.addEventListener(EVENTS.CLICK, () => this.CloseHandler());
|
|
85
|
-
|
|
86
|
-
return this;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Actions performed on click of the open button
|
|
91
|
-
*
|
|
92
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
93
|
-
* @chainable
|
|
94
|
-
*/
|
|
95
|
-
openButtonClick() {
|
|
96
|
-
this.element.classList.add("show");
|
|
97
|
-
setTimeout(() => {
|
|
98
|
-
this.element.classList.add("fadein");
|
|
99
|
-
}, 125);
|
|
100
|
-
window.addEventListener(EVENTS.KEY_DOWN, (e) => this.KeyPressHandler(e));
|
|
101
|
-
|
|
102
|
-
return this;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Actions performed on click of the close button
|
|
107
|
-
*
|
|
108
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
109
|
-
* @chainable
|
|
110
|
-
*/
|
|
111
|
-
closeButtonClick() {
|
|
112
|
-
this.element.classList.remove("fadein");
|
|
113
|
-
setTimeout(() => {
|
|
114
|
-
this.element.classList.remove("show");
|
|
115
|
-
}, 125);
|
|
116
|
-
window.removeEventListener(EVENTS.KEY_DOWN, (e) => this.KeyPressHandler(e));
|
|
117
|
-
|
|
118
|
-
return this;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Actions performed on key press
|
|
123
|
-
*
|
|
124
|
-
* @return {Object} Modal A reference to the instance of the class
|
|
125
|
-
* @chainable
|
|
126
|
-
*/
|
|
127
|
-
keyPress(e) {
|
|
128
|
-
if (e.key === "Escape") {
|
|
129
|
-
this.closeButtonClick();
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return this;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{#
|
|
2
|
-
MODAL COMPONENT
|
|
3
|
-
|
|
4
|
-
The modal calls another Twig into it, and therefore passes `modaldata` into it. `modaldata` should contain the fields for the component in question, just as if the component were being used anywhere else.
|
|
5
|
-
#}
|
|
6
|
-
|
|
7
|
-
{% if component != 'modal' %}
|
|
8
|
-
<div class="{{prefix}}--modal" data-loadcomponent="Modal" data-prefix="{{prefix}}">
|
|
9
|
-
{% include '@components/button/button.twig' with openbutton %}
|
|
10
|
-
<div class="{{prefix}}--modal--wrapper" {% if modalLabel %} aria-label="{{modalLabel}}" {% endif %} aria-modal="true" role="alertdialog">
|
|
11
|
-
<div class="{{prefix}}--modal--background" role="presentation"></div>
|
|
12
|
-
<div class="{{prefix}}--modal--contents">
|
|
13
|
-
{% block modal_content %}
|
|
14
|
-
{% include '@components/' ~ component ~ '/' ~ component ~ '.twig' with modaldata %}
|
|
15
|
-
{% endblock %}
|
|
16
|
-
{% include '@components/button/button.twig' with closebutton %}
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
{% endif %}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Navigation from "./navigation";
|
|
2
|
-
|
|
3
|
-
Drupal.behaviors.navigation = {
|
|
4
|
-
attach() {
|
|
5
|
-
Array.prototype.forEach.call(
|
|
6
|
-
document.querySelectorAll(`[data-loadcomponent="Navigation"]`),
|
|
7
|
-
(element) => {
|
|
8
|
-
if (!element.dataset.jsProcessed) {
|
|
9
|
-
// eslint-disable-next-line no-console
|
|
10
|
-
new Navigation(element);
|
|
11
|
-
element.dataset.jsProcessed = true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
};
|