@duyluonganduin/acl-web-components 0.0.12 → 0.0.13
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/acl-web-components.cjs +1 -1
- package/dist/acl-web-components.d.ts +29 -0
- package/dist/acl-web-components.js +46 -42
- package/dist/{anduin-toast-BajvdhLP.cjs → anduin-toast-B-9dgTkL.cjs} +243 -121
- package/dist/{anduin-toast-vCKeF87l.js → anduin-toast-ovQqFluZ.js} +1251 -1056
- package/dist/jsx.d.ts +19 -0
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +37 -0
- package/dist/react.js +87 -73
- package/package.json +1 -1
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
constructor(e, t,
|
|
9
|
-
if (this._$cssResult$ = !0,
|
|
6
|
+
const E1 = globalThis, c2 = E1.ShadowRoot && (E1.ShadyCSS === void 0 || E1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, p2 = Symbol(), i5 = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let Z5 = class {
|
|
8
|
+
constructor(e, t, C) {
|
|
9
|
+
if (this._$cssResult$ = !0, C !== p2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = e, this.t = t;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let e = this.o;
|
|
14
14
|
const t = this.t;
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
if (c2 && e === void 0) {
|
|
16
|
+
const C = t !== void 0 && t.length === 1;
|
|
17
|
+
C && (e = i5.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), C && i5.set(t, e));
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -22,120 +22,120 @@ let p5 = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
const t =
|
|
25
|
+
const q5 = (i) => new Z5(typeof i == "string" ? i : i + "", void 0, p2), h = (i, ...e) => {
|
|
26
|
+
const t = i.length === 1 ? i[0] : e.reduce((C, o, l) => C + ((n) => {
|
|
27
27
|
if (n._$cssResult$ === !0) return n.cssText;
|
|
28
28
|
if (typeof n == "number") return n;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
-
})(
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
30
|
+
})(o) + i[l + 1], i[0]);
|
|
31
|
+
return new Z5(t, i, p2);
|
|
32
|
+
}, G5 = (i, e) => {
|
|
33
|
+
if (c2) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
34
|
else for (const t of e) {
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const C = document.createElement("style"), o = E1.litNonce;
|
|
36
|
+
o !== void 0 && C.setAttribute("nonce", o), C.textContent = t.cssText, i.appendChild(C);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, l5 = c2 ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let t = "";
|
|
40
|
-
for (const
|
|
41
|
-
return
|
|
42
|
-
})(
|
|
40
|
+
for (const C of e.cssRules) t += C.cssText;
|
|
41
|
+
return q5(t);
|
|
42
|
+
})(i) : i;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Y5, defineProperty: W5, getOwnPropertyDescriptor: X5, getOwnPropertyNames: K5, getOwnPropertySymbols: J5, getPrototypeOf: Q5 } = Object, B = globalThis, n5 = B.trustedTypes, e4 = n5 ? n5.emptyScript : "", N1 = B.reactiveElementPolyfillSupport, a1 = (i, e) => i, A1 = { toAttribute(i, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
i = i ? e4 : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
i = i == null ? i : JSON.stringify(i);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let t =
|
|
57
|
+
return i;
|
|
58
|
+
}, fromAttribute(i, e) {
|
|
59
|
+
let t = i;
|
|
60
60
|
switch (e) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
t =
|
|
62
|
+
t = i !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
t =
|
|
65
|
+
t = i === null ? null : Number(i);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
t = JSON.parse(
|
|
70
|
+
t = JSON.parse(i);
|
|
71
71
|
} catch {
|
|
72
72
|
t = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
let
|
|
76
|
+
} }, u2 = (i, e) => !Y5(i, e), r5 = { attribute: !0, type: String, converter: A1, reflect: !1, useDefault: !1, hasChanged: u2 };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), B.litPropertyMetadata ?? (B.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let K = class extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(e, t =
|
|
85
|
+
static createProperty(e, t = r5) {
|
|
86
86
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
87
|
-
const
|
|
88
|
-
|
|
87
|
+
const C = Symbol(), o = this.getPropertyDescriptor(e, C, t);
|
|
88
|
+
o !== void 0 && W5(this.prototype, e, o);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static getPropertyDescriptor(e, t,
|
|
92
|
-
const { get:
|
|
91
|
+
static getPropertyDescriptor(e, t, C) {
|
|
92
|
+
const { get: o, set: l } = X5(this.prototype, e) ?? { get() {
|
|
93
93
|
return this[t];
|
|
94
94
|
}, set(n) {
|
|
95
95
|
this[t] = n;
|
|
96
96
|
} };
|
|
97
|
-
return { get:
|
|
98
|
-
const a =
|
|
99
|
-
|
|
97
|
+
return { get: o, set(n) {
|
|
98
|
+
const a = o == null ? void 0 : o.call(this);
|
|
99
|
+
l == null || l.call(this, n), this.requestUpdate(e, a, C);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(e) {
|
|
103
|
-
return this.elementProperties.get(e) ??
|
|
103
|
+
return this.elementProperties.get(e) ?? r5;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
107
|
-
const e =
|
|
106
|
+
if (this.hasOwnProperty(a1("elementProperties"))) return;
|
|
107
|
+
const e = Q5(this);
|
|
108
108
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
113
|
-
const t = this.properties,
|
|
114
|
-
for (const
|
|
111
|
+
if (this.hasOwnProperty(a1("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(a1("properties"))) {
|
|
113
|
+
const t = this.properties, C = [...K5(t), ...J5(t)];
|
|
114
|
+
for (const o of C) this.createProperty(o, t[o]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
117
117
|
if (e !== null) {
|
|
118
118
|
const t = litPropertyMetadata.get(e);
|
|
119
|
-
if (t !== void 0) for (const [
|
|
119
|
+
if (t !== void 0) for (const [C, o] of t) this.elementProperties.set(C, o);
|
|
120
120
|
}
|
|
121
121
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const [t,
|
|
123
|
-
const
|
|
124
|
-
|
|
122
|
+
for (const [t, C] of this.elementProperties) {
|
|
123
|
+
const o = this._$Eu(t, C);
|
|
124
|
+
o !== void 0 && this._$Eh.set(o, t);
|
|
125
125
|
}
|
|
126
126
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
127
|
}
|
|
128
128
|
static finalizeStyles(e) {
|
|
129
129
|
const t = [];
|
|
130
130
|
if (Array.isArray(e)) {
|
|
131
|
-
const
|
|
132
|
-
for (const
|
|
133
|
-
} else e !== void 0 && t.push(
|
|
131
|
+
const C = new Set(e.flat(1 / 0).reverse());
|
|
132
|
+
for (const o of C) t.unshift(l5(o));
|
|
133
|
+
} else e !== void 0 && t.push(l5(e));
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(e, t) {
|
|
137
|
-
const
|
|
138
|
-
return
|
|
137
|
+
const C = t.attribute;
|
|
138
|
+
return C === !1 ? void 0 : typeof C == "string" ? C : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
139
139
|
}
|
|
140
140
|
constructor() {
|
|
141
141
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -154,18 +154,18 @@ let W = class extends HTMLElement {
|
|
|
154
154
|
}
|
|
155
155
|
_$E_() {
|
|
156
156
|
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
157
|
-
for (const
|
|
157
|
+
for (const C of t.keys()) this.hasOwnProperty(C) && (e.set(C, this[C]), delete this[C]);
|
|
158
158
|
e.size > 0 && (this._$Ep = e);
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return G5(e, this.constructor.elementStyles), e;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var e;
|
|
166
166
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
|
|
167
|
-
var
|
|
168
|
-
return (
|
|
167
|
+
var C;
|
|
168
|
+
return (C = t.hostConnected) == null ? void 0 : C.call(t);
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
enableUpdating(e) {
|
|
@@ -173,42 +173,42 @@ let W = class extends HTMLElement {
|
|
|
173
173
|
disconnectedCallback() {
|
|
174
174
|
var e;
|
|
175
175
|
(e = this._$EO) == null || e.forEach((t) => {
|
|
176
|
-
var
|
|
177
|
-
return (
|
|
176
|
+
var C;
|
|
177
|
+
return (C = t.hostDisconnected) == null ? void 0 : C.call(t);
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
attributeChangedCallback(e, t,
|
|
181
|
-
this._$AK(e,
|
|
180
|
+
attributeChangedCallback(e, t, C) {
|
|
181
|
+
this._$AK(e, C);
|
|
182
182
|
}
|
|
183
183
|
_$ET(e, t) {
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const n = (((
|
|
188
|
-
this._$Em = e, n == null ? this.removeAttribute(
|
|
184
|
+
var l;
|
|
185
|
+
const C = this.constructor.elementProperties.get(e), o = this.constructor._$Eu(e, C);
|
|
186
|
+
if (o !== void 0 && C.reflect === !0) {
|
|
187
|
+
const n = (((l = C.converter) == null ? void 0 : l.toAttribute) !== void 0 ? C.converter : A1).toAttribute(t, C.type);
|
|
188
|
+
this._$Em = e, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
_$AK(e, t) {
|
|
192
|
-
var
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
195
|
-
const a =
|
|
196
|
-
this._$Em =
|
|
192
|
+
var l, n;
|
|
193
|
+
const C = this.constructor, o = C._$Eh.get(e);
|
|
194
|
+
if (o !== void 0 && this._$Em !== o) {
|
|
195
|
+
const a = C.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((l = a.converter) == null ? void 0 : l.fromAttribute) !== void 0 ? a.converter : A1;
|
|
196
|
+
this._$Em = o;
|
|
197
197
|
const c = s.fromAttribute(t, a.type);
|
|
198
|
-
this[
|
|
198
|
+
this[o] = c ?? ((n = this._$Ej) == null ? void 0 : n.get(o)) ?? c, this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
requestUpdate(e, t,
|
|
201
|
+
requestUpdate(e, t, C, o = !1, l) {
|
|
202
202
|
var n;
|
|
203
203
|
if (e !== void 0) {
|
|
204
204
|
const a = this.constructor;
|
|
205
|
-
if (
|
|
206
|
-
this.C(e, t,
|
|
205
|
+
if (o === !1 && (l = this[e]), C ?? (C = a.getPropertyOptions(e)), !((C.hasChanged ?? u2)(l, t) || C.useDefault && C.reflect && l === ((n = this._$Ej) == null ? void 0 : n.get(e)) && !this.hasAttribute(a._$Eu(e, C)))) return;
|
|
206
|
+
this.C(e, t, C);
|
|
207
207
|
}
|
|
208
208
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
209
209
|
}
|
|
210
|
-
C(e, t, { useDefault:
|
|
211
|
-
|
|
210
|
+
C(e, t, { useDefault: C, reflect: o, wrapped: l }, n) {
|
|
211
|
+
C && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, n ?? t ?? this[e]), l !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || C || (t = void 0), this._$AL.set(e, t)), o === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
|
|
212
212
|
}
|
|
213
213
|
async _$EP() {
|
|
214
214
|
this.isUpdatePending = !0;
|
|
@@ -224,28 +224,28 @@ let W = class extends HTMLElement {
|
|
|
224
224
|
return this.performUpdate();
|
|
225
225
|
}
|
|
226
226
|
performUpdate() {
|
|
227
|
-
var
|
|
227
|
+
var C;
|
|
228
228
|
if (!this.isUpdatePending) return;
|
|
229
229
|
if (!this.hasUpdated) {
|
|
230
230
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
231
|
-
for (const [
|
|
231
|
+
for (const [l, n] of this._$Ep) this[l] = n;
|
|
232
232
|
this._$Ep = void 0;
|
|
233
233
|
}
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
-
const { wrapped: a } = n, s = this[
|
|
237
|
-
a !== !0 || this._$AL.has(
|
|
234
|
+
const o = this.constructor.elementProperties;
|
|
235
|
+
if (o.size > 0) for (const [l, n] of o) {
|
|
236
|
+
const { wrapped: a } = n, s = this[l];
|
|
237
|
+
a !== !0 || this._$AL.has(l) || s === void 0 || this.C(l, void 0, n, s);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
let e = !1;
|
|
241
241
|
const t = this._$AL;
|
|
242
242
|
try {
|
|
243
|
-
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (
|
|
244
|
-
var
|
|
245
|
-
return (
|
|
243
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (C = this._$EO) == null || C.forEach((o) => {
|
|
244
|
+
var l;
|
|
245
|
+
return (l = o.hostUpdate) == null ? void 0 : l.call(o);
|
|
246
246
|
}), this.update(t)) : this._$EM();
|
|
247
|
-
} catch (
|
|
248
|
-
throw e = !1, this._$EM(),
|
|
247
|
+
} catch (o) {
|
|
248
|
+
throw e = !1, this._$EM(), o;
|
|
249
249
|
}
|
|
250
250
|
e && this._$AE(t);
|
|
251
251
|
}
|
|
@@ -253,9 +253,9 @@ let W = class extends HTMLElement {
|
|
|
253
253
|
}
|
|
254
254
|
_$AE(e) {
|
|
255
255
|
var t;
|
|
256
|
-
(t = this._$EO) == null || t.forEach((
|
|
257
|
-
var
|
|
258
|
-
return (
|
|
256
|
+
(t = this._$EO) == null || t.forEach((C) => {
|
|
257
|
+
var o;
|
|
258
|
+
return (o = C.hostUpdated) == null ? void 0 : o.call(C);
|
|
259
259
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
260
260
|
}
|
|
261
261
|
_$EM() {
|
|
@@ -278,76 +278,76 @@ let W = class extends HTMLElement {
|
|
|
278
278
|
firstUpdated(e) {
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
|
|
281
|
+
K.elementStyles = [], K.shadowRootOptions = { mode: "open" }, K[a1("elementProperties")] = /* @__PURE__ */ new Map(), K[a1("finalized")] = /* @__PURE__ */ new Map(), N1 == null || N1({ ReactiveElement: K }), (B.reactiveElementVersions ?? (B.reactiveElementVersions = [])).push("2.1.2");
|
|
282
282
|
/**
|
|
283
283
|
* @license
|
|
284
284
|
* Copyright 2017 Google LLC
|
|
285
285
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
286
286
|
*/
|
|
287
|
-
const
|
|
288
|
-
\f\r]`,
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
290
|
-
function
|
|
291
|
-
if (!
|
|
292
|
-
return
|
|
287
|
+
const s1 = globalThis, a5 = (i) => i, B1 = s1.trustedTypes, s5 = B1 ? B1.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, y5 = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, _5 = "?" + A, t4 = `<${_5}>`, j = document, d1 = () => j.createComment(""), c1 = (i) => i === null || typeof i != "object" && typeof i != "function", h2 = Array.isArray, o4 = (i) => h2(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", j1 = `[
|
|
288
|
+
\f\r]`, n1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, d5 = /-->/g, c5 = />/g, I = RegExp(`>|${j1}(?:([^\\s"'>=/]+)(${j1}*=${j1}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), p5 = /'/g, u5 = /"/g, x5 = /^(?:script|style|textarea|title)$/i, R5 = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), d = R5(1), X1 = R5(2), U = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), h5 = /* @__PURE__ */ new WeakMap(), T = j.createTreeWalker(j, 129);
|
|
290
|
+
function w5(i, e) {
|
|
291
|
+
if (!h2(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
|
+
return s5 !== void 0 ? s5.createHTML(e) : e;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
295
|
-
const t =
|
|
296
|
-
let
|
|
294
|
+
const C4 = (i, e) => {
|
|
295
|
+
const t = i.length - 1, C = [];
|
|
296
|
+
let o, l = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = n1;
|
|
297
297
|
for (let a = 0; a < t; a++) {
|
|
298
|
-
const s =
|
|
299
|
-
let c,
|
|
300
|
-
for (;
|
|
301
|
-
const f = n ===
|
|
302
|
-
|
|
298
|
+
const s = i[a];
|
|
299
|
+
let c, H, v = -1, g = 0;
|
|
300
|
+
for (; g < s.length && (n.lastIndex = g, H = n.exec(s), H !== null); ) g = n.lastIndex, n === n1 ? H[1] === "!--" ? n = d5 : H[1] !== void 0 ? n = c5 : H[2] !== void 0 ? (x5.test(H[2]) && (o = RegExp("</" + H[2], "g")), n = I) : H[3] !== void 0 && (n = I) : n === I ? H[0] === ">" ? (n = o ?? n1, v = -1) : H[1] === void 0 ? v = -2 : (v = n.lastIndex - H[2].length, c = H[1], n = H[3] === void 0 ? I : H[3] === '"' ? u5 : p5) : n === u5 || n === p5 ? n = I : n === d5 || n === c5 ? n = n1 : (n = I, o = void 0);
|
|
301
|
+
const f = n === I && i[a + 1].startsWith("/>") ? " " : "";
|
|
302
|
+
l += n === n1 ? s + t4 : v >= 0 ? (C.push(c), s.slice(0, v) + y5 + s.slice(v) + A + f) : s + A + (v === -2 ? a : f);
|
|
303
303
|
}
|
|
304
|
-
return [
|
|
304
|
+
return [w5(i, l + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), C];
|
|
305
305
|
};
|
|
306
|
-
class
|
|
307
|
-
constructor({ strings: e, _$litType$: t },
|
|
308
|
-
let
|
|
306
|
+
class p1 {
|
|
307
|
+
constructor({ strings: e, _$litType$: t }, C) {
|
|
308
|
+
let o;
|
|
309
309
|
this.parts = [];
|
|
310
|
-
let
|
|
311
|
-
const a = e.length - 1, s = this.parts, [c,
|
|
312
|
-
if (this.el =
|
|
310
|
+
let l = 0, n = 0;
|
|
311
|
+
const a = e.length - 1, s = this.parts, [c, H] = C4(e, t);
|
|
312
|
+
if (this.el = p1.createElement(c, C), T.currentNode = this.el.content, t === 2 || t === 3) {
|
|
313
313
|
const v = this.el.content.firstChild;
|
|
314
314
|
v.replaceWith(...v.childNodes);
|
|
315
315
|
}
|
|
316
|
-
for (; (
|
|
317
|
-
if (
|
|
318
|
-
if (
|
|
319
|
-
const
|
|
320
|
-
s.push({ type: 1, index:
|
|
321
|
-
} else v.startsWith(
|
|
322
|
-
if (
|
|
323
|
-
const v =
|
|
324
|
-
if (
|
|
325
|
-
|
|
326
|
-
for (let f = 0; f <
|
|
327
|
-
|
|
316
|
+
for (; (o = T.nextNode()) !== null && s.length < a; ) {
|
|
317
|
+
if (o.nodeType === 1) {
|
|
318
|
+
if (o.hasAttributes()) for (const v of o.getAttributeNames()) if (v.endsWith(y5)) {
|
|
319
|
+
const g = H[n++], f = o.getAttribute(v).split(A), M = /([.?@])?(.*)/.exec(g);
|
|
320
|
+
s.push({ type: 1, index: l, name: M[2], strings: f, ctor: M[1] === "." ? l4 : M[1] === "?" ? n4 : M[1] === "@" ? r4 : I1 }), o.removeAttribute(v);
|
|
321
|
+
} else v.startsWith(A) && (s.push({ type: 6, index: l }), o.removeAttribute(v));
|
|
322
|
+
if (x5.test(o.tagName)) {
|
|
323
|
+
const v = o.textContent.split(A), g = v.length - 1;
|
|
324
|
+
if (g > 0) {
|
|
325
|
+
o.textContent = B1 ? B1.emptyScript : "";
|
|
326
|
+
for (let f = 0; f < g; f++) o.append(v[f], d1()), T.nextNode(), s.push({ type: 2, index: ++l });
|
|
327
|
+
o.append(v[g], d1());
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
} else if (
|
|
330
|
+
} else if (o.nodeType === 8) if (o.data === _5) s.push({ type: 2, index: l });
|
|
331
331
|
else {
|
|
332
332
|
let v = -1;
|
|
333
|
-
for (; (v =
|
|
333
|
+
for (; (v = o.data.indexOf(A, v + 1)) !== -1; ) s.push({ type: 7, index: l }), v += A.length - 1;
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
l++;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
static createElement(e, t) {
|
|
339
|
-
const
|
|
340
|
-
return
|
|
339
|
+
const C = j.createElement("template");
|
|
340
|
+
return C.innerHTML = e, C;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function J(i, e, t = i, C) {
|
|
344
344
|
var n, a;
|
|
345
|
-
if (e ===
|
|
346
|
-
let
|
|
347
|
-
const
|
|
348
|
-
return (
|
|
345
|
+
if (e === U) return e;
|
|
346
|
+
let o = C !== void 0 ? (n = t._$Co) == null ? void 0 : n[C] : t._$Cl;
|
|
347
|
+
const l = c1(e) ? void 0 : e._$litDirective$;
|
|
348
|
+
return (o == null ? void 0 : o.constructor) !== l && ((a = o == null ? void 0 : o._$AO) == null || a.call(o, !1), l === void 0 ? o = void 0 : (o = new l(i), o._$AT(i, t, C)), C !== void 0 ? (t._$Co ?? (t._$Co = []))[C] = o : t._$Cl = o), o !== void 0 && (e = J(i, o._$AS(i, e.values), o, C)), e;
|
|
349
349
|
}
|
|
350
|
-
class
|
|
350
|
+
class i4 {
|
|
351
351
|
constructor(e, t) {
|
|
352
352
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
353
353
|
}
|
|
@@ -358,30 +358,30 @@ class K5 {
|
|
|
358
358
|
return this._$AM._$AU;
|
|
359
359
|
}
|
|
360
360
|
u(e) {
|
|
361
|
-
const { el: { content: t }, parts:
|
|
362
|
-
|
|
363
|
-
let
|
|
361
|
+
const { el: { content: t }, parts: C } = this._$AD, o = ((e == null ? void 0 : e.creationScope) ?? j).importNode(t, !0);
|
|
362
|
+
T.currentNode = o;
|
|
363
|
+
let l = T.nextNode(), n = 0, a = 0, s = C[0];
|
|
364
364
|
for (; s !== void 0; ) {
|
|
365
365
|
if (n === s.index) {
|
|
366
366
|
let c;
|
|
367
|
-
s.type === 2 ? c = new
|
|
367
|
+
s.type === 2 ? c = new Z1(l, l.nextSibling, this, e) : s.type === 1 ? c = new s.ctor(l, s.name, s.strings, this, e) : s.type === 6 && (c = new a4(l, this, e)), this._$AV.push(c), s = C[++a];
|
|
368
368
|
}
|
|
369
|
-
n !== (s == null ? void 0 : s.index) && (
|
|
369
|
+
n !== (s == null ? void 0 : s.index) && (l = T.nextNode(), n++);
|
|
370
370
|
}
|
|
371
|
-
return
|
|
371
|
+
return T.currentNode = j, o;
|
|
372
372
|
}
|
|
373
373
|
p(e) {
|
|
374
374
|
let t = 0;
|
|
375
|
-
for (const
|
|
375
|
+
for (const C of this._$AV) C !== void 0 && (C.strings !== void 0 ? (C._$AI(e, C, t), t += C.strings.length - 2) : C._$AI(e[t])), t++;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
class
|
|
378
|
+
class Z1 {
|
|
379
379
|
get _$AU() {
|
|
380
380
|
var e;
|
|
381
381
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
382
382
|
}
|
|
383
|
-
constructor(e, t,
|
|
384
|
-
this.type = 2, this._$AH =
|
|
383
|
+
constructor(e, t, C, o) {
|
|
384
|
+
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = C, this.options = o, this._$Cv = (o == null ? void 0 : o.isConnected) ?? !0;
|
|
385
385
|
}
|
|
386
386
|
get parentNode() {
|
|
387
387
|
let e = this._$AA.parentNode;
|
|
@@ -395,7 +395,7 @@ class g1 {
|
|
|
395
395
|
return this._$AB;
|
|
396
396
|
}
|
|
397
397
|
_$AI(e, t = this) {
|
|
398
|
-
e =
|
|
398
|
+
e = J(this, e, t), c1(e) ? e === p || e == null || e === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : e !== this._$AH && e !== U && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : o4(e) ? this.k(e) : this._(e);
|
|
399
399
|
}
|
|
400
400
|
O(e) {
|
|
401
401
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -404,33 +404,33 @@ class g1 {
|
|
|
404
404
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
405
405
|
}
|
|
406
406
|
_(e) {
|
|
407
|
-
this._$AH !==
|
|
407
|
+
this._$AH !== p && c1(this._$AH) ? this._$AA.nextSibling.data = e : this.T(j.createTextNode(e)), this._$AH = e;
|
|
408
408
|
}
|
|
409
409
|
$(e) {
|
|
410
|
-
var
|
|
411
|
-
const { values: t, _$litType$:
|
|
412
|
-
if (((
|
|
410
|
+
var l;
|
|
411
|
+
const { values: t, _$litType$: C } = e, o = typeof C == "number" ? this._$AC(e) : (C.el === void 0 && (C.el = p1.createElement(w5(C.h, C.h[0]), this.options)), C);
|
|
412
|
+
if (((l = this._$AH) == null ? void 0 : l._$AD) === o) this._$AH.p(t);
|
|
413
413
|
else {
|
|
414
|
-
const n = new
|
|
414
|
+
const n = new i4(o, this), a = n.u(this.options);
|
|
415
415
|
n.p(t), this.T(a), this._$AH = n;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
_$AC(e) {
|
|
419
|
-
let t =
|
|
420
|
-
return t === void 0 &&
|
|
419
|
+
let t = h5.get(e.strings);
|
|
420
|
+
return t === void 0 && h5.set(e.strings, t = new p1(e)), t;
|
|
421
421
|
}
|
|
422
422
|
k(e) {
|
|
423
|
-
|
|
423
|
+
h2(this._$AH) || (this._$AH = [], this._$AR());
|
|
424
424
|
const t = this._$AH;
|
|
425
|
-
let
|
|
426
|
-
for (const
|
|
427
|
-
|
|
425
|
+
let C, o = 0;
|
|
426
|
+
for (const l of e) o === t.length ? t.push(C = new Z1(this.O(d1()), this.O(d1()), this, this.options)) : C = t[o], C._$AI(l), o++;
|
|
427
|
+
o < t.length && (this._$AR(C && C._$AB.nextSibling, o), t.length = o);
|
|
428
428
|
}
|
|
429
429
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
430
|
-
var
|
|
431
|
-
for ((
|
|
432
|
-
const
|
|
433
|
-
|
|
430
|
+
var C;
|
|
431
|
+
for ((C = this._$AP) == null ? void 0 : C.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
432
|
+
const o = a5(e).nextSibling;
|
|
433
|
+
a5(e).remove(), e = o;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
setConnected(e) {
|
|
@@ -438,90 +438,90 @@ class g1 {
|
|
|
438
438
|
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
class
|
|
441
|
+
class I1 {
|
|
442
442
|
get tagName() {
|
|
443
443
|
return this.element.tagName;
|
|
444
444
|
}
|
|
445
445
|
get _$AU() {
|
|
446
446
|
return this._$AM._$AU;
|
|
447
447
|
}
|
|
448
|
-
constructor(e, t,
|
|
449
|
-
this.type = 1, this._$AH =
|
|
448
|
+
constructor(e, t, C, o, l) {
|
|
449
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = e, this.name = t, this._$AM = o, this.options = l, C.length > 2 || C[0] !== "" || C[1] !== "" ? (this._$AH = Array(C.length - 1).fill(new String()), this.strings = C) : this._$AH = p;
|
|
450
450
|
}
|
|
451
|
-
_$AI(e, t = this,
|
|
452
|
-
const
|
|
451
|
+
_$AI(e, t = this, C, o) {
|
|
452
|
+
const l = this.strings;
|
|
453
453
|
let n = !1;
|
|
454
|
-
if (
|
|
454
|
+
if (l === void 0) e = J(this, e, t, 0), n = !c1(e) || e !== this._$AH && e !== U, n && (this._$AH = e);
|
|
455
455
|
else {
|
|
456
456
|
const a = e;
|
|
457
457
|
let s, c;
|
|
458
|
-
for (e =
|
|
458
|
+
for (e = l[0], s = 0; s < l.length - 1; s++) c = J(this, a[C + s], t, s), c === U && (c = this._$AH[s]), n || (n = !c1(c) || c !== this._$AH[s]), c === p ? e = p : e !== p && (e += (c ?? "") + l[s + 1]), this._$AH[s] = c;
|
|
459
459
|
}
|
|
460
|
-
n && !
|
|
460
|
+
n && !o && this.j(e);
|
|
461
461
|
}
|
|
462
462
|
j(e) {
|
|
463
|
-
e ===
|
|
463
|
+
e === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
class
|
|
466
|
+
class l4 extends I1 {
|
|
467
467
|
constructor() {
|
|
468
468
|
super(...arguments), this.type = 3;
|
|
469
469
|
}
|
|
470
470
|
j(e) {
|
|
471
|
-
this.element[this.name] = e ===
|
|
471
|
+
this.element[this.name] = e === p ? void 0 : e;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
class
|
|
474
|
+
class n4 extends I1 {
|
|
475
475
|
constructor() {
|
|
476
476
|
super(...arguments), this.type = 4;
|
|
477
477
|
}
|
|
478
478
|
j(e) {
|
|
479
|
-
this.element.toggleAttribute(this.name, !!e && e !==
|
|
479
|
+
this.element.toggleAttribute(this.name, !!e && e !== p);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
class
|
|
483
|
-
constructor(e, t,
|
|
484
|
-
super(e, t,
|
|
482
|
+
class r4 extends I1 {
|
|
483
|
+
constructor(e, t, C, o, l) {
|
|
484
|
+
super(e, t, C, o, l), this.type = 5;
|
|
485
485
|
}
|
|
486
486
|
_$AI(e, t = this) {
|
|
487
|
-
if ((e =
|
|
488
|
-
const
|
|
489
|
-
|
|
487
|
+
if ((e = J(this, e, t, 0) ?? p) === U) return;
|
|
488
|
+
const C = this._$AH, o = e === p && C !== p || e.capture !== C.capture || e.once !== C.once || e.passive !== C.passive, l = e !== p && (C === p || o);
|
|
489
|
+
o && this.element.removeEventListener(this.name, this, C), l && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
490
490
|
}
|
|
491
491
|
handleEvent(e) {
|
|
492
492
|
var t;
|
|
493
493
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
class
|
|
497
|
-
constructor(e, t,
|
|
498
|
-
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options =
|
|
496
|
+
class a4 {
|
|
497
|
+
constructor(e, t, C) {
|
|
498
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = C;
|
|
499
499
|
}
|
|
500
500
|
get _$AU() {
|
|
501
501
|
return this._$AM._$AU;
|
|
502
502
|
}
|
|
503
503
|
_$AI(e) {
|
|
504
|
-
|
|
504
|
+
J(this, e);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
const
|
|
511
|
-
let
|
|
512
|
-
if (
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
}
|
|
516
|
-
return
|
|
507
|
+
const U1 = s1.litHtmlPolyfillSupport;
|
|
508
|
+
U1 == null || U1(p1, Z1), (s1.litHtmlVersions ?? (s1.litHtmlVersions = [])).push("3.3.2");
|
|
509
|
+
const s4 = (i, e, t) => {
|
|
510
|
+
const C = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
511
|
+
let o = C._$litPart$;
|
|
512
|
+
if (o === void 0) {
|
|
513
|
+
const l = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
514
|
+
C._$litPart$ = o = new Z1(e.insertBefore(d1(), l), l, void 0, t ?? {});
|
|
515
|
+
}
|
|
516
|
+
return o._$AI(i), o;
|
|
517
517
|
};
|
|
518
518
|
/**
|
|
519
519
|
* @license
|
|
520
520
|
* Copyright 2017 Google LLC
|
|
521
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
522
|
*/
|
|
523
|
-
const
|
|
524
|
-
let
|
|
523
|
+
const N = globalThis;
|
|
524
|
+
let u = class extends K {
|
|
525
525
|
constructor() {
|
|
526
526
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
527
527
|
}
|
|
@@ -532,7 +532,7 @@ let p = class extends W {
|
|
|
532
532
|
}
|
|
533
533
|
update(e) {
|
|
534
534
|
const t = this.render();
|
|
535
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
535
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = s4(t, this.renderRoot, this.renderOptions);
|
|
536
536
|
}
|
|
537
537
|
connectedCallback() {
|
|
538
538
|
var e;
|
|
@@ -543,82 +543,82 @@ let p = class extends W {
|
|
|
543
543
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
544
544
|
}
|
|
545
545
|
render() {
|
|
546
|
-
return
|
|
546
|
+
return U;
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
var
|
|
550
|
-
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
(
|
|
549
|
+
var m5;
|
|
550
|
+
u._$litElement$ = !0, u.finalized = !0, (m5 = N.litElementHydrateSupport) == null || m5.call(N, { LitElement: u });
|
|
551
|
+
const q1 = N.litElementPolyfillSupport;
|
|
552
|
+
q1 == null || q1({ LitElement: u });
|
|
553
|
+
(N.litElementVersions ?? (N.litElementVersions = [])).push("4.2.2");
|
|
554
554
|
/**
|
|
555
555
|
* @license
|
|
556
556
|
* Copyright 2017 Google LLC
|
|
557
557
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
558
558
|
*/
|
|
559
|
-
const
|
|
560
|
-
const { kind:
|
|
561
|
-
let
|
|
562
|
-
if (
|
|
559
|
+
const d4 = { attribute: !0, type: String, converter: A1, reflect: !1, hasChanged: u2 }, c4 = (i = d4, e, t) => {
|
|
560
|
+
const { kind: C, metadata: o } = t;
|
|
561
|
+
let l = globalThis.litPropertyMetadata.get(o);
|
|
562
|
+
if (l === void 0 && globalThis.litPropertyMetadata.set(o, l = /* @__PURE__ */ new Map()), C === "setter" && ((i = Object.create(i)).wrapped = !0), l.set(t.name, i), C === "accessor") {
|
|
563
563
|
const { name: n } = t;
|
|
564
564
|
return { set(a) {
|
|
565
565
|
const s = e.get.call(this);
|
|
566
|
-
e.set.call(this, a), this.requestUpdate(n, s,
|
|
566
|
+
e.set.call(this, a), this.requestUpdate(n, s, i, !0, a);
|
|
567
567
|
}, init(a) {
|
|
568
|
-
return a !== void 0 && this.C(n, void 0,
|
|
568
|
+
return a !== void 0 && this.C(n, void 0, i, a), a;
|
|
569
569
|
} };
|
|
570
570
|
}
|
|
571
|
-
if (
|
|
571
|
+
if (C === "setter") {
|
|
572
572
|
const { name: n } = t;
|
|
573
573
|
return function(a) {
|
|
574
574
|
const s = this[n];
|
|
575
|
-
e.call(this, a), this.requestUpdate(n, s,
|
|
575
|
+
e.call(this, a), this.requestUpdate(n, s, i, !0, a);
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
|
-
throw Error("Unsupported decorator location: " +
|
|
578
|
+
throw Error("Unsupported decorator location: " + C);
|
|
579
579
|
};
|
|
580
|
-
function r(
|
|
581
|
-
return (e, t) => typeof t == "object" ?
|
|
582
|
-
const n =
|
|
583
|
-
return
|
|
584
|
-
})(
|
|
580
|
+
function r(i) {
|
|
581
|
+
return (e, t) => typeof t == "object" ? c4(i, e, t) : ((C, o, l) => {
|
|
582
|
+
const n = o.hasOwnProperty(l);
|
|
583
|
+
return o.constructor.createProperty(l, C), n ? Object.getOwnPropertyDescriptor(o, l) : void 0;
|
|
584
|
+
})(i, e, t);
|
|
585
585
|
}
|
|
586
586
|
/**
|
|
587
587
|
* @license
|
|
588
588
|
* Copyright 2017 Google LLC
|
|
589
589
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
590
590
|
*/
|
|
591
|
-
function x(
|
|
592
|
-
return r({ ...
|
|
591
|
+
function x(i) {
|
|
592
|
+
return r({ ...i, state: !0, attribute: !1 });
|
|
593
593
|
}
|
|
594
594
|
/**
|
|
595
595
|
* @license
|
|
596
596
|
* Copyright 2017 Google LLC
|
|
597
597
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
598
598
|
*/
|
|
599
|
-
const
|
|
599
|
+
const p4 = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
|
|
600
600
|
/**
|
|
601
601
|
* @license
|
|
602
602
|
* Copyright 2017 Google LLC
|
|
603
603
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
604
604
|
*/
|
|
605
|
-
function
|
|
606
|
-
return (t,
|
|
607
|
-
const
|
|
605
|
+
function D(i, e) {
|
|
606
|
+
return (t, C, o) => {
|
|
607
|
+
const l = (n) => {
|
|
608
608
|
var a;
|
|
609
|
-
return ((a = n.renderRoot) == null ? void 0 : a.querySelector(
|
|
609
|
+
return ((a = n.renderRoot) == null ? void 0 : a.querySelector(i)) ?? null;
|
|
610
610
|
};
|
|
611
|
-
return
|
|
612
|
-
return
|
|
611
|
+
return p4(t, C, { get() {
|
|
612
|
+
return l(this);
|
|
613
613
|
} });
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
var
|
|
617
|
-
for (var
|
|
618
|
-
(n = l
|
|
619
|
-
return
|
|
616
|
+
var u4 = Object.defineProperty, k5 = (i, e, t, C) => {
|
|
617
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
618
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
619
|
+
return o && u4(e, t, o), o;
|
|
620
620
|
};
|
|
621
|
-
const
|
|
621
|
+
const V2 = class V2 extends u {
|
|
622
622
|
constructor() {
|
|
623
623
|
super(...arguments), this.size = "medium", this.percent = "";
|
|
624
624
|
}
|
|
@@ -637,17 +637,17 @@ const r2 = class r2 extends p {
|
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
render() {
|
|
640
|
-
const [e, t] = this.getSizeParams(this.size),
|
|
641
|
-
let
|
|
642
|
-
|
|
643
|
-
const
|
|
644
|
-
return
|
|
640
|
+
const [e, t] = this.getSizeParams(this.size), C = this.percent === "" || this.percent === null;
|
|
641
|
+
let o;
|
|
642
|
+
C ? o = 0.75 * Math.PI * e : o = (1 - Math.max(0, Math.min(1, parseFloat(this.percent) || 0))) * Math.PI * e;
|
|
643
|
+
const l = t / 2, n = t + e, a = e / 2, s = Math.PI * e;
|
|
644
|
+
return X1`
|
|
645
645
|
<svg
|
|
646
|
-
class=${
|
|
646
|
+
class=${C ? "spinner" : ""}
|
|
647
647
|
width="${e}px"
|
|
648
648
|
height="${e}px"
|
|
649
649
|
transform="rotate(-90)"
|
|
650
|
-
viewBox="-${
|
|
650
|
+
viewBox="-${l} -${l} ${n} ${n}"
|
|
651
651
|
xmlns="http://www.w3.org/2000/svg"
|
|
652
652
|
>
|
|
653
653
|
<circle
|
|
@@ -669,26 +669,26 @@ const r2 = class r2 extends p {
|
|
|
669
669
|
r="${a}"
|
|
670
670
|
fill-opacity="0"
|
|
671
671
|
stroke-dasharray="${s}"
|
|
672
|
-
stroke-dashoffset="${
|
|
672
|
+
stroke-dashoffset="${o}"
|
|
673
673
|
/>
|
|
674
674
|
</svg>
|
|
675
675
|
`;
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
|
-
|
|
678
|
+
V2.styles = h`
|
|
679
679
|
:host { display: inline-block; line-height: 0; font-family: var(--font-sans); }
|
|
680
680
|
.spinner { animation: circle 0.6s linear infinite; }
|
|
681
681
|
@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
|
|
682
682
|
`;
|
|
683
|
-
let
|
|
684
|
-
|
|
683
|
+
let u1 = V2;
|
|
684
|
+
k5([
|
|
685
685
|
r()
|
|
686
|
-
],
|
|
687
|
-
|
|
686
|
+
], u1.prototype, "size");
|
|
687
|
+
k5([
|
|
688
688
|
r()
|
|
689
|
-
],
|
|
690
|
-
customElements.get("anduin-spinner") || customElements.define("anduin-spinner",
|
|
691
|
-
const
|
|
689
|
+
], u1.prototype, "percent");
|
|
690
|
+
customElements.get("anduin-spinner") || customElements.define("anduin-spinner", u1);
|
|
691
|
+
const H5 = {
|
|
692
692
|
access: [{ d: "M13 2.5H3C2.72386 2.5 2.5 2.72386 2.5 3V5.75H1V3C1 1.89543 1.89543 1 3 1H13C14.1046 1 15 1.89543 15 3V13C15 14.1046 14.1046 15 13 15H3C1.89543 15 1 14.1046 1 13V10.25H2.5V13C2.5 13.2761 2.72386 13.5 3 13.5H13C13.2761 13.5 13.5 13.2761 13.5 13V3C13.5 2.72386 13.2761 2.5 13 2.5ZM7.53033 4.21979C7.23744 3.9269 6.76256 3.9269 6.46967 4.21979C6.17678 4.51269 6.17678 4.98756 6.46967 5.28045L8.43922 7.25L0.75 7.25C0.335786 7.25 0 7.58579 0 8C0 8.41421 0.335786 8.75 0.75 8.75L8.43946 8.75L6.46967 10.7198C6.17678 11.0127 6.17678 11.4876 6.46967 11.7805C6.76256 12.0733 7.23744 12.0733 7.53033 11.7805L10.7803 8.53044C11.0732 8.23755 11.0732 7.76268 10.7803 7.46978L7.53033 4.21979Z", fillRule: "evenodd", clipRule: "evenodd" }],
|
|
693
693
|
alignCenter: [{ d: "M2 1C1.44772 1 1 1.44772 1 2C1 2.55228 1.44772 3 2 3H14C14.5523 3 15 2.55228 15 2C15 1.44772 14.5523 1 14 1H2ZM2 9C1.44772 9 1 9.44771 1 10C1 10.5523 1.44772 11 2 11H14C14.5523 11 15 10.5523 15 10C15 9.44771 14.5523 9 14 9H2ZM4 6C4 5.44772 4.44772 5 5 5H11C11.5523 5 12 5.44772 12 6C12 6.55228 11.5523 7 11 7H5C4.44772 7 4 6.55228 4 6ZM5 13C4.44772 13 4 13.4477 4 14C4 14.5523 4.44772 15 5 15H11C11.5523 15 12 14.5523 12 14C12 13.4477 11.5523 13 11 13H5Z", fillRule: "evenodd", clipRule: "evenodd" }],
|
|
694
694
|
alignJustify: [{ d: "M2 1C1.44772 1 1 1.44772 1 2C1 2.55228 1.44772 3 2 3H14C14.5523 3 15 2.55228 15 2C15 1.44772 14.5523 1 14 1H2ZM2 9C1.44772 9 1 9.44771 1 10C1 10.5523 1.44772 11 2 11H14C14.5523 11 15 10.5523 15 10C15 9.44771 14.5523 9 14 9H2ZM1 6C1 5.44772 1.44772 5 2 5H14C14.5523 5 15 5.44772 15 6C15 6.55228 14.5523 7 14 7H2C1.44772 7 1 6.55228 1 6ZM2 13C1.44772 13 1 13.4477 1 14C1 14.5523 1.44772 15 2 15H14C14.5523 15 15 14.5523 15 14C15 13.4477 14.5523 13 14 13H2Z", fillRule: "evenodd", clipRule: "evenodd" }],
|
|
@@ -1025,18 +1025,18 @@ const l5 = {
|
|
|
1025
1025
|
zoomOut: [{ d: "M4.5 6.25C4.08579 6.25 3.75 6.58579 3.75 7C3.75 7.41421 4.08579 7.75 4.5 7.75H9.5C9.91421 7.75 10.25 7.41421 10.25 7C10.25 6.58579 9.91421 6.25 9.5 6.25H4.5ZM7 14C8.57591 14 10.0302 13.4792 11.2001 12.6004C11.2281 12.6376 11.259 12.6733 11.2929 12.7071L14.2929 15.7071C14.6834 16.0976 15.3166 16.0976 15.7071 15.7071C16.0976 15.3166 16.0976 14.6834 15.7071 14.2929L12.7071 11.2929C12.6733 11.259 12.6376 11.2281 12.6004 11.2001C13.4792 10.0302 14 8.57591 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14ZM7 12.5C10.0376 12.5 12.5 10.0376 12.5 7C12.5 3.96243 10.0376 1.5 7 1.5C3.96243 1.5 1.5 3.96243 1.5 7C1.5 10.0376 3.96243 12.5 7 12.5Z", fillRule: "evenodd", clipRule: "evenodd" }],
|
|
1026
1026
|
zz: [{ d: "M9.75 1.02686C9.33579 1.02686 9 1.36264 9 1.77686C9 2.19107 9.33579 2.52686 9.75 2.52686H12.8186L9.13336 7.84995C8.97457 8.07931 8.9562 8.37784 9.08567 8.62494C9.21513 8.87203 9.47104 9.02686 9.75 9.02686H14.25C14.6642 9.02686 15 8.69107 15 8.27686C15 7.86264 14.6642 7.52686 14.25 7.52686H11.1814L14.8666 2.20376C15.0254 1.97441 15.0438 1.67587 14.9143 1.42878C14.7849 1.18168 14.529 1.02686 14.25 1.02686H9.75ZM1.75 7.02686C1.33579 7.02686 1 7.36264 1 7.77686C1 8.19107 1.33579 8.52686 1.75 8.52686H4.81858L1.13336 13.8499C0.974572 14.0793 0.956201 14.3778 1.08567 14.6249C1.21513 14.872 1.47104 15.0269 1.75 15.0269H6.25C6.66422 15.0269 7 14.6911 7 14.2769C7 13.8626 6.66422 13.5269 6.25 13.5269H3.18143L6.86665 8.20376C7.02543 7.97441 7.0438 7.67587 6.91434 7.42878C6.78487 7.18168 6.52896 7.02686 6.25 7.02686H1.75Z", fillRule: "evenodd", clipRule: "evenodd" }]
|
|
1027
1027
|
};
|
|
1028
|
-
var
|
|
1029
|
-
for (var
|
|
1030
|
-
(n = l
|
|
1031
|
-
return
|
|
1028
|
+
var h4 = Object.defineProperty, $5 = (i, e, t, C) => {
|
|
1029
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1030
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1031
|
+
return o && h4(e, t, o), o;
|
|
1032
1032
|
};
|
|
1033
|
-
const
|
|
1033
|
+
const g2 = class g2 extends u {
|
|
1034
1034
|
constructor() {
|
|
1035
1035
|
super(...arguments), this.name = "", this.size = 16;
|
|
1036
1036
|
}
|
|
1037
1037
|
render() {
|
|
1038
|
-
const e = this.name &&
|
|
1039
|
-
return
|
|
1038
|
+
const e = this.name && H5[this.name] ? H5[this.name] : [], t = !this.name;
|
|
1039
|
+
return X1`
|
|
1040
1040
|
<svg
|
|
1041
1041
|
class=${t ? "icon--hidden" : ""}
|
|
1042
1042
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1046,36 +1046,36 @@ const a2 = class a2 extends p {
|
|
|
1046
1046
|
viewBox="0 0 16 16"
|
|
1047
1047
|
>
|
|
1048
1048
|
${e.map(
|
|
1049
|
-
(
|
|
1049
|
+
(C) => X1`
|
|
1050
1050
|
<path
|
|
1051
1051
|
fill="currentColor"
|
|
1052
|
-
d="${
|
|
1053
|
-
fill-rule="${
|
|
1054
|
-
clip-rule="${
|
|
1052
|
+
d="${C.d}"
|
|
1053
|
+
fill-rule="${C.fillRule ?? p}"
|
|
1054
|
+
clip-rule="${C.clipRule ?? p}"
|
|
1055
1055
|
/>`
|
|
1056
1056
|
)}
|
|
1057
1057
|
</svg>
|
|
1058
1058
|
`;
|
|
1059
1059
|
}
|
|
1060
1060
|
};
|
|
1061
|
-
|
|
1061
|
+
g2.styles = h`
|
|
1062
1062
|
:host { display: block; line-height: 0; font-family: var(--font-sans); }
|
|
1063
1063
|
.icon--hidden { display: none; }
|
|
1064
1064
|
`;
|
|
1065
|
-
let
|
|
1066
|
-
|
|
1065
|
+
let h1 = g2;
|
|
1066
|
+
$5([
|
|
1067
1067
|
r()
|
|
1068
|
-
],
|
|
1069
|
-
|
|
1068
|
+
], h1.prototype, "name");
|
|
1069
|
+
$5([
|
|
1070
1070
|
r({ type: Number })
|
|
1071
|
-
],
|
|
1072
|
-
customElements.get("anduin-icon") || customElements.define("anduin-icon",
|
|
1073
|
-
var
|
|
1074
|
-
for (var
|
|
1075
|
-
(n = l
|
|
1076
|
-
return
|
|
1071
|
+
], h1.prototype, "size");
|
|
1072
|
+
customElements.get("anduin-icon") || customElements.define("anduin-icon", h1);
|
|
1073
|
+
var H4 = Object.defineProperty, v4 = (i, e, t, C) => {
|
|
1074
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1075
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1076
|
+
return o && H4(e, t, o), o;
|
|
1077
1077
|
};
|
|
1078
|
-
const
|
|
1078
|
+
const E5 = h`
|
|
1079
1079
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1080
1080
|
.badge {
|
|
1081
1081
|
border-radius: 9999px;
|
|
@@ -1102,7 +1102,7 @@ const M5 = H`
|
|
|
1102
1102
|
.badge--bold-warning { background-color: var(--color-semantic-warning-3); color: var(--color-semantic-gray-8); }
|
|
1103
1103
|
.badge--hidden { display: none; }
|
|
1104
1104
|
`;
|
|
1105
|
-
function
|
|
1105
|
+
function A5(i) {
|
|
1106
1106
|
return {
|
|
1107
1107
|
gray: "badge--light-gray",
|
|
1108
1108
|
primary: "badge--light-primary",
|
|
@@ -1114,29 +1114,29 @@ function m5(l) {
|
|
|
1114
1114
|
boldSuccess: "badge--bold-success",
|
|
1115
1115
|
boldWarning: "badge--bold-warning",
|
|
1116
1116
|
boldDanger: "badge--bold-danger"
|
|
1117
|
-
}[
|
|
1117
|
+
}[i || "gray"] || "badge--light-gray";
|
|
1118
1118
|
}
|
|
1119
|
-
const
|
|
1119
|
+
const L2 = class L2 extends u {
|
|
1120
1120
|
constructor() {
|
|
1121
1121
|
super(...arguments), this.variant = "gray";
|
|
1122
1122
|
}
|
|
1123
1123
|
render() {
|
|
1124
|
-
const e =
|
|
1124
|
+
const e = A5(this.variant);
|
|
1125
1125
|
return d`<div class="badge ${e}" part="badge"><slot></slot></div>`;
|
|
1126
1126
|
}
|
|
1127
1127
|
};
|
|
1128
|
-
|
|
1129
|
-
let
|
|
1130
|
-
|
|
1128
|
+
L2.styles = [E5];
|
|
1129
|
+
let F1 = L2;
|
|
1130
|
+
v4([
|
|
1131
1131
|
r()
|
|
1132
|
-
],
|
|
1133
|
-
customElements.get("anduin-badge") || customElements.define("anduin-badge",
|
|
1134
|
-
var
|
|
1135
|
-
for (var
|
|
1136
|
-
(n = l
|
|
1137
|
-
return
|
|
1132
|
+
], F1.prototype, "variant");
|
|
1133
|
+
customElements.get("anduin-badge") || customElements.define("anduin-badge", F1);
|
|
1134
|
+
var f4 = Object.defineProperty, B5 = (i, e, t, C) => {
|
|
1135
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1136
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1137
|
+
return o && f4(e, t, o), o;
|
|
1138
1138
|
};
|
|
1139
|
-
const
|
|
1139
|
+
const b2 = class b2 extends u {
|
|
1140
1140
|
constructor() {
|
|
1141
1141
|
super(...arguments), this.variant = "gray", this.count = 0;
|
|
1142
1142
|
}
|
|
@@ -1144,33 +1144,33 @@ const d2 = class d2 extends p {
|
|
|
1144
1144
|
return e > 99 ? "99+" : e.toString();
|
|
1145
1145
|
}
|
|
1146
1146
|
render() {
|
|
1147
|
-
const e =
|
|
1147
|
+
const e = A5(this.variant), t = this.count === 0, C = this.count > 0 && this.count < 10, o = [
|
|
1148
1148
|
"badge",
|
|
1149
1149
|
e,
|
|
1150
1150
|
t ? "badge--hidden" : "",
|
|
1151
|
-
|
|
1151
|
+
C ? "badge--square" : ""
|
|
1152
1152
|
].filter(Boolean).join(" ");
|
|
1153
|
-
return d`<div class="${
|
|
1153
|
+
return d`<div class="${o}" part="badge">${this.formatCount(this.count)}</div>`;
|
|
1154
1154
|
}
|
|
1155
1155
|
};
|
|
1156
|
-
|
|
1157
|
-
let
|
|
1158
|
-
|
|
1156
|
+
b2.styles = [E5];
|
|
1157
|
+
let H1 = b2;
|
|
1158
|
+
B5([
|
|
1159
1159
|
r()
|
|
1160
|
-
],
|
|
1161
|
-
|
|
1160
|
+
], H1.prototype, "variant");
|
|
1161
|
+
B5([
|
|
1162
1162
|
r({ type: Number })
|
|
1163
|
-
],
|
|
1164
|
-
customElements.get("anduin-badge-count") || customElements.define("anduin-badge-count",
|
|
1165
|
-
var
|
|
1166
|
-
for (var
|
|
1167
|
-
(n = l
|
|
1168
|
-
return
|
|
1163
|
+
], H1.prototype, "count");
|
|
1164
|
+
customElements.get("anduin-badge-count") || customElements.define("anduin-badge-count", H1);
|
|
1165
|
+
var V4 = Object.defineProperty, L = (i, e, t, C) => {
|
|
1166
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1167
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1168
|
+
return o && V4(e, t, o), o;
|
|
1169
1169
|
};
|
|
1170
|
-
function
|
|
1171
|
-
return
|
|
1170
|
+
function g4(i) {
|
|
1171
|
+
return i.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
|
|
1172
1172
|
}
|
|
1173
|
-
const
|
|
1173
|
+
const M2 = class M2 extends u {
|
|
1174
1174
|
constructor() {
|
|
1175
1175
|
super(...arguments), this.iconOnly = !1, this.appearance = "filled", this.variant = "", this.size = "medium", this.disabled = !1, this.loading = !1, this.fullWidth = !1, this.pill = !1, this.selected = !1, this.href = "", this.openNewTab = !1, this.download = "", this.startIcon = "", this.endIcon = "", this.label = "";
|
|
1176
1176
|
}
|
|
@@ -1187,13 +1187,13 @@ const c2 = class c2 extends p {
|
|
|
1187
1187
|
return this.variant ? this.variant : this.appearance === "filled" ? "gray0" : this.appearance === "text" ? "primary" : "gray9";
|
|
1188
1188
|
}
|
|
1189
1189
|
getSizeKebab() {
|
|
1190
|
-
return
|
|
1190
|
+
return g4(this.size);
|
|
1191
1191
|
}
|
|
1192
1192
|
iconSize() {
|
|
1193
1193
|
return this.size === "tiny" || this.size === "extraSmall" || this.size === "small" ? "12" : "16";
|
|
1194
1194
|
}
|
|
1195
1195
|
render() {
|
|
1196
|
-
const e = this.getVariant(), t = this.getSizeKebab(),
|
|
1196
|
+
const e = this.getVariant(), t = this.getSizeKebab(), C = [
|
|
1197
1197
|
"button",
|
|
1198
1198
|
`button--${this.appearance}`,
|
|
1199
1199
|
`button--${e}`,
|
|
@@ -1204,34 +1204,34 @@ const c2 = class c2 extends p {
|
|
|
1204
1204
|
this.loading ? "button--loading" : "",
|
|
1205
1205
|
this.selected ? "button--selected" : "",
|
|
1206
1206
|
this.iconOnly && this.appearance !== "text" && !this.fullWidth ? "button--icon-only" : ""
|
|
1207
|
-
].filter(Boolean).join(" "),
|
|
1207
|
+
].filter(Boolean).join(" "), o = d`
|
|
1208
1208
|
<div class="button__content button__content--${t}">
|
|
1209
|
-
${this.startIcon ? d`<anduin-icon name="${this.startIcon}" size="${this.iconSize()}"></anduin-icon>` :
|
|
1209
|
+
${this.startIcon ? d`<anduin-icon name="${this.startIcon}" size="${this.iconSize()}"></anduin-icon>` : p}
|
|
1210
1210
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
1211
|
-
${this.endIcon ? d`<anduin-icon name="${this.endIcon}" size="${this.iconSize()}"></anduin-icon>` :
|
|
1211
|
+
${this.endIcon ? d`<anduin-icon name="${this.endIcon}" size="${this.iconSize()}"></anduin-icon>` : p}
|
|
1212
1212
|
</div>
|
|
1213
|
-
${this.loading && this.appearance !== "text" ? d`<div class="button__loading"><anduin-spinner size="small"></anduin-spinner></div>` :
|
|
1213
|
+
${this.loading && this.appearance !== "text" ? d`<div class="button__loading"><anduin-spinner size="small"></anduin-spinner></div>` : p}
|
|
1214
1214
|
`;
|
|
1215
1215
|
return this.href ? d`
|
|
1216
1216
|
<a
|
|
1217
|
-
class="${
|
|
1217
|
+
class="${C}"
|
|
1218
1218
|
href="${this.disabled ? "" : this.href}"
|
|
1219
|
-
target="${this.openNewTab ? "_blank" :
|
|
1220
|
-
rel="${this.openNewTab ? "noreferrer noopener" :
|
|
1221
|
-
download="${this.download ||
|
|
1222
|
-
aria-label="${this.label ||
|
|
1223
|
-
>${
|
|
1219
|
+
target="${this.openNewTab ? "_blank" : p}"
|
|
1220
|
+
rel="${this.openNewTab ? "noreferrer noopener" : p}"
|
|
1221
|
+
download="${this.download || p}"
|
|
1222
|
+
aria-label="${this.label || p}"
|
|
1223
|
+
>${o}</a>
|
|
1224
1224
|
` : d`
|
|
1225
1225
|
<button
|
|
1226
1226
|
type="button"
|
|
1227
|
-
class="${
|
|
1227
|
+
class="${C}"
|
|
1228
1228
|
?disabled="${this.disabled}"
|
|
1229
|
-
aria-label="${this.label ||
|
|
1230
|
-
>${
|
|
1229
|
+
aria-label="${this.label || p}"
|
|
1230
|
+
>${o}</button>
|
|
1231
1231
|
`;
|
|
1232
1232
|
}
|
|
1233
1233
|
};
|
|
1234
|
-
|
|
1234
|
+
M2.styles = h`
|
|
1235
1235
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1236
1236
|
:host([full-width]) { display: block; width: 100%; }
|
|
1237
1237
|
.button {
|
|
@@ -1333,12 +1333,12 @@ c2.styles = H`
|
|
|
1333
1333
|
.button--icon-only.button--medium { width: 32px; min-width: 32px; padding-left: 0; padding-right: 0; }
|
|
1334
1334
|
.button--icon-only.button--large { width: 40px; min-width: 40px; padding-left: 0; padding-right: 0; }
|
|
1335
1335
|
`;
|
|
1336
|
-
let V =
|
|
1336
|
+
let V = M2;
|
|
1337
1337
|
L([
|
|
1338
1338
|
x()
|
|
1339
1339
|
], V.prototype, "iconOnly");
|
|
1340
1340
|
L([
|
|
1341
|
-
r({ converter: (
|
|
1341
|
+
r({ converter: (i) => i || "filled" })
|
|
1342
1342
|
], V.prototype, "appearance");
|
|
1343
1343
|
L([
|
|
1344
1344
|
r()
|
|
@@ -1380,12 +1380,12 @@ L([
|
|
|
1380
1380
|
r()
|
|
1381
1381
|
], V.prototype, "label");
|
|
1382
1382
|
customElements.get("anduin-button") || customElements.define("anduin-button", V);
|
|
1383
|
-
var
|
|
1384
|
-
for (var
|
|
1385
|
-
(n = l
|
|
1386
|
-
return
|
|
1383
|
+
var L4 = Object.defineProperty, b4 = (i, e, t, C) => {
|
|
1384
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1385
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1386
|
+
return o && L4(e, t, o), o;
|
|
1387
1387
|
};
|
|
1388
|
-
const
|
|
1388
|
+
const m2 = class m2 extends u {
|
|
1389
1389
|
constructor() {
|
|
1390
1390
|
super(...arguments), this.variant = "gray";
|
|
1391
1391
|
}
|
|
@@ -1398,7 +1398,7 @@ const u2 = class u2 extends p {
|
|
|
1398
1398
|
`;
|
|
1399
1399
|
}
|
|
1400
1400
|
};
|
|
1401
|
-
|
|
1401
|
+
m2.styles = h`
|
|
1402
1402
|
:host { display: block; font-family: var(--font-sans); }
|
|
1403
1403
|
.callout {
|
|
1404
1404
|
display: flex; align-items: center; justify-content: center;
|
|
@@ -1410,17 +1410,17 @@ u2.styles = H`
|
|
|
1410
1410
|
.callout--danger { background-color: var(--color-semantic-danger-4); color: var(--color-semantic-gray-0); }
|
|
1411
1411
|
.callout--warning { background-color: var(--color-semantic-warning-3); color: var(--color-semantic-gray-8); }
|
|
1412
1412
|
`;
|
|
1413
|
-
let
|
|
1414
|
-
|
|
1413
|
+
let z1 = m2;
|
|
1414
|
+
b4([
|
|
1415
1415
|
r()
|
|
1416
|
-
],
|
|
1417
|
-
customElements.get("anduin-callout") || customElements.define("anduin-callout",
|
|
1418
|
-
var
|
|
1419
|
-
for (var
|
|
1420
|
-
(n = l
|
|
1421
|
-
return
|
|
1416
|
+
], z1.prototype, "variant");
|
|
1417
|
+
customElements.get("anduin-callout") || customElements.define("anduin-callout", z1);
|
|
1418
|
+
var M4 = Object.defineProperty, F5 = (i, e, t, C) => {
|
|
1419
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1420
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1421
|
+
return o && M4(e, t, o), o;
|
|
1422
1422
|
};
|
|
1423
|
-
const
|
|
1423
|
+
const Z2 = class Z2 extends u {
|
|
1424
1424
|
constructor() {
|
|
1425
1425
|
super(...arguments), this.direction = "horizontal", this.hasContent = !1;
|
|
1426
1426
|
}
|
|
@@ -1431,10 +1431,10 @@ const p2 = class p2 extends p {
|
|
|
1431
1431
|
e.has("direction") && this.setAttribute("aria-orientation", this.direction === "vertical" ? "vertical" : "horizontal");
|
|
1432
1432
|
}
|
|
1433
1433
|
onSlotChange(e) {
|
|
1434
|
-
const
|
|
1435
|
-
this.hasContent =
|
|
1436
|
-
var
|
|
1437
|
-
return ((
|
|
1434
|
+
const C = e.target.assignedNodes({ flatten: !0 });
|
|
1435
|
+
this.hasContent = C.some((o) => {
|
|
1436
|
+
var l;
|
|
1437
|
+
return ((l = o.textContent) == null ? void 0 : l.trim()) !== "";
|
|
1438
1438
|
});
|
|
1439
1439
|
}
|
|
1440
1440
|
render() {
|
|
@@ -1451,7 +1451,7 @@ const p2 = class p2 extends p {
|
|
|
1451
1451
|
</div>` : d`<div class="divider--horizontal divider--horizontal-empty"><slot @slotchange=${this.onSlotChange}></slot></div>`;
|
|
1452
1452
|
}
|
|
1453
1453
|
};
|
|
1454
|
-
|
|
1454
|
+
Z2.styles = h`
|
|
1455
1455
|
:host { width: 100%; font-family: var(--font-sans); }
|
|
1456
1456
|
:host([direction="vertical"]) { width: auto; height: 100%; }
|
|
1457
1457
|
.divider--horizontal { margin-top: 8px; margin-bottom: 8px; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 8px; text-align: center; }
|
|
@@ -1461,20 +1461,20 @@ p2.styles = H`
|
|
|
1461
1461
|
.divider--vertical-empty { background-color: var(--color-gray-3); width: 1px; }
|
|
1462
1462
|
.divider__line--vertical { border-left: 1px solid var(--color-gray-3); justify-self: center; }
|
|
1463
1463
|
`;
|
|
1464
|
-
let
|
|
1465
|
-
|
|
1464
|
+
let v1 = Z2;
|
|
1465
|
+
F5([
|
|
1466
1466
|
r()
|
|
1467
|
-
],
|
|
1468
|
-
|
|
1467
|
+
], v1.prototype, "direction");
|
|
1468
|
+
F5([
|
|
1469
1469
|
x()
|
|
1470
|
-
],
|
|
1471
|
-
customElements.get("anduin-divider") || customElements.define("anduin-divider",
|
|
1472
|
-
var
|
|
1473
|
-
for (var
|
|
1474
|
-
(n = l
|
|
1475
|
-
return
|
|
1470
|
+
], v1.prototype, "hasContent");
|
|
1471
|
+
customElements.get("anduin-divider") || customElements.define("anduin-divider", v1);
|
|
1472
|
+
var m4 = Object.defineProperty, Z4 = (i, e, t, C) => {
|
|
1473
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1474
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1475
|
+
return o && m4(e, t, o), o;
|
|
1476
1476
|
};
|
|
1477
|
-
const
|
|
1477
|
+
const y2 = class y2 extends u {
|
|
1478
1478
|
constructor() {
|
|
1479
1479
|
super(...arguments), this.variant = "gray";
|
|
1480
1480
|
}
|
|
@@ -1482,7 +1482,7 @@ const h2 = class h2 extends p {
|
|
|
1482
1482
|
return d`<div class="dot dot--${this.variant}" part="dot"></div>`;
|
|
1483
1483
|
}
|
|
1484
1484
|
};
|
|
1485
|
-
|
|
1485
|
+
y2.styles = h`
|
|
1486
1486
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1487
1487
|
.dot { width: 10px; height: 10px; border-radius: 9999px; }
|
|
1488
1488
|
.dot--gray { background-color: var(--color-semantic-gray-6); color: var(--color-semantic-gray-0); }
|
|
@@ -1491,33 +1491,33 @@ h2.styles = H`
|
|
|
1491
1491
|
.dot--danger { background-color: var(--color-semantic-danger-4); color: var(--color-semantic-gray-0); }
|
|
1492
1492
|
.dot--warning { background-color: var(--color-semantic-warning-3); color: var(--color-semantic-gray-8); }
|
|
1493
1493
|
`;
|
|
1494
|
-
let
|
|
1495
|
-
|
|
1494
|
+
let P1 = y2;
|
|
1495
|
+
Z4([
|
|
1496
1496
|
r()
|
|
1497
|
-
],
|
|
1498
|
-
customElements.get("anduin-dot") || customElements.define("anduin-dot",
|
|
1499
|
-
var
|
|
1500
|
-
for (var
|
|
1501
|
-
(n = l
|
|
1502
|
-
return
|
|
1497
|
+
], P1.prototype, "variant");
|
|
1498
|
+
customElements.get("anduin-dot") || customElements.define("anduin-dot", P1);
|
|
1499
|
+
var y4 = Object.defineProperty, z5 = (i, e, t, C) => {
|
|
1500
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1501
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1502
|
+
return o && y4(e, t, o), o;
|
|
1503
1503
|
};
|
|
1504
|
-
const
|
|
1504
|
+
const _2 = class _2 extends u {
|
|
1505
1505
|
constructor() {
|
|
1506
1506
|
super(...arguments), this.percent = "", this.height = "medium";
|
|
1507
1507
|
}
|
|
1508
1508
|
render() {
|
|
1509
1509
|
const e = this.height === "large" ? 8 : 3, t = this.percent === "" || this.percent === null;
|
|
1510
|
-
let
|
|
1511
|
-
const
|
|
1512
|
-
return t ?
|
|
1510
|
+
let C = "";
|
|
1511
|
+
const o = ["progress__fill"];
|
|
1512
|
+
return t ? o.push("progress__fill--indeterminate") : C = `width: ${Math.max(0, Math.min(1, parseFloat(this.percent) || 0)) * 100}%;`, d`
|
|
1513
1513
|
<div class="progress" style="height: ${e}px;" part="progress">
|
|
1514
|
-
<div class="${
|
|
1514
|
+
<div class="${o.join(" ")}" style="${C}"></div>
|
|
1515
1515
|
<div class="progress__background"></div>
|
|
1516
1516
|
</div>
|
|
1517
1517
|
`;
|
|
1518
1518
|
}
|
|
1519
1519
|
};
|
|
1520
|
-
|
|
1520
|
+
_2.styles = h`
|
|
1521
1521
|
:host { display: block; font-family: var(--font-sans); }
|
|
1522
1522
|
.progress { overflow-x: hidden; position: relative; border-radius: 9999px; }
|
|
1523
1523
|
.progress__fill {
|
|
@@ -1533,20 +1533,20 @@ H2.styles = H`
|
|
|
1533
1533
|
to { transform: translateX(330%); }
|
|
1534
1534
|
}
|
|
1535
1535
|
`;
|
|
1536
|
-
let
|
|
1537
|
-
|
|
1536
|
+
let f1 = _2;
|
|
1537
|
+
z5([
|
|
1538
1538
|
r()
|
|
1539
|
-
],
|
|
1540
|
-
|
|
1539
|
+
], f1.prototype, "percent");
|
|
1540
|
+
z5([
|
|
1541
1541
|
r()
|
|
1542
|
-
],
|
|
1543
|
-
customElements.get("anduin-progress") || customElements.define("anduin-progress",
|
|
1544
|
-
var
|
|
1545
|
-
for (var
|
|
1546
|
-
(n = l
|
|
1547
|
-
return
|
|
1542
|
+
], f1.prototype, "height");
|
|
1543
|
+
customElements.get("anduin-progress") || customElements.define("anduin-progress", f1);
|
|
1544
|
+
var _4 = Object.defineProperty, C1 = (i, e, t, C) => {
|
|
1545
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1546
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1547
|
+
return o && _4(e, t, o), o;
|
|
1548
1548
|
};
|
|
1549
|
-
const
|
|
1549
|
+
const x2 = class x2 extends u {
|
|
1550
1550
|
constructor() {
|
|
1551
1551
|
super(...arguments), this.effect = "pulse", this.shape = "rectangle", this.height = "", this.width = "100%", this.duration = 1500, this.fontSize = "";
|
|
1552
1552
|
}
|
|
@@ -1557,15 +1557,15 @@ const v2 = class v2 extends p {
|
|
|
1557
1557
|
this.shape === "rounded" ? "skeleton--rounded" : "",
|
|
1558
1558
|
this.shape === "rectangle" ? "skeleton--rectangle" : "",
|
|
1559
1559
|
this.shape === "text" && this.fontSize ? "skeleton--text" : ""
|
|
1560
|
-
].filter(Boolean).join(" "), t = this.shape === "text" && this.fontSize ? `--anduin-skeleton-font-size: ${this.fontSize};` : "",
|
|
1560
|
+
].filter(Boolean).join(" "), t = this.shape === "text" && this.fontSize ? `--anduin-skeleton-font-size: ${this.fontSize};` : "", C = `${this.height ? `height: ${this.height};` : ""} width: ${this.width};`, o = this.effect === "pulse" ? `animation: skeleton-pulse ${this.duration}ms ease-in-out infinite;` : "";
|
|
1561
1561
|
return d`
|
|
1562
|
-
<div class="${e}" style="${t} ${
|
|
1562
|
+
<div class="${e}" style="${t} ${C} ${o}" part="skeleton">
|
|
1563
1563
|
${this.effect === "wave" ? d`<div class="skeleton__wave" style="animation: skeleton-wave ${this.duration}ms linear infinite;"></div>` : ""}
|
|
1564
1564
|
</div>
|
|
1565
1565
|
`;
|
|
1566
1566
|
}
|
|
1567
1567
|
};
|
|
1568
|
-
|
|
1568
|
+
x2.styles = h`
|
|
1569
1569
|
:host { display: block; height: 100%; font-family: var(--font-sans); }
|
|
1570
1570
|
.skeleton { background-color: var(--color-gray-3); position: relative; overflow: hidden; }
|
|
1571
1571
|
.skeleton--circle { border-radius: 9999px; }
|
|
@@ -1584,32 +1584,32 @@ v2.styles = H`
|
|
|
1584
1584
|
0% { transform: translateX(-100%); } 100% { transform: translateX(100%); }
|
|
1585
1585
|
}
|
|
1586
1586
|
`;
|
|
1587
|
-
let R =
|
|
1588
|
-
|
|
1587
|
+
let R = x2;
|
|
1588
|
+
C1([
|
|
1589
1589
|
r()
|
|
1590
1590
|
], R.prototype, "effect");
|
|
1591
|
-
|
|
1591
|
+
C1([
|
|
1592
1592
|
r()
|
|
1593
1593
|
], R.prototype, "shape");
|
|
1594
|
-
|
|
1594
|
+
C1([
|
|
1595
1595
|
r()
|
|
1596
1596
|
], R.prototype, "height");
|
|
1597
|
-
|
|
1597
|
+
C1([
|
|
1598
1598
|
r()
|
|
1599
1599
|
], R.prototype, "width");
|
|
1600
|
-
|
|
1600
|
+
C1([
|
|
1601
1601
|
r({ type: Number })
|
|
1602
1602
|
], R.prototype, "duration");
|
|
1603
|
-
|
|
1603
|
+
C1([
|
|
1604
1604
|
r({ attribute: "font-size" })
|
|
1605
1605
|
], R.prototype, "fontSize");
|
|
1606
1606
|
customElements.get("anduin-skeleton") || customElements.define("anduin-skeleton", R);
|
|
1607
|
-
var
|
|
1608
|
-
for (var
|
|
1609
|
-
(n = l
|
|
1610
|
-
return
|
|
1607
|
+
var x4 = Object.defineProperty, R4 = (i, e, t, C) => {
|
|
1608
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1609
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1610
|
+
return o && x4(e, t, o), o;
|
|
1611
1611
|
};
|
|
1612
|
-
const
|
|
1612
|
+
const R2 = class R2 extends u {
|
|
1613
1613
|
constructor() {
|
|
1614
1614
|
super(...arguments), this.height = "256px";
|
|
1615
1615
|
}
|
|
@@ -1624,30 +1624,30 @@ const f2 = class f2 extends p {
|
|
|
1624
1624
|
`;
|
|
1625
1625
|
}
|
|
1626
1626
|
};
|
|
1627
|
-
|
|
1627
|
+
R2.styles = h`
|
|
1628
1628
|
:host { display: block; height: 100%; font-family: var(--font-sans); }
|
|
1629
1629
|
.loading-state { display: flex; flex-direction: column; justify-content: center; align-items: center; }
|
|
1630
1630
|
.loading-state__indicator { color: var(--color-primary-4); }
|
|
1631
1631
|
.loading-state__content { margin-top: 12px; font-size: 15px; color: var(--color-gray-6); }
|
|
1632
1632
|
`;
|
|
1633
|
-
let
|
|
1634
|
-
|
|
1633
|
+
let D1 = R2;
|
|
1634
|
+
R4([
|
|
1635
1635
|
r()
|
|
1636
|
-
],
|
|
1637
|
-
customElements.get("anduin-loading-state") || customElements.define("anduin-loading-state",
|
|
1638
|
-
var
|
|
1639
|
-
for (var
|
|
1640
|
-
(n = l
|
|
1641
|
-
return
|
|
1636
|
+
], D1.prototype, "height");
|
|
1637
|
+
customElements.get("anduin-loading-state") || customElements.define("anduin-loading-state", D1);
|
|
1638
|
+
var w4 = Object.defineProperty, H2 = (i, e, t, C) => {
|
|
1639
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1640
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1641
|
+
return o && w4(e, t, o), o;
|
|
1642
1642
|
};
|
|
1643
|
-
const
|
|
1643
|
+
const P5 = "anduin-field:label-click", y1 = "anduin-field:label-click-coordinated", w2 = class w2 extends u {
|
|
1644
1644
|
constructor() {
|
|
1645
1645
|
super(...arguments), this.orientation = "vertical";
|
|
1646
1646
|
}
|
|
1647
1647
|
connectedCallback() {
|
|
1648
|
-
super.connectedCallback(), this.addEventListener(
|
|
1648
|
+
super.connectedCallback(), this.addEventListener(P5, (e) => {
|
|
1649
1649
|
const t = e;
|
|
1650
|
-
this.dispatchEvent(new CustomEvent(
|
|
1650
|
+
this.dispatchEvent(new CustomEvent(y1, {
|
|
1651
1651
|
detail: t.detail,
|
|
1652
1652
|
bubbles: !1,
|
|
1653
1653
|
composed: !1
|
|
@@ -1663,17 +1663,17 @@ const _5 = "anduin-field:label-click", E1 = "anduin-field:label-click-coordinate
|
|
|
1663
1663
|
`;
|
|
1664
1664
|
}
|
|
1665
1665
|
};
|
|
1666
|
-
|
|
1666
|
+
w2.styles = h`
|
|
1667
1667
|
:host { display: block; font-family: var(--font-sans); }
|
|
1668
1668
|
.field { display: flex; flex-wrap: wrap; }
|
|
1669
1669
|
.field--vertical { flex-direction: column; row-gap: 4px; }
|
|
1670
1670
|
.field--horizontal { column-gap: 4px; }
|
|
1671
1671
|
`;
|
|
1672
|
-
let
|
|
1673
|
-
|
|
1672
|
+
let S1 = w2;
|
|
1673
|
+
H2([
|
|
1674
1674
|
r()
|
|
1675
|
-
],
|
|
1676
|
-
const
|
|
1675
|
+
], S1.prototype, "orientation");
|
|
1676
|
+
const k2 = class k2 extends u {
|
|
1677
1677
|
constructor() {
|
|
1678
1678
|
super(...arguments), this.htmlfor = "", this.required = !1;
|
|
1679
1679
|
}
|
|
@@ -1681,7 +1681,7 @@ const L2 = class L2 extends p {
|
|
|
1681
1681
|
super.connectedCallback();
|
|
1682
1682
|
}
|
|
1683
1683
|
onLabelClick(e) {
|
|
1684
|
-
this.htmlfor && (e.preventDefault(), this.dispatchEvent(new CustomEvent(
|
|
1684
|
+
this.htmlfor && (e.preventDefault(), this.dispatchEvent(new CustomEvent(P5, {
|
|
1685
1685
|
detail: this.htmlfor,
|
|
1686
1686
|
bubbles: !0,
|
|
1687
1687
|
composed: !0
|
|
@@ -1700,72 +1700,72 @@ const L2 = class L2 extends p {
|
|
|
1700
1700
|
`;
|
|
1701
1701
|
}
|
|
1702
1702
|
};
|
|
1703
|
-
|
|
1703
|
+
k2.styles = h`
|
|
1704
1704
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1705
|
-
.field-label { font-size: 13px; line-height: 20px; font-weight: 600; cursor: default; }
|
|
1705
|
+
.field-label { font-size: 13px; line-height: 20px; font-weight: 600; cursor: default; color: var(--color-gray-8, #101828); }
|
|
1706
1706
|
.field-label__required { color: var(--color-danger-5); }
|
|
1707
1707
|
`;
|
|
1708
|
-
let
|
|
1709
|
-
|
|
1708
|
+
let V1 = k2;
|
|
1709
|
+
H2([
|
|
1710
1710
|
r()
|
|
1711
|
-
],
|
|
1712
|
-
|
|
1711
|
+
], V1.prototype, "htmlfor");
|
|
1712
|
+
H2([
|
|
1713
1713
|
r({ type: Boolean })
|
|
1714
|
-
],
|
|
1715
|
-
const
|
|
1714
|
+
], V1.prototype, "required");
|
|
1715
|
+
const $2 = class $2 extends u {
|
|
1716
1716
|
render() {
|
|
1717
1717
|
return d`<div class="field-description" part="description"><slot></slot></div>`;
|
|
1718
1718
|
}
|
|
1719
1719
|
};
|
|
1720
|
-
|
|
1720
|
+
$2.styles = h`
|
|
1721
1721
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1722
1722
|
.field-description { display: block; line-height: 16px; font-size: 11px; color: var(--color-gray-7); }
|
|
1723
1723
|
`;
|
|
1724
|
-
let
|
|
1725
|
-
const
|
|
1724
|
+
let K1 = $2;
|
|
1725
|
+
const E2 = class E2 extends u {
|
|
1726
1726
|
render() {
|
|
1727
1727
|
return d`<div class="field-error" part="error"><slot></slot></div>`;
|
|
1728
1728
|
}
|
|
1729
1729
|
};
|
|
1730
|
-
|
|
1730
|
+
E2.styles = h`
|
|
1731
1731
|
:host { display: block; font-family: var(--font-sans); }
|
|
1732
1732
|
.field-error { color: var(--color-danger-4); }
|
|
1733
1733
|
`;
|
|
1734
|
-
let
|
|
1735
|
-
const
|
|
1734
|
+
let J1 = E2;
|
|
1735
|
+
const A2 = class A2 extends u {
|
|
1736
1736
|
render() {
|
|
1737
1737
|
return d`<div class="field-group" part="group"><slot></slot></div>`;
|
|
1738
1738
|
}
|
|
1739
1739
|
};
|
|
1740
|
-
|
|
1740
|
+
A2.styles = h`
|
|
1741
1741
|
:host { display: block; font-family: var(--font-sans); }
|
|
1742
1742
|
.field-group { display: flex; flex-direction: column; row-gap: 24px; }
|
|
1743
1743
|
`;
|
|
1744
|
-
let
|
|
1745
|
-
customElements.get("anduin-field") || customElements.define("anduin-field",
|
|
1746
|
-
customElements.get("anduin-field-label") || customElements.define("anduin-field-label",
|
|
1747
|
-
customElements.get("anduin-field-description") || customElements.define("anduin-field-description",
|
|
1748
|
-
customElements.get("anduin-field-error") || customElements.define("anduin-field-error",
|
|
1749
|
-
customElements.get("anduin-field-group") || customElements.define("anduin-field-group",
|
|
1750
|
-
var
|
|
1751
|
-
for (var
|
|
1752
|
-
(n = l
|
|
1753
|
-
return
|
|
1744
|
+
let Q1 = A2;
|
|
1745
|
+
customElements.get("anduin-field") || customElements.define("anduin-field", S1);
|
|
1746
|
+
customElements.get("anduin-field-label") || customElements.define("anduin-field-label", V1);
|
|
1747
|
+
customElements.get("anduin-field-description") || customElements.define("anduin-field-description", K1);
|
|
1748
|
+
customElements.get("anduin-field-error") || customElements.define("anduin-field-error", J1);
|
|
1749
|
+
customElements.get("anduin-field-group") || customElements.define("anduin-field-group", Q1);
|
|
1750
|
+
var k4 = Object.defineProperty, _1 = (i, e, t, C) => {
|
|
1751
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1752
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1753
|
+
return o && k4(e, t, o), o;
|
|
1754
1754
|
};
|
|
1755
|
-
const
|
|
1755
|
+
const $4 = "anduin-checkbox:change", B2 = class B2 extends u {
|
|
1756
1756
|
constructor() {
|
|
1757
1757
|
super(...arguments), this.checked = !1, this.disabled = !1, this.indeterminate = !1, this.readonly = !1, this.inputid = "";
|
|
1758
1758
|
}
|
|
1759
1759
|
connectedCallback() {
|
|
1760
1760
|
super.connectedCallback();
|
|
1761
1761
|
const e = this.closest("anduin-field");
|
|
1762
|
-
e && e.addEventListener(
|
|
1763
|
-
const
|
|
1764
|
-
this.inputid && this.inputid ===
|
|
1762
|
+
e && e.addEventListener(y1, (t) => {
|
|
1763
|
+
const C = t;
|
|
1764
|
+
this.inputid && this.inputid === C.detail && !this.disabled && !this.readonly && this.toggle();
|
|
1765
1765
|
});
|
|
1766
1766
|
}
|
|
1767
1767
|
toggle() {
|
|
1768
|
-
this.checked = !this.checked, this.dispatchEvent(new CustomEvent(
|
|
1768
|
+
this.checked = !this.checked, this.dispatchEvent(new CustomEvent($4, {
|
|
1769
1769
|
detail: this.checked,
|
|
1770
1770
|
bubbles: !0,
|
|
1771
1771
|
composed: !0
|
|
@@ -1781,30 +1781,48 @@ const Z4 = "anduin-checkbox:change", b2 = class b2 extends p {
|
|
|
1781
1781
|
this.readonly && !this.indeterminate && !this.checked ? "checkbox__box--readonly" : "",
|
|
1782
1782
|
this.disabled && !this.indeterminate && !this.checked ? "checkbox__box--disabled" : "",
|
|
1783
1783
|
!this.indeterminate && !this.checked && !this.readonly && !this.disabled ? "checkbox__box--unchecked" : ""
|
|
1784
|
-
].filter(Boolean).join(" "), t = this.indeterminate ? "minusBold" : this.checked ? "checkBold" : "",
|
|
1784
|
+
].filter(Boolean).join(" "), t = this.indeterminate ? "minusBold" : this.checked ? "checkBold" : "", C = !this.disabled && !this.readonly, o = C ? 0 : -1;
|
|
1785
1785
|
return d`
|
|
1786
|
-
<
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1786
|
+
<label class="${this.disabled ? "is-disabled" : ""}">
|
|
1787
|
+
<div
|
|
1788
|
+
class="checkbox ${C ? "checkbox--interactive" : ""} ${this.disabled ? "checkbox--disabled" : ""}"
|
|
1789
|
+
part="checkbox"
|
|
1790
|
+
>
|
|
1791
|
+
<input
|
|
1792
|
+
class="checkbox__input"
|
|
1793
|
+
type="checkbox"
|
|
1794
|
+
.checked=${this.checked}
|
|
1795
|
+
?disabled=${this.disabled || this.readonly}
|
|
1796
|
+
tabindex="${o}"
|
|
1797
|
+
@change=${C ? this.onInputChange : p}
|
|
1798
|
+
/>
|
|
1799
|
+
<div class="${e}" tabindex="${o}"></div>
|
|
1800
|
+
<div class="checkbox__icon ${this.indeterminate || this.checked ? "checkbox__icon--visible" : ""}">
|
|
1801
|
+
${t ? d`<anduin-icon name="${t}" size="16"></anduin-icon>` : p}
|
|
1802
|
+
</div>
|
|
1801
1803
|
</div>
|
|
1802
|
-
|
|
1804
|
+
<span class="checkbox__label"><slot></slot></span>
|
|
1805
|
+
</label>
|
|
1803
1806
|
`;
|
|
1804
1807
|
}
|
|
1805
1808
|
};
|
|
1806
|
-
|
|
1809
|
+
B2.styles = h`
|
|
1807
1810
|
:host { display: inline-flex; font-family: var(--font-sans); }
|
|
1811
|
+
|
|
1812
|
+
label {
|
|
1813
|
+
display: inline-flex;
|
|
1814
|
+
align-items: center;
|
|
1815
|
+
gap: 8px;
|
|
1816
|
+
cursor: pointer;
|
|
1817
|
+
user-select: none;
|
|
1818
|
+
}
|
|
1819
|
+
label.is-disabled { cursor: default; opacity: 0.4; }
|
|
1820
|
+
|
|
1821
|
+
.checkbox__label {
|
|
1822
|
+
font-size: var(--text-13, 13px);
|
|
1823
|
+
color: var(--color-gray-8, #101828);
|
|
1824
|
+
line-height: 20px;
|
|
1825
|
+
}
|
|
1808
1826
|
.checkbox { width: 16px; height: 16px; position: relative; }
|
|
1809
1827
|
.checkbox--interactive { cursor: pointer; }
|
|
1810
1828
|
.checkbox--disabled { opacity: 0.4; }
|
|
@@ -1826,46 +1844,46 @@ b2.styles = H`
|
|
|
1826
1844
|
.checkbox__icon { position: absolute; inset: 0; pointer-events: none; color: var(--color-gray-4); display: flex; align-items: center; justify-content: center; }
|
|
1827
1845
|
.checkbox__icon--visible { color: var(--color-gray-0); }
|
|
1828
1846
|
`;
|
|
1829
|
-
let
|
|
1830
|
-
|
|
1847
|
+
let z = B2;
|
|
1848
|
+
_1([
|
|
1831
1849
|
r({ type: Boolean })
|
|
1832
|
-
],
|
|
1833
|
-
|
|
1850
|
+
], z.prototype, "checked");
|
|
1851
|
+
_1([
|
|
1834
1852
|
r({ type: Boolean })
|
|
1835
|
-
],
|
|
1836
|
-
|
|
1853
|
+
], z.prototype, "disabled");
|
|
1854
|
+
_1([
|
|
1837
1855
|
r({ type: Boolean })
|
|
1838
|
-
],
|
|
1839
|
-
|
|
1856
|
+
], z.prototype, "indeterminate");
|
|
1857
|
+
_1([
|
|
1840
1858
|
r({ type: Boolean })
|
|
1841
|
-
],
|
|
1842
|
-
|
|
1859
|
+
], z.prototype, "readonly");
|
|
1860
|
+
_1([
|
|
1843
1861
|
r()
|
|
1844
|
-
],
|
|
1845
|
-
customElements.get("anduin-checkbox") || customElements.define("anduin-checkbox",
|
|
1846
|
-
var
|
|
1847
|
-
for (var
|
|
1848
|
-
(n = l
|
|
1849
|
-
return
|
|
1862
|
+
], z.prototype, "inputid");
|
|
1863
|
+
customElements.get("anduin-checkbox") || customElements.define("anduin-checkbox", z);
|
|
1864
|
+
var E4 = Object.defineProperty, y = (i, e, t, C) => {
|
|
1865
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
1866
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
1867
|
+
return o && E4(e, t, o), o;
|
|
1850
1868
|
};
|
|
1851
|
-
const
|
|
1869
|
+
const v5 = "anduin-input:change", A4 = "anduin-input:clear", F2 = class F2 extends u {
|
|
1852
1870
|
constructor() {
|
|
1853
1871
|
super(...arguments), this.value = "", this.size = "default", this.disabled = !1, this.readonly = !1, this.placeholder = "", this.inputid = "", this.status = "", this.startIcon = "", this.endIcon = "", this.clearable = !1;
|
|
1854
1872
|
}
|
|
1855
1873
|
connectedCallback() {
|
|
1856
1874
|
super.connectedCallback();
|
|
1857
1875
|
const e = this.closest("anduin-field");
|
|
1858
|
-
e && e.addEventListener(
|
|
1859
|
-
var
|
|
1860
|
-
const
|
|
1861
|
-
this.inputid && this.inputid ===
|
|
1876
|
+
e && e.addEventListener(y1, (t) => {
|
|
1877
|
+
var o;
|
|
1878
|
+
const C = t;
|
|
1879
|
+
this.inputid && this.inputid === C.detail && ((o = this.inputEl) == null || o.focus());
|
|
1862
1880
|
});
|
|
1863
1881
|
}
|
|
1864
1882
|
updated() {
|
|
1865
1883
|
this.inputEl && this.inputEl.value !== this.value && (this.inputEl.value = this.value);
|
|
1866
1884
|
}
|
|
1867
1885
|
onInput() {
|
|
1868
|
-
this.value = this.inputEl.value, this.dispatchEvent(new CustomEvent(
|
|
1886
|
+
this.value = this.inputEl.value, this.dispatchEvent(new CustomEvent(v5, {
|
|
1869
1887
|
detail: this.value,
|
|
1870
1888
|
bubbles: !0,
|
|
1871
1889
|
composed: !0
|
|
@@ -1873,22 +1891,22 @@ const i5 = "anduin-input:change", _4 = "anduin-input:clear", Z2 = class Z2 exten
|
|
|
1873
1891
|
}
|
|
1874
1892
|
onClear() {
|
|
1875
1893
|
var e;
|
|
1876
|
-
this.value = "", this.inputEl && (this.inputEl.value = ""), this.dispatchEvent(new CustomEvent(
|
|
1894
|
+
this.value = "", this.inputEl && (this.inputEl.value = ""), this.dispatchEvent(new CustomEvent(v5, { detail: "", bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent(A4, { bubbles: !0, composed: !0 })), (e = this.inputEl) == null || e.focus();
|
|
1877
1895
|
}
|
|
1878
1896
|
render() {
|
|
1879
|
-
const e = this.size === "small" ? "input--small" : this.size === "large" ? "input--large" : "input--default", t = this.status ? `input--${this.status}` : "",
|
|
1897
|
+
const e = this.size === "small" ? "input--small" : this.size === "large" ? "input--large" : "input--default", t = this.status ? `input--${this.status}` : "", C = !!this.startIcon, o = !!this.endIcon || this.clearable && !!this.value, l = this.clearable && !!this.value && !this.disabled && !this.readonly, n = this.size === "small" ? "12" : this.size === "large" ? "20" : "16", a = this.size === "small" ? "10" : this.size === "large" ? "16" : "14";
|
|
1880
1898
|
return d`
|
|
1881
1899
|
<div class="input-wrapper">
|
|
1882
|
-
${
|
|
1900
|
+
${C ? d`
|
|
1883
1901
|
<span class="input__start">
|
|
1884
1902
|
<anduin-icon name=${this.startIcon} size=${n}></anduin-icon>
|
|
1885
1903
|
</span>
|
|
1886
|
-
` :
|
|
1904
|
+
` : p}
|
|
1887
1905
|
|
|
1888
1906
|
<input
|
|
1889
1907
|
class="input ${e}
|
|
1890
|
-
${
|
|
1891
|
-
${
|
|
1908
|
+
${C ? "input--has-start" : ""}
|
|
1909
|
+
${o ? "input--has-end" : ""}
|
|
1892
1910
|
${this.disabled ? "input--disabled" : ""}
|
|
1893
1911
|
${this.readonly ? "input--readonly" : ""}
|
|
1894
1912
|
${t}"
|
|
@@ -1901,23 +1919,23 @@ const i5 = "anduin-input:change", _4 = "anduin-input:clear", Z2 = class Z2 exten
|
|
|
1901
1919
|
@input=${this.onInput}
|
|
1902
1920
|
/>
|
|
1903
1921
|
|
|
1904
|
-
${
|
|
1922
|
+
${o ? d`
|
|
1905
1923
|
<span class="input__end">
|
|
1906
|
-
${
|
|
1924
|
+
${l ? d`
|
|
1907
1925
|
<button class="input__clear" type="button" @click=${this.onClear} aria-label="Clear">
|
|
1908
1926
|
<anduin-icon name="cross" size=${a}></anduin-icon>
|
|
1909
1927
|
</button>
|
|
1910
|
-
` :
|
|
1928
|
+
` : p}
|
|
1911
1929
|
${this.endIcon ? d`
|
|
1912
1930
|
<anduin-icon name=${this.endIcon} size=${n}></anduin-icon>
|
|
1913
|
-
` :
|
|
1931
|
+
` : p}
|
|
1914
1932
|
</span>
|
|
1915
|
-
` :
|
|
1933
|
+
` : p}
|
|
1916
1934
|
</div>
|
|
1917
1935
|
`;
|
|
1918
1936
|
}
|
|
1919
1937
|
};
|
|
1920
|
-
|
|
1938
|
+
F2.styles = h`
|
|
1921
1939
|
:host { display: block; font-family: var(--font-sans); }
|
|
1922
1940
|
|
|
1923
1941
|
.input-wrapper { position: relative; display: flex; align-items: center; }
|
|
@@ -1971,64 +1989,64 @@ Z2.styles = H`
|
|
|
1971
1989
|
}
|
|
1972
1990
|
.input__clear:hover { color: var(--color-gray-7); }
|
|
1973
1991
|
`;
|
|
1974
|
-
let
|
|
1992
|
+
let b = F2;
|
|
1975
1993
|
y([
|
|
1976
1994
|
r()
|
|
1977
|
-
],
|
|
1995
|
+
], b.prototype, "value");
|
|
1978
1996
|
y([
|
|
1979
1997
|
r()
|
|
1980
|
-
],
|
|
1998
|
+
], b.prototype, "size");
|
|
1981
1999
|
y([
|
|
1982
2000
|
r({ type: Boolean })
|
|
1983
|
-
],
|
|
2001
|
+
], b.prototype, "disabled");
|
|
1984
2002
|
y([
|
|
1985
2003
|
r({ type: Boolean })
|
|
1986
|
-
],
|
|
2004
|
+
], b.prototype, "readonly");
|
|
1987
2005
|
y([
|
|
1988
2006
|
r()
|
|
1989
|
-
],
|
|
2007
|
+
], b.prototype, "placeholder");
|
|
1990
2008
|
y([
|
|
1991
2009
|
r()
|
|
1992
|
-
],
|
|
2010
|
+
], b.prototype, "inputid");
|
|
1993
2011
|
y([
|
|
1994
2012
|
r()
|
|
1995
|
-
],
|
|
2013
|
+
], b.prototype, "status");
|
|
1996
2014
|
y([
|
|
1997
2015
|
r({ attribute: "start-icon" })
|
|
1998
|
-
],
|
|
2016
|
+
], b.prototype, "startIcon");
|
|
1999
2017
|
y([
|
|
2000
2018
|
r({ attribute: "end-icon" })
|
|
2001
|
-
],
|
|
2019
|
+
], b.prototype, "endIcon");
|
|
2002
2020
|
y([
|
|
2003
2021
|
r({ type: Boolean })
|
|
2004
|
-
],
|
|
2022
|
+
], b.prototype, "clearable");
|
|
2005
2023
|
y([
|
|
2006
|
-
|
|
2007
|
-
],
|
|
2008
|
-
customElements.get("anduin-input") || customElements.define("anduin-input",
|
|
2009
|
-
var
|
|
2010
|
-
for (var
|
|
2011
|
-
(n = l
|
|
2012
|
-
return
|
|
2024
|
+
D("input")
|
|
2025
|
+
], b.prototype, "inputEl");
|
|
2026
|
+
customElements.get("anduin-input") || customElements.define("anduin-input", b);
|
|
2027
|
+
var B4 = Object.defineProperty, S = (i, e, t, C) => {
|
|
2028
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
2029
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
2030
|
+
return o && B4(e, t, o), o;
|
|
2013
2031
|
};
|
|
2014
|
-
const
|
|
2032
|
+
const F4 = "anduin-textarea:change", z2 = class z2 extends u {
|
|
2015
2033
|
constructor() {
|
|
2016
2034
|
super(...arguments), this.value = "", this.disabled = !1, this.readonly = !1, this.placeholder = "", this.inputid = "", this.rows = 3, this.status = "";
|
|
2017
2035
|
}
|
|
2018
2036
|
connectedCallback() {
|
|
2019
2037
|
super.connectedCallback();
|
|
2020
2038
|
const e = this.closest("anduin-field");
|
|
2021
|
-
e && e.addEventListener(
|
|
2022
|
-
var
|
|
2023
|
-
const
|
|
2024
|
-
this.inputid && this.inputid ===
|
|
2039
|
+
e && e.addEventListener(y1, (t) => {
|
|
2040
|
+
var o;
|
|
2041
|
+
const C = t;
|
|
2042
|
+
this.inputid && this.inputid === C.detail && ((o = this.textareaEl) == null || o.focus());
|
|
2025
2043
|
});
|
|
2026
2044
|
}
|
|
2027
2045
|
updated() {
|
|
2028
2046
|
this.textareaEl && this.textareaEl.value !== this.value && (this.textareaEl.value = this.value);
|
|
2029
2047
|
}
|
|
2030
2048
|
onInput() {
|
|
2031
|
-
this.value = this.textareaEl.value, this.dispatchEvent(new CustomEvent(
|
|
2049
|
+
this.value = this.textareaEl.value, this.dispatchEvent(new CustomEvent(F4, {
|
|
2032
2050
|
detail: this.value,
|
|
2033
2051
|
bubbles: !0,
|
|
2034
2052
|
composed: !0
|
|
@@ -2053,7 +2071,7 @@ const R4 = "anduin-textarea:change", y2 = class y2 extends p {
|
|
|
2053
2071
|
`;
|
|
2054
2072
|
}
|
|
2055
2073
|
};
|
|
2056
|
-
|
|
2074
|
+
z2.styles = h`
|
|
2057
2075
|
:host { display: block; font-family: var(--font-sans); }
|
|
2058
2076
|
|
|
2059
2077
|
.textarea {
|
|
@@ -2070,46 +2088,46 @@ y2.styles = H`
|
|
|
2070
2088
|
.textarea--warning { border-color: var(--color-warning-4); }
|
|
2071
2089
|
.textarea--loading { border-color: var(--color-gray-4); }
|
|
2072
2090
|
`;
|
|
2073
|
-
let Z =
|
|
2074
|
-
|
|
2091
|
+
let Z = z2;
|
|
2092
|
+
S([
|
|
2075
2093
|
r()
|
|
2076
2094
|
], Z.prototype, "value");
|
|
2077
|
-
|
|
2095
|
+
S([
|
|
2078
2096
|
r({ type: Boolean })
|
|
2079
2097
|
], Z.prototype, "disabled");
|
|
2080
|
-
|
|
2098
|
+
S([
|
|
2081
2099
|
r({ type: Boolean })
|
|
2082
2100
|
], Z.prototype, "readonly");
|
|
2083
|
-
|
|
2101
|
+
S([
|
|
2084
2102
|
r()
|
|
2085
2103
|
], Z.prototype, "placeholder");
|
|
2086
|
-
|
|
2104
|
+
S([
|
|
2087
2105
|
r()
|
|
2088
2106
|
], Z.prototype, "inputid");
|
|
2089
|
-
|
|
2107
|
+
S([
|
|
2090
2108
|
r({ type: Number })
|
|
2091
2109
|
], Z.prototype, "rows");
|
|
2092
|
-
|
|
2110
|
+
S([
|
|
2093
2111
|
r()
|
|
2094
2112
|
], Z.prototype, "status");
|
|
2095
|
-
|
|
2096
|
-
|
|
2113
|
+
S([
|
|
2114
|
+
D("textarea")
|
|
2097
2115
|
], Z.prototype, "textareaEl");
|
|
2098
2116
|
customElements.get("anduin-textarea") || customElements.define("anduin-textarea", Z);
|
|
2099
|
-
var
|
|
2100
|
-
for (var
|
|
2101
|
-
(n = l
|
|
2102
|
-
return
|
|
2117
|
+
var z4 = Object.defineProperty, m = (i, e, t, C) => {
|
|
2118
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
2119
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
2120
|
+
return o && z4(e, t, o), o;
|
|
2103
2121
|
};
|
|
2104
|
-
const
|
|
2122
|
+
const D5 = "anduin-tab:trigger-click", T1 = "anduin-tab:value-changed", P4 = "anduin-tab:change", P2 = class P2 extends u {
|
|
2105
2123
|
constructor() {
|
|
2106
2124
|
super(...arguments), this.defaultValue = "", this.value = "", this.fill = !1;
|
|
2107
2125
|
}
|
|
2108
2126
|
connectedCallback() {
|
|
2109
|
-
super.connectedCallback(), this.addEventListener(
|
|
2127
|
+
super.connectedCallback(), this.addEventListener(D5, (e) => {
|
|
2110
2128
|
e.stopPropagation();
|
|
2111
2129
|
const t = e;
|
|
2112
|
-
this.value = t.detail, this.broadcastValueChanged(t.detail), this.dispatchEvent(new CustomEvent(
|
|
2130
|
+
this.value = t.detail, this.broadcastValueChanged(t.detail), this.dispatchEvent(new CustomEvent(P4, { detail: t.detail, bubbles: !0, composed: !0 }));
|
|
2113
2131
|
}), requestAnimationFrame(() => {
|
|
2114
2132
|
const e = this.value || this.defaultValue;
|
|
2115
2133
|
e && (this.value || (this.value = e), this.broadcastValueChanged(e));
|
|
@@ -2119,39 +2137,39 @@ const x5 = "anduin-tab:trigger-click", A1 = "anduin-tab:value-changed", k4 = "an
|
|
|
2119
2137
|
e.has("value") && this.value && this.broadcastValueChanged(this.value);
|
|
2120
2138
|
}
|
|
2121
2139
|
broadcastValueChanged(e) {
|
|
2122
|
-
this.dispatchEvent(new CustomEvent(
|
|
2140
|
+
this.dispatchEvent(new CustomEvent(T1, { detail: e, bubbles: !1, composed: !1 }));
|
|
2123
2141
|
}
|
|
2124
2142
|
render() {
|
|
2125
2143
|
return d`<div class="tabs" part="tabs"><slot></slot></div>`;
|
|
2126
2144
|
}
|
|
2127
2145
|
};
|
|
2128
|
-
|
|
2146
|
+
P2.styles = h`
|
|
2129
2147
|
:host { display: flex; flex-direction: column; font-family: var(--font-sans); }
|
|
2130
2148
|
:host([fill]) { flex: 1; min-height: 0; --_tab-fill-flex: 1; --_tab-fill-height: 100%; }
|
|
2131
2149
|
.tabs { display: flex; flex-direction: column; width: 100%; }
|
|
2132
2150
|
:host([fill]) .tabs { flex: 1; min-height: 0; }
|
|
2133
2151
|
`;
|
|
2134
|
-
let
|
|
2135
|
-
|
|
2152
|
+
let Q = P2;
|
|
2153
|
+
m([
|
|
2136
2154
|
r({ attribute: "default-value" })
|
|
2137
|
-
],
|
|
2138
|
-
|
|
2155
|
+
], Q.prototype, "defaultValue");
|
|
2156
|
+
m([
|
|
2139
2157
|
r()
|
|
2140
|
-
],
|
|
2141
|
-
|
|
2158
|
+
], Q.prototype, "value");
|
|
2159
|
+
m([
|
|
2142
2160
|
r({ type: Boolean, reflect: !0 })
|
|
2143
|
-
],
|
|
2144
|
-
const
|
|
2161
|
+
], Q.prototype, "fill");
|
|
2162
|
+
const D2 = class D2 extends u {
|
|
2145
2163
|
constructor() {
|
|
2146
2164
|
super(...arguments), this.alignment = "left", this.lastActiveValue = "", this.resizeObserver = null;
|
|
2147
2165
|
}
|
|
2148
2166
|
connectedCallback() {
|
|
2149
2167
|
super.connectedCallback();
|
|
2150
2168
|
const e = this.closest("anduin-tabs");
|
|
2151
|
-
e && e.addEventListener(
|
|
2152
|
-
const
|
|
2153
|
-
this.lastActiveValue =
|
|
2154
|
-
this.animateIndicator(
|
|
2169
|
+
e && e.addEventListener(T1, (t) => {
|
|
2170
|
+
const C = t;
|
|
2171
|
+
this.lastActiveValue = C.detail, requestAnimationFrame(() => {
|
|
2172
|
+
this.animateIndicator(C.detail);
|
|
2155
2173
|
});
|
|
2156
2174
|
});
|
|
2157
2175
|
}
|
|
@@ -2166,11 +2184,11 @@ const x2 = class x2 extends p {
|
|
|
2166
2184
|
}
|
|
2167
2185
|
animateIndicator(e) {
|
|
2168
2186
|
const t = this.querySelectorAll(":scope > anduin-tab-trigger");
|
|
2169
|
-
for (let
|
|
2170
|
-
const
|
|
2171
|
-
if (
|
|
2172
|
-
const
|
|
2173
|
-
this.indicator && (this.indicator.style.width = `${
|
|
2187
|
+
for (let C = 0; C < t.length; C++) {
|
|
2188
|
+
const o = t[C];
|
|
2189
|
+
if (o.getAttribute("value") === e) {
|
|
2190
|
+
const l = o.getBoundingClientRect(), n = this.getBoundingClientRect(), a = l.left - n.left + this.scrollLeft;
|
|
2191
|
+
this.indicator && (this.indicator.style.width = `${l.width}px`, this.indicator.style.transform = `translateX(${a}px)`);
|
|
2174
2192
|
break;
|
|
2175
2193
|
}
|
|
2176
2194
|
}
|
|
@@ -2184,7 +2202,7 @@ const x2 = class x2 extends p {
|
|
|
2184
2202
|
`;
|
|
2185
2203
|
}
|
|
2186
2204
|
};
|
|
2187
|
-
|
|
2205
|
+
D2.styles = h`
|
|
2188
2206
|
:host { display: block; font-family: var(--font-sans); }
|
|
2189
2207
|
.tabs-list {
|
|
2190
2208
|
display: flex; background-color: var(--color-gray-0);
|
|
@@ -2199,27 +2217,27 @@ x2.styles = H`
|
|
|
2199
2217
|
left: 0; height: 2px; transition-duration: 200ms; transition-property: transform, width;
|
|
2200
2218
|
}
|
|
2201
2219
|
`;
|
|
2202
|
-
let
|
|
2203
|
-
|
|
2220
|
+
let g1 = D2;
|
|
2221
|
+
m([
|
|
2204
2222
|
r()
|
|
2205
|
-
],
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
],
|
|
2209
|
-
const
|
|
2223
|
+
], g1.prototype, "alignment");
|
|
2224
|
+
m([
|
|
2225
|
+
D(".tabs-list__indicator")
|
|
2226
|
+
], g1.prototype, "indicator");
|
|
2227
|
+
const S2 = class S2 extends u {
|
|
2210
2228
|
constructor() {
|
|
2211
2229
|
super(...arguments), this.value = "", this.startIcon = "", this.disabled = !1, this.showBadge = !1, this.badgeCount = "", this.isActive = !1;
|
|
2212
2230
|
}
|
|
2213
2231
|
connectedCallback() {
|
|
2214
2232
|
super.connectedCallback();
|
|
2215
2233
|
const e = this.closest("anduin-tabs");
|
|
2216
|
-
e && e.addEventListener(
|
|
2217
|
-
const
|
|
2218
|
-
this.isActive =
|
|
2234
|
+
e && e.addEventListener(T1, (t) => {
|
|
2235
|
+
const C = t;
|
|
2236
|
+
this.isActive = C.detail === this.value;
|
|
2219
2237
|
});
|
|
2220
2238
|
}
|
|
2221
2239
|
onClick() {
|
|
2222
|
-
this.dispatchEvent(new CustomEvent(
|
|
2240
|
+
this.dispatchEvent(new CustomEvent(D5, { detail: this.value, bubbles: !0, composed: !0 }));
|
|
2223
2241
|
}
|
|
2224
2242
|
render() {
|
|
2225
2243
|
return d`
|
|
@@ -2232,15 +2250,15 @@ const R2 = class R2 extends p {
|
|
|
2232
2250
|
@click=${this.onClick}
|
|
2233
2251
|
>
|
|
2234
2252
|
<div class="tab-trigger__content">
|
|
2235
|
-
${this.startIcon ? d`<anduin-icon name="${this.startIcon}" size="16"></anduin-icon>` :
|
|
2253
|
+
${this.startIcon ? d`<anduin-icon name="${this.startIcon}" size="16"></anduin-icon>` : p}
|
|
2236
2254
|
<slot></slot>
|
|
2237
|
-
${this.showBadge ? d`<span class="tab-trigger__badge">${this.badgeCount}</span>` :
|
|
2255
|
+
${this.showBadge ? d`<span class="tab-trigger__badge">${this.badgeCount}</span>` : p}
|
|
2238
2256
|
</div>
|
|
2239
2257
|
</button>
|
|
2240
2258
|
`;
|
|
2241
2259
|
}
|
|
2242
2260
|
};
|
|
2243
|
-
|
|
2261
|
+
S2.styles = h`
|
|
2244
2262
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
2245
2263
|
.tab-trigger {
|
|
2246
2264
|
cursor: pointer; background: none; border: none; display: block;
|
|
@@ -2263,35 +2281,35 @@ R2.styles = H`
|
|
|
2263
2281
|
color: var(--color-gray-7); white-space: nowrap;
|
|
2264
2282
|
}
|
|
2265
2283
|
`;
|
|
2266
|
-
let w =
|
|
2267
|
-
|
|
2284
|
+
let w = S2;
|
|
2285
|
+
m([
|
|
2268
2286
|
r()
|
|
2269
2287
|
], w.prototype, "value");
|
|
2270
|
-
|
|
2288
|
+
m([
|
|
2271
2289
|
r({ attribute: "start-icon" })
|
|
2272
2290
|
], w.prototype, "startIcon");
|
|
2273
|
-
|
|
2291
|
+
m([
|
|
2274
2292
|
r({ type: Boolean })
|
|
2275
2293
|
], w.prototype, "disabled");
|
|
2276
|
-
|
|
2294
|
+
m([
|
|
2277
2295
|
r({ type: Boolean, attribute: "show-badge" })
|
|
2278
2296
|
], w.prototype, "showBadge");
|
|
2279
|
-
|
|
2297
|
+
m([
|
|
2280
2298
|
r({ attribute: "badge-count" })
|
|
2281
2299
|
], w.prototype, "badgeCount");
|
|
2282
|
-
|
|
2300
|
+
m([
|
|
2283
2301
|
x()
|
|
2284
2302
|
], w.prototype, "isActive");
|
|
2285
|
-
const
|
|
2303
|
+
const O2 = class O2 extends u {
|
|
2286
2304
|
constructor() {
|
|
2287
2305
|
super(...arguments), this.value = "", this.isActive = !1;
|
|
2288
2306
|
}
|
|
2289
2307
|
connectedCallback() {
|
|
2290
2308
|
super.connectedCallback();
|
|
2291
2309
|
const e = this.closest("anduin-tabs");
|
|
2292
|
-
e && e.addEventListener(
|
|
2293
|
-
const
|
|
2294
|
-
this.isActive =
|
|
2310
|
+
e && e.addEventListener(T1, (t) => {
|
|
2311
|
+
const C = t;
|
|
2312
|
+
this.isActive = C.detail === this.value;
|
|
2295
2313
|
});
|
|
2296
2314
|
}
|
|
2297
2315
|
updated(e) {
|
|
@@ -2305,28 +2323,28 @@ const w2 = class w2 extends p {
|
|
|
2305
2323
|
`;
|
|
2306
2324
|
}
|
|
2307
2325
|
};
|
|
2308
|
-
|
|
2326
|
+
O2.styles = h`
|
|
2309
2327
|
:host { display: block; font-family: var(--font-sans); flex: var(--_tab-fill-flex, 0 0 auto); min-height: 0; }
|
|
2310
2328
|
:host(:not([active])) { display: none; }
|
|
2311
2329
|
.tab-content { width: 100%; height: var(--_tab-fill-height, auto); overflow-x: hidden; overflow-y: auto; }
|
|
2312
2330
|
`;
|
|
2313
|
-
let
|
|
2314
|
-
|
|
2331
|
+
let L1 = O2;
|
|
2332
|
+
m([
|
|
2315
2333
|
r()
|
|
2316
|
-
],
|
|
2317
|
-
|
|
2334
|
+
], L1.prototype, "value");
|
|
2335
|
+
m([
|
|
2318
2336
|
x()
|
|
2319
|
-
],
|
|
2320
|
-
customElements.get("anduin-tabs") || customElements.define("anduin-tabs",
|
|
2321
|
-
customElements.get("anduin-tabs-list") || customElements.define("anduin-tabs-list",
|
|
2337
|
+
], L1.prototype, "isActive");
|
|
2338
|
+
customElements.get("anduin-tabs") || customElements.define("anduin-tabs", Q);
|
|
2339
|
+
customElements.get("anduin-tabs-list") || customElements.define("anduin-tabs-list", g1);
|
|
2322
2340
|
customElements.get("anduin-tab-trigger") || customElements.define("anduin-tab-trigger", w);
|
|
2323
|
-
customElements.get("anduin-tab-content") || customElements.define("anduin-tab-content",
|
|
2324
|
-
var
|
|
2325
|
-
for (var
|
|
2326
|
-
(n = l
|
|
2327
|
-
return
|
|
2341
|
+
customElements.get("anduin-tab-content") || customElements.define("anduin-tab-content", L1);
|
|
2342
|
+
var D4 = Object.defineProperty, v2 = (i, e, t, C) => {
|
|
2343
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
2344
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
2345
|
+
return o && D4(e, t, o), o;
|
|
2328
2346
|
};
|
|
2329
|
-
const
|
|
2347
|
+
const S4 = "anduin-tag-close:click", O4 = {
|
|
2330
2348
|
gray: "tag--light-gray",
|
|
2331
2349
|
primary: "tag--light-primary",
|
|
2332
2350
|
success: "tag--light-success",
|
|
@@ -2351,7 +2369,7 @@ const E4 = "anduin-tag-close:click", A4 = {
|
|
|
2351
2369
|
customYellow: "tag--custom-yellow",
|
|
2352
2370
|
customYellowGreen: "tag--custom-yellow-green",
|
|
2353
2371
|
customYellowOrange: "tag--custom-yellow-orange"
|
|
2354
|
-
},
|
|
2372
|
+
}, I4 = {
|
|
2355
2373
|
gray: "tag__icon--light-gray",
|
|
2356
2374
|
primary: "tag__icon--light-primary",
|
|
2357
2375
|
success: "tag__icon--light-success",
|
|
@@ -2376,22 +2394,22 @@ const E4 = "anduin-tag-close:click", A4 = {
|
|
|
2376
2394
|
customMagenta: "tag__icon--custom-magenta",
|
|
2377
2395
|
customBlueGreen: "tag__icon--custom-blue-green",
|
|
2378
2396
|
customPink: "tag__icon--custom-pink"
|
|
2379
|
-
},
|
|
2397
|
+
}, I2 = class I2 extends u {
|
|
2380
2398
|
constructor() {
|
|
2381
2399
|
super(...arguments), this.variant = "gray", this.icon = "", this.disabled = !1;
|
|
2382
2400
|
}
|
|
2383
2401
|
render() {
|
|
2384
|
-
const e =
|
|
2402
|
+
const e = O4[this.variant] || "tag--light-gray", t = I4[this.variant] || "tag__icon--light-gray";
|
|
2385
2403
|
return d`
|
|
2386
2404
|
<div class="tag ${e} ${this.disabled ? "tag--disabled" : ""}" part="tag">
|
|
2387
|
-
${this.icon ? d`<anduin-icon name="${this.icon}" size="12" class="tag__icon ${t}"></anduin-icon>` :
|
|
2405
|
+
${this.icon ? d`<anduin-icon name="${this.icon}" size="12" class="tag__icon ${t}"></anduin-icon>` : p}
|
|
2388
2406
|
<div class="tag__label"><slot></slot></div>
|
|
2389
2407
|
<slot name="closeButton" class="tag__close"></slot>
|
|
2390
2408
|
</div>
|
|
2391
2409
|
`;
|
|
2392
2410
|
}
|
|
2393
2411
|
};
|
|
2394
|
-
|
|
2412
|
+
I2.styles = h`
|
|
2395
2413
|
:host { display: inline-flex; max-width: 100%; font-family: var(--font-sans); }
|
|
2396
2414
|
.tag {
|
|
2397
2415
|
font-weight: 500; font-size: 11px; height: 20px; padding-left: 6px; padding-right: 6px;
|
|
@@ -2439,19 +2457,19 @@ k2.styles = H`
|
|
|
2439
2457
|
.tag--custom-yellow-green { color: var(--color-gray-9); background-color: rgb(174,207,85); }
|
|
2440
2458
|
.tag--custom-yellow-orange { color: var(--color-gray-9); background-color: rgb(255,193,107); }
|
|
2441
2459
|
`;
|
|
2442
|
-
let
|
|
2443
|
-
|
|
2460
|
+
let e1 = I2;
|
|
2461
|
+
v2([
|
|
2444
2462
|
r()
|
|
2445
|
-
],
|
|
2446
|
-
|
|
2463
|
+
], e1.prototype, "variant");
|
|
2464
|
+
v2([
|
|
2447
2465
|
r()
|
|
2448
|
-
],
|
|
2449
|
-
|
|
2466
|
+
], e1.prototype, "icon");
|
|
2467
|
+
v2([
|
|
2450
2468
|
r({ type: Boolean })
|
|
2451
|
-
],
|
|
2452
|
-
const
|
|
2469
|
+
], e1.prototype, "disabled");
|
|
2470
|
+
const T2 = class T2 extends u {
|
|
2453
2471
|
onClick() {
|
|
2454
|
-
this.dispatchEvent(new CustomEvent(
|
|
2472
|
+
this.dispatchEvent(new CustomEvent(S4, { bubbles: !0, composed: !0 }));
|
|
2455
2473
|
}
|
|
2456
2474
|
render() {
|
|
2457
2475
|
return d`
|
|
@@ -2461,7 +2479,7 @@ const $2 = class $2 extends p {
|
|
|
2461
2479
|
`;
|
|
2462
2480
|
}
|
|
2463
2481
|
};
|
|
2464
|
-
|
|
2482
|
+
T2.styles = h`
|
|
2465
2483
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
2466
2484
|
.tag-close__button {
|
|
2467
2485
|
flex: none; width: 16px; height: 16px; display: flex; align-items: center;
|
|
@@ -2471,15 +2489,15 @@ $2.styles = H`
|
|
|
2471
2489
|
.tag-close__button:hover { opacity: 0.7; }
|
|
2472
2490
|
.tag-close__button:active { opacity: 0.5; }
|
|
2473
2491
|
`;
|
|
2474
|
-
let
|
|
2475
|
-
customElements.get("anduin-tag") || customElements.define("anduin-tag",
|
|
2476
|
-
customElements.get("anduin-tag-close") || customElements.define("anduin-tag-close",
|
|
2477
|
-
var
|
|
2478
|
-
for (var
|
|
2479
|
-
(n = l
|
|
2480
|
-
return
|
|
2492
|
+
let e2 = T2;
|
|
2493
|
+
customElements.get("anduin-tag") || customElements.define("anduin-tag", e1);
|
|
2494
|
+
customElements.get("anduin-tag-close") || customElements.define("anduin-tag-close", e2);
|
|
2495
|
+
var T4 = Object.defineProperty, S5 = (i, e, t, C) => {
|
|
2496
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
2497
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
2498
|
+
return o && T4(e, t, o), o;
|
|
2481
2499
|
};
|
|
2482
|
-
const
|
|
2500
|
+
const O5 = "anduin-tooltip:show", f2 = "anduin-tooltip:hide", I5 = "anduin-tooltip:trigger-mounted", T5 = "anduin-tooltip:content-popup-mounted", N5 = "anduin-tooltip:content-popup-unmounted", j5 = "anduin-tooltip:visibility-changed", N4 = [
|
|
2483
2501
|
"top-start",
|
|
2484
2502
|
"top-center",
|
|
2485
2503
|
"top-end",
|
|
@@ -2493,94 +2511,94 @@ const w5 = "anduin-tooltip:show", n2 = "anduin-tooltip:hide", k5 = "anduin-toolt
|
|
|
2493
2511
|
"left-center",
|
|
2494
2512
|
"left-end"
|
|
2495
2513
|
];
|
|
2496
|
-
function
|
|
2497
|
-
switch (
|
|
2514
|
+
function f5(i, e, t, C, o) {
|
|
2515
|
+
switch (C) {
|
|
2498
2516
|
case "top-start":
|
|
2499
|
-
return { left:
|
|
2517
|
+
return { left: i.left, top: i.top - t - o };
|
|
2500
2518
|
case "top-center":
|
|
2501
|
-
return { left:
|
|
2519
|
+
return { left: i.left + i.width / 2 - e / 2, top: i.top - t - o };
|
|
2502
2520
|
case "top-end":
|
|
2503
|
-
return { left:
|
|
2521
|
+
return { left: i.left + i.width - e, top: i.top - t - o };
|
|
2504
2522
|
case "right-start":
|
|
2505
|
-
return { left:
|
|
2523
|
+
return { left: i.right + o, top: i.top };
|
|
2506
2524
|
case "right-center":
|
|
2507
|
-
return { left:
|
|
2525
|
+
return { left: i.right + o, top: i.top + i.height / 2 - t / 2 };
|
|
2508
2526
|
case "right-end":
|
|
2509
|
-
return { left:
|
|
2527
|
+
return { left: i.right + o, top: i.top + i.height - t };
|
|
2510
2528
|
case "bottom-start":
|
|
2511
|
-
return { left:
|
|
2529
|
+
return { left: i.left, top: i.bottom + o };
|
|
2512
2530
|
case "bottom-center":
|
|
2513
|
-
return { left:
|
|
2531
|
+
return { left: i.left + i.width / 2 - e / 2, top: i.bottom + o };
|
|
2514
2532
|
case "bottom-end":
|
|
2515
|
-
return { left:
|
|
2533
|
+
return { left: i.left + i.width - e, top: i.bottom + o };
|
|
2516
2534
|
case "left-start":
|
|
2517
|
-
return { left:
|
|
2535
|
+
return { left: i.left - e - o, top: i.top };
|
|
2518
2536
|
case "left-center":
|
|
2519
|
-
return { left:
|
|
2537
|
+
return { left: i.left - e - o, top: i.top + i.height / 2 - t / 2 };
|
|
2520
2538
|
case "left-end":
|
|
2521
|
-
return { left:
|
|
2539
|
+
return { left: i.left - e - o, top: i.top + i.height - t };
|
|
2522
2540
|
default:
|
|
2523
2541
|
return { left: 0, top: 0 };
|
|
2524
2542
|
}
|
|
2525
2543
|
}
|
|
2526
|
-
function
|
|
2527
|
-
return e.right >=
|
|
2544
|
+
function V5(i, e) {
|
|
2545
|
+
return e.right >= i.left && e.left <= i.right && e.top <= i.bottom && e.bottom >= i.top;
|
|
2528
2546
|
}
|
|
2529
|
-
function
|
|
2530
|
-
const t = Math.max(
|
|
2531
|
-
return
|
|
2547
|
+
function g5(i, e) {
|
|
2548
|
+
const t = Math.max(i.left, e.left), C = Math.max(i.top, e.top), o = Math.min(i.right, e.right), l = Math.min(i.bottom, e.bottom);
|
|
2549
|
+
return o < t || l < C ? 0 : (o - t) * (l - C);
|
|
2532
2550
|
}
|
|
2533
|
-
function
|
|
2534
|
-
const
|
|
2535
|
-
if (!
|
|
2536
|
-
{ left:
|
|
2551
|
+
function j4(i, e, t, C = 8) {
|
|
2552
|
+
const o = window.innerWidth, l = window.innerHeight, n = { left: 0, top: 0, right: o, bottom: l }, a = e.width, s = e.height;
|
|
2553
|
+
if (!V5(
|
|
2554
|
+
{ left: i.left, top: i.top, right: i.right, bottom: i.bottom },
|
|
2537
2555
|
n
|
|
2538
2556
|
)) return null;
|
|
2539
|
-
const c =
|
|
2540
|
-
if (
|
|
2557
|
+
const c = f5(i, a, s, t, C), H = N4.map((f) => ({ p: f, off: f5(i, a, s, f, C) })).filter(({ off: f }) => V5({ left: f.left, top: f.top, right: f.left + a, bottom: f.top + s }, n));
|
|
2558
|
+
if (H.length === 0)
|
|
2541
2559
|
return {
|
|
2542
2560
|
placement: t,
|
|
2543
|
-
left: Math.round(Math.min(Math.max(c.left, 0),
|
|
2544
|
-
top: Math.round(Math.min(Math.max(c.top, 0),
|
|
2561
|
+
left: Math.round(Math.min(Math.max(c.left, 0), o - a)),
|
|
2562
|
+
top: Math.round(Math.min(Math.max(c.top, 0), l - s))
|
|
2545
2563
|
};
|
|
2546
|
-
|
|
2547
|
-
const
|
|
2548
|
-
if (
|
|
2549
|
-
const
|
|
2550
|
-
return
|
|
2564
|
+
H.sort((f, M) => {
|
|
2565
|
+
const x1 = { left: f.off.left, top: f.off.top, right: f.off.left + a, bottom: f.off.top + s }, R1 = { left: M.off.left, top: M.off.top, right: M.off.left + a, bottom: M.off.top + s }, l1 = g5(x1, n), w1 = g5(R1, n);
|
|
2566
|
+
if (w1 !== l1) return w1 - l1;
|
|
2567
|
+
const k1 = Math.abs(f.off.left - c.left) + Math.abs(f.off.top - c.top), $1 = Math.abs(M.off.left - c.left) + Math.abs(M.off.top - c.top);
|
|
2568
|
+
return k1 - $1;
|
|
2551
2569
|
});
|
|
2552
|
-
const { p: v, off:
|
|
2570
|
+
const { p: v, off: g } = H[0];
|
|
2553
2571
|
return {
|
|
2554
2572
|
placement: v,
|
|
2555
|
-
left: Math.round(Math.min(Math.max(
|
|
2556
|
-
top: Math.round(Math.min(Math.max(
|
|
2573
|
+
left: Math.round(Math.min(Math.max(g.left, 0), o - a)),
|
|
2574
|
+
top: Math.round(Math.min(Math.max(g.top, 0), l - s))
|
|
2557
2575
|
};
|
|
2558
2576
|
}
|
|
2559
|
-
function
|
|
2560
|
-
return
|
|
2577
|
+
function t2(i) {
|
|
2578
|
+
return i.split("-")[0] || "top";
|
|
2561
2579
|
}
|
|
2562
|
-
function
|
|
2563
|
-
let
|
|
2564
|
-
for (let
|
|
2565
|
-
const n = t[
|
|
2566
|
-
a > e != c > e &&
|
|
2580
|
+
function U4(i, e, t) {
|
|
2581
|
+
let C = !1, o = t.length - 1;
|
|
2582
|
+
for (let l = 0; l < t.length; l++) {
|
|
2583
|
+
const n = t[l][0], a = t[l][1], s = t[o][0], c = t[o][1];
|
|
2584
|
+
a > e != c > e && i < (s - n) * (e - a) / (c - a) + n && (C = !C), o = l;
|
|
2567
2585
|
}
|
|
2568
|
-
return
|
|
2586
|
+
return C;
|
|
2569
2587
|
}
|
|
2570
|
-
const
|
|
2588
|
+
const N2 = class N2 extends u {
|
|
2571
2589
|
constructor() {
|
|
2572
2590
|
super(...arguments), this.disabled = !1, this.placement = "top-center", this.triggerElement = null, this.contentPopupElement = null, this.containingBlockLeft = 0, this.containingBlockTop = 0, this.rafId = 0, this.prevTriggerTop = NaN, this.prevTriggerLeft = NaN, this.isVisible = !1;
|
|
2573
2591
|
}
|
|
2574
2592
|
connectedCallback() {
|
|
2575
|
-
super.connectedCallback(), this.addEventListener(
|
|
2593
|
+
super.connectedCallback(), this.addEventListener(I5, (e) => {
|
|
2576
2594
|
e.stopPropagation(), this.triggerElement = e.detail, this.maybeStartPositionLoop();
|
|
2577
|
-
}), this.addEventListener(
|
|
2595
|
+
}), this.addEventListener(T5, (e) => {
|
|
2578
2596
|
e.stopPropagation(), this.contentPopupElement = e.detail, this.computeContainingBlockOffset(this.contentPopupElement), this.maybeStartPositionLoop();
|
|
2579
|
-
}), this.addEventListener(
|
|
2597
|
+
}), this.addEventListener(N5, (e) => {
|
|
2580
2598
|
e.stopPropagation(), this.stopPositionLoop(), this.contentPopupElement = null;
|
|
2581
|
-
}), this.addEventListener(
|
|
2599
|
+
}), this.addEventListener(O5, (e) => {
|
|
2582
2600
|
e.stopPropagation(), !this.disabled && (this.isVisible = !0, this.broadcastVisibilityChanged(`show:${this.placement}`));
|
|
2583
|
-
}), this.addEventListener(
|
|
2601
|
+
}), this.addEventListener(f2, (e) => {
|
|
2584
2602
|
e.stopPropagation(), this.isVisible = !1, this.stopPositionLoop(), this.broadcastVisibilityChanged("hide");
|
|
2585
2603
|
});
|
|
2586
2604
|
}
|
|
@@ -2595,77 +2613,77 @@ const E2 = class E2 extends p {
|
|
|
2595
2613
|
}
|
|
2596
2614
|
startPositionLoop() {
|
|
2597
2615
|
this.stopPositionLoop(), this.prevTriggerTop = NaN, this.prevTriggerLeft = NaN;
|
|
2598
|
-
const e = this.triggerElement, t = this.contentPopupElement,
|
|
2599
|
-
const
|
|
2600
|
-
(
|
|
2616
|
+
const e = this.triggerElement, t = this.contentPopupElement, C = this.placement, o = () => {
|
|
2617
|
+
const l = e.getBoundingClientRect();
|
|
2618
|
+
(l.top !== this.prevTriggerTop || l.left !== this.prevTriggerLeft) && (this.prevTriggerTop = l.top, this.prevTriggerLeft = l.left, this.positionPopup(t, e, C)), this.rafId = requestAnimationFrame(o);
|
|
2601
2619
|
};
|
|
2602
|
-
this.rafId = requestAnimationFrame(
|
|
2620
|
+
this.rafId = requestAnimationFrame(o);
|
|
2603
2621
|
}
|
|
2604
2622
|
stopPositionLoop() {
|
|
2605
2623
|
this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = 0), this.prevTriggerTop = NaN, this.prevTriggerLeft = NaN;
|
|
2606
2624
|
}
|
|
2607
2625
|
computeContainingBlockOffset(e) {
|
|
2608
|
-
const t = e,
|
|
2626
|
+
const t = e, C = t.style.transform;
|
|
2609
2627
|
t.style.transform = "none";
|
|
2610
|
-
const
|
|
2611
|
-
this.containingBlockLeft =
|
|
2628
|
+
const o = e.getBoundingClientRect();
|
|
2629
|
+
this.containingBlockLeft = o.left, this.containingBlockTop = o.top, t.style.transform = C;
|
|
2612
2630
|
}
|
|
2613
|
-
positionPopup(e, t,
|
|
2614
|
-
const
|
|
2631
|
+
positionPopup(e, t, C) {
|
|
2632
|
+
const o = t.getBoundingClientRect(), l = e.getBoundingClientRect(), n = j4(o, l, C, 8);
|
|
2615
2633
|
if (n) {
|
|
2616
2634
|
const a = e;
|
|
2617
2635
|
a.style.transform = `translate(${n.left - this.containingBlockLeft}px, ${n.top - this.containingBlockTop}px)`;
|
|
2618
|
-
const s =
|
|
2636
|
+
const s = t2(n.placement), c = t2(C);
|
|
2619
2637
|
if (s !== c) {
|
|
2620
|
-
const
|
|
2621
|
-
|
|
2638
|
+
const H = e.querySelector(".tooltip-arrow");
|
|
2639
|
+
H && (H.classList.remove(`tooltip-arrow--${c}`), H.classList.add(`tooltip-arrow--${s}`));
|
|
2622
2640
|
}
|
|
2623
2641
|
}
|
|
2624
2642
|
}
|
|
2625
2643
|
broadcastVisibilityChanged(e) {
|
|
2626
|
-
this.dispatchEvent(new CustomEvent(
|
|
2644
|
+
this.dispatchEvent(new CustomEvent(j5, { detail: e, bubbles: !1, composed: !1 }));
|
|
2627
2645
|
}
|
|
2628
2646
|
render() {
|
|
2629
2647
|
return d`<div class="tooltip-root" part="tooltip"><slot></slot></div>`;
|
|
2630
2648
|
}
|
|
2631
2649
|
};
|
|
2632
|
-
|
|
2650
|
+
N2.styles = h`
|
|
2633
2651
|
:host { display: inline-block; position: relative; max-width: 100%; font-family: var(--font-sans); }
|
|
2634
2652
|
.tooltip-root { display: inline-block; position: relative; max-width: 100%; }
|
|
2635
2653
|
`;
|
|
2636
|
-
let
|
|
2637
|
-
|
|
2654
|
+
let b1 = N2;
|
|
2655
|
+
S5([
|
|
2638
2656
|
r({ type: Boolean })
|
|
2639
|
-
],
|
|
2640
|
-
|
|
2657
|
+
], b1.prototype, "disabled");
|
|
2658
|
+
S5([
|
|
2641
2659
|
r()
|
|
2642
|
-
],
|
|
2643
|
-
const
|
|
2660
|
+
], b1.prototype, "placement");
|
|
2661
|
+
const j2 = class j2 extends u {
|
|
2644
2662
|
firstUpdated() {
|
|
2645
2663
|
requestAnimationFrame(() => {
|
|
2646
|
-
this.dispatchEvent(new CustomEvent(
|
|
2664
|
+
this.dispatchEvent(new CustomEvent(I5, { detail: this, bubbles: !0, composed: !0 }));
|
|
2647
2665
|
}), this.addEventListener("pointerenter", () => {
|
|
2648
|
-
this.dispatchEvent(new CustomEvent(
|
|
2666
|
+
this.dispatchEvent(new CustomEvent(O5, { bubbles: !0, composed: !0 }));
|
|
2649
2667
|
}), this.addEventListener("click", () => {
|
|
2650
|
-
this.dispatchEvent(new CustomEvent(
|
|
2668
|
+
this.dispatchEvent(new CustomEvent(f2, { bubbles: !0, composed: !0 }));
|
|
2651
2669
|
});
|
|
2652
2670
|
}
|
|
2653
2671
|
render() {
|
|
2654
2672
|
return d`<span class="tooltip-trigger" part="tooltip-trigger"><slot></slot></span>`;
|
|
2655
2673
|
}
|
|
2656
2674
|
};
|
|
2657
|
-
|
|
2675
|
+
j2.styles = h`
|
|
2658
2676
|
:host { display: inline-block; max-width: 100%; font-family: var(--font-sans); }
|
|
2659
2677
|
.tooltip-trigger { display: flex; align-items: center; max-width: 100%; }
|
|
2660
2678
|
`;
|
|
2661
|
-
let
|
|
2662
|
-
const
|
|
2679
|
+
let o2 = j2;
|
|
2680
|
+
const U2 = class U2 extends u {
|
|
2663
2681
|
constructor() {
|
|
2664
2682
|
super(...arguments), this.graceArea = null, this.triggerEl = null, this.popupEl = null, this.handlePointerMove = (e) => {
|
|
2665
|
-
var
|
|
2683
|
+
var l, n;
|
|
2666
2684
|
if (!this.graceArea) return;
|
|
2667
|
-
const t = e.target,
|
|
2668
|
-
|
|
2685
|
+
const t = e.target, C = ((l = this.triggerEl) == null ? void 0 : l.contains(t)) ?? !1, o = ((n = this.popupEl) == null ? void 0 : n.contains(t)) ?? !1;
|
|
2686
|
+
C || o ? this.graceArea = null : U4(e.clientX, e.clientY, this.graceArea) || (this.graceArea = null, this.dispatchEvent(new CustomEvent(f2, { bubbles: !0, composed: !0 })));
|
|
2669
2687
|
}, this.handleTriggerLeave = (e) => {
|
|
2670
2688
|
this.triggerEl && this.popupEl && this.createGraceArea(this.triggerEl, this.popupEl, e);
|
|
2671
2689
|
}, this.handleContentLeave = (e) => {
|
|
@@ -2675,22 +2693,22 @@ const B2 = class B2 extends p {
|
|
|
2675
2693
|
connectedCallback() {
|
|
2676
2694
|
super.connectedCallback();
|
|
2677
2695
|
const e = this.closest("anduin-tooltip");
|
|
2678
|
-
e && e.addEventListener(
|
|
2679
|
-
const
|
|
2680
|
-
|
|
2696
|
+
e && e.addEventListener(j5, (t) => {
|
|
2697
|
+
const C = t.detail;
|
|
2698
|
+
C.startsWith("show:") ? this.showPopup(C.slice(5)) : this.hidePopup();
|
|
2681
2699
|
});
|
|
2682
2700
|
}
|
|
2683
2701
|
disconnectedCallback() {
|
|
2684
2702
|
super.disconnectedCallback(), this.hidePopup();
|
|
2685
2703
|
}
|
|
2686
|
-
createGraceArea(e, t,
|
|
2687
|
-
const
|
|
2704
|
+
createGraceArea(e, t, C) {
|
|
2705
|
+
const o = t.getBoundingClientRect(), l = C.clientX, n = C.clientY;
|
|
2688
2706
|
this.graceArea = [
|
|
2689
|
-
[
|
|
2690
|
-
[
|
|
2691
|
-
[
|
|
2692
|
-
[
|
|
2693
|
-
[
|
|
2707
|
+
[l, n],
|
|
2708
|
+
[o.left, o.top],
|
|
2709
|
+
[o.right, o.top],
|
|
2710
|
+
[o.right, o.bottom],
|
|
2711
|
+
[o.left, o.bottom]
|
|
2694
2712
|
];
|
|
2695
2713
|
}
|
|
2696
2714
|
setupGraceAreaListeners(e, t) {
|
|
@@ -2701,29 +2719,29 @@ const B2 = class B2 extends p {
|
|
|
2701
2719
|
}
|
|
2702
2720
|
showPopup(e) {
|
|
2703
2721
|
this.hidePopup();
|
|
2704
|
-
const t =
|
|
2705
|
-
|
|
2706
|
-
const
|
|
2707
|
-
|
|
2708
|
-
const
|
|
2709
|
-
|
|
2722
|
+
const t = t2(e), C = document.createElement("div");
|
|
2723
|
+
C.className = "tooltip-popup", C.setAttribute("role", "tooltip");
|
|
2724
|
+
const o = document.createElement("div");
|
|
2725
|
+
o.className = `tooltip-arrow tooltip-arrow--${t}`;
|
|
2726
|
+
const l = document.createElement("div");
|
|
2727
|
+
l.className = "tooltip-body", l.appendChild(document.createElement("slot")), C.appendChild(o), C.appendChild(l);
|
|
2710
2728
|
const n = this.shadowRoot.querySelector(".tooltip-content-wrapper");
|
|
2711
|
-
n && n.appendChild(
|
|
2729
|
+
n && n.appendChild(C), this.popupEl = C;
|
|
2712
2730
|
const a = this.closest("anduin-tooltip");
|
|
2713
2731
|
if (a) {
|
|
2714
2732
|
const s = a.querySelector("anduin-tooltip-trigger");
|
|
2715
|
-
s && this.setupGraceAreaListeners(s,
|
|
2733
|
+
s && this.setupGraceAreaListeners(s, C);
|
|
2716
2734
|
}
|
|
2717
|
-
this.dispatchEvent(new CustomEvent(
|
|
2735
|
+
this.dispatchEvent(new CustomEvent(T5, { detail: C, bubbles: !0, composed: !0 }));
|
|
2718
2736
|
}
|
|
2719
2737
|
hidePopup() {
|
|
2720
|
-
this.popupEl && (this.popupEl.remove(), this.popupEl = null, this.dispatchEvent(new CustomEvent(
|
|
2738
|
+
this.popupEl && (this.popupEl.remove(), this.popupEl = null, this.dispatchEvent(new CustomEvent(N5, { bubbles: !0, composed: !0 }))), this.cleanupGraceAreaListeners();
|
|
2721
2739
|
}
|
|
2722
2740
|
render() {
|
|
2723
2741
|
return d`<div class="tooltip-content-wrapper"></div>`;
|
|
2724
2742
|
}
|
|
2725
2743
|
};
|
|
2726
|
-
|
|
2744
|
+
U2.styles = h`
|
|
2727
2745
|
:host {
|
|
2728
2746
|
display: contents;
|
|
2729
2747
|
--tooltip-bg: var(--anduin-tooltip-content-background, var(--color-gray-9));
|
|
@@ -2747,16 +2765,16 @@ B2.styles = H`
|
|
|
2747
2765
|
.tooltip-arrow--left { right: -4px; top: 50%; transform: translateY(-50%); border-left-color: var(--tooltip-bg); border-right: none; }
|
|
2748
2766
|
.tooltip-arrow--right { left: -4px; top: 50%; transform: translateY(-50%); border-right-color: var(--tooltip-bg); border-left: none; }
|
|
2749
2767
|
`;
|
|
2750
|
-
let
|
|
2751
|
-
customElements.get("anduin-tooltip") || customElements.define("anduin-tooltip",
|
|
2752
|
-
customElements.get("anduin-tooltip-trigger") || customElements.define("anduin-tooltip-trigger",
|
|
2753
|
-
customElements.get("anduin-tooltip-content") || customElements.define("anduin-tooltip-content",
|
|
2754
|
-
var
|
|
2755
|
-
for (var
|
|
2756
|
-
(n = l
|
|
2757
|
-
return
|
|
2768
|
+
let C2 = U2;
|
|
2769
|
+
customElements.get("anduin-tooltip") || customElements.define("anduin-tooltip", b1);
|
|
2770
|
+
customElements.get("anduin-tooltip-trigger") || customElements.define("anduin-tooltip-trigger", o2);
|
|
2771
|
+
customElements.get("anduin-tooltip-content") || customElements.define("anduin-tooltip-content", C2);
|
|
2772
|
+
var q4 = Object.defineProperty, G4 = (i, e, t, C) => {
|
|
2773
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
2774
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
2775
|
+
return o && q4(e, t, o), o;
|
|
2758
2776
|
};
|
|
2759
|
-
const
|
|
2777
|
+
const Y4 = "anduin-well-close:click", q2 = class q2 extends u {
|
|
2760
2778
|
constructor() {
|
|
2761
2779
|
super(...arguments), this.variant = "gray";
|
|
2762
2780
|
}
|
|
@@ -2775,7 +2793,7 @@ const I4 = "anduin-well-close:click", F2 = class F2 extends p {
|
|
|
2775
2793
|
`;
|
|
2776
2794
|
}
|
|
2777
2795
|
};
|
|
2778
|
-
|
|
2796
|
+
q2.styles = h`
|
|
2779
2797
|
:host {
|
|
2780
2798
|
display: block;
|
|
2781
2799
|
font-family: var(--font-sans);
|
|
@@ -2840,14 +2858,14 @@ F2.styles = H`
|
|
|
2840
2858
|
color: var(--color-warning-4);
|
|
2841
2859
|
}
|
|
2842
2860
|
`;
|
|
2843
|
-
let
|
|
2844
|
-
|
|
2861
|
+
let O1 = q2;
|
|
2862
|
+
G4([
|
|
2845
2863
|
r()
|
|
2846
|
-
],
|
|
2847
|
-
const
|
|
2864
|
+
], O1.prototype, "variant");
|
|
2865
|
+
const G2 = class G2 extends u {
|
|
2848
2866
|
onClick() {
|
|
2849
2867
|
this.dispatchEvent(
|
|
2850
|
-
new CustomEvent(
|
|
2868
|
+
new CustomEvent(Y4, { bubbles: !0, composed: !0 })
|
|
2851
2869
|
);
|
|
2852
2870
|
}
|
|
2853
2871
|
render() {
|
|
@@ -2862,7 +2880,7 @@ const z2 = class z2 extends p {
|
|
|
2862
2880
|
`;
|
|
2863
2881
|
}
|
|
2864
2882
|
};
|
|
2865
|
-
|
|
2883
|
+
G2.styles = h`
|
|
2866
2884
|
:host {
|
|
2867
2885
|
display: inline-block;
|
|
2868
2886
|
font-family: var(--font-sans);
|
|
@@ -2887,15 +2905,15 @@ z2.styles = H`
|
|
|
2887
2905
|
background-color: var(--color-gray-3);
|
|
2888
2906
|
}
|
|
2889
2907
|
`;
|
|
2890
|
-
let
|
|
2891
|
-
customElements.get("anduin-well") || customElements.define("anduin-well",
|
|
2892
|
-
customElements.get("anduin-well-close") || customElements.define("anduin-well-close",
|
|
2893
|
-
var
|
|
2894
|
-
for (var
|
|
2895
|
-
(n = l
|
|
2896
|
-
return
|
|
2908
|
+
let i2 = G2;
|
|
2909
|
+
customElements.get("anduin-well") || customElements.define("anduin-well", O1);
|
|
2910
|
+
customElements.get("anduin-well-close") || customElements.define("anduin-well-close", i2);
|
|
2911
|
+
var W4 = Object.defineProperty, i1 = (i, e, t, C) => {
|
|
2912
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
2913
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
2914
|
+
return o && W4(e, t, o), o;
|
|
2897
2915
|
};
|
|
2898
|
-
const
|
|
2916
|
+
const l2 = "anduin-popover:close", Y2 = class Y2 extends u {
|
|
2899
2917
|
constructor() {
|
|
2900
2918
|
super(...arguments), this.open = !1, this.placement = "bottom-start", this._visible = !1, this._closing = !1, this._closeTransitionEndHandler = null, this._onOutsideClick = (e) => {
|
|
2901
2919
|
var t;
|
|
@@ -2910,10 +2928,10 @@ const W1 = "anduin-popover:close", P2 = class P2 extends p {
|
|
|
2910
2928
|
this.open = !this.open;
|
|
2911
2929
|
}
|
|
2912
2930
|
connectedCallback() {
|
|
2913
|
-
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), window.addEventListener("scroll", this._onScrollOrResize, { passive: !0, capture: !0 }), window.addEventListener("resize", this._onScrollOrResize), this.addEventListener(
|
|
2931
|
+
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), window.addEventListener("scroll", this._onScrollOrResize, { passive: !0, capture: !0 }), window.addEventListener("resize", this._onScrollOrResize), this.addEventListener(l2, this._onPopoverClose);
|
|
2914
2932
|
}
|
|
2915
2933
|
disconnectedCallback() {
|
|
2916
|
-
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), window.removeEventListener("scroll", this._onScrollOrResize, { capture: !0 }), window.removeEventListener("resize", this._onScrollOrResize), this.removeEventListener(
|
|
2934
|
+
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), window.removeEventListener("scroll", this._onScrollOrResize, { capture: !0 }), window.removeEventListener("resize", this._onScrollOrResize), this.removeEventListener(l2, this._onPopoverClose);
|
|
2917
2935
|
}
|
|
2918
2936
|
updated(e) {
|
|
2919
2937
|
e.has("open") && (this.open ? (this._cancelCloseAnimation(), this._closing = !1, this._visible = !0, requestAnimationFrame(() => this._updatePosition())) : this._startCloseAnimation());
|
|
@@ -2925,8 +2943,8 @@ const W1 = "anduin-popover:close", P2 = class P2 extends p {
|
|
|
2925
2943
|
if (!this._visible) return;
|
|
2926
2944
|
this._closing = !0;
|
|
2927
2945
|
const e = (t) => {
|
|
2928
|
-
var
|
|
2929
|
-
t.propertyName === "opacity" && ((
|
|
2946
|
+
var C;
|
|
2947
|
+
t.propertyName === "opacity" && ((C = this._panelEl) == null || C.removeEventListener("transitionend", e), this._closeTransitionEndHandler = null, this._closing = !1, this._visible = !1);
|
|
2930
2948
|
};
|
|
2931
2949
|
this._closeTransitionEndHandler = e, requestAnimationFrame(() => {
|
|
2932
2950
|
var t;
|
|
@@ -2936,33 +2954,16 @@ const W1 = "anduin-popover:close", P2 = class P2 extends p {
|
|
|
2936
2954
|
_updatePosition() {
|
|
2937
2955
|
const e = this._triggerEl, t = this._panelEl;
|
|
2938
2956
|
if (!e || !t) return;
|
|
2939
|
-
const
|
|
2957
|
+
const C = e.getBoundingClientRect(), o = t.style.transform;
|
|
2940
2958
|
t.style.transform = "none";
|
|
2941
|
-
const
|
|
2942
|
-
t.style.transform =
|
|
2943
|
-
const n = t.getBoundingClientRect(), a = 4;
|
|
2944
|
-
let
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
case "bottom-end":
|
|
2950
|
-
s = o.right - n.width, c = o.bottom + a, h = "bottom";
|
|
2951
|
-
break;
|
|
2952
|
-
case "bottom":
|
|
2953
|
-
s = o.left + o.width / 2 - n.width / 2, c = o.bottom + a, h = "bottom";
|
|
2954
|
-
break;
|
|
2955
|
-
case "top-start":
|
|
2956
|
-
s = o.left, c = o.top - n.height - a, h = "top";
|
|
2957
|
-
break;
|
|
2958
|
-
case "top-end":
|
|
2959
|
-
s = o.right - n.width, c = o.top - n.height - a, h = "top";
|
|
2960
|
-
break;
|
|
2961
|
-
case "top":
|
|
2962
|
-
s = o.left + o.width / 2 - n.width / 2, c = o.top - n.height - a, h = "top";
|
|
2963
|
-
break;
|
|
2964
|
-
}
|
|
2965
|
-
t.style.transform = `translate(${Math.round(s - i.left)}px, ${Math.round(c - i.top)}px)`, t.dataset.side = h;
|
|
2959
|
+
const l = t.getBoundingClientRect();
|
|
2960
|
+
t.style.transform = o;
|
|
2961
|
+
const n = t.getBoundingClientRect(), a = 4, s = window.innerWidth, c = window.innerHeight, H = 8;
|
|
2962
|
+
let v = 0, g = 0, f = "bottom";
|
|
2963
|
+
const M = !this.placement.startsWith("top"), x1 = c - C.bottom - a, R1 = C.top - a, l1 = x1 >= n.height, w1 = R1 >= n.height, k1 = M ? l1 || x1 >= R1 : !w1 && l1;
|
|
2964
|
+
f = k1 ? "bottom" : "top", g = k1 ? C.bottom + a : C.top - n.height - a;
|
|
2965
|
+
const $1 = this.placement.endsWith("end") ? "end" : this.placement.endsWith("start") ? "start" : "center";
|
|
2966
|
+
$1 === "start" ? v = C.left : $1 === "end" ? v = C.right - n.width : v = C.left + C.width / 2 - n.width / 2, v = Math.max(H, Math.min(v, s - n.width - H)), g = Math.max(H, Math.min(g, c - n.height - H)), t.style.transform = `translate(${Math.round(v - l.left)}px, ${Math.round(g - l.top)}px)`, t.dataset.side = f;
|
|
2966
2967
|
}
|
|
2967
2968
|
render() {
|
|
2968
2969
|
return d`
|
|
@@ -2977,7 +2978,7 @@ const W1 = "anduin-popover:close", P2 = class P2 extends p {
|
|
|
2977
2978
|
`;
|
|
2978
2979
|
}
|
|
2979
2980
|
};
|
|
2980
|
-
|
|
2981
|
+
Y2.styles = h`
|
|
2981
2982
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
2982
2983
|
|
|
2983
2984
|
.popover__trigger { display: inline-block; }
|
|
@@ -3024,43 +3025,43 @@ P2.styles = H`
|
|
|
3024
3025
|
transform: scale(1) translateY(0);
|
|
3025
3026
|
}
|
|
3026
3027
|
`;
|
|
3027
|
-
let k =
|
|
3028
|
-
|
|
3028
|
+
let k = Y2;
|
|
3029
|
+
i1([
|
|
3029
3030
|
r({ type: Boolean, reflect: !0 })
|
|
3030
3031
|
], k.prototype, "open");
|
|
3031
|
-
|
|
3032
|
+
i1([
|
|
3032
3033
|
r()
|
|
3033
3034
|
], k.prototype, "placement");
|
|
3034
|
-
|
|
3035
|
+
i1([
|
|
3035
3036
|
x()
|
|
3036
3037
|
], k.prototype, "_visible");
|
|
3037
|
-
|
|
3038
|
+
i1([
|
|
3038
3039
|
x()
|
|
3039
3040
|
], k.prototype, "_closing");
|
|
3040
|
-
|
|
3041
|
-
|
|
3041
|
+
i1([
|
|
3042
|
+
D(".popover__trigger")
|
|
3042
3043
|
], k.prototype, "_triggerEl");
|
|
3043
|
-
|
|
3044
|
-
|
|
3044
|
+
i1([
|
|
3045
|
+
D(".popover__panel")
|
|
3045
3046
|
], k.prototype, "_panelEl");
|
|
3046
3047
|
customElements.get("anduin-popover") || customElements.define("anduin-popover", k);
|
|
3047
|
-
const
|
|
3048
|
+
const W2 = class W2 extends u {
|
|
3048
3049
|
_onClick() {
|
|
3049
|
-
this.dispatchEvent(new CustomEvent(
|
|
3050
|
+
this.dispatchEvent(new CustomEvent(l2, { bubbles: !0, composed: !0 }));
|
|
3050
3051
|
}
|
|
3051
3052
|
render() {
|
|
3052
3053
|
return d`<span @click=${this._onClick}><slot></slot></span>`;
|
|
3053
3054
|
}
|
|
3054
3055
|
};
|
|
3055
|
-
|
|
3056
|
-
let
|
|
3057
|
-
customElements.get("anduin-popover-close") || customElements.define("anduin-popover-close",
|
|
3058
|
-
var
|
|
3059
|
-
for (var
|
|
3060
|
-
(n = l
|
|
3061
|
-
return
|
|
3056
|
+
W2.styles = h`:host { display: contents; }`;
|
|
3057
|
+
let n2 = W2;
|
|
3058
|
+
customElements.get("anduin-popover-close") || customElements.define("anduin-popover-close", n2);
|
|
3059
|
+
var X4 = Object.defineProperty, G = (i, e, t, C) => {
|
|
3060
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
3061
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
3062
|
+
return o && X4(e, t, o), o;
|
|
3062
3063
|
};
|
|
3063
|
-
const
|
|
3064
|
+
const r2 = "anduin-menu-item:click", X2 = class X2 extends u {
|
|
3064
3065
|
constructor() {
|
|
3065
3066
|
super(...arguments), this.open = !1, this.placement = "bottom-start", this._onOutsideClick = (e) => {
|
|
3066
3067
|
var t;
|
|
@@ -3075,10 +3076,10 @@ const K1 = "anduin-menu-item:click", D2 = class D2 extends p {
|
|
|
3075
3076
|
this.open = !this.open;
|
|
3076
3077
|
}
|
|
3077
3078
|
connectedCallback() {
|
|
3078
|
-
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), this.addEventListener(
|
|
3079
|
+
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), this.addEventListener(r2, this._onItemClick), window.addEventListener("scroll", this._onScrollOrResize, { passive: !0, capture: !0 }), window.addEventListener("resize", this._onScrollOrResize);
|
|
3079
3080
|
}
|
|
3080
3081
|
disconnectedCallback() {
|
|
3081
|
-
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), this.removeEventListener(
|
|
3082
|
+
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), this.removeEventListener(r2, this._onItemClick), window.removeEventListener("scroll", this._onScrollOrResize, { capture: !0 }), window.removeEventListener("resize", this._onScrollOrResize);
|
|
3082
3083
|
}
|
|
3083
3084
|
updated(e) {
|
|
3084
3085
|
e.has("open") && this.open && requestAnimationFrame(() => this._updatePosition());
|
|
@@ -3086,33 +3087,33 @@ const K1 = "anduin-menu-item:click", D2 = class D2 extends p {
|
|
|
3086
3087
|
_updatePosition() {
|
|
3087
3088
|
const e = this._triggerEl, t = this._panelEl;
|
|
3088
3089
|
if (!e || !t) return;
|
|
3089
|
-
const
|
|
3090
|
+
const C = e.getBoundingClientRect(), o = t.style.transform;
|
|
3090
3091
|
t.style.transform = "none";
|
|
3091
|
-
const
|
|
3092
|
-
t.style.transform =
|
|
3092
|
+
const l = t.getBoundingClientRect();
|
|
3093
|
+
t.style.transform = o;
|
|
3093
3094
|
const n = t.getBoundingClientRect(), a = 4;
|
|
3094
|
-
let s = 0, c = 0,
|
|
3095
|
+
let s = 0, c = 0, H = "bottom";
|
|
3095
3096
|
switch (this.placement) {
|
|
3096
3097
|
case "bottom-start":
|
|
3097
|
-
s =
|
|
3098
|
+
s = C.left, c = C.bottom + a, H = "bottom";
|
|
3098
3099
|
break;
|
|
3099
3100
|
case "bottom-end":
|
|
3100
|
-
s =
|
|
3101
|
+
s = C.right - n.width, c = C.bottom + a, H = "bottom";
|
|
3101
3102
|
break;
|
|
3102
3103
|
case "bottom":
|
|
3103
|
-
s =
|
|
3104
|
+
s = C.left + C.width / 2 - n.width / 2, c = C.bottom + a, H = "bottom";
|
|
3104
3105
|
break;
|
|
3105
3106
|
case "top-start":
|
|
3106
|
-
s =
|
|
3107
|
+
s = C.left, c = C.top - n.height - a, H = "top";
|
|
3107
3108
|
break;
|
|
3108
3109
|
case "top-end":
|
|
3109
|
-
s =
|
|
3110
|
+
s = C.right - n.width, c = C.top - n.height - a, H = "top";
|
|
3110
3111
|
break;
|
|
3111
3112
|
case "top":
|
|
3112
|
-
s =
|
|
3113
|
+
s = C.left + C.width / 2 - n.width / 2, c = C.top - n.height - a, H = "top";
|
|
3113
3114
|
break;
|
|
3114
3115
|
}
|
|
3115
|
-
t.style.transform = `translate(${Math.round(s -
|
|
3116
|
+
t.style.transform = `translate(${Math.round(s - l.left)}px, ${Math.round(c - l.top)}px)`, t.dataset.side = H;
|
|
3116
3117
|
}
|
|
3117
3118
|
render() {
|
|
3118
3119
|
return d`
|
|
@@ -3127,7 +3128,7 @@ const K1 = "anduin-menu-item:click", D2 = class D2 extends p {
|
|
|
3127
3128
|
`;
|
|
3128
3129
|
}
|
|
3129
3130
|
};
|
|
3130
|
-
|
|
3131
|
+
X2.styles = h`
|
|
3131
3132
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
3132
3133
|
|
|
3133
3134
|
.menu__trigger { display: inline-block; }
|
|
@@ -3170,25 +3171,25 @@ D2.styles = H`
|
|
|
3170
3171
|
transform: scale(1) translateY(0);
|
|
3171
3172
|
}
|
|
3172
3173
|
`;
|
|
3173
|
-
let
|
|
3174
|
-
|
|
3174
|
+
let q = X2;
|
|
3175
|
+
G([
|
|
3175
3176
|
r({ type: Boolean, reflect: !0 })
|
|
3176
|
-
],
|
|
3177
|
-
|
|
3177
|
+
], q.prototype, "open");
|
|
3178
|
+
G([
|
|
3178
3179
|
r()
|
|
3179
|
-
],
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
],
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
],
|
|
3186
|
-
const
|
|
3180
|
+
], q.prototype, "placement");
|
|
3181
|
+
G([
|
|
3182
|
+
D(".menu__trigger")
|
|
3183
|
+
], q.prototype, "_triggerEl");
|
|
3184
|
+
G([
|
|
3185
|
+
D(".menu__panel")
|
|
3186
|
+
], q.prototype, "_panelEl");
|
|
3187
|
+
const K2 = class K2 extends u {
|
|
3187
3188
|
constructor() {
|
|
3188
3189
|
super(...arguments), this.icon = "", this.variant = "default", this.disabled = !1;
|
|
3189
3190
|
}
|
|
3190
3191
|
_onClick() {
|
|
3191
|
-
this.dispatchEvent(new CustomEvent(
|
|
3192
|
+
this.dispatchEvent(new CustomEvent(r2, { bubbles: !0, composed: !0 }));
|
|
3192
3193
|
}
|
|
3193
3194
|
render() {
|
|
3194
3195
|
return d`
|
|
@@ -3199,13 +3200,13 @@ const O2 = class O2 extends p {
|
|
|
3199
3200
|
part="menu-item"
|
|
3200
3201
|
@click=${this._onClick}
|
|
3201
3202
|
>
|
|
3202
|
-
${this.icon ? d`<anduin-icon name="${this.icon}" size="16"></anduin-icon>` :
|
|
3203
|
+
${this.icon ? d`<anduin-icon name="${this.icon}" size="16"></anduin-icon>` : p}
|
|
3203
3204
|
<span class="menu-item__label"><slot></slot></span>
|
|
3204
3205
|
</button>
|
|
3205
3206
|
`;
|
|
3206
3207
|
}
|
|
3207
3208
|
};
|
|
3208
|
-
|
|
3209
|
+
K2.styles = h`
|
|
3209
3210
|
:host { display: block; width: 100%; font-family: var(--font-sans); }
|
|
3210
3211
|
.menu-item {
|
|
3211
3212
|
display: flex;
|
|
@@ -3235,63 +3236,54 @@ O2.styles = H`
|
|
|
3235
3236
|
anduin-icon { color: var(--color-gray-7); }
|
|
3236
3237
|
.menu-item--danger anduin-icon { color: var(--color-danger-4); }
|
|
3237
3238
|
`;
|
|
3238
|
-
let
|
|
3239
|
-
|
|
3239
|
+
let t1 = K2;
|
|
3240
|
+
G([
|
|
3240
3241
|
r()
|
|
3241
|
-
],
|
|
3242
|
-
|
|
3242
|
+
], t1.prototype, "icon");
|
|
3243
|
+
G([
|
|
3243
3244
|
r()
|
|
3244
|
-
],
|
|
3245
|
-
|
|
3245
|
+
], t1.prototype, "variant");
|
|
3246
|
+
G([
|
|
3246
3247
|
r({ type: Boolean })
|
|
3247
|
-
],
|
|
3248
|
-
customElements.get("anduin-menu") || customElements.define("anduin-menu",
|
|
3249
|
-
customElements.get("anduin-menu-item") || customElements.define("anduin-menu-item",
|
|
3250
|
-
var
|
|
3251
|
-
for (var
|
|
3252
|
-
(n = l
|
|
3253
|
-
return
|
|
3248
|
+
], t1.prototype, "disabled");
|
|
3249
|
+
customElements.get("anduin-menu") || customElements.define("anduin-menu", q);
|
|
3250
|
+
customElements.get("anduin-menu-item") || customElements.define("anduin-menu-item", t1);
|
|
3251
|
+
var K4 = Object.defineProperty, Y = (i, e, t, C) => {
|
|
3252
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
3253
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
3254
|
+
return o && K4(e, t, o), o;
|
|
3254
3255
|
};
|
|
3255
|
-
const
|
|
3256
|
-
var
|
|
3257
|
-
const
|
|
3256
|
+
const r1 = "anduin-close", G1 = 300, Y1 = 200, L5 = 250;
|
|
3257
|
+
var F;
|
|
3258
|
+
const O = (F = class extends u {
|
|
3258
3259
|
constructor() {
|
|
3259
3260
|
super(...arguments), this.open = !1, this.heading = "", this.hideHeader = !1, this.hideFooter = !1, this.maxWidth = "480", this.fullscreen = !1, this._leaving = !1, this.onAnduinClose = (e) => {
|
|
3260
3261
|
e.target !== this && e.stopPropagation();
|
|
3261
3262
|
};
|
|
3262
3263
|
}
|
|
3263
3264
|
updated(e) {
|
|
3264
|
-
var t;
|
|
3265
3265
|
if (e.has("maxWidth")) {
|
|
3266
|
-
const
|
|
3266
|
+
const t = this.maxWidth, C = F._PRESETS.has(t) ? `${t}px` : t;
|
|
3267
3267
|
this.style.setProperty("--_modal-width", C);
|
|
3268
3268
|
}
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
else if (this.classList.contains("is-shown")) {
|
|
3273
|
-
this._leaving = !0;
|
|
3274
|
-
const o = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".overlay");
|
|
3275
|
-
o == null || o.addEventListener("animationend", () => {
|
|
3276
|
-
this._leaving = !1, this.classList.remove("is-shown");
|
|
3277
|
-
}, { once: !0 });
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3269
|
+
e.has("open") && (this.open ? (this._leaving = !1, this.classList.add("is-shown")) : this.classList.contains("is-shown") && (this._leaving = !0, setTimeout(() => {
|
|
3270
|
+
this._leaving = !1, this.classList.remove("is-shown");
|
|
3271
|
+
}, Math.max(Y1, L5))));
|
|
3280
3272
|
}
|
|
3281
3273
|
dispatch(e) {
|
|
3282
3274
|
this.dispatchEvent(new CustomEvent(e, { bubbles: !0, composed: !0 }));
|
|
3283
3275
|
}
|
|
3284
3276
|
onOverlayClick() {
|
|
3285
|
-
this.dispatch(
|
|
3277
|
+
this.dispatch(r1);
|
|
3286
3278
|
}
|
|
3287
3279
|
onClose() {
|
|
3288
|
-
this.dispatch(
|
|
3280
|
+
this.dispatch(r1);
|
|
3289
3281
|
}
|
|
3290
3282
|
connectedCallback() {
|
|
3291
|
-
super.connectedCallback(), this.addEventListener(
|
|
3283
|
+
super.connectedCallback(), this.addEventListener(r1, this.onAnduinClose);
|
|
3292
3284
|
}
|
|
3293
3285
|
disconnectedCallback() {
|
|
3294
|
-
super.disconnectedCallback(), this.removeEventListener(
|
|
3286
|
+
super.disconnectedCallback(), this.removeEventListener(r1, this.onAnduinClose);
|
|
3295
3287
|
}
|
|
3296
3288
|
render() {
|
|
3297
3289
|
const e = this._leaving, t = this.fullscreen;
|
|
@@ -3299,11 +3291,11 @@ const S = (A = class extends p {
|
|
|
3299
3291
|
<div class=${`overlay${e ? " is-leaving" : ""}`} @click=${this.onOverlayClick}></div>
|
|
3300
3292
|
<div class=${`modal-wrapper${t ? " modal-wrapper--fullscreen" : ""}`}>
|
|
3301
3293
|
<div class=${`modal${t ? " modal--fullscreen" : ""}${e ? " is-leaving" : ""}`} role="dialog" aria-modal="true" aria-labelledby="modal-title">
|
|
3302
|
-
${this.hideHeader ?
|
|
3294
|
+
${this.hideHeader ? p : d`
|
|
3303
3295
|
<div class="header">
|
|
3304
3296
|
<div class="header-slot">
|
|
3305
3297
|
<slot name="header">
|
|
3306
|
-
${this.heading ? d`<p id="modal-title" class="title">${this.heading}</p>` :
|
|
3298
|
+
${this.heading ? d`<p id="modal-title" class="title">${this.heading}</p>` : p}
|
|
3307
3299
|
</slot>
|
|
3308
3300
|
</div>
|
|
3309
3301
|
<span class="header-sep"></span>
|
|
@@ -3319,12 +3311,12 @@ const S = (A = class extends p {
|
|
|
3319
3311
|
<div class="body">
|
|
3320
3312
|
<slot></slot>
|
|
3321
3313
|
</div>
|
|
3322
|
-
${this.hideFooter ?
|
|
3314
|
+
${this.hideFooter ? p : d`<div class="footer"><slot name="footer"></slot></div>`}
|
|
3323
3315
|
</div>
|
|
3324
3316
|
</div>
|
|
3325
3317
|
`;
|
|
3326
3318
|
}
|
|
3327
|
-
},
|
|
3319
|
+
}, F.styles = h`
|
|
3328
3320
|
:host {
|
|
3329
3321
|
display: none;
|
|
3330
3322
|
font-family: var(--font-sans);
|
|
@@ -3364,10 +3356,10 @@ const S = (A = class extends p {
|
|
|
3364
3356
|
inset: 0;
|
|
3365
3357
|
background: rgba(50, 60, 77, 0.6);
|
|
3366
3358
|
cursor: default;
|
|
3367
|
-
animation: overlayIn ${
|
|
3359
|
+
animation: overlayIn ${G1}ms cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
3368
3360
|
}
|
|
3369
3361
|
.overlay.is-leaving {
|
|
3370
|
-
animation: overlayOut ${
|
|
3362
|
+
animation: overlayOut ${L5}ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
|
|
3371
3363
|
}
|
|
3372
3364
|
.modal-wrapper {
|
|
3373
3365
|
position: absolute;
|
|
@@ -3390,10 +3382,10 @@ const S = (A = class extends p {
|
|
|
3390
3382
|
max-height: calc(100vh - 64px);
|
|
3391
3383
|
box-shadow: 0 8px 24px 0 rgba(29, 41, 57, 0.12), 0 2px 8px 0 rgba(29, 41, 57, 0.08);
|
|
3392
3384
|
flex-shrink: 0;
|
|
3393
|
-
animation: modalIn ${
|
|
3385
|
+
animation: modalIn ${G1}ms cubic-bezier(0.05, 0.7, 0.1, 1) forwards;
|
|
3394
3386
|
}
|
|
3395
3387
|
.modal.is-leaving {
|
|
3396
|
-
animation: modalOut ${
|
|
3388
|
+
animation: modalOut ${Y1}ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
|
|
3397
3389
|
}
|
|
3398
3390
|
.modal-wrapper--fullscreen {
|
|
3399
3391
|
padding: 0;
|
|
@@ -3422,10 +3414,10 @@ const S = (A = class extends p {
|
|
|
3422
3414
|
max-height: 100%;
|
|
3423
3415
|
height: 100%;
|
|
3424
3416
|
box-shadow: none;
|
|
3425
|
-
animation: modalFullscreenIn ${
|
|
3417
|
+
animation: modalFullscreenIn ${G1}ms cubic-bezier(0.05, 0.7, 0.1, 1) forwards;
|
|
3426
3418
|
}
|
|
3427
3419
|
.modal--fullscreen.is-leaving {
|
|
3428
|
-
animation: modalFullscreenOut ${
|
|
3420
|
+
animation: modalFullscreenOut ${Y1}ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
|
|
3429
3421
|
}
|
|
3430
3422
|
.header {
|
|
3431
3423
|
flex-shrink: 0;
|
|
@@ -3463,34 +3455,34 @@ const S = (A = class extends p {
|
|
|
3463
3455
|
padding: 16px 24px;
|
|
3464
3456
|
border-top: 1px solid var(--color-gray-3, #e4e7ec);
|
|
3465
3457
|
}
|
|
3466
|
-
`,
|
|
3467
|
-
|
|
3458
|
+
`, F._PRESETS = /* @__PURE__ */ new Set(["480", "600", "720", "960", "1160"]), F);
|
|
3459
|
+
Y([
|
|
3468
3460
|
r({ type: Boolean, reflect: !0 })
|
|
3469
|
-
],
|
|
3470
|
-
|
|
3461
|
+
], O.prototype, "open");
|
|
3462
|
+
Y([
|
|
3471
3463
|
r()
|
|
3472
|
-
],
|
|
3473
|
-
|
|
3464
|
+
], O.prototype, "heading");
|
|
3465
|
+
Y([
|
|
3474
3466
|
r({ type: Boolean, attribute: "hide-header" })
|
|
3475
|
-
],
|
|
3476
|
-
|
|
3467
|
+
], O.prototype, "hideHeader");
|
|
3468
|
+
Y([
|
|
3477
3469
|
r({ type: Boolean, attribute: "hide-footer" })
|
|
3478
|
-
],
|
|
3479
|
-
|
|
3470
|
+
], O.prototype, "hideFooter");
|
|
3471
|
+
Y([
|
|
3480
3472
|
r({ attribute: "max-width" })
|
|
3481
|
-
],
|
|
3482
|
-
|
|
3473
|
+
], O.prototype, "maxWidth");
|
|
3474
|
+
Y([
|
|
3483
3475
|
r({ type: Boolean })
|
|
3484
|
-
],
|
|
3485
|
-
|
|
3476
|
+
], O.prototype, "fullscreen");
|
|
3477
|
+
Y([
|
|
3486
3478
|
x()
|
|
3487
|
-
],
|
|
3488
|
-
let
|
|
3489
|
-
customElements.get("anduin-modal") || customElements.define("anduin-modal",
|
|
3490
|
-
class
|
|
3479
|
+
], O.prototype, "_leaving");
|
|
3480
|
+
let J4 = O;
|
|
3481
|
+
customElements.get("anduin-modal") || customElements.define("anduin-modal", J4);
|
|
3482
|
+
class Q4 extends HTMLElement {
|
|
3491
3483
|
constructor() {
|
|
3492
3484
|
super(...arguments), this._onClick = () => {
|
|
3493
|
-
this.dispatchEvent(new CustomEvent(
|
|
3485
|
+
this.dispatchEvent(new CustomEvent(r1, { bubbles: !0, composed: !0 }));
|
|
3494
3486
|
};
|
|
3495
3487
|
}
|
|
3496
3488
|
connectedCallback() {
|
|
@@ -3500,13 +3492,212 @@ class G4 extends HTMLElement {
|
|
|
3500
3492
|
this.removeEventListener("click", this._onClick);
|
|
3501
3493
|
}
|
|
3502
3494
|
}
|
|
3503
|
-
customElements.get("anduin-modal-close") || customElements.define("anduin-modal-close",
|
|
3504
|
-
var
|
|
3505
|
-
for (var
|
|
3506
|
-
(n = l
|
|
3507
|
-
return
|
|
3495
|
+
customElements.get("anduin-modal-close") || customElements.define("anduin-modal-close", Q4);
|
|
3496
|
+
var e3 = Object.defineProperty, E = (i, e, t, C) => {
|
|
3497
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
3498
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
3499
|
+
return o && e3(e, t, o), o;
|
|
3500
|
+
};
|
|
3501
|
+
const a2 = "anduin-radio:change", t3 = "anduin-radio-group:change", J2 = class J2 extends u {
|
|
3502
|
+
constructor() {
|
|
3503
|
+
super(...arguments), this.checked = !1, this.disabled = !1, this.readonly = !1, this.value = "", this.name = "", this.inputid = "";
|
|
3504
|
+
}
|
|
3505
|
+
connectedCallback() {
|
|
3506
|
+
super.connectedCallback();
|
|
3507
|
+
const e = this.closest("anduin-field");
|
|
3508
|
+
e && e.addEventListener(y1, (t) => {
|
|
3509
|
+
const C = t;
|
|
3510
|
+
this.inputid && this.inputid === C.detail && !this.disabled && !this.readonly && this._select();
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
_select() {
|
|
3514
|
+
this.checked || (this.checked = !0, this.dispatchEvent(new CustomEvent(a2, {
|
|
3515
|
+
detail: this.value,
|
|
3516
|
+
bubbles: !0,
|
|
3517
|
+
composed: !0
|
|
3518
|
+
})));
|
|
3519
|
+
}
|
|
3520
|
+
_onInputChange() {
|
|
3521
|
+
this._select();
|
|
3522
|
+
}
|
|
3523
|
+
render() {
|
|
3524
|
+
const e = !this.disabled && !this.readonly, t = [
|
|
3525
|
+
"radio__circle",
|
|
3526
|
+
this.checked ? "radio__circle--checked" : "",
|
|
3527
|
+
!this.checked && this.readonly ? "radio__circle--readonly" : "",
|
|
3528
|
+
!this.checked && this.disabled ? "radio__circle--disabled" : "",
|
|
3529
|
+
!this.checked && !this.readonly && !this.disabled ? "radio__circle--unchecked" : ""
|
|
3530
|
+
].filter(Boolean).join(" ");
|
|
3531
|
+
return d`
|
|
3532
|
+
<label class="${this.disabled ? "is-disabled" : ""}">
|
|
3533
|
+
<div
|
|
3534
|
+
class="radio ${e ? "radio--interactive" : ""} ${this.disabled ? "radio--disabled" : ""}"
|
|
3535
|
+
part="radio"
|
|
3536
|
+
>
|
|
3537
|
+
<input
|
|
3538
|
+
class="radio__input"
|
|
3539
|
+
type="radio"
|
|
3540
|
+
.checked=${this.checked}
|
|
3541
|
+
.value=${this.value}
|
|
3542
|
+
name=${this.name || p}
|
|
3543
|
+
?disabled=${this.disabled || this.readonly}
|
|
3544
|
+
tabindex="${e ? 0 : -1}"
|
|
3545
|
+
@change=${e ? this._onInputChange : p}
|
|
3546
|
+
/>
|
|
3547
|
+
<div class="${t}" tabindex="${e ? 0 : -1}"></div>
|
|
3548
|
+
<div class="radio__dot ${this.checked ? "radio__dot--visible" : ""}"></div>
|
|
3549
|
+
</div>
|
|
3550
|
+
<span class="radio__label"><slot></slot></span>
|
|
3551
|
+
</label>
|
|
3552
|
+
`;
|
|
3553
|
+
}
|
|
3508
3554
|
};
|
|
3509
|
-
|
|
3555
|
+
J2.styles = h`
|
|
3556
|
+
:host { display: inline-flex; font-family: var(--font-sans); }
|
|
3557
|
+
|
|
3558
|
+
label {
|
|
3559
|
+
display: inline-flex;
|
|
3560
|
+
align-items: center;
|
|
3561
|
+
gap: 8px;
|
|
3562
|
+
cursor: pointer;
|
|
3563
|
+
user-select: none;
|
|
3564
|
+
}
|
|
3565
|
+
label.is-disabled { cursor: default; opacity: 0.4; }
|
|
3566
|
+
|
|
3567
|
+
.radio__label {
|
|
3568
|
+
font-size: var(--text-13, 13px);
|
|
3569
|
+
color: var(--color-gray-8, #101828);
|
|
3570
|
+
line-height: 20px;
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
.radio { width: 16px; height: 16px; position: relative; flex-shrink: 0; }
|
|
3574
|
+
.radio--interactive { cursor: pointer; }
|
|
3575
|
+
.radio--disabled { opacity: 0.4; }
|
|
3576
|
+
|
|
3577
|
+
.radio__input {
|
|
3578
|
+
position: absolute; inset: 0; width: 100%; height: 100%;
|
|
3579
|
+
opacity: 0; cursor: pointer; margin: 0;
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
.radio__circle {
|
|
3583
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
3584
|
+
width: 16px; height: 16px; box-sizing: border-box;
|
|
3585
|
+
border-radius: 50%;
|
|
3586
|
+
transition: all 0.1s, outline 0.3s ease;
|
|
3587
|
+
outline: 12px solid transparent; outline-offset: 2px;
|
|
3588
|
+
}
|
|
3589
|
+
.radio__circle:focus { outline: 2px solid #ACDBF8; }
|
|
3590
|
+
|
|
3591
|
+
.radio__circle--unchecked {
|
|
3592
|
+
background-color: var(--color-gray-0);
|
|
3593
|
+
border: 1px solid var(--color-gray-4);
|
|
3594
|
+
}
|
|
3595
|
+
.radio__circle--unchecked:hover { background-color: var(--color-gray-0); }
|
|
3596
|
+
.radio__circle--unchecked:active { background-color: var(--color-gray-2); }
|
|
3597
|
+
|
|
3598
|
+
.radio__circle--checked {
|
|
3599
|
+
background-color: var(--color-primary-4);
|
|
3600
|
+
border: 1px solid var(--color-primary-4);
|
|
3601
|
+
}
|
|
3602
|
+
.radio__circle--checked:hover { background-color: var(--color-primary-3); border-color: var(--color-primary-3); }
|
|
3603
|
+
.radio__circle--checked:active { background-color: var(--color-primary-5); border-color: var(--color-primary-5); }
|
|
3604
|
+
|
|
3605
|
+
.radio__circle--readonly { background-color: var(--color-gray-2); border: 1px solid var(--color-gray-4); }
|
|
3606
|
+
.radio__circle--disabled { background-color: var(--color-gray-3); border: 1px solid var(--color-gray-4); }
|
|
3607
|
+
|
|
3608
|
+
.radio__dot {
|
|
3609
|
+
position: absolute; inset: 0; pointer-events: none;
|
|
3610
|
+
display: flex; align-items: center; justify-content: center;
|
|
3611
|
+
}
|
|
3612
|
+
.radio__dot::after {
|
|
3613
|
+
content: '';
|
|
3614
|
+
width: 6px; height: 6px;
|
|
3615
|
+
border-radius: 50%;
|
|
3616
|
+
background: var(--color-gray-0);
|
|
3617
|
+
opacity: 0;
|
|
3618
|
+
transform: scale(0.5);
|
|
3619
|
+
transition: opacity 0.1s, transform 0.1s;
|
|
3620
|
+
}
|
|
3621
|
+
.radio__dot--visible::after {
|
|
3622
|
+
opacity: 1;
|
|
3623
|
+
transform: scale(1);
|
|
3624
|
+
}
|
|
3625
|
+
`;
|
|
3626
|
+
let $ = J2;
|
|
3627
|
+
E([
|
|
3628
|
+
r({ type: Boolean })
|
|
3629
|
+
], $.prototype, "checked");
|
|
3630
|
+
E([
|
|
3631
|
+
r({ type: Boolean })
|
|
3632
|
+
], $.prototype, "disabled");
|
|
3633
|
+
E([
|
|
3634
|
+
r({ type: Boolean })
|
|
3635
|
+
], $.prototype, "readonly");
|
|
3636
|
+
E([
|
|
3637
|
+
r()
|
|
3638
|
+
], $.prototype, "value");
|
|
3639
|
+
E([
|
|
3640
|
+
r()
|
|
3641
|
+
], $.prototype, "name");
|
|
3642
|
+
E([
|
|
3643
|
+
r()
|
|
3644
|
+
], $.prototype, "inputid");
|
|
3645
|
+
customElements.get("anduin-radio") || customElements.define("anduin-radio", $);
|
|
3646
|
+
const Q2 = class Q2 extends u {
|
|
3647
|
+
constructor() {
|
|
3648
|
+
super(...arguments), this.value = "", this.name = "", this.orientation = "vertical", this._onRadioChange = (e) => {
|
|
3649
|
+
const C = e.detail;
|
|
3650
|
+
C !== this.value && (this.value = C, this.querySelectorAll("anduin-radio").forEach((o) => {
|
|
3651
|
+
const l = o;
|
|
3652
|
+
l.checked = l.value === C;
|
|
3653
|
+
}), this.dispatchEvent(new CustomEvent(t3, {
|
|
3654
|
+
detail: C,
|
|
3655
|
+
bubbles: !0,
|
|
3656
|
+
composed: !0
|
|
3657
|
+
})), e.stopPropagation());
|
|
3658
|
+
};
|
|
3659
|
+
}
|
|
3660
|
+
connectedCallback() {
|
|
3661
|
+
super.connectedCallback(), this.addEventListener(a2, this._onRadioChange);
|
|
3662
|
+
}
|
|
3663
|
+
disconnectedCallback() {
|
|
3664
|
+
super.disconnectedCallback(), this.removeEventListener(a2, this._onRadioChange);
|
|
3665
|
+
}
|
|
3666
|
+
render() {
|
|
3667
|
+
return d`
|
|
3668
|
+
<div class="group group--${this.orientation}" role="radiogroup" part="group">
|
|
3669
|
+
<slot></slot>
|
|
3670
|
+
</div>
|
|
3671
|
+
`;
|
|
3672
|
+
}
|
|
3673
|
+
};
|
|
3674
|
+
Q2.styles = h`
|
|
3675
|
+
:host { display: block; font-family: var(--font-sans); }
|
|
3676
|
+
|
|
3677
|
+
.group {
|
|
3678
|
+
display: flex;
|
|
3679
|
+
gap: 8px;
|
|
3680
|
+
}
|
|
3681
|
+
.group--vertical { flex-direction: column; }
|
|
3682
|
+
.group--horizontal { flex-direction: row; flex-wrap: wrap; align-items: center; }
|
|
3683
|
+
`;
|
|
3684
|
+
let o1 = Q2;
|
|
3685
|
+
E([
|
|
3686
|
+
r()
|
|
3687
|
+
], o1.prototype, "value");
|
|
3688
|
+
E([
|
|
3689
|
+
r()
|
|
3690
|
+
], o1.prototype, "name");
|
|
3691
|
+
E([
|
|
3692
|
+
r()
|
|
3693
|
+
], o1.prototype, "orientation");
|
|
3694
|
+
customElements.get("anduin-radio-group") || customElements.define("anduin-radio-group", o1);
|
|
3695
|
+
var o3 = Object.defineProperty, W = (i, e, t, C) => {
|
|
3696
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
3697
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
3698
|
+
return o && o3(e, t, o), o;
|
|
3699
|
+
};
|
|
3700
|
+
const b5 = [
|
|
3510
3701
|
{ bg: "#6172F3", text: "#ffffff" },
|
|
3511
3702
|
{ bg: "#B692F6", text: "#ffffff" },
|
|
3512
3703
|
{ bg: "#F670C7", text: "#ffffff" },
|
|
@@ -3516,17 +3707,17 @@ const d5 = [
|
|
|
3516
3707
|
{ bg: "#F97066", text: "#ffffff" },
|
|
3517
3708
|
{ bg: "#7A5AF8", text: "#ffffff" }
|
|
3518
3709
|
];
|
|
3519
|
-
function
|
|
3710
|
+
function C3(i) {
|
|
3520
3711
|
let e = 0;
|
|
3521
|
-
for (let t = 0; t <
|
|
3522
|
-
return
|
|
3712
|
+
for (let t = 0; t < i.length; t++) e = e * 31 + i.charCodeAt(t) >>> 0;
|
|
3713
|
+
return b5[e % b5.length];
|
|
3523
3714
|
}
|
|
3524
|
-
function
|
|
3715
|
+
function i3(i) {
|
|
3525
3716
|
var t;
|
|
3526
|
-
const e =
|
|
3717
|
+
const e = i.trim().split(/\s+/);
|
|
3527
3718
|
return e.length === 1 ? ((t = e[0][0]) == null ? void 0 : t.toUpperCase()) ?? "" : ((e[0][0] ?? "") + (e[e.length - 1][0] ?? "")).toUpperCase();
|
|
3528
3719
|
}
|
|
3529
|
-
const
|
|
3720
|
+
const e5 = class e5 extends u {
|
|
3530
3721
|
constructor() {
|
|
3531
3722
|
super(...arguments), this.src = "", this.name = "", this.alt = "", this.icon = "", this.size = 32, this.shape = "circle", this._imgError = !1;
|
|
3532
3723
|
}
|
|
@@ -3537,7 +3728,7 @@ const I2 = class I2 extends p {
|
|
|
3537
3728
|
return this.size <= 16 ? 10 : this.size <= 20 ? 12 : this.size <= 24 ? 14 : 18;
|
|
3538
3729
|
}
|
|
3539
3730
|
render() {
|
|
3540
|
-
const e = !!this.src && !this._imgError, t = this.name || this.icon ?
|
|
3731
|
+
const e = !!this.src && !this._imgError, t = this.name || this.icon ? C3(this.name || this.icon) : { bg: "#F2F4F7", text: "#667085" }, C = this.name ? i3(this.name) : "";
|
|
3541
3732
|
return d`
|
|
3542
3733
|
<div
|
|
3543
3734
|
class="avatar avatar--${this.shape} avatar--${this.size}"
|
|
@@ -3546,7 +3737,7 @@ const I2 = class I2 extends p {
|
|
|
3546
3737
|
role="img"
|
|
3547
3738
|
part="avatar"
|
|
3548
3739
|
>
|
|
3549
|
-
${e ? d`<img src=${this.src} alt=${this.alt || this.name} @error=${this._onImgError} />` : this.icon ? d`<span style="color:${t.text};width:100%;height:100%;display:flex;align-items:center;justify-content:center"><anduin-icon name=${this.icon} size=${this._iconSize()}></anduin-icon></span>` :
|
|
3740
|
+
${e ? d`<img src=${this.src} alt=${this.alt || this.name} @error=${this._onImgError} />` : this.icon ? d`<span style="color:${t.text};width:100%;height:100%;display:flex;align-items:center;justify-content:center"><anduin-icon name=${this.icon} size=${this._iconSize()}></anduin-icon></span>` : C ? d`<span style="color:${t.text};background:${t.bg};width:100%;height:100%;display:flex;align-items:center;justify-content:center">${C}</span>` : d`<span style="color:#98A2B3;background:#F2F4F7;width:100%;height:100%;display:flex;align-items:center;justify-content:center">
|
|
3550
3741
|
<svg width="60%" height="60%" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3551
3742
|
<path d="M8 8C9.93 8 11.5 6.43 11.5 4.5S9.93 1 8 1 4.5 2.57 4.5 4.5 6.07 8 8 8zm0 1.5C5.66 9.5 1 10.67 1 13v1h14v-1c0-2.33-4.66-3.5-7-3.5z" fill="currentColor"/>
|
|
3552
3743
|
</svg>
|
|
@@ -3555,7 +3746,7 @@ const I2 = class I2 extends p {
|
|
|
3555
3746
|
`;
|
|
3556
3747
|
}
|
|
3557
3748
|
};
|
|
3558
|
-
|
|
3749
|
+
e5.styles = h`
|
|
3559
3750
|
:host { display: inline-flex; }
|
|
3560
3751
|
|
|
3561
3752
|
.avatar {
|
|
@@ -3584,26 +3775,26 @@ I2.styles = H`
|
|
|
3584
3775
|
display: block;
|
|
3585
3776
|
}
|
|
3586
3777
|
`;
|
|
3587
|
-
let _ =
|
|
3588
|
-
|
|
3778
|
+
let _ = e5;
|
|
3779
|
+
W([
|
|
3589
3780
|
r()
|
|
3590
3781
|
], _.prototype, "src");
|
|
3591
|
-
|
|
3782
|
+
W([
|
|
3592
3783
|
r()
|
|
3593
3784
|
], _.prototype, "name");
|
|
3594
|
-
|
|
3785
|
+
W([
|
|
3595
3786
|
r()
|
|
3596
3787
|
], _.prototype, "alt");
|
|
3597
|
-
|
|
3788
|
+
W([
|
|
3598
3789
|
r()
|
|
3599
3790
|
], _.prototype, "icon");
|
|
3600
|
-
|
|
3791
|
+
W([
|
|
3601
3792
|
r({ type: Number })
|
|
3602
3793
|
], _.prototype, "size");
|
|
3603
|
-
|
|
3794
|
+
W([
|
|
3604
3795
|
r()
|
|
3605
3796
|
], _.prototype, "shape");
|
|
3606
|
-
|
|
3797
|
+
W([
|
|
3607
3798
|
x()
|
|
3608
3799
|
], _.prototype, "_imgError");
|
|
3609
3800
|
customElements.get("anduin-avatar") || customElements.define("anduin-avatar", _);
|
|
@@ -3612,15 +3803,15 @@ customElements.get("anduin-avatar") || customElements.define("anduin-avatar", _)
|
|
|
3612
3803
|
* Copyright 2017 Google LLC
|
|
3613
3804
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3614
3805
|
*/
|
|
3615
|
-
const
|
|
3616
|
-
class
|
|
3806
|
+
const l3 = { CHILD: 2 }, n3 = (i) => (...e) => ({ _$litDirective$: i, values: e });
|
|
3807
|
+
class r3 {
|
|
3617
3808
|
constructor(e) {
|
|
3618
3809
|
}
|
|
3619
3810
|
get _$AU() {
|
|
3620
3811
|
return this._$AM._$AU;
|
|
3621
3812
|
}
|
|
3622
|
-
_$AT(e, t,
|
|
3623
|
-
this._$Ct = e, this._$AM = t, this._$Ci =
|
|
3813
|
+
_$AT(e, t, C) {
|
|
3814
|
+
this._$Ct = e, this._$AM = t, this._$Ci = C;
|
|
3624
3815
|
}
|
|
3625
3816
|
_$AS(e, t) {
|
|
3626
3817
|
return this.update(e, t);
|
|
@@ -3634,13 +3825,13 @@ class Q4 {
|
|
|
3634
3825
|
* Copyright 2017 Google LLC
|
|
3635
3826
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3636
3827
|
*/
|
|
3637
|
-
class
|
|
3828
|
+
class s2 extends r3 {
|
|
3638
3829
|
constructor(e) {
|
|
3639
|
-
if (super(e), this.it =
|
|
3830
|
+
if (super(e), this.it = p, e.type !== l3.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
3640
3831
|
}
|
|
3641
3832
|
render(e) {
|
|
3642
|
-
if (e ===
|
|
3643
|
-
if (e ===
|
|
3833
|
+
if (e === p || e == null) return this._t = void 0, this.it = e;
|
|
3834
|
+
if (e === U) return e;
|
|
3644
3835
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
3645
3836
|
if (e === this.it) return this._t;
|
|
3646
3837
|
this.it = e;
|
|
@@ -3648,16 +3839,16 @@ class J1 extends Q4 {
|
|
|
3648
3839
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
3649
3840
|
}
|
|
3650
3841
|
}
|
|
3651
|
-
|
|
3842
|
+
s2.directiveName = "unsafeHTML", s2.resultType = 1;
|
|
3652
3843
|
/**
|
|
3653
3844
|
* @license
|
|
3654
3845
|
* Copyright 2017 Google LLC
|
|
3655
3846
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3656
3847
|
*/
|
|
3657
|
-
class
|
|
3848
|
+
class d2 extends s2 {
|
|
3658
3849
|
}
|
|
3659
|
-
|
|
3660
|
-
const
|
|
3850
|
+
d2.directiveName = "unsafeSVG", d2.resultType = 2;
|
|
3851
|
+
const a3 = n3(d2), s3 = {
|
|
3661
3852
|
archive: {
|
|
3662
3853
|
16: { viewBox: "0 0 16 16", paths: `<path d="M2 1.5C2 0.671573 2.67157 0 3.5 0H9.17157C9.70201 0 10.2107 0.210714 10.5858 0.585786L13.4142 3.41421C13.7893 3.78929 14 4.29799 14 4.82843V14.5C14 15.3284 13.3284 16 12.5 16H3.5C2.67157 16 2 15.3284 2 14.5V1.5Z" fill="white"/>
|
|
3663
3854
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 5.5C13 5.22386 12.7761 5 12.5 5H9.5C9.22386 5 9 4.77614 9 4.5V1.5C9 1.22386 8.77614 1 8.5 1H6H3.5C3.22386 1 3 1.22386 3 1.5V14.5C3 14.7761 3.22386 15 3.5 15H12.5C12.7761 15 13 14.7761 13 14.5V8V5.5ZM14 8V14.5C14 15.3284 13.3284 16 12.5 16H3.5C2.67157 16 2 15.3284 2 14.5V1.5C2 0.671573 2.67157 0 3.5 0H6H9.17157C9.70201 0 10.2107 0.210714 10.5858 0.585786L13.4142 3.41421C13.7893 3.78929 14 4.29799 14 4.82843V8Z" fill="#CCD2DB"/>
|
|
@@ -3901,26 +4092,26 @@ const e3 = J4(Q1), t3 = {
|
|
|
3901
4092
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 2H18.5H18.5147C18.8078 2 19.0982 2.02573 19.3829 2.07593C19.7452 2.22622 20 2.58335 20 3V8C20 8.55228 20.4477 9 21 9H26C26.4166 9 26.7738 9.25482 26.9241 9.6171C26.9743 9.90183 27 10.1922 27 10.4853V29C27 29.5523 26.5523 30 26 30H6C5.44772 30 5 29.5523 5 29V3C5 2.44772 5.44772 2 6 2ZM27.9804 10C27.9934 10.1608 28 10.3227 28 10.4853V29C28 30.1046 27.1046 31 26 31H6C4.89543 31 4 30.1046 4 29V3C4 1.89543 4.89543 1 6 1H18.5H18.5147C20.0951 1 21.6113 1.62353 22.7342 2.73435C22.742 2.742 22.7497 2.74967 22.7574 2.75736L26.2426 6.24264L26.5858 6.58579C27.4913 7.49129 28 8.71942 28 10H27.9804Z" fill="#AADAF9"/>
|
|
3902
4093
|
<path d="M18.875 21.5385L20.3324 13.4117C20.3751 13.1734 20.5825 13 20.8246 13H22.1261C22.4436 13 22.6808 13.2921 22.6154 13.6029L20.3023 24.6029C20.2536 24.8343 20.0494 25 19.813 25H18.2572C18.0243 25 17.8223 24.8393 17.77 24.6124L16.0078 16.9725L14.2457 24.6124C14.1933 24.8393 13.9913 25 13.7584 25H12.2027C11.9662 25 11.762 24.8343 11.7134 24.6029L9.40022 13.6029C9.33487 13.2921 9.57198 13 9.88952 13H11.1916C11.4335 13 11.6406 13.1731 11.6836 13.4111L13.1484 21.522L14.9371 13.3926C14.9875 13.1633 15.1906 13 15.4254 13H16.6053C16.8403 13 17.0436 13.1636 17.0938 13.3932L18.875 21.5385Z" fill="#1075DC"/>` }
|
|
3903
4094
|
}
|
|
3904
|
-
},
|
|
3905
|
-
function
|
|
3906
|
-
const t =
|
|
4095
|
+
}, d3 = [32, 24, 16];
|
|
4096
|
+
function c3(i, e) {
|
|
4097
|
+
const t = s3[i];
|
|
3907
4098
|
if (!t) return null;
|
|
3908
4099
|
if (t[e]) return t[e];
|
|
3909
|
-
for (const
|
|
3910
|
-
if (t[
|
|
4100
|
+
for (const C of d3)
|
|
4101
|
+
if (t[C]) return t[C];
|
|
3911
4102
|
return null;
|
|
3912
4103
|
}
|
|
3913
|
-
var
|
|
3914
|
-
for (var
|
|
3915
|
-
(n = l
|
|
3916
|
-
return
|
|
4104
|
+
var p3 = Object.defineProperty, U5 = (i, e, t, C) => {
|
|
4105
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
4106
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
4107
|
+
return o && p3(e, t, o), o;
|
|
3917
4108
|
};
|
|
3918
|
-
const
|
|
4109
|
+
const t5 = class t5 extends u {
|
|
3919
4110
|
constructor() {
|
|
3920
4111
|
super(...arguments), this.type = "pdf", this.size = 32;
|
|
3921
4112
|
}
|
|
3922
4113
|
render() {
|
|
3923
|
-
const e =
|
|
4114
|
+
const e = c3(this.type, this.size);
|
|
3924
4115
|
return e ? d`
|
|
3925
4116
|
<svg
|
|
3926
4117
|
width=${this.size}
|
|
@@ -3931,35 +4122,35 @@ const T2 = class T2 extends p {
|
|
|
3931
4122
|
aria-label="${this.type} file"
|
|
3932
4123
|
role="img"
|
|
3933
4124
|
>
|
|
3934
|
-
${
|
|
4125
|
+
${a3(e.paths)}
|
|
3935
4126
|
</svg>
|
|
3936
|
-
` :
|
|
4127
|
+
` : p;
|
|
3937
4128
|
}
|
|
3938
4129
|
};
|
|
3939
|
-
|
|
4130
|
+
t5.styles = h`
|
|
3940
4131
|
:host { display: inline-flex; align-items: center; justify-content: center; }
|
|
3941
4132
|
svg { display: block; }
|
|
3942
4133
|
`;
|
|
3943
|
-
let
|
|
3944
|
-
|
|
4134
|
+
let M1 = t5;
|
|
4135
|
+
U5([
|
|
3945
4136
|
r()
|
|
3946
|
-
],
|
|
3947
|
-
|
|
4137
|
+
], M1.prototype, "type");
|
|
4138
|
+
U5([
|
|
3948
4139
|
r({ type: Number })
|
|
3949
|
-
],
|
|
3950
|
-
customElements.get("anduin-file-icon") || customElements.define("anduin-file-icon",
|
|
3951
|
-
var
|
|
3952
|
-
for (var
|
|
3953
|
-
(n = l
|
|
3954
|
-
return
|
|
4140
|
+
], M1.prototype, "size");
|
|
4141
|
+
customElements.get("anduin-file-icon") || customElements.define("anduin-file-icon", M1);
|
|
4142
|
+
var u3 = Object.defineProperty, X = (i, e, t, C) => {
|
|
4143
|
+
for (var o = void 0, l = i.length - 1, n; l >= 0; l--)
|
|
4144
|
+
(n = i[l]) && (o = n(e, t, o) || o);
|
|
4145
|
+
return o && u3(e, t, o), o;
|
|
3955
4146
|
};
|
|
3956
|
-
const
|
|
4147
|
+
const M5 = {
|
|
3957
4148
|
gray: "info",
|
|
3958
4149
|
primary: "infoCircleLine",
|
|
3959
4150
|
success: "checkCircle",
|
|
3960
4151
|
warning: "warning",
|
|
3961
4152
|
danger: "error"
|
|
3962
|
-
},
|
|
4153
|
+
}, h3 = "anduin-toast:dismiss", o5 = class o5 extends u {
|
|
3963
4154
|
constructor() {
|
|
3964
4155
|
super(...arguments), this.variant = "gray", this.heading = "", this.description = "", this._dismissing = !1;
|
|
3965
4156
|
}
|
|
@@ -3967,10 +4158,10 @@ const c5 = {
|
|
|
3967
4158
|
var t;
|
|
3968
4159
|
if (this._dismissing) return;
|
|
3969
4160
|
this._dismissing = !0;
|
|
3970
|
-
const e = (
|
|
3971
|
-
var
|
|
3972
|
-
|
|
3973
|
-
new CustomEvent(
|
|
4161
|
+
const e = (C) => {
|
|
4162
|
+
var o;
|
|
4163
|
+
C.propertyName === "opacity" && ((o = this._toastEl) == null || o.removeEventListener("transitionend", e), this.dispatchEvent(
|
|
4164
|
+
new CustomEvent(h3, { bubbles: !0, composed: !0 })
|
|
3974
4165
|
));
|
|
3975
4166
|
};
|
|
3976
4167
|
(t = this._toastEl) == null || t.addEventListener("transitionend", e);
|
|
@@ -3979,7 +4170,7 @@ const c5 = {
|
|
|
3979
4170
|
this.dismiss();
|
|
3980
4171
|
}
|
|
3981
4172
|
render() {
|
|
3982
|
-
const e =
|
|
4173
|
+
const e = M5[this.variant] ?? M5.gray;
|
|
3983
4174
|
return d`
|
|
3984
4175
|
<div
|
|
3985
4176
|
class="toast toast--${this.variant} ${this._dismissing ? "toast--dismissing" : ""}"
|
|
@@ -4005,7 +4196,7 @@ const c5 = {
|
|
|
4005
4196
|
`;
|
|
4006
4197
|
}
|
|
4007
4198
|
};
|
|
4008
|
-
|
|
4199
|
+
o5.styles = h`
|
|
4009
4200
|
:host {
|
|
4010
4201
|
display: block;
|
|
4011
4202
|
font-family: var(--font-sans);
|
|
@@ -4124,39 +4315,39 @@ N2.styles = H`
|
|
|
4124
4315
|
background: var(--color-gray-7, #344054);
|
|
4125
4316
|
}
|
|
4126
4317
|
`;
|
|
4127
|
-
let
|
|
4128
|
-
|
|
4318
|
+
let P = o5;
|
|
4319
|
+
X([
|
|
4129
4320
|
r()
|
|
4130
|
-
],
|
|
4131
|
-
|
|
4321
|
+
], P.prototype, "variant");
|
|
4322
|
+
X([
|
|
4132
4323
|
r()
|
|
4133
|
-
],
|
|
4134
|
-
|
|
4324
|
+
], P.prototype, "heading");
|
|
4325
|
+
X([
|
|
4135
4326
|
r()
|
|
4136
|
-
],
|
|
4137
|
-
|
|
4327
|
+
], P.prototype, "description");
|
|
4328
|
+
X([
|
|
4138
4329
|
x()
|
|
4139
|
-
],
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
],
|
|
4143
|
-
customElements.get("anduin-toast") || customElements.define("anduin-toast",
|
|
4144
|
-
const
|
|
4330
|
+
], P.prototype, "_dismissing");
|
|
4331
|
+
X([
|
|
4332
|
+
D(".toast")
|
|
4333
|
+
], P.prototype, "_toastEl");
|
|
4334
|
+
customElements.get("anduin-toast") || customElements.define("anduin-toast", P);
|
|
4335
|
+
const C5 = class C5 extends u {
|
|
4145
4336
|
constructor() {
|
|
4146
4337
|
super(...arguments), this.position = "bottom-left", this._toasts = [], this._nextId = 0;
|
|
4147
4338
|
}
|
|
4148
4339
|
show(e) {
|
|
4149
|
-
const t = this._nextId++,
|
|
4150
|
-
this._toasts = [...this._toasts, { id: t, opts: { ...e, position:
|
|
4151
|
-
const
|
|
4152
|
-
return
|
|
4340
|
+
const t = this._nextId++, C = e.position ?? this.position;
|
|
4341
|
+
this._toasts = [...this._toasts, { id: t, opts: { ...e, position: C } }];
|
|
4342
|
+
const o = e.duration ?? 4e3;
|
|
4343
|
+
return o > 0 && setTimeout(() => this._dismissById(t), o), t;
|
|
4153
4344
|
}
|
|
4154
4345
|
dismiss(e) {
|
|
4155
4346
|
this._dismissById(e);
|
|
4156
4347
|
}
|
|
4157
4348
|
_dismissById(e) {
|
|
4158
|
-
var
|
|
4159
|
-
const t = (
|
|
4349
|
+
var C;
|
|
4350
|
+
const t = (C = this.shadowRoot) == null ? void 0 : C.querySelector(
|
|
4160
4351
|
`anduin-toast[data-id="${e}"]`
|
|
4161
4352
|
);
|
|
4162
4353
|
t ? t.dismiss() : this._removeById(e);
|
|
@@ -4177,7 +4368,7 @@ const j2 = class j2 extends p {
|
|
|
4177
4368
|
variant=${t.variant ?? "gray"}
|
|
4178
4369
|
heading=${t.heading ?? ""}
|
|
4179
4370
|
description=${t.description ?? ""}
|
|
4180
|
-
@anduin-toast:dismiss=${(
|
|
4371
|
+
@anduin-toast:dismiss=${(C) => this._onDismiss(C, e)}
|
|
4181
4372
|
></anduin-toast>
|
|
4182
4373
|
`
|
|
4183
4374
|
)}
|
|
@@ -4185,7 +4376,7 @@ const j2 = class j2 extends p {
|
|
|
4185
4376
|
`;
|
|
4186
4377
|
}
|
|
4187
4378
|
};
|
|
4188
|
-
|
|
4379
|
+
C5.styles = h`
|
|
4189
4380
|
:host {
|
|
4190
4381
|
display: contents;
|
|
4191
4382
|
pointer-events: none;
|
|
@@ -4232,103 +4423,107 @@ j2.styles = H`
|
|
|
4232
4423
|
align-items: flex-end;
|
|
4233
4424
|
}
|
|
4234
4425
|
`;
|
|
4235
|
-
let
|
|
4236
|
-
|
|
4426
|
+
let m1 = C5;
|
|
4427
|
+
X([
|
|
4237
4428
|
r()
|
|
4238
|
-
],
|
|
4239
|
-
|
|
4429
|
+
], m1.prototype, "position");
|
|
4430
|
+
X([
|
|
4240
4431
|
x()
|
|
4241
|
-
],
|
|
4242
|
-
customElements.get("anduin-toaster") || customElements.define("anduin-toaster",
|
|
4243
|
-
const
|
|
4244
|
-
show(
|
|
4245
|
-
return
|
|
4432
|
+
], m1.prototype, "_toasts");
|
|
4433
|
+
customElements.get("anduin-toaster") || customElements.define("anduin-toaster", m1);
|
|
4434
|
+
const g3 = {
|
|
4435
|
+
show(i) {
|
|
4436
|
+
return H3(i.position).show(i);
|
|
4246
4437
|
},
|
|
4247
|
-
success(
|
|
4248
|
-
return this.show({ ...t, variant: "success", heading:
|
|
4438
|
+
success(i, e, t) {
|
|
4439
|
+
return this.show({ ...t, variant: "success", heading: i, description: e });
|
|
4249
4440
|
},
|
|
4250
|
-
danger(
|
|
4251
|
-
return this.show({ ...t, variant: "danger", heading:
|
|
4441
|
+
danger(i, e, t) {
|
|
4442
|
+
return this.show({ ...t, variant: "danger", heading: i, description: e });
|
|
4252
4443
|
},
|
|
4253
|
-
warning(
|
|
4254
|
-
return this.show({ ...t, variant: "warning", heading:
|
|
4444
|
+
warning(i, e, t) {
|
|
4445
|
+
return this.show({ ...t, variant: "warning", heading: i, description: e });
|
|
4255
4446
|
},
|
|
4256
|
-
primary(
|
|
4257
|
-
return this.show({ ...t, variant: "primary", heading:
|
|
4447
|
+
primary(i, e, t) {
|
|
4448
|
+
return this.show({ ...t, variant: "primary", heading: i, description: e });
|
|
4258
4449
|
},
|
|
4259
|
-
gray(
|
|
4260
|
-
return this.show({ ...t, variant: "gray", heading:
|
|
4450
|
+
gray(i, e, t) {
|
|
4451
|
+
return this.show({ ...t, variant: "gray", heading: i, description: e });
|
|
4261
4452
|
}
|
|
4262
|
-
},
|
|
4263
|
-
function
|
|
4264
|
-
if (
|
|
4453
|
+
}, W1 = /* @__PURE__ */ new Map();
|
|
4454
|
+
function H3(i = "bottom-left") {
|
|
4455
|
+
if (W1.has(i)) return W1.get(i);
|
|
4265
4456
|
const e = document.createElement("anduin-toaster");
|
|
4266
|
-
return e.position =
|
|
4457
|
+
return e.position = i, document.body.appendChild(e), W1.set(i, e), e;
|
|
4267
4458
|
}
|
|
4268
4459
|
export {
|
|
4269
|
-
|
|
4460
|
+
P4 as $,
|
|
4270
4461
|
_ as A,
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4462
|
+
u1 as B,
|
|
4463
|
+
L1 as C,
|
|
4464
|
+
w as D,
|
|
4465
|
+
Q as E,
|
|
4466
|
+
g1 as F,
|
|
4467
|
+
e1 as G,
|
|
4468
|
+
e2 as H,
|
|
4469
|
+
Z as I,
|
|
4470
|
+
P as J,
|
|
4471
|
+
m1 as K,
|
|
4472
|
+
b1 as L,
|
|
4473
|
+
C2 as M,
|
|
4474
|
+
o2 as N,
|
|
4475
|
+
O1 as O,
|
|
4476
|
+
i2 as P,
|
|
4477
|
+
E5 as Q,
|
|
4478
|
+
$4 as R,
|
|
4479
|
+
P5 as S,
|
|
4480
|
+
y1 as T,
|
|
4481
|
+
s3 as U,
|
|
4482
|
+
v5 as V,
|
|
4483
|
+
A4 as W,
|
|
4484
|
+
r2 as X,
|
|
4485
|
+
l2 as Y,
|
|
4486
|
+
a2 as Z,
|
|
4487
|
+
t3 as _,
|
|
4488
|
+
F1 as a,
|
|
4489
|
+
D5 as a0,
|
|
4490
|
+
T1 as a1,
|
|
4491
|
+
S4 as a2,
|
|
4492
|
+
F4 as a3,
|
|
4493
|
+
T5 as a4,
|
|
4494
|
+
N5 as a5,
|
|
4495
|
+
f2 as a6,
|
|
4496
|
+
O5 as a7,
|
|
4497
|
+
I5 as a8,
|
|
4498
|
+
j5 as a9,
|
|
4499
|
+
Y4 as aa,
|
|
4500
|
+
A5 as ab,
|
|
4501
|
+
c3 as ac,
|
|
4502
|
+
g3 as ad,
|
|
4503
|
+
r1 as ae,
|
|
4504
|
+
H1 as b,
|
|
4310
4505
|
V as c,
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4506
|
+
z1 as d,
|
|
4507
|
+
z as e,
|
|
4508
|
+
v1 as f,
|
|
4509
|
+
P1 as g,
|
|
4510
|
+
S1 as h,
|
|
4511
|
+
K1 as i,
|
|
4512
|
+
J1 as j,
|
|
4513
|
+
Q1 as k,
|
|
4514
|
+
V1 as l,
|
|
4515
|
+
M1 as m,
|
|
4516
|
+
h1 as n,
|
|
4517
|
+
b as o,
|
|
4518
|
+
D1 as p,
|
|
4519
|
+
q,
|
|
4520
|
+
t1 as r,
|
|
4521
|
+
J4 as s,
|
|
4522
|
+
Q4 as t,
|
|
4328
4523
|
k as u,
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4524
|
+
n2 as v,
|
|
4525
|
+
f1 as w,
|
|
4526
|
+
$ as x,
|
|
4527
|
+
o1 as y,
|
|
4528
|
+
R as z
|
|
4334
4529
|
};
|