@florid-kit/components 3.2.21 → 3.2.23

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.
@@ -30,6 +30,7 @@ export declare class OccitaneIconButton extends OccitaneIconButton_base {
30
30
  * button so its accessible name comes only from the sr-only label.
31
31
  */
32
32
  noAriaLabel: boolean;
33
+ ariaLabel: string | null;
33
34
  preventDefault: boolean;
34
35
  private _unsubOcc?;
35
36
  private _clearOccSubscription;
@@ -1,18 +1,18 @@
1
- import { i as p, m as d, E as a, x as l, a as v, t as y } from "../performance-mixin-D7YmSeqN.mjs";
1
+ import { i as p, m as d, E as c, x as l, a as v, t as y } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n } from "../property-S_Y9cb04.mjs";
3
3
  import { o as u } from "../if-defined-j0wE2gL4.mjs";
4
4
  import { r as g, o as m } from "../icons-registry.mjs";
5
5
  import { c as f } from "../svg-utils-DOL__czZ.mjs";
6
6
  import { f as x, i as w, s as k } from "../css-C8WrrxT-.mjs";
7
- var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (t, s, r, c) => {
8
- for (var e = c > 1 ? void 0 : c ? S(s, r) : s, h = t.length - 1, b; h >= 0; h--)
9
- (b = t[h]) && (e = (c ? b(s, r, e) : b(e)) || e);
10
- return c && e && $(s, r, e), e;
7
+ var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, i = (t, s, r, a) => {
8
+ for (var e = a > 1 ? void 0 : a ? S(s, r) : s, h = t.length - 1, b; h >= 0; h--)
9
+ (b = t[h]) && (e = (a ? b(s, r, e) : b(e)) || e);
10
+ return a && e && $(s, r, e), e;
11
11
  };
12
12
  const z = (t) => t.startsWith("occ-");
13
13
  let o = class extends d(v) {
14
14
  constructor() {
15
- super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "", this.disabled = !1, this.highlight = !1, this.pressed = void 0, this.showSrLabel = !1, this.srLabel = "", this.url = "", this.urlTitle = "", this.noAriaLabel = !1, this.preventDefault = !1;
15
+ super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "", this.disabled = !1, this.highlight = !1, this.pressed = void 0, this.showSrLabel = !1, this.srLabel = "", this.url = "", this.urlTitle = "", this.noAriaLabel = !1, this.ariaLabel = null, this.preventDefault = !1;
16
16
  }
17
17
  _clearOccSubscription() {
18
18
  var t;
@@ -48,18 +48,18 @@ let o = class extends d(v) {
48
48
  }
49
49
  render() {
50
50
  if (!this.icon)
51
- return a;
51
+ return c;
52
52
  const t = f(this.icon, this.size, this.bgstyle);
53
- if (!t) return a;
54
- const s = `icon-${this.icon}`, r = this.showSrLabel ? l`<span class="sr-only">${this.srLabel}</span>` : null, c = this.showSrLabel ? this.noAriaLabel ? void 0 : "" : "icon";
53
+ if (!t) return c;
54
+ const s = `icon-${this.icon}`, r = this.showSrLabel ? l`<span class="sr-only">${this.srLabel}</span>` : null, a = this.showSrLabel ? this.noAriaLabel ? void 0 : this.ariaLabel : this.ariaLabel || void 0;
55
55
  let e = l``;
56
56
  return this.url && this.url.length > 0 ? e = l`
57
57
  <a
58
58
  href=${this.url}
59
- aria-label=${u(c) || a}
60
- aria-describedby=${this.getAttribute("aria-describedby") || a}
59
+ aria-label=${u(a)}
60
+ aria-describedby=${this.getAttribute("aria-describedby") || c}
61
61
  ?disabled="${this.disabled}"
62
- title=${this.urlTitle || a}
62
+ title=${this.urlTitle || c}
63
63
  @click=${this.handleLinkClick}
64
64
  >
65
65
  <span part="icon-button" class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}" ?disabled="${this.disabled}">
@@ -74,10 +74,10 @@ let o = class extends d(v) {
74
74
  ` : l`
75
75
  <button
76
76
  type="button"
77
- title=${this.urlTitle || a}
78
- aria-label=${u(c)}
77
+ title=${this.urlTitle || c}
78
+ aria-label=${u(a)}
79
79
  aria-pressed=${u(this.pressed === void 0 ? void 0 : String(this.pressed))}
80
- aria-describedby=${this.getAttribute("aria-describedby") || a}
80
+ aria-describedby=${this.getAttribute("aria-describedby") || c}
81
81
  part="icon-button"
82
82
  class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${s} ${this.highlight ? "highlight" : ""}"
83
83
  ?disabled="${this.disabled}"
@@ -394,6 +394,9 @@ i([
394
394
  i([
395
395
  n({ type: Boolean, attribute: "no-aria-label" })
396
396
  ], o.prototype, "noAriaLabel", 2);
397
+ i([
398
+ n({ type: String, reflect: !0, attribute: "aria-label" })
399
+ ], o.prototype, "ariaLabel", 2);
397
400
  i([
398
401
  n({ type: Boolean, reflect: !0, attribute: "prevent-default" })
399
402
  ], o.prototype, "preventDefault", 2);
@@ -3,6 +3,7 @@ import { LitElement } from 'lit';
3
3
  type ThumbnailItem = {
4
4
  src: string;
5
5
  type?: "image" | "video";
6
+ alt?: string;
6
7
  };
7
8
  declare const ThumbnailNavigation_base: import('../behaviors/mixin').MixinReturn<typeof LitElement>;
8
9
  export declare class ThumbnailNavigation extends ThumbnailNavigation_base {
@@ -75,7 +75,7 @@ let r = class extends h(p) {
75
75
  return d`
76
76
  <ul class="scroll-container" style="max-width: ${this.maxWidth};">
77
77
  ${this.thumbnails.map((t, e) => {
78
- const o = this.disabledIndexes.includes(e), i = this.activeIndex === e, s = t.type === "video", l = s ? `video ${e}` : `${this.altressource} ${e + 1}`;
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}`);
79
79
  return d`
80
80
  <li class="thumb-wrapper">
81
81
  <button
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.21";
41
+ globalThis.__FLORID_KIT__ = "3.2.23";
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.21";
7
+ globalThis.__FLORID_KIT__ = "3.2.23";
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.21",
3
+ "version": "3.2.23",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",