@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.
@@ -1,13 +1,13 @@
1
- import { i as u, m as h, a as p, x as d, t as b } from "../performance-mixin-D7YmSeqN.mjs";
2
- import { n as c } from "../property-S_Y9cb04.mjs";
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, x = Object.getOwnPropertyDescriptor, a = (t, e, o, i) => {
6
- for (var s = i > 1 ? void 0 : i ? x(e, o) : e, l = t.length - 1, n; l >= 0; l--)
7
- (n = t[l]) && (s = (i ? n(e, o, s) : n(s)) || s);
8
- return i && s && f(e, o, s), s;
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 r = class extends h(p) {
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, this.renderRoot.querySelectorAll(".thumb").forEach((s) => {
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), i = t.relatedTarget;
64
- (!i || this.shadowRoot && !this.shadowRoot.contains(i)) && (this.renderRoot.querySelectorAll(".thumb").forEach((n) => n.classList.remove("a--tabfocus")), o === this.lastIndex ? this.dispatchEvent(new CustomEvent("thumb-exit", {
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), i = this.activeIndex === e, s = t.type === "video", l = t.alt || (s ? `video ${e}` : `${this.altressource} ${e + 1}`);
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=${i ? "true" : "false"}
83
+ aria-current=${s ? "true" : "false"}
86
84
  @click=${() => this.selectThumbnail(e)}
87
85
  @keydown=${this.handleKeyDown}
88
- @focus=${(n) => this.onFocus(n)}
89
- @focusout=${(n) => this.onFocusOut(n)}
86
+ @focus=${(a) => this.onFocus(a)}
87
+ @focusout=${(a) => this.onFocusOut(a)}
90
88
  >
91
- <img alt="${l}" src="${t.src}" />
89
+ <img alt="${c}" src="${t.src}" />
92
90
  </button>
93
- ${s ? d`<div class="play-icon-wrapper">${this.playerIconTemplate}</div>` : null}
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
- r.styles = u`
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-size: cover;
116
- background-position: center;
117
- border: 1px solid var(--color-border-secondary);
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: outline 0.2s, opacity 0.2s;
122
- padding: 0;
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: auto;
130
- max-width: 100%;
131
- border: 1px solid var(--color-container-bg-white);
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
- box-shadow: 0 0 0px 2px var(--color-border-secondary);
138
+ --thumb-border: var(--color-container-action-primary-default);
139
+ --thumb-border-width: 1px;
138
140
  }
139
141
 
140
- .thumb[aria-selected="true"]::before,
141
- .a--tabfocus::before {
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: 1px solid var(--color-border-disabled, #eee);
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: 1px solid var(--color-border-primary) !important;
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
- a([
211
- c({ type: Array })
212
- ], r.prototype, "thumbnails", 2);
213
- a([
214
- c({ type: Number })
215
- ], r.prototype, "activeIndex", 2);
216
- a([
217
- c({ type: Array })
218
- ], r.prototype, "disabledIndexes", 2);
219
- a([
220
- c({ type: String })
221
- ], r.prototype, "maxWidth", 2);
222
- a([
223
- c({ type: String })
224
- ], r.prototype, "altressource", 2);
225
- a([
226
- c({ type: Object })
227
- ], r.prototype, "swiperInstance", 2);
228
- a([
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
- ], r.prototype, "focusedIndex", 2);
231
- r = a([
232
- b("thumbnail-navigation")
233
- ], r);
249
+ ], i.prototype, "focusedIndex", 2);
250
+ i = n([
251
+ p("thumbnail-navigation")
252
+ ], i);
234
253
  export {
235
- r as ThumbnailNavigation
254
+ i as ThumbnailNavigation
236
255
  };
package/index.mjs CHANGED
@@ -38,4 +38,4 @@ import "./components/search-input.mjs";
38
38
  import "./components/search-input-dropdown.mjs";
39
39
  import "./components/option-tile.mjs";
40
40
  import "./components/option-tile-group.mjs";
41
- globalThis.__FLORID_KIT__ = "3.2.23";
41
+ globalThis.__FLORID_KIT__ = "3.2.24";
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.23";
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"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "3.2.23",
3
+ "version": "3.2.24",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",