@florid-kit/components 2.6.17 → 3.0.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.
Files changed (70) hide show
  1. package/assets/icons/icons-occ.d.ts +315 -0
  2. package/assets/icons/icons.d.ts +12 -84
  3. package/assets/icons/svg-utils.d.ts +13 -0
  4. package/behaviors/performance-mixin.d.ts +0 -23
  5. package/behaviors/performance-reporter.d.ts +1 -0
  6. package/components/accordion-group.mjs +61 -0
  7. package/components/accordion.mjs +185 -0
  8. package/components/arch-image.mjs +135 -0
  9. package/components/badge.mjs +75 -0
  10. package/components/breadcrumb.mjs +83 -0
  11. package/components/breadcrumbs.mjs +35 -0
  12. package/components/button.d.ts +3 -0
  13. package/components/button.mjs +12 -0
  14. package/components/checkbox.mjs +188 -0
  15. package/components/chip.mjs +158 -0
  16. package/components/chipset.mjs +44 -0
  17. package/components/dots.mjs +60 -0
  18. package/components/dropdown-variant.d.ts +1 -0
  19. package/components/dropdown-variant.mjs +446 -0
  20. package/components/dropdown.d.ts +1 -0
  21. package/components/dropdown.mjs +303 -0
  22. package/components/feedback-message.mjs +136 -0
  23. package/components/filter-chip.mjs +215 -0
  24. package/components/footer-simplify.mjs +178 -0
  25. package/components/header-simplify.mjs +234 -0
  26. package/components/icon-button.d.ts +5 -0
  27. package/components/icon-button.mjs +340 -0
  28. package/components/input.mjs +298 -0
  29. package/components/link.mjs +172 -0
  30. package/components/mediumtile.mjs +307 -0
  31. package/components/minitile.mjs +234 -0
  32. package/components/option-tile-group.mjs +105 -0
  33. package/components/option-tile.mjs +413 -0
  34. package/components/popin.mjs +412 -0
  35. package/components/radio.mjs +165 -0
  36. package/components/rating.mjs +81 -0
  37. package/components/reassurance.mjs +163 -0
  38. package/components/search-input-dropdown.mjs +314 -0
  39. package/components/search-input.mjs +107 -0
  40. package/components/side-panel.mjs +1206 -0
  41. package/components/tab.mjs +140 -0
  42. package/components/tablist.mjs +44 -0
  43. package/components/tag.mjs +86 -0
  44. package/components/textarea.mjs +269 -0
  45. package/components/thumbnail-navigation.mjs +232 -0
  46. package/components/toast.mjs +191 -0
  47. package/components/tooltip.mjs +125 -0
  48. package/components/wishlist-button.mjs +132 -0
  49. package/css-C8WrrxT-.mjs +41 -0
  50. package/css.d.ts +1 -0
  51. package/directive-helpers-BHuwIghp.mjs +11 -0
  52. package/directive-oAbCiebi.mjs +27 -0
  53. package/element-internals-Dw7LndlH.mjs +19 -0
  54. package/icons-Pdn_6YtT.mjs +104 -0
  55. package/icons-occ.mjs +834 -0
  56. package/if-defined-j0wE2gL4.mjs +10 -0
  57. package/index.mjs +41 -9712
  58. package/live-C_TUoYRm.mjs +30 -0
  59. package/loader.d.ts +3 -0
  60. package/loader.mjs +78 -0
  61. package/logo-CEgaTL93.mjs +4 -0
  62. package/package.json +19 -1
  63. package/performance-mixin-D7YmSeqN.mjs +628 -0
  64. package/performance-reporter-B7ZOqnDk.mjs +89 -0
  65. package/property-S_Y9cb04.mjs +36 -0
  66. package/query-NJDNu0-P.mjs +25 -0
  67. package/state-DjMxXomO.mjs +12 -0
  68. package/svg-utils-CRDBD8ES.mjs +47 -0
  69. package/unsafe-svg-C3uTocNg.mjs +34 -0
  70. package/index.js +0 -5748
@@ -0,0 +1,1206 @@
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";
2
+ import { n as r } from "../property-S_Y9cb04.mjs";
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, i as _ } from "../icons-Pdn_6YtT.mjs";
6
+ import { g as I } from "../svg-utils-CRDBD8ES.mjs";
7
+ import { o as F } from "../unsafe-svg-C3uTocNg.mjs";
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";
11
+ /**
12
+ * @license
13
+ * Copyright 2023 Google LLC
14
+ * SPDX-License-Identifier: Apache-2.0
15
+ */
16
+ function q(e) {
17
+ e.addInitializer((t) => {
18
+ const o = t;
19
+ o.addEventListener("click", async (i) => {
20
+ const { type: n, [B]: s } = o, { form: a } = s;
21
+ if (!(!a || n === "button") && (await new Promise((b) => {
22
+ setTimeout(b);
23
+ }), !i.defaultPrevented)) {
24
+ if (n === "reset") {
25
+ a.reset();
26
+ return;
27
+ }
28
+ a.addEventListener(
29
+ "submit",
30
+ (b) => {
31
+ Object.defineProperty(b, "submitter", {
32
+ configurable: !0,
33
+ enumerable: !0,
34
+ get: () => o
35
+ });
36
+ },
37
+ { capture: !0, once: !0 }
38
+ ), s.setFormValue(o.value), a.requestSubmit();
39
+ }
40
+ });
41
+ });
42
+ }
43
+ /**
44
+ * @license
45
+ * Copyright 2017 Google LLC
46
+ * SPDX-License-Identifier: BSD-3-Clause
47
+ */
48
+ const y = (e, t) => {
49
+ var i;
50
+ const o = e._$AN;
51
+ if (o === void 0) return !1;
52
+ for (const n of o) (i = n._$AO) == null || i.call(n, t, !1), y(n, t);
53
+ return !0;
54
+ }, m = (e) => {
55
+ let t, o;
56
+ do {
57
+ if ((t = e._$AM) === void 0) break;
58
+ o = t._$AN, o.delete(e), e = t;
59
+ } while ((o == null ? void 0 : o.size) === 0);
60
+ }, E = (e) => {
61
+ for (let t; t = e._$AM; e = t) {
62
+ let o = t._$AN;
63
+ if (o === void 0) t._$AN = o = /* @__PURE__ */ new Set();
64
+ else if (o.has(e)) break;
65
+ o.add(e), M(t);
66
+ }
67
+ };
68
+ function T(e) {
69
+ this._$AN !== void 0 ? (m(this), this._$AM = e, E(this)) : this._$AM = e;
70
+ }
71
+ function H(e, t = !1, o = 0) {
72
+ const i = this._$AH, n = this._$AN;
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
+ else i != null && (y(i, !1), m(i));
75
+ else y(this, e);
76
+ }
77
+ const M = (e) => {
78
+ e.type == L.CHILD && (e._$AP ?? (e._$AP = H), e._$AQ ?? (e._$AQ = T));
79
+ };
80
+ class j extends z {
81
+ constructor() {
82
+ super(...arguments), this._$AN = void 0;
83
+ }
84
+ _$AT(t, o, i) {
85
+ super._$AT(t, o, i), E(this), this.isConnected = t._$AU;
86
+ }
87
+ _$AO(t, o = !0) {
88
+ var i, n;
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
+ }
91
+ setValue(t) {
92
+ if (R(this._$Ct)) this._$Ct._$AI(t, this);
93
+ else {
94
+ const o = [...this._$Ct._$AH];
95
+ o[this._$Ci] = t, this._$Ct._$AI(o, this, 0);
96
+ }
97
+ }
98
+ disconnected() {
99
+ }
100
+ reconnected() {
101
+ }
102
+ }
103
+ class K extends j {
104
+ constructor() {
105
+ super(...arguments), this.prevData = {};
106
+ }
107
+ render(t) {
108
+ return p;
109
+ }
110
+ update(t, [o]) {
111
+ var i;
112
+ this.element !== t.element && (this.element = t.element), this.host = ((i = t.options) === null || i === void 0 ? void 0 : i.host) || this.element, this.apply(o), this.groom(o), this.prevData = { ...o };
113
+ }
114
+ apply(t) {
115
+ if (!t)
116
+ return;
117
+ const { prevData: o, element: i } = this;
118
+ for (const n in t) {
119
+ const s = t[n];
120
+ s !== o[n] && (i[n] = s);
121
+ }
122
+ }
123
+ groom(t) {
124
+ const { prevData: o, element: i } = this;
125
+ if (o)
126
+ for (const n in o)
127
+ (!t || !(n in t) && i[n] === o[n]) && (i[n] = void 0);
128
+ }
129
+ }
130
+ class N extends K {
131
+ constructor() {
132
+ super(...arguments), this.eventData = {};
133
+ }
134
+ apply(t) {
135
+ if (t)
136
+ for (const o in t) {
137
+ const i = t[o];
138
+ i !== this.eventData[o] && this.applyEvent(o, i);
139
+ }
140
+ }
141
+ applyEvent(t, o) {
142
+ const { prevData: i, element: n } = this;
143
+ this.eventData[t] = o, i[t] && n.removeEventListener(t, this, o), n.addEventListener(t, this, o);
144
+ }
145
+ groom(t) {
146
+ const { prevData: o, element: i } = this;
147
+ if (o)
148
+ for (const n in o)
149
+ (!t || !(n in t) && i[n] === o[n]) && this.groomEvent(n, o[n]);
150
+ }
151
+ groomEvent(t, o) {
152
+ const { element: i } = this;
153
+ delete this.eventData[t], i.removeEventListener(t, this, o);
154
+ }
155
+ handleEvent(t) {
156
+ const o = this.eventData[t.type];
157
+ typeof o == "function" ? o.call(this.host, t) : o.handleEvent(t);
158
+ }
159
+ disconnected() {
160
+ const { eventData: t, element: o } = this;
161
+ for (const i in t) {
162
+ const n = i.slice(1), s = t[i];
163
+ o.removeEventListener(n, this, s);
164
+ }
165
+ }
166
+ reconnected() {
167
+ const { eventData: t, element: o } = this;
168
+ for (const i in t) {
169
+ const n = i.slice(1), s = t[i];
170
+ o.addEventListener(n, this, s);
171
+ }
172
+ }
173
+ }
174
+ class V extends N {
175
+ apply(t) {
176
+ if (!t)
177
+ return;
178
+ const { prevData: o, element: i } = this;
179
+ for (const n in t) {
180
+ const s = t[n];
181
+ if (s === o[n])
182
+ continue;
183
+ const a = n.slice(1);
184
+ switch (n[0]) {
185
+ case "@":
186
+ this.eventData[a] = s, this.applyEvent(a, s);
187
+ break;
188
+ case ".":
189
+ i[a] = s;
190
+ break;
191
+ case "?":
192
+ s ? i.setAttribute(a, "") : i.removeAttribute(a);
193
+ break;
194
+ default:
195
+ s != null ? i.setAttribute(n, String(s)) : i.removeAttribute(n);
196
+ break;
197
+ }
198
+ }
199
+ }
200
+ groom(t) {
201
+ const { prevData: o, element: i } = this;
202
+ if (o)
203
+ for (const n in o) {
204
+ const s = n.slice(1);
205
+ if (!t || !(n in t) && i[s] === o[n])
206
+ switch (n[0]) {
207
+ case "@":
208
+ this.groomEvent(s, o[n]);
209
+ break;
210
+ case ".":
211
+ i[s] = void 0;
212
+ break;
213
+ case "?":
214
+ i.removeAttribute(s);
215
+ break;
216
+ default:
217
+ i.removeAttribute(n);
218
+ break;
219
+ }
220
+ }
221
+ }
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--)
226
+ (a = e[s]) && (n = (i ? a(t, o, n) : a(n)) || n);
227
+ return i && n && X(t, o, n), n;
228
+ };
229
+ let l = class extends C(w) {
230
+ constructor() {
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
+ var o, i;
233
+ const t = ((o = e.detail) == null ? void 0 : o.origin) ?? document.activeElement;
234
+ if (this._detailOriginEl = t, this._detailOriginClass = (t == null ? void 0 : t.className) ?? "", this.showDetail = !0, this.showHeaderStartIcon = !0, await this.updateComplete, this._detailOriginClass) {
235
+ const n = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".detail-view");
236
+ n && n.setAttribute("fromelement", this._detailOriginClass);
237
+ }
238
+ await this.focusDetailReturnBtn();
239
+ }, this._detailOriginEl = null, this._detailOriginClass = "", this.handleKeyDown = (e) => {
240
+ this.open && (e.key === "Escape" ? this.closePanel() : e.key === "Tab" && this.trapFocus(e));
241
+ }, this.handleClosePanel = (e) => {
242
+ if (e instanceof KeyboardEvent && e.key !== "Enter" && e.key !== " ")
243
+ return;
244
+ e.preventDefault(), e.stopPropagation();
245
+ const t = e.currentTarget, o = (t == null ? void 0 : t.getAttribute("data-role")) === "back";
246
+ if (this.showDetail && o) {
247
+ this.isHidingDetail = !0;
248
+ const i = this.renderRoot.querySelector(".content"), n = async () => {
249
+ this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1, await this.updateComplete, this._restoreFocusToOrigin();
250
+ };
251
+ if (i) {
252
+ this.showHeaderStartIcon = !1;
253
+ const s = () => {
254
+ this.showDetail = !1, this.isHidingDetail = !1, i.removeEventListener("animationend", s), n();
255
+ };
256
+ i.addEventListener("animationend", s);
257
+ } else
258
+ this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1;
259
+ return;
260
+ }
261
+ this.closePanel();
262
+ };
263
+ }
264
+ focusFirstInPanel() {
265
+ var t, o, i;
266
+ (i = this.getFocusableElements().map((n) => this.resolveFocusable(n)).filter((n) => !!n && !n.hasAttribute("disabled"))[0] ?? ((t = this.shadowRoot) == null ? void 0 : t.querySelector(".close-btn")) ?? ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".panel"))) == null || i.focus({ preventScroll: !0 });
267
+ }
268
+ resolveFocusable(e) {
269
+ var o;
270
+ const t = e.tagName.toLowerCase();
271
+ return t === "o-icon-button" || t === "o-button" ? ((o = e.shadowRoot) == null ? void 0 : o.querySelector("button, .button")) ?? e : e;
272
+ }
273
+ connectedCallback() {
274
+ super.connectedCallback(), !this.disablePortal && this.parentElement !== document.body && document.body.appendChild(this), this.addEventListener("keydown", this.handleKeyDown), this.updateComplete.then(() => {
275
+ this.initialized = !0;
276
+ }), this.addEventListener("open-detail", this._onOpenDetail), this.addEventListener("focusin", (e) => {
277
+ e.composedPath()[0] === this && this.focusFirstInPanel();
278
+ });
279
+ }
280
+ disconnectedCallback() {
281
+ document.body.style.overflow = "", document.body.removeAttribute("data-side-panel"), this.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback(), this.removeEventListener("open-detail", this._onOpenDetail);
282
+ }
283
+ async focusDetailReturnBtn() {
284
+ var n, s, a, b, f;
285
+ await this.updateComplete;
286
+ const e = this.getDeepActiveElement(document);
287
+ if (e && e !== document.body)
288
+ try {
289
+ e.blur();
290
+ } catch {
291
+ }
292
+ await new Promise(requestAnimationFrame);
293
+ const t = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".detail-view .return-btn");
294
+ if (!t) return;
295
+ t.updateComplete && await t.updateComplete, (b = (a = ((s = t.shadowRoot) == null ? void 0 : s.querySelector("button")) ?? t) == null ? void 0 : a.focus) == null || b.call(a, { preventScroll: !0 });
296
+ const i = (f = this.shadowRoot) == null ? void 0 : f.querySelector('.panel[role="dialog"]');
297
+ i && i.setAttribute("aria-label", this.labelAriaDialogPanel || "panel-title");
298
+ }
299
+ _restoreFocusToOrigin() {
300
+ var t, o;
301
+ const e = this._detailOriginEl;
302
+ !e || !document.contains(e) || ((o = (t = document.activeElement) == null ? void 0 : t.blur) == null || o.call(t), requestAnimationFrame(() => {
303
+ var n;
304
+ e.classList.add("a--tabfocus"), (((n = e.shadowRoot) == null ? void 0 : n.querySelector('button, .button, [tabindex]:not([tabindex="-1"])')) ?? null ?? e).focus({ preventScroll: !0 });
305
+ }));
306
+ }
307
+ getDeepActiveElement(e = this.shadowRoot) {
308
+ let t = e.activeElement;
309
+ for (; t && t.shadowRoot && t.shadowRoot.activeElement; )
310
+ t = t.shadowRoot.activeElement;
311
+ return t;
312
+ }
313
+ trapFocus(e) {
314
+ var s;
315
+ if (e.key !== "Tab") return;
316
+ const t = this.shadowRoot;
317
+ if (!t) return;
318
+ const o = this.getDeepActiveElement();
319
+ if (this.showDetail) {
320
+ const a = t.querySelector(".detail-view .return-btn"), b = t.querySelector(".detail-view .close-btn"), f = a ? this.resolveFocusable(a) : null, v = b ? this.resolveFocusable(b) : null;
321
+ if (e.shiftKey && f && o === f && v) {
322
+ e.preventDefault(), e.stopPropagation(), v.focus({ preventScroll: !0 });
323
+ return;
324
+ }
325
+ if (!e.shiftKey && v && o === v) {
326
+ e.preventDefault(), e.stopPropagation(), (((s = t.querySelector(".detail-scroller")) == null ? void 0 : s.querySelector(
327
+ l.focusablesSelector
328
+ )) ?? f ?? v).focus({ preventScroll: !0 });
329
+ return;
330
+ }
331
+ }
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();
335
+ };
336
+ if (b && v) {
337
+ if (!e.shiftKey && o === v) return g(b);
338
+ if (e.shiftKey && o === b) return g(v);
339
+ }
340
+ }
341
+ const n = this.renderRoot.querySelector(".close-btn");
342
+ if (!e.shiftKey && n && n.contains(o)) {
343
+ e.preventDefault();
344
+ const a = this.renderRoot.querySelector(
345
+ ".o-whats-inside--content p"
346
+ );
347
+ a == null || a.focus();
348
+ }
349
+ }
350
+ getFocusableElements() {
351
+ const e = this.renderRoot.querySelector(".panel");
352
+ if (!e) return [];
353
+ function t(n) {
354
+ return !(n.disabled || n.hasAttribute("disabled") || n.hasAttribute("tabindex") && n.getAttribute("tabindex") === "-1");
355
+ }
356
+ function o(n) {
357
+ var a;
358
+ const s = [n.matches(l.focusablesSelector) ? n : []];
359
+ if (!["o-icon-button", "o-button"].includes(n.tagName.toLowerCase())) {
360
+ const b = Array.from(
361
+ n instanceof HTMLSlotElement ? n.assignedElements({ flatten: !0 }) : []
362
+ ).filter(t).flatMap(o), f = Array.from(
363
+ ((a = n.shadowRoot) == null ? void 0 : a.querySelectorAll("*")) || []
364
+ ).filter(t).flatMap(o);
365
+ s.push(...b, ...f);
366
+ }
367
+ return s.flat();
368
+ }
369
+ return Array.from(e.querySelectorAll("*")).filter(t).flatMap(o);
370
+ }
371
+ openPanel() {
372
+ var t;
373
+ this.removeAttribute("hidden"), this.getBoundingClientRect(), this.previousFocusedElement = document.activeElement, this.previousFocusedSelector = (t = this.previousFocusedElement) == null ? void 0 : t.getAttribute("paneltarget"), this.open = !0, document.body.style.overflow = "hidden", document.body.setAttribute("data-side-panel", "open");
374
+ const e = this.renderRoot.querySelector(".panel");
375
+ e && e.setAttribute("aria-modal", "true"), this.updateComplete.then(() => {
376
+ var o, i;
377
+ if (this.showHeader) {
378
+ const n = (o = this.shadowRoot) == null ? void 0 : o.querySelector(".panel .close-btn"), s = this.resolveFocusable(n);
379
+ (i = s == null ? void 0 : s.focus) == null || i.call(s, { preventScroll: !0 });
380
+ } else
381
+ this.focusFirstInPanel();
382
+ }), this.dispatchEvent(
383
+ new CustomEvent("open", { bubbles: !0, composed: !0 })
384
+ );
385
+ }
386
+ closePanel() {
387
+ var o, i, n;
388
+ this.open = !1, this.showDetail = !1, document.body.style.overflow = "", document.body.removeAttribute("data-side-panel");
389
+ let e = this.previousFocusedElement;
390
+ e != null && e.isConnected || (e = document.querySelector(`[paneltarget="${this.previousFocusedSelector}"]`)), (e == null ? void 0 : e.tagName.toLowerCase()) === "o-button" ? (n = (i = (o = e.shadowRoot) == null ? void 0 : o.querySelector(".button")) == null ? void 0 : i.focus) == null || n.call(i) : e == null || e.focus();
391
+ const t = this.renderRoot.querySelector(".panel");
392
+ t && t.removeAttribute("aria-modal"), this.dispatchEvent(
393
+ new CustomEvent("close", { bubbles: !0, composed: !0 })
394
+ );
395
+ }
396
+ handleFirstClick(e) {
397
+ e instanceof KeyboardEvent && e.key !== "Enter" && e.key !== " " || (e.preventDefault(), e.stopPropagation(), this.onFirstButtonClickClose && this.closePanel(), this.dispatchEvent(
398
+ new CustomEvent("firstbuttonclick", {
399
+ bubbles: !0,
400
+ composed: !0,
401
+ cancelable: !0,
402
+ detail: {
403
+ button: "first",
404
+ target: e.target
405
+ }
406
+ })
407
+ ));
408
+ }
409
+ handleSecondClick(e) {
410
+ e instanceof KeyboardEvent && e.key !== "Enter" && e.key !== " " || (e.preventDefault(), e.stopPropagation(), this.onSecondButtonClickClose && this.closePanel(), this.dispatchEvent(
411
+ new CustomEvent("secondbuttonclick", {
412
+ bubbles: !0,
413
+ composed: !0,
414
+ cancelable: !0,
415
+ detail: {
416
+ button: "second",
417
+ target: e.target
418
+ }
419
+ })
420
+ ));
421
+ }
422
+ updated() {
423
+ this.style.setProperty("--z-overlay", `${this.zIndex || 99}`), this.style.setProperty("--z-panel", `${this.zIndex ? this.zIndex + 1 : 99}`), this.open ? (this._hideTimeout && (clearTimeout(this._hideTimeout), this._hideTimeout = null), this.removeAttribute("hidden")) : this._hideTimeout = setTimeout(() => {
424
+ this.setAttribute("hidden", "hidden");
425
+ }, 500);
426
+ }
427
+ render() {
428
+ const e = this.showHeader ? h`
429
+ <div tabindex="-1" part="header" class="header ${this.showDetail ? "detail-view-header" : ""}">
430
+ ${this.showHeaderStartIcon ? h`
431
+ <o-icon-button
432
+ icon="arrowLeft"
433
+ size="small"
434
+ class="return-btn"
435
+ bgstyle="background-light"
436
+ data-role="back"
437
+ @click=${this.handleClosePanel}
438
+ @keydown=${this.handleClosePanel}
439
+ srlabel="${this.goBackButtonLabel} ${this.labelDialog}"
440
+ showsrlabel="true"
441
+ ></o-icon-button>
442
+ ` : null}
443
+ <div class="header-title-container" >
444
+ <p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
445
+ ${this.headerTitle}
446
+ </p>
447
+ ${this.addToBagProductCount ? h`<span class="a-quantity">${this.addToBagProductCount}</span>` : null}
448
+ </div>
449
+ <o-icon-button
450
+ icon="occ-close-outlined"
451
+ size="small"
452
+ class="close-btn"
453
+ bgstyle="background-light"
454
+ @click=${this.handleClosePanel}
455
+ @keydown=${this.handleClosePanel}
456
+ srlabel="${this.closeButtonLabel}"
457
+ ?showsrlabel=${!0}
458
+ aria-describedby="panel-title"
459
+ ></o-icon-button>
460
+ </div>
461
+ ` : null, t = this.showFooter ? h`
462
+ <div class="footer" part="footer">
463
+ ${this.firstButtonVariant && this.firstButtonLabel ? h`
464
+ <o-button
465
+ .variant=${this.firstButtonVariant}
466
+ @click=${this.handleFirstClick}
467
+ @keydown=${this.handleFirstClick}
468
+ ${$(this.firstButtonProps)}
469
+ >
470
+ ${this.firstButtonLabel}
471
+ </o-button>
472
+ ` : null}
473
+ ${this.secondButtonVariant && this.secondButtonLabel ? h`
474
+ <o-button
475
+ .variant=${this.secondButtonVariant}
476
+ @click=${this.handleSecondClick}
477
+ @keydown=${this.handleSecondClick}
478
+ ${$(this.secondButtonProps)}
479
+ >
480
+ ${this.secondButtonLabel}
481
+ </o-button>
482
+ ` : null}
483
+ </div>
484
+ ` : null;
485
+ return h`
486
+ <div class="overlay" style="z-index: ${this.zIndex}" @click=${this.handleClosePanel}></div>
487
+ <div
488
+ class="panel"
489
+ role="dialog"
490
+ aria-modal="true"
491
+ aria-label="${this.labelAriaDialogPanel || "panel-title"}"
492
+ style="z-index: ${this.zIndex + 1}"
493
+ tabindex="-1"
494
+ >
495
+ <div role="document">
496
+ ${e}
497
+
498
+ <div part="content" class="content ${this.isHidingDetail ? "slide-out-right" : ""} ${this.showDetail ? "with-detail" : ""}">
499
+
500
+ ${this.showDetail ? h`
501
+ <div class="detail-view">
502
+ ${e}
503
+ <div class="detail-content">
504
+ <div class="detail-scroller">
505
+ <slot name="detail"></slot>
506
+ </div>
507
+ </div>
508
+ </div>
509
+ ` : h`<slot></slot>`}
510
+ </div>
511
+
512
+ ${this.stickyFooter ? null : t}
513
+ </div>
514
+ ${this.stickyFooter ? t : null}
515
+ </div>
516
+ `;
517
+ }
518
+ };
519
+ l.styles = k`
520
+ :host {
521
+ --z-overlay: 99;
522
+ --z-panel: 100;
523
+ position: fixed;
524
+ top: 0;
525
+ right: 0;
526
+ height: 100%;
527
+ width: 100%;
528
+ pointer-events: none;
529
+ z-index: var(--z-overlay);
530
+ --side-panel-width: 100%;
531
+ --side-panel-max-width: 416px;
532
+ --font-size: var(--font-size-300);
533
+ --line-height: var(--line-height-240);
534
+ }
535
+
536
+ /* Hide content until it is initialized */
537
+ :host(:not([initialized])) .content {
538
+ display: none;
539
+ }
540
+
541
+ /* hide the host completely until its initialized */
542
+ :host(:not([initialized])) {
543
+ display: none !important;
544
+ }
545
+
546
+ .overlay {
547
+ position: absolute;
548
+ inset: 0;
549
+ backdrop-filter: blur(4px);
550
+ background-color: rgba(0, 0, 0, 0.3);
551
+ opacity: 0;
552
+ transition: opacity 0.3s ease;
553
+ pointer-events: none;
554
+ z-index: var(--z-overlay);
555
+ }
556
+
557
+ :host([open]) .overlay {
558
+ opacity: 1;
559
+ pointer-events: auto;
560
+ }
561
+
562
+ .panel {
563
+ position: absolute;
564
+ top: 0;
565
+ right: 0;
566
+ width: var(--side-panel-width);
567
+ max-width: var(--side-panel-max-width);
568
+ height: 100%;
569
+ background: white;
570
+ box-shadow: var(--colors-alpha-dark-60);
571
+ transform: translateX(100%);
572
+ transition: transform 0.3s ease;
573
+ display: flex;
574
+ flex-direction: column;
575
+ pointer-events: auto;
576
+ z-index: var(--z-panel);
577
+ }
578
+
579
+ :host([open]) .panel {
580
+ transform: translateX(0%);
581
+ }
582
+
583
+ .header {
584
+ flex: 0 0 auto;
585
+ display: flex;
586
+ align-items: center;
587
+ gap: 8px;
588
+ padding: 20px 16px;
589
+ border-bottom: var(--border-050) solid var(--color-border-tertiary);
590
+ }
591
+
592
+ .header .header-title-container {
593
+ display: flex;
594
+ flex-direction: row;
595
+ align-items: center;
596
+ column-gap: 8px;
597
+ flex: 1 1 auto;
598
+ min-width: 0;
599
+ }
600
+
601
+ .header .panel-title {
602
+ font-family: var(--font-family-loccitane-serif);
603
+ font-size: var(--font-size);
604
+ font-weight: var(--font-weight-400);
605
+ line-height: var(--line-height);
606
+ font-style: var(--font-weight-italic);
607
+ display: -webkit-box;
608
+ -webkit-line-clamp: 2;
609
+ -webkit-box-orient: vertical;
610
+ height: auto;
611
+ margin-top: auto;
612
+ margin-bottom: auto;
613
+ overflow: hidden;
614
+ padding-right: 6px;
615
+ color: var(--color-content-heading);
616
+ flex: 0 1 auto;
617
+ max-width: 100%;
618
+ min-width: 0;
619
+ }
620
+
621
+ .header .a-quantity {
622
+ border-radius: var(--radius-full, 999px);
623
+ border: var(--border-s, 0.5px) solid var(--color-border-primary, #3F2B2E);
624
+ background: var(--color-container-brand-accent, #FFC700);
625
+ overflow: hidden;
626
+ color: var(--color-content-body, #3F2B2E);
627
+ text-align: center;
628
+ text-overflow: ellipsis;
629
+ font-family: var(--font-family-loccitane-sans);
630
+ font-size: var(--font-size-100, 12px);
631
+ font-weight: var(--font-weight-400, 400);
632
+ line-height: var(--line-height-160, 16px);
633
+ letter-spacing: var(--letter-spacing-000, 0);
634
+ width: 16px;
635
+ height: 16px;
636
+ flex-shrink: 0;
637
+ }
638
+
639
+ .header .close-btn {
640
+ margin-left: 8px;
641
+ margin-top: 0;
642
+ flex-direction: column;
643
+ justify-content: start;
644
+ margin-left: auto;
645
+ }
646
+
647
+ .header .return-btn {
648
+ margin-right: 8px;
649
+ }
650
+
651
+ .header.detail-view-header {
652
+ display: none;
653
+ }
654
+
655
+ .detail-view .header.detail-view-header {
656
+ display: flex;
657
+ }
658
+
659
+ .panel:focus-visible,
660
+ .close-btn:focus-visible {
661
+ ${x}
662
+ }
663
+
664
+ [role="document"] {
665
+ overflow-y: auto;
666
+ overflow-x: hidden;
667
+ }
668
+
669
+ .content {
670
+ flex: 1 1 auto;
671
+ padding: var(--spacing-xl);
672
+ }
673
+
674
+ .content.with-detail {
675
+ width: 100%;
676
+ height: 100%;
677
+ position: absolute;
678
+ top: 0;
679
+ left: 0;
680
+ background: var(--color-container-bg-white);
681
+ z-index: 3;
682
+ padding: var(--spacing-4-xs);
683
+ }
684
+
685
+ .footer {
686
+ flex: 0 0 auto;
687
+ padding: var(--spacing-xl);
688
+ border-top: var(--border-050) solid var(--color-border-tertiary);
689
+ display: flex;
690
+ flex-direction: column;
691
+ gap: var(--spacing-l);
692
+ justify-content: flex-start;
693
+ }
694
+
695
+ :host([stickyfooter]) [role="document"] {
696
+ flex: 1 1 auto;
697
+ overflow-y: auto;
698
+ display: flex;
699
+ flex-direction: column;
700
+ }
701
+
702
+ /* Mobile */
703
+ @media (max-width: 767px) {
704
+ :host {
705
+ --side-panel-width: 100%;
706
+ --side-panel-max-width: none;
707
+ }
708
+ }
709
+
710
+ /* Tablet */
711
+ @media (min-width: 768px) and (max-width: 1024px) {
712
+ :host {
713
+ --side-panel-width: 375px;
714
+ --side-panel-max-width: 375px;
715
+ }
716
+ }
717
+
718
+ @media (min-width: 1025px) {
719
+ :host {
720
+ --side-panel-width: 100%;
721
+ --side-panel-max-width: 416px;
722
+ --font-size: var(--font-size-400);
723
+ --line-height: var(--line-height-280);
724
+ }
725
+ }
726
+
727
+ @keyframes slideInRight {
728
+ from {
729
+ transform: translateX(100%);
730
+ }
731
+ to {
732
+ transform: translateX(0%);
733
+ }
734
+ }
735
+
736
+ @keyframes slideOutRight {
737
+ from {
738
+ transform: translateX(0%);
739
+ }
740
+ to {
741
+ transform: translateX(100%);
742
+ }
743
+ }
744
+
745
+ .slide-out-right {
746
+ animation: slideOutRight 0.3s ease-in forwards;
747
+ }
748
+
749
+ .detail-view {
750
+ animation: slideInRight 0.3s ease-out both;
751
+ }
752
+ .detail-content {
753
+ padding: var(--spacing-xl);
754
+ }
755
+
756
+ .detail-scroller {
757
+ height: calc(100vh - 91px);
758
+ overflow: auto;
759
+ box-sizing: border-box;
760
+ }
761
+ `;
762
+ l.focusablesSelector = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';
763
+ l.focusablesCustomElementsSelector = "o-icon-button, o-button";
764
+ l.shadowRootOptions = {
765
+ ...w.shadowRootOptions,
766
+ // This helps send focus into the first focusable in shadow when host is focused
767
+ delegatesFocus: !0
768
+ };
769
+ c([
770
+ r({ type: Boolean, reflect: !0 })
771
+ ], l.prototype, "open", 2);
772
+ c([
773
+ r({ type: Boolean })
774
+ ], l.prototype, "showHeader", 2);
775
+ c([
776
+ r({ type: Boolean })
777
+ ], l.prototype, "showFooter", 2);
778
+ c([
779
+ r({ type: Boolean })
780
+ ], l.prototype, "showHeaderStartIcon", 2);
781
+ c([
782
+ r({ type: String })
783
+ ], l.prototype, "headerTitle", 2);
784
+ c([
785
+ r({ type: String })
786
+ ], l.prototype, "headerTitleClassName", 2);
787
+ c([
788
+ r({ type: String })
789
+ ], l.prototype, "labelDialog", 2);
790
+ c([
791
+ r({ type: String })
792
+ ], l.prototype, "labelAriaDialogPanel", 2);
793
+ c([
794
+ r({ type: String })
795
+ ], l.prototype, "addToBagProductCount", 2);
796
+ c([
797
+ r({ type: String })
798
+ ], l.prototype, "closeButtonLabel", 2);
799
+ c([
800
+ r({ type: String })
801
+ ], l.prototype, "goBackButtonLabel", 2);
802
+ c([
803
+ r({ type: String })
804
+ ], l.prototype, "firstButtonLabel", 2);
805
+ c([
806
+ r({ type: String })
807
+ ], l.prototype, "firstButtonVariant", 2);
808
+ c([
809
+ r({ type: Object })
810
+ ], l.prototype, "firstButtonProps", 2);
811
+ c([
812
+ r({ type: Boolean })
813
+ ], l.prototype, "onFirstButtonClickClose", 2);
814
+ c([
815
+ r({ type: String })
816
+ ], l.prototype, "secondButtonLabel", 2);
817
+ c([
818
+ r({ type: String })
819
+ ], l.prototype, "secondButtonVariant", 2);
820
+ c([
821
+ r({ type: Object })
822
+ ], l.prototype, "secondButtonProps", 2);
823
+ c([
824
+ r({ type: Boolean })
825
+ ], l.prototype, "onSecondButtonClickClose", 2);
826
+ c([
827
+ r({ type: Boolean, reflect: !0 })
828
+ ], l.prototype, "stickyFooter", 2);
829
+ c([
830
+ r({ type: Boolean })
831
+ ], l.prototype, "disablePortal", 2);
832
+ c([
833
+ r({ type: Number })
834
+ ], l.prototype, "zIndex", 2);
835
+ c([
836
+ r({ type: Boolean, reflect: !0 })
837
+ ], l.prototype, "initialized", 2);
838
+ c([
839
+ r({ type: Boolean })
840
+ ], l.prototype, "showDetail", 2);
841
+ c([
842
+ r({ type: Boolean })
843
+ ], l.prototype, "isHidingDetail", 2);
844
+ l = c([
845
+ S("o-side-panel")
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--)
849
+ (a = e[s]) && (n = (i ? a(t, o, n) : a(n)) || n);
850
+ return i && n && W(t, o, n), n;
851
+ };
852
+ const Q = C(A(w)), at = ["primary", "secondary", "ghost", "tertiary"];
853
+ let d = class extends Q {
854
+ constructor() {
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
+ }
857
+ get name() {
858
+ return this.getAttribute("name") ?? "";
859
+ }
860
+ set name(e) {
861
+ this.setAttribute("name", e);
862
+ }
863
+ get form() {
864
+ return this[B].form;
865
+ }
866
+ handleClick(e) {
867
+ if (!(e instanceof KeyboardEvent && !["Enter", " "].includes(e.key)) && this.panelTarget) {
868
+ const t = document.getElementById(this.panelTarget);
869
+ t instanceof l && (t != null && t.openPanel) && typeof t.openPanel == "function" ? (e.preventDefault(), t.openPanel()) : console.warn(`[o-button] No side panel with id="${this.panelTarget}" found or it does not have an openPanel method.`);
870
+ }
871
+ }
872
+ render() {
873
+ return this.href ? this.renderLink() : this.renderButton();
874
+ }
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()));
878
+ }
879
+ disconnectedCallback() {
880
+ var e;
881
+ (e = this._unsubOcc) == null || e.call(this), super.disconnectedCallback();
882
+ }
883
+ renderIcon(e) {
884
+ const t = e === "start" ? this.startIconModel : this.endIconModel;
885
+ if (!t) return p;
886
+ const o = _[t] ?? "";
887
+ if (!o) return p;
888
+ const i = I(o);
889
+ return h`<span class="${e === "start" ? "icon-start" : "icon-end"}">${F(i)}</span>`;
890
+ }
891
+ renderButton() {
892
+ const e = this.text || this.textsecond;
893
+ return h`
894
+ <button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
895
+ aria-describedby=${this.describedBy || p} aria-expanded=${this.ariaExpanded || p} >
896
+ ${this.startIcon ? this.renderIcon("start") : p}
897
+ ${e ? h`
898
+ ${this.text ? h`<span class="text">${this.text}</span>` : p}
899
+ ${this.textsecond ? h`<span class="text">${this.textsecond}</span>` : p}
900
+ ${this.withbadge ? h`<slot></slot>` : p}
901
+ ` : h`<slot></slot>`}
902
+ ${this.endIcon ? this.renderIcon("end") : p}
903
+ </button>
904
+ `;
905
+ }
906
+ renderLink() {
907
+ const e = this.text || this.textsecond;
908
+ return h`
909
+ <a
910
+ href=${this.href}
911
+ target=${this.target || p}
912
+ class="button"
913
+ ?disabled=${this.disabled}
914
+ role=${this.hideRoleButton ? p : "button"}
915
+ @click=${this.handleClick}
916
+ @keydown=${this.handleClick}
917
+ aria-describedby=${this.describedBy || p}
918
+ >
919
+ ${this.startIcon ? this.renderIcon("start") : p}
920
+ ${e ? h`
921
+ ${this.text ? h`<span>${this.text}</span>` : p}
922
+ ${this.textsecond ? h`<span>${this.textsecond}</span>` : p}
923
+ ` : h`<slot></slot>`}
924
+ ${this.endIcon ? this.renderIcon("end") : p}
925
+ </a>
926
+ `;
927
+ }
928
+ };
929
+ q(d);
930
+ d.formAssociated = !0;
931
+ d.styles = k`
932
+ :host {
933
+ --button-border: transparent;
934
+ --badge-outer-width: 19px;
935
+ cursor: pointer;
936
+ display: inline-flex;
937
+ }
938
+
939
+ :host(.a--tabfocus) {
940
+ outline: none !important;
941
+ }
942
+
943
+ :host(.a--tabfocus) .button {
944
+ ${x};
945
+ }
946
+
947
+ :host([fullwidth]) {
948
+ width: 100%;
949
+ }
950
+
951
+ :host([variant="primary"]) {
952
+ --button-bg: var(--color-container-action-primary-default);
953
+ --button-bg-hover: var(--color-container-action-primary-hover);
954
+ --button-bg-pressed: var(--color-container-action-primary-pressed);
955
+ --button-text: var(--color-content-action-primary);
956
+ --button-text-hover: var(--color-content-action-primary);
957
+ --button-border: transparent;
958
+ --button-border-width: var(--border-m);
959
+ --button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
960
+ --button-starticon-svg-width: 0px;
961
+ --button-endicon-svg-width: 0px;
962
+ }
963
+
964
+ :host([variant="secondary"]) {
965
+ --button-bg: var(--color-container-action-secondary-default);
966
+ --button-bg-hover: var(--color-container-action-secondary-hover);
967
+ --button-bg-pressed: var(--color-container-action-secondary-pressed);
968
+ --button-text: var(--color-content-action-secondary);
969
+ --button-text-hover: var(--color-content-action-secondary);
970
+ --button-border: var(--color-border-secondary);
971
+ --button-border-width: var(--border-m);
972
+ --button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
973
+ --button-starticon-svg-width: 16px;
974
+ --button-endicon-svg-width: 0px;
975
+ }
976
+
977
+ :host([variant="ghost"]) {
978
+ --button-bg: transparent;
979
+ --button-bg-hover: var(--color-alpha-dark-lightest);
980
+ --button-bg-pressed: var(--color-alpha-dark-lighter);
981
+ --button-text: var(--color-content-action-secondary);
982
+ --button-text-hover: var(--color-content-action-secondary);
983
+ --button-border-width: 0;
984
+ --button-padding: var(--spacing-m, 10px) var(--spacing-xl, 16px);
985
+ --button-starticon-svg-width: 16px;
986
+ --button-endicon-svg-width: 12px;
987
+ }
988
+
989
+ :host([variant="tertiary"]) {
990
+ --button-bg: var(--color-container-action-tertiary-default);
991
+ --button-bg-hover: var(--color-container-action-tertiary-hover);
992
+ --button-bg-pressed: var(--color-container-action-tertiary-pressed);
993
+ --button-text: var(--color-content-body);
994
+ --button-text-hover: var(--color-content-action-tertiary);
995
+ --button-border-width: 0;
996
+ --button-padding: var(--spacing-m, 10px) var(--spacing-l, 12px);
997
+ --button-starticon-svg-width: 0px;
998
+ --button-endicon-svg-width: 8px;
999
+ }
1000
+
1001
+ :host([disabled]),
1002
+ :host([aria-disabled="true"]),
1003
+ :host([aria-disabled="true"]:hover) {
1004
+ --button-bg: var(--color-container-disabled);
1005
+ --button-text: var(--color-content-disabled);
1006
+ --button-border: transparent;
1007
+ }
1008
+
1009
+ :host([disabled][variant="secondary"]) {
1010
+ --button-border: var(--color-border-secondary);
1011
+ }
1012
+
1013
+ .button {
1014
+ display: inline-flex;
1015
+ align-items: center;
1016
+ justify-content: center;
1017
+ width: 100%;
1018
+ gap: var(--spacing-s, 8px);
1019
+ background-color: var(--button-bg);
1020
+ color: var(--button-text);
1021
+ border: var(--button-border-width, var(--border-m)) solid var(--button-border);
1022
+ border-radius: var(--radius-m);
1023
+ font-family: var(--font-family-loccitane-sans);
1024
+ font-size: var(--font-size-150);
1025
+ font-weight: var(--font-weight-400);
1026
+ line-height: var(--line-height-200);
1027
+ min-width: 64px;
1028
+ padding: var(--button-padding);
1029
+ text-decoration: none;
1030
+ cursor: inherit;
1031
+ box-sizing: border-box;
1032
+ }
1033
+
1034
+ .button span {
1035
+ font-family: var(--font-family-loccitane-sans);
1036
+ font-size: var(--font-size-150);
1037
+ font-weight: var(--font-weight-400);
1038
+ line-height: var(--line-height-200);
1039
+ }
1040
+
1041
+ .button:hover:not([disabled]) {
1042
+ background-color: var(--button-bg-hover);
1043
+ color: var(--button-text-hover);
1044
+ }
1045
+
1046
+ .button:active:not([disabled]) {
1047
+ background-color: var(--button-bg-pressed);
1048
+ }
1049
+
1050
+ .button:focus-visible {
1051
+ ${x};
1052
+ }
1053
+
1054
+ span.text + span.text::before {
1055
+ content: "•";
1056
+ margin-right: 8px;
1057
+ }
1058
+
1059
+ .icon-start,
1060
+ .icon-end {
1061
+ display: inline-flex;
1062
+ align-items: center;
1063
+ }
1064
+
1065
+ .icon-start svg,
1066
+ .icon-end svg {
1067
+ max-height: 20px;
1068
+ }
1069
+
1070
+ .icon-start svg[x],
1071
+ .icon-end svg[x] {
1072
+ width: 15px;
1073
+ }
1074
+
1075
+ .icon-start path[fill],
1076
+ .icon-start path[class],
1077
+ .icon-end path[fill],
1078
+ .icon-end path[class] {
1079
+ fill: var(--button-text) !important;
1080
+ }
1081
+
1082
+ .icon-start path[stroke],
1083
+ .icon-end path[stroke] {
1084
+ stroke: var(--button-text) !important;
1085
+ }
1086
+
1087
+ :host([variant="tertiary"][fullwidth][endIcon]) .button {
1088
+ justify-content: space-between;
1089
+ }
1090
+
1091
+ .button span {
1092
+ display: inline-flex;
1093
+ align-items: center;
1094
+ }
1095
+
1096
+ .button slot {
1097
+ display: inline-flex;
1098
+ align-items: center;
1099
+ }
1100
+
1101
+ :host([variant="tertiary"][endIcon]) .button .icon-end {
1102
+ width: var(--button-endicon-svg-width, 8px);
1103
+ }
1104
+
1105
+ :host([underlined]) span:not([class*="icon-"]),
1106
+ :host([underlined]) .text,
1107
+ :host([underlined]:not([text])) .button slot {
1108
+ position: relative;
1109
+ }
1110
+
1111
+ :host([underlined]) span:not([class*="icon-"])::after,
1112
+ :host([underlined]) .text::after,
1113
+ :host([underlined]:not([text])) .button slot::after {
1114
+ content: "";
1115
+ display: block;
1116
+ position: absolute;
1117
+ bottom: 0;
1118
+ left: 0;
1119
+ width: 100%;
1120
+ border-bottom: var(--border-M, 1px) solid var(--button-text);
1121
+ }
1122
+
1123
+ :host([underlined]:not([text])) .button slot {
1124
+ display: inline-flex;
1125
+ gap: 8px;
1126
+ }
1127
+
1128
+ :host([underlined][withbadge]:not([text])) .button slot::after {
1129
+ width: calc(100% - var(--badge-outer-width, 19px) - var(--spacing-s, 8px));
1130
+ }
1131
+
1132
+ :host([variant="tertiary"][endIcon]) .icon-end {
1133
+ display: inline-flex;
1134
+ align-items: center;
1135
+ }
1136
+
1137
+ :host([variant="tertiary"][endIcon]:hover) .icon-end {
1138
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1139
+ transform: translateX(4px);
1140
+ }
1141
+ `;
1142
+ u([
1143
+ r()
1144
+ ], d.prototype, "type", 2);
1145
+ u([
1146
+ r()
1147
+ ], d.prototype, "value", 2);
1148
+ u([
1149
+ r({ type: String, reflect: !0 })
1150
+ ], d.prototype, "variant", 2);
1151
+ u([
1152
+ r({ type: String })
1153
+ ], d.prototype, "text", 2);
1154
+ u([
1155
+ r({ type: String })
1156
+ ], d.prototype, "textsecond", 2);
1157
+ u([
1158
+ r({ type: Boolean, reflect: !0 })
1159
+ ], d.prototype, "fullwidth", 2);
1160
+ u([
1161
+ r({ type: Boolean, reflect: !0 })
1162
+ ], d.prototype, "disabled", 2);
1163
+ u([
1164
+ r({ type: String })
1165
+ ], d.prototype, "startIconModel", 2);
1166
+ u([
1167
+ r({ type: String })
1168
+ ], d.prototype, "endIconModel", 2);
1169
+ u([
1170
+ r({ type: Boolean, reflect: !0, attribute: "starticon" })
1171
+ ], d.prototype, "startIcon", 2);
1172
+ u([
1173
+ r({ type: Boolean, reflect: !0, attribute: "endicon" })
1174
+ ], d.prototype, "endIcon", 2);
1175
+ u([
1176
+ r({ type: String, attribute: "paneltarget" })
1177
+ ], d.prototype, "panelTarget", 2);
1178
+ u([
1179
+ r({ type: String })
1180
+ ], d.prototype, "href", 2);
1181
+ u([
1182
+ r({ type: String })
1183
+ ], d.prototype, "target", 2);
1184
+ u([
1185
+ r({ type: Boolean, reflect: !0 })
1186
+ ], d.prototype, "underlined", 2);
1187
+ u([
1188
+ r({ type: Boolean, reflect: !0 })
1189
+ ], d.prototype, "withbadge", 2);
1190
+ u([
1191
+ r({ type: Boolean, reflect: !0 })
1192
+ ], d.prototype, "hideRoleButton", 2);
1193
+ u([
1194
+ r({ reflect: !0, attribute: "describedby" })
1195
+ ], d.prototype, "describedBy", 2);
1196
+ u([
1197
+ r({ reflect: !0, attribute: "expanded" })
1198
+ ], d.prototype, "ariaExpanded", 2);
1199
+ d = u([
1200
+ S("o-button")
1201
+ ], d);
1202
+ export {
1203
+ d as O,
1204
+ l as OccitaneSidePanel,
1205
+ at as v
1206
+ };