@florid-kit/components 3.1.6 → 3.1.7
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/components/link.d.ts +4 -0
- package/components/link.mjs +73 -46
- package/components/side-panel.mjs +1 -1
- package/index.mjs +1 -0
- package/loader.mjs +1 -0
- package/package.json +1 -1
package/components/link.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { IconLogicalSize } from '../assets/icons/icons';
|
|
2
3
|
|
|
3
4
|
type Template = "standard" | "discret" | "review";
|
|
4
5
|
type Inverse = true | false;
|
|
5
6
|
type endIcon = true | false;
|
|
6
7
|
type reverseEndIcon = true | false;
|
|
8
|
+
type startIcon = true | false;
|
|
7
9
|
type Disabled = true | false;
|
|
8
10
|
declare const OccitaneLink_base: import('../behaviors/mixin.js').MixinReturn<typeof LitElement>;
|
|
9
11
|
export declare class OccitaneLink extends OccitaneLink_base {
|
|
@@ -14,6 +16,8 @@ export declare class OccitaneLink extends OccitaneLink_base {
|
|
|
14
16
|
inverse: Inverse;
|
|
15
17
|
endIcon: endIcon;
|
|
16
18
|
reverseEndIcon: reverseEndIcon;
|
|
19
|
+
startIcon: startIcon;
|
|
20
|
+
iconSize: IconLogicalSize;
|
|
17
21
|
disabled: Disabled;
|
|
18
22
|
private _handleClick;
|
|
19
23
|
render(): import('lit').TemplateResult<1>;
|
package/components/link.mjs
CHANGED
|
@@ -1,54 +1,66 @@
|
|
|
1
|
-
import { i as h, m as f, a as
|
|
2
|
-
import { n
|
|
1
|
+
import { i as h, m as f, a as d, x as s, t as v } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n } from "../property-S_Y9cb04.mjs";
|
|
3
3
|
import { o as g } from "../if-defined-j0wE2gL4.mjs";
|
|
4
4
|
import "./icon-button.mjs";
|
|
5
|
-
var
|
|
6
|
-
for (var o =
|
|
7
|
-
(p = i[c]) && (o = (
|
|
8
|
-
return
|
|
5
|
+
var y = Object.defineProperty, m = Object.getOwnPropertyDescriptor, e = (i, r, l, a) => {
|
|
6
|
+
for (var o = a > 1 ? void 0 : a ? m(r, l) : r, c = i.length - 1, p; c >= 0; c--)
|
|
7
|
+
(p = i[c]) && (o = (a ? p(r, l, o) : p(o)) || o);
|
|
8
|
+
return a && o && y(r, l, o), o;
|
|
9
9
|
};
|
|
10
|
-
let
|
|
10
|
+
let t = class extends f(d) {
|
|
11
11
|
constructor() {
|
|
12
|
-
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1, this.disabled = !1;
|
|
12
|
+
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1, this.startIcon = !1, this.iconSize = "xsmall", this.disabled = !1;
|
|
13
13
|
}
|
|
14
14
|
_handleClick(i) {
|
|
15
15
|
(!this.href || this.href === "#") && i.preventDefault();
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
const i = !!this.href,
|
|
19
|
-
${this.
|
|
18
|
+
const i = !!this.href, r = s`
|
|
19
|
+
${this.startIcon ? s`
|
|
20
20
|
<o-icon-button
|
|
21
|
+
class="link-start-icon"
|
|
21
22
|
icon="occ-chevron-left"
|
|
22
23
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
23
|
-
size="
|
|
24
|
+
size="${this.iconSize}"
|
|
25
|
+
aria-hidden="true"
|
|
26
|
+
type="span"
|
|
27
|
+
></o-icon-button>
|
|
28
|
+
` : null}
|
|
29
|
+
${this.endIcon && this.reverseEndIcon ? s`
|
|
30
|
+
<o-icon-button
|
|
31
|
+
class="link-end-icon"
|
|
32
|
+
icon="occ-chevron-left"
|
|
33
|
+
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
34
|
+
size="${this.iconSize}"
|
|
24
35
|
aria-hidden="true"
|
|
25
36
|
type="span"
|
|
26
37
|
></o-icon-button>
|
|
27
38
|
` : null}
|
|
28
39
|
<span class="link-text"><slot></slot></span>
|
|
29
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
40
|
+
${this.endIcon && !this.reverseEndIcon ? s`
|
|
30
41
|
<o-icon-button
|
|
42
|
+
class="link-end-icon"
|
|
31
43
|
icon="occ-chevron-right"
|
|
32
44
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
33
|
-
size="
|
|
45
|
+
size="${this.iconSize}"
|
|
34
46
|
aria-hidden="true"
|
|
35
47
|
type="span"
|
|
36
48
|
></o-icon-button>
|
|
37
49
|
` : null}
|
|
38
50
|
`;
|
|
39
|
-
return i ?
|
|
51
|
+
return i ? s`
|
|
40
52
|
<a
|
|
41
53
|
class="link-wrapper"
|
|
42
54
|
href="${this.href}"
|
|
43
55
|
target="${g(this.target || void 0)}"
|
|
44
56
|
@click="${this._handleClick}"
|
|
45
57
|
>
|
|
46
|
-
${
|
|
58
|
+
${r}
|
|
47
59
|
</a>
|
|
48
|
-
` :
|
|
60
|
+
` : s`<span class="link-wrapper">${r}</span>`;
|
|
49
61
|
}
|
|
50
62
|
};
|
|
51
|
-
|
|
63
|
+
t.styles = h`
|
|
52
64
|
:host {
|
|
53
65
|
cursor: pointer;
|
|
54
66
|
}
|
|
@@ -93,12 +105,17 @@ e.styles = h`
|
|
|
93
105
|
color: var(--color-content-disabled);
|
|
94
106
|
}
|
|
95
107
|
|
|
96
|
-
:host([endIcon]) .link-wrapper
|
|
108
|
+
:host([endIcon]) .link-wrapper .link-end-icon {
|
|
97
109
|
margin-left: 2px;
|
|
98
110
|
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
99
111
|
}
|
|
100
112
|
|
|
101
|
-
:host([endIcon][reverseEndIcon]) .link-wrapper
|
|
113
|
+
:host([endIcon][reverseEndIcon]) .link-wrapper .link-end-icon {
|
|
114
|
+
margin-right: 2px;
|
|
115
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:host([startIcon]) .link-wrapper .link-start-icon {
|
|
102
119
|
margin-right: 2px;
|
|
103
120
|
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
104
121
|
}
|
|
@@ -133,40 +150,50 @@ e.styles = h`
|
|
|
133
150
|
height: 1px;
|
|
134
151
|
}
|
|
135
152
|
|
|
136
|
-
:host([endIcon]) .link-wrapper:hover
|
|
153
|
+
:host([endIcon]) .link-wrapper:hover .link-end-icon {
|
|
137
154
|
transform: translateX(4px);
|
|
138
155
|
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
139
156
|
}
|
|
140
157
|
|
|
141
|
-
:host([endIcon][reverseEndIcon]) .link-wrapper:hover
|
|
158
|
+
:host([endIcon][reverseEndIcon]) .link-wrapper:hover .link-end-icon {
|
|
159
|
+
transform: translateX(-4px);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([startIcon]) .link-wrapper:hover .link-start-icon {
|
|
142
163
|
transform: translateX(-4px);
|
|
143
164
|
}
|
|
144
165
|
}
|
|
145
166
|
`;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
],
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
],
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
],
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
],
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
],
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
],
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
],
|
|
167
|
-
e
|
|
168
|
-
|
|
169
|
-
],
|
|
167
|
+
e([
|
|
168
|
+
n({ type: String })
|
|
169
|
+
], t.prototype, "href", 2);
|
|
170
|
+
e([
|
|
171
|
+
n({ type: String })
|
|
172
|
+
], t.prototype, "target", 2);
|
|
173
|
+
e([
|
|
174
|
+
n({ type: String, reflect: !0 })
|
|
175
|
+
], t.prototype, "template", 2);
|
|
176
|
+
e([
|
|
177
|
+
n({ type: Boolean, reflect: !0 })
|
|
178
|
+
], t.prototype, "inverse", 2);
|
|
179
|
+
e([
|
|
180
|
+
n({ type: Boolean, reflect: !0 })
|
|
181
|
+
], t.prototype, "endIcon", 2);
|
|
182
|
+
e([
|
|
183
|
+
n({ type: Boolean, reflect: !0 })
|
|
184
|
+
], t.prototype, "reverseEndIcon", 2);
|
|
185
|
+
e([
|
|
186
|
+
n({ type: Boolean, reflect: !0 })
|
|
187
|
+
], t.prototype, "startIcon", 2);
|
|
188
|
+
e([
|
|
189
|
+
n({ type: String })
|
|
190
|
+
], t.prototype, "iconSize", 2);
|
|
191
|
+
e([
|
|
192
|
+
n({ type: Boolean, reflect: !0 })
|
|
193
|
+
], t.prototype, "disabled", 2);
|
|
194
|
+
t = e([
|
|
195
|
+
v("o-link")
|
|
196
|
+
], t);
|
|
170
197
|
export {
|
|
171
|
-
|
|
198
|
+
t as OccitaneLink
|
|
172
199
|
};
|
|
@@ -1173,7 +1173,7 @@ d.styles = k`
|
|
|
1173
1173
|
bottom: 0;
|
|
1174
1174
|
left: 0;
|
|
1175
1175
|
width: 100%;
|
|
1176
|
-
border-bottom: var(--border-
|
|
1176
|
+
border-bottom: var(--border-m, 1px) solid var(--button-text);
|
|
1177
1177
|
}
|
|
1178
1178
|
|
|
1179
1179
|
:host([underlined]:not([text])) .button slot {
|
package/index.mjs
CHANGED
package/loader.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import "./components/link.mjs";
|
|
|
4
4
|
import "./components/header-simplify.mjs";
|
|
5
5
|
import "./components/breadcrumb.mjs";
|
|
6
6
|
import "./components/breadcrumbs.mjs";
|
|
7
|
+
globalThis.__FLORID_KIT__ = "3.1.7";
|
|
7
8
|
const i = {
|
|
8
9
|
"o-accordion": () => import("./components/accordion.mjs"),
|
|
9
10
|
"o-accordion-group": () => import("./components/accordion-group.mjs"),
|