@florid-kit/components 3.0.0 → 3.1.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.
- package/assets/icons/icons.d.ts +8 -2
- package/assets/icons/occ-gen/occ-address.d.ts +5 -0
- package/assets/icons/occ-gen/occ-autorep.d.ts +5 -0
- package/assets/icons/occ-gen/occ-back.d.ts +5 -0
- package/assets/icons/occ-gen/occ-bag-filled.d.ts +5 -0
- package/assets/icons/occ-gen/occ-bag-outlined.d.ts +5 -0
- package/assets/icons/occ-gen/occ-bag-strike.d.ts +5 -0
- package/assets/icons/occ-gen/occ-bottle.d.ts +5 -0
- package/assets/icons/occ-gen/occ-briefcase.d.ts +5 -0
- package/assets/icons/occ-gen/occ-burger.d.ts +5 -0
- package/assets/icons/occ-gen/occ-card.d.ts +5 -0
- package/assets/icons/occ-gen/occ-career.d.ts +5 -0
- package/assets/icons/occ-gen/occ-check-filled.d.ts +5 -0
- package/assets/icons/occ-gen/occ-check-outlined.d.ts +5 -0
- package/assets/icons/occ-gen/occ-chevron-bottom.d.ts +5 -0
- package/assets/icons/occ-gen/occ-chevron-double.d.ts +5 -0
- package/assets/icons/occ-gen/occ-chevron-left.d.ts +5 -0
- package/assets/icons/occ-gen/occ-chevron-right.d.ts +5 -0
- package/assets/icons/occ-gen/occ-chevron-top.d.ts +5 -0
- package/assets/icons/occ-gen/occ-close-filled.d.ts +5 -0
- package/assets/icons/occ-gen/occ-close-outlined.d.ts +5 -0
- package/assets/icons/occ-gen/occ-cream-tube.d.ts +5 -0
- package/assets/icons/occ-gen/occ-cream.d.ts +5 -0
- package/assets/icons/occ-gen/occ-eye-hide.d.ts +5 -0
- package/assets/icons/occ-gen/occ-eye-show.d.ts +5 -0
- package/assets/icons/occ-gen/occ-gear-outline.d.ts +5 -0
- package/assets/icons/occ-gen/occ-gear.d.ts +5 -0
- package/assets/icons/occ-gen/occ-geoloc.d.ts +5 -0
- package/assets/icons/occ-gen/occ-gift.d.ts +5 -0
- package/assets/icons/occ-gen/occ-group.d.ts +5 -0
- package/assets/icons/occ-gen/occ-hand-shake.d.ts +5 -0
- package/assets/icons/occ-gen/occ-info.d.ts +5 -0
- package/assets/icons/occ-gen/occ-loaders.d.ts +4 -0
- package/assets/icons/occ-gen/occ-location.d.ts +5 -0
- package/assets/icons/occ-gen/occ-mail.d.ts +5 -0
- package/assets/icons/occ-gen/occ-message.d.ts +5 -0
- package/assets/icons/occ-gen/occ-minus.d.ts +5 -0
- package/assets/icons/occ-gen/occ-order-sent.d.ts +5 -0
- package/assets/icons/occ-gen/occ-order.d.ts +5 -0
- package/assets/icons/occ-gen/occ-padlock.d.ts +5 -0
- package/assets/icons/occ-gen/occ-pause.d.ts +5 -0
- package/assets/icons/occ-gen/occ-play.d.ts +5 -0
- package/assets/icons/occ-gen/occ-plus.d.ts +5 -0
- package/assets/icons/occ-gen/occ-product.d.ts +5 -0
- package/assets/icons/occ-gen/occ-profil-filled.d.ts +5 -0
- package/assets/icons/occ-gen/occ-profil-outlined.d.ts +5 -0
- package/assets/icons/occ-gen/occ-refill.d.ts +5 -0
- package/assets/icons/occ-gen/occ-refine.d.ts +5 -0
- package/assets/icons/occ-gen/occ-reward-card.d.ts +5 -0
- package/assets/icons/occ-gen/occ-samples.d.ts +5 -0
- package/assets/icons/occ-gen/occ-search.d.ts +5 -0
- package/assets/icons/occ-gen/occ-star-0.d.ts +5 -0
- package/assets/icons/occ-gen/occ-star-100.d.ts +5 -0
- package/assets/icons/occ-gen/occ-star-25.d.ts +5 -0
- package/assets/icons/occ-gen/occ-star-50.d.ts +5 -0
- package/assets/icons/occ-gen/occ-star-75.d.ts +5 -0
- package/assets/icons/occ-gen/occ-store.d.ts +5 -0
- package/assets/icons/occ-gen/occ-trash.d.ts +5 -0
- package/assets/icons/occ-gen/occ-triangle-down.d.ts +5 -0
- package/assets/icons/occ-gen/occ-triangle-up.d.ts +5 -0
- package/assets/icons/occ-gen/occ-warning-stroke.d.ts +5 -0
- package/assets/icons/occ-gen/occ-warning.d.ts +5 -0
- package/assets/icons/occ-gen/occ-wishlist-filled.d.ts +5 -0
- package/assets/icons/occ-gen/occ-wishlist-outlined.d.ts +5 -0
- package/components/button.mjs +2 -2
- package/components/chip.d.ts +4 -0
- package/components/chip.mjs +122 -35
- package/components/dropdown-variant.mjs +31 -31
- package/components/dropdown.mjs +6 -6
- package/components/filter-chip.mjs +26 -23
- package/components/icon-button.mjs +17 -16
- package/components/rating.d.ts +3 -0
- package/components/rating.mjs +43 -36
- package/components/side-panel.mjs +50 -48
- package/components/toast.mjs +1 -1
- package/components/wishlist-button.d.ts +2 -0
- package/components/wishlist-button.mjs +19 -15
- package/icons/occ-address.mjs +20 -0
- package/icons/occ-autorep.mjs +26 -0
- package/icons/occ-back.mjs +17 -0
- package/icons/occ-bag-filled.mjs +17 -0
- package/icons/occ-bag-outlined.mjs +17 -0
- package/icons/occ-bag-strike.mjs +26 -0
- package/icons/occ-bottle.mjs +20 -0
- package/icons/occ-briefcase.mjs +17 -0
- package/icons/occ-burger.mjs +23 -0
- package/icons/occ-card.mjs +23 -0
- package/icons/occ-career.mjs +43 -0
- package/icons/occ-check-filled.mjs +17 -0
- package/icons/occ-check-outlined.mjs +17 -0
- package/icons/occ-chevron-bottom.mjs +17 -0
- package/icons/occ-chevron-double.mjs +20 -0
- package/icons/occ-chevron-left.mjs +17 -0
- package/icons/occ-chevron-right.mjs +17 -0
- package/icons/occ-chevron-top.mjs +17 -0
- package/icons/occ-close-filled.mjs +17 -0
- package/icons/occ-close-outlined.mjs +17 -0
- package/icons/occ-cream-tube.mjs +23 -0
- package/icons/occ-cream.mjs +23 -0
- package/icons/occ-eye-hide.mjs +17 -0
- package/icons/occ-eye-show.mjs +20 -0
- package/icons/occ-gear-outline.mjs +22 -0
- package/icons/occ-gear.mjs +22 -0
- package/icons/occ-geoloc.mjs +17 -0
- package/icons/occ-gift.mjs +17 -0
- package/icons/occ-group.mjs +20 -0
- package/icons/occ-hand-shake.mjs +57 -0
- package/icons/occ-info.mjs +17 -0
- package/icons/occ-location.mjs +20 -0
- package/icons/occ-mail.mjs +17 -0
- package/icons/occ-message.mjs +38 -0
- package/icons/occ-minus.mjs +17 -0
- package/icons/occ-order-sent.mjs +26 -0
- package/icons/occ-order.mjs +20 -0
- package/icons/occ-padlock.mjs +20 -0
- package/icons/occ-pause.mjs +20 -0
- package/icons/occ-play.mjs +17 -0
- package/icons/occ-plus.mjs +17 -0
- package/icons/occ-product.mjs +21 -0
- package/icons/occ-profil-filled.mjs +20 -0
- package/icons/occ-profil-outlined.mjs +20 -0
- package/icons/occ-refill.mjs +20 -0
- package/icons/occ-refine.mjs +20 -0
- package/icons/occ-reward-card.mjs +20 -0
- package/icons/occ-samples.mjs +26 -0
- package/icons/occ-search.mjs +17 -0
- package/icons/occ-star-0.mjs +17 -0
- package/icons/occ-star-100.mjs +17 -0
- package/icons/occ-star-25.mjs +17 -0
- package/icons/occ-star-50.mjs +17 -0
- package/icons/occ-star-75.mjs +17 -0
- package/icons/occ-store.mjs +17 -0
- package/icons/occ-trash.mjs +23 -0
- package/icons/occ-triangle-down.mjs +17 -0
- package/icons/occ-triangle-up.mjs +17 -0
- package/icons/occ-warning-stroke.mjs +23 -0
- package/icons/occ-warning.mjs +17 -0
- package/icons/occ-wishlist-filled.mjs +17 -0
- package/icons/occ-wishlist-outlined.mjs +17 -0
- package/{icons-Pdn_6YtT.mjs → icons-registry.mjs} +117 -59
- package/index.mjs +0 -3
- package/package.json +1 -1
- package/{svg-utils-CRDBD8ES.mjs → svg-utils-DOL__czZ.mjs} +1 -1
- package/icons-occ.mjs +0 -834
package/components/chip.mjs
CHANGED
|
@@ -1,41 +1,55 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import { n as
|
|
3
|
-
import { f } from "../css-C8WrrxT-.mjs";
|
|
4
|
-
import { m as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { m as p, a as b, i as u, E as c, x as l, t as v } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as o } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
import { f as g } from "../css-C8WrrxT-.mjs";
|
|
4
|
+
import { m as f } from "../element-internals-Dw7LndlH.mjs";
|
|
5
|
+
import { i as m } from "../icons-registry.mjs";
|
|
6
|
+
import { o as y } from "../unsafe-svg-C3uTocNg.mjs";
|
|
7
|
+
var x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, e = (r, i, n, a) => {
|
|
8
|
+
for (var s = a > 1 ? void 0 : a ? w(i, n) : i, h = r.length - 1, d; h >= 0; h--)
|
|
9
|
+
(d = r[h]) && (s = (a ? d(i, n, s) : d(s)) || s);
|
|
10
|
+
return a && s && x(i, n, s), s;
|
|
9
11
|
};
|
|
10
|
-
const
|
|
11
|
-
let t = class extends
|
|
12
|
+
const k = p(f(b));
|
|
13
|
+
let t = class extends k {
|
|
12
14
|
constructor() {
|
|
13
|
-
super(...arguments), this.link = "", this.name = "", this.value = "", this.text = "", this.size = "standard", this.selected = !1, this.fullwidth = !1, this.inactive = !1;
|
|
15
|
+
super(...arguments), this.link = "", this.name = "", this.value = "", this.text = "", this.size = "standard", this.selected = !1, this.fullwidth = !1, this.inactive = !1, this.withprice = !1, this.disabled = !1, this.strikethroughImgName = "strikeDiagonal";
|
|
14
16
|
}
|
|
15
|
-
|
|
17
|
+
strikeThroughImg() {
|
|
18
|
+
const r = m[this.strikethroughImgName].replace(
|
|
19
|
+
"<svg",
|
|
20
|
+
'<svg aria-hidden="true" focusable="false" part="strikethrough"'
|
|
21
|
+
).replace(/stroke=[#"'a-z1-9]*/gi, "");
|
|
22
|
+
return y(r);
|
|
23
|
+
}
|
|
24
|
+
handleClick(r) {
|
|
16
25
|
this.selected || (this.selected = !0);
|
|
17
|
-
const
|
|
18
|
-
this.dispatchEvent(
|
|
26
|
+
const i = { selected: this.selected }, n = new CustomEvent("selected", { detail: i, bubbles: !0, composed: !0, cancelable: !0 });
|
|
27
|
+
this.dispatchEvent(n), n.defaultPrevented && r.preventDefault(), this.selected = i.selected;
|
|
19
28
|
}
|
|
20
29
|
render() {
|
|
21
|
-
const n = this.
|
|
22
|
-
return
|
|
23
|
-
<a href="${this.link}" class="o-chip" tabindex="${this.inactive ? "-1" :
|
|
24
|
-
aria-current="${this.selected ? "true" :
|
|
25
|
-
${
|
|
30
|
+
const r = this.text, i = this.link, n = this.withprice, a = this.disabled;
|
|
31
|
+
return i ? l`
|
|
32
|
+
<a href="${this.link}" class="o-chip" tabindex="${this.inactive ? "-1" : c}"
|
|
33
|
+
aria-current="${this.selected ? "true" : c}">
|
|
34
|
+
${r ? this.text : l`<slot></slot>`}
|
|
35
|
+
${n ? l`<slot name="price"></slot><slot name="basicprice"></slot>` : c}
|
|
26
36
|
</a>
|
|
27
|
-
|
|
37
|
+
${a ? this.strikeThroughImg() : c}
|
|
38
|
+
` : l`
|
|
28
39
|
<button type="button" class="button" @click=${this.handleClick}
|
|
29
|
-
aria-label=${this.ariaLabel ||
|
|
30
|
-
${
|
|
40
|
+
aria-label=${this.ariaLabel || c} aria-pressed=${this.selected}>
|
|
41
|
+
${r ? this.text : l`<slot></slot>`}
|
|
42
|
+
${n ? l`<slot name="price"></slot><slot name="basicprice"></slot>` : c}
|
|
31
43
|
</button>
|
|
44
|
+
${a ? this.strikeThroughImg() : c}
|
|
32
45
|
`;
|
|
33
46
|
}
|
|
34
47
|
};
|
|
35
|
-
t.styles =
|
|
48
|
+
t.styles = u`
|
|
36
49
|
:host {
|
|
37
50
|
cursor: pointer;
|
|
38
51
|
display: inline-flex;
|
|
52
|
+
position: relative;
|
|
39
53
|
--button-bg: var(--color-container-action-secondary-default);
|
|
40
54
|
--button-bg-hover: var(--color-container-action-secondary-hover);
|
|
41
55
|
--button-bg-pressed: var(--color-container-action-secondary-pressed);
|
|
@@ -43,8 +57,12 @@ t.styles = p`
|
|
|
43
57
|
--button-text-hover: var(--color-content-action-secondary);
|
|
44
58
|
--button-border: var(--color-border-secondary);
|
|
45
59
|
--button-border-width: var(--border-m);
|
|
46
|
-
--button-padding: var(--spacing-xs) var(--spacing-m);
|
|
60
|
+
--button-padding: calc(var(--spacing-xs) - var(--button-border-width)) calc(var(--spacing-m) - var(--button-border-width));
|
|
47
61
|
--button-endicon-svg-width: 0px; /* No endicon SVG for secondary button */
|
|
62
|
+
--button-strikethrough-stroke: var(--color-border-secondary);
|
|
63
|
+
--price-margin: var(--spacing-s);
|
|
64
|
+
--basicprice-font-size: var(--font-size-100);
|
|
65
|
+
--basicprice-spacing: var(--spacing-2-xs);
|
|
48
66
|
}
|
|
49
67
|
|
|
50
68
|
:host(.a--tabfocus) {
|
|
@@ -65,8 +83,43 @@ t.styles = p`
|
|
|
65
83
|
--button-border-width: var(--border-m);
|
|
66
84
|
}
|
|
67
85
|
|
|
86
|
+
:host([disabled]) {
|
|
87
|
+
--button-bg: var(--color-container-disabled);
|
|
88
|
+
}
|
|
89
|
+
:host([disabled][selected]) {
|
|
90
|
+
--button-text: var(--color-content-action-primary);
|
|
91
|
+
--button-bg: var(--color-container-filter-pressed);
|
|
92
|
+
--button-strikethrough-stroke: var(--color-border-tertiary);
|
|
93
|
+
opacity: 0.6;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([disabled]) a::after {
|
|
97
|
+
content: "";
|
|
98
|
+
position: absolute;
|
|
99
|
+
height: 100%;
|
|
100
|
+
width: 100%;
|
|
101
|
+
display: block;
|
|
102
|
+
z-index: 2;
|
|
103
|
+
top: 0;
|
|
104
|
+
bottom: 0;
|
|
105
|
+
left: 0;
|
|
106
|
+
right: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:host([withprice]) a {
|
|
110
|
+
display: inline-flex;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:host([withprice][selected]) a:hover,
|
|
114
|
+
:host([withprice][selected]) .button:hover,
|
|
115
|
+
:host([withprice][disabled]) a:hover,
|
|
116
|
+
:host([withprice][disabled]) .button:hover {
|
|
117
|
+
background-color: var(--button-bg);
|
|
118
|
+
color: var(--button-text);
|
|
119
|
+
}
|
|
120
|
+
|
|
68
121
|
:host([size="large"]) {
|
|
69
|
-
--button-padding: var(--spacing-m) var(--spacing-xl);
|
|
122
|
+
--button-padding: calc(var(--spacing-m) - var(--button-border-width)) calc(var(--spacing-xl) - var(--button-border-width));
|
|
70
123
|
}
|
|
71
124
|
|
|
72
125
|
.o-chip,
|
|
@@ -75,7 +128,6 @@ t.styles = p`
|
|
|
75
128
|
align-items: center;
|
|
76
129
|
justify-content: center;
|
|
77
130
|
width: 100%;
|
|
78
|
-
gap: var(--spacing-2-xs);
|
|
79
131
|
height: 100%;
|
|
80
132
|
background-color: var(--button-bg);
|
|
81
133
|
color: var(--button-text);
|
|
@@ -113,7 +165,7 @@ t.styles = p`
|
|
|
113
165
|
|
|
114
166
|
.o-chip:focus-visible,
|
|
115
167
|
.button:focus-visible {
|
|
116
|
-
${
|
|
168
|
+
${g};
|
|
117
169
|
}
|
|
118
170
|
|
|
119
171
|
span.text + span.text::before {
|
|
@@ -125,31 +177,66 @@ t.styles = p`
|
|
|
125
177
|
display: inline-flex;
|
|
126
178
|
align-items: center;
|
|
127
179
|
}
|
|
180
|
+
|
|
181
|
+
::slotted([slot=price])::before {
|
|
182
|
+
content: "•";
|
|
183
|
+
margin: 0 var(--price-margin);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
::slotted([slot=basicprice]) {
|
|
187
|
+
font-size: var(--basicprice-font-size);
|
|
188
|
+
margin-left: var(--basicprice-spacing);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
[part="strikethrough"] {
|
|
192
|
+
position: absolute;
|
|
193
|
+
width: 100%;
|
|
194
|
+
height: 100%;
|
|
195
|
+
top: 0;
|
|
196
|
+
bottom: 0;
|
|
197
|
+
left: 0;
|
|
198
|
+
right: 0;
|
|
199
|
+
padding-left: 2px;
|
|
200
|
+
padding-right: 2px;
|
|
201
|
+
box-sizing: border-box;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[part="strikethrough"] line {
|
|
205
|
+
stroke: var(--button-strikethrough-stroke);
|
|
206
|
+
stroke-width: 4px;
|
|
207
|
+
stroke-linecap: round;
|
|
208
|
+
}
|
|
128
209
|
`;
|
|
129
210
|
e([
|
|
130
|
-
|
|
211
|
+
o({ type: String, reflect: !0 })
|
|
131
212
|
], t.prototype, "link", 2);
|
|
132
213
|
e([
|
|
133
|
-
|
|
214
|
+
o({ reflect: !0 })
|
|
134
215
|
], t.prototype, "name", 2);
|
|
135
216
|
e([
|
|
136
|
-
|
|
217
|
+
o({ reflect: !0 })
|
|
137
218
|
], t.prototype, "value", 2);
|
|
138
219
|
e([
|
|
139
|
-
|
|
220
|
+
o({ type: String })
|
|
140
221
|
], t.prototype, "text", 2);
|
|
141
222
|
e([
|
|
142
|
-
|
|
223
|
+
o({ type: String, reflect: !0 })
|
|
143
224
|
], t.prototype, "size", 2);
|
|
144
225
|
e([
|
|
145
|
-
|
|
226
|
+
o({ type: Boolean, reflect: !0 })
|
|
146
227
|
], t.prototype, "selected", 2);
|
|
147
228
|
e([
|
|
148
|
-
|
|
229
|
+
o({ type: Boolean, reflect: !0 })
|
|
149
230
|
], t.prototype, "fullwidth", 2);
|
|
150
231
|
e([
|
|
151
|
-
|
|
232
|
+
o({ type: Boolean, reflect: !0 })
|
|
152
233
|
], t.prototype, "inactive", 2);
|
|
234
|
+
e([
|
|
235
|
+
o({ type: Boolean, reflect: !0 })
|
|
236
|
+
], t.prototype, "withprice", 2);
|
|
237
|
+
e([
|
|
238
|
+
o({ type: Boolean, reflect: !0 })
|
|
239
|
+
], t.prototype, "disabled", 2);
|
|
153
240
|
t = e([
|
|
154
241
|
v("o-chip")
|
|
155
242
|
], t);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { i as m, m as y, a as w, x as p, t as x } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
2
|
import { n as c } from "../property-S_Y9cb04.mjs";
|
|
3
3
|
import { r as f } from "../state-DjMxXomO.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { o as
|
|
4
|
+
import { e as _, o as k, a as $ } from "../icons-registry.mjs";
|
|
5
|
+
import { o as I } from "../unsafe-svg-C3uTocNg.mjs";
|
|
6
6
|
import { o as l } from "../if-defined-j0wE2gL4.mjs";
|
|
7
|
-
var
|
|
8
|
-
for (var n = t > 1 ? void 0 : t ?
|
|
7
|
+
var O = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (e, i, o, t) => {
|
|
8
|
+
for (var n = t > 1 ? void 0 : t ? C(i, o) : i, s = e.length - 1, d; s >= 0; s--)
|
|
9
9
|
(d = e[s]) && (n = (t ? d(i, o, n) : d(n)) || n);
|
|
10
|
-
return t && n &&
|
|
10
|
+
return t && n && O(i, o, n), n;
|
|
11
11
|
};
|
|
12
|
-
let
|
|
12
|
+
let a = class extends y(w) {
|
|
13
13
|
constructor() {
|
|
14
14
|
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) => {
|
|
15
15
|
this.contains(e.target) || (this.open = !1, this.activeIndex = -1, this._stopObserveVisibleItems());
|
|
@@ -57,7 +57,7 @@ let r = class extends y(w) {
|
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
connectedCallback() {
|
|
60
|
-
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick), this._unsubOcc =
|
|
60
|
+
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick), _("occ-check-outlined"), this._unsubOcc = k(() => this.requestUpdate());
|
|
61
61
|
}
|
|
62
62
|
disconnectedCallback() {
|
|
63
63
|
var e;
|
|
@@ -158,7 +158,7 @@ let r = class extends y(w) {
|
|
|
158
158
|
this.options.length > 0 && (this.options.some((i) => i.value === this.value) || (this.value = this.options[0].value));
|
|
159
159
|
}
|
|
160
160
|
render() {
|
|
161
|
-
const e =
|
|
161
|
+
const e = $["occ-check-outlined"] ?? "", i = e ? e.replace(
|
|
162
162
|
"<svg",
|
|
163
163
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
164
164
|
) : "", o = this.options.find((t) => t.value === this.value);
|
|
@@ -222,7 +222,7 @@ let r = class extends y(w) {
|
|
|
222
222
|
<div class="right">
|
|
223
223
|
<span class="additional-text">${l(t.additionaltext)}</span>
|
|
224
224
|
${t.value === this.value && !t.additionaltext ? p`
|
|
225
|
-
<span class="check">${
|
|
225
|
+
<span class="check">${I(i)}</span>` : null}
|
|
226
226
|
</div>
|
|
227
227
|
</a>
|
|
228
228
|
</li>
|
|
@@ -234,7 +234,7 @@ let r = class extends y(w) {
|
|
|
234
234
|
`;
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
|
-
|
|
237
|
+
a.styles = m`
|
|
238
238
|
:host {
|
|
239
239
|
display: inline-block;
|
|
240
240
|
position: relative;
|
|
@@ -411,36 +411,36 @@ r.styles = m`
|
|
|
411
411
|
display: none;
|
|
412
412
|
}
|
|
413
413
|
`;
|
|
414
|
-
|
|
414
|
+
r([
|
|
415
415
|
c({ type: Array, reflect: !0 })
|
|
416
|
-
],
|
|
417
|
-
|
|
416
|
+
], a.prototype, "options", 2);
|
|
417
|
+
r([
|
|
418
418
|
c({ type: String, reflect: !0 })
|
|
419
|
-
],
|
|
420
|
-
|
|
419
|
+
], a.prototype, "value", 2);
|
|
420
|
+
r([
|
|
421
421
|
c({ type: String, reflect: !0 })
|
|
422
|
-
],
|
|
423
|
-
|
|
422
|
+
], a.prototype, "name", 2);
|
|
423
|
+
r([
|
|
424
424
|
c({ type: String, reflect: !0 })
|
|
425
|
-
],
|
|
426
|
-
|
|
425
|
+
], a.prototype, "additionaltext", 2);
|
|
426
|
+
r([
|
|
427
427
|
c({ type: Boolean, reflect: !0 })
|
|
428
|
-
],
|
|
429
|
-
|
|
428
|
+
], a.prototype, "disabled", 2);
|
|
429
|
+
r([
|
|
430
430
|
c({ type: String, reflect: !0 })
|
|
431
|
-
],
|
|
432
|
-
|
|
431
|
+
], a.prototype, "width", 2);
|
|
432
|
+
r([
|
|
433
433
|
f()
|
|
434
|
-
],
|
|
435
|
-
|
|
434
|
+
], a.prototype, "open", 2);
|
|
435
|
+
r([
|
|
436
436
|
f()
|
|
437
|
-
],
|
|
438
|
-
|
|
437
|
+
], a.prototype, "activeIndex", 2);
|
|
438
|
+
r([
|
|
439
439
|
f()
|
|
440
|
-
],
|
|
441
|
-
|
|
440
|
+
], a.prototype, "menuWidth", 2);
|
|
441
|
+
a = r([
|
|
442
442
|
x("o-dropdown-variant")
|
|
443
|
-
],
|
|
443
|
+
], a);
|
|
444
444
|
export {
|
|
445
|
-
|
|
445
|
+
a as OccitaneDropdownVariant
|
|
446
446
|
};
|
package/components/dropdown.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as u, m as v, a as b, x as s, t as f } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
2
|
import { n as l } from "../property-S_Y9cb04.mjs";
|
|
3
3
|
import { r as h } from "../state-DjMxXomO.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { e as g, o as y, a as m } from "../icons-registry.mjs";
|
|
5
5
|
import { o as p } from "../unsafe-svg-C3uTocNg.mjs";
|
|
6
|
-
var
|
|
7
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
6
|
+
var w = Object.defineProperty, x = Object.getOwnPropertyDescriptor, n = (e, t, r, o) => {
|
|
7
|
+
for (var i = o > 1 ? void 0 : o ? x(t, r) : t, c = e.length - 1, d; c >= 0; c--)
|
|
8
8
|
(d = e[c]) && (i = (o ? d(t, r, i) : d(i)) || i);
|
|
9
|
-
return o && i &&
|
|
9
|
+
return o && i && w(t, r, i), i;
|
|
10
10
|
};
|
|
11
11
|
let a = class extends v(b) {
|
|
12
12
|
constructor() {
|
|
@@ -15,7 +15,7 @@ let a = class extends v(b) {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
connectedCallback() {
|
|
18
|
-
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick), this._unsubOcc =
|
|
18
|
+
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick), g("occ-check-outlined"), this._unsubOcc = y(() => this.requestUpdate());
|
|
19
19
|
}
|
|
20
20
|
disconnectedCallback() {
|
|
21
21
|
var e;
|
|
@@ -75,7 +75,7 @@ let a = class extends v(b) {
|
|
|
75
75
|
this.options.length > 0 && (this.options.some((r) => r.value === this.value) || (this.value = this.options[0].value));
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
const e =
|
|
78
|
+
const e = m["occ-check-outlined"] ?? "", t = e ? e.replace(
|
|
79
79
|
"<svg",
|
|
80
80
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
81
81
|
) : "", r = this.options.find((o) => o.value === this.value);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { m as
|
|
2
|
-
import { n as
|
|
3
|
-
import { f as
|
|
4
|
-
import { m as
|
|
5
|
-
import {
|
|
1
|
+
import { m as b, a as p, i as u, x as o, E as l, t as f } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as i } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
import { f as g } from "../css-C8WrrxT-.mjs";
|
|
4
|
+
import { m as v } from "../element-internals-Dw7LndlH.mjs";
|
|
5
|
+
import { i as m } from "../icons-registry.mjs";
|
|
6
6
|
import { o as y } from "../unsafe-svg-C3uTocNg.mjs";
|
|
7
7
|
import "./icon-button.mjs";
|
|
8
|
-
var x = Object.defineProperty, k = Object.getOwnPropertyDescriptor, r = (t,
|
|
9
|
-
for (var n = c > 1 ? void 0 : c ? k(
|
|
10
|
-
(
|
|
11
|
-
return c && n && x(
|
|
8
|
+
var x = Object.defineProperty, k = Object.getOwnPropertyDescriptor, r = (t, s, a, c) => {
|
|
9
|
+
for (var n = c > 1 ? void 0 : c ? k(s, a) : s, d = t.length - 1, h; d >= 0; d--)
|
|
10
|
+
(h = t[d]) && (n = (c ? h(s, a, n) : h(n)) || n);
|
|
11
|
+
return c && n && x(s, a, n), n;
|
|
12
12
|
};
|
|
13
|
-
const $ =
|
|
13
|
+
const $ = b(v(p));
|
|
14
14
|
let e = class extends $ {
|
|
15
15
|
constructor() {
|
|
16
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";
|
|
@@ -19,8 +19,8 @@ let e = class extends $ {
|
|
|
19
19
|
if (t instanceof KeyboardEvent && t.key !== "Enter" && t.key !== " ")
|
|
20
20
|
return;
|
|
21
21
|
this.selected = !this.selected;
|
|
22
|
-
const
|
|
23
|
-
this.dispatchEvent(a), a.defaultPrevented && t.preventDefault(), this.selected =
|
|
22
|
+
const s = { selected: this.selected }, a = new CustomEvent("selected", { detail: s, bubbles: !0, composed: !0, cancelable: !0 });
|
|
23
|
+
this.dispatchEvent(a), a.defaultPrevented && t.preventDefault(), this.selected = s.selected;
|
|
24
24
|
}
|
|
25
25
|
crossIcon() {
|
|
26
26
|
return o`<o-icon-button size="xsmall" icon="occ-close-outlined" bgstyle="none-light"></o-icon-button>`;
|
|
@@ -57,7 +57,7 @@ let e = class extends $ {
|
|
|
57
57
|
`;
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
e.styles =
|
|
60
|
+
e.styles = u`
|
|
61
61
|
:host {
|
|
62
62
|
cursor: pointer;
|
|
63
63
|
display: inline-flex;
|
|
@@ -139,7 +139,7 @@ e.styles = p`
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.button:focus-visible {
|
|
142
|
-
${
|
|
142
|
+
${g};
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
span.text + span.text::before {
|
|
@@ -172,6 +172,9 @@ e.styles = p`
|
|
|
172
172
|
bottom: 0;
|
|
173
173
|
left: 0;
|
|
174
174
|
right: 0;
|
|
175
|
+
padding-left: 2px;
|
|
176
|
+
padding-right: 2px;
|
|
177
|
+
box-sizing: border-box;
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
[part="strikethrough"] line {
|
|
@@ -181,31 +184,31 @@ e.styles = p`
|
|
|
181
184
|
}
|
|
182
185
|
`;
|
|
183
186
|
r([
|
|
184
|
-
|
|
187
|
+
i({ reflect: !0 })
|
|
185
188
|
], e.prototype, "name", 2);
|
|
186
189
|
r([
|
|
187
|
-
|
|
190
|
+
i({ reflect: !0 })
|
|
188
191
|
], e.prototype, "value", 2);
|
|
189
192
|
r([
|
|
190
|
-
|
|
193
|
+
i({ type: String, reflect: !0 })
|
|
191
194
|
], e.prototype, "type", 2);
|
|
192
195
|
r([
|
|
193
|
-
|
|
196
|
+
i({ type: String, reflect: !0 })
|
|
194
197
|
], e.prototype, "href", 2);
|
|
195
198
|
r([
|
|
196
|
-
|
|
199
|
+
i({ type: String, reflect: !0, attribute: "data-href" })
|
|
197
200
|
], e.prototype, "dataHref", 2);
|
|
198
201
|
r([
|
|
199
|
-
|
|
202
|
+
i({ type: String })
|
|
200
203
|
], e.prototype, "text", 2);
|
|
201
204
|
r([
|
|
202
|
-
|
|
205
|
+
i({ type: Boolean, reflect: !0 })
|
|
203
206
|
], e.prototype, "selected", 2);
|
|
204
207
|
r([
|
|
205
|
-
|
|
208
|
+
i({ type: Boolean, reflect: !0 })
|
|
206
209
|
], e.prototype, "disabled", 2);
|
|
207
210
|
r([
|
|
208
|
-
|
|
211
|
+
i({ type: Boolean, reflect: !0 })
|
|
209
212
|
], e.prototype, "fullwidth", 2);
|
|
210
213
|
e = r([
|
|
211
214
|
f("o-filter-chip")
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as g, m as p, E as b, x as a, a as d, t as v } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
2
|
import { n as i } from "../property-S_Y9cb04.mjs";
|
|
3
|
-
import { o as
|
|
4
|
-
import {
|
|
5
|
-
import { c as m } from "../svg-utils-
|
|
3
|
+
import { o as y } from "../if-defined-j0wE2gL4.mjs";
|
|
4
|
+
import { r as u, o as f } from "../icons-registry.mjs";
|
|
5
|
+
import { c as m } from "../svg-utils-DOL__czZ.mjs";
|
|
6
6
|
import { f as x, i as w, s as k } from "../css-C8WrrxT-.mjs";
|
|
7
|
-
var $ = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (t, s,
|
|
8
|
-
for (var
|
|
9
|
-
(h = t[l]) && (
|
|
10
|
-
return
|
|
7
|
+
var $ = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (t, s, c, e) => {
|
|
8
|
+
for (var r = e > 1 ? void 0 : e ? O(s, c) : s, l = t.length - 1, h; l >= 0; l--)
|
|
9
|
+
(h = t[l]) && (r = (e ? h(s, c, r) : h(r)) || r);
|
|
10
|
+
return e && r && $(s, c, r), r;
|
|
11
11
|
};
|
|
12
12
|
const S = (t) => t.startsWith("occ-");
|
|
13
|
-
let o = class extends
|
|
13
|
+
let o = class extends p(d) {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "", this.disabled = !1, this.highlight = !1, this.showSrLabel = !1, this.srLabel = "";
|
|
16
16
|
}
|
|
@@ -24,13 +24,14 @@ let o = class extends g(p) {
|
|
|
24
24
|
this._clearOccSubscription();
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
const { svg: s } =
|
|
27
|
+
const { svg: s } = u(t, { size: this.size, bgstyle: this.bgstyle });
|
|
28
28
|
if (s) {
|
|
29
29
|
this._clearOccSubscription();
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
this._unsubOcc || (this._unsubOcc = f(() => {
|
|
33
|
-
this.
|
|
33
|
+
const { svg: c } = u(t, { size: this.size, bgstyle: this.bgstyle });
|
|
34
|
+
c && (this._clearOccSubscription(), this.requestUpdate());
|
|
34
35
|
}));
|
|
35
36
|
}
|
|
36
37
|
connectedCallback() {
|
|
@@ -47,7 +48,7 @@ let o = class extends g(p) {
|
|
|
47
48
|
return b;
|
|
48
49
|
const t = m(this.icon, this.size, this.bgstyle);
|
|
49
50
|
if (!t) return b;
|
|
50
|
-
const s = `icon-${this.icon}`,
|
|
51
|
+
const s = `icon-${this.icon}`, c = this.showSrLabel ? a`<span class="sr-only">${this.srLabel}</span>` : null, e = this.showSrLabel ? "" : "icon";
|
|
51
52
|
return a`
|
|
52
53
|
${this.type === "span" ? a`
|
|
53
54
|
<span part="icon-button" class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}" ?disabled="${this.disabled}">
|
|
@@ -56,20 +57,20 @@ let o = class extends g(p) {
|
|
|
56
57
|
` : a`
|
|
57
58
|
<button
|
|
58
59
|
type="button"
|
|
59
|
-
aria-label=${
|
|
60
|
+
aria-label=${y(e)}
|
|
60
61
|
aria-describedby=${this.getAttribute("aria-describedby") || b}
|
|
61
62
|
part="icon-button"
|
|
62
63
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}"
|
|
63
64
|
?disabled="${this.disabled}"
|
|
64
65
|
>
|
|
65
66
|
${t}
|
|
66
|
-
${
|
|
67
|
+
${c}
|
|
67
68
|
</button>
|
|
68
69
|
`}
|
|
69
70
|
`;
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
|
-
o.styles =
|
|
73
|
+
o.styles = g`
|
|
73
74
|
:host {
|
|
74
75
|
display: inline-flex;
|
|
75
76
|
justify-content: center;
|
|
@@ -333,7 +334,7 @@ n([
|
|
|
333
334
|
i({ type: String })
|
|
334
335
|
], o.prototype, "srLabel", 2);
|
|
335
336
|
o = n([
|
|
336
|
-
|
|
337
|
+
v("o-icon-button")
|
|
337
338
|
], o);
|
|
338
339
|
export {
|
|
339
340
|
o as OccitaneIconButton
|
package/components/rating.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export declare class OccitaneRating extends OccitaneRating_base {
|
|
|
5
5
|
rating: number;
|
|
6
6
|
reviewCount?: string;
|
|
7
7
|
href?: string;
|
|
8
|
+
private _unsubOcc?;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
8
11
|
static styles: import('lit').CSSResult;
|
|
9
12
|
private getStarKeys;
|
|
10
13
|
protected render(): import('lit').TemplateResult<1>;
|