@m3e/split-button 1.0.6 → 1.1.0
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/index.js +501 -401
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -253
- package/dist/index.min.js.map +1 -1
- package/package.json +5 -19
package/dist/index.js
CHANGED
|
@@ -21,33 +21,30 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
21
21
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
22
22
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
23
23
|
PERFORMANCE OF THIS SOFTWARE.
|
|
24
|
-
***************************************************************************** */
|
|
25
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
49
|
-
var e = new Error(message);
|
|
50
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
24
|
+
***************************************************************************** */
|
|
25
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
26
|
+
|
|
27
|
+
function __decorate(decorators, target, key, desc) {
|
|
28
|
+
var c = arguments.length,
|
|
29
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
30
|
+
d;
|
|
31
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
32
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
33
|
+
}
|
|
34
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
35
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
36
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
37
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
38
|
+
}
|
|
39
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
40
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
41
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
42
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
43
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
44
|
+
}
|
|
45
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
46
|
+
var e = new Error(message);
|
|
47
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
51
48
|
};
|
|
52
49
|
|
|
53
50
|
/**
|
|
@@ -55,39 +52,395 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
55
52
|
* Copyright 2017 Google LLC
|
|
56
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
54
|
*/
|
|
58
|
-
const t$1=t=>(e,o)=>
|
|
55
|
+
const t$1 = t => (e, o) => {
|
|
56
|
+
void 0 !== o ? o.addInitializer(() => {
|
|
57
|
+
customElements.define(t, e);
|
|
58
|
+
}) : customElements.define(t, e);
|
|
59
|
+
};
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
62
|
* @license
|
|
62
63
|
* Copyright 2019 Google LLC
|
|
63
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
64
65
|
*/
|
|
65
|
-
const t
|
|
66
|
+
const t = globalThis,
|
|
67
|
+
e$3 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
68
|
+
s = Symbol(),
|
|
69
|
+
o$2 = new WeakMap();
|
|
70
|
+
let n$2 = class n {
|
|
71
|
+
constructor(t, e, o) {
|
|
72
|
+
if (this._$cssResult$ = true, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
73
|
+
this.cssText = t, this.t = e;
|
|
74
|
+
}
|
|
75
|
+
get styleSheet() {
|
|
76
|
+
let t = this.o;
|
|
77
|
+
const s = this.t;
|
|
78
|
+
if (e$3 && void 0 === t) {
|
|
79
|
+
const e = void 0 !== s && 1 === s.length;
|
|
80
|
+
e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
|
|
81
|
+
}
|
|
82
|
+
return t;
|
|
83
|
+
}
|
|
84
|
+
toString() {
|
|
85
|
+
return this.cssText;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const r$2 = t => new n$2("string" == typeof t ? t : t + "", void 0, s),
|
|
89
|
+
S = (s, o) => {
|
|
90
|
+
if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
|
|
91
|
+
const o = document.createElement("style"),
|
|
92
|
+
n = t.litNonce;
|
|
93
|
+
void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
c$1 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
97
|
+
let e = "";
|
|
98
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
99
|
+
return r$2(e);
|
|
100
|
+
})(t) : t;
|
|
66
101
|
|
|
67
102
|
/**
|
|
68
103
|
* @license
|
|
69
104
|
* Copyright 2017 Google LLC
|
|
70
105
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
71
|
-
*/
|
|
106
|
+
*/
|
|
107
|
+
const {
|
|
108
|
+
is: i,
|
|
109
|
+
defineProperty: e$2,
|
|
110
|
+
getOwnPropertyDescriptor: h,
|
|
111
|
+
getOwnPropertyNames: r$1,
|
|
112
|
+
getOwnPropertySymbols: o$1,
|
|
113
|
+
getPrototypeOf: n$1
|
|
114
|
+
} = Object,
|
|
115
|
+
a = globalThis,
|
|
116
|
+
c = a.trustedTypes,
|
|
117
|
+
l = c ? c.emptyScript : "",
|
|
118
|
+
p = a.reactiveElementPolyfillSupport,
|
|
119
|
+
d = (t, s) => t,
|
|
120
|
+
u = {
|
|
121
|
+
toAttribute(t, s) {
|
|
122
|
+
switch (s) {
|
|
123
|
+
case Boolean:
|
|
124
|
+
t = t ? l : null;
|
|
125
|
+
break;
|
|
126
|
+
case Object:
|
|
127
|
+
case Array:
|
|
128
|
+
t = null == t ? t : JSON.stringify(t);
|
|
129
|
+
}
|
|
130
|
+
return t;
|
|
131
|
+
},
|
|
132
|
+
fromAttribute(t, s) {
|
|
133
|
+
let i = t;
|
|
134
|
+
switch (s) {
|
|
135
|
+
case Boolean:
|
|
136
|
+
i = null !== t;
|
|
137
|
+
break;
|
|
138
|
+
case Number:
|
|
139
|
+
i = null === t ? null : Number(t);
|
|
140
|
+
break;
|
|
141
|
+
case Object:
|
|
142
|
+
case Array:
|
|
143
|
+
try {
|
|
144
|
+
i = JSON.parse(t);
|
|
145
|
+
} catch (t) {
|
|
146
|
+
i = null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return i;
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
f = (t, s) => !i(t, s),
|
|
153
|
+
b = {
|
|
154
|
+
attribute: true,
|
|
155
|
+
type: String,
|
|
156
|
+
converter: u,
|
|
157
|
+
reflect: false,
|
|
158
|
+
useDefault: false,
|
|
159
|
+
hasChanged: f
|
|
160
|
+
};
|
|
161
|
+
Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
|
|
162
|
+
class y extends HTMLElement {
|
|
163
|
+
static addInitializer(t) {
|
|
164
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
165
|
+
}
|
|
166
|
+
static get observedAttributes() {
|
|
167
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
168
|
+
}
|
|
169
|
+
static createProperty(t, s = b) {
|
|
170
|
+
if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
171
|
+
const i = Symbol(),
|
|
172
|
+
h = this.getPropertyDescriptor(t, i, s);
|
|
173
|
+
void 0 !== h && e$2(this.prototype, t, h);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
static getPropertyDescriptor(t, s, i) {
|
|
177
|
+
const {
|
|
178
|
+
get: e,
|
|
179
|
+
set: r
|
|
180
|
+
} = h(this.prototype, t) ?? {
|
|
181
|
+
get() {
|
|
182
|
+
return this[s];
|
|
183
|
+
},
|
|
184
|
+
set(t) {
|
|
185
|
+
this[s] = t;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
return {
|
|
189
|
+
get: e,
|
|
190
|
+
set(s) {
|
|
191
|
+
const h = e?.call(this);
|
|
192
|
+
r?.call(this, s), this.requestUpdate(t, h, i);
|
|
193
|
+
},
|
|
194
|
+
configurable: true,
|
|
195
|
+
enumerable: true
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
static getPropertyOptions(t) {
|
|
199
|
+
return this.elementProperties.get(t) ?? b;
|
|
200
|
+
}
|
|
201
|
+
static _$Ei() {
|
|
202
|
+
if (this.hasOwnProperty(d("elementProperties"))) return;
|
|
203
|
+
const t = n$1(this);
|
|
204
|
+
t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
205
|
+
}
|
|
206
|
+
static finalize() {
|
|
207
|
+
if (this.hasOwnProperty(d("finalized"))) return;
|
|
208
|
+
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
|
|
209
|
+
const t = this.properties,
|
|
210
|
+
s = [...r$1(t), ...o$1(t)];
|
|
211
|
+
for (const i of s) this.createProperty(i, t[i]);
|
|
212
|
+
}
|
|
213
|
+
const t = this[Symbol.metadata];
|
|
214
|
+
if (null !== t) {
|
|
215
|
+
const s = litPropertyMetadata.get(t);
|
|
216
|
+
if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
|
|
217
|
+
}
|
|
218
|
+
this._$Eh = new Map();
|
|
219
|
+
for (const [t, s] of this.elementProperties) {
|
|
220
|
+
const i = this._$Eu(t, s);
|
|
221
|
+
void 0 !== i && this._$Eh.set(i, t);
|
|
222
|
+
}
|
|
223
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
224
|
+
}
|
|
225
|
+
static finalizeStyles(s) {
|
|
226
|
+
const i = [];
|
|
227
|
+
if (Array.isArray(s)) {
|
|
228
|
+
const e = new Set(s.flat(1 / 0).reverse());
|
|
229
|
+
for (const s of e) i.unshift(c$1(s));
|
|
230
|
+
} else void 0 !== s && i.push(c$1(s));
|
|
231
|
+
return i;
|
|
232
|
+
}
|
|
233
|
+
static _$Eu(t, s) {
|
|
234
|
+
const i = s.attribute;
|
|
235
|
+
return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
236
|
+
}
|
|
237
|
+
constructor() {
|
|
238
|
+
super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
|
|
239
|
+
}
|
|
240
|
+
_$Ev() {
|
|
241
|
+
this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
|
|
242
|
+
}
|
|
243
|
+
addController(t) {
|
|
244
|
+
(this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
245
|
+
}
|
|
246
|
+
removeController(t) {
|
|
247
|
+
this._$EO?.delete(t);
|
|
248
|
+
}
|
|
249
|
+
_$E_() {
|
|
250
|
+
const t = new Map(),
|
|
251
|
+
s = this.constructor.elementProperties;
|
|
252
|
+
for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
253
|
+
t.size > 0 && (this._$Ep = t);
|
|
254
|
+
}
|
|
255
|
+
createRenderRoot() {
|
|
256
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
257
|
+
return S(t, this.constructor.elementStyles), t;
|
|
258
|
+
}
|
|
259
|
+
connectedCallback() {
|
|
260
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
|
|
261
|
+
}
|
|
262
|
+
enableUpdating(t) {}
|
|
263
|
+
disconnectedCallback() {
|
|
264
|
+
this._$EO?.forEach(t => t.hostDisconnected?.());
|
|
265
|
+
}
|
|
266
|
+
attributeChangedCallback(t, s, i) {
|
|
267
|
+
this._$AK(t, i);
|
|
268
|
+
}
|
|
269
|
+
_$ET(t, s) {
|
|
270
|
+
const i = this.constructor.elementProperties.get(t),
|
|
271
|
+
e = this.constructor._$Eu(t, i);
|
|
272
|
+
if (void 0 !== e && true === i.reflect) {
|
|
273
|
+
const h = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
|
|
274
|
+
this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
_$AK(t, s) {
|
|
278
|
+
const i = this.constructor,
|
|
279
|
+
e = i._$Eh.get(t);
|
|
280
|
+
if (void 0 !== e && this._$Em !== e) {
|
|
281
|
+
const t = i.getPropertyOptions(e),
|
|
282
|
+
h = "function" == typeof t.converter ? {
|
|
283
|
+
fromAttribute: t.converter
|
|
284
|
+
} : void 0 !== t.converter?.fromAttribute ? t.converter : u;
|
|
285
|
+
this._$Em = e;
|
|
286
|
+
const r = h.fromAttribute(s, t.type);
|
|
287
|
+
this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
requestUpdate(t, s, i) {
|
|
291
|
+
if (void 0 !== t) {
|
|
292
|
+
const e = this.constructor,
|
|
293
|
+
h = this[t];
|
|
294
|
+
if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
|
|
295
|
+
this.C(t, s, i);
|
|
296
|
+
}
|
|
297
|
+
false === this.isUpdatePending && (this._$ES = this._$EP());
|
|
298
|
+
}
|
|
299
|
+
C(t, s, {
|
|
300
|
+
useDefault: i,
|
|
301
|
+
reflect: e,
|
|
302
|
+
wrapped: h
|
|
303
|
+
}, r) {
|
|
304
|
+
i && !(this._$Ej ??= new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), true !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), true === e && this._$Em !== t && (this._$Eq ??= new Set()).add(t));
|
|
305
|
+
}
|
|
306
|
+
async _$EP() {
|
|
307
|
+
this.isUpdatePending = true;
|
|
308
|
+
try {
|
|
309
|
+
await this._$ES;
|
|
310
|
+
} catch (t) {
|
|
311
|
+
Promise.reject(t);
|
|
312
|
+
}
|
|
313
|
+
const t = this.scheduleUpdate();
|
|
314
|
+
return null != t && (await t), !this.isUpdatePending;
|
|
315
|
+
}
|
|
316
|
+
scheduleUpdate() {
|
|
317
|
+
return this.performUpdate();
|
|
318
|
+
}
|
|
319
|
+
performUpdate() {
|
|
320
|
+
if (!this.isUpdatePending) return;
|
|
321
|
+
if (!this.hasUpdated) {
|
|
322
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
323
|
+
for (const [t, s] of this._$Ep) this[t] = s;
|
|
324
|
+
this._$Ep = void 0;
|
|
325
|
+
}
|
|
326
|
+
const t = this.constructor.elementProperties;
|
|
327
|
+
if (t.size > 0) for (const [s, i] of t) {
|
|
328
|
+
const {
|
|
329
|
+
wrapped: t
|
|
330
|
+
} = i,
|
|
331
|
+
e = this[s];
|
|
332
|
+
true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
let t = false;
|
|
336
|
+
const s = this._$AL;
|
|
337
|
+
try {
|
|
338
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
|
|
339
|
+
} catch (s) {
|
|
340
|
+
throw t = false, this._$EM(), s;
|
|
341
|
+
}
|
|
342
|
+
t && this._$AE(s);
|
|
343
|
+
}
|
|
344
|
+
willUpdate(t) {}
|
|
345
|
+
_$AE(t) {
|
|
346
|
+
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
|
|
347
|
+
}
|
|
348
|
+
_$EM() {
|
|
349
|
+
this._$AL = new Map(), this.isUpdatePending = false;
|
|
350
|
+
}
|
|
351
|
+
get updateComplete() {
|
|
352
|
+
return this.getUpdateComplete();
|
|
353
|
+
}
|
|
354
|
+
getUpdateComplete() {
|
|
355
|
+
return this._$ES;
|
|
356
|
+
}
|
|
357
|
+
shouldUpdate(t) {
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
update(t) {
|
|
361
|
+
this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
|
|
362
|
+
}
|
|
363
|
+
updated(t) {}
|
|
364
|
+
firstUpdated(t) {}
|
|
365
|
+
}
|
|
366
|
+
y.elementStyles = [], y.shadowRootOptions = {
|
|
367
|
+
mode: "open"
|
|
368
|
+
}, y[d("elementProperties")] = new Map(), y[d("finalized")] = new Map(), p?.({
|
|
369
|
+
ReactiveElement: y
|
|
370
|
+
}), (a.reactiveElementVersions ??= []).push("2.1.1");
|
|
72
371
|
|
|
73
372
|
/**
|
|
74
373
|
* @license
|
|
75
374
|
* Copyright 2017 Google LLC
|
|
76
375
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
77
|
-
*/
|
|
376
|
+
*/
|
|
377
|
+
const o = {
|
|
378
|
+
attribute: true,
|
|
379
|
+
type: String,
|
|
380
|
+
converter: u,
|
|
381
|
+
reflect: false,
|
|
382
|
+
hasChanged: f
|
|
383
|
+
},
|
|
384
|
+
r = (t = o, e, r) => {
|
|
385
|
+
const {
|
|
386
|
+
kind: n,
|
|
387
|
+
metadata: i
|
|
388
|
+
} = r;
|
|
389
|
+
let s = globalThis.litPropertyMetadata.get(i);
|
|
390
|
+
if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map()), "setter" === n && ((t = Object.create(t)).wrapped = true), s.set(r.name, t), "accessor" === n) {
|
|
391
|
+
const {
|
|
392
|
+
name: o
|
|
393
|
+
} = r;
|
|
394
|
+
return {
|
|
395
|
+
set(r) {
|
|
396
|
+
const n = e.get.call(this);
|
|
397
|
+
e.set.call(this, r), this.requestUpdate(o, n, t);
|
|
398
|
+
},
|
|
399
|
+
init(e) {
|
|
400
|
+
return void 0 !== e && this.C(o, void 0, t, e), e;
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
if ("setter" === n) {
|
|
405
|
+
const {
|
|
406
|
+
name: o
|
|
407
|
+
} = r;
|
|
408
|
+
return function (r) {
|
|
409
|
+
const n = this[o];
|
|
410
|
+
e.call(this, r), this.requestUpdate(o, n, t);
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
throw Error("Unsupported decorator location: " + n);
|
|
414
|
+
};
|
|
415
|
+
function n(t) {
|
|
416
|
+
return (e, o) => "object" == typeof o ? r(t, e, o) : ((t, e, o) => {
|
|
417
|
+
const r = e.hasOwnProperty(o);
|
|
418
|
+
return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
|
|
419
|
+
})(t, e, o);
|
|
420
|
+
}
|
|
78
421
|
|
|
79
422
|
/**
|
|
80
423
|
* @license
|
|
81
424
|
* Copyright 2017 Google LLC
|
|
82
425
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
83
426
|
*/
|
|
84
|
-
const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
|
|
427
|
+
const e$1 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
|
|
85
428
|
|
|
86
429
|
/**
|
|
87
430
|
* @license
|
|
88
431
|
* Copyright 2017 Google LLC
|
|
89
432
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
|
-
*/
|
|
433
|
+
*/
|
|
434
|
+
function e(e, r) {
|
|
435
|
+
return (n, s, i) => {
|
|
436
|
+
const o = t => t.renderRoot?.querySelector(e) ?? null;
|
|
437
|
+
return e$1(n, s, {
|
|
438
|
+
get() {
|
|
439
|
+
return o(this);
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
};
|
|
443
|
+
}
|
|
91
444
|
|
|
92
445
|
var _M3eSplitButtonElement_instances, _M3eSplitButtonElement_leadingButton, _M3eSplitButtonElement_trailingButton, _M3eSplitButtonElement_trailingButtonHover, _M3eSplitButtonElement_pressedController, _M3eSplitButtonElement_hoverController, _M3eSplitButtonElement_handleLeadingSlotChange, _M3eSplitButtonElement_handleTrailingSlotChange, _M3eSplitButtonElement_updateButtons, _M3eSplitButtonElement_updateLeadingButtonShape, _M3eSplitButtonElement_updateTrailingButtonShape, _M3eSplitButtonElement_updateButtonShape;
|
|
93
446
|
/**
|
|
@@ -166,65 +519,67 @@ var _M3eSplitButtonElement_instances, _M3eSplitButtonElement_leadingButton, _M3e
|
|
|
166
519
|
* @cssprop --m3e-split-button-extra-large-between-spacing - Spacing between leading and trailing buttons (extra-large).
|
|
167
520
|
*/
|
|
168
521
|
let M3eSplitButtonElement = class M3eSplitButtonElement extends Role(LitElement, "group") {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
target: null,
|
|
192
|
-
callback: (hovering, target) => {
|
|
193
|
-
switch (target) {
|
|
194
|
-
case __classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"):
|
|
195
|
-
if (!__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")?.disabled && !__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")?.disabledInteractive) {
|
|
196
|
-
__classPrivateFieldSet(this, _M3eSplitButtonElement_trailingButtonHover, hovering, "f");
|
|
197
|
-
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateTrailingButtonShape).call(this, hovering);
|
|
198
|
-
}
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
}));
|
|
203
|
-
/**
|
|
204
|
-
* The appearance variant of the button.
|
|
205
|
-
* @default "filled"
|
|
206
|
-
*/
|
|
207
|
-
this.variant = "filled";
|
|
208
|
-
/**
|
|
209
|
-
* The size of the button.
|
|
210
|
-
* @default "small"
|
|
211
|
-
*/
|
|
212
|
-
this.size = "small";
|
|
213
|
-
}
|
|
214
|
-
/** @inheritdoc */
|
|
215
|
-
update(changedProperties) {
|
|
216
|
-
super.update(changedProperties);
|
|
217
|
-
if (changedProperties.has("variant")) {
|
|
218
|
-
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateButtons).call(this);
|
|
522
|
+
constructor() {
|
|
523
|
+
super(...arguments);
|
|
524
|
+
_M3eSplitButtonElement_instances.add(this);
|
|
525
|
+
/** @private */
|
|
526
|
+
_M3eSplitButtonElement_leadingButton.set(this, void 0);
|
|
527
|
+
/** @private */
|
|
528
|
+
_M3eSplitButtonElement_trailingButton.set(this, void 0);
|
|
529
|
+
/** @private */
|
|
530
|
+
_M3eSplitButtonElement_trailingButtonHover.set(this, false);
|
|
531
|
+
/** @private */
|
|
532
|
+
_M3eSplitButtonElement_pressedController.set(this, new PressedController(this, {
|
|
533
|
+
target: null,
|
|
534
|
+
capture: true,
|
|
535
|
+
isPressedKey: key => key === " ",
|
|
536
|
+
callback: (pressed, _, target) => {
|
|
537
|
+
switch (target) {
|
|
538
|
+
case __classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f"):
|
|
539
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateLeadingButtonShape).call(this, pressed);
|
|
540
|
+
break;
|
|
541
|
+
case __classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"):
|
|
542
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateTrailingButtonShape).call(this, pressed || __classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButtonHover, "f"));
|
|
543
|
+
break;
|
|
219
544
|
}
|
|
545
|
+
}
|
|
546
|
+
}));
|
|
547
|
+
/** @private */
|
|
548
|
+
_M3eSplitButtonElement_hoverController.set(this, new HoverController(this, {
|
|
549
|
+
target: null,
|
|
550
|
+
callback: (hovering, target) => {
|
|
551
|
+
switch (target) {
|
|
552
|
+
case __classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"):
|
|
553
|
+
if (!__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")?.disabled && !__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")?.disabledInteractive) {
|
|
554
|
+
__classPrivateFieldSet(this, _M3eSplitButtonElement_trailingButtonHover, hovering, "f");
|
|
555
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateTrailingButtonShape).call(this, hovering);
|
|
556
|
+
}
|
|
557
|
+
break;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}));
|
|
561
|
+
/**
|
|
562
|
+
* The appearance variant of the button.
|
|
563
|
+
* @default "filled"
|
|
564
|
+
*/
|
|
565
|
+
this.variant = "filled";
|
|
566
|
+
/**
|
|
567
|
+
* The size of the button.
|
|
568
|
+
* @default "small"
|
|
569
|
+
*/
|
|
570
|
+
this.size = "small";
|
|
571
|
+
}
|
|
572
|
+
/** @inheritdoc */
|
|
573
|
+
update(changedProperties) {
|
|
574
|
+
super.update(changedProperties);
|
|
575
|
+
if (changedProperties.has("variant")) {
|
|
576
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateButtons).call(this);
|
|
220
577
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
</m3e-button-group>`;
|
|
227
|
-
}
|
|
578
|
+
}
|
|
579
|
+
/** @inheritdoc */
|
|
580
|
+
render() {
|
|
581
|
+
return html`<m3e-button-group class="base" disable-role variant="connected" size="${this.size}"><slot name="leading-button" @slotchange="${__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_handleLeadingSlotChange)}"></slot><slot name="trailing-button" @slotchange="${__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_handleTrailingSlotChange)}"></slot></m3e-button-group>`;
|
|
582
|
+
}
|
|
228
583
|
};
|
|
229
584
|
_M3eSplitButtonElement_leadingButton = new WeakMap();
|
|
230
585
|
_M3eSplitButtonElement_trailingButton = new WeakMap();
|
|
@@ -233,329 +588,74 @@ _M3eSplitButtonElement_pressedController = new WeakMap();
|
|
|
233
588
|
_M3eSplitButtonElement_hoverController = new WeakMap();
|
|
234
589
|
_M3eSplitButtonElement_instances = new WeakSet();
|
|
235
590
|
_M3eSplitButtonElement_handleLeadingSlotChange = function _M3eSplitButtonElement_handleLeadingSlotChange(e) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
591
|
+
if (__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f")) {
|
|
592
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_pressedController, "f").unobserve(__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f"));
|
|
593
|
+
}
|
|
594
|
+
__classPrivateFieldSet(this, _M3eSplitButtonElement_leadingButton, e.target.assignedElements({
|
|
595
|
+
flatten: true
|
|
596
|
+
}).find(x => x instanceof M3eButtonElement), "f");
|
|
597
|
+
if (__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f")) {
|
|
598
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_pressedController, "f").observe(__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f"));
|
|
599
|
+
}
|
|
600
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateButtons).call(this);
|
|
246
601
|
};
|
|
247
602
|
_M3eSplitButtonElement_handleTrailingSlotChange = function _M3eSplitButtonElement_handleTrailingSlotChange(e) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
603
|
+
if (__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")) {
|
|
604
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_pressedController, "f").unobserve(__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"));
|
|
605
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_hoverController, "f").unobserve(__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"));
|
|
606
|
+
}
|
|
607
|
+
__classPrivateFieldSet(this, _M3eSplitButtonElement_trailingButton, e.target.assignedElements({
|
|
608
|
+
flatten: true
|
|
609
|
+
}).find(x => x instanceof M3eIconButtonElement), "f");
|
|
610
|
+
if (__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")) {
|
|
611
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_pressedController, "f").observe(__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"));
|
|
612
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_hoverController, "f").observe(__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"));
|
|
613
|
+
}
|
|
614
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateButtons).call(this);
|
|
260
615
|
};
|
|
261
616
|
_M3eSplitButtonElement_updateButtons = function _M3eSplitButtonElement_updateButtons() {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
617
|
+
if (__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f")) {
|
|
618
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f").variant = this.variant;
|
|
619
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f").size = this.size;
|
|
620
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f").shape = "rounded";
|
|
621
|
+
}
|
|
622
|
+
if (__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")) {
|
|
623
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f").width = "default";
|
|
624
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f").shape = "rounded";
|
|
625
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f").setAttribute("variant", this.variant);
|
|
626
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f").size = this.size;
|
|
627
|
+
}
|
|
273
628
|
};
|
|
274
629
|
_M3eSplitButtonElement_updateLeadingButtonShape = function _M3eSplitButtonElement_updateLeadingButtonShape(update) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
630
|
+
if (update && __classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f")) {
|
|
631
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateButtonShape).call(this, __classPrivateFieldGet(this, _M3eSplitButtonElement_leadingButton, "f"), "--_leading-button-shape");
|
|
632
|
+
} else {
|
|
633
|
+
this._base?.style.removeProperty("--_leading-button-shape");
|
|
634
|
+
}
|
|
281
635
|
};
|
|
282
636
|
_M3eSplitButtonElement_updateTrailingButtonShape = function _M3eSplitButtonElement_updateTrailingButtonShape(update) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
637
|
+
if (update && __classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f")) {
|
|
638
|
+
__classPrivateFieldGet(this, _M3eSplitButtonElement_instances, "m", _M3eSplitButtonElement_updateButtonShape).call(this, __classPrivateFieldGet(this, _M3eSplitButtonElement_trailingButton, "f"), "--_trailing-button-shape");
|
|
639
|
+
} else {
|
|
640
|
+
this._base?.style.removeProperty("--_trailing-button-shape");
|
|
641
|
+
}
|
|
289
642
|
};
|
|
290
643
|
_M3eSplitButtonElement_updateButtonShape = function _M3eSplitButtonElement_updateButtonShape(button, property) {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
644
|
+
const adjustedShape = button.clientHeight / 2;
|
|
645
|
+
if (adjustedShape) {
|
|
646
|
+
this._base?.style.setProperty(property, `${adjustedShape}px`);
|
|
647
|
+
}
|
|
295
648
|
};
|
|
296
649
|
/** The styles of the element. */
|
|
297
|
-
M3eSplitButtonElement.styles = css
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
::slotted([slot="trailing-button"]:not([aria-expanded="true"])) {
|
|
309
|
-
--m3e-icon-button-extra-small-default-leading-space: var(
|
|
310
|
-
--m3e-split-button-extra-small-trailing-button-unselected-leading-space,
|
|
311
|
-
0.75rem
|
|
312
|
-
);
|
|
313
|
-
--m3e-icon-button-extra-small-default-trailing-space: var(
|
|
314
|
-
--m3e-split-button-extra-small-trailing-button-unselected-trailing-space,
|
|
315
|
-
0.875rem
|
|
316
|
-
);
|
|
317
|
-
--m3e-icon-button-small-default-leading-space: var(
|
|
318
|
-
--m3e-split-button-small-trailing-button-unselected-leading-space,
|
|
319
|
-
0.75rem
|
|
320
|
-
);
|
|
321
|
-
--m3e-icon-button-small-default-trailing-space: var(
|
|
322
|
-
--m3e-split-button-small-trailing-button-unselected-trailing-space,
|
|
323
|
-
0.875rem
|
|
324
|
-
);
|
|
325
|
-
--m3e-icon-button-medium-default-leading-space: var(
|
|
326
|
-
--m3e-split-button-medium-trailing-button-unselected-leading-space,
|
|
327
|
-
0.8125rem
|
|
328
|
-
);
|
|
329
|
-
--m3e-icon-button-medium-default-trailing-space: var(
|
|
330
|
-
--m3e-split-button-medium-trailing-button-unselected-trailing-space,
|
|
331
|
-
1.0625rem
|
|
332
|
-
);
|
|
333
|
-
--m3e-icon-button-large-default-leading-space: var(
|
|
334
|
-
--m3e-split-button-large-trailing-button-unselected-leading-space,
|
|
335
|
-
1.625rem
|
|
336
|
-
);
|
|
337
|
-
--m3e-icon-button-large-default-trailing-space: var(
|
|
338
|
-
--m3e-split-button-large-trailing-button-unselected-trailing-space,
|
|
339
|
-
2rem
|
|
340
|
-
);
|
|
341
|
-
--m3e-icon-button-extra-large-default-leading-space: var(
|
|
342
|
-
--m3e-split-button-extra-large-trailing-button-unselected-leading-space,
|
|
343
|
-
2.3125rem
|
|
344
|
-
);
|
|
345
|
-
--m3e-icon-button-extra-large-default-trailing-space: var(
|
|
346
|
-
--m3e-split-button-extra-large-trailing-button-unselected-trailing-space,
|
|
347
|
-
3.0625rem
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
::slotted([slot="trailing-button"][aria-expanded="true"]) {
|
|
352
|
-
--m3e-icon-button-extra-small-default-leading-space: var(
|
|
353
|
-
--m3e-split-button-extra-small-trailing-button-selected-leading-space,
|
|
354
|
-
0.8125rem
|
|
355
|
-
);
|
|
356
|
-
--m3e-icon-button-extra-small-default-trailing-space: var(
|
|
357
|
-
--m3e-split-button-extra-small-trailing-button-selected-trailing-space,
|
|
358
|
-
0.8125rem
|
|
359
|
-
);
|
|
360
|
-
--m3e-icon-button-small-default-leading-space: var(
|
|
361
|
-
--m3e-split-button-small-trailing-button-selected-leading-space,
|
|
362
|
-
0.8125rem
|
|
363
|
-
);
|
|
364
|
-
--m3e-icon-button-small-default-trailing-space: var(
|
|
365
|
-
--m3e-split-button-small-trailing-button-selected-trailing-space,
|
|
366
|
-
0.8125rem
|
|
367
|
-
);
|
|
368
|
-
--m3e-icon-button-medium-default-leading-space: var(
|
|
369
|
-
--m3e-split-button-medium-trailing-button-selected-leading-space,
|
|
370
|
-
0.9375rem
|
|
371
|
-
);
|
|
372
|
-
--m3e-icon-button-medium-default-trailing-space: var(
|
|
373
|
-
--m3e-split-button-medium-trailing-button-selected-trailing-space,
|
|
374
|
-
0.9375rem
|
|
375
|
-
);
|
|
376
|
-
--m3e-icon-button-large-default-leading-space: var(
|
|
377
|
-
--m3e-split-button-large-trailing-button-selected-leading-space,
|
|
378
|
-
1.8125rem
|
|
379
|
-
);
|
|
380
|
-
--m3e-icon-button-large-default-trailing-space: var(
|
|
381
|
-
--m3e-split-button-large-trailing-button-selected-trailing-space,
|
|
382
|
-
1.8125rem
|
|
383
|
-
);
|
|
384
|
-
--m3e-icon-button-extra-large-default-leading-space: var(
|
|
385
|
-
--m3e-split-button-extra-large-trailing-button-selected-leading-space,
|
|
386
|
-
2.6875rem
|
|
387
|
-
);
|
|
388
|
-
--m3e-icon-button-extra-large-default-trailing-space: var(
|
|
389
|
-
--m3e-split-button-extra-large-trailing-button-selected-trailing-space,
|
|
390
|
-
2.6875rem
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
::slotted([slot="leading-button"]:not(:hover)),
|
|
395
|
-
::slotted([slot="leading-button"]:disabled),
|
|
396
|
-
::slotted([slot="leading-button"][disabled-interactive]) {
|
|
397
|
-
--m3e-connected-button-group-extra-small-inner-shape: var(
|
|
398
|
-
--m3e-split-button-extra-small-inner-corner-size,
|
|
399
|
-
${DesignToken.shape.corner.extraSmall}
|
|
400
|
-
);
|
|
401
|
-
--m3e-connected-button-group-small-inner-shape: var(
|
|
402
|
-
--m3e-split-button-small-inner-corner-size,
|
|
403
|
-
${DesignToken.shape.corner.extraSmall}
|
|
404
|
-
);
|
|
405
|
-
--m3e-connected-button-group-medium-inner-shape: var(
|
|
406
|
-
--m3e-split-button-medium-inner-corner-size,
|
|
407
|
-
${DesignToken.shape.corner.extraSmall}
|
|
408
|
-
);
|
|
409
|
-
--m3e-connected-button-group-large-inner-shape: var(
|
|
410
|
-
--m3e-split-button-large-inner-corner-size,
|
|
411
|
-
${DesignToken.shape.corner.small}
|
|
412
|
-
);
|
|
413
|
-
--m3e-connected-button-group-extra-large-inner-shape: var(
|
|
414
|
-
--m3e-split-button-extra-large-inner-corner-size,
|
|
415
|
-
${DesignToken.shape.corner.medium}
|
|
416
|
-
);
|
|
417
|
-
}
|
|
418
|
-
::slotted([slot="leading-button"]:hover:not(:disabled):not([disabled-interactive])),
|
|
419
|
-
::slotted([slot="trailing-button"]:not([aria-expanded="true"]):hover:not(:disabled):not([disabled-interactive])) {
|
|
420
|
-
--m3e-connected-button-group-extra-small-inner-shape: var(
|
|
421
|
-
--m3e-split-button-extra-small-inner-corner-hover-size,
|
|
422
|
-
${DesignToken.shape.corner.small}
|
|
423
|
-
);
|
|
424
|
-
--m3e-connected-button-group-small-inner-shape: var(
|
|
425
|
-
--m3e-split-button-small-inner-corner-hover-size,
|
|
426
|
-
${DesignToken.shape.corner.medium}
|
|
427
|
-
);
|
|
428
|
-
--m3e-connected-button-group-medium-inner-shape: var(
|
|
429
|
-
--m3e-split-button-medium-inner-corner-hover-size,
|
|
430
|
-
${DesignToken.shape.corner.medium}
|
|
431
|
-
);
|
|
432
|
-
--m3e-connected-button-group-large-inner-shape: var(
|
|
433
|
-
--m3e-split-button-large-inner-corner-hover-size,
|
|
434
|
-
${DesignToken.shape.corner.largeIncreased}
|
|
435
|
-
);
|
|
436
|
-
--m3e-connected-button-group-extra-large-inner-shape: var(
|
|
437
|
-
--m3e-split-button-extra-large-inner-corner-hover-size,
|
|
438
|
-
${DesignToken.shape.corner.largeIncreased}
|
|
439
|
-
);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
::slotted([slot="leading-button"]),
|
|
443
|
-
::slotted([slot="trailing-button"]) {
|
|
444
|
-
--m3e-connected-button-group-extra-small-inner-pressed-shape: var(
|
|
445
|
-
--m3e-split-button-extra-small-inner-corner-pressed-size,
|
|
446
|
-
${DesignToken.shape.corner.small}
|
|
447
|
-
);
|
|
448
|
-
--m3e-connected-button-group-small-inner-pressed-shape: var(
|
|
449
|
-
--m3e-split-button-small-inner-corner-pressed-size,
|
|
450
|
-
${DesignToken.shape.corner.medium}
|
|
451
|
-
);
|
|
452
|
-
--m3e-connected-button-group-medium-inner-pressed-shape: var(
|
|
453
|
-
--m3e-split-button-medium-inner-corner-pressed-size,
|
|
454
|
-
${DesignToken.shape.corner.medium}
|
|
455
|
-
);
|
|
456
|
-
--m3e-connected-button-group-large-inner-pressed-shape: var(
|
|
457
|
-
--m3e-split-button-large-inner-corner-pressed-size,
|
|
458
|
-
${DesignToken.shape.corner.largeIncreased}
|
|
459
|
-
);
|
|
460
|
-
--m3e-connected-button-group-extra-large-inner-pressed-shape: var(
|
|
461
|
-
--m3e-split-button-extra-large-inner-corner-pressed-size,
|
|
462
|
-
${DesignToken.shape.corner.largeIncreased}
|
|
463
|
-
);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
::slotted([slot="trailing-button"]:not([aria-expanded="true"]):not(:hover)),
|
|
467
|
-
::slotted([slot="trailing-button"]:disabled),
|
|
468
|
-
::slotted([slot="trailing-button"][disabled-interactive]) {
|
|
469
|
-
--m3e-connected-button-group-extra-small-inner-shape: var(
|
|
470
|
-
--m3e-split-button-extra-small-inner-corner-size,
|
|
471
|
-
${DesignToken.shape.corner.extraSmall}
|
|
472
|
-
);
|
|
473
|
-
--m3e-connected-button-group-small-inner-shape: var(
|
|
474
|
-
--m3e-split-button-small-inner-corner-size,
|
|
475
|
-
${DesignToken.shape.corner.extraSmall}
|
|
476
|
-
);
|
|
477
|
-
--m3e-connected-button-group-medium-inner-shape: var(
|
|
478
|
-
--m3e-split-button-medium-inner-corner-size,
|
|
479
|
-
${DesignToken.shape.corner.extraSmall}
|
|
480
|
-
);
|
|
481
|
-
--m3e-connected-button-group-large-inner-shape: var(
|
|
482
|
-
--m3e-split-button-large-inner-corner-size,
|
|
483
|
-
${DesignToken.shape.corner.small}
|
|
484
|
-
);
|
|
485
|
-
--m3e-connected-button-group-extra-large-inner-shape: var(
|
|
486
|
-
--m3e-split-button-extra-large-inner-corner-size,
|
|
487
|
-
${DesignToken.shape.corner.medium}
|
|
488
|
-
);
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
::slotted([slot="trailing-button"][aria-expanded="true"]) {
|
|
492
|
-
--_icon-button-icon-transform: rotate(180deg);
|
|
493
|
-
--_button-rounded-start-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});
|
|
494
|
-
--_button-rounded-end-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});
|
|
495
|
-
}
|
|
496
|
-
::slotted([slot="trailing-button"]) {
|
|
497
|
-
--_button-end-shape-pressed-morph: var(--_trailing-button-shape, ${DesignToken.shape.corner.full});
|
|
498
|
-
}
|
|
499
|
-
.base {
|
|
500
|
-
--m3e-icon-button-extra-small-icon-size: calc(
|
|
501
|
-
var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)}
|
|
502
|
-
);
|
|
503
|
-
--m3e-button-extra-small-icon-size: calc(
|
|
504
|
-
var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)}
|
|
505
|
-
);
|
|
506
|
-
--m3e-icon-button-small-icon-size: calc(
|
|
507
|
-
var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)}
|
|
508
|
-
);
|
|
509
|
-
--m3e-button-small-icon-size: calc(
|
|
510
|
-
var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)}
|
|
511
|
-
);
|
|
512
|
-
--m3e-icon-button-medium-icon-size: calc(
|
|
513
|
-
var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)}
|
|
514
|
-
);
|
|
515
|
-
--m3e-button-medium-icon-size: calc(
|
|
516
|
-
var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)}
|
|
517
|
-
);
|
|
518
|
-
--m3e-icon-button-large-icon-size: calc(
|
|
519
|
-
var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)}
|
|
520
|
-
);
|
|
521
|
-
--m3e-button-large-icon-size: calc(
|
|
522
|
-
var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)}
|
|
523
|
-
);
|
|
524
|
-
--m3e-icon-button-extra-large-icon-size: calc(
|
|
525
|
-
var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)}
|
|
526
|
-
);
|
|
527
|
-
--m3e-button-extra-large-icon-size: calc(
|
|
528
|
-
var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)}
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
:host([size="extra-small"]) .base {
|
|
532
|
-
--m3e-connected-button-group-spacing: var(--m3e-split-button-extra-small-between-spacing, 0.125rem);
|
|
533
|
-
}
|
|
534
|
-
:host([size="small"]) .base {
|
|
535
|
-
--m3e-connected-button-group-spacing: var(--m3e-split-button-small-between-spacing, 0.125rem);
|
|
536
|
-
}
|
|
537
|
-
:host([size="medium"]).base {
|
|
538
|
-
--m3e-connected-button-group-spacing: var(--m3e-split-button-medium-between-spacing, 0.125rem);
|
|
539
|
-
}
|
|
540
|
-
:host([size="large"]) .base {
|
|
541
|
-
--m3e-connected-button-group-spacing: var(--m3e-split-button-large-between-spacing, 0.125rem);
|
|
542
|
-
}
|
|
543
|
-
:host([size="extra-large"]) .base {
|
|
544
|
-
--m3e-connected-button-group-spacing: var(--m3e-split-button-extra-large-between-spacing, 0.125rem);
|
|
545
|
-
}
|
|
546
|
-
`;
|
|
547
|
-
__decorate([
|
|
548
|
-
e(".base")
|
|
549
|
-
], M3eSplitButtonElement.prototype, "_base", void 0);
|
|
550
|
-
__decorate([
|
|
551
|
-
n({ reflect: true })
|
|
552
|
-
], M3eSplitButtonElement.prototype, "variant", void 0);
|
|
553
|
-
__decorate([
|
|
554
|
-
n({ reflect: true })
|
|
555
|
-
], M3eSplitButtonElement.prototype, "size", void 0);
|
|
556
|
-
M3eSplitButtonElement = __decorate([
|
|
557
|
-
t$1("m3e-split-button")
|
|
558
|
-
], M3eSplitButtonElement);
|
|
650
|
+
M3eSplitButtonElement.styles = css`:host { display: inline-flex; vertical-align: middle; } ::slotted([slot="leading-button"]) { flex: 1 1 auto; min-width: 0; --_button-start-shape-pressed-morph: var(--_leading-button-shape, ${DesignToken.shape.corner.full}); } ::slotted([slot="trailing-button"]:not([aria-expanded="true"])) { --m3e-icon-button-extra-small-default-leading-space: var( --m3e-split-button-extra-small-trailing-button-unselected-leading-space, 0.75rem ); --m3e-icon-button-extra-small-default-trailing-space: var( --m3e-split-button-extra-small-trailing-button-unselected-trailing-space, 0.875rem ); --m3e-icon-button-small-default-leading-space: var( --m3e-split-button-small-trailing-button-unselected-leading-space, 0.75rem ); --m3e-icon-button-small-default-trailing-space: var( --m3e-split-button-small-trailing-button-unselected-trailing-space, 0.875rem ); --m3e-icon-button-medium-default-leading-space: var( --m3e-split-button-medium-trailing-button-unselected-leading-space, 0.8125rem ); --m3e-icon-button-medium-default-trailing-space: var( --m3e-split-button-medium-trailing-button-unselected-trailing-space, 1.0625rem ); --m3e-icon-button-large-default-leading-space: var( --m3e-split-button-large-trailing-button-unselected-leading-space, 1.625rem ); --m3e-icon-button-large-default-trailing-space: var( --m3e-split-button-large-trailing-button-unselected-trailing-space, 2rem ); --m3e-icon-button-extra-large-default-leading-space: var( --m3e-split-button-extra-large-trailing-button-unselected-leading-space, 2.3125rem ); --m3e-icon-button-extra-large-default-trailing-space: var( --m3e-split-button-extra-large-trailing-button-unselected-trailing-space, 3.0625rem ); } ::slotted([slot="trailing-button"][aria-expanded="true"]) { --m3e-icon-button-extra-small-default-leading-space: var( --m3e-split-button-extra-small-trailing-button-selected-leading-space, 0.8125rem ); --m3e-icon-button-extra-small-default-trailing-space: var( --m3e-split-button-extra-small-trailing-button-selected-trailing-space, 0.8125rem ); --m3e-icon-button-small-default-leading-space: var( --m3e-split-button-small-trailing-button-selected-leading-space, 0.8125rem ); --m3e-icon-button-small-default-trailing-space: var( --m3e-split-button-small-trailing-button-selected-trailing-space, 0.8125rem ); --m3e-icon-button-medium-default-leading-space: var( --m3e-split-button-medium-trailing-button-selected-leading-space, 0.9375rem ); --m3e-icon-button-medium-default-trailing-space: var( --m3e-split-button-medium-trailing-button-selected-trailing-space, 0.9375rem ); --m3e-icon-button-large-default-leading-space: var( --m3e-split-button-large-trailing-button-selected-leading-space, 1.8125rem ); --m3e-icon-button-large-default-trailing-space: var( --m3e-split-button-large-trailing-button-selected-trailing-space, 1.8125rem ); --m3e-icon-button-extra-large-default-leading-space: var( --m3e-split-button-extra-large-trailing-button-selected-leading-space, 2.6875rem ); --m3e-icon-button-extra-large-default-trailing-space: var( --m3e-split-button-extra-large-trailing-button-selected-trailing-space, 2.6875rem ); } ::slotted([slot="leading-button"]:not(:hover)), ::slotted([slot="leading-button"]:disabled), ::slotted([slot="leading-button"][disabled-interactive]) { --m3e-connected-button-group-extra-small-inner-shape: var( --m3e-split-button-extra-small-inner-corner-size, ${DesignToken.shape.corner.extraSmall} ); --m3e-connected-button-group-small-inner-shape: var( --m3e-split-button-small-inner-corner-size, ${DesignToken.shape.corner.extraSmall} ); --m3e-connected-button-group-medium-inner-shape: var( --m3e-split-button-medium-inner-corner-size, ${DesignToken.shape.corner.extraSmall} ); --m3e-connected-button-group-large-inner-shape: var( --m3e-split-button-large-inner-corner-size, ${DesignToken.shape.corner.small} ); --m3e-connected-button-group-extra-large-inner-shape: var( --m3e-split-button-extra-large-inner-corner-size, ${DesignToken.shape.corner.medium} ); } ::slotted([slot="leading-button"]:hover:not(:disabled):not([disabled-interactive])), ::slotted([slot="trailing-button"]:not([aria-expanded="true"]):hover:not(:disabled):not([disabled-interactive])) { --m3e-connected-button-group-extra-small-inner-shape: var( --m3e-split-button-extra-small-inner-corner-hover-size, ${DesignToken.shape.corner.small} ); --m3e-connected-button-group-small-inner-shape: var( --m3e-split-button-small-inner-corner-hover-size, ${DesignToken.shape.corner.medium} ); --m3e-connected-button-group-medium-inner-shape: var( --m3e-split-button-medium-inner-corner-hover-size, ${DesignToken.shape.corner.medium} ); --m3e-connected-button-group-large-inner-shape: var( --m3e-split-button-large-inner-corner-hover-size, ${DesignToken.shape.corner.largeIncreased} ); --m3e-connected-button-group-extra-large-inner-shape: var( --m3e-split-button-extra-large-inner-corner-hover-size, ${DesignToken.shape.corner.largeIncreased} ); } ::slotted([slot="leading-button"]), ::slotted([slot="trailing-button"]) { --m3e-connected-button-group-extra-small-inner-pressed-shape: var( --m3e-split-button-extra-small-inner-corner-pressed-size, ${DesignToken.shape.corner.small} ); --m3e-connected-button-group-small-inner-pressed-shape: var( --m3e-split-button-small-inner-corner-pressed-size, ${DesignToken.shape.corner.medium} ); --m3e-connected-button-group-medium-inner-pressed-shape: var( --m3e-split-button-medium-inner-corner-pressed-size, ${DesignToken.shape.corner.medium} ); --m3e-connected-button-group-large-inner-pressed-shape: var( --m3e-split-button-large-inner-corner-pressed-size, ${DesignToken.shape.corner.largeIncreased} ); --m3e-connected-button-group-extra-large-inner-pressed-shape: var( --m3e-split-button-extra-large-inner-corner-pressed-size, ${DesignToken.shape.corner.largeIncreased} ); } ::slotted([slot="trailing-button"]:not([aria-expanded="true"]):not(:hover)), ::slotted([slot="trailing-button"]:disabled), ::slotted([slot="trailing-button"][disabled-interactive]) { --m3e-connected-button-group-extra-small-inner-shape: var( --m3e-split-button-extra-small-inner-corner-size, ${DesignToken.shape.corner.extraSmall} ); --m3e-connected-button-group-small-inner-shape: var( --m3e-split-button-small-inner-corner-size, ${DesignToken.shape.corner.extraSmall} ); --m3e-connected-button-group-medium-inner-shape: var( --m3e-split-button-medium-inner-corner-size, ${DesignToken.shape.corner.extraSmall} ); --m3e-connected-button-group-large-inner-shape: var( --m3e-split-button-large-inner-corner-size, ${DesignToken.shape.corner.small} ); --m3e-connected-button-group-extra-large-inner-shape: var( --m3e-split-button-extra-large-inner-corner-size, ${DesignToken.shape.corner.medium} ); } ::slotted([slot="trailing-button"][aria-expanded="true"]) { --_icon-button-icon-transform: rotate(180deg); --_button-rounded-start-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full}); --_button-rounded-end-shape: var(--_trailing-button-shape, ${DesignToken.shape.corner.full}); } ::slotted([slot="trailing-button"]) { --_button-end-shape-pressed-morph: var(--_trailing-button-shape, ${DesignToken.shape.corner.full}); } .base { --m3e-icon-button-extra-small-icon-size: calc( var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)} ); --m3e-button-extra-small-icon-size: calc( var(--m3e-spit-button-extra-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(0)} ); --m3e-icon-button-small-icon-size: calc( var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)} ); --m3e-button-small-icon-size: calc( var(--m3e-spit-button-small-trailing-button-icon-size, 1.375rem) + ${DesignToken.density.calc(-1)} ); --m3e-icon-button-medium-icon-size: calc( var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)} ); --m3e-button-medium-icon-size: calc( var(--m3e-spit-button-medium-trailing-button-icon-size, 1.625rem) + ${DesignToken.density.calc(-2)} ); --m3e-icon-button-large-icon-size: calc( var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)} ); --m3e-button-large-icon-size: calc( var(--m3e-spit-button-large-trailing-button-icon-size, 2.375rem) + ${DesignToken.density.calc(-3)} ); --m3e-icon-button-extra-large-icon-size: calc( var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)} ); --m3e-button-extra-large-icon-size: calc( var(--m3e-spit-button-extra-large-trailing-button-icon-size, 3.125rem) + ${DesignToken.density.calc(-3)} ); } :host([size="extra-small"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-small-between-spacing, 0.125rem); } :host([size="small"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-small-between-spacing, 0.125rem); } :host([size="medium"]).base { --m3e-connected-button-group-spacing: var(--m3e-split-button-medium-between-spacing, 0.125rem); } :host([size="large"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-large-between-spacing, 0.125rem); } :host([size="extra-large"]) .base { --m3e-connected-button-group-spacing: var(--m3e-split-button-extra-large-between-spacing, 0.125rem); }`;
|
|
651
|
+
__decorate([e(".base")], M3eSplitButtonElement.prototype, "_base", void 0);
|
|
652
|
+
__decorate([n({
|
|
653
|
+
reflect: true
|
|
654
|
+
})], M3eSplitButtonElement.prototype, "variant", void 0);
|
|
655
|
+
__decorate([n({
|
|
656
|
+
reflect: true
|
|
657
|
+
})], M3eSplitButtonElement.prototype, "size", void 0);
|
|
658
|
+
M3eSplitButtonElement = __decorate([t$1("m3e-split-button")], M3eSplitButtonElement);
|
|
559
659
|
|
|
560
660
|
export { M3eSplitButtonElement };
|
|
561
661
|
//# sourceMappingURL=index.js.map
|