@florid-kit/components 3.2.23 → 3.2.24
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/thumbnail-navigation.mjs +75 -56
- package/index.mjs +1 -1
- package/loader.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { i as u, m as h, a as
|
|
2
|
-
import { n as
|
|
1
|
+
import { i as u, m as h, a as b, x as d, t as p } from "../performance-mixin-D7YmSeqN.mjs";
|
|
2
|
+
import { n as l } from "../property-S_Y9cb04.mjs";
|
|
3
3
|
import { r as m } from "../state-DjMxXomO.mjs";
|
|
4
4
|
import "./icon-button.mjs";
|
|
5
|
-
var f = Object.defineProperty,
|
|
6
|
-
for (var
|
|
7
|
-
(
|
|
8
|
-
return
|
|
5
|
+
var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (t, e, o, s) => {
|
|
6
|
+
for (var r = s > 1 ? void 0 : s ? v(e, o) : e, c = t.length - 1, a; c >= 0; c--)
|
|
7
|
+
(a = t[c]) && (r = (s ? a(e, o, r) : a(r)) || r);
|
|
8
|
+
return s && r && f(e, o, r), r;
|
|
9
9
|
};
|
|
10
|
-
let
|
|
10
|
+
let i = class extends h(b) {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this.thumbnails = [], this.activeIndex = 0, this.disabledIndexes = [], this.maxWidth = "100%", this.altressource = "visual", this.focusedIndex = 0, this.playerIconTemplate = d`
|
|
13
13
|
<o-icon-button
|
|
@@ -55,13 +55,11 @@ let r = class extends h(p) {
|
|
|
55
55
|
}
|
|
56
56
|
onFocus(t) {
|
|
57
57
|
const e = t.currentTarget, o = Number(e.dataset.index);
|
|
58
|
-
this.focusedIndex = o
|
|
59
|
-
s.classList.remove("a--tabfocus");
|
|
60
|
-
}), e.classList.add("a--tabfocus"), this.requestUpdate();
|
|
58
|
+
this.focusedIndex = o;
|
|
61
59
|
}
|
|
62
60
|
onFocusOut(t) {
|
|
63
|
-
const e = t.currentTarget, o = Number(e.dataset.index),
|
|
64
|
-
(!
|
|
61
|
+
const e = t.currentTarget, o = Number(e.dataset.index), s = t.relatedTarget;
|
|
62
|
+
(!s || this.shadowRoot && !this.shadowRoot.contains(s)) && (o === this.lastIndex ? this.dispatchEvent(new CustomEvent("thumb-exit", {
|
|
65
63
|
detail: { from: "last", direction: "unspecified" },
|
|
66
64
|
bubbles: !0,
|
|
67
65
|
composed: !0
|
|
@@ -75,22 +73,22 @@ let r = class extends h(p) {
|
|
|
75
73
|
return d`
|
|
76
74
|
<ul class="scroll-container" style="max-width: ${this.maxWidth};">
|
|
77
75
|
${this.thumbnails.map((t, e) => {
|
|
78
|
-
const o = this.disabledIndexes.includes(e),
|
|
76
|
+
const o = this.disabledIndexes.includes(e), s = this.activeIndex === e, r = t.type === "video", c = t.alt || (r ? `video ${e}` : `${this.altressource} ${e + 1}`);
|
|
79
77
|
return d`
|
|
80
78
|
<li class="thumb-wrapper">
|
|
81
79
|
<button
|
|
82
80
|
class="thumb"
|
|
83
81
|
data-index="${e}"
|
|
84
82
|
?disabled=${o}
|
|
85
|
-
aria-current=${
|
|
83
|
+
aria-current=${s ? "true" : "false"}
|
|
86
84
|
@click=${() => this.selectThumbnail(e)}
|
|
87
85
|
@keydown=${this.handleKeyDown}
|
|
88
|
-
@focus=${(
|
|
89
|
-
@focusout=${(
|
|
86
|
+
@focus=${(a) => this.onFocus(a)}
|
|
87
|
+
@focusout=${(a) => this.onFocusOut(a)}
|
|
90
88
|
>
|
|
91
|
-
<img alt="${
|
|
89
|
+
<img alt="${c}" src="${t.src}" />
|
|
92
90
|
</button>
|
|
93
|
-
${
|
|
91
|
+
${r ? d`<div class="play-icon-wrapper">${this.playerIconTemplate}</div>` : null}
|
|
94
92
|
</li>
|
|
95
93
|
`;
|
|
96
94
|
})}
|
|
@@ -98,7 +96,7 @@ let r = class extends h(p) {
|
|
|
98
96
|
`;
|
|
99
97
|
}
|
|
100
98
|
};
|
|
101
|
-
|
|
99
|
+
i.styles = u`
|
|
102
100
|
:host {
|
|
103
101
|
display: flex;
|
|
104
102
|
gap: 5px;
|
|
@@ -112,33 +110,54 @@ r.styles = u`
|
|
|
112
110
|
.thumb {
|
|
113
111
|
width: 56px;
|
|
114
112
|
height: 70px;
|
|
115
|
-
background
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
background: var(--thumb-border);
|
|
114
|
+
--thumb-border: var(--color-alpha-dark-light);
|
|
115
|
+
--thumb-border-width: 0.5px;
|
|
116
|
+
border: none;
|
|
118
117
|
opacity: 1;
|
|
119
118
|
cursor: pointer;
|
|
120
119
|
outline: none;
|
|
121
|
-
transition:
|
|
122
|
-
padding:
|
|
120
|
+
transition: opacity 0.2s;
|
|
121
|
+
padding: var(--thumb-border-width);
|
|
123
122
|
margin: 0;
|
|
124
123
|
box-sizing: content-box;
|
|
125
124
|
position: relative;
|
|
126
125
|
|
|
127
126
|
img {
|
|
127
|
+
display: block;
|
|
128
128
|
width: 100%;
|
|
129
|
-
height:
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
height: 100%;
|
|
130
|
+
object-fit: cover;
|
|
131
|
+
background: linear-gradient(to bottom, #f9f5f0, #f7f2ea);
|
|
132
|
+
border: 1px solid var(--color-border-light);
|
|
132
133
|
box-sizing: border-box;
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
.thumb[aria-current="true"] {
|
|
137
|
-
|
|
138
|
+
--thumb-border: var(--color-container-action-primary-default);
|
|
139
|
+
--thumb-border-width: 1px;
|
|
138
140
|
}
|
|
139
141
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
@media (hover: hover) {
|
|
143
|
+
.thumb:hover {
|
|
144
|
+
--thumb-border: var(--color-alpha-dark-medium);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.thumb[aria-current="true"]:hover {
|
|
148
|
+
--thumb-border: var(--color-container-action-primary-hover);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.thumb:active {
|
|
153
|
+
--thumb-border: var(--color-alpha-dark-strong);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.thumb[aria-current="true"]:active {
|
|
157
|
+
--thumb-border: var(--color-container-action-primary-pressed);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.thumb:focus-visible::before {
|
|
142
161
|
content: "";
|
|
143
162
|
position: absolute;
|
|
144
163
|
top: 0;
|
|
@@ -151,13 +170,13 @@ r.styles = u`
|
|
|
151
170
|
}
|
|
152
171
|
|
|
153
172
|
.thumb[disabled] {
|
|
154
|
-
border:
|
|
173
|
+
--thumb-border: var(--color-border-disabled, #eee);
|
|
155
174
|
opacity: 0.4;
|
|
156
175
|
pointer-events: none;
|
|
157
176
|
}
|
|
158
177
|
|
|
159
178
|
.thumb:focus-visible {
|
|
160
|
-
border:
|
|
179
|
+
--thumb-border: var(--color-border-primary) !important;
|
|
161
180
|
}
|
|
162
181
|
|
|
163
182
|
.play-icon-wrapper {
|
|
@@ -207,30 +226,30 @@ r.styles = u`
|
|
|
207
226
|
width: 0;
|
|
208
227
|
}
|
|
209
228
|
`;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
],
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
],
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
],
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
],
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
],
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
],
|
|
228
|
-
|
|
229
|
+
n([
|
|
230
|
+
l({ type: Array })
|
|
231
|
+
], i.prototype, "thumbnails", 2);
|
|
232
|
+
n([
|
|
233
|
+
l({ type: Number })
|
|
234
|
+
], i.prototype, "activeIndex", 2);
|
|
235
|
+
n([
|
|
236
|
+
l({ type: Array })
|
|
237
|
+
], i.prototype, "disabledIndexes", 2);
|
|
238
|
+
n([
|
|
239
|
+
l({ type: String })
|
|
240
|
+
], i.prototype, "maxWidth", 2);
|
|
241
|
+
n([
|
|
242
|
+
l({ type: String })
|
|
243
|
+
], i.prototype, "altressource", 2);
|
|
244
|
+
n([
|
|
245
|
+
l({ type: Object })
|
|
246
|
+
], i.prototype, "swiperInstance", 2);
|
|
247
|
+
n([
|
|
229
248
|
m()
|
|
230
|
-
],
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
],
|
|
249
|
+
], i.prototype, "focusedIndex", 2);
|
|
250
|
+
i = n([
|
|
251
|
+
p("thumbnail-navigation")
|
|
252
|
+
], i);
|
|
234
253
|
export {
|
|
235
|
-
|
|
254
|
+
i as ThumbnailNavigation
|
|
236
255
|
};
|
package/index.mjs
CHANGED
package/loader.mjs
CHANGED
|
@@ -4,7 +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.2.
|
|
7
|
+
globalThis.__FLORID_KIT__ = "3.2.24";
|
|
8
8
|
const i = {
|
|
9
9
|
"o-accordion": () => import("./components/accordion.mjs"),
|
|
10
10
|
"o-accordion-group": () => import("./components/accordion-group.mjs"),
|