@florid-kit/components 3.2.6 → 3.2.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.
@@ -3,10 +3,10 @@ import { n } from "../property-S_Y9cb04.mjs";
3
3
  import { o as u } from "../if-defined-j0wE2gL4.mjs";
4
4
  import { f as g } from "../css-C8WrrxT-.mjs";
5
5
  import "./icon-button.mjs";
6
- var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor, t = (i, r, l, a) => {
7
- for (var o = a > 1 ? void 0 : a ? y(r, l) : r, c = i.length - 1, p; c >= 0; c--)
8
- (p = i[c]) && (o = (a ? p(r, l, o) : p(o)) || o);
9
- return a && o && m(r, l, o), o;
6
+ var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor, t = (i, o, l, a) => {
7
+ for (var r = a > 1 ? void 0 : a ? y(o, l) : o, c = i.length - 1, p; c >= 0; c--)
8
+ (p = i[c]) && (r = (a ? p(o, l, r) : p(r)) || r);
9
+ return a && r && m(o, l, r), r;
10
10
  };
11
11
  let e = class extends f(d) {
12
12
  constructor() {
@@ -16,7 +16,7 @@ let e = class extends f(d) {
16
16
  (!this.href || this.href === "#") && i.preventDefault();
17
17
  }
18
18
  render() {
19
- const i = !!this.href, r = s`
19
+ const i = !!this.href, o = s`
20
20
  ${this.startIcon ? s`
21
21
  <o-icon-button
22
22
  class="link-start-icon"
@@ -56,14 +56,18 @@ let e = class extends f(d) {
56
56
  target="${u(this.target || void 0)}"
57
57
  @click="${this._handleClick}"
58
58
  >
59
- ${r}
59
+ ${o}
60
60
  </a>
61
- ` : s`<span class="link-wrapper">${r}</span>`;
61
+ ` : s`<span class="link-wrapper">${o}</span>`;
62
62
  }
63
63
  };
64
64
  e.styles = h`
65
65
  :host {
66
66
  cursor: pointer;
67
+ /* The host is not the focus target: only the inner <a> is. Without
68
+ * this the UA paints its own solid ring on the host as well, which
69
+ * reads as a double focus ring. Same guard as o-icon-button. */
70
+ outline: none !important;
67
71
  }
68
72
 
69
73
  :host([template="standard"]) .link-wrapper {
@@ -1,20 +1,21 @@
1
1
  import { i as h, m as f, a as d, x as a, t as g } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as i } from "../property-S_Y9cb04.mjs";
3
+ import { i as u } from "../css-C8WrrxT-.mjs";
3
4
  import "./icon-button.mjs";
4
5
  import "./tag.mjs";
5
- var u = Object.defineProperty, v = Object.getOwnPropertyDescriptor, e = (n, o, l, s) => {
6
- for (var r = s > 1 ? void 0 : s ? v(o, l) : o, c = n.length - 1, p; c >= 0; c--)
7
- (p = n[c]) && (r = (s ? p(o, l, r) : p(r)) || r);
8
- return s && r && u(o, l, r), r;
6
+ var v = Object.defineProperty, y = Object.getOwnPropertyDescriptor, e = (n, o, l, r) => {
7
+ for (var s = r > 1 ? void 0 : r ? y(o, l) : o, c = n.length - 1, p; c >= 0; c--)
8
+ (p = n[c]) && (s = (r ? p(o, l, s) : p(s)) || s);
9
+ return r && s && v(o, l, s), s;
9
10
  };
10
11
  let t = class extends f(d) {
11
12
  constructor() {
12
13
  super(...arguments), this.type = "cart | notifyme", this.titleProduct = "", this.descriptionProduct = "", this.volume = "", this.perLiter = "", this.mainPrice = "", this.salesPercentage = "", this.oldPrice = "", this.imageUrl = "https://placehold.co/112x140", this.outOfStock = !1, this.outOfStockText = "Out of stock", this.altImage = "", this.fullwidth = !1, this.current = !1, this.hideIcon = !1, this.tagText = "";
13
14
  }
14
15
  onClick(n) {
15
- var l, s, r;
16
+ var l, r, s;
16
17
  const o = n.target;
17
- (l = o == null ? void 0 : o.classList) != null && l.contains("add-to-bag") || (s = o == null ? void 0 : o.classList) != null && s.contains("js-availability-notify-details-routine") || ((r = this.onClickTile) == null || r.call(this), this.dispatchEvent(
18
+ (l = o == null ? void 0 : o.classList) != null && l.contains("add-to-bag") || (r = o == null ? void 0 : o.classList) != null && r.contains("js-availability-notify-details-routine") || ((s = this.onClickTile) == null || s.call(this), this.dispatchEvent(
18
19
  new CustomEvent("tile-click", { bubbles: !0, composed: !0 })
19
20
  ));
20
21
  }
@@ -101,6 +102,9 @@ t.styles = h`
101
102
  :host {
102
103
  display: block;
103
104
  max-width: 100%;
105
+ /* The host is not the focus target: only .tile-action is. Without this the
106
+ * UA paints its own ring on the host too, which reads as a double ring. */
107
+ outline: none !important;
104
108
  }
105
109
 
106
110
  .tile {
@@ -290,6 +294,15 @@ t.styles = h`
290
294
  color: inherit;
291
295
  }
292
296
 
297
+ /*
298
+ * Brand focus ring instead of the UA's solid one. The overlay is inset: 0,
299
+ * so an outward offset would be clipped by the tile: use the inner variant
300
+ * to keep the dashes inside the card.
301
+ */
302
+ .tile-action:focus-visible {
303
+ ${u};
304
+ }
305
+
293
306
  /* Keep the CTA above the overlay so pointer events still reach it. */
294
307
  .info o-icon-button {
295
308
  position: relative;
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.6";
41
+ globalThis.__FLORID_KIT__ = "3.2.7";
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.6";
7
+ globalThis.__FLORID_KIT__ = "3.2.7";
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.6",
3
+ "version": "3.2.7",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",