wj-elements 0.0.2 → 0.0.4
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/router-links-e0087f84.js +146 -0
- package/dist/style.css +2 -2365
- package/dist/wj-aside.js +18 -22
- package/dist/wj-avatar.js +32 -49
- package/dist/wj-badge.js +18 -22
- package/dist/wj-breadcrumb.js +53 -103
- package/dist/wj-breadcrumbs.js +21 -36
- package/dist/wj-button-group.js +24 -36
- package/dist/wj-button.js +37 -80
- package/dist/wj-card-content.js +16 -18
- package/dist/wj-card-controls.js +16 -18
- package/dist/wj-card-header.js +16 -20
- package/dist/wj-card-subtitle.js +17 -19
- package/dist/wj-card-title.js +16 -18
- package/dist/wj-card.js +16 -20
- package/dist/wj-checkbox.js +24 -46
- package/dist/wj-chip.js +21 -39
- package/dist/wj-col.js +18 -32
- package/dist/wj-color-picker.js +503 -868
- package/dist/wj-container.js +18 -20
- package/dist/wj-copy-button.js +66 -112
- package/dist/wj-dialog.js +43 -67
- package/dist/wj-divider.js +16 -20
- package/dist/wj-dropdown.js +22 -31
- package/dist/wj-element.js +241 -416
- package/dist/wj-footer.js +16 -18
- package/dist/wj-form.js +16 -18
- package/dist/wj-grid.js +17 -21
- package/dist/wj-header.js +18 -22
- package/dist/wj-icon-picker.js +66 -107
- package/dist/wj-icon.js +67 -140
- package/dist/wj-img-comparer.js +43 -72
- package/dist/wj-img.js +21 -31
- package/dist/wj-infinite-scroll.js +49 -84
- package/dist/wj-input.js +67 -146
- package/dist/wj-item.js +19 -34
- package/dist/wj-label.js +19 -21
- package/dist/wj-list.js +17 -20
- package/dist/wj-main.js +16 -18
- package/dist/wj-master.js +331 -462
- package/dist/wj-menu-button.js +18 -21
- package/dist/wj-menu-item.js +67 -144
- package/dist/wj-menu-label.js +17 -21
- package/dist/wj-menu.js +20 -24
- package/dist/wj-popup.js +714 -1140
- package/dist/wj-progress-bar.js +42 -100
- package/dist/wj-radio-group.js +27 -38
- package/dist/wj-radio.js +24 -46
- package/dist/wj-route.js +8 -11
- package/dist/wj-router-link.js +19 -22
- package/dist/wj-router-outlet.js +71 -135
- package/dist/wj-routerx.js +641 -1121
- package/dist/wj-row.js +20 -22
- package/dist/wj-slider.js +55 -97
- package/dist/wj-split-view.js +45 -81
- package/dist/wj-store.js +110 -195
- package/dist/wj-textarea.js +39 -86
- package/dist/wj-thumbnail.js +17 -19
- package/dist/wj-toast.js +34 -88
- package/dist/wj-toggle.js +24 -42
- package/dist/wj-toolbar-action.js +16 -27
- package/dist/wj-toolbar.js +21 -26
- package/dist/wj-tooltip.js +27 -41
- package/dist/wj-visually-hidden.js +16 -18
- package/package.json +1 -1
- package/dist/router-links-26e4a166.js +0 -204
package/dist/wj-row.js
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var w = Object.defineProperty;
|
|
2
|
+
var l = (e, t, g) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: g }) : e[t] = g;
|
|
3
|
+
var o = (e, t, g) => (l(e, typeof t != "symbol" ? t + "" : t, g), g);
|
|
4
|
+
import u from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const r = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host{display:flex;flex-wrap:wrap}:host(.wj-wrap){flex-wrap:wrap!important}:host{--wj-gutter-x: 1.5rem;--wj-gutter-y: 0;display:flex;flex-wrap:nowrap;margin-top:calc(var(--wj-gutter-y) * -1);margin-right:calc(var(--wj-gutter-x) * -.5);margin-left:calc(var(--wj-gutter-x) * -.5)}:host(.g-0),:host(.gx-0){--wj-gutter-x: 0}:host(.g-0),:host(.gy-0){--wj-gutter-y: 0}:host(.g-1),:host(.gx-1){--wj-gutter-x: .25rem}:host(.g-1),:host(.gy-1){--wj-gutter-y: .25rem}:host(.g-2),:host(.gx-2){--wj-gutter-x: .5rem}:host(.g-2),:host(.gy-2){--wj-gutter-y: .5rem}:host(.g-3),:host(.gx-3){--wj-gutter-x: 1rem}:host(.g-3),:host(.gy-3){--wj-gutter-y: 1rem}:host(.g-4),:host(.gx-4){--wj-gutter-x: 1.5rem}:host(.g-4),:host(.gy-4){--wj-gutter-y: 1.5rem}:host(.g-5),:host(.gx-5){--wj-gutter-x: 3rem}:host(.g-5),:host(.gy-5){--wj-gutter-y: 3rem}@media (min-width: 576px){:host(.g-sm-0),:host(.gx-sm-0){--wj-gutter-x: 0}:host(.g-sm-0),:host(.gy-sm-0){--wj-gutter-y: 0}:host(.g-sm-1),:host(.gx-sm-1){--wj-gutter-x: .25rem}:host(.g-sm-1),:host(.gy-sm-1){--wj-gutter-y: .25rem}:host(.g-sm-2),:host(.gx-sm-2){--wj-gutter-x: .5rem}:host(.g-sm-2),:host(.gy-sm-2){--wj-gutter-y: .5rem}:host(.g-sm-3),:host(.gx-sm-3){--wj-gutter-x: 1rem}:host(.g-sm-3),:host(.gy-sm-3){--wj-gutter-y: 1rem}:host(.g-sm-4),:host(.gx-sm-4){--wj-gutter-x: 1.5rem}:host(.g-sm-4),:host(.gy-sm-4){--wj-gutter-y: 1.5rem}:host(.g-sm-5),:host(.gx-sm-5){--wj-gutter-x: 3rem}:host(.g-sm-5),:host(.gy-sm-5){--wj-gutter-y: 3rem}}@media (min-width: 768px){:host(.g-md-0),:host(.gx-md-0){--wj-gutter-x: 0}:host(.g-md-0),:host(.gy-md-0){--wj-gutter-y: 0}:host(.g-md-1),:host(.gx-md-1){--wj-gutter-x: .25rem}:host(.g-md-1),:host(.gy-md-1){--wj-gutter-y: .25rem}:host(.g-md-2),:host(.gx-md-2){--wj-gutter-x: .5rem}:host(.g-md-2),:host(.gy-md-2){--wj-gutter-y: .5rem}:host(.g-md-3),:host(.gx-md-3){--wj-gutter-x: 1rem}:host(.g-md-3),:host(.gy-md-3){--wj-gutter-y: 1rem}:host(.g-md-4),:host(.gx-md-4){--wj-gutter-x: 1.5rem}:host(.g-md-4),:host(.gy-md-4){--wj-gutter-y: 1.5rem}:host(.g-md-5),:host(.gx-md-5){--wj-gutter-x: 3rem}:host(.g-md-5),:host(.gy-md-5){--wj-gutter-y: 3rem}}@media (min-width: 992px){:host(.g-lg-0),:host(.gx-lg-0){--wj-gutter-x: 0}:host(.g-lg-0),:host(.gy-lg-0){--wj-gutter-y: 0}:host(.g-lg-1),:host(.gx-lg-1){--wj-gutter-x: .25rem}:host(.g-lg-1),:host(.gy-lg-1){--wj-gutter-y: .25rem}:host(.g-lg-2),:host(.gx-lg-2){--wj-gutter-x: .5rem}:host(.g-lg-2),:host(.gy-lg-2){--wj-gutter-y: .5rem}:host(.g-lg-3),:host(.gx-lg-3){--wj-gutter-x: 1rem}:host(.g-lg-3),:host(.gy-lg-3){--wj-gutter-y: 1rem}:host(.g-lg-4),:host(.gx-lg-4){--wj-gutter-x: 1.5rem}:host(.g-lg-4),:host(.gy-lg-4){--wj-gutter-y: 1.5rem}:host(.g-lg-5),:host(.gx-lg-5){--wj-gutter-x: 3rem}:host(.g-lg-5),:host(.gy-lg-5){--wj-gutter-y: 3rem}}@media (min-width: 1200px){:host(.g-xl-0),:host(.gx-xl-0){--wj-gutter-x: 0}:host(.g-xl-0),:host(.gy-xl-0){--wj-gutter-y: 0}:host(.g-xl-1),:host(.gx-xl-1){--wj-gutter-x: .25rem}:host(.g-xl-1),:host(.gy-xl-1){--wj-gutter-y: .25rem}:host(.g-xl-2),:host(.gx-xl-2){--wj-gutter-x: .5rem}:host(.g-xl-2),:host(.gy-xl-2){--wj-gutter-y: .5rem}:host(.g-xl-3),:host(.gx-xl-3){--wj-gutter-x: 1rem}:host(.g-xl-3),:host(.gy-xl-3){--wj-gutter-y: 1rem}:host(.g-xl-4),:host(.gx-xl-4){--wj-gutter-x: 1.5rem}:host(.g-xl-4),:host(.gy-xl-4){--wj-gutter-y: 1.5rem}:host(.g-xl-5),:host(.gx-xl-5){--wj-gutter-x: 3rem}:host(.g-xl-5),:host(.gy-xl-5){--wj-gutter-y: 3rem}}@media (min-width: 1400px){:host(.g-xxl-0),:host(.gx-xxl-0){--wj-gutter-x: 0}:host(.g-xxl-0),:host(.gy-xxl-0){--wj-gutter-y: 0}:host(.g-xxl-1),:host(.gx-xxl-1){--wj-gutter-x: .25rem}:host(.g-xxl-1),:host(.gy-xxl-1){--wj-gutter-y: .25rem}:host(.g-xxl-2),:host(.gx-xxl-2){--wj-gutter-x: .5rem}:host(.g-xxl-2),:host(.gy-xxl-2){--wj-gutter-y: .5rem}:host(.g-xxl-3),:host(.gx-xxl-3){--wj-gutter-x: 1rem}:host(.g-xxl-3),:host(.gy-xxl-3){--wj-gutter-y: 1rem}:host(.g-xxl-4),:host(.gx-xxl-4){--wj-gutter-x: 1.5rem}:host(.g-xxl-4),:host(.gy-xxl-4){--wj-gutter-y: 1.5rem}:host(.g-xxl-5),:host(.gx-xxl-5){--wj-gutter-x: 3rem}:host(.g-xxl-5),:host(.gy-xxl-5){--wj-gutter-y: 3rem}}:host(.wj-justify-content-center){justify-content:center!important}:host(.wj-justify-content-end){justify-content:flex-end!important}:host(.wj-justify-content-between){justify-content:space-between!important}:host(.wj-justify-content-around){justify-content:space-around!important}:host(.wj-align-items-start){align-items:baseline!important}:host(.wj-align-items-center){align-items:center!important}:host(.wj-align-items-end){align-items:flex-end!important}
|
|
9
|
+
`;
|
|
10
|
+
console.log("STYLES ROW:", r);
|
|
11
|
+
class j extends u {
|
|
12
12
|
constructor() {
|
|
13
13
|
super();
|
|
14
|
-
|
|
14
|
+
o(this, "className", "Row");
|
|
15
15
|
}
|
|
16
16
|
static get cssStyleSheet() {
|
|
17
|
-
return
|
|
17
|
+
return r;
|
|
18
18
|
}
|
|
19
19
|
setupAttributes() {
|
|
20
20
|
this.isShadowRoot = "open";
|
|
21
21
|
}
|
|
22
|
-
beforeDraw(
|
|
22
|
+
beforeDraw(g, h, x) {
|
|
23
23
|
}
|
|
24
|
-
draw(
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fragment.appendChild(element);
|
|
30
|
-
return fragment;
|
|
24
|
+
draw(g, h, x) {
|
|
25
|
+
let s = document.createDocumentFragment();
|
|
26
|
+
this.hasAttribute("wrap") && this.classList.add("wj-wrap");
|
|
27
|
+
let m = document.createElement("slot");
|
|
28
|
+
return s.appendChild(m), s;
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
customElements.get("wj-row") || window.customElements.define("wj-row",
|
|
31
|
+
customElements.get("wj-row") || window.customElements.define("wj-row", j);
|
|
34
32
|
export {
|
|
35
|
-
Row
|
|
33
|
+
j as Row
|
|
36
34
|
};
|
package/dist/wj-slider.js
CHANGED
|
@@ -1,55 +1,50 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var c = (a, o, e) => o in a ? b(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
|
|
3
|
+
var s = (a, o, e) => (c(a, typeof o != "symbol" ? o + "" : o, e), e);
|
|
4
|
+
import w from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const styles = '/*!\n* direction.scss\n*/\n/* Skeleton Variables */\n:host {\n --wj-slider-track-height: 4px;\n position: relative;\n display: flex;\n align-items: center;\n max-width: 100%;\n}\n:host .native-slider {\n display: flex;\n position: relative;\n flex-grow: 1;\n align-items: center;\n height: inherit;\n}\n:host .slider {\n display: flex;\n align-items: center;\n position: relative;\n flex: 1 1 0%;\n width: 100%;\n height: var(--height);\n contain: size layout style;\n cursor: grab;\n touch-action: pan-y;\n}\ninput[type=range] {\n -webkit-appearance: none;\n width: 100%;\n height: var(--wj-slider-track-height);\n margin: 0;\n border-radius: 5px;\n background-size: 70% 100%;\n background-repeat: no-repeat;\n /* Input Track */\n --wj-slider-color: #7252D3;\n --wj-slider-thumb-color: #7252D3;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #7252D3), var(--wj-slider-color, #7252D3));\n /* Input Thumb */\n}\ninput[type=range]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n cursor: ew-resize;\n transition: background 0.3s ease-in-out;\n}\ninput[type=range]::-moz-range-thumb {\n -webkit-appearance: none;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n cursor: pointer;\n transition: background 0.3s ease-in-out;\n border: 0;\n}\ninput[type=range]::-ms-thumb {\n -webkit-appearance: none;\n height: 18px;\n width: 18px;\n border-radius: 50%;\n cursor: ew-resize;\n transition: background 0.3s ease-in-out;\n}\ninput[type=range]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n}\ninput[type=range]::-moz-range-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n}\ninput[type=range]::-ms-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n}\ninput[type=range][color=primary] {\n --wj-slider-color: #7252D3;\n --wj-slider-thumb-color: #7252D3;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #7252D3), var(--wj-slider-color, #7252D3));\n /* Input Thumb */\n}\ninput[type=range][color=primary]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=primary]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range][color=success] {\n --wj-slider-color: #19AD79;\n --wj-slider-thumb-color: #19AD79;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #d6f7f0;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #19AD79), var(--wj-slider-color, #19AD79));\n /* Input Thumb */\n}\ninput[type=range][color=success]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=success]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #19AD79);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0);\n}\ninput[type=range][color=complete] {\n --wj-slider-color: #0072EC;\n --wj-slider-thumb-color: #0072EC;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #d3eeff;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #0072EC), var(--wj-slider-color, #0072EC));\n /* Input Thumb */\n}\ninput[type=range][color=complete]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=complete]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #0072EC);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff);\n}\ninput[type=range][color=danger] {\n --wj-slider-color: #D83C31;\n --wj-slider-thumb-color: #D83C31;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #fde2da;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #D83C31), var(--wj-slider-color, #D83C31));\n /* Input Thumb */\n}\ninput[type=range][color=danger]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=danger]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #D83C31);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da);\n}\ninput[type=range][color=warning] {\n --wj-slider-color: #FFd945;\n --wj-slider-thumb-color: #FFd945;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px #fffde1;\n --wj-slider-track-color: #dbe6e8;\n background-color: var(--wj-slider-track-color, #dbe6e8);\n background-image: linear-gradient(var(--wj-slider-color, #FFd945), var(--wj-slider-color, #FFd945));\n /* Input Thumb */\n}\ninput[type=range][color=warning]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=warning]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #FFd945);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1);\n}\ninput[type=range][color=contrast] {\n --wj-slider-color: #fff;\n --wj-slider-thumb-color: #fff;\n --wj-slider-thumb-shadow: none;\n --wj-slider-thumb-shadow-active: 0 0 0 7px white;\n --wj-slider-track-color: #757575;\n background-color: var(--wj-slider-track-color, #757575);\n background-image: linear-gradient(var(--wj-slider-color, #fff), var(--wj-slider-color, #fff));\n /* Input Thumb */\n}\ninput[type=range][color=contrast]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range][color=contrast]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #fff);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px white);\n}\ninput[type=range]::-webkit-slider-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-moz-range-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-ms-thumb {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-webkit-slider-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-moz-range-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-ms-thumb:active {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-webkit-slider-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-moz-range-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ninput[type=range]::-ms-thumb:hover {\n background: var(--wj-slider-thumb-color, #7252D3);\n box-shadow: var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb);\n}\ndatalist {\n display: flex;\n justify-content: space-between;\n height: auto;\n overflow: hidden;\n margin-top: 16px;\n}\ndatalist option:before {\n content: "";\n display: block;\n width: 0;\n height: auto;\n padding-left: 3px;\n text-indent: 0;\n}\noutput {\n position: absolute;\n background: #000;\n color: #fff;\n top: -46px;\n padding: 4px 8px;\n border-radius: 4px;\n}\n::slotted([slot=label]) {\n margin-inline: 0 1rem;\n font-size: 14px;\n}\n::slotted([slot=start]) {\n margin-inline: 0 1rem;\n}\n::slotted([slot=end]) {\n margin-inline: 1rem 0;\n}';
|
|
10
|
-
|
|
6
|
+
const p = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host{--wj-slider-track-height: 4px;position:relative;display:flex;align-items:center;max-width:100%}:host .native-slider{display:flex;position:relative;flex-grow:1;align-items:center;height:inherit}:host .slider{display:flex;align-items:center;position:relative;flex:1 1 0%;width:100%;height:var(--height);contain:size layout style;cursor:grab;touch-action:pan-y}input[type=range]{-webkit-appearance:none;width:100%;height:var(--wj-slider-track-height);margin:0;border-radius:5px;background-size:70% 100%;background-repeat:no-repeat;--wj-slider-color: #7252D3;--wj-slider-thumb-color: #7252D3;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #7252D3),var(--wj-slider-color, #7252D3))}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:18px;width:18px;border-radius:50%;cursor:ew-resize;transition:background .3s ease-in-out}input[type=range]::-moz-range-thumb{-webkit-appearance:none;height:18px;width:18px;border-radius:50%;cursor:pointer;transition:background .3s ease-in-out;border:0}input[type=range]::-ms-thumb{-webkit-appearance:none;height:18px;width:18px;border-radius:50%;cursor:ew-resize;transition:background .3s ease-in-out}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;box-shadow:none;border:none;background:transparent}input[type=range]::-moz-range-track{-webkit-appearance:none;box-shadow:none;border:none;background:transparent}input[type=range]::-ms-track{-webkit-appearance:none;box-shadow:none;border:none;background:transparent}input[type=range][color=primary]{--wj-slider-color: #7252D3;--wj-slider-thumb-color: #7252D3;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #eae0fb;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #7252D3),var(--wj-slider-color, #7252D3))}input[type=range][color=primary]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-ms-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=primary]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range][color=success]{--wj-slider-color: #19AD79;--wj-slider-thumb-color: #19AD79;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #d6f7f0;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #19AD79),var(--wj-slider-color, #19AD79))}input[type=range][color=success]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-ms-thumb{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=success]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #19AD79);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d6f7f0)}input[type=range][color=complete]{--wj-slider-color: #0072EC;--wj-slider-thumb-color: #0072EC;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #d3eeff;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #0072EC),var(--wj-slider-color, #0072EC))}input[type=range][color=complete]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-ms-thumb{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=complete]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #0072EC);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #d3eeff)}input[type=range][color=danger]{--wj-slider-color: #D83C31;--wj-slider-thumb-color: #D83C31;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #fde2da;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #D83C31),var(--wj-slider-color, #D83C31))}input[type=range][color=danger]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-ms-thumb{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=danger]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #D83C31);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fde2da)}input[type=range][color=warning]{--wj-slider-color: #FFd945;--wj-slider-thumb-color: #FFd945;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px #fffde1;--wj-slider-track-color: #dbe6e8;background-color:var(--wj-slider-track-color, #dbe6e8);background-image:linear-gradient(var(--wj-slider-color, #FFd945),var(--wj-slider-color, #FFd945))}input[type=range][color=warning]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-ms-thumb{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=warning]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #FFd945);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #fffde1)}input[type=range][color=contrast]{--wj-slider-color: #fff;--wj-slider-thumb-color: #fff;--wj-slider-thumb-shadow: none;--wj-slider-thumb-shadow-active: 0 0 0 7px white;--wj-slider-track-color: #757575;background-color:var(--wj-slider-track-color, #757575);background-image:linear-gradient(var(--wj-slider-color, #fff),var(--wj-slider-color, #fff))}input[type=range][color=contrast]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px white)}input[type=range][color=contrast]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px white)}input[type=range][color=contrast]::-ms-thumb{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px white)}input[type=range][color=contrast]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range][color=contrast]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #fff);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px white)}input[type=range]::-webkit-slider-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range]::-moz-range-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range]::-ms-thumb{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow, 0 0 0 7px #eae0fb)}input[type=range]::-webkit-slider-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-moz-range-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-ms-thumb:active{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-webkit-slider-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-moz-range-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}input[type=range]::-ms-thumb:hover{background:var(--wj-slider-thumb-color, #7252D3);box-shadow:var(--wj-slider-thumb-shadow-active, 0 0 0 7px #eae0fb)}datalist{display:flex;justify-content:space-between;height:auto;overflow:hidden;margin-top:16px}datalist option:before{content:"";display:block;width:0;height:auto;padding-left:3px;text-indent:0}output{position:absolute;background:#000;color:#fff;top:-46px;padding:4px 8px;border-radius:4px}::slotted([slot=label]){margin-inline:0 1rem;font-size:14px}::slotted([slot=start]){margin-inline:0 1rem}::slotted([slot=end]){margin-inline:1rem 0}
|
|
9
|
+
`;
|
|
10
|
+
class m extends w {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
s(this, "className", "Slider");
|
|
14
|
+
s(this, "setHandlePosition", () => {
|
|
15
15
|
this.input.style.backgroundSize = this.getPercentage(this.input.value, this.input.min, this.input.max) + "% 100%";
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
let
|
|
19
|
-
this.output.style.left = `calc(${
|
|
20
|
-
this.output.innerHTML = this.input.value;
|
|
17
|
+
s(this, "setBubble", () => {
|
|
18
|
+
let e = this.getPercentage(this.input.value, this.input.min, this.input.max);
|
|
19
|
+
this.output.style.left = `calc(${e}% + (${8 - e * 0.15}px) - ${this.output.offsetWidth / 2}px)`, this.output.innerHTML = this.input.value;
|
|
21
20
|
});
|
|
22
21
|
}
|
|
23
|
-
set value(
|
|
24
|
-
this.setAttribute("value", value);
|
|
25
|
-
if (this.input) {
|
|
26
|
-
this.input.value = value;
|
|
27
|
-
this.setHandlePosition();
|
|
28
|
-
}
|
|
22
|
+
set value(e) {
|
|
23
|
+
this.setAttribute("value", e), this.input && (this.input.value = e, this.setHandlePosition());
|
|
29
24
|
}
|
|
30
25
|
get value() {
|
|
31
26
|
return this.getAttribute("value") || 0;
|
|
32
27
|
}
|
|
33
|
-
set min(
|
|
34
|
-
this.setAttribute("min",
|
|
28
|
+
set min(e) {
|
|
29
|
+
this.setAttribute("min", e);
|
|
35
30
|
}
|
|
36
31
|
get min() {
|
|
37
32
|
return this.getAttribute("min") || 0;
|
|
38
33
|
}
|
|
39
|
-
set max(
|
|
40
|
-
this.setAttribute("max",
|
|
34
|
+
set max(e) {
|
|
35
|
+
this.setAttribute("max", e);
|
|
41
36
|
}
|
|
42
37
|
get max() {
|
|
43
38
|
return this.getAttribute("max") || 100;
|
|
44
39
|
}
|
|
45
|
-
set step(
|
|
46
|
-
this.setAttribute("step",
|
|
40
|
+
set step(e) {
|
|
41
|
+
this.setAttribute("step", e);
|
|
47
42
|
}
|
|
48
43
|
get step() {
|
|
49
44
|
return this.getAttribute("step") || 1;
|
|
50
45
|
}
|
|
51
46
|
static get cssStyleSheet() {
|
|
52
|
-
return
|
|
47
|
+
return p;
|
|
53
48
|
}
|
|
54
49
|
static get observedAttributes() {
|
|
55
50
|
return ["max"];
|
|
@@ -58,105 +53,68 @@ class Slider extends WJElement {
|
|
|
58
53
|
this.isShadowRoot = "open";
|
|
59
54
|
}
|
|
60
55
|
draw() {
|
|
61
|
-
let
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
input.type = "range";
|
|
78
|
-
input.min = this.min;
|
|
79
|
-
input.max = this.max;
|
|
80
|
-
input.step = this.step;
|
|
81
|
-
input.value = this.value;
|
|
82
|
-
input.id = "slider";
|
|
83
|
-
input.name = "slider";
|
|
84
|
-
input.part = "slider";
|
|
85
|
-
input.setAttribute("autocomplete", "off");
|
|
86
|
-
input.setAttribute("color", this.color || "");
|
|
87
|
-
input.addEventListener("input", (e) => {
|
|
88
|
-
this.setHandlePosition(e.target);
|
|
89
|
-
});
|
|
90
|
-
slider.appendChild(input);
|
|
91
|
-
if (this.hasAttribute("bubble")) {
|
|
92
|
-
slider.appendChild(output);
|
|
93
|
-
}
|
|
94
|
-
element.appendChild(label);
|
|
95
|
-
element.appendChild(start);
|
|
96
|
-
element.appendChild(slider);
|
|
97
|
-
element.appendChild(end);
|
|
98
|
-
fragment.appendChild(element);
|
|
99
|
-
this.input = input;
|
|
100
|
-
this.output = output;
|
|
101
|
-
return fragment;
|
|
56
|
+
let e = document.createDocumentFragment(), t = document.createElement("div");
|
|
57
|
+
t.className = "native-slider";
|
|
58
|
+
let i = document.createElement("div");
|
|
59
|
+
i.className = "slider";
|
|
60
|
+
let n = document.createElement("slot");
|
|
61
|
+
n.name = "label";
|
|
62
|
+
let u = document.createElement("slot");
|
|
63
|
+
u.name = "start";
|
|
64
|
+
let l = document.createElement("slot");
|
|
65
|
+
l.name = "end";
|
|
66
|
+
let d = document.createElement("output");
|
|
67
|
+
d.setAttribute("for", "slider"), d.id = "output", d.setAttribute("hidden", "");
|
|
68
|
+
let r = document.createElement("input");
|
|
69
|
+
return r.type = "range", r.min = this.min, r.max = this.max, r.step = this.step, r.value = this.value, r.id = "slider", r.name = "slider", r.part = "slider", r.setAttribute("autocomplete", "off"), r.setAttribute("color", this.color || ""), r.addEventListener("input", (h) => {
|
|
70
|
+
this.setHandlePosition(h.target);
|
|
71
|
+
}), i.appendChild(r), this.hasAttribute("bubble") && i.appendChild(d), t.appendChild(n), t.appendChild(u), t.appendChild(i), t.appendChild(l), e.appendChild(t), this.input = r, this.output = d, e;
|
|
102
72
|
}
|
|
103
73
|
afterDraw() {
|
|
104
|
-
this.setHandlePosition()
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.output.removeAttribute("hidden");
|
|
108
|
-
setTimeout(this.setBubble, 50);
|
|
109
|
-
}
|
|
110
|
-
this.dispatchInit(this.input.value);
|
|
111
|
-
this.input.addEventListener("input", (e) => {
|
|
112
|
-
this.value = e.target.value;
|
|
113
|
-
this.dispatchMove(this.value);
|
|
114
|
-
if (this.hasAttribute("bubble")) {
|
|
115
|
-
this.setBubble();
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
this.input.addEventListener("change", (e) => {
|
|
74
|
+
this.setHandlePosition(), this.hasAttribute("bubble") && (this.output.innerHTML = this.input.value, this.output.removeAttribute("hidden"), setTimeout(this.setBubble, 50)), this.dispatchInit(this.input.value), this.input.addEventListener("input", (e) => {
|
|
75
|
+
this.value = e.target.value, this.dispatchMove(this.value), this.hasAttribute("bubble") && this.setBubble();
|
|
76
|
+
}), this.input.addEventListener("change", (e) => {
|
|
119
77
|
this.dispatchChange(e.target.value);
|
|
120
78
|
});
|
|
121
79
|
}
|
|
122
|
-
dispatchInit(
|
|
80
|
+
dispatchInit(e) {
|
|
123
81
|
this.dispatchEvent(
|
|
124
82
|
new CustomEvent("wj:slider-init", {
|
|
125
|
-
bubbles:
|
|
83
|
+
bubbles: !0,
|
|
126
84
|
detail: {
|
|
127
|
-
value,
|
|
85
|
+
value: e,
|
|
128
86
|
output: this.output
|
|
129
87
|
}
|
|
130
88
|
})
|
|
131
89
|
);
|
|
132
90
|
}
|
|
133
|
-
dispatchMove(
|
|
91
|
+
dispatchMove(e) {
|
|
134
92
|
this.dispatchEvent(
|
|
135
93
|
new CustomEvent("wj:slider-move", {
|
|
136
|
-
bubbles:
|
|
94
|
+
bubbles: !0,
|
|
137
95
|
detail: {
|
|
138
|
-
value,
|
|
96
|
+
value: e,
|
|
139
97
|
output: this.output
|
|
140
98
|
}
|
|
141
99
|
})
|
|
142
100
|
);
|
|
143
101
|
}
|
|
144
|
-
dispatchChange(
|
|
102
|
+
dispatchChange(e) {
|
|
145
103
|
this.dispatchEvent(
|
|
146
104
|
new CustomEvent("wj:slider-change", {
|
|
147
|
-
bubbles:
|
|
105
|
+
bubbles: !0,
|
|
148
106
|
detail: {
|
|
149
|
-
value,
|
|
107
|
+
value: e,
|
|
150
108
|
output: this.output
|
|
151
109
|
}
|
|
152
110
|
})
|
|
153
111
|
);
|
|
154
112
|
}
|
|
155
|
-
getPercentage(
|
|
156
|
-
return Number((
|
|
113
|
+
getPercentage(e = 0, t, i) {
|
|
114
|
+
return Number((e - t) * 100 / (i - t)) || 0;
|
|
157
115
|
}
|
|
158
116
|
}
|
|
159
|
-
customElements.get("wj-slider") || customElements.define("wj-slider",
|
|
117
|
+
customElements.get("wj-slider") || customElements.define("wj-slider", m);
|
|
160
118
|
export {
|
|
161
|
-
Slider
|
|
119
|
+
m as Slider
|
|
162
120
|
};
|
package/dist/wj-split-view.js
CHANGED
|
@@ -1,58 +1,40 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var p = (s, e, t) => e in s ? o(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var c = (s, e, t) => (p(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import h from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const offsetX = dims.left + defaultView.pageXOffset;
|
|
14
|
-
const offsetY = dims.top + defaultView.pageYOffset;
|
|
15
|
-
const x = pointerEvent.pageX - offsetX;
|
|
16
|
-
const y = pointerEvent.pageY - offsetY;
|
|
17
|
-
if (options == null ? void 0 : options.onMove) {
|
|
18
|
-
options.onMove(x, y);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function stop() {
|
|
22
|
-
document.removeEventListener("pointermove", move);
|
|
23
|
-
document.removeEventListener("pointerup", stop);
|
|
24
|
-
if (options == null ? void 0 : options.onStop) {
|
|
25
|
-
options.onStop();
|
|
26
|
-
}
|
|
6
|
+
function m(s, e) {
|
|
7
|
+
function t(n) {
|
|
8
|
+
const r = s.getBoundingClientRect(), i = s.ownerDocument.defaultView, d = r.left + i.pageXOffset, v = r.top + i.pageYOffset, w = n.pageX - d, a = n.pageY - v;
|
|
9
|
+
e != null && e.onMove && e.onMove(w, a);
|
|
27
10
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if ((options == null ? void 0 : options.initialEvent) instanceof PointerEvent) {
|
|
31
|
-
move(options.initialEvent);
|
|
11
|
+
function l() {
|
|
12
|
+
document.removeEventListener("pointermove", t), document.removeEventListener("pointerup", l), e != null && e.onStop && e.onStop();
|
|
32
13
|
}
|
|
14
|
+
document.addEventListener("pointermove", t, { passive: !0 }), document.addEventListener("pointerup", l), (e == null ? void 0 : e.initialEvent) instanceof PointerEvent && t(e.initialEvent);
|
|
33
15
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
16
|
+
const u = `/*!
|
|
17
|
+
* direction.scss
|
|
18
|
+
*/:host{--wj-split-view-divider-area: 12px;--wj-split-view-divider-width: 4px;--wj-split-view-min: 0%;--wj-split-view-max: 100%;--wj-split-view-calc-a: 50%;--wj-split-view-calc-b: 50%;--wj-split-view-clamp-a: clamp(var(--wj-split-view-min), var(--wj-split-view-calc-a), var(--wj-split-view-max));--wj-split-view-clamp-b: clamp(var(--wj-split-view-min), var(--wj-split-view-calc-b), var(--wj-split-view-max));--wj-split-view-divider-background: var(--wj-border-color);--wj-split-view-divider-size: 4px;height:100%;width:100%}::slotted([slot=start]),::slotted([slot=end]){width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}:host(:not([vertical])) ::slotted([slot=start]){width:var(--wj-split-view-clamp-a)}:host(:not([vertical])) ::slotted([slot=end]){width:var(--wj-split-view-clamp-b)}:host([vertical]) ::slotted([slot=start]){height:var(--wj-split-view-clamp-a);width:100%}:host([vertical]) ::slotted([slot=end]){height:var(--wj-split-view-clamp-b);width:100%}.native-split-view{height:100%;width:100%;display:flex;flex-direction:row;overflow:hidden;position:relative}:host([vertical]) .native-split-view{flex-direction:column}.wj-divider{display:flex;position:relative;align-items:center;justify-content:center;z-index:1;background-color:var(--wj-split-view-divider-background);height:100%;width:var(--wj-split-view-divider-size);cursor:col-resize}.wj-divider:after{display:flex;content:"";position:absolute;height:100%;left:calc(var(--wj-split-view-divider-area) / -2 + var(--wj-split-view-divider-width) / 2);width:var(--wj-split-view-divider-area)}:host([vertical]) .wj-divider{height:var(--wj-split-view-divider-size);width:100%;cursor:row-resize}:host([vertical]) .wj-divider:after{width:100%;top:calc(var(--wj-split-view-divider-area) / -2 + var(--wj-split-view-divider-width) / 2);height:var(--wj-split-view-divider-area)}
|
|
19
|
+
`;
|
|
20
|
+
class j extends h {
|
|
36
21
|
constructor() {
|
|
37
22
|
super();
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
c(this, "className", "SplitView");
|
|
24
|
+
c(this, "handleDrag", (t) => {
|
|
40
25
|
if (this.hasAttribute("disabled"))
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
onMove: (
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let sizeB = 100 - this.pixelsToPercentage(newPositionInPixels);
|
|
47
|
-
this.style.setProperty("--wj-split-view-calc-a", sizeA + "%");
|
|
48
|
-
this.style.setProperty("--wj-split-view-calc-b", sizeB + "%");
|
|
26
|
+
return !1;
|
|
27
|
+
m(this, {
|
|
28
|
+
onMove: (l, n) => {
|
|
29
|
+
let r = this.hasAttribute("vertical") ? n : l, i = this.pixelsToPercentage(r), d = 100 - this.pixelsToPercentage(r);
|
|
30
|
+
this.style.setProperty("--wj-split-view-calc-a", i + "%"), this.style.setProperty("--wj-split-view-calc-b", d + "%");
|
|
49
31
|
},
|
|
50
|
-
initialEvent:
|
|
32
|
+
initialEvent: t
|
|
51
33
|
});
|
|
52
34
|
});
|
|
53
35
|
}
|
|
54
36
|
static get cssStyleSheet() {
|
|
55
|
-
return
|
|
37
|
+
return u;
|
|
56
38
|
}
|
|
57
39
|
static get observedAttributes() {
|
|
58
40
|
return [];
|
|
@@ -60,51 +42,33 @@ class SplitView extends WJElement {
|
|
|
60
42
|
setupAttributes() {
|
|
61
43
|
this.isShadowRoot = "open";
|
|
62
44
|
}
|
|
63
|
-
draw(
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
dividerElement.classList.add("wj-divider");
|
|
75
|
-
dividerElement.setAttribute("part", "divider");
|
|
76
|
-
dividerElement.appendChild(divider);
|
|
77
|
-
dividerElement.addEventListener("mousedown", this.handleDrag, false);
|
|
78
|
-
native.appendChild(start);
|
|
79
|
-
native.appendChild(dividerElement);
|
|
80
|
-
native.appendChild(end);
|
|
81
|
-
fragment.appendChild(native);
|
|
82
|
-
return fragment;
|
|
45
|
+
draw(t, l, n) {
|
|
46
|
+
let r = document.createDocumentFragment(), i = document.createElement("div");
|
|
47
|
+
i.classList.add("native-split-view");
|
|
48
|
+
let d = document.createElement("slot");
|
|
49
|
+
d.setAttribute("name", "start");
|
|
50
|
+
let v = document.createElement("slot");
|
|
51
|
+
v.setAttribute("name", "end");
|
|
52
|
+
let w = document.createElement("slot");
|
|
53
|
+
w.setAttribute("name", "divider");
|
|
54
|
+
let a = document.createElement("div");
|
|
55
|
+
return a.classList.add("wj-divider"), a.setAttribute("part", "divider"), a.appendChild(w), a.addEventListener("mousedown", this.handleDrag, !1), i.appendChild(d), i.appendChild(a), i.appendChild(v), r.appendChild(i), r;
|
|
83
56
|
}
|
|
84
57
|
afterDraw() {
|
|
85
|
-
this.detectSize();
|
|
86
|
-
if (this.min)
|
|
87
|
-
this.style.setProperty("--wj-split-view-min", this.pixelsToPercentage(this.min) + "%");
|
|
88
|
-
if (this.max)
|
|
89
|
-
this.style.setProperty("--wj-split-view-max", 100 - this.pixelsToPercentage(this.max) + "%");
|
|
90
|
-
if (this.initial) {
|
|
91
|
-
this.style.setProperty("--wj-split-view-calc-a", this.pixelsToPercentage(this.initial) + "%");
|
|
92
|
-
this.style.setProperty("--wj-split-view-calc-b", 100 - this.pixelsToPercentage(this.initial) + "%");
|
|
93
|
-
}
|
|
94
|
-
this.resizeObserver = new ResizeObserver((entries) => this.handleResize(entries));
|
|
58
|
+
this.detectSize(), this.min && this.style.setProperty("--wj-split-view-min", this.pixelsToPercentage(this.min) + "%"), this.max && this.style.setProperty("--wj-split-view-max", 100 - this.pixelsToPercentage(this.max) + "%"), this.initial && (this.style.setProperty("--wj-split-view-calc-a", this.pixelsToPercentage(this.initial) + "%"), this.style.setProperty("--wj-split-view-calc-b", 100 - this.pixelsToPercentage(this.initial) + "%")), this.resizeObserver = new ResizeObserver((t) => this.handleResize(t));
|
|
95
59
|
}
|
|
96
60
|
detectSize() {
|
|
97
|
-
const { width, height } = this.getBoundingClientRect();
|
|
98
|
-
this.size = this.hasAttribute("vertical") ?
|
|
61
|
+
const { width: t, height: l } = this.getBoundingClientRect();
|
|
62
|
+
this.size = this.hasAttribute("vertical") ? l : t;
|
|
99
63
|
}
|
|
100
|
-
percentageToPixels(
|
|
101
|
-
return this.size * (
|
|
64
|
+
percentageToPixels(t) {
|
|
65
|
+
return this.size * (t / 100);
|
|
102
66
|
}
|
|
103
|
-
pixelsToPercentage(
|
|
104
|
-
return
|
|
67
|
+
pixelsToPercentage(t) {
|
|
68
|
+
return t / this.size * 100;
|
|
105
69
|
}
|
|
106
70
|
}
|
|
107
|
-
customElements.get("wj-split-view") || window.customElements.define("wj-split-view",
|
|
71
|
+
customElements.get("wj-split-view") || window.customElements.define("wj-split-view", j);
|
|
108
72
|
export {
|
|
109
|
-
SplitView
|
|
73
|
+
j as SplitView
|
|
110
74
|
};
|