@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,303 @@
1
+ import { i as u, m as v, a as b, x as s, t as f } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as l } from "../property-S_Y9cb04.mjs";
3
+ import { r as h } from "../state-DjMxXomO.mjs";
4
+ import { o as g, i as y } from "../icons-Pdn_6YtT.mjs";
5
+ import { o as p } from "../unsafe-svg-C3uTocNg.mjs";
6
+ var m = Object.defineProperty, w = Object.getOwnPropertyDescriptor, n = (e, t, r, o) => {
7
+ for (var i = o > 1 ? void 0 : o ? w(t, r) : t, c = e.length - 1, d; c >= 0; c--)
8
+ (d = e[c]) && (i = (o ? d(t, r, i) : d(i)) || i);
9
+ return o && i && m(t, r, i), i;
10
+ };
11
+ let a = class extends v(b) {
12
+ constructor() {
13
+ super(...arguments), this.options = [], this.value = "", this.name = "", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (e) => {
14
+ this.contains(e.target) || (this.open = !1, this.activeIndex = -1);
15
+ };
16
+ }
17
+ connectedCallback() {
18
+ super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick), this._unsubOcc = g(() => this.requestUpdate());
19
+ }
20
+ disconnectedCallback() {
21
+ var e;
22
+ document.removeEventListener("click", this._handleOutsideClick), (e = this._unsubOcc) == null || e.call(this), super.disconnectedCallback();
23
+ }
24
+ toggle() {
25
+ var e;
26
+ if (!this.disabled) {
27
+ if (this.open = !this.open, this.activeIndex = this.open ? this.options.findIndex((t) => t.value === this.value) : -1, this.open && this.width === "auto") {
28
+ const t = (e = this.renderRoot) == null ? void 0 : e.querySelector("button");
29
+ t && (this.menuWidth = `${t.getBoundingClientRect().width}px`);
30
+ }
31
+ this.open && this.updateComplete.then(() => {
32
+ this._focusActiveOption();
33
+ });
34
+ }
35
+ }
36
+ _focusActiveOption() {
37
+ var t;
38
+ const e = (t = this.renderRoot) == null ? void 0 : t.querySelector(`#option-${this.activeIndex}`);
39
+ e == null || e.focus();
40
+ }
41
+ selectOption(e) {
42
+ this.value = e.value, this.dispatchEvent(new CustomEvent("change", { detail: { value: this.value, url: e.url } })), this.open = !1, this.activeIndex = -1;
43
+ }
44
+ handleKeydown(e) {
45
+ if (this.disabled) {
46
+ e.preventDefault();
47
+ return;
48
+ }
49
+ if (!this.open) {
50
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), this.open = !0, this.activeIndex = this.options.findIndex((t) => t.value === this.value), this.updateComplete.then(() => this._focusActiveOption()));
51
+ return;
52
+ }
53
+ switch (e.key) {
54
+ case "ArrowDown":
55
+ e.preventDefault(), this.activeIndex = (this.activeIndex + 1) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
56
+ break;
57
+ case "ArrowUp":
58
+ e.preventDefault(), this.activeIndex = (this.activeIndex - 1 + this.options.length) % this.options.length, this.updateComplete.then(() => this._focusActiveOption());
59
+ break;
60
+ case "Home":
61
+ e.preventDefault(), this.activeIndex = 0, this.updateComplete.then(() => this._focusActiveOption());
62
+ break;
63
+ case "End":
64
+ e.preventDefault(), this.activeIndex = this.options.length - 1, this.updateComplete.then(() => this._focusActiveOption());
65
+ break;
66
+ case "Enter":
67
+ e.preventDefault(), this.activeIndex >= 0 && this.selectOption(this.options[this.activeIndex]);
68
+ break;
69
+ case "Escape":
70
+ e.preventDefault(), this.open = !1, this.activeIndex = -1;
71
+ break;
72
+ }
73
+ }
74
+ updated(e) {
75
+ this.options.length > 0 && (this.options.some((r) => r.value === this.value) || (this.value = this.options[0].value));
76
+ }
77
+ render() {
78
+ const e = y["occ-check-outlined"] ?? "", t = e ? e.replace(
79
+ "<svg",
80
+ '<svg aria-hidden="true" focusable="false" part="svg"'
81
+ ) : "", r = this.options.find((o) => o.value === this.value);
82
+ return s`
83
+ <button
84
+ role="combobox"
85
+ aria-haspopup="listbox"
86
+ aria-controls="dropdown-listbox"
87
+ aria-expanded="${this.open}"
88
+ aria-disabled="${this.disabled ? "true" : "false"}"
89
+ aria-labelledby="dropdown-label"
90
+ @click=${this.toggle}
91
+ @keydown=${this.handleKeydown}
92
+ style=${`width: ${this.width};`}
93
+ ?disabled=${this.disabled}
94
+ >
95
+ <span id="dropdown-label" class="label">
96
+ ${r ? r.label : "Select an option"}
97
+ </span>
98
+ <span class="arrow">
99
+ <o-icon-button icon='${this.open ? "occ-triangle-up" : "occ-triangle-down"}' size="small" bgstyle="none-contrast" type="span"></o-icon-button>
100
+ </span>
101
+ </button>
102
+
103
+ ${this.open ? s`
104
+ <ul
105
+ id="dropdown-listbox"
106
+ role="listbox"
107
+ aria-activedescendant="${this.activeIndex >= 0 ? "option-" + this.activeIndex : ""}"
108
+ style=${`width: ${this.width};`}
109
+ >
110
+ ${this.options.map(
111
+ (o, i) => s`
112
+ <li
113
+ id="option-${i}"
114
+ role="option"
115
+ aria-selected="${o.value === this.value}"
116
+ tabindex="${i === this.activeIndex ? "0" : "-1"}"
117
+ class="${i === this.activeIndex ? "active" : ""} ${o.disabled ? "disabled" : ""}"
118
+ @click=${() => this.selectOption(o)}
119
+ >
120
+ ${o.url ? s`
121
+ <a href="${o.url}">
122
+ <span>${o.label}</span>
123
+ ${o.value === this.value ? s`<span class="check">${p(t)}</span>` : null}
124
+ </a>` : s`
125
+ <span>${o.label}</span>
126
+ ${o.value === this.value ? s`<span class="check">${p(t)}</span>` : null}`}
127
+ </li>`
128
+ )}
129
+ </ul>` : null}
130
+
131
+ <input type="hidden" name="${this.name}" .value="${this.value}" />
132
+ `;
133
+ }
134
+ };
135
+ a.styles = u`
136
+ :host {
137
+ display: inline-block;
138
+ position: relative;
139
+ width: 100%;
140
+ }
141
+
142
+ button {
143
+ padding: var(--spacing-s) var(--spacing-l);
144
+ background-color: var(--color-container-bg-default);
145
+ cursor: pointer;
146
+ border-radius: var(--radius-m);
147
+ border: var(--border-m) solid var(--color-border-secondary);
148
+ display: flex;
149
+ justify-content: space-between;
150
+ width: 100%;
151
+ color: var(--color-content-body);
152
+ }
153
+
154
+ button .label {
155
+ font-family: var(--font-family-loccitane-sans);
156
+ font-weight: var(--font-weight-400);
157
+ font-size: var(--font-size-150);
158
+ line-height: var(--line-height-200);
159
+ letter-spacing: var(--letter-spacing-000);
160
+ }
161
+
162
+ button .arrow {
163
+ margin-top: auto;
164
+ margin-bottom: auto;
165
+ margin-left: var(--spacing-s);
166
+ }
167
+
168
+ button:disabled {
169
+ background-color: var(--color-container-disabled);
170
+ pointer-events: none;
171
+ }
172
+
173
+ button:disabled .label {
174
+ color: var(--color-content-disabled);
175
+ }
176
+
177
+ button:hover {
178
+ border: var(--border-m) solid var(--color-border-primary);
179
+ }
180
+
181
+ button[aria-expanded="true"] {
182
+ border: var(--border-l) solid var(--color-border-primary);
183
+ }
184
+
185
+ ul {
186
+ list-style: none;
187
+ margin: 4px 0 0 0;
188
+ padding: 0;
189
+ border: var(--border-m) solid var(--color-border-secondary);
190
+ position: absolute;
191
+ background: white;
192
+ height: auto;
193
+ overflow-y: auto;
194
+ z-index: 1000;
195
+ border-radius: var(--radius-200);
196
+ background-color: var(--color-container-action-secondary-default);
197
+ max-height: calc(5 * 40px);
198
+ }
199
+
200
+ li {
201
+ display: flex;
202
+ justify-content: space-between;
203
+ align-items: center;
204
+ padding: var(--spacing-s) var(--spacing-l) var(--spacing-s) var(--spacing-s);
205
+ cursor: pointer;
206
+ border-bottom: var(--border-s) solid var(--color-border-secondary);
207
+ }
208
+
209
+ li a {
210
+ display: flex;
211
+ justify-content: space-between;
212
+ width: 100%;
213
+ text-decoration: none;
214
+ color: var(--color-content-body);
215
+ }
216
+
217
+ li.disabled {
218
+ background-color: var(--color-container-disabled);
219
+ }
220
+
221
+ li.disabled span {
222
+ color: var(--color-content-disabled);
223
+ }
224
+
225
+ li:hover:not(.disabled) {
226
+ background-color: var(--color-container-action-secondary-hover);
227
+ }
228
+
229
+ li:active:not(.disabled) {
230
+ background-color: var(--color-container-action-secondary-pressed);
231
+ }
232
+
233
+ li[aria-selected="true"] {
234
+ background-color: var(--color-container-action-tertiary-default);
235
+ }
236
+
237
+ li[aria-selected="true"]:hover {
238
+ background-color: var(--color-container-action-tertiary-hover);
239
+ }
240
+
241
+ li[aria-selected="true"]:active {
242
+ background-color: var(--color-container-action-tertiary-pressed);
243
+ }
244
+
245
+ li[aria-selected="true"].disabled {
246
+ background-color: var(--color-container-disabled);
247
+ }
248
+
249
+ li:last-child {
250
+ border-bottom: none;
251
+ }
252
+
253
+ li span {
254
+ font-family: var(--font-family-loccitane-sans);
255
+ font-weight: var(--font-weight-400);
256
+ font-size: var(--font-size-150);
257
+ line-height: var(--line-height-200);
258
+ letter-spacing: var(--letter-spacing-000);
259
+ height: auto;
260
+ color: var(--color-content-body);
261
+ }
262
+
263
+ .check {
264
+ margin-left: var(--spacing-100);
265
+ width: 12px;
266
+ height: auto;
267
+ color: var(--color-content-action-secondary);
268
+ }
269
+
270
+ input[type="hidden"] {
271
+ display: none;
272
+ }
273
+ `;
274
+ n([
275
+ l({ type: Array, reflect: !0 })
276
+ ], a.prototype, "options", 2);
277
+ n([
278
+ l({ type: String, reflect: !0 })
279
+ ], a.prototype, "value", 2);
280
+ n([
281
+ l({ type: String, reflect: !0 })
282
+ ], a.prototype, "name", 2);
283
+ n([
284
+ l({ type: Boolean, reflect: !0 })
285
+ ], a.prototype, "disabled", 2);
286
+ n([
287
+ l({ type: String, reflect: !0 })
288
+ ], a.prototype, "width", 2);
289
+ n([
290
+ h()
291
+ ], a.prototype, "open", 2);
292
+ n([
293
+ h()
294
+ ], a.prototype, "activeIndex", 2);
295
+ n([
296
+ h()
297
+ ], a.prototype, "menuWidth", 2);
298
+ a = n([
299
+ f("o-dropdown")
300
+ ], a);
301
+ export {
302
+ a as OccitaneDropdown
303
+ };
@@ -0,0 +1,136 @@
1
+ import { i as f, m as d, a as p, x as v, t as h } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n } from "../property-S_Y9cb04.mjs";
3
+ import "./icon-button.mjs";
4
+ var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (r, a, s, c) => {
5
+ for (var e = c > 1 ? void 0 : c ? g(a, s) : a, i = r.length - 1, l; i >= 0; i--)
6
+ (l = r[i]) && (e = (c ? l(a, s, e) : l(e)) || e);
7
+ return c && e && b(a, s, e), e;
8
+ };
9
+ const y = ["standard", "success", "info", "error"], u = {
10
+ standard: "occ-check-filled",
11
+ success: "occ-check-filled",
12
+ error: "occ-close-filled",
13
+ info: "occ-info"
14
+ };
15
+ let t = class extends d(p) {
16
+ constructor() {
17
+ super(...arguments), this.variant = "standard", this.framed = !1, this.longtext = !1, this.text = "";
18
+ }
19
+ render() {
20
+ const r = u[this.variant];
21
+ return v`
22
+ <div class="feedback" role="status">
23
+ <span class="icon">
24
+ <o-icon-button
25
+ type="span"
26
+ icon=${r}
27
+ size="medium"
28
+ bgstyle="none-light"
29
+ ></o-icon-button>
30
+ </span>
31
+ <span class="text">
32
+ <slot>${this.text}</slot>
33
+ </span>
34
+ </div>
35
+ `;
36
+ }
37
+ };
38
+ t.styles = f`
39
+ :host {
40
+ --feedback-text-color: var(--color-content-action-secondary, #3F2B2E);
41
+ --feedback-bg-color: var(--color-container-bg-default, #F5F0EB);
42
+
43
+ display: block;
44
+ width: fit-content;
45
+ }
46
+
47
+ :host([longtext]) {
48
+ width: 100%;
49
+ }
50
+
51
+ :host([variant="success"]) {
52
+ --feedback-text-color: var(--color-content-success);
53
+ --feedback-bg-color: var(--color-container-success, #C2D5B1);
54
+ }
55
+
56
+ :host([variant="error"]) {
57
+ --feedback-text-color: var(--color-content-error);
58
+ --feedback-bg-color: var(--color-container-error, #EAB1B7);
59
+ }
60
+
61
+ :host([variant="info"]) {
62
+ --feedback-text-color: var(--color-content-info);
63
+ --feedback-bg-color: var(--color-container-info, #C5D3E3);
64
+ }
65
+
66
+ .feedback {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: var(--spacing-s);
70
+ }
71
+
72
+ :host([framed]) .feedback {
73
+ background-color: var(--feedback-bg-color);
74
+ border-radius: var(--radius-S, 2px);
75
+ padding: var(--spacing-m);
76
+ }
77
+
78
+ :host([framed][variant="success"]) .feedback,
79
+ :host([framed][variant="error"]) .feedback,
80
+ :host([framed][variant="info"]) .feedback {
81
+ background: linear-gradient(var(--color-alpha-light-strong, rgba(255, 255, 255, 0.56)),
82
+ var(--color-alpha-light-strong, rgba(255, 255, 255, 0.56))),
83
+ var(--feedback-bg-color);
84
+ }
85
+
86
+ :host([framed]) .text,
87
+ :host([framed]) .icon o-icon-button::part(icon-path) {
88
+ color: var(--color-content-action-secondary, #3F2B2E);
89
+ fill: var(--color-content-action-secondary, #3F2B2E);
90
+ font-size: var(--font-size-150);
91
+ }
92
+
93
+ .icon {
94
+ flex: 0 0 auto;
95
+ display: inline-flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ line-height: 0;
99
+ }
100
+
101
+ .icon o-icon-button::part(icon-path) {
102
+ fill: var(--feedback-text-color);
103
+ }
104
+
105
+ .text {
106
+ flex: 1 1 auto;
107
+ font-family: var(--font-family-loccitane-sans);
108
+ font-size: var(--font-size-100);
109
+ font-weight: var(--font-weight-400);
110
+ line-height: var(--line-height-160);
111
+ color: var(--feedback-text-color);
112
+ }
113
+
114
+ :host([framed]) .text {
115
+ line-height: var(--line-height-200);
116
+ }
117
+ `;
118
+ o([
119
+ n({ type: String, reflect: !0 })
120
+ ], t.prototype, "variant", 2);
121
+ o([
122
+ n({ type: Boolean, reflect: !0 })
123
+ ], t.prototype, "framed", 2);
124
+ o([
125
+ n({ type: Boolean, reflect: !0 })
126
+ ], t.prototype, "longtext", 2);
127
+ o([
128
+ n({ type: String })
129
+ ], t.prototype, "text", 2);
130
+ t = o([
131
+ h("o-feedback-message")
132
+ ], t);
133
+ export {
134
+ t as OccitaneFeedbackMessage,
135
+ y as feedbackMessageVariantValues
136
+ };
@@ -0,0 +1,215 @@
1
+ import { m as u, a as b, i as p, x as o, E as l, t as f } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n as s } from "../property-S_Y9cb04.mjs";
3
+ import { f as v } from "../css-C8WrrxT-.mjs";
4
+ import { m as g } from "../element-internals-Dw7LndlH.mjs";
5
+ import { a as m } from "../icons-Pdn_6YtT.mjs";
6
+ import { o as y } from "../unsafe-svg-C3uTocNg.mjs";
7
+ import "./icon-button.mjs";
8
+ var x = Object.defineProperty, k = Object.getOwnPropertyDescriptor, r = (t, i, a, c) => {
9
+ for (var n = c > 1 ? void 0 : c ? k(i, a) : i, h = t.length - 1, d; h >= 0; h--)
10
+ (d = t[h]) && (n = (c ? d(i, a, n) : d(n)) || n);
11
+ return c && n && x(i, a, n), n;
12
+ };
13
+ const $ = u(g(b));
14
+ let e = class extends $ {
15
+ constructor() {
16
+ super(...arguments), this.name = "", this.value = "", this.type = "", this.text = "", this.selected = !1, this.disabled = !1, this.fullwidth = !1, this.crossIconName = "cross", this.strikethroughImgName = "strikeDiagonal";
17
+ }
18
+ handleClick(t) {
19
+ if (t instanceof KeyboardEvent && t.key !== "Enter" && t.key !== " ")
20
+ return;
21
+ this.selected = !this.selected;
22
+ const i = { selected: this.selected }, a = new CustomEvent("selected", { detail: i, bubbles: !0, composed: !0, cancelable: !0 });
23
+ this.dispatchEvent(a), a.defaultPrevented && t.preventDefault(), this.selected = i.selected;
24
+ }
25
+ crossIcon() {
26
+ return o`<o-icon-button size="xsmall" icon="occ-close-outlined" bgstyle="none-light"></o-icon-button>`;
27
+ }
28
+ strikeThroughImg() {
29
+ const t = m[this.strikethroughImgName].replace(
30
+ "<svg",
31
+ '<svg aria-hidden="true" focusable="false" part="strikethrough"'
32
+ ).replace(/stroke=[#"'a-z1-9]*/gi, "");
33
+ return y(t);
34
+ }
35
+ render() {
36
+ const t = this.text;
37
+ return o`${this.type === "link" ? o`
38
+ <a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
39
+ aria-label=${this.ariaLabel || l} aria-pressed=${this.selected}>
40
+ ${t ? o`
41
+ ${this.text ? o`<span class="text">${this.text}</span>` : l}
42
+ ` : o`
43
+ <span class="text"><slot></slot></span>`}
44
+ ${this.selected ? this.crossIcon() : l}
45
+ </a>
46
+ ` : o`
47
+ <button type="button" class="button" ?disabled=${this.disabled} @click=${this.handleClick}
48
+ aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
49
+ ${t ? o`
50
+ ${this.text ? o`<span class="text">${this.text}</span>` : l}
51
+ ` : o`
52
+ <span class="text"><slot></slot></span>`}
53
+ ${this.selected ? this.crossIcon() : l}
54
+ </button>
55
+ `}
56
+ ${this.disabled ? this.strikeThroughImg() : l}
57
+ `;
58
+ }
59
+ };
60
+ e.styles = p`
61
+ :host {
62
+ cursor: pointer;
63
+ display: inline-flex;
64
+ position: relative;
65
+ --button-bg: var(--color-container-action-secondary-default);
66
+ --button-bg-hover: var(--color-container-action-secondary-hover);
67
+ --button-bg-pressed: var(--color-container-action-secondary-pressed);
68
+ --button-text: var(--color-content-action-secondary);
69
+ --button-text-hover: var(--color-content-action-secondary);
70
+ --button-border: var(--color-border-secondary);
71
+ --button-border-width: var(--border-m);
72
+ --button-padding: var(--spacing-m) var(--spacing-xl);
73
+ --button-strikethrough-stroke: var(--color-border-secondary);
74
+ }
75
+
76
+ :host(.a--tabfocus) {
77
+ outline: none !important;
78
+ }
79
+
80
+ :host([fullwidth]) {
81
+ width: 100%;
82
+ }
83
+
84
+ :host([selected]) {
85
+ --button-bg: var(--color-container-filter-default);
86
+ --button-bg-hover: var(--color-container-filter-hover);
87
+ --button-bg-pressed: var(--color-container-filter-pressed);
88
+ --button-text: var(--color-content-action-primary);
89
+ --button-text-hover: var(--color-content-action-primary);
90
+ --button-border: var(--color-container-filter-default);
91
+ --button-strikethrough-stroke: var(--color-border-light);
92
+ }
93
+
94
+ :host([disabled]),
95
+ :host([aria-disabled="true"]),
96
+ :host([aria-disabled="true"]:hover) {
97
+ --button-border: var(--color-border-secondary);
98
+ opacity: 0.64;
99
+ }
100
+
101
+ .button {
102
+ display: inline-flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ width: 100%;
106
+ gap: var(--spacing-s);
107
+ height: 100%;
108
+ background-color: var(--button-bg);
109
+ color: var(--button-text);
110
+ border: var(--button-border-width, var(--border-m)) solid var(--button-border);
111
+ border-radius: var(--radius-m);
112
+ font-family: var(--font-family-loccitane-sans);
113
+ font-size: var(--font-size-150);
114
+ font-weight: var(--font-weight-400);
115
+ line-height: var(--line-height-200);
116
+ min-width: 64px;
117
+ padding: var(--button-padding);
118
+ text-decoration: none;
119
+ cursor: inherit;
120
+ box-sizing: border-box;
121
+ }
122
+
123
+ .button span {
124
+ font-family: var(--font-family-loccitane-sans);
125
+ font-size: var(--font-size-150);
126
+ font-weight: var(--font-weight-400);
127
+ line-height: var(--line-height-200);
128
+ display: inline-flex;
129
+ align-items: center;
130
+ }
131
+
132
+ .button:hover:not([disabled]) {
133
+ background-color: var(--button-bg-hover);
134
+ color: var(--button-text-hover);
135
+ }
136
+
137
+ .button:active:not([disabled]) {
138
+ background-color: var(--button-bg-pressed);
139
+ }
140
+
141
+ .button:focus-visible {
142
+ ${v};
143
+ }
144
+
145
+ span.text + span.text::before {
146
+ content: "•";
147
+ margin-right: 8px;
148
+ }
149
+
150
+ .cross-icon {
151
+ display: inline-flex;
152
+ align-items: center;
153
+ }
154
+
155
+ .cross-icon svg {
156
+ width: 8px;
157
+ height: 8px;
158
+ stroke: var(--color-content-action-primary);
159
+ }
160
+
161
+ .button slot {
162
+ margin-top: 1px;
163
+ display: inline-flex;
164
+ align-items: center;
165
+ }
166
+
167
+ [part="strikethrough"] {
168
+ position: absolute;
169
+ width: 100%;
170
+ height: 100%;
171
+ top: 0;
172
+ bottom: 0;
173
+ left: 0;
174
+ right: 0;
175
+ }
176
+
177
+ [part="strikethrough"] line {
178
+ stroke: var(--button-strikethrough-stroke);
179
+ stroke-width: 4px;
180
+ stroke-linecap: round;
181
+ }
182
+ `;
183
+ r([
184
+ s({ reflect: !0 })
185
+ ], e.prototype, "name", 2);
186
+ r([
187
+ s({ reflect: !0 })
188
+ ], e.prototype, "value", 2);
189
+ r([
190
+ s({ type: String, reflect: !0 })
191
+ ], e.prototype, "type", 2);
192
+ r([
193
+ s({ type: String, reflect: !0 })
194
+ ], e.prototype, "href", 2);
195
+ r([
196
+ s({ type: String, reflect: !0, attribute: "data-href" })
197
+ ], e.prototype, "dataHref", 2);
198
+ r([
199
+ s({ type: String })
200
+ ], e.prototype, "text", 2);
201
+ r([
202
+ s({ type: Boolean, reflect: !0 })
203
+ ], e.prototype, "selected", 2);
204
+ r([
205
+ s({ type: Boolean, reflect: !0 })
206
+ ], e.prototype, "disabled", 2);
207
+ r([
208
+ s({ type: Boolean, reflect: !0 })
209
+ ], e.prototype, "fullwidth", 2);
210
+ e = r([
211
+ f("o-filter-chip")
212
+ ], e);
213
+ export {
214
+ e as OccitaneFilterChip
215
+ };