@schukai/monster 3.55.6 → 3.56.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/package.json +2 -2
- package/source/components/datatable/change-button.mjs +265 -0
- package/source/components/datatable/dataset.mjs +76 -5
- package/source/components/datatable/datasource/dom.mjs +1 -1
- package/source/components/datatable/datasource/rest.mjs +401 -345
- package/source/components/datatable/datasource.mjs +8 -0
- package/source/components/datatable/datatable.mjs +600 -600
- package/source/components/datatable/filter/range.mjs +1 -3
- package/source/components/datatable/filter/select.mjs +1 -1
- package/source/components/datatable/filter.mjs +1 -3
- package/source/components/datatable/save-button.mjs +301 -0
- package/source/components/datatable/status.mjs +6 -2
- package/source/components/datatable/style/change-button.pcss +19 -0
- package/source/components/datatable/style/save-button.pcss +44 -0
- package/source/components/datatable/stylesheet/change-button.mjs +27 -0
- package/source/components/datatable/stylesheet/save-button.mjs +27 -0
- package/source/components/datatable/util.mjs +3 -1
- package/source/components/form/button-bar.mjs +3 -3
- package/source/components/form/button.mjs +1 -2
- package/source/components/form/form.mjs +1 -1
- package/source/components/form/message-state-button.mjs +1 -1
- package/source/components/form/select.mjs +1744 -1777
- package/source/components/form/state-button.mjs +1 -1
- package/source/components/form/tabs.mjs +3 -3
- package/source/components/form/tree-select.mjs +6 -2
- package/source/components/host/overlay.mjs +4 -1
- package/source/components/tree-menu/tree-menu.mjs +0 -1
- package/source/data/datasource/server/restapi.mjs +2 -3
- package/source/data/datasource/server.mjs +1 -1
- package/source/data/extend.mjs +55 -55
- package/source/data/pathfinder.mjs +6 -4
- package/source/dom/constants.mjs +9 -0
- package/source/dom/customelement.mjs +25 -7
- package/source/dom/updater.mjs +34 -3
- package/source/i18n/translations.mjs +1 -1
- package/source/monster.mjs +0 -1
- package/source/types/noderecursiveiterator.mjs +2 -3
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
@@ -402,9 +402,7 @@ function initEventHandler() {
|
|
402
402
|
this.addEventListener("keydown", (event) => {
|
403
403
|
// if key code esc than hide dialog
|
404
404
|
if (event.key === "Escape") {
|
405
|
-
console.log("esc");
|
406
405
|
hide.call(this);
|
407
|
-
|
408
406
|
setTimeout(() => {
|
409
407
|
this[inputElementSymbol].focus();
|
410
408
|
}, 10);
|
@@ -417,7 +415,7 @@ function initEventHandler() {
|
|
417
415
|
"data-monster-role",
|
418
416
|
"input",
|
419
417
|
);
|
420
|
-
|
418
|
+
|
421
419
|
if (!input) {
|
422
420
|
return;
|
423
421
|
}
|
@@ -685,11 +685,9 @@ function initEventHandler() {
|
|
685
685
|
}
|
686
686
|
|
687
687
|
function initTabEvents() {
|
688
|
-
|
689
688
|
this[filterTabElementSymbol].addEventListener(
|
690
689
|
"monster-tab-changed",
|
691
690
|
(event) => {
|
692
|
-
|
693
691
|
const query = event?.detail?.data?.["data-monster-query"];
|
694
692
|
const q = this.getOption("query");
|
695
693
|
if (query !== q) {
|
@@ -816,7 +814,7 @@ function updateFilterTabs() {
|
|
816
814
|
* @param showEffect
|
817
815
|
* @returns {Promise<*>}
|
818
816
|
*/
|
819
|
-
function doSearch({ showEffect } = { showEffect: true }) {
|
817
|
+
function doSearch({ showEffect } = { showEffect: true }) {
|
820
818
|
|
821
819
|
this.resetFailureMessage();
|
822
820
|
|
@@ -0,0 +1,301 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2023 schukai GmbH
|
3
|
+
* SPDX-License-Identifier: AGPL-3.0
|
4
|
+
*/
|
5
|
+
|
6
|
+
import { instanceSymbol, internalSymbol } from "../../constants.mjs";
|
7
|
+
import { diff } from "../../data/diff.mjs";
|
8
|
+
import {
|
9
|
+
assembleMethodSymbol,
|
10
|
+
CustomElement,
|
11
|
+
attributeObserverSymbol,
|
12
|
+
registerCustomElement,
|
13
|
+
} from "../../dom/customelement.mjs";
|
14
|
+
import { isString, isArray } from "../../types/is.mjs";
|
15
|
+
import { Observer } from "../../types/observer.mjs";
|
16
|
+
import { TokenList } from "../../types/tokenlist.mjs";
|
17
|
+
import { clone } from "../../util/clone.mjs";
|
18
|
+
import { State } from "../form/types/state.mjs";
|
19
|
+
import { ATTRIBUTE_DATASOURCE_SELECTOR } from "./constants.mjs";
|
20
|
+
import { Datasource } from "./datasource.mjs";
|
21
|
+
import { BadgeStyleSheet } from "../stylesheet/badge.mjs";
|
22
|
+
import { SaveButtonStyleSheet } from "./stylesheet/save-button.mjs";
|
23
|
+
|
24
|
+
import {
|
25
|
+
handleDataSourceChanges,
|
26
|
+
datasourceLinkedElementSymbol,
|
27
|
+
} from "./util.mjs";
|
28
|
+
|
29
|
+
export { SaveButton };
|
30
|
+
|
31
|
+
/**
|
32
|
+
* @private
|
33
|
+
* @type {symbol}
|
34
|
+
*/
|
35
|
+
const stateButtonElementSymbol = Symbol("stateButtonElement");
|
36
|
+
|
37
|
+
/**
|
38
|
+
* @private
|
39
|
+
* @type {symbol}
|
40
|
+
*/
|
41
|
+
const badgeElementSymbol = Symbol("badgeElement");
|
42
|
+
|
43
|
+
class SaveButton extends CustomElement {
|
44
|
+
/**
|
45
|
+
* This method is called by the `instanceof` operator.
|
46
|
+
* @returns {symbol}
|
47
|
+
*/
|
48
|
+
static get [instanceSymbol]() {
|
49
|
+
return Symbol.for(
|
50
|
+
"@schukai/monster/components/datasource/save-button@@instance",
|
51
|
+
);
|
52
|
+
}
|
53
|
+
|
54
|
+
/**
|
55
|
+
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
56
|
+
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
57
|
+
*
|
58
|
+
* The individual configuration values can be found in the table.
|
59
|
+
*
|
60
|
+
* @property {Object} templates Template definitions
|
61
|
+
* @property {string} templates.main Main template
|
62
|
+
* @property {object} datasource The datasource
|
63
|
+
* @property {string} datasource.selector The selector of the datasource
|
64
|
+
* @property {object} mapping The mapping
|
65
|
+
* @property {string} mapping.data The data
|
66
|
+
* @property {number} mapping.index The index
|
67
|
+
* @property {Array} data The data
|
68
|
+
* @return {Object}
|
69
|
+
*/
|
70
|
+
get defaults() {
|
71
|
+
const obj = Object.assign({}, super.defaults, {
|
72
|
+
templates: {
|
73
|
+
main: getTemplate(),
|
74
|
+
},
|
75
|
+
|
76
|
+
labels: {
|
77
|
+
button: "save",
|
78
|
+
},
|
79
|
+
|
80
|
+
classes: {
|
81
|
+
bar: "monster-button-primary",
|
82
|
+
badge: "monster-badge-secondary hidden",
|
83
|
+
},
|
84
|
+
|
85
|
+
datasource: {
|
86
|
+
selector: null,
|
87
|
+
},
|
88
|
+
|
89
|
+
changes: "0",
|
90
|
+
|
91
|
+
mapping: {
|
92
|
+
data: "dataset",
|
93
|
+
index: 0,
|
94
|
+
},
|
95
|
+
|
96
|
+
data: {},
|
97
|
+
|
98
|
+
disabled: false,
|
99
|
+
});
|
100
|
+
|
101
|
+
updateOptionsFromArguments.call(this, obj);
|
102
|
+
return obj;
|
103
|
+
}
|
104
|
+
|
105
|
+
/**
|
106
|
+
*
|
107
|
+
* @return {string}
|
108
|
+
*/
|
109
|
+
static getTag() {
|
110
|
+
return "monster-datasource-save-button";
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
* This method is responsible for assembling the component.
|
115
|
+
*
|
116
|
+
* It calls the parent's assemble method first, then initializes control references and event handlers.
|
117
|
+
* If the `datasource.selector` option is provided and is a string, it searches for the corresponding
|
118
|
+
* element in the DOM using that selector.
|
119
|
+
*
|
120
|
+
* If the selector matches exactly one element, it checks if the element is an instance of the `Datasource` class.
|
121
|
+
*
|
122
|
+
* If it is, the component's `datasourceLinkedElementSymbol` property is set to the element, and the component
|
123
|
+
* attaches an observer to the datasource's changes.
|
124
|
+
*
|
125
|
+
* The observer is a function that calls the `handleDataSourceChanges` method in the context of the component.
|
126
|
+
* Additionally, the component attaches an observer to itself, which also calls the `handleDataSourceChanges`
|
127
|
+
* method in the component's context.
|
128
|
+
*/
|
129
|
+
[assembleMethodSymbol]() {
|
130
|
+
super[assembleMethodSymbol]();
|
131
|
+
const self = this;
|
132
|
+
|
133
|
+
initControlReferences.call(this);
|
134
|
+
initEventHandler.call(this);
|
135
|
+
|
136
|
+
const selector = this.getOption("datasource.selector");
|
137
|
+
|
138
|
+
if (isString(selector)) {
|
139
|
+
const elements = document.querySelectorAll(selector);
|
140
|
+
if (elements.length !== 1) {
|
141
|
+
throw new Error("the selector must match exactly one element");
|
142
|
+
}
|
143
|
+
|
144
|
+
const element = elements[0];
|
145
|
+
if (!(element instanceof Datasource)) {
|
146
|
+
throw new TypeError("the element must be a datasource");
|
147
|
+
}
|
148
|
+
|
149
|
+
this[datasourceLinkedElementSymbol] = element;
|
150
|
+
element.datasource.attachObserver(
|
151
|
+
new Observer(handleDataSourceChanges.bind(this)),
|
152
|
+
);
|
153
|
+
|
154
|
+
let originValues;
|
155
|
+
|
156
|
+
element.datasource.attachObserver(
|
157
|
+
new Observer(function () {
|
158
|
+
if (!originValues) {
|
159
|
+
originValues = clone(self[datasourceLinkedElementSymbol].data);
|
160
|
+
}
|
161
|
+
|
162
|
+
const currentValues = this.getRealSubject();
|
163
|
+
|
164
|
+
const result = diff(originValues, currentValues);
|
165
|
+
if (isArray(result) && result.length > 0) {
|
166
|
+
self[stateButtonElementSymbol].setState("changed");
|
167
|
+
self[stateButtonElementSymbol].setOption("disabled", false);
|
168
|
+
self.setOption("changes", result.length);
|
169
|
+
self.setOption(
|
170
|
+
"classes.badge",
|
171
|
+
new TokenList(self.getOption("classes.badge"))
|
172
|
+
.remove("hidden")
|
173
|
+
.toString(),
|
174
|
+
);
|
175
|
+
} else {
|
176
|
+
self[stateButtonElementSymbol].removeState();
|
177
|
+
self[stateButtonElementSymbol].setOption("disabled", true);
|
178
|
+
self.setOption("changes", 0);
|
179
|
+
self.setOption(
|
180
|
+
"classes.badge",
|
181
|
+
new TokenList(self.getOption("classes.badge"))
|
182
|
+
.add("hidden")
|
183
|
+
.toString(),
|
184
|
+
);
|
185
|
+
}
|
186
|
+
}),
|
187
|
+
);
|
188
|
+
}
|
189
|
+
|
190
|
+
this.attachObserver(
|
191
|
+
new Observer(() => {
|
192
|
+
handleDataSourceChanges.call(this);
|
193
|
+
}),
|
194
|
+
);
|
195
|
+
}
|
196
|
+
|
197
|
+
/**
|
198
|
+
*
|
199
|
+
* @return [CSSStyleSheet]
|
200
|
+
*/
|
201
|
+
static getCSSStyleSheet() {
|
202
|
+
return [SaveButtonStyleSheet, BadgeStyleSheet];
|
203
|
+
}
|
204
|
+
}
|
205
|
+
|
206
|
+
/**
|
207
|
+
* @private
|
208
|
+
* @return {Monster.Components.Datatable.Form}
|
209
|
+
*/
|
210
|
+
function initControlReferences() {
|
211
|
+
if (!this.shadowRoot) {
|
212
|
+
throw new Error("no shadow-root is defined");
|
213
|
+
}
|
214
|
+
|
215
|
+
this[stateButtonElementSymbol] = this.shadowRoot.querySelector(
|
216
|
+
"[data-monster-role=state-button]",
|
217
|
+
);
|
218
|
+
|
219
|
+
this[badgeElementSymbol] = this.shadowRoot.querySelector(
|
220
|
+
"[data-monster-role=badge]",
|
221
|
+
);
|
222
|
+
|
223
|
+
if (this[stateButtonElementSymbol]) {
|
224
|
+
setTimeout(() => {
|
225
|
+
const states = {
|
226
|
+
changed: new State(
|
227
|
+
"changed",
|
228
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cloud-arrow-up" viewBox="0 0 16 16">\n' +
|
229
|
+
' <path fill-rule="evenodd" d="M7.646 5.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 6.707V10.5a.5.5 0 0 1-1 0V6.707L6.354 7.854a.5.5 0 1 1-.708-.708z"/>\n' +
|
230
|
+
' <path d="M4.406 3.342A5.53 5.53 0 0 1 8 2c2.69 0 4.923 2 5.166 4.579C14.758 6.804 16 8.137 16 9.773 16 11.569 14.502 13 12.687 13H3.781C1.708 13 0 11.366 0 9.318c0-1.763 1.266-3.223 2.942-3.593.143-.863.698-1.723 1.464-2.383m.653.757c-.757.653-1.153 1.44-1.153 2.056v.448l-.445.049C2.064 6.805 1 7.952 1 9.318 1 10.785 2.23 12 3.781 12h8.906C13.98 12 15 10.988 15 9.773c0-1.216-1.02-2.228-2.313-2.228h-.5v-.5C12.188 4.825 10.328 3 8 3a4.53 4.53 0 0 0-2.941 1.1z"/>\n' +
|
231
|
+
"</svg>",
|
232
|
+
),
|
233
|
+
};
|
234
|
+
|
235
|
+
this[stateButtonElementSymbol].removeState();
|
236
|
+
this[stateButtonElementSymbol].setOption("disabled", "disabled");
|
237
|
+
this[stateButtonElementSymbol].setOption("states", states);
|
238
|
+
this[stateButtonElementSymbol].setOption(
|
239
|
+
"labels.button",
|
240
|
+
this.getOption("labels.button"),
|
241
|
+
);
|
242
|
+
}, 1);
|
243
|
+
}
|
244
|
+
|
245
|
+
return this;
|
246
|
+
}
|
247
|
+
|
248
|
+
/**
|
249
|
+
* @private
|
250
|
+
*/
|
251
|
+
function initEventHandler() {
|
252
|
+
setTimeout(() => {
|
253
|
+
this[stateButtonElementSymbol].setOption("actions.click", () => {
|
254
|
+
this[datasourceLinkedElementSymbol]
|
255
|
+
.write()
|
256
|
+
.then(() => {
|
257
|
+
this[stateButtonElementSymbol].removeState();
|
258
|
+
this[stateButtonElementSymbol].setOption("disabled", true);
|
259
|
+
this.setOption("changes", 0);
|
260
|
+
this.setOption(
|
261
|
+
"classes.badge",
|
262
|
+
new TokenList(this.getOption("classes.badge"))
|
263
|
+
.add("hidden")
|
264
|
+
.toString(),
|
265
|
+
);
|
266
|
+
})
|
267
|
+
.catch((error) => {
|
268
|
+
console.error(error);
|
269
|
+
});
|
270
|
+
});
|
271
|
+
}, 1);
|
272
|
+
}
|
273
|
+
|
274
|
+
/**
|
275
|
+
* @param {Object} options
|
276
|
+
*/
|
277
|
+
function updateOptionsFromArguments(options) {
|
278
|
+
const selector = this.getAttribute(ATTRIBUTE_DATASOURCE_SELECTOR);
|
279
|
+
if (selector) {
|
280
|
+
options.datasource.selector = selector;
|
281
|
+
}
|
282
|
+
}
|
283
|
+
|
284
|
+
/**
|
285
|
+
* @private
|
286
|
+
* @return {string}
|
287
|
+
*/
|
288
|
+
function getTemplate() {
|
289
|
+
// language=HTML
|
290
|
+
return `
|
291
|
+
<div data-monster-role="control" part="control"
|
292
|
+
data-monster-attributes="disabled path:disabled | if:true">
|
293
|
+
<monster-state-button data-monster-role="state-button">save</monster-state-button>
|
294
|
+
<div data-monster-attributes="disabled path:disabled | if:true, class path:classes.badge"
|
295
|
+
data-monster-role="badge"
|
296
|
+
data-monster-replace="path:changes"></div>
|
297
|
+
</div>
|
298
|
+
`;
|
299
|
+
}
|
300
|
+
|
301
|
+
registerCustomElement(SaveButton);
|
@@ -79,7 +79,9 @@ class DatasourceStatus extends CustomElement {
|
|
79
79
|
* @returns {symbol}
|
80
80
|
*/
|
81
81
|
static get [instanceSymbol]() {
|
82
|
-
return Symbol.for(
|
82
|
+
return Symbol.for(
|
83
|
+
"@schukai/monster/components/datatables/status@@instance",
|
84
|
+
);
|
83
85
|
}
|
84
86
|
|
85
87
|
/**
|
@@ -181,6 +183,7 @@ function initEventHandler() {
|
|
181
183
|
element.addEventListener("monster-datasource-fetch", function () {
|
182
184
|
self.setOption("state.spinner", "show");
|
183
185
|
});
|
186
|
+
|
184
187
|
element.addEventListener("monster-datasource-error", function (event) {
|
185
188
|
self.setOption("state.spinner", "hide");
|
186
189
|
|
@@ -214,7 +217,8 @@ function initEventHandler() {
|
|
214
217
|
function getTemplate() {
|
215
218
|
// language=HTML
|
216
219
|
return `
|
217
|
-
|
220
|
+
<div data-monster-role="control" part="control"
|
221
|
+
data-monster-attributes="disabled path:disabled | if:true">
|
218
222
|
<monster-context-error
|
219
223
|
data-monster-option-classes-button="monster-theme-error-2 monster-bg-color-primary-2"></monster-context-error>
|
220
224
|
<div class="monster-spinner monster-theme-primary-4"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@import "../../style/normalize.pcss";
|
2
|
+
@import "../../style/display.pcss";
|
3
|
+
@import "../../style/mixin/button.pcss";
|
4
|
+
@import "../../style/button.pcss";
|
5
|
+
@import "../../style/mixin/typography.pcss";
|
6
|
+
@import "../../style/mixin/hover.pcss";
|
7
|
+
@import "../../style/control.pcss";
|
8
|
+
@import "../../style/property.pcss";
|
9
|
+
@import "../../style/ripple.pcss";
|
10
|
+
|
11
|
+
|
12
|
+
[data-monster-role=control] {
|
13
|
+
|
14
|
+
|
15
|
+
}
|
16
|
+
|
17
|
+
:host {
|
18
|
+
|
19
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
@import "../../style/normalize.pcss";
|
2
|
+
@import "../../style/display.pcss";
|
3
|
+
@import "../../style/mixin/button.pcss";
|
4
|
+
@import "../../style/button.pcss";
|
5
|
+
@import "../../style/mixin/typography.pcss";
|
6
|
+
@import "../../style/mixin/hover.pcss";
|
7
|
+
@import "../../style/control.pcss";
|
8
|
+
@import "../../style/property.pcss";
|
9
|
+
@import "../../style/ripple.pcss";
|
10
|
+
|
11
|
+
|
12
|
+
[data-monster-role=control] {
|
13
|
+
position: relative;
|
14
|
+
align-items: center;
|
15
|
+
display: flex;
|
16
|
+
flex-direction: row;
|
17
|
+
justify-content: center;
|
18
|
+
flex-wrap: nowrap;
|
19
|
+
width: fit-content;
|
20
|
+
|
21
|
+
|
22
|
+
& [data-monster-role=badge] {
|
23
|
+
z-index: var(--monster-z-index-sticky);
|
24
|
+
position: absolute;
|
25
|
+
top: 0;
|
26
|
+
left: 0;
|
27
|
+
transform: translate(-4px, -7px);
|
28
|
+
|
29
|
+
&.hidden {
|
30
|
+
display: none !important;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
}
|
35
|
+
|
36
|
+
:host {
|
37
|
+
align-items: center;
|
38
|
+
display: flex;
|
39
|
+
flex-direction: row;
|
40
|
+
justify-content: center;
|
41
|
+
flex-wrap: nowrap;
|
42
|
+
width: fit-content;
|
43
|
+
align-self: center;
|
44
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* Copyright schukai GmbH and contributors 2024. All Rights Reserved.
|
4
|
+
* Node module: @schukai/monster
|
5
|
+
* This file is licensed under the AGPLv3 License.
|
6
|
+
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
|
7
|
+
*/
|
8
|
+
|
9
|
+
import {addAttributeToken} from "../../../dom/attributes.mjs";
|
10
|
+
import {ATTRIBUTE_ERRORMESSAGE} from "../../../dom/constants.mjs";
|
11
|
+
|
12
|
+
export {ChangeButtonStyleSheet}
|
13
|
+
|
14
|
+
/**
|
15
|
+
* @private
|
16
|
+
* @type {CSSStyleSheet}
|
17
|
+
*/
|
18
|
+
const ChangeButtonStyleSheet = new CSSStyleSheet();
|
19
|
+
|
20
|
+
try {
|
21
|
+
ChangeButtonStyleSheet.insertRule(`
|
22
|
+
@layer changebutton {
|
23
|
+
:where(html){line-height:1.15;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}:where(h1){font-size:2em;margin-block-end:.67em;margin-block-start:.67em}:where(dl,ol,ul) :where(dl,ol,ul){margin-block-end:0;margin-block-start:0}:where(hr){box-sizing:content-box;color:inherit;height:0}:where(abbr[title]){text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(b,strong){font-weight:bolder}:where(code,kbd,pre,samp){font-family:monospace,monospace;font-size:1em}:where(small){font-size:80%}:where(table){border-color:currentColor;text-indent:0}:where(button,input,select){margin:0}:where(button){text-transform:none}:where(button,input:is([type=button i],[type=reset i],[type=submit i])){-webkit-appearance:button}:where(progress){vertical-align:baseline}:where(select){text-transform:none}:where(textarea){margin:0}:where(input[type=search i]){-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focus-inner{border-style:none;padding:0}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focusring{outline:1px dotted ButtonText}:where(:-moz-ui-invalid){box-shadow:none}:where(dialog){background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:fit-content}:where(dialog:not([open])){display:none}:where(summary){display:list-item}html{height:100%}body,html{min-height:calc(100vh - 40px)}body{box-sizing:border-box;margin:0;padding:0;word-break:break-word}.block{display:block}.inline{display:inline}.inline-block{display:inline-block}.grid{display:grid}.inline-grid{display:inline-grid}.flex{display:flex}.inline-flex{display:inline-flex}.hidden,.hide,.none{display:none}.visible{visibility:visible}.invisible{visibility:hidden}.monster-button-primary,button{align-items:center;background-position:50%;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);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}.monster-button-primary{background-color:var(--monster-bg-color-primary-4);border-color:var(--monster-bg-color-primary-4);color:var(--monster-color-primary-4)}.monster-button-secondary{background-color:var(--monster-bg-color-secondary-4);border-color:var(--monster-bg-color-secondary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);color:var(--monster-color-secondary-4)}.monster-button-secondary,.monster-button-tertiary{align-items:center;background-position:50%;box-shadow:var(--monster-box-shadow-1);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}.monster-button-tertiary{background-color:var(--monster-bg-color-tertiary-4);border-color:var(--monster-bg-color-tertiary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);color:var(--monster-color-tertiary-4)}.monster-button-outline-primary{background-color:var(--monster-color-primary-4);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);color:var(--monster-bg-color-primary-4)}.monster-button-outline-primary,.monster-button-outline-secondary{align-items:center;background-position:50%;box-shadow:var(--monster-box-shadow-1);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}.monster-button-outline-secondary{background-color:var(--monster-color-secondary-4);border-color:var(--monster-bg-color-secondary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);color:var(--monster-bg-color-secondary-4)}.monster-button-outline-tertiary{align-items:center;background-color:var(--monster-color-tertiary-4);background-position:50%;border-color:var(--monster-bg-color-tertiary-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);color:var(--monster-bg-color-tertiary-4);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}button:active,button:hover{box-shadow:var(--monster-box-shadow-2);transition:background .8s,color .25s .0833333333s}button:active{z-index:var(--monster-z-index-outline)}.monster-button-bar,.monster-button-group{align-content:center;align-items:stretch;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.monster-button-group{box-sizing:border-box;gap:0;margin:1rem 0}.monster-button-group>:not(:last-child){margin-right:calc(var(--monster-border-width)*-1)}.monster-button-group :hover{box-shadow:none}button:focus{outline:1px dashed var(--monster-color-selection-4);outline-offset:2px;z-index:var(--monster-z-index-outline)}@media (prefers-color-scheme:light){button:focus{outline:1px dashed var(--monster-color-selection-3);outline-offset:2px;z-index:var(--monster-z-index-outline)}}[data-monster-role=control]{outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}:after,:before,:root{--monster-font-family:-apple-system,BlinkMacSystemFont,\"Quicksand\",\"Segoe UI\",\"Roboto\",\"Oxygen\",\"Ubuntu\",\"Cantarell\",\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\";--monster-color-primary-1:var(--monster-color-gray-6);--monster-color-primary-2:var(--monster-color-gray-6);--monster-color-primary-3:var(--monster-color-gray-1);--monster-color-primary-4:var(--monster-color-gray-1);--monster-bg-color-primary-1:var(--monster-color-gray-1);--monster-bg-color-primary-2:var(--monster-color-gray-2);--monster-bg-color-primary-3:var(--monster-color-gray-3);--monster-bg-color-primary-4:var(--monster-color-gray-6);--monster-color-secondary-1:var(--monster-color-red-4);--monster-color-secondary-2:var(--monster-color-red-4);--monster-color-secondary-3:var(--monster-color-red-1);--monster-color-secondary-4:var(--monster-color-red-1);--monster-bg-color-secondary-1:var(--monster-color-gray-1);--monster-bg-color-secondary-2:var(--monster-color-red-2);--monster-bg-color-secondary-3:var(--monster-color-red-3);--monster-bg-color-secondary-4:var(--monster-color-red-6);--monster-color-tertiary-1:var(--monster-color-magenta-4);--monster-color-tertiary-2:var(--monster-color-magenta-4);--monster-color-tertiary-3:var(--monster-color-magenta-6);--monster-color-tertiary-4:var(--monster-color-magenta-1);--monster-bg-color-tertiary-1:var(--monster-color-gray-1);--monster-bg-color-tertiary-2:var(--monster-color-magenta-1);--monster-bg-color-tertiary-3:var(--monster-color-magenta-2);--monster-bg-color-tertiary-4:var(--monster-color-magenta-6);--monster-color-destructive-1:var(--monster-color-red-1);--monster-color-destructive-2:var(--monster-color-red-4);--monster-color-destructive-3:var(--monster-color-red-6);--monster-color-destructive-4:var(--monster-color-red-1);--monster-bg-color-destructive-1:var(--monster-color-red-4);--monster-bg-color-destructive-2:var(--monster-color-gray-1);--monster-bg-color-destructive-3:var(--monster-color-red-2);--monster-bg-color-destructive-4:var(--monster-color-red-5);--monster-color-success-1:var(--monster-color-green-1);--monster-color-success-2:var(--monster-color-green-4);--monster-color-success-3:var(--monster-color-green-6);--monster-color-success-4:var(--monster-color-green-1);--monster-bg-color-success-1:var(--monster-color-green-3);--monster-bg-color-success-2:var(--monster-color-gray-1);--monster-bg-color-success-3:var(--monster-color-green-2);--monster-bg-color-success-4:var(--monster-color-green-5);--monster-color-warning-1:var(--monster-color-orange-1);--monster-color-warning-2:var(--monster-color-orange-4);--monster-color-warning-3:var(--monster-color-orange-6);--monster-color-warning-4:var(--monster-color-orange-1);--monster-bg-color-warning-1:var(--monster-color-orange-3);--monster-bg-color-warning-2:var(--monster-color-gray-1);--monster-bg-color-warning-3:var(--monster-color-orange-2);--monster-bg-color-warning-4:var(--monster-color-orange-5);--monster-color-error-1:var(--monster-color-red-1);--monster-color-error-2:var(--monster-color-red-4);--monster-color-error-3:var(--monster-color-red-6);--monster-color-error-4:var(--monster-color-red-1);--monster-bg-color-error-1:var(--monster-color-red-4);--monster-bg-color-error-2:var(--monster-color-gray-1);--monster-bg-color-error-3:var(--monster-color-red-2);--monster-bg-color-error-4:var(--monster-color-red-5);--monster-color-selection-1:var(--monster-color-gray-6);--monster-color-selection-2:var(--monster-color-gray-6);--monster-color-selection-3:var(--monster-color-gray-6);--monster-color-selection-4:var(--monster-color-gray-1);--monster-bg-color-selection-1:var(--monster-color-yellow-2);--monster-bg-color-selection-2:var(--monster-color-yellow-1);--monster-bg-color-selection-3:var(--monster-color-yellow-2);--monster-bg-color-selection-4:var(--monster-color-yellow-6);--monster-color-primary-disabled-1:var(--monster-color-gray-3);--monster-color-primary-disabled-2:var(--monster-color-gray-1);--monster-color-primary-disabled-3:var(--monster-color-gray-4);--monster-color-primary-disabled-4:var(--monster-color-gray-4);--monster-bg-color-primary-disabled-1:var(--monster-color-gray-1);--monster-bg-color-primary-disabled-2:var(--monster-color-gray-2);--monster-bg-color-primary-disabled-3:var(--monster-color-gray-3);--monster-bg-color-primary-disabled-4:var(--monster-color-gray-6);--monster-color-gradient-1:#833ab4;--monster-color-gradient-2:#fd1d1d;--monster-color-gradient-3:#fcb045;--monster-box-shadow-1:none;--monster-box-shadow-2:-1px 1px 10px 1px hsla(0,0%,76%,.61);--monster-text-shadow:none;--monster-border-style:solid;--monster-border-width:2px;--monster-border-radius:0;--monster-popper-witharrrow-distance:-4px;--monster-z-index-default:0;--monster-z-index-outline:10;--monster-z-index-dropdown:200;--monster-z-index-dropdown-overlay:210;--monster-z-index-sticky:300;--monster-z-index-sticky-overlay:310;--monster-z-index-fixed:400;--monster-z-index-fixed-overlay:410;--monster-z-index-modal-backdrop:500;--monster-z-index-modal-backdrop-overlay:510;--monster-z-index-offcanvas:600;--monster-z-index-offcanvas-overlay:610;--monster-z-index-modal:700;--monster-z-index-modal-overlay:710;--monster-z-index-popover:800;--monster-z-index-popover-overlay:810;--monster-z-index-tooltip:800;--monster-z-index-tooltip-overlay:910;--monster-space-0:0;--monster-space-1:2px;--monster-space-2:4px;--monster-space-3:6px;--monster-space-4:10px;--monster-space-5:16px;--monster-space-6:26px;--monster-space-7:42px;--monster-breakpoint-0:480px;--monster-breakpoint-4:480px;--monster-breakpoint-7:768px;--monster-breakpoint-9:992px;--monster-breakpoint-12:1200px}@media (prefers-color-scheme:dark){:after,:before,:root{--monster-color-primary-1:var(--monster-color-gray-1);--monster-color-primary-2:var(--monster-color-gray-1);--monster-color-primary-3:var(--monster-color-gray-6);--monster-color-primary-4:var(--monster-color-gray-6);--monster-bg-color-primary-1:var(--monster-color-gray-6);--monster-bg-color-primary-2:var(--monster-color-gray-3);--monster-bg-color-primary-3:var(--monster-color-gray-2);--monster-bg-color-primary-4:var(--monster-color-gray-1);--monster-color-secondary-1:var(--monster-color-red-1);--monster-color-secondary-2:var(--monster-color-red-1);--monster-color-secondary-3:var(--monster-color-red-6);--monster-color-secondary-4:var(--monster-color-red-4);--monster-bg-color-secondary-1:var(--monster-color-gray-6);--monster-bg-color-secondary-2:var(--monster-color-red-3);--monster-bg-color-secondary-3:var(--monster-color-red-2);--monster-bg-color-secondary-4:var(--monster-color-red-1);--monster-color-tertiary-1:var(--monster-color-magenta-1);--monster-color-tertiary-2:var(--monster-color-magenta-6);--monster-color-tertiary-3:var(--monster-color-magenta-4);--monster-color-tertiary-4:var(--monster-color-magenta-4);--monster-bg-color-tertiary-1:var(--monster-color-gray-6);--monster-bg-color-tertiary-2:var(--monster-color-magenta-2);--monster-bg-color-tertiary-3:var(--monster-color-magenta-1);--monster-bg-color-tertiary-4:var(--monster-color-magenta-1);--monster-color-destructive-1:var(--monster-color-red-1);--monster-color-destructive-2:var(--monster-color-red-3);--monster-color-destructive-3:var(--monster-color-red-4);--monster-color-destructive-4:var(--monster-color-red-1);--monster-bg-color-destructive-1:var(--monster-color-red-5);--monster-bg-color-destructive-2:var(--monster-color-gray-6);--monster-bg-color-destructive-3:var(--monster-color-red-1);--monster-bg-color-destructive-4:var(--monster-color-red-4);--monster-color-success-1:var(--monster-color-green-1);--monster-color-success-2:var(--monster-color-green-2);--monster-color-success-3:var(--monster-color-green-4);--monster-color-success-4:var(--monster-color-green-1);--monster-bg-color-success-1:var(--monster-color-green-5);--monster-bg-color-success-2:var(--monster-color-gray-6);--monster-bg-color-success-3:var(--monster-color-green-1);--monster-bg-color-success-4:var(--monster-color-green-3);--monster-color-warning-1:var(--monster-color-orange-1);--monster-color-warning-2:var(--monster-color-orange-3);--monster-color-warning-3:var(--monster-color-orange-4);--monster-color-warning-4:var(--monster-color-orange-1);--monster-bg-color-warning-1:var(--monster-color-orange-5);--monster-bg-color-warning-2:var(--monster-color-gray-6);--monster-bg-color-warning-3:var(--monster-color-orange-1);--monster-bg-color-warning-4:var(--monster-color-orange-3);--monster-color-error-1:var(--monster-color-red-1);--monster-color-error-2:var(--monster-color-red-3);--monster-color-error-3:var(--monster-color-red-4);--monster-color-error-4:var(--monster-color-red-1);--monster-bg-color-error-1:var(--monster-color-red-5);--monster-bg-color-error-2:var(--monster-color-gray-6);--monster-bg-color-error-3:var(--monster-color-red-1);--monster-bg-color-error-4:var(--monster-color-red-4);--monster-color-selection-1:var(--monster-color-gray-6);--monster-color-selection-2:var(--monster-color-gray-6);--monster-color-selection-3:var(--monster-color-gray-6);--monster-color-selection-4:var(--monster-color-gray-1);--monster-bg-color-selection-1:var(--monster-color-yellow-2);--monster-bg-color-selection-2:var(--monster-color-yellow-1);--monster-bg-color-selection-3:var(--monster-color-yellow-2);--monster-bg-color-selection-4:var(--monster-color-yellow-6);--monster-color-primary-disabled-1:var(--monster-color-gray-4);--monster-color-primary-disabled-2:var(--monster-color-gray-4);--monster-color-primary-disabled-3:var(--monster-color-gray-3);--monster-color-primary-disabled-4:var(--monster-color-gray-3);--monster-bg-color-primary-disabled-1:var(--monster-color-gray-6);--monster-bg-color-primary-disabled-2:var(--monster-color-gray-3);--monster-bg-color-primary-disabled-3:var(--monster-color-gray-2);--monster-bg-color-primary-disabled-4:var(--monster-color-gray-1)}}span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:hsla(0,0%,100%,.7);border-radius:50%;position:absolute;transform:scale(0)}@keyframes monster-fx-ripple{to{opacity:0;transform:scale(4)}}
|
24
|
+
}`, 0);
|
25
|
+
} catch (e) {
|
26
|
+
addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* Copyright schukai GmbH and contributors 2024. All Rights Reserved.
|
4
|
+
* Node module: @schukai/monster
|
5
|
+
* This file is licensed under the AGPLv3 License.
|
6
|
+
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
|
7
|
+
*/
|
8
|
+
|
9
|
+
import {addAttributeToken} from "../../../dom/attributes.mjs";
|
10
|
+
import {ATTRIBUTE_ERRORMESSAGE} from "../../../dom/constants.mjs";
|
11
|
+
|
12
|
+
export {SaveButtonStyleSheet}
|
13
|
+
|
14
|
+
/**
|
15
|
+
* @private
|
16
|
+
* @type {CSSStyleSheet}
|
17
|
+
*/
|
18
|
+
const SaveButtonStyleSheet = new CSSStyleSheet();
|
19
|
+
|
20
|
+
try {
|
21
|
+
SaveButtonStyleSheet.insertRule(`
|
22
|
+
@layer savebutton {
|
23
|
+
:where(html){line-height:1.15;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}:where(h1){font-size:2em;margin-block-end:.67em;margin-block-start:.67em}:where(dl,ol,ul) :where(dl,ol,ul){margin-block-end:0;margin-block-start:0}:where(hr){box-sizing:content-box;color:inherit;height:0}:where(abbr[title]){text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(b,strong){font-weight:bolder}:where(code,kbd,pre,samp){font-family:monospace,monospace;font-size:1em}:where(small){font-size:80%}:where(table){border-color:currentColor;text-indent:0}:where(button,input,select){margin:0}:where(button){text-transform:none}:where(button,input:is([type=button i],[type=reset i],[type=submit i])){-webkit-appearance:button}:where(progress){vertical-align:baseline}:where(select){text-transform:none}:where(textarea){margin:0}:where(input[type=search i]){-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focus-inner{border-style:none;padding:0}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focusring{outline:1px dotted ButtonText}:where(:-moz-ui-invalid){box-shadow:none}:where(dialog){background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:fit-content}:where(dialog:not([open])){display:none}:where(summary){display:list-item}html{height:100%}body,html{min-height:calc(100vh - 40px)}body{box-sizing:border-box;margin:0;padding:0;word-break:break-word}.block{display:block}.inline{display:inline}.inline-block{display:inline-block}.grid{display:grid}.inline-grid{display:inline-grid}.flex{display:flex}.inline-flex{display:inline-flex}.hidden,.hide,.none{display:none}.visible{visibility:visible}.invisible{visibility:hidden}.monster-button-primary,button{align-items:center;background-position:50%;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);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}.monster-button-primary{background-color:var(--monster-bg-color-primary-4);border-color:var(--monster-bg-color-primary-4);color:var(--monster-color-primary-4)}.monster-button-secondary{background-color:var(--monster-bg-color-secondary-4);border-color:var(--monster-bg-color-secondary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);color:var(--monster-color-secondary-4)}.monster-button-secondary,.monster-button-tertiary{align-items:center;background-position:50%;box-shadow:var(--monster-box-shadow-1);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}.monster-button-tertiary{background-color:var(--monster-bg-color-tertiary-4);border-color:var(--monster-bg-color-tertiary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);color:var(--monster-color-tertiary-4)}.monster-button-outline-primary{background-color:var(--monster-color-primary-4);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);color:var(--monster-bg-color-primary-4)}.monster-button-outline-primary,.monster-button-outline-secondary{align-items:center;background-position:50%;box-shadow:var(--monster-box-shadow-1);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}.monster-button-outline-secondary{background-color:var(--monster-color-secondary-4);border-color:var(--monster-bg-color-secondary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);color:var(--monster-bg-color-secondary-4)}.monster-button-outline-tertiary{align-items:center;background-color:var(--monster-color-tertiary-4);background-position:50%;border-color:var(--monster-bg-color-tertiary-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);color:var(--monster-bg-color-tertiary-4);cursor:pointer;display:flex;font-family:var(--monster-font-family);font-size:1rem;font-weight:400;gap:.4rem;justify-content:center;line-height:1.5;outline:none;overflow:hidden;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:-webkit-fill-available;width:-moz-available;width:stretch}button:active,button:hover{box-shadow:var(--monster-box-shadow-2);transition:background .8s,color .25s .0833333333s}button:active{z-index:var(--monster-z-index-outline)}.monster-button-bar,.monster-button-group{align-content:center;align-items:stretch;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.monster-button-group{box-sizing:border-box;gap:0;margin:1rem 0}.monster-button-group>:not(:last-child){margin-right:calc(var(--monster-border-width)*-1)}.monster-button-group :hover{box-shadow:none}button:focus{outline:1px dashed var(--monster-color-selection-4);outline-offset:2px;z-index:var(--monster-z-index-outline)}@media (prefers-color-scheme:light){button:focus{outline:1px dashed var(--monster-color-selection-3);outline-offset:2px;z-index:var(--monster-z-index-outline)}}[data-monster-role=control]{outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}:after,:before,:root{--monster-font-family:-apple-system,BlinkMacSystemFont,\"Quicksand\",\"Segoe UI\",\"Roboto\",\"Oxygen\",\"Ubuntu\",\"Cantarell\",\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\";--monster-color-primary-1:var(--monster-color-gray-6);--monster-color-primary-2:var(--monster-color-gray-6);--monster-color-primary-3:var(--monster-color-gray-1);--monster-color-primary-4:var(--monster-color-gray-1);--monster-bg-color-primary-1:var(--monster-color-gray-1);--monster-bg-color-primary-2:var(--monster-color-gray-2);--monster-bg-color-primary-3:var(--monster-color-gray-3);--monster-bg-color-primary-4:var(--monster-color-gray-6);--monster-color-secondary-1:var(--monster-color-red-4);--monster-color-secondary-2:var(--monster-color-red-4);--monster-color-secondary-3:var(--monster-color-red-1);--monster-color-secondary-4:var(--monster-color-red-1);--monster-bg-color-secondary-1:var(--monster-color-gray-1);--monster-bg-color-secondary-2:var(--monster-color-red-2);--monster-bg-color-secondary-3:var(--monster-color-red-3);--monster-bg-color-secondary-4:var(--monster-color-red-6);--monster-color-tertiary-1:var(--monster-color-magenta-4);--monster-color-tertiary-2:var(--monster-color-magenta-4);--monster-color-tertiary-3:var(--monster-color-magenta-6);--monster-color-tertiary-4:var(--monster-color-magenta-1);--monster-bg-color-tertiary-1:var(--monster-color-gray-1);--monster-bg-color-tertiary-2:var(--monster-color-magenta-1);--monster-bg-color-tertiary-3:var(--monster-color-magenta-2);--monster-bg-color-tertiary-4:var(--monster-color-magenta-6);--monster-color-destructive-1:var(--monster-color-red-1);--monster-color-destructive-2:var(--monster-color-red-4);--monster-color-destructive-3:var(--monster-color-red-6);--monster-color-destructive-4:var(--monster-color-red-1);--monster-bg-color-destructive-1:var(--monster-color-red-4);--monster-bg-color-destructive-2:var(--monster-color-gray-1);--monster-bg-color-destructive-3:var(--monster-color-red-2);--monster-bg-color-destructive-4:var(--monster-color-red-5);--monster-color-success-1:var(--monster-color-green-1);--monster-color-success-2:var(--monster-color-green-4);--monster-color-success-3:var(--monster-color-green-6);--monster-color-success-4:var(--monster-color-green-1);--monster-bg-color-success-1:var(--monster-color-green-3);--monster-bg-color-success-2:var(--monster-color-gray-1);--monster-bg-color-success-3:var(--monster-color-green-2);--monster-bg-color-success-4:var(--monster-color-green-5);--monster-color-warning-1:var(--monster-color-orange-1);--monster-color-warning-2:var(--monster-color-orange-4);--monster-color-warning-3:var(--monster-color-orange-6);--monster-color-warning-4:var(--monster-color-orange-1);--monster-bg-color-warning-1:var(--monster-color-orange-3);--monster-bg-color-warning-2:var(--monster-color-gray-1);--monster-bg-color-warning-3:var(--monster-color-orange-2);--monster-bg-color-warning-4:var(--monster-color-orange-5);--monster-color-error-1:var(--monster-color-red-1);--monster-color-error-2:var(--monster-color-red-4);--monster-color-error-3:var(--monster-color-red-6);--monster-color-error-4:var(--monster-color-red-1);--monster-bg-color-error-1:var(--monster-color-red-4);--monster-bg-color-error-2:var(--monster-color-gray-1);--monster-bg-color-error-3:var(--monster-color-red-2);--monster-bg-color-error-4:var(--monster-color-red-5);--monster-color-selection-1:var(--monster-color-gray-6);--monster-color-selection-2:var(--monster-color-gray-6);--monster-color-selection-3:var(--monster-color-gray-6);--monster-color-selection-4:var(--monster-color-gray-1);--monster-bg-color-selection-1:var(--monster-color-yellow-2);--monster-bg-color-selection-2:var(--monster-color-yellow-1);--monster-bg-color-selection-3:var(--monster-color-yellow-2);--monster-bg-color-selection-4:var(--monster-color-yellow-6);--monster-color-primary-disabled-1:var(--monster-color-gray-3);--monster-color-primary-disabled-2:var(--monster-color-gray-1);--monster-color-primary-disabled-3:var(--monster-color-gray-4);--monster-color-primary-disabled-4:var(--monster-color-gray-4);--monster-bg-color-primary-disabled-1:var(--monster-color-gray-1);--monster-bg-color-primary-disabled-2:var(--monster-color-gray-2);--monster-bg-color-primary-disabled-3:var(--monster-color-gray-3);--monster-bg-color-primary-disabled-4:var(--monster-color-gray-6);--monster-color-gradient-1:#833ab4;--monster-color-gradient-2:#fd1d1d;--monster-color-gradient-3:#fcb045;--monster-box-shadow-1:none;--monster-box-shadow-2:-1px 1px 10px 1px hsla(0,0%,76%,.61);--monster-text-shadow:none;--monster-border-style:solid;--monster-border-width:2px;--monster-border-radius:0;--monster-popper-witharrrow-distance:-4px;--monster-z-index-default:0;--monster-z-index-outline:10;--monster-z-index-dropdown:200;--monster-z-index-dropdown-overlay:210;--monster-z-index-sticky:300;--monster-z-index-sticky-overlay:310;--monster-z-index-fixed:400;--monster-z-index-fixed-overlay:410;--monster-z-index-modal-backdrop:500;--monster-z-index-modal-backdrop-overlay:510;--monster-z-index-offcanvas:600;--monster-z-index-offcanvas-overlay:610;--monster-z-index-modal:700;--monster-z-index-modal-overlay:710;--monster-z-index-popover:800;--monster-z-index-popover-overlay:810;--monster-z-index-tooltip:800;--monster-z-index-tooltip-overlay:910;--monster-space-0:0;--monster-space-1:2px;--monster-space-2:4px;--monster-space-3:6px;--monster-space-4:10px;--monster-space-5:16px;--monster-space-6:26px;--monster-space-7:42px;--monster-breakpoint-0:480px;--monster-breakpoint-4:480px;--monster-breakpoint-7:768px;--monster-breakpoint-9:992px;--monster-breakpoint-12:1200px}@media (prefers-color-scheme:dark){:after,:before,:root{--monster-color-primary-1:var(--monster-color-gray-1);--monster-color-primary-2:var(--monster-color-gray-1);--monster-color-primary-3:var(--monster-color-gray-6);--monster-color-primary-4:var(--monster-color-gray-6);--monster-bg-color-primary-1:var(--monster-color-gray-6);--monster-bg-color-primary-2:var(--monster-color-gray-3);--monster-bg-color-primary-3:var(--monster-color-gray-2);--monster-bg-color-primary-4:var(--monster-color-gray-1);--monster-color-secondary-1:var(--monster-color-red-1);--monster-color-secondary-2:var(--monster-color-red-1);--monster-color-secondary-3:var(--monster-color-red-6);--monster-color-secondary-4:var(--monster-color-red-4);--monster-bg-color-secondary-1:var(--monster-color-gray-6);--monster-bg-color-secondary-2:var(--monster-color-red-3);--monster-bg-color-secondary-3:var(--monster-color-red-2);--monster-bg-color-secondary-4:var(--monster-color-red-1);--monster-color-tertiary-1:var(--monster-color-magenta-1);--monster-color-tertiary-2:var(--monster-color-magenta-6);--monster-color-tertiary-3:var(--monster-color-magenta-4);--monster-color-tertiary-4:var(--monster-color-magenta-4);--monster-bg-color-tertiary-1:var(--monster-color-gray-6);--monster-bg-color-tertiary-2:var(--monster-color-magenta-2);--monster-bg-color-tertiary-3:var(--monster-color-magenta-1);--monster-bg-color-tertiary-4:var(--monster-color-magenta-1);--monster-color-destructive-1:var(--monster-color-red-1);--monster-color-destructive-2:var(--monster-color-red-3);--monster-color-destructive-3:var(--monster-color-red-4);--monster-color-destructive-4:var(--monster-color-red-1);--monster-bg-color-destructive-1:var(--monster-color-red-5);--monster-bg-color-destructive-2:var(--monster-color-gray-6);--monster-bg-color-destructive-3:var(--monster-color-red-1);--monster-bg-color-destructive-4:var(--monster-color-red-4);--monster-color-success-1:var(--monster-color-green-1);--monster-color-success-2:var(--monster-color-green-2);--monster-color-success-3:var(--monster-color-green-4);--monster-color-success-4:var(--monster-color-green-1);--monster-bg-color-success-1:var(--monster-color-green-5);--monster-bg-color-success-2:var(--monster-color-gray-6);--monster-bg-color-success-3:var(--monster-color-green-1);--monster-bg-color-success-4:var(--monster-color-green-3);--monster-color-warning-1:var(--monster-color-orange-1);--monster-color-warning-2:var(--monster-color-orange-3);--monster-color-warning-3:var(--monster-color-orange-4);--monster-color-warning-4:var(--monster-color-orange-1);--monster-bg-color-warning-1:var(--monster-color-orange-5);--monster-bg-color-warning-2:var(--monster-color-gray-6);--monster-bg-color-warning-3:var(--monster-color-orange-1);--monster-bg-color-warning-4:var(--monster-color-orange-3);--monster-color-error-1:var(--monster-color-red-1);--monster-color-error-2:var(--monster-color-red-3);--monster-color-error-3:var(--monster-color-red-4);--monster-color-error-4:var(--monster-color-red-1);--monster-bg-color-error-1:var(--monster-color-red-5);--monster-bg-color-error-2:var(--monster-color-gray-6);--monster-bg-color-error-3:var(--monster-color-red-1);--monster-bg-color-error-4:var(--monster-color-red-4);--monster-color-selection-1:var(--monster-color-gray-6);--monster-color-selection-2:var(--monster-color-gray-6);--monster-color-selection-3:var(--monster-color-gray-6);--monster-color-selection-4:var(--monster-color-gray-1);--monster-bg-color-selection-1:var(--monster-color-yellow-2);--monster-bg-color-selection-2:var(--monster-color-yellow-1);--monster-bg-color-selection-3:var(--monster-color-yellow-2);--monster-bg-color-selection-4:var(--monster-color-yellow-6);--monster-color-primary-disabled-1:var(--monster-color-gray-4);--monster-color-primary-disabled-2:var(--monster-color-gray-4);--monster-color-primary-disabled-3:var(--monster-color-gray-3);--monster-color-primary-disabled-4:var(--monster-color-gray-3);--monster-bg-color-primary-disabled-1:var(--monster-color-gray-6);--monster-bg-color-primary-disabled-2:var(--monster-color-gray-3);--monster-bg-color-primary-disabled-3:var(--monster-color-gray-2);--monster-bg-color-primary-disabled-4:var(--monster-color-gray-1)}}span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:hsla(0,0%,100%,.7);border-radius:50%;position:absolute;transform:scale(0)}@keyframes monster-fx-ripple{to{opacity:0;transform:scale(4)}}[data-monster-role=control]{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;position:relative;width:-moz-fit-content;width:fit-content}[data-monster-role=control] [data-monster-role=badge]{left:0;position:absolute;top:0;transform:translate(-4px,-7px);z-index:var(--monster-z-index-sticky)}[data-monster-role=control] .hidden[data-monster-role=badge]{display:none!important}:host{align-items:center;align-self:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;width:-moz-fit-content;width:fit-content}
|
24
|
+
}`, 0);
|
25
|
+
} catch (e) {
|
26
|
+
addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
|
27
|
+
}
|
@@ -483,11 +483,11 @@ function calculateButtonBarDimensions() {
|
|
483
483
|
width = computedStyle.getPropertyValue("width");
|
484
484
|
this[dimensionsSymbol].setVia("data.space", convertToPixels(width));
|
485
485
|
} else {
|
486
|
-
|
486
|
+
let borderWidth = getComputedStyle(this).getPropertyValue(
|
487
487
|
"--monster-border-width",
|
488
488
|
);
|
489
|
-
if (borderWidth === null) {
|
490
|
-
|
489
|
+
if (borderWidth === null || borderWidth === "") {
|
490
|
+
borderWidth = "0px";
|
491
491
|
}
|
492
492
|
|
493
493
|
const borderWidthWithoutUnit = convertToPixels(borderWidth);
|
@@ -22,7 +22,6 @@ import { ATTRIBUTE_BUTTON_CLASS } from "./constants.mjs";
|
|
22
22
|
import { ButtonStyleSheet } from "./stylesheet/button.mjs";
|
23
23
|
import { RippleStyleSheet } from "../stylesheet/ripple.mjs";
|
24
24
|
import { fireCustomEvent } from "../../dom/events.mjs";
|
25
|
-
import { isString } from "../../types/is.mjs";
|
26
25
|
|
27
26
|
export { Button };
|
28
27
|
|
@@ -228,7 +227,7 @@ class Button extends CustomControl {
|
|
228
227
|
},
|
229
228
|
disabled: false,
|
230
229
|
actions: {
|
231
|
-
click: (
|
230
|
+
click: () => {
|
232
231
|
throw new Error("the click action is not defined");
|
233
232
|
},
|
234
233
|
},
|
@@ -25,6 +25,7 @@ import {
|
|
25
25
|
assembleMethodSymbol,
|
26
26
|
CustomElement,
|
27
27
|
registerCustomElement,
|
28
|
+
getSlottedElements,
|
28
29
|
} from "../../dom/customelement.mjs";
|
29
30
|
import { addObjectWithUpdaterToElement } from "../../dom/updater.mjs";
|
30
31
|
import { isFunction, isString } from "../../types/is.mjs";
|
@@ -37,7 +38,6 @@ import {
|
|
37
38
|
ATTRIBUTE_FORM_DATASOURCE_ARGUMENTS,
|
38
39
|
} from "./constants.mjs";
|
39
40
|
import { StateButton } from "./state-button.mjs";
|
40
|
-
import { getSlottedElements } from "../../dom/customelement.mjs";
|
41
41
|
import { FormStyleSheet } from "./stylesheet/form.mjs";
|
42
42
|
|
43
43
|
export { Form };
|