@duyluonganduin/acl-web-components 0.0.27 → 0.0.28
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 +53 -0
- package/dist/acl-web-components.iife.js +220 -110
- package/dist/acl-web-components.js +83 -79
- package/dist/{anduin-suggestion-Bk4AI23P.cjs → anduin-navigation-BgreqvTv.cjs} +234 -124
- package/dist/{anduin-suggestion-BtKSMXua.js → anduin-navigation-DjjsY3gb.js} +1260 -1036
- package/dist/jsx.d.ts +25 -0
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +57 -0
- package/dist/react.js +99 -87
- 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
|
|
6
|
+
const q1 = globalThis, R2 = q1.ShadowRoot && (q1.ShadyCSS === void 0 || q1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, k2 = Symbol(), $5 = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let t4 = class {
|
|
8
8
|
constructor(e, t, i) {
|
|
9
|
-
if (this._$cssResult$ = !0, i !==
|
|
9
|
+
if (this._$cssResult$ = !0, i !== k2) 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 (
|
|
15
|
+
if (R2 && e === void 0) {
|
|
16
16
|
const i = t !== void 0 && t.length === 1;
|
|
17
|
-
i && (e =
|
|
17
|
+
i && (e = $5.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && $5.set(t, e));
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let Y5 = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const Z4 = (l) => new t4(typeof l == "string" ? l : l + "", void 0, k2), g = (l, ...e) => {
|
|
26
26
|
const t = l.length === 1 ? l[0] : e.reduce((i, o, r) => i + ((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
30
|
})(o) + l[r + 1], l[0]);
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
31
|
+
return new t4(t, l, k2);
|
|
32
|
+
}, _4 = (l, e) => {
|
|
33
|
+
if (R2) l.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
34
|
else for (const t of e) {
|
|
35
|
-
const i = document.createElement("style"), o =
|
|
35
|
+
const i = document.createElement("style"), o = q1.litNonce;
|
|
36
36
|
o !== void 0 && i.setAttribute("nonce", o), i.textContent = t.cssText, l.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, E5 = R2 ? (l) => l : (l) => l instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let t = "";
|
|
40
40
|
for (const i of e.cssRules) t += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Z4(t);
|
|
42
42
|
})(l) : l;
|
|
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: x4, defineProperty: w4, getOwnPropertyDescriptor: R4, getOwnPropertyNames: k4, getOwnPropertySymbols: $4, getPrototypeOf: E4 } = Object, W = globalThis, A5 = W.trustedTypes, A4 = A5 ? A5.emptyScript : "", l2 = W.reactiveElementPolyfillSupport, M1 = (l, e) => l, G1 = { toAttribute(l, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
l = l ?
|
|
51
|
+
l = l ? A4 : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,44 +73,44 @@ const { is: m4, defineProperty: b4, getOwnPropertyDescriptor: M4, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
let
|
|
76
|
+
} }, $2 = (l, e) => !x4(l, e), z5 = { attribute: !0, type: String, converter: G1, reflect: !1, useDefault: !1, hasChanged: $2 };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), W.litPropertyMetadata ?? (W.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let h1 = 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 = z5) {
|
|
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
87
|
const i = Symbol(), o = this.getPropertyDescriptor(e, i, t);
|
|
88
|
-
o !== void 0 &&
|
|
88
|
+
o !== void 0 && w4(this.prototype, e, o);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(e, t, i) {
|
|
92
|
-
const { get: o, set: r } =
|
|
92
|
+
const { get: o, set: r } = R4(this.prototype, e) ?? { get() {
|
|
93
93
|
return this[t];
|
|
94
94
|
}, set(n) {
|
|
95
95
|
this[t] = n;
|
|
96
96
|
} };
|
|
97
97
|
return { get: o, set(n) {
|
|
98
|
-
const
|
|
99
|
-
r == null || r.call(this, n), this.requestUpdate(e,
|
|
98
|
+
const s = o == null ? void 0 : o.call(this);
|
|
99
|
+
r == null || r.call(this, n), this.requestUpdate(e, s, i);
|
|
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) ?? z5;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
107
|
-
const e =
|
|
106
|
+
if (this.hasOwnProperty(M1("elementProperties"))) return;
|
|
107
|
+
const e = E4(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, i = [...
|
|
111
|
+
if (this.hasOwnProperty(M1("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M1("properties"))) {
|
|
113
|
+
const t = this.properties, i = [...k4(t), ...$4(t)];
|
|
114
114
|
for (const o of i) this.createProperty(o, t[o]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
@@ -129,8 +129,8 @@ let c1 = class extends HTMLElement {
|
|
|
129
129
|
const t = [];
|
|
130
130
|
if (Array.isArray(e)) {
|
|
131
131
|
const i = new Set(e.flat(1 / 0).reverse());
|
|
132
|
-
for (const o of i) t.unshift(
|
|
133
|
-
} else e !== void 0 && t.push(
|
|
132
|
+
for (const o of i) t.unshift(E5(o));
|
|
133
|
+
} else e !== void 0 && t.push(E5(e));
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(e, t) {
|
|
@@ -159,7 +159,7 @@ let c1 = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return _4(e, this.constructor.elementStyles), e;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var e;
|
|
@@ -184,7 +184,7 @@ let c1 = class extends HTMLElement {
|
|
|
184
184
|
var r;
|
|
185
185
|
const i = this.constructor.elementProperties.get(e), o = this.constructor._$Eu(e, i);
|
|
186
186
|
if (o !== void 0 && i.reflect === !0) {
|
|
187
|
-
const n = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter :
|
|
187
|
+
const n = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : G1).toAttribute(t, i.type);
|
|
188
188
|
this._$Em = e, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -192,17 +192,17 @@ let c1 = class extends HTMLElement {
|
|
|
192
192
|
var r, n;
|
|
193
193
|
const i = this.constructor, o = i._$Eh.get(e);
|
|
194
194
|
if (o !== void 0 && this._$Em !== o) {
|
|
195
|
-
const
|
|
195
|
+
const s = i.getPropertyOptions(o), d = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((r = s.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? s.converter : G1;
|
|
196
196
|
this._$Em = o;
|
|
197
|
-
const p = d.fromAttribute(t,
|
|
197
|
+
const p = d.fromAttribute(t, s.type);
|
|
198
198
|
this[o] = p ?? ((n = this._$Ej) == null ? void 0 : n.get(o)) ?? p, this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(e, t, i, o = !1, r) {
|
|
202
202
|
var n;
|
|
203
203
|
if (e !== void 0) {
|
|
204
|
-
const
|
|
205
|
-
if (o === !1 && (r = this[e]), i ?? (i =
|
|
204
|
+
const s = this.constructor;
|
|
205
|
+
if (o === !1 && (r = this[e]), i ?? (i = s.getPropertyOptions(e)), !((i.hasChanged ?? $2)(r, t) || i.useDefault && i.reflect && r === ((n = this._$Ej) == null ? void 0 : n.get(e)) && !this.hasAttribute(s._$Eu(e, i)))) return;
|
|
206
206
|
this.C(e, t, i);
|
|
207
207
|
}
|
|
208
208
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -233,8 +233,8 @@ let c1 = class extends HTMLElement {
|
|
|
233
233
|
}
|
|
234
234
|
const o = this.constructor.elementProperties;
|
|
235
235
|
if (o.size > 0) for (const [r, n] of o) {
|
|
236
|
-
const { wrapped:
|
|
237
|
-
|
|
236
|
+
const { wrapped: s } = n, d = this[r];
|
|
237
|
+
s !== !0 || this._$AL.has(r) || d === void 0 || this.C(r, void 0, n, d);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
let e = !1;
|
|
@@ -278,76 +278,76 @@ let c1 = class extends HTMLElement {
|
|
|
278
278
|
firstUpdated(e) {
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
|
|
281
|
+
h1.elementStyles = [], h1.shadowRootOptions = { mode: "open" }, h1[M1("elementProperties")] = /* @__PURE__ */ new Map(), h1[M1("finalized")] = /* @__PURE__ */ new Map(), l2 == null || l2({ ReactiveElement: h1 }), (W.reactiveElementVersions ?? (W.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 Z1 = globalThis, B5 = (l) => l, W1 = Z1.trustedTypes, S5 = W1 ? W1.createPolicy("lit-html", { createHTML: (l) => l }) : void 0, o4 = "$lit$", G = `lit$${Math.random().toFixed(9).slice(2)}$`, i4 = "?" + G, z4 = `<${i4}>`, n1 = document, _1 = () => n1.createComment(""), x1 = (l) => l === null || typeof l != "object" && typeof l != "function", E2 = Array.isArray, B4 = (l) => E2(l) || typeof (l == null ? void 0 : l[Symbol.iterator]) == "function", r2 = `[
|
|
288
|
+
\f\r]`, b1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, P5 = /-->/g, F5 = />/g, i1 = RegExp(`>|${r2}(?:([^\\s"'>=/]+)(${r2}*=${r2}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), O5 = /'/g, D5 = /"/g, l4 = /^(?:script|style|textarea|title)$/i, r4 = (l) => (e, ...t) => ({ _$litType$: l, strings: e, values: t }), C = r4(1), Y1 = r4(2), a1 = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), I5 = /* @__PURE__ */ new WeakMap(), l1 = n1.createTreeWalker(n1, 129);
|
|
290
|
+
function n4(l, e) {
|
|
291
|
+
if (!E2(l) || !l.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
|
+
return S5 !== void 0 ? S5.createHTML(e) : e;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const S4 = (l, e) => {
|
|
295
295
|
const t = l.length - 1, i = [];
|
|
296
|
-
let o, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n =
|
|
297
|
-
for (let
|
|
298
|
-
const d = l[
|
|
299
|
-
let p,
|
|
300
|
-
for (; H < d.length && (n.lastIndex = H,
|
|
301
|
-
const f = n ===
|
|
302
|
-
r += n ===
|
|
303
|
-
}
|
|
304
|
-
return [
|
|
296
|
+
let o, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = b1;
|
|
297
|
+
for (let s = 0; s < t; s++) {
|
|
298
|
+
const d = l[s];
|
|
299
|
+
let p, h, v = -1, H = 0;
|
|
300
|
+
for (; H < d.length && (n.lastIndex = H, h = n.exec(d), h !== null); ) H = n.lastIndex, n === b1 ? h[1] === "!--" ? n = P5 : h[1] !== void 0 ? n = F5 : h[2] !== void 0 ? (l4.test(h[2]) && (o = RegExp("</" + h[2], "g")), n = i1) : h[3] !== void 0 && (n = i1) : n === i1 ? h[0] === ">" ? (n = o ?? b1, v = -1) : h[1] === void 0 ? v = -2 : (v = n.lastIndex - h[2].length, p = h[1], n = h[3] === void 0 ? i1 : h[3] === '"' ? D5 : O5) : n === D5 || n === O5 ? n = i1 : n === P5 || n === F5 ? n = b1 : (n = i1, o = void 0);
|
|
301
|
+
const f = n === i1 && l[s + 1].startsWith("/>") ? " " : "";
|
|
302
|
+
r += n === b1 ? d + z4 : v >= 0 ? (i.push(p), d.slice(0, v) + o4 + d.slice(v) + G + f) : d + G + (v === -2 ? s : f);
|
|
303
|
+
}
|
|
304
|
+
return [n4(l, r + (l[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
305
305
|
};
|
|
306
|
-
class
|
|
306
|
+
class w1 {
|
|
307
307
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
308
308
|
let o;
|
|
309
309
|
this.parts = [];
|
|
310
310
|
let r = 0, n = 0;
|
|
311
|
-
const
|
|
312
|
-
if (this.el =
|
|
313
|
-
const
|
|
314
|
-
|
|
311
|
+
const s = e.length - 1, d = this.parts, [p, h] = S4(e, t);
|
|
312
|
+
if (this.el = w1.createElement(p, i), l1.currentNode = this.el.content, t === 2 || t === 3) {
|
|
313
|
+
const v = this.el.content.firstChild;
|
|
314
|
+
v.replaceWith(...v.childNodes);
|
|
315
315
|
}
|
|
316
|
-
for (; (o =
|
|
316
|
+
for (; (o = l1.nextNode()) !== null && d.length < s; ) {
|
|
317
317
|
if (o.nodeType === 1) {
|
|
318
|
-
if (o.hasAttributes()) for (const
|
|
319
|
-
const H =
|
|
320
|
-
d.push({ type: 1, index: r, name: Z[2], strings: f, ctor: Z[1] === "." ?
|
|
321
|
-
} else
|
|
322
|
-
if (
|
|
323
|
-
const
|
|
318
|
+
if (o.hasAttributes()) for (const v of o.getAttributeNames()) if (v.endsWith(o4)) {
|
|
319
|
+
const H = h[n++], f = o.getAttribute(v).split(G), Z = /([.?@])?(.*)/.exec(H);
|
|
320
|
+
d.push({ type: 1, index: r, name: Z[2], strings: f, ctor: Z[1] === "." ? F4 : Z[1] === "?" ? O4 : Z[1] === "@" ? D4 : o2 }), o.removeAttribute(v);
|
|
321
|
+
} else v.startsWith(G) && (d.push({ type: 6, index: r }), o.removeAttribute(v));
|
|
322
|
+
if (l4.test(o.tagName)) {
|
|
323
|
+
const v = o.textContent.split(G), H = v.length - 1;
|
|
324
324
|
if (H > 0) {
|
|
325
|
-
o.textContent =
|
|
326
|
-
for (let f = 0; f < H; f++) o.append(
|
|
327
|
-
o.append(
|
|
325
|
+
o.textContent = W1 ? W1.emptyScript : "";
|
|
326
|
+
for (let f = 0; f < H; f++) o.append(v[f], _1()), l1.nextNode(), d.push({ type: 2, index: ++r });
|
|
327
|
+
o.append(v[H], _1());
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
} else if (o.nodeType === 8) if (o.data ===
|
|
330
|
+
} else if (o.nodeType === 8) if (o.data === i4) d.push({ type: 2, index: r });
|
|
331
331
|
else {
|
|
332
|
-
let
|
|
333
|
-
for (; (
|
|
332
|
+
let v = -1;
|
|
333
|
+
for (; (v = o.data.indexOf(G, v + 1)) !== -1; ) d.push({ type: 7, index: r }), v += G.length - 1;
|
|
334
334
|
}
|
|
335
335
|
r++;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
static createElement(e, t) {
|
|
339
|
-
const i =
|
|
339
|
+
const i = n1.createElement("template");
|
|
340
340
|
return i.innerHTML = e, i;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
var n,
|
|
345
|
-
if (e ===
|
|
343
|
+
function g1(l, e, t = l, i) {
|
|
344
|
+
var n, s;
|
|
345
|
+
if (e === a1) return e;
|
|
346
346
|
let o = i !== void 0 ? (n = t._$Co) == null ? void 0 : n[i] : t._$Cl;
|
|
347
|
-
const r =
|
|
348
|
-
return (o == null ? void 0 : o.constructor) !== r && ((
|
|
347
|
+
const r = x1(e) ? void 0 : e._$litDirective$;
|
|
348
|
+
return (o == null ? void 0 : o.constructor) !== r && ((s = o == null ? void 0 : o._$AO) == null || s.call(o, !1), r === void 0 ? o = void 0 : (o = new r(l), o._$AT(l, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = o : t._$Cl = o), o !== void 0 && (e = g1(l, o._$AS(l, e.values), o, i)), e;
|
|
349
349
|
}
|
|
350
|
-
class
|
|
350
|
+
class P4 {
|
|
351
351
|
constructor(e, t) {
|
|
352
352
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
353
353
|
}
|
|
@@ -358,24 +358,24 @@ class $4 {
|
|
|
358
358
|
return this._$AM._$AU;
|
|
359
359
|
}
|
|
360
360
|
u(e) {
|
|
361
|
-
const { el: { content: t }, parts: i } = this._$AD, o = ((e == null ? void 0 : e.creationScope) ??
|
|
362
|
-
|
|
363
|
-
let r =
|
|
361
|
+
const { el: { content: t }, parts: i } = this._$AD, o = ((e == null ? void 0 : e.creationScope) ?? n1).importNode(t, !0);
|
|
362
|
+
l1.currentNode = o;
|
|
363
|
+
let r = l1.nextNode(), n = 0, s = 0, d = i[0];
|
|
364
364
|
for (; d !== void 0; ) {
|
|
365
365
|
if (n === d.index) {
|
|
366
366
|
let p;
|
|
367
|
-
d.type === 2 ? p = new
|
|
367
|
+
d.type === 2 ? p = new T1(r, r.nextSibling, this, e) : d.type === 1 ? p = new d.ctor(r, d.name, d.strings, this, e) : d.type === 6 && (p = new I4(r, this, e)), this._$AV.push(p), d = i[++s];
|
|
368
368
|
}
|
|
369
|
-
n !== (d == null ? void 0 : d.index) && (r =
|
|
369
|
+
n !== (d == null ? void 0 : d.index) && (r = l1.nextNode(), n++);
|
|
370
370
|
}
|
|
371
|
-
return
|
|
371
|
+
return l1.currentNode = n1, o;
|
|
372
372
|
}
|
|
373
373
|
p(e) {
|
|
374
374
|
let t = 0;
|
|
375
375
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, t), t += i.strings.length - 2) : i._$AI(e[t])), t++;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
class
|
|
378
|
+
class T1 {
|
|
379
379
|
get _$AU() {
|
|
380
380
|
var e;
|
|
381
381
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
@@ -395,7 +395,7 @@ class O1 {
|
|
|
395
395
|
return this._$AB;
|
|
396
396
|
}
|
|
397
397
|
_$AI(e, t = this) {
|
|
398
|
-
e =
|
|
398
|
+
e = g1(this, e, t), x1(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== a1 && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : B4(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 O1 {
|
|
|
404
404
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
405
405
|
}
|
|
406
406
|
_(e) {
|
|
407
|
-
this._$AH !== c &&
|
|
407
|
+
this._$AH !== c && x1(this._$AH) ? this._$AA.nextSibling.data = e : this.T(n1.createTextNode(e)), this._$AH = e;
|
|
408
408
|
}
|
|
409
409
|
$(e) {
|
|
410
410
|
var r;
|
|
411
|
-
const { values: t, _$litType$: i } = e, o = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el =
|
|
411
|
+
const { values: t, _$litType$: i } = e, o = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = w1.createElement(n4(i.h, i.h[0]), this.options)), i);
|
|
412
412
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === o) this._$AH.p(t);
|
|
413
413
|
else {
|
|
414
|
-
const n = new
|
|
415
|
-
n.p(t), this.T(
|
|
414
|
+
const n = new P4(o, this), s = n.u(this.options);
|
|
415
|
+
n.p(t), this.T(s), this._$AH = n;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
_$AC(e) {
|
|
419
|
-
let t =
|
|
420
|
-
return t === void 0 &&
|
|
419
|
+
let t = I5.get(e.strings);
|
|
420
|
+
return t === void 0 && I5.set(e.strings, t = new w1(e)), t;
|
|
421
421
|
}
|
|
422
422
|
k(e) {
|
|
423
|
-
|
|
423
|
+
E2(this._$AH) || (this._$AH = [], this._$AR());
|
|
424
424
|
const t = this._$AH;
|
|
425
425
|
let i, o = 0;
|
|
426
|
-
for (const r of e) o === t.length ? t.push(i = new
|
|
426
|
+
for (const r of e) o === t.length ? t.push(i = new T1(this.O(_1()), this.O(_1()), this, this.options)) : i = t[o], i._$AI(r), o++;
|
|
427
427
|
o < t.length && (this._$AR(i && i._$AB.nextSibling, o), t.length = o);
|
|
428
428
|
}
|
|
429
429
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
430
430
|
var i;
|
|
431
431
|
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
432
|
-
const o =
|
|
433
|
-
|
|
432
|
+
const o = B5(e).nextSibling;
|
|
433
|
+
B5(e).remove(), e = o;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
setConnected(e) {
|
|
@@ -438,7 +438,7 @@ class O1 {
|
|
|
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 o2 {
|
|
442
442
|
get tagName() {
|
|
443
443
|
return this.element.tagName;
|
|
444
444
|
}
|
|
@@ -451,11 +451,11 @@ class Q1 {
|
|
|
451
451
|
_$AI(e, t = this, i, o) {
|
|
452
452
|
const r = this.strings;
|
|
453
453
|
let n = !1;
|
|
454
|
-
if (r === void 0) e =
|
|
454
|
+
if (r === void 0) e = g1(this, e, t, 0), n = !x1(e) || e !== this._$AH && e !== a1, n && (this._$AH = e);
|
|
455
455
|
else {
|
|
456
|
-
const
|
|
456
|
+
const s = e;
|
|
457
457
|
let d, p;
|
|
458
|
-
for (e = r[0], d = 0; d < r.length - 1; d++) p =
|
|
458
|
+
for (e = r[0], d = 0; d < r.length - 1; d++) p = g1(this, s[i + d], t, d), p === a1 && (p = this._$AH[d]), n || (n = !x1(p) || p !== this._$AH[d]), p === c ? e = c : e !== c && (e += (p ?? "") + r[d + 1]), this._$AH[d] = p;
|
|
459
459
|
}
|
|
460
460
|
n && !o && this.j(e);
|
|
461
461
|
}
|
|
@@ -463,7 +463,7 @@ class Q1 {
|
|
|
463
463
|
e === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
class
|
|
466
|
+
class F4 extends o2 {
|
|
467
467
|
constructor() {
|
|
468
468
|
super(...arguments), this.type = 3;
|
|
469
469
|
}
|
|
@@ -471,7 +471,7 @@ class E4 extends Q1 {
|
|
|
471
471
|
this.element[this.name] = e === c ? void 0 : e;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
class
|
|
474
|
+
class O4 extends o2 {
|
|
475
475
|
constructor() {
|
|
476
476
|
super(...arguments), this.type = 4;
|
|
477
477
|
}
|
|
@@ -479,12 +479,12 @@ class A4 extends Q1 {
|
|
|
479
479
|
this.element.toggleAttribute(this.name, !!e && e !== c);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
class
|
|
482
|
+
class D4 extends o2 {
|
|
483
483
|
constructor(e, t, i, o, r) {
|
|
484
484
|
super(e, t, i, o, r), this.type = 5;
|
|
485
485
|
}
|
|
486
486
|
_$AI(e, t = this) {
|
|
487
|
-
if ((e =
|
|
487
|
+
if ((e = g1(this, e, t, 0) ?? c) === a1) return;
|
|
488
488
|
const i = this._$AH, o = e === c && i !== c || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, r = e !== c && (i === c || o);
|
|
489
489
|
o && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
490
490
|
}
|
|
@@ -493,7 +493,7 @@ class z4 extends Q1 {
|
|
|
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
|
|
496
|
+
class I4 {
|
|
497
497
|
constructor(e, t, i) {
|
|
498
498
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
|
|
499
499
|
}
|
|
@@ -501,17 +501,17 @@ class B4 {
|
|
|
501
501
|
return this._$AM._$AU;
|
|
502
502
|
}
|
|
503
503
|
_$AI(e) {
|
|
504
|
-
|
|
504
|
+
g1(this, e);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
const
|
|
507
|
+
const n2 = Z1.litHtmlPolyfillSupport;
|
|
508
|
+
n2 == null || n2(w1, T1), (Z1.litHtmlVersions ?? (Z1.litHtmlVersions = [])).push("3.3.2");
|
|
509
|
+
const T4 = (l, e, t) => {
|
|
510
510
|
const i = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
511
511
|
let o = i._$litPart$;
|
|
512
512
|
if (o === void 0) {
|
|
513
513
|
const r = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
514
|
-
i._$litPart$ = o = new
|
|
514
|
+
i._$litPart$ = o = new T1(e.insertBefore(_1(), r), r, void 0, t ?? {});
|
|
515
515
|
}
|
|
516
516
|
return o._$AI(l), o;
|
|
517
517
|
};
|
|
@@ -520,8 +520,8 @@ const S4 = (l, e, t) => {
|
|
|
520
520
|
* Copyright 2017 Google LLC
|
|
521
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
522
|
*/
|
|
523
|
-
const
|
|
524
|
-
let
|
|
523
|
+
const r1 = globalThis;
|
|
524
|
+
let u = class extends h1 {
|
|
525
525
|
constructor() {
|
|
526
526
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
527
527
|
}
|
|
@@ -532,7 +532,7 @@ let h = class extends c1 {
|
|
|
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 = T4(t, this.renderRoot, this.renderOptions);
|
|
536
536
|
}
|
|
537
537
|
connectedCallback() {
|
|
538
538
|
var e;
|
|
@@ -543,42 +543,42 @@ let h = class extends c1 {
|
|
|
543
543
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
544
544
|
}
|
|
545
545
|
render() {
|
|
546
|
-
return
|
|
546
|
+
return a1;
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
var
|
|
550
|
-
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
(
|
|
549
|
+
var e4;
|
|
550
|
+
u._$litElement$ = !0, u.finalized = !0, (e4 = r1.litElementHydrateSupport) == null || e4.call(r1, { LitElement: u });
|
|
551
|
+
const a2 = r1.litElementPolyfillSupport;
|
|
552
|
+
a2 == null || a2({ LitElement: u });
|
|
553
|
+
(r1.litElementVersions ?? (r1.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
|
|
559
|
+
const N4 = { attribute: !0, type: String, converter: G1, reflect: !1, hasChanged: $2 }, j4 = (l = N4, e, t) => {
|
|
560
560
|
const { kind: i, metadata: o } = t;
|
|
561
561
|
let r = globalThis.litPropertyMetadata.get(o);
|
|
562
562
|
if (r === void 0 && globalThis.litPropertyMetadata.set(o, r = /* @__PURE__ */ new Map()), i === "setter" && ((l = Object.create(l)).wrapped = !0), r.set(t.name, l), i === "accessor") {
|
|
563
563
|
const { name: n } = t;
|
|
564
|
-
return { set(
|
|
564
|
+
return { set(s) {
|
|
565
565
|
const d = e.get.call(this);
|
|
566
|
-
e.set.call(this,
|
|
567
|
-
}, init(
|
|
568
|
-
return
|
|
566
|
+
e.set.call(this, s), this.requestUpdate(n, d, l, !0, s);
|
|
567
|
+
}, init(s) {
|
|
568
|
+
return s !== void 0 && this.C(n, void 0, l, s), s;
|
|
569
569
|
} };
|
|
570
570
|
}
|
|
571
571
|
if (i === "setter") {
|
|
572
572
|
const { name: n } = t;
|
|
573
|
-
return function(
|
|
573
|
+
return function(s) {
|
|
574
574
|
const d = this[n];
|
|
575
|
-
e.call(this,
|
|
575
|
+
e.call(this, s), this.requestUpdate(n, d, l, !0, s);
|
|
576
576
|
};
|
|
577
577
|
}
|
|
578
578
|
throw Error("Unsupported decorator location: " + i);
|
|
579
579
|
};
|
|
580
580
|
function a(l) {
|
|
581
|
-
return (e, t) => typeof t == "object" ?
|
|
581
|
+
return (e, t) => typeof t == "object" ? j4(l, e, t) : ((i, o, r) => {
|
|
582
582
|
const n = o.hasOwnProperty(r);
|
|
583
583
|
return o.constructor.createProperty(r, i), n ? Object.getOwnPropertyDescriptor(o, r) : void 0;
|
|
584
584
|
})(l, e, t);
|
|
@@ -588,7 +588,7 @@ function a(l) {
|
|
|
588
588
|
* Copyright 2017 Google LLC
|
|
589
589
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
590
590
|
*/
|
|
591
|
-
function
|
|
591
|
+
function b(l) {
|
|
592
592
|
return a({ ...l, state: !0, attribute: !1 });
|
|
593
593
|
}
|
|
594
594
|
/**
|
|
@@ -596,7 +596,7 @@ function M(l) {
|
|
|
596
596
|
* Copyright 2017 Google LLC
|
|
597
597
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
598
598
|
*/
|
|
599
|
-
const
|
|
599
|
+
const U4 = (l, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(l, e, t), t);
|
|
600
600
|
/**
|
|
601
601
|
* @license
|
|
602
602
|
* Copyright 2017 Google LLC
|
|
@@ -605,20 +605,20 @@ const O4 = (l, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorat
|
|
|
605
605
|
function k(l, e) {
|
|
606
606
|
return (t, i, o) => {
|
|
607
607
|
const r = (n) => {
|
|
608
|
-
var
|
|
609
|
-
return ((
|
|
608
|
+
var s;
|
|
609
|
+
return ((s = n.renderRoot) == null ? void 0 : s.querySelector(l)) ?? null;
|
|
610
610
|
};
|
|
611
|
-
return
|
|
611
|
+
return U4(t, i, { get() {
|
|
612
612
|
return r(this);
|
|
613
613
|
} });
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
var
|
|
616
|
+
var q4 = Object.defineProperty, a4 = (l, e, t, i) => {
|
|
617
617
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
618
618
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
619
|
-
return o &&
|
|
619
|
+
return o && q4(e, t, o), o;
|
|
620
620
|
};
|
|
621
|
-
const
|
|
621
|
+
const S2 = class S2 extends u {
|
|
622
622
|
constructor() {
|
|
623
623
|
super(...arguments), this.size = "medium", this.percent = "";
|
|
624
624
|
}
|
|
@@ -640,8 +640,8 @@ const E2 = class E2 extends h {
|
|
|
640
640
|
const [e, t] = this.getSizeParams(this.size), i = this.percent === "" || this.percent === null;
|
|
641
641
|
let o;
|
|
642
642
|
i ? o = 0.75 * Math.PI * e : o = (1 - Math.max(0, Math.min(1, parseFloat(this.percent) || 0))) * Math.PI * e;
|
|
643
|
-
const r = t / 2, n = t + e,
|
|
644
|
-
return
|
|
643
|
+
const r = t / 2, n = t + e, s = e / 2, d = Math.PI * e;
|
|
644
|
+
return Y1`
|
|
645
645
|
<svg
|
|
646
646
|
class=${i ? "spinner" : ""}
|
|
647
647
|
width="${e}px"
|
|
@@ -654,9 +654,9 @@ const E2 = class E2 extends h {
|
|
|
654
654
|
stroke="currentColor"
|
|
655
655
|
stroke-linecap="round"
|
|
656
656
|
stroke-width="${t}px"
|
|
657
|
-
cx="${
|
|
658
|
-
cy="${
|
|
659
|
-
r="${
|
|
657
|
+
cx="${s}"
|
|
658
|
+
cy="${s}"
|
|
659
|
+
r="${s}"
|
|
660
660
|
stroke-opacity="0.2"
|
|
661
661
|
fill-opacity="0"
|
|
662
662
|
/>
|
|
@@ -664,9 +664,9 @@ const E2 = class E2 extends h {
|
|
|
664
664
|
stroke="currentColor"
|
|
665
665
|
stroke-linecap="round"
|
|
666
666
|
stroke-width="${t}px"
|
|
667
|
-
cx="${
|
|
668
|
-
cy="${
|
|
669
|
-
r="${
|
|
667
|
+
cx="${s}"
|
|
668
|
+
cy="${s}"
|
|
669
|
+
r="${s}"
|
|
670
670
|
fill-opacity="0"
|
|
671
671
|
stroke-dasharray="${d}"
|
|
672
672
|
stroke-dashoffset="${o}"
|
|
@@ -675,31 +675,31 @@ const E2 = class E2 extends h {
|
|
|
675
675
|
`;
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
|
-
|
|
678
|
+
S2.styles = g`
|
|
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 R1 = S2;
|
|
684
|
+
a4([
|
|
685
685
|
a()
|
|
686
|
-
],
|
|
687
|
-
|
|
686
|
+
], R1.prototype, "size");
|
|
687
|
+
a4([
|
|
688
688
|
a()
|
|
689
|
-
],
|
|
690
|
-
customElements.get("anduin-spinner") || customElements.define("anduin-spinner",
|
|
691
|
-
var
|
|
689
|
+
], R1.prototype, "percent");
|
|
690
|
+
customElements.get("anduin-spinner") || customElements.define("anduin-spinner", R1);
|
|
691
|
+
var G4 = Object.defineProperty, s4 = (l, e, t, i) => {
|
|
692
692
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
693
693
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
694
|
-
return o &&
|
|
694
|
+
return o && G4(e, t, o), o;
|
|
695
695
|
};
|
|
696
|
-
const
|
|
696
|
+
const T5 = "M7.23359 3.5336C7.49685 2.82213 8.50314 2.82213 8.76641 3.5336L9.63534 5.88184C9.71811 6.10553 9.89447 6.28189 10.1182 6.36466L12.4664 7.23359C13.1779 7.49685 13.1779 8.50314 12.4664 8.76641L10.1182 9.63534C9.89447 9.71811 9.71811 9.89447 9.63534 10.1182L8.76641 12.4664C8.50314 13.1779 7.49685 13.1779 7.23359 12.4664L6.36466 10.1182C6.28189 9.89447 6.10553 9.71811 5.88185 9.63534L3.5336 8.76641C2.82213 8.50314 2.82213 7.49685 3.5336 7.23359L5.88184 6.36466C6.10553 6.28189 6.28189 6.10553 6.36466 5.88185L7.23359 3.5336Z", W4 = { small: 16, medium: 24, large: 32 }, P2 = class P2 extends u {
|
|
697
697
|
constructor() {
|
|
698
698
|
super(...arguments), this.size = "small", this.color = "default";
|
|
699
699
|
}
|
|
700
700
|
render() {
|
|
701
|
-
const e =
|
|
702
|
-
return
|
|
701
|
+
const e = W4[this.size] ?? 16;
|
|
702
|
+
return Y1`
|
|
703
703
|
<svg
|
|
704
704
|
xmlns="http://www.w3.org/2000/svg"
|
|
705
705
|
width="${e}"
|
|
@@ -708,13 +708,13 @@ const S5 = "M7.23359 3.5336C7.49685 2.82213 8.50314 2.82213 8.76641 3.5336L9.635
|
|
|
708
708
|
fill="currentColor"
|
|
709
709
|
overflow="visible"
|
|
710
710
|
>
|
|
711
|
-
<path class="star" d="${
|
|
712
|
-
<path class="star star-2" d="${
|
|
711
|
+
<path class="star" d="${T5}"/>
|
|
712
|
+
<path class="star star-2" d="${T5}"/>
|
|
713
713
|
</svg>
|
|
714
714
|
`;
|
|
715
715
|
}
|
|
716
716
|
};
|
|
717
|
-
|
|
717
|
+
P2.styles = g`
|
|
718
718
|
:host { display: inline-block; line-height: 0; }
|
|
719
719
|
|
|
720
720
|
/* ── Colors ─────────────────────────────────────────────────── */
|
|
@@ -753,15 +753,15 @@ A2.styles = v`
|
|
|
753
753
|
100% { transform: translate(12px, 12px) scale(0.5); opacity: 0; }
|
|
754
754
|
}
|
|
755
755
|
`;
|
|
756
|
-
let
|
|
757
|
-
|
|
756
|
+
let k1 = P2;
|
|
757
|
+
s4([
|
|
758
758
|
a({ reflect: !0 })
|
|
759
|
-
],
|
|
760
|
-
|
|
759
|
+
], k1.prototype, "size");
|
|
760
|
+
s4([
|
|
761
761
|
a({ reflect: !0 })
|
|
762
|
-
],
|
|
763
|
-
customElements.get("anduin-sparkle-spinner") || customElements.define("anduin-sparkle-spinner",
|
|
764
|
-
const
|
|
762
|
+
], k1.prototype, "color");
|
|
763
|
+
customElements.get("anduin-sparkle-spinner") || customElements.define("anduin-sparkle-spinner", k1);
|
|
764
|
+
const N5 = {
|
|
765
765
|
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" }],
|
|
766
766
|
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" }],
|
|
767
767
|
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" }],
|
|
@@ -1110,18 +1110,18 @@ const P5 = {
|
|
|
1110
1110
|
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" }],
|
|
1111
1111
|
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" }]
|
|
1112
1112
|
};
|
|
1113
|
-
var
|
|
1113
|
+
var Y4 = Object.defineProperty, C4 = (l, e, t, i) => {
|
|
1114
1114
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1115
1115
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1116
|
-
return o &&
|
|
1116
|
+
return o && Y4(e, t, o), o;
|
|
1117
1117
|
};
|
|
1118
|
-
const
|
|
1118
|
+
const F2 = class F2 extends u {
|
|
1119
1119
|
constructor() {
|
|
1120
1120
|
super(...arguments), this.name = "", this.size = 16;
|
|
1121
1121
|
}
|
|
1122
1122
|
render() {
|
|
1123
|
-
const e = this.name &&
|
|
1124
|
-
return
|
|
1123
|
+
const e = this.name && N5[this.name] ? N5[this.name] : [], t = !this.name;
|
|
1124
|
+
return Y1`
|
|
1125
1125
|
<svg
|
|
1126
1126
|
class=${t ? "icon--hidden" : ""}
|
|
1127
1127
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1131,7 +1131,7 @@ const z2 = class z2 extends h {
|
|
|
1131
1131
|
viewBox="0 0 16 16"
|
|
1132
1132
|
>
|
|
1133
1133
|
${e.map(
|
|
1134
|
-
(i) =>
|
|
1134
|
+
(i) => Y1`
|
|
1135
1135
|
<path
|
|
1136
1136
|
fill="currentColor"
|
|
1137
1137
|
d="${i.d}"
|
|
@@ -1143,24 +1143,24 @@ const z2 = class z2 extends h {
|
|
|
1143
1143
|
`;
|
|
1144
1144
|
}
|
|
1145
1145
|
};
|
|
1146
|
-
|
|
1146
|
+
F2.styles = g`
|
|
1147
1147
|
:host { display: block; line-height: 0; font-family: var(--font-sans); }
|
|
1148
1148
|
.icon--hidden { display: none; }
|
|
1149
1149
|
`;
|
|
1150
|
-
let
|
|
1151
|
-
|
|
1150
|
+
let $1 = F2;
|
|
1151
|
+
C4([
|
|
1152
1152
|
a()
|
|
1153
|
-
],
|
|
1154
|
-
|
|
1153
|
+
], $1.prototype, "name");
|
|
1154
|
+
C4([
|
|
1155
1155
|
a({ type: Number })
|
|
1156
|
-
],
|
|
1157
|
-
customElements.get("anduin-icon") || customElements.define("anduin-icon",
|
|
1158
|
-
var
|
|
1156
|
+
], $1.prototype, "size");
|
|
1157
|
+
customElements.get("anduin-icon") || customElements.define("anduin-icon", $1);
|
|
1158
|
+
var X4 = Object.defineProperty, K4 = (l, e, t, i) => {
|
|
1159
1159
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1160
1160
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1161
|
-
return o &&
|
|
1161
|
+
return o && X4(e, t, o), o;
|
|
1162
1162
|
};
|
|
1163
|
-
const
|
|
1163
|
+
const d4 = g`
|
|
1164
1164
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1165
1165
|
.badge {
|
|
1166
1166
|
border-radius: 9999px;
|
|
@@ -1187,7 +1187,7 @@ const l4 = v`
|
|
|
1187
1187
|
.badge--bold-warning { background-color: var(--color-semantic-warning-3); color: var(--color-semantic-gray-8); }
|
|
1188
1188
|
.badge--hidden { display: none; }
|
|
1189
1189
|
`;
|
|
1190
|
-
function
|
|
1190
|
+
function c4(l) {
|
|
1191
1191
|
return {
|
|
1192
1192
|
gray: "badge--light-gray",
|
|
1193
1193
|
primary: "badge--light-primary",
|
|
@@ -1201,27 +1201,27 @@ function r4(l) {
|
|
|
1201
1201
|
boldDanger: "badge--bold-danger"
|
|
1202
1202
|
}[l || "gray"] || "badge--light-gray";
|
|
1203
1203
|
}
|
|
1204
|
-
const
|
|
1204
|
+
const O2 = class O2 extends u {
|
|
1205
1205
|
constructor() {
|
|
1206
1206
|
super(...arguments), this.variant = "gray";
|
|
1207
1207
|
}
|
|
1208
1208
|
render() {
|
|
1209
|
-
const e =
|
|
1210
|
-
return
|
|
1209
|
+
const e = c4(this.variant);
|
|
1210
|
+
return C`<div class="badge ${e}" part="badge"><slot></slot></div>`;
|
|
1211
1211
|
}
|
|
1212
1212
|
};
|
|
1213
|
-
|
|
1214
|
-
let
|
|
1215
|
-
|
|
1213
|
+
O2.styles = [d4];
|
|
1214
|
+
let X1 = O2;
|
|
1215
|
+
K4([
|
|
1216
1216
|
a()
|
|
1217
|
-
],
|
|
1218
|
-
customElements.get("anduin-badge") || customElements.define("anduin-badge",
|
|
1219
|
-
var
|
|
1217
|
+
], X1.prototype, "variant");
|
|
1218
|
+
customElements.get("anduin-badge") || customElements.define("anduin-badge", X1);
|
|
1219
|
+
var J4 = Object.defineProperty, p4 = (l, e, t, i) => {
|
|
1220
1220
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1221
1221
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1222
|
-
return o &&
|
|
1222
|
+
return o && J4(e, t, o), o;
|
|
1223
1223
|
};
|
|
1224
|
-
const
|
|
1224
|
+
const D2 = class D2 extends u {
|
|
1225
1225
|
constructor() {
|
|
1226
1226
|
super(...arguments), this.variant = "gray", this.count = 0;
|
|
1227
1227
|
}
|
|
@@ -1229,33 +1229,33 @@ const S2 = class S2 extends h {
|
|
|
1229
1229
|
return e > 99 ? "99+" : e.toString();
|
|
1230
1230
|
}
|
|
1231
1231
|
render() {
|
|
1232
|
-
const e =
|
|
1232
|
+
const e = c4(this.variant), t = this.count === 0, i = this.count > 0 && this.count < 10, o = [
|
|
1233
1233
|
"badge",
|
|
1234
1234
|
e,
|
|
1235
1235
|
t ? "badge--hidden" : "",
|
|
1236
1236
|
i ? "badge--square" : ""
|
|
1237
1237
|
].filter(Boolean).join(" ");
|
|
1238
|
-
return
|
|
1238
|
+
return C`<div class="${o}" part="badge">${this.formatCount(this.count)}</div>`;
|
|
1239
1239
|
}
|
|
1240
1240
|
};
|
|
1241
|
-
|
|
1242
|
-
let
|
|
1243
|
-
|
|
1241
|
+
D2.styles = [d4];
|
|
1242
|
+
let E1 = D2;
|
|
1243
|
+
p4([
|
|
1244
1244
|
a()
|
|
1245
|
-
],
|
|
1246
|
-
|
|
1245
|
+
], E1.prototype, "variant");
|
|
1246
|
+
p4([
|
|
1247
1247
|
a({ type: Number })
|
|
1248
|
-
],
|
|
1249
|
-
customElements.get("anduin-badge-count") || customElements.define("anduin-badge-count",
|
|
1250
|
-
var
|
|
1248
|
+
], E1.prototype, "count");
|
|
1249
|
+
customElements.get("anduin-badge-count") || customElements.define("anduin-badge-count", E1);
|
|
1250
|
+
var Q4 = Object.defineProperty, _ = (l, e, t, i) => {
|
|
1251
1251
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1252
1252
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1253
|
-
return o &&
|
|
1253
|
+
return o && Q4(e, t, o), o;
|
|
1254
1254
|
};
|
|
1255
|
-
function
|
|
1255
|
+
function e3(l) {
|
|
1256
1256
|
return l.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
|
|
1257
1257
|
}
|
|
1258
|
-
const
|
|
1258
|
+
const I2 = class I2 extends u {
|
|
1259
1259
|
constructor() {
|
|
1260
1260
|
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 = "";
|
|
1261
1261
|
}
|
|
@@ -1272,7 +1272,7 @@ const P2 = class P2 extends h {
|
|
|
1272
1272
|
return this.variant ? this.variant : this.appearance === "filled" ? "gray0" : this.appearance === "text" ? "primary" : "gray9";
|
|
1273
1273
|
}
|
|
1274
1274
|
getSizeKebab() {
|
|
1275
|
-
return
|
|
1275
|
+
return e3(this.size);
|
|
1276
1276
|
}
|
|
1277
1277
|
iconSize() {
|
|
1278
1278
|
return this.size === "tiny" || this.size === "extraSmall" || this.size === "small" ? "12" : "16";
|
|
@@ -1289,15 +1289,15 @@ const P2 = class P2 extends h {
|
|
|
1289
1289
|
this.loading ? "button--loading" : "",
|
|
1290
1290
|
this.selected ? "button--selected" : "",
|
|
1291
1291
|
this.iconOnly && this.appearance !== "text" && !this.fullWidth ? "button--icon-only" : ""
|
|
1292
|
-
].filter(Boolean).join(" "), o =
|
|
1292
|
+
].filter(Boolean).join(" "), o = C`
|
|
1293
1293
|
<div class="button__content button__content--${t}">
|
|
1294
|
-
${this.startIcon ?
|
|
1294
|
+
${this.startIcon ? C`<anduin-icon name="${this.startIcon}" size="${this.iconSize()}"></anduin-icon>` : c}
|
|
1295
1295
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
1296
|
-
${this.endIcon ?
|
|
1296
|
+
${this.endIcon ? C`<anduin-icon name="${this.endIcon}" size="${this.iconSize()}"></anduin-icon>` : c}
|
|
1297
1297
|
</div>
|
|
1298
|
-
${this.loading && this.appearance !== "text" ?
|
|
1298
|
+
${this.loading && this.appearance !== "text" ? C`<div class="button__loading"><anduin-spinner size="small"></anduin-spinner></div>` : c}
|
|
1299
1299
|
`;
|
|
1300
|
-
return this.href ?
|
|
1300
|
+
return this.href ? C`
|
|
1301
1301
|
<a
|
|
1302
1302
|
class="${i}"
|
|
1303
1303
|
href="${this.disabled ? "" : this.href}"
|
|
@@ -1306,7 +1306,7 @@ const P2 = class P2 extends h {
|
|
|
1306
1306
|
download="${this.download || c}"
|
|
1307
1307
|
aria-label="${this.label || c}"
|
|
1308
1308
|
>${o}</a>
|
|
1309
|
-
` :
|
|
1309
|
+
` : C`
|
|
1310
1310
|
<button
|
|
1311
1311
|
type="button"
|
|
1312
1312
|
class="${i}"
|
|
@@ -1316,7 +1316,7 @@ const P2 = class P2 extends h {
|
|
|
1316
1316
|
`;
|
|
1317
1317
|
}
|
|
1318
1318
|
};
|
|
1319
|
-
|
|
1319
|
+
I2.styles = g`
|
|
1320
1320
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1321
1321
|
:host([full-width]) { display: block; width: 100%; }
|
|
1322
1322
|
.button {
|
|
@@ -1429,9 +1429,9 @@ P2.styles = v`
|
|
|
1429
1429
|
.button--icon-only.button--medium { width: 32px; min-width: 32px; padding-left: 0; padding-right: 0; }
|
|
1430
1430
|
.button--icon-only.button--large { width: 40px; min-width: 40px; padding-left: 0; padding-right: 0; }
|
|
1431
1431
|
`;
|
|
1432
|
-
let m =
|
|
1432
|
+
let m = I2;
|
|
1433
1433
|
_([
|
|
1434
|
-
|
|
1434
|
+
b()
|
|
1435
1435
|
], m.prototype, "iconOnly");
|
|
1436
1436
|
_([
|
|
1437
1437
|
a({ converter: (l) => l || "filled" })
|
|
@@ -1476,17 +1476,17 @@ _([
|
|
|
1476
1476
|
a()
|
|
1477
1477
|
], m.prototype, "label");
|
|
1478
1478
|
customElements.get("anduin-button") || customElements.define("anduin-button", m);
|
|
1479
|
-
var
|
|
1479
|
+
var t3 = Object.defineProperty, o3 = (l, e, t, i) => {
|
|
1480
1480
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1481
1481
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1482
|
-
return o &&
|
|
1482
|
+
return o && t3(e, t, o), o;
|
|
1483
1483
|
};
|
|
1484
|
-
const
|
|
1484
|
+
const T2 = class T2 extends u {
|
|
1485
1485
|
constructor() {
|
|
1486
1486
|
super(...arguments), this.variant = "gray";
|
|
1487
1487
|
}
|
|
1488
1488
|
render() {
|
|
1489
|
-
return
|
|
1489
|
+
return C`
|
|
1490
1490
|
<div class="callout callout--${this.variant}" part="callout">
|
|
1491
1491
|
<slot name="icon"></slot>
|
|
1492
1492
|
<div><slot></slot></div>
|
|
@@ -1494,7 +1494,7 @@ const F2 = class F2 extends h {
|
|
|
1494
1494
|
`;
|
|
1495
1495
|
}
|
|
1496
1496
|
};
|
|
1497
|
-
|
|
1497
|
+
T2.styles = g`
|
|
1498
1498
|
:host { display: block; font-family: var(--font-sans); }
|
|
1499
1499
|
.callout {
|
|
1500
1500
|
display: flex; align-items: center; justify-content: center;
|
|
@@ -1506,17 +1506,17 @@ F2.styles = v`
|
|
|
1506
1506
|
.callout--danger { background-color: var(--color-semantic-danger-4); color: var(--color-semantic-gray-0); }
|
|
1507
1507
|
.callout--warning { background-color: var(--color-semantic-warning-3); color: var(--color-semantic-gray-8); }
|
|
1508
1508
|
`;
|
|
1509
|
-
let
|
|
1510
|
-
|
|
1509
|
+
let K1 = T2;
|
|
1510
|
+
o3([
|
|
1511
1511
|
a()
|
|
1512
|
-
],
|
|
1513
|
-
customElements.get("anduin-callout") || customElements.define("anduin-callout",
|
|
1514
|
-
var
|
|
1512
|
+
], K1.prototype, "variant");
|
|
1513
|
+
customElements.get("anduin-callout") || customElements.define("anduin-callout", K1);
|
|
1514
|
+
var i3 = Object.defineProperty, u4 = (l, e, t, i) => {
|
|
1515
1515
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1516
1516
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1517
|
-
return o &&
|
|
1517
|
+
return o && i3(e, t, o), o;
|
|
1518
1518
|
};
|
|
1519
|
-
const
|
|
1519
|
+
const N2 = class N2 extends u {
|
|
1520
1520
|
constructor() {
|
|
1521
1521
|
super(...arguments), this.direction = "horizontal", this.hasContent = !1;
|
|
1522
1522
|
}
|
|
@@ -1534,20 +1534,20 @@ const O2 = class O2 extends h {
|
|
|
1534
1534
|
});
|
|
1535
1535
|
}
|
|
1536
1536
|
render() {
|
|
1537
|
-
return this.direction === "vertical" ? this.hasContent ?
|
|
1537
|
+
return this.direction === "vertical" ? this.hasContent ? C`
|
|
1538
1538
|
<div class="divider--vertical">
|
|
1539
1539
|
<div class="divider__line--vertical"></div>
|
|
1540
1540
|
<div><slot @slotchange=${this.onSlotChange}></slot></div>
|
|
1541
1541
|
<div class="divider__line--vertical"></div>
|
|
1542
|
-
</div>` :
|
|
1542
|
+
</div>` : C`<div class="divider--vertical divider--vertical-empty"><slot @slotchange=${this.onSlotChange}></slot></div>` : this.hasContent ? C`
|
|
1543
1543
|
<div class="divider--horizontal">
|
|
1544
1544
|
<div class="divider__line--horizontal"></div>
|
|
1545
1545
|
<div><slot @slotchange=${this.onSlotChange}></slot></div>
|
|
1546
1546
|
<div class="divider__line--horizontal"></div>
|
|
1547
|
-
</div>` :
|
|
1547
|
+
</div>` : C`<div class="divider--horizontal divider--horizontal-empty"><slot @slotchange=${this.onSlotChange}></slot></div>`;
|
|
1548
1548
|
}
|
|
1549
1549
|
};
|
|
1550
|
-
|
|
1550
|
+
N2.styles = g`
|
|
1551
1551
|
:host { display: block; width: 100%; font-family: var(--font-sans); }
|
|
1552
1552
|
:host([direction="vertical"]) { width: auto; height: 100%; }
|
|
1553
1553
|
.divider--horizontal { margin-top: 8px; margin-bottom: 8px; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 8px; text-align: center; }
|
|
@@ -1557,28 +1557,28 @@ O2.styles = v`
|
|
|
1557
1557
|
.divider--vertical-empty { background-color: var(--color-gray-3); width: 1px; }
|
|
1558
1558
|
.divider__line--vertical { border-left: 1px solid var(--color-gray-3); justify-self: center; }
|
|
1559
1559
|
`;
|
|
1560
|
-
let
|
|
1561
|
-
|
|
1560
|
+
let A1 = N2;
|
|
1561
|
+
u4([
|
|
1562
1562
|
a({ reflect: !0 })
|
|
1563
|
-
],
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
],
|
|
1567
|
-
customElements.get("anduin-divider") || customElements.define("anduin-divider",
|
|
1568
|
-
var
|
|
1563
|
+
], A1.prototype, "direction");
|
|
1564
|
+
u4([
|
|
1565
|
+
b()
|
|
1566
|
+
], A1.prototype, "hasContent");
|
|
1567
|
+
customElements.get("anduin-divider") || customElements.define("anduin-divider", A1);
|
|
1568
|
+
var l3 = Object.defineProperty, r3 = (l, e, t, i) => {
|
|
1569
1569
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1570
1570
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1571
|
-
return o &&
|
|
1571
|
+
return o && l3(e, t, o), o;
|
|
1572
1572
|
};
|
|
1573
|
-
const
|
|
1573
|
+
const j2 = class j2 extends u {
|
|
1574
1574
|
constructor() {
|
|
1575
1575
|
super(...arguments), this.variant = "gray";
|
|
1576
1576
|
}
|
|
1577
1577
|
render() {
|
|
1578
|
-
return
|
|
1578
|
+
return C`<div class="dot dot--${this.variant}" part="dot"></div>`;
|
|
1579
1579
|
}
|
|
1580
1580
|
};
|
|
1581
|
-
|
|
1581
|
+
j2.styles = g`
|
|
1582
1582
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1583
1583
|
.dot { width: 10px; height: 10px; border-radius: 9999px; }
|
|
1584
1584
|
.dot--gray { background-color: var(--color-semantic-gray-6); color: var(--color-semantic-gray-0); }
|
|
@@ -1587,17 +1587,17 @@ D2.styles = v`
|
|
|
1587
1587
|
.dot--danger { background-color: var(--color-semantic-danger-4); color: var(--color-semantic-gray-0); }
|
|
1588
1588
|
.dot--warning { background-color: var(--color-semantic-warning-3); color: var(--color-semantic-gray-8); }
|
|
1589
1589
|
`;
|
|
1590
|
-
let
|
|
1591
|
-
|
|
1590
|
+
let J1 = j2;
|
|
1591
|
+
r3([
|
|
1592
1592
|
a()
|
|
1593
|
-
],
|
|
1594
|
-
customElements.get("anduin-dot") || customElements.define("anduin-dot",
|
|
1595
|
-
var
|
|
1593
|
+
], J1.prototype, "variant");
|
|
1594
|
+
customElements.get("anduin-dot") || customElements.define("anduin-dot", J1);
|
|
1595
|
+
var n3 = Object.defineProperty, h4 = (l, e, t, i) => {
|
|
1596
1596
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1597
1597
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1598
|
-
return o &&
|
|
1598
|
+
return o && n3(e, t, o), o;
|
|
1599
1599
|
};
|
|
1600
|
-
const
|
|
1600
|
+
const U2 = class U2 extends u {
|
|
1601
1601
|
constructor() {
|
|
1602
1602
|
super(...arguments), this.percent = "", this.height = "medium";
|
|
1603
1603
|
}
|
|
@@ -1605,7 +1605,7 @@ const I2 = class I2 extends h {
|
|
|
1605
1605
|
const e = this.height === "large" ? 8 : 3, t = this.percent === "" || this.percent === null;
|
|
1606
1606
|
let i = "";
|
|
1607
1607
|
const o = ["progress__fill"];
|
|
1608
|
-
return t ? o.push("progress__fill--indeterminate") : i = `width: ${Math.max(0, Math.min(1, parseFloat(this.percent) || 0)) * 100}%;`,
|
|
1608
|
+
return t ? o.push("progress__fill--indeterminate") : i = `width: ${Math.max(0, Math.min(1, parseFloat(this.percent) || 0)) * 100}%;`, C`
|
|
1609
1609
|
<div class="progress" style="height: ${e}px;" part="progress">
|
|
1610
1610
|
<div class="${o.join(" ")}" style="${i}"></div>
|
|
1611
1611
|
<div class="progress__background"></div>
|
|
@@ -1613,7 +1613,7 @@ const I2 = class I2 extends h {
|
|
|
1613
1613
|
`;
|
|
1614
1614
|
}
|
|
1615
1615
|
};
|
|
1616
|
-
|
|
1616
|
+
U2.styles = g`
|
|
1617
1617
|
:host { display: block; font-family: var(--font-sans); }
|
|
1618
1618
|
.progress { overflow-x: hidden; position: relative; border-radius: 9999px; }
|
|
1619
1619
|
.progress__fill {
|
|
@@ -1629,20 +1629,20 @@ I2.styles = v`
|
|
|
1629
1629
|
to { transform: translateX(330%); }
|
|
1630
1630
|
}
|
|
1631
1631
|
`;
|
|
1632
|
-
let
|
|
1633
|
-
|
|
1632
|
+
let z1 = U2;
|
|
1633
|
+
h4([
|
|
1634
1634
|
a()
|
|
1635
|
-
],
|
|
1636
|
-
|
|
1635
|
+
], z1.prototype, "percent");
|
|
1636
|
+
h4([
|
|
1637
1637
|
a()
|
|
1638
|
-
],
|
|
1639
|
-
customElements.get("anduin-progress") || customElements.define("anduin-progress",
|
|
1640
|
-
var
|
|
1638
|
+
], z1.prototype, "height");
|
|
1639
|
+
customElements.get("anduin-progress") || customElements.define("anduin-progress", z1);
|
|
1640
|
+
var a3 = Object.defineProperty, L1 = (l, e, t, i) => {
|
|
1641
1641
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1642
1642
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1643
|
-
return o &&
|
|
1643
|
+
return o && a3(e, t, o), o;
|
|
1644
1644
|
};
|
|
1645
|
-
const
|
|
1645
|
+
const q2 = class q2 extends u {
|
|
1646
1646
|
constructor() {
|
|
1647
1647
|
super(...arguments), this.effect = "pulse", this.shape = "rectangle", this.height = "", this.width = "100%", this.duration = 1500, this.fontSize = "";
|
|
1648
1648
|
}
|
|
@@ -1654,14 +1654,14 @@ const T2 = class T2 extends h {
|
|
|
1654
1654
|
this.shape === "rectangle" ? "skeleton--rectangle" : "",
|
|
1655
1655
|
this.shape === "text" && this.fontSize ? "skeleton--text" : ""
|
|
1656
1656
|
].filter(Boolean).join(" "), t = this.shape === "text" && this.fontSize ? `--anduin-skeleton-font-size: ${this.fontSize};` : "", i = `${this.height ? `height: ${this.height};` : ""} width: ${this.width};`, o = this.effect === "pulse" ? `animation: skeleton-pulse ${this.duration}ms ease-in-out infinite;` : "";
|
|
1657
|
-
return
|
|
1657
|
+
return C`
|
|
1658
1658
|
<div class="${e}" style="${t} ${i} ${o}" part="skeleton">
|
|
1659
|
-
${this.effect === "wave" ?
|
|
1659
|
+
${this.effect === "wave" ? C`<div class="skeleton__wave" style="animation: skeleton-wave ${this.duration}ms linear infinite;"></div>` : ""}
|
|
1660
1660
|
</div>
|
|
1661
1661
|
`;
|
|
1662
1662
|
}
|
|
1663
1663
|
};
|
|
1664
|
-
|
|
1664
|
+
q2.styles = g`
|
|
1665
1665
|
:host { display: block; height: 100%; font-family: var(--font-sans); }
|
|
1666
1666
|
.skeleton { background-color: var(--color-gray-3); position: relative; overflow: hidden; }
|
|
1667
1667
|
.skeleton--circle { border-radius: 9999px; }
|
|
@@ -1680,37 +1680,37 @@ T2.styles = v`
|
|
|
1680
1680
|
0% { transform: translateX(-100%); } 100% { transform: translateX(100%); }
|
|
1681
1681
|
}
|
|
1682
1682
|
`;
|
|
1683
|
-
let
|
|
1684
|
-
|
|
1683
|
+
let I = q2;
|
|
1684
|
+
L1([
|
|
1685
1685
|
a()
|
|
1686
|
-
],
|
|
1687
|
-
|
|
1686
|
+
], I.prototype, "effect");
|
|
1687
|
+
L1([
|
|
1688
1688
|
a()
|
|
1689
|
-
],
|
|
1690
|
-
|
|
1689
|
+
], I.prototype, "shape");
|
|
1690
|
+
L1([
|
|
1691
1691
|
a()
|
|
1692
|
-
],
|
|
1693
|
-
|
|
1692
|
+
], I.prototype, "height");
|
|
1693
|
+
L1([
|
|
1694
1694
|
a()
|
|
1695
|
-
],
|
|
1696
|
-
|
|
1695
|
+
], I.prototype, "width");
|
|
1696
|
+
L1([
|
|
1697
1697
|
a({ type: Number })
|
|
1698
|
-
],
|
|
1699
|
-
|
|
1698
|
+
], I.prototype, "duration");
|
|
1699
|
+
L1([
|
|
1700
1700
|
a({ attribute: "font-size" })
|
|
1701
|
-
],
|
|
1702
|
-
customElements.get("anduin-skeleton") || customElements.define("anduin-skeleton",
|
|
1703
|
-
var
|
|
1701
|
+
], I.prototype, "fontSize");
|
|
1702
|
+
customElements.get("anduin-skeleton") || customElements.define("anduin-skeleton", I);
|
|
1703
|
+
var s3 = Object.defineProperty, C3 = (l, e, t, i) => {
|
|
1704
1704
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1705
1705
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1706
|
-
return o &&
|
|
1706
|
+
return o && s3(e, t, o), o;
|
|
1707
1707
|
};
|
|
1708
|
-
const
|
|
1708
|
+
const G2 = class G2 extends u {
|
|
1709
1709
|
constructor() {
|
|
1710
1710
|
super(...arguments), this.height = "256px";
|
|
1711
1711
|
}
|
|
1712
1712
|
render() {
|
|
1713
|
-
return
|
|
1713
|
+
return C`
|
|
1714
1714
|
<div class="loading-state" style="height: ${this.height};" part="loading-state">
|
|
1715
1715
|
<div class="loading-state__indicator">
|
|
1716
1716
|
<anduin-spinner size="large"></anduin-spinner>
|
|
@@ -1720,30 +1720,30 @@ const N2 = class N2 extends h {
|
|
|
1720
1720
|
`;
|
|
1721
1721
|
}
|
|
1722
1722
|
};
|
|
1723
|
-
|
|
1723
|
+
G2.styles = g`
|
|
1724
1724
|
:host { display: block; height: 100%; font-family: var(--font-sans); }
|
|
1725
1725
|
.loading-state { display: flex; flex-direction: column; justify-content: center; align-items: center; }
|
|
1726
1726
|
.loading-state__indicator { color: var(--color-primary-4); }
|
|
1727
1727
|
.loading-state__content { margin-top: 12px; font-size: 15px; color: var(--color-gray-6); }
|
|
1728
1728
|
`;
|
|
1729
|
-
let
|
|
1730
|
-
|
|
1729
|
+
let Q1 = G2;
|
|
1730
|
+
C3([
|
|
1731
1731
|
a()
|
|
1732
|
-
],
|
|
1733
|
-
customElements.get("anduin-loading-state") || customElements.define("anduin-loading-state",
|
|
1734
|
-
var
|
|
1732
|
+
], Q1.prototype, "height");
|
|
1733
|
+
customElements.get("anduin-loading-state") || customElements.define("anduin-loading-state", Q1);
|
|
1734
|
+
var d3 = Object.defineProperty, A2 = (l, e, t, i) => {
|
|
1735
1735
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1736
1736
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1737
|
-
return o &&
|
|
1737
|
+
return o && d3(e, t, o), o;
|
|
1738
1738
|
};
|
|
1739
|
-
const
|
|
1739
|
+
const g4 = "anduin-field:label-click", m1 = "anduin-field:label-click-coordinated", W2 = class W2 extends u {
|
|
1740
1740
|
constructor() {
|
|
1741
1741
|
super(...arguments), this.orientation = "vertical";
|
|
1742
1742
|
}
|
|
1743
1743
|
connectedCallback() {
|
|
1744
|
-
super.connectedCallback(), this.addEventListener(
|
|
1744
|
+
super.connectedCallback(), this.addEventListener(g4, (e) => {
|
|
1745
1745
|
const t = e;
|
|
1746
|
-
this.dispatchEvent(new CustomEvent(
|
|
1746
|
+
this.dispatchEvent(new CustomEvent(m1, {
|
|
1747
1747
|
detail: t.detail,
|
|
1748
1748
|
bubbles: !1,
|
|
1749
1749
|
composed: !1
|
|
@@ -1752,24 +1752,24 @@ const s4 = "anduin-field:label-click", H1 = "anduin-field:label-click-coordinate
|
|
|
1752
1752
|
}
|
|
1753
1753
|
render() {
|
|
1754
1754
|
const e = this.orientation === "horizontal";
|
|
1755
|
-
return
|
|
1755
|
+
return C`
|
|
1756
1756
|
<div class="field ${e ? "field--horizontal" : "field--vertical"}" part="field">
|
|
1757
1757
|
<slot></slot>
|
|
1758
1758
|
</div>
|
|
1759
1759
|
`;
|
|
1760
1760
|
}
|
|
1761
1761
|
};
|
|
1762
|
-
|
|
1762
|
+
W2.styles = g`
|
|
1763
1763
|
:host { display: block; font-family: var(--font-sans); }
|
|
1764
1764
|
.field { display: flex; flex-wrap: wrap; }
|
|
1765
1765
|
.field--vertical { flex-direction: column; row-gap: 4px; }
|
|
1766
1766
|
.field--horizontal { column-gap: 4px; }
|
|
1767
1767
|
`;
|
|
1768
|
-
let
|
|
1769
|
-
|
|
1768
|
+
let e2 = W2;
|
|
1769
|
+
A2([
|
|
1770
1770
|
a()
|
|
1771
|
-
],
|
|
1772
|
-
const
|
|
1771
|
+
], e2.prototype, "orientation");
|
|
1772
|
+
const Y2 = class Y2 extends u {
|
|
1773
1773
|
constructor() {
|
|
1774
1774
|
super(...arguments), this.htmlfor = "", this.required = !1;
|
|
1775
1775
|
}
|
|
@@ -1777,91 +1777,91 @@ const U2 = class U2 extends h {
|
|
|
1777
1777
|
super.connectedCallback();
|
|
1778
1778
|
}
|
|
1779
1779
|
onLabelClick(e) {
|
|
1780
|
-
this.htmlfor && (e.preventDefault(), this.dispatchEvent(new CustomEvent(
|
|
1780
|
+
this.htmlfor && (e.preventDefault(), this.dispatchEvent(new CustomEvent(g4, {
|
|
1781
1781
|
detail: this.htmlfor,
|
|
1782
1782
|
bubbles: !0,
|
|
1783
1783
|
composed: !0
|
|
1784
1784
|
})));
|
|
1785
1785
|
}
|
|
1786
1786
|
render() {
|
|
1787
|
-
return
|
|
1787
|
+
return C`
|
|
1788
1788
|
<label
|
|
1789
1789
|
class="field-label"
|
|
1790
1790
|
part="label"
|
|
1791
1791
|
for=${this.htmlfor || ""}
|
|
1792
1792
|
@click=${this.onLabelClick}
|
|
1793
1793
|
>
|
|
1794
|
-
<slot></slot>${this.required ?
|
|
1794
|
+
<slot></slot>${this.required ? C`<span class="field-label__required"> *</span>` : ""}
|
|
1795
1795
|
</label>
|
|
1796
1796
|
`;
|
|
1797
1797
|
}
|
|
1798
1798
|
};
|
|
1799
|
-
|
|
1799
|
+
Y2.styles = g`
|
|
1800
1800
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1801
1801
|
.field-label { font-size: 13px; line-height: 20px; font-weight: 600; cursor: default; color: var(--color-gray-8, #101828); }
|
|
1802
1802
|
.field-label__required { color: var(--color-danger-5); }
|
|
1803
1803
|
`;
|
|
1804
|
-
let
|
|
1805
|
-
|
|
1804
|
+
let B1 = Y2;
|
|
1805
|
+
A2([
|
|
1806
1806
|
a()
|
|
1807
|
-
],
|
|
1808
|
-
|
|
1807
|
+
], B1.prototype, "htmlfor");
|
|
1808
|
+
A2([
|
|
1809
1809
|
a({ type: Boolean })
|
|
1810
|
-
],
|
|
1811
|
-
const
|
|
1810
|
+
], B1.prototype, "required");
|
|
1811
|
+
const X2 = class X2 extends u {
|
|
1812
1812
|
render() {
|
|
1813
|
-
return
|
|
1813
|
+
return C`<div class="field-description" part="description"><slot></slot></div>`;
|
|
1814
1814
|
}
|
|
1815
1815
|
};
|
|
1816
|
-
|
|
1816
|
+
X2.styles = g`
|
|
1817
1817
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
1818
1818
|
.field-description { display: block; line-height: 16px; font-size: 11px; color: var(--color-gray-7); }
|
|
1819
1819
|
`;
|
|
1820
|
-
let
|
|
1821
|
-
const
|
|
1820
|
+
let p2 = X2;
|
|
1821
|
+
const K2 = class K2 extends u {
|
|
1822
1822
|
render() {
|
|
1823
|
-
return
|
|
1823
|
+
return C`<div class="field-error" part="error"><slot></slot></div>`;
|
|
1824
1824
|
}
|
|
1825
1825
|
};
|
|
1826
|
-
|
|
1826
|
+
K2.styles = g`
|
|
1827
1827
|
:host { display: block; font-family: var(--font-sans); }
|
|
1828
1828
|
.field-error { color: var(--color-danger-4); }
|
|
1829
1829
|
`;
|
|
1830
|
-
let
|
|
1831
|
-
const
|
|
1830
|
+
let u2 = K2;
|
|
1831
|
+
const J2 = class J2 extends u {
|
|
1832
1832
|
render() {
|
|
1833
|
-
return
|
|
1833
|
+
return C`<div class="field-group" part="group"><slot></slot></div>`;
|
|
1834
1834
|
}
|
|
1835
1835
|
};
|
|
1836
|
-
|
|
1836
|
+
J2.styles = g`
|
|
1837
1837
|
:host { display: block; font-family: var(--font-sans); }
|
|
1838
1838
|
.field-group { display: flex; flex-direction: column; row-gap: 24px; }
|
|
1839
1839
|
`;
|
|
1840
|
-
let
|
|
1841
|
-
customElements.get("anduin-field") || customElements.define("anduin-field",
|
|
1842
|
-
customElements.get("anduin-field-label") || customElements.define("anduin-field-label",
|
|
1843
|
-
customElements.get("anduin-field-description") || customElements.define("anduin-field-description",
|
|
1844
|
-
customElements.get("anduin-field-error") || customElements.define("anduin-field-error",
|
|
1845
|
-
customElements.get("anduin-field-group") || customElements.define("anduin-field-group",
|
|
1846
|
-
var
|
|
1840
|
+
let h2 = J2;
|
|
1841
|
+
customElements.get("anduin-field") || customElements.define("anduin-field", e2);
|
|
1842
|
+
customElements.get("anduin-field-label") || customElements.define("anduin-field-label", B1);
|
|
1843
|
+
customElements.get("anduin-field-description") || customElements.define("anduin-field-description", p2);
|
|
1844
|
+
customElements.get("anduin-field-error") || customElements.define("anduin-field-error", u2);
|
|
1845
|
+
customElements.get("anduin-field-group") || customElements.define("anduin-field-group", h2);
|
|
1846
|
+
var c3 = Object.defineProperty, N1 = (l, e, t, i) => {
|
|
1847
1847
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1848
1848
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1849
|
-
return o &&
|
|
1849
|
+
return o && c3(e, t, o), o;
|
|
1850
1850
|
};
|
|
1851
|
-
const
|
|
1851
|
+
const p3 = "anduin-checkbox:change", Q2 = class Q2 extends u {
|
|
1852
1852
|
constructor() {
|
|
1853
1853
|
super(...arguments), this.checked = !1, this.disabled = !1, this.indeterminate = !1, this.readonly = !1, this.inputid = "";
|
|
1854
1854
|
}
|
|
1855
1855
|
connectedCallback() {
|
|
1856
1856
|
super.connectedCallback();
|
|
1857
1857
|
const e = this.closest("anduin-field");
|
|
1858
|
-
e && e.addEventListener(
|
|
1858
|
+
e && e.addEventListener(m1, (t) => {
|
|
1859
1859
|
const i = t;
|
|
1860
1860
|
this.inputid && this.inputid === i.detail && !this.disabled && !this.readonly && this.toggle();
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
1863
|
toggle() {
|
|
1864
|
-
this.checked = !this.checked, this.dispatchEvent(new CustomEvent(
|
|
1864
|
+
this.checked = !this.checked, this.dispatchEvent(new CustomEvent(p3, {
|
|
1865
1865
|
detail: this.checked,
|
|
1866
1866
|
bubbles: !0,
|
|
1867
1867
|
composed: !0
|
|
@@ -1878,7 +1878,7 @@ const n3 = "anduin-checkbox:change", Y2 = class Y2 extends h {
|
|
|
1878
1878
|
this.disabled && !this.indeterminate && !this.checked ? "checkbox__box--disabled" : "",
|
|
1879
1879
|
!this.indeterminate && !this.checked && !this.readonly && !this.disabled ? "checkbox__box--unchecked" : ""
|
|
1880
1880
|
].filter(Boolean).join(" "), t = this.indeterminate ? "minusBold" : this.checked ? "checkBold" : "", i = !this.disabled && !this.readonly, o = i ? 0 : -1;
|
|
1881
|
-
return
|
|
1881
|
+
return C`
|
|
1882
1882
|
<label class="${this.disabled ? "is-disabled" : ""}">
|
|
1883
1883
|
<div
|
|
1884
1884
|
class="checkbox ${i ? "checkbox--interactive" : ""} ${this.disabled ? "checkbox--disabled" : ""}"
|
|
@@ -1894,7 +1894,7 @@ const n3 = "anduin-checkbox:change", Y2 = class Y2 extends h {
|
|
|
1894
1894
|
/>
|
|
1895
1895
|
<div class="${e}" tabindex="${o}"></div>
|
|
1896
1896
|
<div class="checkbox__icon ${this.indeterminate || this.checked ? "checkbox__icon--visible" : ""}">
|
|
1897
|
-
${t ?
|
|
1897
|
+
${t ? C`<anduin-icon name="${t}" size="16"></anduin-icon>` : c}
|
|
1898
1898
|
</div>
|
|
1899
1899
|
</div>
|
|
1900
1900
|
<span class="checkbox__label"><slot></slot></span>
|
|
@@ -1902,7 +1902,7 @@ const n3 = "anduin-checkbox:change", Y2 = class Y2 extends h {
|
|
|
1902
1902
|
`;
|
|
1903
1903
|
}
|
|
1904
1904
|
};
|
|
1905
|
-
|
|
1905
|
+
Q2.styles = g`
|
|
1906
1906
|
:host { display: inline-flex; font-family: var(--font-sans); }
|
|
1907
1907
|
|
|
1908
1908
|
label {
|
|
@@ -1940,36 +1940,36 @@ Y2.styles = v`
|
|
|
1940
1940
|
.checkbox__icon { position: absolute; inset: 0; pointer-events: none; color: var(--color-gray-4); display: flex; align-items: center; justify-content: center; }
|
|
1941
1941
|
.checkbox__icon--visible { color: var(--color-gray-0); }
|
|
1942
1942
|
`;
|
|
1943
|
-
let
|
|
1944
|
-
|
|
1943
|
+
let X = Q2;
|
|
1944
|
+
N1([
|
|
1945
1945
|
a({ type: Boolean })
|
|
1946
|
-
],
|
|
1947
|
-
|
|
1946
|
+
], X.prototype, "checked");
|
|
1947
|
+
N1([
|
|
1948
1948
|
a({ type: Boolean })
|
|
1949
|
-
],
|
|
1950
|
-
|
|
1949
|
+
], X.prototype, "disabled");
|
|
1950
|
+
N1([
|
|
1951
1951
|
a({ type: Boolean })
|
|
1952
|
-
],
|
|
1953
|
-
|
|
1952
|
+
], X.prototype, "indeterminate");
|
|
1953
|
+
N1([
|
|
1954
1954
|
a({ type: Boolean })
|
|
1955
|
-
],
|
|
1956
|
-
|
|
1955
|
+
], X.prototype, "readonly");
|
|
1956
|
+
N1([
|
|
1957
1957
|
a()
|
|
1958
|
-
],
|
|
1959
|
-
customElements.get("anduin-checkbox") || customElements.define("anduin-checkbox",
|
|
1960
|
-
var
|
|
1958
|
+
], X.prototype, "inputid");
|
|
1959
|
+
customElements.get("anduin-checkbox") || customElements.define("anduin-checkbox", X);
|
|
1960
|
+
var u3 = Object.defineProperty, z = (l, e, t, i) => {
|
|
1961
1961
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
1962
1962
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
1963
|
-
return o &&
|
|
1963
|
+
return o && u3(e, t, o), o;
|
|
1964
1964
|
};
|
|
1965
|
-
const
|
|
1965
|
+
const j5 = "anduin-input:change", h3 = "anduin-input:clear", e5 = class e5 extends u {
|
|
1966
1966
|
constructor() {
|
|
1967
1967
|
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;
|
|
1968
1968
|
}
|
|
1969
1969
|
connectedCallback() {
|
|
1970
1970
|
super.connectedCallback();
|
|
1971
1971
|
const e = this.closest("anduin-field");
|
|
1972
|
-
e && e.addEventListener(
|
|
1972
|
+
e && e.addEventListener(m1, (t) => {
|
|
1973
1973
|
var o;
|
|
1974
1974
|
const i = t;
|
|
1975
1975
|
this.inputid && this.inputid === i.detail && ((o = this.inputEl) == null || o.focus());
|
|
@@ -1979,7 +1979,7 @@ const F5 = "anduin-input:change", C3 = "anduin-input:clear", X2 = class X2 exten
|
|
|
1979
1979
|
this.inputEl && this.inputEl.value !== this.value && (this.inputEl.value = this.value);
|
|
1980
1980
|
}
|
|
1981
1981
|
onInput() {
|
|
1982
|
-
this.value = this.inputEl.value, this.dispatchEvent(new CustomEvent(
|
|
1982
|
+
this.value = this.inputEl.value, this.dispatchEvent(new CustomEvent(j5, {
|
|
1983
1983
|
detail: this.value,
|
|
1984
1984
|
bubbles: !0,
|
|
1985
1985
|
composed: !0
|
|
@@ -1987,13 +1987,13 @@ const F5 = "anduin-input:change", C3 = "anduin-input:clear", X2 = class X2 exten
|
|
|
1987
1987
|
}
|
|
1988
1988
|
onClear() {
|
|
1989
1989
|
var e;
|
|
1990
|
-
this.value = "", this.inputEl && (this.inputEl.value = ""), this.dispatchEvent(new CustomEvent(
|
|
1990
|
+
this.value = "", this.inputEl && (this.inputEl.value = ""), this.dispatchEvent(new CustomEvent(j5, { detail: "", bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent(h3, { bubbles: !0, composed: !0 })), (e = this.inputEl) == null || e.focus();
|
|
1991
1991
|
}
|
|
1992
1992
|
render() {
|
|
1993
|
-
const e = this.size === "small" ? "input--small" : this.size === "large" ? "input--large" : "input--default", t = this.status ? `input--${this.status}` : "", i = !!this.startIcon, o = !!this.endIcon || this.clearable && !!this.value, r = this.clearable && !!this.value && !this.disabled && !this.readonly, n = this.size === "small" ? "12" : this.size === "large" ? "20" : "16",
|
|
1994
|
-
return
|
|
1993
|
+
const e = this.size === "small" ? "input--small" : this.size === "large" ? "input--large" : "input--default", t = this.status ? `input--${this.status}` : "", i = !!this.startIcon, o = !!this.endIcon || this.clearable && !!this.value, r = this.clearable && !!this.value && !this.disabled && !this.readonly, n = this.size === "small" ? "12" : this.size === "large" ? "20" : "16", s = this.size === "small" ? "10" : this.size === "large" ? "16" : "14";
|
|
1994
|
+
return C`
|
|
1995
1995
|
<div class="input-wrapper">
|
|
1996
|
-
${i ?
|
|
1996
|
+
${i ? C`
|
|
1997
1997
|
<span class="input__start">
|
|
1998
1998
|
<anduin-icon name=${this.startIcon} size=${n}></anduin-icon>
|
|
1999
1999
|
</span>
|
|
@@ -2015,14 +2015,14 @@ const F5 = "anduin-input:change", C3 = "anduin-input:clear", X2 = class X2 exten
|
|
|
2015
2015
|
@input=${this.onInput}
|
|
2016
2016
|
/>
|
|
2017
2017
|
|
|
2018
|
-
${o ?
|
|
2018
|
+
${o ? C`
|
|
2019
2019
|
<span class="input__end">
|
|
2020
|
-
${r ?
|
|
2020
|
+
${r ? C`
|
|
2021
2021
|
<button class="input__clear" type="button" @click=${this.onClear} aria-label="Clear">
|
|
2022
|
-
<anduin-icon name="cross" size=${
|
|
2022
|
+
<anduin-icon name="cross" size=${s}></anduin-icon>
|
|
2023
2023
|
</button>
|
|
2024
2024
|
` : c}
|
|
2025
|
-
${this.endIcon ?
|
|
2025
|
+
${this.endIcon ? C`
|
|
2026
2026
|
<anduin-icon name=${this.endIcon} size=${n}></anduin-icon>
|
|
2027
2027
|
` : c}
|
|
2028
2028
|
</span>
|
|
@@ -2031,7 +2031,7 @@ const F5 = "anduin-input:change", C3 = "anduin-input:clear", X2 = class X2 exten
|
|
|
2031
2031
|
`;
|
|
2032
2032
|
}
|
|
2033
2033
|
};
|
|
2034
|
-
|
|
2034
|
+
e5.styles = g`
|
|
2035
2035
|
:host { display: block; font-family: var(--font-sans); }
|
|
2036
2036
|
|
|
2037
2037
|
.input-wrapper { position: relative; display: flex; align-items: center; }
|
|
@@ -2085,7 +2085,7 @@ X2.styles = v`
|
|
|
2085
2085
|
}
|
|
2086
2086
|
.input__clear:hover { color: var(--color-gray-7); }
|
|
2087
2087
|
`;
|
|
2088
|
-
let w =
|
|
2088
|
+
let w = e5;
|
|
2089
2089
|
z([
|
|
2090
2090
|
a()
|
|
2091
2091
|
], w.prototype, "value");
|
|
@@ -2120,19 +2120,19 @@ z([
|
|
|
2120
2120
|
k("input")
|
|
2121
2121
|
], w.prototype, "inputEl");
|
|
2122
2122
|
customElements.get("anduin-input") || customElements.define("anduin-input", w);
|
|
2123
|
-
var
|
|
2123
|
+
var g3 = Object.defineProperty, Q = (l, e, t, i) => {
|
|
2124
2124
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
2125
2125
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
2126
|
-
return o &&
|
|
2126
|
+
return o && g3(e, t, o), o;
|
|
2127
2127
|
};
|
|
2128
|
-
const
|
|
2128
|
+
const v3 = "anduin-textarea:change", t5 = class t5 extends u {
|
|
2129
2129
|
constructor() {
|
|
2130
2130
|
super(...arguments), this.value = "", this.disabled = !1, this.readonly = !1, this.placeholder = "", this.inputid = "", this.rows = 3, this.status = "";
|
|
2131
2131
|
}
|
|
2132
2132
|
connectedCallback() {
|
|
2133
2133
|
super.connectedCallback();
|
|
2134
2134
|
const e = this.closest("anduin-field");
|
|
2135
|
-
e && e.addEventListener(
|
|
2135
|
+
e && e.addEventListener(m1, (t) => {
|
|
2136
2136
|
var o;
|
|
2137
2137
|
const i = t;
|
|
2138
2138
|
this.inputid && this.inputid === i.detail && ((o = this.textareaEl) == null || o.focus());
|
|
@@ -2142,7 +2142,7 @@ const d3 = "anduin-textarea:change", K2 = class K2 extends h {
|
|
|
2142
2142
|
this.textareaEl && this.textareaEl.value !== this.value && (this.textareaEl.value = this.value);
|
|
2143
2143
|
}
|
|
2144
2144
|
onInput() {
|
|
2145
|
-
this.value = this.textareaEl.value, this.dispatchEvent(new CustomEvent(
|
|
2145
|
+
this.value = this.textareaEl.value, this.dispatchEvent(new CustomEvent(v3, {
|
|
2146
2146
|
detail: this.value,
|
|
2147
2147
|
bubbles: !0,
|
|
2148
2148
|
composed: !0
|
|
@@ -2150,7 +2150,7 @@ const d3 = "anduin-textarea:change", K2 = class K2 extends h {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
render() {
|
|
2152
2152
|
const e = this.status ? `textarea--${this.status}` : "";
|
|
2153
|
-
return
|
|
2153
|
+
return C`
|
|
2154
2154
|
<textarea
|
|
2155
2155
|
class="textarea
|
|
2156
2156
|
${this.disabled ? "textarea--disabled" : ""}
|
|
@@ -2167,7 +2167,7 @@ const d3 = "anduin-textarea:change", K2 = class K2 extends h {
|
|
|
2167
2167
|
`;
|
|
2168
2168
|
}
|
|
2169
2169
|
};
|
|
2170
|
-
|
|
2170
|
+
t5.styles = g`
|
|
2171
2171
|
:host { display: block; font-family: var(--font-sans); }
|
|
2172
2172
|
|
|
2173
2173
|
.textarea {
|
|
@@ -2184,46 +2184,46 @@ K2.styles = v`
|
|
|
2184
2184
|
.textarea--warning { border-color: var(--color-warning-4); }
|
|
2185
2185
|
.textarea--loading { border-color: var(--color-gray-4); }
|
|
2186
2186
|
`;
|
|
2187
|
-
let E =
|
|
2188
|
-
|
|
2187
|
+
let E = t5;
|
|
2188
|
+
Q([
|
|
2189
2189
|
a()
|
|
2190
2190
|
], E.prototype, "value");
|
|
2191
|
-
|
|
2191
|
+
Q([
|
|
2192
2192
|
a({ type: Boolean })
|
|
2193
2193
|
], E.prototype, "disabled");
|
|
2194
|
-
|
|
2194
|
+
Q([
|
|
2195
2195
|
a({ type: Boolean })
|
|
2196
2196
|
], E.prototype, "readonly");
|
|
2197
|
-
|
|
2197
|
+
Q([
|
|
2198
2198
|
a()
|
|
2199
2199
|
], E.prototype, "placeholder");
|
|
2200
|
-
|
|
2200
|
+
Q([
|
|
2201
2201
|
a()
|
|
2202
2202
|
], E.prototype, "inputid");
|
|
2203
|
-
|
|
2203
|
+
Q([
|
|
2204
2204
|
a({ type: Number })
|
|
2205
2205
|
], E.prototype, "rows");
|
|
2206
|
-
|
|
2206
|
+
Q([
|
|
2207
2207
|
a()
|
|
2208
2208
|
], E.prototype, "status");
|
|
2209
|
-
|
|
2209
|
+
Q([
|
|
2210
2210
|
k("textarea")
|
|
2211
2211
|
], E.prototype, "textareaEl");
|
|
2212
2212
|
customElements.get("anduin-textarea") || customElements.define("anduin-textarea", E);
|
|
2213
|
-
var
|
|
2213
|
+
var f3 = Object.defineProperty, $ = (l, e, t, i) => {
|
|
2214
2214
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
2215
2215
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
2216
|
-
return o &&
|
|
2216
|
+
return o && f3(e, t, o), o;
|
|
2217
2217
|
};
|
|
2218
|
-
const
|
|
2218
|
+
const v4 = "anduin-tab:trigger-click", i2 = "anduin-tab:value-changed", H3 = "anduin-tab:change", o5 = class o5 extends u {
|
|
2219
2219
|
constructor() {
|
|
2220
2220
|
super(...arguments), this.defaultValue = "", this.value = "", this.fill = !1;
|
|
2221
2221
|
}
|
|
2222
2222
|
connectedCallback() {
|
|
2223
|
-
super.connectedCallback(), this.addEventListener(
|
|
2223
|
+
super.connectedCallback(), this.addEventListener(v4, (e) => {
|
|
2224
2224
|
e.stopPropagation();
|
|
2225
2225
|
const t = e;
|
|
2226
|
-
this.value = t.detail, this.broadcastValueChanged(t.detail), this.dispatchEvent(new CustomEvent(
|
|
2226
|
+
this.value = t.detail, this.broadcastValueChanged(t.detail), this.dispatchEvent(new CustomEvent(H3, { detail: t.detail, bubbles: !0, composed: !0 }));
|
|
2227
2227
|
}), requestAnimationFrame(() => {
|
|
2228
2228
|
const e = this.value || this.defaultValue;
|
|
2229
2229
|
e && (this.value || (this.value = e), this.broadcastValueChanged(e));
|
|
@@ -2233,36 +2233,36 @@ const d4 = "anduin-tab:trigger-click", e2 = "anduin-tab:value-changed", p3 = "an
|
|
|
2233
2233
|
e.has("value") && this.value && this.broadcastValueChanged(this.value);
|
|
2234
2234
|
}
|
|
2235
2235
|
broadcastValueChanged(e) {
|
|
2236
|
-
this.dispatchEvent(new CustomEvent(
|
|
2236
|
+
this.dispatchEvent(new CustomEvent(i2, { detail: e, bubbles: !1, composed: !1 }));
|
|
2237
2237
|
}
|
|
2238
2238
|
render() {
|
|
2239
|
-
return
|
|
2239
|
+
return C`<div class="tabs" part="tabs"><slot></slot></div>`;
|
|
2240
2240
|
}
|
|
2241
2241
|
};
|
|
2242
|
-
|
|
2242
|
+
o5.styles = g`
|
|
2243
2243
|
:host { display: flex; flex-direction: column; font-family: var(--font-sans); }
|
|
2244
2244
|
:host([fill]) { flex: 1; min-height: 0; --_tab-fill-flex: 1; --_tab-fill-height: 100%; }
|
|
2245
2245
|
.tabs { display: flex; flex-direction: column; width: 100%; }
|
|
2246
2246
|
:host([fill]) .tabs { flex: 1; min-height: 0; }
|
|
2247
2247
|
`;
|
|
2248
|
-
let
|
|
2248
|
+
let v1 = o5;
|
|
2249
2249
|
$([
|
|
2250
2250
|
a({ attribute: "default-value" })
|
|
2251
|
-
],
|
|
2251
|
+
], v1.prototype, "defaultValue");
|
|
2252
2252
|
$([
|
|
2253
2253
|
a()
|
|
2254
|
-
],
|
|
2254
|
+
], v1.prototype, "value");
|
|
2255
2255
|
$([
|
|
2256
2256
|
a({ type: Boolean, reflect: !0 })
|
|
2257
|
-
],
|
|
2258
|
-
const
|
|
2257
|
+
], v1.prototype, "fill");
|
|
2258
|
+
const i5 = class i5 extends u {
|
|
2259
2259
|
constructor() {
|
|
2260
2260
|
super(...arguments), this.alignment = "left", this.lastActiveValue = "", this.resizeObserver = null;
|
|
2261
2261
|
}
|
|
2262
2262
|
connectedCallback() {
|
|
2263
2263
|
super.connectedCallback();
|
|
2264
2264
|
const e = this.closest("anduin-tabs");
|
|
2265
|
-
e && e.addEventListener(
|
|
2265
|
+
e && e.addEventListener(i2, (t) => {
|
|
2266
2266
|
const i = t;
|
|
2267
2267
|
this.lastActiveValue = i.detail, requestAnimationFrame(() => {
|
|
2268
2268
|
this.animateIndicator(i.detail);
|
|
@@ -2283,14 +2283,14 @@ const Q2 = class Q2 extends h {
|
|
|
2283
2283
|
for (let i = 0; i < t.length; i++) {
|
|
2284
2284
|
const o = t[i];
|
|
2285
2285
|
if (o.getAttribute("value") === e) {
|
|
2286
|
-
const r = o.getBoundingClientRect(), n = this.getBoundingClientRect(),
|
|
2287
|
-
this.indicator && (this.indicator.style.width = `${r.width}px`, this.indicator.style.transform = `translateX(${
|
|
2286
|
+
const r = o.getBoundingClientRect(), n = this.getBoundingClientRect(), s = r.left - n.left + this.scrollLeft;
|
|
2287
|
+
this.indicator && (this.indicator.style.width = `${r.width}px`, this.indicator.style.transform = `translateX(${s}px)`);
|
|
2288
2288
|
break;
|
|
2289
2289
|
}
|
|
2290
2290
|
}
|
|
2291
2291
|
}
|
|
2292
2292
|
render() {
|
|
2293
|
-
return
|
|
2293
|
+
return C`
|
|
2294
2294
|
<div class="tabs-list tabs-list--${this.alignment}" role="tablist" aria-orientation="horizontal" part="tabs-list">
|
|
2295
2295
|
<slot></slot>
|
|
2296
2296
|
<div class="tabs-list__indicator"></div>
|
|
@@ -2298,7 +2298,7 @@ const Q2 = class Q2 extends h {
|
|
|
2298
2298
|
`;
|
|
2299
2299
|
}
|
|
2300
2300
|
};
|
|
2301
|
-
|
|
2301
|
+
i5.styles = g`
|
|
2302
2302
|
:host { display: block; font-family: var(--font-sans); }
|
|
2303
2303
|
.tabs-list {
|
|
2304
2304
|
display: flex; background-color: var(--color-gray-0);
|
|
@@ -2313,30 +2313,30 @@ Q2.styles = v`
|
|
|
2313
2313
|
left: 0; height: 2px; transition-duration: 200ms; transition-property: transform, width;
|
|
2314
2314
|
}
|
|
2315
2315
|
`;
|
|
2316
|
-
let
|
|
2316
|
+
let S1 = i5;
|
|
2317
2317
|
$([
|
|
2318
2318
|
a()
|
|
2319
|
-
],
|
|
2319
|
+
], S1.prototype, "alignment");
|
|
2320
2320
|
$([
|
|
2321
2321
|
k(".tabs-list__indicator")
|
|
2322
|
-
],
|
|
2323
|
-
const
|
|
2322
|
+
], S1.prototype, "indicator");
|
|
2323
|
+
const l5 = class l5 extends u {
|
|
2324
2324
|
constructor() {
|
|
2325
2325
|
super(...arguments), this.value = "", this.startIcon = "", this.disabled = !1, this.showBadge = !1, this.badgeCount = "", this.isActive = !1;
|
|
2326
2326
|
}
|
|
2327
2327
|
connectedCallback() {
|
|
2328
2328
|
super.connectedCallback();
|
|
2329
2329
|
const e = this.closest("anduin-tabs");
|
|
2330
|
-
e && e.addEventListener(
|
|
2330
|
+
e && e.addEventListener(i2, (t) => {
|
|
2331
2331
|
const i = t;
|
|
2332
2332
|
this.isActive = i.detail === this.value;
|
|
2333
2333
|
});
|
|
2334
2334
|
}
|
|
2335
2335
|
onClick() {
|
|
2336
|
-
this.dispatchEvent(new CustomEvent(
|
|
2336
|
+
this.dispatchEvent(new CustomEvent(v4, { detail: this.value, bubbles: !0, composed: !0 }));
|
|
2337
2337
|
}
|
|
2338
2338
|
render() {
|
|
2339
|
-
return
|
|
2339
|
+
return C`
|
|
2340
2340
|
<button
|
|
2341
2341
|
class="tab-trigger ${this.isActive ? "tab-trigger--active" : "tab-trigger--normal"}"
|
|
2342
2342
|
role="tab"
|
|
@@ -2346,15 +2346,15 @@ const e5 = class e5 extends h {
|
|
|
2346
2346
|
@click=${this.onClick}
|
|
2347
2347
|
>
|
|
2348
2348
|
<div class="tab-trigger__content">
|
|
2349
|
-
${this.startIcon ?
|
|
2349
|
+
${this.startIcon ? C`<anduin-icon name="${this.startIcon}" size="16"></anduin-icon>` : c}
|
|
2350
2350
|
<slot></slot>
|
|
2351
|
-
${this.showBadge ?
|
|
2351
|
+
${this.showBadge ? C`<span class="tab-trigger__badge">${this.badgeCount}</span>` : c}
|
|
2352
2352
|
</div>
|
|
2353
2353
|
</button>
|
|
2354
2354
|
`;
|
|
2355
2355
|
}
|
|
2356
2356
|
};
|
|
2357
|
-
|
|
2357
|
+
l5.styles = g`
|
|
2358
2358
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
2359
2359
|
.tab-trigger {
|
|
2360
2360
|
cursor: pointer; background: none; border: none; display: block;
|
|
@@ -2377,33 +2377,33 @@ e5.styles = v`
|
|
|
2377
2377
|
color: var(--color-gray-7); white-space: nowrap;
|
|
2378
2378
|
}
|
|
2379
2379
|
`;
|
|
2380
|
-
let
|
|
2380
|
+
let T = l5;
|
|
2381
2381
|
$([
|
|
2382
2382
|
a()
|
|
2383
|
-
],
|
|
2383
|
+
], T.prototype, "value");
|
|
2384
2384
|
$([
|
|
2385
2385
|
a({ attribute: "start-icon" })
|
|
2386
|
-
],
|
|
2386
|
+
], T.prototype, "startIcon");
|
|
2387
2387
|
$([
|
|
2388
2388
|
a({ type: Boolean })
|
|
2389
|
-
],
|
|
2389
|
+
], T.prototype, "disabled");
|
|
2390
2390
|
$([
|
|
2391
2391
|
a({ type: Boolean, attribute: "show-badge" })
|
|
2392
|
-
],
|
|
2392
|
+
], T.prototype, "showBadge");
|
|
2393
2393
|
$([
|
|
2394
2394
|
a({ attribute: "badge-count" })
|
|
2395
|
-
],
|
|
2395
|
+
], T.prototype, "badgeCount");
|
|
2396
2396
|
$([
|
|
2397
|
-
|
|
2398
|
-
],
|
|
2399
|
-
const
|
|
2397
|
+
b()
|
|
2398
|
+
], T.prototype, "isActive");
|
|
2399
|
+
const r5 = class r5 extends u {
|
|
2400
2400
|
constructor() {
|
|
2401
2401
|
super(...arguments), this.value = "", this.isActive = !1;
|
|
2402
2402
|
}
|
|
2403
2403
|
connectedCallback() {
|
|
2404
2404
|
super.connectedCallback();
|
|
2405
2405
|
const e = this.closest("anduin-tabs");
|
|
2406
|
-
e && e.addEventListener(
|
|
2406
|
+
e && e.addEventListener(i2, (t) => {
|
|
2407
2407
|
const i = t;
|
|
2408
2408
|
this.isActive = i.detail === this.value;
|
|
2409
2409
|
});
|
|
@@ -2412,35 +2412,35 @@ const t5 = class t5 extends h {
|
|
|
2412
2412
|
e.has("isActive") && this.toggleAttribute("active", this.isActive);
|
|
2413
2413
|
}
|
|
2414
2414
|
render() {
|
|
2415
|
-
return
|
|
2415
|
+
return C`
|
|
2416
2416
|
<div class="tab-content" role="tabpanel" tabindex="0" part="tab-content">
|
|
2417
2417
|
<slot></slot>
|
|
2418
2418
|
</div>
|
|
2419
2419
|
`;
|
|
2420
2420
|
}
|
|
2421
2421
|
};
|
|
2422
|
-
|
|
2422
|
+
r5.styles = g`
|
|
2423
2423
|
:host { display: block; font-family: var(--font-sans); flex: var(--_tab-fill-flex, 0 0 auto); min-height: 0; }
|
|
2424
2424
|
:host(:not([active])) { display: none; }
|
|
2425
2425
|
.tab-content { width: 100%; height: var(--_tab-fill-height, auto); overflow-x: hidden; overflow-y: auto; }
|
|
2426
2426
|
`;
|
|
2427
|
-
let
|
|
2427
|
+
let P1 = r5;
|
|
2428
2428
|
$([
|
|
2429
2429
|
a()
|
|
2430
|
-
],
|
|
2430
|
+
], P1.prototype, "value");
|
|
2431
2431
|
$([
|
|
2432
|
-
|
|
2433
|
-
],
|
|
2434
|
-
customElements.get("anduin-tabs") || customElements.define("anduin-tabs",
|
|
2435
|
-
customElements.get("anduin-tabs-list") || customElements.define("anduin-tabs-list",
|
|
2436
|
-
customElements.get("anduin-tab-trigger") || customElements.define("anduin-tab-trigger",
|
|
2437
|
-
customElements.get("anduin-tab-content") || customElements.define("anduin-tab-content",
|
|
2438
|
-
var
|
|
2432
|
+
b()
|
|
2433
|
+
], P1.prototype, "isActive");
|
|
2434
|
+
customElements.get("anduin-tabs") || customElements.define("anduin-tabs", v1);
|
|
2435
|
+
customElements.get("anduin-tabs-list") || customElements.define("anduin-tabs-list", S1);
|
|
2436
|
+
customElements.get("anduin-tab-trigger") || customElements.define("anduin-tab-trigger", T);
|
|
2437
|
+
customElements.get("anduin-tab-content") || customElements.define("anduin-tab-content", P1);
|
|
2438
|
+
var V3 = Object.defineProperty, z2 = (l, e, t, i) => {
|
|
2439
2439
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
2440
2440
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
2441
|
-
return o &&
|
|
2441
|
+
return o && V3(e, t, o), o;
|
|
2442
2442
|
};
|
|
2443
|
-
const
|
|
2443
|
+
const L3 = "anduin-tag-close:click", m3 = {
|
|
2444
2444
|
gray: "tag--light-gray",
|
|
2445
2445
|
primary: "tag--light-primary",
|
|
2446
2446
|
success: "tag--light-success",
|
|
@@ -2465,7 +2465,7 @@ const h3 = "anduin-tag-close:click", g3 = {
|
|
|
2465
2465
|
customYellow: "tag--custom-yellow",
|
|
2466
2466
|
customYellowGreen: "tag--custom-yellow-green",
|
|
2467
2467
|
customYellowOrange: "tag--custom-yellow-orange"
|
|
2468
|
-
},
|
|
2468
|
+
}, b3 = {
|
|
2469
2469
|
gray: "tag__icon--light-gray",
|
|
2470
2470
|
primary: "tag__icon--light-primary",
|
|
2471
2471
|
success: "tag__icon--light-success",
|
|
@@ -2490,22 +2490,22 @@ const h3 = "anduin-tag-close:click", g3 = {
|
|
|
2490
2490
|
customMagenta: "tag__icon--custom-magenta",
|
|
2491
2491
|
customBlueGreen: "tag__icon--custom-blue-green",
|
|
2492
2492
|
customPink: "tag__icon--custom-pink"
|
|
2493
|
-
},
|
|
2493
|
+
}, n5 = class n5 extends u {
|
|
2494
2494
|
constructor() {
|
|
2495
2495
|
super(...arguments), this.variant = "gray", this.icon = "", this.disabled = !1;
|
|
2496
2496
|
}
|
|
2497
2497
|
render() {
|
|
2498
|
-
const e =
|
|
2499
|
-
return
|
|
2498
|
+
const e = m3[this.variant] || "tag--light-gray", t = b3[this.variant] || "tag__icon--light-gray";
|
|
2499
|
+
return C`
|
|
2500
2500
|
<div class="tag ${e} ${this.disabled ? "tag--disabled" : ""}" part="tag">
|
|
2501
|
-
${this.icon ?
|
|
2501
|
+
${this.icon ? C`<anduin-icon name="${this.icon}" size="12" class="tag__icon ${t}"></anduin-icon>` : c}
|
|
2502
2502
|
<div class="tag__label"><slot></slot></div>
|
|
2503
2503
|
<slot name="closeButton" class="tag__close"></slot>
|
|
2504
2504
|
</div>
|
|
2505
2505
|
`;
|
|
2506
2506
|
}
|
|
2507
2507
|
};
|
|
2508
|
-
|
|
2508
|
+
n5.styles = g`
|
|
2509
2509
|
:host { display: inline-flex; max-width: 100%; font-family: var(--font-sans); }
|
|
2510
2510
|
.tag {
|
|
2511
2511
|
font-weight: 500; font-size: 11px; height: 20px; padding-left: 6px; padding-right: 6px;
|
|
@@ -2553,29 +2553,29 @@ o5.styles = v`
|
|
|
2553
2553
|
.tag--custom-yellow-green { color: var(--color-gray-9); background-color: rgb(174,207,85); }
|
|
2554
2554
|
.tag--custom-yellow-orange { color: var(--color-gray-9); background-color: rgb(255,193,107); }
|
|
2555
2555
|
`;
|
|
2556
|
-
let
|
|
2557
|
-
|
|
2556
|
+
let f1 = n5;
|
|
2557
|
+
z2([
|
|
2558
2558
|
a()
|
|
2559
|
-
],
|
|
2560
|
-
|
|
2559
|
+
], f1.prototype, "variant");
|
|
2560
|
+
z2([
|
|
2561
2561
|
a()
|
|
2562
|
-
],
|
|
2563
|
-
|
|
2562
|
+
], f1.prototype, "icon");
|
|
2563
|
+
z2([
|
|
2564
2564
|
a({ type: Boolean })
|
|
2565
|
-
],
|
|
2566
|
-
const
|
|
2565
|
+
], f1.prototype, "disabled");
|
|
2566
|
+
const a5 = class a5 extends u {
|
|
2567
2567
|
onClick() {
|
|
2568
|
-
this.dispatchEvent(new CustomEvent(
|
|
2568
|
+
this.dispatchEvent(new CustomEvent(L3, { bubbles: !0, composed: !0 }));
|
|
2569
2569
|
}
|
|
2570
2570
|
render() {
|
|
2571
|
-
return
|
|
2571
|
+
return C`
|
|
2572
2572
|
<button class="tag-close__button" part="tag-close" @click=${this.onClick}>
|
|
2573
2573
|
<anduin-icon name="crossSmall" size="12"></anduin-icon>
|
|
2574
2574
|
</button>
|
|
2575
2575
|
`;
|
|
2576
2576
|
}
|
|
2577
2577
|
};
|
|
2578
|
-
|
|
2578
|
+
a5.styles = g`
|
|
2579
2579
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
2580
2580
|
.tag-close__button {
|
|
2581
2581
|
flex: none; width: 16px; height: 16px; display: flex; align-items: center;
|
|
@@ -2585,15 +2585,15 @@ i5.styles = v`
|
|
|
2585
2585
|
.tag-close__button:hover { opacity: 0.7; }
|
|
2586
2586
|
.tag-close__button:active { opacity: 0.5; }
|
|
2587
2587
|
`;
|
|
2588
|
-
let
|
|
2589
|
-
customElements.get("anduin-tag") || customElements.define("anduin-tag",
|
|
2590
|
-
customElements.get("anduin-tag-close") || customElements.define("anduin-tag-close",
|
|
2591
|
-
var
|
|
2588
|
+
let g2 = a5;
|
|
2589
|
+
customElements.get("anduin-tag") || customElements.define("anduin-tag", f1);
|
|
2590
|
+
customElements.get("anduin-tag-close") || customElements.define("anduin-tag-close", g2);
|
|
2591
|
+
var y3 = Object.defineProperty, R = (l, e, t, i) => {
|
|
2592
2592
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
2593
2593
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
2594
|
-
return o &&
|
|
2594
|
+
return o && y3(e, t, o), o;
|
|
2595
2595
|
};
|
|
2596
|
-
const
|
|
2596
|
+
const M3 = "anduin-toggle-group:change", Z3 = "anduin-toggle-group-item:change", _3 = "anduin-toggle-group-item:select", x3 = "anduin-toggle-group-item:deselect", v2 = "anduin-toggle-group-item:item-click", s5 = class s5 extends u {
|
|
2597
2597
|
constructor() {
|
|
2598
2598
|
super(...arguments), this.mode = "single", this.defaultValue = "", this.value = null, this.size = "medium", this.variant = "gray", this.gap = !1, this.internalValue = [], this.onItemClick = (e) => {
|
|
2599
2599
|
var d;
|
|
@@ -2601,11 +2601,11 @@ const H3 = "anduin-toggle-group:change", V3 = "anduin-toggle-group-item:change",
|
|
|
2601
2601
|
const i = e.detail, o = this.selection, r = o.includes(i);
|
|
2602
2602
|
let n;
|
|
2603
2603
|
this.mode === "multiple" ? n = r ? o.filter((p) => p !== i) : [...o, i] : n = r ? [] : [i];
|
|
2604
|
-
const
|
|
2605
|
-
if (
|
|
2604
|
+
const s = this.items.find((p) => p.value === i);
|
|
2605
|
+
if (s == null || s.emitSelectionChange(!r), this.mode === "single" && !r)
|
|
2606
2606
|
for (const p of o)
|
|
2607
|
-
(d = this.items.find((
|
|
2608
|
-
this.dispatchEvent(new CustomEvent(
|
|
2607
|
+
(d = this.items.find((h) => h.value === p)) == null || d.emitSelectionChange(!1);
|
|
2608
|
+
this.dispatchEvent(new CustomEvent(M3, {
|
|
2609
2609
|
detail: n.join(" "),
|
|
2610
2610
|
bubbles: !0,
|
|
2611
2611
|
composed: !0
|
|
@@ -2616,13 +2616,13 @@ const H3 = "anduin-toggle-group:change", V3 = "anduin-toggle-group-item:change",
|
|
|
2616
2616
|
return this.value != null;
|
|
2617
2617
|
}
|
|
2618
2618
|
get selection() {
|
|
2619
|
-
return this.isControlled ?
|
|
2619
|
+
return this.isControlled ? U5(this.value) : this.internalValue;
|
|
2620
2620
|
}
|
|
2621
2621
|
connectedCallback() {
|
|
2622
|
-
super.connectedCallback(), this.hasUpdated || (this.internalValue =
|
|
2622
|
+
super.connectedCallback(), this.hasUpdated || (this.internalValue = U5(this.defaultValue)), this.addEventListener(v2, this.onItemClick);
|
|
2623
2623
|
}
|
|
2624
2624
|
disconnectedCallback() {
|
|
2625
|
-
super.disconnectedCallback(), this.removeEventListener(
|
|
2625
|
+
super.disconnectedCallback(), this.removeEventListener(v2, this.onItemClick);
|
|
2626
2626
|
}
|
|
2627
2627
|
updated() {
|
|
2628
2628
|
this.syncItems();
|
|
@@ -2636,14 +2636,14 @@ const H3 = "anduin-toggle-group:change", V3 = "anduin-toggle-group-item:change",
|
|
|
2636
2636
|
t.selected = e.includes(t.value), t.groupSize = this.size, t.groupVariant = this.variant, t.groupMode = this.mode;
|
|
2637
2637
|
}
|
|
2638
2638
|
render() {
|
|
2639
|
-
return
|
|
2639
|
+
return C`
|
|
2640
2640
|
<div class="toggle-group toggle-group--${this.size} ${this.gap ? "toggle-group--gap" : ""}" role="group" part="toggle-group">
|
|
2641
2641
|
<slot @slotchange=${this.syncItems}></slot>
|
|
2642
2642
|
</div>
|
|
2643
2643
|
`;
|
|
2644
2644
|
}
|
|
2645
2645
|
};
|
|
2646
|
-
|
|
2646
|
+
s5.styles = g`
|
|
2647
2647
|
:host { display: inline-flex; font-family: var(--font-sans); }
|
|
2648
2648
|
.toggle-group { display: inline-flex; align-items: center; }
|
|
2649
2649
|
.toggle-group--small {
|
|
@@ -2673,39 +2673,39 @@ l5.styles = v`
|
|
|
2673
2673
|
.toggle-group--gap { flex-wrap: wrap; gap: 8px; }
|
|
2674
2674
|
.toggle-group--gap ::slotted(anduin-toggle-group-item) { --toggle-group-item-radius: 4px; margin-left: 0; }
|
|
2675
2675
|
`;
|
|
2676
|
-
let
|
|
2676
|
+
let S = s5;
|
|
2677
2677
|
R([
|
|
2678
2678
|
a()
|
|
2679
|
-
],
|
|
2679
|
+
], S.prototype, "mode");
|
|
2680
2680
|
R([
|
|
2681
2681
|
a({ attribute: "default-value" })
|
|
2682
|
-
],
|
|
2682
|
+
], S.prototype, "defaultValue");
|
|
2683
2683
|
R([
|
|
2684
2684
|
a()
|
|
2685
|
-
],
|
|
2685
|
+
], S.prototype, "value");
|
|
2686
2686
|
R([
|
|
2687
2687
|
a()
|
|
2688
|
-
],
|
|
2688
|
+
], S.prototype, "size");
|
|
2689
2689
|
R([
|
|
2690
2690
|
a()
|
|
2691
|
-
],
|
|
2691
|
+
], S.prototype, "variant");
|
|
2692
2692
|
R([
|
|
2693
2693
|
a({ type: Boolean })
|
|
2694
|
-
],
|
|
2694
|
+
], S.prototype, "gap");
|
|
2695
2695
|
R([
|
|
2696
|
-
|
|
2697
|
-
],
|
|
2698
|
-
const
|
|
2696
|
+
b()
|
|
2697
|
+
], S.prototype, "internalValue");
|
|
2698
|
+
const C5 = class C5 extends u {
|
|
2699
2699
|
constructor() {
|
|
2700
2700
|
super(...arguments), this.value = "", this.startIcon = "", this.disabled = !1, this.selected = !1, this.groupSize = "medium", this.groupVariant = "gray", this.groupMode = "single";
|
|
2701
2701
|
}
|
|
2702
2702
|
/** Called by the parent group when the user's action changes this item's selection. */
|
|
2703
2703
|
emitSelectionChange(e) {
|
|
2704
|
-
this.dispatchEvent(new CustomEvent(
|
|
2704
|
+
this.dispatchEvent(new CustomEvent(Z3, {
|
|
2705
2705
|
detail: e,
|
|
2706
2706
|
bubbles: !0,
|
|
2707
2707
|
composed: !0
|
|
2708
|
-
})), this.dispatchEvent(new CustomEvent(e ?
|
|
2708
|
+
})), this.dispatchEvent(new CustomEvent(e ? _3 : x3, {
|
|
2709
2709
|
detail: this.value,
|
|
2710
2710
|
bubbles: !0,
|
|
2711
2711
|
composed: !0
|
|
@@ -2715,7 +2715,7 @@ const r5 = class r5 extends h {
|
|
|
2715
2715
|
(e.has("selected") || e.has("groupMode")) && (this.groupMode === "single" ? (this.setAttribute("role", "radio"), this.setAttribute("aria-checked", String(this.selected))) : (this.removeAttribute("role"), this.removeAttribute("aria-checked")));
|
|
2716
2716
|
}
|
|
2717
2717
|
onClick() {
|
|
2718
|
-
this.dispatchEvent(new CustomEvent(
|
|
2718
|
+
this.dispatchEvent(new CustomEvent(v2, {
|
|
2719
2719
|
detail: this.value,
|
|
2720
2720
|
bubbles: !0,
|
|
2721
2721
|
composed: !0
|
|
@@ -2728,7 +2728,7 @@ const r5 = class r5 extends h {
|
|
|
2728
2728
|
this.disabled ? "toggle-item--disabled" : "",
|
|
2729
2729
|
`toggle-item--variant-${this.groupVariant}`
|
|
2730
2730
|
].filter(Boolean).join(" ");
|
|
2731
|
-
return
|
|
2731
|
+
return C`
|
|
2732
2732
|
<button
|
|
2733
2733
|
type="button"
|
|
2734
2734
|
class="${e}"
|
|
@@ -2738,14 +2738,14 @@ const r5 = class r5 extends h {
|
|
|
2738
2738
|
@click=${this.onClick}
|
|
2739
2739
|
>
|
|
2740
2740
|
<div class="toggle-item__content">
|
|
2741
|
-
${this.startIcon ?
|
|
2741
|
+
${this.startIcon ? C`<div class="toggle-item__icon"><anduin-icon name="${this.startIcon}" size="${this.groupSize === "small" ? 12 : 16}"></anduin-icon></div>` : c}
|
|
2742
2742
|
<slot></slot>
|
|
2743
2743
|
</div>
|
|
2744
2744
|
</button>
|
|
2745
2745
|
`;
|
|
2746
2746
|
}
|
|
2747
2747
|
};
|
|
2748
|
-
|
|
2748
|
+
C5.styles = g`
|
|
2749
2749
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
2750
2750
|
.toggle-item {
|
|
2751
2751
|
position: relative; z-index: 0; box-sizing: border-box;
|
|
@@ -2779,39 +2779,39 @@ r5.styles = v`
|
|
|
2779
2779
|
.toggle-item--selected .toggle-item__icon { color: var(--color-gray-7); }
|
|
2780
2780
|
.toggle-item--variant-primary.toggle-item--selected .toggle-item__icon { color: var(--color-primary-4); }
|
|
2781
2781
|
`;
|
|
2782
|
-
let
|
|
2782
|
+
let P = C5;
|
|
2783
2783
|
R([
|
|
2784
2784
|
a()
|
|
2785
|
-
],
|
|
2785
|
+
], P.prototype, "value");
|
|
2786
2786
|
R([
|
|
2787
2787
|
a({ attribute: "start-icon" })
|
|
2788
|
-
],
|
|
2788
|
+
], P.prototype, "startIcon");
|
|
2789
2789
|
R([
|
|
2790
2790
|
a({ type: Boolean })
|
|
2791
|
-
],
|
|
2791
|
+
], P.prototype, "disabled");
|
|
2792
2792
|
R([
|
|
2793
2793
|
a({ attribute: !1 })
|
|
2794
|
-
],
|
|
2794
|
+
], P.prototype, "selected");
|
|
2795
2795
|
R([
|
|
2796
2796
|
a({ attribute: !1 })
|
|
2797
|
-
],
|
|
2797
|
+
], P.prototype, "groupSize");
|
|
2798
2798
|
R([
|
|
2799
2799
|
a({ attribute: !1 })
|
|
2800
|
-
],
|
|
2800
|
+
], P.prototype, "groupVariant");
|
|
2801
2801
|
R([
|
|
2802
2802
|
a({ attribute: !1 })
|
|
2803
|
-
],
|
|
2804
|
-
function
|
|
2803
|
+
], P.prototype, "groupMode");
|
|
2804
|
+
function U5(l) {
|
|
2805
2805
|
return l.split(" ").map((e) => e.trim()).filter(Boolean);
|
|
2806
2806
|
}
|
|
2807
|
-
customElements.get("anduin-toggle-group") || customElements.define("anduin-toggle-group",
|
|
2808
|
-
customElements.get("anduin-toggle-group-item") || customElements.define("anduin-toggle-group-item",
|
|
2809
|
-
var
|
|
2807
|
+
customElements.get("anduin-toggle-group") || customElements.define("anduin-toggle-group", S);
|
|
2808
|
+
customElements.get("anduin-toggle-group-item") || customElements.define("anduin-toggle-group-item", P);
|
|
2809
|
+
var w3 = Object.defineProperty, f4 = (l, e, t, i) => {
|
|
2810
2810
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
2811
2811
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
2812
|
-
return o &&
|
|
2812
|
+
return o && w3(e, t, o), o;
|
|
2813
2813
|
};
|
|
2814
|
-
const
|
|
2814
|
+
const H4 = "anduin-tooltip:show", B2 = "anduin-tooltip:hide", V4 = "anduin-tooltip:trigger-mounted", L4 = "anduin-tooltip:content-popup-mounted", m4 = "anduin-tooltip:content-popup-unmounted", b4 = "anduin-tooltip:visibility-changed", R3 = [
|
|
2815
2815
|
"top-start",
|
|
2816
2816
|
"top-center",
|
|
2817
2817
|
"top-end",
|
|
@@ -2825,7 +2825,7 @@ const p4 = "anduin-tooltip:show", $2 = "anduin-tooltip:hide", u4 = "anduin-toolt
|
|
|
2825
2825
|
"left-center",
|
|
2826
2826
|
"left-end"
|
|
2827
2827
|
];
|
|
2828
|
-
function
|
|
2828
|
+
function q5(l, e, t, i, o) {
|
|
2829
2829
|
switch (i) {
|
|
2830
2830
|
case "top-start":
|
|
2831
2831
|
return { left: l.left, top: l.top - t - o };
|
|
@@ -2855,64 +2855,64 @@ function D5(l, e, t, i, o) {
|
|
|
2855
2855
|
return { left: 0, top: 0 };
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2858
|
+
function G5(l, e) {
|
|
2859
2859
|
return e.right >= l.left && e.left <= l.right && e.top <= l.bottom && e.bottom >= l.top;
|
|
2860
2860
|
}
|
|
2861
|
-
function
|
|
2861
|
+
function W5(l, e) {
|
|
2862
2862
|
const t = Math.max(l.left, e.left), i = Math.max(l.top, e.top), o = Math.min(l.right, e.right), r = Math.min(l.bottom, e.bottom);
|
|
2863
2863
|
return o < t || r < i ? 0 : (o - t) * (r - i);
|
|
2864
2864
|
}
|
|
2865
|
-
function
|
|
2866
|
-
const o = window.innerWidth, r = window.innerHeight, n = { left: 0, top: 0, right: o, bottom: r },
|
|
2867
|
-
if (!
|
|
2865
|
+
function k3(l, e, t, i = 8) {
|
|
2866
|
+
const o = window.innerWidth, r = window.innerHeight, n = { left: 0, top: 0, right: o, bottom: r }, s = e.width, d = e.height;
|
|
2867
|
+
if (!G5(
|
|
2868
2868
|
{ left: l.left, top: l.top, right: l.right, bottom: l.bottom },
|
|
2869
2869
|
n
|
|
2870
2870
|
)) return null;
|
|
2871
|
-
const p =
|
|
2872
|
-
if (
|
|
2871
|
+
const p = q5(l, s, d, t, i), h = R3.map((f) => ({ p: f, off: q5(l, s, d, f, i) })).filter(({ off: f }) => G5({ left: f.left, top: f.top, right: f.left + s, bottom: f.top + d }, n));
|
|
2872
|
+
if (h.length === 0)
|
|
2873
2873
|
return {
|
|
2874
2874
|
placement: t,
|
|
2875
|
-
left: Math.round(Math.min(Math.max(p.left, 0), o -
|
|
2875
|
+
left: Math.round(Math.min(Math.max(p.left, 0), o - s)),
|
|
2876
2876
|
top: Math.round(Math.min(Math.max(p.top, 0), r - d))
|
|
2877
2877
|
};
|
|
2878
|
-
|
|
2879
|
-
const
|
|
2880
|
-
if (
|
|
2881
|
-
const
|
|
2882
|
-
return
|
|
2878
|
+
h.sort((f, Z) => {
|
|
2879
|
+
const q = { left: f.off.left, top: f.off.top, right: f.off.left + s, bottom: f.off.top + d }, x = { left: Z.off.left, top: Z.off.top, right: Z.off.left + s, bottom: Z.off.top + d }, D = W5(q, n), o1 = W5(x, n);
|
|
2880
|
+
if (o1 !== D) return o1 - D;
|
|
2881
|
+
const j1 = Math.abs(f.off.left - p.left) + Math.abs(f.off.top - p.top), U1 = Math.abs(Z.off.left - p.left) + Math.abs(Z.off.top - p.top);
|
|
2882
|
+
return j1 - U1;
|
|
2883
2883
|
});
|
|
2884
|
-
const { p:
|
|
2884
|
+
const { p: v, off: H } = h[0];
|
|
2885
2885
|
return {
|
|
2886
|
-
placement:
|
|
2887
|
-
left: Math.round(Math.min(Math.max(H.left, 0), o -
|
|
2886
|
+
placement: v,
|
|
2887
|
+
left: Math.round(Math.min(Math.max(H.left, 0), o - s)),
|
|
2888
2888
|
top: Math.round(Math.min(Math.max(H.top, 0), r - d))
|
|
2889
2889
|
};
|
|
2890
2890
|
}
|
|
2891
|
-
function
|
|
2891
|
+
function f2(l) {
|
|
2892
2892
|
return l.split("-")[0] || "top";
|
|
2893
2893
|
}
|
|
2894
|
-
function
|
|
2894
|
+
function $3(l, e, t) {
|
|
2895
2895
|
let i = !1, o = t.length - 1;
|
|
2896
2896
|
for (let r = 0; r < t.length; r++) {
|
|
2897
|
-
const n = t[r][0],
|
|
2898
|
-
|
|
2897
|
+
const n = t[r][0], s = t[r][1], d = t[o][0], p = t[o][1];
|
|
2898
|
+
s > e != p > e && l < (d - n) * (e - s) / (p - s) + n && (i = !i), o = r;
|
|
2899
2899
|
}
|
|
2900
2900
|
return i;
|
|
2901
2901
|
}
|
|
2902
|
-
const
|
|
2902
|
+
const d5 = class d5 extends u {
|
|
2903
2903
|
constructor() {
|
|
2904
2904
|
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;
|
|
2905
2905
|
}
|
|
2906
2906
|
connectedCallback() {
|
|
2907
|
-
super.connectedCallback(), this.addEventListener(
|
|
2907
|
+
super.connectedCallback(), this.addEventListener(V4, (e) => {
|
|
2908
2908
|
e.stopPropagation(), this.triggerElement = e.detail, this.maybeStartPositionLoop();
|
|
2909
|
-
}), this.addEventListener(
|
|
2909
|
+
}), this.addEventListener(L4, (e) => {
|
|
2910
2910
|
e.stopPropagation(), this.contentPopupElement = e.detail, this.computeContainingBlockOffset(this.contentPopupElement), this.maybeStartPositionLoop();
|
|
2911
|
-
}), this.addEventListener(
|
|
2911
|
+
}), this.addEventListener(m4, (e) => {
|
|
2912
2912
|
e.stopPropagation(), this.stopPositionLoop(), this.contentPopupElement = null;
|
|
2913
|
-
}), this.addEventListener(
|
|
2913
|
+
}), this.addEventListener(H4, (e) => {
|
|
2914
2914
|
e.stopPropagation(), !this.disabled && (this.isVisible = !0, this.broadcastVisibilityChanged(`show:${this.placement}`));
|
|
2915
|
-
}), this.addEventListener(
|
|
2915
|
+
}), this.addEventListener(B2, (e) => {
|
|
2916
2916
|
e.stopPropagation(), this.isVisible = !1, this.stopPositionLoop(), this.broadcastVisibilityChanged("hide");
|
|
2917
2917
|
});
|
|
2918
2918
|
}
|
|
@@ -2943,61 +2943,61 @@ const n5 = class n5 extends h {
|
|
|
2943
2943
|
this.containingBlockLeft = o.left, this.containingBlockTop = o.top, t.style.transform = i;
|
|
2944
2944
|
}
|
|
2945
2945
|
positionPopup(e, t, i) {
|
|
2946
|
-
const o = t.getBoundingClientRect(), r = e.getBoundingClientRect(), n =
|
|
2946
|
+
const o = t.getBoundingClientRect(), r = e.getBoundingClientRect(), n = k3(o, r, i, 8);
|
|
2947
2947
|
if (n) {
|
|
2948
|
-
const
|
|
2949
|
-
|
|
2950
|
-
const d =
|
|
2948
|
+
const s = e;
|
|
2949
|
+
s.style.transform = `translate(${n.left - this.containingBlockLeft}px, ${n.top - this.containingBlockTop}px)`;
|
|
2950
|
+
const d = f2(n.placement), p = f2(i);
|
|
2951
2951
|
if (d !== p) {
|
|
2952
|
-
const
|
|
2953
|
-
|
|
2952
|
+
const h = e.querySelector(".tooltip-arrow");
|
|
2953
|
+
h && (h.classList.remove(`tooltip-arrow--${p}`), h.classList.add(`tooltip-arrow--${d}`));
|
|
2954
2954
|
}
|
|
2955
2955
|
}
|
|
2956
2956
|
}
|
|
2957
2957
|
broadcastVisibilityChanged(e) {
|
|
2958
|
-
this.dispatchEvent(new CustomEvent(
|
|
2958
|
+
this.dispatchEvent(new CustomEvent(b4, { detail: e, bubbles: !1, composed: !1 }));
|
|
2959
2959
|
}
|
|
2960
2960
|
render() {
|
|
2961
|
-
return
|
|
2961
|
+
return C`<div class="tooltip-root" part="tooltip"><slot></slot></div>`;
|
|
2962
2962
|
}
|
|
2963
2963
|
};
|
|
2964
|
-
|
|
2964
|
+
d5.styles = g`
|
|
2965
2965
|
:host { display: inline-block; position: relative; max-width: 100%; font-family: var(--font-sans); }
|
|
2966
2966
|
.tooltip-root { display: inline-block; position: relative; max-width: 100%; }
|
|
2967
2967
|
`;
|
|
2968
|
-
let
|
|
2969
|
-
|
|
2968
|
+
let F1 = d5;
|
|
2969
|
+
f4([
|
|
2970
2970
|
a({ type: Boolean })
|
|
2971
|
-
],
|
|
2972
|
-
|
|
2971
|
+
], F1.prototype, "disabled");
|
|
2972
|
+
f4([
|
|
2973
2973
|
a()
|
|
2974
|
-
],
|
|
2975
|
-
const
|
|
2974
|
+
], F1.prototype, "placement");
|
|
2975
|
+
const c5 = class c5 extends u {
|
|
2976
2976
|
firstUpdated() {
|
|
2977
2977
|
requestAnimationFrame(() => {
|
|
2978
|
-
this.dispatchEvent(new CustomEvent(
|
|
2978
|
+
this.dispatchEvent(new CustomEvent(V4, { detail: this, bubbles: !0, composed: !0 }));
|
|
2979
2979
|
}), this.addEventListener("pointerenter", () => {
|
|
2980
|
-
this.dispatchEvent(new CustomEvent(
|
|
2980
|
+
this.dispatchEvent(new CustomEvent(H4, { bubbles: !0, composed: !0 }));
|
|
2981
2981
|
}), this.addEventListener("click", () => {
|
|
2982
|
-
this.dispatchEvent(new CustomEvent(
|
|
2982
|
+
this.dispatchEvent(new CustomEvent(B2, { bubbles: !0, composed: !0 }));
|
|
2983
2983
|
});
|
|
2984
2984
|
}
|
|
2985
2985
|
render() {
|
|
2986
|
-
return
|
|
2986
|
+
return C`<span class="tooltip-trigger" part="tooltip-trigger"><slot></slot></span>`;
|
|
2987
2987
|
}
|
|
2988
2988
|
};
|
|
2989
|
-
|
|
2989
|
+
c5.styles = g`
|
|
2990
2990
|
:host { display: inline-block; max-width: 100%; font-family: var(--font-sans); }
|
|
2991
2991
|
.tooltip-trigger { display: flex; align-items: center; max-width: 100%; }
|
|
2992
2992
|
`;
|
|
2993
|
-
let
|
|
2994
|
-
const
|
|
2993
|
+
let H2 = c5;
|
|
2994
|
+
const p5 = class p5 extends u {
|
|
2995
2995
|
constructor() {
|
|
2996
2996
|
super(...arguments), this.graceArea = null, this.triggerEl = null, this.popupEl = null, this.handlePointerMove = (e) => {
|
|
2997
2997
|
var r, n;
|
|
2998
2998
|
if (!this.graceArea) return;
|
|
2999
2999
|
const t = e.target, i = ((r = this.triggerEl) == null ? void 0 : r.contains(t)) ?? !1, o = ((n = this.popupEl) == null ? void 0 : n.contains(t)) ?? !1;
|
|
3000
|
-
i || o ? this.graceArea = null :
|
|
3000
|
+
i || o ? this.graceArea = null : $3(e.clientX, e.clientY, this.graceArea) || (this.graceArea = null, this.dispatchEvent(new CustomEvent(B2, { bubbles: !0, composed: !0 })));
|
|
3001
3001
|
}, this.handleTriggerLeave = (e) => {
|
|
3002
3002
|
this.triggerEl && this.popupEl && this.createGraceArea(this.triggerEl, this.popupEl, e);
|
|
3003
3003
|
}, this.handleContentLeave = (e) => {
|
|
@@ -3007,7 +3007,7 @@ const C5 = class C5 extends h {
|
|
|
3007
3007
|
connectedCallback() {
|
|
3008
3008
|
super.connectedCallback();
|
|
3009
3009
|
const e = this.closest("anduin-tooltip");
|
|
3010
|
-
e && e.addEventListener(
|
|
3010
|
+
e && e.addEventListener(b4, (t) => {
|
|
3011
3011
|
const i = t.detail;
|
|
3012
3012
|
i.startsWith("show:") ? this.showPopup(i.slice(5)) : this.hidePopup();
|
|
3013
3013
|
});
|
|
@@ -3033,7 +3033,7 @@ const C5 = class C5 extends h {
|
|
|
3033
3033
|
}
|
|
3034
3034
|
showPopup(e) {
|
|
3035
3035
|
this.hidePopup();
|
|
3036
|
-
const t =
|
|
3036
|
+
const t = f2(e), i = document.createElement("div");
|
|
3037
3037
|
i.className = "tooltip-popup", i.setAttribute("role", "tooltip");
|
|
3038
3038
|
const o = document.createElement("div");
|
|
3039
3039
|
o.className = `tooltip-arrow tooltip-arrow--${t}`;
|
|
@@ -3041,21 +3041,21 @@ const C5 = class C5 extends h {
|
|
|
3041
3041
|
r.className = "tooltip-body", r.appendChild(document.createElement("slot")), i.appendChild(o), i.appendChild(r);
|
|
3042
3042
|
const n = this.shadowRoot.querySelector(".tooltip-content-wrapper");
|
|
3043
3043
|
n && n.appendChild(i), this.popupEl = i;
|
|
3044
|
-
const
|
|
3045
|
-
if (
|
|
3046
|
-
const d =
|
|
3044
|
+
const s = this.closest("anduin-tooltip");
|
|
3045
|
+
if (s) {
|
|
3046
|
+
const d = s.querySelector("anduin-tooltip-trigger");
|
|
3047
3047
|
d && this.setupGraceAreaListeners(d, i);
|
|
3048
3048
|
}
|
|
3049
|
-
this.dispatchEvent(new CustomEvent(
|
|
3049
|
+
this.dispatchEvent(new CustomEvent(L4, { detail: i, bubbles: !0, composed: !0 }));
|
|
3050
3050
|
}
|
|
3051
3051
|
hidePopup() {
|
|
3052
|
-
this.popupEl && (this.popupEl.remove(), this.popupEl = null, this.dispatchEvent(new CustomEvent(
|
|
3052
|
+
this.popupEl && (this.popupEl.remove(), this.popupEl = null, this.dispatchEvent(new CustomEvent(m4, { bubbles: !0, composed: !0 }))), this.cleanupGraceAreaListeners();
|
|
3053
3053
|
}
|
|
3054
3054
|
render() {
|
|
3055
|
-
return
|
|
3055
|
+
return C`<div class="tooltip-content-wrapper"></div>`;
|
|
3056
3056
|
}
|
|
3057
3057
|
};
|
|
3058
|
-
|
|
3058
|
+
p5.styles = g`
|
|
3059
3059
|
:host {
|
|
3060
3060
|
display: contents;
|
|
3061
3061
|
--tooltip-bg: var(--anduin-tooltip-content-background, var(--color-gray-9));
|
|
@@ -3079,21 +3079,21 @@ C5.styles = v`
|
|
|
3079
3079
|
.tooltip-arrow--left { right: -4px; top: 50%; transform: translateY(-50%); border-left-color: var(--tooltip-bg); border-right: none; }
|
|
3080
3080
|
.tooltip-arrow--right { left: -4px; top: 50%; transform: translateY(-50%); border-right-color: var(--tooltip-bg); border-left: none; }
|
|
3081
3081
|
`;
|
|
3082
|
-
let
|
|
3083
|
-
customElements.get("anduin-tooltip") || customElements.define("anduin-tooltip",
|
|
3084
|
-
customElements.get("anduin-tooltip-trigger") || customElements.define("anduin-tooltip-trigger",
|
|
3085
|
-
customElements.get("anduin-tooltip-content") || customElements.define("anduin-tooltip-content",
|
|
3086
|
-
var
|
|
3082
|
+
let V2 = p5;
|
|
3083
|
+
customElements.get("anduin-tooltip") || customElements.define("anduin-tooltip", F1);
|
|
3084
|
+
customElements.get("anduin-tooltip-trigger") || customElements.define("anduin-tooltip-trigger", H2);
|
|
3085
|
+
customElements.get("anduin-tooltip-content") || customElements.define("anduin-tooltip-content", V2);
|
|
3086
|
+
var E3 = Object.defineProperty, A3 = (l, e, t, i) => {
|
|
3087
3087
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
3088
3088
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
3089
|
-
return o &&
|
|
3089
|
+
return o && E3(e, t, o), o;
|
|
3090
3090
|
};
|
|
3091
|
-
const
|
|
3091
|
+
const z3 = "anduin-well-close:click", u5 = class u5 extends u {
|
|
3092
3092
|
constructor() {
|
|
3093
3093
|
super(...arguments), this.variant = "gray";
|
|
3094
3094
|
}
|
|
3095
3095
|
render() {
|
|
3096
|
-
return
|
|
3096
|
+
return C`
|
|
3097
3097
|
<div class="well well--${this.variant}" part="well">
|
|
3098
3098
|
<div class="well__icon well__icon--${this.variant}">
|
|
3099
3099
|
<slot name="icon"></slot>
|
|
@@ -3107,7 +3107,7 @@ const w3 = "anduin-well-close:click", s5 = class s5 extends h {
|
|
|
3107
3107
|
`;
|
|
3108
3108
|
}
|
|
3109
3109
|
};
|
|
3110
|
-
|
|
3110
|
+
u5.styles = g`
|
|
3111
3111
|
:host {
|
|
3112
3112
|
display: block;
|
|
3113
3113
|
font-family: var(--font-sans);
|
|
@@ -3172,18 +3172,18 @@ s5.styles = v`
|
|
|
3172
3172
|
color: var(--color-warning-4);
|
|
3173
3173
|
}
|
|
3174
3174
|
`;
|
|
3175
|
-
let
|
|
3176
|
-
|
|
3175
|
+
let t2 = u5;
|
|
3176
|
+
A3([
|
|
3177
3177
|
a()
|
|
3178
|
-
],
|
|
3179
|
-
const
|
|
3178
|
+
], t2.prototype, "variant");
|
|
3179
|
+
const h5 = class h5 extends u {
|
|
3180
3180
|
onClick() {
|
|
3181
3181
|
this.dispatchEvent(
|
|
3182
|
-
new CustomEvent(
|
|
3182
|
+
new CustomEvent(z3, { bubbles: !0, composed: !0 })
|
|
3183
3183
|
);
|
|
3184
3184
|
}
|
|
3185
3185
|
render() {
|
|
3186
|
-
return
|
|
3186
|
+
return C`
|
|
3187
3187
|
<button
|
|
3188
3188
|
class="well-close__button"
|
|
3189
3189
|
part="well-close"
|
|
@@ -3194,7 +3194,7 @@ const d5 = class d5 extends h {
|
|
|
3194
3194
|
`;
|
|
3195
3195
|
}
|
|
3196
3196
|
};
|
|
3197
|
-
|
|
3197
|
+
h5.styles = g`
|
|
3198
3198
|
:host {
|
|
3199
3199
|
display: inline-block;
|
|
3200
3200
|
font-family: var(--font-sans);
|
|
@@ -3219,15 +3219,15 @@ d5.styles = v`
|
|
|
3219
3219
|
background-color: var(--color-gray-3);
|
|
3220
3220
|
}
|
|
3221
3221
|
`;
|
|
3222
|
-
let
|
|
3223
|
-
customElements.get("anduin-well") || customElements.define("anduin-well",
|
|
3224
|
-
customElements.get("anduin-well-close") || customElements.define("anduin-well-close",
|
|
3225
|
-
var
|
|
3222
|
+
let L2 = h5;
|
|
3223
|
+
customElements.get("anduin-well") || customElements.define("anduin-well", t2);
|
|
3224
|
+
customElements.get("anduin-well-close") || customElements.define("anduin-well-close", L2);
|
|
3225
|
+
var B3 = Object.defineProperty, C1 = (l, e, t, i) => {
|
|
3226
3226
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
3227
3227
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
3228
|
-
return o &&
|
|
3228
|
+
return o && B3(e, t, o), o;
|
|
3229
3229
|
};
|
|
3230
|
-
const
|
|
3230
|
+
const m2 = "anduin-popover:close", g5 = class g5 extends u {
|
|
3231
3231
|
constructor() {
|
|
3232
3232
|
super(...arguments), this.open = !1, this.placement = "bottom-start", this.fullWidth = !1, this._visible = !1, this._closing = !1, this._closeTransitionEndHandler = null, this._onOutsideClick = (e) => {
|
|
3233
3233
|
var t;
|
|
@@ -3242,10 +3242,10 @@ const H2 = "anduin-popover:close", c5 = class c5 extends h {
|
|
|
3242
3242
|
this.open = !this.open;
|
|
3243
3243
|
}
|
|
3244
3244
|
connectedCallback() {
|
|
3245
|
-
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), window.addEventListener("scroll", this._onScrollOrResize, { passive: !0, capture: !0 }), window.addEventListener("resize", this._onScrollOrResize), this.addEventListener(
|
|
3245
|
+
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), window.addEventListener("scroll", this._onScrollOrResize, { passive: !0, capture: !0 }), window.addEventListener("resize", this._onScrollOrResize), this.addEventListener(m2, this._onPopoverClose);
|
|
3246
3246
|
}
|
|
3247
3247
|
disconnectedCallback() {
|
|
3248
|
-
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), window.removeEventListener("scroll", this._onScrollOrResize, { capture: !0 }), window.removeEventListener("resize", this._onScrollOrResize), this.removeEventListener(
|
|
3248
|
+
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), window.removeEventListener("scroll", this._onScrollOrResize, { capture: !0 }), window.removeEventListener("resize", this._onScrollOrResize), this.removeEventListener(m2, this._onPopoverClose);
|
|
3249
3249
|
}
|
|
3250
3250
|
updated(e) {
|
|
3251
3251
|
e.has("open") && (this.open ? (this._cancelCloseAnimation(), this._closing = !1, this._visible = !0, requestAnimationFrame(() => this._updatePosition())) : this._startCloseAnimation());
|
|
@@ -3272,15 +3272,15 @@ const H2 = "anduin-popover:close", c5 = class c5 extends h {
|
|
|
3272
3272
|
t.style.transform = "none";
|
|
3273
3273
|
const r = t.getBoundingClientRect();
|
|
3274
3274
|
t.style.transform = o;
|
|
3275
|
-
const n = t.getBoundingClientRect(),
|
|
3276
|
-
let
|
|
3277
|
-
const Z = !this.placement.startsWith("top"),
|
|
3278
|
-
f =
|
|
3279
|
-
const
|
|
3280
|
-
|
|
3275
|
+
const n = t.getBoundingClientRect(), s = 4, d = window.innerWidth, p = window.innerHeight, h = 8;
|
|
3276
|
+
let v = 0, H = 0, f = "bottom";
|
|
3277
|
+
const Z = !this.placement.startsWith("top"), q = p - i.bottom - s, x = i.top - s, D = q >= n.height, o1 = x >= n.height, j1 = Z ? D || q >= x : !o1 && D;
|
|
3278
|
+
f = j1 ? "bottom" : "top", H = j1 ? i.bottom + s : i.top - n.height - s;
|
|
3279
|
+
const U1 = this.placement.endsWith("end") ? "end" : this.placement.endsWith("start") ? "start" : "center";
|
|
3280
|
+
U1 === "start" ? v = i.left : U1 === "end" ? v = i.right - n.width : v = i.left + i.width / 2 - n.width / 2, v = Math.max(h, Math.min(v, d - n.width - h)), H = Math.max(h, Math.min(H, p - n.height - h)), t.style.transform = `translate(${Math.round(v - r.left)}px, ${Math.round(H - r.top)}px)`, t.dataset.side = f;
|
|
3281
3281
|
}
|
|
3282
3282
|
render() {
|
|
3283
|
-
return
|
|
3283
|
+
return C`
|
|
3284
3284
|
<div class="popover__trigger" @click=${this._onTriggerClick} part="trigger">
|
|
3285
3285
|
<slot name="trigger"></slot>
|
|
3286
3286
|
</div>
|
|
@@ -3292,7 +3292,7 @@ const H2 = "anduin-popover:close", c5 = class c5 extends h {
|
|
|
3292
3292
|
`;
|
|
3293
3293
|
}
|
|
3294
3294
|
};
|
|
3295
|
-
|
|
3295
|
+
g5.styles = g`
|
|
3296
3296
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
3297
3297
|
:host([full-width]) { display: block; width: 100%; }
|
|
3298
3298
|
|
|
@@ -3345,46 +3345,46 @@ c5.styles = v`
|
|
|
3345
3345
|
transform: none;
|
|
3346
3346
|
}
|
|
3347
3347
|
`;
|
|
3348
|
-
let
|
|
3349
|
-
|
|
3348
|
+
let F = g5;
|
|
3349
|
+
C1([
|
|
3350
3350
|
a({ type: Boolean, reflect: !0 })
|
|
3351
|
-
],
|
|
3352
|
-
|
|
3351
|
+
], F.prototype, "open");
|
|
3352
|
+
C1([
|
|
3353
3353
|
a()
|
|
3354
|
-
],
|
|
3355
|
-
|
|
3354
|
+
], F.prototype, "placement");
|
|
3355
|
+
C1([
|
|
3356
3356
|
a({ type: Boolean, attribute: "full-width", reflect: !0 })
|
|
3357
|
-
],
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
],
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
],
|
|
3364
|
-
|
|
3357
|
+
], F.prototype, "fullWidth");
|
|
3358
|
+
C1([
|
|
3359
|
+
b()
|
|
3360
|
+
], F.prototype, "_visible");
|
|
3361
|
+
C1([
|
|
3362
|
+
b()
|
|
3363
|
+
], F.prototype, "_closing");
|
|
3364
|
+
C1([
|
|
3365
3365
|
k(".popover__trigger")
|
|
3366
|
-
],
|
|
3367
|
-
|
|
3366
|
+
], F.prototype, "_triggerEl");
|
|
3367
|
+
C1([
|
|
3368
3368
|
k(".popover__panel")
|
|
3369
|
-
],
|
|
3370
|
-
customElements.get("anduin-popover") || customElements.define("anduin-popover",
|
|
3371
|
-
const
|
|
3369
|
+
], F.prototype, "_panelEl");
|
|
3370
|
+
customElements.get("anduin-popover") || customElements.define("anduin-popover", F);
|
|
3371
|
+
const v5 = class v5 extends u {
|
|
3372
3372
|
_onClick() {
|
|
3373
|
-
this.dispatchEvent(new CustomEvent(
|
|
3373
|
+
this.dispatchEvent(new CustomEvent(m2, { bubbles: !0, composed: !0 }));
|
|
3374
3374
|
}
|
|
3375
3375
|
render() {
|
|
3376
|
-
return
|
|
3376
|
+
return C`<span @click=${this._onClick}><slot></slot></span>`;
|
|
3377
3377
|
}
|
|
3378
3378
|
};
|
|
3379
|
-
|
|
3380
|
-
let
|
|
3381
|
-
customElements.get("anduin-popover-close") || customElements.define("anduin-popover-close",
|
|
3382
|
-
var
|
|
3379
|
+
v5.styles = g`:host { display: contents; }`;
|
|
3380
|
+
let b2 = v5;
|
|
3381
|
+
customElements.get("anduin-popover-close") || customElements.define("anduin-popover-close", b2);
|
|
3382
|
+
var S3 = Object.defineProperty, d1 = (l, e, t, i) => {
|
|
3383
3383
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
3384
3384
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
3385
|
-
return o &&
|
|
3385
|
+
return o && S3(e, t, o), o;
|
|
3386
3386
|
};
|
|
3387
|
-
const
|
|
3387
|
+
const y2 = "anduin-menu-item:click", f5 = class f5 extends u {
|
|
3388
3388
|
constructor() {
|
|
3389
3389
|
super(...arguments), this.open = !1, this.placement = "bottom-start", this._onOutsideClick = (e) => {
|
|
3390
3390
|
var t;
|
|
@@ -3399,10 +3399,10 @@ const L2 = "anduin-menu-item:click", u5 = class u5 extends h {
|
|
|
3399
3399
|
this.open = !this.open;
|
|
3400
3400
|
}
|
|
3401
3401
|
connectedCallback() {
|
|
3402
|
-
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), this.addEventListener(
|
|
3402
|
+
super.connectedCallback(), document.addEventListener("click", this._onOutsideClick), this.addEventListener(y2, this._onItemClick), window.addEventListener("scroll", this._onScrollOrResize, { passive: !0, capture: !0 }), window.addEventListener("resize", this._onScrollOrResize);
|
|
3403
3403
|
}
|
|
3404
3404
|
disconnectedCallback() {
|
|
3405
|
-
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), this.removeEventListener(
|
|
3405
|
+
super.disconnectedCallback(), document.removeEventListener("click", this._onOutsideClick), this.removeEventListener(y2, this._onItemClick), window.removeEventListener("scroll", this._onScrollOrResize, { capture: !0 }), window.removeEventListener("resize", this._onScrollOrResize);
|
|
3406
3406
|
}
|
|
3407
3407
|
updated(e) {
|
|
3408
3408
|
e.has("open") && this.open && requestAnimationFrame(() => this._updatePosition());
|
|
@@ -3414,32 +3414,32 @@ const L2 = "anduin-menu-item:click", u5 = class u5 extends h {
|
|
|
3414
3414
|
t.style.transform = "none";
|
|
3415
3415
|
const r = t.getBoundingClientRect();
|
|
3416
3416
|
t.style.transform = o;
|
|
3417
|
-
const n = t.getBoundingClientRect(),
|
|
3418
|
-
let d = 0, p = 0,
|
|
3417
|
+
const n = t.getBoundingClientRect(), s = 4;
|
|
3418
|
+
let d = 0, p = 0, h = "bottom";
|
|
3419
3419
|
switch (this.placement) {
|
|
3420
3420
|
case "bottom-start":
|
|
3421
|
-
d = i.left, p = i.bottom +
|
|
3421
|
+
d = i.left, p = i.bottom + s, h = "bottom";
|
|
3422
3422
|
break;
|
|
3423
3423
|
case "bottom-end":
|
|
3424
|
-
d = i.right - n.width, p = i.bottom +
|
|
3424
|
+
d = i.right - n.width, p = i.bottom + s, h = "bottom";
|
|
3425
3425
|
break;
|
|
3426
3426
|
case "bottom":
|
|
3427
|
-
d = i.left + i.width / 2 - n.width / 2, p = i.bottom +
|
|
3427
|
+
d = i.left + i.width / 2 - n.width / 2, p = i.bottom + s, h = "bottom";
|
|
3428
3428
|
break;
|
|
3429
3429
|
case "top-start":
|
|
3430
|
-
d = i.left, p = i.top - n.height -
|
|
3430
|
+
d = i.left, p = i.top - n.height - s, h = "top";
|
|
3431
3431
|
break;
|
|
3432
3432
|
case "top-end":
|
|
3433
|
-
d = i.right - n.width, p = i.top - n.height -
|
|
3433
|
+
d = i.right - n.width, p = i.top - n.height - s, h = "top";
|
|
3434
3434
|
break;
|
|
3435
3435
|
case "top":
|
|
3436
|
-
d = i.left + i.width / 2 - n.width / 2, p = i.top - n.height -
|
|
3436
|
+
d = i.left + i.width / 2 - n.width / 2, p = i.top - n.height - s, h = "top";
|
|
3437
3437
|
break;
|
|
3438
3438
|
}
|
|
3439
|
-
t.style.transform = `translate(${Math.round(d - r.left)}px, ${Math.round(p - r.top)}px)`, t.dataset.side =
|
|
3439
|
+
t.style.transform = `translate(${Math.round(d - r.left)}px, ${Math.round(p - r.top)}px)`, t.dataset.side = h;
|
|
3440
3440
|
}
|
|
3441
3441
|
render() {
|
|
3442
|
-
return
|
|
3442
|
+
return C`
|
|
3443
3443
|
<div class="menu__trigger" @click=${this._onTriggerClick} part="trigger">
|
|
3444
3444
|
<slot name="trigger"></slot>
|
|
3445
3445
|
</div>
|
|
@@ -3451,7 +3451,7 @@ const L2 = "anduin-menu-item:click", u5 = class u5 extends h {
|
|
|
3451
3451
|
`;
|
|
3452
3452
|
}
|
|
3453
3453
|
};
|
|
3454
|
-
|
|
3454
|
+
f5.styles = g`
|
|
3455
3455
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
3456
3456
|
|
|
3457
3457
|
.menu__trigger { display: inline-block; }
|
|
@@ -3494,28 +3494,28 @@ u5.styles = v`
|
|
|
3494
3494
|
transform: scale(1) translateY(0);
|
|
3495
3495
|
}
|
|
3496
3496
|
`;
|
|
3497
|
-
let
|
|
3498
|
-
|
|
3497
|
+
let s1 = f5;
|
|
3498
|
+
d1([
|
|
3499
3499
|
a({ type: Boolean, reflect: !0 })
|
|
3500
|
-
],
|
|
3501
|
-
|
|
3500
|
+
], s1.prototype, "open");
|
|
3501
|
+
d1([
|
|
3502
3502
|
a()
|
|
3503
|
-
],
|
|
3504
|
-
|
|
3503
|
+
], s1.prototype, "placement");
|
|
3504
|
+
d1([
|
|
3505
3505
|
k(".menu__trigger")
|
|
3506
|
-
],
|
|
3507
|
-
|
|
3506
|
+
], s1.prototype, "_triggerEl");
|
|
3507
|
+
d1([
|
|
3508
3508
|
k(".menu__panel")
|
|
3509
|
-
],
|
|
3510
|
-
const
|
|
3509
|
+
], s1.prototype, "_panelEl");
|
|
3510
|
+
const H5 = class H5 extends u {
|
|
3511
3511
|
constructor() {
|
|
3512
3512
|
super(...arguments), this.icon = "", this.variant = "default", this.disabled = !1;
|
|
3513
3513
|
}
|
|
3514
3514
|
_onClick() {
|
|
3515
|
-
this.dispatchEvent(new CustomEvent(
|
|
3515
|
+
this.dispatchEvent(new CustomEvent(y2, { bubbles: !0, composed: !0 }));
|
|
3516
3516
|
}
|
|
3517
3517
|
render() {
|
|
3518
|
-
return
|
|
3518
|
+
return C`
|
|
3519
3519
|
<button
|
|
3520
3520
|
class="menu-item ${this.variant === "danger" ? "menu-item--danger" : ""}"
|
|
3521
3521
|
role="menuitem"
|
|
@@ -3523,13 +3523,13 @@ const h5 = class h5 extends h {
|
|
|
3523
3523
|
part="menu-item"
|
|
3524
3524
|
@click=${this._onClick}
|
|
3525
3525
|
>
|
|
3526
|
-
${this.icon ?
|
|
3526
|
+
${this.icon ? C`<anduin-icon name="${this.icon}" size="16"></anduin-icon>` : c}
|
|
3527
3527
|
<span class="menu-item__label"><slot></slot></span>
|
|
3528
3528
|
</button>
|
|
3529
3529
|
`;
|
|
3530
3530
|
}
|
|
3531
3531
|
};
|
|
3532
|
-
|
|
3532
|
+
H5.styles = g`
|
|
3533
3533
|
:host { display: block; width: 100%; font-family: var(--font-sans); }
|
|
3534
3534
|
.menu-item {
|
|
3535
3535
|
display: flex;
|
|
@@ -3559,26 +3559,26 @@ h5.styles = v`
|
|
|
3559
3559
|
anduin-icon { color: var(--color-gray-7); }
|
|
3560
3560
|
.menu-item--danger anduin-icon { color: var(--color-danger-4); }
|
|
3561
3561
|
`;
|
|
3562
|
-
let
|
|
3563
|
-
|
|
3562
|
+
let H1 = H5;
|
|
3563
|
+
d1([
|
|
3564
3564
|
a()
|
|
3565
|
-
],
|
|
3566
|
-
|
|
3565
|
+
], H1.prototype, "icon");
|
|
3566
|
+
d1([
|
|
3567
3567
|
a()
|
|
3568
|
-
],
|
|
3569
|
-
|
|
3568
|
+
], H1.prototype, "variant");
|
|
3569
|
+
d1([
|
|
3570
3570
|
a({ type: Boolean })
|
|
3571
|
-
],
|
|
3572
|
-
customElements.get("anduin-menu") || customElements.define("anduin-menu",
|
|
3573
|
-
customElements.get("anduin-menu-item") || customElements.define("anduin-menu-item",
|
|
3574
|
-
var
|
|
3571
|
+
], H1.prototype, "disabled");
|
|
3572
|
+
customElements.get("anduin-menu") || customElements.define("anduin-menu", s1);
|
|
3573
|
+
customElements.get("anduin-menu-item") || customElements.define("anduin-menu-item", H1);
|
|
3574
|
+
var P3 = Object.defineProperty, c1 = (l, e, t, i) => {
|
|
3575
3575
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
3576
3576
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
3577
|
-
return o &&
|
|
3577
|
+
return o && P3(e, t, o), o;
|
|
3578
3578
|
};
|
|
3579
|
-
const
|
|
3580
|
-
var
|
|
3581
|
-
const
|
|
3579
|
+
const y1 = "anduin-close", F3 = "anduin-after-close", s2 = 300, C2 = 200, Y5 = 250;
|
|
3580
|
+
var Y;
|
|
3581
|
+
const e1 = (Y = class extends u {
|
|
3582
3582
|
constructor() {
|
|
3583
3583
|
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) => {
|
|
3584
3584
|
e.target !== this && e.stopPropagation();
|
|
@@ -3586,19 +3586,19 @@ const K = (G = class extends h {
|
|
|
3586
3586
|
}
|
|
3587
3587
|
updated(e) {
|
|
3588
3588
|
if (e.has("maxWidth")) {
|
|
3589
|
-
const t = this.maxWidth, i =
|
|
3589
|
+
const t = this.maxWidth, i = Y._PRESETS.has(t) ? `${t}px` : t;
|
|
3590
3590
|
this.style.setProperty("--_modal-width", i);
|
|
3591
3591
|
}
|
|
3592
3592
|
e.has("open") && (this.open ? (this._leaving = !1, this.classList.add("is-shown")) : this.classList.contains("is-shown") && (this._leaving = !0, setTimeout(
|
|
3593
3593
|
() => {
|
|
3594
3594
|
this._leaving = !1, this.classList.remove("is-shown"), this.dispatchEvent(
|
|
3595
|
-
new CustomEvent(
|
|
3595
|
+
new CustomEvent(F3, {
|
|
3596
3596
|
bubbles: !0,
|
|
3597
3597
|
composed: !0
|
|
3598
3598
|
})
|
|
3599
3599
|
);
|
|
3600
3600
|
},
|
|
3601
|
-
Math.max(
|
|
3601
|
+
Math.max(C2, Y5)
|
|
3602
3602
|
)));
|
|
3603
3603
|
}
|
|
3604
3604
|
dispatch(e) {
|
|
@@ -3607,20 +3607,20 @@ const K = (G = class extends h {
|
|
|
3607
3607
|
);
|
|
3608
3608
|
}
|
|
3609
3609
|
onOverlayClick() {
|
|
3610
|
-
this.dispatch(
|
|
3610
|
+
this.dispatch(y1);
|
|
3611
3611
|
}
|
|
3612
3612
|
onClose() {
|
|
3613
|
-
this.dispatch(
|
|
3613
|
+
this.dispatch(y1);
|
|
3614
3614
|
}
|
|
3615
3615
|
connectedCallback() {
|
|
3616
|
-
super.connectedCallback(), this.addEventListener(
|
|
3616
|
+
super.connectedCallback(), this.addEventListener(y1, this.onAnduinClose);
|
|
3617
3617
|
}
|
|
3618
3618
|
disconnectedCallback() {
|
|
3619
|
-
super.disconnectedCallback(), this.removeEventListener(
|
|
3619
|
+
super.disconnectedCallback(), this.removeEventListener(y1, this.onAnduinClose);
|
|
3620
3620
|
}
|
|
3621
3621
|
render() {
|
|
3622
3622
|
const e = this._leaving, t = this.fullscreen;
|
|
3623
|
-
return
|
|
3623
|
+
return C`
|
|
3624
3624
|
<div
|
|
3625
3625
|
class=${`overlay${e ? " is-leaving" : ""}`}
|
|
3626
3626
|
@click=${this.onOverlayClick}
|
|
@@ -3632,10 +3632,10 @@ const K = (G = class extends h {
|
|
|
3632
3632
|
aria-modal="true"
|
|
3633
3633
|
aria-labelledby="modal-title"
|
|
3634
3634
|
>
|
|
3635
|
-
${this.hideHeader ? c :
|
|
3635
|
+
${this.hideHeader ? c : C` <div class="header">
|
|
3636
3636
|
<div class="header-slot">
|
|
3637
3637
|
<slot name="header">
|
|
3638
|
-
${this.heading ?
|
|
3638
|
+
${this.heading ? C`<span id="modal-title" class="title"
|
|
3639
3639
|
>${this.heading}</span
|
|
3640
3640
|
>` : c}
|
|
3641
3641
|
</slot>
|
|
@@ -3653,12 +3653,12 @@ const K = (G = class extends h {
|
|
|
3653
3653
|
<div class="body">
|
|
3654
3654
|
<slot></slot>
|
|
3655
3655
|
</div>
|
|
3656
|
-
${this.hideFooter ? c :
|
|
3656
|
+
${this.hideFooter ? c : C`<div class="footer"><slot name="footer"></slot></div>`}
|
|
3657
3657
|
</div>
|
|
3658
3658
|
</div>
|
|
3659
3659
|
`;
|
|
3660
3660
|
}
|
|
3661
|
-
},
|
|
3661
|
+
}, Y.styles = g`
|
|
3662
3662
|
:host {
|
|
3663
3663
|
display: none;
|
|
3664
3664
|
font-family: var(--font-sans);
|
|
@@ -3730,11 +3730,11 @@ const K = (G = class extends h {
|
|
|
3730
3730
|
inset: 0;
|
|
3731
3731
|
background: rgba(50, 60, 77, 0.6);
|
|
3732
3732
|
cursor: default;
|
|
3733
|
-
animation: overlayIn ${
|
|
3733
|
+
animation: overlayIn ${s2}ms cubic-bezier(0.2, 0, 0, 1)
|
|
3734
3734
|
forwards;
|
|
3735
3735
|
}
|
|
3736
3736
|
.overlay.is-leaving {
|
|
3737
|
-
animation: overlayOut ${
|
|
3737
|
+
animation: overlayOut ${Y5}ms
|
|
3738
3738
|
cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
|
|
3739
3739
|
}
|
|
3740
3740
|
.modal-wrapper {
|
|
@@ -3760,11 +3760,11 @@ const K = (G = class extends h {
|
|
|
3760
3760
|
0 8px 24px 0 rgba(29, 41, 57, 0.12),
|
|
3761
3761
|
0 2px 8px 0 rgba(29, 41, 57, 0.08);
|
|
3762
3762
|
flex-shrink: 0;
|
|
3763
|
-
animation: modalIn ${
|
|
3763
|
+
animation: modalIn ${s2}ms cubic-bezier(0.05, 0.7, 0.1, 1)
|
|
3764
3764
|
forwards;
|
|
3765
3765
|
}
|
|
3766
3766
|
.modal.is-leaving {
|
|
3767
|
-
animation: modalOut ${
|
|
3767
|
+
animation: modalOut ${C2}ms
|
|
3768
3768
|
cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
|
|
3769
3769
|
}
|
|
3770
3770
|
.modal-wrapper--fullscreen {
|
|
@@ -3794,11 +3794,11 @@ const K = (G = class extends h {
|
|
|
3794
3794
|
max-height: 100%;
|
|
3795
3795
|
height: 100%;
|
|
3796
3796
|
box-shadow: none;
|
|
3797
|
-
animation: modalFullscreenIn ${
|
|
3797
|
+
animation: modalFullscreenIn ${s2}ms
|
|
3798
3798
|
cubic-bezier(0.05, 0.7, 0.1, 1) forwards;
|
|
3799
3799
|
}
|
|
3800
3800
|
.modal--fullscreen.is-leaving {
|
|
3801
|
-
animation: modalFullscreenOut ${
|
|
3801
|
+
animation: modalFullscreenOut ${C2}ms
|
|
3802
3802
|
cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
|
|
3803
3803
|
}
|
|
3804
3804
|
.header {
|
|
@@ -3844,41 +3844,41 @@ const K = (G = class extends h {
|
|
|
3844
3844
|
padding: 16px 24px;
|
|
3845
3845
|
border-top: 1px solid var(--color-gray-3, #e4e7ec);
|
|
3846
3846
|
}
|
|
3847
|
-
`,
|
|
3847
|
+
`, Y._PRESETS = /* @__PURE__ */ new Set([
|
|
3848
3848
|
"480",
|
|
3849
3849
|
"600",
|
|
3850
3850
|
"720",
|
|
3851
3851
|
"960",
|
|
3852
3852
|
"1160"
|
|
3853
|
-
]),
|
|
3854
|
-
|
|
3853
|
+
]), Y);
|
|
3854
|
+
c1([
|
|
3855
3855
|
a({ type: Boolean, reflect: !0 })
|
|
3856
|
-
],
|
|
3857
|
-
|
|
3856
|
+
], e1.prototype, "open");
|
|
3857
|
+
c1([
|
|
3858
3858
|
a()
|
|
3859
|
-
],
|
|
3860
|
-
|
|
3859
|
+
], e1.prototype, "heading");
|
|
3860
|
+
c1([
|
|
3861
3861
|
a({ type: Boolean, attribute: "hide-header" })
|
|
3862
|
-
],
|
|
3863
|
-
|
|
3862
|
+
], e1.prototype, "hideHeader");
|
|
3863
|
+
c1([
|
|
3864
3864
|
a({ type: Boolean, attribute: "hide-footer" })
|
|
3865
|
-
],
|
|
3866
|
-
|
|
3865
|
+
], e1.prototype, "hideFooter");
|
|
3866
|
+
c1([
|
|
3867
3867
|
a({ attribute: "max-width" })
|
|
3868
|
-
],
|
|
3869
|
-
|
|
3868
|
+
], e1.prototype, "maxWidth");
|
|
3869
|
+
c1([
|
|
3870
3870
|
a({ type: Boolean })
|
|
3871
|
-
],
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
],
|
|
3875
|
-
let
|
|
3876
|
-
customElements.get("anduin-modal") || customElements.define("anduin-modal",
|
|
3877
|
-
class
|
|
3871
|
+
], e1.prototype, "fullscreen");
|
|
3872
|
+
c1([
|
|
3873
|
+
b()
|
|
3874
|
+
], e1.prototype, "_leaving");
|
|
3875
|
+
let O3 = e1;
|
|
3876
|
+
customElements.get("anduin-modal") || customElements.define("anduin-modal", O3);
|
|
3877
|
+
class D3 extends HTMLElement {
|
|
3878
3878
|
constructor() {
|
|
3879
3879
|
super(...arguments), this._onClick = () => {
|
|
3880
3880
|
this.dispatchEvent(
|
|
3881
|
-
new CustomEvent(
|
|
3881
|
+
new CustomEvent(y1, { bubbles: !0, composed: !0 })
|
|
3882
3882
|
);
|
|
3883
3883
|
};
|
|
3884
3884
|
}
|
|
@@ -3889,26 +3889,26 @@ class z3 extends HTMLElement {
|
|
|
3889
3889
|
this.removeEventListener("click", this._onClick);
|
|
3890
3890
|
}
|
|
3891
3891
|
}
|
|
3892
|
-
customElements.get("anduin-modal-close") || customElements.define("anduin-modal-close",
|
|
3893
|
-
var
|
|
3892
|
+
customElements.get("anduin-modal-close") || customElements.define("anduin-modal-close", D3);
|
|
3893
|
+
var I3 = Object.defineProperty, U = (l, e, t, i) => {
|
|
3894
3894
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
3895
3895
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
3896
|
-
return o &&
|
|
3896
|
+
return o && I3(e, t, o), o;
|
|
3897
3897
|
};
|
|
3898
|
-
const
|
|
3898
|
+
const M2 = "anduin-radio:change", T3 = "anduin-radio-group:change", V5 = class V5 extends u {
|
|
3899
3899
|
constructor() {
|
|
3900
3900
|
super(...arguments), this.checked = !1, this.disabled = !1, this.readonly = !1, this.value = "", this.name = "", this.inputid = "";
|
|
3901
3901
|
}
|
|
3902
3902
|
connectedCallback() {
|
|
3903
3903
|
super.connectedCallback();
|
|
3904
3904
|
const e = this.closest("anduin-field");
|
|
3905
|
-
e && e.addEventListener(
|
|
3905
|
+
e && e.addEventListener(m1, (t) => {
|
|
3906
3906
|
const i = t;
|
|
3907
3907
|
this.inputid && this.inputid === i.detail && !this.disabled && !this.readonly && this._select();
|
|
3908
3908
|
});
|
|
3909
3909
|
}
|
|
3910
3910
|
_select() {
|
|
3911
|
-
this.checked || (this.checked = !0, this.dispatchEvent(new CustomEvent(
|
|
3911
|
+
this.checked || (this.checked = !0, this.dispatchEvent(new CustomEvent(M2, {
|
|
3912
3912
|
detail: this.value,
|
|
3913
3913
|
bubbles: !0,
|
|
3914
3914
|
composed: !0
|
|
@@ -3925,7 +3925,7 @@ const m2 = "anduin-radio:change", S3 = "anduin-radio-group:change", g5 = class g
|
|
|
3925
3925
|
!this.checked && this.disabled ? "radio__circle--disabled" : "",
|
|
3926
3926
|
!this.checked && !this.readonly && !this.disabled ? "radio__circle--unchecked" : ""
|
|
3927
3927
|
].filter(Boolean).join(" ");
|
|
3928
|
-
return
|
|
3928
|
+
return C`
|
|
3929
3929
|
<label class="${this.disabled ? "is-disabled" : ""}">
|
|
3930
3930
|
<div
|
|
3931
3931
|
class="radio ${e ? "radio--interactive" : ""} ${this.disabled ? "radio--disabled" : ""}"
|
|
@@ -3949,7 +3949,7 @@ const m2 = "anduin-radio:change", S3 = "anduin-radio-group:change", g5 = class g
|
|
|
3949
3949
|
`;
|
|
3950
3950
|
}
|
|
3951
3951
|
};
|
|
3952
|
-
|
|
3952
|
+
V5.styles = g`
|
|
3953
3953
|
:host { display: inline-flex; font-family: var(--font-sans); }
|
|
3954
3954
|
|
|
3955
3955
|
label {
|
|
@@ -4020,34 +4020,34 @@ g5.styles = v`
|
|
|
4020
4020
|
transform: scale(1);
|
|
4021
4021
|
}
|
|
4022
4022
|
`;
|
|
4023
|
-
let
|
|
4024
|
-
|
|
4023
|
+
let N = V5;
|
|
4024
|
+
U([
|
|
4025
4025
|
a({ type: Boolean })
|
|
4026
|
-
],
|
|
4027
|
-
|
|
4026
|
+
], N.prototype, "checked");
|
|
4027
|
+
U([
|
|
4028
4028
|
a({ type: Boolean })
|
|
4029
|
-
],
|
|
4030
|
-
|
|
4029
|
+
], N.prototype, "disabled");
|
|
4030
|
+
U([
|
|
4031
4031
|
a({ type: Boolean })
|
|
4032
|
-
],
|
|
4033
|
-
|
|
4032
|
+
], N.prototype, "readonly");
|
|
4033
|
+
U([
|
|
4034
4034
|
a()
|
|
4035
|
-
],
|
|
4036
|
-
|
|
4035
|
+
], N.prototype, "value");
|
|
4036
|
+
U([
|
|
4037
4037
|
a()
|
|
4038
|
-
],
|
|
4039
|
-
|
|
4038
|
+
], N.prototype, "name");
|
|
4039
|
+
U([
|
|
4040
4040
|
a()
|
|
4041
|
-
],
|
|
4042
|
-
customElements.get("anduin-radio") || customElements.define("anduin-radio",
|
|
4043
|
-
const
|
|
4041
|
+
], N.prototype, "inputid");
|
|
4042
|
+
customElements.get("anduin-radio") || customElements.define("anduin-radio", N);
|
|
4043
|
+
const L5 = class L5 extends u {
|
|
4044
4044
|
constructor() {
|
|
4045
4045
|
super(...arguments), this.value = "", this.name = "", this.orientation = "vertical", this._onRadioChange = (e) => {
|
|
4046
4046
|
const i = e.detail;
|
|
4047
4047
|
i !== this.value && (this.value = i, this.querySelectorAll("anduin-radio").forEach((o) => {
|
|
4048
4048
|
const r = o;
|
|
4049
4049
|
r.checked = r.value === i;
|
|
4050
|
-
}), this.dispatchEvent(new CustomEvent(
|
|
4050
|
+
}), this.dispatchEvent(new CustomEvent(T3, {
|
|
4051
4051
|
detail: i,
|
|
4052
4052
|
bubbles: !0,
|
|
4053
4053
|
composed: !0
|
|
@@ -4055,20 +4055,20 @@ const v5 = class v5 extends h {
|
|
|
4055
4055
|
};
|
|
4056
4056
|
}
|
|
4057
4057
|
connectedCallback() {
|
|
4058
|
-
super.connectedCallback(), this.addEventListener(
|
|
4058
|
+
super.connectedCallback(), this.addEventListener(M2, this._onRadioChange);
|
|
4059
4059
|
}
|
|
4060
4060
|
disconnectedCallback() {
|
|
4061
|
-
super.disconnectedCallback(), this.removeEventListener(
|
|
4061
|
+
super.disconnectedCallback(), this.removeEventListener(M2, this._onRadioChange);
|
|
4062
4062
|
}
|
|
4063
4063
|
render() {
|
|
4064
|
-
return
|
|
4064
|
+
return C`
|
|
4065
4065
|
<div class="group group--${this.orientation}" role="radiogroup" part="group">
|
|
4066
4066
|
<slot></slot>
|
|
4067
4067
|
</div>
|
|
4068
4068
|
`;
|
|
4069
4069
|
}
|
|
4070
4070
|
};
|
|
4071
|
-
|
|
4071
|
+
L5.styles = g`
|
|
4072
4072
|
:host { display: block; font-family: var(--font-sans); }
|
|
4073
4073
|
|
|
4074
4074
|
.group {
|
|
@@ -4078,23 +4078,23 @@ v5.styles = v`
|
|
|
4078
4078
|
.group--vertical { flex-direction: column; }
|
|
4079
4079
|
.group--horizontal { flex-direction: row; flex-wrap: wrap; align-items: center; }
|
|
4080
4080
|
`;
|
|
4081
|
-
let
|
|
4082
|
-
|
|
4081
|
+
let V1 = L5;
|
|
4082
|
+
U([
|
|
4083
4083
|
a()
|
|
4084
|
-
],
|
|
4085
|
-
|
|
4084
|
+
], V1.prototype, "value");
|
|
4085
|
+
U([
|
|
4086
4086
|
a()
|
|
4087
|
-
],
|
|
4088
|
-
|
|
4087
|
+
], V1.prototype, "name");
|
|
4088
|
+
U([
|
|
4089
4089
|
a()
|
|
4090
|
-
],
|
|
4091
|
-
customElements.get("anduin-radio-group") || customElements.define("anduin-radio-group",
|
|
4092
|
-
var
|
|
4090
|
+
], V1.prototype, "orientation");
|
|
4091
|
+
customElements.get("anduin-radio-group") || customElements.define("anduin-radio-group", V1);
|
|
4092
|
+
var N3 = Object.defineProperty, p1 = (l, e, t, i) => {
|
|
4093
4093
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
4094
4094
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
4095
|
-
return o &&
|
|
4095
|
+
return o && N3(e, t, o), o;
|
|
4096
4096
|
};
|
|
4097
|
-
const
|
|
4097
|
+
const X5 = [
|
|
4098
4098
|
{ bg: "#6172F3", text: "#ffffff" },
|
|
4099
4099
|
{ bg: "#B692F6", text: "#ffffff" },
|
|
4100
4100
|
{ bg: "#F670C7", text: "#ffffff" },
|
|
@@ -4104,17 +4104,17 @@ const j5 = [
|
|
|
4104
4104
|
{ bg: "#F97066", text: "#ffffff" },
|
|
4105
4105
|
{ bg: "#7A5AF8", text: "#ffffff" }
|
|
4106
4106
|
];
|
|
4107
|
-
function
|
|
4107
|
+
function j3(l) {
|
|
4108
4108
|
let e = 0;
|
|
4109
4109
|
for (let t = 0; t < l.length; t++) e = e * 31 + l.charCodeAt(t) >>> 0;
|
|
4110
|
-
return
|
|
4110
|
+
return X5[e % X5.length];
|
|
4111
4111
|
}
|
|
4112
|
-
function
|
|
4112
|
+
function U3(l) {
|
|
4113
4113
|
var t;
|
|
4114
4114
|
const e = l.trim().split(/\s+/);
|
|
4115
4115
|
return e.length === 1 ? ((t = e[0][0]) == null ? void 0 : t.toUpperCase()) ?? "" : ((e[0][0] ?? "") + (e[e.length - 1][0] ?? "")).toUpperCase();
|
|
4116
4116
|
}
|
|
4117
|
-
const
|
|
4117
|
+
const m5 = class m5 extends u {
|
|
4118
4118
|
constructor() {
|
|
4119
4119
|
super(...arguments), this.src = "", this.name = "", this.alt = "", this.icon = "", this.size = 32, this.shape = "circle", this._imgError = !1;
|
|
4120
4120
|
}
|
|
@@ -4125,8 +4125,8 @@ const f5 = class f5 extends h {
|
|
|
4125
4125
|
return this.size <= 16 ? 10 : this.size <= 20 ? 12 : this.size <= 24 ? 14 : 18;
|
|
4126
4126
|
}
|
|
4127
4127
|
render() {
|
|
4128
|
-
const e = !!this.src && !this._imgError, t = this.name || this.icon ?
|
|
4129
|
-
return
|
|
4128
|
+
const e = !!this.src && !this._imgError, t = this.name || this.icon ? j3(this.name || this.icon) : { bg: "#F2F4F7", text: "#667085" }, i = this.name ? U3(this.name) : "";
|
|
4129
|
+
return C`
|
|
4130
4130
|
<div
|
|
4131
4131
|
class="avatar avatar--${this.shape} avatar--${this.size}"
|
|
4132
4132
|
style=${e ? "" : `background:${t.bg}`}
|
|
@@ -4134,7 +4134,7 @@ const f5 = class f5 extends h {
|
|
|
4134
4134
|
role="img"
|
|
4135
4135
|
part="avatar"
|
|
4136
4136
|
>
|
|
4137
|
-
${e ?
|
|
4137
|
+
${e ? C`<img src=${this.src} alt=${this.alt || this.name} @error=${this._onImgError} />` : this.icon ? C`<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>` : i ? C`<span style="color:${t.text};background:${t.bg};width:100%;height:100%;display:flex;align-items:center;justify-content:center">${i}</span>` : C`<span style="color:#98A2B3;background:#F2F4F7;width:100%;height:100%;display:flex;align-items:center;justify-content:center">
|
|
4138
4138
|
<svg width="60%" height="60%" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4139
4139
|
<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"/>
|
|
4140
4140
|
</svg>
|
|
@@ -4143,7 +4143,7 @@ const f5 = class f5 extends h {
|
|
|
4143
4143
|
`;
|
|
4144
4144
|
}
|
|
4145
4145
|
};
|
|
4146
|
-
|
|
4146
|
+
m5.styles = g`
|
|
4147
4147
|
:host { display: inline-flex; }
|
|
4148
4148
|
|
|
4149
4149
|
.avatar {
|
|
@@ -4172,36 +4172,36 @@ f5.styles = v`
|
|
|
4172
4172
|
display: block;
|
|
4173
4173
|
}
|
|
4174
4174
|
`;
|
|
4175
|
-
let
|
|
4176
|
-
|
|
4175
|
+
let O = m5;
|
|
4176
|
+
p1([
|
|
4177
4177
|
a()
|
|
4178
|
-
],
|
|
4179
|
-
|
|
4178
|
+
], O.prototype, "src");
|
|
4179
|
+
p1([
|
|
4180
4180
|
a()
|
|
4181
|
-
],
|
|
4182
|
-
|
|
4181
|
+
], O.prototype, "name");
|
|
4182
|
+
p1([
|
|
4183
4183
|
a()
|
|
4184
|
-
],
|
|
4185
|
-
|
|
4184
|
+
], O.prototype, "alt");
|
|
4185
|
+
p1([
|
|
4186
4186
|
a()
|
|
4187
|
-
],
|
|
4188
|
-
|
|
4187
|
+
], O.prototype, "icon");
|
|
4188
|
+
p1([
|
|
4189
4189
|
a({ type: Number })
|
|
4190
|
-
],
|
|
4191
|
-
|
|
4190
|
+
], O.prototype, "size");
|
|
4191
|
+
p1([
|
|
4192
4192
|
a()
|
|
4193
|
-
],
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
],
|
|
4197
|
-
customElements.get("anduin-avatar") || customElements.define("anduin-avatar",
|
|
4193
|
+
], O.prototype, "shape");
|
|
4194
|
+
p1([
|
|
4195
|
+
b()
|
|
4196
|
+
], O.prototype, "_imgError");
|
|
4197
|
+
customElements.get("anduin-avatar") || customElements.define("anduin-avatar", O);
|
|
4198
4198
|
/**
|
|
4199
4199
|
* @license
|
|
4200
4200
|
* Copyright 2017 Google LLC
|
|
4201
4201
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4202
4202
|
*/
|
|
4203
|
-
const
|
|
4204
|
-
class
|
|
4203
|
+
const q3 = { CHILD: 2 }, G3 = (l) => (...e) => ({ _$litDirective$: l, values: e });
|
|
4204
|
+
class W3 {
|
|
4205
4205
|
constructor(e) {
|
|
4206
4206
|
}
|
|
4207
4207
|
get _$AU() {
|
|
@@ -4222,13 +4222,13 @@ class T3 {
|
|
|
4222
4222
|
* Copyright 2017 Google LLC
|
|
4223
4223
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4224
4224
|
*/
|
|
4225
|
-
class
|
|
4225
|
+
class Z2 extends W3 {
|
|
4226
4226
|
constructor(e) {
|
|
4227
|
-
if (super(e), this.it = c, e.type !==
|
|
4227
|
+
if (super(e), this.it = c, e.type !== q3.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
4228
4228
|
}
|
|
4229
4229
|
render(e) {
|
|
4230
4230
|
if (e === c || e == null) return this._t = void 0, this.it = e;
|
|
4231
|
-
if (e ===
|
|
4231
|
+
if (e === a1) return e;
|
|
4232
4232
|
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
4233
4233
|
if (e === this.it) return this._t;
|
|
4234
4234
|
this.it = e;
|
|
@@ -4236,16 +4236,16 @@ class b2 extends T3 {
|
|
|
4236
4236
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
4237
4237
|
}
|
|
4238
4238
|
}
|
|
4239
|
-
|
|
4239
|
+
Z2.directiveName = "unsafeHTML", Z2.resultType = 1;
|
|
4240
4240
|
/**
|
|
4241
4241
|
* @license
|
|
4242
4242
|
* Copyright 2017 Google LLC
|
|
4243
4243
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4244
4244
|
*/
|
|
4245
|
-
class
|
|
4245
|
+
class _2 extends Z2 {
|
|
4246
4246
|
}
|
|
4247
|
-
|
|
4248
|
-
const
|
|
4247
|
+
_2.directiveName = "unsafeSVG", _2.resultType = 2;
|
|
4248
|
+
const Y3 = G3(_2), X3 = {
|
|
4249
4249
|
archive: {
|
|
4250
4250
|
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"/>
|
|
4251
4251
|
<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"/>
|
|
@@ -4489,27 +4489,27 @@ const N3 = I3(M2), j3 = {
|
|
|
4489
4489
|
<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"/>
|
|
4490
4490
|
<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"/>` }
|
|
4491
4491
|
}
|
|
4492
|
-
},
|
|
4493
|
-
function
|
|
4494
|
-
const t =
|
|
4492
|
+
}, K3 = [32, 24, 16];
|
|
4493
|
+
function J3(l, e) {
|
|
4494
|
+
const t = X3[l];
|
|
4495
4495
|
if (!t) return null;
|
|
4496
4496
|
if (t[e]) return t[e];
|
|
4497
|
-
for (const i of
|
|
4497
|
+
for (const i of K3)
|
|
4498
4498
|
if (t[i]) return t[i];
|
|
4499
4499
|
return null;
|
|
4500
4500
|
}
|
|
4501
|
-
var
|
|
4501
|
+
var Q3 = Object.defineProperty, y4 = (l, e, t, i) => {
|
|
4502
4502
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
4503
4503
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
4504
|
-
return o &&
|
|
4504
|
+
return o && Q3(e, t, o), o;
|
|
4505
4505
|
};
|
|
4506
|
-
const
|
|
4506
|
+
const b5 = class b5 extends u {
|
|
4507
4507
|
constructor() {
|
|
4508
4508
|
super(...arguments), this.type = "pdf", this.size = 32;
|
|
4509
4509
|
}
|
|
4510
4510
|
render() {
|
|
4511
|
-
const e =
|
|
4512
|
-
return e ?
|
|
4511
|
+
const e = J3(this.type, this.size);
|
|
4512
|
+
return e ? C`
|
|
4513
4513
|
<svg
|
|
4514
4514
|
width=${this.size}
|
|
4515
4515
|
height=${this.size}
|
|
@@ -4519,35 +4519,35 @@ const H5 = class H5 extends h {
|
|
|
4519
4519
|
aria-label="${this.type} file"
|
|
4520
4520
|
role="img"
|
|
4521
4521
|
>
|
|
4522
|
-
${
|
|
4522
|
+
${Y3(e.paths)}
|
|
4523
4523
|
</svg>
|
|
4524
4524
|
` : c;
|
|
4525
4525
|
}
|
|
4526
4526
|
};
|
|
4527
|
-
|
|
4527
|
+
b5.styles = g`
|
|
4528
4528
|
:host { display: inline-flex; align-items: center; justify-content: center; }
|
|
4529
4529
|
svg { display: block; }
|
|
4530
4530
|
`;
|
|
4531
|
-
let
|
|
4532
|
-
|
|
4531
|
+
let O1 = b5;
|
|
4532
|
+
y4([
|
|
4533
4533
|
a()
|
|
4534
|
-
],
|
|
4535
|
-
|
|
4534
|
+
], O1.prototype, "type");
|
|
4535
|
+
y4([
|
|
4536
4536
|
a({ type: Number })
|
|
4537
|
-
],
|
|
4538
|
-
customElements.get("anduin-file-icon") || customElements.define("anduin-file-icon",
|
|
4539
|
-
var
|
|
4537
|
+
], O1.prototype, "size");
|
|
4538
|
+
customElements.get("anduin-file-icon") || customElements.define("anduin-file-icon", O1);
|
|
4539
|
+
var e7 = Object.defineProperty, u1 = (l, e, t, i) => {
|
|
4540
4540
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
4541
4541
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
4542
|
-
return o &&
|
|
4542
|
+
return o && e7(e, t, o), o;
|
|
4543
4543
|
};
|
|
4544
|
-
const
|
|
4544
|
+
const K5 = {
|
|
4545
4545
|
gray: "info",
|
|
4546
4546
|
primary: "infoCircleLine",
|
|
4547
4547
|
success: "checkCircle",
|
|
4548
4548
|
warning: "warning",
|
|
4549
4549
|
danger: "error"
|
|
4550
|
-
},
|
|
4550
|
+
}, t7 = "anduin-toast:dismiss", y5 = class y5 extends u {
|
|
4551
4551
|
constructor() {
|
|
4552
4552
|
super(...arguments), this.variant = "gray", this.heading = "", this.description = "", this._dismissing = !1;
|
|
4553
4553
|
}
|
|
@@ -4558,7 +4558,7 @@ const U5 = {
|
|
|
4558
4558
|
const e = (i) => {
|
|
4559
4559
|
var o;
|
|
4560
4560
|
i.propertyName === "opacity" && ((o = this._toastEl) == null || o.removeEventListener("transitionend", e), this.dispatchEvent(
|
|
4561
|
-
new CustomEvent(
|
|
4561
|
+
new CustomEvent(t7, { bubbles: !0, composed: !0 })
|
|
4562
4562
|
));
|
|
4563
4563
|
};
|
|
4564
4564
|
(t = this._toastEl) == null || t.addEventListener("transitionend", e);
|
|
@@ -4567,8 +4567,8 @@ const U5 = {
|
|
|
4567
4567
|
this.dismiss();
|
|
4568
4568
|
}
|
|
4569
4569
|
render() {
|
|
4570
|
-
const e =
|
|
4571
|
-
return
|
|
4570
|
+
const e = K5[this.variant] ?? K5.gray;
|
|
4571
|
+
return C`
|
|
4572
4572
|
<div
|
|
4573
4573
|
class="toast toast--${this.variant} ${this._dismissing ? "toast--dismissing" : ""}"
|
|
4574
4574
|
part="toast"
|
|
@@ -4579,8 +4579,8 @@ const U5 = {
|
|
|
4579
4579
|
<anduin-icon name=${e} size="16"></anduin-icon>
|
|
4580
4580
|
</div>
|
|
4581
4581
|
<div class="toast__body">
|
|
4582
|
-
${this.heading ?
|
|
4583
|
-
${this.description ?
|
|
4582
|
+
${this.heading ? C`<div class="toast__title">${this.heading}</div>` : ""}
|
|
4583
|
+
${this.description ? C`<div class="toast__description">${this.description}</div>` : C`<div class="toast__description"><slot></slot></div>`}
|
|
4584
4584
|
</div>
|
|
4585
4585
|
<button
|
|
4586
4586
|
class="toast__close"
|
|
@@ -4593,7 +4593,7 @@ const U5 = {
|
|
|
4593
4593
|
`;
|
|
4594
4594
|
}
|
|
4595
4595
|
};
|
|
4596
|
-
|
|
4596
|
+
y5.styles = g`
|
|
4597
4597
|
:host {
|
|
4598
4598
|
display: block;
|
|
4599
4599
|
font-family: var(--font-sans);
|
|
@@ -4721,24 +4721,24 @@ V5.styles = v`
|
|
|
4721
4721
|
background: var(--color-gray-3, #d0d5dd);
|
|
4722
4722
|
}
|
|
4723
4723
|
`;
|
|
4724
|
-
let
|
|
4725
|
-
|
|
4724
|
+
let K = y5;
|
|
4725
|
+
u1([
|
|
4726
4726
|
a()
|
|
4727
|
-
],
|
|
4728
|
-
|
|
4727
|
+
], K.prototype, "variant");
|
|
4728
|
+
u1([
|
|
4729
4729
|
a()
|
|
4730
|
-
],
|
|
4731
|
-
|
|
4730
|
+
], K.prototype, "heading");
|
|
4731
|
+
u1([
|
|
4732
4732
|
a()
|
|
4733
|
-
],
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
],
|
|
4737
|
-
|
|
4733
|
+
], K.prototype, "description");
|
|
4734
|
+
u1([
|
|
4735
|
+
b()
|
|
4736
|
+
], K.prototype, "_dismissing");
|
|
4737
|
+
u1([
|
|
4738
4738
|
k(".toast")
|
|
4739
|
-
],
|
|
4740
|
-
customElements.get("anduin-toast") || customElements.define("anduin-toast",
|
|
4741
|
-
const
|
|
4739
|
+
], K.prototype, "_toastEl");
|
|
4740
|
+
customElements.get("anduin-toast") || customElements.define("anduin-toast", K);
|
|
4741
|
+
const M5 = class M5 extends u {
|
|
4742
4742
|
constructor() {
|
|
4743
4743
|
super(...arguments), this.position = "bottom-left", this._toasts = [], this._nextId = 0;
|
|
4744
4744
|
}
|
|
@@ -4765,10 +4765,10 @@ const L5 = class L5 extends h {
|
|
|
4765
4765
|
e.stopPropagation(), this._removeById(t);
|
|
4766
4766
|
}
|
|
4767
4767
|
render() {
|
|
4768
|
-
return
|
|
4768
|
+
return C`
|
|
4769
4769
|
<div class="toaster toaster--${this.position}" part="toaster">
|
|
4770
4770
|
${this._toasts.map(
|
|
4771
|
-
({ id: e, opts: t }) =>
|
|
4771
|
+
({ id: e, opts: t }) => C`
|
|
4772
4772
|
<anduin-toast
|
|
4773
4773
|
data-id=${e}
|
|
4774
4774
|
variant=${t.variant ?? "gray"}
|
|
@@ -4782,7 +4782,7 @@ const L5 = class L5 extends h {
|
|
|
4782
4782
|
`;
|
|
4783
4783
|
}
|
|
4784
4784
|
};
|
|
4785
|
-
|
|
4785
|
+
M5.styles = g`
|
|
4786
4786
|
:host {
|
|
4787
4787
|
display: contents;
|
|
4788
4788
|
pointer-events: none;
|
|
@@ -4829,17 +4829,17 @@ L5.styles = v`
|
|
|
4829
4829
|
align-items: flex-end;
|
|
4830
4830
|
}
|
|
4831
4831
|
`;
|
|
4832
|
-
let
|
|
4833
|
-
|
|
4832
|
+
let D1 = M5;
|
|
4833
|
+
u1([
|
|
4834
4834
|
a()
|
|
4835
|
-
],
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
],
|
|
4839
|
-
customElements.get("anduin-toaster") || customElements.define("anduin-toaster",
|
|
4840
|
-
const
|
|
4835
|
+
], D1.prototype, "position");
|
|
4836
|
+
u1([
|
|
4837
|
+
b()
|
|
4838
|
+
], D1.prototype, "_toasts");
|
|
4839
|
+
customElements.get("anduin-toaster") || customElements.define("anduin-toaster", D1);
|
|
4840
|
+
const V7 = {
|
|
4841
4841
|
show(l) {
|
|
4842
|
-
return
|
|
4842
|
+
return o7(l.position).show(l);
|
|
4843
4843
|
},
|
|
4844
4844
|
success(l, e, t) {
|
|
4845
4845
|
return this.show({ ...t, variant: "success", heading: l, description: e });
|
|
@@ -4856,30 +4856,30 @@ const c7 = {
|
|
|
4856
4856
|
gray(l, e, t) {
|
|
4857
4857
|
return this.show({ ...t, variant: "gray", heading: l, description: e });
|
|
4858
4858
|
}
|
|
4859
|
-
},
|
|
4860
|
-
function
|
|
4861
|
-
if (
|
|
4859
|
+
}, d2 = /* @__PURE__ */ new Map();
|
|
4860
|
+
function o7(l = "bottom-left") {
|
|
4861
|
+
if (d2.has(l)) return d2.get(l);
|
|
4862
4862
|
const e = document.createElement("anduin-toaster");
|
|
4863
|
-
return e.position = l, document.body.appendChild(e),
|
|
4863
|
+
return e.position = l, document.body.appendChild(e), d2.set(l, e), e;
|
|
4864
4864
|
}
|
|
4865
|
-
var
|
|
4865
|
+
var i7 = Object.defineProperty, M4 = (l, e, t, i) => {
|
|
4866
4866
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
4867
4867
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
4868
|
-
return o &&
|
|
4868
|
+
return o && i7(e, t, o), o;
|
|
4869
4869
|
};
|
|
4870
|
-
const
|
|
4870
|
+
const l7 = "anduin-switcher:change", Z5 = class Z5 extends u {
|
|
4871
4871
|
constructor() {
|
|
4872
4872
|
super(...arguments), this.checked = !1, this.disabled = !1;
|
|
4873
4873
|
}
|
|
4874
4874
|
onChange() {
|
|
4875
|
-
this.checked = !this.checked, this.dispatchEvent(new CustomEvent(
|
|
4875
|
+
this.checked = !this.checked, this.dispatchEvent(new CustomEvent(l7, {
|
|
4876
4876
|
detail: this.checked,
|
|
4877
4877
|
bubbles: !0,
|
|
4878
4878
|
composed: !0
|
|
4879
4879
|
}));
|
|
4880
4880
|
}
|
|
4881
4881
|
render() {
|
|
4882
|
-
return
|
|
4882
|
+
return C`
|
|
4883
4883
|
<label class="${this.disabled ? "is-disabled" : ""}">
|
|
4884
4884
|
<div class="track${this.checked ? " track--checked" : ""}" part="track">
|
|
4885
4885
|
<input
|
|
@@ -4896,7 +4896,7 @@ const J3 = "anduin-switcher:change", m5 = class m5 extends h {
|
|
|
4896
4896
|
`;
|
|
4897
4897
|
}
|
|
4898
4898
|
};
|
|
4899
|
-
|
|
4899
|
+
Z5.styles = g`
|
|
4900
4900
|
:host { display: inline-flex; font-family: var(--font-sans); }
|
|
4901
4901
|
|
|
4902
4902
|
label {
|
|
@@ -4960,20 +4960,20 @@ m5.styles = v`
|
|
|
4960
4960
|
line-height: 20px;
|
|
4961
4961
|
}
|
|
4962
4962
|
`;
|
|
4963
|
-
let
|
|
4964
|
-
|
|
4963
|
+
let I1 = Z5;
|
|
4964
|
+
M4([
|
|
4965
4965
|
a({ type: Boolean })
|
|
4966
|
-
],
|
|
4967
|
-
|
|
4966
|
+
], I1.prototype, "checked");
|
|
4967
|
+
M4([
|
|
4968
4968
|
a({ type: Boolean })
|
|
4969
|
-
],
|
|
4970
|
-
customElements.get("anduin-switcher") || customElements.define("anduin-switcher",
|
|
4971
|
-
var
|
|
4969
|
+
], I1.prototype, "disabled");
|
|
4970
|
+
customElements.get("anduin-switcher") || customElements.define("anduin-switcher", I1);
|
|
4971
|
+
var r7 = Object.defineProperty, M = (l, e, t, i) => {
|
|
4972
4972
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
4973
4973
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
4974
|
-
return o &&
|
|
4974
|
+
return o && r7(e, t, o), o;
|
|
4975
4975
|
};
|
|
4976
|
-
const
|
|
4976
|
+
const J5 = "anduin-dropdown:change", _5 = class _5 extends u {
|
|
4977
4977
|
constructor() {
|
|
4978
4978
|
super(...arguments), this.value = "", this.placeholder = "Select...", this.options = [], this.icon = "", this.searchable = !0, this.disabled = !1, this.placement = "bottom-start", this.appearance = "filled", this.variant = "gray0", this.size = "default", this.fullWidth = !1, this._open = !1, this._query = "", this._onOutsideClick = (e) => {
|
|
4979
4979
|
var t;
|
|
@@ -5005,14 +5005,14 @@ const q5 = "anduin-dropdown:change", b5 = class b5 extends h {
|
|
|
5005
5005
|
e.key === "Escape" && (this._open = !1, this._query = "", (t = this._triggerEl) == null || t.focus());
|
|
5006
5006
|
}
|
|
5007
5007
|
_onClear(e) {
|
|
5008
|
-
e.stopPropagation(), this.value = "", this.dispatchEvent(new CustomEvent(
|
|
5008
|
+
e.stopPropagation(), this.value = "", this.dispatchEvent(new CustomEvent(J5, {
|
|
5009
5009
|
detail: "",
|
|
5010
5010
|
bubbles: !0,
|
|
5011
5011
|
composed: !0
|
|
5012
5012
|
}));
|
|
5013
5013
|
}
|
|
5014
5014
|
_selectOption(e) {
|
|
5015
|
-
this.value = e.value, this._open = !1, this._query = "", this.dispatchEvent(new CustomEvent(
|
|
5015
|
+
this.value = e.value, this._open = !1, this._query = "", this.dispatchEvent(new CustomEvent(J5, {
|
|
5016
5016
|
detail: e.value,
|
|
5017
5017
|
bubbles: !0,
|
|
5018
5018
|
composed: !0
|
|
@@ -5027,11 +5027,11 @@ const q5 = "anduin-dropdown:change", b5 = class b5 extends h {
|
|
|
5027
5027
|
t.style.transform = o;
|
|
5028
5028
|
const n = t.querySelector(".panel__inner");
|
|
5029
5029
|
n && (n.style.minWidth = `${i.width}px`);
|
|
5030
|
-
const
|
|
5030
|
+
const s = t.getBoundingClientRect(), d = 4, p = window.innerWidth, h = window.innerHeight, v = 8, H = h - i.bottom - d, f = i.top - d, q = s.height <= H || H >= f ? i.bottom + d : i.top - s.height - d;
|
|
5031
5031
|
let x = i.left;
|
|
5032
|
-
this.placement === "bottom-end" ? x = i.right -
|
|
5033
|
-
const
|
|
5034
|
-
t.style.transform = `translate(${Math.round(x - r.left)}px, ${Math.round(
|
|
5032
|
+
this.placement === "bottom-end" ? x = i.right - s.width : this.placement === "bottom" && (x = i.left + i.width / 2 - s.width / 2), x = Math.max(v, Math.min(x, p - s.width - v));
|
|
5033
|
+
const D = Math.max(v, Math.min(q, h - s.height - v));
|
|
5034
|
+
t.style.transform = `translate(${Math.round(x - r.left)}px, ${Math.round(D - r.top)}px)`;
|
|
5035
5035
|
}
|
|
5036
5036
|
get _filteredOptions() {
|
|
5037
5037
|
if (!this._query) return this.options;
|
|
@@ -5040,7 +5040,7 @@ const q5 = "anduin-dropdown:change", b5 = class b5 extends h {
|
|
|
5040
5040
|
}
|
|
5041
5041
|
render() {
|
|
5042
5042
|
const e = this.options.find((r) => r.value === this.value), t = (e == null ? void 0 : e.label) ?? "", i = e ? e.icon ?? "" : this.icon, o = this._filteredOptions;
|
|
5043
|
-
return
|
|
5043
|
+
return C`
|
|
5044
5044
|
<button
|
|
5045
5045
|
class="trigger trigger--${this.appearance} trigger--${this.variant}${this.size === "small" ? " trigger--small" : ""}${this.value ? " has-value" : ""}"
|
|
5046
5046
|
part="trigger"
|
|
@@ -5050,13 +5050,13 @@ const q5 = "anduin-dropdown:change", b5 = class b5 extends h {
|
|
|
5050
5050
|
@click=${this._onTriggerClick}
|
|
5051
5051
|
@keydown=${this._onKeyDown}
|
|
5052
5052
|
>
|
|
5053
|
-
${i && t ?
|
|
5053
|
+
${i && t ? C`<anduin-icon name="${i}" size="16"></anduin-icon>` : c}
|
|
5054
5054
|
<span class="trigger__label${t ? "" : " trigger__label--placeholder"}">${t || this.placeholder}</span>
|
|
5055
5055
|
<span class="trigger__caret">
|
|
5056
5056
|
<span class="trigger__chevron">
|
|
5057
5057
|
<anduin-icon name="caretDown" size="16"></anduin-icon>
|
|
5058
5058
|
</span>
|
|
5059
|
-
${this.value && !this.disabled ?
|
|
5059
|
+
${this.value && !this.disabled ? C`
|
|
5060
5060
|
<span class="trigger__clear" @click=${this._onClear}>
|
|
5061
5061
|
<anduin-icon name="crossSmall" size="16"></anduin-icon>
|
|
5062
5062
|
</span>
|
|
@@ -5066,7 +5066,7 @@ const q5 = "anduin-dropdown:change", b5 = class b5 extends h {
|
|
|
5066
5066
|
|
|
5067
5067
|
<div class="panel${this._open ? " panel--open" : ""}" part="panel" @keydown=${this._onKeyDown}>
|
|
5068
5068
|
<div class="panel__inner" role="listbox">
|
|
5069
|
-
${this.searchable ?
|
|
5069
|
+
${this.searchable ? C`
|
|
5070
5070
|
<div class="search-wrap">
|
|
5071
5071
|
<anduin-input
|
|
5072
5072
|
placeholder="Search ..."
|
|
@@ -5078,7 +5078,7 @@ const q5 = "anduin-dropdown:change", b5 = class b5 extends h {
|
|
|
5078
5078
|
</div>
|
|
5079
5079
|
` : c}
|
|
5080
5080
|
<div class="options">
|
|
5081
|
-
${o.length ? o.map((r) =>
|
|
5081
|
+
${o.length ? o.map((r) => C`
|
|
5082
5082
|
<div
|
|
5083
5083
|
class="option"
|
|
5084
5084
|
role="option"
|
|
@@ -5086,19 +5086,19 @@ const q5 = "anduin-dropdown:change", b5 = class b5 extends h {
|
|
|
5086
5086
|
@click=${() => this._selectOption(r)}
|
|
5087
5087
|
>
|
|
5088
5088
|
<span class="option__check">
|
|
5089
|
-
${r.value === this.value ?
|
|
5089
|
+
${r.value === this.value ? C`<anduin-icon name="checkSmall" size="16"></anduin-icon>` : c}
|
|
5090
5090
|
</span>
|
|
5091
|
-
${r.icon ?
|
|
5091
|
+
${r.icon ? C`<anduin-icon name="${r.icon}" size="16"></anduin-icon>` : c}
|
|
5092
5092
|
<span class="option__label">${r.label}</span>
|
|
5093
5093
|
</div>
|
|
5094
|
-
`) :
|
|
5094
|
+
`) : C`<div class="empty">No results</div>`}
|
|
5095
5095
|
</div>
|
|
5096
5096
|
</div>
|
|
5097
5097
|
</div>
|
|
5098
5098
|
`;
|
|
5099
5099
|
}
|
|
5100
5100
|
};
|
|
5101
|
-
|
|
5101
|
+
_5.styles = g`
|
|
5102
5102
|
:host { display: inline-block; font-family: var(--font-sans); }
|
|
5103
5103
|
:host([full-width]) { display: block; width: 100%; }
|
|
5104
5104
|
:host([full-width]) .trigger { width: 100%; }
|
|
@@ -5278,67 +5278,67 @@ b5.styles = v`
|
|
|
5278
5278
|
text-align: center;
|
|
5279
5279
|
}
|
|
5280
5280
|
`;
|
|
5281
|
-
let L =
|
|
5282
|
-
|
|
5281
|
+
let L = _5;
|
|
5282
|
+
M([
|
|
5283
5283
|
a()
|
|
5284
5284
|
], L.prototype, "value");
|
|
5285
|
-
|
|
5285
|
+
M([
|
|
5286
5286
|
a()
|
|
5287
5287
|
], L.prototype, "placeholder");
|
|
5288
|
-
|
|
5288
|
+
M([
|
|
5289
5289
|
a({ attribute: !1 })
|
|
5290
5290
|
], L.prototype, "options");
|
|
5291
|
-
|
|
5291
|
+
M([
|
|
5292
5292
|
a()
|
|
5293
5293
|
], L.prototype, "icon");
|
|
5294
|
-
|
|
5294
|
+
M([
|
|
5295
5295
|
a({ type: Boolean })
|
|
5296
5296
|
], L.prototype, "searchable");
|
|
5297
|
-
|
|
5297
|
+
M([
|
|
5298
5298
|
a({ type: Boolean })
|
|
5299
5299
|
], L.prototype, "disabled");
|
|
5300
|
-
|
|
5300
|
+
M([
|
|
5301
5301
|
a()
|
|
5302
5302
|
], L.prototype, "placement");
|
|
5303
|
-
|
|
5303
|
+
M([
|
|
5304
5304
|
a()
|
|
5305
5305
|
], L.prototype, "appearance");
|
|
5306
|
-
|
|
5306
|
+
M([
|
|
5307
5307
|
a()
|
|
5308
5308
|
], L.prototype, "variant");
|
|
5309
|
-
|
|
5309
|
+
M([
|
|
5310
5310
|
a()
|
|
5311
5311
|
], L.prototype, "size");
|
|
5312
|
-
|
|
5312
|
+
M([
|
|
5313
5313
|
a({ type: Boolean, attribute: "full-width", reflect: !0 })
|
|
5314
5314
|
], L.prototype, "fullWidth");
|
|
5315
|
-
|
|
5316
|
-
|
|
5315
|
+
M([
|
|
5316
|
+
b()
|
|
5317
5317
|
], L.prototype, "_open");
|
|
5318
|
-
|
|
5319
|
-
|
|
5318
|
+
M([
|
|
5319
|
+
b()
|
|
5320
5320
|
], L.prototype, "_query");
|
|
5321
|
-
|
|
5321
|
+
M([
|
|
5322
5322
|
k(".trigger")
|
|
5323
5323
|
], L.prototype, "_triggerEl");
|
|
5324
|
-
|
|
5324
|
+
M([
|
|
5325
5325
|
k(".panel")
|
|
5326
5326
|
], L.prototype, "_panelEl");
|
|
5327
|
-
|
|
5327
|
+
M([
|
|
5328
5328
|
k("anduin-input")
|
|
5329
5329
|
], L.prototype, "_searchEl");
|
|
5330
5330
|
customElements.get("anduin-dropdown") || customElements.define("anduin-dropdown", L);
|
|
5331
|
-
var
|
|
5331
|
+
var n7 = Object.defineProperty, t1 = (l, e, t, i) => {
|
|
5332
5332
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
5333
5333
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
5334
|
-
return o &&
|
|
5334
|
+
return o && n7(e, t, o), o;
|
|
5335
5335
|
};
|
|
5336
|
-
const
|
|
5336
|
+
const x2 = "anduin-close", a7 = "anduin-after-close", s7 = 300, Q5 = 250, C7 = /* @__PURE__ */ new Map([
|
|
5337
5337
|
["320", 320],
|
|
5338
5338
|
["360", 360],
|
|
5339
5339
|
["400", 400],
|
|
5340
5340
|
["640", 640]
|
|
5341
|
-
]),
|
|
5341
|
+
]), x5 = class x5 extends u {
|
|
5342
5342
|
constructor() {
|
|
5343
5343
|
super(...arguments), this.open = !1, this.heading = "", this.hideHeader = !1, this.hideFooter = !1, this.defaultWidth = "320", this.allowInteractOutside = !1, this._leaving = !1, this._width = 320, this._resizing = !1, this._startX = 0, this._startWidth = 0, this._onResizeStart = (e) => {
|
|
5344
5344
|
this._resizing = !0, this._startX = e.clientX, this._startWidth = this._width, e.currentTarget.setPointerCapture(e.pointerId), e.preventDefault();
|
|
@@ -5357,17 +5357,17 @@ const y2 = "anduin-close", t7 = "anduin-after-close", o7 = 300, G5 = 250, i7 = /
|
|
|
5357
5357
|
};
|
|
5358
5358
|
}
|
|
5359
5359
|
willUpdate(e) {
|
|
5360
|
-
e.has("defaultWidth") && (this._width =
|
|
5360
|
+
e.has("defaultWidth") && (this._width = C7.get(this.defaultWidth) ?? (parseInt(this.defaultWidth) || 320));
|
|
5361
5361
|
}
|
|
5362
5362
|
updated(e) {
|
|
5363
5363
|
e.has("open") && (this.open ? (this._leaving = !1, this.classList.add("is-shown")) : this.classList.contains("is-shown") && (this._leaving = !0, setTimeout(() => {
|
|
5364
5364
|
this._leaving = !1, this.classList.remove("is-shown"), this.dispatchEvent(
|
|
5365
|
-
new CustomEvent(
|
|
5365
|
+
new CustomEvent(a7, {
|
|
5366
5366
|
bubbles: !0,
|
|
5367
5367
|
composed: !0
|
|
5368
5368
|
})
|
|
5369
5369
|
);
|
|
5370
|
-
},
|
|
5370
|
+
}, Q5)));
|
|
5371
5371
|
}
|
|
5372
5372
|
_dispatch(e) {
|
|
5373
5373
|
this.dispatchEvent(
|
|
@@ -5375,15 +5375,15 @@ const y2 = "anduin-close", t7 = "anduin-after-close", o7 = 300, G5 = 250, i7 = /
|
|
|
5375
5375
|
);
|
|
5376
5376
|
}
|
|
5377
5377
|
_onClose() {
|
|
5378
|
-
this._dispatch(
|
|
5378
|
+
this._dispatch(x2);
|
|
5379
5379
|
}
|
|
5380
5380
|
_onBackdropClick() {
|
|
5381
|
-
this._dispatch(
|
|
5381
|
+
this._dispatch(x2);
|
|
5382
5382
|
}
|
|
5383
5383
|
render() {
|
|
5384
5384
|
const e = this._leaving;
|
|
5385
|
-
return
|
|
5386
|
-
${this.allowInteractOutside ? c :
|
|
5385
|
+
return C`
|
|
5386
|
+
${this.allowInteractOutside ? c : C`<div class="backdrop" @click=${this._onBackdropClick}></div>`}
|
|
5387
5387
|
<div
|
|
5388
5388
|
class=${`drawer${e ? " is-leaving" : ""}`}
|
|
5389
5389
|
style="width: ${this._width}px"
|
|
@@ -5398,9 +5398,9 @@ const y2 = "anduin-close", t7 = "anduin-after-close", o7 = 300, G5 = 250, i7 = /
|
|
|
5398
5398
|
@pointerup=${this._onResizeEnd}
|
|
5399
5399
|
@pointercancel=${this._onResizeEnd}
|
|
5400
5400
|
></div>
|
|
5401
|
-
${this.hideHeader ? c :
|
|
5401
|
+
${this.hideHeader ? c : C` <div class="header">
|
|
5402
5402
|
<slot name="header">
|
|
5403
|
-
${this.heading ?
|
|
5403
|
+
${this.heading ? C`<span id="drawer-title" class="title"
|
|
5404
5404
|
>${this.heading}</span
|
|
5405
5405
|
>` : c}
|
|
5406
5406
|
</slot>
|
|
@@ -5416,12 +5416,12 @@ const y2 = "anduin-close", t7 = "anduin-after-close", o7 = 300, G5 = 250, i7 = /
|
|
|
5416
5416
|
<div class="body">
|
|
5417
5417
|
<slot></slot>
|
|
5418
5418
|
</div>
|
|
5419
|
-
${this.hideFooter ? c :
|
|
5419
|
+
${this.hideFooter ? c : C`<div class="footer"><slot name="footer"></slot></div>`}
|
|
5420
5420
|
</div>
|
|
5421
5421
|
`;
|
|
5422
5422
|
}
|
|
5423
5423
|
};
|
|
5424
|
-
|
|
5424
|
+
x5.styles = g`
|
|
5425
5425
|
:host {
|
|
5426
5426
|
display: none;
|
|
5427
5427
|
font-family: var(--font-sans);
|
|
@@ -5468,14 +5468,14 @@ M5.styles = v`
|
|
|
5468
5468
|
box-shadow:
|
|
5469
5469
|
-8px 0 24px 0 rgba(29, 41, 57, 0.12),
|
|
5470
5470
|
-2px 0 8px 0 rgba(29, 41, 57, 0.08);
|
|
5471
|
-
animation: drawerIn ${
|
|
5471
|
+
animation: drawerIn ${s7}ms cubic-bezier(0.05, 0.7, 0.1, 1)
|
|
5472
5472
|
forwards;
|
|
5473
5473
|
min-width: 200px;
|
|
5474
5474
|
max-width: 90vw;
|
|
5475
5475
|
pointer-events: auto;
|
|
5476
5476
|
}
|
|
5477
5477
|
.drawer.is-leaving {
|
|
5478
|
-
animation: drawerOut ${
|
|
5478
|
+
animation: drawerOut ${Q5}ms
|
|
5479
5479
|
cubic-bezier(0.3, 0, 0.8, 0.15) forwards;
|
|
5480
5480
|
}
|
|
5481
5481
|
@media (max-width: 640px) {
|
|
@@ -5539,37 +5539,37 @@ M5.styles = v`
|
|
|
5539
5539
|
border-top: 1px solid var(--color-gray-3, #e4e7ec);
|
|
5540
5540
|
}
|
|
5541
5541
|
`;
|
|
5542
|
-
let A =
|
|
5543
|
-
|
|
5542
|
+
let A = x5;
|
|
5543
|
+
t1([
|
|
5544
5544
|
a({ type: Boolean, reflect: !0 })
|
|
5545
5545
|
], A.prototype, "open");
|
|
5546
|
-
|
|
5546
|
+
t1([
|
|
5547
5547
|
a()
|
|
5548
5548
|
], A.prototype, "heading");
|
|
5549
|
-
|
|
5549
|
+
t1([
|
|
5550
5550
|
a({ type: Boolean, attribute: "hide-header" })
|
|
5551
5551
|
], A.prototype, "hideHeader");
|
|
5552
|
-
|
|
5552
|
+
t1([
|
|
5553
5553
|
a({ type: Boolean, attribute: "hide-footer" })
|
|
5554
5554
|
], A.prototype, "hideFooter");
|
|
5555
|
-
|
|
5555
|
+
t1([
|
|
5556
5556
|
a({ attribute: "default-width" })
|
|
5557
5557
|
], A.prototype, "defaultWidth");
|
|
5558
|
-
|
|
5558
|
+
t1([
|
|
5559
5559
|
a({ type: Boolean, attribute: "allow-interact-outside" })
|
|
5560
5560
|
], A.prototype, "allowInteractOutside");
|
|
5561
|
-
|
|
5562
|
-
|
|
5561
|
+
t1([
|
|
5562
|
+
b()
|
|
5563
5563
|
], A.prototype, "_leaving");
|
|
5564
|
-
|
|
5565
|
-
|
|
5564
|
+
t1([
|
|
5565
|
+
b()
|
|
5566
5566
|
], A.prototype, "_width");
|
|
5567
5567
|
customElements.get("anduin-drawer") || customElements.define("anduin-drawer", A);
|
|
5568
|
-
class
|
|
5568
|
+
class d7 extends HTMLElement {
|
|
5569
5569
|
constructor() {
|
|
5570
5570
|
super(...arguments), this._onClick = () => {
|
|
5571
5571
|
this.dispatchEvent(
|
|
5572
|
-
new CustomEvent(
|
|
5572
|
+
new CustomEvent(x2, { bubbles: !0, composed: !0 })
|
|
5573
5573
|
);
|
|
5574
5574
|
};
|
|
5575
5575
|
}
|
|
@@ -5580,13 +5580,13 @@ class l7 extends HTMLElement {
|
|
|
5580
5580
|
this.removeEventListener("click", this._onClick);
|
|
5581
5581
|
}
|
|
5582
5582
|
}
|
|
5583
|
-
customElements.get("anduin-drawer-close") || customElements.define("anduin-drawer-close",
|
|
5584
|
-
var
|
|
5583
|
+
customElements.get("anduin-drawer-close") || customElements.define("anduin-drawer-close", d7);
|
|
5584
|
+
var c7 = Object.defineProperty, y = (l, e, t, i) => {
|
|
5585
5585
|
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
5586
5586
|
(n = l[r]) && (o = n(e, t, o) || o);
|
|
5587
|
-
return o &&
|
|
5587
|
+
return o && c7(e, t, o), o;
|
|
5588
5588
|
};
|
|
5589
|
-
const
|
|
5589
|
+
const c2 = "anduin-suggestion:change", p7 = "anduin-suggestion:select", u7 = "anduin-suggestion:clear", w5 = class w5 extends u {
|
|
5590
5590
|
constructor() {
|
|
5591
5591
|
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, this.suggestions = [], this.filter = !1, this.hideWhenEmpty = !1, this.emptyText = "No suggestions", this._open = !1, this._activeIndex = -1, this._onDocumentMouseDown = (e) => {
|
|
5592
5592
|
var t;
|
|
@@ -5598,7 +5598,7 @@ const C2 = "anduin-suggestion:change", n7 = "anduin-suggestion:select", a7 = "an
|
|
|
5598
5598
|
connectedCallback() {
|
|
5599
5599
|
super.connectedCallback(), document.addEventListener("mousedown", this._onDocumentMouseDown), window.addEventListener("scroll", this._onScrollOrResize, { passive: !0, capture: !0 }), window.addEventListener("resize", this._onScrollOrResize);
|
|
5600
5600
|
const e = this.closest("anduin-field");
|
|
5601
|
-
e && e.addEventListener(
|
|
5601
|
+
e && e.addEventListener(m1, (t) => {
|
|
5602
5602
|
var o;
|
|
5603
5603
|
const i = t;
|
|
5604
5604
|
this.inputid && this.inputid === i.detail && ((o = this._inputEl) == null || o.focus());
|
|
@@ -5626,7 +5626,7 @@ const C2 = "anduin-suggestion:change", n7 = "anduin-suggestion:select", a7 = "an
|
|
|
5626
5626
|
this._openPanel();
|
|
5627
5627
|
}
|
|
5628
5628
|
_onInput() {
|
|
5629
|
-
this.value = this._inputEl.value, this._open || this._openPanel(), this._activeIndex = -1, this.dispatchEvent(new CustomEvent(
|
|
5629
|
+
this.value = this._inputEl.value, this._open || this._openPanel(), this._activeIndex = -1, this.dispatchEvent(new CustomEvent(c2, {
|
|
5630
5630
|
detail: this.value,
|
|
5631
5631
|
bubbles: !0,
|
|
5632
5632
|
composed: !0
|
|
@@ -5659,11 +5659,11 @@ const C2 = "anduin-suggestion:change", n7 = "anduin-suggestion:select", a7 = "an
|
|
|
5659
5659
|
}
|
|
5660
5660
|
_selectSuggestion(e) {
|
|
5661
5661
|
var t;
|
|
5662
|
-
this.value = e.value, this._inputEl && (this._inputEl.value = e.value), this._open = !1, this.dispatchEvent(new CustomEvent(
|
|
5662
|
+
this.value = e.value, this._inputEl && (this._inputEl.value = e.value), this._open = !1, this.dispatchEvent(new CustomEvent(c2, {
|
|
5663
5663
|
detail: this.value,
|
|
5664
5664
|
bubbles: !0,
|
|
5665
5665
|
composed: !0
|
|
5666
|
-
})), this.dispatchEvent(new CustomEvent(
|
|
5666
|
+
})), this.dispatchEvent(new CustomEvent(p7, {
|
|
5667
5667
|
detail: e,
|
|
5668
5668
|
bubbles: !0,
|
|
5669
5669
|
composed: !0
|
|
@@ -5671,11 +5671,11 @@ const C2 = "anduin-suggestion:change", n7 = "anduin-suggestion:select", a7 = "an
|
|
|
5671
5671
|
}
|
|
5672
5672
|
_onClear() {
|
|
5673
5673
|
var e;
|
|
5674
|
-
this.value = "", this._inputEl && (this._inputEl.value = ""), this._activeIndex = -1, this.dispatchEvent(new CustomEvent(
|
|
5674
|
+
this.value = "", this._inputEl && (this._inputEl.value = ""), this._activeIndex = -1, this.dispatchEvent(new CustomEvent(c2, { detail: "", bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent(u7, { bubbles: !0, composed: !0 })), (e = this._inputEl) == null || e.focus();
|
|
5675
5675
|
}
|
|
5676
5676
|
_updatePosition() {
|
|
5677
|
-
var
|
|
5678
|
-
const e = (
|
|
5677
|
+
var o1;
|
|
5678
|
+
const e = (o1 = this.shadowRoot) == null ? void 0 : o1.querySelector(".input-wrapper"), t = this._panelEl;
|
|
5679
5679
|
if (!e || !t) return;
|
|
5680
5680
|
const i = e.getBoundingClientRect(), o = t.style.transform;
|
|
5681
5681
|
t.style.transform = "none";
|
|
@@ -5683,17 +5683,17 @@ const C2 = "anduin-suggestion:change", n7 = "anduin-suggestion:select", a7 = "an
|
|
|
5683
5683
|
t.style.transform = o;
|
|
5684
5684
|
const n = t.querySelector(".panel__inner");
|
|
5685
5685
|
n && (n.style.minWidth = `${i.width}px`);
|
|
5686
|
-
const
|
|
5686
|
+
const s = t.getBoundingClientRect(), d = 4, p = window.innerWidth, h = window.innerHeight, v = 8, H = h - i.bottom - d, f = i.top - d, q = s.height <= H || H >= f ? i.bottom + d : i.top - s.height - d;
|
|
5687
5687
|
let x = i.left;
|
|
5688
|
-
x = Math.max(
|
|
5689
|
-
const
|
|
5690
|
-
t.style.transform = `translate(${Math.round(x - r.left)}px, ${Math.round(
|
|
5688
|
+
x = Math.max(v, Math.min(x, p - s.width - v));
|
|
5689
|
+
const D = Math.max(v, Math.min(q, h - s.height - v));
|
|
5690
|
+
t.style.transform = `translate(${Math.round(x - r.left)}px, ${Math.round(D - r.top)}px)`;
|
|
5691
5691
|
}
|
|
5692
5692
|
render() {
|
|
5693
|
-
const e = this.size === "small" ? "input--small" : this.size === "large" ? "input--large" : "input--default", t = this.status ? `input--${this.status}` : "", i = !!this.startIcon, o = !!this.endIcon || this.clearable && !!this.value, r = this.clearable && !!this.value && !this.disabled && !this.readonly, n = this.size === "small" ? "12" : this.size === "large" ? "20" : "16",
|
|
5694
|
-
return
|
|
5693
|
+
const e = this.size === "small" ? "input--small" : this.size === "large" ? "input--large" : "input--default", t = this.status ? `input--${this.status}` : "", i = !!this.startIcon, o = !!this.endIcon || this.clearable && !!this.value, r = this.clearable && !!this.value && !this.disabled && !this.readonly, n = this.size === "small" ? "12" : this.size === "large" ? "20" : "16", s = this.size === "small" ? "10" : this.size === "large" ? "16" : "14", d = this._filteredSuggestions, p = this._open && (!this.hideWhenEmpty || d.length > 0);
|
|
5694
|
+
return C`
|
|
5695
5695
|
<div class="input-wrapper">
|
|
5696
|
-
${i ?
|
|
5696
|
+
${i ? C`
|
|
5697
5697
|
<span class="input__start">
|
|
5698
5698
|
<anduin-icon name=${this.startIcon} size=${n}></anduin-icon>
|
|
5699
5699
|
</span>
|
|
@@ -5720,14 +5720,14 @@ const C2 = "anduin-suggestion:change", n7 = "anduin-suggestion:select", a7 = "an
|
|
|
5720
5720
|
@keydown=${this._onKeyDown}
|
|
5721
5721
|
/>
|
|
5722
5722
|
|
|
5723
|
-
${o ?
|
|
5723
|
+
${o ? C`
|
|
5724
5724
|
<span class="input__end">
|
|
5725
|
-
${r ?
|
|
5725
|
+
${r ? C`
|
|
5726
5726
|
<button class="input__clear" type="button" @click=${this._onClear} aria-label="Clear">
|
|
5727
|
-
<anduin-icon name="cross" size=${
|
|
5727
|
+
<anduin-icon name="cross" size=${s}></anduin-icon>
|
|
5728
5728
|
</button>
|
|
5729
5729
|
` : c}
|
|
5730
|
-
${this.endIcon ?
|
|
5730
|
+
${this.endIcon ? C`
|
|
5731
5731
|
<anduin-icon name=${this.endIcon} size=${n}></anduin-icon>
|
|
5732
5732
|
` : c}
|
|
5733
5733
|
</span>
|
|
@@ -5737,29 +5737,29 @@ const C2 = "anduin-suggestion:change", n7 = "anduin-suggestion:select", a7 = "an
|
|
|
5737
5737
|
<div class="panel${p ? " panel--open" : ""}" part="panel">
|
|
5738
5738
|
<div class="panel__inner" role="listbox">
|
|
5739
5739
|
<div class="options">
|
|
5740
|
-
${d.length ? d.map((
|
|
5740
|
+
${d.length ? d.map((h, v) => C`
|
|
5741
5741
|
<div
|
|
5742
|
-
class="option${
|
|
5742
|
+
class="option${v === this._activeIndex ? " option--active" : ""}"
|
|
5743
5743
|
role="option"
|
|
5744
|
-
aria-selected=${
|
|
5744
|
+
aria-selected=${v === this._activeIndex}
|
|
5745
5745
|
@mouseenter=${() => {
|
|
5746
|
-
this._activeIndex =
|
|
5746
|
+
this._activeIndex = v;
|
|
5747
5747
|
}}
|
|
5748
5748
|
@mousedown=${(H) => {
|
|
5749
|
-
H.preventDefault(), this._selectSuggestion(
|
|
5749
|
+
H.preventDefault(), this._selectSuggestion(h);
|
|
5750
5750
|
}}
|
|
5751
5751
|
>
|
|
5752
|
-
${
|
|
5753
|
-
<span class="option__label">${
|
|
5752
|
+
${h.icon ? C`<anduin-icon name=${h.icon} size="16"></anduin-icon>` : c}
|
|
5753
|
+
<span class="option__label">${h.label ?? h.value}</span>
|
|
5754
5754
|
</div>
|
|
5755
|
-
`) :
|
|
5755
|
+
`) : C`<div class="empty">${this.emptyText}</div>`}
|
|
5756
5756
|
</div>
|
|
5757
5757
|
</div>
|
|
5758
5758
|
</div>
|
|
5759
5759
|
`;
|
|
5760
5760
|
}
|
|
5761
5761
|
};
|
|
5762
|
-
|
|
5762
|
+
w5.styles = g`
|
|
5763
5763
|
:host { display: block; font-family: var(--font-sans); position: relative; }
|
|
5764
5764
|
|
|
5765
5765
|
.input-wrapper { position: relative; display: flex; align-items: center; }
|
|
@@ -5872,151 +5872,375 @@ y5.styles = v`
|
|
|
5872
5872
|
text-align: center;
|
|
5873
5873
|
}
|
|
5874
5874
|
`;
|
|
5875
|
-
let V =
|
|
5876
|
-
|
|
5875
|
+
let V = w5;
|
|
5876
|
+
y([
|
|
5877
5877
|
a()
|
|
5878
5878
|
], V.prototype, "value");
|
|
5879
|
-
|
|
5879
|
+
y([
|
|
5880
5880
|
a()
|
|
5881
5881
|
], V.prototype, "size");
|
|
5882
|
-
|
|
5882
|
+
y([
|
|
5883
5883
|
a({ type: Boolean })
|
|
5884
5884
|
], V.prototype, "disabled");
|
|
5885
|
-
|
|
5885
|
+
y([
|
|
5886
5886
|
a({ type: Boolean })
|
|
5887
5887
|
], V.prototype, "readonly");
|
|
5888
|
-
|
|
5888
|
+
y([
|
|
5889
5889
|
a()
|
|
5890
5890
|
], V.prototype, "placeholder");
|
|
5891
|
-
|
|
5891
|
+
y([
|
|
5892
5892
|
a()
|
|
5893
5893
|
], V.prototype, "inputid");
|
|
5894
|
-
|
|
5894
|
+
y([
|
|
5895
5895
|
a()
|
|
5896
5896
|
], V.prototype, "status");
|
|
5897
|
-
|
|
5897
|
+
y([
|
|
5898
5898
|
a({ attribute: "start-icon" })
|
|
5899
5899
|
], V.prototype, "startIcon");
|
|
5900
|
-
|
|
5900
|
+
y([
|
|
5901
5901
|
a({ attribute: "end-icon" })
|
|
5902
5902
|
], V.prototype, "endIcon");
|
|
5903
|
-
|
|
5903
|
+
y([
|
|
5904
5904
|
a({ type: Boolean })
|
|
5905
5905
|
], V.prototype, "clearable");
|
|
5906
|
-
|
|
5906
|
+
y([
|
|
5907
5907
|
a({ attribute: !1 })
|
|
5908
5908
|
], V.prototype, "suggestions");
|
|
5909
|
-
|
|
5909
|
+
y([
|
|
5910
5910
|
a({ type: Boolean })
|
|
5911
5911
|
], V.prototype, "filter");
|
|
5912
|
-
|
|
5912
|
+
y([
|
|
5913
5913
|
a({ type: Boolean, attribute: "hide-when-empty" })
|
|
5914
5914
|
], V.prototype, "hideWhenEmpty");
|
|
5915
|
-
|
|
5915
|
+
y([
|
|
5916
5916
|
a({ attribute: "empty-text" })
|
|
5917
5917
|
], V.prototype, "emptyText");
|
|
5918
|
-
|
|
5919
|
-
|
|
5918
|
+
y([
|
|
5919
|
+
b()
|
|
5920
5920
|
], V.prototype, "_open");
|
|
5921
|
-
|
|
5922
|
-
|
|
5921
|
+
y([
|
|
5922
|
+
b()
|
|
5923
5923
|
], V.prototype, "_activeIndex");
|
|
5924
|
-
|
|
5924
|
+
y([
|
|
5925
5925
|
k("input")
|
|
5926
5926
|
], V.prototype, "_inputEl");
|
|
5927
|
-
|
|
5927
|
+
y([
|
|
5928
5928
|
k(".panel")
|
|
5929
5929
|
], V.prototype, "_panelEl");
|
|
5930
5930
|
customElements.get("anduin-suggestion") || customElements.define("anduin-suggestion", V);
|
|
5931
|
+
var h7 = Object.defineProperty, B = (l, e, t, i) => {
|
|
5932
|
+
for (var o = void 0, r = l.length - 1, n; r >= 0; r--)
|
|
5933
|
+
(n = l[r]) && (o = n(e, t, o) || o);
|
|
5934
|
+
return o && h7(e, t, o), o;
|
|
5935
|
+
};
|
|
5936
|
+
const g7 = "anduin-navigation:change", w2 = "anduin-navigation-item:item-click", R5 = class R5 extends u {
|
|
5937
|
+
constructor() {
|
|
5938
|
+
super(...arguments), this.defaultValue = "", this.value = null, this.theme = "light", this.alignment = "left", this.internalValue = "", this.onItemClick = (e) => {
|
|
5939
|
+
e.stopPropagation();
|
|
5940
|
+
const i = e.detail;
|
|
5941
|
+
i !== this.selection && (this.dispatchEvent(new CustomEvent(g7, {
|
|
5942
|
+
detail: i,
|
|
5943
|
+
bubbles: !0,
|
|
5944
|
+
composed: !0
|
|
5945
|
+
})), this.isControlled || (this.internalValue = i));
|
|
5946
|
+
};
|
|
5947
|
+
}
|
|
5948
|
+
get isControlled() {
|
|
5949
|
+
return this.value != null;
|
|
5950
|
+
}
|
|
5951
|
+
get selection() {
|
|
5952
|
+
return this.isControlled ? this.value : this.internalValue;
|
|
5953
|
+
}
|
|
5954
|
+
connectedCallback() {
|
|
5955
|
+
super.connectedCallback(), this.hasUpdated || (this.internalValue = this.defaultValue), this.addEventListener(w2, this.onItemClick);
|
|
5956
|
+
}
|
|
5957
|
+
disconnectedCallback() {
|
|
5958
|
+
super.disconnectedCallback(), this.removeEventListener(w2, this.onItemClick);
|
|
5959
|
+
}
|
|
5960
|
+
updated() {
|
|
5961
|
+
this.syncItems();
|
|
5962
|
+
}
|
|
5963
|
+
get items() {
|
|
5964
|
+
return Array.from(this.querySelectorAll("anduin-navigation-item"));
|
|
5965
|
+
}
|
|
5966
|
+
syncItems() {
|
|
5967
|
+
const e = this.selection;
|
|
5968
|
+
for (const t of this.items)
|
|
5969
|
+
t.selected = t.value === e, t.theme = this.theme;
|
|
5970
|
+
}
|
|
5971
|
+
render() {
|
|
5972
|
+
return C`
|
|
5973
|
+
<div class="navigation navigation--${this.alignment}" role="navigation" part="navigation">
|
|
5974
|
+
<slot @slotchange=${this.syncItems}></slot>
|
|
5975
|
+
</div>
|
|
5976
|
+
`;
|
|
5977
|
+
}
|
|
5978
|
+
};
|
|
5979
|
+
R5.styles = g`
|
|
5980
|
+
:host {
|
|
5981
|
+
display: block;
|
|
5982
|
+
font-family: var(--font-sans);
|
|
5983
|
+
}
|
|
5984
|
+
|
|
5985
|
+
/* Light theme (default) — private vars resolve consumer overrides first,
|
|
5986
|
+
then fall back to design tokens. */
|
|
5987
|
+
:host,
|
|
5988
|
+
:host([theme='light']) {
|
|
5989
|
+
--_nav-color: var(--nav-color, var(--color-gray-7));
|
|
5990
|
+
--_nav-hover-color: var(--nav-hover-color, var(--color-gray-9));
|
|
5991
|
+
--_nav-hover-bg: var(--nav-hover-bg, var(--color-gray-2));
|
|
5992
|
+
--_nav-active-color: var(--nav-active-color, var(--color-gray-8));
|
|
5993
|
+
--_nav-active-bg: var(--nav-active-bg, var(--color-gray-3));
|
|
5994
|
+
--_nav-surface: var(--nav-surface, transparent);
|
|
5995
|
+
}
|
|
5996
|
+
|
|
5997
|
+
:host([theme='dark']) {
|
|
5998
|
+
--_nav-color: var(--nav-color, var(--color-gray-5));
|
|
5999
|
+
--_nav-hover-color: var(--nav-hover-color, var(--color-gray-0));
|
|
6000
|
+
--_nav-hover-bg: var(--nav-hover-bg, oklch(from var(--color-gray-0) l c h / 0.08));
|
|
6001
|
+
--_nav-active-color: var(--nav-active-color, var(--color-gray-0));
|
|
6002
|
+
--_nav-active-bg: var(--nav-active-bg, oklch(from var(--color-gray-0) l c h / 0.16));
|
|
6003
|
+
--_nav-surface: var(--nav-surface, var(--color-gray-9));
|
|
6004
|
+
}
|
|
6005
|
+
|
|
6006
|
+
.navigation {
|
|
6007
|
+
display: flex;
|
|
6008
|
+
align-items: center;
|
|
6009
|
+
gap: 4px;
|
|
6010
|
+
padding: 6px;
|
|
6011
|
+
border-radius: 8px;
|
|
6012
|
+
background-color: var(--_nav-surface);
|
|
6013
|
+
white-space: nowrap;
|
|
6014
|
+
overflow-x: auto;
|
|
6015
|
+
scrollbar-width: none;
|
|
6016
|
+
}
|
|
6017
|
+
.navigation::-webkit-scrollbar { display: none; }
|
|
6018
|
+
.navigation--left { justify-content: flex-start; }
|
|
6019
|
+
.navigation--center { justify-content: center; }
|
|
6020
|
+
.navigation--right { justify-content: flex-end; }
|
|
6021
|
+
`;
|
|
6022
|
+
let J = R5;
|
|
6023
|
+
B([
|
|
6024
|
+
a({ attribute: "default-value" })
|
|
6025
|
+
], J.prototype, "defaultValue");
|
|
6026
|
+
B([
|
|
6027
|
+
a()
|
|
6028
|
+
], J.prototype, "value");
|
|
6029
|
+
B([
|
|
6030
|
+
a({ reflect: !0 })
|
|
6031
|
+
], J.prototype, "theme");
|
|
6032
|
+
B([
|
|
6033
|
+
a()
|
|
6034
|
+
], J.prototype, "alignment");
|
|
6035
|
+
B([
|
|
6036
|
+
b()
|
|
6037
|
+
], J.prototype, "internalValue");
|
|
6038
|
+
const k5 = class k5 extends u {
|
|
6039
|
+
constructor() {
|
|
6040
|
+
super(...arguments), this.value = "", this.startIcon = "", this.href = "", this.disabled = !1, this.selected = !1, this.theme = "light";
|
|
6041
|
+
}
|
|
6042
|
+
onClick(e) {
|
|
6043
|
+
if (this.disabled) {
|
|
6044
|
+
e.preventDefault();
|
|
6045
|
+
return;
|
|
6046
|
+
}
|
|
6047
|
+
this.dispatchEvent(new CustomEvent(w2, {
|
|
6048
|
+
detail: this.value,
|
|
6049
|
+
bubbles: !0,
|
|
6050
|
+
composed: !0
|
|
6051
|
+
}));
|
|
6052
|
+
}
|
|
6053
|
+
updated(e) {
|
|
6054
|
+
e.has("selected") && this.setAttribute("aria-current", this.selected ? "page" : "false");
|
|
6055
|
+
}
|
|
6056
|
+
render() {
|
|
6057
|
+
const e = [
|
|
6058
|
+
"nav-item",
|
|
6059
|
+
this.selected ? "nav-item--active" : "",
|
|
6060
|
+
this.disabled ? "nav-item--disabled" : ""
|
|
6061
|
+
].filter(Boolean).join(" "), t = C`
|
|
6062
|
+
${this.startIcon ? C`<span class="nav-item__icon"><anduin-icon name="${this.startIcon}" size="16"></anduin-icon></span>` : c}
|
|
6063
|
+
<slot></slot>
|
|
6064
|
+
`;
|
|
6065
|
+
return this.href ? C`
|
|
6066
|
+
<a
|
|
6067
|
+
class="${e}"
|
|
6068
|
+
href="${this.href}"
|
|
6069
|
+
part="nav-item"
|
|
6070
|
+
aria-current="${this.selected ? "page" : "false"}"
|
|
6071
|
+
@click=${this.onClick}
|
|
6072
|
+
>${t}</a>
|
|
6073
|
+
` : C`
|
|
6074
|
+
<button
|
|
6075
|
+
type="button"
|
|
6076
|
+
class="${e}"
|
|
6077
|
+
part="nav-item"
|
|
6078
|
+
?disabled=${this.disabled}
|
|
6079
|
+
aria-current="${this.selected ? "page" : "false"}"
|
|
6080
|
+
@click=${this.onClick}
|
|
6081
|
+
>${t}</button>
|
|
6082
|
+
`;
|
|
6083
|
+
}
|
|
6084
|
+
};
|
|
6085
|
+
k5.styles = g`
|
|
6086
|
+
:host { display: inline-block; font-family: var(--font-sans); }
|
|
6087
|
+
.nav-item {
|
|
6088
|
+
box-sizing: border-box;
|
|
6089
|
+
display: flex;
|
|
6090
|
+
align-items: center;
|
|
6091
|
+
justify-content: center;
|
|
6092
|
+
gap: 8px;
|
|
6093
|
+
width: 100%;
|
|
6094
|
+
min-width: var(--nav-item-min-width, auto);
|
|
6095
|
+
padding: 8px 14px;
|
|
6096
|
+
border: none;
|
|
6097
|
+
border-radius: 999px;
|
|
6098
|
+
background: none;
|
|
6099
|
+
color: var(--_nav-color, var(--color-gray-7));
|
|
6100
|
+
cursor: pointer;
|
|
6101
|
+
font-family: inherit;
|
|
6102
|
+
font-size: 13px;
|
|
6103
|
+
font-weight: 500;
|
|
6104
|
+
line-height: 20px;
|
|
6105
|
+
text-decoration: none;
|
|
6106
|
+
white-space: nowrap;
|
|
6107
|
+
transition: background-color 120ms ease, color 120ms ease;
|
|
6108
|
+
}
|
|
6109
|
+
.nav-item:hover {
|
|
6110
|
+
color: var(--_nav-hover-color, var(--color-gray-9));
|
|
6111
|
+
background-color: var(--_nav-hover-bg, var(--color-gray-2));
|
|
6112
|
+
}
|
|
6113
|
+
.nav-item:focus { outline: none; }
|
|
6114
|
+
.nav-item:focus-visible {
|
|
6115
|
+
outline: none;
|
|
6116
|
+
box-shadow: 0 0 0 3px oklch(from var(--color-primary-4) l c h / 0.5);
|
|
6117
|
+
}
|
|
6118
|
+
.nav-item--active,
|
|
6119
|
+
.nav-item--active:hover {
|
|
6120
|
+
color: var(--_nav-active-color, var(--color-gray-8));
|
|
6121
|
+
background-color: var(--_nav-active-bg, var(--color-gray-3));
|
|
6122
|
+
}
|
|
6123
|
+
.nav-item--disabled {
|
|
6124
|
+
opacity: 0.4;
|
|
6125
|
+
cursor: not-allowed;
|
|
6126
|
+
pointer-events: none;
|
|
6127
|
+
}
|
|
6128
|
+
.nav-item__icon { display: flex; }
|
|
6129
|
+
`;
|
|
6130
|
+
let j = k5;
|
|
6131
|
+
B([
|
|
6132
|
+
a()
|
|
6133
|
+
], j.prototype, "value");
|
|
6134
|
+
B([
|
|
6135
|
+
a({ attribute: "start-icon" })
|
|
6136
|
+
], j.prototype, "startIcon");
|
|
6137
|
+
B([
|
|
6138
|
+
a()
|
|
6139
|
+
], j.prototype, "href");
|
|
6140
|
+
B([
|
|
6141
|
+
a({ type: Boolean })
|
|
6142
|
+
], j.prototype, "disabled");
|
|
6143
|
+
B([
|
|
6144
|
+
a({ attribute: !1 })
|
|
6145
|
+
], j.prototype, "selected");
|
|
6146
|
+
B([
|
|
6147
|
+
a({ attribute: !1 })
|
|
6148
|
+
], j.prototype, "theme");
|
|
6149
|
+
customElements.get("anduin-navigation") || customElements.define("anduin-navigation", J);
|
|
6150
|
+
customElements.get("anduin-navigation-item") || customElements.define("anduin-navigation-item", j);
|
|
5931
6151
|
export {
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
D,
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
S,
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
6152
|
+
p3 as $,
|
|
6153
|
+
O as A,
|
|
6154
|
+
b2 as B,
|
|
6155
|
+
z1 as C,
|
|
6156
|
+
N as D,
|
|
6157
|
+
V1 as E,
|
|
6158
|
+
I as F,
|
|
6159
|
+
k1 as G,
|
|
6160
|
+
R1 as H,
|
|
6161
|
+
V as I,
|
|
6162
|
+
I1 as J,
|
|
6163
|
+
P1 as K,
|
|
6164
|
+
T as L,
|
|
6165
|
+
v1 as M,
|
|
6166
|
+
S1 as N,
|
|
6167
|
+
f1 as O,
|
|
6168
|
+
g2 as P,
|
|
6169
|
+
E as Q,
|
|
6170
|
+
K as R,
|
|
6171
|
+
D1 as S,
|
|
6172
|
+
S as T,
|
|
6173
|
+
P as U,
|
|
6174
|
+
F1 as V,
|
|
6175
|
+
V2 as W,
|
|
6176
|
+
H2 as X,
|
|
6177
|
+
t2 as Y,
|
|
6178
|
+
L2 as Z,
|
|
6179
|
+
d4 as _,
|
|
6180
|
+
X1 as a,
|
|
6181
|
+
a7 as a0,
|
|
6182
|
+
x2 as a1,
|
|
6183
|
+
J5 as a2,
|
|
6184
|
+
g4 as a3,
|
|
6185
|
+
m1 as a4,
|
|
6186
|
+
X3 as a5,
|
|
6187
|
+
j5 as a6,
|
|
6188
|
+
h3 as a7,
|
|
6189
|
+
y2 as a8,
|
|
6190
|
+
F3 as a9,
|
|
6191
|
+
z3 as aA,
|
|
6192
|
+
c4 as aB,
|
|
6193
|
+
J3 as aC,
|
|
6194
|
+
V7 as aD,
|
|
6195
|
+
y1 as aa,
|
|
6196
|
+
g7 as ab,
|
|
6197
|
+
w2 as ac,
|
|
6198
|
+
m2 as ad,
|
|
6199
|
+
M2 as ae,
|
|
6200
|
+
T3 as af,
|
|
6201
|
+
c2 as ag,
|
|
6202
|
+
u7 as ah,
|
|
6203
|
+
p7 as ai,
|
|
6204
|
+
l7 as aj,
|
|
6205
|
+
H3 as ak,
|
|
6206
|
+
v4 as al,
|
|
6207
|
+
i2 as am,
|
|
6208
|
+
L3 as an,
|
|
6209
|
+
v3 as ao,
|
|
6210
|
+
M3 as ap,
|
|
6211
|
+
Z3 as aq,
|
|
6212
|
+
v2 as ar,
|
|
6213
|
+
x3 as as,
|
|
6214
|
+
_3 as at,
|
|
6215
|
+
L4 as au,
|
|
6216
|
+
m4 as av,
|
|
6217
|
+
B2 as aw,
|
|
6218
|
+
H4 as ax,
|
|
6219
|
+
V4 as ay,
|
|
6220
|
+
b4 as az,
|
|
6221
|
+
E1 as b,
|
|
5998
6222
|
m as c,
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6223
|
+
K1 as d,
|
|
6224
|
+
X as e,
|
|
6225
|
+
A1 as f,
|
|
6226
|
+
J1 as g,
|
|
6003
6227
|
A as h,
|
|
6004
|
-
|
|
6228
|
+
d7 as i,
|
|
6005
6229
|
L as j,
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6230
|
+
e2 as k,
|
|
6231
|
+
p2 as l,
|
|
6232
|
+
u2 as m,
|
|
6233
|
+
h2 as n,
|
|
6234
|
+
B1 as o,
|
|
6235
|
+
O1 as p,
|
|
6236
|
+
$1 as q,
|
|
6013
6237
|
w as r,
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6238
|
+
Q1 as s,
|
|
6239
|
+
s1 as t,
|
|
6240
|
+
H1 as u,
|
|
6241
|
+
O3 as v,
|
|
6242
|
+
D3 as w,
|
|
6243
|
+
J as x,
|
|
6244
|
+
j as y,
|
|
6245
|
+
F as z
|
|
6022
6246
|
};
|