@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.
- package/assets/icons/icons-occ.d.ts +315 -0
- package/assets/icons/icons.d.ts +12 -84
- package/assets/icons/svg-utils.d.ts +13 -0
- package/behaviors/performance-mixin.d.ts +0 -23
- package/behaviors/performance-reporter.d.ts +1 -0
- 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 +12 -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 +446 -0
- package/components/dropdown.d.ts +1 -0
- package/components/dropdown.mjs +303 -0
- package/components/feedback-message.mjs +136 -0
- package/components/filter-chip.mjs +215 -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 +340 -0
- package/components/input.mjs +298 -0
- package/components/link.mjs +172 -0
- package/components/mediumtile.mjs +307 -0
- package/components/minitile.mjs +234 -0
- package/components/option-tile-group.mjs +105 -0
- package/components/option-tile.mjs +413 -0
- package/components/popin.mjs +412 -0
- package/components/radio.mjs +165 -0
- package/components/rating.mjs +81 -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 +1206 -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 +191 -0
- package/components/tooltip.mjs +125 -0
- package/components/wishlist-button.mjs +132 -0
- package/css-C8WrrxT-.mjs +41 -0
- package/directive-helpers-BHuwIghp.mjs +11 -0
- package/directive-oAbCiebi.mjs +27 -0
- package/element-internals-Dw7LndlH.mjs +19 -0
- package/icons-Pdn_6YtT.mjs +104 -0
- package/icons-occ.mjs +834 -0
- package/if-defined-j0wE2gL4.mjs +10 -0
- package/index.mjs +41 -9719
- package/live-C_TUoYRm.mjs +30 -0
- package/loader.d.ts +3 -0
- package/loader.mjs +78 -0
- package/logo-CEgaTL93.mjs +4 -0
- package/package.json +19 -1
- package/performance-mixin-D7YmSeqN.mjs +628 -0
- package/performance-reporter-B7ZOqnDk.mjs +89 -0
- package/property-S_Y9cb04.mjs +36 -0
- package/query-NJDNu0-P.mjs +25 -0
- package/state-DjMxXomO.mjs +12 -0
- package/svg-utils-CRDBD8ES.mjs +47 -0
- package/unsafe-svg-C3uTocNg.mjs +34 -0
- package/index.js +0 -5755
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { i as d, m as h, a as v, E as p, x as f, t as b } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as a } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
import { f as u } from "../css-C8WrrxT-.mjs";
|
|
4
|
+
var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (i, o, n, s) => {
|
|
5
|
+
for (var e = s > 1 ? void 0 : s ? y(o, n) : o, c = i.length - 1, l; c >= 0; c--)
|
|
6
|
+
(l = i[c]) && (e = (s ? l(o, n, e) : l(e)) || e);
|
|
7
|
+
return s && e && m(o, n, e), e;
|
|
8
|
+
};
|
|
9
|
+
let t = class extends h(v) {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments), this.text = "", this.class = "", this.data = "", this.link = "", this.selected = !1, this.inactive = !1;
|
|
12
|
+
}
|
|
13
|
+
handleClick(i) {
|
|
14
|
+
i.preventDefault(), this.selected || (this.selected = !0);
|
|
15
|
+
const o = {
|
|
16
|
+
tab: this,
|
|
17
|
+
link: this.link,
|
|
18
|
+
data: this.data,
|
|
19
|
+
selected: this.selected
|
|
20
|
+
};
|
|
21
|
+
this.dispatchEvent(new CustomEvent(
|
|
22
|
+
"selected",
|
|
23
|
+
{
|
|
24
|
+
bubbles: !0,
|
|
25
|
+
composed: !0,
|
|
26
|
+
detail: o
|
|
27
|
+
}
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return f`
|
|
32
|
+
<a href="${this.link}" class="o-tab" role="tab"
|
|
33
|
+
@click=${this.handleClick} data-url="${this.data ? this.data : p}"
|
|
34
|
+
tabindex="${this.inactive ? "-1" : p}" aria-selected="${this.selected ? "true" : p}">
|
|
35
|
+
${this.text}
|
|
36
|
+
</a>
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
t.styles = d`
|
|
41
|
+
:host {
|
|
42
|
+
position: relative;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: var(--spacing-s);
|
|
49
|
+
border-radius: var(--radius-m) var(--radius-m) var(--radius-xs) var(--radius-xs);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.o-tab {
|
|
53
|
+
color: var(--color-content-description);
|
|
54
|
+
font-family: var(--font-family-loccitane-sans);
|
|
55
|
+
font-size: var(--font-size-100);
|
|
56
|
+
font-weight: var(--font-weight-400);
|
|
57
|
+
line-height: var(--line-height-160);
|
|
58
|
+
letter-spacing: var(--letter-spacing-absolute);
|
|
59
|
+
text-transform: uppercase;
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
padding: var(--spacing-xs) var(--spacing-l);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([selected]) {
|
|
65
|
+
&::after {
|
|
66
|
+
opacity: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.o-tab::after {
|
|
70
|
+
content: "";
|
|
71
|
+
position: absolute;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
left: var(--spacing-l);
|
|
74
|
+
width: calc(100% - var(--spacing-3-xl));
|
|
75
|
+
border-bottom: var(--border-m) solid var(--color-border-primary);
|
|
76
|
+
opacity: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host(:hover) {
|
|
81
|
+
background: var(--color-container-action-secondary-hover);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host(:active) {
|
|
85
|
+
background: var(--color-container-action-secondary-pressed);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host([selected]:hover),
|
|
89
|
+
:host([selected]:active) {
|
|
90
|
+
&::after {
|
|
91
|
+
content: "";
|
|
92
|
+
position: absolute;
|
|
93
|
+
bottom: 0;
|
|
94
|
+
left: 0;
|
|
95
|
+
width: 100%;
|
|
96
|
+
border-bottom: var(--border-m) solid var(--color-border-primary);
|
|
97
|
+
opacity: 1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.o-tab::after {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:host([selected]),
|
|
106
|
+
:host(:hover),
|
|
107
|
+
:host(:active) {
|
|
108
|
+
.o-tab {
|
|
109
|
+
color: var(--color-content-body);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.o-tab:focus-visible {
|
|
114
|
+
${u};
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
r([
|
|
118
|
+
a({ type: String })
|
|
119
|
+
], t.prototype, "text", 2);
|
|
120
|
+
r([
|
|
121
|
+
a({ type: String })
|
|
122
|
+
], t.prototype, "class", 2);
|
|
123
|
+
r([
|
|
124
|
+
a({ type: String })
|
|
125
|
+
], t.prototype, "data", 2);
|
|
126
|
+
r([
|
|
127
|
+
a({ type: String, reflect: !0 })
|
|
128
|
+
], t.prototype, "link", 2);
|
|
129
|
+
r([
|
|
130
|
+
a({ type: Boolean, reflect: !0 })
|
|
131
|
+
], t.prototype, "selected", 2);
|
|
132
|
+
r([
|
|
133
|
+
a({ type: Boolean, reflect: !0 })
|
|
134
|
+
], t.prototype, "inactive", 2);
|
|
135
|
+
t = r([
|
|
136
|
+
b("o-tab")
|
|
137
|
+
], t);
|
|
138
|
+
export {
|
|
139
|
+
t as OccitaneTab
|
|
140
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { i as c, m as n, a as d, x as f, t as b } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
var p = Object.getOwnPropertyDescriptor, u = (e, t, s, r) => {
|
|
3
|
+
for (var l = r > 1 ? void 0 : r ? p(t, s) : t, a = e.length - 1, o; a >= 0; a--)
|
|
4
|
+
(o = e[a]) && (l = o(l) || l);
|
|
5
|
+
return l;
|
|
6
|
+
};
|
|
7
|
+
let i = class extends n(d) {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(), this.addEventListener("selected", this.onTabSelected);
|
|
10
|
+
}
|
|
11
|
+
onTabSelected(e) {
|
|
12
|
+
var s;
|
|
13
|
+
const t = (s = e.detail) == null ? void 0 : s.tab;
|
|
14
|
+
t && this.querySelectorAll("o-tab").forEach((r) => {
|
|
15
|
+
r.selected = r === t;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
firstUpdated() {
|
|
19
|
+
const e = this.querySelectorAll("o-tab");
|
|
20
|
+
!Array.from(e).some((t) => t.selected) && e.length > 0 && (e[0].selected = !0);
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return f`
|
|
24
|
+
<div role="tablist">
|
|
25
|
+
<slot></slot>
|
|
26
|
+
</div>
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
i.styles = c`
|
|
31
|
+
:host {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: var(--spacing-s);
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
i = u([
|
|
40
|
+
b("o-tablist")
|
|
41
|
+
], i);
|
|
42
|
+
export {
|
|
43
|
+
i as OccitaneTablist
|
|
44
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { i as p, m as g, a as v, x as b, t as d } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as l } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
var f = Object.defineProperty, h = Object.getOwnPropertyDescriptor, i = (c, r, a, e) => {
|
|
4
|
+
for (var t = e > 1 ? void 0 : e ? h(r, a) : r, s = c.length - 1, n; s >= 0; s--)
|
|
5
|
+
(n = c[s]) && (t = (e ? n(r, a, t) : n(t)) || t);
|
|
6
|
+
return e && t && f(r, a, t), t;
|
|
7
|
+
};
|
|
8
|
+
let o = class extends g(v) {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.type = "", this.bgstyle = "background-white";
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return b`
|
|
14
|
+
<p class="tag ${this.bgstyle}"><slot></slot></p>
|
|
15
|
+
`;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
o.styles = p`
|
|
19
|
+
.tag {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
padding: var(--spacing-2-xs) var(--spacing-s);
|
|
22
|
+
font-size: var(--font-size-100);
|
|
23
|
+
font-weight: var(--font-weight-400);
|
|
24
|
+
line-height: var(--line-height-160);
|
|
25
|
+
border-radius: var(--radius-s);
|
|
26
|
+
font-family: var(--font-family-loccitane-sans);
|
|
27
|
+
letter-spacing: var(--letter-spacing-400);
|
|
28
|
+
position: relative;
|
|
29
|
+
margin: var(--spacing-4-xs);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tag.background-emphasis {
|
|
33
|
+
background-color: var(--color-container-bg-emphasis);
|
|
34
|
+
color: var(--color-content-body);
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tag.background-white {
|
|
39
|
+
background-color: var(--color-container-bg-white);
|
|
40
|
+
color: var(--color-content-action-secondary);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([type$="stock"]) .tag {
|
|
44
|
+
padding-left: var(--spacing-2-xl);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host([type$="stock"]) .tag::before {
|
|
48
|
+
content: "";
|
|
49
|
+
position: absolute;
|
|
50
|
+
display: inline-block;
|
|
51
|
+
top: 50%;
|
|
52
|
+
left: var(--spacing-s);
|
|
53
|
+
transform: translateY(-50%);
|
|
54
|
+
background-color: var(--color-content-error);
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
width: 6px;
|
|
57
|
+
height: 6px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([type="lowstock"]) .tag::before {
|
|
61
|
+
background-color: var(--color-content-disabled);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([type="instock"]) .tag::before {
|
|
65
|
+
background-color: var(--color-content-success);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([type="eyebrow"]) .tag {
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
`;
|
|
75
|
+
i([
|
|
76
|
+
l({ type: String, reflect: !0 })
|
|
77
|
+
], o.prototype, "type", 2);
|
|
78
|
+
i([
|
|
79
|
+
l({ type: String, reflect: !0 })
|
|
80
|
+
], o.prototype, "bgstyle", 2);
|
|
81
|
+
o = i([
|
|
82
|
+
d("o-tag")
|
|
83
|
+
], o);
|
|
84
|
+
export {
|
|
85
|
+
o as OccitaneTag
|
|
86
|
+
};
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { a as u, i as x, x as i, E as h, t as f } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as o } from "../property-S_Y9cb04.mjs";
|
|
3
|
+
import { e as v } from "../query-NJDNu0-P.mjs";
|
|
4
|
+
import { l as g } from "../live-C_TUoYRm.mjs";
|
|
5
|
+
import { o as d } from "../if-defined-j0wE2gL4.mjs";
|
|
6
|
+
import "./icon-button.mjs";
|
|
7
|
+
import { m as w, i as b } from "../element-internals-Dw7LndlH.mjs";
|
|
8
|
+
var y = Object.defineProperty, m = Object.getOwnPropertyDescriptor, t = (r, a, l, n) => {
|
|
9
|
+
for (var s = n > 1 ? void 0 : n ? m(a, l) : a, c = r.length - 1, p; c >= 0; c--)
|
|
10
|
+
(p = r[c]) && (s = (n ? p(a, l, s) : p(s)) || s);
|
|
11
|
+
return n && s && y(a, l, s), s;
|
|
12
|
+
};
|
|
13
|
+
const $ = w(u);
|
|
14
|
+
let z = 0, e = class extends $ {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(), this.label = "", this.value = "", this.placeholder = "", this.helperText = "", this.state = "default", this.disabled = !1, this.name = "", this.required = !1, this.rows = 3, this.resize = "none", this.textareaId = "", this.textareaId || (this.textareaId = `o-textarea-${++z}`);
|
|
17
|
+
}
|
|
18
|
+
updated(r) {
|
|
19
|
+
(r.has("value") || r.has("name")) && this[b].setFormValue(this.value);
|
|
20
|
+
}
|
|
21
|
+
formResetCallback() {
|
|
22
|
+
this.value = "", this[b].setFormValue("");
|
|
23
|
+
}
|
|
24
|
+
handleInput(r) {
|
|
25
|
+
r.stopPropagation();
|
|
26
|
+
const a = r.target;
|
|
27
|
+
this.value = a.value, this.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 }));
|
|
28
|
+
}
|
|
29
|
+
handleChange(r) {
|
|
30
|
+
r.stopPropagation();
|
|
31
|
+
const a = r.target;
|
|
32
|
+
this.value = a.value, this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
33
|
+
}
|
|
34
|
+
renderHelperIcon() {
|
|
35
|
+
return this.state === "success" ? i`<o-icon-button type="span" icon="occ-check-filled" bgstyle="none-light" size="small"></o-icon-button>` : this.state === "error" ? i`<o-icon-button type="span" icon="occ-warning" bgstyle="none-light" size="small"></o-icon-button>` : h;
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return i`
|
|
39
|
+
${this.label ? i`<label class="label" for=${this.textareaId}>${this.label}</label>` : h}
|
|
40
|
+
|
|
41
|
+
<div class="textarea-wrapper">
|
|
42
|
+
<textarea
|
|
43
|
+
id=${this.textareaId}
|
|
44
|
+
.value=${g(this.value)}
|
|
45
|
+
placeholder=${this.placeholder}
|
|
46
|
+
name=${this.name}
|
|
47
|
+
rows=${this.rows}
|
|
48
|
+
?disabled=${this.disabled}
|
|
49
|
+
?required=${this.required}
|
|
50
|
+
aria-label=${d(this.label ? void 0 : this.ariaLabel ?? void 0)}
|
|
51
|
+
aria-invalid=${d(this.state === "error" ? "true" : void 0)}
|
|
52
|
+
aria-describedby=${d(this.helperText ? `${this.textareaId}-helper` : void 0)}
|
|
53
|
+
@input=${this.handleInput}
|
|
54
|
+
@change=${this.handleChange}
|
|
55
|
+
></textarea>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
${this.helperText ? i`
|
|
59
|
+
<div class="helper-text" id="${this.textareaId}-helper">
|
|
60
|
+
${this.renderHelperIcon()}
|
|
61
|
+
<span>${this.helperText}</span>
|
|
62
|
+
</div>
|
|
63
|
+
` : h}
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
e.formAssociated = !0;
|
|
68
|
+
e.shadowRootOptions = {
|
|
69
|
+
...u.shadowRootOptions,
|
|
70
|
+
delegatesFocus: !0
|
|
71
|
+
};
|
|
72
|
+
e.styles = x`
|
|
73
|
+
:host {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
gap: var(--spacing-xs, 4px);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.label {
|
|
80
|
+
color: var(--color-content-body, #3f2b2e);
|
|
81
|
+
font-family: var(--font-family-loccitane-sans, LOccitaneSans);
|
|
82
|
+
font-size: var(--font-size-150, 14px);
|
|
83
|
+
font-style: normal;
|
|
84
|
+
font-weight: var(--font-weight-400, 400);
|
|
85
|
+
line-height: var(--line-height-200, 20px);
|
|
86
|
+
letter-spacing: var(--letter-spacing-000, 0);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.textarea-wrapper {
|
|
90
|
+
display: flex;
|
|
91
|
+
padding: var(--spacing-l, 12px);
|
|
92
|
+
align-self: stretch;
|
|
93
|
+
border-radius: var(--radius-m, 4px);
|
|
94
|
+
border: var(--border-m, 1px) solid var(--color-border-secondary, #7e7173);
|
|
95
|
+
background: var(--color-container-bg-default, #fbf9f6);
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.textarea-wrapper:hover {
|
|
101
|
+
border-color: var(--color-border-primary, #3f2b2e);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.textarea-wrapper:focus-within,
|
|
105
|
+
.textarea-wrapper:active,
|
|
106
|
+
:host(:focus) .textarea-wrapper {
|
|
107
|
+
border-color: var(--color-border-primary, #3f2b2e);
|
|
108
|
+
box-shadow: var(--o-textarea-focus-ring, 0 0 0 1px var(--color-border-primary, #3f2b2e));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:host([state="error"]) .textarea-wrapper {
|
|
112
|
+
border-color: var(--color-border-error, #bb0218);
|
|
113
|
+
box-shadow: none;
|
|
114
|
+
background: var(--color-container-bg-default, #fbf9f6);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host([state="error"]) .textarea-wrapper:hover {
|
|
118
|
+
border-color: var(--color-border-error, #bb0218);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host([state="error"]) .textarea-wrapper:focus-within,
|
|
122
|
+
:host([state="error"]) .textarea-wrapper:active,
|
|
123
|
+
:host([state="error"]:focus) .textarea-wrapper {
|
|
124
|
+
border-color: var(--color-border-error, #bb0218);
|
|
125
|
+
box-shadow: var(--o-textarea-focus-ring, 0 0 0 1px var(--color-border-error, #bb0218));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host([state="success"]) .textarea-wrapper {
|
|
129
|
+
border-color: var(--color-border-success, #3b7902);
|
|
130
|
+
box-shadow: none;
|
|
131
|
+
background: var(--color-container-bg-default, #fbf9f6);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:host([state="success"]) .textarea-wrapper:hover {
|
|
135
|
+
border-color: var(--color-border-success, #3b7902);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:host([state="success"]) .textarea-wrapper:focus-within,
|
|
139
|
+
:host([state="success"]) .textarea-wrapper:active,
|
|
140
|
+
:host([state="success"]:focus) .textarea-wrapper {
|
|
141
|
+
border-color: var(--color-border-success, #3b7902);
|
|
142
|
+
box-shadow: var(--o-textarea-focus-ring, 0 0 0 1px var(--color-border-success, #3b7902));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:host([disabled]) .textarea-wrapper,
|
|
146
|
+
:host([disabled]) .textarea-wrapper:hover,
|
|
147
|
+
:host([disabled]) .textarea-wrapper:focus-within,
|
|
148
|
+
:host([disabled]) .textarea-wrapper:active,
|
|
149
|
+
:host([disabled]:focus) .textarea-wrapper {
|
|
150
|
+
border-color: var(--color-border-tertiary, #c3bdbe);
|
|
151
|
+
box-shadow: none;
|
|
152
|
+
background: var(--color-container-disabled, #eceaea);
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
textarea {
|
|
157
|
+
flex: 1;
|
|
158
|
+
border: none;
|
|
159
|
+
outline: none;
|
|
160
|
+
background: transparent;
|
|
161
|
+
color: var(--color-content-body, #3f2b2e);
|
|
162
|
+
font-family: var(--font-family-loccitane-sans, LOccitaneSans);
|
|
163
|
+
font-size: var(--font-size-150, 14px);
|
|
164
|
+
font-style: normal;
|
|
165
|
+
font-weight: var(--font-weight-400, 400);
|
|
166
|
+
line-height: var(--line-height-200, 20px);
|
|
167
|
+
letter-spacing: var(--letter-spacing-000, 0);
|
|
168
|
+
padding: 0;
|
|
169
|
+
min-width: 0;
|
|
170
|
+
resize: inherit;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
:host([resize="none"]) textarea {
|
|
174
|
+
resize: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host([resize="vertical"]) textarea {
|
|
178
|
+
resize: vertical;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host([resize="both"]) textarea {
|
|
182
|
+
resize: both;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
textarea::placeholder {
|
|
186
|
+
color: var(--color-content-disabled, #7e7173);
|
|
187
|
+
overflow: hidden;
|
|
188
|
+
text-overflow: ellipsis;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
textarea:disabled {
|
|
192
|
+
cursor: not-allowed;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.helper-text {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
gap: var(--spacing-xs, 4px);
|
|
199
|
+
color: var(--color-content-description, #655558);
|
|
200
|
+
font-family: var(--font-family-loccitane-sans, LOccitaneSans);
|
|
201
|
+
font-size: var(--font-size-100, 12px);
|
|
202
|
+
font-style: normal;
|
|
203
|
+
font-weight: var(--font-weight-400, 400);
|
|
204
|
+
line-height: var(--line-height-160, 16px);
|
|
205
|
+
letter-spacing: var(--letter-spacing-000, 0);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.helper-text o-icon-button {
|
|
209
|
+
--color-content-action-primary: var(--color-content-description, #655558);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:host([state="error"]) .helper-text {
|
|
213
|
+
color: var(--color-content-error, #bb0218);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
:host([state="error"]) .helper-text o-icon-button {
|
|
217
|
+
--color-content-action-primary: var(--color-content-error, #bb0218);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host([state="success"]) .helper-text {
|
|
221
|
+
color: var(--color-content-success, #3b7902);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:host([state="success"]) .helper-text o-icon-button {
|
|
225
|
+
--color-content-action-primary: var(--color-content-success, #3b7902);
|
|
226
|
+
}
|
|
227
|
+
`;
|
|
228
|
+
t([
|
|
229
|
+
o({ type: String })
|
|
230
|
+
], e.prototype, "label", 2);
|
|
231
|
+
t([
|
|
232
|
+
o({ type: String, reflect: !0 })
|
|
233
|
+
], e.prototype, "value", 2);
|
|
234
|
+
t([
|
|
235
|
+
o({ type: String, reflect: !0 })
|
|
236
|
+
], e.prototype, "placeholder", 2);
|
|
237
|
+
t([
|
|
238
|
+
o({ type: String, attribute: "helper-text" })
|
|
239
|
+
], e.prototype, "helperText", 2);
|
|
240
|
+
t([
|
|
241
|
+
o({ type: String, reflect: !0 })
|
|
242
|
+
], e.prototype, "state", 2);
|
|
243
|
+
t([
|
|
244
|
+
o({ type: Boolean, reflect: !0 })
|
|
245
|
+
], e.prototype, "disabled", 2);
|
|
246
|
+
t([
|
|
247
|
+
o({ type: String })
|
|
248
|
+
], e.prototype, "name", 2);
|
|
249
|
+
t([
|
|
250
|
+
o({ type: Boolean })
|
|
251
|
+
], e.prototype, "required", 2);
|
|
252
|
+
t([
|
|
253
|
+
o({ type: Number })
|
|
254
|
+
], e.prototype, "rows", 2);
|
|
255
|
+
t([
|
|
256
|
+
o({ type: String, reflect: !0 })
|
|
257
|
+
], e.prototype, "resize", 2);
|
|
258
|
+
t([
|
|
259
|
+
o({ type: String, reflect: !0, attribute: "textarea-id" })
|
|
260
|
+
], e.prototype, "textareaId", 2);
|
|
261
|
+
t([
|
|
262
|
+
v("textarea")
|
|
263
|
+
], e.prototype, "textareaEl", 2);
|
|
264
|
+
e = t([
|
|
265
|
+
f("o-textarea")
|
|
266
|
+
], e);
|
|
267
|
+
export {
|
|
268
|
+
e as OccitaneTextarea
|
|
269
|
+
};
|