@florid-kit/components 2.6.10 → 2.6.12

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.d.ts +66 -12
  2. package/components/button.d.ts +0 -3
  3. package/components/dropdown-variant.d.ts +0 -1
  4. package/components/dropdown.d.ts +0 -1
  5. package/components/icon-button.d.ts +0 -5
  6. package/components/wishlist-button.d.ts +0 -2
  7. package/index.js +5734 -0
  8. package/index.mjs +9695 -41
  9. package/package.json +2 -20
  10. package/assets/icons/icons-occ.d.ts +0 -315
  11. package/components/accordion-group.mjs +0 -61
  12. package/components/accordion.mjs +0 -185
  13. package/components/arch-image.mjs +0 -135
  14. package/components/badge.mjs +0 -75
  15. package/components/breadcrumb.mjs +0 -83
  16. package/components/breadcrumbs.mjs +0 -35
  17. package/components/button.mjs +0 -10
  18. package/components/checkbox.mjs +0 -188
  19. package/components/chip.mjs +0 -158
  20. package/components/chipset.mjs +0 -44
  21. package/components/dots.mjs +0 -60
  22. package/components/dropdown-variant.mjs +0 -445
  23. package/components/dropdown.mjs +0 -302
  24. package/components/feedback-message.mjs +0 -136
  25. package/components/filter-chip.mjs +0 -214
  26. package/components/footer-simplify.mjs +0 -178
  27. package/components/header-simplify.mjs +0 -234
  28. package/components/icon-button.mjs +0 -345
  29. package/components/input.mjs +0 -294
  30. package/components/link.mjs +0 -172
  31. package/components/mediumtile.mjs +0 -307
  32. package/components/minitile.mjs +0 -231
  33. package/components/option-tile-group.mjs +0 -105
  34. package/components/option-tile.mjs +0 -413
  35. package/components/popin.mjs +0 -412
  36. package/components/radio.mjs +0 -165
  37. package/components/rating.mjs +0 -84
  38. package/components/reassurance.mjs +0 -163
  39. package/components/search-input-dropdown.mjs +0 -314
  40. package/components/search-input.mjs +0 -107
  41. package/components/side-panel.mjs +0 -1197
  42. package/components/tab.mjs +0 -140
  43. package/components/tablist.mjs +0 -44
  44. package/components/tag.mjs +0 -86
  45. package/components/textarea.mjs +0 -269
  46. package/components/thumbnail-navigation.mjs +0 -232
  47. package/components/toast.mjs +0 -190
  48. package/components/tooltip.mjs +0 -125
  49. package/components/wishlist-button.mjs +0 -137
  50. package/css-r3TDS8Ma.mjs +0 -37
  51. package/directive-helpers-CjGdYF2i.mjs +0 -11
  52. package/directive-oAbCiebi.mjs +0 -27
  53. package/element-internals-Dw7LndlH.mjs +0 -19
  54. package/icons-occ-DW--7nRr.mjs +0 -834
  55. package/if-defined-BaFqfNKT.mjs +0 -10
  56. package/live-BPnRJXAq.mjs +0 -30
  57. package/loader.d.ts +0 -3
  58. package/loader.mjs +0 -82
  59. package/logo-CEgaTL93.mjs +0 -4
  60. package/performance-mixin-vBVz5Iib.mjs +0 -774
  61. package/property-8EkRXcYy.mjs +0 -36
  62. package/query-NJDNu0-P.mjs +0 -25
  63. package/state-BvkYxy1c.mjs +0 -12
  64. package/unsafe-svg-Dtdj_vMx.mjs +0 -216
@@ -1,44 +0,0 @@
1
- import { i as p, m as c, a as u, x as m, t as v } from "../performance-mixin-vBVz5Iib.mjs";
2
- import { n as f } from "../property-8EkRXcYy.mjs";
3
- import { OccitaneChip as h } from "./chip.mjs";
4
- var x = Object.defineProperty, O = Object.getOwnPropertyDescriptor, l = (o, e, t, s) => {
5
- for (var r = s > 1 ? void 0 : s ? O(e, t) : e, n = o.length - 1, i; n >= 0; n--)
6
- (i = o[n]) && (r = (s ? i(e, t, r) : i(r)) || r);
7
- return s && r && x(e, t, r), r;
8
- };
9
- let a = class extends c(u) {
10
- constructor() {
11
- super(), this.name = "", this.value = "", this.addEventListener("selected", this.onChipSelected);
12
- }
13
- onChipSelected(o) {
14
- const e = o.target instanceof h ? o.target : null;
15
- e != null && e.link || (this.name = (e == null ? void 0 : e.name) || "", this.value = (e == null ? void 0 : e.value) || "", this.querySelectorAll("o-chip").forEach((t) => {
16
- t !== e && (t.selected = !1);
17
- }));
18
- }
19
- render() {
20
- return m`
21
- <slot></slot>
22
- `;
23
- }
24
- };
25
- a.styles = p`
26
- :host {
27
- display: flex;
28
- flex-direction: row;
29
- flex-wrap: wrap;
30
- gap: var(--spacing-s);
31
- }
32
- `;
33
- l([
34
- f({ reflect: !0 })
35
- ], a.prototype, "name", 2);
36
- l([
37
- f({ reflect: !0 })
38
- ], a.prototype, "value", 2);
39
- a = l([
40
- v("o-chipset")
41
- ], a);
42
- export {
43
- a as OccitaneChipset
44
- };
@@ -1,60 +0,0 @@
1
- import { i as s, m as d, a as l, x as p, t as h } from "../performance-mixin-vBVz5Iib.mjs";
2
- var u = Object.getOwnPropertyDescriptor, v = (t, a, i, c) => {
3
- for (var r = c > 1 ? void 0 : c ? u(a, i) : a, o = t.length - 1, n; o >= 0; o--)
4
- (n = t[o]) && (r = n(r) || r);
5
- return r;
6
- };
7
- let e = class extends d(l) {
8
- render() {
9
- return p` <span class="dots"></span> `;
10
- }
11
- };
12
- e.styles = s`
13
- :host {
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- height: 20px;
18
- width: 20px;
19
- }
20
-
21
- .dots {
22
- display: inline-block;
23
- width: 6px;
24
- height: 6px;
25
- border-radius: 50%;
26
- cursor: pointer;
27
- border: 1px solid var(--color-border-primary);
28
- box-sizing: border-box;
29
- background-color: var(--color-container-action-secondary-default);
30
- }
31
-
32
- :host(:hover) .dots {
33
- background-color: var(--color-container-action-secondary-hover);
34
- }
35
-
36
- :host(:active) .dots {
37
- background-color: var(--color-container-action-secondary-pressed);
38
- }
39
-
40
- :host([aria-current="true"]) .dots {
41
- background-color: var(--color-container-action-primary-default);
42
- border: 0.5px solid var(--color-border-light);
43
- width: 8px;
44
- height: 8px;
45
- }
46
-
47
- :host([aria-current="true"]:hover) .dots {
48
- background-color: var(--color-container-action-primary-hover);
49
- }
50
-
51
- :host([aria-current="true"]:active) .dots {
52
- background-color: var(--color-container-action-primary-pressed);
53
- }
54
- `;
55
- e = v([
56
- h("o-dots")
57
- ], e);
58
- export {
59
- e as OccitaneDots
60
- };
@@ -1,445 +0,0 @@
1
- import { i as m, m as y, a as w, x as p, t as x } from "../performance-mixin-vBVz5Iib.mjs";
2
- import { n as c } from "../property-8EkRXcYy.mjs";
3
- import { r as f } from "../state-BvkYxy1c.mjs";
4
- import { o as _, i as k, a as $ } from "../unsafe-svg-Dtdj_vMx.mjs";
5
- import { o as l } from "../if-defined-BaFqfNKT.mjs";
6
- var I = Object.defineProperty, O = Object.getOwnPropertyDescriptor, r = (e, i, o, t) => {
7
- for (var n = t > 1 ? void 0 : t ? O(i, o) : i, s = e.length - 1, d; s >= 0; s--)
8
- (d = e[s]) && (n = (t ? d(i, o, n) : d(n)) || n);
9
- return t && n && I(i, o, n), n;
10
- };
11
- let a = class extends y(w) {
12
- constructor() {
13
- super(...arguments), this.options = [], this.value = "", this.name = "", this.additionaltext = "+X variant(s)", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._sent = /* @__PURE__ */ new Set(), this._pendingByKey = /* @__PURE__ */ new Map(), this._handleOutsideClick = (e) => {
14
- this.contains(e.target) || (this.open = !1, this.activeIndex = -1, this._stopObserveVisibleItems());
15
- };
16
- }
17
- _getKey(e, i, o) {
18
- return (i == null ? void 0 : i.productId) ?? e.value ?? String(o);
19
- }
20
- _scheduleFlush() {
21
- this._flushTimer || (this._flushTimer = window.setTimeout(() => {
22
- this._flushTimer = void 0, this._flushPending();
23
- }, 80));
24
- }
25
- _flushPending() {
26
- if (!this.open || this._pendingByKey.size === 0) return;
27
- const e = Array.from(this._pendingByKey.values());
28
- this._pendingByKey.clear(), this.dispatchEvent(
29
- new CustomEvent("event-tracking", {
30
- detail: {
31
- products: e
32
- },
33
- bubbles: !0,
34
- composed: !0
35
- })
36
- );
37
- }
38
- _emitTrackingEvent(e, i) {
39
- const o = e == null ? void 0 : e.dataproduct;
40
- if (!o) return;
41
- let t;
42
- try {
43
- t = JSON.parse(o);
44
- } catch (n) {
45
- console.warn("Invalid dataproduct JSON:", o, n);
46
- return;
47
- }
48
- this.dispatchEvent(
49
- new CustomEvent("event-tracking", {
50
- detail: {
51
- product: t
52
- },
53
- bubbles: !0,
54
- composed: !0
55
- })
56
- );
57
- }
58
- connectedCallback() {
59
- super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick), this._unsubOcc = _(() => this.requestUpdate());
60
- }
61
- disconnectedCallback() {
62
- var e;
63
- document.removeEventListener("click", this._handleOutsideClick), (e = this._unsubOcc) == null || e.call(this), super.disconnectedCallback();
64
- }
65
- _startObserveVisibleItems() {
66
- var i;
67
- this._stopObserveVisibleItems();
68
- const e = (i = this.renderRoot) == null ? void 0 : i.querySelector("#dropdown-listbox");
69
- e && (this._io = new IntersectionObserver(
70
- (o) => {
71
- if (this.open)
72
- for (const t of o) {
73
- if (!t.isIntersecting) continue;
74
- const n = t.target, s = n.dataset.index;
75
- if (!s) continue;
76
- const d = Number(s), h = this.options[d];
77
- if (!h || h.disabled) continue;
78
- const u = h.dataproduct ?? n.dataset.product;
79
- if (!u) continue;
80
- let v;
81
- try {
82
- v = JSON.parse(u);
83
- } catch (g) {
84
- console.warn("Invalid dataproduct JSON:", u, g);
85
- continue;
86
- }
87
- const b = this._getKey(h, v, d);
88
- this._sent.has(b) || (this._sent.add(b), this._pendingByKey.set(b, v), this._scheduleFlush());
89
- }
90
- },
91
- {
92
- root: e,
93
- threshold: 0.75
94
- }
95
- ), e.querySelectorAll("li[role='option']").forEach((o) => {
96
- var t;
97
- return (t = this._io) == null ? void 0 : t.observe(o);
98
- }));
99
- }
100
- _stopObserveVisibleItems() {
101
- var e;
102
- this._flushPending(), this._flushTimer && (clearTimeout(this._flushTimer), this._flushTimer = void 0), (e = this._io) == null || e.disconnect(), this._io = void 0;
103
- }
104
- toggle() {
105
- var e;
106
- if (!this.disabled) {
107
- if (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((i) => i.value === this.value) : -1, this.open && this.width === "auto") {
108
- const i = (e = this.renderRoot) == null ? void 0 : e.querySelector("button");
109
- i && (this.menuWidth = `${i.getBoundingClientRect().width}px`);
110
- }
111
- this.open ? this.updateComplete.then(() => {
112
- this._focusActiveOption(), this._startObserveVisibleItems();
113
- }) : this._stopObserveVisibleItems();
114
- }
115
- }
116
- _focusActiveOption() {
117
- var i;
118
- const e = (i = this.renderRoot) == null ? void 0 : i.querySelector(`#option-${this.activeIndex}`);
119
- e == null || e.focus();
120
- }
121
- selectOption(e) {
122
- this.value = e.value, this.dispatchEvent(new CustomEvent("change", {
123
- detail: { value: this.value, url: e.url }
124
- })), this.open = !1, this.activeIndex = -1;
125
- }
126
- handleKeydown(e) {
127
- if (this.disabled) {
128
- e.preventDefault();
129
- return;
130
- }
131
- if (!this.open) {
132
- (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((i) => i.value === this.value), this.updateComplete.then(() => this._focusActiveOption()));
133
- return;
134
- }
135
- switch (e.key) {
136
- case "ArrowDown":
137
- e.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
138
- break;
139
- case "ArrowUp":
140
- e.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
141
- break;
142
- case "Home":
143
- e.preventDefault(), this.activeIndex = 0, this.updateComplete.then(() => this._focusActiveOption());
144
- break;
145
- case "End":
146
- e.preventDefault(), this.activeIndex = this.options.length - 1, this.updateComplete.then(() => this._focusActiveOption());
147
- break;
148
- case "Enter":
149
- e.preventDefault(), this.activeIndex >= 0 && this.selectOption(this.options[this.activeIndex]);
150
- break;
151
- case "Escape":
152
- e.preventDefault(), this.open = !1, this.activeIndex = -1;
153
- break;
154
- }
155
- }
156
- updated() {
157
- this.options.length > 0 && (this.options.some((i) => i.value === this.value) || (this.value = this.options[0].value));
158
- }
159
- render() {
160
- const e = k["occ-check-outlined"] ?? "", i = e ? e.replace(
161
- "<svg",
162
- '<svg aria-hidden="true" focusable="false" part="svg"'
163
- ) : "", o = this.options.find((t) => t.value === this.value);
164
- return p`
165
- <button
166
- role="combobox"
167
- aria-haspopup="listbox"
168
- aria-controls="dropdown-listbox"
169
- aria-expanded="${this.open}"
170
- aria-disabled="${this.disabled ? "true" : "false"}"
171
- aria-labelledby="dropdown-label"
172
- @click=${this.toggle}
173
- @keydown=${this.handleKeydown}
174
- style=${`width: ${this.width};`}
175
- ?disabled=${this.disabled}
176
- class="btn-dropdown"
177
- >
178
- <img alt="${l(o == null ? void 0 : o.label)}" src="${l(o == null ? void 0 : o.imgurl)}" />
179
- <span id="dropdown-label" class="label">
180
- ${o ? o.label : "Select an option"}
181
- </span>
182
- <div class="right">
183
- <span class="additional-text">${this.additionaltext}</span>
184
- <span class="arrow">
185
- <o-icon-button
186
- icon="${this.open ? "occ-triangle-up" : "occ-triangle-down"}"
187
- size="medium"
188
- bgstyle="none-contrast"
189
- type="span">
190
- </o-icon-button>
191
- </span>
192
- </div>
193
- </button>
194
-
195
- ${this.open ? p`
196
- <ul
197
- id="dropdown-listbox"
198
- role="listbox"
199
- aria-activedescendant="${this.activeIndex >= 0 ? "option-" + this.activeIndex : ""}"
200
- style=${`width: ${this.width};`}
201
- >
202
- ${this.options.map(
203
- (t, n) => p`
204
- <li
205
- id="option-${n}"
206
- role="option"
207
- data-index="${n}"
208
- data-product="${l(t.dataproduct)}"
209
- aria-selected="${t.value === this.value}"
210
- aria-disabled="${t.disabled ? "true" : "false"}"
211
- tabindex="${n === this.activeIndex ? "0" : "-1"}"
212
- class="${n === this.activeIndex ? "active" : ""} ${t.disabled ? "disabled" : ""}"
213
- @click=${(s) => {
214
- this._emitTrackingEvent(t, n), this.selectOption(t);
215
- }}
216
- >
217
-
218
- <a href="${l(t.url)}">
219
- <img alt="${l(t.label)}" src="${l(t.imgurl)}" />
220
- <span class="label">${t.label}</span>
221
- <div class="right">
222
- <span class="additional-text">${l(t.additionaltext)}</span>
223
- ${t.value === this.value && !t.additionaltext ? p`
224
- <span class="check">${$(i)}</span>` : null}
225
- </div>
226
- </a>
227
- </li>
228
- `
229
- )}
230
- </ul>` : null}
231
-
232
- <input type="hidden" name="${this.name}" .value="${this.value}" />
233
- `;
234
- }
235
- };
236
- a.styles = m`
237
- :host {
238
- display: inline-block;
239
- position: relative;
240
- width: 100%;
241
- }
242
-
243
- .btn-dropdown {
244
- display: flex;
245
- gap: var(--spacing-l);
246
- width: 100%;
247
- height: 50px;
248
- color: var(--color-content-body);
249
- align-items: center;
250
- background-color: var(--color-container-bg-default);
251
- cursor: pointer;
252
- border-radius: var(--radius-m);
253
- border: var(--border-m) solid var(--color-border-secondary);
254
- padding: 0;
255
- overflow: hidden;
256
- }
257
-
258
- .btn-dropdown:disabled {
259
- background-color: var(--color-container-disabled);
260
- pointer-events: none;
261
- }
262
-
263
- .btn-dropdown:disabled .label {
264
- color: var(--color-content-disabled);
265
- }
266
-
267
- .btn-dropdown img {
268
- width: 40px;
269
- height: 50px;
270
- }
271
-
272
- .btn-dropdown .right {
273
- display: flex;
274
- align-items: center;
275
- gap: var(--spacing-l);
276
- }
277
-
278
- .btn-dropdown .arrow {
279
- margin-top: auto;
280
- margin-bottom: auto;
281
- margin-right: var(--spacing-l);
282
- }
283
-
284
- .btn-dropdown:hover {
285
- border: var(--border-m) solid var(--color-border-primary);
286
- }
287
-
288
- .btn-dropdown[aria-expanded="true"] {
289
- border: var(--border-l) solid var(--color-border-primary);
290
- }
291
-
292
- .label {
293
- flex: 1;
294
- text-align: start;
295
- font-family: var(--font-family-loccitane-sans);
296
- font-weight: var(--font-weight-500);
297
- font-size: var(--font-size-100);
298
- line-height: var(--line-height-160);
299
- letter-spacing: var(--letter-spacing-400);
300
- text-transform: uppercase;
301
- color: var(--color-content-body);
302
- }
303
-
304
- ul {
305
- list-style: none;
306
- margin: 4px 0 0 0;
307
- padding: 0;
308
- border: var(--border-m) solid var(--color-border-secondary);
309
- position: absolute;
310
- background: white;
311
- height: auto;
312
- overflow-y: auto;
313
- z-index: 1000;
314
- border-radius: var(--radius-200);
315
- background-color: var(--color-container-action-secondary-default);
316
- max-height: calc(5 * 40px);
317
- }
318
-
319
- li {
320
- display: flex;
321
- justify-content: space-between;
322
- align-items: center;
323
- cursor: pointer;
324
- border-bottom: var(--border-s) solid var(--color-border-secondary);
325
- gap: var(--spacing-l);
326
- padding-right: var(--spacing-l);
327
- }
328
-
329
- li a {
330
- display: flex;
331
- width: 100%;
332
- gap: var(--spacing-l);
333
- align-items: center;
334
- text-decoration: none;
335
- }
336
-
337
- li a:active {
338
- color: inherit;
339
- text-decoration: none;
340
- }
341
-
342
- li a img {
343
- width: 40px;
344
- height: 50px;
345
- }
346
-
347
- li.disabled {
348
- background-color: var(--color-container-disabled);
349
- }
350
-
351
- li.disabled .label {
352
- color: var(--color-content-disabled);
353
- }
354
-
355
- li:hover:not(.disabled) {
356
- background-color: var(--color-container-action-secondary-hover);
357
- }
358
-
359
- li:active:not(.disabled) {
360
- background-color: var(--color-container-action-secondary-pressed);
361
- }
362
-
363
- li[aria-selected="true"] {
364
- background-color: var(--color-container-action-tertiary-default);
365
- }
366
-
367
- li[aria-selected="true"]:hover {
368
- background-color: var(--color-container-action-tertiary-hover);
369
- }
370
-
371
- li[aria-selected="true"]:active {
372
- background-color: var(--color-container-action-tertiary-pressed);
373
- }
374
-
375
- li[aria-selected="true"].disabled {
376
- background-color: var(--color-container-disabled);
377
- }
378
-
379
- li:last-child {
380
- border-bottom: none;
381
- }
382
-
383
- li span {
384
- font-family: var(--font-family-loccitane-sans);
385
- font-weight: var(--font-weight-400);
386
- font-size: var(--font-size-150);
387
- line-height: var(--line-height-200);
388
- letter-spacing: var(--letter-spacing-000);
389
- height: auto;
390
- }
391
-
392
- .additional-text {
393
- font-family: var(--font-family-loccitane-sans);
394
- font-weight: var(--font-weight-400);
395
- font-size: var(--font-size-100);
396
- line-height: var(--line-height-160);
397
- letter-spacing: var(--letter-spacing-400);
398
- text-decoration: none;
399
- color: var(--color-content-description);
400
- }
401
-
402
- .check {
403
- margin-left: var(--spacing-100);
404
- width: 12px;
405
- height: auto;
406
- color: var(--color-content-action-secondary);
407
- }
408
-
409
- input[type="hidden"] {
410
- display: none;
411
- }
412
- `;
413
- r([
414
- c({ type: Array, reflect: !0 })
415
- ], a.prototype, "options", 2);
416
- r([
417
- c({ type: String, reflect: !0 })
418
- ], a.prototype, "value", 2);
419
- r([
420
- c({ type: String, reflect: !0 })
421
- ], a.prototype, "name", 2);
422
- r([
423
- c({ type: String, reflect: !0 })
424
- ], a.prototype, "additionaltext", 2);
425
- r([
426
- c({ type: Boolean, reflect: !0 })
427
- ], a.prototype, "disabled", 2);
428
- r([
429
- c({ type: String, reflect: !0 })
430
- ], a.prototype, "width", 2);
431
- r([
432
- f()
433
- ], a.prototype, "open", 2);
434
- r([
435
- f()
436
- ], a.prototype, "activeIndex", 2);
437
- r([
438
- f()
439
- ], a.prototype, "menuWidth", 2);
440
- a = r([
441
- x("o-dropdown-variant")
442
- ], a);
443
- export {
444
- a as OccitaneDropdownVariant
445
- };