ku4web-components 6.4.84 → 6.4.88
Sign up to get free protection for your applications and to get access to all the features.
- package/angular/index.js +1 -1
- package/angular/index.mjs +1 -1
- package/dist/cjs/index-57e2cfa5.js +10 -0
- package/dist/cjs/{index-a7b6d98c.js → index-845c56d4.js} +1 -1
- package/dist/cjs/ku4-carousel-controls.cjs.entry.js +3 -3
- package/dist/cjs/ku4-carousel-slide.cjs.entry.js +1 -1
- package/dist/cjs/ku4-carousel.cjs.entry.js +3 -3
- package/dist/cjs/ku4-col.cjs.entry.js +1 -1
- package/dist/cjs/ku4-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ku4-feature.cjs.entry.js +2 -2
- package/dist/cjs/ku4-focus-trap.cjs.entry.js +37 -37
- package/dist/cjs/ku4-form.cjs.entry.js +3 -3
- package/dist/cjs/ku4-grid.cjs.entry.js +1 -1
- package/dist/cjs/ku4-label.cjs.entry.js +2 -2
- package/dist/cjs/ku4-mask.cjs.entry.js +3 -3
- package/dist/cjs/ku4-modal.cjs.entry.js +9 -4
- package/dist/cjs/ku4-panel.cjs.entry.js +1 -1
- package/dist/cjs/ku4-preview.cjs.entry.js +14 -43
- package/dist/cjs/ku4-tab-list.cjs.entry.js +4 -4
- package/dist/cjs/ku4-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/ku4-tab.cjs.entry.js +3 -3
- package/dist/cjs/ku4-table.cjs.entry.js +1 -1
- package/dist/cjs/ku4-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/ku4-validation.cjs.entry.js +2 -2
- package/dist/cjs/ku4web-components.cjs.js +8 -103
- package/dist/cjs/loader.cjs.js +3 -19
- package/dist/cjs/{shadow-css-78860e39.js → shadow-css-546083ef.js} +1 -1
- package/dist/esm/{index-81a98b72.js → index-45c399b0.js} +1 -1
- package/dist/esm/index-f9890388.js +3 -0
- package/dist/esm/ku4-carousel-controls.entry.js +3 -3
- package/dist/esm/ku4-carousel-slide.entry.js +1 -1
- package/dist/esm/ku4-carousel.entry.js +3 -3
- package/dist/esm/ku4-col.entry.js +1 -1
- package/dist/esm/ku4-drawer.entry.js +1 -1
- package/dist/esm/ku4-feature.entry.js +2 -2
- package/dist/esm/ku4-focus-trap.entry.js +14 -14
- package/dist/esm/ku4-form.entry.js +3 -3
- package/dist/esm/ku4-grid.entry.js +1 -1
- package/dist/esm/ku4-label.entry.js +2 -2
- package/dist/esm/ku4-mask.entry.js +3 -3
- package/dist/esm/ku4-modal.entry.js +9 -4
- package/dist/esm/ku4-panel.entry.js +1 -1
- package/dist/esm/ku4-preview.entry.js +5 -34
- package/dist/esm/ku4-tab-list.entry.js +4 -4
- package/dist/esm/ku4-tab-panel.entry.js +3 -3
- package/dist/esm/ku4-tab.entry.js +3 -3
- package/dist/esm/ku4-table.entry.js +1 -1
- package/dist/esm/ku4-tooltip.entry.js +2 -2
- package/dist/esm/ku4-validation.entry.js +2 -2
- package/dist/esm/ku4web-components.js +8 -103
- package/dist/esm/loader.js +3 -19
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/{ku4web-components/shadow-css-4d56fa31.js → esm/shadow-css-dfa0587f.js} +1 -1
- package/dist/esm-es5/{index-81a98b72.js → index-45c399b0.js} +1 -1
- package/dist/esm-es5/{index-316624d1.js → index-f9890388.js} +1 -1
- package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
- package/dist/esm-es5/ku4-carousel-slide.entry.js +1 -1
- package/dist/esm-es5/ku4-carousel.entry.js +1 -1
- package/dist/esm-es5/ku4-col.entry.js +1 -1
- package/dist/esm-es5/ku4-drawer.entry.js +1 -1
- package/dist/esm-es5/ku4-feature.entry.js +1 -1
- package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
- package/dist/esm-es5/ku4-form.entry.js +1 -1
- package/dist/esm-es5/ku4-grid.entry.js +1 -1
- package/dist/esm-es5/ku4-label.entry.js +1 -1
- package/dist/esm-es5/ku4-mask.entry.js +1 -1
- package/dist/esm-es5/ku4-modal.entry.js +1 -1
- package/dist/esm-es5/ku4-panel.entry.js +1 -1
- package/dist/esm-es5/ku4-preview.entry.js +1 -1
- package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
- package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
- package/dist/esm-es5/ku4-tab.entry.js +1 -1
- package/dist/esm-es5/ku4-table.entry.js +1 -1
- package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
- package/dist/esm-es5/ku4-validation.entry.js +1 -1
- package/dist/esm-es5/ku4web-components.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{shadow-css-4d56fa31.js → shadow-css-dfa0587f.js} +0 -0
- package/dist/index.js +1 -1
- package/dist/ku4web-components/index.esm.js +0 -1
- package/dist/ku4web-components/ku4web-components.css +1 -299
- package/dist/ku4web-components/ku4web-components.esm.js +1 -129
- package/dist/ku4web-components/ku4web-components.js +1 -1
- package/dist/ku4web-components/{p-6a5a7d81.entry.js → p-005353c6.entry.js} +1 -1
- package/dist/ku4web-components/{p-66b8247f.entry.js → p-09f09ad6.entry.js} +1 -1
- package/dist/ku4web-components/{p-6b9e3523.system.entry.js → p-09f10910.system.entry.js} +1 -1
- package/dist/ku4web-components/p-11652204.entry.js +1 -0
- package/dist/ku4web-components/{p-c96a424d.entry.js → p-1380f375.entry.js} +1 -1
- package/dist/ku4web-components/p-16f6027a.js +1 -0
- package/dist/ku4web-components/{p-8427534d.system.entry.js → p-1cdd4c7f.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-61214088.entry.js → p-1fbc37de.entry.js} +1 -1
- package/dist/ku4web-components/{p-96b69344.entry.js → p-20d3e65d.entry.js} +1 -1
- package/dist/ku4web-components/{p-6cfd9011.system.entry.js → p-24bf4b99.system.entry.js} +1 -1
- package/dist/ku4web-components/p-2da41fcc.entry.js +1 -0
- package/dist/ku4web-components/p-371ff218.entry.js +1 -0
- package/dist/ku4web-components/{p-7bfc256a.system.entry.js → p-3b70ff65.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-e6b3a708.js → p-42dd73f2.js} +1 -1
- package/dist/ku4web-components/{p-0f03feb6.system.entry.js → p-4d4d3cc4.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-073cefec.system.entry.js → p-53605e68.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-91aa94d4.system.entry.js → p-5a6bad52.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-881e100a.js → p-5e796581.js} +0 -0
- package/dist/ku4web-components/{p-10198308.system.entry.js → p-689b87db.system.entry.js} +1 -1
- package/dist/ku4web-components/p-6dad23e0.entry.js +1 -0
- package/dist/ku4web-components/{p-f3aedfdb.system.entry.js → p-72066e9d.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-f3fbe1e6.entry.js → p-72219668.entry.js} +1 -1
- package/dist/ku4web-components/{p-2b3bb150.system.entry.js → p-774dbc9e.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-96eccb13.system.entry.js → p-782336cd.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-96ec7b4f.system.js → p-829fb4ce.system.js} +1 -1
- package/dist/ku4web-components/{p-9d241b2a.entry.js → p-8583d382.entry.js} +1 -1
- package/dist/ku4web-components/{p-99854682.system.entry.js → p-895853ef.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-fbf3ad1e.system.js → p-8b2d8a2a.system.js} +0 -0
- package/dist/ku4web-components/{p-ecf7b1be.system.entry.js → p-97d806d2.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-288482da.system.entry.js → p-9ba0f967.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-bd251367.entry.js → p-a0dc0327.entry.js} +1 -1
- package/dist/ku4web-components/{p-6a40ccaa.entry.js → p-a5f54bc0.entry.js} +1 -1
- package/dist/ku4web-components/{p-d848909c.system.entry.js → p-a61f7c42.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-47dc2714.entry.js → p-abcf4c43.entry.js} +1 -1
- package/dist/ku4web-components/{p-7ed66688.system.entry.js → p-b02eb970.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-9bf34cc7.system.entry.js → p-bd83ef31.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-c4479d3b.system.entry.js → p-d57468ab.system.entry.js} +1 -1
- package/dist/ku4web-components/p-d66b1c43.system.js +1 -0
- package/dist/ku4web-components/{p-579ff41b.system.entry.js → p-e550fd09.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-3f2a008c.entry.js → p-e8d5dcce.entry.js} +1 -1
- package/dist/ku4web-components/p-eace33d2.system.entry.js +1 -0
- package/dist/ku4web-components/{p-320e2fe0.entry.js → p-ecf06d64.entry.js} +1 -1
- package/dist/ku4web-components/{p-5eadf115.entry.js → p-edfa2aea.entry.js} +1 -1
- package/dist/ku4web-components/{p-c798faf2.entry.js → p-f2a603c3.entry.js} +1 -1
- package/dist/ku4web-components/p-f6b9d36e.entry.js +1 -0
- package/dist/ku4web-components/{p-a352f533.system.js → p-f8a2bf9b.system.js} +1 -1
- package/dist/ku4web-components/{p-3f147a02.entry.js → p-fd6bcdde.entry.js} +1 -1
- package/dist/types/components/ku4-modal/ku4-modal.d.ts +5 -0
- package/dist/types/components.d.ts +10 -2
- package/package.json +31 -31
- package/react/index.js +1 -1
- package/react/index.mjs +1 -1
- package/vue/index.js +1 -1
- package/vue/index.mjs +1 -1
- package/vue3/index.js +1 -1
- package/vue3/index.mjs +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/css-shim-6ca600c2.js +0 -6
- package/dist/cjs/dom-8d415461.js +0 -75
- package/dist/cjs/index-517c4086.js +0 -14
- package/dist/cjs/index-a530dbc9.js +0 -10
- package/dist/cjs/index-c904eb3a.js +0 -10
- package/dist/cjs/index-ca4336bd.js +0 -3093
- package/dist/cjs/uid-8ec2f63e.js +0 -11
- package/dist/collection/capabilities/a11y/aria.js +0 -26
- package/dist/collection/capabilities/angular/index.js +0 -24
- package/dist/collection/capabilities/decorators/deprecated.js +0 -20
- package/dist/collection/capabilities/decorators/index.js +0 -3
- package/dist/collection/capabilities/decorators/memoize.js +0 -7
- package/dist/collection/capabilities/dom/isFocusable.js +0 -7
- package/dist/collection/capabilities/dom/queryFocusable.js +0 -2
- package/dist/collection/capabilities/identity/uid.js +0 -6
- package/dist/collection/capabilities/mask/index.js +0 -5
- package/dist/collection/capabilities/mask/patterns/date.js +0 -40
- package/dist/collection/capabilities/mask/patterns/index.js +0 -7
- package/dist/collection/capabilities/react/index.js +0 -25
- package/dist/collection/capabilities/testing/html.js +0 -14
- package/dist/collection/capabilities/testing/styles.js +0 -14
- package/dist/collection/capabilities/vue/index.js +0 -28
- package/dist/collection/capabilities/vue3/index.js +0 -26
- package/dist/collection/collection-manifest.json +0 -31
- package/dist/collection/components/ku4-carousel/ku4-carousel.css +0 -221
- package/dist/collection/components/ku4-carousel/ku4-carousel.js +0 -369
- package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.css +0 -32
- package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.js +0 -112
- package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.css +0 -3
- package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.js +0 -159
- package/dist/collection/components/ku4-col/ku4-col.css +0 -601
- package/dist/collection/components/ku4-col/ku4-col.js +0 -288
- package/dist/collection/components/ku4-drawer/ku4-drawer.css +0 -56
- package/dist/collection/components/ku4-drawer/ku4-drawer.js +0 -163
- package/dist/collection/components/ku4-feature/ku4-feature.js +0 -70
- package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.css +0 -3
- package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.js +0 -441
- package/dist/collection/components/ku4-form/ku4-form.js +0 -225
- package/dist/collection/components/ku4-grid/ku4-grid.css +0 -751
- package/dist/collection/components/ku4-grid/ku4-grid.js +0 -408
- package/dist/collection/components/ku4-label/ku4-label.css +0 -36
- package/dist/collection/components/ku4-label/ku4-label.js +0 -115
- package/dist/collection/components/ku4-mask/ku4-mask.css +0 -3
- package/dist/collection/components/ku4-mask/ku4-mask.js +0 -458
- package/dist/collection/components/ku4-modal/ku4-modal.css +0 -85
- package/dist/collection/components/ku4-modal/ku4-modal.js +0 -208
- package/dist/collection/components/ku4-panel/ku4-panel.css +0 -14
- package/dist/collection/components/ku4-panel/ku4-panel.js +0 -119
- package/dist/collection/components/ku4-preview/ku4-preview.css +0 -23
- package/dist/collection/components/ku4-preview/ku4-preview.js +0 -266
- package/dist/collection/components/ku4-tab/ku4-tab.css +0 -82
- package/dist/collection/components/ku4-tab/ku4-tab.js +0 -191
- package/dist/collection/components/ku4-tab-list/ku4-tab-list.css +0 -6
- package/dist/collection/components/ku4-tab-list/ku4-tab-list.js +0 -118
- package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.css +0 -26
- package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.js +0 -166
- package/dist/collection/components/ku4-table/ku4-table.css +0 -116
- package/dist/collection/components/ku4-table/ku4-table.js +0 -120
- package/dist/collection/components/ku4-tooltip/ku4-tooltip.css +0 -56
- package/dist/collection/components/ku4-tooltip/ku4-tooltip.js +0 -274
- package/dist/collection/components/ku4-validation/ku4-validation.css +0 -19
- package/dist/collection/components/ku4-validation/ku4-validation.js +0 -364
- package/dist/collection/components/ku4-validation/validate.js +0 -14
- package/dist/collection/index.js +0 -1
- package/dist/collection/security.js +0 -27
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/css-shim-e6dd2538.js +0 -4
- package/dist/esm/dom-7fc649b0.js +0 -73
- package/dist/esm/index-135dacad.js +0 -3
- package/dist/esm/index-316624d1.js +0 -3
- package/dist/esm/index-7fe386de.js +0 -3057
- package/dist/esm/index-7ff6e718.js +0 -3
- package/dist/esm/shadow-css-4d56fa31.js +0 -388
- package/dist/esm/uid-a7ff854d.js +0 -9
- package/dist/ku4web-components/app-globals-0f993ce5.js +0 -3
- package/dist/ku4web-components/app-globals-497eb362.system.js +0 -1
- package/dist/ku4web-components/css-shim-b6eec689.system.js +0 -1
- package/dist/ku4web-components/css-shim-e6dd2538.js +0 -4
- package/dist/ku4web-components/dom-7fc649b0.js +0 -73
- package/dist/ku4web-components/dom-88962da0.system.js +0 -21
- package/dist/ku4web-components/index-135dacad.js +0 -3
- package/dist/ku4web-components/index-5029fd1f.system.js +0 -1
- package/dist/ku4web-components/index-7d482e8a.system.js +0 -1
- package/dist/ku4web-components/index-7fe386de.js +0 -3057
- package/dist/ku4web-components/index-7ff6e718.js +0 -3
- package/dist/ku4web-components/index-dcd9a8a7.system.js +0 -1
- package/dist/ku4web-components/index.system.js +0 -1
- package/dist/ku4web-components/ku4-carousel-controls.entry.js +0 -89
- package/dist/ku4web-components/ku4-carousel-controls.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-carousel-slide.entry.js +0 -47
- package/dist/ku4web-components/ku4-carousel-slide.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-carousel.entry.js +0 -175
- package/dist/ku4web-components/ku4-carousel.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-col.entry.js +0 -75
- package/dist/ku4web-components/ku4-col.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-drawer.entry.js +0 -35
- package/dist/ku4web-components/ku4-drawer.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-feature.entry.js +0 -29
- package/dist/ku4web-components/ku4-feature.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-focus-trap.entry.js +0 -323
- package/dist/ku4web-components/ku4-focus-trap.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-form.entry.js +0 -112
- package/dist/ku4web-components/ku4-form.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-grid.entry.js +0 -108
- package/dist/ku4web-components/ku4-grid.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-label.entry.js +0 -70
- package/dist/ku4web-components/ku4-label.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-mask.entry.js +0 -342
- package/dist/ku4web-components/ku4-mask.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-modal.entry.js +0 -75
- package/dist/ku4web-components/ku4-modal.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-panel.entry.js +0 -49
- package/dist/ku4web-components/ku4-panel.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-preview.entry.js +0 -128
- package/dist/ku4web-components/ku4-preview.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-tab-list.entry.js +0 -76
- package/dist/ku4web-components/ku4-tab-list.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-tab-panel.entry.js +0 -72
- package/dist/ku4web-components/ku4-tab-panel.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-tab.entry.js +0 -63
- package/dist/ku4web-components/ku4-tab.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-table.entry.js +0 -79
- package/dist/ku4web-components/ku4-table.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-tooltip.entry.js +0 -120
- package/dist/ku4web-components/ku4-tooltip.system.entry.js +0 -1
- package/dist/ku4web-components/ku4-validation.entry.js +0 -162
- package/dist/ku4web-components/ku4-validation.system.entry.js +0 -1
- package/dist/ku4web-components/ku4web-components.system.js +0 -1
- package/dist/ku4web-components/p-0f77bef9.system.js +0 -1
- package/dist/ku4web-components/p-171182e4.entry.js +0 -1
- package/dist/ku4web-components/p-7e69d158.entry.js +0 -1
- package/dist/ku4web-components/p-9da3612f.entry.js +0 -1
- package/dist/ku4web-components/p-b3c3b463.entry.js +0 -1
- package/dist/ku4web-components/p-b3c3d932.entry.js +0 -1
- package/dist/ku4web-components/p-ba9edd72.js +0 -1
- package/dist/ku4web-components/p-e356b3c1.system.entry.js +0 -1
- package/dist/ku4web-components/shadow-css-d0426811.system.js +0 -13
- package/dist/ku4web-components/uid-3373ce49.system.js +0 -1
- package/dist/ku4web-components/uid-a7ff854d.js +0 -9
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./index-5029fd1f.system.js"],(function(r){"use strict";var s,o,t;return{setters:[function(r){s=r.r;o=r.h;t=r.f}],execute:function(){var d=":host{position:relative;display:block}@media only screen and (min-width: 1px){:host(.start-xs-0){grid-column-start:1}:host(.start-xs-1){grid-column-start:2}:host(.start-xs-2){grid-column-start:3}:host(.start-xs-3){grid-column-start:4}:host(.start-xs-4){grid-column-start:5}:host(.start-xs-5){grid-column-start:6}:host(.start-xs-6){grid-column-start:7}:host(.start-xs-7){grid-column-start:8}:host(.start-xs-8){grid-column-start:9}:host(.start-xs-9){grid-column-start:10}:host(.start-xs-10){grid-column-start:11}:host(.start-xs-11){grid-column-start:12}:host(.start-xs-12){grid-column-start:13}:host(.span-xs-1){grid-column-end:span 1}:host(.span-xs-2){grid-column-end:span 2}:host(.span-xs-3){grid-column-end:span 3}:host(.span-xs-4){grid-column-end:span 4}:host(.span-xs-5){grid-column-end:span 5}:host(.span-xs-6){grid-column-end:span 6}:host(.span-xs-7){grid-column-end:span 7}:host(.span-xs-8){grid-column-end:span 8}:host(.span-xs-9){grid-column-end:span 9}:host(.span-xs-10){grid-column-end:span 10}:host(.span-xs-11){grid-column-end:span 11}:host(.span-xs-12){grid-column-end:span 12}:host(.order-xs-1){-ms-flex-order:1;order:1}:host(.order-xs-2){-ms-flex-order:2;order:2}:host(.order-xs-3){-ms-flex-order:3;order:3}:host(.order-xs-4){-ms-flex-order:4;order:4}:host(.order-xs-5){-ms-flex-order:5;order:5}:host(.order-xs-6){-ms-flex-order:6;order:6}:host(.order-xs-7){-ms-flex-order:7;order:7}:host(.order-xs-8){-ms-flex-order:8;order:8}:host(.order-xs-9){-ms-flex-order:9;order:9}:host(.order-xs-10){-ms-flex-order:10;order:10}:host(.order-xs-11){-ms-flex-order:11;order:11}:host(.order-xs-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 768px){:host(.start-sm-0){grid-column-start:1}:host(.start-sm-1){grid-column-start:2}:host(.start-sm-2){grid-column-start:3}:host(.start-sm-3){grid-column-start:4}:host(.start-sm-4){grid-column-start:5}:host(.start-sm-5){grid-column-start:6}:host(.start-sm-6){grid-column-start:7}:host(.start-sm-7){grid-column-start:8}:host(.start-sm-8){grid-column-start:9}:host(.start-sm-9){grid-column-start:10}:host(.start-sm-10){grid-column-start:11}:host(.start-sm-11){grid-column-start:12}:host(.start-sm-12){grid-column-start:13}:host(.span-sm-1){grid-column-end:span 1}:host(.span-sm-2){grid-column-end:span 2}:host(.span-sm-3){grid-column-end:span 3}:host(.span-sm-4){grid-column-end:span 4}:host(.span-sm-5){grid-column-end:span 5}:host(.span-sm-6){grid-column-end:span 6}:host(.span-sm-7){grid-column-end:span 7}:host(.span-sm-8){grid-column-end:span 8}:host(.span-sm-9){grid-column-end:span 9}:host(.span-sm-10){grid-column-end:span 10}:host(.span-sm-11){grid-column-end:span 11}:host(.span-sm-12){grid-column-end:span 12}:host(.order-sm-1){-ms-flex-order:1;order:1}:host(.order-sm-2){-ms-flex-order:2;order:2}:host(.order-sm-3){-ms-flex-order:3;order:3}:host(.order-sm-4){-ms-flex-order:4;order:4}:host(.order-sm-5){-ms-flex-order:5;order:5}:host(.order-sm-6){-ms-flex-order:6;order:6}:host(.order-sm-7){-ms-flex-order:7;order:7}:host(.order-sm-8){-ms-flex-order:8;order:8}:host(.order-sm-9){-ms-flex-order:9;order:9}:host(.order-sm-10){-ms-flex-order:10;order:10}:host(.order-sm-11){-ms-flex-order:11;order:11}:host(.order-sm-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 992px){:host(.start-md-0){grid-column-start:1}:host(.start-md-1){grid-column-start:2}:host(.start-md-2){grid-column-start:3}:host(.start-md-3){grid-column-start:4}:host(.start-md-4){grid-column-start:5}:host(.start-md-5){grid-column-start:6}:host(.start-md-6){grid-column-start:7}:host(.start-md-7){grid-column-start:8}:host(.start-md-8){grid-column-start:9}:host(.start-md-9){grid-column-start:10}:host(.start-md-10){grid-column-start:11}:host(.start-md-11){grid-column-start:12}:host(.start-md-12){grid-column-start:13}:host(.span-md-1){grid-column-end:span 1}:host(.span-md-2){grid-column-end:span 2}:host(.span-md-3){grid-column-end:span 3}:host(.span-md-4){grid-column-end:span 4}:host(.span-md-5){grid-column-end:span 5}:host(.span-md-6){grid-column-end:span 6}:host(.span-md-7){grid-column-end:span 7}:host(.span-md-8){grid-column-end:span 8}:host(.span-md-9){grid-column-end:span 9}:host(.span-md-10){grid-column-end:span 10}:host(.span-md-11){grid-column-end:span 11}:host(.span-md-12){grid-column-end:span 12}:host(.order-md-1){-ms-flex-order:1;order:1}:host(.order-md-2){-ms-flex-order:2;order:2}:host(.order-md-3){-ms-flex-order:3;order:3}:host(.order-md-4){-ms-flex-order:4;order:4}:host(.order-md-5){-ms-flex-order:5;order:5}:host(.order-md-6){-ms-flex-order:6;order:6}:host(.order-md-7){-ms-flex-order:7;order:7}:host(.order-md-8){-ms-flex-order:8;order:8}:host(.order-md-9){-ms-flex-order:9;order:9}:host(.order-md-10){-ms-flex-order:10;order:10}:host(.order-md-11){-ms-flex-order:11;order:11}:host(.order-md-12){-ms-flex-order:12;order:12}}@media only screen and (min-width: 1200px){:host(.start-lg-0){grid-column-start:1}:host(.start-lg-1){grid-column-start:2}:host(.start-lg-2){grid-column-start:3}:host(.start-lg-3){grid-column-start:4}:host(.start-lg-4){grid-column-start:5}:host(.start-lg-5){grid-column-start:6}:host(.start-lg-6){grid-column-start:7}:host(.start-lg-7){grid-column-start:8}:host(.start-lg-8){grid-column-start:9}:host(.start-lg-9){grid-column-start:10}:host(.start-lg-10){grid-column-start:11}:host(.start-lg-11){grid-column-start:12}:host(.start-lg-12){grid-column-start:13}:host(.span-lg-1){grid-column-end:span 1}:host(.span-lg-2){grid-column-end:span 2}:host(.span-lg-3){grid-column-end:span 3}:host(.span-lg-4){grid-column-end:span 4}:host(.span-lg-5){grid-column-end:span 5}:host(.span-lg-6){grid-column-end:span 6}:host(.span-lg-7){grid-column-end:span 7}:host(.span-lg-8){grid-column-end:span 8}:host(.span-lg-9){grid-column-end:span 9}:host(.span-lg-10){grid-column-end:span 10}:host(.span-lg-11){grid-column-end:span 11}:host(.span-lg-12){grid-column-end:span 12}:host(.order-lg-1){-ms-flex-order:1;order:1}:host(.order-lg-2){-ms-flex-order:2;order:2}:host(.order-lg-3){-ms-flex-order:3;order:3}:host(.order-lg-4){-ms-flex-order:4;order:4}:host(.order-lg-5){-ms-flex-order:5;order:5}:host(.order-lg-6){-ms-flex-order:6;order:6}:host(.order-lg-7){-ms-flex-order:7;order:7}:host(.order-lg-8){-ms-flex-order:8;order:8}:host(.order-lg-9){-ms-flex-order:9;order:9}:host(.order-lg-10){-ms-flex-order:10;order:10}:host(.order-lg-11){-ms-flex-order:11;order:11}:host(.order-lg-12){-ms-flex-order:12;order:12}}";var e=r("ku4_col",function(){function r(r){s(this,r);this.startXs=0;this.spanXs=1}Object.defineProperty(r.prototype,"startClass",{get:function(){var r=this,s=r.startXs,o=r.startSm,t=r.startMd,d=r.startLg;var e=[];if(s&&!Number.isNaN(s)){e.push("start-xs-".concat(s))}if(o&&!Number.isNaN(o)){e.push("start-sm-".concat(o))}if(t&&!Number.isNaN(t)){e.push("start-md-".concat(t))}if(d&&!Number.isNaN(d)){e.push("start-lg-".concat(d))}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"spanClass",{get:function(){var r=this,s=r.spanXs,o=r.spanSm,t=r.spanMd,d=r.spanLg;var e=[];if(s&&!Number.isNaN(s)){e.push("span-xs-".concat(s))}if(o&&!Number.isNaN(o)){e.push("span-sm-".concat(o))}if(t&&!Number.isNaN(t)){e.push("span-md-".concat(t))}if(d&&!Number.isNaN(d)){e.push("span-lg-".concat(d))}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"orderClass",{get:function(){var r=this,s=r.orderXs,o=r.orderSm,t=r.orderMd,d=r.orderLg;var e=[];if(s&&!Number.isNaN(s)){e.push("order-xs-".concat(s))}if(o&&!Number.isNaN(o)){e.push("order-sm-".concat(o))}if(t&&!Number.isNaN(t)){e.push("order-md-".concat(t))}if(d&&!Number.isNaN(d)){e.push("order-lg-".concat(d))}return e.join(" ")},enumerable:false,configurable:true});r.prototype.render=function(){var r=this,s=r.startClass,d=r.spanClass,e=r.orderClass;return o(t,{class:"".concat(s," ").concat(d," ").concat(e)},o("slot",null))};return r}());e.style=d}}}));
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import { r as registerInstance, h, f as Host } from './index-7fe386de.js';
|
2
|
-
|
3
|
-
const ku4DrawerCss = ":host{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;z-index:1}:host([top]),:host([bottom]){width:100%;height:0;-webkit-transition:height 0.4s;transition:height 0.4s}:host([left]),:host([right]){width:0;height:100%;-webkit-transition:width 0.4s;transition:width 0.4s}:host([top][open]),:host([bottom][open]){height:100%}:host([left][open]),:host([right][open]){width:100%}:host([top][open=false]),:host([bottom][open=false]){height:0}:host([left][open=false]),:host([right][open=false]){width:0}:host([top]),:host([left]){top:0;left:0}:host([bottom]){left:0;bottom:0}:host([right]){right:0;bottom:0}";
|
4
|
-
|
5
|
-
const Ku4Drawer = class {
|
6
|
-
constructor(hostRef) {
|
7
|
-
registerInstance(this, hostRef);
|
8
|
-
/**
|
9
|
-
* Open size of this drawer (any valid CSS width or height value)
|
10
|
-
*/
|
11
|
-
this.size = '20%';
|
12
|
-
}
|
13
|
-
/**
|
14
|
-
* Toggle drawer
|
15
|
-
*/
|
16
|
-
async toggle() {
|
17
|
-
this.open = !this.open;
|
18
|
-
}
|
19
|
-
get sizeValue() {
|
20
|
-
const { bottom, top, right, size } = this;
|
21
|
-
switch (true) {
|
22
|
-
case bottom: return { 'max-height': size };
|
23
|
-
case top: return { 'max-height': size };
|
24
|
-
case right: return { 'max-width': size };
|
25
|
-
default: return { 'max-width': size };
|
26
|
-
}
|
27
|
-
}
|
28
|
-
render() {
|
29
|
-
const { sizeValue, open } = this;
|
30
|
-
return (h(Host, { style: sizeValue, "aria-hidden": open ? 'false' : 'true' }, h("slot", null)));
|
31
|
-
}
|
32
|
-
};
|
33
|
-
Ku4Drawer.style = ku4DrawerCss;
|
34
|
-
|
35
|
-
export { Ku4Drawer as ku4_drawer };
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,o){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,i){function s(t){try{h(o.next(t))}catch(e){i(e)}}function a(t){try{h(o["throw"](t))}catch(e){i(e)}}function h(t){t.done?n(t.value):r(t.value).then(s,a)}h((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return h([t,e])}}function h(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,r&&(i=s[0]&2?r["return"]:s[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;if(r=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){n.label=s[1];break}if(s[0]===6&&n.label<i[1]){n.label=i[1];i=s;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(s);break}if(i[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(a){s=[6,a];r=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./index-5029fd1f.system.js"],(function(t){"use strict";var e,n,o;return{setters:[function(t){e=t.r;n=t.h;o=t.f}],execute:function(){var r=":host{position:fixed;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;z-index:1}:host([top]),:host([bottom]){width:100%;height:0;-webkit-transition:height 0.4s;transition:height 0.4s}:host([left]),:host([right]){width:0;height:100%;-webkit-transition:width 0.4s;transition:width 0.4s}:host([top][open]),:host([bottom][open]){height:100%}:host([left][open]),:host([right][open]){width:100%}:host([top][open=false]),:host([bottom][open=false]){height:0}:host([left][open=false]),:host([right][open=false]){width:0}:host([top]),:host([left]){top:0;left:0}:host([bottom]){left:0;bottom:0}:host([right]){right:0;bottom:0}";var i=t("ku4_drawer",function(){function t(t){e(this,t);this.size="20%"}t.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.open=!this.open;return[2]}))}))};Object.defineProperty(t.prototype,"sizeValue",{get:function(){var t=this,e=t.bottom,n=t.top,o=t.right,r=t.size;switch(true){case e:return{"max-height":r};case n:return{"max-height":r};case o:return{"max-width":r};default:return{"max-width":r}}},enumerable:false,configurable:true});t.prototype.render=function(){var t=this,e=t.sizeValue,r=t.open;return n(o,{style:e,"aria-hidden":r?"false":"true"},n("slot",null))};return t}());i.style=r}}}));
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import { r as registerInstance, h, f as Host, g as getElement } from './index-7fe386de.js';
|
2
|
-
import { t } from './index-135dacad.js';
|
3
|
-
|
4
|
-
const Ku4Feature = class {
|
5
|
-
constructor(hostRef) {
|
6
|
-
registerInstance(this, hostRef);
|
7
|
-
/**
|
8
|
-
* A function or method that returns a boolean.
|
9
|
-
* A return value of true will turn on the this
|
10
|
-
* feature. (optional)
|
11
|
-
*/
|
12
|
-
this.policy = '';
|
13
|
-
this.enabled = false;
|
14
|
-
const policy = this.policy.trim();
|
15
|
-
this.featurePolicy = t.isNullOrEmpty(policy)
|
16
|
-
? () => false
|
17
|
-
: new Function((/^return/.test(policy) ? policy : `return ${policy}`));
|
18
|
-
}
|
19
|
-
componentWillLoad() {
|
20
|
-
const { on, featurePolicy } = this;
|
21
|
-
on || featurePolicy.call(this.host)
|
22
|
-
? this.render = () => h("slot", null)
|
23
|
-
: this.host.parentNode.removeChild(this.host);
|
24
|
-
}
|
25
|
-
render() { return h(Host, null); }
|
26
|
-
get host() { return getElement(this); }
|
27
|
-
};
|
28
|
-
|
29
|
-
export { Ku4Feature as ku4_feature };
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./index-5029fd1f.system.js","./index-dcd9a8a7.system.js"],(function(t){"use strict";var e,n,r,i,o;return{setters:[function(t){e=t.r;n=t.h;r=t.f;i=t.g},function(t){o=t.t}],execute:function(){var s=t("ku4_feature",function(){function t(t){e(this,t);this.policy="";this.enabled=false;var n=this.policy.trim();this.featurePolicy=o.isNullOrEmpty(n)?function(){return false}:new Function(/^return/.test(n)?n:"return ".concat(n))}t.prototype.componentWillLoad=function(){var t=this,e=t.on,r=t.featurePolicy;e||r.call(this.host)?this.render=function(){return n("slot",null)}:this.host.parentNode.removeChild(this.host)};t.prototype.render=function(){return n(r,null)};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}())}}}));
|
@@ -1,323 +0,0 @@
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-7fe386de.js';
|
2
|
-
import { t, o } from './index-135dacad.js';
|
3
|
-
import { K as Key, E as Event } from './index-7ff6e718.js';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Sets aria-hidden attribute for passed elements
|
7
|
-
* @param {Array} elements - List of elements to set aria-hidden on
|
8
|
-
* @param {boolean} [value] - Optional value for aria-hidden.
|
9
|
-
* No value will set to previous value if available.
|
10
|
-
*/
|
11
|
-
const ariaHidden = (elements, value) => {
|
12
|
-
if (!value) {
|
13
|
-
// eslint-disable-next-line @stencil/ban-side-effects
|
14
|
-
elements.forEach((element) => {
|
15
|
-
if (!element.currentAriaHidden) {
|
16
|
-
element.removeAttribute('aria-hidden');
|
17
|
-
}
|
18
|
-
else {
|
19
|
-
element.setAttribute('aria-hidden', element.currentAriaHidden);
|
20
|
-
}
|
21
|
-
});
|
22
|
-
}
|
23
|
-
else {
|
24
|
-
// eslint-disable-next-line @stencil/ban-side-effects
|
25
|
-
elements.forEach((element) => {
|
26
|
-
element.currentAriaHidden = element.getAttribute('aria-hidden');
|
27
|
-
element.setAttribute('aria-hidden', value);
|
28
|
-
});
|
29
|
-
}
|
30
|
-
};
|
31
|
-
|
32
|
-
const focusableTags = ['A', 'BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'];
|
33
|
-
const isFocusable = (element) => {
|
34
|
-
const tabindex = element.getAttribute('tabindex');
|
35
|
-
return (focusableTags.includes(element.tagName.toUpperCase()) ||
|
36
|
-
element.getAttribute('href')) &&
|
37
|
-
(!tabindex || isNaN(tabindex) || parseInt(tabindex) > -1);
|
38
|
-
};
|
39
|
-
|
40
|
-
const queryFocusable = element => [].slice.call(element.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
|
41
|
-
const queryTabbable = element => [].slice.call(element.querySelectorAll(':not([tabindex="-1"])'));
|
42
|
-
|
43
|
-
const ku4FocusTrapCss = ":host{position:static}";
|
44
|
-
|
45
|
-
const { tab } = Key;
|
46
|
-
const tabShift = Key.tab.shift;
|
47
|
-
const tabAlt = Key.tab.alt;
|
48
|
-
const tabAltShift = Key.tab.alt.shift;
|
49
|
-
const Ku4FocusTrap = class {
|
50
|
-
constructor(hostRef) {
|
51
|
-
registerInstance(this, hostRef);
|
52
|
-
this.iframes = [];
|
53
|
-
/**
|
54
|
-
* Focus trap will be active when true.
|
55
|
-
*/
|
56
|
-
this.active = false;
|
57
|
-
this.handleKeyDown = this.handleKeyDown.bind(this);
|
58
|
-
this.handleKeyUp = this.handleKeyUp.bind(this);
|
59
|
-
this.handleMouse = this.handleMouse.bind(this);
|
60
|
-
}
|
61
|
-
activeHandler(value) {
|
62
|
-
value ? this.handleActivate() : this.handleDeactivate();
|
63
|
-
}
|
64
|
-
/**
|
65
|
-
* Activate focus trap
|
66
|
-
* @param {Element} [element] - Element to return focus to when trap is deactivated.
|
67
|
-
*/
|
68
|
-
async activate(element) {
|
69
|
-
this.lastActiveElement = element || document.querySelector(this.return || null);
|
70
|
-
this.active = true;
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* Deactivate focus trap.
|
74
|
-
*/
|
75
|
-
async deactivate() {
|
76
|
-
this.active = false;
|
77
|
-
}
|
78
|
-
handleActivate() {
|
79
|
-
this.lastActiveElement = this.lastActiveElement || document.activeElement;
|
80
|
-
if (this.lastActiveElement && this.lastActiveElement.blur) {
|
81
|
-
this.lastActiveElement.blur();
|
82
|
-
}
|
83
|
-
this.addEventListeners(this.elements);
|
84
|
-
ariaHidden(this.outerElements, true);
|
85
|
-
window.requestAnimationFrame(() => {
|
86
|
-
const element = (document.querySelector(this.initial || null) ||
|
87
|
-
this.focusableElements[0] ||
|
88
|
-
this.trapElements[0]);
|
89
|
-
element.blur();
|
90
|
-
element.focus();
|
91
|
-
this.activateTraps();
|
92
|
-
});
|
93
|
-
}
|
94
|
-
handleDeactivate() {
|
95
|
-
this.removeEventListeners(this.elements);
|
96
|
-
this.deactivateTraps();
|
97
|
-
ariaHidden(this.outerElements);
|
98
|
-
if (this.lastActiveElement && this.lastActiveElement.focus) {
|
99
|
-
this.lastActiveElement.focus();
|
100
|
-
}
|
101
|
-
this.lastActiveElement = null;
|
102
|
-
}
|
103
|
-
// Handles keydown and mutes the event if it occurs on a focusable
|
104
|
-
// item that is in the focus trap. This allows this block to force
|
105
|
-
// the decision as to who will get next focus and not let that
|
106
|
-
// decisioning fall out to the browser.
|
107
|
-
handleKeyDown(e) {
|
108
|
-
if ((tabShift.didFire(e) || tabAltShift.didFire(e))) {
|
109
|
-
try {
|
110
|
-
if (this.iframes.length > 0 && (this.trapElements[1] === e.target ||
|
111
|
-
!t.isNull(e.target.getAttribute('ku4-focus-wrap')) ||
|
112
|
-
this.iframes.some(iframe => iframe.contains(e.target)))) {
|
113
|
-
return;
|
114
|
-
}
|
115
|
-
if (this.trapElements[0] === e.target) {
|
116
|
-
this.trapElements[1].focus();
|
117
|
-
return Event.mute(e);
|
118
|
-
}
|
119
|
-
const nextIndex = this.focusableElements.indexOf(e.target) - 1;
|
120
|
-
const next = nextIndex < 0 ? this.focusableElements.length - 1 : nextIndex;
|
121
|
-
this.focusableElements[next].focus();
|
122
|
-
return Event.mute(e);
|
123
|
-
}
|
124
|
-
catch (e) {
|
125
|
-
return Event.mute(e);
|
126
|
-
}
|
127
|
-
}
|
128
|
-
if ((tab.didFire(e) || tabAlt.didFire(e))) {
|
129
|
-
try {
|
130
|
-
if (this.iframes.length > 0 && (this.trapElements[0] === e.target ||
|
131
|
-
!t.isNull(e.target.getAttribute('ku4-focus-wrap')) ||
|
132
|
-
this.iframes.some(iframe => iframe.contains(e.target)))) {
|
133
|
-
return;
|
134
|
-
}
|
135
|
-
if (this.trapElements[1] === e.target) {
|
136
|
-
this.trapElements[0].focus();
|
137
|
-
return Event.mute(e);
|
138
|
-
}
|
139
|
-
const nextIndex = this.focusableElements.indexOf(e.target) + 1;
|
140
|
-
const next = nextIndex >= this.focusableElements.length ? 0 : nextIndex;
|
141
|
-
this.focusableElements[next].focus();
|
142
|
-
return Event.mute(e);
|
143
|
-
}
|
144
|
-
catch (e) {
|
145
|
-
return Event.mute(e);
|
146
|
-
}
|
147
|
-
}
|
148
|
-
}
|
149
|
-
// Handles keyup and mutes the event if it occurs on a focusable
|
150
|
-
// item that is in the focus trap. This allows for us to determine
|
151
|
-
// if we need to move to the next focusable if the key is released
|
152
|
-
// on one of the trapElements (the two dynamically created wrapper
|
153
|
-
// elements that create the trap);
|
154
|
-
handleKeyUp(e) {
|
155
|
-
const index = this.trapElements.indexOf(e.target);
|
156
|
-
if (index === 0 && (tabShift.didFire(e) || tabAltShift.didFire(e))) {
|
157
|
-
const element = this.focusableElements[this.focusableElements.length - 1] || this.trapElements[1];
|
158
|
-
element.focus();
|
159
|
-
return Event.mute(e);
|
160
|
-
}
|
161
|
-
if (index === 1 && (tab.didFire(e) || tabAlt.didFire(e))) {
|
162
|
-
const element = this.focusableElements[0] || this.trapElements[0];
|
163
|
-
element.focus();
|
164
|
-
return Event.mute(e);
|
165
|
-
}
|
166
|
-
}
|
167
|
-
// Prevents all mouse activity on any elements that are not focusable
|
168
|
-
// inside of the active trap.
|
169
|
-
handleMouse(e) {
|
170
|
-
if (!this.elements.some(element => element === e.target)) {
|
171
|
-
Event.mute(e);
|
172
|
-
}
|
173
|
-
}
|
174
|
-
addEventListeners(elements) {
|
175
|
-
elements.forEach(element => element.addEventListener('keydown', this.handleKeyDown, { passive: true }));
|
176
|
-
elements.forEach(element => element.addEventListener('keyup', this.handleKeyUp, { passive: true }));
|
177
|
-
window.addEventListener('click', this.handleMouse, { passive: true });
|
178
|
-
window.addEventListener('mousedown', this.handleMouse, { passive: true });
|
179
|
-
window.addEventListener('mouseup', this.handleMouse, { passive: true });
|
180
|
-
window.addEventListener('touchstart', this.handleMouse, { passive: true });
|
181
|
-
}
|
182
|
-
removeEventListeners(elements) {
|
183
|
-
elements.forEach(element => element.removeEventListener('keydown', this.handleKeyDown, true));
|
184
|
-
elements.forEach(element => element.removeEventListener('keyup', this.handleKeyUp, true));
|
185
|
-
window.removeEventListener('click', this.handleMouse, true);
|
186
|
-
window.removeEventListener('mousedown', this.handleMouse, true);
|
187
|
-
window.removeEventListener('mouseup', this.handleMouse, true);
|
188
|
-
window.addEventListener('touchstart', this.handleMouse, true);
|
189
|
-
}
|
190
|
-
activateTraps() {
|
191
|
-
this.setTraps(0);
|
192
|
-
}
|
193
|
-
deactivateTraps() {
|
194
|
-
this.setTraps(-1);
|
195
|
-
}
|
196
|
-
setTraps(value) {
|
197
|
-
[].slice.call(this.host.querySelectorAll('[ku4-focus-trap], [ku4-focus-wrap]'))
|
198
|
-
.forEach(element => element.setAttribute('tabindex', value));
|
199
|
-
}
|
200
|
-
wrap(element) {
|
201
|
-
const fragment = document.createDocumentFragment();
|
202
|
-
fragment.appendChild(this.createWrapTag());
|
203
|
-
fragment.appendChild(element.cloneNode());
|
204
|
-
fragment.appendChild(this.createWrapTag());
|
205
|
-
element.parentNode.replaceChild(fragment, element);
|
206
|
-
}
|
207
|
-
createTrapTag() {
|
208
|
-
return this.createTag('ku4-focus-trap');
|
209
|
-
}
|
210
|
-
createWrapTag() {
|
211
|
-
return this.createTag('ku4-focus-wrap');
|
212
|
-
}
|
213
|
-
createTag(type) {
|
214
|
-
const trap = document.createElement('button');
|
215
|
-
trap.setAttribute(type, '');
|
216
|
-
trap.setAttribute('tabindex', '0');
|
217
|
-
trap.setAttribute('aria-hidden', 'true');
|
218
|
-
trap.style.position = 'static';
|
219
|
-
trap.style.display = 'block';
|
220
|
-
trap.style.width = '0';
|
221
|
-
trap.style.height = '0';
|
222
|
-
trap.style.margin = '0';
|
223
|
-
trap.style.padding = '0';
|
224
|
-
trap.style.border = 'none';
|
225
|
-
trap.style.outline = 'none';
|
226
|
-
return trap;
|
227
|
-
}
|
228
|
-
initialize() {
|
229
|
-
// All elements in this focus-trap
|
230
|
-
const innerElements = [].slice.call(this.host.querySelectorAll('*'));
|
231
|
-
// May need to break this out as it is really included for the mouse events
|
232
|
-
// e.g. for an overlay on a modal to make that clickable that is make it
|
233
|
-
// so this does not include it for muting the mouse events. This component
|
234
|
-
// is very powerful in shutting everything down and needs to allow for
|
235
|
-
// the ability to let items be clickable.
|
236
|
-
const inclusions = [].slice.call(document.querySelectorAll(this.include || null) || []);
|
237
|
-
// May need to break this out as it is really here to explicitly exclude items from
|
238
|
-
// being read out by screen readers. That is make them hidden so that screen
|
239
|
-
// readers get the same treatment as regular users.
|
240
|
-
const exclusions = [].slice.call(document.querySelectorAll(this.exclude) || []);
|
241
|
-
let shadowExclusions = [];
|
242
|
-
(this.excludeShadow || '').split(',').forEach((selector) => {
|
243
|
-
if (t.isNullOrEmpty(selector)) {
|
244
|
-
return;
|
245
|
-
}
|
246
|
-
try {
|
247
|
-
const parts = selector.trim().replace(/\s/, '|').split('|');
|
248
|
-
const shadowElements = document.querySelector(parts[0]).shadowRoot.querySelectorAll(parts[1]);
|
249
|
-
shadowExclusions = shadowExclusions.concat([].slice.call(shadowElements || []));
|
250
|
-
}
|
251
|
-
catch (e) {
|
252
|
-
// eslint-disable-next-line no-console
|
253
|
-
console.error('Invalid shadow selector', selector);
|
254
|
-
}
|
255
|
-
});
|
256
|
-
// Get all of the iframes as we cannot reach into them to find
|
257
|
-
// their focusable elements. We can only focus on the trap elements
|
258
|
-
// that wrap it
|
259
|
-
this.iframes = [].slice.call(this.host.querySelectorAll('iframe') || []);
|
260
|
-
this.iframes.forEach(iframe => this.wrap(iframe));
|
261
|
-
// Set element in this trap deduplicating any that may have been duplicated
|
262
|
-
// with careless user inclusions.
|
263
|
-
this.elements = o([...queryTabbable(this.host), ...inclusions]);
|
264
|
-
// Get the focusable elements. This may be overkill as we really only need
|
265
|
-
// to know the first and last focusable. If that is the case, we may be
|
266
|
-
// able to just use the first and last `this.element` it is still not clear.
|
267
|
-
this.focusableElements = this.elements
|
268
|
-
.reduce((acc, value) => {
|
269
|
-
if (isFocusable(value) && !this.trapElements.includes(value)) {
|
270
|
-
acc.push(value);
|
271
|
-
}
|
272
|
-
return acc;
|
273
|
-
}, []);
|
274
|
-
/**
|
275
|
-
* We can not currently do this this way because MSEdge
|
276
|
-
* is reordering querySelectorAll items such that they
|
277
|
-
* not selecting in DOM order. If/when we dump support
|
278
|
-
* for MSEdge (non Chromium) or it fixes support we
|
279
|
-
* can move to this more efficient way. Until then, we
|
280
|
-
* need to use the && condition .includes in the
|
281
|
-
* `reduce` above. It will be more efficient to do it
|
282
|
-
* the below way when we can.
|
283
|
-
*/
|
284
|
-
// this.focusableElements.shift();
|
285
|
-
// this.focusableElements.pop();
|
286
|
-
//This may need to be defied more specifically as a11y as it is needed
|
287
|
-
//for the screen reader capabilities and may be interfering with
|
288
|
-
//regular usage.
|
289
|
-
this.outerElements = [...queryFocusable(document.body), ...exclusions, ...shadowExclusions]
|
290
|
-
.filter(element => !(element === this.host ||
|
291
|
-
innerElements.includes(element) ||
|
292
|
-
inclusions.includes(element)));
|
293
|
-
}
|
294
|
-
componentDidLoad() {
|
295
|
-
const trapStart = this.createTrapTag();
|
296
|
-
const trapEnd = this.createTrapTag();
|
297
|
-
this.trapElements = [trapStart, trapEnd];
|
298
|
-
this.host.insertBefore(trapStart, this.host.firstChild);
|
299
|
-
this.host.appendChild(trapEnd);
|
300
|
-
this.initialize();
|
301
|
-
if (this.active) {
|
302
|
-
this.handleActivate();
|
303
|
-
}
|
304
|
-
else {
|
305
|
-
this.handleDeactivate();
|
306
|
-
}
|
307
|
-
}
|
308
|
-
disconnectedCallback() {
|
309
|
-
if (this.active) {
|
310
|
-
this.handleDeactivate();
|
311
|
-
}
|
312
|
-
}
|
313
|
-
render() {
|
314
|
-
return h("slot", null);
|
315
|
-
}
|
316
|
-
get host() { return getElement(this); }
|
317
|
-
static get watchers() { return {
|
318
|
-
"active": ["activeHandler"]
|
319
|
-
}; }
|
320
|
-
};
|
321
|
-
Ku4FocusTrap.style = ku4FocusTrapCss;
|
322
|
-
|
323
|
-
export { Ku4FocusTrap as ku4_focus_trap };
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function s(t){try{u(n.next(t))}catch(e){a(e)}}function o(t){try{u(n["throw"](t))}catch(e){a(e)}}function u(t){t.done?r(t.value):i(t.value).then(s,o)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return u([t,e])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1];a=s;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(s);break}if(a[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(o){s=[6,o];i=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++){if(a||!(n in e)){if(!a)a=Array.prototype.slice.call(e,0,n);a[n]=e[n]}}return t.concat(a||Array.prototype.slice.call(e))};System.register(["./index-5029fd1f.system.js","./index-dcd9a8a7.system.js","./index-7d482e8a.system.js"],(function(t){"use strict";var e,r,n,i,a,s,o;return{setters:[function(t){e=t.r;r=t.h;n=t.g},function(t){i=t.t;a=t.o},function(t){s=t.K;o=t.E}],execute:function(){var u=function(t,e){if(!e){t.forEach((function(t){if(!t.currentAriaHidden){t.removeAttribute("aria-hidden")}else{t.setAttribute("aria-hidden",t.currentAriaHidden)}}))}else{t.forEach((function(t){t.currentAriaHidden=t.getAttribute("aria-hidden");t.setAttribute("aria-hidden",e)}))}};var l=["A","BUTTON","INPUT","SELECT","TEXTAREA"];var c=function(t){var e=t.getAttribute("tabindex");return(l.includes(t.tagName.toUpperCase())||t.getAttribute("href"))&&(!e||isNaN(e)||parseInt(e)>-1)};var h=function(t){return[].slice.call(t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'))};var d=function(t){return[].slice.call(t.querySelectorAll(':not([tabindex="-1"])'))};var f=":host{position:static}";var p=s.tab;var v=s.tab.shift;var m=s.tab.alt;var y=s.tab.alt.shift;var E=t("ku4_focus_trap",function(){function t(t){e(this,t);this.iframes=[];this.active=false;this.handleKeyDown=this.handleKeyDown.bind(this);this.handleKeyUp=this.handleKeyUp.bind(this);this.handleMouse=this.handleMouse.bind(this)}t.prototype.activeHandler=function(t){t?this.handleActivate():this.handleDeactivate()};t.prototype.activate=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.lastActiveElement=t||document.querySelector(this.return||null);this.active=true;return[2]}))}))};t.prototype.deactivate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.active=false;return[2]}))}))};t.prototype.handleActivate=function(){var t=this;this.lastActiveElement=this.lastActiveElement||document.activeElement;if(this.lastActiveElement&&this.lastActiveElement.blur){this.lastActiveElement.blur()}this.addEventListeners(this.elements);u(this.outerElements,true);window.requestAnimationFrame((function(){var e=document.querySelector(t.initial||null)||t.focusableElements[0]||t.trapElements[0];e.blur();e.focus();t.activateTraps()}))};t.prototype.handleDeactivate=function(){this.removeEventListeners(this.elements);this.deactivateTraps();u(this.outerElements);if(this.lastActiveElement&&this.lastActiveElement.focus){this.lastActiveElement.focus()}this.lastActiveElement=null};t.prototype.handleKeyDown=function(t){if(v.didFire(t)||y.didFire(t)){try{if(this.iframes.length>0&&(this.trapElements[1]===t.target||!i.isNull(t.target.getAttribute("ku4-focus-wrap"))||this.iframes.some((function(e){return e.contains(t.target)})))){return}if(this.trapElements[0]===t.target){this.trapElements[1].focus();return o.mute(t)}var e=this.focusableElements.indexOf(t.target)-1;var r=e<0?this.focusableElements.length-1:e;this.focusableElements[r].focus();return o.mute(t)}catch(t){return o.mute(t)}}if(p.didFire(t)||m.didFire(t)){try{if(this.iframes.length>0&&(this.trapElements[0]===t.target||!i.isNull(t.target.getAttribute("ku4-focus-wrap"))||this.iframes.some((function(e){return e.contains(t.target)})))){return}if(this.trapElements[1]===t.target){this.trapElements[0].focus();return o.mute(t)}var e=this.focusableElements.indexOf(t.target)+1;var r=e>=this.focusableElements.length?0:e;this.focusableElements[r].focus();return o.mute(t)}catch(t){return o.mute(t)}}};t.prototype.handleKeyUp=function(t){var e=this.trapElements.indexOf(t.target);if(e===0&&(v.didFire(t)||y.didFire(t))){var r=this.focusableElements[this.focusableElements.length-1]||this.trapElements[1];r.focus();return o.mute(t)}if(e===1&&(p.didFire(t)||m.didFire(t))){var r=this.focusableElements[0]||this.trapElements[0];r.focus();return o.mute(t)}};t.prototype.handleMouse=function(t){if(!this.elements.some((function(e){return e===t.target}))){o.mute(t)}};t.prototype.addEventListeners=function(t){var e=this;t.forEach((function(t){return t.addEventListener("keydown",e.handleKeyDown,{passive:true})}));t.forEach((function(t){return t.addEventListener("keyup",e.handleKeyUp,{passive:true})}));window.addEventListener("click",this.handleMouse,{passive:true});window.addEventListener("mousedown",this.handleMouse,{passive:true});window.addEventListener("mouseup",this.handleMouse,{passive:true});window.addEventListener("touchstart",this.handleMouse,{passive:true})};t.prototype.removeEventListeners=function(t){var e=this;t.forEach((function(t){return t.removeEventListener("keydown",e.handleKeyDown,true)}));t.forEach((function(t){return t.removeEventListener("keyup",e.handleKeyUp,true)}));window.removeEventListener("click",this.handleMouse,true);window.removeEventListener("mousedown",this.handleMouse,true);window.removeEventListener("mouseup",this.handleMouse,true);window.addEventListener("touchstart",this.handleMouse,true)};t.prototype.activateTraps=function(){this.setTraps(0)};t.prototype.deactivateTraps=function(){this.setTraps(-1)};t.prototype.setTraps=function(t){[].slice.call(this.host.querySelectorAll("[ku4-focus-trap], [ku4-focus-wrap]")).forEach((function(e){return e.setAttribute("tabindex",t)}))};t.prototype.wrap=function(t){var e=document.createDocumentFragment();e.appendChild(this.createWrapTag());e.appendChild(t.cloneNode());e.appendChild(this.createWrapTag());t.parentNode.replaceChild(e,t)};t.prototype.createTrapTag=function(){return this.createTag("ku4-focus-trap")};t.prototype.createWrapTag=function(){return this.createTag("ku4-focus-wrap")};t.prototype.createTag=function(t){var e=document.createElement("button");e.setAttribute(t,"");e.setAttribute("tabindex","0");e.setAttribute("aria-hidden","true");e.style.position="static";e.style.display="block";e.style.width="0";e.style.height="0";e.style.margin="0";e.style.padding="0";e.style.border="none";e.style.outline="none";return e};t.prototype.initialize=function(){var t=this;var e=[].slice.call(this.host.querySelectorAll("*"));var r=[].slice.call(document.querySelectorAll(this.include||null)||[]);var n=[].slice.call(document.querySelectorAll(this.exclude)||[]);var s=[];(this.excludeShadow||"").split(",").forEach((function(t){if(i.isNullOrEmpty(t)){return}try{var e=t.trim().replace(/\s/,"|").split("|");var r=document.querySelector(e[0]).shadowRoot.querySelectorAll(e[1]);s=s.concat([].slice.call(r||[]))}catch(n){console.error("Invalid shadow selector",t)}}));this.iframes=[].slice.call(this.host.querySelectorAll("iframe")||[]);this.iframes.forEach((function(e){return t.wrap(e)}));this.elements=a(__spreadArray(__spreadArray([],d(this.host),true),r,true));this.focusableElements=this.elements.reduce((function(e,r){if(c(r)&&!t.trapElements.includes(r)){e.push(r)}return e}),[]);this.outerElements=__spreadArray(__spreadArray(__spreadArray([],h(document.body),true),n,true),s,true).filter((function(n){return!(n===t.host||e.includes(n)||r.includes(n))}))};t.prototype.componentDidLoad=function(){var t=this.createTrapTag();var e=this.createTrapTag();this.trapElements=[t,e];this.host.insertBefore(t,this.host.firstChild);this.host.appendChild(e);this.initialize();if(this.active){this.handleActivate()}else{this.handleDeactivate()}};t.prototype.disconnectedCallback=function(){if(this.active){this.handleDeactivate()}};t.prototype.render=function(){return r("slot",null)};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{active:["activeHandler"]}},enumerable:false,configurable:true});return t}());E.style=f}}}));
|
@@ -1,112 +0,0 @@
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-7fe386de.js';
|
2
|
-
import { t } from './index-135dacad.js';
|
3
|
-
import { i as index } from './index-7ff6e718.js';
|
4
|
-
|
5
|
-
const Ku4Form = class {
|
6
|
-
constructor(hostRef) {
|
7
|
-
registerInstance(this, hostRef);
|
8
|
-
this.validate = this.validate.bind(this);
|
9
|
-
this.handleReset = this.handleReset.bind(this);
|
10
|
-
}
|
11
|
-
/**
|
12
|
-
* Returns a list of the names of all of the fields
|
13
|
-
* associated with this form.
|
14
|
-
*/
|
15
|
-
async listFieldNames() {
|
16
|
-
return index.readFieldNames(this.form);
|
17
|
-
}
|
18
|
-
/**
|
19
|
-
* Validates this form. This method is automatically called
|
20
|
-
* internally on submit of the form only allowing a successful
|
21
|
-
* submit if the form is valid.
|
22
|
-
*/
|
23
|
-
async validate() {
|
24
|
-
const { fields } = this;
|
25
|
-
const methods = fields.map(field => field.validate());
|
26
|
-
this.isValid = await Promise.all(methods).then(values => !values.some(v => v === false));
|
27
|
-
this.invalid = !this.isValid;
|
28
|
-
return this.isValid;
|
29
|
-
}
|
30
|
-
/**
|
31
|
-
* A string of the name of the field to invalidate
|
32
|
-
* @param {string} name
|
33
|
-
*/
|
34
|
-
async invalidate(name) {
|
35
|
-
if (t.isArray(name)) {
|
36
|
-
name.forEach((name) => {
|
37
|
-
const field = this.fields.find(field => field.for === name);
|
38
|
-
if (field) {
|
39
|
-
field.invalid = true;
|
40
|
-
}
|
41
|
-
});
|
42
|
-
}
|
43
|
-
else {
|
44
|
-
const field = this.fields.find(field => field.for === name);
|
45
|
-
if (field) {
|
46
|
-
field.invalid = true;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
this.invalid = true;
|
50
|
-
return this;
|
51
|
-
}
|
52
|
-
/**
|
53
|
-
* Reads data from the associated form
|
54
|
-
*/
|
55
|
-
async read() {
|
56
|
-
return index.read(this.form);
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* Writes data to the associated form
|
60
|
-
*/
|
61
|
-
async write(data) {
|
62
|
-
index.write(this.form, data);
|
63
|
-
Object.keys(data).forEach((name) => {
|
64
|
-
try {
|
65
|
-
this.form.querySelector(`[name="${name}"]`)
|
66
|
-
.dispatchEvent(new Event('change'));
|
67
|
-
}
|
68
|
-
catch (e) {
|
69
|
-
/* Fail silently */
|
70
|
-
}
|
71
|
-
});
|
72
|
-
return this;
|
73
|
-
}
|
74
|
-
get form() {
|
75
|
-
return this.host.querySelector('form');
|
76
|
-
}
|
77
|
-
get fields() {
|
78
|
-
return [].slice.call(this.form.querySelectorAll('ku4-validation'));
|
79
|
-
}
|
80
|
-
handleReset() {
|
81
|
-
this.isValid = true;
|
82
|
-
this.invalid = !this.isValid;
|
83
|
-
}
|
84
|
-
componentWillLoad() {
|
85
|
-
const { form } = this;
|
86
|
-
if (t.exists(form)) {
|
87
|
-
const onsubmit = form.onsubmit || (() => { });
|
88
|
-
form.onsubmit = (e) => {
|
89
|
-
e.preventDefault();
|
90
|
-
this.validate()
|
91
|
-
.then(valid => valid && onsubmit.call(form, e))
|
92
|
-
.then(returnValue => !t.isFalse(returnValue) && form.submit());
|
93
|
-
return false;
|
94
|
-
};
|
95
|
-
form.addEventListener('reset', this.handleReset);
|
96
|
-
this.fields.forEach(field => field.addEventListener('validated', this.validate));
|
97
|
-
}
|
98
|
-
}
|
99
|
-
disconnectedCallback() {
|
100
|
-
const { form } = this;
|
101
|
-
if (t.exists(form)) {
|
102
|
-
form.removeEventListener('reset', this.handleReset);
|
103
|
-
this.fields.forEach(field => field.removeEventListener('validated', this.validate));
|
104
|
-
}
|
105
|
-
}
|
106
|
-
render() {
|
107
|
-
return h("slot", null);
|
108
|
-
}
|
109
|
-
get host() { return getElement(this); }
|
110
|
-
};
|
111
|
-
|
112
|
-
export { Ku4Form as ku4_form };
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r["throw"](t))}catch(e){o(e)}}function u(t){t.done?n(t.value):i(t.value).then(a,s)}u((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-5029fd1f.system.js","./index-dcd9a8a7.system.js","./index-7d482e8a.system.js"],(function(t){"use strict";var e,n,r,i,o;return{setters:[function(t){e=t.r;n=t.h;r=t.g},function(t){i=t.t},function(t){o=t.i}],execute:function(){var a=t("ku4_form",function(){function t(t){e(this,t);this.validate=this.validate.bind(this);this.handleReset=this.handleReset.bind(this)}t.prototype.listFieldNames=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,o.readFieldNames(this.form)]}))}))};t.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,n;return __generator(this,(function(r){switch(r.label){case 0:t=this.fields;e=t.map((function(t){return t.validate()}));n=this;return[4,Promise.all(e).then((function(t){return!t.some((function(t){return t===false}))}))];case 1:n.isValid=r.sent();this.invalid=!this.isValid;return[2,this.isValid]}}))}))};t.prototype.invalidate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;var n=this;return __generator(this,(function(r){if(i.isArray(t)){t.forEach((function(t){var e=n.fields.find((function(e){return e.for===t}));if(e){e.invalid=true}}))}else{e=this.fields.find((function(e){return e.for===t}));if(e){e.invalid=true}}this.invalid=true;return[2,this]}))}))};t.prototype.read=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,o.read(this.form)]}))}))};t.prototype.write=function(t){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(n){o.write(this.form,t);Object.keys(t).forEach((function(t){try{e.form.querySelector('[name="'.concat(t,'"]')).dispatchEvent(new Event("change"))}catch(n){}}));return[2,this]}))}))};Object.defineProperty(t.prototype,"form",{get:function(){return this.host.querySelector("form")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"fields",{get:function(){return[].slice.call(this.form.querySelectorAll("ku4-validation"))},enumerable:false,configurable:true});t.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid};t.prototype.componentWillLoad=function(){var t=this;var e=this.form;if(i.exists(e)){var n=e.onsubmit||function(){};e.onsubmit=function(r){r.preventDefault();t.validate().then((function(t){return t&&n.call(e,r)})).then((function(t){return!i.isFalse(t)&&e.submit()}));return false};e.addEventListener("reset",this.handleReset);this.fields.forEach((function(e){return e.addEventListener("validated",t.validate)}))}};t.prototype.disconnectedCallback=function(){var t=this;var e=this.form;if(i.exists(e)){e.removeEventListener("reset",this.handleReset);this.fields.forEach((function(e){return e.removeEventListener("validated",t.validate)}))}};t.prototype.render=function(){return n("slot",null)};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}())}}}));
|