@dso-toolkit/core 66.2.0 → 67.0.0-ghi-2365.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-advanced-select.cjs.entry.js +1 -1
- package/dist/cjs/dso-alert_6.cjs.entry.js +5 -14
- package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +4 -5
- package/dist/cjs/dso-header.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-info_2.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-label_2.cjs.entry.js +4 -4
- package/dist/cjs/dso-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-list-button.cjs.entry.js +2 -2
- package/dist/cjs/dso-list-button.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +4 -4
- package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +2 -2
- package/dist/cjs/dso-progress-indicator.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-renvooi_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-skiplink.cjs.entry.js +32 -0
- package/dist/cjs/dso-skiplink.cjs.entry.js.map +1 -0
- package/dist/cjs/dso-tabs.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
- package/dist/cjs/{focus-trap.esm-dd03396f.js → focus-trap.esm-2a6637e5.js} +73 -26
- package/dist/cjs/focus-trap.esm-2a6637e5.js.map +1 -0
- package/dist/cjs/{i18n-a63b3b9b.js → i18n-f7bc1cee.js} +49 -32
- package/dist/cjs/i18n-f7bc1cee.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/v4-6fbeaa38.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/header/header.css +45 -10
- package/dist/collection/components/header/header.i18n.js +0 -1
- package/dist/collection/components/header/header.i18n.js.map +1 -1
- package/dist/collection/components/header/header.js +3 -3
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/info/info.css +20 -0
- package/dist/collection/components/label/label.js +4 -4
- package/dist/collection/components/label/label.js.map +1 -1
- package/dist/collection/components/list-button/list-button.css +29 -45
- package/dist/collection/components/modal/modal.js +5 -5
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/ozon-content/nodes/figuur.node.js +1 -10
- package/dist/collection/components/ozon-content/nodes/figuur.node.js.map +1 -1
- package/dist/collection/components/ozon-content/ozon-content.css +0 -5
- package/dist/collection/components/progress-indicator/progress-indicator.js +2 -2
- package/dist/collection/components/progress-indicator/progress-indicator.js.map +1 -1
- package/dist/collection/components/selectable/selectable.css +14 -0
- package/dist/collection/components/skiplink/skiplink.css +40 -0
- package/dist/collection/components/skiplink/skiplink.interfaces.js +2 -0
- package/dist/collection/components/skiplink/skiplink.interfaces.js.map +1 -0
- package/dist/collection/components/skiplink/skiplink.js +92 -0
- package/dist/collection/components/skiplink/skiplink.js.map +1 -0
- package/dist/collection/components/slide-toggle/slide-toggle.js +1 -1
- package/dist/collection/components/table/table.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/toggletip/toggletip.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/collection/utils/i18n.js +15 -12
- package/dist/collection/utils/i18n.js.map +1 -1
- package/dist/components/dso-header.js +5 -5
- package/dist/components/dso-header.js.map +1 -1
- package/dist/components/dso-list-button.js +1 -1
- package/dist/components/dso-list-button.js.map +1 -1
- package/dist/components/dso-modal.js +4 -4
- package/dist/components/dso-modal.js.map +1 -1
- package/dist/components/dso-skiplink.d.ts +11 -0
- package/dist/components/dso-skiplink.js +55 -0
- package/dist/components/dso-skiplink.js.map +1 -0
- package/dist/components/dso-tabs.js +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/focus-trap.esm.js +72 -25
- package/dist/components/focus-trap.esm.js.map +1 -1
- package/dist/components/i18n.js +48 -31
- package/dist/components/i18n.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/info.js.map +1 -1
- package/dist/components/label.js +4 -4
- package/dist/components/label.js.map +1 -1
- package/dist/components/ozon-content.js +2 -11
- package/dist/components/ozon-content.js.map +1 -1
- package/dist/components/progress-indicator.js +2 -2
- package/dist/components/progress-indicator.js.map +1 -1
- package/dist/components/selectable.js +1 -1
- package/dist/components/selectable.js.map +1 -1
- package/dist/components/slide-toggle.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/toggletip.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/v4.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/{p-9424e171.entry.js → p-1d7b22a2.entry.js} +2 -2
- package/dist/dso-toolkit/{p-636a2ad2.entry.js → p-21f133e4.entry.js} +2 -2
- package/dist/dso-toolkit/{p-954b3715.entry.js → p-2d2eae19.entry.js} +2 -2
- package/dist/dso-toolkit/p-3e9068cd.entry.js +2 -0
- package/dist/dso-toolkit/p-3e9068cd.entry.js.map +1 -0
- package/dist/dso-toolkit/p-4831099c.entry.js +2 -0
- package/dist/dso-toolkit/p-4831099c.entry.js.map +1 -0
- package/dist/dso-toolkit/p-51ba123c.entry.js +2 -0
- package/dist/dso-toolkit/p-51ba123c.entry.js.map +1 -0
- package/dist/dso-toolkit/p-5f4e8468.js +6 -0
- package/dist/dso-toolkit/p-5f4e8468.js.map +1 -0
- package/dist/dso-toolkit/p-672b0b80.js +2 -0
- package/dist/dso-toolkit/p-672b0b80.js.map +1 -0
- package/dist/dso-toolkit/{p-a2a9f5da.entry.js → p-6789163b.entry.js} +2 -2
- package/dist/dso-toolkit/{p-1616c445.entry.js → p-7b3f08da.entry.js} +2 -2
- package/dist/dso-toolkit/{p-f412ab80.entry.js → p-7d47fedb.entry.js} +2 -2
- package/dist/dso-toolkit/p-7d47fedb.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-49e93ef5.entry.js → p-7dfc15c1.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e80292b5.entry.js → p-826609e4.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e80292b5.entry.js.map → p-826609e4.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-9a0927eb.entry.js → p-9d8395bc.entry.js} +2 -2
- package/dist/dso-toolkit/{p-afc4bca7.entry.js → p-9df0ed5f.entry.js} +2 -2
- package/dist/dso-toolkit/p-a2db4965.entry.js +2 -0
- package/dist/dso-toolkit/p-a2db4965.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-7cfa6ab1.entry.js → p-c2f086f2.entry.js} +2 -2
- package/dist/dso-toolkit/{p-10603e10.entry.js → p-cb0a7103.entry.js} +2 -2
- package/dist/dso-toolkit/{p-1022c4bd.entry.js → p-d3857319.entry.js} +2 -2
- package/dist/dso-toolkit/p-d88ebb12.entry.js +2 -0
- package/dist/dso-toolkit/p-d88ebb12.entry.js.map +1 -0
- package/dist/dso-toolkit/p-e05b8f92.entry.js +2 -0
- package/dist/dso-toolkit/p-e05b8f92.entry.js.map +1 -0
- package/dist/dso-toolkit/p-ffb34aa5.js.map +1 -1
- package/dist/esm/dso-advanced-select.entry.js +1 -1
- package/dist/esm/dso-alert_6.entry.js +5 -14
- package/dist/esm/dso-alert_6.entry.js.map +1 -1
- package/dist/esm/dso-autosuggest.entry.js +1 -1
- package/dist/esm/dso-header.entry.js +4 -5
- package/dist/esm/dso-header.entry.js.map +1 -1
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-info_2.entry.js.map +1 -1
- package/dist/esm/dso-label_2.entry.js +4 -4
- package/dist/esm/dso-label_2.entry.js.map +1 -1
- package/dist/esm/dso-list-button.entry.js +2 -2
- package/dist/esm/dso-list-button.entry.js.map +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +4 -4
- package/dist/esm/dso-modal.entry.js.map +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +2 -2
- package/dist/esm/dso-progress-indicator.entry.js.map +1 -1
- package/dist/esm/dso-renvooi_2.entry.js +1 -1
- package/dist/esm/dso-skiplink.entry.js +28 -0
- package/dist/esm/dso-skiplink.entry.js.map +1 -0
- package/dist/esm/dso-tabs.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +1 -1
- package/dist/esm/{focus-trap.esm-24223ea1.js → focus-trap.esm-c9e1f389.js} +73 -26
- package/dist/esm/focus-trap.esm-c9e1f389.js.map +1 -0
- package/dist/esm/{i18n-c9ec6445.js → i18n-f2d58c82.js} +49 -32
- package/dist/esm/i18n-f2d58c82.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/v4-692dad5f.js.map +1 -1
- package/dist/types/components/modal/modal.d.ts +1 -1
- package/dist/types/components/ozon-content/nodes/figuur.node.d.ts +0 -3
- package/dist/types/components/skiplink/skiplink.d.ts +18 -0
- package/dist/types/components/skiplink/skiplink.interfaces.d.ts +5 -0
- package/dist/types/components.d.ts +58 -8
- package/package.json +6 -6
- package/dist/cjs/focus-trap.esm-dd03396f.js.map +0 -1
- package/dist/cjs/i18n-a63b3b9b.js.map +0 -1
- package/dist/dso-toolkit/p-3225dd02.entry.js +0 -2
- package/dist/dso-toolkit/p-3225dd02.entry.js.map +0 -1
- package/dist/dso-toolkit/p-74e0e63e.entry.js +0 -2
- package/dist/dso-toolkit/p-74e0e63e.entry.js.map +0 -1
- package/dist/dso-toolkit/p-8f0e00b0.entry.js +0 -2
- package/dist/dso-toolkit/p-8f0e00b0.entry.js.map +0 -1
- package/dist/dso-toolkit/p-992c287c.entry.js +0 -2
- package/dist/dso-toolkit/p-992c287c.entry.js.map +0 -1
- package/dist/dso-toolkit/p-b0a3dfcb.entry.js +0 -2
- package/dist/dso-toolkit/p-b0a3dfcb.entry.js.map +0 -1
- package/dist/dso-toolkit/p-c3e750cc.js +0 -2
- package/dist/dso-toolkit/p-c3e750cc.js.map +0 -1
- package/dist/dso-toolkit/p-f0538f4a.js +0 -6
- package/dist/dso-toolkit/p-f0538f4a.js.map +0 -1
- package/dist/dso-toolkit/p-f412ab80.entry.js.map +0 -1
- package/dist/esm/focus-trap.esm-24223ea1.js.map +0 -1
- package/dist/esm/i18n-c9ec6445.js.map +0 -1
- /package/dist/dso-toolkit/{p-9424e171.entry.js.map → p-1d7b22a2.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-636a2ad2.entry.js.map → p-21f133e4.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-954b3715.entry.js.map → p-2d2eae19.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-a2a9f5da.entry.js.map → p-6789163b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-1616c445.entry.js.map → p-7b3f08da.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-49e93ef5.entry.js.map → p-7dfc15c1.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9a0927eb.entry.js.map → p-9d8395bc.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-afc4bca7.entry.js.map → p-9df0ed5f.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-7cfa6ab1.entry.js.map → p-c2f086f2.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-10603e10.entry.js.map → p-cb0a7103.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-1022c4bd.entry.js.map → p-d3857319.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dso-modal.js","mappings":";;;;;;;AAEO,MAAM,YAAY,GAAa;IACpC,EAAE,EAAE;QACF,WAAW,EAAE;YACX,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,QAAQ;SACjB;KACF;IACD,EAAE,EAAE;QACF,WAAW,EAAE;YACX,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,SAAS;SAClB;KACF;CACF;;ACfD,MAAM,QAAQ,GAAG,ylNAAylN,CAAC;AAC3mN,uBAAe,QAAQ;;MCaV,KAAK;;;;;;
|
|
1
|
+
{"file":"dso-modal.js","mappings":";;;;;;;AAEO,MAAM,YAAY,GAAa;IACpC,EAAE,EAAE;QACF,WAAW,EAAE;YACX,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,QAAQ;SACjB;KACF;IACD,EAAE,EAAE;QACF,WAAW,EAAE;YACX,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,SAAS;SAClB;KACF;CACF;;ACfD,MAAM,QAAQ,GAAG,ylNAAylN,CAAC;AAC3mN,uBAAe,QAAQ;;MCaV,KAAK;;;;;;QAyDR,SAAI,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;sBAlD1C,EAAE,EAAE;;;0BAkBe,QAAQ;2BAUW,SAAS;+BAQtC,IAAI;;IAUtB,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;KAC5D;IAID,gBAAgB;;QACd,IAAI,MAAA,IAAI,CAAC,iBAAiB,0CAAE,WAAW,EAAE;YACvC,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;YACzC,IAAI,aAAa,YAAY,WAAW,EAAE;gBACxC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC;aACzC;YAED,IAAI,CAAC,iBAAiB,CAAC,SAAS,EAAE,CAAC;SACpC;KACF;IAED,oBAAoB;;QAClB,MAAA,IAAI,CAAC,iBAAiB,0CAAE,KAAK,EAAE,CAAC;QAEhC,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE;YAC9B,OAAO;SACR;QAED,OAAC,MAAA,IAAI,CAAC,WAAW,mCAAI,IAAI,CAAC,kBAAkB,CAAC,0CAAE,KAAK,EAAE,CAAC;KACxD;IAED,MAAM;;QACJ,QACE,+DACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAE,MAAA,IAAI,CAAC,UAAU,mCAAI,SAAS,gBACvB,MAAM,qBACA,IAAI,CAAC,MAAM,EAC5B,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,EACpD,QAAQ,EAAE,CAAC,CAAC;gBACV,CAAC,CAAC,cAAc,EAAE,CAAC;gBAEnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;aAC1C,IAED,4DAAK,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,UAAU,IACpC,IAAI,CAAC,UAAU,IACd,WAAK,KAAK,EAAC,YAAY,IACrB,UAAI,EAAE,EAAE,IAAI,CAAC,MAAM,IAAG,IAAI,CAAC,UAAU,CAAM,EAC1C,IAAI,CAAC,eAAe,KACnB,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,EAAC,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,IAC9F,gBAAU,IAAI,EAAC,OAAO,GAAY,EAClC,YAAM,KAAK,EAAC,SAAS,IAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAQ,CAC1C,CACV,CACG,KAEN,YAAM,KAAK,EAAC,SAAS,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,IAClC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CACf,CACR,EAED,yEACE,4DAAK,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,CAAC,IAC/B,6DAAM,IAAI,EAAC,MAAM,GAAG,CAChB,CACS,EAEhB,IAAI,CAAC,SAAS,KACb,4DAAK,KAAK,EAAC,YAAY,IACrB,6DAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,CACC,EACT;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/modal/modal.i18n.ts","src/components/modal/modal.scss?tag=dso-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-modal\": {\r\n close: \"Close\",\r\n dialog: \"Dialog\",\r\n },\r\n },\r\n nl: {\r\n \"dso-modal\": {\r\n close: \"Sluiten\",\r\n dialog: \"Dialoog\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n// fullscreen option\r\n:host([fullscreen]) dialog {\r\n @include modal.fullscreen();\r\n}\r\n\r\n// Go to fullscreen on =< 480px viewport\r\n@media screen and (max-width: media-query-breakpoints.$screen-xs-min) {\r\n :host dialog {\r\n @include modal.fullscreen();\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.dso-modal {\r\n @include modal.root();\r\n}\r\n\r\n.dso-close {\r\n dso-icon {\r\n color: modal.$close-icon-color;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, h, Prop, State } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\nimport { translations } from \"./modal.i18n\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n dialogRole: string | null = \"dialog\";\r\n\r\n /**\r\n * The element to return focus to after the modal is closed.\r\n *\r\n * * `undefined` will return focus to the previously focused element (default).\r\n * * `false` will not return focus to any element.\r\n * * or, provide your own `HTMLElement` that will receive focus upon closing.\r\n */\r\n @Prop()\r\n returnFocus: false | HTMLElement | undefined = undefined;\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n private returnFocusElement: HTMLElement | undefined;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n get hasFooter() {\r\n return this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n const activeElement = getActiveElement();\r\n if (activeElement instanceof HTMLElement) {\r\n this.returnFocusElement = activeElement;\r\n }\r\n\r\n this.htmlDialogElement.showModal();\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.htmlDialogElement?.close();\r\n\r\n if (this.returnFocus === false) {\r\n return;\r\n }\r\n\r\n (this.returnFocus ?? this.returnFocusElement)?.focus();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.dialogRole ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">{this.text(\"close\")}</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n {this.text(\"dialog\")}\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoSkiplink extends Components.DsoSkiplink, HTMLElement {}
|
|
4
|
+
export const DsoSkiplink: {
|
|
5
|
+
prototype: DsoSkiplink;
|
|
6
|
+
new (): DsoSkiplink;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { i as isModifiedEvent } from './is-modified-event.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
|
+
|
|
5
|
+
const skiplinkCss = ":host{position:fixed;inset-block-start:0;inset-inline-start:0;z-index:2;display:block;inline-size:100vw}*,*::after,*::before{box-sizing:border-box}a{position:absolute;inset-inline-start:50%;inset-block-start:16px;display:inline-block;inline-size:1px;block-size:1px;overflow:hidden;background-color:#fff;border-radius:2px;clip:rect(1px, 1px, 1px, 1px);color:var(--link-color);white-space:nowrap;text-decoration:none;transform:translate(-50%);box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2)}a:focus-visible{inline-size:auto;block-size:auto;padding:8px;clip:auto;white-space:normal;outline-offset:2px}";
|
|
6
|
+
const DsoSkiplinkStyle0 = skiplinkCss;
|
|
7
|
+
|
|
8
|
+
const Skiplink = /*@__PURE__*/ proxyCustomElement(class Skiplink extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.dsoSkiplinkClick = createEvent(this, "dsoSkiplinkClick", 7);
|
|
14
|
+
this.to = undefined;
|
|
15
|
+
this.label = undefined;
|
|
16
|
+
}
|
|
17
|
+
clickEventHandler(e) {
|
|
18
|
+
if (!(e.target instanceof HTMLElement) || !this.to) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
return this.dsoSkiplinkClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return (h("a", { key: 'f2773851b2d0f9838a9323935ab8a108258b8fdb', href: `#${this.to}`, onClick: (e) => this.clickEventHandler(e) }, this.label, h("dso-icon", { key: 'c920fa16fd4c6dac2eee63531c83385a4cee5170', icon: "chevron-right" })));
|
|
25
|
+
}
|
|
26
|
+
static get style() { return DsoSkiplinkStyle0; }
|
|
27
|
+
}, [1, "dso-skiplink", {
|
|
28
|
+
"to": [513],
|
|
29
|
+
"label": [513]
|
|
30
|
+
}]);
|
|
31
|
+
function defineCustomElement$1() {
|
|
32
|
+
if (typeof customElements === "undefined") {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const components = ["dso-skiplink", "dso-icon"];
|
|
36
|
+
components.forEach(tagName => { switch (tagName) {
|
|
37
|
+
case "dso-skiplink":
|
|
38
|
+
if (!customElements.get(tagName)) {
|
|
39
|
+
customElements.define(tagName, Skiplink);
|
|
40
|
+
}
|
|
41
|
+
break;
|
|
42
|
+
case "dso-icon":
|
|
43
|
+
if (!customElements.get(tagName)) {
|
|
44
|
+
defineCustomElement$2();
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
47
|
+
} });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const DsoSkiplink = Skiplink;
|
|
51
|
+
const defineCustomElement = defineCustomElement$1;
|
|
52
|
+
|
|
53
|
+
export { DsoSkiplink, defineCustomElement };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=dso-skiplink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"dso-skiplink.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,klBAAklB,CAAC;AACvmB,0BAAe,WAAW;;MCUb,QAAQ;;;;;;;;;IAmBX,iBAAiB,CAAC,CAAa;QACrC,IAAI,EAAE,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YAClD,OAAO;SACR;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAC9F;IAED,MAAM;QACJ,QACE,0DAAG,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAC9D,IAAI,CAAC,KAAK,EACX,iEAAU,IAAI,EAAC,eAAe,GAAY,CACxC,EACJ;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/skiplink/skiplink.scss?tag=dso-skiplink&encapsulation=shadow","src/components/skiplink/skiplink.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n\r\n:host {\r\n position: fixed;\r\n inset-block-start: 0;\r\n inset-inline-start: 0;\r\n z-index: 2;\r\n\r\n display: block;\r\n\r\n inline-size: 100vw;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\na {\r\n position: absolute;\r\n inset-inline-start: 50%;\r\n inset-block-start: units.$u2;\r\n\r\n display: inline-block;\r\n\r\n inline-size: 1px;\r\n block-size: 1px;\r\n\r\n overflow: hidden;\r\n\r\n background-color: colors.$wit;\r\n\r\n border-radius: units.$focus-border-radius;\r\n\r\n clip: rect(1px, 1px, 1px, 1px);\r\n\r\n color: var(--link-color);\r\n // stylelint-disable-next-line declaration-property-value-disallowed-list -- prevent wrapping\r\n white-space: nowrap;\r\n text-decoration: none;\r\n\r\n transform: translate(-50%);\r\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);\r\n\r\n &:focus-visible {\r\n inline-size: auto;\r\n block-size: auto;\r\n\r\n padding: units.$u1;\r\n\r\n clip: auto;\r\n\r\n white-space: normal;\r\n\r\n outline-offset: 2px;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, h, Prop } from \"@stencil/core\";\r\n\r\nimport { isModifiedEvent } from \"../../utils/is-modified-event\";\r\n\r\nimport { SkiplinkClickEvent } from \"./skiplink.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-skiplink\",\r\n styleUrl: \"skiplink.scss\",\r\n shadow: true,\r\n})\r\nexport class Skiplink implements ComponentInterface {\r\n /**\r\n * The location to which the skiplink links.\r\n */\r\n @Prop({ reflect: true })\r\n to!: string | undefined;\r\n\r\n /**\r\n * link text\r\n */\r\n @Prop({ reflect: true })\r\n label!: string | undefined;\r\n\r\n /**\r\n * Emitted when the Skiplink is clicked.\r\n */\r\n @Event()\r\n dsoSkiplinkClick!: EventEmitter<SkiplinkClickEvent>;\r\n\r\n private clickEventHandler(e: MouseEvent) {\r\n if (!(e.target instanceof HTMLElement) || !this.to) {\r\n return;\r\n }\r\n\r\n return this.dsoSkiplinkClick.emit({ originalEvent: e, isModifiedEvent: isModifiedEvent(e) });\r\n }\r\n\r\n render() {\r\n return (\r\n <a href={`#${this.to}`} onClick={(e) => this.clickEventHandler(e)}>\r\n {this.label}\r\n <dso-icon icon=\"chevron-right\"></dso-icon>\r\n </a>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
@@ -67,7 +67,7 @@ const Tabs = /*@__PURE__*/ proxyCustomElement(class Tabs extends HTMLElement {
|
|
|
67
67
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: 'd115f11054298f6f4ba09e97f0e8c1b726aac09c' }, h("div", { key: '74e724fc01facb00f7ca14f3420b68172c313927', class: "tabs", role: "tablist", onKeyUp: this.keyUpHandler }, h("slot", { key: '7d65307f3dd7372b30eccf57ae2c552451d0920f' })), h("div", { key: '251184652aace25225b69336bf9c0bae0ab98e68', role: "tabpanel", tabindex: "0" }, h("slot", { key: '79e95365db5486bd5e54161919f653df5ac525cc', name: "panel" }))));
|
|
71
71
|
}
|
|
72
72
|
get host() { return this; }
|
|
73
73
|
static get style() { return DsoTabsStyle0; }
|
|
@@ -199,7 +199,7 @@ const TreeView = /*@__PURE__*/ proxyCustomElement(class TreeView extends HTMLEle
|
|
|
199
199
|
}
|
|
200
200
|
render() {
|
|
201
201
|
var _a;
|
|
202
|
-
return (h("div", { key: '
|
|
202
|
+
return (h("div", { key: '733757192ac89c90806872d71a6b9d1079a33514', id: "tree", class: "dso-tree", onKeyDown: (e) => this.keyDownListener(e), ref: (element) => (this.tree = element) }, h("ul", { key: '29f84b165163e1ada0f411e8127ac3e213a775b0', role: "tree", "aria-label": "Objectenboom" }, (_a = this.collection) === null || _a === void 0 ? void 0 : _a.map((item, index) => (h(DsoTreeItem, { owner: this, ancestors: [], item: item, index: index, level: 1, setSize: this.collection.length }))))));
|
|
203
203
|
}
|
|
204
204
|
static get style() { return DsoTreeViewStyle0; }
|
|
205
205
|
}, [1, "dso-tree-view", {
|
|
@@ -251,7 +251,7 @@ const ViewerGrid = /*@__PURE__*/ proxyCustomElement(class ViewerGrid extends HTM
|
|
|
251
251
|
}
|
|
252
252
|
render() {
|
|
253
253
|
const tabLabels = this.mode === "vdk" ? viewerGridVdkTabs : viewerGridVrkTabs;
|
|
254
|
-
return (h(Fragment, null, this.tabView && (h("nav", { key: '
|
|
254
|
+
return (h(Fragment, null, this.tabView && (h("nav", { key: '5bb28bca2da923349ff553a3e32ad6afc6292189', class: "dso-navbar" }, h("ul", { key: '0ec74cb43fb25056ca47b063c94e19deaf12e5a2', class: "dso-nav dso-nav-sub" }, tabLabels.map((tab) => (h("li", { key: tab, class: clsx({ "dso-active": this.activeTab === tab }) }, h("button", { type: "button", class: "dso-tertiary", onClick: () => this.switchActiveTab(tab) }, viewerGridTabLabelMap[tab]))))))), (!this.tabView || (this.tabView && (this.activeTab === "main" || this.activeTab === "search"))) && (h(MainPanel, { key: '92b77fad12d794fe466f0eefb1c077545887970b', mode: this.mode, tabView: this.tabView, mainSize: this.mainSize, documentPanelOpen: this.documentPanelOpen, mainPanelExpanded: this.mainPanelExpanded, mainPanelHidden: this.mainPanelHidden, shrinkMain: this.emitShrinkMain, expandMain: this.emitExpandMain, toggleMainPanel: this.toggleMainPanel, dsoMainSizeChangeAnimationEnd: this.dsoMainSizeChangeAnimationEnd })), h(Filterpanel, { key: 'ecb109bf285a6838c5ec84ef069bd53ba581c5a7', ref: (element) => (this.filterpanel = element), onApply: this.handleFilterpanelApply, onCancel: this.handleFilterpanelCancel }), (!this.tabView || (this.tabView && this.activeTab === "map")) && (h("div", { key: 'b4a056be215b05ffb730f82aee8eebb7adf1c7b1', class: "map", ref: (element) => (this.mapElement = element) }, h("slot", { key: '26a55ded1adf6f6d12814c4f327538e6cc14dbe8', name: "map" }))), ((!this.tabView && this.documentPanelOpen) || (this.tabView && this.activeTab === "document")) && (h(DocumentPanel, { key: 'b2ebd498fa85c639196525cda9f4386613bae869', tabView: this.tabView, panelSize: this.documentPanelSize, shrinkDocumentPanel: this.shrinkDocumentPanel, expandDocumentPanel: this.expandDocumentPanel, dsoDocumentPanelSizeChangeAnimationEnd: this.dsoDocumentPanelSizeChangeAnimationEnd })), h(Overlay, { key: '718aa0f258d94bad2336b14f13cd0ba26d465205', ref: (element) => (this.overlay = element), dsoCloseOverlay: (e) => this.dsoCloseOverlay.emit({ originalEvent: e }) })));
|
|
255
255
|
}
|
|
256
256
|
get host() { return this; }
|
|
257
257
|
static get watchers() { return {
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { i as isFocusable, t as tabbable, f as focusable, a as isTabbable, g as getTabIndex } from './index.esm.js';
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
|
-
* focus-trap 7.6.
|
|
4
|
+
* focus-trap 7.6.1
|
|
5
5
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
function _arrayLikeToArray(r, a) {
|
|
9
|
+
(null == a || a > r.length) && (a = r.length);
|
|
10
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
11
|
+
return n;
|
|
12
|
+
}
|
|
13
|
+
function _arrayWithoutHoles(r) {
|
|
14
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
15
|
+
}
|
|
8
16
|
function _defineProperty(e, r, t) {
|
|
9
17
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
10
18
|
value: t,
|
|
@@ -13,6 +21,12 @@ function _defineProperty(e, r, t) {
|
|
|
13
21
|
writable: !0
|
|
14
22
|
}) : e[r] = t, e;
|
|
15
23
|
}
|
|
24
|
+
function _iterableToArray(r) {
|
|
25
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
26
|
+
}
|
|
27
|
+
function _nonIterableSpread() {
|
|
28
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
29
|
+
}
|
|
16
30
|
function ownKeys(e, r) {
|
|
17
31
|
var t = Object.keys(e);
|
|
18
32
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -34,6 +48,9 @@ function _objectSpread2(e) {
|
|
|
34
48
|
}
|
|
35
49
|
return e;
|
|
36
50
|
}
|
|
51
|
+
function _toConsumableArray(r) {
|
|
52
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
53
|
+
}
|
|
37
54
|
function _toPrimitive(t, r) {
|
|
38
55
|
if ("object" != typeof t || !t) return t;
|
|
39
56
|
var e = t[Symbol.toPrimitive];
|
|
@@ -48,6 +65,13 @@ function _toPropertyKey(t) {
|
|
|
48
65
|
var i = _toPrimitive(t, "string");
|
|
49
66
|
return "symbol" == typeof i ? i : i + "";
|
|
50
67
|
}
|
|
68
|
+
function _unsupportedIterableToArray(r, a) {
|
|
69
|
+
if (r) {
|
|
70
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
71
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
72
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
51
75
|
|
|
52
76
|
var activeFocusTraps = {
|
|
53
77
|
activateTrap: function activateTrap(trapStack, trap) {
|
|
@@ -222,7 +246,7 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
222
246
|
return state.containerGroups.findIndex(function (_ref) {
|
|
223
247
|
var container = _ref.container,
|
|
224
248
|
tabbableNodes = _ref.tabbableNodes;
|
|
225
|
-
return container.contains(element) || (
|
|
249
|
+
return container.contains(element) || (// fall back to explicit tabbable search which will take into consideration any
|
|
226
250
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
227
251
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
228
252
|
// look inside web components even if open)
|
|
@@ -238,20 +262,27 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
238
262
|
* (if a node is explicitly NOT given), or a function that returns any of these
|
|
239
263
|
* values.
|
|
240
264
|
* @param {string} optionName
|
|
241
|
-
* @
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
265
|
+
* @param {Object} options
|
|
266
|
+
* @param {boolean} [options.hasFallback] True if the option could be a selector string
|
|
267
|
+
* and the option allows for a fallback scenario in the case where the selector is
|
|
268
|
+
* valid but does not match a node (i.e. the queried node doesn't exist in the DOM).
|
|
269
|
+
* @param {Array} [options.params] Params to pass to the option if it's a function.
|
|
270
|
+
* @returns {undefined | null | false | HTMLElement | SVGElement} Returns
|
|
271
|
+
* `undefined` if the option is not specified; `null` if the option didn't resolve
|
|
272
|
+
* to a node but `options.hasFallback=true`, `false` if the option resolved to `false`
|
|
273
|
+
* (node explicitly not given); otherwise, the resolved DOM node.
|
|
245
274
|
* @throws {Error} If the option is set, not `false`, and is not, or does not
|
|
246
|
-
* resolve to a node.
|
|
275
|
+
* resolve to a node, unless the option is a selector string and `options.hasFallback=true`.
|
|
247
276
|
*/
|
|
248
277
|
var getNodeForOption = function getNodeForOption(optionName) {
|
|
278
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
279
|
+
_ref2$hasFallback = _ref2.hasFallback,
|
|
280
|
+
hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback,
|
|
281
|
+
_ref2$params = _ref2.params,
|
|
282
|
+
params = _ref2$params === void 0 ? [] : _ref2$params;
|
|
249
283
|
var optionValue = config[optionName];
|
|
250
284
|
if (typeof optionValue === 'function') {
|
|
251
|
-
|
|
252
|
-
params[_key2 - 1] = arguments[_key2];
|
|
253
|
-
}
|
|
254
|
-
optionValue = optionValue.apply(void 0, params);
|
|
285
|
+
optionValue = optionValue.apply(void 0, _toConsumableArray(params));
|
|
255
286
|
}
|
|
256
287
|
if (optionValue === true) {
|
|
257
288
|
optionValue = undefined; // use default value
|
|
@@ -267,21 +298,31 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
267
298
|
var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
|
|
268
299
|
|
|
269
300
|
if (typeof optionValue === 'string') {
|
|
270
|
-
|
|
301
|
+
try {
|
|
302
|
+
node = doc.querySelector(optionValue); // resolve to node, or null if fails
|
|
303
|
+
} catch (err) {
|
|
304
|
+
throw new Error("`".concat(optionName, "` appears to be an invalid selector; error=\"").concat(err.message, "\""));
|
|
305
|
+
}
|
|
271
306
|
if (!node) {
|
|
272
|
-
|
|
307
|
+
if (!hasFallback) {
|
|
308
|
+
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
|
|
309
|
+
}
|
|
310
|
+
// else, `node` MUST be `null` because that's what `Document.querySelector()` returns
|
|
311
|
+
// if the selector is valid but doesn't match anything
|
|
273
312
|
}
|
|
274
313
|
}
|
|
275
314
|
return node;
|
|
276
315
|
};
|
|
277
316
|
var getInitialFocusNode = function getInitialFocusNode() {
|
|
278
|
-
var node = getNodeForOption('initialFocus'
|
|
317
|
+
var node = getNodeForOption('initialFocus', {
|
|
318
|
+
hasFallback: true
|
|
319
|
+
});
|
|
279
320
|
|
|
280
321
|
// false explicitly indicates we want no initialFocus at all
|
|
281
322
|
if (node === false) {
|
|
282
323
|
return false;
|
|
283
324
|
}
|
|
284
|
-
if (node === undefined || !isFocusable(node, config.tabbableOptions)) {
|
|
325
|
+
if (node === undefined || node && !isFocusable(node, config.tabbableOptions)) {
|
|
285
326
|
// option not specified nor focusable: use fallback options
|
|
286
327
|
if (findContainerIndex(doc.activeElement) >= 0) {
|
|
287
328
|
node = doc.activeElement;
|
|
@@ -292,6 +333,10 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
292
333
|
// NOTE: `fallbackFocus` option function cannot return `false` (not supported)
|
|
293
334
|
node = firstTabbableNode || getNodeForOption('fallbackFocus');
|
|
294
335
|
}
|
|
336
|
+
} else if (node === null) {
|
|
337
|
+
// option is a VALID selector string that doesn't yield a node: use the `fallbackFocus`
|
|
338
|
+
// option instead of the default behavior when the option isn't specified at all
|
|
339
|
+
node = getNodeForOption('fallbackFocus');
|
|
295
340
|
}
|
|
296
341
|
if (!node) {
|
|
297
342
|
throw new Error('Your focus-trap needs to have at least one focusable element');
|
|
@@ -432,7 +477,9 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
432
477
|
}
|
|
433
478
|
};
|
|
434
479
|
var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
|
|
435
|
-
var node = getNodeForOption('setReturnFocus',
|
|
480
|
+
var node = getNodeForOption('setReturnFocus', {
|
|
481
|
+
params: [previousActiveElement]
|
|
482
|
+
});
|
|
436
483
|
return node ? node : node === false ? false : previousActiveElement;
|
|
437
484
|
};
|
|
438
485
|
|
|
@@ -447,11 +494,11 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
447
494
|
* @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be
|
|
448
495
|
* determined given the current state of the trap.
|
|
449
496
|
*/
|
|
450
|
-
var findNextNavNode = function findNextNavNode(
|
|
451
|
-
var target =
|
|
452
|
-
event =
|
|
453
|
-
|
|
454
|
-
isBackward =
|
|
497
|
+
var findNextNavNode = function findNextNavNode(_ref3) {
|
|
498
|
+
var target = _ref3.target,
|
|
499
|
+
event = _ref3.event,
|
|
500
|
+
_ref3$isBackward = _ref3.isBackward,
|
|
501
|
+
isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;
|
|
455
502
|
target = target || getActualTarget(event);
|
|
456
503
|
updateTabbableNodes();
|
|
457
504
|
var destinationNode = null;
|
|
@@ -475,8 +522,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
475
522
|
// REVERSE
|
|
476
523
|
|
|
477
524
|
// is the target the first tabbable node in a group?
|
|
478
|
-
var startOfGroupIndex = findIndex(state.tabbableGroups, function (
|
|
479
|
-
var firstTabbableNode =
|
|
525
|
+
var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref4) {
|
|
526
|
+
var firstTabbableNode = _ref4.firstTabbableNode;
|
|
480
527
|
return target === firstTabbableNode;
|
|
481
528
|
});
|
|
482
529
|
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
|
|
@@ -504,8 +551,8 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
504
551
|
// FORWARD
|
|
505
552
|
|
|
506
553
|
// is the target the last tabbable node in a group?
|
|
507
|
-
var lastOfGroupIndex = findIndex(state.tabbableGroups, function (
|
|
508
|
-
var lastTabbableNode =
|
|
554
|
+
var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref5) {
|
|
555
|
+
var lastTabbableNode = _ref5.lastTabbableNode;
|
|
509
556
|
return target === lastTabbableNode;
|
|
510
557
|
});
|
|
511
558
|
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
|