@florid-kit/components 2.6.7 → 2.6.9
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-occ.d.ts +315 -0
- package/assets/icons/icons.d.ts +7 -66
- package/components/accordion-group.mjs +61 -0
- package/components/accordion.mjs +185 -0
- package/components/arch-image.mjs +135 -0
- package/components/badge.mjs +75 -0
- package/components/breadcrumb.mjs +83 -0
- package/components/breadcrumbs.mjs +35 -0
- package/components/button.d.ts +3 -0
- package/components/button.mjs +10 -0
- package/components/checkbox.mjs +188 -0
- package/components/chip.mjs +158 -0
- package/components/chipset.mjs +44 -0
- package/components/dots.mjs +60 -0
- package/components/dropdown-variant.d.ts +1 -0
- package/components/dropdown-variant.mjs +445 -0
- package/components/dropdown.d.ts +1 -0
- package/components/dropdown.mjs +302 -0
- package/components/feedback-message.mjs +136 -0
- package/components/filter-chip.mjs +214 -0
- package/components/footer-simplify.mjs +178 -0
- package/components/header-simplify.mjs +234 -0
- package/components/icon-button.d.ts +5 -0
- package/components/icon-button.mjs +345 -0
- package/components/input.mjs +294 -0
- package/components/link.mjs +172 -0
- package/components/mediumtile.mjs +307 -0
- package/components/minitile.mjs +231 -0
- package/components/option-tile.mjs +413 -0
- package/components/popin.mjs +412 -0
- package/components/radio.mjs +165 -0
- package/components/rating.mjs +84 -0
- package/components/reassurance.mjs +163 -0
- package/components/search-input-dropdown.mjs +314 -0
- package/components/search-input.mjs +107 -0
- package/components/side-panel.mjs +1197 -0
- package/components/tab.mjs +140 -0
- package/components/tablist.mjs +44 -0
- package/components/tag.mjs +86 -0
- package/components/textarea.mjs +269 -0
- package/components/thumbnail-navigation.mjs +232 -0
- package/components/toast.mjs +190 -0
- package/components/tooltip.mjs +125 -0
- package/components/wishlist-button.d.ts +2 -0
- package/components/wishlist-button.mjs +137 -0
- package/css-r3TDS8Ma.mjs +37 -0
- package/directive-helpers-CjGdYF2i.mjs +11 -0
- package/directive-oAbCiebi.mjs +27 -0
- package/element-internals-Dw7LndlH.mjs +19 -0
- package/icons-occ-DW--7nRr.mjs +834 -0
- package/if-defined-BaFqfNKT.mjs +10 -0
- package/index.mjs +68 -9629
- package/live-BPnRJXAq.mjs +30 -0
- package/loader.d.ts +3 -0
- package/loader.mjs +81 -0
- package/logo-CEgaTL93.mjs +4 -0
- package/package.json +19 -2
- package/performance-mixin-vBVz5Iib.mjs +774 -0
- package/property-8EkRXcYy.mjs +36 -0
- package/query-NJDNu0-P.mjs +25 -0
- package/state-BvkYxy1c.mjs +12 -0
- package/unsafe-svg-CRYN20gz.mjs +210 -0
- package/index.js +0 -5742
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { i as n, m as p, a as v, x as l, t as g } from "../performance-mixin-vBVz5Iib.mjs";
|
|
2
|
+
import { n as i } from "../property-8EkRXcYy.mjs";
|
|
3
|
+
var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor, t = (d, a, h, o) => {
|
|
4
|
+
for (var r = o > 1 ? void 0 : o ? y(a, h) : a, s = d.length - 1, c; s >= 0; s--)
|
|
5
|
+
(c = d[s]) && (r = (o ? c(a, h, r) : c(r)) || r);
|
|
6
|
+
return o && r && m(a, h, r), r;
|
|
7
|
+
};
|
|
8
|
+
let e = class extends p(v) {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.imageUrl = "", this.imageAlt = "", this.hoverUrl = "", this.hoverAlt = "", this.dimmed = !1, this.showHover = !1;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return l`<div class="card">
|
|
14
|
+
<svg aria-hidden="true">
|
|
15
|
+
<defs>
|
|
16
|
+
<clipPath id="arch-gift-finder" clipPathUnits="objectBoundingBox">
|
|
17
|
+
<path d="M 0.0022883 0.1515313 A 0.6791312 0.4712110 0 0 1 0.9931350 0.1531985 L 0.9931350 0.9969136 L 0.0022883 0.9969136 Z" />
|
|
18
|
+
</clipPath>
|
|
19
|
+
</defs>
|
|
20
|
+
</svg>
|
|
21
|
+
<img src="${this.imageUrl}" alt="${this.imageAlt}" class="card-img base" loading="lazy" />
|
|
22
|
+
${this.hoverUrl ? l`<img src="${this.hoverUrl}" alt="${this.hoverAlt || this.imageAlt}" class="card-img hover" loading="lazy" />` : ""}
|
|
23
|
+
<div class="overlay" part="overlay"></div>
|
|
24
|
+
</div>`;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
e.styles = n`
|
|
28
|
+
:host {
|
|
29
|
+
--card-width : 175px;
|
|
30
|
+
--card-height : 260px;
|
|
31
|
+
--card-width-mobile: 100px;
|
|
32
|
+
--card-height-mobile: 153px;
|
|
33
|
+
--overlay-bg: rgba(0,0,0,0.56);
|
|
34
|
+
--overlay-opacity: 1;
|
|
35
|
+
--card-filter: none;
|
|
36
|
+
display: block;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.card {
|
|
40
|
+
position: relative;
|
|
41
|
+
width: var(--card-width);
|
|
42
|
+
height: var(--card-height);
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
background-color: var(--colors-noir-des-terres-500);
|
|
45
|
+
clip-path: url(#arch-gift-finder);
|
|
46
|
+
-webkit-clip-path: url(#arch-gift-finder);
|
|
47
|
+
filter: var(--card-filter, none);
|
|
48
|
+
-webkit-tap-highlight-color: transparent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (max-width: 1024px) {
|
|
52
|
+
.card {
|
|
53
|
+
width: var(--card-width-mobile);
|
|
54
|
+
height: var(--card-height-mobile);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.card-img {
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 0;
|
|
61
|
+
left: 0;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
object-fit: cover;
|
|
65
|
+
transition: opacity 0.3s ease-in-out;
|
|
66
|
+
background: linear-gradient(180deg, #f9f4ed 0%, #f3f0eb 81.41%, #edeae5 100%);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.card-img.hover {
|
|
70
|
+
opacity: 0;
|
|
71
|
+
z-index: 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.card-img.base {
|
|
75
|
+
z-index: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([showhover]) .card-img.hover {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([showhover]) .card-img.base {
|
|
83
|
+
opacity: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (hover: hover) and (pointer: fine) {
|
|
87
|
+
.card:hover .card-img.hover {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (hover: none) and (pointer: coarse) {
|
|
93
|
+
.card:active .card-img.hover {
|
|
94
|
+
opacity: 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.overlay {
|
|
99
|
+
position: absolute; inset: 0;
|
|
100
|
+
background: var(--overlay-bg);
|
|
101
|
+
opacity: 0;
|
|
102
|
+
transition: opacity .2s ease;
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
z-index: 3;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
:host([dimmed]) .overlay {
|
|
109
|
+
opacity: var(--overlay-opacity, 1);
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
t([
|
|
113
|
+
i({ type: String })
|
|
114
|
+
], e.prototype, "imageUrl", 2);
|
|
115
|
+
t([
|
|
116
|
+
i({ type: String })
|
|
117
|
+
], e.prototype, "imageAlt", 2);
|
|
118
|
+
t([
|
|
119
|
+
i({ type: String })
|
|
120
|
+
], e.prototype, "hoverUrl", 2);
|
|
121
|
+
t([
|
|
122
|
+
i({ type: String })
|
|
123
|
+
], e.prototype, "hoverAlt", 2);
|
|
124
|
+
t([
|
|
125
|
+
i({ type: Boolean, reflect: !0 })
|
|
126
|
+
], e.prototype, "dimmed", 2);
|
|
127
|
+
t([
|
|
128
|
+
i({ type: Boolean, reflect: !0, attribute: "showhover" })
|
|
129
|
+
], e.prototype, "showHover", 2);
|
|
130
|
+
e = t([
|
|
131
|
+
g("o-arch-image")
|
|
132
|
+
], e);
|
|
133
|
+
export {
|
|
134
|
+
e as OccitaneArchImage
|
|
135
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { i as f, m as d, a as b, x as s, t as v } from "../performance-mixin-vBVz5Iib.mjs";
|
|
2
|
+
import { n as c } from "../property-8EkRXcYy.mjs";
|
|
3
|
+
import { s as g } from "../css-r3TDS8Ma.mjs";
|
|
4
|
+
var h = Object.defineProperty, x = Object.getOwnPropertyDescriptor, a = (p, e, n, o) => {
|
|
5
|
+
for (var r = o > 1 ? void 0 : o ? x(e, n) : e, i = p.length - 1, l; i >= 0; i--)
|
|
6
|
+
(l = p[i]) && (r = (o ? l(e, n, r) : l(r)) || r);
|
|
7
|
+
return o && r && h(e, n, r), r;
|
|
8
|
+
};
|
|
9
|
+
const w = ["cart", "filter"];
|
|
10
|
+
let t = class extends d(b) {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments), this.variant = "cart", this.text = 0, this.srlabel = "";
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return s`
|
|
16
|
+
<span class="badge">
|
|
17
|
+
${this.text ? s`${this.text} <span class="sr-only">${this.srlabel}</span>` : s`<slot></slot>`}
|
|
18
|
+
</span>
|
|
19
|
+
`;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
t.styles = f`
|
|
23
|
+
:host([variant]) {
|
|
24
|
+
--badge-width: 19px;
|
|
25
|
+
display: inline-block;
|
|
26
|
+
--background-color: var(--color-container-brand-accent, #ffc700);
|
|
27
|
+
--border-color: var(--color-border-primary, #3f2b2e);
|
|
28
|
+
--text-color: var(--color-content-body, #3f2b2e);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([variant="filter"]) {
|
|
32
|
+
--background-color: var(--color-container-filter-default, #7F4E61);
|
|
33
|
+
--border-color: var(--color-container-filter-default, #7F4E61);
|
|
34
|
+
--text-color: var(--color-content-filter, #f6f0e7);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.badge {
|
|
38
|
+
display: block;
|
|
39
|
+
padding: 1px var(--spacing-4-xs, 0) var(--spacing-4-xs, 0) 1px;
|
|
40
|
+
box-sizing: content-box;
|
|
41
|
+
font-family: var(--font-family-loccitane-sans, LOccitaneSans);
|
|
42
|
+
font-weight: var(--font-weight-400, 400);
|
|
43
|
+
height: var(--line-height-160, 16px);
|
|
44
|
+
width: var(--line-height-160, 16px);
|
|
45
|
+
text-align: center;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
background: var(--background-color);
|
|
48
|
+
border: var(--border-s, 0.5px) solid var(--border-color);
|
|
49
|
+
border-radius: 100%;
|
|
50
|
+
font-size: var(--font-size-100, 12px);
|
|
51
|
+
letter-spacing: var(--letter-spacing-400, 0.04em);
|
|
52
|
+
line-height: var(--line-height-160, 16px);
|
|
53
|
+
color: var(--text-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.sr-only {
|
|
57
|
+
${g}
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
a([
|
|
61
|
+
c({ type: String, reflect: !0 })
|
|
62
|
+
], t.prototype, "variant", 2);
|
|
63
|
+
a([
|
|
64
|
+
c({ type: Number })
|
|
65
|
+
], t.prototype, "text", 2);
|
|
66
|
+
a([
|
|
67
|
+
c({ type: String })
|
|
68
|
+
], t.prototype, "srlabel", 2);
|
|
69
|
+
t = a([
|
|
70
|
+
v("o-badge")
|
|
71
|
+
], t);
|
|
72
|
+
export {
|
|
73
|
+
t as OccitaneBadge,
|
|
74
|
+
w as badgeVariantValues
|
|
75
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { i as p, m as h, a as v, x as c, t as m } from "../performance-mixin-vBVz5Iib.mjs";
|
|
2
|
+
import { n as f } from "../property-8EkRXcYy.mjs";
|
|
3
|
+
import { f as u } from "../css-r3TDS8Ma.mjs";
|
|
4
|
+
var d = Object.defineProperty, g = Object.getOwnPropertyDescriptor, l = (r, o, n, i) => {
|
|
5
|
+
for (var e = i > 1 ? void 0 : i ? g(o, n) : o, a = r.length - 1, s; a >= 0; a--)
|
|
6
|
+
(s = r[a]) && (e = (i ? s(o, n, e) : s(e)) || e);
|
|
7
|
+
return i && e && d(o, n, e), e;
|
|
8
|
+
};
|
|
9
|
+
let t = class extends h(v) {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.href = "", this.active = !1;
|
|
12
|
+
}
|
|
13
|
+
_handleClick(r) {
|
|
14
|
+
(!this.href || this.href === "#") && r.preventDefault();
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return this.active ? c`<p aria-current="page"><slot></slot></p>` : c`
|
|
18
|
+
<li>
|
|
19
|
+
<a
|
|
20
|
+
href="${this.href}"
|
|
21
|
+
@click="${this._handleClick}"
|
|
22
|
+
@keydown="${this._handleClick}"
|
|
23
|
+
>
|
|
24
|
+
<slot></slot>
|
|
25
|
+
</a>
|
|
26
|
+
</li>
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
t.styles = p`
|
|
31
|
+
:host(:not([active]))::after {
|
|
32
|
+
content: "/";
|
|
33
|
+
margin: 0 0.5rem;
|
|
34
|
+
color: var(--color-content-description);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([active]) {
|
|
38
|
+
p {
|
|
39
|
+
color: var(--color-content-body);
|
|
40
|
+
margin: var(--spacing-4-xs);
|
|
41
|
+
display: inline-block;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
li {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
a, p {
|
|
50
|
+
color: var(--color-content-description);
|
|
51
|
+
font-family: var(--font-family-loccitane-sans);
|
|
52
|
+
font-size: var(--font-size-100);
|
|
53
|
+
font-weight: var(--font-weight-400);
|
|
54
|
+
line-height: var(--line-height-160);
|
|
55
|
+
letter-spacing: var(--letter-spacing-400);
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
a:hover {
|
|
60
|
+
text-decoration: underline;
|
|
61
|
+
text-underline-offset: var(--spacing-2-xs);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
a:focus-visible {
|
|
65
|
+
${u};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host(.a--tabfocus) {
|
|
69
|
+
outline: none !important;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
l([
|
|
73
|
+
f({ type: String })
|
|
74
|
+
], t.prototype, "href", 2);
|
|
75
|
+
l([
|
|
76
|
+
f({ type: Boolean, reflect: !0 })
|
|
77
|
+
], t.prototype, "active", 2);
|
|
78
|
+
t = l([
|
|
79
|
+
m("o-breadcrumb")
|
|
80
|
+
], t);
|
|
81
|
+
export {
|
|
82
|
+
t as OBreadcrumb
|
|
83
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { i as m, m as o, a as u, x as v, t as c } from "../performance-mixin-vBVz5Iib.mjs";
|
|
2
|
+
var d = Object.getOwnPropertyDescriptor, p = (s, n, l, t) => {
|
|
3
|
+
for (var r = t > 1 ? void 0 : t ? d(n, l) : n, a = s.length - 1, i; a >= 0; a--)
|
|
4
|
+
(i = s[a]) && (r = i(r) || r);
|
|
5
|
+
return r;
|
|
6
|
+
};
|
|
7
|
+
let e = class extends o(u) {
|
|
8
|
+
render() {
|
|
9
|
+
return v`
|
|
10
|
+
<nav aria-label="Breadcrumbs">
|
|
11
|
+
<ul>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</ul>
|
|
14
|
+
</nav>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
e.styles = m`
|
|
19
|
+
nav {
|
|
20
|
+
max-width: 144rem;
|
|
21
|
+
margin: auto;
|
|
22
|
+
padding: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ul {
|
|
26
|
+
margin: var(--spacing-4-xs);
|
|
27
|
+
padding: var(--spacing-4-xs);
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
e = p([
|
|
31
|
+
c("o-breadcrumbs")
|
|
32
|
+
], e);
|
|
33
|
+
export {
|
|
34
|
+
e as OBreadcrumbs
|
|
35
|
+
};
|
package/components/button.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export declare class OccitaneButton extends buttonBaseClass implements FormSubmi
|
|
|
31
31
|
ariaExpanded: string | null;
|
|
32
32
|
private handleClick;
|
|
33
33
|
protected render(): import('lit').TemplateResult<1>;
|
|
34
|
+
private _unsubOcc?;
|
|
35
|
+
connectedCallback(): void;
|
|
36
|
+
disconnectedCallback(): void;
|
|
34
37
|
private renderIcon;
|
|
35
38
|
private renderButton;
|
|
36
39
|
private renderLink;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "../performance-mixin-vBVz5Iib.mjs";
|
|
2
|
+
import "../property-8EkRXcYy.mjs";
|
|
3
|
+
import "../css-r3TDS8Ma.mjs";
|
|
4
|
+
import "../element-internals-Dw7LndlH.mjs";
|
|
5
|
+
import { O as n, v as s } from "./side-panel.mjs";
|
|
6
|
+
import "../unsafe-svg-CRYN20gz.mjs";
|
|
7
|
+
export {
|
|
8
|
+
n as OccitaneButton,
|
|
9
|
+
s as variants
|
|
10
|
+
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { i as d, m as p, a as b, x as c, t as u } from "../performance-mixin-vBVz5Iib.mjs";
|
|
2
|
+
import { n as o } from "../property-8EkRXcYy.mjs";
|
|
3
|
+
import { e as g } from "../query-NJDNu0-P.mjs";
|
|
4
|
+
import "./icon-button.mjs";
|
|
5
|
+
var f = Object.defineProperty, y = Object.getOwnPropertyDescriptor, t = (i, s, a, n) => {
|
|
6
|
+
for (var r = n > 1 ? void 0 : n ? y(s, a) : s, l = i.length - 1, h; l >= 0; l--)
|
|
7
|
+
(h = i[l]) && (r = (n ? h(s, a, r) : h(r)) || r);
|
|
8
|
+
return n && r && f(s, a, r), r;
|
|
9
|
+
};
|
|
10
|
+
let m = 0, e = class extends p(b) {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this.checked = !1, this.indeterminate = !1, this.disabled = !1, this.size = "S", this.showLabel = !0, this.label = "Checkbox", this.name = "", this.value = "on", this.inputId = "", this.inputId || (this.inputId = `o-checkbox-${++m}`);
|
|
13
|
+
}
|
|
14
|
+
toggle() {
|
|
15
|
+
this.disabled || (this.indeterminate ? (this.indeterminate = !1, this.checked = !0) : this.checked = !this.checked, this.syncInput(), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })));
|
|
16
|
+
}
|
|
17
|
+
syncInput() {
|
|
18
|
+
this.inputEl && (this.inputEl.checked = this.checked, this.inputEl.indeterminate = this.indeterminate);
|
|
19
|
+
}
|
|
20
|
+
updated(i) {
|
|
21
|
+
this.syncInput();
|
|
22
|
+
}
|
|
23
|
+
handleKeyDown(i) {
|
|
24
|
+
this.disabled || (i.key === " " || i.key === "Enter") && (i.preventDefault(), this.toggle());
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const i = c`<o-icon-button size="${this.size === "L" ? "small" : "xsmall"}" icon="occ-check-outlined" bgstyle="none-light"></o-icon-button>`, s = c`<o-icon-button size="${this.size === "L" ? "small" : "xsmall"}" icon="occ-minus" bgstyle="none-light"></o-icon-button>`;
|
|
28
|
+
return c`
|
|
29
|
+
<input
|
|
30
|
+
type="checkbox"
|
|
31
|
+
id=${this.inputId}
|
|
32
|
+
?checked=${this.checked}
|
|
33
|
+
?disabled=${this.disabled}
|
|
34
|
+
name=${this.name}
|
|
35
|
+
value=${this.value}
|
|
36
|
+
@change=${(a) => {
|
|
37
|
+
const n = a.target;
|
|
38
|
+
this.checked = n.checked, this.indeterminate = n.indeterminate, this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<div class="box" role="checkbox" tabindex=${this.disabled ? -1 : 0} aria-checked=${this.indeterminate ? "mixed" : String(this.checked)} aria-disabled=${String(this.disabled)} @click=${this.toggle} @keydown=${this.handleKeyDown}>
|
|
43
|
+
<span class="icon"> ${this.indeterminate ? s : this.checked ? i : null} </span>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
${this.showLabel ? c`<label class="label" for=${this.inputId}>${this.label}</label>` : ""}
|
|
47
|
+
`;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
e.styles = d`
|
|
51
|
+
:host {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: var(--spacing-s);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
user-select: none;
|
|
57
|
+
outline: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([disabled]) {
|
|
61
|
+
opacity: 0.5;
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.box {
|
|
66
|
+
position: relative;
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
border: 1px solid var(--color-border-secondary);
|
|
71
|
+
background: var(--color-container-bg-default);
|
|
72
|
+
border-radius: var(--radius-m);
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([size="S"]) .box {
|
|
77
|
+
width: 16px;
|
|
78
|
+
height: 16px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([size="L"]) .box {
|
|
82
|
+
width: 24px;
|
|
83
|
+
height: 24px;
|
|
84
|
+
border: 2px solid var(--color-border-secondary);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([size="L"]) .label {
|
|
88
|
+
line-height: var(--line-height-200);
|
|
89
|
+
font-size: var(--font-size-200);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:host([checked]) .box,
|
|
93
|
+
:host([indeterminate]) .box {
|
|
94
|
+
background: var(--color-container-action-primary-default);
|
|
95
|
+
border-color: var(--color-border-primary);
|
|
96
|
+
|
|
97
|
+
svg {
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 100%;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:host(:focus-visible) .box {
|
|
104
|
+
box-shadow: 0 0 0 3px var(--color-border-primary);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.box:hover:not([aria-disabled="true"]) {
|
|
108
|
+
box-shadow: 0 0 0 4px #e8dfe3;
|
|
109
|
+
}
|
|
110
|
+
.box:active:not([aria-disabled="true"]) {
|
|
111
|
+
box-shadow: 0 0 0 4px #d6c6cc;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.label {
|
|
115
|
+
color: var(--color-content-action-secondary);
|
|
116
|
+
font-family: var(--font-family-loccitane-sans);
|
|
117
|
+
font-size: var(--font-size-100);
|
|
118
|
+
font-weight: var(--font-weight-400);
|
|
119
|
+
line-height: var(--line-height-160);
|
|
120
|
+
letter-spacing: var(--letter-spacing-400);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.icon {
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset: 0;
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
input {
|
|
133
|
+
position: absolute;
|
|
134
|
+
opacity: 0;
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
width: 0;
|
|
137
|
+
height: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.indeterminate {
|
|
141
|
+
width: 10px;
|
|
142
|
+
height: 10px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.indeterminate path {
|
|
146
|
+
fill: var(--color-border-light);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
svg path {
|
|
150
|
+
stroke: var(--color-border-light);
|
|
151
|
+
}
|
|
152
|
+
`;
|
|
153
|
+
t([
|
|
154
|
+
o({ type: Boolean, reflect: !0 })
|
|
155
|
+
], e.prototype, "checked", 2);
|
|
156
|
+
t([
|
|
157
|
+
o({ type: Boolean, reflect: !0 })
|
|
158
|
+
], e.prototype, "indeterminate", 2);
|
|
159
|
+
t([
|
|
160
|
+
o({ type: Boolean, reflect: !0 })
|
|
161
|
+
], e.prototype, "disabled", 2);
|
|
162
|
+
t([
|
|
163
|
+
o({ type: String, reflect: !0 })
|
|
164
|
+
], e.prototype, "size", 2);
|
|
165
|
+
t([
|
|
166
|
+
o({ type: Boolean })
|
|
167
|
+
], e.prototype, "showLabel", 2);
|
|
168
|
+
t([
|
|
169
|
+
o({ type: String })
|
|
170
|
+
], e.prototype, "label", 2);
|
|
171
|
+
t([
|
|
172
|
+
o({ type: String })
|
|
173
|
+
], e.prototype, "name", 2);
|
|
174
|
+
t([
|
|
175
|
+
o({ type: String })
|
|
176
|
+
], e.prototype, "value", 2);
|
|
177
|
+
t([
|
|
178
|
+
o({ type: String, reflect: !0 })
|
|
179
|
+
], e.prototype, "inputId", 2);
|
|
180
|
+
t([
|
|
181
|
+
g("input")
|
|
182
|
+
], e.prototype, "inputEl", 2);
|
|
183
|
+
e = t([
|
|
184
|
+
u("o-checkbox")
|
|
185
|
+
], e);
|
|
186
|
+
export {
|
|
187
|
+
e as OccitaneCheckbox
|
|
188
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { m as h, a as b, i as p, E as u, x as c, t as v } from "../performance-mixin-vBVz5Iib.mjs";
|
|
2
|
+
import { n as r } from "../property-8EkRXcYy.mjs";
|
|
3
|
+
import { f } from "../css-r3TDS8Ma.mjs";
|
|
4
|
+
import { m as g } from "../element-internals-Dw7LndlH.mjs";
|
|
5
|
+
var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor, e = (n, o, a, s) => {
|
|
6
|
+
for (var i = s > 1 ? void 0 : s ? y(o, a) : o, l = n.length - 1, d; l >= 0; l--)
|
|
7
|
+
(d = n[l]) && (i = (s ? d(o, a, i) : d(i)) || i);
|
|
8
|
+
return s && i && m(o, a, i), i;
|
|
9
|
+
};
|
|
10
|
+
const x = h(g(b));
|
|
11
|
+
let t = class extends x {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.link = "", this.name = "", this.value = "", this.text = "", this.size = "standard", this.selected = !1, this.fullwidth = !1, this.inactive = !1;
|
|
14
|
+
}
|
|
15
|
+
handleClick(n) {
|
|
16
|
+
this.selected || (this.selected = !0);
|
|
17
|
+
const o = { selected: this.selected }, a = new CustomEvent("selected", { detail: o, bubbles: !0, composed: !0, cancelable: !0 });
|
|
18
|
+
this.dispatchEvent(a), a.defaultPrevented && n.preventDefault(), this.selected = o.selected;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
const n = this.text;
|
|
22
|
+
return this.link ? c`
|
|
23
|
+
<a href="${this.link}" class="o-chip" tabindex="${this.inactive ? "-1" : u}"
|
|
24
|
+
aria-current="${this.selected ? "true" : u}">
|
|
25
|
+
${n ? this.text : c`<slot></slot>`}
|
|
26
|
+
</a>
|
|
27
|
+
` : c`
|
|
28
|
+
<button type="button" class="button" @click=${this.handleClick}
|
|
29
|
+
aria-label=${this.ariaLabel || u} aria-pressed=${this.selected}>
|
|
30
|
+
${n ? this.text : c`<slot></slot>`}
|
|
31
|
+
</button>
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
t.styles = p`
|
|
36
|
+
:host {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
--button-bg: var(--color-container-action-secondary-default);
|
|
40
|
+
--button-bg-hover: var(--color-container-action-secondary-hover);
|
|
41
|
+
--button-bg-pressed: var(--color-container-action-secondary-pressed);
|
|
42
|
+
--button-text: var(--color-content-action-secondary);
|
|
43
|
+
--button-text-hover: var(--color-content-action-secondary);
|
|
44
|
+
--button-border: var(--color-border-secondary);
|
|
45
|
+
--button-border-width: var(--border-m);
|
|
46
|
+
--button-padding: var(--spacing-xs) var(--spacing-m);
|
|
47
|
+
--button-endicon-svg-width: 0px; /* No endicon SVG for secondary button */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host(.a--tabfocus) {
|
|
51
|
+
outline: none !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([fullwidth]) {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([selected]) {
|
|
59
|
+
--button-bg: var(--color-container-filter-default);
|
|
60
|
+
--button-bg-hover: var(--color-container-filter-hover);
|
|
61
|
+
--button-bg-pressed: var(--color-container-filter-pressed);
|
|
62
|
+
--button-text: var(--color-content-action-primary);
|
|
63
|
+
--button-text-hover: var(--color-content-action-primary);
|
|
64
|
+
--button-border: transparent;
|
|
65
|
+
--button-border-width: var(--border-m);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([size="large"]) {
|
|
69
|
+
--button-padding: var(--spacing-m) var(--spacing-xl);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.o-chip,
|
|
73
|
+
.button {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
width: 100%;
|
|
78
|
+
gap: var(--spacing-2-xs);
|
|
79
|
+
height: 100%;
|
|
80
|
+
background-color: var(--button-bg);
|
|
81
|
+
color: var(--button-text);
|
|
82
|
+
border: var(--button-border-width, var(--border-m)) solid var(--button-border);
|
|
83
|
+
border-radius: var(--radius-m);
|
|
84
|
+
font-family: var(--font-family-loccitane-sans);
|
|
85
|
+
font-size: var(--font-size-150);
|
|
86
|
+
font-weight: var(--font-weight-400);
|
|
87
|
+
line-height: var(--line-height-200);
|
|
88
|
+
min-width: 64px;
|
|
89
|
+
padding: var(--button-padding);
|
|
90
|
+
text-decoration: none;
|
|
91
|
+
cursor: inherit;
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.o-chip span,
|
|
96
|
+
.button span {
|
|
97
|
+
font-family: var(--font-family-loccitane-sans);
|
|
98
|
+
font-size: var(--font-size-150);
|
|
99
|
+
font-weight: var(--font-weight-400);
|
|
100
|
+
line-height: var(--line-height-200);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.o-chip:hover,
|
|
104
|
+
.button:hover {
|
|
105
|
+
background-color: var(--button-bg-hover);
|
|
106
|
+
color: var(--button-text-hover);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.o-chip:active,
|
|
110
|
+
.button:active {
|
|
111
|
+
background-color: var(--button-bg-pressed);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.o-chip:focus-visible,
|
|
115
|
+
.button:focus-visible {
|
|
116
|
+
${f};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
span.text + span.text::before {
|
|
120
|
+
content: "•";
|
|
121
|
+
margin-right: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.button > * {
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
e([
|
|
130
|
+
r({ type: String, reflect: !0 })
|
|
131
|
+
], t.prototype, "link", 2);
|
|
132
|
+
e([
|
|
133
|
+
r({ reflect: !0 })
|
|
134
|
+
], t.prototype, "name", 2);
|
|
135
|
+
e([
|
|
136
|
+
r({ reflect: !0 })
|
|
137
|
+
], t.prototype, "value", 2);
|
|
138
|
+
e([
|
|
139
|
+
r({ type: String })
|
|
140
|
+
], t.prototype, "text", 2);
|
|
141
|
+
e([
|
|
142
|
+
r({ type: String, reflect: !0 })
|
|
143
|
+
], t.prototype, "size", 2);
|
|
144
|
+
e([
|
|
145
|
+
r({ type: Boolean, reflect: !0 })
|
|
146
|
+
], t.prototype, "selected", 2);
|
|
147
|
+
e([
|
|
148
|
+
r({ type: Boolean, reflect: !0 })
|
|
149
|
+
], t.prototype, "fullwidth", 2);
|
|
150
|
+
e([
|
|
151
|
+
r({ type: Boolean, reflect: !0 })
|
|
152
|
+
], t.prototype, "inactive", 2);
|
|
153
|
+
t = e([
|
|
154
|
+
v("o-chip")
|
|
155
|
+
], t);
|
|
156
|
+
export {
|
|
157
|
+
t as OccitaneChip
|
|
158
|
+
};
|