@florid-kit/components 2.6.6 → 2.6.8

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