@florid-kit/components 3.1.1 → 3.1.3

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.
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  import { FormSubmitter, FormSubmitterType } from '../controllers/form-submitter';
3
3
 
4
4
  declare const buttonBaseClass: import('../behaviors/mixin').MixinReturn<import('../behaviors/mixin').MixinReturn<typeof LitElement, import('../behaviors/element-internals.js').WithElementInternals>>;
5
- type ButtonVariant = "primary" | "secondary" | "ghost" | "tertiary";
5
+ type ButtonVariant = "primary" | "secondary" | "ghost" | "tertiary" | "link";
6
6
  export declare const variants: string[];
7
7
  export declare class OccitaneButton extends buttonBaseClass implements FormSubmitter {
8
8
  static readonly formAssociated = true;
@@ -5,7 +5,7 @@ import "../element-internals-Dw7LndlH.mjs";
5
5
  import { O as c, v as e } from "./side-panel.mjs";
6
6
  import "../icons-registry.mjs";
7
7
  import "../svg-utils-DOL__czZ.mjs";
8
- import "../unsafe-svg-C3uTocNg.mjs";
8
+ import "../unsafe-svg-BipL_msF.mjs";
9
9
  export {
10
10
  c as OccitaneButton,
11
11
  e as variants
@@ -3,7 +3,7 @@ import { n as o } from "../property-S_Y9cb04.mjs";
3
3
  import { f as g } from "../css-C8WrrxT-.mjs";
4
4
  import { m as f } from "../element-internals-Dw7LndlH.mjs";
5
5
  import { i as m } from "../icons-registry.mjs";
6
- import { o as y } from "../unsafe-svg-C3uTocNg.mjs";
6
+ import { o as y } from "../unsafe-svg-BipL_msF.mjs";
7
7
  var x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, e = (r, i, n, a) => {
8
8
  for (var s = a > 1 ? void 0 : a ? w(i, n) : i, h = r.length - 1, d; h >= 0; h--)
9
9
  (d = r[h]) && (s = (a ? d(i, n, s) : d(s)) || s);
@@ -2,7 +2,7 @@ import { i as m, m as y, a as w, x as p, t as x } from "../performance-mixin-D7Y
2
2
  import { n as c } from "../property-S_Y9cb04.mjs";
3
3
  import { r as f } from "../state-DjMxXomO.mjs";
4
4
  import { e as _, o as k, a as $ } from "../icons-registry.mjs";
5
- import { o as I } from "../unsafe-svg-C3uTocNg.mjs";
5
+ import { o as I } from "../unsafe-svg-BipL_msF.mjs";
6
6
  import { o as l } from "../if-defined-j0wE2gL4.mjs";
7
7
  var O = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (e, i, o, t) => {
8
8
  for (var n = t > 1 ? void 0 : t ? C(i, o) : i, s = e.length - 1, d; s >= 0; s--)
@@ -2,7 +2,7 @@ import { i as u, m as v, a as b, x as s, t as f } from "../performance-mixin-D7Y
2
2
  import { n as l } from "../property-S_Y9cb04.mjs";
3
3
  import { r as h } from "../state-DjMxXomO.mjs";
4
4
  import { e as g, o as y, a as m } from "../icons-registry.mjs";
5
- import { o as p } from "../unsafe-svg-C3uTocNg.mjs";
5
+ import { o as p } from "../unsafe-svg-BipL_msF.mjs";
6
6
  var w = Object.defineProperty, x = Object.getOwnPropertyDescriptor, n = (e, t, r, o) => {
7
7
  for (var i = o > 1 ? void 0 : o ? x(t, r) : t, c = e.length - 1, d; c >= 0; c--)
8
8
  (d = e[c]) && (i = (o ? d(t, r, i) : d(i)) || i);
@@ -3,7 +3,7 @@ import { n as i } from "../property-S_Y9cb04.mjs";
3
3
  import { f as g } from "../css-C8WrrxT-.mjs";
4
4
  import { m as v } from "../element-internals-Dw7LndlH.mjs";
5
5
  import { i as m } from "../icons-registry.mjs";
6
- import { o as y } from "../unsafe-svg-C3uTocNg.mjs";
6
+ import { o as y } from "../unsafe-svg-BipL_msF.mjs";
7
7
  import "./icon-button.mjs";
8
8
  var x = Object.defineProperty, k = Object.getOwnPropertyDescriptor, r = (t, s, a, c) => {
9
9
  for (var n = c > 1 ? void 0 : c ? k(s, a) : s, d = t.length - 1, h; d >= 0; d--)
@@ -3,17 +3,18 @@ import { n as o } from "../property-S_Y9cb04.mjs";
3
3
  import { e as m } from "../query-NJDNu0-P.mjs";
4
4
  import { l as y } from "../live-C_TUoYRm.mjs";
5
5
  import { o as h } from "../if-defined-j0wE2gL4.mjs";
6
+ import { o as w } from "../unsafe-html-DAJ3o0dq.mjs";
6
7
  import "./icon-button.mjs";
7
- import { m as w, i as d } from "../element-internals-Dw7LndlH.mjs";
8
- var x = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, e = (r, i, c, l) => {
9
- for (var a = l > 1 ? void 0 : l ? $(i, c) : i, p = r.length - 1, u; p >= 0; p--)
8
+ import { m as x, i as d } from "../element-internals-Dw7LndlH.mjs";
9
+ var $ = Object.defineProperty, I = Object.getOwnPropertyDescriptor, e = (r, i, c, l) => {
10
+ for (var a = l > 1 ? void 0 : l ? I(i, c) : i, p = r.length - 1, u; p >= 0; p--)
10
11
  (u = r[p]) && (a = (l ? u(i, c, a) : u(a)) || a);
11
- return l && a && x(i, c, a), a;
12
+ return l && a && $(i, c, a), a;
12
13
  };
13
- const I = f(w(b));
14
- let S = 0, t = class extends I {
14
+ const S = f(x(b));
15
+ let E = 0, t = class extends S {
15
16
  constructor() {
16
- super(), this.label = "", this.value = "", this.placeholder = "", this.helperText = "", this.state = "default", this.disabled = !1, this.leadingIcon = "", this.trailingIcon = "", this.name = "", this.required = !1, this.clearLabel = "Clear", this.inputId = "", this.inputId || (this.inputId = `o-input-${++S}`);
17
+ super(), this.label = "", this.value = "", this.placeholder = "", this.helperText = "", this.state = "default", this.disabled = !1, this.leadingIcon = "", this.trailingIcon = "", this.name = "", this.required = !1, this.clearLabel = "Clear", this.inputId = "", this.inputId || (this.inputId = `o-input-${++E}`);
17
18
  }
18
19
  updated(r) {
19
20
  (r.has("value") || r.has("name")) && this[d].setFormValue(this.value);
@@ -86,7 +87,7 @@ let S = 0, t = class extends I {
86
87
  ${this.helperText ? n`
87
88
  <div class="helper-text" id="${this.inputId}-helper">
88
89
  ${this.renderHelperIcon()}
89
- <p>${this.helperText}</p>
90
+ <p>${w(this.helperText)}</p>
90
91
  </div>
91
92
  ` : s}
92
93
  `;
@@ -1,7 +1,7 @@
1
1
  import { m as u, a as g, x as s, i as f } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n } from "../property-S_Y9cb04.mjs";
3
3
  import { r as h } from "../state-DjMxXomO.mjs";
4
- import { o as m } from "../unsafe-svg-C3uTocNg.mjs";
4
+ import { o as m } from "../unsafe-svg-BipL_msF.mjs";
5
5
  import "./icon-button.mjs";
6
6
  const b = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
7
7
  <svg
@@ -1,6 +1,6 @@
1
1
  import { i as f, m as u, a as g, x as c, t as h } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as p } from "../property-S_Y9cb04.mjs";
3
- import { o as v } from "../unsafe-svg-C3uTocNg.mjs";
3
+ import { o as v } from "../unsafe-svg-BipL_msF.mjs";
4
4
  import { o as m, r as d } from "../icons-registry.mjs";
5
5
  import "./link.mjs";
6
6
  var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (t, e, r, s) => {
@@ -1,10 +1,10 @@
1
- import { E as p, i as C, a as w, m as S, x as h, t as B } from "../performance-mixin-D7YmSeqN.mjs";
1
+ import { E as p, i as C, a as x, m as S, x as h, t as B } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as r } from "../property-S_Y9cb04.mjs";
3
- import { f as x } from "../css-C8WrrxT-.mjs";
3
+ import { f as w } from "../css-C8WrrxT-.mjs";
4
4
  import { i as E, m as P } from "../element-internals-Dw7LndlH.mjs";
5
5
  import { e as $, o as _, a as I } from "../icons-registry.mjs";
6
- import { g as F } from "../svg-utils-DOL__czZ.mjs";
7
- import { o as z } from "../unsafe-svg-C3uTocNg.mjs";
6
+ import { g as z } from "../svg-utils-DOL__czZ.mjs";
7
+ import { o as F } from "../unsafe-svg-BipL_msF.mjs";
8
8
  import "./icon-button.mjs";
9
9
  import { i as O, t as L, e as R } from "../directive-oAbCiebi.mjs";
10
10
  import { f as q } from "../directive-helpers-BHuwIghp.mjs";
@@ -226,7 +226,7 @@ var U = Object.defineProperty, W = Object.getOwnPropertyDescriptor, c = (e, t, o
226
226
  (a = e[s]) && (n = (i ? a(t, o, n) : a(n)) || n);
227
227
  return i && n && U(t, o, n), n;
228
228
  };
229
- let l = class extends S(w) {
229
+ let l = class extends S(x) {
230
230
  constructor() {
231
231
  super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !1, this.showHeaderStartIcon = !1, this.headerTitle = "", this.headerTitleClassName = "panel-title", this.labelDialog = "", this.labelAriaDialogPanel = "", this.addToBagProductCount = "", this.closeButtonLabel = "Close the modal", this.goBackButtonLabel = "Go back to", this.firstButtonLabel = "Close", this.firstButtonVariant = "primary", this.firstButtonProps = {}, this.onFirstButtonClickClose = !1, this.secondButtonLabel = "", this.secondButtonVariant = "secondary", this.secondButtonProps = {}, this.onSecondButtonClickClose = !1, this.stickyFooter = !1, this.disablePortal = !1, this.zIndex = 99, this.initialized = !1, this.showDetail = !1, this.isHidingDetail = !1, this.previousFocusedElement = null, this.previousFocusedSelector = null, this._hideTimeout = null, this._onOpenDetail = async (e) => {
232
232
  var o, i;
@@ -658,7 +658,7 @@ l.styles = C`
658
658
 
659
659
  .panel:focus-visible,
660
660
  .close-btn:focus-visible {
661
- ${x}
661
+ ${w}
662
662
  }
663
663
 
664
664
  [role="document"] {
@@ -762,7 +762,7 @@ l.styles = C`
762
762
  l.focusablesSelector = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';
763
763
  l.focusablesCustomElementsSelector = "o-icon-button, o-button";
764
764
  l.shadowRootOptions = {
765
- ...w.shadowRootOptions,
765
+ ...x.shadowRootOptions,
766
766
  // This helps send focus into the first focusable in shadow when host is focused
767
767
  delegatesFocus: !0
768
768
  };
@@ -849,7 +849,7 @@ var G = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, u = (e, t, o
849
849
  (a = e[s]) && (n = (i ? a(t, o, n) : a(n)) || n);
850
850
  return i && n && G(t, o, n), n;
851
851
  };
852
- const J = S(P(w)), lt = ["primary", "secondary", "ghost", "tertiary"];
852
+ const J = S(P(x)), lt = ["primary", "secondary", "ghost", "tertiary", "link"];
853
853
  let d = class extends J {
854
854
  constructor() {
855
855
  super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.startIconModel = "", this.endIconModel = "", this.startIcon = !1, this.endIcon = !1, this.panelTarget = "", this.href = "", this.target = "", this.underlined = !1, this.withbadge = !1, this.hideRoleButton = !1, this.describedBy = null, this.ariaExpanded = null;
@@ -887,8 +887,8 @@ let d = class extends J {
887
887
  if (!t) return p;
888
888
  const o = I[t] ?? "";
889
889
  if (!o) return p;
890
- const i = F(o);
891
- return h`<span class="${e === "start" ? "icon-start" : "icon-end"}">${z(i)}</span>`;
890
+ const i = z(o);
891
+ return h`<span class="${e === "start" ? "icon-start" : "icon-end"}">${F(i)}</span>`;
892
892
  }
893
893
  renderButton() {
894
894
  const e = this.text || this.textsecond;
@@ -943,7 +943,7 @@ d.styles = C`
943
943
  }
944
944
 
945
945
  :host(.a--tabfocus) .button {
946
- ${x};
946
+ ${w};
947
947
  }
948
948
 
949
949
  :host([fullwidth]) {
@@ -1000,6 +1000,50 @@ d.styles = C`
1000
1000
  --button-endicon-svg-width: 8px;
1001
1001
  }
1002
1002
 
1003
+ :host([variant="link"]) {
1004
+ --button-bg: transparent;
1005
+ --button-bg-hover: transparent;
1006
+ --button-bg-pressed: transparent;
1007
+ --button-text: var(--color-content-action-secondary);
1008
+ --button-text-hover: var(--color-content-action-secondary);
1009
+ --button-border: transparent;
1010
+ --button-border-width: 0;
1011
+ --button-padding: 0;
1012
+ }
1013
+
1014
+ :host([variant="link"]) .button {
1015
+ background-color: transparent;
1016
+ min-width: auto;
1017
+ min-height: auto;
1018
+ width: auto;
1019
+ border: 0;
1020
+ padding: 0;
1021
+ position: relative;
1022
+ color: var(--color-content-action-secondary);
1023
+ font-size: var(--font-size-200);
1024
+ font-weight: var(--font-weight-400);
1025
+ line-height: var(--line-height-240);
1026
+ letter-spacing: var(--letter-spacing-400);
1027
+ font-family: var(--font-family-loccitane-serif);
1028
+ }
1029
+
1030
+ :host([variant="link"]) .button::after {
1031
+ content: "";
1032
+ position: absolute;
1033
+ left: 0;
1034
+ bottom: 0;
1035
+ width: 100%;
1036
+ opacity: 1;
1037
+ height: 1px;
1038
+ background-color: currentColor;
1039
+ transition: opacity 0.3s ease, height 0.3s ease;
1040
+ pointer-events: none;
1041
+ }
1042
+
1043
+ :host([variant="link"]) .button:hover::after {
1044
+ opacity: 0;
1045
+ }
1046
+
1003
1047
  :host([disabled]),
1004
1048
  :host([aria-disabled="true"]),
1005
1049
  :host([aria-disabled="true"]:hover) {
@@ -1050,7 +1094,7 @@ d.styles = C`
1050
1094
  }
1051
1095
 
1052
1096
  .button:focus-visible {
1053
- ${x};
1097
+ ${w};
1054
1098
  }
1055
1099
 
1056
1100
  span.text + span.text::before {
@@ -1,6 +1,6 @@
1
1
  import { i as f, m as p, a as u, x as m, t as d } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as a } from "../property-S_Y9cb04.mjs";
3
- import { o as v } from "../unsafe-svg-C3uTocNg.mjs";
3
+ import { o as v } from "../unsafe-svg-BipL_msF.mjs";
4
4
  import "./icon-button.mjs";
5
5
  import { t as g } from "../icons-registry.mjs";
6
6
  var y = Object.defineProperty, x = Object.getOwnPropertyDescriptor, o = (t, i, r, s) => {
@@ -1,6 +1,6 @@
1
1
  import { i as d, m as p, a as b, x as h, t as f } from "../performance-mixin-D7YmSeqN.mjs";
2
2
  import { n as r } from "../property-S_Y9cb04.mjs";
3
- import { o as g } from "../unsafe-svg-C3uTocNg.mjs";
3
+ import { o as g } from "../unsafe-svg-BipL_msF.mjs";
4
4
  import { e as u, o as y, a as v } from "../icons-registry.mjs";
5
5
  import { g as w } from "../svg-utils-DOL__czZ.mjs";
6
6
  import { f as m, s as S } from "../css-C8WrrxT-.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",
@@ -0,0 +1,27 @@
1
+ import { E as r, T as s } from "./performance-mixin-D7YmSeqN.mjs";
2
+ import { i as n, t as o, e as c } from "./directive-oAbCiebi.mjs";
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ class e extends n {
9
+ constructor(t) {
10
+ if (super(t), this.it = r, t.type !== o.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
11
+ }
12
+ render(t) {
13
+ if (t === r || t == null) return this._t = void 0, this.it = t;
14
+ if (t === s) return t;
15
+ if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
16
+ if (t === this.it) return this._t;
17
+ this.it = t;
18
+ const i = [t];
19
+ return i.raw = i, this._t = { _$litType$: this.constructor.resultType, strings: i, values: [] };
20
+ }
21
+ }
22
+ e.directiveName = "unsafeHTML", e.resultType = 1;
23
+ const l = c(e);
24
+ export {
25
+ e,
26
+ l as o
27
+ };
@@ -0,0 +1,14 @@
1
+ import { e as t } from "./directive-oAbCiebi.mjs";
2
+ import { e as o } from "./unsafe-html-DAJ3o0dq.mjs";
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ class e extends o {
9
+ }
10
+ e.directiveName = "unsafeSVG", e.resultType = 2;
11
+ const a = t(e);
12
+ export {
13
+ a as o
14
+ };
@@ -1,34 +0,0 @@
1
- import { i as o, t as c, e as u } from "./directive-oAbCiebi.mjs";
2
- import { E as r, T as a } from "./performance-mixin-D7YmSeqN.mjs";
3
- /**
4
- * @license
5
- * Copyright 2017 Google LLC
6
- * SPDX-License-Identifier: BSD-3-Clause
7
- */
8
- class i extends o {
9
- constructor(t) {
10
- if (super(t), this.it = r, t.type !== c.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
11
- }
12
- render(t) {
13
- if (t === r || t == null) return this._t = void 0, this.it = t;
14
- if (t === a) return t;
15
- if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
16
- if (t === this.it) return this._t;
17
- this.it = t;
18
- const e = [t];
19
- return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
20
- }
21
- }
22
- i.directiveName = "unsafeHTML", i.resultType = 1;
23
- /**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */
28
- class s extends i {
29
- }
30
- s.directiveName = "unsafeSVG", s.resultType = 2;
31
- const d = u(s);
32
- export {
33
- d as o
34
- };