@schukai/monster 3.69.2 → 3.70.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 (41) hide show
  1. package/CHANGELOG.md +20 -4
  2. package/package.json +1 -1
  3. package/source/components/datatable/dataset.mjs +278 -202
  4. package/source/components/datatable/datasource/dom.mjs +1 -1
  5. package/source/components/datatable/datasource/rest.mjs +2 -2
  6. package/source/components/datatable/filter.mjs +1 -0
  7. package/source/components/datatable/save-button.mjs +1 -1
  8. package/source/components/datatable/style/datatable.pcss +1 -1
  9. package/source/components/datatable/style/filter-controls-defaults.pcss +1 -1
  10. package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +8 -17
  11. package/source/components/form/context-error.mjs +2 -0
  12. package/source/components/form/context-help.mjs +1 -0
  13. package/source/components/form/field-set.mjs +222 -225
  14. package/source/components/form/form.mjs +192 -545
  15. package/source/components/form/select.mjs +24 -9
  16. package/source/components/form/style/field-set.pcss +84 -7
  17. package/source/components/form/style/form.pcss +5 -3
  18. package/source/components/form/style/select.pcss +5 -4
  19. package/source/components/form/stylesheet/field-set.mjs +7 -14
  20. package/source/components/form/stylesheet/form.mjs +8 -17
  21. package/source/components/form/stylesheet/select.mjs +7 -14
  22. package/source/components/layout/style/collapse.pcss +0 -2
  23. package/source/components/layout/stylesheet/collapse.mjs +7 -14
  24. package/source/components/style/form.pcss +66 -3
  25. package/source/components/style/mixin/property.pcss +8 -1
  26. package/source/components/style/typography.pcss +4 -12
  27. package/source/components/stylesheet/form.mjs +8 -17
  28. package/source/components/stylesheet/mixin/form.mjs +7 -16
  29. package/source/components/stylesheet/mixin/property.mjs +6 -13
  30. package/source/components/stylesheet/typography.mjs +7 -16
  31. package/source/data/datasource/server/restapi.mjs +182 -180
  32. package/source/dom/customelement.mjs +4 -0
  33. package/source/dom/updater.mjs +1 -1
  34. package/source/types/tokenlist.mjs +2 -2
  35. package/test/cases/components/form/form.mjs +1 -182
  36. package/test/cases/components/host/details.mjs +1 -1
  37. package/test/cases/components/host/host.mjs +1 -1
  38. package/test/cases/components/host/overlay.mjs +1 -1
  39. package/test/cases/dom/customcontrol.mjs +1 -1
  40. package/test/cases/dom/customelement.mjs +2 -2
  41. package/source/components/style/mixin/form.pcss +0 -242
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright © schukai GmbH and all contributing authors, {{copyRightYear}}. All rights reserved.
2
+ * Copyright © schukai GmbH and all contributing authors, 2024. All rights reserved.
3
3
  * Node module: @schukai/monster
4
4
  *
5
5
  * This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
@@ -8,14 +8,12 @@
8
8
  * For those who do not wish to adhere to the AGPLv3, a commercial license is available.
9
9
  * Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
10
10
  * For more information about purchasing a commercial license, please contact schukai GmbH.
11
- *
12
- * SPDX-License-Identifier: AGPL-3.0
13
11
  */
14
12
 
15
- import { addAttributeToken } from "../../../dom/attributes.mjs";
16
- import { ATTRIBUTE_ERRORMESSAGE } from "../../../dom/constants.mjs";
13
+ import {addAttributeToken} from "../../../dom/attributes.mjs";
14
+ import {ATTRIBUTE_ERRORMESSAGE} from "../../../dom/constants.mjs";
17
15
 
18
- export { FilterControlsDefaultsStyleSheet };
16
+ export {FilterControlsDefaultsStyleSheet}
19
17
 
20
18
  /**
21
19
  * @private
@@ -24,17 +22,10 @@ export { FilterControlsDefaultsStyleSheet };
24
22
  const FilterControlsDefaultsStyleSheet = new CSSStyleSheet();
25
23
 
26
24
  try {
27
- FilterControlsDefaultsStyleSheet.insertRule(
28
- `
25
+ FilterControlsDefaultsStyleSheet.insertRule(`
29
26
  @layer filtercontrolsdefaults {
30
- [data-monster-role=control]{outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}div[data-monster-role=popper]{align-content:center;background:var(--monster-bg-color-primary-1);border-color:var(--monster-bg-color-primary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);box-shadow:var(--monster-box-shadow-1);box-sizing:border-box;color:var(--monster-color-primary-1);display:none;justify-content:space-between;left:0;padding:1.1em;position:absolute;top:0;width:-moz-max-content;width:max-content;z-index:var(--monster-z-index-modal)}div[data-monster-role=popper] div[data-monster-role=arrow]{background:var(--monster-bg-color-primary-1);height:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);pointer-events:none;position:absolute;width:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);z-index:-1}div[data-monster-role=control]{display:flex;height:100%;position:relative}div[data-monster-role=control] .form-container{margin:0 auto;max-width:600px}div[data-monster-role=control] .form-container .form-group{margin-bottom:.2rem}div[data-monster-role=control] .form-container .form-group input[type=number]{text-align:right;width:5rem}div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-inner-spin-button,div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-outer-spin-button{margin-left:10px}div[data-monster-role=control] .form-container .form-group input[type=radio]{accent-color:var(--monster-bg-color-primary-3)}[data-monster-role=popper]{position:absolute}
31
- }`,
32
- 0,
33
- );
27
+ [data-monster-role=control]{outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}div[data-monster-role=popper]{align-content:center;background:var(--monster-bg-color-primary-1);border-color:var(--monster-bg-color-primary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);box-shadow:var(--monster-box-shadow-1);box-sizing:border-box;color:var(--monster-color-primary-1);display:none;justify-content:space-between;left:0;padding:1.1em;position:absolute;top:0;width:-moz-max-content;width:max-content;z-index:var(--monster-z-index-modal)}div[data-monster-role=popper] div[data-monster-role=arrow]{background:var(--monster-bg-color-primary-1);height:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);pointer-events:none;position:absolute;width:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);z-index:-1}input,meter,progress,select,textarea{accent-color:var(--monster-color-secondary-2);background-color:var(--monster-bg-color-primary-1);border-color:var(--monster-theme-control-border-color);border-radius:var(--monster-theme-control-border-radius);border-style:var(--monster-theme-control-border-style);border-width:var(--monster-theme-control-border-width);box-sizing:border-box;color:var(--monster-color-primary-1);font-family:inherit;font-size:100%;margin:0;outline:none}input,select,textarea{height:-moz-fit-content;height:fit-content;padding:.4rem .6rem}textarea{min-height:6rem;resize:vertical}input[type=color]{height:2rem;margin:0;padding:.1rem;width:2rem}input:hover:not([type=radio]):not([type=checkbox]):not([type=range]),select:hover,textarea:hover{box-shadow:var(--monster-box-shadow-2);transition:background .8s,color .25s .0833333333s}input:focus,select:focus,textarea:focus{outline:1px dashed var(--monster-color-selection-3);outline-offset:3px}div[data-monster-role=control]{display:flex;height:100%;position:relative}div[data-monster-role=control] .form-container{margin:0 auto;max-width:600px}div[data-monster-role=control] .form-container .form-group{margin-bottom:.2rem}div[data-monster-role=control] .form-container .form-group input[type=number]{text-align:right;width:5rem}div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-inner-spin-button,div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-outer-spin-button{margin-left:10px}div[data-monster-role=control] .form-container .form-group input[type=radio]{accent-color:var(--monster-bg-color-primary-3)}[data-monster-role=popper]{position:absolute}
28
+ }`, 0);
34
29
  } catch (e) {
35
- addAttributeToken(
36
- document.getRootNode().querySelector("html"),
37
- ATTRIBUTE_ERRORMESSAGE,
38
- e + "",
39
- );
30
+ addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
40
31
  }
@@ -118,6 +118,8 @@ class ContextError extends Popper {
118
118
  classes: {
119
119
  button: "monster-theme-error-2",
120
120
  },
121
+
122
+ display: "inline-block"
121
123
  });
122
124
  }
123
125
 
@@ -88,6 +88,7 @@ class ContextHelp extends Popper {
88
88
  main: getTemplate(),
89
89
  },
90
90
  mode: "auto",
91
+ display: "inline-block"
91
92
  });
92
93
  }
93
94
 
@@ -12,25 +12,25 @@
12
12
  * SPDX-License-Identifier: AGPL-3.0
13
13
  */
14
14
 
15
- import { instanceSymbol } from "../../constants.mjs";
16
- import { addAttributeToken } from "../../dom/attributes.mjs";
15
+ import {instanceSymbol} from "../../constants.mjs";
16
+ import {addAttributeToken} from "../../dom/attributes.mjs";
17
17
  import {
18
- ATTRIBUTE_ERRORMESSAGE,
19
- ATTRIBUTE_ROLE,
18
+ ATTRIBUTE_ERRORMESSAGE,
19
+ ATTRIBUTE_ROLE,
20
20
  } from "../../dom/constants.mjs";
21
- import { CustomControl } from "../../dom/customcontrol.mjs";
21
+ import {CustomControl} from "../../dom/customcontrol.mjs";
22
22
  import {
23
- assembleMethodSymbol,
24
- getSlottedElements,
25
- registerCustomElement,
23
+ assembleMethodSymbol,
24
+ getSlottedElements,
25
+ registerCustomElement,
26
26
  } from "../../dom/customelement.mjs";
27
- import { isFunction } from "../../types/is.mjs";
28
- import { FieldSetStyleSheet } from "./stylesheet/field-set.mjs";
27
+ import {isFunction} from "../../types/is.mjs";
28
+ import {FieldSetStyleSheet} from "./stylesheet/field-set.mjs";
29
29
  import "../layout/collapse.mjs";
30
30
  import "./toggle-switch.mjs";
31
31
 
32
- export { FieldSet };
33
-
32
+ export {FieldSet};
33
+
34
34
  /**
35
35
  * @private
36
36
  * @type {symbol}
@@ -101,179 +101,178 @@ const extendedSwitchElementSymbol = Symbol("extendedSwitchElement");
101
101
  * @summary A simple FieldSet
102
102
  */
103
103
  class FieldSet extends CustomControl {
104
- /**
105
- * This method is called by the `instanceof` operator.
106
- * @returns {symbol}
107
- */
108
- static get [instanceSymbol]() {
109
- return Symbol.for("@schukai/monster/components/form/fieldset@@instance");
110
- }
111
-
112
- /**
113
- * @return {Components.Form.FieldSet
114
- */
115
- [assembleMethodSymbol]() {
116
- super[assembleMethodSymbol]();
117
- initControlReferences.call(this);
118
- initEventHandler.call(this);
119
- updateExtendedFields.call(this);
120
- return this;
121
- }
122
-
123
- /**
124
- * To set the options via the html tag the attribute `data-monster-options` must be used.
125
- * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
126
- *
127
- * The individual configuration values can be found in the table.
128
- *
129
- * @property {Object} templates Template definitions
130
- * @property {string} templates.main Main template
131
- * @property {Object} labels Label definitions
132
- * @property {Object} actions Callbacks
133
- * @property {string} actions.click="throw Error" Callback when clicked
134
- * @property {Object} features Features
135
- * @property {Object} classes CSS classes
136
- * @property {boolean} disabled=false Disabled state
137
- */
138
- get defaults() {
139
- return Object.assign({}, super.defaults, {
140
- templates: {
141
- main: getTemplate(),
142
- },
143
- labels: {
144
- "toggle-switch-on": "✔",
145
- "toggle-switch-off": "✖",
146
- "toggle-switch-label": "Expand",
147
- title: "",
148
- },
149
- classes: {},
150
- disabled: false,
151
- features: {},
152
- actions: {
153
- click: () => {
154
- throw new Error("the click action is not defined");
155
- },
156
- },
157
- value: null,
158
- });
159
- }
160
-
161
- /**
162
- *
163
- * @return {string}
164
- */
165
- static getTag() {
166
- return "monster-field-set";
167
- }
168
-
169
- /**
170
- *
171
- * @return {CSSStyleSheet[]}
172
- */
173
- static getCSSStyleSheet() {
174
- return [FieldSetStyleSheet];
175
- }
176
-
177
- /**
178
- * The FieldSet.click() method simulates a click on the internal element.
179
- *
180
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click}
181
- */
182
- click() {
183
- if (this.getOption("disabled") === true) {
184
- return;
185
- }
186
-
187
- if (
188
- this[fieldSetElementSymbol] &&
189
- isFunction(this[fieldSetElementSymbol].click)
190
- ) {
191
- this[fieldSetElementSymbol].click();
192
- }
193
- }
194
-
195
- /**
196
- * The Button.focus() method sets focus on the internal element.
197
- *
198
- * @param {Object} options
199
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus}
200
- */
201
- focus(options) {
202
- if (this.getOption("disabled") === true) {
203
- return;
204
- }
205
-
206
- if (
207
- this[fieldSetElementSymbol] &&
208
- isFunction(this[fieldSetElementSymbol].focus)
209
- ) {
210
- this[fieldSetElementSymbol].focus(options);
211
- }
212
- }
213
-
214
- /**
215
- * The Button.blur() method removes focus from the internal element.
216
- */
217
- blur() {
218
- if (
219
- this[fieldSetElementSymbol] &&
220
- isFunction(this[fieldSetElementSymbol].blur)
221
- ) {
222
- this[fieldSetElementSymbol].blur();
223
- }
224
- }
225
-
226
- /**
227
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals}
228
- * @return {boolean}
229
- */
230
- static get formAssociated() {
231
- return true;
232
- }
233
-
234
- /**
235
- * The current value of the form control.
236
- *
237
- * ```js
238
- * e = document.querySelector('monster-field-set');
239
- * console.log(e.value)
240
- * ```
241
- *
242
- * @property {string}
243
- */
244
- get value() {
245
- return this.getOption("value");
246
- }
247
-
248
- /**
249
- * Set value of the form control.
250
- *
251
- * ```
252
- * e = document.querySelector('monster-field-set');
253
- * e.value=1
254
- * ```
255
- *
256
- * @property {string} value
257
- * @throws {Error} unsupported type
258
- */
259
- set value(value) {
260
- this.setOption("value", value);
261
- try {
262
- this?.setFormValue(this.value);
263
- } catch (e) {
264
- addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message);
265
- }
266
- }
104
+ /**
105
+ * This method is called by the `instanceof` operator.
106
+ * @returns {symbol}
107
+ */
108
+ static get [instanceSymbol]() {
109
+ return Symbol.for("@schukai/monster/components/form/fieldset@@instance");
110
+ }
111
+
112
+ /**
113
+ * @return {Components.Form.FieldSet
114
+ */
115
+ [assembleMethodSymbol]() {
116
+ super[assembleMethodSymbol]();
117
+ initControlReferences.call(this);
118
+ initEventHandler.call(this);
119
+ updateExtendedFields.call(this);
120
+ return this;
121
+ }
122
+
123
+ /**
124
+ * To set the options via the html tag the attribute `data-monster-options` must be used.
125
+ * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
126
+ *
127
+ * The individual configuration values can be found in the table.
128
+ *
129
+ * @property {Object} templates Template definitions
130
+ * @property {string} templates.main Main template
131
+ * @property {Object} labels Label definitions
132
+ * @property {Object} actions Callbacks
133
+ * @property {string} actions.click="throw Error" Callback when clicked
134
+ * @property {Object} features Features
135
+ * @property {Object} classes CSS classes
136
+ * @property {boolean} disabled=false Disabled state
137
+ */
138
+ get defaults() {
139
+ return Object.assign({}, super.defaults, {
140
+ templates: {
141
+ main: getTemplate(),
142
+ },
143
+ labels: {
144
+ "toggle-switch-on": "✔",
145
+ "toggle-switch-off": "✖",
146
+ "toggle-switch-label": "Expand",
147
+ title: "",
148
+ },
149
+ classes: {},
150
+ disabled: false,
151
+ features: {},
152
+ actions: {
153
+ click: () => {
154
+ throw new Error("the click action is not defined");
155
+ },
156
+ },
157
+ value: null,
158
+ });
159
+ }
160
+
161
+ /**
162
+ *
163
+ * @return {string}
164
+ */
165
+ static getTag() {
166
+ return "monster-field-set";
167
+ }
168
+
169
+ /**
170
+ *
171
+ * @return {CSSStyleSheet[]}
172
+ */
173
+ static getCSSStyleSheet() {
174
+ return [FieldSetStyleSheet];
175
+ }
176
+
177
+ /**
178
+ * The FieldSet.click() method simulates a click on the internal element.
179
+ *
180
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click}
181
+ */
182
+ click() {
183
+ if (this.getOption("disabled") === true) {
184
+ return;
185
+ }
186
+
187
+ if (
188
+ this[fieldSetElementSymbol] &&
189
+ isFunction(this[fieldSetElementSymbol].click)
190
+ ) {
191
+ this[fieldSetElementSymbol].click();
192
+ }
193
+ }
194
+
195
+ /**
196
+ * The Button.focus() method sets focus on the internal element.
197
+ *
198
+ * @param {Object} options
199
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus}
200
+ */
201
+ focus(options) {
202
+ if (this.getOption("disabled") === true) {
203
+ return;
204
+ }
205
+
206
+ if (
207
+ this[fieldSetElementSymbol] &&
208
+ isFunction(this[fieldSetElementSymbol].focus)
209
+ ) {
210
+ this[fieldSetElementSymbol].focus(options);
211
+ }
212
+ }
213
+
214
+ /**
215
+ * The Button.blur() method removes focus from the internal element.
216
+ */
217
+ blur() {
218
+ if (
219
+ this[fieldSetElementSymbol] &&
220
+ isFunction(this[fieldSetElementSymbol].blur)
221
+ ) {
222
+ this[fieldSetElementSymbol].blur();
223
+ }
224
+ }
225
+
226
+ /**
227
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals}
228
+ * @return {boolean}
229
+ */
230
+ static get formAssociated() {
231
+ return true;
232
+ }
233
+
234
+ /**
235
+ * The current value of the form control.
236
+ *
237
+ * ```js
238
+ * e = document.querySelector('monster-field-set');
239
+ * console.log(e.value)
240
+ * ```
241
+ *
242
+ * @property {string}
243
+ */
244
+ get value() {
245
+ return this.getOption("value");
246
+ }
247
+
248
+ /**
249
+ * Set value of the form control.
250
+ *
251
+ * ```
252
+ * e = document.querySelector('monster-field-set');
253
+ * e.value=1
254
+ * ```
255
+ *
256
+ * @property {string} value
257
+ * @throws {Error} unsupported type
258
+ */
259
+ set value(value) {
260
+ this.setOption("value", value);
261
+ try {
262
+ this?.setFormValue(this.value);
263
+ } catch (e) {
264
+ addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message);
265
+ }
266
+ }
267
267
  }
268
268
 
269
269
  function updateExtendedFields() {
270
- const nodes = getSlottedElements.call(this, "", "extended");
271
- console.log(nodes.size);
272
- if (nodes.size > 0) {
273
- this[extendedSwitchSymbol].classList.remove("hidden");
274
- } else {
275
- this[extendedSwitchSymbol].classList.add("hidden");
276
- }
270
+ const nodes = getSlottedElements.call(this, "", "extended");
271
+ if (nodes.size > 0) {
272
+ this[extendedSwitchSymbol].classList.remove("hidden");
273
+ } else {
274
+ this[extendedSwitchSymbol].classList.add("hidden");
275
+ }
277
276
  }
278
277
 
279
278
  /**
@@ -282,53 +281,53 @@ function updateExtendedFields() {
282
281
  * @fires Monster.Components.Form.event:monster-field-set-clicked
283
282
  */
284
283
  function initEventHandler() {
285
- this[toggleSwitchElementSymbol].setOption(
286
- "labels.toggle-switch-on",
287
- this.getOption("labels.toggle-switch-on"),
288
- );
289
- this[toggleSwitchElementSymbol].setOption(
290
- "labels.toggle-switch-off",
291
- this.getOption("labels.toggle-switch-off"),
292
- );
293
-
294
- this[toggleSwitchElementSymbol].setOption("actions.on", () => {
295
- this[collapseElementSymbol].open();
296
- });
297
-
298
- this[toggleSwitchElementSymbol].setOption("actions.off", () => {
299
- this[collapseElementSymbol].close();
300
- });
301
-
302
- return this;
284
+ this[toggleSwitchElementSymbol].setOption(
285
+ "labels.toggle-switch-on",
286
+ this.getOption("labels.toggle-switch-on"),
287
+ );
288
+ this[toggleSwitchElementSymbol].setOption(
289
+ "labels.toggle-switch-off",
290
+ this.getOption("labels.toggle-switch-off"),
291
+ );
292
+
293
+ this[toggleSwitchElementSymbol].setOption("actions.on", () => {
294
+ this[collapseElementSymbol].open();
295
+ });
296
+
297
+ this[toggleSwitchElementSymbol].setOption("actions.off", () => {
298
+ this[collapseElementSymbol].close();
299
+ });
300
+
301
+ return this;
303
302
  }
304
303
 
305
304
  /**
306
305
  * @private
307
306
  */
308
307
  function initControlReferences() {
309
- this[fieldSetElementSymbol] = this.shadowRoot.querySelector(
310
- `[${ATTRIBUTE_ROLE}="control"]`,
311
- );
308
+ this[fieldSetElementSymbol] = this.shadowRoot.querySelector(
309
+ `[${ATTRIBUTE_ROLE}="control"]`,
310
+ );
312
311
 
313
- this[extendedSwitchElementSymbol] = this.shadowRoot.querySelector(
314
- `[${ATTRIBUTE_ROLE}="extended-switch"]`,
315
- );
312
+ this[extendedSwitchElementSymbol] = this.shadowRoot.querySelector(
313
+ `[${ATTRIBUTE_ROLE}="extended-switch"]`,
314
+ );
316
315
 
317
- this[collapseElementSymbol] = this.shadowRoot.querySelector(
318
- `[${ATTRIBUTE_ROLE}="collapse"]`,
319
- );
316
+ this[collapseElementSymbol] = this.shadowRoot.querySelector(
317
+ `[${ATTRIBUTE_ROLE}="collapse"]`,
318
+ );
320
319
 
321
- this[headerElementSymbol] = this.shadowRoot.querySelector(
322
- `[${ATTRIBUTE_ROLE}="header"]`,
323
- );
320
+ this[headerElementSymbol] = this.shadowRoot.querySelector(
321
+ `[${ATTRIBUTE_ROLE}="header"]`,
322
+ );
324
323
 
325
- this[extendedSwitchSymbol] = this.shadowRoot.querySelector(
326
- `[${ATTRIBUTE_ROLE}="extended-switch"]`,
327
- );
324
+ this[extendedSwitchSymbol] = this.shadowRoot.querySelector(
325
+ `[${ATTRIBUTE_ROLE}="extended-switch"]`,
326
+ );
328
327
 
329
- this[toggleSwitchElementSymbol] = this.shadowRoot.querySelector(
330
- `monster-toggle-switch`,
331
- );
328
+ this[toggleSwitchElementSymbol] = this.shadowRoot.querySelector(
329
+ `monster-toggle-switch`,
330
+ );
332
331
  }
333
332
 
334
333
  /**
@@ -336,8 +335,8 @@ function initControlReferences() {
336
335
  * @return {string}
337
336
  */
338
337
  function getTemplate() {
339
- // language=HTML
340
- return `
338
+ // language=HTML
339
+ return `
341
340
  <div data-monster-role="control" part="control">
342
341
  <div data-monster-role="header">
343
342
  <div data-monster-replace="path:labels.title" data-monster-role="title"></div>
@@ -346,16 +345,14 @@ function getTemplate() {
346
345
  <monster-toggle-switch></monster-toggle-switch>
347
346
  </div>
348
347
  </div>
349
- <div>
348
+ <div data-monster-role="container">
350
349
  <div class="collapse-alignment">
351
- <slot></slot>
350
+ <slot part="content"></slot>
352
351
  </div>
353
352
  <monster-collapse data-monster-role="collapse">
354
- <slot name="extended"></slot>
353
+ <slot name="extended" part="extended"></slot>
355
354
  </monster-collapse>
356
355
  </div>
357
-
358
-
359
356
  </div>`;
360
357
  }
361
358