@dso-toolkit/core 58.3.1 → 59.0.1

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.
Files changed (145) hide show
  1. package/dist/cjs/_commonjsHelpers-68cdf74f.js +7 -0
  2. package/dist/cjs/_commonjsHelpers-68cdf74f.js.map +1 -0
  3. package/dist/cjs/dso-alert_5.cjs.entry.js +497 -46
  4. package/dist/cjs/dso-alert_5.cjs.entry.js.map +1 -1
  5. package/dist/cjs/dso-annotation-output_3.cjs.entry.js +6 -2
  6. package/dist/cjs/dso-annotation-output_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +4 -2
  8. package/dist/cjs/dso-dropdown-menu.cjs.entry.js.map +1 -1
  9. package/dist/cjs/dso-header.cjs.entry.js +1 -1
  10. package/dist/cjs/dso-header.cjs.entry.js.map +1 -1
  11. package/dist/cjs/dso-modal.cjs.entry.js +1 -1
  12. package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
  13. package/dist/cjs/dso-table.cjs.entry.js +1 -1
  14. package/dist/cjs/dso-table.cjs.entry.js.map +1 -1
  15. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  16. package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
  17. package/dist/cjs/dso-tooltip.cjs.entry.js.map +1 -1
  18. package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1688 -41
  19. package/dist/cjs/dsot-document-component-demo.cjs.entry.js.map +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -1
  22. package/dist/collection/components/document-component/document-component.css +687 -13
  23. package/dist/collection/components/document-component/document-component.js +31 -7
  24. package/dist/collection/components/document-component/document-component.js.map +1 -1
  25. package/dist/collection/components/document-component/document-component.models.js +2 -0
  26. package/dist/collection/components/document-component/document-component.models.js.map +1 -0
  27. package/dist/collection/components/document-component-demo/document-component.demo.css +11 -0
  28. package/dist/collection/components/document-component-demo/document-component.demo.js +235 -0
  29. package/dist/collection/components/document-component-demo/document-component.demo.js.map +1 -0
  30. package/dist/collection/components/dropdown-menu/dropdown-menu.js +29 -2
  31. package/dist/collection/components/dropdown-menu/dropdown-menu.js.map +1 -1
  32. package/dist/collection/components/header/header.js +1 -1
  33. package/dist/collection/components/header/header.js.map +1 -1
  34. package/dist/collection/components/modal/modal.css +3 -3
  35. package/dist/collection/components/ozon-content/nodes/al.node.js +24 -7
  36. package/dist/collection/components/ozon-content/nodes/al.node.js.map +1 -1
  37. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +3 -1
  38. package/dist/collection/components/ozon-content/nodes/ext-ref.node.js.map +1 -1
  39. package/dist/collection/components/ozon-content/nodes/nieuwe-tekst.node.js +1 -1
  40. package/dist/collection/components/ozon-content/nodes/nieuwe-tekst.node.js.map +1 -1
  41. package/dist/collection/components/ozon-content/nodes/opschrift.node.js +9 -1
  42. package/dist/collection/components/ozon-content/nodes/opschrift.node.js.map +1 -1
  43. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +1 -2
  44. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js.map +1 -1
  45. package/dist/collection/components/ozon-content/nodes/verwijderde-tekst.node.js +1 -1
  46. package/dist/collection/components/ozon-content/nodes/verwijderde-tekst.node.js.map +1 -1
  47. package/dist/collection/components/ozon-content/ozon-content-context.interface.js.map +1 -1
  48. package/dist/collection/components/ozon-content/ozon-content-mapper.js +11 -9
  49. package/dist/collection/components/ozon-content/ozon-content-mapper.js.map +1 -1
  50. package/dist/collection/components/ozon-content/ozon-content-node-context.interface.js.map +1 -1
  51. package/dist/collection/components/ozon-content/ozon-content.css +1100 -35
  52. package/dist/collection/components/ozon-content/ozon-content.interfaces.js.map +1 -1
  53. package/dist/collection/components/ozon-content/ozon-content.js +17 -83
  54. package/dist/collection/components/ozon-content/ozon-content.js.map +1 -1
  55. package/dist/collection/components/table/table.css +669 -97
  56. package/dist/collection/components/tooltip/tooltip.css +0 -8
  57. package/dist/components/document-component.js +6 -2
  58. package/dist/components/document-component.js.map +1 -1
  59. package/dist/components/dropdown-menu.js +5 -2
  60. package/dist/components/dropdown-menu.js.map +1 -1
  61. package/dist/components/dso-header.js +1 -1
  62. package/dist/components/dso-header.js.map +1 -1
  63. package/dist/components/dso-modal.js +1 -1
  64. package/dist/components/dso-modal.js.map +1 -1
  65. package/dist/components/dso-table.js +1 -1
  66. package/dist/components/dso-table.js.map +1 -1
  67. package/dist/components/dsot-document-component-demo.js +1694 -45
  68. package/dist/components/dsot-document-component-demo.js.map +1 -1
  69. package/dist/components/index.d.ts +1 -1
  70. package/dist/components/ozon-content.js +500 -50
  71. package/dist/components/ozon-content.js.map +1 -1
  72. package/dist/components/tooltip.js +1 -1
  73. package/dist/components/tooltip.js.map +1 -1
  74. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  75. package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
  76. package/dist/dso-toolkit/p-2401e7f9.entry.js +2 -0
  77. package/dist/dso-toolkit/p-2401e7f9.entry.js.map +1 -0
  78. package/dist/dso-toolkit/p-2ab99812.entry.js +2 -0
  79. package/dist/dso-toolkit/{p-a63c82a4.entry.js.map → p-2ab99812.entry.js.map} +1 -1
  80. package/dist/dso-toolkit/p-432df09a.entry.js +2 -0
  81. package/dist/dso-toolkit/p-432df09a.entry.js.map +1 -0
  82. package/dist/dso-toolkit/p-4573c419.js +2 -0
  83. package/dist/dso-toolkit/p-4573c419.js.map +1 -0
  84. package/dist/dso-toolkit/p-47e77e24.entry.js +2 -0
  85. package/dist/dso-toolkit/p-47e77e24.entry.js.map +1 -0
  86. package/dist/dso-toolkit/p-4e2407bf.entry.js +2 -0
  87. package/dist/dso-toolkit/p-4e2407bf.entry.js.map +1 -0
  88. package/dist/dso-toolkit/{p-dc6e37dd.entry.js → p-51cfeed4.entry.js} +2 -2
  89. package/dist/dso-toolkit/p-51cfeed4.entry.js.map +1 -0
  90. package/dist/dso-toolkit/p-ab1f0511.entry.js +2 -0
  91. package/dist/dso-toolkit/p-ab1f0511.entry.js.map +1 -0
  92. package/dist/dso-toolkit/p-ad44136d.entry.js +2 -0
  93. package/dist/dso-toolkit/p-ad44136d.entry.js.map +1 -0
  94. package/dist/esm/_commonjsHelpers-1c8beb5f.js +5 -0
  95. package/dist/esm/_commonjsHelpers-1c8beb5f.js.map +1 -0
  96. package/dist/esm/dso-alert_5.entry.js +498 -47
  97. package/dist/esm/dso-alert_5.entry.js.map +1 -1
  98. package/dist/esm/dso-annotation-output_3.entry.js +6 -2
  99. package/dist/esm/dso-annotation-output_3.entry.js.map +1 -1
  100. package/dist/esm/dso-dropdown-menu.entry.js +4 -2
  101. package/dist/esm/dso-dropdown-menu.entry.js.map +1 -1
  102. package/dist/esm/dso-header.entry.js +1 -1
  103. package/dist/esm/dso-header.entry.js.map +1 -1
  104. package/dist/esm/dso-modal.entry.js +1 -1
  105. package/dist/esm/dso-modal.entry.js.map +1 -1
  106. package/dist/esm/dso-table.entry.js +1 -1
  107. package/dist/esm/dso-table.entry.js.map +1 -1
  108. package/dist/esm/dso-toolkit.js +1 -1
  109. package/dist/esm/dso-tooltip.entry.js +1 -1
  110. package/dist/esm/dso-tooltip.entry.js.map +1 -1
  111. package/dist/esm/dsot-document-component-demo.entry.js +1689 -42
  112. package/dist/esm/dsot-document-component-demo.entry.js.map +1 -1
  113. package/dist/esm/loader.js +1 -1
  114. package/dist/types/components/document-component/document-component.d.ts +6 -1
  115. package/dist/types/components/document-component/document-component.models.d.ts +14 -0
  116. package/dist/types/components/document-component-demo/document-component.demo.d.ts +64 -0
  117. package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +7 -0
  118. package/dist/types/components/ozon-content/nodes/al.node.d.ts +1 -1
  119. package/dist/types/components/ozon-content/ozon-content-context.interface.d.ts +3 -2
  120. package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +0 -1
  121. package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +3 -2
  122. package/dist/types/components/ozon-content/ozon-content.d.ts +4 -25
  123. package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +1 -4
  124. package/dist/types/components.d.ts +51 -25
  125. package/package.json +8 -2
  126. package/dist/collection/components/document-component/document-component.demo.js +0 -112
  127. package/dist/collection/components/document-component/document-component.demo.js.map +0 -1
  128. package/dist/collection/components/document-component/document-component.types.js +0 -2
  129. package/dist/collection/components/document-component/document-component.types.js.map +0 -1
  130. package/dist/dso-toolkit/p-41066f6f.entry.js +0 -2
  131. package/dist/dso-toolkit/p-41066f6f.entry.js.map +0 -1
  132. package/dist/dso-toolkit/p-42ba2c81.entry.js +0 -2
  133. package/dist/dso-toolkit/p-42ba2c81.entry.js.map +0 -1
  134. package/dist/dso-toolkit/p-48d76094.entry.js +0 -2
  135. package/dist/dso-toolkit/p-48d76094.entry.js.map +0 -1
  136. package/dist/dso-toolkit/p-5c5e43d3.entry.js +0 -2
  137. package/dist/dso-toolkit/p-5c5e43d3.entry.js.map +0 -1
  138. package/dist/dso-toolkit/p-8af61320.entry.js +0 -2
  139. package/dist/dso-toolkit/p-8af61320.entry.js.map +0 -1
  140. package/dist/dso-toolkit/p-9a3f154b.entry.js +0 -2
  141. package/dist/dso-toolkit/p-9a3f154b.entry.js.map +0 -1
  142. package/dist/dso-toolkit/p-a63c82a4.entry.js +0 -2
  143. package/dist/dso-toolkit/p-dc6e37dd.entry.js.map +0 -1
  144. package/dist/types/components/document-component/document-component.demo.d.ts +0 -40
  145. package/dist/types/components/document-component/document-component.types.d.ts +0 -8
@@ -1 +1 @@
1
- {"file":"dso-table.entry.js","mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,4gYAA4gY;;MCUhhY,KAAK;;;IASR,iBAAY,GAAG,EAAE,EAAE,CAAC;mBASlB,KAAK;wBAMA,KAAK;uBAGN,KAAK;;;EAKX,uBAAuB;;IAC7B,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GACzC;EAED,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AC,WAAW,CAAC,KAAK,CAAC,CAAC;KACnG;GACF;;;;;;;","names":["debounce"],"sources":["src/components/table/table.scss?tag=dso-table&encapsulation=shadow","src/components/table/table.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/components/grid/grid.variables\" as grid-variables;\r\n@use \"~dso-toolkit/src/components/modal/modal.variables\" as modal-variables;\r\n\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/zindex\";\r\n@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/components/rich-content\";\r\n@use \"~dso-toolkit/src/components/table\";\r\n\r\n:host {\r\n display: block;\r\n margin-bottom: units.$u3;\r\n}\r\n\r\n.dso-header {\r\n min-height: units.$u4;\r\n\r\n h2 {\r\n color: colors.$bosgroen;\r\n font-size: units.$font-size-h2;\r\n font-weight: 700;\r\n }\r\n\r\n .dso-close {\r\n color: colors.$bosgroen;\r\n }\r\n}\r\n\r\n:host .dso-modal {\r\n @include modal.root();\r\n\r\n inset: 0px;\r\n height: 100%;\r\n position: fixed;\r\n z-index: zindex.$modal;\r\n}\r\n\r\n.dso-modal .dso-dialog.dso-table-dialog {\r\n margin-top: 1rem;\r\n max-width: calc(100% - 2rem);\r\n margin-left: auto;\r\n margin-right: auto;\r\n\r\n .dso-body {\r\n $dso-body-unavailable-height: (2 * modal.$header-padding) + (modal.$footer-button-height + modal.$footer-padding);\r\n max-height: calc(100vh - #{$dso-body-unavailable-height} - 1.5em - 2rem); // margin\r\n }\r\n\r\n @media screen and (max-width: media-query-breakpoints.$screen-xs-max) {\r\n max-width: 100%;\r\n }\r\n}\r\n\r\n:host([is-responsive]) {\r\n .dso-table-body {\r\n border: 1px solid table.$border-color;\r\n margin-bottom: 0;\r\n overflow-y: hidden;\r\n width: 100%;\r\n\r\n &.dso-body {\r\n width: calc(100% - modal.$body-padding * 2);\r\n }\r\n }\r\n}\r\n\r\n.dso-table-utilities {\r\n align-items: center;\r\n display: flex;\r\n justify-content: space-between;\r\n margin-bottom: units.$u1;\r\n\r\n .dso-responsive-message {\r\n margin-bottom: 0;\r\n\r\n &:only-child {\r\n width: 100%;\r\n }\r\n }\r\n\r\n .open-modal-button {\r\n &:only-child {\r\n margin-left: auto;\r\n }\r\n }\r\n}\r\n\r\n.dso-responsive-message {\r\n font-size: 0.8em;\r\n margin-bottom: units.$u1;\r\n position: relative;\r\n text-align: center;\r\n}\r\n\r\n.dso-tertiary {\r\n @include button.tertiary($modifiers: false);\r\n\r\n cursor: pointer;\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-modal-overlay {\r\n background-color: fade-out(modal-variables.$backdrop-bg, modal-variables.$backdrop-opacity);\r\n bottom: 0;\r\n display: block;\r\n left: 0;\r\n position: fixed;\r\n right: 0;\r\n top: 0;\r\n z-index: zindex.$modal-background-overlay;\r\n}\r\n\r\n.dso-table-placeholder {\r\n box-shadow: inset 0 0 0 1px table.$border-color;\r\n display: grid;\r\n place-content: center;\r\n}\r\n","import { h, Component, ComponentInterface, Element, Host, Prop, State } from \"@stencil/core\";\r\nimport debounce from \"debounce\";\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport { v4 } from \"uuid\";\r\n\r\n@Component({\r\n tag: \"dso-table\",\r\n styleUrl: \"table.scss\",\r\n shadow: true,\r\n})\r\nexport class Table implements ComponentInterface {\r\n private resizeObserver?: ResizeObserver;\r\n\r\n private focusTrapElement?: HTMLDivElement;\r\n\r\n private buttonElement?: HTMLButtonElement;\r\n\r\n private trap?: FocusTrap;\r\n\r\n private labelledbyId = v4();\r\n\r\n @Element()\r\n host!: HTMLDsoTableElement;\r\n\r\n /**\r\n * Prevents the table being opened in a modal.\r\n */\r\n @Prop({ reflect: true })\r\n noModal = false;\r\n\r\n /**\r\n * Indicates whether the table is currently horizontally scrollable.\r\n */\r\n @Prop({ reflect: true })\r\n isResponsive = false;\r\n\r\n @State()\r\n modalActive = false;\r\n\r\n @State()\r\n placeholderHeight?: number;\r\n\r\n private startResponsiveBehavior(): void {\r\n this.resizeObserver?.observe(this.host);\r\n }\r\n\r\n componentWillLoad(): void {\r\n this.resizeObserver = new ResizeObserver(debounce((entries) => this.setResponsiveTable(entries), 200));\r\n }\r\n\r\n componentDidLoad(): void {\r\n this.startResponsiveBehavior();\r\n }\r\n\r\n componentDidRender() {\r\n this.setFocusTrap();\r\n }\r\n\r\n disconnectedCallback() {\r\n this.resizeObserver?.disconnect();\r\n }\r\n\r\n render() {\r\n const caption = this.host.querySelector(\":scope > table > caption\")?.textContent?.trim();\r\n\r\n return (\r\n <Host>\r\n {this.modalActive && this.placeholderHeight && (\r\n <div class=\"dso-table-placeholder\" style={{ height: `${this.placeholderHeight}px` }} />\r\n )}\r\n\r\n {this.modalActive && <div class=\"dso-modal-overlay\"></div>}\r\n\r\n <div class={{ \"dso-modal\": this.modalActive }}>\r\n <div\r\n class={{ \"dso-dialog\": this.modalActive, \"dso-table-dialog\": true }}\r\n ref={(element) => (this.focusTrapElement = element)}\r\n {...(this.modalActive ? { [\"aria-labelledby\"]: this.labelledbyId, role: \"dialog\" } : {})}\r\n >\r\n {(this.isResponsive || !this.noModal) && (\r\n <div class=\"dso-table-utilities\" style={this.modalActive ? { display: \"none\" } : undefined}>\r\n {this.isResponsive && (\r\n <div class=\"dso-responsive-message\">\r\n <span>beweeg de tabel van links naar rechts</span>\r\n </div>\r\n )}\r\n\r\n {!this.noModal && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary open-modal-button\"\r\n ref={(element) => (this.buttonElement = element)}\r\n onClick={() => this.openModal()}\r\n >\r\n <span class=\"sr-only\">tabel {caption ?? \"\"} </span>\r\n <span>vergroten</span>\r\n <dso-icon icon=\"external-link\"></dso-icon>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n\r\n {this.modalActive && (\r\n <div class=\"dso-header\">\r\n <h2 id={this.labelledbyId} class={{ \"sr-only\": !caption }}>\r\n {caption || \"Uitvergrote tabel dialoog\"}\r\n </h2>\r\n <button type=\"button\" class=\"dso-close\" onClick={() => this.closeModal()}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Sluiten</span>\r\n </button>\r\n </div>\r\n )}\r\n\r\n <div class={{ \"dso-body\": this.modalActive, \"dso-table-body\": true }}>\r\n <slot></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n\r\n private openModal() {\r\n this.placeholderHeight = this.host.clientHeight;\r\n this.modalActive = true;\r\n }\r\n\r\n private closeModal() {\r\n this.placeholderHeight = undefined;\r\n this.modalActive = false;\r\n }\r\n\r\n private setFocusTrap() {\r\n if (this.modalActive && this.focusTrapElement && !this.trap) {\r\n this.trap = createFocusTrap([this.host, this.focusTrapElement], {\r\n escapeDeactivates: true,\r\n clickOutsideDeactivates: (e) => {\r\n if (e instanceof MouseEvent && e.composedPath()[0] === this.focusTrapElement) {\r\n this.closeModal();\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n setReturnFocus: this.buttonElement ?? false,\r\n onDeactivate: () => this.closeModal(),\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n }).activate();\r\n } else if (!this.modalActive && this.trap) {\r\n this.trap?.deactivate();\r\n\r\n delete this.trap;\r\n }\r\n }\r\n\r\n private setResponsiveTable([dsoTable]: ResizeObserverEntry[]): void {\r\n if (!dsoTable) {\r\n throw new Error(\"No dsoTable found\");\r\n }\r\n\r\n const tableElement = dsoTable.target.querySelector(\"table\");\r\n\r\n if (dsoTable && tableElement instanceof HTMLTableElement) {\r\n this.isResponsive =\r\n Math.floor(tableElement.getBoundingClientRect().width) > Math.floor(dsoTable.contentRect.width);\r\n }\r\n }\r\n}\r\n"],"version":3}
1
+ {"file":"dso-table.entry.js","mappings":";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AG,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAE5D,IAAI,QAAQ,IAAI,YAAY,YAAY,gBAAgB,EAAE;MACxD,IAAI,CAAC,YAAY;QACf,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KACnG;GACF;;;;;;;","names":["debounce"],"sources":["src/components/table/table.scss?tag=dso-table&encapsulation=shadow","src/components/table/table.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/components/grid/grid.variables\" as grid-variables;\r\n@use \"~dso-toolkit/src/components/modal/modal.variables\" as modal-variables;\r\n\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/zindex\";\r\n@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/button/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/components/rich-content\";\r\n@use \"~dso-toolkit/src/components/table\";\r\n\r\n:host {\r\n display: block;\r\n margin-bottom: units.$u3;\r\n}\r\n\r\n.dso-header {\r\n min-height: units.$u4;\r\n\r\n h2 {\r\n color: colors.$bosgroen;\r\n font-size: units.$font-size-h2;\r\n font-weight: 700;\r\n }\r\n\r\n .dso-close {\r\n color: colors.$bosgroen;\r\n }\r\n}\r\n\r\n:host .dso-modal {\r\n @include modal.root();\r\n\r\n inset: 0px;\r\n height: 100%;\r\n position: fixed;\r\n z-index: zindex.$modal;\r\n}\r\n\r\n.dso-modal .dso-dialog.dso-table-dialog {\r\n margin-top: 1rem;\r\n max-width: calc(100% - 2rem);\r\n margin-left: auto;\r\n margin-right: auto;\r\n\r\n .dso-body {\r\n $dso-body-unavailable-height: (2 * modal.$header-padding) + (modal.$footer-button-height + modal.$footer-padding);\r\n max-height: calc(100vh - #{$dso-body-unavailable-height} - 1.5em - 2rem); // margin\r\n }\r\n\r\n @media screen and (max-width: media-query-breakpoints.$screen-xs-max) {\r\n max-width: 100%;\r\n }\r\n}\r\n\r\n:host([is-responsive]) {\r\n .dso-table-body {\r\n border: 1px solid table.$border-color;\r\n margin-bottom: 0;\r\n overflow-y: hidden;\r\n width: 100%;\r\n\r\n &.dso-body {\r\n width: calc(100% - modal.$body-padding * 2);\r\n }\r\n }\r\n}\r\n\r\n.dso-table-utilities {\r\n align-items: center;\r\n display: flex;\r\n justify-content: space-between;\r\n margin-bottom: units.$u1;\r\n\r\n .dso-responsive-message {\r\n margin-bottom: 0;\r\n\r\n &:only-child {\r\n width: 100%;\r\n }\r\n }\r\n\r\n .open-modal-button {\r\n &:only-child {\r\n margin-left: auto;\r\n }\r\n }\r\n}\r\n\r\n.dso-responsive-message {\r\n font-size: 0.8em;\r\n margin-bottom: units.$u1;\r\n position: relative;\r\n text-align: center;\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-modal-overlay {\r\n background-color: fade-out(modal-variables.$backdrop-bg, modal-variables.$backdrop-opacity);\r\n bottom: 0;\r\n display: block;\r\n left: 0;\r\n position: fixed;\r\n right: 0;\r\n top: 0;\r\n z-index: zindex.$modal-background-overlay;\r\n}\r\n\r\n.dso-table-placeholder {\r\n box-shadow: inset 0 0 0 1px table.$border-color;\r\n display: grid;\r\n place-content: center;\r\n}\r\n","import { h, Component, ComponentInterface, Element, Host, Prop, State } from \"@stencil/core\";\r\nimport debounce from \"debounce\";\r\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\r\nimport { v4 } from \"uuid\";\r\n\r\n@Component({\r\n tag: \"dso-table\",\r\n styleUrl: \"table.scss\",\r\n shadow: true,\r\n})\r\nexport class Table implements ComponentInterface {\r\n private resizeObserver?: ResizeObserver;\r\n\r\n private focusTrapElement?: HTMLDivElement;\r\n\r\n private buttonElement?: HTMLButtonElement;\r\n\r\n private trap?: FocusTrap;\r\n\r\n private labelledbyId = v4();\r\n\r\n @Element()\r\n host!: HTMLDsoTableElement;\r\n\r\n /**\r\n * Prevents the table being opened in a modal.\r\n */\r\n @Prop({ reflect: true })\r\n noModal = false;\r\n\r\n /**\r\n * Indicates whether the table is currently horizontally scrollable.\r\n */\r\n @Prop({ reflect: true })\r\n isResponsive = false;\r\n\r\n @State()\r\n modalActive = false;\r\n\r\n @State()\r\n placeholderHeight?: number;\r\n\r\n private startResponsiveBehavior(): void {\r\n this.resizeObserver?.observe(this.host);\r\n }\r\n\r\n componentWillLoad(): void {\r\n this.resizeObserver = new ResizeObserver(debounce((entries) => this.setResponsiveTable(entries), 200));\r\n }\r\n\r\n componentDidLoad(): void {\r\n this.startResponsiveBehavior();\r\n }\r\n\r\n componentDidRender() {\r\n this.setFocusTrap();\r\n }\r\n\r\n disconnectedCallback() {\r\n this.resizeObserver?.disconnect();\r\n }\r\n\r\n render() {\r\n const caption = this.host.querySelector(\":scope > table > caption\")?.textContent?.trim();\r\n\r\n return (\r\n <Host>\r\n {this.modalActive && this.placeholderHeight && (\r\n <div class=\"dso-table-placeholder\" style={{ height: `${this.placeholderHeight}px` }} />\r\n )}\r\n\r\n {this.modalActive && <div class=\"dso-modal-overlay\"></div>}\r\n\r\n <div class={{ \"dso-modal\": this.modalActive }}>\r\n <div\r\n class={{ \"dso-dialog\": this.modalActive, \"dso-table-dialog\": true }}\r\n ref={(element) => (this.focusTrapElement = element)}\r\n {...(this.modalActive ? { [\"aria-labelledby\"]: this.labelledbyId, role: \"dialog\" } : {})}\r\n >\r\n {(this.isResponsive || !this.noModal) && (\r\n <div class=\"dso-table-utilities\" style={this.modalActive ? { display: \"none\" } : undefined}>\r\n {this.isResponsive && (\r\n <div class=\"dso-responsive-message\">\r\n <span>beweeg de tabel van links naar rechts</span>\r\n </div>\r\n )}\r\n\r\n {!this.noModal && (\r\n <button\r\n type=\"button\"\r\n class=\"dso-tertiary open-modal-button\"\r\n ref={(element) => (this.buttonElement = element)}\r\n onClick={() => this.openModal()}\r\n >\r\n <span class=\"sr-only\">tabel {caption ?? \"\"} </span>\r\n <span>vergroten</span>\r\n <dso-icon icon=\"external-link\"></dso-icon>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n\r\n {this.modalActive && (\r\n <div class=\"dso-header\">\r\n <h2 id={this.labelledbyId} class={{ \"sr-only\": !caption }}>\r\n {caption || \"Uitvergrote tabel dialoog\"}\r\n </h2>\r\n <button type=\"button\" class=\"dso-close\" onClick={() => this.closeModal()}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Sluiten</span>\r\n </button>\r\n </div>\r\n )}\r\n\r\n <div class={{ \"dso-body\": this.modalActive, \"dso-table-body\": true }}>\r\n <slot></slot>\r\n </div>\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n\r\n private openModal() {\r\n this.placeholderHeight = this.host.clientHeight;\r\n this.modalActive = true;\r\n }\r\n\r\n private closeModal() {\r\n this.placeholderHeight = undefined;\r\n this.modalActive = false;\r\n }\r\n\r\n private setFocusTrap() {\r\n if (this.modalActive && this.focusTrapElement && !this.trap) {\r\n this.trap = createFocusTrap([this.host, this.focusTrapElement], {\r\n escapeDeactivates: true,\r\n clickOutsideDeactivates: (e) => {\r\n if (e instanceof MouseEvent && e.composedPath()[0] === this.focusTrapElement) {\r\n this.closeModal();\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n setReturnFocus: this.buttonElement ?? false,\r\n onDeactivate: () => this.closeModal(),\r\n tabbableOptions: {\r\n getShadowRoot: true,\r\n },\r\n }).activate();\r\n } else if (!this.modalActive && this.trap) {\r\n this.trap?.deactivate();\r\n\r\n delete this.trap;\r\n }\r\n }\r\n\r\n private setResponsiveTable([dsoTable]: ResizeObserverEntry[]): void {\r\n if (!dsoTable) {\r\n throw new Error(\"No dsoTable found\");\r\n }\r\n\r\n const tableElement = dsoTable.target.querySelector(\"table\");\r\n\r\n if (dsoTable && tableElement instanceof HTMLTableElement) {\r\n this.isResponsive =\r\n Math.floor(tableElement.getBoundingClientRect().width) > Math.floor(dsoTable.contentRect.width);\r\n }\r\n }\r\n}\r\n"],"version":3}
@@ -14,7 +14,7 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy([["dsot-document-component-demo",[[0,"dsot-document-component-demo",{"response":[32],"open":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"status":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"statusDescription":[1,"status-description"],"open":[516],"hasNestedAccordion":[32],"hover":[32]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"userHomeActive":[4,"user-home-active"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32],"dropdownOptionsOffset":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal",[[1,"dso-modal",{"fullscreen":[516],"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"ariaId":[32],"hasFooter":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-action-list-item",[[1,"dso-action-list-item",{"step":[2],"itemTitle":[1,"item-title"],"flowLine":[4,"flow-line"],"warning":[4],"divider":[4]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"invalid":[516],"describedBy":[1,"described-by"],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]}]]],["dso-action-list",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner",[[1,"dso-banner",{"status":[513],"compact":[4],"noIcon":[4,"no-icon"]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4],"imageShape":[513,"image-shape"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32],"tabView":[32],"activeTab":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"dropdownOptionsOffset":[2,"dropdown-options-offset"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516],"enableAnimation":[4,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"keyboardFocus":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-alert_5",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"isTruncated":[32],"labelText":[32],"_truncateLabel":[64]},[[4,"keydown","keyDownListener"]]],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-badge",{"status":[1]}],[1,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-annotation-output_3",[[1,"dso-document-component",{"heading":[1],"label":[1],"nummer":[1],"opschrift":[1],"inhoud":[1],"open":[516],"filtered":[516],"notApplicable":[516,"not-applicable"],"genesteOntwerpInformatie":[516,"geneste-ontwerp-informatie"],"bevatOntwerpInformatie":[516,"bevat-ontwerp-informatie"],"annotated":[516],"gereserveerd":[4],"vervallen":[4],"openAnnotation":[4,"open-annotation"],"alternativeTitle":[1,"alternative-title"],"type":[513],"wijzigactie":[513]}],[4,"dso-annotation-output",{"identifier":[513],"annotationPrefix":[513,"annotation-prefix"],"open":[516]}],[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]]], options);
17
+ return bootstrapLazy([["dsot-document-component-demo",[[2,"dsot-document-component-demo",{"showCanvas":[516,"show-canvas"],"jsonFile":[1,"json-file"],"openDefault":[4,"open-default"],"response":[32],"openOrClosed":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]}]]],["dso-map-base-layers",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-accordion-section",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"status":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"statusDescription":[1,"status-description"],"open":[516],"hasNestedAccordion":[32],"hover":[32]}]]],["dso-header",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"userHomeActive":[4,"user-home-active"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32],"dropdownOptionsOffset":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal",[[1,"dso-modal",{"fullscreen":[516],"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"ariaId":[32],"hasFooter":[32]}]]],["dso-pagination",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-action-list-item",[[1,"dso-action-list-item",{"step":[2],"itemTitle":[1,"item-title"],"flowLine":[4,"flow-line"],"warning":[4],"divider":[4]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"invalid":[516],"describedBy":[1,"described-by"],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-table",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-accordion",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]}]]],["dso-action-list",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner",[[1,"dso-banner",{"status":[513],"compact":[4],"noIcon":[4,"no-icon"]}]]],["dso-card",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4],"imageShape":[513,"image-shape"]}]]],["dso-card-container",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-viewer-grid",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32],"tabView":[32],"activeTab":[32]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"dropdownOptionsOffset":[2,"dropdown-options-offset"],"checkable":[4],"boundary":[1],"placement":[1],"strategy":[1]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable",[[1,"dso-expandable",{"open":[516],"enableAnimation":[4,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32]}]]],["dso-responsive-element",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-tooltip",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-info_2",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"keyboardFocus":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-alert_5",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"isTruncated":[32],"labelText":[32],"_truncateLabel":[64]},[[4,"keydown","keyDownListener"]]],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-badge",{"status":[1]}],[1,"dso-ozon-content",{"content":[1],"inline":[516],"state":[32]}]]],["dso-annotation-output_3",[[1,"dso-document-component",{"heading":[1],"label":[1],"nummer":[1],"opschrift":[1],"inhoud":[1],"open":[516],"filtered":[516],"notApplicable":[516,"not-applicable"],"genesteOntwerpInformatie":[516,"geneste-ontwerp-informatie"],"bevatOntwerpInformatie":[516,"bevat-ontwerp-informatie"],"annotated":[516],"gereserveerd":[4],"vervallen":[4],"openAnnotation":[4,"open-annotation"],"alternativeTitle":[1,"alternative-title"],"type":[513],"wijzigactie":[513]}],[4,"dso-annotation-output",{"identifier":[513],"annotationPrefix":[513,"annotation-prefix"],"open":[516]}],[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]]], options);
18
18
  });
19
19
 
20
20
  //# sourceMappingURL=dso-toolkit.js.map
@@ -37,7 +37,7 @@ var maxSize = {
37
37
  }
38
38
  };
39
39
 
40
- const tooltipCss = ":host(.hidden){visibility:hidden}:host-context(dso-toggletip) *[data-popper-placement=top] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=right] .tooltip-arrow{margin-top:0}:host-context(dso-toggletip) *[data-popper-placement=bottom] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=left]{margin-right:-8px !important}:host-context(dso-toggletip) *[data-popper-placement=left] .tooltip-arrow{margin-top:0}*,*::after,*::before{box-sizing:border-box}.tooltip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;--link-color:#39870c;display:block;filter:drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));font-size:14px;opacity:0;position:absolute;transition:opacity 0.15s linear;z-index:410}.tooltip.in{opacity:1}.tooltip .tooltip-inner{background-color:#fff;border-radius:4px;color:#191919;display:inline-block;font-size:1rem;max-width:640px;padding:8px 16px;position:relative}.tooltip .tooltip-inner.dso-small{max-width:320px}.tooltip .tooltip-arrow{border-color:transparent;border-style:solid;height:0;width:0}.tooltip[data-popper-placement=top]{margin-top:-3px;padding:6px 0}.tooltip[data-popper-placement=top] .tooltip-arrow{border-top-color:#fff;border-width:6px 6px 0;bottom:0}.tooltip[data-popper-placement=top] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=right]{margin-left:3px;padding:0 6px}.tooltip[data-popper-placement=right] .tooltip-arrow{border-right-color:#fff;border-width:6px 6px 6px 0;left:0}.tooltip[data-popper-placement=right] .tooltip-arrow{margin-top:-3px}.tooltip[data-popper-placement=bottom]{margin-top:3px;padding:6px 0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{border-bottom-color:#fff;border-width:0 6px 6px;top:0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=left]{margin-left:-3px;padding:0 6px}.tooltip[data-popper-placement=left] .tooltip-arrow{border-left-color:#fff;border-width:6px 0 6px 6px;right:0}.tooltip[data-popper-placement=left] .tooltip-arrow{margin-top:-3px}";
40
+ const tooltipCss = ":host(.hidden){visibility:hidden}:host-context(dso-toggletip) *[data-popper-placement=top] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=right] .tooltip-arrow{margin-top:0}:host-context(dso-toggletip) *[data-popper-placement=bottom] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=left]{margin-right:-8px !important}:host-context(dso-toggletip) *[data-popper-placement=left] .tooltip-arrow{margin-top:0}*,*::after,*::before{box-sizing:border-box}.tooltip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;--link-color:#39870c;display:block;filter:drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));font-size:14px;opacity:0;position:absolute;transition:opacity 0.15s linear;z-index:410}.tooltip.in{opacity:1}.tooltip .tooltip-inner{background-color:#fff;border-radius:4px;color:#191919;display:inline-block;font-size:1rem;max-width:640px;padding:8px 16px;position:relative}.tooltip .tooltip-inner.dso-small{max-width:320px}.tooltip .tooltip-arrow{border-color:transparent;border-style:solid;height:0;width:0}.tooltip[data-popper-placement=top]{margin-top:-3px;padding:6px 0}.tooltip[data-popper-placement=top] .tooltip-arrow{border-top-color:#fff;border-width:6px 6px 0;bottom:0;margin-left:-3px}.tooltip[data-popper-placement=right]{margin-left:3px;padding:0 6px}.tooltip[data-popper-placement=right] .tooltip-arrow{border-right-color:#fff;border-width:6px 6px 6px 0;left:0;margin-top:-3px}.tooltip[data-popper-placement=bottom]{margin-top:3px;padding:6px 0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{border-bottom-color:#fff;border-width:0 6px 6px;top:0;margin-left:-3px}.tooltip[data-popper-placement=left]{margin-left:-3px;padding:0 6px}.tooltip[data-popper-placement=left] .tooltip-arrow{border-left-color:#fff;border-width:6px 0 6px 6px;right:0;margin-top:-3px}";
41
41
 
42
42
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
43
43
  if (kind === "a" && !f)
@@ -1 +1 @@
1
- {"file":"dso-tooltip.entry.js","mappings":";;;;;AAEA,IAAI,OAAO,GAAG;AACd,EAAE,IAAI,EAAE,SAAS;AACjB,EAAE,OAAO,EAAE,IAAI;AACf,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,gBAAgB,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,MAAM,CAAC;AACzD,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE;AACxB,IAAI,IAAI,KAAK,GAAG,IAAI,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AC,oDAAoD,CAAC,CAAC;MAEnE,OAAO;KACR;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAc,sBAAsB,EAAE,EAAE,CAAC,CAAC;IAClF,IAAI,CAAC,SAAS,EAAE;MACd,OAAO,CAAC,IAAI,CAAC,kDAAkD,EAAE,EAAE,CAAC,CAAC;MAErE,OAAO;KACR;IAED,uBAAA,IAAI,mBAAW,SAAS,MAAA,CAAC;IACzB,OAAO,SAAS,CAAC;GAClB;;;;;;;;;;;;;","names":["debounce"],"sources":["../../node_modules/popper-max-size-modifier/dist/popper-max-size-modifier.esm.js","src/components/tooltip/tooltip.scss?tag=dso-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["import { detectOverflow } from '@popperjs/core';\n\nvar maxSize = {\n name: 'maxSize',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['offset', 'preventOverflow', 'flip'],\n fn: function fn(_ref) {\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var overflow = detectOverflow(state, options);\n\n var _ref2 = state.modifiersData.preventOverflow || {\n x: 0,\n y: 0\n },\n x = _ref2.x,\n y = _ref2.y;\n\n var _state$rects$popper = state.rects.popper,\n width = _state$rects$popper.width,\n height = _state$rects$popper.height;\n\n var _state$placement$spli = state.placement.split('-'),\n basePlacement = _state$placement$spli[0];\n\n var widthProp = basePlacement === 'left' ? 'left' : 'right';\n var heightProp = basePlacement === 'top' ? 'top' : 'bottom';\n state.modifiersData[name] = {\n width: width - overflow[widthProp] - x,\n height: height - overflow[heightProp] - y\n };\n }\n};\n\nexport default maxSize;\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/components/tooltip\";\r\n\r\n:host(.hidden) {\r\n visibility: hidden;\r\n}\r\n\r\n:host-context(dso-toggletip) {\r\n *[data-popper-placement=\"top\"] {\r\n .tooltip-arrow {\r\n margin-left: 3px;\r\n }\r\n }\r\n\r\n *[data-popper-placement=\"right\"] {\r\n .tooltip-arrow {\r\n margin-top: 0;\r\n }\r\n }\r\n\r\n *[data-popper-placement=\"bottom\"] {\r\n .tooltip-arrow {\r\n margin-left: 3px;\r\n }\r\n }\r\n\r\n *[data-popper-placement=\"left\"] {\r\n margin-right: units.$u1 * -1 !important;\r\n\r\n .tooltip-arrow {\r\n margin-top: 0;\r\n }\r\n }\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.tooltip {\r\n @include tooltip.root();\r\n\r\n &[data-popper-placement=\"top\"] {\r\n @include tooltip.arrowTop();\r\n\r\n .tooltip-arrow {\r\n margin-left: tooltip.$arrow-margin * -1;\r\n }\r\n }\r\n\r\n &[data-popper-placement=\"right\"] {\r\n @include tooltip.arrowRight();\r\n\r\n .tooltip-arrow {\r\n margin-top: tooltip.$arrow-margin * -1;\r\n }\r\n }\r\n\r\n &[data-popper-placement=\"bottom\"] {\r\n @include tooltip.arrowBottom();\r\n\r\n .tooltip-arrow {\r\n margin-left: tooltip.$arrow-margin * -1;\r\n }\r\n }\r\n\r\n &[data-popper-placement=\"left\"] {\r\n @include tooltip.arrowLeft();\r\n\r\n .tooltip-arrow {\r\n margin-top: tooltip.$arrow-margin * -1;\r\n }\r\n }\r\n}\r\n","import { beforeWrite, createPopper, Instance as PopperInstance, State as PopperState } from \"@popperjs/core\";\r\nimport maxSize from \"popper-max-size-modifier\";\r\nimport { h, Component, Element, Host, Method, Prop, State, Watch } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport { hasOverflow } from \"../../utils/has-overflow\";\r\nimport debounce from \"debounce\";\r\n\r\n// Keep const in sync with $tooltip-transition-duration in dso-toolkit/src/components/tooltip/tooltip.scss tooltip_root() mixin\r\nconst transitionDuration = 150;\r\n\r\nconst applyMaxSize = {\r\n name: \"applyMaxSize\",\r\n enabled: true,\r\n phase: beforeWrite,\r\n requires: [\"maxSize\"],\r\n fn({ state }: { state: PopperState }) {\r\n let { width } = state.modifiersData.maxSize;\r\n if (width < 160) {\r\n width = 160;\r\n }\r\n\r\n state.styles.popper = {\r\n ...state.styles.popper,\r\n maxWidth: `${width}px`,\r\n };\r\n },\r\n};\r\n\r\n@Component({\r\n tag: \"dso-tooltip\",\r\n styleUrl: \"tooltip.scss\",\r\n shadow: true,\r\n})\r\nexport class Tooltip {\r\n /**\r\n * Defines if the tooltip is descriptive. A descriptive tooltip contains a meaningful message. Tooltips that are not descriptive are hidden from screenreaders using `aria-hidden`.\r\n */\r\n @Prop({\r\n reflect: true,\r\n })\r\n descriptive = false;\r\n\r\n /**\r\n * Set position of tooltip relative to target\r\n */\r\n @Prop()\r\n position: \"top\" | \"right\" | \"bottom\" | \"left\" = \"top\";\r\n\r\n /**\r\n * Set position strategy of tooltip\r\n */\r\n @Prop()\r\n strategy: \"auto\" | \"absolute\" | \"fixed\" = \"auto\";\r\n\r\n /**\r\n * Set attribute `no-arrow` to hide the arrow\r\n */\r\n @Prop()\r\n noArrow = false;\r\n\r\n /**\r\n * Deactivates mouseover behaviour\r\n */\r\n @Prop()\r\n stateless?: boolean;\r\n\r\n /**\r\n * Defines if the tooltip has a smaller max-width\r\n */\r\n @Prop()\r\n small?: boolean;\r\n\r\n /**\r\n * Whether or not to show the tooltip. To control the tooltip add the `active` attribute or use the `activate()` and `deactivate()` instance methods.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n active = false;\r\n\r\n /**\r\n * Activate the tooltip (Sets the `active` attribute)\r\n */\r\n @Method()\r\n async activate(): Promise<void> {\r\n this.active = true;\r\n }\r\n\r\n /**\r\n * Deactivate the tooltip (Removes the `active` attribute)\r\n */\r\n @Method()\r\n async deactivate(): Promise<void> {\r\n this.active = false;\r\n }\r\n\r\n @Watch(\"position\")\r\n watchPosition() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n this.popper.setOptions({\r\n placement: this.position,\r\n });\r\n }\r\n\r\n @Watch(\"strategy\")\r\n watchStrategy() {\r\n this.setStrategy();\r\n }\r\n\r\n private setStrategy() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n if (this.strategy === \"absolute\" || this.strategy === \"fixed\") {\r\n this.popper.setOptions({\r\n strategy: this.strategy,\r\n });\r\n\r\n return;\r\n }\r\n\r\n let element: Element | null = this.element;\r\n while (element && element.parentNode !== document) {\r\n element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;\r\n if (element !== null && hasOverflow(element)) {\r\n this.popper.setOptions({\r\n strategy: \"fixed\",\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n this.popper.setOptions({\r\n strategy: \"absolute\",\r\n });\r\n }\r\n\r\n @Watch(\"active\")\r\n watchActive() {\r\n if (this.active) {\r\n this.activatePopper();\r\n\r\n if (!this.stateless) {\r\n setTimeout(() => {\r\n this.popper?.setOptions({\r\n modifiers: [{ name: \"eventListeners\", enabled: true }],\r\n });\r\n document.addEventListener(\"keydown\", this.keyDownListener);\r\n });\r\n }\r\n } else {\r\n document.removeEventListener(\"keydown\", this.keyDownListener);\r\n this.deactivatePopper();\r\n }\r\n }\r\n\r\n @Element()\r\n private element!: HTMLDsoTooltipElement;\r\n\r\n private popper: PopperInstance | undefined;\r\n\r\n private callbacks: TooltipCallbacks = {\r\n activate: () => (this.active = true),\r\n deactivate: () => (this.active = false),\r\n };\r\n\r\n private onMouseLeave = () => {\r\n if (!this.element.matches(\":hover\") && !this.target?.matches(\":hover\")) {\r\n this.callbacks.deactivate();\r\n }\r\n };\r\n\r\n @State()\r\n private hidden = true;\r\n\r\n private listenClick(e: MouseEvent) {\r\n e.stopPropagation();\r\n }\r\n\r\n componentDidLoad(): void {\r\n const tooltip = this.element.shadowRoot?.querySelector(\".tooltip\");\r\n if (!(tooltip instanceof HTMLElement)) {\r\n throw new Error(\"tooltip element is not instanceof HTMLElement\");\r\n }\r\n\r\n if (!this.stateless && this.target) {\r\n this.target.addEventListener(\"mouseenter\", this.callbacks.activate);\r\n [this.element, this.target].forEach((element) => element.addEventListener(\"mouseleave\", this.onMouseLeave));\r\n this.target.addEventListener(\"focus\", this.callbacks.activate);\r\n this.target.addEventListener(\"blur\", this.callbacks.deactivate);\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.popper?.destroy();\r\n\r\n if (!this.stateless && this.target) {\r\n this.target.removeEventListener(\"mouseenter\", this.callbacks.activate);\r\n [this.element, this.target].forEach((element) => element.removeEventListener(\"mouseleave\", this.onMouseLeave));\r\n this.target.removeEventListener(\"focus\", this.callbacks.activate);\r\n this.target.removeEventListener(\"blur\", this.callbacks.deactivate);\r\n }\r\n\r\n this.target = undefined;\r\n }\r\n\r\n componentDidRender() {\r\n if (this.active) {\r\n this.popper?.update();\r\n }\r\n }\r\n\r\n private keyDownListener = (event: KeyboardEvent) => {\r\n if (event.key === \"Escape\") {\r\n this.deactivate();\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n <Host class={{ hidden: this.hidden }} role=\"tooltip\" onClick={this.listenClick}>\r\n <div class={clsx(\"tooltip\", { in: this.active })}>\r\n {!this.noArrow && <div data-popper-arrow class=\"tooltip-arrow\"></div>}\r\n <div aria-hidden={!this.descriptive || undefined} class={clsx(\"tooltip-inner\", { \"dso-small\": this.small })}>\r\n <slot></slot>\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n\r\n private deactivatePopper = debounce(() => {\r\n this.hidden = true;\r\n this.popper?.destroy();\r\n this.popper = undefined;\r\n }, transitionDuration);\r\n\r\n private activatePopper(): void {\r\n this.hidden = false;\r\n\r\n if (this.popper) {\r\n return;\r\n }\r\n\r\n const tooltip = this.element.shadowRoot?.querySelector(\".tooltip\");\r\n\r\n if (this.target && tooltip instanceof HTMLElement) {\r\n this.popper = createPopper(this.target, tooltip, {\r\n placement: this.position,\r\n modifiers: [maxSize, applyMaxSize, { name: \"eventListeners\", enabled: false }],\r\n });\r\n\r\n this.setStrategy();\r\n }\r\n }\r\n\r\n private get target(): HTMLElement | undefined {\r\n return this.#target ?? this.initializeTarget();\r\n }\r\n\r\n private set target(element: HTMLElement | undefined) {\r\n this.#target = element;\r\n }\r\n\r\n #target?: HTMLElement;\r\n\r\n private initializeTarget(): HTMLElement | undefined {\r\n const id = this.element.id;\r\n\r\n if (!id) {\r\n console.warn(\"Unable to find reference tooltip has no [id] attribute.\");\r\n\r\n return;\r\n }\r\n\r\n const rootNode = this.element.getRootNode();\r\n if (!(rootNode instanceof Document || rootNode instanceof ShadowRoot)) {\r\n console.warn(`rootNode is not instance of Document or ShadowRoot`);\r\n\r\n return;\r\n }\r\n\r\n const reference = rootNode.querySelector<HTMLElement>(`[aria-describedBy=\"${id}`);\r\n if (!reference) {\r\n console.warn(`Unable to find reference with aria-describedby ${id}`);\r\n\r\n return;\r\n }\r\n\r\n this.#target = reference;\r\n return reference;\r\n }\r\n}\r\n\r\ninterface TooltipCallbacks {\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n"],"version":3}
1
+ {"file":"dso-tooltip.entry.js","mappings":";;;;;AAEA,IAAI,OAAO,GAAG;AACd,EAAE,IAAI,EAAE,SAAS;AACjB,EAAE,OAAO,EAAE,IAAI;AACf,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,gBAAgB,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,MAAM,CAAC;AACzD,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE;AACxB,IAAI,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK;AAC1B,QAAQ,IAAI,GAAG,IAAI,CAAC,IAAI;AACxB,QAAQ,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;AAC/B,IAAI,IAAI,QAAQ,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAClD;AACA,IAAI,IAAI,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,eAAe,IAAI;AACvD,MAAM,CAAC,EAAE,CAAC;AACV,MAAM,CAAC,EAAE,CAAC;AACV,KAAK;AACL,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC;AACnB,Q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ifier.esm.js","src/components/tooltip/tooltip.scss?tag=dso-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["import { detectOverflow } from '@popperjs/core';\n\nvar maxSize = {\n name: 'maxSize',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['offset', 'preventOverflow', 'flip'],\n fn: function fn(_ref) {\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var overflow = detectOverflow(state, options);\n\n var _ref2 = state.modifiersData.preventOverflow || {\n x: 0,\n y: 0\n },\n x = _ref2.x,\n y = _ref2.y;\n\n var _state$rects$popper = state.rects.popper,\n width = _state$rects$popper.width,\n height = _state$rects$popper.height;\n\n var _state$placement$spli = state.placement.split('-'),\n basePlacement = _state$placement$spli[0];\n\n var widthProp = basePlacement === 'left' ? 'left' : 'right';\n var heightProp = basePlacement === 'top' ? 'top' : 'bottom';\n state.modifiersData[name] = {\n width: width - overflow[widthProp] - x,\n height: height - overflow[heightProp] - y\n };\n }\n};\n\nexport default maxSize;\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/zindex\";\r\n\r\n@use \"tooltip.variables\" as tooltip-variables;\r\n\r\n:host(.hidden) {\r\n visibility: hidden;\r\n}\r\n\r\n:host-context(dso-toggletip) {\r\n *[data-popper-placement=\"top\"] {\r\n .tooltip-arrow {\r\n margin-left: 3px;\r\n }\r\n }\r\n\r\n *[data-popper-placement=\"right\"] {\r\n .tooltip-arrow {\r\n margin-top: 0;\r\n }\r\n }\r\n\r\n *[data-popper-placement=\"bottom\"] {\r\n .tooltip-arrow {\r\n margin-left: 3px;\r\n }\r\n }\r\n\r\n *[data-popper-placement=\"left\"] {\r\n margin-right: units.$u1 * -1 !important;\r\n\r\n .tooltip-arrow {\r\n margin-top: 0;\r\n }\r\n }\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.tooltip {\r\n font-family: typography.$font-family-base;\r\n // We deliberately do NOT reset font-size.\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: typography.$line-height-base;\r\n line-break: auto;\r\n text-align: left; // Fallback for where `start` is not supported\r\n text-align: start;\r\n text-decoration: none;\r\n text-shadow: none;\r\n text-transform: none;\r\n letter-spacing: normal;\r\n word-break: normal;\r\n word-spacing: normal;\r\n word-wrap: normal;\r\n white-space: normal;\r\n\r\n --link-color: #{colors.$grasgroen};\r\n\r\n display: block;\r\n filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));\r\n font-size: typography.$font-size-small;\r\n opacity: 0;\r\n position: absolute;\r\n transition: opacity tooltip-variables.$transition-duration linear;\r\n z-index: zindex.$tooltip;\r\n\r\n &.in {\r\n opacity: tooltip-variables.$opacity;\r\n }\r\n\r\n .tooltip-inner {\r\n background-color: colors.$wit;\r\n border-radius: tooltip-variables.$border-radius;\r\n color: colors.$grijs-90;\r\n display: inline-block;\r\n font-size: typography.$root-font-size-base;\r\n max-width: tooltip-variables.$max-width;\r\n padding: tooltip-variables.$padding-horizontal tooltip-variables.$padding-vertical;\r\n position: relative;\r\n\r\n &.dso-small {\r\n max-width: tooltip-variables.$max-width-small;\r\n }\r\n }\r\n\r\n .tooltip-arrow {\r\n border-color: transparent;\r\n border-style: solid;\r\n height: 0;\r\n width: 0;\r\n }\r\n\r\n &[data-popper-placement=\"top\"] {\r\n margin-top: -3px;\r\n padding: tooltip-variables.$arrow-width 0;\r\n\r\n .tooltip-arrow {\r\n border-top-color: tooltip-variables.$arrow-color;\r\n border-width: tooltip-variables.$arrow-width tooltip-variables.$arrow-width 0;\r\n bottom: 0;\r\n\r\n margin-left: tooltip-variables.$arrow-margin * -1;\r\n }\r\n }\r\n\r\n &[data-popper-placement=\"right\"] {\r\n margin-left: 3px;\r\n padding: 0 tooltip-variables.$arrow-width;\r\n\r\n .tooltip-arrow {\r\n border-right-color: tooltip-variables.$arrow-color;\r\n border-width: tooltip-variables.$arrow-width tooltip-variables.$arrow-width tooltip-variables.$arrow-width 0;\r\n left: 0;\r\n\r\n margin-top: tooltip-variables.$arrow-margin * -1;\r\n }\r\n }\r\n\r\n &[data-popper-placement=\"bottom\"] {\r\n margin-top: 3px;\r\n padding: tooltip-variables.$arrow-width 0;\r\n\r\n .tooltip-arrow {\r\n border-bottom-color: tooltip-variables.$arrow-color;\r\n border-width: 0 tooltip-variables.$arrow-width tooltip-variables.$arrow-width;\r\n top: 0;\r\n\r\n margin-left: tooltip-variables.$arrow-margin * -1;\r\n }\r\n }\r\n\r\n &[data-popper-placement=\"left\"] {\r\n margin-left: -3px;\r\n padding: 0 tooltip-variables.$arrow-width;\r\n\r\n .tooltip-arrow {\r\n border-left-color: tooltip-variables.$arrow-color;\r\n border-width: tooltip-variables.$arrow-width 0 tooltip-variables.$arrow-width tooltip-variables.$arrow-width;\r\n right: 0;\r\n\r\n margin-top: tooltip-variables.$arrow-margin * -1;\r\n }\r\n }\r\n}\r\n","import { beforeWrite, createPopper, Instance as PopperInstance, State as PopperState } from \"@popperjs/core\";\r\nimport maxSize from \"popper-max-size-modifier\";\r\nimport { h, Component, Element, Host, Method, Prop, State, Watch } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport { hasOverflow } from \"../../utils/has-overflow\";\r\nimport debounce from \"debounce\";\r\n\r\n// Keep const in sync with $tooltip-transition-duration in dso-toolkit/src/components/tooltip/tooltip.scss tooltip_root() mixin\r\nconst transitionDuration = 150;\r\n\r\nconst applyMaxSize = {\r\n name: \"applyMaxSize\",\r\n enabled: true,\r\n phase: beforeWrite,\r\n requires: [\"maxSize\"],\r\n fn({ state }: { state: PopperState }) {\r\n let { width } = state.modifiersData.maxSize;\r\n if (width < 160) {\r\n width = 160;\r\n }\r\n\r\n state.styles.popper = {\r\n ...state.styles.popper,\r\n maxWidth: `${width}px`,\r\n };\r\n },\r\n};\r\n\r\n@Component({\r\n tag: \"dso-tooltip\",\r\n styleUrl: \"tooltip.scss\",\r\n shadow: true,\r\n})\r\nexport class Tooltip {\r\n /**\r\n * Defines if the tooltip is descriptive. A descriptive tooltip contains a meaningful message. Tooltips that are not descriptive are hidden from screenreaders using `aria-hidden`.\r\n */\r\n @Prop({\r\n reflect: true,\r\n })\r\n descriptive = false;\r\n\r\n /**\r\n * Set position of tooltip relative to target\r\n */\r\n @Prop()\r\n position: \"top\" | \"right\" | \"bottom\" | \"left\" = \"top\";\r\n\r\n /**\r\n * Set position strategy of tooltip\r\n */\r\n @Prop()\r\n strategy: \"auto\" | \"absolute\" | \"fixed\" = \"auto\";\r\n\r\n /**\r\n * Set attribute `no-arrow` to hide the arrow\r\n */\r\n @Prop()\r\n noArrow = false;\r\n\r\n /**\r\n * Deactivates mouseover behaviour\r\n */\r\n @Prop()\r\n stateless?: boolean;\r\n\r\n /**\r\n * Defines if the tooltip has a smaller max-width\r\n */\r\n @Prop()\r\n small?: boolean;\r\n\r\n /**\r\n * Whether or not to show the tooltip. To control the tooltip add the `active` attribute or use the `activate()` and `deactivate()` instance methods.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n active = false;\r\n\r\n /**\r\n * Activate the tooltip (Sets the `active` attribute)\r\n */\r\n @Method()\r\n async activate(): Promise<void> {\r\n this.active = true;\r\n }\r\n\r\n /**\r\n * Deactivate the tooltip (Removes the `active` attribute)\r\n */\r\n @Method()\r\n async deactivate(): Promise<void> {\r\n this.active = false;\r\n }\r\n\r\n @Watch(\"position\")\r\n watchPosition() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n this.popper.setOptions({\r\n placement: this.position,\r\n });\r\n }\r\n\r\n @Watch(\"strategy\")\r\n watchStrategy() {\r\n this.setStrategy();\r\n }\r\n\r\n private setStrategy() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n if (this.strategy === \"absolute\" || this.strategy === \"fixed\") {\r\n this.popper.setOptions({\r\n strategy: this.strategy,\r\n });\r\n\r\n return;\r\n }\r\n\r\n let element: Element | null = this.element;\r\n while (element && element.parentNode !== document) {\r\n element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;\r\n if (element !== null && hasOverflow(element)) {\r\n this.popper.setOptions({\r\n strategy: \"fixed\",\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n this.popper.setOptions({\r\n strategy: \"absolute\",\r\n });\r\n }\r\n\r\n @Watch(\"active\")\r\n watchActive() {\r\n if (this.active) {\r\n this.activatePopper();\r\n\r\n if (!this.stateless) {\r\n setTimeout(() => {\r\n this.popper?.setOptions({\r\n modifiers: [{ name: \"eventListeners\", enabled: true }],\r\n });\r\n document.addEventListener(\"keydown\", this.keyDownListener);\r\n });\r\n }\r\n } else {\r\n document.removeEventListener(\"keydown\", this.keyDownListener);\r\n this.deactivatePopper();\r\n }\r\n }\r\n\r\n @Element()\r\n private element!: HTMLDsoTooltipElement;\r\n\r\n private popper: PopperInstance | undefined;\r\n\r\n private callbacks: TooltipCallbacks = {\r\n activate: () => (this.active = true),\r\n deactivate: () => (this.active = false),\r\n };\r\n\r\n private onMouseLeave = () => {\r\n if (!this.element.matches(\":hover\") && !this.target?.matches(\":hover\")) {\r\n this.callbacks.deactivate();\r\n }\r\n };\r\n\r\n @State()\r\n private hidden = true;\r\n\r\n private listenClick(e: MouseEvent) {\r\n e.stopPropagation();\r\n }\r\n\r\n componentDidLoad(): void {\r\n const tooltip = this.element.shadowRoot?.querySelector(\".tooltip\");\r\n if (!(tooltip instanceof HTMLElement)) {\r\n throw new Error(\"tooltip element is not instanceof HTMLElement\");\r\n }\r\n\r\n if (!this.stateless && this.target) {\r\n this.target.addEventListener(\"mouseenter\", this.callbacks.activate);\r\n [this.element, this.target].forEach((element) => element.addEventListener(\"mouseleave\", this.onMouseLeave));\r\n this.target.addEventListener(\"focus\", this.callbacks.activate);\r\n this.target.addEventListener(\"blur\", this.callbacks.deactivate);\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.popper?.destroy();\r\n\r\n if (!this.stateless && this.target) {\r\n this.target.removeEventListener(\"mouseenter\", this.callbacks.activate);\r\n [this.element, this.target].forEach((element) => element.removeEventListener(\"mouseleave\", this.onMouseLeave));\r\n this.target.removeEventListener(\"focus\", this.callbacks.activate);\r\n this.target.removeEventListener(\"blur\", this.callbacks.deactivate);\r\n }\r\n\r\n this.target = undefined;\r\n }\r\n\r\n componentDidRender() {\r\n if (this.active) {\r\n this.popper?.update();\r\n }\r\n }\r\n\r\n private keyDownListener = (event: KeyboardEvent) => {\r\n if (event.key === \"Escape\") {\r\n this.deactivate();\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n <Host class={{ hidden: this.hidden }} role=\"tooltip\" onClick={this.listenClick}>\r\n <div class={clsx(\"tooltip\", { in: this.active })}>\r\n {!this.noArrow && <div data-popper-arrow class=\"tooltip-arrow\"></div>}\r\n <div aria-hidden={!this.descriptive || undefined} class={clsx(\"tooltip-inner\", { \"dso-small\": this.small })}>\r\n <slot></slot>\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n\r\n private deactivatePopper = debounce(() => {\r\n this.hidden = true;\r\n this.popper?.destroy();\r\n this.popper = undefined;\r\n }, transitionDuration);\r\n\r\n private activatePopper(): void {\r\n this.hidden = false;\r\n\r\n if (this.popper) {\r\n return;\r\n }\r\n\r\n const tooltip = this.element.shadowRoot?.querySelector(\".tooltip\");\r\n\r\n if (this.target && tooltip instanceof HTMLElement) {\r\n this.popper = createPopper(this.target, tooltip, {\r\n placement: this.position,\r\n modifiers: [maxSize, applyMaxSize, { name: \"eventListeners\", enabled: false }],\r\n });\r\n\r\n this.setStrategy();\r\n }\r\n }\r\n\r\n private get target(): HTMLElement | undefined {\r\n return this.#target ?? this.initializeTarget();\r\n }\r\n\r\n private set target(element: HTMLElement | undefined) {\r\n this.#target = element;\r\n }\r\n\r\n #target?: HTMLElement;\r\n\r\n private initializeTarget(): HTMLElement | undefined {\r\n const id = this.element.id;\r\n\r\n if (!id) {\r\n console.warn(\"Unable to find reference tooltip has no [id] attribute.\");\r\n\r\n return;\r\n }\r\n\r\n const rootNode = this.element.getRootNode();\r\n if (!(rootNode instanceof Document || rootNode instanceof ShadowRoot)) {\r\n console.warn(`rootNode is not instance of Document or ShadowRoot`);\r\n\r\n return;\r\n }\r\n\r\n const reference = rootNode.querySelector<HTMLElement>(`[aria-describedBy=\"${id}`);\r\n if (!reference) {\r\n console.warn(`Unable to find reference with aria-describedby ${id}`);\r\n\r\n return;\r\n }\r\n\r\n this.#target = reference;\r\n return reference;\r\n }\r\n}\r\n\r\ninterface TooltipCallbacks {\r\n activate: () => void;\r\n deactivate: () => void;\r\n}\r\n"],"version":3}