@florid-kit/components 0.7.1 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -35,7 +35,7 @@ const Ft = (o) => new Mt(typeof o == "string" ? o : o + "", void 0, wt), w = (o,
35
35
  const n = document.createElement("style"), i = rt.litNonce;
36
36
  i !== void 0 && n.setAttribute("nonce", i), n.textContent = e.cssText, o.appendChild(n);
37
37
  }
38
- }, Et = mt ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
38
+ }, St = mt ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
39
39
  let e = "";
40
40
  for (const n of t.cssRules) e += n.cssText;
41
41
  return Ft(e);
@@ -45,7 +45,7 @@ const Ft = (o) => new Mt(typeof o == "string" ? o : o + "", void 0, wt), w = (o,
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: Vt, defineProperty: Zt, getOwnPropertyDescriptor: Wt, getOwnPropertyNames: qt, getOwnPropertySymbols: Kt, getPrototypeOf: Gt } = Object, O = globalThis, St = O.trustedTypes, Xt = St ? St.emptyScript : "", dt = O.reactiveElementPolyfillSupport, X = (o, t) => o, st = { toAttribute(o, t) {
48
+ const { is: Vt, defineProperty: Zt, getOwnPropertyDescriptor: qt, getOwnPropertyNames: Wt, getOwnPropertySymbols: Kt, getPrototypeOf: Gt } = Object, O = globalThis, Et = O.trustedTypes, Xt = Et ? Et.emptyScript : "", dt = O.reactiveElementPolyfillSupport, X = (o, t) => o, st = { toAttribute(o, t) {
49
49
  switch (t) {
50
50
  case Boolean:
51
51
  o = o ? Xt : null;
@@ -75,7 +75,7 @@ const { is: Vt, defineProperty: Zt, getOwnPropertyDescriptor: Wt, getOwnProperty
75
75
  return e;
76
76
  } }, xt = (o, t) => !Vt(o, t), Lt = { attribute: !0, type: String, converter: st, reflect: !1, useDefault: !1, hasChanged: xt };
77
77
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), O.litPropertyMetadata ?? (O.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- let R = class extends HTMLElement {
78
+ let V = class extends HTMLElement {
79
79
  static addInitializer(t) {
80
80
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
81
81
  }
@@ -89,7 +89,7 @@ let R = class extends HTMLElement {
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(t, e, n) {
92
- const { get: i, set: s } = Wt(this.prototype, t) ?? { get() {
92
+ const { get: i, set: s } = qt(this.prototype, t) ?? { get() {
93
93
  return this[e];
94
94
  }, set(r) {
95
95
  this[e] = r;
@@ -110,7 +110,7 @@ let R = class extends HTMLElement {
110
110
  static finalize() {
111
111
  if (this.hasOwnProperty(X("finalized"))) return;
112
112
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(X("properties"))) {
113
- const e = this.properties, n = [...qt(e), ...Kt(e)];
113
+ const e = this.properties, n = [...Wt(e), ...Kt(e)];
114
114
  for (const i of n) this.createProperty(i, e[i]);
115
115
  }
116
116
  const t = this[Symbol.metadata];
@@ -129,8 +129,8 @@ let R = class extends HTMLElement {
129
129
  const e = [];
130
130
  if (Array.isArray(t)) {
131
131
  const n = new Set(t.flat(1 / 0).reverse());
132
- for (const i of n) e.unshift(Et(i));
133
- } else t !== void 0 && e.push(Et(t));
132
+ for (const i of n) e.unshift(St(i));
133
+ } else t !== void 0 && e.push(St(t));
134
134
  return e;
135
135
  }
136
136
  static _$Eu(t, e) {
@@ -276,28 +276,28 @@ let R = class extends HTMLElement {
276
276
  firstUpdated(t) {
277
277
  }
278
278
  };
279
- R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[X("elementProperties")] = /* @__PURE__ */ new Map(), R[X("finalized")] = /* @__PURE__ */ new Map(), dt == null || dt({ ReactiveElement: R }), (O.reactiveElementVersions ?? (O.reactiveElementVersions = [])).push("2.1.0");
279
+ V.elementStyles = [], V.shadowRootOptions = { mode: "open" }, V[X("elementProperties")] = /* @__PURE__ */ new Map(), V[X("finalized")] = /* @__PURE__ */ new Map(), dt == null || dt({ ReactiveElement: V }), (O.reactiveElementVersions ?? (O.reactiveElementVersions = [])).push("2.1.0");
280
280
  /**
281
281
  * @license
282
282
  * Copyright 2017 Google LLC
283
283
  * SPDX-License-Identifier: BSD-3-Clause
284
284
  */
285
- const J = globalThis, at = J.trustedTypes, It = at ? at.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Tt = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, jt = "?" + P, Jt = `<${jt}>`, T = document, Y = () => T.createComment(""), Q = (o) => o === null || typeof o != "object" && typeof o != "function", $t = Array.isArray, Yt = (o) => $t(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", pt = `[
286
- \f\r]`, K = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pt = /-->/g, Ot = />/g, D = RegExp(`>|${pt}(?:([^\\s"'>=/]+)(${pt}*=${pt}*(?:[^
287
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, Ut = /^(?:script|style|textarea|title)$/i, Qt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), c = Qt(1), j = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), H = T.createTreeWalker(T, 129);
285
+ const J = globalThis, at = J.trustedTypes, It = at ? at.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Tt = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, jt = "?" + P, Jt = `<${jt}>`, j = document, Y = () => j.createComment(""), Q = (o) => o === null || typeof o != "object" && typeof o != "function", $t = Array.isArray, Yt = (o) => $t(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", pt = `[
286
+ \f\r]`, G = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pt = /-->/g, Ot = />/g, D = RegExp(`>|${pt}(?:([^\\s"'>=/]+)(${pt}*=${pt}*(?:[^
287
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, zt = /"/g, Ut = /^(?:script|style|textarea|title)$/i, Qt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), c = Qt(1), U = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Dt = /* @__PURE__ */ new WeakMap(), M = j.createTreeWalker(j, 129);
288
288
  function Nt(o, t) {
289
289
  if (!$t(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
290
290
  return It !== void 0 ? It.createHTML(t) : t;
291
291
  }
292
292
  const te = (o, t) => {
293
293
  const e = o.length - 1, n = [];
294
- let i, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = K;
294
+ let i, s = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = G;
295
295
  for (let h = 0; h < e; h++) {
296
296
  const l = o[h];
297
297
  let v, b, p = -1, A = 0;
298
- for (; A < l.length && (r.lastIndex = A, b = r.exec(l), b !== null); ) A = r.lastIndex, r === K ? b[1] === "!--" ? r = Pt : b[1] !== void 0 ? r = Ot : b[2] !== void 0 ? (Ut.test(b[2]) && (i = RegExp("</" + b[2], "g")), r = D) : b[3] !== void 0 && (r = D) : r === D ? b[0] === ">" ? (r = i ?? K, p = -1) : b[1] === void 0 ? p = -2 : (p = r.lastIndex - b[2].length, v = b[1], r = b[3] === void 0 ? D : b[3] === '"' ? zt : Bt) : r === zt || r === Bt ? r = D : r === Pt || r === Ot ? r = K : (r = D, i = void 0);
298
+ for (; A < l.length && (r.lastIndex = A, b = r.exec(l), b !== null); ) A = r.lastIndex, r === G ? b[1] === "!--" ? r = Pt : b[1] !== void 0 ? r = Ot : b[2] !== void 0 ? (Ut.test(b[2]) && (i = RegExp("</" + b[2], "g")), r = D) : b[3] !== void 0 && (r = D) : r === D ? b[0] === ">" ? (r = i ?? G, p = -1) : b[1] === void 0 ? p = -2 : (p = r.lastIndex - b[2].length, v = b[1], r = b[3] === void 0 ? D : b[3] === '"' ? zt : Bt) : r === zt || r === Bt ? r = D : r === Pt || r === Ot ? r = G : (r = D, i = void 0);
299
299
  const I = r === D && o[h + 1].startsWith("/>") ? " " : "";
300
- s += r === K ? l + Jt : p >= 0 ? (n.push(v), l.slice(0, p) + Tt + l.slice(p) + P + I) : l + P + (p === -2 ? h : I);
300
+ s += r === G ? l + Jt : p >= 0 ? (n.push(v), l.slice(0, p) + Tt + l.slice(p) + P + I) : l + P + (p === -2 ? h : I);
301
301
  }
302
302
  return [Nt(o, s + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), n];
303
303
  };
@@ -307,11 +307,11 @@ class tt {
307
307
  this.parts = [];
308
308
  let s = 0, r = 0;
309
309
  const h = t.length - 1, l = this.parts, [v, b] = te(t, e);
310
- if (this.el = tt.createElement(v, n), H.currentNode = this.el.content, e === 2 || e === 3) {
310
+ if (this.el = tt.createElement(v, n), M.currentNode = this.el.content, e === 2 || e === 3) {
311
311
  const p = this.el.content.firstChild;
312
312
  p.replaceWith(...p.childNodes);
313
313
  }
314
- for (; (i = H.nextNode()) !== null && l.length < h; ) {
314
+ for (; (i = M.nextNode()) !== null && l.length < h; ) {
315
315
  if (i.nodeType === 1) {
316
316
  if (i.hasAttributes()) for (const p of i.getAttributeNames()) if (p.endsWith(Tt)) {
317
317
  const A = b[r++], I = i.getAttribute(p).split(P), nt = /([.?@])?(.*)/.exec(A);
@@ -321,7 +321,7 @@ class tt {
321
321
  const p = i.textContent.split(P), A = p.length - 1;
322
322
  if (A > 0) {
323
323
  i.textContent = at ? at.emptyScript : "";
324
- for (let I = 0; I < A; I++) i.append(p[I], Y()), H.nextNode(), l.push({ type: 2, index: ++s });
324
+ for (let I = 0; I < A; I++) i.append(p[I], Y()), M.nextNode(), l.push({ type: 2, index: ++s });
325
325
  i.append(p[A], Y());
326
326
  }
327
327
  }
@@ -334,16 +334,16 @@ class tt {
334
334
  }
335
335
  }
336
336
  static createElement(t, e) {
337
- const n = T.createElement("template");
337
+ const n = j.createElement("template");
338
338
  return n.innerHTML = t, n;
339
339
  }
340
340
  }
341
- function V(o, t, e = o, n) {
341
+ function Z(o, t, e = o, n) {
342
342
  var r, h;
343
- if (t === j) return t;
343
+ if (t === U) return t;
344
344
  let i = n !== void 0 ? (r = e._$Co) == null ? void 0 : r[n] : e._$Cl;
345
345
  const s = Q(t) ? void 0 : t._$litDirective$;
346
- return (i == null ? void 0 : i.constructor) !== s && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), s === void 0 ? i = void 0 : (i = new s(o), i._$AT(o, e, n)), n !== void 0 ? (e._$Co ?? (e._$Co = []))[n] = i : e._$Cl = i), i !== void 0 && (t = V(o, i._$AS(o, t.values), i, n)), t;
346
+ return (i == null ? void 0 : i.constructor) !== s && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), s === void 0 ? i = void 0 : (i = new s(o), i._$AT(o, e, n)), n !== void 0 ? (e._$Co ?? (e._$Co = []))[n] = i : e._$Cl = i), i !== void 0 && (t = Z(o, i._$AS(o, t.values), i, n)), t;
347
347
  }
348
348
  class ee {
349
349
  constructor(t, e) {
@@ -356,17 +356,17 @@ class ee {
356
356
  return this._$AM._$AU;
357
357
  }
358
358
  u(t) {
359
- const { el: { content: e }, parts: n } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? T).importNode(e, !0);
360
- H.currentNode = i;
361
- let s = H.nextNode(), r = 0, h = 0, l = n[0];
359
+ const { el: { content: e }, parts: n } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? j).importNode(e, !0);
360
+ M.currentNode = i;
361
+ let s = M.nextNode(), r = 0, h = 0, l = n[0];
362
362
  for (; l !== void 0; ) {
363
363
  if (r === l.index) {
364
364
  let v;
365
365
  l.type === 2 ? v = new it(s, s.nextSibling, this, t) : l.type === 1 ? v = new l.ctor(s, l.name, l.strings, this, t) : l.type === 6 && (v = new re(s, this, t)), this._$AV.push(v), l = n[++h];
366
366
  }
367
- r !== (l == null ? void 0 : l.index) && (s = H.nextNode(), r++);
367
+ r !== (l == null ? void 0 : l.index) && (s = M.nextNode(), r++);
368
368
  }
369
- return H.currentNode = T, i;
369
+ return M.currentNode = j, i;
370
370
  }
371
371
  p(t) {
372
372
  let e = 0;
@@ -393,7 +393,7 @@ class it {
393
393
  return this._$AB;
394
394
  }
395
395
  _$AI(t, e = this) {
396
- t = V(this, t, e), Q(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Yt(t) ? this.k(t) : this._(t);
396
+ t = Z(this, t, e), Q(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Yt(t) ? this.k(t) : this._(t);
397
397
  }
398
398
  O(t) {
399
399
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -402,7 +402,7 @@ class it {
402
402
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
403
403
  }
404
404
  _(t) {
405
- this._$AH !== d && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(T.createTextNode(t)), this._$AH = t;
405
+ this._$AH !== d && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(j.createTextNode(t)), this._$AH = t;
406
406
  }
407
407
  $(t) {
408
408
  var s;
@@ -449,11 +449,11 @@ class lt {
449
449
  _$AI(t, e = this, n, i) {
450
450
  const s = this.strings;
451
451
  let r = !1;
452
- if (s === void 0) t = V(this, t, e, 0), r = !Q(t) || t !== this._$AH && t !== j, r && (this._$AH = t);
452
+ if (s === void 0) t = Z(this, t, e, 0), r = !Q(t) || t !== this._$AH && t !== U, r && (this._$AH = t);
453
453
  else {
454
454
  const h = t;
455
455
  let l, v;
456
- for (t = s[0], l = 0; l < s.length - 1; l++) v = V(this, h[n + l], e, l), v === j && (v = this._$AH[l]), r || (r = !Q(v) || v !== this._$AH[l]), v === d ? t = d : t !== d && (t += (v ?? "") + s[l + 1]), this._$AH[l] = v;
456
+ for (t = s[0], l = 0; l < s.length - 1; l++) v = Z(this, h[n + l], e, l), v === U && (v = this._$AH[l]), r || (r = !Q(v) || v !== this._$AH[l]), v === d ? t = d : t !== d && (t += (v ?? "") + s[l + 1]), this._$AH[l] = v;
457
457
  }
458
458
  r && !i && this.j(t);
459
459
  }
@@ -482,7 +482,7 @@ class ne extends lt {
482
482
  super(t, e, n, i, s), this.type = 5;
483
483
  }
484
484
  _$AI(t, e = this) {
485
- if ((t = V(this, t, e, 0) ?? d) === j) return;
485
+ if ((t = Z(this, t, e, 0) ?? d) === U) return;
486
486
  const n = this._$AH, i = t === d && n !== d || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, s = t !== d && (n === d || i);
487
487
  i && this.element.removeEventListener(this.name, this, n), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
488
488
  }
@@ -499,7 +499,7 @@ class re {
499
499
  return this._$AM._$AU;
500
500
  }
501
501
  _$AI(t) {
502
- V(this, t);
502
+ Z(this, t);
503
503
  }
504
504
  }
505
505
  const ut = J.litHtmlPolyfillSupport;
@@ -518,8 +518,8 @@ const se = (o, t, e) => {
518
518
  * Copyright 2017 Google LLC
519
519
  * SPDX-License-Identifier: BSD-3-Clause
520
520
  */
521
- const M = globalThis;
522
- let f = class extends R {
521
+ const T = globalThis;
522
+ let f = class extends V {
523
523
  constructor() {
524
524
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
525
525
  }
@@ -541,14 +541,14 @@ let f = class extends R {
541
541
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
542
542
  }
543
543
  render() {
544
- return j;
544
+ return U;
545
545
  }
546
546
  };
547
547
  var Ht;
548
- f._$litElement$ = !0, f.finalized = !0, (Ht = M.litElementHydrateSupport) == null || Ht.call(M, { LitElement: f });
549
- const vt = M.litElementPolyfillSupport;
548
+ f._$litElement$ = !0, f.finalized = !0, (Ht = T.litElementHydrateSupport) == null || Ht.call(T, { LitElement: f });
549
+ const vt = T.litElementPolyfillSupport;
550
550
  vt == null || vt({ LitElement: f });
551
- (M.litElementVersions ?? (M.litElementVersions = [])).push("4.2.0");
551
+ (T.litElementVersions ?? (T.litElementVersions = [])).push("4.2.0");
552
552
  /**
553
553
  * @license
554
554
  * Copyright 2017 Google LLC
@@ -596,7 +596,7 @@ function a(o) {
596
596
  * Copyright 2017 Google LLC
597
597
  * SPDX-License-Identifier: BSD-3-Clause
598
598
  */
599
- function U(o) {
599
+ function N(o) {
600
600
  return a({ ...o, state: !0, attribute: !1 });
601
601
  }
602
602
  const ce = w`
@@ -715,10 +715,10 @@ const pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="h
715
715
  `, Ae = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
716
716
  <path d="M14.1218 7.43502C13.9504 7.60543 13.6735 7.60543 13.5021 7.43502L8.55961 2.49408V14.5625C8.55961 14.8041 8.36365 15 8.12192 15C7.88018 15 7.68422 14.8041 7.68422 14.5625V2.49408L2.74177 7.43502C2.57002 7.60082 2.29703 7.59845 2.1282 7.4297C1.95936 7.26094 1.95699 6.98808 2.12287 6.81642L7.81203 1.13C7.89368 1.04685 8.00535 1 8.12192 1C8.23848 1 8.35015 1.04685 8.4318 1.13L14.121 6.81642C14.2921 6.98702 14.2925 7.26395 14.1218 7.43502Z" fill="#3F2B2E"/>
717
717
  </svg>
718
- `, Ee = `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
718
+ `, Se = `<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
719
719
  <path d="M6.33317 8.00033C6.33317 3.95024 7.52708 0.666992 8.99984 0.666992C10.4726 0.666992 11.6665 3.95024 11.6665 8.00033M5.33317 15.3337H12.6665L16.3332 6.20033C14.9582 5.76699 12.2998 5.33366 8.99984 5.33366C5.69984 5.33366 3.49984 5.76699 1.6665 6.20033L5.33317 15.3337Z" stroke="#3F2B2E"/>
720
720
  </svg>
721
- `, Se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
721
+ `, Ee = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
722
722
  <path d="M7.99376 14.4486C7.46684 14.4486 6.93991 14.251 6.54472 13.8558C6.14953 13.4606 5.8202 12.9995 5.68847 12.4067H3.77837C2.98798 12.4067 2.59279 12.4067 2.32933 12.1433C2.13173 12.0116 2 11.7481 2 11.5505C2 11.2212 2.13173 10.826 2.52692 10.1673L2.92212 9.4428C3.31731 8.78415 3.51491 8.05963 3.64664 7.3351L3.84423 5.68847C3.97596 4.63462 4.43702 3.7125 5.22741 3.05385C6.01779 2.39519 7.00578 2 7.99376 2C8.98174 2 10.0356 2.39519 10.7601 3.05385C11.5505 3.7125 12.0116 4.70049 12.1433 5.68847L12.3409 7.26924C12.4067 8.05963 12.6702 8.78415 13.0654 9.37693L13.4606 10.1015C13.8558 10.7601 14.0534 11.0894 13.9875 11.4846C13.9875 11.7481 13.8558 11.9457 13.6582 12.0774C13.3947 12.3409 12.9995 12.3409 12.2092 12.3409H10.2991C10.1673 12.9337 9.83799 13.4606 9.4428 13.7899C9.04761 14.1851 8.52068 14.3827 7.99376 14.3827V14.4486ZM6.28126 12.4067C6.41299 12.8019 6.61058 13.1971 6.93991 13.4606C7.5327 13.9875 8.45482 13.9875 9.11347 13.4606C9.4428 13.1971 9.6404 12.8019 9.77213 12.4067H6.28126ZM7.99376 2.65865C7.13751 2.65865 6.28126 2.98798 5.6226 3.58077C4.96395 4.17356 4.56875 4.96395 4.43702 5.88606L4.23943 7.46684C4.1077 8.32309 3.84423 9.11347 3.44904 9.83799L3.05385 10.5625C2.72452 11.0894 2.59279 11.3529 2.59279 11.5505C2.59279 11.6164 2.59279 11.7481 2.72452 11.814C2.85625 11.8798 3.25144 11.8798 3.77837 11.8798H12.2092C12.7361 11.8798 13.1971 11.8798 13.263 11.814C13.3289 11.814 13.3947 11.6822 13.3947 11.5505C13.3947 11.4188 13.1971 11.0894 12.9337 10.5625L12.5385 9.83799C12.0774 9.11347 11.814 8.32309 11.7481 7.5327L11.5505 5.88606C11.4846 5.02981 11.0236 4.17356 10.3649 3.58077C9.70626 2.98798 8.85001 2.65865 7.99376 2.65865Z" fill="#3F2B2E"/>
723
723
  </svg>
724
724
  `, Le = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -730,7 +730,7 @@ const pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="h
730
730
  `, Pe = `<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
731
731
  <path d="M5.24611 10.4659C5.04705 10.4654 4.85616 10.3867 4.71465 10.2467L0.210718 5.74273C-0.0737595 5.44819 -0.0696911 4.98 0.219862 4.69045C0.509415 4.4009 0.977603 4.39683 1.27214 4.6813L5.18306 8.59071L10.6628 1.74024C10.9219 1.41646 11.3945 1.36403 11.7183 1.62314C12.042 1.88225 12.0945 2.35477 11.8354 2.67856L5.83012 10.1851C5.69763 10.3521 5.49956 10.4539 5.28665 10.4643L5.24611 10.4659Z" fill="#3F2B2E"/>
732
732
  </svg>
733
- `, q = {
733
+ `, K = {
734
734
  wishlist: pe,
735
735
  playerv: ue,
736
736
  chevronRight: ve,
@@ -746,8 +746,8 @@ const pe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="h
746
746
  search: $e,
747
747
  arrowLeft: ke,
748
748
  arrowTop: Ae,
749
- cart: Ee,
750
- notifyme: Se,
749
+ cart: Se,
750
+ notifyme: Ee,
751
751
  triangledown: Le,
752
752
  triangleup: Ie,
753
753
  checkstroke: Pe
@@ -785,7 +785,7 @@ class bt extends ze {
785
785
  }
786
786
  render(t) {
787
787
  if (t === d || t == null) return this._t = void 0, this.it = t;
788
- if (t === j) return t;
788
+ if (t === U) return t;
789
789
  if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
790
790
  if (t === this.it) return this._t;
791
791
  this.it = t;
@@ -834,7 +834,7 @@ let u = class extends Me {
834
834
  renderIcon(o) {
835
835
  const t = o === "start" ? this.startIconModel : this.endIconModel;
836
836
  if (!t) return d;
837
- const e = q[t].replace(
837
+ const e = K[t].replace(
838
838
  "<svg",
839
839
  '<svg aria-hidden="true" focusable="false" part="svg"'
840
840
  );
@@ -1082,7 +1082,7 @@ var Te = Object.defineProperty, je = Object.getOwnPropertyDescriptor, ct = (o, t
1082
1082
  (r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
1083
1083
  return n && i && Te(t, e, i), i;
1084
1084
  };
1085
- let Z = class extends f {
1085
+ let q = class extends f {
1086
1086
  constructor() {
1087
1087
  super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
1088
1088
  this.status = this.status === "empty" ? "filled" : "empty", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
@@ -1102,7 +1102,7 @@ let Z = class extends f {
1102
1102
  (o.key === "Enter" || o.key === " ") && (o.preventDefault(), this.toggleStatus());
1103
1103
  }
1104
1104
  render() {
1105
- const o = q.wishlist.replace(
1105
+ const o = K.wishlist.replace(
1106
1106
  "<svg",
1107
1107
  '<svg aria-hidden="true" focusable="false" part="svg"'
1108
1108
  );
@@ -1123,7 +1123,7 @@ let Z = class extends f {
1123
1123
  this.label = o, this.requestUpdate();
1124
1124
  }
1125
1125
  };
1126
- Z.styles = w`
1126
+ q.styles = w`
1127
1127
  :host {
1128
1128
  display: inline-flex;
1129
1129
  justify-content: center;
@@ -1190,16 +1190,16 @@ Z.styles = w`
1190
1190
  `;
1191
1191
  ct([
1192
1192
  a({ type: String, reflect: !0 })
1193
- ], Z.prototype, "status", 2);
1193
+ ], q.prototype, "status", 2);
1194
1194
  ct([
1195
1195
  a({ type: String, reflect: !0 })
1196
- ], Z.prototype, "ariaDescribedBy", 2);
1196
+ ], q.prototype, "ariaDescribedBy", 2);
1197
1197
  ct([
1198
1198
  a({ type: String, reflect: !0 })
1199
- ], Z.prototype, "label", 2);
1200
- Z = ct([
1199
+ ], q.prototype, "label", 2);
1200
+ q = ct([
1201
1201
  $("o-wishlist-button")
1202
- ], Z);
1202
+ ], q);
1203
1203
  var Ue = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, z = (o, t, e, n) => {
1204
1204
  for (var i = n > 1 ? void 0 : n ? Ne(t, e) : t, s = o.length - 1, r; s >= 0; s--)
1205
1205
  (r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
@@ -1213,7 +1213,7 @@ let C = class extends f {
1213
1213
  super.updated(o), this.style.setProperty("--icon-stroke-width", this.strokewidth);
1214
1214
  }
1215
1215
  render() {
1216
- const o = q[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace(
1216
+ const o = K[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace(
1217
1217
  "<svg",
1218
1218
  '<svg aria-hidden="true" focusable="false" part="svg"'
1219
1219
  );
@@ -1464,13 +1464,13 @@ C = z([
1464
1464
  * Copyright 2018 Google LLC
1465
1465
  * SPDX-License-Identifier: BSD-3-Clause
1466
1466
  */
1467
- const G = (o) => o ?? d;
1468
- var Fe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, N = (o, t, e, n) => {
1467
+ const H = (o) => o ?? d;
1468
+ var Fe = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, F = (o, t, e, n) => {
1469
1469
  for (var i = n > 1 ? void 0 : n ? Re(t, e) : t, s = o.length - 1, r; s >= 0; s--)
1470
1470
  (r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
1471
1471
  return n && i && Fe(t, e, i), i;
1472
1472
  };
1473
- let E = class extends f {
1473
+ let S = class extends f {
1474
1474
  constructor() {
1475
1475
  super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
1476
1476
  }
@@ -1482,7 +1482,7 @@ let E = class extends f {
1482
1482
  return c`
1483
1483
  <a
1484
1484
  href="${o}"
1485
- target="${G(this.target || void 0)}"
1485
+ target="${H(this.target || void 0)}"
1486
1486
  @click="${this._handleClick}"
1487
1487
  >
1488
1488
  ${this.endIcon && this.reverseEndIcon ? c`
@@ -1508,7 +1508,7 @@ let E = class extends f {
1508
1508
  `;
1509
1509
  }
1510
1510
  };
1511
- E.styles = w`
1511
+ S.styles = w`
1512
1512
  :host([template="standard"]) a {
1513
1513
  color: var(--color-content-action-secondary);
1514
1514
  font-size: var(--font-size-200);
@@ -1596,27 +1596,27 @@ E.styles = w`
1596
1596
  }
1597
1597
  /* End of underline effect */
1598
1598
  `;
1599
- N([
1599
+ F([
1600
1600
  a({ type: String })
1601
- ], E.prototype, "href", 2);
1602
- N([
1601
+ ], S.prototype, "href", 2);
1602
+ F([
1603
1603
  a({ type: String })
1604
- ], E.prototype, "target", 2);
1605
- N([
1604
+ ], S.prototype, "target", 2);
1605
+ F([
1606
1606
  a({ type: String, reflect: !0 })
1607
- ], E.prototype, "template", 2);
1608
- N([
1607
+ ], S.prototype, "template", 2);
1608
+ F([
1609
1609
  a({ type: Boolean, reflect: !0 })
1610
- ], E.prototype, "inverse", 2);
1611
- N([
1610
+ ], S.prototype, "inverse", 2);
1611
+ F([
1612
1612
  a({ type: Boolean, reflect: !0 })
1613
- ], E.prototype, "endIcon", 2);
1614
- N([
1613
+ ], S.prototype, "endIcon", 2);
1614
+ F([
1615
1615
  a({ type: Boolean, reflect: !0 })
1616
- ], E.prototype, "reverseEndIcon", 2);
1617
- E = N([
1616
+ ], S.prototype, "reverseEndIcon", 2);
1617
+ S = F([
1618
1618
  $("o-link")
1619
- ], E);
1619
+ ], S);
1620
1620
  var Ve = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, ht = (o, t, e, n) => {
1621
1621
  for (var i = n > 1 ? void 0 : n ? Ze(t, e) : t, s = o.length - 1, r; s >= 0; s--)
1622
1622
  (r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
@@ -1641,7 +1641,7 @@ let W = class extends f {
1641
1641
  <div class="rating">
1642
1642
  <div class="stars">
1643
1643
  ${o.map(
1644
- (t) => c`<span class="star">${B(q[t] ?? "")}</span>`
1644
+ (t) => c`<span class="star">${B(K[t] ?? "")}</span>`
1645
1645
  )}
1646
1646
  </div>
1647
1647
  ${this.reviewCount != null && this.href != null ? c`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
@@ -1695,10 +1695,10 @@ ht([
1695
1695
  W = ht([
1696
1696
  $("o-rating")
1697
1697
  ], W);
1698
- var We = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, y = (o, t, e, n) => {
1699
- for (var i = n > 1 ? void 0 : n ? qe(t, e) : t, s = o.length - 1, r; s >= 0; s--)
1698
+ var qe = Object.defineProperty, We = Object.getOwnPropertyDescriptor, y = (o, t, e, n) => {
1699
+ for (var i = n > 1 ? void 0 : n ? We(t, e) : t, s = o.length - 1, r; s >= 0; s--)
1700
1700
  (r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
1701
- return n && i && We(t, e, i), i;
1701
+ return n && i && qe(t, e, i), i;
1702
1702
  };
1703
1703
  let g = class extends f {
1704
1704
  constructor() {
@@ -1988,12 +1988,12 @@ y([
1988
1988
  g = y([
1989
1989
  $("o-side-panel")
1990
1990
  ], g);
1991
- var Ke = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, F = (o, t, e, n) => {
1991
+ var Ke = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, R = (o, t, e, n) => {
1992
1992
  for (var i = n > 1 ? void 0 : n ? Ge(t, e) : t, s = o.length - 1, r; s >= 0; s--)
1993
1993
  (r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
1994
1994
  return n && i && Ke(t, e, i), i;
1995
1995
  };
1996
- let S = class extends f {
1996
+ let E = class extends f {
1997
1997
  constructor() {
1998
1998
  super(...arguments), this.thumbnails = [], this.activeIndex = 0, this.disabledIndexes = [], this.maxWidth = "100%", this.focusedIndex = 0, this.playerIconTemplate = c`
1999
1999
  <o-icon-button
@@ -2054,7 +2054,7 @@ let S = class extends f {
2054
2054
  `;
2055
2055
  }
2056
2056
  };
2057
- S.styles = w`
2057
+ E.styles = w`
2058
2058
  :host {
2059
2059
  display: flex;
2060
2060
  gap: 5px;
@@ -2158,27 +2158,27 @@ S.styles = w`
2158
2158
  width: 0;
2159
2159
  }
2160
2160
  `;
2161
- F([
2161
+ R([
2162
2162
  a({ type: Array })
2163
- ], S.prototype, "thumbnails", 2);
2164
- F([
2163
+ ], E.prototype, "thumbnails", 2);
2164
+ R([
2165
2165
  a({ type: Number })
2166
- ], S.prototype, "activeIndex", 2);
2167
- F([
2166
+ ], E.prototype, "activeIndex", 2);
2167
+ R([
2168
2168
  a({ type: Array })
2169
- ], S.prototype, "disabledIndexes", 2);
2170
- F([
2169
+ ], E.prototype, "disabledIndexes", 2);
2170
+ R([
2171
2171
  a({ type: String })
2172
- ], S.prototype, "maxWidth", 2);
2173
- F([
2172
+ ], E.prototype, "maxWidth", 2);
2173
+ R([
2174
2174
  a({ type: Object })
2175
- ], S.prototype, "swiperInstance", 2);
2176
- F([
2177
- U()
2178
- ], S.prototype, "focusedIndex", 2);
2179
- S = F([
2175
+ ], E.prototype, "swiperInstance", 2);
2176
+ R([
2177
+ N()
2178
+ ], E.prototype, "focusedIndex", 2);
2179
+ E = R([
2180
2180
  $("thumbnail-navigation")
2181
- ], S);
2181
+ ], E);
2182
2182
  var Xe = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, Ct = (o, t, e, n) => {
2183
2183
  for (var i = n > 1 ? void 0 : n ? Je(t, e) : t, s = o.length - 1, r; s >= 0; s--)
2184
2184
  (r = o[s]) && (i = (n ? r(t, e, i) : r(i)) || i);
@@ -2386,9 +2386,9 @@ var to = Object.defineProperty, eo = Object.getOwnPropertyDescriptor, L = (o, t,
2386
2386
  };
2387
2387
  let _ = class extends f {
2388
2388
  constructor() {
2389
- super(...arguments), this.options = [], this.value = "", this.name = "", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this._handleOutsideClick = (o) => {
2389
+ super(...arguments), this.options = [], this.value = "", this.name = "", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (o) => {
2390
2390
  this.contains(o.target) || (this.open = !1, this.activeIndex = -1);
2391
- }, this.menuWidth = "";
2391
+ };
2392
2392
  }
2393
2393
  connectedCallback() {
2394
2394
  super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick);
@@ -2398,13 +2398,23 @@ let _ = class extends f {
2398
2398
  }
2399
2399
  toggle() {
2400
2400
  var o;
2401
- if (!this.disabled && (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((t) => t.value === this.value) : -1, this.open && this.width === "auto")) {
2402
- const t = (o = this.renderRoot) == null ? void 0 : o.querySelector("button");
2403
- t && (this.menuWidth = `${t.getBoundingClientRect().width}px`);
2401
+ if (!this.disabled) {
2402
+ if (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((t) => t.value === this.value) : -1, this.open && this.width === "auto") {
2403
+ const t = (o = this.renderRoot) == null ? void 0 : o.querySelector("button");
2404
+ t && (this.menuWidth = `${t.getBoundingClientRect().width}px`);
2405
+ }
2406
+ this.open && this.updateComplete.then(() => {
2407
+ this._focusActiveOption();
2408
+ });
2404
2409
  }
2405
2410
  }
2411
+ _focusActiveOption() {
2412
+ var t;
2413
+ const o = (t = this.renderRoot) == null ? void 0 : t.querySelector(`#option-${this.activeIndex}`);
2414
+ o == null || o.focus();
2415
+ }
2406
2416
  selectOption(o) {
2407
- this.value = o.value, this.dispatchEvent(new CustomEvent("change", { detail: { value: this.value, url: o.url } }));
2417
+ this.value = o.value, this.dispatchEvent(new CustomEvent("change", { detail: { value: this.value, url: o.url } })), this.open = !1, this.activeIndex = -1;
2408
2418
  }
2409
2419
  handleKeydown(o) {
2410
2420
  if (this.disabled) {
@@ -2412,15 +2422,21 @@ let _ = class extends f {
2412
2422
  return;
2413
2423
  }
2414
2424
  if (!this.open) {
2415
- (o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((t) => t.value === this.value));
2425
+ (o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((t) => t.value === this.value), this.updateComplete.then(() => this._focusActiveOption()));
2416
2426
  return;
2417
2427
  }
2418
2428
  switch (o.key) {
2419
2429
  case "ArrowDown":
2420
- o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length;
2430
+ o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
2421
2431
  break;
2422
2432
  case "ArrowUp":
2423
- o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length;
2433
+ o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
2434
+ break;
2435
+ case "Home":
2436
+ o.preventDefault(), this.activeIndex = 0, this.updateComplete.then(() => this._focusActiveOption());
2437
+ break;
2438
+ case "End":
2439
+ o.preventDefault(), this.activeIndex = this.options.length - 1, this.updateComplete.then(() => this._focusActiveOption());
2424
2440
  break;
2425
2441
  case "Enter":
2426
2442
  o.preventDefault(), this.activeIndex >= 0 && this.selectOption(this.options[this.activeIndex]);
@@ -2434,45 +2450,58 @@ let _ = class extends f {
2434
2450
  this.options.length > 0 && (this.options.some((e) => e.value === this.value) || (this.value = this.options[0].value));
2435
2451
  }
2436
2452
  render() {
2437
- const o = q.checkstroke.replace(
2453
+ const o = K.checkstroke.replace(
2438
2454
  "<svg",
2439
2455
  '<svg aria-hidden="true" focusable="false" part="svg"'
2440
2456
  ), t = this.options.find((e) => e.value === this.value);
2441
2457
  return c`
2442
2458
  <button
2443
- @click=${this.toggle}
2444
- @keydown=${this.handleKeydown}
2459
+ role="combobox"
2445
2460
  aria-haspopup="listbox"
2461
+ aria-controls="dropdown-listbox"
2446
2462
  aria-expanded="${this.open}"
2463
+ aria-disabled="${this.disabled ? "true" : "false"}"
2464
+ aria-labelledby="dropdown-label"
2465
+ @click=${this.toggle}
2466
+ @keydown=${this.handleKeydown}
2447
2467
  style=${`width: ${this.width};`}
2448
2468
  ?disabled=${this.disabled}
2449
2469
  >
2450
- <span class="label">${t ? t.label : "Select an option"}</span>
2451
- <span class="arrow"><o-icon-button icon='${this.open ? "triangleup" : "triangledown"}' size="small" bgstyle="none-contrast" type="span"></o-icon-button></span>
2470
+ <span id="dropdown-label" class="label">
2471
+ ${t ? t.label : "Select an option"}
2472
+ </span>
2473
+ <span class="arrow">
2474
+ <o-icon-button icon='${this.open ? "triangleup" : "triangledown"}' size="small" bgstyle="none-contrast" type="span"></o-icon-button>
2475
+ </span>
2452
2476
  </button>
2453
2477
 
2454
2478
  ${this.open ? c`
2455
- <ul role="listbox" style=${`width: ${this.width};`}>
2479
+ <ul
2480
+ id="dropdown-listbox"
2481
+ role="listbox"
2482
+ aria-activedescendant="${this.activeIndex >= 0 ? "option-" + this.activeIndex : ""}"
2483
+ style=${`width: ${this.width};`}
2484
+ >
2456
2485
  ${this.options.map(
2457
2486
  (e, n) => c`
2458
2487
  <li
2488
+ id="option-${n}"
2459
2489
  role="option"
2460
2490
  aria-selected="${e.value === this.value}"
2491
+ tabindex="${n === this.activeIndex ? "0" : "-1"}"
2461
2492
  class="${n === this.activeIndex ? "active" : ""} ${e.disabled ? "disabled" : ""}"
2462
2493
  @click=${() => this.selectOption(e)}
2463
2494
  >
2464
2495
  ${e.url ? c`
2465
2496
  <a href="${e.url}">
2466
- <span>${e.label}</span>
2467
- ${e.value === this.value ? c`<span class="check">${B(o)}</span>` : null}
2497
+ <span>${e.label}</span>
2498
+ ${e.value === this.value ? c`<span class="check">${B(o)}</span>` : null}
2468
2499
  </a>` : c`
2469
2500
  <span>${e.label}</span>
2470
2501
  ${e.value === this.value ? c`<span class="check">${B(o)}</span>` : null}`}
2471
- </li>
2472
- `
2502
+ </li>`
2473
2503
  )}
2474
- </ul>
2475
- ` : null}
2504
+ </ul>` : null}
2476
2505
 
2477
2506
  <input type="hidden" name="${this.name}" .value="${this.value}" />
2478
2507
  `;
@@ -2634,13 +2663,13 @@ L([
2634
2663
  a({ type: String, reflect: !0 })
2635
2664
  ], _.prototype, "width", 2);
2636
2665
  L([
2637
- U()
2666
+ N()
2638
2667
  ], _.prototype, "open", 2);
2639
2668
  L([
2640
- U()
2669
+ N()
2641
2670
  ], _.prototype, "activeIndex", 2);
2642
2671
  L([
2643
- U()
2672
+ N()
2644
2673
  ], _.prototype, "menuWidth", 2);
2645
2674
  _ = L([
2646
2675
  $("o-dropdown")
@@ -2669,6 +2698,7 @@ yt.styles = w`
2669
2698
  border-radius: 50%;
2670
2699
  cursor: pointer;
2671
2700
  border: 1px solid var(--color-border-primary);
2701
+ box-sizing: border-box;
2672
2702
  background-color: var(--color-container-action-secondary-default);
2673
2703
  }
2674
2704
  }
@@ -2716,9 +2746,9 @@ var no = Object.defineProperty, ro = Object.getOwnPropertyDescriptor, k = (o, t,
2716
2746
  };
2717
2747
  let x = class extends f {
2718
2748
  constructor() {
2719
- super(...arguments), this.options = [], this.value = "", this.name = "", this.additionaltext = "+X variant(s)", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this._handleOutsideClick = (o) => {
2749
+ super(...arguments), this.options = [], this.value = "", this.name = "", this.additionaltext = "+X variant(s)", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (o) => {
2720
2750
  this.contains(o.target) || (this.open = !1, this.activeIndex = -1);
2721
- }, this.menuWidth = "";
2751
+ };
2722
2752
  }
2723
2753
  connectedCallback() {
2724
2754
  super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick);
@@ -2728,17 +2758,23 @@ let x = class extends f {
2728
2758
  }
2729
2759
  toggle() {
2730
2760
  var o;
2731
- if (!this.disabled && (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((t) => t.value === this.value) : -1, this.open && this.width === "auto")) {
2732
- const t = (o = this.renderRoot) == null ? void 0 : o.querySelector("button");
2733
- t && (this.menuWidth = `${t.getBoundingClientRect().width}px`);
2761
+ if (!this.disabled) {
2762
+ if (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((t) => t.value === this.value) : -1, this.open && this.width === "auto") {
2763
+ const t = (o = this.renderRoot) == null ? void 0 : o.querySelector("button");
2764
+ t && (this.menuWidth = `${t.getBoundingClientRect().width}px`);
2765
+ }
2766
+ this.open && this.updateComplete.then(() => this._focusActiveOption());
2734
2767
  }
2735
2768
  }
2769
+ _focusActiveOption() {
2770
+ var t;
2771
+ const o = (t = this.renderRoot) == null ? void 0 : t.querySelector(`#option-${this.activeIndex}`);
2772
+ o == null || o.focus();
2773
+ }
2736
2774
  selectOption(o) {
2737
- this.value = o.value, this.dispatchEvent(
2738
- new CustomEvent("change", {
2739
- detail: { value: this.value, url: o.url }
2740
- })
2741
- );
2775
+ this.value = o.value, this.dispatchEvent(new CustomEvent("change", {
2776
+ detail: { value: this.value, url: o.url }
2777
+ })), this.open = !1, this.activeIndex = -1;
2742
2778
  }
2743
2779
  handleKeydown(o) {
2744
2780
  if (this.disabled) {
@@ -2746,17 +2782,21 @@ let x = class extends f {
2746
2782
  return;
2747
2783
  }
2748
2784
  if (!this.open) {
2749
- (o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex(
2750
- (t) => t.value === this.value
2751
- ));
2785
+ (o.key === "ArrowDown" || o.key === "ArrowUp") && (o.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((t) => t.value === this.value), this.updateComplete.then(() => this._focusActiveOption()));
2752
2786
  return;
2753
2787
  }
2754
2788
  switch (o.key) {
2755
2789
  case "ArrowDown":
2756
- o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length;
2790
+ o.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
2757
2791
  break;
2758
2792
  case "ArrowUp":
2759
- o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length;
2793
+ o.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
2794
+ break;
2795
+ case "Home":
2796
+ o.preventDefault(), this.activeIndex = 0, this.updateComplete.then(() => this._focusActiveOption());
2797
+ break;
2798
+ case "End":
2799
+ o.preventDefault(), this.activeIndex = this.options.length - 1, this.updateComplete.then(() => this._focusActiveOption());
2760
2800
  break;
2761
2801
  case "Enter":
2762
2802
  o.preventDefault(), this.activeIndex >= 0 && this.selectOption(this.options[this.activeIndex]);
@@ -2766,27 +2806,32 @@ let x = class extends f {
2766
2806
  break;
2767
2807
  }
2768
2808
  }
2769
- updated(o) {
2770
- this.options.length > 0 && (this.options.some((e) => e.value === this.value) || (this.value = this.options[0].value));
2809
+ updated() {
2810
+ this.options.length > 0 && (this.options.some((t) => t.value === this.value) || (this.value = this.options[0].value));
2771
2811
  }
2772
2812
  render() {
2773
- const o = q.checkstroke.replace(
2813
+ const o = K.checkstroke.replace(
2774
2814
  "<svg",
2775
2815
  '<svg aria-hidden="true" focusable="false" part="svg"'
2776
2816
  ), t = this.options.find((e) => e.value === this.value);
2777
2817
  return c`
2778
2818
  <button
2779
- @click=${this.toggle}
2780
- @keydown=${this.handleKeydown}
2781
- aria-haspopup="listbox"
2782
- aria-expanded="${this.open}"
2783
- style=${`width: ${this.width};`}
2784
- ?disabled=${this.disabled}
2785
- class="btn-dropdown"
2819
+ role="combobox"
2820
+ aria-haspopup="listbox"
2821
+ aria-controls="dropdown-listbox"
2822
+ aria-expanded="${this.open}"
2823
+ aria-disabled="${this.disabled ? "true" : "false"}"
2824
+ aria-labelledby="dropdown-label"
2825
+ @click=${this.toggle}
2826
+ @keydown=${this.handleKeydown}
2827
+ style=${`width: ${this.width};`}
2828
+ ?disabled=${this.disabled}
2829
+ class="btn-dropdown"
2786
2830
  >
2787
-
2788
- <img src="${G(t == null ? void 0 : t.imgurl)}" />
2789
- <span class="label">${t ? t.label : "Select an option"}</span>
2831
+ <img alt="${H(t == null ? void 0 : t.label)}" src="${H(t == null ? void 0 : t.imgurl)}" />
2832
+ <span id="dropdown-label" class="label">
2833
+ ${t ? t.label : "Select an option"}
2834
+ </span>
2790
2835
  <div class="right">
2791
2836
  <span class="additional-text">${this.additionaltext}</span>
2792
2837
  <span class="arrow">
@@ -2794,34 +2839,43 @@ let x = class extends f {
2794
2839
  icon="${this.open ? "triangleup" : "triangledown"}"
2795
2840
  size="small"
2796
2841
  bgstyle="none-contrast"
2797
- type="span"
2798
- >
2842
+ type="span">
2799
2843
  </o-icon-button>
2800
2844
  </span>
2801
2845
  </div>
2802
2846
  </button>
2803
2847
 
2804
2848
  ${this.open ? c`
2805
- <ul role="listbox" style=${`width: ${this.width};`}>
2806
- ${this.options.map(
2849
+ <ul
2850
+ id="dropdown-listbox"
2851
+ role="listbox"
2852
+ aria-activedescendant="${this.activeIndex >= 0 ? "option-" + this.activeIndex : ""}"
2853
+ style=${`width: ${this.width};`}
2854
+ >
2855
+ ${this.options.map(
2807
2856
  (e, n) => c`
2808
- <li role="option" aria-selected="${e.value === this.value}"
2809
- class="${n === this.activeIndex ? "active" : ""} ${e.disabled ? "disabled" : ""}"
2810
- @click=${() => this.selectOption(e)}
2857
+ <li
2858
+ id="option-${n}"
2859
+ role="option"
2860
+ aria-selected="${e.value === this.value}"
2861
+ aria-disabled="${e.disabled ? "true" : "false"}"
2862
+ tabindex="${n === this.activeIndex ? "0" : "-1"}"
2863
+ class="${n === this.activeIndex ? "active" : ""} ${e.disabled ? "disabled" : ""}"
2864
+ @click=${() => this.selectOption(e)}
2811
2865
  >
2812
- <a href="${G(t == null ? void 0 : t.url)}">
2813
- <img src="${G(t == null ? void 0 : t.imgurl)}" />
2814
- <span class="label">${e.label}</span>
2815
- <div class="right">
2816
- <span class="additional-text">${G(e.additionaltext)}</span>
2817
- ${e.value === this.value && (e.additionaltext == null || e.additionaltext == null) ? c`<span class="check">${B(o)}</span>` : null}
2818
- </div>
2819
- </a>
2820
- </li>
2821
- `
2866
+ <a href="${H(e.url)}">
2867
+ <img alt="${H(e.label)}" src="${H(e.imgurl)}" />
2868
+ <span class="label">${e.label}</span>
2869
+ <div class="right">
2870
+ <span class="additional-text">${H(e.additionaltext)}</span>
2871
+ ${e.value === this.value && !e.additionaltext ? c`
2872
+ <span class="check">${B(o)}</span>` : null}
2873
+ </div>
2874
+ </a>
2875
+ </li>
2876
+ `
2822
2877
  )}
2823
- </ul>
2824
- ` : null}
2878
+ </ul>` : null}
2825
2879
 
2826
2880
  <input type="hidden" name="${this.name}" .value="${this.value}" />
2827
2881
  `;
@@ -3022,13 +3076,13 @@ k([
3022
3076
  a({ type: String, reflect: !0 })
3023
3077
  ], x.prototype, "width", 2);
3024
3078
  k([
3025
- U()
3079
+ N()
3026
3080
  ], x.prototype, "open", 2);
3027
3081
  k([
3028
- U()
3082
+ N()
3029
3083
  ], x.prototype, "activeIndex", 2);
3030
3084
  k([
3031
- U()
3085
+ N()
3032
3086
  ], x.prototype, "menuWidth", 2);
3033
3087
  x = k([
3034
3088
  $("o-dropdown-variant")