@dso-toolkit/core 45.0.1 → 45.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/cjs/dso-accordion-section.cjs.entry.js +110 -0
  2. package/dist/cjs/dso-accordion.cjs.entry.js +297 -0
  3. package/dist/cjs/dso-alert.cjs.entry.js +3 -3
  4. package/dist/cjs/dso-attachments-counter.cjs.entry.js +3 -3
  5. package/dist/cjs/dso-autosuggest.cjs.entry.js +1 -1
  6. package/dist/cjs/dso-badge.cjs.entry.js +1 -1
  7. package/dist/cjs/dso-banner.cjs.entry.js +2 -2
  8. package/dist/cjs/dso-date-picker.cjs.entry.js +2 -2
  9. package/dist/cjs/dso-dropdown-menu.cjs.entry.js +3 -3
  10. package/dist/cjs/dso-header.cjs.entry.js +6 -6
  11. package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +59 -3
  12. package/dist/cjs/dso-highlight-box.cjs.entry.js +2 -2
  13. package/dist/cjs/dso-icon.cjs.entry.js +2 -2
  14. package/dist/cjs/dso-image-overlay.cjs.entry.js +11 -5
  15. package/dist/cjs/dso-info-button.cjs.entry.js +4 -3
  16. package/dist/cjs/dso-info_2.cjs.entry.js +3 -3
  17. package/dist/cjs/dso-label.cjs.entry.js +1 -1
  18. package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
  19. package/dist/cjs/dso-map-controls.cjs.entry.js +2 -2
  20. package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
  21. package/dist/cjs/dso-ozon-content.cjs.entry.js +77 -16
  22. package/dist/cjs/dso-pagination.cjs.entry.js +99 -7
  23. package/dist/cjs/dso-progress-bar.cjs.entry.js +2 -2
  24. package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
  25. package/dist/cjs/dso-responsive-element.cjs.entry.js +6 -1
  26. package/dist/cjs/dso-table.cjs.entry.js +89 -0
  27. package/dist/cjs/dso-toggletip.cjs.entry.js +2 -2
  28. package/dist/cjs/dso-toolkit.cjs.js +2 -2
  29. package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
  30. package/dist/cjs/dso-tree-view.cjs.entry.js +1 -1
  31. package/dist/cjs/dso-viewer-grid.cjs.entry.js +11 -5
  32. package/dist/cjs/{focus-trap.esm-a85643b0.js → focus-trap.esm-e2addb10.js} +28 -11
  33. package/dist/cjs/{index-0a7c679a.js → index-4066351a.js} +7 -0
  34. package/dist/cjs/{index.esm-3520a2a6.js → index.esm-50325ea2.js} +110 -12
  35. package/dist/cjs/loader.cjs.js +2 -2
  36. package/dist/collection/collection-manifest.json +3 -0
  37. package/dist/collection/components/accordion/accordion.css +9 -0
  38. package/dist/collection/components/accordion/accordion.interfaces.js +1 -0
  39. package/dist/collection/components/accordion/accordion.js +260 -0
  40. package/dist/collection/components/accordion/accordion.template.js +26 -0
  41. package/dist/collection/components/accordion/components/accordion-section.css +221 -0
  42. package/dist/collection/components/accordion/components/accordion-section.js +292 -0
  43. package/dist/collection/components/alert/alert.css +14 -51
  44. package/dist/collection/components/alert/alert.js +1 -0
  45. package/dist/collection/components/attachments-counter/attachments-counter.css +0 -12
  46. package/dist/collection/components/attachments-counter/attachments-counter.js +2 -1
  47. package/dist/collection/components/banner/banner.css +0 -4
  48. package/dist/collection/components/date-picker/date-picker.css +2 -2
  49. package/dist/collection/components/dropdown-menu/dropdown-menu.css +0 -7
  50. package/dist/collection/components/header/header.css +38 -390
  51. package/dist/collection/components/header/header.js +22 -24
  52. package/dist/collection/components/header/header.template.js +1 -1
  53. package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +21 -104
  54. package/dist/collection/components/helpcenter-panel/helpcenter-panel.js +71 -5
  55. package/dist/collection/components/highlight-box/highlight-box.css +1 -3
  56. package/dist/collection/components/image-overlay/image-overlay.css +37 -1134
  57. package/dist/collection/components/image-overlay/image-overlay.js +13 -3
  58. package/dist/collection/components/image-overlay/image-overlay.template.js +9 -1
  59. package/dist/collection/components/info/info.css +19 -1070
  60. package/dist/collection/components/info/info.js +1 -0
  61. package/dist/collection/components/info-button/info-button.css +8 -17
  62. package/dist/collection/components/info-button/info-button.js +9 -3
  63. package/dist/collection/components/map-controls/map-controls.css +20 -1172
  64. package/dist/collection/components/ozon-content/nodes/figuur.node.js +41 -6
  65. package/dist/collection/components/ozon-content/nodes/lijst.node.js +25 -0
  66. package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +8 -7
  67. package/dist/collection/components/ozon-content/ozon-content-mapper.js +2 -0
  68. package/dist/collection/components/ozon-content/ozon-content.css +39 -49
  69. package/dist/collection/components/pagination/pagination.css +1 -0
  70. package/dist/collection/components/pagination/pagination.js +122 -14
  71. package/dist/collection/components/progress-bar/progress-bar.css +1 -1
  72. package/dist/collection/components/responsive-element/responsive-element.interfaces.js +1 -0
  73. package/dist/collection/components/responsive-element/responsive-element.js +48 -1
  74. package/dist/collection/components/responsive-element/responsive-element.template.js +4 -2
  75. package/dist/collection/components/table/table.css +296 -0
  76. package/dist/collection/components/table/table.interfaces.js +1 -0
  77. package/dist/collection/components/table/table.js +146 -0
  78. package/dist/collection/components/table/table.template.js +26 -0
  79. package/dist/collection/components/toggletip/toggletip.css +4 -0
  80. package/dist/collection/components/viewer-grid/viewer-grid.css +34 -1300
  81. package/dist/collection/components/viewer-grid/viewer-grid.js +12 -1
  82. package/dist/custom-elements/index.d.ts +18 -0
  83. package/dist/custom-elements/index.js +2052 -1230
  84. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  85. package/dist/dso-toolkit/p-02b2e01c.entry.js +1 -0
  86. package/dist/dso-toolkit/{p-d780f9ff.entry.js → p-05a9e206.entry.js} +1 -1
  87. package/dist/dso-toolkit/p-1a19ce42.entry.js +1 -0
  88. package/dist/dso-toolkit/p-22c35db5.js +5 -0
  89. package/dist/dso-toolkit/{p-361528b4.entry.js → p-2e74485e.entry.js} +1 -1
  90. package/dist/dso-toolkit/p-2f6b1092.entry.js +1 -0
  91. package/dist/dso-toolkit/{p-bf4d6f63.entry.js → p-3381c859.entry.js} +1 -1
  92. package/dist/dso-toolkit/{p-3799366e.entry.js → p-37a34037.entry.js} +1 -1
  93. package/dist/dso-toolkit/p-383227b9.entry.js +1 -0
  94. package/dist/dso-toolkit/p-42450cfe.js +1 -0
  95. package/dist/dso-toolkit/p-4c44d27c.entry.js +1 -0
  96. package/dist/dso-toolkit/{p-91b6a181.entry.js → p-4fd140e9.entry.js} +1 -1
  97. package/dist/dso-toolkit/p-53c7bf4f.entry.js +1 -0
  98. package/dist/dso-toolkit/p-662b7663.entry.js +1 -0
  99. package/dist/dso-toolkit/{p-d60876c2.entry.js → p-67b11174.entry.js} +1 -1
  100. package/dist/dso-toolkit/{p-375a2523.entry.js → p-6a414479.entry.js} +1 -1
  101. package/dist/dso-toolkit/{p-e4bcafc4.entry.js → p-6cac0292.entry.js} +1 -1
  102. package/dist/dso-toolkit/p-7213783b.entry.js +1 -0
  103. package/dist/dso-toolkit/p-83de460b.entry.js +1 -0
  104. package/dist/dso-toolkit/p-9aaadf4f.entry.js +1 -0
  105. package/dist/dso-toolkit/p-a5a5b24b.entry.js +1 -0
  106. package/dist/dso-toolkit/p-a9b0a83e.entry.js +1 -0
  107. package/dist/dso-toolkit/p-ac0c0eee.entry.js +1 -0
  108. package/dist/dso-toolkit/p-b6afe104.entry.js +1 -0
  109. package/dist/dso-toolkit/{p-590cbab6.entry.js → p-b9531adb.entry.js} +1 -1
  110. package/dist/dso-toolkit/{p-6bc71e48.entry.js → p-d2255268.entry.js} +1 -1
  111. package/dist/dso-toolkit/p-de50f5f1.entry.js +1 -0
  112. package/dist/dso-toolkit/p-e16b5d71.entry.js +1 -0
  113. package/dist/dso-toolkit/p-ea1d4c81.entry.js +1 -0
  114. package/dist/dso-toolkit/p-eb326df8.entry.js +1 -0
  115. package/dist/dso-toolkit/{p-25f8dbc6.entry.js → p-ec3b8800.entry.js} +1 -1
  116. package/dist/dso-toolkit/{p-16635f4b.entry.js → p-f1b5baf9.entry.js} +1 -1
  117. package/dist/dso-toolkit/p-f8b023c4.js +5 -0
  118. package/dist/esm/dso-accordion-section.entry.js +106 -0
  119. package/dist/esm/dso-accordion.entry.js +293 -0
  120. package/dist/esm/dso-alert.entry.js +3 -3
  121. package/dist/esm/dso-attachments-counter.entry.js +3 -3
  122. package/dist/esm/dso-autosuggest.entry.js +1 -1
  123. package/dist/esm/dso-badge.entry.js +1 -1
  124. package/dist/esm/dso-banner.entry.js +2 -2
  125. package/dist/esm/dso-date-picker.entry.js +2 -2
  126. package/dist/esm/dso-dropdown-menu.entry.js +3 -3
  127. package/dist/esm/dso-header.entry.js +6 -6
  128. package/dist/esm/dso-helpcenter-panel.entry.js +59 -3
  129. package/dist/esm/dso-highlight-box.entry.js +2 -2
  130. package/dist/esm/dso-icon.entry.js +2 -2
  131. package/dist/esm/dso-image-overlay.entry.js +11 -5
  132. package/dist/esm/dso-info-button.entry.js +4 -3
  133. package/dist/esm/dso-info_2.entry.js +3 -3
  134. package/dist/esm/dso-label.entry.js +1 -1
  135. package/dist/esm/dso-map-base-layers.entry.js +1 -1
  136. package/dist/esm/dso-map-controls.entry.js +2 -2
  137. package/dist/esm/dso-map-overlays.entry.js +1 -1
  138. package/dist/esm/dso-ozon-content.entry.js +77 -16
  139. package/dist/esm/dso-pagination.entry.js +99 -7
  140. package/dist/esm/dso-progress-bar.entry.js +2 -2
  141. package/dist/esm/dso-progress-indicator.entry.js +1 -1
  142. package/dist/esm/dso-responsive-element.entry.js +6 -1
  143. package/dist/esm/dso-table.entry.js +85 -0
  144. package/dist/esm/dso-toggletip.entry.js +2 -2
  145. package/dist/esm/dso-toolkit.js +2 -2
  146. package/dist/esm/dso-tooltip.entry.js +1 -1
  147. package/dist/esm/dso-tree-view.entry.js +1 -1
  148. package/dist/esm/dso-viewer-grid.entry.js +11 -5
  149. package/dist/esm/{focus-trap.esm-a01ad6c9.js → focus-trap.esm-e3b5bde3.js} +28 -11
  150. package/dist/esm/{index-1602fde1.js → index-771c1291.js} +7 -1
  151. package/dist/esm/{index.esm-45465af7.js → index.esm-4510c39e.js} +110 -12
  152. package/dist/esm/loader.js +2 -2
  153. package/dist/types/components/accordion/accordion.d.ts +32 -0
  154. package/dist/types/components/accordion/accordion.interfaces.d.ts +20 -0
  155. package/dist/types/components/accordion/accordion.template.d.ts +2 -0
  156. package/dist/types/components/accordion/components/accordion-section.d.ts +25 -0
  157. package/dist/types/components/helpcenter-panel/helpcenter-panel.d.ts +11 -0
  158. package/dist/types/components/image-overlay/image-overlay.d.ts +3 -0
  159. package/dist/types/components/info-button/info-button.d.ts +1 -0
  160. package/dist/types/components/ozon-content/nodes/figuur.node.d.ts +4 -1
  161. package/dist/types/components/ozon-content/nodes/lijst.node.d.ts +6 -0
  162. package/dist/types/components/pagination/pagination.d.ts +15 -0
  163. package/dist/types/components/responsive-element/responsive-element.d.ts +5 -2
  164. package/dist/types/components/responsive-element/responsive-element.interfaces.d.ts +5 -0
  165. package/dist/types/components/responsive-element/responsive-element.template.d.ts +1 -1
  166. package/dist/types/components/table/table.d.ts +26 -0
  167. package/dist/types/components/table/table.interfaces.d.ts +3 -0
  168. package/dist/types/components/table/table.template.d.ts +2 -0
  169. package/dist/types/components.d.ts +128 -0
  170. package/package.json +4 -3
  171. package/readme.md +0 -7
  172. package/dist/collection/icon/dso-icon-sass-function.js +0 -42
  173. package/dist/dso-toolkit/dso-toolkit.css +0 -1
  174. package/dist/dso-toolkit/p-02272301.entry.js +0 -1
  175. package/dist/dso-toolkit/p-10a6db1a.entry.js +0 -1
  176. package/dist/dso-toolkit/p-131d54e3.js +0 -5
  177. package/dist/dso-toolkit/p-1450f113.entry.js +0 -1
  178. package/dist/dso-toolkit/p-15d0f2eb.entry.js +0 -1
  179. package/dist/dso-toolkit/p-3b5f957e.entry.js +0 -1
  180. package/dist/dso-toolkit/p-49938275.entry.js +0 -1
  181. package/dist/dso-toolkit/p-5a56d726.entry.js +0 -1
  182. package/dist/dso-toolkit/p-5e5fbd41.js +0 -5
  183. package/dist/dso-toolkit/p-68d49733.entry.js +0 -1
  184. package/dist/dso-toolkit/p-7b716383.entry.js +0 -1
  185. package/dist/dso-toolkit/p-b95bc2c7.entry.js +0 -1
  186. package/dist/dso-toolkit/p-c1070a58.entry.js +0 -1
  187. package/dist/dso-toolkit/p-c62606a3.js +0 -1
  188. package/dist/dso-toolkit/p-e7888d49.entry.js +0 -1
  189. package/dist/dso-toolkit/p-eb17d45e.entry.js +0 -1
  190. package/dist/dso-toolkit/p-f726111e.entry.js +0 -1
  191. package/dist/dso-toolkit/p-fd8a8509.entry.js +0 -1
  192. package/dist/types/icon/dso-icon-sass-function.d.ts +0 -4
@@ -0,0 +1,296 @@
1
+ @keyframes slideInFromTop {
2
+ 0% {
3
+ opacity: 0;
4
+ }
5
+ 100% {
6
+ opacity: 1;
7
+ }
8
+ }
9
+ .dso-modal .dso-dialog {
10
+ background-color: #fff;
11
+ box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);
12
+ }
13
+ .dso-modal .dso-header {
14
+ border-bottom: 1px solid #ccc;
15
+ min-height: 32px;
16
+ padding: 16px;
17
+ position: relative;
18
+ }
19
+ .dso-modal .dso-header h2 {
20
+ margin: 0;
21
+ max-width: calc(100% - 24px);
22
+ }
23
+ .dso-modal .dso-header .dso-close {
24
+ background-color: transparent;
25
+ border: 0;
26
+ cursor: pointer;
27
+ color: #39870c;
28
+ height: 32px;
29
+ padding: 0;
30
+ position: absolute;
31
+ right: 13px;
32
+ text-align: center;
33
+ top: 16px;
34
+ width: 32px;
35
+ }
36
+ .dso-modal .dso-body {
37
+ height: calc(100% - 96px - 1.5rem);
38
+ max-height: calc(70vh - 144px - 1.5em);
39
+ min-height: 1.5rem;
40
+ overflow-x: auto;
41
+ padding: 32px;
42
+ }
43
+ .dso-modal .dso-body p {
44
+ margin: 0 0 16px;
45
+ }
46
+ .dso-modal .dso-body ul,
47
+ .dso-modal .dso-body ol {
48
+ margin-bottom: 16px;
49
+ }
50
+ .dso-modal .dso-body ul:not(.list-group):not(.dso-link-list):not(.dso-columns-list),
51
+ .dso-modal .dso-body ol:not(.list-group):not(.dso-link-list):not(.dso-columns-list) {
52
+ padding-inline-start: 24px;
53
+ }
54
+ .dso-modal .dso-body pre {
55
+ margin: 0 0 16px;
56
+ }
57
+ .dso-modal .dso-body blockquote {
58
+ padding: 16px 24px;
59
+ }
60
+ .dso-modal .dso-body dso-highlight-box,
61
+ .dso-modal .dso-body .dso-highlight-box {
62
+ margin-bottom: 24px;
63
+ }
64
+ .dso-modal .dso-body img {
65
+ height: auto;
66
+ max-width: 100%;
67
+ }
68
+ .dso-modal .dso-footer {
69
+ min-height: 80px;
70
+ padding: 0 32px 32px;
71
+ text-align: right;
72
+ }
73
+ .dso-modal .dso-footer .dso-tertiary,
74
+ .dso-modal .dso-footer .btn-link {
75
+ float: left;
76
+ line-height: calc(1.5em - 1px);
77
+ padding: 11px 0;
78
+ position: relative;
79
+ }
80
+ .dso-modal.dso-confirm .dso-footer button:first-child {
81
+ float: left;
82
+ }
83
+ @media screen and (min-width: 768px) {
84
+ .dso-modal {
85
+ bottom: 0;
86
+ height: 100%;
87
+ left: 0;
88
+ position: fixed;
89
+ right: 0;
90
+ top: 0;
91
+ z-index: 530;
92
+ }
93
+ .dso-modal .dso-dialog {
94
+ animation: 1s ease-out 0s 1 slideInFromTop;
95
+ margin: auto;
96
+ margin-top: 15vh;
97
+ max-width: 640px;
98
+ opacity: 1;
99
+ }
100
+ .dso-modal .dso-footer .btn + .dso-secondary, .dso-modal .dso-footer .btn + .btn-default, .dso-modal .dso-footer .dso-primary + .dso-secondary, .dso-modal .dso-footer .dso-primary + .btn-default, .dso-modal .dso-footer .dso-secondary + .dso-secondary, .dso-modal .dso-footer .dso-secondary + .btn-default, .dso-modal .dso-footer .dso-tertiary + .dso-secondary, .dso-modal .dso-footer .dso-tertiary + .btn-default {
101
+ margin-left: 16px;
102
+ }
103
+ .dso-modal .dso-footer .btn + .dso-tertiary, .dso-modal .dso-footer .btn + .btn-link, .dso-modal .dso-footer .dso-primary + .dso-tertiary, .dso-modal .dso-footer .dso-primary + .btn-link, .dso-modal .dso-footer .dso-secondary + .dso-tertiary, .dso-modal .dso-footer .dso-secondary + .btn-link, .dso-modal .dso-footer .dso-tertiary + .dso-tertiary, .dso-modal .dso-footer .dso-tertiary + .btn-link {
104
+ margin-left: 0;
105
+ }
106
+ }
107
+ @media screen and (max-width: 767px) {
108
+ .dso-modal {
109
+ max-width: 100%;
110
+ }
111
+ .dso-modal .dso-footer .btn + .btn, .dso-modal .dso-footer .btn + .dso-primary, .dso-modal .dso-footer .btn + .dso-secondary, .dso-modal .dso-footer .btn + .dso-tertiary, .dso-modal .dso-footer .dso-primary + .btn, .dso-modal .dso-footer .dso-primary + .dso-primary, .dso-modal .dso-footer .dso-primary + .dso-secondary, .dso-modal .dso-footer .dso-primary + .dso-tertiary, .dso-modal .dso-footer .dso-secondary + .btn, .dso-modal .dso-footer .dso-secondary + .dso-primary, .dso-modal .dso-footer .dso-secondary + .dso-secondary, .dso-modal .dso-footer .dso-secondary + .dso-tertiary, .dso-modal .dso-footer .dso-tertiary + .btn, .dso-modal .dso-footer .dso-tertiary + .dso-primary, .dso-modal .dso-footer .dso-tertiary + .dso-secondary, .dso-modal .dso-footer .dso-tertiary + .dso-tertiary {
112
+ margin-left: 0;
113
+ }
114
+ .dso-modal .dso-footer button {
115
+ text-align: center;
116
+ width: 100%;
117
+ }
118
+ .dso-modal .dso-footer button + button {
119
+ margin-top: 8px;
120
+ }
121
+ .dso-modal .dso-footer button.dso-tertiary,
122
+ .dso-modal .dso-footer button.dso-tertiary span, .dso-modal .dso-footer button.btn-link,
123
+ .dso-modal .dso-footer button.btn-link span {
124
+ float: none;
125
+ }
126
+ }
127
+
128
+ :host {
129
+ display: block;
130
+ margin-bottom: 24px;
131
+ }
132
+
133
+ .dso-header h2 {
134
+ color: #275937;
135
+ font-size: 1.5rem;
136
+ font-weight: 700;
137
+ }
138
+ .dso-header .dso-close {
139
+ color: #275937;
140
+ }
141
+
142
+ :host .dso-modal {
143
+ inset: 0px;
144
+ height: 100%;
145
+ position: fixed;
146
+ z-index: 530;
147
+ }
148
+
149
+ .dso-modal .dso-dialog.dso-table-dialog {
150
+ max-width: calc(100% - 2rem);
151
+ }
152
+ @media screen and (max-width: 767px) {
153
+ .dso-modal .dso-dialog.dso-table-dialog {
154
+ max-width: 100%;
155
+ }
156
+ }
157
+
158
+ :host([is-responsive]) .dso-table-body {
159
+ border: 1px solid #ccc;
160
+ margin-bottom: 0;
161
+ overflow-y: hidden;
162
+ width: 100%;
163
+ }
164
+ :host([is-responsive]) .dso-table-body.dso-body {
165
+ width: calc(100% - 64px);
166
+ }
167
+
168
+ .dso-table-utilities {
169
+ align-items: center;
170
+ display: flex;
171
+ justify-content: space-between;
172
+ margin-bottom: 8px;
173
+ }
174
+ .dso-table-utilities .dso-responsive-message {
175
+ margin-bottom: 0;
176
+ }
177
+ .dso-table-utilities .dso-responsive-message:only-child {
178
+ width: 100%;
179
+ }
180
+ .dso-table-utilities .open-modal-button:only-child {
181
+ margin-left: auto;
182
+ }
183
+
184
+ .dso-responsive-message {
185
+ font-size: 0.8em;
186
+ margin-bottom: 8px;
187
+ position: relative;
188
+ text-align: center;
189
+ }
190
+
191
+ .dso-tertiary {
192
+ display: inline-block;
193
+ font-size: 1em;
194
+ font-weight: 500;
195
+ margin-bottom: 0;
196
+ text-decoration: none;
197
+ touch-action: manipulation;
198
+ text-align: left;
199
+ user-select: none;
200
+ vertical-align: middle;
201
+ border: 0;
202
+ color: #39870c;
203
+ line-height: 1;
204
+ padding: 0;
205
+ background-color: transparent;
206
+ cursor: pointer;
207
+ }
208
+ .dso-tertiary:focus, .dso-tertiary:focus-visible {
209
+ outline-offset: 2px;
210
+ }
211
+ .dso-tertiary:active {
212
+ outline: 0;
213
+ }
214
+ .dso-tertiary[disabled] {
215
+ color: #afcf9d;
216
+ }
217
+ .dso-tertiary[disabled].dso-spinner-left, .dso-tertiary[disabled].dso-spinner-right {
218
+ color: #39870c;
219
+ }
220
+ .dso-tertiary:not([disabled]):hover {
221
+ color: #676cb0;
222
+ text-decoration: underline;
223
+ text-underline-position: under;
224
+ }
225
+ .dso-tertiary:not([disabled]):active {
226
+ color: #676cb0;
227
+ }
228
+ .dso-tertiary.btn-align {
229
+ line-height: calc(1.5em - 1px);
230
+ padding: 11px 0;
231
+ position: relative;
232
+ }
233
+ .dso-tertiary.dso-spinner-left::before {
234
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
235
+ background-repeat: no-repeat;
236
+ content: "";
237
+ display: inline-block;
238
+ height: 24px;
239
+ vertical-align: middle;
240
+ width: 24px;
241
+ margin-right: 8px;
242
+ }
243
+ .dso-tertiary.dso-spinner-right::after {
244
+ background-image: url("data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E");
245
+ background-repeat: no-repeat;
246
+ content: "";
247
+ display: inline-block;
248
+ height: 24px;
249
+ vertical-align: middle;
250
+ width: 24px;
251
+ margin-left: 8px;
252
+ }
253
+ .dso-tertiary dso-icon + span:not(.sr-only),
254
+ .dso-tertiary svg.di + span:not(.sr-only),
255
+ .dso-tertiary span:not(.sr-only) + dso-icon,
256
+ .dso-tertiary span:not(.sr-only) + svg.di {
257
+ margin-left: 8px;
258
+ }
259
+ .dso-tertiary svg.di.di-chevron-down + span:not(.sr-only),
260
+ .dso-tertiary svg.di.di-chevron-up + span:not(.sr-only),
261
+ .dso-tertiary span:not(.sr-only) + svg.di.di-chevron-down,
262
+ .dso-tertiary span:not(.sr-only) + svg.di.di-chevron-up {
263
+ margin-left: 4px;
264
+ }
265
+ .dso-tertiary dso-icon[icon=chevron-left] + span:not(.sr-only),
266
+ .dso-tertiary dso-icon[icon=chevron-right] + span:not(.sr-only),
267
+ .dso-tertiary svg.di.di-angle-down + span:not(.sr-only),
268
+ .dso-tertiary svg.di.di-angle-up + span:not(.sr-only),
269
+ .dso-tertiary span:not(.sr-only) + svg.di.di-angle-down,
270
+ .dso-tertiary span:not(.sr-only) + svg.di.di-angle-up,
271
+ .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-left],
272
+ .dso-tertiary span:not(.sr-only) + dso-icon[icon=chevron-right] {
273
+ margin-left: 0;
274
+ }
275
+ .dso-tertiary dso-icon,
276
+ .dso-tertiary svg.di,
277
+ .dso-tertiary span {
278
+ vertical-align: middle;
279
+ }
280
+
281
+ .sr-only {
282
+ position: absolute;
283
+ width: 1px;
284
+ height: 1px;
285
+ padding: 0;
286
+ margin: -1px;
287
+ overflow: hidden;
288
+ clip: rect(0, 0, 0, 0);
289
+ border: 0;
290
+ }
291
+
292
+ .dso-table-placeholder {
293
+ box-shadow: inset 0 0 0 1px #ccc;
294
+ display: grid;
295
+ place-content: center;
296
+ }
@@ -0,0 +1,146 @@
1
+ import { h, Component, Element, Host, Prop, State } from '@stencil/core';
2
+ import debounce from 'debounce';
3
+ import { createFocusTrap } from 'focus-trap';
4
+ import { v4 } from 'uuid';
5
+ export class Table {
6
+ constructor() {
7
+ this.labelledbyId = v4();
8
+ /** Prevents the table being opened in a modal. */
9
+ this.noModal = false;
10
+ /** Indicates whether the table is currently horizontally scrollable */
11
+ this.isResponsive = false;
12
+ this.modalActive = false;
13
+ }
14
+ startResponsiveBehavior() {
15
+ var _a;
16
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.observe(this.host);
17
+ }
18
+ componentWillLoad() {
19
+ this.resizeObserver = new ResizeObserver(debounce(entries => this.setResponsiveTable(entries), 200));
20
+ }
21
+ componentDidLoad() {
22
+ this.startResponsiveBehavior();
23
+ }
24
+ componentDidRender() {
25
+ this.setFocusTrap();
26
+ }
27
+ disconnectedCallback() {
28
+ var _a;
29
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
30
+ }
31
+ render() {
32
+ var _a;
33
+ const caption = (_a = this.host.querySelector(':scope > table > caption')) === null || _a === void 0 ? void 0 : _a.textContent;
34
+ return (h(Host, null,
35
+ this.modalActive && this.placeholderHeight && (h("div", { class: "dso-table-placeholder", style: { height: `${this.placeholderHeight}px` } })),
36
+ h("div", { class: { 'dso-modal': this.modalActive } },
37
+ h("div", Object.assign({ class: { 'dso-dialog': this.modalActive, 'dso-table-dialog': true }, ref: element => this.focusTrapElement = element }, this.modalActive ? { ['aria-labelledby']: this.labelledbyId, role: 'dialog' } : {}),
38
+ (this.isResponsive || !this.noModal) && (h("div", { class: "dso-table-utilities", style: this.modalActive ? { display: 'none' } : undefined },
39
+ this.isResponsive && (h("div", { class: "dso-responsive-message" },
40
+ h("span", null, "beweeg de tabel van links naar rechts"))),
41
+ !this.noModal && (h("button", { type: "button", class: "dso-tertiary open-modal-button", ref: element => this.buttonElement = element, onClick: () => this.openModal() },
42
+ h("span", { class: "sr-only" },
43
+ "tabel ", caption !== null && caption !== void 0 ? caption : '',
44
+ " "),
45
+ h("span", null, "vergroten"),
46
+ h("dso-icon", { icon: "external-link" }))))),
47
+ this.modalActive && (h("div", { class: "dso-header" },
48
+ h("h2", { id: this.labelledbyId, class: { 'sr-only': !caption } }, caption || 'Uitvergrote tabel dialoog'),
49
+ h("button", { type: "button", class: "dso-close", onClick: () => this.closeModal() },
50
+ h("dso-icon", { icon: "times" }),
51
+ h("span", { class: "sr-only" }, "Sluiten")))),
52
+ h("div", { class: { 'dso-body': this.modalActive, 'dso-table-body': true } },
53
+ h("slot", null))))));
54
+ }
55
+ openModal() {
56
+ this.placeholderHeight = this.host.clientHeight;
57
+ document.body.classList.add('dso-modal-open');
58
+ this.modalActive = true;
59
+ }
60
+ closeModal() {
61
+ this.placeholderHeight = undefined;
62
+ document.body.classList.remove('dso-modal-open', 'dso-modal-open');
63
+ this.modalActive = false;
64
+ }
65
+ setFocusTrap() {
66
+ var _a, _b;
67
+ if (this.modalActive && this.focusTrapElement && !this.trap) {
68
+ this.trap = createFocusTrap([this.host, this.focusTrapElement], {
69
+ escapeDeactivates: true,
70
+ clickOutsideDeactivates: (e) => {
71
+ if (e instanceof MouseEvent && e.composedPath()[0] === this.focusTrapElement) {
72
+ this.closeModal();
73
+ return false;
74
+ }
75
+ return true;
76
+ },
77
+ setReturnFocus: (_a = this.buttonElement) !== null && _a !== void 0 ? _a : false,
78
+ onDeactivate: () => this.closeModal(),
79
+ tabbableOptions: {
80
+ getShadowRoot: true,
81
+ }
82
+ }).activate();
83
+ }
84
+ else if (!this.modalActive && this.trap) {
85
+ (_b = this.trap) === null || _b === void 0 ? void 0 : _b.deactivate();
86
+ delete this.trap;
87
+ }
88
+ }
89
+ setResponsiveTable([dsoTable]) {
90
+ const tableElement = dsoTable.target.querySelector('table');
91
+ if (dsoTable && tableElement instanceof HTMLTableElement) {
92
+ this.isResponsive = Math.floor(tableElement.getBoundingClientRect().width) > Math.floor(dsoTable.contentRect.width);
93
+ }
94
+ }
95
+ static get is() { return "dso-table"; }
96
+ static get encapsulation() { return "shadow"; }
97
+ static get originalStyleUrls() { return {
98
+ "$": ["table.scss"]
99
+ }; }
100
+ static get styleUrls() { return {
101
+ "$": ["table.css"]
102
+ }; }
103
+ static get properties() { return {
104
+ "noModal": {
105
+ "type": "boolean",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "boolean",
109
+ "resolved": "boolean",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": "Prevents the table being opened in a modal."
117
+ },
118
+ "attribute": "no-modal",
119
+ "reflect": true,
120
+ "defaultValue": "false"
121
+ },
122
+ "isResponsive": {
123
+ "type": "boolean",
124
+ "mutable": false,
125
+ "complexType": {
126
+ "original": "boolean",
127
+ "resolved": "boolean",
128
+ "references": {}
129
+ },
130
+ "required": false,
131
+ "optional": false,
132
+ "docs": {
133
+ "tags": [],
134
+ "text": "Indicates whether the table is currently horizontally scrollable"
135
+ },
136
+ "attribute": "is-responsive",
137
+ "reflect": true,
138
+ "defaultValue": "false"
139
+ }
140
+ }; }
141
+ static get states() { return {
142
+ "modalActive": {},
143
+ "placeholderHeight": {}
144
+ }; }
145
+ static get elementRef() { return "host"; }
146
+ }
@@ -0,0 +1,26 @@
1
+ import { html } from 'lit-html';
2
+ import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
3
+ export function tableTemplate({ noModal, content, }) {
4
+ return html `
5
+ <dso-table
6
+ ?no-modal=${noModal}
7
+ >
8
+ <table class="table">
9
+ <caption>${content.caption}</caption>
10
+
11
+ <thead>
12
+ <tr>
13
+ ${content.head.map(col => html `<th scope="col">${col}</th>`)}
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ ${content.rows.map(row => html `
18
+ <tr>
19
+ ${row.map((col, index) => index === 0 ? html `<th scope="row">${unsafeHTML(col)}</th>` : html `<td>${unsafeHTML(col)}</td>`)}
20
+ </tr>
21
+ `)}
22
+ </tbody>
23
+ </table>
24
+ </dso-table>
25
+ `;
26
+ }
@@ -4,6 +4,10 @@
4
4
  box-sizing: border-box;
5
5
  }
6
6
 
7
+ :host {
8
+ display: inline-block;
9
+ }
10
+
7
11
  :host(:focus) {
8
12
  outline: none;
9
13
  }