wj-elements 0.1.127 → 0.1.129
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/dist/dark.css +6 -1
- package/dist/{infinite-scroll.element-DEQ-AqTB.js → infinite-scroll.element-R3y_ZQj6.js} +43 -18
- package/dist/light.css +5 -0
- package/dist/{list.element-BkOOqBtW.js → list.element-syl98NWS.js} +5 -5
- package/dist/localize.js +4 -3
- package/dist/{popup.element-DvPGL_NN.js → popup.element-C0a1z1y2.js} +195 -88
- package/dist/{router-links-F7MJWhZi.js → router-links-I2vcmVCs.js} +8 -16
- package/dist/wje-accordion-item.js +2 -5
- package/dist/wje-accordion.js +1 -4
- package/dist/wje-animation.js +142 -17
- package/dist/wje-aside.js +2 -5
- package/dist/wje-avatar.js +6 -9
- package/dist/wje-badge.js +2 -5
- package/dist/wje-breadcrumb.js +17 -10
- package/dist/wje-breadcrumbs.js +5 -8
- package/dist/wje-button-group.js +3 -6
- package/dist/wje-button.js +65 -10
- package/dist/wje-card-content.js +2 -5
- package/dist/wje-card-controls.js +2 -5
- package/dist/wje-card-header.js +2 -5
- package/dist/wje-card-subtitle.js +2 -5
- package/dist/wje-card-title.js +2 -5
- package/dist/wje-card.js +1 -4
- package/dist/wje-carousel-item.js +2 -5
- package/dist/wje-carousel.js +2 -5
- package/dist/wje-checkbox.js +15 -15
- package/dist/wje-chip.js +2 -5
- package/dist/wje-col.js +10 -7
- package/dist/wje-color-picker.js +90 -80
- package/dist/wje-container.js +2 -5
- package/dist/wje-copy-button.js +4 -7
- package/dist/wje-dialog.js +90 -4
- package/dist/wje-divider.js +2 -5
- package/dist/wje-dropdown.js +22 -10
- package/dist/wje-element.js +355 -158
- package/dist/wje-fetchAndParseCSS.js +2 -1
- package/dist/wje-file-upload-item.js +8 -7
- package/dist/wje-file-upload.js +58 -17
- package/dist/wje-footer.js +2 -5
- package/dist/wje-form.js +2 -5
- package/dist/wje-format-digital.js +3 -7
- package/dist/wje-grid.js +2 -5
- package/dist/wje-header.js +2 -5
- package/dist/wje-icon-picker.js +18 -7
- package/dist/wje-icon.js +5 -5
- package/dist/wje-img-comparer.js +2 -7
- package/dist/wje-img.js +14 -6
- package/dist/wje-infinite-scroll.js +1 -1
- package/dist/wje-input-file.js +5 -5
- package/dist/wje-input.js +13 -7
- package/dist/wje-item.js +35 -7
- package/dist/wje-kanban.js +18 -37
- package/dist/wje-label.js +2 -14
- package/dist/wje-list.js +1 -1
- package/dist/wje-main.js +2 -5
- package/dist/wje-masonry.js +10 -14
- package/dist/wje-master.js +11 -122
- package/dist/wje-menu-button.js +5 -5
- package/dist/wje-menu-item.js +17 -13
- package/dist/wje-menu-label.js +2 -5
- package/dist/wje-menu.js +5 -5
- package/dist/wje-option.js +10 -10
- package/dist/wje-options.js +26 -15
- package/dist/wje-orgchart-group.js +3 -6
- package/dist/wje-orgchart-item.js +9 -10
- package/dist/wje-orgchart.js +2 -5
- package/dist/wje-popup.js +1 -1
- package/dist/wje-progress-bar.js +7 -6
- package/dist/wje-qr-code.js +3 -6
- package/dist/wje-radio-group.js +5 -5
- package/dist/wje-radio.js +2 -5
- package/dist/wje-rate.js +7 -7
- package/dist/wje-relative-time.js +38 -23
- package/dist/wje-reorder-dropzone.js +1 -4
- package/dist/wje-reorder-handle.js +7 -16
- package/dist/wje-reorder-item.js +1 -4
- package/dist/wje-reorder.js +78 -22
- package/dist/wje-route.js +2 -5
- package/dist/wje-router-link.js +3 -7
- package/dist/wje-router-outlet.js +3 -8
- package/dist/wje-routerx.js +32 -60
- package/dist/wje-row.js +2 -15
- package/dist/wje-select.js +19 -22
- package/dist/wje-slider.js +9 -9
- package/dist/wje-sliding-container.js +126 -53
- package/dist/wje-split-view.js +11 -6
- package/dist/wje-status.js +2 -5
- package/dist/wje-step.js +1 -4
- package/dist/wje-stepper.js +932 -919
- package/dist/wje-store.js +18 -22
- package/dist/wje-tab-group.js +5 -5
- package/dist/wje-tab-panel.js +2 -5
- package/dist/wje-tab.js +5 -5
- package/dist/wje-textarea.js +9 -6
- package/dist/wje-thumbnail.js +2 -13
- package/dist/wje-toast.js +112 -37
- package/dist/wje-toggle.js +8 -5
- package/dist/wje-toolbar-action.js +2 -5
- package/dist/wje-toolbar.js +3 -6
- package/dist/wje-tooltip.js +6 -5
- package/dist/wje-visually-hidden.js +2 -5
- package/package.json +25 -7
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
import WJElement from "./wje-element.js";
|
|
8
|
-
const styles = "
|
|
5
|
+
const styles = ":host {\n display: block;\n z-index: 1000;\n /* make css property for width height position and if it is on top lef bottom right */\n}\n\n.sliding-container-wrapper {\n height: 100%;\n position: relative;\n overflow: hidden;\n}\n\n.native-sliding-container {\n overflow: auto;\n}";
|
|
9
6
|
class SlidingContainer extends WJElement {
|
|
10
7
|
/**
|
|
11
8
|
* Creates an instance of SlidingContainer.
|
|
@@ -21,16 +18,37 @@ class SlidingContainer extends WJElement {
|
|
|
21
18
|
* If the target element is the same as the last caller, it toggles the state by calling the `toggle` method.
|
|
22
19
|
* @param {Event} e - The event object.
|
|
23
20
|
*/
|
|
24
|
-
__publicField(this, "triggerEvent", (e) => {
|
|
21
|
+
__publicField(this, "triggerEvent", async (e) => {
|
|
25
22
|
if (this._lastCaller && this._lastCaller !== e.composedPath()[0]) {
|
|
26
|
-
this.open(e);
|
|
23
|
+
await this.open(e);
|
|
27
24
|
} else {
|
|
28
|
-
this.toggle(e);
|
|
25
|
+
await this.toggle(e);
|
|
29
26
|
}
|
|
30
27
|
this._lastCaller = e.composedPath()[0];
|
|
31
28
|
});
|
|
32
29
|
this._isOpen = false;
|
|
33
30
|
this._lastCaller = null;
|
|
31
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
32
|
+
for (let entry of entries) {
|
|
33
|
+
if (entry.contentBoxSize) {
|
|
34
|
+
if (this.drawingStatus < 3) return;
|
|
35
|
+
if (this.screenBreakPoint && window.innerWidth <= this.screenBreakPoint) {
|
|
36
|
+
if (this.variant !== "over") {
|
|
37
|
+
this.variant = "over";
|
|
38
|
+
} else {
|
|
39
|
+
this.checkForVariant(this.variant);
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
if (this.variant !== "in-place") {
|
|
43
|
+
this.variant = "in-place";
|
|
44
|
+
} else {
|
|
45
|
+
this.checkForVariant(this.variant);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
this._resizeObserver.observe(document.documentElement);
|
|
34
52
|
}
|
|
35
53
|
set maxWidth(value) {
|
|
36
54
|
this.setAttribute("max-width", value);
|
|
@@ -140,16 +158,27 @@ class SlidingContainer extends WJElement {
|
|
|
140
158
|
let fragment = document.createDocumentFragment();
|
|
141
159
|
this.style.position = "relative";
|
|
142
160
|
this.style.height = "100%";
|
|
161
|
+
this.style.right = "unset";
|
|
162
|
+
this.style.left = "unset";
|
|
143
163
|
this.wrapperDiv = document.createElement("div");
|
|
144
164
|
this.wrapperDiv.classList.add("sliding-container-wrapper");
|
|
145
165
|
this.transparentDiv = document.createElement("div");
|
|
146
166
|
this.transparentDiv.classList.add("sliding-container-transparent");
|
|
167
|
+
if (this._isOpen) {
|
|
168
|
+
this.transparentDiv.style.width = this.maxWidth;
|
|
169
|
+
}
|
|
147
170
|
let native = document.createElement("div");
|
|
148
171
|
native.style.position = "absolute";
|
|
149
172
|
native.style.width = 0;
|
|
150
173
|
if (this.hasOpacity) {
|
|
151
174
|
native.style.opacity = 0;
|
|
152
175
|
}
|
|
176
|
+
if (this._isOpen) {
|
|
177
|
+
native.style.width = this.maxWidth;
|
|
178
|
+
if (this.hasOpacity) {
|
|
179
|
+
native.style.opacity = 1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
153
182
|
native.style.height = "100%";
|
|
154
183
|
native.classList.add("native-sliding-container");
|
|
155
184
|
native.setAttribute("part", "sliding-container");
|
|
@@ -197,6 +226,9 @@ class SlidingContainer extends WJElement {
|
|
|
197
226
|
* Executes before drawing the element.
|
|
198
227
|
*/
|
|
199
228
|
beforeDraw() {
|
|
229
|
+
var _a, _b;
|
|
230
|
+
(_a = this.animation) == null ? void 0 : _a.cancel();
|
|
231
|
+
(_b = this.nativeAnimation) == null ? void 0 : _b.cancel();
|
|
200
232
|
document.removeEventListener(this.trigger, this.triggerEvent);
|
|
201
233
|
}
|
|
202
234
|
/**
|
|
@@ -206,9 +238,9 @@ class SlidingContainer extends WJElement {
|
|
|
206
238
|
* Calls the checkForVariant method with the current variant.
|
|
207
239
|
* @returns {Promise<void>} A promise that resolves after the actions are completed.
|
|
208
240
|
*/
|
|
209
|
-
|
|
241
|
+
afterDraw() {
|
|
210
242
|
document.addEventListener(this.trigger, this.triggerEvent);
|
|
211
|
-
if (this.screenBreakPoint && window.innerWidth
|
|
243
|
+
if (this.screenBreakPoint && window.innerWidth <= this.screenBreakPoint) {
|
|
212
244
|
this.variant = "over";
|
|
213
245
|
}
|
|
214
246
|
this.checkForVariant(this.variant);
|
|
@@ -226,7 +258,6 @@ class SlidingContainer extends WJElement {
|
|
|
226
258
|
* @param {string} variant - The variant to check for.
|
|
227
259
|
*/
|
|
228
260
|
checkForVariant(variant) {
|
|
229
|
-
var _a, _b;
|
|
230
261
|
if (variant === "over") {
|
|
231
262
|
this.style.position = "fixed";
|
|
232
263
|
let computentStyleOfParent = window.getComputedStyle(
|
|
@@ -236,23 +267,26 @@ class SlidingContainer extends WJElement {
|
|
|
236
267
|
let heightOfParrentElement = parseFloat(
|
|
237
268
|
computentStyleOfParent.height
|
|
238
269
|
);
|
|
239
|
-
let widthOfParrentElement = parseFloat(
|
|
240
|
-
computentStyleOfParent.width
|
|
241
|
-
);
|
|
242
270
|
let topOfParrentElement = parseFloat(computentStyleOfParent.top);
|
|
243
271
|
this.style.height = heightOfParrentElement + +this.addToHeight + "px";
|
|
244
272
|
this.wrapperDiv.style.height = heightOfParrentElement + +this.addToHeight + "px";
|
|
245
273
|
this.style.top = topOfParrentElement + "px";
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
274
|
+
const leftSibling = this.previousElementSibling;
|
|
275
|
+
const rightSibling = this.nextElementSibling;
|
|
276
|
+
const leftSiblingBoundingbox = leftSibling == null ? void 0 : leftSibling.getBoundingClientRect();
|
|
277
|
+
const rightSiblingBoundingbox = rightSibling == null ? void 0 : rightSibling.getBoundingClientRect();
|
|
278
|
+
if (this.direction === "right") {
|
|
279
|
+
if (leftSiblingBoundingbox) {
|
|
280
|
+
this.style.left = leftSiblingBoundingbox.left + leftSiblingBoundingbox.width + "px";
|
|
281
|
+
} else {
|
|
250
282
|
this.style.left = parentElementBoundingbox.left + "px";
|
|
283
|
+
}
|
|
284
|
+
} else {
|
|
285
|
+
if (rightSiblingBoundingbox) {
|
|
286
|
+
this.style.right = window.innerWidth - rightSiblingBoundingbox.left + "px";
|
|
251
287
|
} else {
|
|
252
|
-
this.style.right = window.innerWidth - (parentElementBoundingbox.left + parentElementBoundingbox.width) +
|
|
288
|
+
this.style.right = window.innerWidth - (parentElementBoundingbox.left + parentElementBoundingbox.width) + "px";
|
|
253
289
|
}
|
|
254
|
-
} else if (isLastChildInContainer) {
|
|
255
|
-
this.style.right = window.innerWidth - (parentElementBoundingbox.left + parentElementBoundingbox.width) + "px";
|
|
256
290
|
}
|
|
257
291
|
}
|
|
258
292
|
}
|
|
@@ -278,55 +312,92 @@ class SlidingContainer extends WJElement {
|
|
|
278
312
|
}
|
|
279
313
|
/**
|
|
280
314
|
* Animates the transition of the element's width from 0 to the maximum width or vice versa.
|
|
281
|
-
* @returns {Promise<void>} A promise that resolves when the animation
|
|
315
|
+
* @returns {Promise<void>} A promise that resolves when the animation is complete.
|
|
282
316
|
*/
|
|
283
317
|
doAnimateTransition() {
|
|
318
|
+
var _a, _b, _c, _d;
|
|
284
319
|
const options = {
|
|
285
320
|
delay: 0,
|
|
286
321
|
endDelay: 0,
|
|
287
|
-
fill: "
|
|
322
|
+
fill: "forwards",
|
|
288
323
|
duration: +this.animationDuration,
|
|
289
324
|
iterationStart: 0,
|
|
290
325
|
iterations: 1,
|
|
291
326
|
direction: "normal",
|
|
292
327
|
easing: this.animationEasing
|
|
293
328
|
};
|
|
329
|
+
if (this.animation && ((_b = (_a = this.animation) == null ? void 0 : _a.effect) == null ? void 0 : _b.target) !== this.transparentDiv) {
|
|
330
|
+
this.animation.cancel();
|
|
331
|
+
this.animation = null;
|
|
332
|
+
}
|
|
333
|
+
if (this.nativeAnimation && ((_d = (_c = this.nativeAnimation) == null ? void 0 : _c.effect) == null ? void 0 : _d.target) !== this.nativeElement) {
|
|
334
|
+
this.nativeAnimation.cancel();
|
|
335
|
+
this.nativeAnimation = null;
|
|
336
|
+
}
|
|
294
337
|
if (!this._isOpen) {
|
|
295
|
-
if (this.animation) {
|
|
338
|
+
if (this.animation && this.nativeAnimation) {
|
|
296
339
|
this.animation.reverse();
|
|
297
340
|
this.nativeAnimation.reverse();
|
|
298
|
-
|
|
341
|
+
} else {
|
|
342
|
+
this.animation = this.transparentDiv.animate(
|
|
343
|
+
[
|
|
344
|
+
{
|
|
345
|
+
width: 0
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
width: this.maxWidth
|
|
349
|
+
}
|
|
350
|
+
],
|
|
351
|
+
options
|
|
352
|
+
);
|
|
353
|
+
this.nativeAnimation = this.nativeElement.animate(
|
|
354
|
+
[
|
|
355
|
+
{
|
|
356
|
+
...this.hasOpacity ? { opacity: 0 } : {},
|
|
357
|
+
width: 0
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
...this.hasOpacity ? { opacity: 1 } : {},
|
|
361
|
+
width: this.maxWidth
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
options
|
|
365
|
+
);
|
|
299
366
|
}
|
|
300
|
-
this.animation = this.transparentDiv.animate(
|
|
301
|
-
[
|
|
302
|
-
{
|
|
303
|
-
width: 0
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
width: this.maxWidth
|
|
307
|
-
}
|
|
308
|
-
],
|
|
309
|
-
options
|
|
310
|
-
);
|
|
311
|
-
this.nativeAnimation = this.nativeElement.animate(
|
|
312
|
-
[
|
|
313
|
-
{
|
|
314
|
-
...this.hasOpacity ? { opacity: 0 } : {},
|
|
315
|
-
width: 0
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
...this.hasOpacity ? { opacity: 1 } : {},
|
|
319
|
-
width: this.maxWidth
|
|
320
|
-
}
|
|
321
|
-
],
|
|
322
|
-
options
|
|
323
|
-
);
|
|
324
367
|
} else {
|
|
325
|
-
this.animation.
|
|
326
|
-
|
|
368
|
+
if (this.animation && this.nativeAnimation) {
|
|
369
|
+
this.animation.reverse();
|
|
370
|
+
this.nativeAnimation.reverse();
|
|
371
|
+
} else {
|
|
372
|
+
this.animation = this.transparentDiv.animate(
|
|
373
|
+
[
|
|
374
|
+
{
|
|
375
|
+
width: this.maxWidth
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
width: 0
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
options
|
|
382
|
+
);
|
|
383
|
+
this.nativeAnimation = this.nativeElement.animate(
|
|
384
|
+
[
|
|
385
|
+
{
|
|
386
|
+
...this.hasOpacity ? { opacity: 1 } : {},
|
|
387
|
+
width: this.maxWidth
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
...this.hasOpacity ? { opacity: 0 } : {},
|
|
391
|
+
width: 0
|
|
392
|
+
}
|
|
393
|
+
],
|
|
394
|
+
options
|
|
395
|
+
);
|
|
396
|
+
}
|
|
327
397
|
}
|
|
328
398
|
return new Promise((resolve, reject) => {
|
|
329
399
|
this.animation.onfinish = () => {
|
|
400
|
+
this._isOpen = !this._isOpen;
|
|
330
401
|
resolve();
|
|
331
402
|
};
|
|
332
403
|
});
|
|
@@ -346,7 +417,6 @@ class SlidingContainer extends WJElement {
|
|
|
346
417
|
);
|
|
347
418
|
await this.doAnimateTransition();
|
|
348
419
|
await Promise.resolve(this.afterOpen(event)).then(() => {
|
|
349
|
-
this._isOpen = true;
|
|
350
420
|
this.dispatchEvent(
|
|
351
421
|
new CustomEvent("wje-sliding-container:open", {
|
|
352
422
|
bubbles: true,
|
|
@@ -378,7 +448,6 @@ class SlidingContainer extends WJElement {
|
|
|
378
448
|
child.remove();
|
|
379
449
|
});
|
|
380
450
|
}
|
|
381
|
-
this._isOpen = false;
|
|
382
451
|
this.dispatchEvent(
|
|
383
452
|
new CustomEvent("wje-sliding-container:close", {
|
|
384
453
|
bubbles: true,
|
|
@@ -401,6 +470,10 @@ class SlidingContainer extends WJElement {
|
|
|
401
470
|
await this.open(event);
|
|
402
471
|
}
|
|
403
472
|
}
|
|
473
|
+
componentCleanup() {
|
|
474
|
+
this._resizeObserver.disconnect();
|
|
475
|
+
this._resizeObserver = null;
|
|
476
|
+
}
|
|
404
477
|
}
|
|
405
478
|
SlidingContainer.define("wje-sliding-container", SlidingContainer);
|
|
406
479
|
export {
|
package/dist/wje-split-view.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
import WJElement from "./wje-element.js";
|
|
8
5
|
function drag(container, options) {
|
|
9
6
|
function move(pointerEvent) {
|
|
@@ -47,7 +44,7 @@ class SplitView extends WJElement {
|
|
|
47
44
|
*/
|
|
48
45
|
__publicField(this, "handleDrag", (e) => {
|
|
49
46
|
if (this.hasAttribute("disabled"))
|
|
50
|
-
return
|
|
47
|
+
return;
|
|
51
48
|
drag(this, {
|
|
52
49
|
onMove: (x, y) => {
|
|
53
50
|
let newPositionInPixels = this.hasAttribute("vertical") ? y : x;
|
|
@@ -60,6 +57,12 @@ class SplitView extends WJElement {
|
|
|
60
57
|
});
|
|
61
58
|
});
|
|
62
59
|
}
|
|
60
|
+
set initial(value) {
|
|
61
|
+
this.setAttribute("initial", value);
|
|
62
|
+
}
|
|
63
|
+
get initial() {
|
|
64
|
+
return +this.getAttribute("initial") || 50;
|
|
65
|
+
}
|
|
63
66
|
/**
|
|
64
67
|
* Returns the CSS styles for the component.
|
|
65
68
|
*
|
|
@@ -92,7 +95,7 @@ class SplitView extends WJElement {
|
|
|
92
95
|
* @param {Object} params - The parameters for drawing.
|
|
93
96
|
* @returns {DocumentFragment}
|
|
94
97
|
*/
|
|
95
|
-
draw(
|
|
98
|
+
draw() {
|
|
96
99
|
let fragment = document.createDocumentFragment();
|
|
97
100
|
let native = document.createElement("div");
|
|
98
101
|
native.classList.add("native-split-view");
|
|
@@ -133,7 +136,9 @@ class SplitView extends WJElement {
|
|
|
133
136
|
*/
|
|
134
137
|
detectSize() {
|
|
135
138
|
const { width, height } = this.getBoundingClientRect();
|
|
139
|
+
console.log(this, this.getBoundingClientRect());
|
|
136
140
|
this.size = this.hasAttribute("vertical") ? height : width;
|
|
141
|
+
console.log("detectSize:", this.hasAttribute("vertical"), this.size);
|
|
137
142
|
}
|
|
138
143
|
/**
|
|
139
144
|
* Converts pixels to a percentage.
|
package/dist/wje-status.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
import WJElement from "./wje-element.js";
|
|
8
5
|
const styles = '/*\n[ WJ Status ]\n*/\n\n.native-status {\n display: flex;\n align-items: center;\n}\n\n.bullet {\n width: var(--wje-status-size);\n height: var(--wje-status-size);\n display: flex;\n align-items: center;\n justify-content: center;\n border-width: 1px;\n border-style: solid;\n border-color: transparent;\n border-radius: var(--wje-border-radius-circle);\n}\n\n:host ::slotted([slot="start"]) {\n margin-right: var(--wje-spacing-x-small);\n}\n\n:host ::slotted([slot="end"]) {\n margin-left: var(--wje-spacing-x-small);\n}\n\n/* Size */\n:host([size=small]) {\n --wje-status-size: var(--wje-size-small);\n}\n\n:host([size=medium]) {\n --wje-status-size: var(--wje-size);\n}\n\n:host([size=large]) {\n --wje-status-size: var(--wje-size-large);\n}\n\n/* Color */\n:host([color=primary]) .bullet {\n background-color: var(--wje-color-primary-9);\n color: var(--wje-color-contrast-0);\n}\n\n:host([color=complete]) .bullet {\n background-color: var(--wje-color-complete-9);\n color: var(--wje-color-contrast-0);\n}\n\n:host([color=success]) .bullet {\n background-color: var(--wje-color-success-9);\n color: var(--wje-color-contrast-0);\n}\n\n:host([color=warning]) .bullet{\n background-color: var(--wje-color-warning-9);\n color: var(--wje-color-contrast-11);\n}\n\n:host([color=danger]) .bullet {\n background-color: var(--wje-color-danger-9);\n color: var(--wje-color-contrast-0);\n}\n\n:host([color=contrast]) .bullet {\n background-color: var(--wje-color-contrast-2);\n color: var(--wje-color-contrast-11);\n}\n\n:host([color=contrast-reverse]) .bullet {\n background-color: var(--wje-color-contrast-11);\n color: var(--wje-color-contrast-0);\n}\n\n/* Border */\n:host([border=primary]) .bullet {\n border-color: var(--wje-color-primary-9);\n}\n\n:host([border=complete]) .bullet {\n border-color: var(--wje-color-complete-9);\n}\n\n:host([border=success]) .bullet {\n border-color: var(--wje-color-success-9);\n}\n\n:host([border=warning]) .bullet {\n border-color: var(--wje-color-warning-9);\n}\n\n:host([border=danger]) .bullet {\n border-color: var(--wje-color-danger-9);\n}\n\n:host([border=contrast]) .bullet {\n border-color: var(--wje-color-contrast-2);\n}\n\n:host([border=contrast-reverse]) .bullet {\n border-color: var(--wje-color-contrast-11);\n}';
|
|
9
6
|
class Status extends WJElement {
|
|
@@ -40,7 +37,7 @@ class Status extends WJElement {
|
|
|
40
37
|
* @param {Object} params - The parameters
|
|
41
38
|
* @returns {Object} fragment - The document fragment
|
|
42
39
|
*/
|
|
43
|
-
draw(
|
|
40
|
+
draw() {
|
|
44
41
|
let fragment = document.createDocumentFragment();
|
|
45
42
|
let native = document.createElement("div");
|
|
46
43
|
native.setAttribute("part", "native");
|
package/dist/wje-step.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
import WJElement from "./wje-element.js";
|
|
8
5
|
const styles = "";
|
|
9
6
|
class Step extends WJElement {
|