@florid-kit/components 2.6.18 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/assets/icons/icons-occ.d.ts +315 -0
  2. package/assets/icons/icons.d.ts +12 -84
  3. package/assets/icons/svg-utils.d.ts +13 -0
  4. package/behaviors/performance-mixin.d.ts +0 -23
  5. package/behaviors/performance-reporter.d.ts +1 -0
  6. package/components/accordion-group.mjs +61 -0
  7. package/components/accordion.mjs +185 -0
  8. package/components/arch-image.mjs +135 -0
  9. package/components/badge.mjs +75 -0
  10. package/components/breadcrumb.mjs +83 -0
  11. package/components/breadcrumbs.mjs +35 -0
  12. package/components/button.d.ts +3 -0
  13. package/components/button.mjs +12 -0
  14. package/components/checkbox.mjs +188 -0
  15. package/components/chip.mjs +158 -0
  16. package/components/chipset.mjs +44 -0
  17. package/components/dots.mjs +60 -0
  18. package/components/dropdown-variant.d.ts +1 -0
  19. package/components/dropdown-variant.mjs +446 -0
  20. package/components/dropdown.d.ts +1 -0
  21. package/components/dropdown.mjs +303 -0
  22. package/components/feedback-message.mjs +136 -0
  23. package/components/filter-chip.mjs +215 -0
  24. package/components/footer-simplify.mjs +178 -0
  25. package/components/header-simplify.mjs +234 -0
  26. package/components/icon-button.d.ts +5 -0
  27. package/components/icon-button.mjs +340 -0
  28. package/components/input.mjs +298 -0
  29. package/components/link.mjs +172 -0
  30. package/components/mediumtile.mjs +307 -0
  31. package/components/minitile.mjs +234 -0
  32. package/components/option-tile-group.mjs +105 -0
  33. package/components/option-tile.mjs +413 -0
  34. package/components/popin.mjs +412 -0
  35. package/components/radio.mjs +165 -0
  36. package/components/rating.mjs +81 -0
  37. package/components/reassurance.mjs +163 -0
  38. package/components/search-input-dropdown.mjs +314 -0
  39. package/components/search-input.mjs +107 -0
  40. package/components/side-panel.mjs +1206 -0
  41. package/components/tab.mjs +140 -0
  42. package/components/tablist.mjs +44 -0
  43. package/components/tag.mjs +86 -0
  44. package/components/textarea.mjs +269 -0
  45. package/components/thumbnail-navigation.mjs +232 -0
  46. package/components/toast.mjs +191 -0
  47. package/components/tooltip.mjs +125 -0
  48. package/components/wishlist-button.mjs +132 -0
  49. package/css-C8WrrxT-.mjs +41 -0
  50. package/directive-helpers-BHuwIghp.mjs +11 -0
  51. package/directive-oAbCiebi.mjs +27 -0
  52. package/element-internals-Dw7LndlH.mjs +19 -0
  53. package/icons-Pdn_6YtT.mjs +104 -0
  54. package/icons-occ.mjs +834 -0
  55. package/if-defined-j0wE2gL4.mjs +10 -0
  56. package/index.mjs +41 -9719
  57. package/live-C_TUoYRm.mjs +30 -0
  58. package/loader.d.ts +3 -0
  59. package/loader.mjs +78 -0
  60. package/logo-CEgaTL93.mjs +4 -0
  61. package/package.json +19 -1
  62. package/performance-mixin-D7YmSeqN.mjs +628 -0
  63. package/performance-reporter-B7ZOqnDk.mjs +89 -0
  64. package/property-S_Y9cb04.mjs +36 -0
  65. package/query-NJDNu0-P.mjs +25 -0
  66. package/state-DjMxXomO.mjs +12 -0
  67. package/svg-utils-CRDBD8ES.mjs +47 -0
  68. package/unsafe-svg-C3uTocNg.mjs +34 -0
  69. package/index.js +0 -5755
@@ -0,0 +1,172 @@
1
+ import { i as h, m as f, a as v, x as a, t as d } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as r } from "../property-S_Y9cb04.mjs";
3
+ import { o as g } from "../if-defined-j0wE2gL4.mjs";
4
+ import "./icon-button.mjs";
5
+ var m = Object.defineProperty, u = Object.getOwnPropertyDescriptor, t = (i, n, l, s) => {
6
+ for (var o = s > 1 ? void 0 : s ? u(n, l) : n, c = i.length - 1, p; c >= 0; c--)
7
+ (p = i[c]) && (o = (s ? p(n, l, o) : p(o)) || o);
8
+ return s && o && m(n, l, o), o;
9
+ };
10
+ let e = class extends f(v) {
11
+ constructor() {
12
+ super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1, this.disabled = !1;
13
+ }
14
+ _handleClick(i) {
15
+ (!this.href || this.href === "#") && i.preventDefault();
16
+ }
17
+ render() {
18
+ const i = !!this.href, n = a`
19
+ ${this.endIcon && this.reverseEndIcon ? a`
20
+ <o-icon-button
21
+ icon="occ-chevron-left"
22
+ bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
23
+ size="xsmall"
24
+ aria-hidden="true"
25
+ type="span"
26
+ ></o-icon-button>
27
+ ` : null}
28
+ <span class="link-text"><slot></slot></span>
29
+ ${this.endIcon && !this.reverseEndIcon ? a`
30
+ <o-icon-button
31
+ icon="occ-chevron-right"
32
+ bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
33
+ size="xsmall"
34
+ aria-hidden="true"
35
+ type="span"
36
+ ></o-icon-button>
37
+ ` : null}
38
+ `;
39
+ return i ? a`
40
+ <a
41
+ class="link-wrapper"
42
+ href="${this.href}"
43
+ target="${g(this.target || void 0)}"
44
+ @click="${this._handleClick}"
45
+ >
46
+ ${n}
47
+ </a>
48
+ ` : a`<span class="link-wrapper">${n}</span>`;
49
+ }
50
+ };
51
+ e.styles = h`
52
+ :host {
53
+ cursor: pointer;
54
+ }
55
+
56
+ :host([template="standard"]) .link-wrapper {
57
+ color: var(--color-content-action-secondary);
58
+ font-size: var(--font-size-200);
59
+ font-weight: var(--font-weight-400);
60
+ line-height: var(--line-height-240);
61
+ letter-spacing: var(--letter-spacing-400);
62
+ font-family: var(--font-family-loccitane-serif);
63
+ }
64
+
65
+ :host([template="discret"]) .link-wrapper {
66
+ color: var(--color-content-action-secondary);
67
+ font-size: var(--font-size-150);
68
+ font-weight: var(--font-weight-400);
69
+ line-height: var(--line-height-200);
70
+ letter-spacing: 0;
71
+ font-family: var(--font-family-loccitane-sans);
72
+ }
73
+
74
+ :host([template="review"]) .link-wrapper {
75
+ color: var(--color-content-action-secondary);
76
+ font-size: var(--font-size-100);
77
+ font-weight: var(--font-weight-500);
78
+ line-height: var(--line-height-160);
79
+ letter-spacing: var(--letter-spacing-400);
80
+ font-family: var(--font-family-loccitane-sans);
81
+ text-transform: uppercase;
82
+ }
83
+
84
+ :host([inverse]) .link-wrapper {
85
+ color: var(--color-container-action-tertiary-default);
86
+ }
87
+
88
+ :host([disabled]) {
89
+ pointer-events: none;
90
+ }
91
+
92
+ :host([disabled]) .link-wrapper {
93
+ color: var(--color-content-disabled);
94
+ }
95
+
96
+ :host([endIcon]) .link-wrapper o-icon-button {
97
+ margin-left: 2px;
98
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
99
+ }
100
+
101
+ :host([endIcon][reverseEndIcon]) .link-wrapper o-icon-button {
102
+ margin-right: 2px;
103
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
104
+ }
105
+
106
+ :host .link-wrapper {
107
+ position: relative;
108
+ text-decoration: none;
109
+ color: inherit;
110
+ }
111
+
112
+ .link-text {
113
+ position: relative;
114
+ display: inline-block;
115
+ }
116
+
117
+ .link-text::after {
118
+ content: "";
119
+ position: absolute;
120
+ left: 0;
121
+ bottom: 0;
122
+ width: 100%;
123
+ opacity: 1;
124
+ height: 1px;
125
+ background-color: currentColor;
126
+ transition: opacity 0.3s ease, height 0.3s ease;
127
+ pointer-events: none;
128
+ }
129
+
130
+ @media (hover: hover) and (pointer: fine) {
131
+ :host .link-wrapper:hover .link-text::after {
132
+ opacity: 0;
133
+ height: 1px;
134
+ }
135
+
136
+ :host([endIcon]) .link-wrapper:hover o-icon-button {
137
+ transform: translateX(4px);
138
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
139
+ }
140
+
141
+ :host([endIcon][reverseEndIcon]) .link-wrapper:hover o-icon-button {
142
+ transform: translateX(-4px);
143
+ }
144
+ }
145
+ `;
146
+ t([
147
+ r({ type: String })
148
+ ], e.prototype, "href", 2);
149
+ t([
150
+ r({ type: String })
151
+ ], e.prototype, "target", 2);
152
+ t([
153
+ r({ type: String, reflect: !0 })
154
+ ], e.prototype, "template", 2);
155
+ t([
156
+ r({ type: Boolean, reflect: !0 })
157
+ ], e.prototype, "inverse", 2);
158
+ t([
159
+ r({ type: Boolean, reflect: !0 })
160
+ ], e.prototype, "endIcon", 2);
161
+ t([
162
+ r({ type: Boolean, reflect: !0 })
163
+ ], e.prototype, "reverseEndIcon", 2);
164
+ t([
165
+ r({ type: Boolean, reflect: !0 })
166
+ ], e.prototype, "disabled", 2);
167
+ e = t([
168
+ d("o-link")
169
+ ], e);
170
+ export {
171
+ e as OccitaneLink
172
+ };
@@ -0,0 +1,307 @@
1
+ import { i as f, m as h, a as d, x as n, t as g } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as i } from "../property-S_Y9cb04.mjs";
3
+ import "./icon-button.mjs";
4
+ import "./tag.mjs";
5
+ var v = Object.defineProperty, y = Object.getOwnPropertyDescriptor, e = (r, o, l, s) => {
6
+ for (var a = s > 1 ? void 0 : s ? y(o, l) : o, c = r.length - 1, p; c >= 0; c--)
7
+ (p = r[c]) && (a = (s ? p(o, l, a) : p(a)) || a);
8
+ return s && a && v(o, l, a), a;
9
+ };
10
+ let t = class extends h(d) {
11
+ constructor() {
12
+ super(...arguments), this.type = "cart | notifyme", this.titleProduct = "", this.descriptionProduct = "", this.volume = "", this.perLiter = "", this.mainPrice = "", this.salesPercentage = "", this.oldPrice = "", this.imageUrl = "https://placehold.co/112x140", this.outOfStock = !1, this.outOfStockText = "Out of stock", this.altImage = "", this.fullwidth = !1, this.current = !1, this.hideIcon = !1, this.tagText = "";
13
+ }
14
+ onClick(r) {
15
+ var l, s, a;
16
+ const o = r.target;
17
+ (l = o == null ? void 0 : o.classList) != null && l.contains("add-to-bag") || (s = o == null ? void 0 : o.classList) != null && s.contains("js-availability-notify-details-routine") || ((a = this.onClickTile) == null || a.call(this), this.dispatchEvent(
18
+ new CustomEvent("tile-click", { bubbles: !0, composed: !0 })
19
+ ));
20
+ }
21
+ onClickIcons() {
22
+ var r;
23
+ (r = this.onClickIcon) == null || r.call(this), this.dispatchEvent(
24
+ new CustomEvent("tile-icon-click", { bubbles: !0, composed: !0 })
25
+ );
26
+ }
27
+ get icons() {
28
+ return this.hideIcon ? "" : n`
29
+ <o-icon-button
30
+ @click=${this.onClickIcons}
31
+ icon=${this.type === "notifyme" ? "notifyme" : "cart"}
32
+ size="small"
33
+ bgstyle="background-contrast"
34
+ type="span"
35
+ status="empty"
36
+ strokewidth="0"
37
+ class=${this.type === "notifyme" ? "js-availability-notify-details-routine" : "add-to-bag"}
38
+ ></o-icon-button>
39
+ `;
40
+ }
41
+ render() {
42
+ return n`
43
+ <button
44
+ type="button"
45
+ class="tile fullpointer ${this.fullwidth ? "fullwidth" : ""} ${this.current ? "current" : ""}"
46
+ @click=${this.onClick}
47
+ >
48
+ ${this.imageUrl ? n`<img src="${this.imageUrl}" alt="${this.altImage || ""}" />` : ""}
49
+ <div class="info">
50
+ ${this.tagText ? n`<o-tag bgstyle="background-emphasis">${this.tagText}</o-tag>` : ""}
51
+ ${this.outOfStock ? n`<o-tag type="nostock" role="status" aria-live="polite"
52
+ >${this.outOfStockText}</o-tag
53
+ >` : ""}
54
+ <div class="title-volume">
55
+ ${this.titleProduct ? n`<div class="title">${this.titleProduct}</div>` : ""}
56
+ ${this.volume ? n`<span class="volume-info">${this.volume}</span>` : ""}
57
+ </div>
58
+ ${this.descriptionProduct ? n`<div class="description">${this.descriptionProduct}</div>` : ""}
59
+ <div class="details">
60
+ ${this.salesPercentage && this.oldPrice ? n`<div class="discount-info">
61
+ <o-tag bgstyle="background-emphasis"
62
+ >${this.salesPercentage}</o-tag
63
+ >
64
+ <span class="old-price">${this.oldPrice}</span>
65
+ </div>` : ""}
66
+ <div class="price-details">
67
+ <div class="price-info">
68
+ ${this.mainPrice ? n`<span class="main-price">${this.mainPrice}</span>` : ""}
69
+ ${this.perLiter ? n`<span class="per-liter">${this.perLiter}</span>` : ""}
70
+ </div>
71
+ ${this.icons}
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </button>
76
+ `;
77
+ }
78
+ };
79
+ t.styles = f`
80
+ :host {
81
+ display: block;
82
+ max-width: 100%;
83
+ }
84
+
85
+ .tile {
86
+ display: flex;
87
+ column-gap: var(--spacing-l);
88
+ align-items: flex-start;
89
+ justify-content: space-between;
90
+ border-radius: var(--radius-m);
91
+ background: var(--color-container-bg-white);
92
+ box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.06);
93
+ font-family: var(--font-family-loccitane-sans);
94
+ width: 343px;
95
+ max-width: 343px;
96
+ padding: var(--spacing-l);
97
+ margin: 0;
98
+ border: 0 none;
99
+ box-sizing: border-box;
100
+
101
+ &.current {
102
+ border: var(--border-m, 1px) solid
103
+ var(--color-border-secondary, #7e7173);
104
+ }
105
+
106
+ &:hover {
107
+ box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12);
108
+ }
109
+
110
+ &:active {
111
+ box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.32);
112
+ }
113
+ }
114
+
115
+ .tile.fullwidth {
116
+ width: 100%;
117
+ max-width: 100%;
118
+ }
119
+
120
+ .tile img {
121
+ object-fit: cover;
122
+ width: 112px;
123
+ height: 140px;
124
+ background: linear-gradient(to bottom, #f9f5f0, #f7f2ea);
125
+ }
126
+
127
+ .info {
128
+ flex-grow: 1;
129
+ display: flex;
130
+ flex-direction: column;
131
+ justify-content: space-between;
132
+ row-gap: var(--spacing-s);
133
+ min-height: 140px;
134
+ }
135
+
136
+ .info .title {
137
+ color: var(--color-content-body, #3f2b2e);
138
+ font-family: var(--font-family-loccitane-serif);
139
+ font-size: var(--font-size-200, 16px);
140
+ font-weight: var(--font-weight-400, 400);
141
+ line-height: var(--line-height-200, 20px);
142
+ letter-spacing: var(--letter-spacing-000, 0);
143
+ text-align: left;
144
+ display: -webkit-box;
145
+ -webkit-line-clamp: 2;
146
+ -webkit-box-orient: vertical;
147
+ overflow: hidden;
148
+ }
149
+
150
+ .info .description {
151
+ color: var(--color-content-description, #7e7173);
152
+ font-family: var(--font-family-loccitane-sans, LOccitaneSans);
153
+ font-size: var(--font-size-150, 14px);
154
+ font-weight: var(--font-weight-400, 400);
155
+ line-height: var(--line-height-200, 20px);
156
+ letter-spacing: var(--letter-spacing-000, 0);
157
+ text-align: left;
158
+ display: -webkit-box;
159
+ -webkit-line-clamp: 2;
160
+ -webkit-box-orient: vertical;
161
+ overflow: hidden;
162
+ }
163
+
164
+ .info .details {
165
+ display: flex;
166
+ flex-direction: column;
167
+ align-items: flex-start;
168
+ justify-content: space-between;
169
+ }
170
+
171
+ .info .discount-info {
172
+ display: flex;
173
+ align-items: center;
174
+ column-gap: var(--spacing-xs);
175
+
176
+ .old-price {
177
+ color: var(--color-content-description, #7e7173);
178
+ font-family: var(--font-family-loccitane-sans, LOccitaneSans);
179
+ font-size: var(--font-size-100, 12px);
180
+ font-style: normal;
181
+ font-weight: var(--font-weight-400, 400);
182
+ line-height: var(--line-height-160, 16px); /* 133.333% */
183
+ letter-spacing: var(--letter-spacing-000, 0);
184
+ text-decoration-line: line-through;
185
+ }
186
+ }
187
+
188
+ .info .volume-info {
189
+ color: var(--color-content-description, #7e7173);
190
+ font-family: var(--font-family-loccitane-sans, LOccitaneSans);
191
+ font-size: var(--font-size-100, 12px);
192
+ font-style: normal;
193
+ font-weight: var(--font-weight-400, 400);
194
+ line-height: var(--line-height-160, 16px);
195
+ text-align: left;
196
+ letter-spacing: var(--letter-spacing-400, 0.64px);
197
+ }
198
+
199
+ .info o-tag {
200
+ display: flex;
201
+ }
202
+
203
+ .title-volume {
204
+ display: flex;
205
+ align-items: flex-start;
206
+ flex-direction: column;
207
+ row-gap: var(--spacing-2-xs);
208
+ }
209
+
210
+ .main-price {
211
+ color: var(--color-content-body, #3f2b2e);
212
+ font-family: var(--font-family-loccitane-sans, LOccitaneSans);
213
+ font-size: var(--font-size-150, 14px);
214
+ font-style: normal;
215
+ font-weight: var(--font-weight-400, 400);
216
+ line-height: var(--line-height-200, 20px); /* 142.857% */
217
+ letter-spacing: var(--letter-spacing-000, 0);
218
+ }
219
+
220
+ .per-liter {
221
+ color: var(--color-content-description, #7e7173);
222
+ font-family: var(--font-family-loccitane-sans, LOccitaneSans);
223
+ font-size: var(--font-size-100, 12px);
224
+ font-style: normal;
225
+ font-weight: var(--font-weight-400, 400);
226
+ line-height: var(--line-height-160, 16px);
227
+ letter-spacing: var(--letter-spacing-400, 0.64px);
228
+ }
229
+
230
+ .price-details {
231
+ display: flex;
232
+ justify-content: space-between;
233
+ align-items: center;
234
+ width: 100%;
235
+ }
236
+
237
+ .price-info {
238
+ display: flex;
239
+ column-gap: var(--spacing-xs);
240
+ align-items: center;
241
+ height: 32px;
242
+ }
243
+
244
+ .fullpointer {
245
+ cursor: pointer;
246
+ }
247
+ `;
248
+ e([
249
+ i({ type: String })
250
+ ], t.prototype, "type", 2);
251
+ e([
252
+ i({ type: String })
253
+ ], t.prototype, "titleProduct", 2);
254
+ e([
255
+ i({ type: String })
256
+ ], t.prototype, "descriptionProduct", 2);
257
+ e([
258
+ i({ type: String })
259
+ ], t.prototype, "volume", 2);
260
+ e([
261
+ i({ type: String })
262
+ ], t.prototype, "perLiter", 2);
263
+ e([
264
+ i({ type: String })
265
+ ], t.prototype, "mainPrice", 2);
266
+ e([
267
+ i({ type: String })
268
+ ], t.prototype, "salesPercentage", 2);
269
+ e([
270
+ i({ type: String })
271
+ ], t.prototype, "oldPrice", 2);
272
+ e([
273
+ i({ type: String })
274
+ ], t.prototype, "imageUrl", 2);
275
+ e([
276
+ i({ type: Boolean })
277
+ ], t.prototype, "outOfStock", 2);
278
+ e([
279
+ i({ type: String })
280
+ ], t.prototype, "outOfStockText", 2);
281
+ e([
282
+ i({ type: String })
283
+ ], t.prototype, "altImage", 2);
284
+ e([
285
+ i({ type: Boolean })
286
+ ], t.prototype, "fullwidth", 2);
287
+ e([
288
+ i({ type: Boolean })
289
+ ], t.prototype, "current", 2);
290
+ e([
291
+ i({ type: Boolean })
292
+ ], t.prototype, "hideIcon", 2);
293
+ e([
294
+ i({ type: String })
295
+ ], t.prototype, "tagText", 2);
296
+ e([
297
+ i({ attribute: !1 })
298
+ ], t.prototype, "onClickTile", 2);
299
+ e([
300
+ i({ attribute: !1 })
301
+ ], t.prototype, "onClickIcon", 2);
302
+ t = e([
303
+ g("o-medium-tile")
304
+ ], t);
305
+ export {
306
+ t as MediumTile
307
+ };
@@ -0,0 +1,234 @@
1
+ import { m as f, a as d, x as o, i as g } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as i } from "../property-S_Y9cb04.mjs";
3
+ import "./icon-button.mjs";
4
+ import "./tag.mjs";
5
+ var m = Object.defineProperty, e = (p, n, s, l) => {
6
+ for (var a = void 0, r = p.length - 1, h; r >= 0; r--)
7
+ (h = p[r]) && (a = h(n, s, a) || a);
8
+ return a && m(n, s, a), a;
9
+ };
10
+ const c = class c extends f(d) {
11
+ constructor() {
12
+ super(...arguments), this.type = "cart | chevron", this.titleProduct = "", this.volume = "", this.perLiter = "", this.mainPrice = "", this.imageUrl = "https://placehold.co/56x70", this.altImage = "", this.fullwidth = !1, this.tagText = "", this.outOfStock = !1;
13
+ }
14
+ onClick(n) {
15
+ var l, a, r;
16
+ const s = n.target;
17
+ (l = s == null ? void 0 : s.classList) != null && l.contains("add-to-bag") || (a = s == null ? void 0 : s.classList) != null && a.contains("js-availability-notify-details-cart") || ((r = this.onClickTile) == null || r.call(this), this.dispatchEvent(
18
+ new CustomEvent("tile-click", { bubbles: !0, composed: !0 })
19
+ ));
20
+ }
21
+ onClickIcons() {
22
+ var n;
23
+ (n = this.onClickIcon) == null || n.call(this), this.dispatchEvent(
24
+ new CustomEvent("tile-icon-click", { bubbles: !0, composed: !0 })
25
+ );
26
+ }
27
+ get icons() {
28
+ return this.type === "chevron" ? o`
29
+ <o-icon-button
30
+ @click=${this.onClickIcons}
31
+ icon="occ-chevron-right"
32
+ size="small"
33
+ bgstyle="background-contrast"
34
+ type="span"
35
+ status="filled"
36
+ strokewidth="0"
37
+ aria-hidden="true"
38
+ tabindex="-1"
39
+ class="chevron-icon"
40
+ ></o-icon-button>
41
+ ` : o`
42
+ <o-icon-button
43
+ @click=${this.onClickIcons}
44
+ icon=${this.outOfStock ? "notifyme" : "cart"}
45
+ size="small"
46
+ bgstyle="background-contrast"
47
+ type="span"
48
+ status="empty"
49
+ strokewidth="0"
50
+ class=${this.outOfStock ? "js-availability-notify-details-cart" : "add-to-bag"}
51
+ ></o-icon-button>
52
+ `;
53
+ }
54
+ render() {
55
+ return o`
56
+ <button
57
+ type="button"
58
+ class="tile fullpointer ${this.fullwidth ? "fullwidth" : ""}"
59
+ @click=${this.onClick}
60
+ >
61
+ ${this.imageUrl ? o`<img src="${this.imageUrl}" alt="${this.altImage || ""}" />` : ""}
62
+ <div class="info">
63
+ ${this.outOfStock ? o`<o-tag type="nostock" role="status" aria-live="polite"
64
+ >${this.tagText}</o-tag
65
+ >` : this.tagText ? o`<o-tag bgstyle="background-emphasis">${this.tagText}</o-tag>` : ""}
66
+ ${this.titleProduct ? o`<div class="title">${this.titleProduct}</div>` : ""}
67
+ <div class="details">
68
+ ${this.volume ? o`<span class="volume-info">${this.volume}</span>` : ""}
69
+ ${this.type === "cart" && this.mainPrice ? o`<span class="main-price">${this.mainPrice}</span>` : ""}
70
+ ${this.type === "cart" && this.perLiter ? o`<span class="per-liter">${this.perLiter}</span>` : ""}
71
+ </div>
72
+ </div>
73
+ ${this.icons}
74
+ </button>
75
+ `;
76
+ }
77
+ };
78
+ c.styles = g`
79
+ :host {
80
+ display: block;
81
+ max-width: 100%;
82
+ }
83
+
84
+ .tile {
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: space-between;
88
+ border-radius: var(--radius-xs);
89
+ background: var(--color-container-bg-white);
90
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
91
+ font-family: var(--font-family-loccitane-sans);
92
+ height: 78px;
93
+ width: 368px;
94
+ max-width: 368px;
95
+ padding: var(--spacing-2-xs) var(--spacing-s) var(--spacing-2-xs)
96
+ var(--spacing-2-xs);
97
+ margin: 0;
98
+ border: 0 none;
99
+ box-sizing: border-box;
100
+ }
101
+
102
+ .tile o-icon-button {
103
+ margin-left: var(--spacing-xl);
104
+ }
105
+
106
+ .tile.fullwidth {
107
+ width: 100%;
108
+ max-width: 100%;
109
+ }
110
+
111
+ .tile img {
112
+ object-fit: cover;
113
+ width: 56px;
114
+ height: 70px;
115
+ background: linear-gradient(to bottom, #f9f5f0, #f7f2ea);
116
+ }
117
+
118
+ .info {
119
+ flex: 1 1 auto;
120
+ min-width: 0;
121
+ margin-left: 10px;
122
+ }
123
+
124
+ .info .title {
125
+ font-family: var(--font-family-loccitane-serif);
126
+ font-size: var(--font-size-150);
127
+ font-weight: var(--font-weight-400);
128
+ color: var(--colors-noir-des-terres-500);
129
+ line-height: var(--line-height-160);
130
+ letter-spacing: var(--letter-spacing-100);
131
+ text-align: left;
132
+ max-height: 32px;
133
+ overflow: hidden;
134
+ text-overflow: ellipsis;
135
+ display: -webkit-box;
136
+ -webkit-line-clamp: 1;
137
+ -webkit-box-orient: vertical;
138
+ }
139
+
140
+ .info .title + .details {
141
+ padding-top: var(--spacing-s);
142
+ overflow: hidden;
143
+ text-overflow: ellipsis;
144
+ display: -webkit-box;
145
+ -webkit-line-clamp: 1;
146
+ -webkit-box-orient: vertical;
147
+ text-align: left;
148
+ }
149
+
150
+ .info .details {
151
+ display: flex;
152
+ align-items: center;
153
+ min-width: 0;
154
+ overflow: hidden;
155
+ }
156
+
157
+ .info .volume-info {
158
+ font-size: var(--font-size-100);
159
+ color: var(--colors-noir-des-terres-500);
160
+ font-family: var(--font-family-loccitane-sans);
161
+ line-height: var(--line-height-160);
162
+ }
163
+
164
+ .info .volume-info + .main-price::before {
165
+ content: "•";
166
+ padding: 0 var(--spacing-xs) 0 var(--spacing-2-xs);
167
+ color: var(--colors-noir-des-terres-500);
168
+ }
169
+
170
+ .info o-tag {
171
+ margin-bottom: var(--spacing-xs);
172
+ display: flex;
173
+ }
174
+
175
+ .main-price {
176
+ font-family: var(--font-family-loccitane-sans);
177
+ color: var(--colors-noir-des-terres-500);
178
+ font-size: var(--font-size-100);
179
+ padding: 0 var(--spacing-xs) 0 0;
180
+ font-weight: var(--font-weight-400);
181
+ }
182
+
183
+ .per-liter {
184
+ font-size: var(--font-size-100);
185
+ color: var(--color-content-description);
186
+ letter-spacing: var(--letter-spacing-absolute);
187
+ line-height: var(--line-height-160);
188
+ }
189
+
190
+ .fullpointer {
191
+ cursor: pointer;
192
+ }
193
+ `;
194
+ let t = c;
195
+ e([
196
+ i({ type: String })
197
+ ], t.prototype, "type");
198
+ e([
199
+ i({ type: String })
200
+ ], t.prototype, "titleProduct");
201
+ e([
202
+ i({ type: String })
203
+ ], t.prototype, "volume");
204
+ e([
205
+ i({ type: String })
206
+ ], t.prototype, "perLiter");
207
+ e([
208
+ i({ type: String })
209
+ ], t.prototype, "mainPrice");
210
+ e([
211
+ i({ type: String })
212
+ ], t.prototype, "imageUrl");
213
+ e([
214
+ i({ type: String })
215
+ ], t.prototype, "altImage");
216
+ e([
217
+ i({ type: Boolean })
218
+ ], t.prototype, "fullwidth");
219
+ e([
220
+ i({ type: String })
221
+ ], t.prototype, "tagText");
222
+ e([
223
+ i({ type: Boolean })
224
+ ], t.prototype, "outOfStock");
225
+ e([
226
+ i({ attribute: !1 })
227
+ ], t.prototype, "onClickTile");
228
+ e([
229
+ i({ attribute: !1 })
230
+ ], t.prototype, "onClickIcon");
231
+ customElements.define("mini-tile", t);
232
+ export {
233
+ t as MiniTile
234
+ };