@florid-kit/components 3.1.8 → 3.1.9

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.
@@ -1,27 +1,27 @@
1
- import { E as p, i as k, a as g, 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 E } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as s } from "../property-S_Y9cb04.mjs";
3
- import { f as m } from "../css-C8WrrxT-.mjs";
4
- import { i as E, m as P } from "../element-internals-Dw7LndlH.mjs";
5
- import { e as x, o as A, a as _ } from "../icons-registry.mjs";
6
- import { g as I } from "../svg-utils-DOL__czZ.mjs";
7
- import { o as F } from "../unsafe-svg-BipL_msF.mjs";
3
+ import { f as g } from "../css-C8WrrxT-.mjs";
4
+ import { i as B, m as A } 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-BipL_msF.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 L, t as O, e as R } from "../directive-oAbCiebi.mjs";
10
+ import { f as T } 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 T(t) {
16
+ function q(t) {
17
17
  t.addInitializer((e) => {
18
18
  const o = e;
19
- o.addEventListener("click", async (i) => {
20
- const { type: n, [E]: r } = o, { form: l } = r;
21
- if (!(!l || n === "button") && (await new Promise((b) => {
19
+ o.addEventListener("click", async (n) => {
20
+ const { type: i, [B]: r } = o, { form: l } = r;
21
+ if (!(!l || i === "button") && (await new Promise((b) => {
22
22
  setTimeout(b);
23
- }), !i.defaultPrevented)) {
24
- if (n === "reset") {
23
+ }), !n.defaultPrevented)) {
24
+ if (i === "reset") {
25
25
  l.reset();
26
26
  return;
27
27
  }
@@ -46,10 +46,10 @@ function T(t) {
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
48
  const v = (t, e) => {
49
- var i;
49
+ var n;
50
50
  const o = t._$AN;
51
51
  if (o === void 0) return !1;
52
- for (const n of o) (i = n._$AO) == null || i.call(n, e, !1), v(n, e);
52
+ for (const i of o) (n = i._$AO) == null || n.call(i, e, !1), v(i, e);
53
53
  return !0;
54
54
  }, y = (t) => {
55
55
  let e, o;
@@ -57,39 +57,39 @@ const v = (t, e) => {
57
57
  if ((e = t._$AM) === void 0) break;
58
58
  o = e._$AN, o.delete(t), t = e;
59
59
  } while ((o == null ? void 0 : o.size) === 0);
60
- }, B = (t) => {
60
+ }, D = (t) => {
61
61
  for (let e; e = t._$AM; t = e) {
62
62
  let o = e._$AN;
63
63
  if (o === void 0) e._$AN = o = /* @__PURE__ */ new Set();
64
64
  else if (o.has(t)) break;
65
- o.add(t), M(e);
65
+ o.add(t), K(e);
66
66
  }
67
67
  };
68
- function q(t) {
69
- this._$AN !== void 0 ? (y(this), this._$AM = t, B(this)) : this._$AM = t;
68
+ function H(t) {
69
+ this._$AN !== void 0 ? (y(this), this._$AM = t, D(this)) : this._$AM = t;
70
70
  }
71
- function H(t, e = !1, o = 0) {
72
- const i = this._$AH, n = this._$AN;
73
- if (n !== void 0 && n.size !== 0) if (e) if (Array.isArray(i)) for (let r = o; r < i.length; r++) v(i[r], !1), y(i[r]);
74
- else i != null && (v(i, !1), y(i));
71
+ function M(t, e = !1, o = 0) {
72
+ const n = this._$AH, i = this._$AN;
73
+ if (i !== void 0 && i.size !== 0) if (e) if (Array.isArray(n)) for (let r = o; r < n.length; r++) v(n[r], !1), y(n[r]);
74
+ else n != null && (v(n, !1), y(n));
75
75
  else v(this, t);
76
76
  }
77
- const M = (t) => {
78
- t.type == L.CHILD && (t._$AP ?? (t._$AP = H), t._$AQ ?? (t._$AQ = q));
77
+ const K = (t) => {
78
+ t.type == O.CHILD && (t._$AP ?? (t._$AP = M), t._$AQ ?? (t._$AQ = H));
79
79
  };
80
- class K extends z {
80
+ class j extends L {
81
81
  constructor() {
82
82
  super(...arguments), this._$AN = void 0;
83
83
  }
84
- _$AT(e, o, i) {
85
- super._$AT(e, o, i), B(this), this.isConnected = e._$AU;
84
+ _$AT(e, o, n) {
85
+ super._$AT(e, o, n), D(this), this.isConnected = e._$AU;
86
86
  }
87
87
  _$AO(e, o = !0) {
88
- var i, n;
89
- e !== this.isConnected && (this.isConnected = e, e ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), o && (v(this, e), y(this));
88
+ var n, i;
89
+ e !== this.isConnected && (this.isConnected = e, e ? (n = this.reconnected) == null || n.call(this) : (i = this.disconnected) == null || i.call(this)), o && (v(this, e), y(this));
90
90
  }
91
91
  setValue(e) {
92
- if (R(this._$Ct)) this._$Ct._$AI(e, this);
92
+ if (T(this._$Ct)) this._$Ct._$AI(e, this);
93
93
  else {
94
94
  const o = [...this._$Ct._$AH];
95
95
  o[this._$Ci] = e, this._$Ct._$AI(o, this, 0);
@@ -100,7 +100,7 @@ class K extends z {
100
100
  reconnected() {
101
101
  }
102
102
  }
103
- class j extends K {
103
+ class N extends j {
104
104
  constructor() {
105
105
  super(...arguments), this.prevData = {};
106
106
  }
@@ -108,49 +108,49 @@ class j extends K {
108
108
  return p;
109
109
  }
110
110
  update(e, [o]) {
111
- var i;
112
- this.element !== e.element && (this.element = e.element), this.host = ((i = e.options) === null || i === void 0 ? void 0 : i.host) || this.element, this.apply(o), this.groom(o), this.prevData = { ...o };
111
+ var n;
112
+ this.element !== e.element && (this.element = e.element), this.host = ((n = e.options) === null || n === void 0 ? void 0 : n.host) || this.element, this.apply(o), this.groom(o), this.prevData = { ...o };
113
113
  }
114
114
  apply(e) {
115
115
  if (!e)
116
116
  return;
117
- const { prevData: o, element: i } = this;
118
- for (const n in e) {
119
- const r = e[n];
120
- r !== o[n] && (i[n] = r);
117
+ const { prevData: o, element: n } = this;
118
+ for (const i in e) {
119
+ const r = e[i];
120
+ r !== o[i] && (n[i] = r);
121
121
  }
122
122
  }
123
123
  groom(e) {
124
- const { prevData: o, element: i } = this;
124
+ const { prevData: o, element: n } = this;
125
125
  if (o)
126
- for (const n in o)
127
- (!e || !(n in e) && i[n] === o[n]) && (i[n] = void 0);
126
+ for (const i in o)
127
+ (!e || !(i in e) && n[i] === o[i]) && (n[i] = void 0);
128
128
  }
129
129
  }
130
- class N extends j {
130
+ class V extends N {
131
131
  constructor() {
132
132
  super(...arguments), this.eventData = {};
133
133
  }
134
134
  apply(e) {
135
135
  if (e)
136
136
  for (const o in e) {
137
- const i = e[o];
138
- i !== this.eventData[o] && this.applyEvent(o, i);
137
+ const n = e[o];
138
+ n !== this.eventData[o] && this.applyEvent(o, n);
139
139
  }
140
140
  }
141
141
  applyEvent(e, o) {
142
- const { prevData: i, element: n } = this;
143
- this.eventData[e] = o, i[e] && n.removeEventListener(e, this, o), n.addEventListener(e, this, o);
142
+ const { prevData: n, element: i } = this;
143
+ this.eventData[e] = o, n[e] && i.removeEventListener(e, this, o), i.addEventListener(e, this, o);
144
144
  }
145
145
  groom(e) {
146
- const { prevData: o, element: i } = this;
146
+ const { prevData: o, element: n } = this;
147
147
  if (o)
148
- for (const n in o)
149
- (!e || !(n in e) && i[n] === o[n]) && this.groomEvent(n, o[n]);
148
+ for (const i in o)
149
+ (!e || !(i in e) && n[i] === o[i]) && this.groomEvent(i, o[i]);
150
150
  }
151
151
  groomEvent(e, o) {
152
- const { element: i } = this;
153
- delete this.eventData[e], i.removeEventListener(e, this, o);
152
+ const { element: n } = this;
153
+ delete this.eventData[e], n.removeEventListener(e, this, o);
154
154
  }
155
155
  handleEvent(e) {
156
156
  const o = this.eventData[e.type];
@@ -158,82 +158,82 @@ class N extends j {
158
158
  }
159
159
  disconnected() {
160
160
  const { eventData: e, element: o } = this;
161
- for (const i in e) {
162
- const n = i.slice(1), r = e[i];
163
- o.removeEventListener(n, this, r);
161
+ for (const n in e) {
162
+ const i = n.slice(1), r = e[n];
163
+ o.removeEventListener(i, this, r);
164
164
  }
165
165
  }
166
166
  reconnected() {
167
167
  const { eventData: e, element: o } = this;
168
- for (const i in e) {
169
- const n = i.slice(1), r = e[i];
170
- o.addEventListener(n, this, r);
168
+ for (const n in e) {
169
+ const i = n.slice(1), r = e[n];
170
+ o.addEventListener(i, this, r);
171
171
  }
172
172
  }
173
173
  }
174
- class V extends N {
174
+ class X extends V {
175
175
  apply(e) {
176
176
  if (!e)
177
177
  return;
178
- const { prevData: o, element: i } = this;
179
- for (const n in e) {
180
- const r = e[n];
181
- if (r === o[n])
178
+ const { prevData: o, element: n } = this;
179
+ for (const i in e) {
180
+ const r = e[i];
181
+ if (r === o[i])
182
182
  continue;
183
- const l = n.slice(1);
184
- switch (n[0]) {
183
+ const l = i.slice(1);
184
+ switch (i[0]) {
185
185
  case "@":
186
186
  this.eventData[l] = r, this.applyEvent(l, r);
187
187
  break;
188
188
  case ".":
189
- i[l] = r;
189
+ n[l] = r;
190
190
  break;
191
191
  case "?":
192
- r ? i.setAttribute(l, "") : i.removeAttribute(l);
192
+ r ? n.setAttribute(l, "") : n.removeAttribute(l);
193
193
  break;
194
194
  default:
195
- r != null ? i.setAttribute(n, String(r)) : i.removeAttribute(n);
195
+ r != null ? n.setAttribute(i, String(r)) : n.removeAttribute(i);
196
196
  break;
197
197
  }
198
198
  }
199
199
  }
200
200
  groom(e) {
201
- const { prevData: o, element: i } = this;
201
+ const { prevData: o, element: n } = this;
202
202
  if (o)
203
- for (const n in o) {
204
- const r = n.slice(1);
205
- if (!e || !(n in e) && i[r] === o[n])
206
- switch (n[0]) {
203
+ for (const i in o) {
204
+ const r = i.slice(1);
205
+ if (!e || !(i in e) && n[r] === o[i])
206
+ switch (i[0]) {
207
207
  case "@":
208
- this.groomEvent(r, o[n]);
208
+ this.groomEvent(r, o[i]);
209
209
  break;
210
210
  case ".":
211
- i[r] = void 0;
211
+ n[r] = void 0;
212
212
  break;
213
213
  case "?":
214
- i.removeAttribute(r);
214
+ n.removeAttribute(r);
215
215
  break;
216
216
  default:
217
- i.removeAttribute(n);
217
+ n.removeAttribute(i);
218
218
  break;
219
219
  }
220
220
  }
221
221
  }
222
222
  }
223
- const $ = O(V);
224
- var X = Object.defineProperty, U = Object.getOwnPropertyDescriptor, c = (t, e, o, i) => {
225
- for (var n = i > 1 ? void 0 : i ? U(e, o) : e, r = t.length - 1, l; r >= 0; r--)
226
- (l = t[r]) && (n = (i ? l(e, o, n) : l(n)) || n);
227
- return i && n && X(e, o, n), n;
223
+ const k = R(X);
224
+ var U = Object.defineProperty, W = Object.getOwnPropertyDescriptor, c = (t, e, o, n) => {
225
+ for (var i = n > 1 ? void 0 : n ? W(e, o) : e, r = t.length - 1, l; r >= 0; r--)
226
+ (l = t[r]) && (i = (n ? l(e, o, i) : l(i)) || i);
227
+ return n && i && U(e, o, i), i;
228
228
  };
229
- let a = class extends C(g) {
229
+ let a = 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 (t) => {
232
- var o, i;
232
+ var o, n;
233
233
  const e = ((o = t.detail) == null ? void 0 : o.origin) ?? document.activeElement;
234
234
  if (this._detailOriginEl = e, this._detailOriginClass = (e == null ? void 0 : e.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);
235
+ const i = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".detail-view");
236
+ i && i.setAttribute("fromelement", this._detailOriginClass);
237
237
  }
238
238
  await this.focusDetailReturnBtn();
239
239
  }, this._detailOriginEl = null, this._detailOriginClass = "", this.handleKeyDown = (t) => {
@@ -245,15 +245,15 @@ let a = class extends C(g) {
245
245
  const e = t.currentTarget, o = (e == null ? void 0 : e.getAttribute("data-role")) === "back";
246
246
  if (this.showDetail && o) {
247
247
  this.isHidingDetail = !0;
248
- const i = this.renderRoot.querySelector(".content"), n = async () => {
248
+ const n = this.renderRoot.querySelector(".content"), i = async () => {
249
249
  this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1, await this.updateComplete, this._restoreFocusToOrigin();
250
250
  };
251
- if (i) {
251
+ if (n) {
252
252
  this.showHeaderStartIcon = !1;
253
253
  const r = () => {
254
- this.showDetail = !1, this.isHidingDetail = !1, i.removeEventListener("animationend", r), n();
254
+ this.showDetail = !1, this.isHidingDetail = !1, n.removeEventListener("animationend", r), i();
255
255
  };
256
- i.addEventListener("animationend", r);
256
+ n.addEventListener("animationend", r);
257
257
  } else
258
258
  this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1;
259
259
  return;
@@ -262,8 +262,8 @@ let a = class extends C(g) {
262
262
  };
263
263
  }
264
264
  focusFirstInPanel() {
265
- var e, o, i;
266
- (i = this.getFocusableElements().filter((n) => !!n && !n.hasAttribute("disabled"))[0] ?? ((e = this.shadowRoot) == null ? void 0 : e.querySelector(".close-btn")) ?? ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".panel"))) == null || i.focus({ preventScroll: !0 });
265
+ var e, o, n;
266
+ (n = this.getFocusableElements().filter((i) => !!i && !i.hasAttribute("disabled"))[0] ?? ((e = this.shadowRoot) == null ? void 0 : e.querySelector(".close-btn")) ?? ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".panel"))) == null || n.focus({ preventScroll: !0 });
267
267
  }
268
268
  resolveFocusable(t) {
269
269
  var o;
@@ -281,7 +281,7 @@ let a = class extends C(g) {
281
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
282
  }
283
283
  async focusDetailReturnBtn() {
284
- var n, r, l, b, f;
284
+ var i, r, l, b, f;
285
285
  await this.updateComplete;
286
286
  const t = this.getDeepActiveElement(document);
287
287
  if (t && t !== document.body)
@@ -290,18 +290,18 @@ let a = class extends C(g) {
290
290
  } catch {
291
291
  }
292
292
  await new Promise(requestAnimationFrame);
293
- const e = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".detail-view .return-btn");
293
+ const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".detail-view .return-btn");
294
294
  if (!e) return;
295
295
  e.updateComplete && await e.updateComplete, (b = (l = ((r = e.shadowRoot) == null ? void 0 : r.querySelector("button")) ?? e) == null ? void 0 : l.focus) == null || b.call(l, { 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");
296
+ const n = (f = this.shadowRoot) == null ? void 0 : f.querySelector('.panel[role="dialog"]');
297
+ n && n.setAttribute("aria-label", this.labelAriaDialogPanel || "panel-title");
298
298
  }
299
299
  _restoreFocusToOrigin() {
300
300
  var e, o;
301
301
  const t = this._detailOriginEl;
302
302
  !t || !document.contains(t) || ((o = (e = document.activeElement) == null ? void 0 : e.blur) == null || o.call(e), requestAnimationFrame(() => {
303
- var n;
304
- t.classList.add("a--tabfocus"), (((n = t.shadowRoot) == null ? void 0 : n.querySelector('button, .button, [tabindex]:not([tabindex="-1"])')) ?? null ?? t).focus({ preventScroll: !0 });
303
+ var i;
304
+ t.classList.add("a--tabfocus"), (((i = t.shadowRoot) == null ? void 0 : i.querySelector('button, .button, [tabindex]:not([tabindex="-1"])')) ?? null ?? t).focus({ preventScroll: !0 });
305
305
  }));
306
306
  }
307
307
  getDeepActiveElement(t = this.shadowRoot) {
@@ -316,39 +316,41 @@ let a = class extends C(g) {
316
316
  t.preventDefault(), t.stopPropagation(), (r = this.renderRoot.querySelector(".panel")) == null || r.focus({ preventScroll: !0 });
317
317
  return;
318
318
  }
319
- const i = o[0], n = o[o.length - 1];
320
- !e || !o.includes(e) ? (t.preventDefault(), t.stopPropagation(), (t.shiftKey ? n : i).focus({ preventScroll: !0 })) : !t.shiftKey && e === n ? (t.preventDefault(), t.stopPropagation(), i.focus({ preventScroll: !0 })) : t.shiftKey && e === i && (t.preventDefault(), t.stopPropagation(), n.focus({ preventScroll: !0 }));
319
+ const n = o[0], i = o[o.length - 1];
320
+ !e || !o.includes(e) ? (t.preventDefault(), t.stopPropagation(), (t.shiftKey ? i : n).focus({ preventScroll: !0 })) : !t.shiftKey && e === i ? (t.preventDefault(), t.stopPropagation(), n.focus({ preventScroll: !0 })) : t.shiftKey && e === n && (t.preventDefault(), t.stopPropagation(), i.focus({ preventScroll: !0 }));
321
321
  }
322
322
  trapFocus(t) {
323
323
  if (t.key !== "Tab") return;
324
324
  const e = this.shadowRoot;
325
325
  if (!e) return;
326
- const o = t.composedPath()[0] ?? this.getDeepActiveElement(document);
326
+ const o = this.getFocusableElements();
327
+ t.target && t.target.closest("o-side-panel") && !o.includes(t.target) && o.splice(1, 0, t.target);
328
+ const n = t.composedPath()[0] ?? this.getDeepActiveElement(document);
327
329
  if (this.showDetail) {
328
- this.wrapFocus(t, o, this.getFocusableElements());
330
+ this.wrapFocus(t, n, o);
329
331
  return;
330
332
  }
331
333
  if (document.querySelector("#refineandsortpopin")) {
332
- const r = e.querySelector(".close-btn"), l = r ? this.resolveFocusable(r) : null, b = e.querySelector(".js-clear-refinements"), f = b ? this.resolveFocusable(b) : null, w = (D) => {
333
- t.preventDefault(), t.stopPropagation(), D.focus();
334
+ const l = e.querySelector(".close-btn"), b = l ? this.resolveFocusable(l) : null, f = e.querySelector(".js-clear-refinements"), m = f ? this.resolveFocusable(f) : null, x = (P) => {
335
+ t.preventDefault(), t.stopPropagation(), P.focus();
334
336
  };
335
- if (l && f) {
336
- if (!t.shiftKey && o === f) return w(l);
337
- if (t.shiftKey && o === l) return w(f);
337
+ if (b && m) {
338
+ if (!t.shiftKey && n === m) return x(b);
339
+ if (t.shiftKey && n === b) return x(m);
338
340
  }
339
341
  }
340
- const n = this.renderRoot.querySelector(".close-btn");
341
- if (!t.shiftKey && n && n.contains(o)) {
342
+ const r = this.renderRoot.querySelector(".close-btn");
343
+ if (!t.shiftKey && r && r.contains(n)) {
342
344
  t.preventDefault();
343
- const r = this.renderRoot.querySelector(
345
+ const l = this.renderRoot.querySelector(
344
346
  ".o-whats-inside--content p"
345
347
  );
346
- if (r) {
347
- r.focus();
348
+ if (l) {
349
+ l.focus();
348
350
  return;
349
351
  }
350
352
  }
351
- this.wrapFocus(t, o, this.getFocusableElements());
353
+ this.wrapFocus(t, n, o);
352
354
  }
353
355
  isUnavailableElement(t) {
354
356
  if (!(t instanceof HTMLElement)) return !1;
@@ -359,8 +361,8 @@ let a = class extends C(g) {
359
361
  getFocusableElements() {
360
362
  const t = this.showDetail ? this.renderRoot.querySelector(".detail-view") : this.renderRoot.querySelector(".panel");
361
363
  if (!t) return [];
362
- const e = (r) => this.isUnavailableElement(r) ? !1 : r.matches(a.focusablesSelector), o = [], i = /* @__PURE__ */ new Set(), n = (r) => {
363
- if (i.has(r) || (i.add(r), r instanceof HTMLElement && r.closest("[hidden], [inert], [aria-hidden='true']"))) return;
364
+ const e = (r) => this.isUnavailableElement(r) ? !1 : r.matches(a.focusablesSelector), o = [], n = /* @__PURE__ */ new Set(), i = (r) => {
365
+ if (n.has(r) || (n.add(r), r instanceof HTMLElement && r.closest("[hidden], [inert], [aria-hidden='true']"))) return;
364
366
  if (e(r)) {
365
367
  const f = this.resolveFocusable(r);
366
368
  f && !this.isUnavailableElement(f) && o.push(f);
@@ -368,25 +370,25 @@ let a = class extends C(g) {
368
370
  const l = r.tagName.toLowerCase();
369
371
  if (l === "o-icon-button" || l === "o-button") return;
370
372
  if (r instanceof HTMLSlotElement) {
371
- r.assignedElements({ flatten: !0 }).forEach(n);
373
+ r.assignedElements({ flatten: !0 }).forEach(i);
372
374
  return;
373
375
  }
374
376
  const b = r.shadowRoot;
375
- b && Array.from(b.children).forEach(n), Array.from(r.children).forEach(n);
377
+ b && Array.from(b.children).forEach(i), Array.from(r.children).forEach(i);
376
378
  };
377
- return n(t), o;
379
+ return i(t), o;
378
380
  }
379
381
  openPanel() {
380
382
  var e;
381
383
  this.removeAttribute("hidden"), this.getBoundingClientRect(), this.previousFocusedElement = document.activeElement, this.previousFocusedSelector = (e = this.previousFocusedElement) == null ? void 0 : e.getAttribute("paneltarget"), this.open = !0, document.body.style.overflow = "hidden", document.body.setAttribute("data-side-panel", "open");
382
384
  const t = this.renderRoot.querySelector(".panel");
383
385
  t && t.setAttribute("aria-modal", "true"), this.updateComplete.then(async () => {
384
- var o, i;
386
+ var o, n;
385
387
  if (this.showHeader) {
386
- const n = (o = this.shadowRoot) == null ? void 0 : o.querySelector(".panel .close-btn");
387
- n != null && n.updateComplete && await n.updateComplete;
388
- const r = this.resolveFocusable(n);
389
- (i = r == null ? void 0 : r.focus) == null || i.call(r, { preventScroll: !0 });
388
+ const i = (o = this.shadowRoot) == null ? void 0 : o.querySelector(".panel .close-btn");
389
+ i != null && i.updateComplete && await i.updateComplete;
390
+ const r = this.resolveFocusable(i);
391
+ (n = r == null ? void 0 : r.focus) == null || n.call(r, { preventScroll: !0 });
390
392
  } else
391
393
  this.focusFirstInPanel();
392
394
  }), this.dispatchEvent(
@@ -394,10 +396,10 @@ let a = class extends C(g) {
394
396
  );
395
397
  }
396
398
  closePanel() {
397
- var o, i, n;
399
+ var o, n, i;
398
400
  this.open = !1, this.showDetail = !1, document.body.style.overflow = "", document.body.removeAttribute("data-side-panel");
399
401
  let t = this.previousFocusedElement;
400
- t != null && t.isConnected || (t = document.querySelector(`[paneltarget="${this.previousFocusedSelector}"]`)), (t == null ? void 0 : t.tagName.toLowerCase()) === "o-button" ? (n = (i = (o = t.shadowRoot) == null ? void 0 : o.querySelector(".button")) == null ? void 0 : i.focus) == null || n.call(i) : t == null || t.focus();
402
+ t != null && t.isConnected || (t = document.querySelector(`[paneltarget="${this.previousFocusedSelector}"]`)), (t == null ? void 0 : t.tagName.toLowerCase()) === "o-button" ? (i = (n = (o = t.shadowRoot) == null ? void 0 : o.querySelector(".button")) == null ? void 0 : n.focus) == null || i.call(n) : t == null || t.focus();
401
403
  const e = this.renderRoot.querySelector(".panel");
402
404
  e && e.removeAttribute("aria-modal"), this.dispatchEvent(
403
405
  new CustomEvent("close", { bubbles: !0, composed: !0 })
@@ -475,7 +477,7 @@ let a = class extends C(g) {
475
477
  .variant=${this.firstButtonVariant}
476
478
  @click=${this.handleFirstClick}
477
479
  @keydown=${this.handleFirstClick}
478
- ${$(this.firstButtonProps)}
480
+ ${k(this.firstButtonProps)}
479
481
  >
480
482
  ${this.firstButtonLabel}
481
483
  </o-button>
@@ -485,7 +487,7 @@ let a = class extends C(g) {
485
487
  .variant=${this.secondButtonVariant}
486
488
  @click=${this.handleSecondClick}
487
489
  @keydown=${this.handleSecondClick}
488
- ${$(this.secondButtonProps)}
490
+ ${k(this.secondButtonProps)}
489
491
  >
490
492
  ${this.secondButtonLabel}
491
493
  </o-button>
@@ -526,7 +528,7 @@ let a = class extends C(g) {
526
528
  `;
527
529
  }
528
530
  };
529
- a.styles = k`
531
+ a.styles = C`
530
532
  :host {
531
533
  --z-overlay: 99;
532
534
  --z-panel: 100;
@@ -668,7 +670,7 @@ a.styles = k`
668
670
 
669
671
  .panel:focus-visible,
670
672
  .close-btn:focus-visible {
671
- ${m}
673
+ ${g}
672
674
  }
673
675
 
674
676
  [role="document"] {
@@ -772,7 +774,7 @@ a.styles = k`
772
774
  a.focusablesSelector = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';
773
775
  a.focusablesCustomElementsSelector = "o-icon-button, o-button";
774
776
  a.shadowRootOptions = {
775
- ...g.shadowRootOptions,
777
+ ...w.shadowRootOptions,
776
778
  // This helps send focus into the first focusable in shadow when host is focused
777
779
  delegatesFocus: !0
778
780
  };
@@ -852,15 +854,15 @@ c([
852
854
  s({ type: Boolean })
853
855
  ], a.prototype, "isHidingDetail", 2);
854
856
  a = c([
855
- S("o-side-panel")
857
+ E("o-side-panel")
856
858
  ], a);
857
- var W = Object.defineProperty, G = Object.getOwnPropertyDescriptor, u = (t, e, o, i) => {
858
- for (var n = i > 1 ? void 0 : i ? G(e, o) : e, r = t.length - 1, l; r >= 0; r--)
859
- (l = t[r]) && (n = (i ? l(e, o, n) : l(n)) || n);
860
- return i && n && W(e, o, n), n;
859
+ var G = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, u = (t, e, o, n) => {
860
+ for (var i = n > 1 ? void 0 : n ? Q(e, o) : e, r = t.length - 1, l; r >= 0; r--)
861
+ (l = t[r]) && (i = (n ? l(e, o, i) : l(i)) || i);
862
+ return n && i && G(e, o, i), i;
861
863
  };
862
- const Q = C(P(g)), at = ["primary", "secondary", "ghost", "tertiary", "link"];
863
- let d = class extends Q {
864
+ const J = S(A(w)), lt = ["primary", "secondary", "ghost", "tertiary", "link"];
865
+ let d = class extends J {
864
866
  constructor() {
865
867
  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;
866
868
  }
@@ -871,7 +873,7 @@ let d = class extends Q {
871
873
  this.setAttribute("name", t);
872
874
  }
873
875
  get form() {
874
- return this[E].form;
876
+ return this[B].form;
875
877
  }
876
878
  handleClick(t) {
877
879
  if (!(t instanceof KeyboardEvent && !["Enter", " "].includes(t.key)) && this.panelTarget) {
@@ -883,10 +885,10 @@ let d = class extends Q {
883
885
  return this.href ? this.renderLink() : this.renderButton();
884
886
  }
885
887
  connectedCallback() {
886
- var o, i;
888
+ var o, n;
887
889
  super.connectedCallback();
888
- const t = (o = this.startIconModel) == null ? void 0 : o.startsWith("occ-"), e = (i = this.endIconModel) == null ? void 0 : i.startsWith("occ-");
889
- (t || e) && (t && x(this.startIconModel), e && x(this.endIconModel), this._unsubOcc = A(() => this.requestUpdate()));
890
+ const t = (o = this.startIconModel) == null ? void 0 : o.startsWith("occ-"), e = (n = this.endIconModel) == null ? void 0 : n.startsWith("occ-");
891
+ (t || e) && (t && $(this.startIconModel), e && $(this.endIconModel), this._unsubOcc = _(() => this.requestUpdate()));
890
892
  }
891
893
  disconnectedCallback() {
892
894
  var t;
@@ -895,10 +897,10 @@ let d = class extends Q {
895
897
  renderIcon(t) {
896
898
  const e = t === "start" ? this.startIconModel : this.endIconModel;
897
899
  if (!e) return p;
898
- const o = _[e] ?? "";
900
+ const o = I[e] ?? "";
899
901
  if (!o) return p;
900
- const i = I(o);
901
- return h`<span class="${t === "start" ? "icon-start" : "icon-end"}">${F(i)}</span>`;
902
+ const n = F(o);
903
+ return h`<span class="${t === "start" ? "icon-start" : "icon-end"}">${z(n)}</span>`;
902
904
  }
903
905
  renderButton() {
904
906
  const t = this.text || this.textsecond;
@@ -938,9 +940,9 @@ let d = class extends Q {
938
940
  `;
939
941
  }
940
942
  };
941
- T(d);
943
+ q(d);
942
944
  d.formAssociated = !0;
943
- d.styles = k`
945
+ d.styles = C`
944
946
  :host {
945
947
  --button-border: transparent;
946
948
  --badge-outer-width: 19px;
@@ -953,7 +955,7 @@ d.styles = k`
953
955
  }
954
956
 
955
957
  :host(.a--tabfocus) .button {
956
- ${m};
958
+ ${g};
957
959
  }
958
960
 
959
961
  :host([fullwidth]) {
@@ -1104,7 +1106,7 @@ d.styles = k`
1104
1106
  }
1105
1107
 
1106
1108
  .button:focus-visible {
1107
- ${m};
1109
+ ${g};
1108
1110
  }
1109
1111
 
1110
1112
  span.text + span.text::before {
@@ -1253,10 +1255,10 @@ u([
1253
1255
  s({ reflect: !0, attribute: "expanded" })
1254
1256
  ], d.prototype, "ariaExpanded", 2);
1255
1257
  d = u([
1256
- S("o-button")
1258
+ E("o-button")
1257
1259
  ], d);
1258
1260
  export {
1259
1261
  d as O,
1260
1262
  a as OccitaneSidePanel,
1261
- at as v
1263
+ lt as v
1262
1264
  };
package/index.mjs CHANGED
@@ -37,4 +37,4 @@ import "./components/search-input.mjs";
37
37
  import "./components/search-input-dropdown.mjs";
38
38
  import "./components/option-tile.mjs";
39
39
  import "./components/option-tile-group.mjs";
40
- globalThis.__FLORID_KIT__ = "3.1.8";
40
+ globalThis.__FLORID_KIT__ = "3.1.9";
package/loader.mjs CHANGED
@@ -4,7 +4,7 @@ import "./components/link.mjs";
4
4
  import "./components/header-simplify.mjs";
5
5
  import "./components/breadcrumb.mjs";
6
6
  import "./components/breadcrumbs.mjs";
7
- globalThis.__FLORID_KIT__ = "3.1.8";
7
+ globalThis.__FLORID_KIT__ = "3.1.9";
8
8
  const i = {
9
9
  "o-accordion": () => import("./components/accordion.mjs"),
10
10
  "o-accordion-group": () => import("./components/accordion-group.mjs"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "3.1.8",
3
+ "version": "3.1.9",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",