@florid-kit/components 2.6.10 → 2.6.11

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 +5742 -0
  8. package/index.mjs +9700 -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,105 +0,0 @@
1
- import { i as u, m as c, a as d, x as p, t as m } from "../performance-mixin-vBVz5Iib.mjs";
2
- import { n as h } from "../property-8EkRXcYy.mjs";
3
- var _ = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (e, t, s, i) => {
4
- for (var r = i > 1 ? void 0 : i ? g(t, s) : t, l = e.length - 1, a; l >= 0; l--)
5
- (a = e[l]) && (r = (i ? a(t, s, r) : a(r)) || r);
6
- return i && r && _(t, s, r), r;
7
- };
8
- let o = class extends c(d) {
9
- constructor() {
10
- super(...arguments), this.layout = "row", this.columns = 3, this._lockedHeight = null, this._mutationObserver = null;
11
- }
12
- connectedCallback() {
13
- var e;
14
- super.connectedCallback(), this.hasAttribute("columns") && this.style.setProperty("--option-tile-group-columns", String(this.columns)), this._setupObserver(), this._scheduleRemeasure(), (e = document.fonts) == null || e.ready.then(() => this._scheduleRemeasure());
15
- }
16
- disconnectedCallback() {
17
- var e;
18
- super.disconnectedCallback(), (e = this._mutationObserver) == null || e.disconnect(), this._mutationObserver = null, this._retryFrame && cancelAnimationFrame(this._retryFrame);
19
- }
20
- _setupObserver() {
21
- var e;
22
- (e = this._mutationObserver) == null || e.disconnect(), this._mutationObserver = new MutationObserver((t) => {
23
- const s = t.some((r) => r.attributeName === "selected"), i = t.some((r) => r.attributeName === "description-expanded");
24
- s ? this._clearAndRemeasure() : i && this._applyLockedHeight();
25
- }), this._mutationObserver.observe(this, {
26
- subtree: !0,
27
- attributes: !0,
28
- attributeFilter: ["description-expanded", "selected"]
29
- });
30
- }
31
- _clearAndRemeasure() {
32
- this._lockedHeight = null, this._tiles().forEach((e) => e.style.removeProperty("height")), this._scheduleRemeasure();
33
- }
34
- _scheduleRemeasure() {
35
- this._retryFrame && cancelAnimationFrame(this._retryFrame), this._retryFrame = requestAnimationFrame(() => {
36
- this._retryFrame = void 0, this._tryMeasureAndLock(), this._lockedHeight === null && (this._retryFrame = requestAnimationFrame(() => {
37
- this._retryFrame = void 0, this._tryMeasureAndLock(), this._lockedHeight === null && setTimeout(() => this._tryMeasureAndLock(), 200);
38
- }));
39
- });
40
- }
41
- _tryMeasureAndLock() {
42
- if (this._lockedHeight !== null) return;
43
- const e = this._tiles().filter((t) => !t.hasAttribute("description-expanded")).map((t) => t.getBoundingClientRect().height).filter((t) => t > 0);
44
- e.length && (this._lockedHeight = Math.ceil(Math.max(...e)), this._applyLockedHeight());
45
- }
46
- _applyLockedHeight() {
47
- this._lockedHeight !== null && this._tiles().forEach((e) => {
48
- e.hasAttribute("description-expanded") ? e.style.removeProperty("height") : e.style.height = `${this._lockedHeight}px`;
49
- });
50
- }
51
- _tiles() {
52
- return Array.from(this.querySelectorAll("o-option-tile"));
53
- }
54
- render() {
55
- return p`<div class="group" part="group"><slot @slotchange=${this._clearAndRemeasure}></slot></div>`;
56
- }
57
- };
58
- o.styles = u`
59
- :host {
60
- display: block;
61
- }
62
-
63
- .group {
64
- display: flex;
65
- flex-direction: row;
66
- overflow-x: auto;
67
- gap: var(--option-tile-group-gap, 12px);
68
- align-items: flex-start;
69
- padding-bottom: 4px;
70
- }
71
-
72
- :host([layout="grid"]) .group {
73
- display: grid;
74
- grid-template-columns: repeat(var(--option-tile-group-columns, 3), 1fr);
75
- align-items: start;
76
- overflow-x: unset;
77
- }
78
-
79
- /* Make tiles fill their grid column by overriding the tile's own width CSS variable */
80
- :host([layout="grid"]) {
81
- --option-tile-width: 100%;
82
- --option-tile-width-desktop: 100%;
83
- }
84
-
85
- ::slotted(o-option-tile) {
86
- flex: 0 0 auto;
87
- }
88
-
89
- :host([layout="grid"]) ::slotted(o-option-tile) {
90
- flex: unset;
91
- width: 100%;
92
- }
93
- `;
94
- n([
95
- h({ type: String, reflect: !0 })
96
- ], o.prototype, "layout", 2);
97
- n([
98
- h({ type: Number, reflect: !0 })
99
- ], o.prototype, "columns", 2);
100
- o = n([
101
- m("o-option-tile-group")
102
- ], o);
103
- export {
104
- o as OccitaneOptionTileGroup
105
- };
@@ -1,413 +0,0 @@
1
- import { i as c, m as g, a as y, x as a, E as r, t as u } from "../performance-mixin-vBVz5Iib.mjs";
2
- import { n as i } from "../property-8EkRXcYy.mjs";
3
- import "./icon-button.mjs";
4
- import "./side-panel.mjs";
5
- import "./link.mjs";
6
- var f = Object.defineProperty, b = Object.getOwnPropertyDescriptor, e = (o, s, p, l) => {
7
- for (var n = l > 1 ? void 0 : l ? b(s, p) : s, h = o.length - 1, d; h >= 0; h--)
8
- (d = o[h]) && (n = (l ? d(s, p, n) : d(n)) || n);
9
- return l && n && f(s, p, n), n;
10
- };
11
- let t = class extends g(y) {
12
- constructor() {
13
- super(...arguments), this.sku = "", this.imageUrl = "", this.altImage = "", this.title = "", this.description = "", this.price = "", this.priceValue = 0, this.linkLabel = "", this.linkHref = "", this.linkTarget = "_self", this.selected = !1, this.withQuantity = !1, this.quantity = 1, this.labelAdd = "Add", this.labelRemove = "Remove", this.labelFree = "FREE", this.labelShowDetails = "Show details", this.labelHideDetails = "Hide details", this.disabled = !1, this.width = "", this.height = "", this.imageSize = "", this._descriptionExpanded = !1;
14
- }
15
- updated(o) {
16
- super.updated(o), o.has("width") && (this.width ? (this.style.setProperty("--option-tile-width", this.width), this.style.setProperty("--option-tile-width-desktop", this.width)) : (this.style.removeProperty("--option-tile-width"), this.style.removeProperty("--option-tile-width-desktop"))), o.has("height") && (this.height ? this.style.setProperty("--option-tile-height", this.height) : this.style.removeProperty("--option-tile-height")), o.has("imageSize") && (this.imageSize ? (this.style.setProperty("--option-tile-image-width", this.imageSize), this.style.setProperty("--option-tile-image-height", this.imageSize), this.style.setProperty("--option-tile-image-width-desktop", this.imageSize), this.style.setProperty("--option-tile-image-height-desktop", this.imageSize)) : (this.style.removeProperty("--option-tile-image-width"), this.style.removeProperty("--option-tile-image-height"), this.style.removeProperty("--option-tile-image-width-desktop"), this.style.removeProperty("--option-tile-image-height-desktop")));
17
- }
18
- // -------------------------------------------------------------------------
19
- // Handlers
20
- // -------------------------------------------------------------------------
21
- _handleAdd() {
22
- var s;
23
- if (this.disabled) return;
24
- this.selected = !0, this.withQuantity && (this.quantity = 1);
25
- const o = { sku: this.sku, quantity: this.quantity };
26
- (s = this.onOptionAdd) == null || s.call(this, o), this.dispatchEvent(new CustomEvent("option-add", { bubbles: !0, composed: !0, detail: o }));
27
- }
28
- _handleRemove() {
29
- var s;
30
- if (this.disabled) return;
31
- this.selected = !1, this.quantity = 1;
32
- const o = { sku: this.sku };
33
- (s = this.onOptionRemove) == null || s.call(this, o), this.dispatchEvent(new CustomEvent("option-remove", { bubbles: !0, composed: !0, detail: o }));
34
- }
35
- _handleIncrement() {
36
- var s;
37
- this.quantity += 1;
38
- const o = { sku: this.sku, quantity: this.quantity };
39
- (s = this.onOptionQuantityChange) == null || s.call(this, o), this.dispatchEvent(new CustomEvent("option-quantity-change", { bubbles: !0, composed: !0, detail: o }));
40
- }
41
- _handleDecrement() {
42
- var s;
43
- if (this.quantity <= 1) {
44
- this._handleRemove();
45
- return;
46
- }
47
- this.quantity -= 1;
48
- const o = { sku: this.sku, quantity: this.quantity };
49
- (s = this.onOptionQuantityChange) == null || s.call(this, o), this.dispatchEvent(new CustomEvent("option-quantity-change", { bubbles: !0, composed: !0, detail: o }));
50
- }
51
- _toggleDescription() {
52
- this._descriptionExpanded = !this._descriptionExpanded;
53
- }
54
- // -------------------------------------------------------------------------
55
- // Rendering helpers
56
- // -------------------------------------------------------------------------
57
- get _isFree() {
58
- return this.priceValue === 0;
59
- }
60
- get _hasPriceArea() {
61
- return this.linkLabel ? !0 : this._isFree ? this.labelFree.trim().length > 0 : this.price.trim().length > 0;
62
- }
63
- _renderPriceArea() {
64
- return this.linkLabel ? a`
65
- <o-link href=${this.linkHref || "#"} template="discret" target=${this.linkTarget}>
66
- ${this.linkLabel}
67
- </o-link>
68
- ` : this._isFree ? a`<span class="price price--free">${this.labelFree}</span>` : this.price ? a`<span class="price">${this.price}</span>` : r;
69
- }
70
- _renderQuantitySelector() {
71
- return !this.withQuantity || !this.selected ? r : a`
72
- <div class="quantity-selector" role="group" aria-label="Quantity">
73
- <o-icon-button
74
- type="button"
75
- icon="occ-minus"
76
- size="small"
77
- bgstyle="background-contrast"
78
- aria-label="Decrease quantity"
79
- ?disabled=${this.disabled}
80
- @click=${this._handleDecrement}
81
- ></o-icon-button>
82
- <span class="quantity-value" aria-live="polite">${this.quantity}</span>
83
- <o-icon-button
84
- type="button"
85
- icon="occ-plus"
86
- size="small"
87
- bgstyle="background-contrast"
88
- aria-label="Increase quantity"
89
- ?disabled=${this.disabled}
90
- @click=${this._handleIncrement}
91
- ></o-icon-button>
92
- </div>
93
- `;
94
- }
95
- render() {
96
- return a`
97
- <div class="tile" part="tile">
98
- <div class="image-wrapper">
99
- ${this.imageUrl ? a`<img
100
- src=${this.imageUrl}
101
- alt=${this.altImage || ""}
102
- class="product-image"
103
- />` : r}
104
- ${this.selected ? a`<span class="selected-badge" aria-hidden="true">
105
- <o-icon-button
106
- type="span"
107
- icon="occ-check-filled"
108
- size="medium"
109
- bgstyle="none-contrast"
110
- ></o-icon-button>
111
- </span>` : r}
112
- </div>
113
-
114
- <div class="middle">
115
- ${this.title ? a`<div class="title">${this.title}</div>` : r}
116
-
117
- ${this._hasPriceArea ? a`<div class="price-area">${this._renderPriceArea()}</div>` : r}
118
-
119
- ${this.description ? a`<div class="description-section">
120
- ${this._descriptionExpanded ? a`<p class="description">${this.description}</p>` : r}
121
- <o-link
122
- template="discret"
123
- ?disabled=${this.disabled}
124
- @click=${this.disabled ? r : this._toggleDescription}
125
- aria-expanded=${this._descriptionExpanded ? "true" : "false"}
126
- >
127
- ${this._descriptionExpanded ? this.labelHideDetails : this.labelShowDetails}
128
- </o-link>
129
- </div>` : r}
130
-
131
- ${this._renderQuantitySelector()}
132
- </div>
133
-
134
- <o-button
135
- variant="secondary"
136
- fullwidth
137
- ?disabled=${this.disabled}
138
- text=${this.selected ? this.labelRemove : this.labelAdd}
139
- @click=${this.selected ? this._handleRemove : this._handleAdd}
140
- ></o-button>
141
- </div>
142
- `;
143
- }
144
- };
145
- t.styles = c`
146
- :host {
147
- display: block;
148
- width: var(--option-tile-width, 145.5px);
149
- height: var(--option-tile-height);
150
- }
151
-
152
- :host([fullwidth]) {
153
- width: 100%;
154
- }
155
-
156
- @media (min-width: 1025px) {
157
- :host {
158
- width: var(--option-tile-width-desktop, 184px);
159
- }
160
-
161
- :host([fullwidth]) {
162
- width: 100%;
163
- }
164
- }
165
-
166
- .tile {
167
- display: flex;
168
- padding: var(--spacing-l, 12px);
169
- flex-direction: column;
170
- align-items: flex-start;
171
- gap: var(--spacing-xl, 16px);
172
- flex: 1 0 0;
173
- align-self: stretch;
174
- height: 100%;
175
- border-radius: var(--radius-s, 2px);
176
- border: 1px solid transparent;
177
- background: var(--color-container-bg-white, #fffefe);
178
- font-family: var(--font-family-loccitane-sans);
179
- box-sizing: border-box;
180
- }
181
-
182
- /* Selected state: highlight border */
183
- :host([selected]) .tile {
184
- border-color: var(--color-alpha-dark-medium, rgba(0, 0, 0, 0.44));
185
- }
186
-
187
- /* ---- Image ---- */
188
-
189
- .image-wrapper {
190
- position: relative;
191
- width: var(--option-tile-image-width, 121.5px);
192
- height: var(--option-tile-image-height, 121.5px);
193
- align-self: center;
194
- flex-shrink: 0;
195
- background: linear-gradient(to bottom, #f9f5f0, #f7f2ea);
196
- }
197
-
198
- @media (min-width: 1025px) {
199
- .image-wrapper {
200
- width: var(--option-tile-image-width-desktop, 160px);
201
- height: var(--option-tile-image-height-desktop, 160px);
202
- }
203
- }
204
-
205
- .product-image {
206
- width: 100%;
207
- height: 100%;
208
- object-fit: cover;
209
- display: block;
210
- }
211
-
212
- /* ---- Selected badge ---- */
213
-
214
- .selected-badge {
215
- position: absolute;
216
- top: var(--spacing-xs, 4px);
217
- left: var(--spacing-xs, 4px);
218
- }
219
-
220
- .selected-badge o-icon-button::part(icon-button) {
221
- cursor: default;
222
- }
223
-
224
- /* ---- Middle content area ---- */
225
-
226
- .middle {
227
- display: flex;
228
- flex-direction: column;
229
- gap: var(--spacing-s, 8px);
230
- flex: 1;
231
- margin-bottom: 8px;
232
- }
233
-
234
- .title {
235
- color: var(--color-content-body, #3f2b2e);
236
- font-family: var(--font-family-loccitane-serif);
237
- font-size: var(--font-size-150, 14px);
238
- font-weight: var(--font-weight-400, 400);
239
- line-height: var(--line-height-160, 16px);
240
- display: -webkit-box;
241
- -webkit-line-clamp: 3;
242
- -webkit-box-orient: vertical;
243
- overflow: hidden;
244
- text-overflow: ellipsis;
245
- }
246
-
247
- /* ---- Price ---- */
248
-
249
- .price {
250
- color: var(--color-content-body, #3f2b2e);
251
- font-family: var(--font-family-loccitane-serif);
252
- font-size: var(--font-size-150, 14px);
253
- font-weight: var(--font-weight-400, 400);
254
- line-height: var(--line-height-160, 16px);
255
- letter-spacing: var(--letter-spacing-000, 0);
256
- font-style: normal;
257
- }
258
-
259
- .price-link {
260
- color: var(--color-content-action-secondary, #3f2b2e);
261
- font-family: var(--font-family-loccitane-sans);
262
- font-size: var(--font-size-150, 14px);
263
- font-weight: var(--font-weight-400, 400);
264
- line-height: var(--line-height-200, 20px);
265
- text-decoration: underline;
266
- text-underline-offset: 2px;
267
- }
268
-
269
- /* ---- Description toggle ---- */
270
-
271
- .description-section {
272
- display: flex;
273
- flex-direction: column;
274
- gap: var(--spacing-xs, 4px);
275
- }
276
-
277
- .description {
278
- color: var(--color-content-body, #3f2b2e);
279
- font-family: var(--font-family-loccitane-sans);
280
- font-size: var(--font-size-100, 12px);
281
- font-weight: var(--font-weight-400, 400);
282
- line-height: var(--line-height-160, 16px);
283
- margin: 0;
284
- }
285
-
286
- /* ---- Quantity selector ---- */
287
-
288
- .quantity-selector {
289
- display: flex;
290
- align-items: center;
291
- gap: var(--spacing-2-xs, 4px);
292
- margin-top : var(--spacing-l, 12px);
293
- }
294
-
295
- .quantity-value {
296
- min-width: 16px;
297
- text-align: center;
298
- font-family: var(--font-family-loccitane-serif);
299
- font-size: var(--font-size-150, 14px);
300
- font-weight: var(--font-weight-400, 400);
301
- line-height: var(--line-height-160, 16px);
302
- font-style: normal;
303
- letter-spacing: var(--letter-spacing-000, 0);
304
- color: var(--color-content-body, #3f2b2e);
305
- }
306
-
307
- /* ---- Disabled state ---- */
308
-
309
- :host([disabled]) .tile {
310
- position: relative;
311
- }
312
-
313
- :host([disabled]) .tile .image-wrapper::after {
314
- content: '';
315
- position: absolute;
316
- inset: 0;
317
- background: linear-gradient(180deg, var(--colors-blanc-brule-300) 0%, var(--colors-blanc-brule-300) 100%);
318
- opacity: 0.4;
319
- pointer-events: none;
320
- border-radius: var(--radius-s, 2px);
321
- }
322
-
323
- :host([disabled]) .title,
324
- :host([disabled]) .price,
325
- :host([disabled]) .description,
326
- :host([disabled]) .quantity-value {
327
- color: var(--color-content-disabled);
328
- }
329
- `;
330
- e([
331
- i({ type: String })
332
- ], t.prototype, "sku", 2);
333
- e([
334
- i({ type: String })
335
- ], t.prototype, "imageUrl", 2);
336
- e([
337
- i({ type: String })
338
- ], t.prototype, "altImage", 2);
339
- e([
340
- i({ type: String })
341
- ], t.prototype, "title", 2);
342
- e([
343
- i({ type: String })
344
- ], t.prototype, "description", 2);
345
- e([
346
- i({ type: String })
347
- ], t.prototype, "price", 2);
348
- e([
349
- i({ type: Number })
350
- ], t.prototype, "priceValue", 2);
351
- e([
352
- i({ type: String })
353
- ], t.prototype, "linkLabel", 2);
354
- e([
355
- i({ type: String })
356
- ], t.prototype, "linkHref", 2);
357
- e([
358
- i({ type: String })
359
- ], t.prototype, "linkTarget", 2);
360
- e([
361
- i({ type: Boolean, reflect: !0 })
362
- ], t.prototype, "selected", 2);
363
- e([
364
- i({ type: Boolean, reflect: !0 })
365
- ], t.prototype, "withQuantity", 2);
366
- e([
367
- i({ type: Number })
368
- ], t.prototype, "quantity", 2);
369
- e([
370
- i({ type: String })
371
- ], t.prototype, "labelAdd", 2);
372
- e([
373
- i({ type: String })
374
- ], t.prototype, "labelRemove", 2);
375
- e([
376
- i({ type: String })
377
- ], t.prototype, "labelFree", 2);
378
- e([
379
- i({ type: String })
380
- ], t.prototype, "labelShowDetails", 2);
381
- e([
382
- i({ type: String })
383
- ], t.prototype, "labelHideDetails", 2);
384
- e([
385
- i({ type: Boolean, reflect: !0 })
386
- ], t.prototype, "disabled", 2);
387
- e([
388
- i({ type: String })
389
- ], t.prototype, "width", 2);
390
- e([
391
- i({ type: String })
392
- ], t.prototype, "height", 2);
393
- e([
394
- i({ type: String, attribute: "image-size" })
395
- ], t.prototype, "imageSize", 2);
396
- e([
397
- i({ attribute: !1 })
398
- ], t.prototype, "onOptionAdd", 2);
399
- e([
400
- i({ attribute: !1 })
401
- ], t.prototype, "onOptionRemove", 2);
402
- e([
403
- i({ attribute: !1 })
404
- ], t.prototype, "onOptionQuantityChange", 2);
405
- e([
406
- i({ type: Boolean, reflect: !0, attribute: "description-expanded" })
407
- ], t.prototype, "_descriptionExpanded", 2);
408
- t = e([
409
- u("o-option-tile")
410
- ], t);
411
- export {
412
- t as OccitaneOptionTile
413
- };