@watermarkinsights/ripple 3.8.0-2 → 3.8.0-5
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/README.md +3 -3
- package/dist/cjs/{functions-edfdd03f.js → functions-83193a8d.js} +508 -509
- package/dist/cjs/{global-ffd0392c.js → global-2f521eb7.js} +65 -65
- package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
- package/dist/cjs/{index-0e7e3668.js → index-cd179539.js} +64 -96
- package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/priv-chart-popover.cjs.entry.js +79 -79
- package/dist/cjs/priv-datepicker.cjs.entry.js +674 -674
- package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
- package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
- package/dist/cjs/ripple.cjs.js +4 -4
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +342 -342
- package/dist/cjs/wm-button.cjs.entry.js +228 -238
- package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
- package/dist/cjs/wm-chart.cjs.entry.js +475 -475
- package/dist/cjs/wm-datepicker.cjs.entry.js +273 -273
- package/dist/cjs/wm-input.cjs.entry.js +136 -136
- package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
- package/dist/cjs/wm-modal-header.cjs.entry.js +35 -35
- package/dist/cjs/wm-modal.cjs.entry.js +164 -164
- package/dist/cjs/wm-navigation_3.cjs.entry.js +239 -0
- package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
- package/dist/cjs/wm-network-uploader.cjs.entry.js +422 -422
- package/dist/cjs/wm-option_2.cjs.entry.js +497 -497
- package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
- package/dist/cjs/wm-search.cjs.entry.js +233 -233
- package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
- package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
- package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
- package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
- package/dist/cjs/wm-uploader.cjs.entry.js +348 -348
- package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
- package/dist/collection/collection-manifest.json +9 -7
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
- package/dist/collection/components/wm-button/wm-button.css +6 -1
- package/dist/collection/components/wm-button/wm-button.js +491 -503
- package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.js +232 -232
- package/dist/collection/components/wm-chart/wm-chart-slice.js +115 -115
- package/dist/collection/components/wm-chart/wm-chart.js +718 -718
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +4 -3
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1039 -1039
- package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -1
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +483 -483
- package/dist/collection/components/wm-input/wm-input.css +2 -1
- package/dist/collection/components/wm-input/wm-input.js +423 -423
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
- package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
- package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
- package/dist/collection/components/wm-modal/wm-modal.js +461 -461
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +5 -3
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +152 -96
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +105 -101
- package/dist/collection/components/wm-navigation/wm-navigation.css +8 -3
- package/dist/collection/components/wm-navigation/wm-navigation.js +193 -142
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
- package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
- package/dist/collection/components/wm-option/wm-option.css +3 -2
- package/dist/collection/components/wm-option/wm-option.js +422 -422
- package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
- package/dist/collection/components/wm-search/wm-search.js +480 -480
- package/dist/collection/components/wm-select/wm-select.css +3 -2
- package/dist/collection/components/wm-select/wm-select.js +720 -720
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +3 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +3 -2
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +3 -2
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +2 -1
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +2 -1
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +753 -753
- package/dist/collection/components/wm-uploader/wm-uploader.css +2 -1
- package/dist/collection/components/wm-uploader/wm-uploader.js +748 -748
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
- package/dist/collection/dev/scripts.js +20 -20
- package/dist/collection/global/__mocks__/functions.js +6 -6
- package/dist/collection/global/functions.js +468 -445
- package/dist/collection/global/global.js +72 -72
- package/dist/collection/global/interfaces.js +49 -49
- package/dist/collection/global/services/__mocks__/http-service.js +130 -130
- package/dist/collection/global/services/http-service.js +50 -50
- package/dist/collection/lang/lang.js +5 -5
- package/dist/collection/lang/missing.js +39 -39
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/{functions-6cd52dcf.js → functions-7eebdc16.js} +507 -510
- package/dist/esm/{global-51d6ea5f.js → global-0dc2eb57.js} +65 -65
- package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
- package/dist/esm/{index-cd8f9ae2.js → index-66f8130e.js} +64 -96
- package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
- package/dist/esm/loader.js +4 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-chart-popover.entry.js +79 -79
- package/dist/esm/priv-datepicker.entry.js +674 -674
- package/dist/esm/priv-navigator-button.entry.js +19 -19
- package/dist/esm/priv-navigator-item.entry.js +24 -24
- package/dist/esm/ripple.js +4 -4
- package/dist/esm/wm-action-menu_2.entry.js +342 -342
- package/dist/esm/wm-button.entry.js +228 -238
- package/dist/esm/wm-chart-slice.entry.js +14 -14
- package/dist/esm/wm-chart.entry.js +475 -475
- package/dist/esm/wm-datepicker.entry.js +273 -273
- package/dist/esm/wm-input.entry.js +136 -136
- package/dist/esm/wm-modal-footer.entry.js +32 -32
- package/dist/esm/wm-modal-header.entry.js +35 -35
- package/dist/esm/wm-modal.entry.js +164 -164
- package/dist/esm/wm-navigation_3.entry.js +233 -0
- package/dist/esm/wm-navigator.entry.js +269 -269
- package/dist/esm/wm-network-uploader.entry.js +422 -422
- package/dist/esm/wm-option_2.entry.js +497 -497
- package/dist/esm/wm-pagination.entry.js +168 -168
- package/dist/esm/wm-search.entry.js +233 -233
- package/dist/esm/wm-snackbar.entry.js +172 -172
- package/dist/esm/wm-tab-item_3.entry.js +298 -298
- package/dist/esm/wm-tag-input.entry.js +581 -581
- package/dist/esm/wm-timepicker.entry.js +385 -385
- package/dist/esm/wm-toggletip.entry.js +126 -126
- package/dist/esm/wm-uploader.entry.js +348 -348
- package/dist/esm/wm-wrapper.entry.js +13 -13
- package/dist/esm-es5/functions-7eebdc16.js +15 -0
- package/dist/esm-es5/{global-51d6ea5f.js → global-0dc2eb57.js} +1 -1
- package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
- package/dist/esm-es5/index-66f8130e.js +1 -0
- package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -0
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/index.d.ts +1 -0
- package/dist/ripple/p-00e0bf57.system.js +1 -0
- package/dist/ripple/p-061a0f47.entry.js +1 -0
- package/dist/ripple/p-0b345e33.system.entry.js +1 -0
- package/dist/ripple/p-0b746618.entry.js +1 -0
- package/dist/ripple/p-0c58f50d.entry.js +1 -0
- package/dist/ripple/p-0d8bd4ee.entry.js +1 -0
- package/dist/ripple/p-0f8d7b58.system.entry.js +1 -0
- package/dist/ripple/p-119a14c1.entry.js +1 -0
- package/dist/ripple/{p-aedd95e6.system.js → p-149db379.system.js} +1 -1
- package/dist/ripple/{p-4ed98fb1.system.entry.js → p-18af6ca6.system.entry.js} +1 -1
- package/dist/ripple/{p-45ee5b9d.system.entry.js → p-1ec7130b.system.entry.js} +1 -1
- package/dist/ripple/{p-c19298a5.system.entry.js → p-261ea633.system.entry.js} +1 -1
- package/dist/ripple/{p-9a9743f5.system.entry.js → p-2d49a016.system.entry.js} +1 -1
- package/dist/ripple/p-312f22ca.entry.js +1 -0
- package/dist/ripple/p-37907055.entry.js +1 -0
- package/dist/ripple/p-3c592c3b.entry.js +1 -0
- package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
- package/dist/ripple/p-48b385e6.entry.js +1 -0
- package/dist/ripple/p-501404ff.entry.js +1 -0
- package/dist/ripple/p-593e891e.entry.js +1 -0
- package/dist/ripple/p-5a08d74b.entry.js +1 -0
- package/dist/ripple/p-5a87e7d6.entry.js +1 -0
- package/dist/ripple/p-62a0f6a4.system.entry.js +1 -0
- package/dist/ripple/{p-83028f2c.js → p-6b6643f9.js} +1 -1
- package/dist/ripple/p-7093d32b.entry.js +1 -0
- package/dist/ripple/p-716fd2fa.system.entry.js +1 -0
- package/dist/ripple/{p-088e3c4c.system.entry.js → p-71bb4f49.system.entry.js} +1 -1
- package/dist/ripple/{p-e758db14.system.entry.js → p-7a9aac92.system.entry.js} +1 -1
- package/dist/ripple/{p-504579c2.system.entry.js → p-7bc744bf.system.entry.js} +1 -1
- package/dist/ripple/p-7fc8d607.system.entry.js +1 -0
- package/dist/ripple/p-820a1198.entry.js +1 -0
- package/dist/ripple/p-8b0eb05e.entry.js +1 -0
- package/dist/ripple/p-8bc0b663.system.entry.js +1 -0
- package/dist/ripple/p-99548d58.system.js +1 -0
- package/dist/ripple/p-99db8501.entry.js +1 -0
- package/dist/ripple/p-9b8f993d.entry.js +1 -0
- package/dist/ripple/p-9baa3039.js +1 -0
- package/dist/ripple/p-9d02957d.system.js +1 -0
- package/dist/ripple/p-a59094c9.system.entry.js +1 -0
- package/dist/ripple/p-a59713ca.entry.js +1 -0
- package/dist/ripple/p-a7e0ab85.entry.js +1 -0
- package/dist/ripple/{p-a5177480.system.entry.js → p-b3ce2033.system.entry.js} +1 -1
- package/dist/ripple/{p-284a9749.system.entry.js → p-bb31d263.system.entry.js} +1 -1
- package/dist/ripple/p-c34de6f3.system.entry.js +1 -0
- package/dist/ripple/p-c3615fa0.system.entry.js +1 -0
- package/dist/ripple/p-c45caf33.system.entry.js +1 -0
- package/dist/ripple/{p-f2ba1a0f.system.entry.js → p-c652f945.system.entry.js} +1 -1
- package/dist/ripple/p-c68975d3.entry.js +1 -0
- package/dist/ripple/p-ca21ca3a.js +16 -0
- package/dist/ripple/p-cb283dba.system.entry.js +1 -0
- package/dist/ripple/p-ceabb993.entry.js +1 -0
- package/dist/ripple/p-d044fcf4.system.js +15 -0
- package/dist/ripple/p-d0643c9b.entry.js +1 -0
- package/dist/ripple/p-de09f545.system.entry.js +1 -0
- package/dist/ripple/{p-1d7049b5.system.entry.js → p-dea73ebd.system.entry.js} +1 -1
- package/dist/ripple/p-e639b06c.system.entry.js +1 -0
- package/dist/ripple/p-eb0c2d8f.system.entry.js +1 -0
- package/dist/ripple/p-f4fcd826.entry.js +1 -0
- package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
- package/dist/ripple/{p-15759528.system.entry.js → p-f781014a.system.entry.js} +1 -1
- package/dist/ripple/p-f927e5da.entry.js +1 -0
- package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
- package/dist/ripple/p-ffc746cb.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
- package/dist/types/components/wm-button/wm-button.d.ts +43 -44
- package/dist/types/components/wm-chart/priv-chart-popover/priv-chart-popover.d.ts +23 -23
- package/dist/types/components/wm-chart/wm-chart-slice.d.ts +11 -11
- package/dist/types/components/wm-chart/wm-chart.d.ts +82 -82
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -42
- package/dist/types/components/wm-input/wm-input.d.ts +46 -46
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
- package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +20 -13
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +11 -10
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -19
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
- package/dist/types/components/wm-option/wm-option.d.ts +32 -32
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
- package/dist/types/components/wm-search/wm-search.d.ts +86 -86
- package/dist/types/components/wm-select/wm-select.d.ts +66 -66
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +26 -24
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/functions.d.ts +42 -40
- package/dist/types/global/global.d.ts +1 -1
- package/dist/types/global/interfaces.d.ts +34 -34
- package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
- package/dist/types/global/services/http-service.d.ts +4 -4
- package/dist/types/lang/lang.d.ts +5 -5
- package/dist/types/stencil-public-runtime.d.ts +4 -6
- package/package.json +47 -47
- package/dist/cjs/wm-navigation-hamburger.cjs.entry.js +0 -56
- package/dist/cjs/wm-navigation-item.cjs.entry.js +0 -31
- package/dist/cjs/wm-navigation.cjs.entry.js +0 -87
- package/dist/esm/wm-navigation-hamburger.entry.js +0 -52
- package/dist/esm/wm-navigation-item.entry.js +0 -27
- package/dist/esm/wm-navigation.entry.js +0 -83
- package/dist/esm-es5/functions-6cd52dcf.js +0 -15
- package/dist/esm-es5/index-cd8f9ae2.js +0 -1
- package/dist/esm-es5/wm-navigation-hamburger.entry.js +0 -1
- package/dist/esm-es5/wm-navigation-item.entry.js +0 -1
- package/dist/esm-es5/wm-navigation.entry.js +0 -1
- package/dist/ripple/p-05b44011.system.entry.js +0 -1
- package/dist/ripple/p-17fef956.entry.js +0 -1
- package/dist/ripple/p-20856a2d.system.js +0 -1
- package/dist/ripple/p-2206c8d0.entry.js +0 -1
- package/dist/ripple/p-244877c8.entry.js +0 -1
- package/dist/ripple/p-2b526a98.entry.js +0 -1
- package/dist/ripple/p-2f63e022.system.entry.js +0 -1
- package/dist/ripple/p-313b6073.system.js +0 -1
- package/dist/ripple/p-323c8fbd.entry.js +0 -1
- package/dist/ripple/p-38062c39.js +0 -1
- package/dist/ripple/p-3ba3afca.entry.js +0 -1
- package/dist/ripple/p-48ab9e16.entry.js +0 -1
- package/dist/ripple/p-4999f5dc.entry.js +0 -1
- package/dist/ripple/p-4ab257fe.entry.js +0 -1
- package/dist/ripple/p-4c0de099.system.entry.js +0 -1
- package/dist/ripple/p-4c75587a.system.entry.js +0 -1
- package/dist/ripple/p-58a1e616.system.entry.js +0 -1
- package/dist/ripple/p-5fd47eac.entry.js +0 -1
- package/dist/ripple/p-664c3f62.entry.js +0 -1
- package/dist/ripple/p-6923b8f6.system.js +0 -15
- package/dist/ripple/p-6e5a35ae.system.entry.js +0 -1
- package/dist/ripple/p-741972e8.system.entry.js +0 -1
- package/dist/ripple/p-764fa608.entry.js +0 -1
- package/dist/ripple/p-77bd8d1b.entry.js +0 -1
- package/dist/ripple/p-7ff67db9.entry.js +0 -1
- package/dist/ripple/p-8139cdfe.system.js +0 -1
- package/dist/ripple/p-864b71bf.system.entry.js +0 -1
- package/dist/ripple/p-87b8fddf.entry.js +0 -1
- package/dist/ripple/p-8a0450fd.entry.js +0 -1
- package/dist/ripple/p-9173f673.entry.js +0 -1
- package/dist/ripple/p-9f442b49.system.entry.js +0 -1
- package/dist/ripple/p-a2c2f475.system.entry.js +0 -1
- package/dist/ripple/p-a3fcdd9f.entry.js +0 -1
- package/dist/ripple/p-a588ae81.entry.js +0 -1
- package/dist/ripple/p-a8358b36.entry.js +0 -1
- package/dist/ripple/p-a88d46f9.system.entry.js +0 -1
- package/dist/ripple/p-a8dfec6d.system.entry.js +0 -1
- package/dist/ripple/p-b1d25dec.entry.js +0 -1
- package/dist/ripple/p-b542340c.system.entry.js +0 -1
- package/dist/ripple/p-c401898d.entry.js +0 -1
- package/dist/ripple/p-ce81ccb4.system.entry.js +0 -1
- package/dist/ripple/p-cfa8106a.system.entry.js +0 -1
- package/dist/ripple/p-dadb6c78.js +0 -16
- package/dist/ripple/p-db7f5d60.entry.js +0 -1
- package/dist/ripple/p-dff01b0a.system.entry.js +0 -1
- package/dist/ripple/p-ecb6a2e0.entry.js +0 -1
- package/dist/ripple/p-ef344252.entry.js +0 -1
- package/dist/ripple/p-f0dfc5d7.entry.js +0 -1
- package/dist/ripple/p-f92f2d83.entry.js +0 -1
- package/dist/ripple/p-fe0a25c1.entry.js +0 -1
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { g as generateId, j as getFirstFocusableDescendant, c as checkForActiveElInShadow } from './functions-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-66f8130e.js';
|
|
2
|
+
import { g as generateId, j as getFirstFocusableDescendant, c as checkForActiveElInShadow } from './functions-7eebdc16.js';
|
|
3
3
|
|
|
4
4
|
const wmModalCss = "wm-modal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:#fff}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid #f4f3f6}wm-modal.wm-modal wm-modal-footer{border-top:1px solid #f4f3f6}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.focusLastElement = createEvent(this, "focusLastElement", 7);
|
|
10
|
-
this.focusFirstElement = createEvent(this, "focusFirstElement", 7);
|
|
11
|
-
this.wmModalCloseTriggered = createEvent(this, "wmModalCloseTriggered", 3);
|
|
12
|
-
this.wmCloseTriggered = createEvent(this, "wmCloseTriggered", 7);
|
|
13
|
-
this.wmModalPrimaryTriggered = createEvent(this, "wmModalPrimaryTriggered", 7);
|
|
14
|
-
this.wmPrimaryTriggered = createEvent(this, "wmPrimaryTriggered", 7);
|
|
15
|
-
this.wmModalSecondaryTriggered = createEvent(this, "wmModalSecondaryTriggered", 7);
|
|
16
|
-
this.wmSecondaryTriggered = createEvent(this, "wmSecondaryTriggered", 7);
|
|
17
|
-
this.open = false;
|
|
18
|
-
this.isOpen = false; // DEPRECATED in favor of open
|
|
19
|
-
this.elementToFocus = "";
|
|
20
|
-
this.modalType = null;
|
|
21
|
-
this.isTypeDialog = null;
|
|
22
|
-
this.bodyFocusListener = () => this.
|
|
23
|
-
}
|
|
24
|
-
get tempOpen() {
|
|
25
|
-
// instances of this.tempOpen should be replaced with this.open once isOpen is fully phased out
|
|
26
|
-
return this.open || this.isOpen;
|
|
27
|
-
}
|
|
28
|
-
get tempModalType() {
|
|
29
|
-
return this.modalType ? this.modalType : this.isTypeDialog ? "dialog" : "modal";
|
|
30
|
-
}
|
|
31
|
-
//App can open modal by toggling the prop
|
|
32
|
-
toggleModal() {
|
|
33
|
-
this.tempOpen ? this.showModal() : this.hideModal();
|
|
34
|
-
}
|
|
35
|
-
//The below not implemented in light of the fact that the app does often need to keep track of the modal's state itself so that it can update the data displayed in the body:
|
|
36
|
-
//App can also open modal by emitting wmShowModal event. Event needs to include the modal's unique id as the event detail, or else all modals on the page will open when wmShowModal event is dispatched.
|
|
37
|
-
// @Listen("wmShowModal", { target: "window" })
|
|
38
|
-
// doesEventMatchId(ev: CustomEvent) {
|
|
39
|
-
// ev.detail === this.uid && this.showModal();
|
|
40
|
-
// }
|
|
41
|
-
|
|
42
|
-
this.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
//Close the modal and focus the triggering element when the modal buttons emit their events
|
|
66
|
-
hideModal() {
|
|
67
|
-
document.body.style.overflow = "visible";
|
|
68
|
-
document.body.tabIndex = -1;
|
|
69
|
-
document.body.removeEventListener("focus", this.bodyFocusListener, true);
|
|
70
|
-
window.requestAnimationFrame(() => this.focusOnClose.focus()); //Return focus
|
|
71
|
-
}
|
|
72
|
-
componentWillLoad() {
|
|
73
|
-
if (this.isOpen) {
|
|
74
|
-
console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.");
|
|
75
|
-
}
|
|
76
|
-
if (this.isTypeDialog) {
|
|
77
|
-
console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.");
|
|
78
|
-
}
|
|
79
|
-
if (this.elementToFocus === "primary" || this.elementToFocus === "secondary") {
|
|
80
|
-
if (!this.el.id) {
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
this.uid = this.el.id ? this.el.id : generateId();
|
|
85
|
-
}
|
|
86
|
-
componentDidLoad() {
|
|
87
|
-
if (this.tempOpen) {
|
|
88
|
-
this.showModal();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
async emitCloseEvent() {
|
|
92
|
-
this.wmModalCloseTriggered.emit();
|
|
93
|
-
this.wmCloseTriggered.emit(); // deprecated
|
|
94
|
-
}
|
|
95
|
-
async emitPrimaryEvent() {
|
|
96
|
-
this.wmModalPrimaryTriggered.emit();
|
|
97
|
-
this.wmPrimaryTriggered.emit(); // deprecated
|
|
98
|
-
}
|
|
99
|
-
async emitSecondaryEvent() {
|
|
100
|
-
this.wmModalSecondaryTriggered.emit();
|
|
101
|
-
this.wmSecondaryTriggered.emit(); // deprecated
|
|
102
|
-
}
|
|
103
|
-
//If the dev hasn't specified an element to focus, element to focus first will be the close (X) button
|
|
104
|
-
setElToFocusOnOpen() {
|
|
105
|
-
const closeBtn = getFirstFocusableDescendant(this.el.querySelector(`#wm-modal-close-${this.uid}`));
|
|
106
|
-
if (this.elementToFocus) {
|
|
107
|
-
if (this.elementToFocus === "primary" || this.elementToFocus === "secondary") {
|
|
108
|
-
this.setAriaDescribedbyOnModal();
|
|
109
|
-
this.elementToFocus = `wm-${this.elementToFocus}-${this.uid}`;
|
|
110
|
-
}
|
|
111
|
-
const elToFocus = this.el.querySelector(`#${this.elementToFocus}`);
|
|
112
|
-
if (elToFocus) {
|
|
113
|
-
const firstEl = getFirstFocusableDescendant(elToFocus);
|
|
114
|
-
if (firstEl) {
|
|
115
|
-
this.focusOnOpen = firstEl;
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");
|
|
119
|
-
this.focusOnOpen = closeBtn;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");
|
|
124
|
-
this.focusOnOpen = closeBtn;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
this.focusOnOpen = closeBtn;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
setAriaDescribedbyOnModal() {
|
|
132
|
-
const modalBody = document.getElementById(`content-${this.uid}`);
|
|
133
|
-
if (!modalBody) {
|
|
134
|
-
console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.");
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
this.el.setAttribute("aria-describedby", `wm-modal-heading-text-${this.uid} content-${this.uid}`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
setElToFocusOnClose() {
|
|
141
|
-
const elToFocus = document.activeElement;
|
|
142
|
-
if (elToFocus.tagName === "WM-MENUITEM") {
|
|
143
|
-
this.focusOnClose = elToFocus.parentElement;
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
this.focusOnClose = checkForActiveElInShadow(elToFocus);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (document.activeElement.tagName === "BODY") {
|
|
151
|
-
this.setElToFocusOnOpen();
|
|
152
|
-
this.focusOnOpen.focus();
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
render() {
|
|
156
|
-
return (h(Host, { class: `${this.tempOpen ? "" : "hide "}${"wm-" + this.tempModalType}`, role: "dialog", "aria-describedby": `wm-modal-heading-text-${this.uid}`, "aria-modal": "true", tabindex: this.tempOpen ? 0 : null, onFocus: () => {
|
|
157
|
-
this.focusLastElement.emit();
|
|
158
|
-
} }, h("div", { class: "overlay", ref: (el) => (this.overlayEl = el) }), h("div", { class: "sr-only", tabIndex: 0, onFocus: () => {
|
|
159
|
-
this.focusFirstElement.emit();
|
|
160
|
-
} })));
|
|
161
|
-
}
|
|
162
|
-
get el() { return getElement(this); }
|
|
163
|
-
static get watchers() { return {
|
|
164
|
-
"open": ["toggleModal"],
|
|
165
|
-
"isOpen": ["toggleModal"]
|
|
166
|
-
}; }
|
|
167
|
-
};
|
|
6
|
+
const Modal = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.focusLastElement = createEvent(this, "focusLastElement", 7);
|
|
10
|
+
this.focusFirstElement = createEvent(this, "focusFirstElement", 7);
|
|
11
|
+
this.wmModalCloseTriggered = createEvent(this, "wmModalCloseTriggered", 3);
|
|
12
|
+
this.wmCloseTriggered = createEvent(this, "wmCloseTriggered", 7);
|
|
13
|
+
this.wmModalPrimaryTriggered = createEvent(this, "wmModalPrimaryTriggered", 7);
|
|
14
|
+
this.wmPrimaryTriggered = createEvent(this, "wmPrimaryTriggered", 7);
|
|
15
|
+
this.wmModalSecondaryTriggered = createEvent(this, "wmModalSecondaryTriggered", 7);
|
|
16
|
+
this.wmSecondaryTriggered = createEvent(this, "wmSecondaryTriggered", 7);
|
|
17
|
+
this.open = false;
|
|
18
|
+
this.isOpen = false; // DEPRECATED in favor of open
|
|
19
|
+
this.elementToFocus = "";
|
|
20
|
+
this.modalType = null;
|
|
21
|
+
this.isTypeDialog = null;
|
|
22
|
+
this.bodyFocusListener = () => this.redirectFocusFromBody();
|
|
23
|
+
}
|
|
24
|
+
get tempOpen() {
|
|
25
|
+
// instances of this.tempOpen should be replaced with this.open once isOpen is fully phased out
|
|
26
|
+
return this.open || this.isOpen;
|
|
27
|
+
}
|
|
28
|
+
get tempModalType() {
|
|
29
|
+
return this.modalType ? this.modalType : this.isTypeDialog ? "dialog" : "modal";
|
|
30
|
+
}
|
|
31
|
+
//App can open modal by toggling the prop
|
|
32
|
+
toggleModal() {
|
|
33
|
+
this.tempOpen ? this.showModal() : this.hideModal();
|
|
34
|
+
}
|
|
35
|
+
//The below not implemented in light of the fact that the app does often need to keep track of the modal's state itself so that it can update the data displayed in the body:
|
|
36
|
+
//App can also open modal by emitting wmShowModal event. Event needs to include the modal's unique id as the event detail, or else all modals on the page will open when wmShowModal event is dispatched.
|
|
37
|
+
// @Listen("wmShowModal", { target: "window" })
|
|
38
|
+
// doesEventMatchId(ev: CustomEvent) {
|
|
39
|
+
// ev.detail === this.uid && this.showModal();
|
|
40
|
+
// }
|
|
41
|
+
handleClick(ev) {
|
|
42
|
+
this.tempOpen && ev.target === this.overlayEl && this.focusOnOpen.focus();
|
|
43
|
+
}
|
|
44
|
+
closeModalOnEscape(ev) {
|
|
45
|
+
if (ev.key === "Escape") {
|
|
46
|
+
// stops propagation prevents nested modal from closing all at once
|
|
47
|
+
ev.stopPropagation();
|
|
48
|
+
this.wmModalCloseTriggered.emit();
|
|
49
|
+
this.wmCloseTriggered.emit(); // deprecated
|
|
50
|
+
this.open = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
showModal() {
|
|
54
|
+
this.setElToFocusOnClose(); //Record where the user was before the modal opened so that focus can return to it when the modal closes
|
|
55
|
+
document.body.style.overflow = "hidden"; //Keeps the page below the modal from scrolling
|
|
56
|
+
//Focus listeners as a general catch for keeping focus in case of errors in finding element with id passed in by dev (element is removed from DOM, etc.) or other scenarios
|
|
57
|
+
document.body.tabIndex = 0;
|
|
58
|
+
document.body.removeEventListener("focus", this.bodyFocusListener, true);
|
|
59
|
+
document.body.addEventListener("focus", this.bodyFocusListener, true);
|
|
60
|
+
window.requestAnimationFrame(() => {
|
|
61
|
+
this.setElToFocusOnOpen();
|
|
62
|
+
window.requestAnimationFrame(() => this.focusOnOpen.focus()); //Bring focus to element inside modal
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//Close the modal and focus the triggering element when the modal buttons emit their events
|
|
66
|
+
hideModal() {
|
|
67
|
+
document.body.style.overflow = "visible";
|
|
68
|
+
document.body.tabIndex = -1;
|
|
69
|
+
document.body.removeEventListener("focus", this.bodyFocusListener, true);
|
|
70
|
+
window.requestAnimationFrame(() => this.focusOnClose.focus()); //Return focus
|
|
71
|
+
}
|
|
72
|
+
componentWillLoad() {
|
|
73
|
+
if (this.isOpen) {
|
|
74
|
+
console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.");
|
|
75
|
+
}
|
|
76
|
+
if (this.isTypeDialog) {
|
|
77
|
+
console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.");
|
|
78
|
+
}
|
|
79
|
+
if (this.elementToFocus === "primary" || this.elementToFocus === "secondary") {
|
|
80
|
+
if (!this.el.id) {
|
|
81
|
+
console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
this.uid = this.el.id ? this.el.id : generateId();
|
|
85
|
+
}
|
|
86
|
+
componentDidLoad() {
|
|
87
|
+
if (this.tempOpen) {
|
|
88
|
+
this.showModal();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
async emitCloseEvent() {
|
|
92
|
+
this.wmModalCloseTriggered.emit();
|
|
93
|
+
this.wmCloseTriggered.emit(); // deprecated
|
|
94
|
+
}
|
|
95
|
+
async emitPrimaryEvent() {
|
|
96
|
+
this.wmModalPrimaryTriggered.emit();
|
|
97
|
+
this.wmPrimaryTriggered.emit(); // deprecated
|
|
98
|
+
}
|
|
99
|
+
async emitSecondaryEvent() {
|
|
100
|
+
this.wmModalSecondaryTriggered.emit();
|
|
101
|
+
this.wmSecondaryTriggered.emit(); // deprecated
|
|
102
|
+
}
|
|
103
|
+
//If the dev hasn't specified an element to focus, element to focus first will be the close (X) button
|
|
104
|
+
setElToFocusOnOpen() {
|
|
105
|
+
const closeBtn = getFirstFocusableDescendant(this.el.querySelector(`#wm-modal-close-${this.uid}`));
|
|
106
|
+
if (this.elementToFocus) {
|
|
107
|
+
if (this.elementToFocus === "primary" || this.elementToFocus === "secondary") {
|
|
108
|
+
this.setAriaDescribedbyOnModal();
|
|
109
|
+
this.elementToFocus = `wm-${this.elementToFocus}-${this.uid}`;
|
|
110
|
+
}
|
|
111
|
+
const elToFocus = this.el.querySelector(`#${this.elementToFocus}`);
|
|
112
|
+
if (elToFocus) {
|
|
113
|
+
const firstEl = getFirstFocusableDescendant(elToFocus);
|
|
114
|
+
if (firstEl) {
|
|
115
|
+
this.focusOnOpen = firstEl;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");
|
|
119
|
+
this.focusOnOpen = closeBtn;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");
|
|
124
|
+
this.focusOnOpen = closeBtn;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this.focusOnOpen = closeBtn;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
setAriaDescribedbyOnModal() {
|
|
132
|
+
const modalBody = document.getElementById(`content-${this.uid}`);
|
|
133
|
+
if (!modalBody) {
|
|
134
|
+
console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.");
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.el.setAttribute("aria-describedby", `wm-modal-heading-text-${this.uid} content-${this.uid}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
setElToFocusOnClose() {
|
|
141
|
+
const elToFocus = document.activeElement;
|
|
142
|
+
if (elToFocus.tagName === "WM-MENUITEM") {
|
|
143
|
+
this.focusOnClose = elToFocus.parentElement;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.focusOnClose = checkForActiveElInShadow(elToFocus);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
redirectFocusFromBody() {
|
|
150
|
+
if (document.activeElement.tagName === "BODY") {
|
|
151
|
+
this.setElToFocusOnOpen();
|
|
152
|
+
this.focusOnOpen.focus();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
render() {
|
|
156
|
+
return (h(Host, { class: `${this.tempOpen ? "" : "hide "}${"wm-" + this.tempModalType}`, role: "dialog", "aria-describedby": `wm-modal-heading-text-${this.uid}`, "aria-modal": "true", tabindex: this.tempOpen ? 0 : null, onFocus: () => {
|
|
157
|
+
this.focusLastElement.emit();
|
|
158
|
+
} }, h("div", { class: "overlay", ref: (el) => (this.overlayEl = el) }), h("div", { class: "sr-only", tabIndex: 0, onFocus: () => {
|
|
159
|
+
this.focusFirstElement.emit();
|
|
160
|
+
} })));
|
|
161
|
+
}
|
|
162
|
+
get el() { return getElement(this); }
|
|
163
|
+
static get watchers() { return {
|
|
164
|
+
"open": ["toggleModal"],
|
|
165
|
+
"isOpen": ["toggleModal"]
|
|
166
|
+
}; }
|
|
167
|
+
};
|
|
168
168
|
Modal.style = wmModalCss;
|
|
169
169
|
|
|
170
170
|
export { Modal as wm_modal };
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, f as forceUpdate } from './index-66f8130e.js';
|
|
2
|
+
import { i as intl, r as throttle } from './functions-7eebdc16.js';
|
|
3
|
+
|
|
4
|
+
const wmNavigationCss = ":host{z-index:10}:host(.collapsible){z-index:5000}.nav{-webkit-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);-moz-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:7.5625rem;background-color:#fff;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;font-size:0.875rem;height:100%}.navlist{margin:0;padding:0}.toggle-wrapper{display:none}@media screen and (max-width: 1023px){.nav{-ms-transition:transform 0.33s ease;-webkit-transition:transform 0.33s ease;-moz-transition:transform 0.33s ease;-webkit-transition:-webkit-transform 0.33s ease;transition:-webkit-transform 0.33s ease;transition:transform 0.33s ease;transition:transform 0.33s ease, -webkit-transform 0.33s ease;position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.nav ul{visibility:hidden}.nav[aria-expanded=true]{-webkit-transform:translateX(0);transform:translateX(0)}.nav[aria-expanded=true] ul{visibility:visible}.nav .toggle-wrapper{display:inline-block;min-height:5rem;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:0;bottom:0;left:0;right:0;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out}}";
|
|
5
|
+
|
|
6
|
+
const Navigation = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.wmNavigationStateChanged = createEvent(this, "wmNavigationStateChanged", 7);
|
|
10
|
+
this.open = false;
|
|
11
|
+
this.isTabbing = false;
|
|
12
|
+
this.mainNavigationMessage = intl.formatMessage({
|
|
13
|
+
id: "navigation.mainNavigation",
|
|
14
|
+
defaultMessage: "Main navigation",
|
|
15
|
+
description: "Label describing the site navigation, for screen reader users",
|
|
16
|
+
});
|
|
17
|
+
this.openTooltipMessage = intl.formatMessage({
|
|
18
|
+
id: "global.openVerb",
|
|
19
|
+
defaultMessage: "Open",
|
|
20
|
+
description: "For a button, to open a user interface element",
|
|
21
|
+
});
|
|
22
|
+
this.closeTooltipMessage = intl.formatMessage({
|
|
23
|
+
id: "global.closeVerb",
|
|
24
|
+
defaultMessage: "Close",
|
|
25
|
+
description: "For a button, to close a user interface element",
|
|
26
|
+
});
|
|
27
|
+
this.throttledRerender = throttle(() => forceUpdate(this.el), 50);
|
|
28
|
+
}
|
|
29
|
+
get isCollapsible() {
|
|
30
|
+
return window.innerWidth < 1024;
|
|
31
|
+
}
|
|
32
|
+
get ariaExpanded() {
|
|
33
|
+
return this.isCollapsible
|
|
34
|
+
? // if component is in collapsible mode, set aria-expanded according to expanded state
|
|
35
|
+
this.open.toString()
|
|
36
|
+
: // otherwise, do not render attr at all
|
|
37
|
+
undefined;
|
|
38
|
+
}
|
|
39
|
+
toggleTabbingOn() {
|
|
40
|
+
this.isTabbing = true;
|
|
41
|
+
}
|
|
42
|
+
toggleTabbingOff() {
|
|
43
|
+
this.isTabbing = false;
|
|
44
|
+
}
|
|
45
|
+
closeOnEscape(ev) {
|
|
46
|
+
if (ev.key === "Escape") {
|
|
47
|
+
this.open = false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
handleWindowResize() {
|
|
51
|
+
// for component to react when breakpoint is crossed
|
|
52
|
+
// (doesn't rerender on window resize)
|
|
53
|
+
this.throttledRerender();
|
|
54
|
+
}
|
|
55
|
+
handleStateChange() {
|
|
56
|
+
if (this.isCollapsible) {
|
|
57
|
+
this.wmNavigationStateChanged.emit();
|
|
58
|
+
this.open ? this.expand() : this.collapse();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
componentWillLoad() {
|
|
62
|
+
if (document.body.classList.contains("wmcl-user-is-tabbing")) {
|
|
63
|
+
this.toggleTabbingOn();
|
|
64
|
+
}
|
|
65
|
+
this.el.focus = function () {
|
|
66
|
+
this.shadowRoot.querySelector(".toggle").focus();
|
|
67
|
+
};
|
|
68
|
+
if (this.isCollapsible && this.open) {
|
|
69
|
+
// hamburger needs to know if open was initially set to true
|
|
70
|
+
this.wmNavigationStateChanged.emit();
|
|
71
|
+
this.expand();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
componentDidLoad() {
|
|
75
|
+
// Should fail silently if not found as devs may decide not to use the hamburger component.
|
|
76
|
+
this.hamburgerBtn = document.querySelector("wm-navigation-hamburger");
|
|
77
|
+
}
|
|
78
|
+
redirectFocusFromBody() {
|
|
79
|
+
if (document.activeElement.tagName === "BODY") {
|
|
80
|
+
this.el.focus();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
expand() {
|
|
84
|
+
// listen to focus on body and redirect to the component
|
|
85
|
+
document.body.tabIndex = 0;
|
|
86
|
+
document.body.addEventListener("focus", this.redirectFocusFromBody.bind(this), true);
|
|
87
|
+
// wait for nav to be expanded otherwise tooltip will be misplaced.
|
|
88
|
+
setTimeout(() => this.toggleEl.focus(), 250);
|
|
89
|
+
}
|
|
90
|
+
collapse() {
|
|
91
|
+
// rm event listener on body
|
|
92
|
+
document.body.tabIndex = -1;
|
|
93
|
+
document.body.removeEventListener("focus", this.redirectFocusFromBody.bind(this));
|
|
94
|
+
// should fail silently if el doesn't exist
|
|
95
|
+
// (dev may have chosen not to use the hamburger component)
|
|
96
|
+
this.hamburgerBtn && this.hamburgerBtn.focus();
|
|
97
|
+
}
|
|
98
|
+
focusLastItem() {
|
|
99
|
+
const items = this.el.querySelectorAll("wm-navigation-item");
|
|
100
|
+
const lastItem = Array.from(items).pop();
|
|
101
|
+
lastItem.focus();
|
|
102
|
+
}
|
|
103
|
+
renderOverlay() {
|
|
104
|
+
return (h("div", { class: "overlay", onClick: () => {
|
|
105
|
+
this.open = false;
|
|
106
|
+
} }));
|
|
107
|
+
}
|
|
108
|
+
render() {
|
|
109
|
+
return (h(Host, { class: this.isCollapsible ? "collapsible" : undefined }, this.open ? this.renderOverlay() : "", h("div", { class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.focusLastItem() }), h("nav", { class: "nav", "aria-expanded": this.ariaExpanded, "aria-label": this.mainNavigationMessage }, h("div", { class: "toggle-wrapper" }, h("wm-button", { ref: (el) => (this.toggleEl = el), class: `toggle ${this.isTabbing ? "user-is-tabbing" : ""}`, "button-type": "navigational", icon: this.open ? "f156" : "f35c", "icon-size": "2rem", tooltip: this.open ? this.closeTooltipMessage : this.openTooltipMessage, "tooltip-position": "left", tabIndex: this.open ? undefined : -1, onClick: () => {
|
|
110
|
+
this.open = !this.open;
|
|
111
|
+
} })), h("ul", { class: "navlist" }, h("slot", null))), h("div", { class: "trapfocus", tabindex: this.open ? 0 : undefined, onFocus: () => this.toggleEl.focus() })));
|
|
112
|
+
}
|
|
113
|
+
get el() { return getElement(this); }
|
|
114
|
+
static get watchers() { return {
|
|
115
|
+
"open": ["handleStateChange"]
|
|
116
|
+
}; }
|
|
117
|
+
};
|
|
118
|
+
Navigation.style = wmNavigationCss;
|
|
119
|
+
|
|
120
|
+
const wmNavigationHamburgerCss = "@charset \"UTF-8\";:host{width:3.75rem;height:3.75rem}button{display:none;width:100%;height:100%;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);background-color:transparent;outline:none;padding:0}button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}button.user-is-tabbing:focus::-moz-focus-inner{border:0}button:hover{background-color:#d7d6d9}.icon:before{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\";font-size:1.5rem;color:#575195}@media screen and (max-width: 1023px){button{display:initial}}";
|
|
121
|
+
|
|
122
|
+
const NavigationHamburger = class {
|
|
123
|
+
constructor(hostRef) {
|
|
124
|
+
registerInstance(this, hostRef);
|
|
125
|
+
this.tooltipVisible = false; // this is not part of the documented API but we need to expose as prop in order to change it from the focus method defined in WillLoad()
|
|
126
|
+
this.isTabbing = false;
|
|
127
|
+
this.open = false;
|
|
128
|
+
this.showNavMessage = intl.formatMessage({
|
|
129
|
+
id: "navigation.showNavigation",
|
|
130
|
+
defaultMessage: "Show navigation",
|
|
131
|
+
description: "For user interface element opening a navigation menu",
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
get tooltipEl() {
|
|
135
|
+
return document.getElementById("wm-tooltip");
|
|
136
|
+
}
|
|
137
|
+
toggleTabbingOn() {
|
|
138
|
+
this.isTabbing = true;
|
|
139
|
+
}
|
|
140
|
+
toggleTabbingOff() {
|
|
141
|
+
this.isTabbing = false;
|
|
142
|
+
}
|
|
143
|
+
// this also works on initial load because event is fired then
|
|
144
|
+
handleNavigationStateChanged(ev) {
|
|
145
|
+
this.open = ev.target.open;
|
|
146
|
+
}
|
|
147
|
+
componentWillLoad() {
|
|
148
|
+
this.el.focus = function () {
|
|
149
|
+
// if (!this.disabled) {
|
|
150
|
+
this.shadowRoot.querySelector("button").focus();
|
|
151
|
+
// prevent tooltip from showing on programmatic focus
|
|
152
|
+
requestAnimationFrame(() => {
|
|
153
|
+
this.tooltipVisible = false;
|
|
154
|
+
});
|
|
155
|
+
// }
|
|
156
|
+
};
|
|
157
|
+
if (document.body.classList.contains("wmcl-user-is-tabbing")) {
|
|
158
|
+
this.toggleTabbingOn();
|
|
159
|
+
}
|
|
160
|
+
if (!this.navId) {
|
|
161
|
+
console.error("wm-navigation-hamburger: nav-id is a required prop");
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
componentDidLoad() {
|
|
165
|
+
this.nav = document.getElementById(this.navId);
|
|
166
|
+
if (!this.nav) {
|
|
167
|
+
console.error(`wm-navigation-hamburger: wm-navigation with id ${this.navId} was not found`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
showTooltip() {
|
|
171
|
+
this.tooltipEl.textContent = this.showNavMessage;
|
|
172
|
+
this.tooltipEl.style.top = "1.125rem";
|
|
173
|
+
this.tooltipEl.style.left = "2.75rem";
|
|
174
|
+
this.tooltipEl.style.transitionDelay = "500ms";
|
|
175
|
+
this.tooltipEl.style.opacity = "1";
|
|
176
|
+
// tooltip is only visible after the transition delay.
|
|
177
|
+
// This also fixes an issue for keyboard users:
|
|
178
|
+
// if they tab to a button out of screen bounds, the page scrolls
|
|
179
|
+
// and hideTooltip() would be triggered before the tooltip would show
|
|
180
|
+
setTimeout(() => {
|
|
181
|
+
this.tooltipVisible = true;
|
|
182
|
+
}, 500);
|
|
183
|
+
}
|
|
184
|
+
hideTooltip() {
|
|
185
|
+
this.tooltipEl.style.transitionDelay = "0s";
|
|
186
|
+
this.tooltipEl.style.opacity = "0";
|
|
187
|
+
this.tooltipVisible = false;
|
|
188
|
+
}
|
|
189
|
+
showTooltipForKeyboardUsers() {
|
|
190
|
+
if (this.isTabbing) {
|
|
191
|
+
this.showTooltip();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
handleClick() {
|
|
195
|
+
this.hideTooltip();
|
|
196
|
+
this.nav.open = !this.nav.open;
|
|
197
|
+
}
|
|
198
|
+
render() {
|
|
199
|
+
return (h(Host, { class: this.open ? "nav-open" : "nav-closed" }, h("button", { class: this.isTabbing ? "user-is-tabbing" : undefined, "aria-expanded": this.open, "aria-controls": this.navId, "aria-label": this.showNavMessage, onMouseEnter: () => this.showTooltip(), onMouseLeave: () => this.hideTooltip(), onFocus: () => this.showTooltipForKeyboardUsers(), onBlur: () => this.hideTooltip(), onClick: () => this.handleClick() }, h("span", { class: "icon" }))));
|
|
200
|
+
}
|
|
201
|
+
get el() { return getElement(this); }
|
|
202
|
+
};
|
|
203
|
+
NavigationHamburger.style = wmNavigationHamburgerCss;
|
|
204
|
+
|
|
205
|
+
const wmNavigationItemCss = ".link{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:inherit;text-decoration:none;min-height:4.5rem;text-align:center;padding:1.25rem 0.5rem;font-weight:500;outline:none;position:relative}.link:hover{background-color:#f2f2f2}.link .icon{font-size:1.375rem;color:#6b6b6b}.link .text{font-size:0.875rem}.link.user-is-tabbing:focus{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e;box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e}.link.active{background-color:#e9e7ec}.link.active:before{content:\"\";background-color:#575195;position:absolute;height:100%;width:5px;left:0}.link.active .text{color:#575195}.link.active .icon{color:#575195}";
|
|
206
|
+
|
|
207
|
+
const NavigationItem = class {
|
|
208
|
+
constructor(hostRef) {
|
|
209
|
+
registerInstance(this, hostRef);
|
|
210
|
+
this.isTabbing = false;
|
|
211
|
+
}
|
|
212
|
+
toggleTabbingOn() {
|
|
213
|
+
this.isTabbing = true;
|
|
214
|
+
}
|
|
215
|
+
toggleTabbingOff() {
|
|
216
|
+
this.isTabbing = false;
|
|
217
|
+
}
|
|
218
|
+
componentWillLoad() {
|
|
219
|
+
this.el.focus = function () {
|
|
220
|
+
this.shadowRoot.querySelector(".link").focus();
|
|
221
|
+
};
|
|
222
|
+
if (document.body.classList.contains("wmcl-user-is-tabbing")) {
|
|
223
|
+
this.toggleTabbingOn();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
render() {
|
|
227
|
+
return (h(Host, { role: "listitem" }, h("a", { class: `link ${this.active ? "active" : ""} ${this.isTabbing ? "user-is-tabbing" : ""}`, href: this.href }, h("div", { class: "icon", "aria-hidden": "true" }, h("slot", null)), h("div", { class: "text" }, this.text))));
|
|
228
|
+
}
|
|
229
|
+
get el() { return getElement(this); }
|
|
230
|
+
};
|
|
231
|
+
NavigationItem.style = wmNavigationItemCss;
|
|
232
|
+
|
|
233
|
+
export { Navigation as wm_navigation, NavigationHamburger as wm_navigation_hamburger, NavigationItem as wm_navigation_item };
|