@florid-kit/components 3.1.6 → 3.1.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.
@@ -1,9 +1,11 @@
1
1
  import { LitElement } from 'lit';
2
+ import { IconLogicalSize } from '../assets/icons/icons';
2
3
 
3
4
  type Template = "standard" | "discret" | "review";
4
5
  type Inverse = true | false;
5
6
  type endIcon = true | false;
6
7
  type reverseEndIcon = true | false;
8
+ type startIcon = true | false;
7
9
  type Disabled = true | false;
8
10
  declare const OccitaneLink_base: import('../behaviors/mixin.js').MixinReturn<typeof LitElement>;
9
11
  export declare class OccitaneLink extends OccitaneLink_base {
@@ -14,6 +16,8 @@ export declare class OccitaneLink extends OccitaneLink_base {
14
16
  inverse: Inverse;
15
17
  endIcon: endIcon;
16
18
  reverseEndIcon: reverseEndIcon;
19
+ startIcon: startIcon;
20
+ iconSize: IconLogicalSize;
17
21
  disabled: Disabled;
18
22
  private _handleClick;
19
23
  render(): import('lit').TemplateResult<1>;
@@ -1,54 +1,66 @@
1
- import { i as h, m as f, a as v, x as a, t as d } from "../performance-mixin-D7YmSeqN.mjs";
2
- import { n as r } from "../property-S_Y9cb04.mjs";
1
+ import { i as h, m as f, a as d, x as s, t as v } from "../performance-mixin-D7YmSeqN.mjs";
2
+ import { n } from "../property-S_Y9cb04.mjs";
3
3
  import { o as g } from "../if-defined-j0wE2gL4.mjs";
4
4
  import "./icon-button.mjs";
5
- var m = Object.defineProperty, u = Object.getOwnPropertyDescriptor, t = (i, n, l, s) => {
6
- for (var o = s > 1 ? void 0 : s ? u(n, l) : n, c = i.length - 1, p; c >= 0; c--)
7
- (p = i[c]) && (o = (s ? p(n, l, o) : p(o)) || o);
8
- return s && o && m(n, l, o), o;
5
+ var y = Object.defineProperty, m = Object.getOwnPropertyDescriptor, e = (i, r, l, a) => {
6
+ for (var o = a > 1 ? void 0 : a ? m(r, l) : r, c = i.length - 1, p; c >= 0; c--)
7
+ (p = i[c]) && (o = (a ? p(r, l, o) : p(o)) || o);
8
+ return a && o && y(r, l, o), o;
9
9
  };
10
- let e = class extends f(v) {
10
+ let t = class extends f(d) {
11
11
  constructor() {
12
- super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1, this.disabled = !1;
12
+ super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1, this.startIcon = !1, this.iconSize = "xsmall", this.disabled = !1;
13
13
  }
14
14
  _handleClick(i) {
15
15
  (!this.href || this.href === "#") && i.preventDefault();
16
16
  }
17
17
  render() {
18
- const i = !!this.href, n = a`
19
- ${this.endIcon && this.reverseEndIcon ? a`
18
+ const i = !!this.href, r = s`
19
+ ${this.startIcon ? s`
20
20
  <o-icon-button
21
+ class="link-start-icon"
21
22
  icon="occ-chevron-left"
22
23
  bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
23
- size="xsmall"
24
+ size="${this.iconSize}"
25
+ aria-hidden="true"
26
+ type="span"
27
+ ></o-icon-button>
28
+ ` : null}
29
+ ${this.endIcon && this.reverseEndIcon ? s`
30
+ <o-icon-button
31
+ class="link-end-icon"
32
+ icon="occ-chevron-left"
33
+ bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
34
+ size="${this.iconSize}"
24
35
  aria-hidden="true"
25
36
  type="span"
26
37
  ></o-icon-button>
27
38
  ` : null}
28
39
  <span class="link-text"><slot></slot></span>
29
- ${this.endIcon && !this.reverseEndIcon ? a`
40
+ ${this.endIcon && !this.reverseEndIcon ? s`
30
41
  <o-icon-button
42
+ class="link-end-icon"
31
43
  icon="occ-chevron-right"
32
44
  bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
33
- size="xsmall"
45
+ size="${this.iconSize}"
34
46
  aria-hidden="true"
35
47
  type="span"
36
48
  ></o-icon-button>
37
49
  ` : null}
38
50
  `;
39
- return i ? a`
51
+ return i ? s`
40
52
  <a
41
53
  class="link-wrapper"
42
54
  href="${this.href}"
43
55
  target="${g(this.target || void 0)}"
44
56
  @click="${this._handleClick}"
45
57
  >
46
- ${n}
58
+ ${r}
47
59
  </a>
48
- ` : a`<span class="link-wrapper">${n}</span>`;
60
+ ` : s`<span class="link-wrapper">${r}</span>`;
49
61
  }
50
62
  };
51
- e.styles = h`
63
+ t.styles = h`
52
64
  :host {
53
65
  cursor: pointer;
54
66
  }
@@ -93,12 +105,17 @@ e.styles = h`
93
105
  color: var(--color-content-disabled);
94
106
  }
95
107
 
96
- :host([endIcon]) .link-wrapper o-icon-button {
108
+ :host([endIcon]) .link-wrapper .link-end-icon {
97
109
  margin-left: 2px;
98
110
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
99
111
  }
100
112
 
101
- :host([endIcon][reverseEndIcon]) .link-wrapper o-icon-button {
113
+ :host([endIcon][reverseEndIcon]) .link-wrapper .link-end-icon {
114
+ margin-right: 2px;
115
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
116
+ }
117
+
118
+ :host([startIcon]) .link-wrapper .link-start-icon {
102
119
  margin-right: 2px;
103
120
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
104
121
  }
@@ -133,40 +150,50 @@ e.styles = h`
133
150
  height: 1px;
134
151
  }
135
152
 
136
- :host([endIcon]) .link-wrapper:hover o-icon-button {
153
+ :host([endIcon]) .link-wrapper:hover .link-end-icon {
137
154
  transform: translateX(4px);
138
155
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
139
156
  }
140
157
 
141
- :host([endIcon][reverseEndIcon]) .link-wrapper:hover o-icon-button {
158
+ :host([endIcon][reverseEndIcon]) .link-wrapper:hover .link-end-icon {
159
+ transform: translateX(-4px);
160
+ }
161
+
162
+ :host([startIcon]) .link-wrapper:hover .link-start-icon {
142
163
  transform: translateX(-4px);
143
164
  }
144
165
  }
145
166
  `;
146
- t([
147
- r({ type: String })
148
- ], e.prototype, "href", 2);
149
- t([
150
- r({ type: String })
151
- ], e.prototype, "target", 2);
152
- t([
153
- r({ type: String, reflect: !0 })
154
- ], e.prototype, "template", 2);
155
- t([
156
- r({ type: Boolean, reflect: !0 })
157
- ], e.prototype, "inverse", 2);
158
- t([
159
- r({ type: Boolean, reflect: !0 })
160
- ], e.prototype, "endIcon", 2);
161
- t([
162
- r({ type: Boolean, reflect: !0 })
163
- ], e.prototype, "reverseEndIcon", 2);
164
- t([
165
- r({ type: Boolean, reflect: !0 })
166
- ], e.prototype, "disabled", 2);
167
- e = t([
168
- d("o-link")
169
- ], e);
167
+ e([
168
+ n({ type: String })
169
+ ], t.prototype, "href", 2);
170
+ e([
171
+ n({ type: String })
172
+ ], t.prototype, "target", 2);
173
+ e([
174
+ n({ type: String, reflect: !0 })
175
+ ], t.prototype, "template", 2);
176
+ e([
177
+ n({ type: Boolean, reflect: !0 })
178
+ ], t.prototype, "inverse", 2);
179
+ e([
180
+ n({ type: Boolean, reflect: !0 })
181
+ ], t.prototype, "endIcon", 2);
182
+ e([
183
+ n({ type: Boolean, reflect: !0 })
184
+ ], t.prototype, "reverseEndIcon", 2);
185
+ e([
186
+ n({ type: Boolean, reflect: !0 })
187
+ ], t.prototype, "startIcon", 2);
188
+ e([
189
+ n({ type: String })
190
+ ], t.prototype, "iconSize", 2);
191
+ e([
192
+ n({ type: Boolean, reflect: !0 })
193
+ ], t.prototype, "disabled", 2);
194
+ t = e([
195
+ v("o-link")
196
+ ], t);
170
197
  export {
171
- e as OccitaneLink
198
+ t as OccitaneLink
172
199
  };
@@ -1173,7 +1173,7 @@ d.styles = k`
1173
1173
  bottom: 0;
1174
1174
  left: 0;
1175
1175
  width: 100%;
1176
- border-bottom: var(--border-M, 1px) solid var(--button-text);
1176
+ border-bottom: var(--border-m, 1px) solid var(--button-text);
1177
1177
  }
1178
1178
 
1179
1179
  :host([underlined]:not([text])) .button slot {
package/index.mjs CHANGED
@@ -37,3 +37,4 @@ import "./components/search-input.mjs";
37
37
  import "./components/search-input-dropdown.mjs";
38
38
  import "./components/option-tile.mjs";
39
39
  import "./components/option-tile-group.mjs";
40
+ globalThis.__FLORID_KIT__ = "3.1.7";
package/loader.mjs CHANGED
@@ -4,6 +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.1.7";
7
8
  const i = {
8
9
  "o-accordion": () => import("./components/accordion.mjs"),
9
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.1.6",
3
+ "version": "3.1.7",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",