@schukai/monster 3.114.7 → 3.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/source/components/content/camera.mjs +1 -1
- package/source/components/content/fetch-box.mjs +345 -0
- package/source/components/content/style/fetch-box.pcss +36 -0
- package/source/components/content/stylesheet/fetch-box.mjs +31 -0
- package/source/components/style/mixin/skeleton.pcss +12 -14
- package/source/components/style/skeleton.css +1 -164
- package/source/components/style/skeleton.pcss +7 -13
- package/source/components/stylesheet/mixin/skeleton.mjs +6 -13
- package/source/components/stylesheet/skeleton.mjs +7 -14
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8","buffer":"^6.0.3"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8","buffer":"^6.0.3"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.115.0"}
|
@@ -69,7 +69,7 @@ const emptyHistoryStateElementSymbol = Symbol("emptyHistoryStateElement");
|
|
69
69
|
*
|
70
70
|
* @fragments /fragments/components/content/camera-capture/
|
71
71
|
*
|
72
|
-
* @example /examples/components/content/camera-capture/
|
72
|
+
* @example /examples/components/content/camera-capture-simple/
|
73
73
|
*
|
74
74
|
* @since 3.111.0
|
75
75
|
* @copyright schukai GmbH
|
@@ -0,0 +1,345 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright © schukai GmbH and all contributing authors, {{copyRightYear}}. All rights reserved.
|
3
|
+
* Node module: @schukai/monster
|
4
|
+
*
|
5
|
+
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
6
|
+
* The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
|
7
|
+
*
|
8
|
+
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
9
|
+
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
10
|
+
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
|
+
*/
|
12
|
+
|
13
|
+
import {instanceSymbol} from "../../constants.mjs";
|
14
|
+
import {
|
15
|
+
ATTRIBUTE_ROLE
|
16
|
+
} from "../../dom/constants.mjs";
|
17
|
+
import {CustomElement} from "../../dom/customelement.mjs";
|
18
|
+
import {
|
19
|
+
assembleMethodSymbol,
|
20
|
+
registerCustomElement,
|
21
|
+
} from "../../dom/customelement.mjs";
|
22
|
+
import {isString} from "../../types/is.mjs";
|
23
|
+
import {FetchBoxStyleSheet} from "./stylesheet/fetch-box.mjs";
|
24
|
+
import {addErrorAttribute} from "../../dom/error.mjs";
|
25
|
+
import {Formatter} from "../../text/formatter.mjs";
|
26
|
+
|
27
|
+
export {FetchBox};
|
28
|
+
|
29
|
+
/**
|
30
|
+
* @private
|
31
|
+
* @type {symbol}
|
32
|
+
*/
|
33
|
+
export const fetchBoxElementSymbol = Symbol("fetchBoxElement");
|
34
|
+
|
35
|
+
/**
|
36
|
+
* A FetchBox
|
37
|
+
*
|
38
|
+
* @fragments /fragments/components/content/fetch-box/
|
39
|
+
*
|
40
|
+
* @example /examples/components/content/fetch-box-simple
|
41
|
+
*
|
42
|
+
* @since 3.115.0
|
43
|
+
* @copyright schukai GmbH
|
44
|
+
* @summary A beautiful FetchBox that can make your life easier and also looks good. Its like a box, but it fetches data from a URL.
|
45
|
+
*/
|
46
|
+
class FetchBox extends CustomElement {
|
47
|
+
/**
|
48
|
+
* This method is called by the `instanceof` operator.
|
49
|
+
* @returns {symbol}
|
50
|
+
*/
|
51
|
+
static get [instanceSymbol]() {
|
52
|
+
return Symbol.for("@schukai/monster/components/content/fetch-box@@instance");
|
53
|
+
}
|
54
|
+
|
55
|
+
/**
|
56
|
+
*
|
57
|
+
* @return {Components.Content.FetchBox
|
58
|
+
*/
|
59
|
+
[assembleMethodSymbol]() {
|
60
|
+
super[assembleMethodSymbol]();
|
61
|
+
initControlReferences.call(this);
|
62
|
+
return this;
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Handles the component's connection to the DOM.
|
68
|
+
* Determines the styling of the component based on its parent's tag name.
|
69
|
+
* Fetches necessary data for the component.
|
70
|
+
*
|
71
|
+
* @return {void} This method does not return a value.
|
72
|
+
*/
|
73
|
+
connectedCallback() {
|
74
|
+
super.connectedCallback();
|
75
|
+
|
76
|
+
|
77
|
+
const parent = this.parentElement;
|
78
|
+
|
79
|
+
if (parent) {
|
80
|
+
const blockLevelElements = ['DIV', 'SECTION', 'ARTICLE', 'HEADER', 'FOOTER', 'MAIN', 'NAV', 'ASIDE'];
|
81
|
+
const isBlockLevel = blockLevelElements.includes(parent.tagName);
|
82
|
+
|
83
|
+
if (isBlockLevel) {
|
84
|
+
this.style.display = 'block';
|
85
|
+
this.style.width = '100%';
|
86
|
+
this.style.height = '100%';
|
87
|
+
} else {
|
88
|
+
this.style.display = 'inline-flex';
|
89
|
+
this.style.height = '100%';
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
this.fetch();
|
94
|
+
|
95
|
+
}
|
96
|
+
|
97
|
+
|
98
|
+
/**
|
99
|
+
* To set the options via the HTML Tag, the attribute `data-monster-options` must be used.
|
100
|
+
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
101
|
+
*
|
102
|
+
* The individual configuration values can be found in the table.
|
103
|
+
*
|
104
|
+
* @property {Object} templates Template definitions
|
105
|
+
* @property {string} templates.main Main template
|
106
|
+
* @property {Object} classes CSS classes
|
107
|
+
* @property {string} classes.default CSS class for the main template
|
108
|
+
* @property {string} classes.loading CSS class for the loading template
|
109
|
+
* @property {string} classes.error CSS class for the error template
|
110
|
+
* @property {string} classes.empty CSS class for the empty template
|
111
|
+
* @property {Object} fetch fetch options for the request
|
112
|
+
* @property {string} fetch.redirect error, follow, manual
|
113
|
+
* @property {string} fetch.method GET, POST, PUT, DELETE
|
114
|
+
* @property {string} fetch.mode same-origin, cors, no-cors, navigate
|
115
|
+
* @property {string} fetch.credentials omit, same-origin, include
|
116
|
+
* @property {Object} fetch.headers
|
117
|
+
* @property {string} fetch.headers.accept text/html, application/json
|
118
|
+
* @property {string} fetch.headers.content-type application/json
|
119
|
+
* @property {string} parameter value for the data url
|
120
|
+
* @property {Object} formatter
|
121
|
+
* @property {Object} formatter.marker
|
122
|
+
* @property {string} formatter.marker.open marker for the url
|
123
|
+
* @property {string} formatter.marker.close marker for the url
|
124
|
+
* @property {string} url url to fetch
|
125
|
+
*/
|
126
|
+
get defaults() {
|
127
|
+
return Object.assign({}, super.defaults, {
|
128
|
+
templates: {
|
129
|
+
main: getTemplate(),
|
130
|
+
},
|
131
|
+
classes: {
|
132
|
+
default: "monster-fetch-box-default",
|
133
|
+
loading: "loading",
|
134
|
+
error: "error",
|
135
|
+
empty: "empty",
|
136
|
+
},
|
137
|
+
data: {},
|
138
|
+
url: null,
|
139
|
+
fetch: {
|
140
|
+
redirect: "error",
|
141
|
+
method: "GET",
|
142
|
+
mode: "same-origin",
|
143
|
+
credentials: "same-origin",
|
144
|
+
headers: {
|
145
|
+
accept: "text/html",
|
146
|
+
},
|
147
|
+
},
|
148
|
+
|
149
|
+
content: {
|
150
|
+
// <slot name="loading"></slot>
|
151
|
+
loading: `<div class="monster-skeleton-animated monster-skeleton-col-100"></div>`,
|
152
|
+
error: `<slot name="error"></slot>`,
|
153
|
+
empty: `<slot name="empty"></slot>`,
|
154
|
+
},
|
155
|
+
visible: "loading",
|
156
|
+
parameter: null,
|
157
|
+
|
158
|
+
|
159
|
+
formatter: {
|
160
|
+
marker: {
|
161
|
+
open: null,
|
162
|
+
close: null,
|
163
|
+
},
|
164
|
+
},
|
165
|
+
|
166
|
+
});
|
167
|
+
}
|
168
|
+
|
169
|
+
/**
|
170
|
+
* @return {string}
|
171
|
+
*/
|
172
|
+
static getTag() {
|
173
|
+
return "monster-fetch-box";
|
174
|
+
}
|
175
|
+
|
176
|
+
/**
|
177
|
+
* @return {CSSStyleSheet[]}
|
178
|
+
*/
|
179
|
+
static getCSSStyleSheet() {
|
180
|
+
return [FetchBoxStyleSheet];
|
181
|
+
}
|
182
|
+
|
183
|
+
/**
|
184
|
+
* load content from url
|
185
|
+
*/
|
186
|
+
fetch() {
|
187
|
+
try {
|
188
|
+
return loadContent.call(this).then(obj => {
|
189
|
+
|
190
|
+
if (obj.type !== "application/json") {
|
191
|
+
this.setOption("visible", "error");
|
192
|
+
throw new Error("not a json response");
|
193
|
+
}
|
194
|
+
|
195
|
+
try {
|
196
|
+
const content = obj.content;
|
197
|
+
if (!isString(content)|| content === "") {
|
198
|
+
this.setOption("visible", "empty");
|
199
|
+
return
|
200
|
+
}
|
201
|
+
|
202
|
+
const jsonContent = JSON.parse(content);
|
203
|
+
if (jsonContent === null) {
|
204
|
+
this.setOption("visible", "empty");
|
205
|
+
return
|
206
|
+
}
|
207
|
+
|
208
|
+
this.setOption("data", jsonContent);
|
209
|
+
this.setOption("visible", "default");
|
210
|
+
|
211
|
+
} catch (e) {
|
212
|
+
this.setOption("visible", "error");
|
213
|
+
throw e;
|
214
|
+
}
|
215
|
+
|
216
|
+
}).catch(e => {
|
217
|
+
this.setOption("visible", "error");
|
218
|
+
addErrorAttribute(this, e);
|
219
|
+
});
|
220
|
+
} catch (e) {
|
221
|
+
addErrorAttribute(this, e);
|
222
|
+
this.setOption("visible", "error");
|
223
|
+
return Promise.reject(e);
|
224
|
+
}
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
/**
|
229
|
+
* @private
|
230
|
+
* @throws {Error} missing url
|
231
|
+
* @throws {Error} we won't be able to read the data
|
232
|
+
* @throws {Error} request failed
|
233
|
+
* @return {Promise}
|
234
|
+
*/
|
235
|
+
function loadContent() {
|
236
|
+
let url = this.getOption("url");
|
237
|
+
|
238
|
+
if (url instanceof URL) {
|
239
|
+
url = url.toString();
|
240
|
+
}
|
241
|
+
|
242
|
+
if (!isString(url) || url === "") {
|
243
|
+
throw new Error("missing url");
|
244
|
+
}
|
245
|
+
|
246
|
+
let p = this.getOption("parameter", null);
|
247
|
+
if (p === null) {
|
248
|
+
p = "";
|
249
|
+
}
|
250
|
+
|
251
|
+
const data = {
|
252
|
+
parameter : p
|
253
|
+
}
|
254
|
+
|
255
|
+
const formatter = new Formatter(data)
|
256
|
+
|
257
|
+
if (this.getOption("formatter.marker.open")) {
|
258
|
+
|
259
|
+
const open = this.getOption("formatter.marker.open");
|
260
|
+
if (!isString(open)) {
|
261
|
+
throw new TypeError("open is not a string");
|
262
|
+
}
|
263
|
+
|
264
|
+
const close = this.getOption("formatter.marker.close");
|
265
|
+
if (close !== undefined && !isString(close)) {
|
266
|
+
throw new TypeError("close is not a string");
|
267
|
+
}
|
268
|
+
|
269
|
+
formatter.setMarker(
|
270
|
+
open,
|
271
|
+
close
|
272
|
+
);
|
273
|
+
}
|
274
|
+
|
275
|
+
const formattedUrl = formatter.format(
|
276
|
+
url
|
277
|
+
);
|
278
|
+
|
279
|
+
|
280
|
+
const options = this.getOption("fetch", {});
|
281
|
+
|
282
|
+
return fetch(formattedUrl, options).then((response) => {
|
283
|
+
if (!response.ok) {
|
284
|
+
if (["error", "opaque", "opaqueredirect"].includes(response.type)) {
|
285
|
+
throw new Error(`we won't be able to read the data (${response.type})`);
|
286
|
+
}
|
287
|
+
|
288
|
+
const statusClass = String(response.status).charAt(0);
|
289
|
+
if (statusClass === "4") {
|
290
|
+
throw new Error(`client error ${response.statusText}`);
|
291
|
+
}
|
292
|
+
throw new Error(
|
293
|
+
`undefined status (${response.status} / ${response.statusText}) or type (${response.type})`,
|
294
|
+
);
|
295
|
+
}
|
296
|
+
|
297
|
+
return response.text().then((content) => ({
|
298
|
+
content,
|
299
|
+
type: response.headers.get("Content-Type"),
|
300
|
+
}));
|
301
|
+
});
|
302
|
+
|
303
|
+
}
|
304
|
+
|
305
|
+
/**
|
306
|
+
* @private
|
307
|
+
* @return {void}
|
308
|
+
*/
|
309
|
+
function initControlReferences() {
|
310
|
+
this[fetchBoxElementSymbol] = this.shadowRoot.querySelector(
|
311
|
+
`[${ATTRIBUTE_ROLE}="control"]`,
|
312
|
+
);
|
313
|
+
}
|
314
|
+
|
315
|
+
/**
|
316
|
+
* @private
|
317
|
+
* @return {string}
|
318
|
+
*/
|
319
|
+
function getTemplate() {
|
320
|
+
// language=HTML
|
321
|
+
return `
|
322
|
+
<div data-monster-role="control" part="control">
|
323
|
+
<div
|
324
|
+
data-monster-attributes="class path:classes.default,
|
325
|
+
data-monster-visible path:visible | equals:default | ?:true:false
|
326
|
+
">
|
327
|
+
<slot></slot>
|
328
|
+
</div>
|
329
|
+
<div
|
330
|
+
data-monster-attributes="class path:classes.loading,
|
331
|
+
data-monster-visible path:visible | equals:loading | ?:true:false"
|
332
|
+
data-monster-replace="path:content.loading"></div>
|
333
|
+
<div
|
334
|
+
data-monster-attributes="class path:classes.error,
|
335
|
+
data-monster-visible path:visible | equals:error | ?:true:false"
|
336
|
+
data-monster-replace="path:content.error"></div>
|
337
|
+
<div
|
338
|
+
data-monster-attributes="class path:classes.empty,
|
339
|
+
data-monster-visible path:visible | equals:empty | ?:true:false"
|
340
|
+
data-monster-replace="path:content.empty"></div>
|
341
|
+
</div>`;
|
342
|
+
}
|
343
|
+
|
344
|
+
|
345
|
+
registerCustomElement(FetchBox);
|
@@ -0,0 +1,36 @@
|
|
1
|
+
@import "../../style/control.pcss";
|
2
|
+
@import "../../style/property.pcss";
|
3
|
+
@import "../../style/skeleton.pcss";
|
4
|
+
|
5
|
+
|
6
|
+
[data-monster-role="control"] {
|
7
|
+
display: flex;
|
8
|
+
flex-direction: column;
|
9
|
+
height: 100%;
|
10
|
+
width: 100%;
|
11
|
+
min-height: 1rem;
|
12
|
+
min-width: 1rem;
|
13
|
+
box-sizing: border-box;
|
14
|
+
}
|
15
|
+
|
16
|
+
[data-monster-visible="false"] {
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
[data-monster-visible="true"] {
|
21
|
+
height: 100%;
|
22
|
+
}
|
23
|
+
|
24
|
+
:host {
|
25
|
+
display: inline-block;;
|
26
|
+
min-width: 1rem;
|
27
|
+
min-height: 1rem;
|
28
|
+
height: 100%;
|
29
|
+
box-sizing: border-box;
|
30
|
+
}
|
31
|
+
|
32
|
+
.monster-skeleton-animated {
|
33
|
+
height: 100%;
|
34
|
+
min-height: 1rem;
|
35
|
+
}
|
36
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright © schukai GmbH and all contributing authors, 2025. All rights reserved.
|
3
|
+
* Node module: @schukai/monster
|
4
|
+
*
|
5
|
+
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
6
|
+
* The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
|
7
|
+
*
|
8
|
+
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
9
|
+
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
10
|
+
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
|
+
*/
|
12
|
+
|
13
|
+
import {addAttributeToken} from "../../../dom/attributes.mjs";
|
14
|
+
import {ATTRIBUTE_ERRORMESSAGE} from "../../../dom/constants.mjs";
|
15
|
+
|
16
|
+
export {FetchBoxStyleSheet}
|
17
|
+
|
18
|
+
/**
|
19
|
+
* @private
|
20
|
+
* @type {CSSStyleSheet}
|
21
|
+
*/
|
22
|
+
const FetchBoxStyleSheet = new CSSStyleSheet();
|
23
|
+
|
24
|
+
try {
|
25
|
+
FetchBoxStyleSheet.insertRule(`
|
26
|
+
@layer fetchbox {
|
27
|
+
[data-monster-role=control]{outline:none}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}:host{display:block}: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-font-family-monospace:\"Consolas\",\"Courier New\",\"Roboto Mono\",\"Source Code Pro\",\"Fira Mono\",monospace;--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-cinnamon-1);--monster-color-primary-4:var(--monster-color-cinnamon-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-6);--monster-bg-color-primary-4:var(--monster-color-gray-4)}@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)}}:after,:before,:root{--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)}@media (prefers-color-scheme:dark){:after,:before,:root{--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)}}:after,:before,:root{--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)}@media (prefers-color-scheme:dark){:after,:before,:root{--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)}}:after,:before,:root{--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)}@media (prefers-color-scheme:dark){:after,:before,:root{--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)}}:after,:before,:root{--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)}@media (prefers-color-scheme:dark){:after,:before,:root{--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)}}:after,:before,:root{--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)}@media (prefers-color-scheme:dark){:after,:before,:root{--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)}}:after,:before,:root{--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)}@media (prefers-color-scheme:dark){:after,:before,:root{--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)}}:after,:before,:root{--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)}@media (prefers-color-scheme:dark){:after,:before,:root{--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)}}:after,:before,:root{--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-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}@media (prefers-color-scheme:dark){:after,:before,:root{--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);--monster-color-gradient-1:#ffe0b2;--monster-color-gradient-2:#ad8275;--monster-color-gradient-3:#771ba3}}:after,:before,:root{--monster-box-shadow-1:none;--monster-box-shadow-2:-1px 1px 10px 1px hsla(0,0%,76%,.61);--monster-text-shadow:none;--monster-theme-control-bg-color:var(--monster-color-seashell-1);--monster-theme-control-color:var(--monster-color-seashell-6);--monster-theme-control-hover-color:var(--monster-color-seashell-6);--monster-theme-control-hover-bg-color:var(--monster-color-seashell-2);--monster-theme-control-border-width:2px;--monster-theme-control-border-style:solid;--monster-theme-control-border-radius:0;--monster-theme-control-border-color:var(--monster-color-primary-1)}@media (prefers-color-scheme:dark){:after,:before,:root{--monster-theme-control-bg-color:var(--monster-color-gray-5);--monster-theme-control-color:var(--monster-color-gray-1);--monster-theme-control-border-color:var(--monster-color-gray-3);--monster-theme-control-hover-color:var(--monster-color-gray-1);--monster-theme-control-hover-bg-color:var(--monster-color-gray-6)}}:after,:before,:root{--monster-theme-on-color:var(--monster-color-green-1);--monster-theme-on-bg-color:var(--monster-color-green-5);--monster-theme-off-color:var(--monster-color-gray-1);--monster-theme-off-bg-color:var(--monster-color-gray-4)}@media (prefers-color-scheme:dark){:after,:before,:root{--monster-theme-on-color:var(--monster-color-gray-6);--monster-theme-on-bg-color:var(--monster-color-gray-1);--monster-theme-off-color:var(--monster-color-gray-1);--monster-theme-off-bg-color:var(--monster-color-gray-5)}}:after,:before,:root{--monster-border-style:solid;--monster-border-width:3px;--monster-border-radius:0;--monster-outline-width:1px;--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;--monster-dragger-width:2px;--monster-dragger-handle-width:4px;--monster-dragger-handle-height:50px}.monster-skeleton-col-10{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:10%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-10,.monster-skeleton-col-20{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-20{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:20%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-30{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:30%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-30,.monster-skeleton-col-40{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-40{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:40%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-50{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:50%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-50,.monster-skeleton-col-60{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-60{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:60%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-70{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:70%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-70,.monster-skeleton-col-80{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-80{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:80%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-90{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:90%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-col-100,.monster-skeleton-col-90{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-100{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-color-50:rgba(from var(--monster-color-pink-2) 255 255 255/0.5);--monster-skeleton-height:100%;--monster-skeleton-width:100%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0%,var(--monster-skeleton-color-50) 40%,transparent 70%)}.monster-skeleton-animated{animation:shimmer 4.25s linear infinite forwards;border-radius:4px}@keyframes shimmer{0%,to{filter:brightness(.81)}50%{filter:brightness(.45)}}[data-monster-role=control]{box-sizing:border-box;display:flex;flex-direction:column;height:100%;min-height:1rem;min-width:1rem;width:100%}[data-monster-visible=false]{display:none}[data-monster-visible=true]{height:100%}:host{box-sizing:border-box;display:inline-block;height:100%;min-height:1rem;min-width:1rem}.monster-skeleton-animated{height:100%;min-height:1rem}
|
28
|
+
}`, 0);
|
29
|
+
} catch (e) {
|
30
|
+
addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
|
31
|
+
}
|
@@ -1,26 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
@define-mixin skeleton $width, $color:var(--monster-color-gray-3), $height:100% {
|
1
|
+
@define-mixin skeleton $width, $color, $height:100% {
|
4
2
|
--monster-skeleton-color: $color;
|
3
|
+
--monster-skeleton-color-50: rgba(from $color 255 255 255 / 0.5);
|
5
4
|
--monster-skeleton-height: $height;
|
6
5
|
--monster-skeleton-width: $width;
|
7
|
-
--monster-skeleton: linear-gradient(
|
6
|
+
--monster-skeleton: linear-gradient(
|
7
|
+
99deg,
|
8
|
+
var(--monster-skeleton-color) 0%,
|
9
|
+
var(--monster-skeleton-color-50) 40%,
|
10
|
+
transparent 70%
|
11
|
+
);
|
8
12
|
|
9
|
-
background-image:
|
10
|
-
var(--monster-skeleton);
|
13
|
+
background-image: var(--monster-skeleton);
|
11
14
|
|
12
|
-
background-size:
|
13
|
-
var(--monster-skeleton-width) var(--monster-skeleton-height);
|
15
|
+
background-size: var(--monster-skeleton-width) var(--monster-skeleton-height);
|
14
16
|
|
15
|
-
background-repeat:
|
16
|
-
no-repeat;
|
17
|
+
background-repeat: no-repeat;
|
17
18
|
|
18
|
-
background-position:
|
19
|
-
0 0;
|
19
|
+
background-position: 0 0;
|
20
20
|
|
21
21
|
color: var(--monster-skeleton-color);
|
22
22
|
|
23
23
|
min-height: 1px;
|
24
|
-
|
25
|
-
|
26
24
|
}
|
@@ -1,165 +1,2 @@
|
|
1
1
|
/** generated from skeleton.pcss **/
|
2
|
-
.monster-skeleton-col-10 {
|
3
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
4
|
-
--monster-skeleton-height: 100%;
|
5
|
-
--monster-skeleton-width: 10%;
|
6
|
-
--monster-skeleton: linear-gradient(
|
7
|
-
90deg,
|
8
|
-
var(--monster-skeleton-color) 0,
|
9
|
-
transparent var(--monster-skeleton-width)
|
10
|
-
);
|
11
|
-
}
|
12
|
-
.monster-skeleton-col-10,
|
13
|
-
.monster-skeleton-col-20 {
|
14
|
-
background-image: var(--monster-skeleton);
|
15
|
-
background-position: 0 0;
|
16
|
-
background-repeat: no-repeat;
|
17
|
-
background-size: var(--monster-skeleton-width) var(--monster-skeleton-height);
|
18
|
-
color: var(--monster-skeleton-color);
|
19
|
-
min-height: 1px;
|
20
|
-
}
|
21
|
-
.monster-skeleton-col-20 {
|
22
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
23
|
-
--monster-skeleton-height: 100%;
|
24
|
-
--monster-skeleton-width: 20%;
|
25
|
-
--monster-skeleton: linear-gradient(
|
26
|
-
90deg,
|
27
|
-
var(--monster-skeleton-color) 0,
|
28
|
-
transparent var(--monster-skeleton-width)
|
29
|
-
);
|
30
|
-
}
|
31
|
-
.monster-skeleton-col-30 {
|
32
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
33
|
-
--monster-skeleton-height: 100%;
|
34
|
-
--monster-skeleton-width: 30%;
|
35
|
-
--monster-skeleton: linear-gradient(
|
36
|
-
90deg,
|
37
|
-
var(--monster-skeleton-color) 0,
|
38
|
-
transparent var(--monster-skeleton-width)
|
39
|
-
);
|
40
|
-
}
|
41
|
-
.monster-skeleton-col-30,
|
42
|
-
.monster-skeleton-col-40 {
|
43
|
-
background-image: var(--monster-skeleton);
|
44
|
-
background-position: 0 0;
|
45
|
-
background-repeat: no-repeat;
|
46
|
-
background-size: var(--monster-skeleton-width) var(--monster-skeleton-height);
|
47
|
-
color: var(--monster-skeleton-color);
|
48
|
-
min-height: 1px;
|
49
|
-
}
|
50
|
-
.monster-skeleton-col-40 {
|
51
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
52
|
-
--monster-skeleton-height: 100%;
|
53
|
-
--monster-skeleton-width: 40%;
|
54
|
-
--monster-skeleton: linear-gradient(
|
55
|
-
90deg,
|
56
|
-
var(--monster-skeleton-color) 0,
|
57
|
-
transparent var(--monster-skeleton-width)
|
58
|
-
);
|
59
|
-
}
|
60
|
-
.monster-skeleton-col-50 {
|
61
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
62
|
-
--monster-skeleton-height: 100%;
|
63
|
-
--monster-skeleton-width: 50%;
|
64
|
-
--monster-skeleton: linear-gradient(
|
65
|
-
90deg,
|
66
|
-
var(--monster-skeleton-color) 0,
|
67
|
-
transparent var(--monster-skeleton-width)
|
68
|
-
);
|
69
|
-
}
|
70
|
-
.monster-skeleton-col-50,
|
71
|
-
.monster-skeleton-col-60 {
|
72
|
-
background-image: var(--monster-skeleton);
|
73
|
-
background-position: 0 0;
|
74
|
-
background-repeat: no-repeat;
|
75
|
-
background-size: var(--monster-skeleton-width) var(--monster-skeleton-height);
|
76
|
-
color: var(--monster-skeleton-color);
|
77
|
-
min-height: 1px;
|
78
|
-
}
|
79
|
-
.monster-skeleton-col-60 {
|
80
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
81
|
-
--monster-skeleton-height: 100%;
|
82
|
-
--monster-skeleton-width: 60%;
|
83
|
-
--monster-skeleton: linear-gradient(
|
84
|
-
90deg,
|
85
|
-
var(--monster-skeleton-color) 0,
|
86
|
-
transparent var(--monster-skeleton-width)
|
87
|
-
);
|
88
|
-
}
|
89
|
-
.monster-skeleton-col-70 {
|
90
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
91
|
-
--monster-skeleton-height: 100%;
|
92
|
-
--monster-skeleton-width: 70%;
|
93
|
-
--monster-skeleton: linear-gradient(
|
94
|
-
90deg,
|
95
|
-
var(--monster-skeleton-color) 0,
|
96
|
-
transparent var(--monster-skeleton-width)
|
97
|
-
);
|
98
|
-
}
|
99
|
-
.monster-skeleton-col-70,
|
100
|
-
.monster-skeleton-col-80 {
|
101
|
-
background-image: var(--monster-skeleton);
|
102
|
-
background-position: 0 0;
|
103
|
-
background-repeat: no-repeat;
|
104
|
-
background-size: var(--monster-skeleton-width) var(--monster-skeleton-height);
|
105
|
-
color: var(--monster-skeleton-color);
|
106
|
-
min-height: 1px;
|
107
|
-
}
|
108
|
-
.monster-skeleton-col-80 {
|
109
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
110
|
-
--monster-skeleton-height: 100%;
|
111
|
-
--monster-skeleton-width: 80%;
|
112
|
-
--monster-skeleton: linear-gradient(
|
113
|
-
90deg,
|
114
|
-
var(--monster-skeleton-color) 0,
|
115
|
-
transparent var(--monster-skeleton-width)
|
116
|
-
);
|
117
|
-
}
|
118
|
-
.monster-skeleton-col-90 {
|
119
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
120
|
-
--monster-skeleton-height: 100%;
|
121
|
-
--monster-skeleton-width: 90%;
|
122
|
-
--monster-skeleton: linear-gradient(
|
123
|
-
90deg,
|
124
|
-
var(--monster-skeleton-color) 0,
|
125
|
-
transparent var(--monster-skeleton-width)
|
126
|
-
);
|
127
|
-
}
|
128
|
-
.monster-skeleton-col-100,
|
129
|
-
.monster-skeleton-col-90 {
|
130
|
-
background-image: var(--monster-skeleton);
|
131
|
-
background-position: 0 0;
|
132
|
-
background-repeat: no-repeat;
|
133
|
-
background-size: var(--monster-skeleton-width) var(--monster-skeleton-height);
|
134
|
-
color: var(--monster-skeleton-color);
|
135
|
-
min-height: 1px;
|
136
|
-
}
|
137
|
-
.monster-skeleton-col-100 {
|
138
|
-
--monster-skeleton-color: var(--monster-color-gray-3);
|
139
|
-
--monster-skeleton-height: 100%;
|
140
|
-
--monster-skeleton-width: 100%;
|
141
|
-
--monster-skeleton: linear-gradient(
|
142
|
-
90deg,
|
143
|
-
var(--monster-skeleton-color) 0,
|
144
|
-
transparent var(--monster-skeleton-width)
|
145
|
-
);
|
146
|
-
}
|
147
|
-
.monster-skeleton-animated {
|
148
|
-
animation-duration: 2.25s;
|
149
|
-
animation-fill-mode: forwards;
|
150
|
-
animation-iteration-count: infinite;
|
151
|
-
animation-name: shimmer;
|
152
|
-
animation-timing-function: linear;
|
153
|
-
border-radius: 4px;
|
154
|
-
}
|
155
|
-
@keyframes shimmer {
|
156
|
-
0% {
|
157
|
-
filter: brightness(1);
|
158
|
-
}
|
159
|
-
50% {
|
160
|
-
filter: brightness(1.5);
|
161
|
-
}
|
162
|
-
to {
|
163
|
-
filter: brightness(1);
|
164
|
-
}
|
165
|
-
}
|
2
|
+
.monster-skeleton-col-10{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:10%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-10,.monster-skeleton-col-20{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-20{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:20%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-30{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:30%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-30,.monster-skeleton-col-40{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-40{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:40%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-50{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:50%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-50,.monster-skeleton-col-60{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-60{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:60%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-70{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:70%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-70,.monster-skeleton-col-80{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-80{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:80%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-90{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:90%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-100,.monster-skeleton-col-90{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-100{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:100%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-animated{animation:shimmer 4.25s linear infinite forwards;border-radius:4px}@keyframes shimmer{0%,to{filter:brightness(.81)}50%{filter:brightness(.45)}}
|
@@ -2,27 +2,21 @@
|
|
2
2
|
|
3
3
|
@for $i from 10 to 100 by 10 {
|
4
4
|
.monster-skeleton-col-$(i) {
|
5
|
-
@mixin skeleton $(i)
|
6
|
-
}
|
5
|
+
@mixin skeleton $(i)%, var(--monster-color-pink-2);
|
6
|
+
}
|
7
7
|
}
|
8
8
|
|
9
9
|
.monster-skeleton-animated {
|
10
|
-
animation
|
11
|
-
animation-fill-mode: forwards;
|
12
|
-
animation-iteration-count: infinite;
|
13
|
-
animation-name: shimmer;
|
14
|
-
animation-timing-function: linear;
|
10
|
+
animation: shimmer 4.25s linear infinite forwards;
|
15
11
|
border-radius: 4px;
|
16
12
|
}
|
17
13
|
|
14
|
+
|
18
15
|
@keyframes shimmer {
|
19
|
-
0% {
|
20
|
-
filter: brightness(
|
16
|
+
0%, 100% {
|
17
|
+
filter: brightness(0.81);
|
21
18
|
}
|
22
19
|
50% {
|
23
|
-
filter: brightness(
|
24
|
-
}
|
25
|
-
100% {
|
26
|
-
filter: brightness(1);
|
20
|
+
filter: brightness(0.45);
|
27
21
|
}
|
28
22
|
}
|
@@ -10,10 +10,10 @@
|
|
10
10
|
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
11
|
*/
|
12
12
|
|
13
|
-
import {
|
14
|
-
import {
|
13
|
+
import {addAttributeToken} from "../../../dom/attributes.mjs";
|
14
|
+
import {ATTRIBUTE_ERRORMESSAGE} from "../../../dom/constants.mjs";
|
15
15
|
|
16
|
-
export {
|
16
|
+
export {SkeletonStyleSheet}
|
17
17
|
|
18
18
|
/**
|
19
19
|
* @private
|
@@ -22,17 +22,10 @@ export { SkeletonStyleSheet };
|
|
22
22
|
const SkeletonStyleSheet = new CSSStyleSheet();
|
23
23
|
|
24
24
|
try {
|
25
|
-
|
26
|
-
`
|
25
|
+
SkeletonStyleSheet.insertRule(`
|
27
26
|
@layer skeleton {
|
28
27
|
|
29
|
-
}`,
|
30
|
-
0,
|
31
|
-
);
|
28
|
+
}`, 0);
|
32
29
|
} catch (e) {
|
33
|
-
|
34
|
-
document.getRootNode().querySelector("html"),
|
35
|
-
ATTRIBUTE_ERRORMESSAGE,
|
36
|
-
e + "",
|
37
|
-
);
|
30
|
+
addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
|
38
31
|
}
|
@@ -10,10 +10,10 @@
|
|
10
10
|
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
11
|
*/
|
12
12
|
|
13
|
-
import {
|
14
|
-
import {
|
13
|
+
import {addAttributeToken} from "../../dom/attributes.mjs";
|
14
|
+
import {ATTRIBUTE_ERRORMESSAGE} from "../../dom/constants.mjs";
|
15
15
|
|
16
|
-
export {
|
16
|
+
export {SkeletonStyleSheet}
|
17
17
|
|
18
18
|
/**
|
19
19
|
* @private
|
@@ -22,17 +22,10 @@ export { SkeletonStyleSheet };
|
|
22
22
|
const SkeletonStyleSheet = new CSSStyleSheet();
|
23
23
|
|
24
24
|
try {
|
25
|
-
|
26
|
-
`
|
25
|
+
SkeletonStyleSheet.insertRule(`
|
27
26
|
@layer skeleton {
|
28
|
-
.monster-skeleton-col-10{--monster-skeleton-color:var(--monster-color-
|
29
|
-
}`,
|
30
|
-
0,
|
31
|
-
);
|
27
|
+
.monster-skeleton-col-10{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:10%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-10,.monster-skeleton-col-20{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-20{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:20%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-30{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:30%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-30,.monster-skeleton-col-40{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-40{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:40%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-50{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:50%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-50,.monster-skeleton-col-60{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-60{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:60%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-70{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:70%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-70,.monster-skeleton-col-80{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-80{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:80%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-90{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:90%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-col-100,.monster-skeleton-col-90{background-image:var(--monster-skeleton);background-position:0 0;background-repeat:no-repeat;background-size:var(--monster-skeleton-width) var(--monster-skeleton-height);color:var(--monster-skeleton-color);min-height:1px}.monster-skeleton-col-100{--monster-skeleton-color:var(--monster-color-pink-2);--monster-skeleton-height:100%;--monster-skeleton-width:100%;--monster-skeleton:linear-gradient(99deg,var(--monster-skeleton-color) 0,transparent var(--monster-skeleton-width))}.monster-skeleton-animated{animation:shimmer 4.25s linear infinite forwards;border-radius:4px}@keyframes shimmer{0%,to{filter:brightness(.81)}50%{filter:brightness(.45)}}
|
28
|
+
}`, 0);
|
32
29
|
} catch (e) {
|
33
|
-
|
34
|
-
document.getRootNode().querySelector("html"),
|
35
|
-
ATTRIBUTE_ERRORMESSAGE,
|
36
|
-
e + "",
|
37
|
-
);
|
30
|
+
addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
|
38
31
|
}
|