@justeattakeaway/pie-button 1.5.1 → 1.6.1
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/README.md +130 -16
- package/custom-elements.json +4 -4
- package/dist/index.js +305 -309
- package/package.json +5 -5
- package/src/index.ts +2 -3
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { LitElement as It, html as z, nothing as
|
|
2
|
-
import { classMap as
|
|
3
|
-
import { ifDefined as
|
|
4
|
-
import { property as
|
|
5
|
-
import { FormControlMixin as Tt, validPropertyValues as
|
|
1
|
+
import { LitElement as It, html as z, nothing as S, unsafeCSS as Lt } from "lit";
|
|
2
|
+
import { classMap as mt } from "lit/directives/class-map.js";
|
|
3
|
+
import { ifDefined as U } from "lit/directives/if-defined.js";
|
|
4
|
+
import { property as m } from "lit/decorators.js";
|
|
5
|
+
import { FormControlMixin as Tt, validPropertyValues as C, safeCustomElement as Vt } from "@justeattakeaway/pie-webc-core";
|
|
6
6
|
import "@justeattakeaway/pie-spinner";
|
|
7
7
|
(function() {
|
|
8
|
-
(function(
|
|
9
|
-
const
|
|
8
|
+
(function(l) {
|
|
9
|
+
const r = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = {
|
|
10
10
|
ariaAtomic: "aria-atomic",
|
|
11
11
|
ariaAutoComplete: "aria-autocomplete",
|
|
12
12
|
ariaBusy: "aria-busy",
|
|
@@ -50,72 +50,72 @@ import "@justeattakeaway/pie-spinner";
|
|
|
50
50
|
ariaValueText: "aria-valuetext",
|
|
51
51
|
role: "role"
|
|
52
52
|
}, pt = (e, t) => {
|
|
53
|
-
for (let i in
|
|
53
|
+
for (let i in L) {
|
|
54
54
|
t[i] = null;
|
|
55
55
|
let o = null;
|
|
56
|
-
const
|
|
56
|
+
const a = L[i];
|
|
57
57
|
Object.defineProperty(t, i, {
|
|
58
58
|
get() {
|
|
59
59
|
return o;
|
|
60
60
|
},
|
|
61
|
-
set(
|
|
62
|
-
o =
|
|
61
|
+
set(n) {
|
|
62
|
+
o = n, e.isConnected ? e.setAttribute(a, n) : F.set(e, t);
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
function
|
|
68
|
-
const t =
|
|
69
|
-
|
|
67
|
+
function Y(e) {
|
|
68
|
+
const t = d.get(e), { form: i } = t;
|
|
69
|
+
rt(e, i, t), ot(e, t.labels);
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const Z = (e, t = !1) => {
|
|
72
72
|
const i = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
73
|
-
acceptNode(
|
|
74
|
-
return
|
|
73
|
+
acceptNode(n) {
|
|
74
|
+
return d.has(n) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
let o = i.nextNode();
|
|
78
|
-
const
|
|
78
|
+
const a = !t || e.disabled;
|
|
79
79
|
for (; o; )
|
|
80
|
-
o.formDisabledCallback &&
|
|
81
|
-
},
|
|
80
|
+
o.formDisabledCallback && a && D(o, e.disabled), o = i.nextNode();
|
|
81
|
+
}, tt = { attributes: !0, attributeFilter: ["disabled", "name"] }, T = P() ? new MutationObserver((e) => {
|
|
82
82
|
for (const t of e) {
|
|
83
83
|
const i = t.target;
|
|
84
|
-
if (t.attributeName === "disabled" && (i.constructor.formAssociated ?
|
|
85
|
-
const o =
|
|
86
|
-
o.setFormValue(
|
|
84
|
+
if (t.attributeName === "disabled" && (i.constructor.formAssociated ? D(i, i.hasAttribute("disabled")) : i.localName === "fieldset" && Z(i)), t.attributeName === "name" && i.constructor.formAssociated) {
|
|
85
|
+
const o = d.get(i), a = q.get(i);
|
|
86
|
+
o.setFormValue(a);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}) : {};
|
|
90
|
-
function
|
|
90
|
+
function R(e) {
|
|
91
91
|
e.forEach((t) => {
|
|
92
|
-
const { addedNodes: i, removedNodes: o } = t,
|
|
93
|
-
|
|
92
|
+
const { addedNodes: i, removedNodes: o } = t, a = Array.from(i), n = Array.from(o);
|
|
93
|
+
a.forEach((s) => {
|
|
94
94
|
var u;
|
|
95
|
-
if (
|
|
96
|
-
const h =
|
|
97
|
-
Object.keys(
|
|
98
|
-
|
|
99
|
-
}),
|
|
95
|
+
if (d.has(s) && s.constructor.formAssociated && Y(s), F.has(s)) {
|
|
96
|
+
const h = F.get(s);
|
|
97
|
+
Object.keys(L).filter((y) => h[y] !== null).forEach((y) => {
|
|
98
|
+
s.setAttribute(L[y], h[y]);
|
|
99
|
+
}), F.delete(s);
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
const h =
|
|
103
|
-
|
|
101
|
+
if (I.has(s)) {
|
|
102
|
+
const h = I.get(s);
|
|
103
|
+
s.setAttribute("internals-valid", h.validity.valid.toString()), s.setAttribute("internals-invalid", (!h.validity.valid).toString()), s.setAttribute("aria-invalid", (!h.validity.valid).toString()), I.delete(s);
|
|
104
104
|
}
|
|
105
|
-
if (
|
|
106
|
-
const h = E.get(
|
|
107
|
-
acceptNode(
|
|
108
|
-
return
|
|
105
|
+
if (s.localName === "form") {
|
|
106
|
+
const h = E.get(s), w = document.createTreeWalker(s, NodeFilter.SHOW_ELEMENT, {
|
|
107
|
+
acceptNode(K) {
|
|
108
|
+
return d.has(K) && K.constructor.formAssociated && !(h && h.has(K)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
-
let
|
|
112
|
-
for (;
|
|
113
|
-
|
|
111
|
+
let y = w.nextNode();
|
|
112
|
+
for (; y; )
|
|
113
|
+
Y(y), y = w.nextNode();
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
}),
|
|
117
|
-
const u =
|
|
118
|
-
u &&
|
|
115
|
+
s.localName === "fieldset" && ((u = T.observe) === null || u === void 0 || u.call(T, s, tt), Z(s, !0));
|
|
116
|
+
}), n.forEach((s) => {
|
|
117
|
+
const u = d.get(s);
|
|
118
|
+
u && p.get(u) && et(u), _.has(s) && _.get(s).disconnect();
|
|
119
119
|
});
|
|
120
120
|
});
|
|
121
121
|
}
|
|
@@ -123,53 +123,53 @@ import "@justeattakeaway/pie-spinner";
|
|
|
123
123
|
e.forEach((t) => {
|
|
124
124
|
const { removedNodes: i } = t;
|
|
125
125
|
i.forEach((o) => {
|
|
126
|
-
const
|
|
127
|
-
|
|
126
|
+
const a = Q.get(t.target);
|
|
127
|
+
d.has(o) && nt(o), a.disconnect();
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
const ut = (e) => {
|
|
132
132
|
var t, i;
|
|
133
133
|
const o = new MutationObserver(ht);
|
|
134
|
-
!((t = window == null ? void 0 : window.ShadyDOM) === null || t === void 0) && t.inUse && e.mode && e.host && (e = e.host), (i = o.observe) === null || i === void 0 || i.call(o, e, { childList: !0 }),
|
|
134
|
+
!((t = window == null ? void 0 : window.ShadyDOM) === null || t === void 0) && t.inUse && e.mode && e.host && (e = e.host), (i = o.observe) === null || i === void 0 || i.call(o, e, { childList: !0 }), Q.set(e, o);
|
|
135
135
|
};
|
|
136
|
-
|
|
136
|
+
P() && new MutationObserver(R);
|
|
137
137
|
const $ = {
|
|
138
138
|
childList: !0,
|
|
139
139
|
subtree: !0
|
|
140
|
-
},
|
|
140
|
+
}, D = (e, t) => {
|
|
141
141
|
e.toggleAttribute("internals-disabled", t), t ? e.setAttribute("aria-disabled", "true") : e.removeAttribute("aria-disabled"), e.formDisabledCallback && e.formDisabledCallback.apply(e, [t]);
|
|
142
|
-
},
|
|
143
|
-
|
|
142
|
+
}, et = (e) => {
|
|
143
|
+
p.get(e).forEach((i) => {
|
|
144
144
|
i.remove();
|
|
145
|
-
}),
|
|
146
|
-
},
|
|
145
|
+
}), p.set(e, []);
|
|
146
|
+
}, it = (e, t) => {
|
|
147
147
|
const i = document.createElement("input");
|
|
148
|
-
return i.type = "hidden", i.name = e.getAttribute("name"), e.after(i),
|
|
148
|
+
return i.type = "hidden", i.name = e.getAttribute("name"), e.after(i), p.get(t).push(i), i;
|
|
149
149
|
}, gt = (e, t) => {
|
|
150
150
|
var i;
|
|
151
|
-
|
|
152
|
-
},
|
|
151
|
+
p.set(t, []), (i = T.observe) === null || i === void 0 || i.call(T, e, tt);
|
|
152
|
+
}, ot = (e, t) => {
|
|
153
153
|
if (t.length) {
|
|
154
154
|
Array.from(t).forEach((o) => o.addEventListener("click", e.click.bind(e)));
|
|
155
155
|
let i = t[0].id;
|
|
156
156
|
t[0].id || (i = `${t[0].htmlFor}_Label`, t[0].id = i), e.setAttribute("aria-labelledby", i);
|
|
157
157
|
}
|
|
158
|
-
},
|
|
159
|
-
const t = Array.from(e.elements).filter((
|
|
160
|
-
e.toggleAttribute("internals-invalid",
|
|
158
|
+
}, V = (e) => {
|
|
159
|
+
const t = Array.from(e.elements).filter((n) => !n.tagName.includes("-") && n.validity).map((n) => n.validity.valid), i = E.get(e) || [], o = Array.from(i).filter((n) => n.isConnected).map((n) => d.get(n).validity.valid), a = [...t, ...o].includes(!1);
|
|
160
|
+
e.toggleAttribute("internals-invalid", a), e.toggleAttribute("internals-valid", !a);
|
|
161
161
|
}, ft = (e) => {
|
|
162
|
-
N(
|
|
162
|
+
V(N(e.target));
|
|
163
163
|
}, yt = (e) => {
|
|
164
|
-
N(
|
|
164
|
+
V(N(e.target));
|
|
165
165
|
}, xt = (e) => {
|
|
166
166
|
const t = ["button[type=submit]", "input[type=submit]", "button:not([type])"].map((i) => `${i}:not([disabled])`).map((i) => `${i}:not([form])${e.id ? `,${i}[form='${e.id}']` : ""}`).join(",");
|
|
167
167
|
e.addEventListener("click", (i) => {
|
|
168
168
|
if (i.target.closest(t)) {
|
|
169
|
-
const
|
|
169
|
+
const a = E.get(e);
|
|
170
170
|
if (e.noValidate)
|
|
171
171
|
return;
|
|
172
|
-
|
|
172
|
+
a.size && Array.from(a).reverse().map((u) => d.get(u).reportValidity()).includes(!1) && i.preventDefault();
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
175
|
}, wt = (e) => {
|
|
@@ -177,37 +177,37 @@ import "@justeattakeaway/pie-spinner";
|
|
|
177
177
|
t && t.size && t.forEach((i) => {
|
|
178
178
|
i.constructor.formAssociated && i.formResetCallback && i.formResetCallback.apply(i);
|
|
179
179
|
});
|
|
180
|
-
},
|
|
180
|
+
}, rt = (e, t, i) => {
|
|
181
181
|
if (t) {
|
|
182
182
|
const o = E.get(t);
|
|
183
183
|
if (o)
|
|
184
184
|
o.add(e);
|
|
185
185
|
else {
|
|
186
|
-
const
|
|
187
|
-
|
|
186
|
+
const a = /* @__PURE__ */ new Set();
|
|
187
|
+
a.add(e), E.set(t, a), xt(t), t.addEventListener("reset", wt), t.addEventListener("input", ft), t.addEventListener("change", yt);
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
k.set(t, { ref: e, internals: i }), e.constructor.formAssociated && e.formAssociatedCallback && setTimeout(() => {
|
|
190
190
|
e.formAssociatedCallback.apply(e, [t]);
|
|
191
|
-
}, 0),
|
|
191
|
+
}, 0), V(t);
|
|
192
192
|
}
|
|
193
|
-
},
|
|
193
|
+
}, N = (e) => {
|
|
194
194
|
let t = e.parentNode;
|
|
195
|
-
return t && t.tagName !== "FORM" && (t =
|
|
196
|
-
},
|
|
195
|
+
return t && t.tagName !== "FORM" && (t = N(t)), t;
|
|
196
|
+
}, x = (e, t, i = DOMException) => {
|
|
197
197
|
if (!e.constructor.formAssociated)
|
|
198
198
|
throw new i(t);
|
|
199
|
-
},
|
|
199
|
+
}, at = (e, t, i) => {
|
|
200
200
|
const o = E.get(e);
|
|
201
|
-
return o && o.size && o.forEach((
|
|
202
|
-
|
|
201
|
+
return o && o.size && o.forEach((a) => {
|
|
202
|
+
d.get(a)[i]() || (t = !1);
|
|
203
203
|
}), t;
|
|
204
|
-
},
|
|
204
|
+
}, nt = (e) => {
|
|
205
205
|
if (e.constructor.formAssociated) {
|
|
206
|
-
const t =
|
|
207
|
-
|
|
206
|
+
const t = d.get(e), { labels: i, form: o } = t;
|
|
207
|
+
ot(e, i), rt(e, o, t);
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
|
-
function
|
|
210
|
+
function P() {
|
|
211
211
|
return typeof MutationObserver < "u";
|
|
212
212
|
}
|
|
213
213
|
class kt {
|
|
@@ -215,30 +215,30 @@ import "@justeattakeaway/pie-spinner";
|
|
|
215
215
|
this.badInput = !1, this.customError = !1, this.patternMismatch = !1, this.rangeOverflow = !1, this.rangeUnderflow = !1, this.stepMismatch = !1, this.tooLong = !1, this.tooShort = !1, this.typeMismatch = !1, this.valid = !0, this.valueMissing = !1, Object.seal(this);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
const Et = (e) => (e.badInput = !1, e.customError = !1, e.patternMismatch = !1, e.rangeOverflow = !1, e.rangeUnderflow = !1, e.stepMismatch = !1, e.tooLong = !1, e.tooShort = !1, e.typeMismatch = !1, e.valid = !0, e.valueMissing = !1, e), zt = (e, t, i) => (e.valid = Mt(t), Object.keys(t).forEach((o) => e[o] = t[o]), i &&
|
|
218
|
+
const Et = (e) => (e.badInput = !1, e.customError = !1, e.patternMismatch = !1, e.rangeOverflow = !1, e.rangeUnderflow = !1, e.stepMismatch = !1, e.tooLong = !1, e.tooShort = !1, e.typeMismatch = !1, e.valid = !0, e.valueMissing = !1, e), zt = (e, t, i) => (e.valid = Mt(t), Object.keys(t).forEach((o) => e[o] = t[o]), i && V(i), e), Mt = (e) => {
|
|
219
219
|
let t = !0;
|
|
220
220
|
for (let i in e)
|
|
221
221
|
i !== "valid" && e[i] !== !1 && (t = !1);
|
|
222
222
|
return t;
|
|
223
|
-
},
|
|
224
|
-
function
|
|
223
|
+
}, W = /* @__PURE__ */ new WeakMap();
|
|
224
|
+
function st(e, t) {
|
|
225
225
|
e.toggleAttribute(t, !0), e.part && e.part.add(t);
|
|
226
226
|
}
|
|
227
|
-
class
|
|
227
|
+
class H extends Set {
|
|
228
228
|
static get isPolyfilled() {
|
|
229
229
|
return !0;
|
|
230
230
|
}
|
|
231
231
|
constructor(t) {
|
|
232
232
|
if (super(), !t || !t.tagName || t.tagName.indexOf("-") === -1)
|
|
233
233
|
throw new TypeError("Illegal constructor");
|
|
234
|
-
|
|
234
|
+
W.set(this, t);
|
|
235
235
|
}
|
|
236
236
|
add(t) {
|
|
237
237
|
if (!/^--/.test(t) || typeof t != "string")
|
|
238
238
|
throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);
|
|
239
|
-
const i = super.add(t), o =
|
|
240
|
-
return o.isConnected ?
|
|
241
|
-
|
|
239
|
+
const i = super.add(t), o = W.get(this), a = `state${t}`;
|
|
240
|
+
return o.isConnected ? st(o, a) : setTimeout(() => {
|
|
241
|
+
st(o, a);
|
|
242
242
|
}), i;
|
|
243
243
|
}
|
|
244
244
|
clear() {
|
|
@@ -247,24 +247,24 @@ import "@justeattakeaway/pie-spinner";
|
|
|
247
247
|
super.clear();
|
|
248
248
|
}
|
|
249
249
|
delete(t) {
|
|
250
|
-
const i = super.delete(t), o =
|
|
250
|
+
const i = super.delete(t), o = W.get(this);
|
|
251
251
|
return o.isConnected ? (o.toggleAttribute(`state${t}`, !1), o.part && o.part.remove(`state${t}`)) : setTimeout(() => {
|
|
252
252
|
o.toggleAttribute(`state${t}`, !1), o.part && o.part.remove(`state${t}`);
|
|
253
253
|
}), i;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function lt(e, t, i, o) {
|
|
257
257
|
if (typeof t == "function" ? e !== t || !0 : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
258
258
|
return i === "m" ? o : i === "a" ? o.call(e) : o ? o.value : t.get(e);
|
|
259
259
|
}
|
|
260
|
-
function St(e, t, i, o,
|
|
260
|
+
function St(e, t, i, o, a) {
|
|
261
261
|
if (typeof t == "function" ? e !== t || !0 : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
262
262
|
return t.set(e, i), i;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
264
|
+
var M;
|
|
265
265
|
class Ct {
|
|
266
266
|
constructor(t) {
|
|
267
|
-
|
|
267
|
+
M.set(this, void 0), St(this, M, t);
|
|
268
268
|
for (let i = 0; i < t.length; i++) {
|
|
269
269
|
let o = t[i];
|
|
270
270
|
this[i] = o, o.hasAttribute("name") && (this[o.getAttribute("name")] = o);
|
|
@@ -272,10 +272,10 @@ import "@justeattakeaway/pie-spinner";
|
|
|
272
272
|
Object.freeze(this);
|
|
273
273
|
}
|
|
274
274
|
get length() {
|
|
275
|
-
return
|
|
275
|
+
return lt(this, M, "f").length;
|
|
276
276
|
}
|
|
277
|
-
[(
|
|
278
|
-
return
|
|
277
|
+
[(M = /* @__PURE__ */ new WeakMap(), Symbol.iterator)]() {
|
|
278
|
+
return lt(this, M, "f")[Symbol.iterator]();
|
|
279
279
|
}
|
|
280
280
|
item(t) {
|
|
281
281
|
return this[t] == null ? null : this[t];
|
|
@@ -284,31 +284,31 @@ import "@justeattakeaway/pie-spinner";
|
|
|
284
284
|
return this[t] == null ? null : this[t];
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function At() {
|
|
288
288
|
const e = HTMLFormElement.prototype.checkValidity;
|
|
289
289
|
HTMLFormElement.prototype.checkValidity = i;
|
|
290
290
|
const t = HTMLFormElement.prototype.reportValidity;
|
|
291
291
|
HTMLFormElement.prototype.reportValidity = o;
|
|
292
|
-
function i(...
|
|
293
|
-
let
|
|
294
|
-
return
|
|
292
|
+
function i(...n) {
|
|
293
|
+
let s = e.apply(this, n);
|
|
294
|
+
return at(this, s, "checkValidity");
|
|
295
295
|
}
|
|
296
|
-
function o(...
|
|
297
|
-
let
|
|
298
|
-
return
|
|
296
|
+
function o(...n) {
|
|
297
|
+
let s = t.apply(this, n);
|
|
298
|
+
return at(this, s, "reportValidity");
|
|
299
299
|
}
|
|
300
|
-
const { get:
|
|
300
|
+
const { get: a } = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "elements");
|
|
301
301
|
Object.defineProperty(HTMLFormElement.prototype, "elements", {
|
|
302
|
-
get(...
|
|
303
|
-
const
|
|
302
|
+
get(...n) {
|
|
303
|
+
const s = a.call(this, ...n), u = Array.from(E.get(this) || []);
|
|
304
304
|
if (u.length === 0)
|
|
305
|
-
return
|
|
306
|
-
const h = Array.from(
|
|
305
|
+
return s;
|
|
306
|
+
const h = Array.from(s).concat(u).sort((w, y) => w.compareDocumentPosition ? w.compareDocumentPosition(y) & 2 ? 1 : -1 : 0);
|
|
307
307
|
return new Ct(h);
|
|
308
308
|
}
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
|
-
class
|
|
311
|
+
class dt {
|
|
312
312
|
static get isPolyfilled() {
|
|
313
313
|
return !0;
|
|
314
314
|
}
|
|
@@ -316,13 +316,13 @@ import "@justeattakeaway/pie-spinner";
|
|
|
316
316
|
if (!t || !t.tagName || t.tagName.indexOf("-") === -1)
|
|
317
317
|
throw new TypeError("Illegal constructor");
|
|
318
318
|
const i = t.getRootNode(), o = new kt();
|
|
319
|
-
this.states = new
|
|
319
|
+
this.states = new H(t), r.set(this, t), b.set(this, o), d.set(t, this), pt(t, this), gt(t, this), Object.seal(this), i instanceof DocumentFragment && ut(i);
|
|
320
320
|
}
|
|
321
321
|
checkValidity() {
|
|
322
|
-
const t =
|
|
323
|
-
if (
|
|
322
|
+
const t = r.get(this);
|
|
323
|
+
if (x(t, "Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate)
|
|
324
324
|
return !0;
|
|
325
|
-
const i =
|
|
325
|
+
const i = b.get(this);
|
|
326
326
|
if (!i.valid) {
|
|
327
327
|
const o = new Event("invalid", {
|
|
328
328
|
bubbles: !1,
|
|
@@ -334,75 +334,75 @@ import "@justeattakeaway/pie-spinner";
|
|
|
334
334
|
return i.valid;
|
|
335
335
|
}
|
|
336
336
|
get form() {
|
|
337
|
-
const t =
|
|
338
|
-
|
|
337
|
+
const t = r.get(this);
|
|
338
|
+
x(t, "Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");
|
|
339
339
|
let i;
|
|
340
|
-
return t.constructor.formAssociated === !0 && (i =
|
|
340
|
+
return t.constructor.formAssociated === !0 && (i = N(t)), i;
|
|
341
341
|
}
|
|
342
342
|
get labels() {
|
|
343
|
-
const t =
|
|
344
|
-
|
|
343
|
+
const t = r.get(this);
|
|
344
|
+
x(t, "Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");
|
|
345
345
|
const i = t.getAttribute("id"), o = t.getRootNode();
|
|
346
346
|
return o && i ? o.querySelectorAll(`[for="${i}"]`) : [];
|
|
347
347
|
}
|
|
348
348
|
reportValidity() {
|
|
349
|
-
const t =
|
|
350
|
-
if (
|
|
349
|
+
const t = r.get(this);
|
|
350
|
+
if (x(t, "Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate)
|
|
351
351
|
return !0;
|
|
352
|
-
const i = this.checkValidity(), o =
|
|
352
|
+
const i = this.checkValidity(), o = J.get(this);
|
|
353
353
|
if (o && !t.constructor.formAssociated)
|
|
354
354
|
throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");
|
|
355
355
|
return !i && o && (t.focus(), o.focus()), i;
|
|
356
356
|
}
|
|
357
357
|
setFormValue(t) {
|
|
358
|
-
const i =
|
|
359
|
-
if (
|
|
358
|
+
const i = r.get(this);
|
|
359
|
+
if (x(i, "Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."), et(this), t != null && !(t instanceof FormData)) {
|
|
360
360
|
if (i.getAttribute("name")) {
|
|
361
|
-
const o =
|
|
361
|
+
const o = it(i, this);
|
|
362
362
|
o.value = t;
|
|
363
363
|
}
|
|
364
|
-
} else t != null && t instanceof FormData && Array.from(t).reverse().forEach(([o,
|
|
365
|
-
if (typeof
|
|
366
|
-
const
|
|
367
|
-
|
|
364
|
+
} else t != null && t instanceof FormData && Array.from(t).reverse().forEach(([o, a]) => {
|
|
365
|
+
if (typeof a == "string") {
|
|
366
|
+
const n = it(i, this);
|
|
367
|
+
n.name = o, n.value = a;
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
|
-
|
|
370
|
+
q.set(i, t);
|
|
371
371
|
}
|
|
372
372
|
setValidity(t, i, o) {
|
|
373
|
-
const
|
|
374
|
-
if (
|
|
373
|
+
const a = r.get(this);
|
|
374
|
+
if (x(a, "Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !t)
|
|
375
375
|
throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
for (const
|
|
379
|
-
|
|
380
|
-
Object.keys(
|
|
381
|
-
const u = Object.assign(Object.assign({},
|
|
376
|
+
J.set(this, o);
|
|
377
|
+
const n = b.get(this), s = {};
|
|
378
|
+
for (const w in t)
|
|
379
|
+
s[w] = t[w];
|
|
380
|
+
Object.keys(s).length === 0 && Et(n);
|
|
381
|
+
const u = Object.assign(Object.assign({}, n), s);
|
|
382
382
|
delete u.valid;
|
|
383
|
-
const { valid: h } = zt(
|
|
383
|
+
const { valid: h } = zt(n, u, this.form);
|
|
384
384
|
if (!h && !i)
|
|
385
385
|
throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");
|
|
386
|
-
|
|
386
|
+
f.set(this, h ? "" : i), a.isConnected ? (a.toggleAttribute("internals-invalid", !h), a.toggleAttribute("internals-valid", h), a.setAttribute("aria-invalid", `${!h}`)) : I.set(a, this);
|
|
387
387
|
}
|
|
388
388
|
get shadowRoot() {
|
|
389
|
-
const t =
|
|
389
|
+
const t = r.get(this), i = G.get(t);
|
|
390
390
|
return i || null;
|
|
391
391
|
}
|
|
392
392
|
get validationMessage() {
|
|
393
|
-
const t =
|
|
394
|
-
return
|
|
393
|
+
const t = r.get(this);
|
|
394
|
+
return x(t, "Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."), f.get(this);
|
|
395
395
|
}
|
|
396
396
|
get validity() {
|
|
397
|
-
const t =
|
|
398
|
-
return
|
|
397
|
+
const t = r.get(this);
|
|
398
|
+
return x(t, "Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."), b.get(this);
|
|
399
399
|
}
|
|
400
400
|
get willValidate() {
|
|
401
|
-
const t =
|
|
402
|
-
return
|
|
401
|
+
const t = r.get(this);
|
|
402
|
+
return x(t, "Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."), !(t.disabled || t.hasAttribute("disabled") || t.hasAttribute("readonly"));
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Ft() {
|
|
406
406
|
if (typeof window > "u" || !window.ElementInternals || !HTMLElement.prototype.attachInternals)
|
|
407
407
|
return !1;
|
|
408
408
|
class e extends HTMLElement {
|
|
@@ -426,25 +426,25 @@ import "@justeattakeaway/pie-spinner";
|
|
|
426
426
|
"reportValidity"
|
|
427
427
|
].every((o) => o in i.internals);
|
|
428
428
|
}
|
|
429
|
-
let
|
|
430
|
-
function
|
|
431
|
-
|
|
429
|
+
let ct = !1, bt = !1;
|
|
430
|
+
function B(e) {
|
|
431
|
+
bt || (bt = !0, window.CustomStateSet = H, e && (HTMLElement.prototype.attachInternals = function(...t) {
|
|
432
432
|
const i = e.call(this, t);
|
|
433
|
-
return i.states = new
|
|
433
|
+
return i.states = new H(this), i;
|
|
434
434
|
}));
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
if (!
|
|
438
|
-
if (
|
|
436
|
+
function vt(e = !0) {
|
|
437
|
+
if (!ct) {
|
|
438
|
+
if (ct = !0, typeof window < "u" && (window.ElementInternals = dt), typeof CustomElementRegistry < "u") {
|
|
439
439
|
const t = CustomElementRegistry.prototype.define;
|
|
440
|
-
CustomElementRegistry.prototype.define = function(i, o,
|
|
440
|
+
CustomElementRegistry.prototype.define = function(i, o, a) {
|
|
441
441
|
if (o.formAssociated) {
|
|
442
|
-
const
|
|
442
|
+
const n = o.prototype.connectedCallback;
|
|
443
443
|
o.prototype.connectedCallback = function() {
|
|
444
|
-
|
|
444
|
+
X.has(this) || (X.set(this, !0), this.hasAttribute("disabled") && D(this, !0)), n != null && n.apply(this), nt(this);
|
|
445
445
|
};
|
|
446
446
|
}
|
|
447
|
-
t.call(this, i, o,
|
|
447
|
+
t.call(this, i, o, a);
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
450
|
if (typeof HTMLElement < "u" && (HTMLElement.prototype.attachInternals = function() {
|
|
@@ -452,41 +452,35 @@ import "@justeattakeaway/pie-spinner";
|
|
|
452
452
|
if (this.tagName.indexOf("-") === -1)
|
|
453
453
|
throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");
|
|
454
454
|
} else return {};
|
|
455
|
-
if (
|
|
455
|
+
if (d.has(this))
|
|
456
456
|
throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
|
|
457
|
-
return new
|
|
457
|
+
return new dt(this);
|
|
458
458
|
}), typeof Element < "u") {
|
|
459
459
|
let t = function(...o) {
|
|
460
|
-
const
|
|
461
|
-
if (
|
|
462
|
-
const
|
|
463
|
-
window.ShadyDOM ?
|
|
460
|
+
const a = i.apply(this, o);
|
|
461
|
+
if (G.set(this, a), P()) {
|
|
462
|
+
const n = new MutationObserver(R);
|
|
463
|
+
window.ShadyDOM ? n.observe(this, $) : n.observe(a, $), _.set(this, n);
|
|
464
464
|
}
|
|
465
|
-
return
|
|
465
|
+
return a;
|
|
466
466
|
};
|
|
467
467
|
const i = Element.prototype.attachShadow;
|
|
468
468
|
Element.prototype.attachShadow = t;
|
|
469
469
|
}
|
|
470
|
-
|
|
470
|
+
P() && typeof document < "u" && new MutationObserver(R).observe(document.documentElement, $), typeof HTMLFormElement < "u" && At(), (e || typeof window < "u" && !window.CustomStateSet) && B();
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
return !!customElements.polyfillWrapFlushCallback || (
|
|
473
|
+
return !!customElements.polyfillWrapFlushCallback || (Ft() ? typeof window < "u" && !window.CustomStateSet && B(HTMLElement.prototype.attachInternals) : vt(!1)), l.forceCustomStateSetPolyfill = B, l.forceElementInternalsPolyfill = vt, Object.defineProperty(l, "__esModule", { value: !0 }), l;
|
|
474
474
|
})({});
|
|
475
475
|
})();
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
(
|
|
479
|
-
return l && Nt(a, r, l), l;
|
|
480
|
-
};
|
|
481
|
-
class mt extends It {
|
|
482
|
-
constructor() {
|
|
483
|
-
super(...arguments), this.v = "1.5.1";
|
|
476
|
+
const O = class O extends It {
|
|
477
|
+
willUpdate() {
|
|
478
|
+
this.getAttribute("v") || this.setAttribute("v", O.v);
|
|
484
479
|
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
],
|
|
489
|
-
const _t = ["button", "a"], Ot = ["xsmall", "small-productive", "small-expressive", "medium", "large"], Qt = ["productive", "expressive"], $t = ["submit", "button", "reset"], Rt = [
|
|
480
|
+
};
|
|
481
|
+
O.v = "1.6.1";
|
|
482
|
+
let j = O;
|
|
483
|
+
const Nt = ["button", "a"], Pt = ["xsmall", "small-productive", "small-expressive", "medium", "large"], Jt = ["productive", "expressive"], Ot = ["submit", "button", "reset"], _t = [
|
|
490
484
|
"primary",
|
|
491
485
|
"primary-alternative",
|
|
492
486
|
"secondary",
|
|
@@ -497,7 +491,7 @@ const _t = ["button", "a"], Ot = ["xsmall", "small-productive", "small-expressiv
|
|
|
497
491
|
"ghost-inverse",
|
|
498
492
|
"destructive",
|
|
499
493
|
"destructive-ghost"
|
|
500
|
-
],
|
|
494
|
+
], Rt = ["leading", "trailing"], Qt = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"], Xt = ["post", "get", "dialog"], Yt = ["_self", "_blank", "_parent", "_top"], g = {
|
|
501
495
|
tag: "button",
|
|
502
496
|
size: "medium",
|
|
503
497
|
type: "submit",
|
|
@@ -507,36 +501,37 @@ const _t = ["button", "a"], Ot = ["xsmall", "small-productive", "small-expressiv
|
|
|
507
501
|
isLoading: !1,
|
|
508
502
|
isFullWidth: !1,
|
|
509
503
|
isResponsive: !1
|
|
510
|
-
}, Wt = "*,*:after,*:before{box-sizing:inherit}.o-btn{--btn-border-radius: var(--dt-radius-rounded-e);--btn-font-family: var(--dt-font-interactive-l-family);--btn-font-weight: var(--dt-font-interactive-l-weight);--int-states-mixin-bg-color: var(--dt-color-interactive-brand);--btn-text-color: var(--dt-color-content-interactive-light);--icon-display-override: block;--btn-padding-vertical-xsmall: 6px;--btn-padding-vertical-small: 8px;--btn-padding-vertical-medium: 10px;--btn-padding-vertical-large: 14px;--btn-padding-horizontal-small: var(--dt-spacing-b);--btn-padding-horizontal-medium: var(--dt-spacing-d);--btn-padding-horizontal-large: var(--dt-spacing-e);position:relative;display:inline-flex;gap:var(--dt-spacing-b);align-items:center;justify-content:center;border:none;border-radius:var(--btn-border-radius);outline:none;background-color:var(--int-states-mixin-bg-color);font-family:var(--btn-font-family);font-size:var(--btn-font-size);font-weight:var(--btn-font-weight);color:var(--btn-text-color);line-height:var(--btn-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;inline-size:var(--btn-inline-size)}.o-btn.o-btn--primary:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--hover-modifier)))}.o-btn.o-btn--primary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-brand))}.o-btn.o-btn--primary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-brand))}}.o-btn.o-btn--primary.o-btn--xsmall,.o-btn.o-btn--primary.o-btn--small-productive{--int-states-mixin-bg-color: var(--dt-color-interactive-primary);--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn.o-btn--primary.o-btn--xsmall:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: var(--dt-color-hover-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--hover-modifier)))}.o-btn.o-btn--primary.o-btn--xsmall:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.is-loading:not(:disabled,.is-disabled){--active-modifier: var(--dt-color-active-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary.o-btn--xsmall:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-02-bg) var(--dt-color-hover-02), var(--dt-color-interactive-primary))}.o-btn.o-btn--primary.o-btn--xsmall:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-02-bg) var(--dt-color-active-02), var(--dt-color-interactive-primary))}}@media (min-width: 769px){.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive,.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive{--int-states-mixin-bg-color: var(--dt-color-interactive-brand)}.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--hover-modifier)))}.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-brand))}.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-brand))}}}.o-btn.o-btn--primary-alternative{--int-states-mixin-bg-color: var(--dt-color-interactive-primary);--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn.o-btn--primary-alternative:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: var(--dt-color-hover-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--hover-modifier)))}.o-btn.o-btn--primary-alternative:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary-alternative.is-loading:not(:disabled,.is-disabled){--active-modifier: var(--dt-color-active-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary-alternative:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-02-bg) var(--dt-color-hover-02), var(--dt-color-interactive-primary))}.o-btn.o-btn--primary-alternative:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary-alternative.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-02-bg) var(--dt-color-active-02), var(--dt-color-interactive-primary))}}.o-btn.o-btn--secondary{--int-states-mixin-bg-color: var(--dt-color-interactive-secondary);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn.o-btn--secondary:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--hover-modifier)))}.o-btn.o-btn--secondary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--secondary.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--secondary:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-secondary))}.o-btn.o-btn--secondary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--secondary.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-secondary))}}.o-btn.o-btn--outline{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-secondary);border:1px solid var(--dt-color-border-strong)}.o-btn.o-btn--outline:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--hover-modifier)))}.o-btn.o-btn--outline:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--outline:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-transparent))}.o-btn.o-btn--outline:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-transparent))}}.o-btn.o-btn--ghost{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-link)}.o-btn.o-btn--ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--hover-modifier)))}.o-btn.o-btn--ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-transparent))}.o-btn.o-btn--ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-transparent))}}.o-btn.o-btn--inverse{--int-states-mixin-bg-color: var(--dt-color-interactive-inverse);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn.o-btn--inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--hover-modifier)))}.o-btn.o-btn--inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--inverse.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-inverse))}.o-btn.o-btn--inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--inverse.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-inverse))}}.o-btn.o-btn--ghost-inverse,.o-btn.o-btn--outline-inverse{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn.o-btn--ghost-inverse:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-02);--int-states-mixin-bg-color: hsl(var(--dt-color-white-h), var(--dt-color-white-s), var(--dt-color-white-l), var(--active-modifier))}.o-btn.o-btn--ghost-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost-inverse.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--outline-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-02);--int-states-mixin-bg-color: hsl(var(--dt-color-white-h), var(--dt-color-white-s), var(--dt-color-white-l), var(--active-modifier))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--ghost-inverse:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-02-bg) var(--dt-color-hover-02), var(--dt-color-transparent))}.o-btn.o-btn--ghost-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost-inverse.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--outline-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-02-bg) var(--dt-color-active-02), var(--dt-color-transparent))}}.o-btn.o-btn--outline-inverse{border:1px solid var(--dt-color-border-strong)}.o-btn.o-btn--destructive{--int-states-mixin-bg-color: var(--dt-color-support-error)}.o-btn.o-btn--destructive:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--hover-modifier)))}.o-btn.o-btn--destructive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--destructive:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-support-error))}.o-btn.o-btn--destructive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-support-error))}}.o-btn.o-btn--destructive-ghost{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-error)}.o-btn.o-btn--destructive-ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--hover-modifier)))}.o-btn.o-btn--destructive-ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive-ghost.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--destructive-ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-transparent))}.o-btn.o-btn--destructive-ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive-ghost.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-transparent))}}.o-btn.o-btn--xsmall{--btn-font-size: calc(var(--dt-font-size-14) * 1px);--btn-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--icon-size-override: 16px;padding:var(--btn-padding-vertical-xsmall) var(--btn-padding-horizontal-small)}@media (min-width: 769px){.o-btn.o-btn--xsmall.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-small) var(--btn-padding-horizontal-medium)}.o-btn.o-btn--xsmall.o-btn--responsive.o-btn--expressive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-xsmall) var(--btn-padding-horizontal-medium)}}.o-btn.o-btn--xsmall.o-btn--outline,.o-btn.o-btn--xsmall.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-xsmall) - 1px) var(--btn-padding-horizontal-small)}@media (min-width: 769px){.o-btn.o-btn--xsmall.o-btn--outline.o-btn--responsive,.o-btn.o-btn--xsmall.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-small) - 1px) var(--btn-padding-horizontal-medium)}.o-btn.o-btn--xsmall.o-btn--outline.o-btn--responsive.o-btn--expressive,.o-btn.o-btn--xsmall.o-btn--outline-inverse.o-btn--responsive.o-btn--expressive{padding:calc(var(--btn-padding-vertical-xsmall) - 1px) var(--btn-padding-horizontal-medium)}}.o-btn.o-btn--small-expressive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-xsmall) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-expressive.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-medium) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--small-expressive.o-btn--outline,.o-btn.o-btn--small-expressive.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-xsmall) - 1px) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-expressive.o-btn--outline.o-btn--responsive,.o-btn.o-btn--small-expressive.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-medium) - 1px) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--small-productive{--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-small) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-productive.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-medium) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--small-productive.o-btn--outline,.o-btn.o-btn--small-productive.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-small) - 1px) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-productive.o-btn--outline.o-btn--responsive,.o-btn.o-btn--small-productive.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-medium) - 1px) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--medium{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-medium) var(--btn-padding-horizontal-large)}@media (min-width: 769px){.o-btn.o-btn--medium.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-large) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--medium.o-btn--outline,.o-btn.o-btn--medium.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-medium) - 1px) var(--btn-padding-horizontal-large)}@media (min-width: 769px){.o-btn.o-btn--medium.o-btn--outline.o-btn--responsive,.o-btn.o-btn--medium.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-large) - 1px) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--large{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-large) var(--btn-padding-horizontal-large)}.o-btn.o-btn--large.o-btn--outline,.o-btn.o-btn--large.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-large) - 1px) var(--btn-padding-horizontal-large)}.o-btn.o-btn--fullWidth{--btn-inline-size: 100%}.o-btn[disabled]{--btn-text-color: var(--dt-color-content-disabled) !important;cursor:not-allowed}.o-btn[disabled]:not(.o-btn--ghost,.o-btn--ghost-inverse,.o-btn--destructive-ghost){--int-states-mixin-bg-color: var(--dt-color-disabled-01) !important}.o-btn[disabled].o-btn--outline,.o-btn[disabled].o-btn--outline-inverse{border-color:var(--dt-color-disabled-01)!important}.o-btn.is-loading>*:not(pie-spinner){visibility:hidden}.o-btn.is-loading pie-spinner{position:absolute}.o-btn:focus-visible{box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer);outline:none}.o-btn-text{text-overflow:ellipsis;overflow:hidden}::slotted(svg){height:var(--icon-size-override);width:var(--icon-size-override)}";
|
|
511
|
-
var
|
|
512
|
-
for (var
|
|
513
|
-
(
|
|
514
|
-
return
|
|
504
|
+
}, $t = "*,*:after,*:before{box-sizing:inherit}.o-btn{--btn-border-radius: var(--dt-radius-rounded-e);--btn-font-family: var(--dt-font-interactive-l-family);--btn-font-weight: var(--dt-font-interactive-l-weight);--int-states-mixin-bg-color: var(--dt-color-interactive-brand);--btn-text-color: var(--dt-color-content-interactive-light);--icon-display-override: block;--btn-padding-vertical-xsmall: 6px;--btn-padding-vertical-small: 8px;--btn-padding-vertical-medium: 10px;--btn-padding-vertical-large: 14px;--btn-padding-horizontal-small: var(--dt-spacing-b);--btn-padding-horizontal-medium: var(--dt-spacing-d);--btn-padding-horizontal-large: var(--dt-spacing-e);position:relative;display:inline-flex;gap:var(--dt-spacing-b);align-items:center;justify-content:center;border:none;border-radius:var(--btn-border-radius);outline:none;background-color:var(--int-states-mixin-bg-color);font-family:var(--btn-font-family);font-size:var(--btn-font-size);font-weight:var(--btn-font-weight);color:var(--btn-text-color);line-height:var(--btn-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;text-decoration:none;inline-size:var(--btn-inline-size)}.o-btn.o-btn--primary:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--hover-modifier)))}.o-btn.o-btn--primary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-brand))}.o-btn.o-btn--primary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-brand))}}.o-btn.o-btn--primary.o-btn--xsmall,.o-btn.o-btn--primary.o-btn--small-productive{--int-states-mixin-bg-color: var(--dt-color-interactive-primary);--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn.o-btn--primary.o-btn--xsmall:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: var(--dt-color-hover-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--hover-modifier)))}.o-btn.o-btn--primary.o-btn--xsmall:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.is-loading:not(:disabled,.is-disabled){--active-modifier: var(--dt-color-active-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary.o-btn--xsmall:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-02-bg) var(--dt-color-hover-02), var(--dt-color-interactive-primary))}.o-btn.o-btn--primary.o-btn--xsmall:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-02-bg) var(--dt-color-active-02), var(--dt-color-interactive-primary))}}@media (min-width: 769px){.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive,.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive{--int-states-mixin-bg-color: var(--dt-color-interactive-brand)}.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--hover-modifier)))}.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-brand-h), var(--dt-color-interactive-brand-s), calc(var(--dt-color-interactive-brand-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-brand))}.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--xsmall.o-btn--expressive.o-btn--responsive.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary.o-btn--small-productive.o-btn--responsive.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-brand))}}}.o-btn.o-btn--primary-alternative{--int-states-mixin-bg-color: var(--dt-color-interactive-primary);--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn.o-btn--primary-alternative:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: var(--dt-color-hover-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--hover-modifier)))}.o-btn.o-btn--primary-alternative:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary-alternative.is-loading:not(:disabled,.is-disabled){--active-modifier: var(--dt-color-active-02);--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-primary-h), var(--dt-color-interactive-primary-s), calc(var(--dt-color-interactive-primary-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--primary-alternative:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-02-bg) var(--dt-color-hover-02), var(--dt-color-interactive-primary))}.o-btn.o-btn--primary-alternative:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--primary-alternative.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-02-bg) var(--dt-color-active-02), var(--dt-color-interactive-primary))}}.o-btn.o-btn--secondary{--int-states-mixin-bg-color: var(--dt-color-interactive-secondary);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn.o-btn--secondary:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--hover-modifier)))}.o-btn.o-btn--secondary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--secondary.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-secondary-h), var(--dt-color-interactive-secondary-s), calc(var(--dt-color-interactive-secondary-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--secondary:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-secondary))}.o-btn.o-btn--secondary:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--secondary.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-secondary))}}.o-btn.o-btn--outline{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-secondary);border:1px solid var(--dt-color-border-strong)}.o-btn.o-btn--outline:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--hover-modifier)))}.o-btn.o-btn--outline:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--outline:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-transparent))}.o-btn.o-btn--outline:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-transparent))}}.o-btn.o-btn--ghost{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-link)}.o-btn.o-btn--ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--hover-modifier)))}.o-btn.o-btn--ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-transparent))}.o-btn.o-btn--ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-transparent))}}.o-btn.o-btn--inverse{--int-states-mixin-bg-color: var(--dt-color-interactive-inverse);--btn-text-color: var(--dt-color-content-interactive-secondary)}.o-btn.o-btn--inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--hover-modifier)))}.o-btn.o-btn--inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--inverse.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-interactive-inverse-h), var(--dt-color-interactive-inverse-s), calc(var(--dt-color-interactive-inverse-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-interactive-inverse))}.o-btn.o-btn--inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--inverse.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-interactive-inverse))}}.o-btn.o-btn--ghost-inverse,.o-btn.o-btn--outline-inverse{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-primary)}.o-btn.o-btn--ghost-inverse:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-02);--int-states-mixin-bg-color: hsl(var(--dt-color-white-h), var(--dt-color-white-s), var(--dt-color-white-l), var(--active-modifier))}.o-btn.o-btn--ghost-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost-inverse.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--outline-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-02);--int-states-mixin-bg-color: hsl(var(--dt-color-white-h), var(--dt-color-white-s), var(--dt-color-white-l), var(--active-modifier))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--ghost-inverse:hover:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-02-bg) var(--dt-color-hover-02), var(--dt-color-transparent))}.o-btn.o-btn--ghost-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--ghost-inverse.is-loading:not(:disabled,.is-disabled),.o-btn.o-btn--outline-inverse:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--outline-inverse.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-02-bg) var(--dt-color-active-02), var(--dt-color-transparent))}}.o-btn.o-btn--outline-inverse{border:1px solid var(--dt-color-border-strong)}.o-btn.o-btn--destructive{--int-states-mixin-bg-color: var(--dt-color-support-error)}.o-btn.o-btn--destructive:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--int-states-mixin-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--hover-modifier)))}.o-btn.o-btn--destructive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--int-states-mixin-bg-color: hsl(var(--dt-color-support-error-h), var(--dt-color-support-error-s), calc(var(--dt-color-support-error-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--destructive:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-support-error))}.o-btn.o-btn--destructive:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-support-error))}}.o-btn.o-btn--destructive-ghost{--int-states-mixin-bg-color: transparent;--btn-text-color: var(--dt-color-content-interactive-error)}.o-btn.o-btn--destructive-ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--hover-modifier: calc(-1 * var(--dt-color-hover-01));--hover-modifier: var(--dt-color-hover-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--hover-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--hover-modifier)))}.o-btn.o-btn--destructive-ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive-ghost.is-loading:not(:disabled,.is-disabled){--active-modifier: calc(-1 * var(--dt-color-active-01));--active-modifier: var(--dt-color-active-01);--int-states-mixin-bg-color: hsl(var(--dt-color-black-h), var(--dt-color-black-s), var(--dt-color-black-l), var(--active-modifier));--int-states-mixin-bg-color: hsl(var(--dt-color-transparent-h), var(--dt-color-transparent-s), calc(var(--dt-color-transparent-l) + var(--active-modifier)))}@supports (background-color: color-mix(in srgb,black,white)){.o-btn.o-btn--destructive-ghost:hover:not(:disabled,.is-disabled,.is-dismissible){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-hover-01-bg) var(--dt-color-hover-01), var(--dt-color-transparent))}.o-btn.o-btn--destructive-ghost:active:not(:disabled,.is-disabled,.is-dismissible),.o-btn.o-btn--destructive-ghost.is-loading:not(:disabled,.is-disabled){--int-states-mixin-bg-color: color-mix(in srgb, var(--dt-color-active-01-bg) var(--dt-color-active-01), var(--dt-color-transparent))}}.o-btn.o-btn--xsmall{--btn-font-size: calc(var(--dt-font-size-14) * 1px);--btn-line-height: calc(var(--dt-font-size-14-line-height) * 1px);--icon-size-override: 16px;padding:var(--btn-padding-vertical-xsmall) var(--btn-padding-horizontal-small)}@media (min-width: 769px){.o-btn.o-btn--xsmall.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-small) var(--btn-padding-horizontal-medium)}.o-btn.o-btn--xsmall.o-btn--responsive.o-btn--expressive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-xsmall) var(--btn-padding-horizontal-medium)}}.o-btn.o-btn--xsmall.o-btn--outline,.o-btn.o-btn--xsmall.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-xsmall) - 1px) var(--btn-padding-horizontal-small)}@media (min-width: 769px){.o-btn.o-btn--xsmall.o-btn--outline.o-btn--responsive,.o-btn.o-btn--xsmall.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-small) - 1px) var(--btn-padding-horizontal-medium)}.o-btn.o-btn--xsmall.o-btn--outline.o-btn--responsive.o-btn--expressive,.o-btn.o-btn--xsmall.o-btn--outline-inverse.o-btn--responsive.o-btn--expressive{padding:calc(var(--btn-padding-vertical-xsmall) - 1px) var(--btn-padding-horizontal-medium)}}.o-btn.o-btn--small-expressive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-xsmall) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-expressive.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-medium) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--small-expressive.o-btn--outline,.o-btn.o-btn--small-expressive.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-xsmall) - 1px) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-expressive.o-btn--outline.o-btn--responsive,.o-btn.o-btn--small-expressive.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-medium) - 1px) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--small-productive{--btn-font-size: calc(var(--dt-font-size-16) * 1px);--btn-line-height: calc(var(--dt-font-size-16-line-height) * 1px);--icon-size-override: 20px;padding:var(--btn-padding-vertical-small) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-productive.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-medium) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--small-productive.o-btn--outline,.o-btn.o-btn--small-productive.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-small) - 1px) var(--btn-padding-horizontal-medium)}@media (min-width: 769px){.o-btn.o-btn--small-productive.o-btn--outline.o-btn--responsive,.o-btn.o-btn--small-productive.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-medium) - 1px) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--medium{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-medium) var(--btn-padding-horizontal-large)}@media (min-width: 769px){.o-btn.o-btn--medium.o-btn--responsive{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-large) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--medium.o-btn--outline,.o-btn.o-btn--medium.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-medium) - 1px) var(--btn-padding-horizontal-large)}@media (min-width: 769px){.o-btn.o-btn--medium.o-btn--outline.o-btn--responsive,.o-btn.o-btn--medium.o-btn--outline-inverse.o-btn--responsive{padding:calc(var(--btn-padding-vertical-large) - 1px) var(--btn-padding-horizontal-large)}}.o-btn.o-btn--large{--btn-font-size: calc(var(--dt-font-size-20) * 1px);--btn-line-height: calc(var(--dt-font-size-20-line-height) * 1px);--icon-size-override: 24px;padding:var(--btn-padding-vertical-large) var(--btn-padding-horizontal-large)}.o-btn.o-btn--large.o-btn--outline,.o-btn.o-btn--large.o-btn--outline-inverse{padding:calc(var(--btn-padding-vertical-large) - 1px) var(--btn-padding-horizontal-large)}.o-btn.o-btn--fullWidth{--btn-inline-size: 100%}.o-btn[disabled]{--btn-text-color: var(--dt-color-content-disabled) !important;cursor:not-allowed}.o-btn[disabled]:not(.o-btn--ghost,.o-btn--ghost-inverse,.o-btn--destructive-ghost){--int-states-mixin-bg-color: var(--dt-color-disabled-01) !important}.o-btn[disabled].o-btn--outline,.o-btn[disabled].o-btn--outline-inverse{border-color:var(--dt-color-disabled-01)!important}.o-btn.is-loading>*:not(pie-spinner){visibility:hidden}.o-btn.is-loading pie-spinner{position:absolute}.o-btn:focus-visible{box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer);outline:none}.o-btn-text{text-overflow:ellipsis;overflow:hidden}::slotted(svg){height:var(--icon-size-override);width:var(--icon-size-override)}";
|
|
505
|
+
var Dt = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, v = (l, r, b, p) => {
|
|
506
|
+
for (var d = p > 1 ? void 0 : p ? Wt(r, b) : r, f = l.length - 1, k; f >= 0; f--)
|
|
507
|
+
(k = l[f]) && (d = (p ? k(r, b, d) : k(d)) || d);
|
|
508
|
+
return p && d && Dt(r, b, d), d;
|
|
515
509
|
};
|
|
516
|
-
const
|
|
510
|
+
const A = "pie-button";
|
|
511
|
+
let c = class extends Tt(j) {
|
|
517
512
|
constructor() {
|
|
518
|
-
super(...arguments), this.tag = g.tag, this.size = g.size, this.type = g.type, this.variant = g.variant, this.iconPlacement = g.iconPlacement, this.disabled = g.disabled, this.isLoading = g.isLoading, this.isFullWidth = g.isFullWidth, this.isResponsive = g.isResponsive, this._handleFormKeyDown = (
|
|
519
|
-
if (!(
|
|
520
|
-
if (
|
|
521
|
-
const r =
|
|
513
|
+
super(...arguments), this.tag = g.tag, this.size = g.size, this.type = g.type, this.variant = g.variant, this.iconPlacement = g.iconPlacement, this.disabled = g.disabled, this.isLoading = g.isLoading, this.isFullWidth = g.isFullWidth, this.isResponsive = g.isResponsive, this._handleFormKeyDown = (l) => {
|
|
514
|
+
if (!(l.key !== "Enter" || this.type !== "submit" || this.disabled)) {
|
|
515
|
+
if (l.target instanceof HTMLElement) {
|
|
516
|
+
const r = l.target.tagName.toLowerCase();
|
|
522
517
|
if (r === "button" || r === "pie-button")
|
|
523
518
|
return;
|
|
524
519
|
}
|
|
525
|
-
|
|
520
|
+
l.preventDefault(), this._handleClick();
|
|
526
521
|
}
|
|
527
522
|
};
|
|
528
523
|
}
|
|
529
524
|
connectedCallback() {
|
|
530
|
-
var
|
|
531
|
-
super.connectedCallback(), this.type === "submit" && ((
|
|
525
|
+
var l;
|
|
526
|
+
super.connectedCallback(), this.type === "submit" && ((l = this.form) == null || l.addEventListener("keydown", this._handleFormKeyDown));
|
|
532
527
|
}
|
|
533
528
|
disconnectedCallback() {
|
|
534
|
-
var
|
|
535
|
-
super.disconnectedCallback(), this.type === "submit" && ((
|
|
529
|
+
var l;
|
|
530
|
+
super.disconnectedCallback(), this.type === "submit" && ((l = this.form) == null || l.removeEventListener("keydown", this._handleFormKeyDown));
|
|
536
531
|
}
|
|
537
|
-
updated(
|
|
532
|
+
updated(l) {
|
|
538
533
|
var r, b;
|
|
539
|
-
|
|
534
|
+
l.has("type") && (this.type === "submit" ? (r = this.form) == null || r.addEventListener("keydown", this._handleFormKeyDown) : (b = this.form) == null || b.removeEventListener("keydown", this._handleFormKeyDown));
|
|
540
535
|
}
|
|
541
536
|
/**
|
|
542
537
|
* This method creates an invisible button of the same type as pie-button. It is then clicked, and immediately removed from the DOM.
|
|
@@ -546,10 +541,10 @@ const S = "pie-button", j = class j extends Tt(mt) {
|
|
|
546
541
|
*
|
|
547
542
|
* TODO: if we need to repeat this logic elsewhere, then we should consider moving this code to a shared class or mixin.
|
|
548
543
|
*/
|
|
549
|
-
_simulateNativeButtonClick(
|
|
544
|
+
_simulateNativeButtonClick(l) {
|
|
550
545
|
if (!this.form) return;
|
|
551
546
|
const r = document.createElement("button");
|
|
552
|
-
r.type =
|
|
547
|
+
r.type = l, r.style.position = "absolute", r.style.width = "1px", r.style.height = "1px", r.style.padding = "0", r.style.margin = "-1px", r.style.overflow = "hidden", r.style.border = "0", r.style.whiteSpace = "nowrap", l === "submit" && (this.name && (r.name = this.name), this.value && (r.value = this.value), this.formaction && r.setAttribute("formaction", this.formaction), this.formenctype && r.setAttribute("formenctype", this.formenctype), this.formmethod && r.setAttribute("formmethod", this.formmethod), this.formnovalidate && r.setAttribute("formnovalidate", "formnovalidate"), this.formtarget && r.setAttribute("formtarget", this.formtarget)), this.form.append(r), r.click(), r.remove();
|
|
553
548
|
}
|
|
554
549
|
_handleClick() {
|
|
555
550
|
this.form && (this.isLoading || this.tag === "button" && (this.type === "submit" ? (this.formnovalidate || this.form.reportValidity()) && this._simulateNativeButtonClick("submit") : this.type === "reset" && this._simulateNativeButtonClick("reset")));
|
|
@@ -560,155 +555,156 @@ const S = "pie-button", j = class j extends Tt(mt) {
|
|
|
560
555
|
* @private
|
|
561
556
|
*/
|
|
562
557
|
renderSpinner() {
|
|
563
|
-
const { size:
|
|
564
|
-
let
|
|
565
|
-
return b ?
|
|
558
|
+
const { size: l, variant: r, disabled: b } = this, p = l && l.includes("small") ? "small" : "medium";
|
|
559
|
+
let d;
|
|
560
|
+
return b ? d = r === "ghost-inverse" ? "inverse" : "secondary" : d = ["primary", "destructive", "outline-inverse", "ghost-inverse"].includes(this.variant) ? "inverse" : "secondary", z`
|
|
566
561
|
<pie-spinner
|
|
567
|
-
size="${
|
|
568
|
-
variant="${
|
|
562
|
+
size="${p}"
|
|
563
|
+
variant="${d}">
|
|
569
564
|
</pie-spinner>`;
|
|
570
565
|
}
|
|
571
|
-
renderAnchor(
|
|
566
|
+
renderAnchor(l) {
|
|
572
567
|
const {
|
|
573
568
|
href: r,
|
|
574
569
|
iconPlacement: b,
|
|
575
|
-
rel:
|
|
576
|
-
target:
|
|
570
|
+
rel: p,
|
|
571
|
+
target: d
|
|
577
572
|
} = this;
|
|
578
573
|
return z`
|
|
579
574
|
<a
|
|
580
|
-
href="${
|
|
581
|
-
rel="${
|
|
582
|
-
target="${
|
|
583
|
-
class="${
|
|
584
|
-
${b === "leading" ? z`<slot name="icon"></slot>` :
|
|
575
|
+
href="${U(r)}"
|
|
576
|
+
rel="${U(p)}"
|
|
577
|
+
target="${U(d)}"
|
|
578
|
+
class="${mt(l)}">
|
|
579
|
+
${b === "leading" ? z`<slot name="icon"></slot>` : S}
|
|
585
580
|
<slot></slot>
|
|
586
|
-
${b === "trailing" ? z`<slot name="icon"></slot>` :
|
|
581
|
+
${b === "trailing" ? z`<slot name="icon"></slot>` : S}
|
|
587
582
|
</a>`;
|
|
588
583
|
}
|
|
589
|
-
renderButton(
|
|
584
|
+
renderButton(l) {
|
|
590
585
|
const {
|
|
591
586
|
disabled: r,
|
|
592
587
|
iconPlacement: b,
|
|
593
|
-
isLoading:
|
|
594
|
-
type:
|
|
588
|
+
isLoading: p,
|
|
589
|
+
type: d
|
|
595
590
|
} = this, f = {
|
|
596
|
-
...
|
|
597
|
-
"is-loading":
|
|
591
|
+
...l,
|
|
592
|
+
"is-loading": p
|
|
598
593
|
};
|
|
599
594
|
return z`
|
|
600
595
|
<button
|
|
601
596
|
@click=${this._handleClick}
|
|
602
|
-
class=${
|
|
603
|
-
type=${
|
|
597
|
+
class=${mt(f)}
|
|
598
|
+
type=${d}
|
|
604
599
|
?disabled=${r}>
|
|
605
|
-
${
|
|
606
|
-
${b === "leading" ? z`<slot name="icon"></slot>` :
|
|
600
|
+
${p ? this.renderSpinner() : S}
|
|
601
|
+
${b === "leading" ? z`<slot name="icon"></slot>` : S}
|
|
607
602
|
<span class="o-btn-text"><slot></slot></span>
|
|
608
|
-
${b === "trailing" ? z`<slot name="icon"></slot>` :
|
|
603
|
+
${b === "trailing" ? z`<slot name="icon"></slot>` : S}
|
|
609
604
|
</button>`;
|
|
610
605
|
}
|
|
611
606
|
render() {
|
|
612
607
|
const {
|
|
613
|
-
isFullWidth:
|
|
608
|
+
isFullWidth: l,
|
|
614
609
|
isResponsive: r,
|
|
615
610
|
responsiveSize: b,
|
|
616
|
-
size:
|
|
617
|
-
tag:
|
|
611
|
+
size: p,
|
|
612
|
+
tag: d,
|
|
618
613
|
variant: f
|
|
619
|
-
} = this,
|
|
614
|
+
} = this, k = {
|
|
620
615
|
"o-btn": !0,
|
|
621
|
-
"o-btn--fullWidth":
|
|
616
|
+
"o-btn--fullWidth": l,
|
|
622
617
|
"o-btn--responsive": r,
|
|
623
618
|
[`o-btn--${b}`]: !!(r && b),
|
|
624
619
|
[`o-btn--${f}`]: !0,
|
|
625
|
-
[`o-btn--${
|
|
620
|
+
[`o-btn--${p}`]: !0
|
|
626
621
|
};
|
|
627
|
-
return
|
|
622
|
+
return d === "a" ? this.renderAnchor(k) : this.renderButton(k);
|
|
628
623
|
}
|
|
629
624
|
focus() {
|
|
630
|
-
var
|
|
631
|
-
(r = (
|
|
625
|
+
var l, r;
|
|
626
|
+
(r = (l = this.shadowRoot) == null ? void 0 : l.querySelector("button")) == null || r.focus();
|
|
632
627
|
}
|
|
633
628
|
};
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
Vt(
|
|
629
|
+
c.styles = Lt($t);
|
|
630
|
+
v([
|
|
631
|
+
m({ type: String }),
|
|
632
|
+
C(A, Nt, g.tag)
|
|
633
|
+
], c.prototype, "tag", 2);
|
|
634
|
+
v([
|
|
635
|
+
m({ type: String }),
|
|
636
|
+
C(A, Pt, g.size)
|
|
637
|
+
], c.prototype, "size", 2);
|
|
638
|
+
v([
|
|
639
|
+
m({ type: String }),
|
|
640
|
+
C(A, Ot, g.type)
|
|
641
|
+
], c.prototype, "type", 2);
|
|
642
|
+
v([
|
|
643
|
+
m({ type: String }),
|
|
644
|
+
C(A, _t, g.variant)
|
|
645
|
+
], c.prototype, "variant", 2);
|
|
646
|
+
v([
|
|
647
|
+
m({ type: String }),
|
|
648
|
+
C(A, Rt, g.iconPlacement)
|
|
649
|
+
], c.prototype, "iconPlacement", 2);
|
|
650
|
+
v([
|
|
651
|
+
m({ type: Boolean })
|
|
652
|
+
], c.prototype, "disabled", 2);
|
|
653
|
+
v([
|
|
654
|
+
m({ type: Boolean, reflect: !0 })
|
|
655
|
+
], c.prototype, "isLoading", 2);
|
|
656
|
+
v([
|
|
657
|
+
m({ type: Boolean })
|
|
658
|
+
], c.prototype, "isFullWidth", 2);
|
|
659
|
+
v([
|
|
660
|
+
m({ type: Boolean })
|
|
661
|
+
], c.prototype, "isResponsive", 2);
|
|
662
|
+
v([
|
|
663
|
+
m({ type: String })
|
|
664
|
+
], c.prototype, "name", 2);
|
|
665
|
+
v([
|
|
666
|
+
m({ type: String })
|
|
667
|
+
], c.prototype, "value", 2);
|
|
668
|
+
v([
|
|
669
|
+
m({ type: String })
|
|
670
|
+
], c.prototype, "formaction", 2);
|
|
671
|
+
v([
|
|
672
|
+
m({ type: String })
|
|
673
|
+
], c.prototype, "formenctype", 2);
|
|
674
|
+
v([
|
|
675
|
+
m({ type: String })
|
|
676
|
+
], c.prototype, "formmethod", 2);
|
|
677
|
+
v([
|
|
678
|
+
m({ type: Boolean })
|
|
679
|
+
], c.prototype, "formnovalidate", 2);
|
|
680
|
+
v([
|
|
681
|
+
m({ type: String })
|
|
682
|
+
], c.prototype, "formtarget", 2);
|
|
683
|
+
v([
|
|
684
|
+
m({ type: String })
|
|
685
|
+
], c.prototype, "responsiveSize", 2);
|
|
686
|
+
v([
|
|
687
|
+
m({ type: String })
|
|
688
|
+
], c.prototype, "href", 2);
|
|
689
|
+
v([
|
|
690
|
+
m({ type: String })
|
|
691
|
+
], c.prototype, "rel", 2);
|
|
692
|
+
v([
|
|
693
|
+
m({ type: String })
|
|
694
|
+
], c.prototype, "target", 2);
|
|
695
|
+
c = v([
|
|
696
|
+
Vt("pie-button")
|
|
697
|
+
], c);
|
|
702
698
|
export {
|
|
703
699
|
c as PieButton,
|
|
704
700
|
g as defaultProps,
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
701
|
+
Qt as formEncodingtypes,
|
|
702
|
+
Xt as formMethodTypes,
|
|
703
|
+
Yt as formTargetTypes,
|
|
704
|
+
Rt as iconPlacements,
|
|
705
|
+
Jt as responsiveSizes,
|
|
706
|
+
Pt as sizes,
|
|
707
|
+
Nt as tags,
|
|
708
|
+
Ot as types,
|
|
709
|
+
_t as variants
|
|
714
710
|
};
|