wj-elements 0.0.3 → 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 -142
- 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-input.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var g = Object.defineProperty;
|
|
2
|
+
var w = (n, a, t) => a in n ? g(n, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[a] = t;
|
|
3
|
+
var b = (n, a, t) => (w(n, typeof a != "symbol" ? a + "" : a, t), t);
|
|
4
|
+
import y from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const j = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host{--wj-input-font-family: Inter UI, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--wj-input-background-color: #fff;--wj-input-color: #212121;--wj-input-color-invalid: #b91e1e;--wj-input-border-color: rgba(33, 33, 33, .14);--wj-input-border-color-focus: #7252D3;--wj-input-border-width: 1px;--wj-input-border-style: solid;--wj-input-border-radius: 4px;--wj-input-margin-bottom: .5rem;--wj-input-line-height: 20px;--wj-input-slot-padding-inline: .5rem;width:100%;margin-bottom:var(--wj-input-margin-bottom);display:block}:host .wrapper{display:flex;width:100%}:host .native-input .input-wrapper{width:100%}:host .native-input.default{background-color:var(--wj-input-background-color);font-family:var(--wj-input-font-family);position:relative;border-radius:var(--wj-input-border-radius);border-width:var(--wj-input-border-width);border-style:var(--wj-input-border-style);border-color:var(--wj-input-border-color);border-top-color:#08080824;padding-inline:0;padding-top:.25rem;padding-bottom:.25rem;transition:background-color .2s ease;cursor:text}:host .native-input.default .input-wrapper{margin-inline:.5rem}:host .native-input.default.focused{border-color:var(--wj-input-border-color-focus)!important}:host .native-input.default.focused label{opacity:.67;font-size:12px;letter-spacing:normal}:host .native-input.default input{border:none;height:25px;min-height:25px;padding:0;margin-top:-4px;background:none;box-shadow:none;width:100%}:host .native-input.default label{margin:0;display:block;opacity:1;cursor:text;transition:opacity .2s ease;line-height:var(--wj-input-line-height)}:host .native-input.default label.fade{opacity:.5;font-size:12px;letter-spacing:normal}:host .native-input.default ::slotted([slot=start]){border-left:none;border-top:none;border-bottom:none}:host .native-input.default ::slotted([slot=end]){border-right:none;border-top:none;border-bottom:none}:host .native-input.standard{background-color:var(--wj-input-background-color);font-family:var(--wj-input-font-family);position:relative;border-radius:var(--wj-input-border-radius);padding-inline:0;padding-top:0;padding-bottom:0;transition:background-color .2s ease;cursor:text}:host .native-input.standard.focused input{border-color:var(--wj-input-border-color-focus)!important}:host .native-input.standard input{display:block;min-height:32px;padding-inline:.5rem;padding-top:0;padding-bottom:0;background:none;box-shadow:none;width:100%;box-sizing:border-box;border-radius:var(--wj-input-border-radius);border-width:var(--wj-input-border-width);border-style:var(--wj-input-border-style);border-color:var(--wj-input-border-color)}:host .native-input.standard label{margin:0;display:inline-block;opacity:1;cursor:text;transition:opacity .2s ease;line-height:var(--wj-input-line-height)}:host .native-input.standard ::slotted([slot=start]){border-right:none;border-radius:var(--wj-input-border-radius) 0 0 var(--wj-input-border-radius)}:host .native-input.standard ::slotted([slot=end]){border-left:none;border-radius:0 var(--wj-input-border-radius) var(--wj-input-border-radius) 0}:host .native-input.standard.has-start input{border-top-left-radius:0;border-bottom-left-radius:0}:host .native-input.standard.has-end input{border-top-right-radius:0;border-bottom-right-radius:0}:host .native-input.standard .error-message{position:static;background:transparent;padding:.25rem 0;left:auto;transform:none;color:var(--wj-input-color-invalid);font-size:12px;line-height:normal}:host([required]) .input-wrapper:after{color:var(--wj-input-color-invalid);content:"*";font-family:-apple-system,BlinkMacSystemFont,Inter UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:20px;position:absolute;right:10px;top:2px}:host([required]) .standard .input-wrapper:after{top:0}:host([invalid]) .error-message{display:block}:host([invalid]) .default label{opacity:1!important;color:var(--wj-input-color-invalid)!important;animation-name:shake;animation-duration:.4s;animation-iteration-count:1}::slotted([slot=start]),::slotted([slot=end]){display:flex;align-items:center;border-width:var(--wj-input-border-width);border-style:var(--wj-input-border-style);border-color:var(--wj-input-border-color);padding-inline:var(--wj-input-slot-padding-inline)}slot[name=start],slot[name=end]{display:flex}input{background-color:var(--wj-input-background-color);border-width:var(--wj-input-border-width);border-style:var(--wj-input-border-style);border-color:var(--wj-input-border-color);font-family:var(--wjinput-font-family);color:var(--wj-input-color);border-top-color:#21212136;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;padding:.25rem .5rem;line-height:var(--wj-input-line-height);font-size:14px;font-weight:400;vertical-align:middle;min-height:32px}.error-message{display:none;position:absolute;width:auto;max-width:100%;min-width:auto;border-radius:50px;background:black;padding:.25rem .5rem;top:0;left:50%;transform:translate(-50%,-50%);color:#fff;font-size:12px;line-height:normal}@keyframes shake{8%,41%{transform:translate(-4px)}25%,58%{transform:translate(4px)}75%{transform:translate(-2px)}92%{transform:translate(2px)}0%,to{transform:translate(0)}}
|
|
9
|
+
`;
|
|
10
|
+
class f extends y {
|
|
11
|
+
constructor(t = {}) {
|
|
12
12
|
super();
|
|
13
|
-
|
|
14
|
-
this.invalid =
|
|
15
|
-
this.pristine = true;
|
|
16
|
-
this.internals = this.attachInternals();
|
|
13
|
+
b(this, "className", "Input");
|
|
14
|
+
this.invalid = !1, this.pristine = !0, this.internals = this.attachInternals();
|
|
17
15
|
}
|
|
18
|
-
set value(
|
|
19
|
-
this.setAttribute("value",
|
|
16
|
+
set value(t) {
|
|
17
|
+
this.setAttribute("value", t);
|
|
20
18
|
}
|
|
21
19
|
get value() {
|
|
22
20
|
return this.getAttribute("value") || "";
|
|
@@ -30,8 +28,8 @@ class Input extends WJElement {
|
|
|
30
28
|
get invalid() {
|
|
31
29
|
return this.hasAttribute("invalid");
|
|
32
30
|
}
|
|
33
|
-
set invalid(
|
|
34
|
-
|
|
31
|
+
set invalid(t) {
|
|
32
|
+
t && this.customErrorDisplay ? this.setAttribute("invalid", "") : this.removeAttribute("invalid");
|
|
35
33
|
}
|
|
36
34
|
get form() {
|
|
37
35
|
return this.internals.form;
|
|
@@ -58,7 +56,7 @@ class Input extends WJElement {
|
|
|
58
56
|
return this.internals.reportValidity();
|
|
59
57
|
}
|
|
60
58
|
static get cssStyleSheet() {
|
|
61
|
-
return
|
|
59
|
+
return j;
|
|
62
60
|
}
|
|
63
61
|
static get observedAttributes() {
|
|
64
62
|
return ["value"];
|
|
@@ -66,70 +64,23 @@ class Input extends WJElement {
|
|
|
66
64
|
setupAttributes() {
|
|
67
65
|
this.isShadowRoot = "open";
|
|
68
66
|
}
|
|
69
|
-
draw(
|
|
70
|
-
let
|
|
71
|
-
|
|
72
|
-
let
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
let
|
|
81
|
-
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
let input = document.createElement("input");
|
|
87
|
-
input.setAttribute("type", "text");
|
|
88
|
-
input.setAttribute("part", "input");
|
|
89
|
-
input.setAttribute("value", this.value || "");
|
|
90
|
-
input.classList.add("form-control");
|
|
91
|
-
if (this.hasAttribute("placeholder"))
|
|
92
|
-
input.setAttribute("placeholder", this.placeholder);
|
|
93
|
-
if (this.hasAttribute("disabled"))
|
|
94
|
-
input.setAttribute("disabled", "");
|
|
95
|
-
if (this.hasAttribute("readonly"))
|
|
96
|
-
input.setAttribute("readonly", "");
|
|
97
|
-
let error = document.createElement("div");
|
|
98
|
-
error.classList.add("error-message");
|
|
99
|
-
let start = null;
|
|
100
|
-
if (hasSlotStart) {
|
|
101
|
-
start = document.createElement("slot");
|
|
102
|
-
start.setAttribute("name", "start");
|
|
103
|
-
}
|
|
104
|
-
let end = null;
|
|
105
|
-
if (hasSlotEnd) {
|
|
106
|
-
end = document.createElement("slot");
|
|
107
|
-
end.setAttribute("name", "end");
|
|
108
|
-
}
|
|
109
|
-
if (hasSlotStart) {
|
|
110
|
-
wrapper.appendChild(start);
|
|
111
|
-
native.classList.add("has-start");
|
|
112
|
-
}
|
|
113
|
-
if (this.variant === "standard") {
|
|
114
|
-
if (this.label)
|
|
115
|
-
native.appendChild(label);
|
|
116
|
-
} else {
|
|
117
|
-
inputWrapper.appendChild(label);
|
|
118
|
-
}
|
|
119
|
-
inputWrapper.appendChild(input);
|
|
120
|
-
wrapper.appendChild(inputWrapper);
|
|
121
|
-
native.appendChild(wrapper);
|
|
122
|
-
if (hasSlotEnd) {
|
|
123
|
-
wrapper.appendChild(end);
|
|
124
|
-
native.classList.add("has-end");
|
|
125
|
-
}
|
|
126
|
-
native.appendChild(error);
|
|
127
|
-
fragment.appendChild(native);
|
|
128
|
-
this.native = native;
|
|
129
|
-
this.labelElement = label;
|
|
130
|
-
this.input = input;
|
|
131
|
-
this.errorMessage = error;
|
|
132
|
-
return fragment;
|
|
67
|
+
draw(t, e, s) {
|
|
68
|
+
let o = this.hasSlot(this, "start"), v = this.hasSlot(this, "end"), m = document.createDocumentFragment(), i = document.createElement("div");
|
|
69
|
+
i.setAttribute("part", "native"), i.classList.add("native-input", this.variant || "default"), this.hasAttribute("invalid") && i.classList.add("has-error");
|
|
70
|
+
let l = document.createElement("div");
|
|
71
|
+
l.classList.add("wrapper");
|
|
72
|
+
let u = document.createElement("div");
|
|
73
|
+
u.classList.add("input-wrapper");
|
|
74
|
+
let d = document.createElement("label");
|
|
75
|
+
d.innerText = this.label, this.value && !this.hasAttribute("error") && d.classList.add("fade");
|
|
76
|
+
let r = document.createElement("input");
|
|
77
|
+
r.setAttribute("type", "text"), r.setAttribute("part", "input"), r.setAttribute("value", this.value || ""), r.classList.add("form-control"), this.hasAttribute("placeholder") && r.setAttribute("placeholder", this.placeholder), this.hasAttribute("disabled") && r.setAttribute("disabled", ""), this.hasAttribute("readonly") && r.setAttribute("readonly", "");
|
|
78
|
+
let p = document.createElement("div");
|
|
79
|
+
p.classList.add("error-message");
|
|
80
|
+
let h = null;
|
|
81
|
+
o && (h = document.createElement("slot"), h.setAttribute("name", "start"));
|
|
82
|
+
let c = null;
|
|
83
|
+
return v && (c = document.createElement("slot"), c.setAttribute("name", "end")), o && (l.appendChild(h), i.classList.add("has-start")), this.variant === "standard" ? this.label && i.appendChild(d) : u.appendChild(d), u.appendChild(r), l.appendChild(u), i.appendChild(l), v && (l.appendChild(c), i.classList.add("has-end")), i.appendChild(p), m.appendChild(i), this.native = i, this.labelElement = d, this.input = r, this.errorMessage = p, m;
|
|
133
84
|
}
|
|
134
85
|
afterDraw() {
|
|
135
86
|
[
|
|
@@ -142,75 +93,45 @@ class Input extends WJElement {
|
|
|
142
93
|
"minLength",
|
|
143
94
|
"maxLength",
|
|
144
95
|
"pattern"
|
|
145
|
-
].forEach((
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
})
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
});
|
|
160
|
-
this.input.addEventListener("input", (e) => {
|
|
161
|
-
if (this.validateOnChange) {
|
|
162
|
-
this.pristine = false;
|
|
163
|
-
}
|
|
164
|
-
this.input.classList.remove("pristine");
|
|
165
|
-
this.labelElement.classList.add("fade");
|
|
166
|
-
const clone = new e.constructor(e.type, e);
|
|
167
|
-
this.dispatchEvent(clone);
|
|
168
|
-
this.validateInput();
|
|
169
|
-
});
|
|
170
|
-
this.addEventListener("invalid", (e) => {
|
|
171
|
-
this.invalid = true;
|
|
172
|
-
this.pristine = false;
|
|
173
|
-
this.errorMessage.textContent = this.internals.validationMessage;
|
|
174
|
-
if (this.customErrorDisplay) {
|
|
175
|
-
e.preventDefault();
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
this.addEventListener("focus", () => this.input.focus());
|
|
96
|
+
].forEach((t) => {
|
|
97
|
+
const e = t === "required" ? this.hasAttribute(t) : this.getAttribute(t);
|
|
98
|
+
e != null && (this.input[t] = e);
|
|
99
|
+
}), this.input.addEventListener("focus", (t) => {
|
|
100
|
+
this.labelElement.classList.add("fade"), this.native.classList.add("focused");
|
|
101
|
+
}), this.input.addEventListener("blur", (t) => {
|
|
102
|
+
this.native.classList.remove("focused"), t.target.value || this.labelElement.classList.remove("fade");
|
|
103
|
+
}), this.input.addEventListener("input", (t) => {
|
|
104
|
+
this.validateOnChange && (this.pristine = !1), this.input.classList.remove("pristine"), this.labelElement.classList.add("fade");
|
|
105
|
+
const e = new t.constructor(t.type, t);
|
|
106
|
+
this.dispatchEvent(e), this.validateInput();
|
|
107
|
+
}), this.addEventListener("invalid", (t) => {
|
|
108
|
+
this.invalid = !0, this.pristine = !1, this.errorMessage.textContent = this.internals.validationMessage, this.customErrorDisplay && t.preventDefault();
|
|
109
|
+
}), this.addEventListener("focus", () => this.input.focus());
|
|
179
110
|
}
|
|
180
111
|
validateInput() {
|
|
181
|
-
const
|
|
182
|
-
this.invalid =
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this.invalid = !this.pristine && !
|
|
189
|
-
let
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
errorMessage
|
|
195
|
-
);
|
|
196
|
-
if (this.invalid && this.customErrorDisplay) {
|
|
197
|
-
this.dispatchEvent(new Event("invalid"));
|
|
198
|
-
}
|
|
112
|
+
const t = this.input.validity;
|
|
113
|
+
if (this.invalid = !1, t.valid)
|
|
114
|
+
this.internals.setValidity({}), this.pristine = !1, this.errorMessage.textContent = this.input.validationMessage;
|
|
115
|
+
else
|
|
116
|
+
for (let e in t) {
|
|
117
|
+
const s = `message-${e.toString()}`;
|
|
118
|
+
if (t[e]) {
|
|
119
|
+
this.validationError = e.toString(), this.invalid = !this.pristine && !t.valid;
|
|
120
|
+
let o = this.message;
|
|
121
|
+
this.hasAttribute("message") || (o = this.hasAttribute(s) ? this.getAttribute(s) : this.input.validationMessage), this.internals.setValidity(
|
|
122
|
+
{ [this.validationError]: !0 },
|
|
123
|
+
o
|
|
124
|
+
), this.invalid && this.customErrorDisplay && this.dispatchEvent(new Event("invalid"));
|
|
199
125
|
}
|
|
200
126
|
}
|
|
201
|
-
} else {
|
|
202
|
-
this.internals.setValidity({});
|
|
203
|
-
this.pristine = false;
|
|
204
|
-
this.errorMessage.textContent = this.input.validationMessage;
|
|
205
|
-
}
|
|
206
127
|
}
|
|
207
|
-
hasSlot(
|
|
208
|
-
let
|
|
209
|
-
return
|
|
128
|
+
hasSlot(t, e = null) {
|
|
129
|
+
let s = e ? `[slot="${e}"]` : "[slot]";
|
|
130
|
+
return t.querySelectorAll(s).length > 0;
|
|
210
131
|
}
|
|
211
132
|
}
|
|
212
|
-
|
|
213
|
-
customElements.get("wj-input") || window.customElements.define("wj-input",
|
|
133
|
+
b(f, "formAssociated", !0);
|
|
134
|
+
customElements.get("wj-input") || window.customElements.define("wj-input", f);
|
|
214
135
|
export {
|
|
215
|
-
Input
|
|
136
|
+
f as Input
|
|
216
137
|
};
|
package/dist/wj-item.js
CHANGED
|
@@ -1,47 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var d = (i, e, t) => e in i ? s(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var o = (i, e, t) => (d(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
+
import l from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const m = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host{--wj-item-color: $color-contrast-higher;--wj-border-width: 0 0 1px 0;--wj-item-background: transparent;--wj-item-background-hover: #f4f4f4;--wj-item-padding-top: 0px;--wj-item-padding-bottom: 0px;--wj-item-padding-end: 0px;--wj-item-padding-start: 0px;--wj-item-inner-border-width: 0 0 1px 0;--wj-item-inner-padding-top: 0px;--wj-item-inner-padding-bottom: 0px;--wj-item-inner-padding-start: 0px;--wj-item-inner-padding-end: 0px;--wj-item-inner-box-shadow: none;--wj-item-min-height: 40px;--wj-item-transition: opacity 15ms linear, background-color 15ms linear;display:block;position:relative;align-items:center;justify-content:space-between;outline:none;color:var(--wj-item-color);text-align:initial;text-decoration:none;overflow:hidden;box-sizing:border-box;width:100%}.item-native{border-radius:var(--wj-item-border-radius);padding-top:var(--wj-item-padding-top);padding-bottom:var(--wj-item-padding-bottom);padding-left:var(--wj-item-padding-start);padding-right:var(--wj-item-padding-end);margin:0;display:flex;position:relative;align-items:inherit;justify-content:inherit;width:100%;min-height:var(--wj-item-min-height);transition:var(--wj-item-transition);outline:none;background:var(--wj-item-background);overflow:inherit;box-sizing:border-box;z-index:1;text-decoration:none;color:var(--wj-item-color)}.item-native .item-inner{margin:0;padding:var(--wj-item-inner-padding-top) var(--wj-item-inner-padding-end) var(--wj-item-inner-padding-bottom) var(--wj-item-inner-padding-start);display:flex;position:relative;flex:1 1 0;flex-direction:inherit;align-items:inherit;align-self:stretch;min-height:inherit;border-width:var(--wj-border-width);border-style:var(--wj-border-style);border-color:var(--wj-border-color);box-shadow:var(--wj-item-inner-box-shadow);overflow:inherit;box-sizing:border-box}.item-native .item-inner .input-wrapper{display:flex;flex:1 1 0;flex-direction:inherit;align-items:inherit;align-self:stretch;text-overflow:ellipsis;overflow:inherit;box-sizing:border-box}.item-native .item-bottom{padding:0 var(--wj-item-inner-padding-end) 0 var(--wj-item-padding-start);display:flex;justify-content:space-between}@media (any-hover: hover){:host(:hover) .item-native{color:var(--wj-item-color)}:host(:hover) .item-native :after{transition:var(--wj-item-transition);z-index:-1;top:0;right:0;bottom:0;left:0;position:absolute;content:"";background:var(--wj-item-background-hover);opacity:.7}}button,a{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}::slotted([slot=start]){margin-inline:0 1rem}::slotted(wj-label){margin:10px 8px 10px 0}::slotted(wj-label:not([slot=end])){flex:1 1 0}
|
|
9
|
+
`;
|
|
10
|
+
class p extends l {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
this.labelColorStyles = {};
|
|
17
|
-
this.itemStyles = /* @__PURE__ */ new Map();
|
|
18
|
-
this.inheritedAriaAttributes = {};
|
|
19
|
-
this.multipleInputs = false;
|
|
20
|
-
this.focusable = true;
|
|
21
|
-
this.button = false;
|
|
22
|
-
this.detailIcon = ``;
|
|
23
|
-
this.disabled = false;
|
|
24
|
-
this.counter = false;
|
|
25
|
-
this.routerDirection = "forward";
|
|
26
|
-
this.type = "button";
|
|
13
|
+
o(this, "hostContext", (t, n) => n.closest(t) !== null);
|
|
14
|
+
this.labelColorStyles = {}, this.itemStyles = /* @__PURE__ */ new Map(), this.inheritedAriaAttributes = {}, this.multipleInputs = !1, this.focusable = !0, this.button = !1, this.detailIcon = "", this.disabled = !1, this.counter = !1, this.routerDirection = "forward", this.type = "button";
|
|
27
15
|
}
|
|
28
16
|
isClickable() {
|
|
29
17
|
return this.hasAttribute("href") || this.button;
|
|
30
18
|
}
|
|
31
19
|
static get cssStyleSheet() {
|
|
32
|
-
return
|
|
20
|
+
return m;
|
|
33
21
|
}
|
|
34
22
|
setupAttributes() {
|
|
35
23
|
this.isShadowRoot = "open";
|
|
36
24
|
}
|
|
37
|
-
beforeDraw(
|
|
25
|
+
beforeDraw(t, n, a) {
|
|
38
26
|
}
|
|
39
|
-
draw(
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
this.classList.add("wj-item-list");
|
|
43
|
-
}
|
|
44
|
-
return `<${TagType} class="item-native" part="native">
|
|
27
|
+
draw(t, n, a) {
|
|
28
|
+
const r = this.isClickable() ? this.hasAttribute("href") === void 0 ? "button" : "a" : "div";
|
|
29
|
+
return this.hostContext("wj-list", this) && this.classList.add("wj-item-list"), `<${r} class="item-native" part="native">
|
|
45
30
|
<slot name="start"></slot>
|
|
46
31
|
<div class="item-inner">
|
|
47
32
|
<div class="input-wrapper">
|
|
@@ -50,14 +35,14 @@ class Item extends WJElement {
|
|
|
50
35
|
<slot name="end"></slot>
|
|
51
36
|
</div>
|
|
52
37
|
<div class="item-highlight"></div>
|
|
53
|
-
</${
|
|
38
|
+
</${r}>
|
|
54
39
|
<div class="item-bottom">
|
|
55
40
|
<slot name="error"></slot>
|
|
56
41
|
<slot name="helper"></slot>
|
|
57
42
|
</div>`;
|
|
58
43
|
}
|
|
59
44
|
}
|
|
60
|
-
customElements.get("wj-item") || window.customElements.define("wj-item",
|
|
45
|
+
customElements.get("wj-item") || window.customElements.define("wj-item", p);
|
|
61
46
|
export {
|
|
62
|
-
Item
|
|
47
|
+
p as Item
|
|
63
48
|
};
|
package/dist/wj-label.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var c = (e, t, o) => t in e ? n(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var s = (e, t, o) => (c(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
4
|
+
import w from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const h = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host(.wj-color-primary){--wj-color: #7252D3 !important}:host(.wj-color-complete){--wj-color: #0072EC !important}:host(.wj-color-success){--wj-color-base: #19AD79 !important;--wj-color-contrast: #fff !important}:host(.wj-color-warning){--wj-color-base: #FFd945 !important;--wj-color-contrast: #4b4b4b !important}:host(.wj-color-danger){--wj-color-base: #D83C31 !important;--wj-color-contrast: #fff !important}:host(.wj-color-info){--wj-color-base: #3B4752 !important;--wj-color-contrast: #fff !important}:host(.wj-color-menu){--wj-color-base: #2b303b !important;--wj-color-contrast: #fff !important}:host{--wj-label-text-wrap-font-size: 13px;--wj-label-text-wrap-line-height: 1.4}:host{--wj-color: initial;display:block;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:border-box}:host(.wj-color){color:var(--wj-color-base)}:host(.wj-text-wrap),:host([text-wrap]){white-space:normal!important;font-size:var(--wj-label-text-wrap-font-size);line-height:var(--wj-label-text-wrap-line-height)}:host(.label-fixed){flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.label-stacked),:host(.label-floating){margin:0;align-self:stretch;width:auto;max-width:100%}:host(.label-no-animate.label-floating){transition:none}::slotted(*) h1,::slotted(*) h2,::slotted(*) h3,::slotted(*) h4,::slotted(*) h5,::slotted(*) h6{text-overflow:inherit;overflow:inherit}:host(.wj-color){color:var(--wj-color)}::slotted(*:first-child){margin-top:0!important}::slotted(*:last-child){margin-bottom:0!important}
|
|
9
|
+
`;
|
|
10
|
+
class m extends w {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
13
|
+
s(this, "className", "Label");
|
|
14
14
|
}
|
|
15
15
|
static get cssStyleSheet() {
|
|
16
|
-
return
|
|
16
|
+
return h;
|
|
17
17
|
}
|
|
18
18
|
static get observedAttributes() {
|
|
19
19
|
return [];
|
|
@@ -21,18 +21,16 @@ class Label extends WJElement {
|
|
|
21
21
|
setupAttributes() {
|
|
22
22
|
this.isShadowRoot = "open";
|
|
23
23
|
}
|
|
24
|
-
beforeDraw(
|
|
24
|
+
beforeDraw(o, a, r) {
|
|
25
25
|
}
|
|
26
|
-
draw(
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
fragment.appendChild(element);
|
|
32
|
-
return fragment;
|
|
26
|
+
draw(o, a, r) {
|
|
27
|
+
let l = document.createDocumentFragment();
|
|
28
|
+
this.color && this.classList.add("wj-color-" + r.color, "wj-color");
|
|
29
|
+
let i = document.createElement("slot");
|
|
30
|
+
return l.appendChild(i), l;
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
customElements.get("wj-label") || window.customElements.define("wj-label",
|
|
33
|
+
customElements.get("wj-label") || window.customElements.define("wj-label", m);
|
|
36
34
|
export {
|
|
37
|
-
Label
|
|
35
|
+
m as Label
|
|
38
36
|
};
|
package/dist/wj-list.js
CHANGED
|
@@ -1,35 +1,32 @@
|
|
|
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 a = (e, t, s) => t in e ? o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var n = (e, t, s) => (a(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
+
import l from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const d = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host{--wj-list-inset-padding: 1rem;--wj-list-border-radius: 8px;--wj-list-background: #fff;margin:0;padding:0;display:block;contain:content;list-style-type:none}:host(.wj-inset){background:var(--wj-list-background);transform:translateZ(0);overflow:hidden;padding:var(--wj-list-inset-padding);border-radius:var(--wj-list-border-radius)}:host(.wj-lines-none) ::slotted(wj-item){--wj-border-width: 0 !important}
|
|
9
|
+
`;
|
|
10
|
+
class c extends l {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
13
|
+
n(this, "className", "List");
|
|
14
14
|
}
|
|
15
15
|
static get cssStyleSheet() {
|
|
16
|
-
return
|
|
16
|
+
return d;
|
|
17
17
|
}
|
|
18
18
|
setupAttributes() {
|
|
19
19
|
this.isShadowRoot = "open";
|
|
20
20
|
}
|
|
21
|
-
draw(
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
fragment.appendChild(element);
|
|
25
|
-
return fragment;
|
|
21
|
+
draw(s, m, w) {
|
|
22
|
+
let i = document.createDocumentFragment(), r = document.createElement("slot");
|
|
23
|
+
return i.appendChild(r), i;
|
|
26
24
|
}
|
|
27
25
|
afterDraw() {
|
|
28
|
-
this.classList.toggle("wj-lines-" + this.lines, this.hasAttribute("lines"));
|
|
29
|
-
this.classList.toggle("wj-inset", this.hasAttribute("inset"));
|
|
26
|
+
this.classList.toggle("wj-lines-" + this.lines, this.hasAttribute("lines")), this.classList.toggle("wj-inset", this.hasAttribute("inset"));
|
|
30
27
|
}
|
|
31
28
|
}
|
|
32
|
-
customElements.get("wj-list") || window.customElements.define("wj-list",
|
|
29
|
+
customElements.get("wj-list") || window.customElements.define("wj-list", c);
|
|
33
30
|
export {
|
|
34
|
-
List
|
|
31
|
+
c as List
|
|
35
32
|
};
|
package/dist/wj-main.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
import WJElement from "./wj-element.js";
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var i = (t, e, s) => e in t ? a(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var o = (t, e, s) => (i(t, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
|
+
import m from "./wj-element.js";
|
|
8
5
|
import "./wj-store.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
6
|
+
const c = `/*!
|
|
7
|
+
* direction.scss
|
|
8
|
+
*/:host{display:block;flex:1;flex-basis:auto;padding:1.5rem;box-sizing:border-box}
|
|
9
|
+
`;
|
|
10
|
+
class l extends m {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
|
|
13
|
+
o(this, "className", "Main");
|
|
14
14
|
}
|
|
15
15
|
static get cssStyleSheet() {
|
|
16
|
-
return
|
|
16
|
+
return c;
|
|
17
17
|
}
|
|
18
18
|
static get observedAttributes() {
|
|
19
19
|
return [];
|
|
@@ -21,14 +21,12 @@ class Main extends WJElement {
|
|
|
21
21
|
setupAttributes() {
|
|
22
22
|
this.isShadowRoot = "open";
|
|
23
23
|
}
|
|
24
|
-
draw(
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
fragment.appendChild(element);
|
|
28
|
-
return fragment;
|
|
24
|
+
draw(s, d, u) {
|
|
25
|
+
let n = document.createDocumentFragment(), r = document.createElement("slot");
|
|
26
|
+
return n.appendChild(r), n;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
|
-
customElements.get("wj-main") || window.customElements.define("wj-main",
|
|
29
|
+
customElements.get("wj-main") || window.customElements.define("wj-main", l);
|
|
32
30
|
export {
|
|
33
|
-
Main
|
|
31
|
+
l as Main
|
|
34
32
|
};
|