@florid-kit/components 3.0.1 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/assets/icons/icons.d.ts +8 -2
  2. package/assets/icons/occ-gen/occ-address.d.ts +5 -0
  3. package/assets/icons/occ-gen/occ-autorep.d.ts +5 -0
  4. package/assets/icons/occ-gen/occ-back.d.ts +5 -0
  5. package/assets/icons/occ-gen/occ-bag-filled.d.ts +5 -0
  6. package/assets/icons/occ-gen/occ-bag-outlined.d.ts +5 -0
  7. package/assets/icons/occ-gen/occ-bag-strike.d.ts +5 -0
  8. package/assets/icons/occ-gen/occ-bottle.d.ts +5 -0
  9. package/assets/icons/occ-gen/occ-briefcase.d.ts +5 -0
  10. package/assets/icons/occ-gen/occ-burger.d.ts +5 -0
  11. package/assets/icons/occ-gen/occ-card.d.ts +5 -0
  12. package/assets/icons/occ-gen/occ-career.d.ts +5 -0
  13. package/assets/icons/occ-gen/occ-check-filled.d.ts +5 -0
  14. package/assets/icons/occ-gen/occ-check-outlined.d.ts +5 -0
  15. package/assets/icons/occ-gen/occ-chevron-bottom.d.ts +5 -0
  16. package/assets/icons/occ-gen/occ-chevron-double.d.ts +5 -0
  17. package/assets/icons/occ-gen/occ-chevron-left.d.ts +5 -0
  18. package/assets/icons/occ-gen/occ-chevron-right.d.ts +5 -0
  19. package/assets/icons/occ-gen/occ-chevron-top.d.ts +5 -0
  20. package/assets/icons/occ-gen/occ-close-filled.d.ts +5 -0
  21. package/assets/icons/occ-gen/occ-close-outlined.d.ts +5 -0
  22. package/assets/icons/occ-gen/occ-cream-tube.d.ts +5 -0
  23. package/assets/icons/occ-gen/occ-cream.d.ts +5 -0
  24. package/assets/icons/occ-gen/occ-eye-hide.d.ts +5 -0
  25. package/assets/icons/occ-gen/occ-eye-show.d.ts +5 -0
  26. package/assets/icons/occ-gen/occ-gear-outline.d.ts +5 -0
  27. package/assets/icons/occ-gen/occ-gear.d.ts +5 -0
  28. package/assets/icons/occ-gen/occ-geoloc.d.ts +5 -0
  29. package/assets/icons/occ-gen/occ-gift.d.ts +5 -0
  30. package/assets/icons/occ-gen/occ-group.d.ts +5 -0
  31. package/assets/icons/occ-gen/occ-hand-shake.d.ts +5 -0
  32. package/assets/icons/occ-gen/occ-info.d.ts +5 -0
  33. package/assets/icons/occ-gen/occ-loaders.d.ts +4 -0
  34. package/assets/icons/occ-gen/occ-location.d.ts +5 -0
  35. package/assets/icons/occ-gen/occ-mail.d.ts +5 -0
  36. package/assets/icons/occ-gen/occ-message.d.ts +5 -0
  37. package/assets/icons/occ-gen/occ-minus.d.ts +5 -0
  38. package/assets/icons/occ-gen/occ-order-sent.d.ts +5 -0
  39. package/assets/icons/occ-gen/occ-order.d.ts +5 -0
  40. package/assets/icons/occ-gen/occ-padlock.d.ts +5 -0
  41. package/assets/icons/occ-gen/occ-pause.d.ts +5 -0
  42. package/assets/icons/occ-gen/occ-play.d.ts +5 -0
  43. package/assets/icons/occ-gen/occ-plus.d.ts +5 -0
  44. package/assets/icons/occ-gen/occ-product.d.ts +5 -0
  45. package/assets/icons/occ-gen/occ-profil-filled.d.ts +5 -0
  46. package/assets/icons/occ-gen/occ-profil-outlined.d.ts +5 -0
  47. package/assets/icons/occ-gen/occ-refill.d.ts +5 -0
  48. package/assets/icons/occ-gen/occ-refine.d.ts +5 -0
  49. package/assets/icons/occ-gen/occ-reward-card.d.ts +5 -0
  50. package/assets/icons/occ-gen/occ-samples.d.ts +5 -0
  51. package/assets/icons/occ-gen/occ-search.d.ts +5 -0
  52. package/assets/icons/occ-gen/occ-star-0.d.ts +5 -0
  53. package/assets/icons/occ-gen/occ-star-100.d.ts +5 -0
  54. package/assets/icons/occ-gen/occ-star-25.d.ts +5 -0
  55. package/assets/icons/occ-gen/occ-star-50.d.ts +5 -0
  56. package/assets/icons/occ-gen/occ-star-75.d.ts +5 -0
  57. package/assets/icons/occ-gen/occ-store.d.ts +5 -0
  58. package/assets/icons/occ-gen/occ-trash.d.ts +5 -0
  59. package/assets/icons/occ-gen/occ-triangle-down.d.ts +5 -0
  60. package/assets/icons/occ-gen/occ-triangle-up.d.ts +5 -0
  61. package/assets/icons/occ-gen/occ-warning-stroke.d.ts +5 -0
  62. package/assets/icons/occ-gen/occ-warning.d.ts +5 -0
  63. package/assets/icons/occ-gen/occ-wishlist-filled.d.ts +5 -0
  64. package/assets/icons/occ-gen/occ-wishlist-outlined.d.ts +5 -0
  65. package/components/button.mjs +2 -2
  66. package/components/chip.mjs +1 -1
  67. package/components/dropdown-variant.mjs +8 -8
  68. package/components/dropdown.mjs +6 -6
  69. package/components/filter-chip.mjs +1 -1
  70. package/components/icon-button.mjs +65 -45
  71. package/components/rating.d.ts +3 -0
  72. package/components/rating.mjs +43 -36
  73. package/components/side-panel.mjs +50 -48
  74. package/components/toast.mjs +1 -1
  75. package/components/wishlist-button.d.ts +2 -0
  76. package/components/wishlist-button.mjs +19 -15
  77. package/icons/occ-address.mjs +20 -0
  78. package/icons/occ-autorep.mjs +26 -0
  79. package/icons/occ-back.mjs +17 -0
  80. package/icons/occ-bag-filled.mjs +17 -0
  81. package/icons/occ-bag-outlined.mjs +17 -0
  82. package/icons/occ-bag-strike.mjs +26 -0
  83. package/icons/occ-bottle.mjs +20 -0
  84. package/icons/occ-briefcase.mjs +17 -0
  85. package/icons/occ-burger.mjs +23 -0
  86. package/icons/occ-card.mjs +23 -0
  87. package/icons/occ-career.mjs +43 -0
  88. package/icons/occ-check-filled.mjs +17 -0
  89. package/icons/occ-check-outlined.mjs +17 -0
  90. package/icons/occ-chevron-bottom.mjs +17 -0
  91. package/icons/occ-chevron-double.mjs +20 -0
  92. package/icons/occ-chevron-left.mjs +17 -0
  93. package/icons/occ-chevron-right.mjs +17 -0
  94. package/icons/occ-chevron-top.mjs +17 -0
  95. package/icons/occ-close-filled.mjs +17 -0
  96. package/icons/occ-close-outlined.mjs +17 -0
  97. package/icons/occ-cream-tube.mjs +23 -0
  98. package/icons/occ-cream.mjs +23 -0
  99. package/icons/occ-eye-hide.mjs +17 -0
  100. package/icons/occ-eye-show.mjs +20 -0
  101. package/icons/occ-gear-outline.mjs +22 -0
  102. package/icons/occ-gear.mjs +22 -0
  103. package/icons/occ-geoloc.mjs +17 -0
  104. package/icons/occ-gift.mjs +17 -0
  105. package/icons/occ-group.mjs +20 -0
  106. package/icons/occ-hand-shake.mjs +57 -0
  107. package/icons/occ-info.mjs +17 -0
  108. package/icons/occ-location.mjs +20 -0
  109. package/icons/occ-mail.mjs +17 -0
  110. package/icons/occ-message.mjs +38 -0
  111. package/icons/occ-minus.mjs +17 -0
  112. package/icons/occ-order-sent.mjs +26 -0
  113. package/icons/occ-order.mjs +20 -0
  114. package/icons/occ-padlock.mjs +20 -0
  115. package/icons/occ-pause.mjs +20 -0
  116. package/icons/occ-play.mjs +17 -0
  117. package/icons/occ-plus.mjs +17 -0
  118. package/icons/occ-product.mjs +21 -0
  119. package/icons/occ-profil-filled.mjs +20 -0
  120. package/icons/occ-profil-outlined.mjs +20 -0
  121. package/icons/occ-refill.mjs +20 -0
  122. package/icons/occ-refine.mjs +20 -0
  123. package/icons/occ-reward-card.mjs +20 -0
  124. package/icons/occ-samples.mjs +26 -0
  125. package/icons/occ-search.mjs +17 -0
  126. package/icons/occ-star-0.mjs +17 -0
  127. package/icons/occ-star-100.mjs +17 -0
  128. package/icons/occ-star-25.mjs +17 -0
  129. package/icons/occ-star-50.mjs +17 -0
  130. package/icons/occ-star-75.mjs +17 -0
  131. package/icons/occ-store.mjs +17 -0
  132. package/icons/occ-trash.mjs +23 -0
  133. package/icons/occ-triangle-down.mjs +17 -0
  134. package/icons/occ-triangle-up.mjs +17 -0
  135. package/icons/occ-warning-stroke.mjs +23 -0
  136. package/icons/occ-warning.mjs +17 -0
  137. package/icons/occ-wishlist-filled.mjs +17 -0
  138. package/icons/occ-wishlist-outlined.mjs +17 -0
  139. package/{icons-BZ0oOFaE.mjs → icons-registry.mjs} +116 -58
  140. package/index.mjs +0 -3
  141. package/package.json +1 -1
  142. package/{svg-utils-wXxOZLnu.mjs → svg-utils-DOL__czZ.mjs} +1 -1
  143. package/icons-occ.mjs +0 -834
@@ -1,16 +1,16 @@
1
- import { i as u, m as g, E as b, x as a, a as p, t as d } from "../performance-mixin-D7YmSeqN.mjs";
2
- import { n as i } from "../property-S_Y9cb04.mjs";
3
- import { o as v } from "../if-defined-j0wE2gL4.mjs";
4
- import { b as y, o as f } from "../icons-BZ0oOFaE.mjs";
5
- import { c as m } from "../svg-utils-wXxOZLnu.mjs";
6
- import { f as x, i as w, s as k } from "../css-C8WrrxT-.mjs";
7
- var $ = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (t, s, e, r) => {
8
- for (var c = r > 1 ? void 0 : r ? O(s, e) : s, l = t.length - 1, h; l >= 0; l--)
9
- (h = t[l]) && (c = (r ? h(s, e, c) : h(c)) || c);
10
- return r && c && $(s, e, c), c;
1
+ import { i as u, m as p, E as g, x as a, a as d, t as v } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n } from "../property-S_Y9cb04.mjs";
3
+ import { o as m } from "../if-defined-j0wE2gL4.mjs";
4
+ import { r as b, o as y } from "../icons-registry.mjs";
5
+ import { c as x } from "../svg-utils-DOL__czZ.mjs";
6
+ import { f, i as w, s as k } from "../css-C8WrrxT-.mjs";
7
+ var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (t, s, e, c) => {
8
+ for (var r = c > 1 ? void 0 : c ? S(s, e) : s, l = t.length - 1, h; l >= 0; l--)
9
+ (h = t[l]) && (r = (c ? h(s, e, r) : h(r)) || r);
10
+ return c && r && $(s, e, r), r;
11
11
  };
12
- const S = (t) => t.startsWith("occ-");
13
- let o = class extends g(p) {
12
+ const z = (t) => t.startsWith("occ-");
13
+ let o = class extends p(d) {
14
14
  constructor() {
15
15
  super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "", this.disabled = !1, this.highlight = !1, this.showSrLabel = !1, this.srLabel = "";
16
16
  }
@@ -20,17 +20,18 @@ let o = class extends g(p) {
20
20
  }
21
21
  _syncOccSubscription() {
22
22
  const t = this.icon;
23
- if (!t || !S(t)) {
23
+ if (!t || !z(t)) {
24
24
  this._clearOccSubscription();
25
25
  return;
26
26
  }
27
- const { svg: s } = y(t, { size: this.size, bgstyle: this.bgstyle });
27
+ const { svg: s } = b(t, { size: this.size, bgstyle: this.bgstyle });
28
28
  if (s) {
29
29
  this._clearOccSubscription();
30
30
  return;
31
31
  }
32
- this._unsubOcc || (this._unsubOcc = f(() => {
33
- this._clearOccSubscription(), this.requestUpdate();
32
+ this._unsubOcc || (this._unsubOcc = y(() => {
33
+ const { svg: e } = b(t, { size: this.size, bgstyle: this.bgstyle });
34
+ e && (this._clearOccSubscription(), this.requestUpdate());
34
35
  }));
35
36
  }
36
37
  connectedCallback() {
@@ -44,10 +45,10 @@ let o = class extends g(p) {
44
45
  }
45
46
  render() {
46
47
  if (!this.icon)
47
- return b;
48
- const t = m(this.icon, this.size, this.bgstyle);
49
- if (!t) return b;
50
- const s = `icon-${this.icon}`, e = this.showSrLabel ? a`<span class="sr-only">${this.srLabel}</span>` : null, r = this.showSrLabel ? "" : "icon";
48
+ return g;
49
+ const t = x(this.icon, this.size, this.bgstyle);
50
+ if (!t) return g;
51
+ const s = `icon-${this.icon}`, e = this.showSrLabel ? a`<span class="sr-only">${this.srLabel}</span>` : null, c = this.showSrLabel ? "" : "icon";
51
52
  return a`
52
53
  ${this.type === "span" ? a`
53
54
  <span part="icon-button" class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}" ?disabled="${this.disabled}">
@@ -56,8 +57,8 @@ let o = class extends g(p) {
56
57
  ` : a`
57
58
  <button
58
59
  type="button"
59
- aria-label=${v(r)}
60
- aria-describedby=${this.getAttribute("aria-describedby") || b}
60
+ aria-label=${m(c)}
61
+ aria-describedby=${this.getAttribute("aria-describedby") || g}
61
62
  part="icon-button"
62
63
  class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}"
63
64
  ?disabled="${this.disabled}"
@@ -77,6 +78,25 @@ o.styles = u`
77
78
  outline: none !important;
78
79
  }
79
80
 
81
+ /*
82
+ * Reserve the host's footprint while the (code-split) SVG loads, so the
83
+ * host doesn't collapse to 0×0 and shift surrounding content (CLS).
84
+ * Values mirror the rendered .icon-button sizes below.
85
+ */
86
+ :host([size="xsmall"]) { min-width: 20px; min-height: 20px; }
87
+ :host([size="small"]) { min-width: 32px; min-height: 32px; }
88
+ :host([size="medium"]) { min-width: 40px; min-height: 40px; }
89
+ :host([size="large"]) { min-width: 40px; min-height: 40px; }
90
+
91
+ :host([bgstyle="none-light"][size="xsmall"]),
92
+ :host([bgstyle="none-contrast"][size="xsmall"]) { min-width: 8px; min-height: 8px; }
93
+ :host([bgstyle="none-light"][size="small"]),
94
+ :host([bgstyle="none-contrast"][size="small"]) { min-width: 12px; min-height: 12px; }
95
+ :host([bgstyle="none-light"][size="medium"]),
96
+ :host([bgstyle="none-contrast"][size="medium"]) { min-width: 16px; min-height: 16px; }
97
+ :host([bgstyle="none-light"][size="large"]),
98
+ :host([bgstyle="none-contrast"][size="large"]) { min-width: 24px; min-height: 24px; }
99
+
80
100
  .icon-button {
81
101
  display: flex;
82
102
  justify-content: center;
@@ -275,7 +295,7 @@ o.styles = u`
275
295
  }
276
296
 
277
297
  .icon-button:focus-visible {
278
- ${x}
298
+ ${f}
279
299
  }
280
300
 
281
301
  :host(.go-to-top) .icon-button:focus-visible {
@@ -302,38 +322,38 @@ o.styles = u`
302
322
  ${k}
303
323
  }
304
324
  `;
305
- n([
306
- i({ type: String, reflect: !0 })
325
+ i([
326
+ n({ type: String, reflect: !0 })
307
327
  ], o.prototype, "bgstyle", 2);
308
- n([
309
- i({ type: String, reflect: !0 })
328
+ i([
329
+ n({ type: String, reflect: !0 })
310
330
  ], o.prototype, "size", 2);
311
- n([
312
- i({ type: String, reflect: !0 })
331
+ i([
332
+ n({ type: String, reflect: !0 })
313
333
  ], o.prototype, "status", 2);
314
- n([
315
- i({ type: String, reflect: !0 })
334
+ i([
335
+ n({ type: String, reflect: !0 })
316
336
  ], o.prototype, "type", 2);
317
- n([
318
- i({ type: String })
337
+ i([
338
+ n({ type: String })
319
339
  ], o.prototype, "strokewidth", 2);
320
- n([
321
- i({ type: String })
340
+ i([
341
+ n({ type: String })
322
342
  ], o.prototype, "icon", 2);
323
- n([
324
- i({ type: Boolean, reflect: !0 })
343
+ i([
344
+ n({ type: Boolean, reflect: !0 })
325
345
  ], o.prototype, "disabled", 2);
326
- n([
327
- i({ type: Boolean, reflect: !0 })
346
+ i([
347
+ n({ type: Boolean, reflect: !0 })
328
348
  ], o.prototype, "highlight", 2);
329
- n([
330
- i({ type: Boolean })
349
+ i([
350
+ n({ type: Boolean })
331
351
  ], o.prototype, "showSrLabel", 2);
332
- n([
333
- i({ type: String })
352
+ i([
353
+ n({ type: String })
334
354
  ], o.prototype, "srLabel", 2);
335
- o = n([
336
- d("o-icon-button")
355
+ o = i([
356
+ v("o-icon-button")
337
357
  ], o);
338
358
  export {
339
359
  o as OccitaneIconButton
@@ -5,6 +5,9 @@ export declare class OccitaneRating extends OccitaneRating_base {
5
5
  rating: number;
6
6
  reviewCount?: string;
7
7
  href?: string;
8
+ private _unsubOcc?;
9
+ connectedCallback(): void;
10
+ disconnectedCallback(): void;
8
11
  static styles: import('lit').CSSResult;
9
12
  private getStarKeys;
10
13
  protected render(): import('lit').TemplateResult<1>;
@@ -1,44 +1,51 @@
1
- import { i as f, m as g, a as v, x as p, t as m } from "../performance-mixin-D7YmSeqN.mjs";
2
- import { n as c } from "../property-S_Y9cb04.mjs";
3
- import { o as h } from "../unsafe-svg-C3uTocNg.mjs";
4
- import { b as u } from "../icons-BZ0oOFaE.mjs";
1
+ import { i as f, m as u, a as g, x as c, t as h } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as p } from "../property-S_Y9cb04.mjs";
3
+ import { o as v } from "../unsafe-svg-C3uTocNg.mjs";
4
+ import { o as m, r as d } from "../icons-registry.mjs";
5
5
  import "./link.mjs";
6
- var y = Object.defineProperty, d = Object.getOwnPropertyDescriptor, a = (s, t, e, r) => {
7
- for (var i = r > 1 ? void 0 : r ? d(t, e) : t, o = s.length - 1, l; o >= 0; o--)
8
- (l = s[o]) && (i = (r ? l(t, e, i) : l(i)) || i);
9
- return r && i && y(t, e, i), i;
6
+ var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (t, e, r, s) => {
7
+ for (var n = s > 1 ? void 0 : s ? b(e, r) : e, o = t.length - 1, l; o >= 0; o--)
8
+ (l = t[o]) && (n = (s ? l(e, r, n) : l(n)) || n);
9
+ return s && n && y(e, r, n), n;
10
10
  };
11
- let n = class extends g(v) {
11
+ let a = class extends u(g) {
12
12
  constructor() {
13
13
  super(...arguments), this.rating = 0;
14
14
  }
15
+ connectedCallback() {
16
+ super.connectedCallback(), this._unsubOcc = m(() => this.requestUpdate());
17
+ }
18
+ disconnectedCallback() {
19
+ var t;
20
+ (t = this._unsubOcc) == null || t.call(this), super.disconnectedCallback();
21
+ }
15
22
  getStarKeys() {
16
- const s = [];
17
- for (let t = 0; t < 5; t++) {
18
- const e = this.rating - t;
19
- let r;
20
- e >= 1 ? r = 100 : e <= 0 ? r = 0 : r = Math.round(e * 100 / 25) * 25, s.push(`occ-star-${r}`);
23
+ const t = [];
24
+ for (let e = 0; e < 5; e++) {
25
+ const r = this.rating - e;
26
+ let s;
27
+ r >= 1 ? s = 100 : r <= 0 ? s = 0 : s = Math.round(r * 100 / 25) * 25, t.push(`occ-star-${s}`);
21
28
  }
22
- return s;
29
+ return t;
23
30
  }
24
31
  render() {
25
- const s = this.getStarKeys();
26
- return p`
32
+ const t = this.getStarKeys();
33
+ return c`
27
34
  <div class="rating">
28
35
  <div class="stars">
29
- ${s.map(
30
- (t) => {
31
- const { svg: e } = u(t, { size: "small", bgstyle: "none-contrast" });
32
- return p`<span class="star">${h(e)}</span>`;
36
+ ${t.map(
37
+ (e) => {
38
+ const { svg: r } = d(e, { size: "small", bgstyle: "none-contrast" });
39
+ return c`<span class="star">${v(r)}</span>`;
33
40
  }
34
41
  )}
35
42
  </div>
36
- ${this.reviewCount != null && this.href != null ? p`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
43
+ ${this.reviewCount != null && this.href != null ? c`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
37
44
  </div>
38
45
  `;
39
46
  }
40
47
  };
41
- n.styles = f`
48
+ a.styles = f`
42
49
  .rating {
43
50
  display: flex;
44
51
  align-items: center;
@@ -64,18 +71,18 @@ n.styles = f`
64
71
  }
65
72
 
66
73
  `;
67
- a([
68
- c({ type: Number })
69
- ], n.prototype, "rating", 2);
70
- a([
71
- c({ type: String })
72
- ], n.prototype, "reviewCount", 2);
73
- a([
74
- c({ type: String })
75
- ], n.prototype, "href", 2);
76
- n = a([
77
- m("o-rating")
78
- ], n);
74
+ i([
75
+ p({ type: Number })
76
+ ], a.prototype, "rating", 2);
77
+ i([
78
+ p({ type: String })
79
+ ], a.prototype, "reviewCount", 2);
80
+ i([
81
+ p({ type: String })
82
+ ], a.prototype, "href", 2);
83
+ a = i([
84
+ h("o-rating")
85
+ ], a);
79
86
  export {
80
- n as OccitaneRating
87
+ a as OccitaneRating
81
88
  };
@@ -1,23 +1,23 @@
1
- import { E as p, i as k, a as w, m as C, x as h, t as S } from "../performance-mixin-D7YmSeqN.mjs";
1
+ import { E as p, i as C, a as w, m as S, x as h, t as B } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as r } from "../property-S_Y9cb04.mjs";
3
3
  import { f as x } from "../css-C8WrrxT-.mjs";
4
- import { i as B, m as A } from "../element-internals-Dw7LndlH.mjs";
5
- import { o as P, a as _ } from "../icons-BZ0oOFaE.mjs";
6
- import { g as I } from "../svg-utils-wXxOZLnu.mjs";
7
- import { o as F } from "../unsafe-svg-C3uTocNg.mjs";
4
+ import { i as E, m as P } from "../element-internals-Dw7LndlH.mjs";
5
+ import { e as $, o as _, a as I } from "../icons-registry.mjs";
6
+ import { g as F } from "../svg-utils-DOL__czZ.mjs";
7
+ import { o as z } from "../unsafe-svg-C3uTocNg.mjs";
8
8
  import "./icon-button.mjs";
9
- import { i as z, t as L, e as O } from "../directive-oAbCiebi.mjs";
10
- import { f as R } from "../directive-helpers-BHuwIghp.mjs";
9
+ import { i as O, t as L, e as R } from "../directive-oAbCiebi.mjs";
10
+ import { f as q } from "../directive-helpers-BHuwIghp.mjs";
11
11
  /**
12
12
  * @license
13
13
  * Copyright 2023 Google LLC
14
14
  * SPDX-License-Identifier: Apache-2.0
15
15
  */
16
- function q(e) {
16
+ function T(e) {
17
17
  e.addInitializer((t) => {
18
18
  const o = t;
19
19
  o.addEventListener("click", async (i) => {
20
- const { type: n, [B]: s } = o, { form: a } = s;
20
+ const { type: n, [E]: s } = o, { form: a } = s;
21
21
  if (!(!a || n === "button") && (await new Promise((b) => {
22
22
  setTimeout(b);
23
23
  }), !i.defaultPrevented)) {
@@ -57,39 +57,39 @@ const y = (e, t) => {
57
57
  if ((t = e._$AM) === void 0) break;
58
58
  o = t._$AN, o.delete(e), e = t;
59
59
  } while ((o == null ? void 0 : o.size) === 0);
60
- }, E = (e) => {
60
+ }, D = (e) => {
61
61
  for (let t; t = e._$AM; e = t) {
62
62
  let o = t._$AN;
63
63
  if (o === void 0) t._$AN = o = /* @__PURE__ */ new Set();
64
64
  else if (o.has(e)) break;
65
- o.add(e), M(t);
65
+ o.add(e), j(t);
66
66
  }
67
67
  };
68
- function T(e) {
69
- this._$AN !== void 0 ? (m(this), this._$AM = e, E(this)) : this._$AM = e;
68
+ function H(e) {
69
+ this._$AN !== void 0 ? (m(this), this._$AM = e, D(this)) : this._$AM = e;
70
70
  }
71
- function H(e, t = !1, o = 0) {
71
+ function M(e, t = !1, o = 0) {
72
72
  const i = this._$AH, n = this._$AN;
73
73
  if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(i)) for (let s = o; s < i.length; s++) y(i[s], !1), m(i[s]);
74
74
  else i != null && (y(i, !1), m(i));
75
75
  else y(this, e);
76
76
  }
77
- const M = (e) => {
78
- e.type == L.CHILD && (e._$AP ?? (e._$AP = H), e._$AQ ?? (e._$AQ = T));
77
+ const j = (e) => {
78
+ e.type == L.CHILD && (e._$AP ?? (e._$AP = M), e._$AQ ?? (e._$AQ = H));
79
79
  };
80
- class j extends z {
80
+ class K extends O {
81
81
  constructor() {
82
82
  super(...arguments), this._$AN = void 0;
83
83
  }
84
84
  _$AT(t, o, i) {
85
- super._$AT(t, o, i), E(this), this.isConnected = t._$AU;
85
+ super._$AT(t, o, i), D(this), this.isConnected = t._$AU;
86
86
  }
87
87
  _$AO(t, o = !0) {
88
88
  var i, n;
89
89
  t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), o && (y(this, t), m(this));
90
90
  }
91
91
  setValue(t) {
92
- if (R(this._$Ct)) this._$Ct._$AI(t, this);
92
+ if (q(this._$Ct)) this._$Ct._$AI(t, this);
93
93
  else {
94
94
  const o = [...this._$Ct._$AH];
95
95
  o[this._$Ci] = t, this._$Ct._$AI(o, this, 0);
@@ -100,7 +100,7 @@ class j extends z {
100
100
  reconnected() {
101
101
  }
102
102
  }
103
- class K extends j {
103
+ class N extends K {
104
104
  constructor() {
105
105
  super(...arguments), this.prevData = {};
106
106
  }
@@ -127,7 +127,7 @@ class K extends j {
127
127
  (!t || !(n in t) && i[n] === o[n]) && (i[n] = void 0);
128
128
  }
129
129
  }
130
- class N extends K {
130
+ class V extends N {
131
131
  constructor() {
132
132
  super(...arguments), this.eventData = {};
133
133
  }
@@ -171,7 +171,7 @@ class N extends K {
171
171
  }
172
172
  }
173
173
  }
174
- class V extends N {
174
+ class X extends V {
175
175
  apply(t) {
176
176
  if (!t)
177
177
  return;
@@ -220,13 +220,13 @@ class V extends N {
220
220
  }
221
221
  }
222
222
  }
223
- const $ = O(V);
224
- var X = Object.defineProperty, U = Object.getOwnPropertyDescriptor, c = (e, t, o, i) => {
225
- for (var n = i > 1 ? void 0 : i ? U(t, o) : t, s = e.length - 1, a; s >= 0; s--)
223
+ const k = R(X);
224
+ var U = Object.defineProperty, W = Object.getOwnPropertyDescriptor, c = (e, t, o, i) => {
225
+ for (var n = i > 1 ? void 0 : i ? W(t, o) : t, s = e.length - 1, a; s >= 0; s--)
226
226
  (a = e[s]) && (n = (i ? a(t, o, n) : a(n)) || n);
227
- return i && n && X(t, o, n), n;
227
+ return i && n && U(t, o, n), n;
228
228
  };
229
- let l = class extends C(w) {
229
+ let l = class extends S(w) {
230
230
  constructor() {
231
231
  super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !1, this.showHeaderStartIcon = !1, this.headerTitle = "", this.headerTitleClassName = "panel-title", this.labelDialog = "", this.labelAriaDialogPanel = "", this.addToBagProductCount = "", this.closeButtonLabel = "Close the modal", this.goBackButtonLabel = "Go back to", this.firstButtonLabel = "Close", this.firstButtonVariant = "primary", this.firstButtonProps = {}, this.onFirstButtonClickClose = !1, this.secondButtonLabel = "", this.secondButtonVariant = "secondary", this.secondButtonProps = {}, this.onSecondButtonClickClose = !1, this.stickyFooter = !1, this.disablePortal = !1, this.zIndex = 99, this.initialized = !1, this.showDetail = !1, this.isHidingDetail = !1, this.previousFocusedElement = null, this.previousFocusedSelector = null, this._hideTimeout = null, this._onOpenDetail = async (e) => {
232
232
  var o, i;
@@ -330,8 +330,8 @@ let l = class extends C(w) {
330
330
  }
331
331
  }
332
332
  if (document.querySelector("#refineandsortpopin")) {
333
- const a = t.querySelector(".close-btn"), b = a ? this.resolveFocusable(a) : null, f = t.querySelector(".js-clear-refinements"), v = f ? this.resolveFocusable(f) : null, g = (D) => {
334
- e.preventDefault(), e.stopPropagation(), D.focus();
333
+ const a = t.querySelector(".close-btn"), b = a ? this.resolveFocusable(a) : null, f = t.querySelector(".js-clear-refinements"), v = f ? this.resolveFocusable(f) : null, g = (A) => {
334
+ e.preventDefault(), e.stopPropagation(), A.focus();
335
335
  };
336
336
  if (b && v) {
337
337
  if (!e.shiftKey && o === v) return g(b);
@@ -465,7 +465,7 @@ let l = class extends C(w) {
465
465
  .variant=${this.firstButtonVariant}
466
466
  @click=${this.handleFirstClick}
467
467
  @keydown=${this.handleFirstClick}
468
- ${$(this.firstButtonProps)}
468
+ ${k(this.firstButtonProps)}
469
469
  >
470
470
  ${this.firstButtonLabel}
471
471
  </o-button>
@@ -475,7 +475,7 @@ let l = class extends C(w) {
475
475
  .variant=${this.secondButtonVariant}
476
476
  @click=${this.handleSecondClick}
477
477
  @keydown=${this.handleSecondClick}
478
- ${$(this.secondButtonProps)}
478
+ ${k(this.secondButtonProps)}
479
479
  >
480
480
  ${this.secondButtonLabel}
481
481
  </o-button>
@@ -516,7 +516,7 @@ let l = class extends C(w) {
516
516
  `;
517
517
  }
518
518
  };
519
- l.styles = k`
519
+ l.styles = C`
520
520
  :host {
521
521
  --z-overlay: 99;
522
522
  --z-panel: 100;
@@ -842,15 +842,15 @@ c([
842
842
  r({ type: Boolean })
843
843
  ], l.prototype, "isHidingDetail", 2);
844
844
  l = c([
845
- S("o-side-panel")
845
+ B("o-side-panel")
846
846
  ], l);
847
- var W = Object.defineProperty, G = Object.getOwnPropertyDescriptor, u = (e, t, o, i) => {
848
- for (var n = i > 1 ? void 0 : i ? G(t, o) : t, s = e.length - 1, a; s >= 0; s--)
847
+ var G = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, u = (e, t, o, i) => {
848
+ for (var n = i > 1 ? void 0 : i ? Q(t, o) : t, s = e.length - 1, a; s >= 0; s--)
849
849
  (a = e[s]) && (n = (i ? a(t, o, n) : a(n)) || n);
850
- return i && n && W(t, o, n), n;
850
+ return i && n && G(t, o, n), n;
851
851
  };
852
- const Q = C(A(w)), at = ["primary", "secondary", "ghost", "tertiary"];
853
- let d = class extends Q {
852
+ const J = S(P(w)), lt = ["primary", "secondary", "ghost", "tertiary"];
853
+ let d = class extends J {
854
854
  constructor() {
855
855
  super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.startIconModel = "", this.endIconModel = "", this.startIcon = !1, this.endIcon = !1, this.panelTarget = "", this.href = "", this.target = "", this.underlined = !1, this.withbadge = !1, this.hideRoleButton = !1, this.describedBy = null, this.ariaExpanded = null;
856
856
  }
@@ -861,7 +861,7 @@ let d = class extends Q {
861
861
  this.setAttribute("name", e);
862
862
  }
863
863
  get form() {
864
- return this[B].form;
864
+ return this[E].form;
865
865
  }
866
866
  handleClick(e) {
867
867
  if (!(e instanceof KeyboardEvent && !["Enter", " "].includes(e.key)) && this.panelTarget) {
@@ -873,8 +873,10 @@ let d = class extends Q {
873
873
  return this.href ? this.renderLink() : this.renderButton();
874
874
  }
875
875
  connectedCallback() {
876
- var e, t;
877
- super.connectedCallback(), ((e = this.startIconModel) != null && e.startsWith("occ-") || (t = this.endIconModel) != null && t.startsWith("occ-")) && (this._unsubOcc = P(() => this.requestUpdate()));
876
+ var o, i;
877
+ super.connectedCallback();
878
+ const e = (o = this.startIconModel) == null ? void 0 : o.startsWith("occ-"), t = (i = this.endIconModel) == null ? void 0 : i.startsWith("occ-");
879
+ (e || t) && (e && $(this.startIconModel), t && $(this.endIconModel), this._unsubOcc = _(() => this.requestUpdate()));
878
880
  }
879
881
  disconnectedCallback() {
880
882
  var e;
@@ -883,10 +885,10 @@ let d = class extends Q {
883
885
  renderIcon(e) {
884
886
  const t = e === "start" ? this.startIconModel : this.endIconModel;
885
887
  if (!t) return p;
886
- const o = _[t] ?? "";
888
+ const o = I[t] ?? "";
887
889
  if (!o) return p;
888
- const i = I(o);
889
- return h`<span class="${e === "start" ? "icon-start" : "icon-end"}">${F(i)}</span>`;
890
+ const i = F(o);
891
+ return h`<span class="${e === "start" ? "icon-start" : "icon-end"}">${z(i)}</span>`;
890
892
  }
891
893
  renderButton() {
892
894
  const e = this.text || this.textsecond;
@@ -926,9 +928,9 @@ let d = class extends Q {
926
928
  `;
927
929
  }
928
930
  };
929
- q(d);
931
+ T(d);
930
932
  d.formAssociated = !0;
931
- d.styles = k`
933
+ d.styles = C`
932
934
  :host {
933
935
  --button-border: transparent;
934
936
  --badge-outer-width: 19px;
@@ -1197,10 +1199,10 @@ u([
1197
1199
  r({ reflect: !0, attribute: "expanded" })
1198
1200
  ], d.prototype, "ariaExpanded", 2);
1199
1201
  d = u([
1200
- S("o-button")
1202
+ B("o-button")
1201
1203
  ], d);
1202
1204
  export {
1203
1205
  d as O,
1204
1206
  l as OccitaneSidePanel,
1205
- at as v
1207
+ lt as v
1206
1208
  };
@@ -2,7 +2,7 @@ import { i as f, m as p, a as u, x as m, t as d } from "../performance-mixin-D7Y
2
2
  import { n as a } from "../property-S_Y9cb04.mjs";
3
3
  import { o as v } from "../unsafe-svg-C3uTocNg.mjs";
4
4
  import "./icon-button.mjs";
5
- import { t as g } from "../icons-BZ0oOFaE.mjs";
5
+ import { t as g } from "../icons-registry.mjs";
6
6
  var y = Object.defineProperty, x = Object.getOwnPropertyDescriptor, o = (t, i, r, s) => {
7
7
  for (var n = s > 1 ? void 0 : s ? x(i, r) : i, l = t.length - 1, c; l >= 0; l--)
8
8
  (c = t[l]) && (n = (s ? c(i, r, n) : c(n)) || n);
@@ -9,7 +9,9 @@ export declare class OccitaneWishlistButton extends OccitaneWishlistButton_base
9
9
  bgstyle: string;
10
10
  ariaDescribedBy: string;
11
11
  label: string;
12
+ private _unsubOcc?;
12
13
  connectedCallback(): void;
14
+ disconnectedCallback(): void;
13
15
  protected firstUpdated(): void;
14
16
  private handleKeydown;
15
17
  private toggleStatus;
@@ -1,15 +1,15 @@
1
- import { i as u, m as p, a as d, x as h, t as b } from "../performance-mixin-D7YmSeqN.mjs";
1
+ import { i as d, m as p, a as b, x as h, t as f } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as r } from "../property-S_Y9cb04.mjs";
3
3
  import { o as g } from "../unsafe-svg-C3uTocNg.mjs";
4
- import { a as y } from "../icons-BZ0oOFaE.mjs";
5
- import { g as f } from "../svg-utils-wXxOZLnu.mjs";
6
- import { f as v, s as w } from "../css-C8WrrxT-.mjs";
7
- var m = Object.defineProperty, S = Object.getOwnPropertyDescriptor, o = (t, i, a, n) => {
8
- for (var e = n > 1 ? void 0 : n ? S(i, a) : i, l = t.length - 1, c; l >= 0; l--)
4
+ import { e as u, o as y, a as v } from "../icons-registry.mjs";
5
+ import { g as w } from "../svg-utils-DOL__czZ.mjs";
6
+ import { f as m, s as S } from "../css-C8WrrxT-.mjs";
7
+ var O = Object.defineProperty, x = Object.getOwnPropertyDescriptor, o = (t, i, a, n) => {
8
+ for (var e = n > 1 ? void 0 : n ? x(i, a) : i, l = t.length - 1, c; l >= 0; l--)
9
9
  (c = t[l]) && (e = (n ? c(i, a, e) : c(e)) || e);
10
- return n && e && m(i, a, e), e;
10
+ return n && e && O(i, a, e), e;
11
11
  };
12
- let s = class extends p(d) {
12
+ let s = class extends p(b) {
13
13
  constructor() {
14
14
  super(...arguments), this.status = "empty", this.icon = "occ-wishlist-outlined", this.bgstyle = "none-contrast", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
15
15
  this.status = this.status === "empty" ? "filled" : "empty", this.icon = this.status === "filled" ? "occ-wishlist-filled" : "occ-wishlist-outlined", this.bgstyle = this.status === "filled" ? "none-contrast" : "none-light", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
@@ -20,7 +20,11 @@ let s = class extends p(d) {
20
20
  };
21
21
  }
22
22
  connectedCallback() {
23
- super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-pressed", String(this.status === "filled"));
23
+ super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-pressed", String(this.status === "filled")), u("occ-wishlist-outlined"), u("occ-wishlist-filled"), this._unsubOcc = y(() => this.requestUpdate());
24
+ }
25
+ disconnectedCallback() {
26
+ var t;
27
+ (t = this._unsubOcc) == null || t.call(this), super.disconnectedCallback();
24
28
  }
25
29
  firstUpdated() {
26
30
  this.addEventListener("click", this.toggleStatus), this.addEventListener("keydown", this.handleKeydown);
@@ -29,9 +33,9 @@ let s = class extends p(d) {
29
33
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), this.toggleStatus());
30
34
  }
31
35
  render() {
32
- const t = y[this.icon] ?? "";
36
+ const t = v[this.icon] ?? "";
33
37
  if (!t) return h``;
34
- const i = f(t);
38
+ const i = w(t);
35
39
  return h`
36
40
  <button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
37
41
  <span class="sr-only">${this.label}</span>
@@ -49,7 +53,7 @@ let s = class extends p(d) {
49
53
  this.label = t, this.requestUpdate();
50
54
  }
51
55
  };
52
- s.styles = u`
56
+ s.styles = d`
53
57
  :host {
54
58
  display: inline-flex;
55
59
  justify-content: center;
@@ -79,7 +83,7 @@ s.styles = u`
79
83
  }
80
84
 
81
85
  .wishlist-button:focus-visible {
82
- ${v};
86
+ ${m};
83
87
  }
84
88
 
85
89
  .wishlist-button:hover svg path {
@@ -97,7 +101,7 @@ s.styles = u`
97
101
  }
98
102
 
99
103
  .sr-only {
100
- ${w}
104
+ ${S}
101
105
  }
102
106
 
103
107
  :host([icon="occ-wishlist-outlined"][bgstyle="none-contrast"]) .wishlist-button svg path {
@@ -125,7 +129,7 @@ o([
125
129
  r({ type: String, reflect: !0 })
126
130
  ], s.prototype, "label", 2);
127
131
  s = o([
128
- b("o-wishlist-button")
132
+ f("o-wishlist-button")
129
133
  ], s);
130
134
  export {
131
135
  s as OccitaneWishlistButton