@proximus/lavender-tile 1.4.19-beta.2 → 1.4.20-alpha.10
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.
- package/dist/Tile.d.ts +1 -0
- package/dist/TileButton.d.ts +68 -1
- package/dist/TileLink.d.ts +62 -1
- package/dist/custom-elements.json +653 -5
- package/dist/index.es.js +110 -85
- package/dist/vscode.html-custom-data.json +151 -3
- package/dist/web-types.json +218 -13
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
import { PxElement as e, VerticallyExtendedElement as t, WithExtraAttributes as n, booleanPropertyToAttributeSetter as r, checkName as i, createTemplate as a, log as o,
|
|
1
|
+
import { PxElement as e, VerticallyExtendedElement as t, WithExtraAttributes as n, booleanPropertyToAttributeSetter as r, checkName as i, createTemplate as a, log as o, nativeAnchorAttributes as s, nativeAnchorMethods as c, nativeAnchorProperties as l, nativeButtonAttributes as u, nativeButtonMethods as d, nativeButtonProperties as f, propertyToAttributeSetter as p, renderTemplate as m } from "@proximus/lavender-common";
|
|
2
2
|
import "@proximus/lavender-layout";
|
|
3
|
-
import { checkboxStateValues as
|
|
4
|
-
import { stateValues as
|
|
5
|
-
|
|
6
|
-
function
|
|
3
|
+
import { checkboxStateValues as h } from "@proximus/lavender-checkbox";
|
|
4
|
+
import { stateValues as g } from "@proximus/lavender-radio-group";
|
|
5
|
+
//#region src/Common.ts
|
|
6
|
+
function _(e) {
|
|
7
7
|
e.hasAttribute("width") || e.setAttribute("width", "s"), e.setAttribute("border-radius", "pill");
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function v(e, t, n, r = []) {
|
|
10
10
|
n ? (e.setAttribute("inverted", ""), r.forEach((e) => e.setAttribute("inverted", "")), t.forEach((e) => {
|
|
11
11
|
e.hasAttribute("inverted") || e.setAttribute("inverted", "");
|
|
12
12
|
})) : (e.removeAttribute("inverted"), r.forEach((e) => e.removeAttribute("inverted")), t.forEach((e) => {
|
|
13
13
|
e.hasAttribute("inverted") && e.removeAttribute("inverted");
|
|
14
14
|
}));
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function y(e, t, n, r = [], i = {}) {
|
|
17
17
|
n ? (e.setAttribute("disabled", ""), r.forEach((e) => e.setAttribute("disabled", "")), t.forEach((e) => {
|
|
18
18
|
e.hasAttribute("disabled") || e.setAttribute("disabled", "");
|
|
19
19
|
}), i.ariaEl && i.setAria && i.ariaEl.setAttribute("aria-disabled", "true"), i.ariaEl && i.setTabIndex && (i.ariaEl.tabIndex = -1)) : (e.removeAttribute("disabled"), r.forEach((e) => e.removeAttribute("disabled")), t.forEach((e) => {
|
|
20
20
|
e.hasAttribute("disabled") && e.removeAttribute("disabled");
|
|
21
21
|
}), i.ariaEl && i.setAria && i.ariaEl.setAttribute("aria-disabled", "false"), i.ariaEl && i.setTabIndex && (i.ariaEl.tabIndex = 0));
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/tile.css?inline
|
|
25
|
+
var b = ":host{display:block}.tile,.tile *{box-sizing:border-box}.tile{height:100%;padding:var(--px-padding-s-mobile);text-align:left;font-family:var(--px-font-family);color:var(--px-color-text-neutral-default);border-radius:var(--px-radius-main);background:var(--tile-background-color-default,var(--px-color-background-container-light-default));flex-direction:column;display:flex}.tile ::slotted([slot=prefix]){font-size:var(--px-text-size-label-m-mobile);margin-bottom:var(--px-spacing-xs-mobile)}.tile ::slotted([slot=suffix]){margin-left:auto;margin-bottom:var(--px-spacing-xs-mobile)}.tile ::slotted([slot=label]){font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-title);line-height:var(--px-line-height-ratio-l)}.tile ::slotted([slot=description]){font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-ratio-l)}:host([visual=none]) .tile{flex-direction:row-reverse;align-items:flex-start}:host([visual=none]) .tile .tile__content{flex-grow:1}:host([hoverable]:hover:not([disabled])) .tile{background-color:var(--px-color-background-state-hover-bordered-default)}:host([hoverable][disabled]) .tile{color:var(--px-color-text-state-disabled-default)}:host([disabled]) .tile{background-color:var(--px-color-background-state-disabled-default)}@media screen and (width>=48rem){.tile{padding:var(--px-padding-s-tablet)}.tile ::slotted([slot=prefix]){font-size:var(--px-text-size-label-m-tablet);margin-bottom:var(--px-spacing-xs-tablet)}.tile ::slotted([slot=suffix]){margin-bottom:var(--px-spacing-xs-tablet)}.tile ::slotted([slot=label]),.tile ::slotted([slot=description]){font-size:var(--px-text-size-label-m-tablet)}}@media screen and (width>=64.0625rem){.tile{padding:var(--px-padding-s-laptop)}.tile ::slotted([slot=prefix]){font-size:var(--px-text-size-label-m-laptop);margin-bottom:var(--px-spacing-xs-laptop)}.tile ::slotted([slot=suffix]){margin-bottom:var(--px-spacing-xs-laptop)}.tile ::slotted([slot=label]),.tile ::slotted([slot=description]){font-size:var(--px-text-size-label-m-laptop)}}@media screen and (width>=90.0625rem){.tile{padding:var(--px-padding-s-desktop)}.tile ::slotted([slot=prefix]){font-size:var(--px-text-size-label-m-desktop);margin-bottom:var(--px-spacing-xs-desktop)}.tile ::slotted([slot=suffix]){margin-bottom:var(--px-spacing-xs-desktop)}.tile ::slotted([slot=label]),.tile ::slotted([slot=description]){font-size:var(--px-text-size-label-m-desktop)}}:host([inverted]) .tile{color:var(--px-color-text-neutral-inverted);background:var(--tile-background-color-inverted,var(--px-color-background-container-light-inverted))}:host([inverted]):host([hoverable]:hover:not([disabled])) .tile{background-color:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]):host([hoverable][disabled]) .tile{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]):host([disabled]) .tile{background-color:var(--px-color-background-state-disabled-inverted)}", x = new CSSStyleSheet();
|
|
26
|
+
x.replaceSync(b);
|
|
27
|
+
var S = [
|
|
27
28
|
"",
|
|
28
29
|
"default",
|
|
29
30
|
"container-light",
|
|
30
31
|
"container-default"
|
|
31
|
-
],
|
|
32
|
+
], C = class e extends t {
|
|
32
33
|
static {
|
|
33
34
|
this.template = a("<div class=\"tile\"><px-hstack gap=\"s\" align-items=\"center\" class=\"tile__header\"><slot name=\"prefix\"></slot><slot name=\"suffix\"></slot></px-hstack><px-vstack gap=\"none\" class=\"tile__content\"><slot name=\"label\"></slot><slot name=\"description\"></slot></px-vstack></div>");
|
|
34
35
|
}
|
|
35
36
|
static {
|
|
36
37
|
this.nativeName = "div";
|
|
37
38
|
}
|
|
39
|
+
static {
|
|
40
|
+
this.nativeAttributes = {};
|
|
41
|
+
}
|
|
38
42
|
constructor() {
|
|
39
|
-
super(
|
|
43
|
+
super(x), m(this.shadowRoot, e.template);
|
|
40
44
|
}
|
|
41
45
|
connectedCallback() {
|
|
42
46
|
if (super.connectedCallback(), this.$slotPrefix) {
|
|
43
47
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
44
|
-
e &&
|
|
48
|
+
e && _(e);
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
static get observedAttributes() {
|
|
@@ -63,10 +67,7 @@ var g = [
|
|
|
63
67
|
case "center-content":
|
|
64
68
|
this.updateCenterContent();
|
|
65
69
|
break;
|
|
66
|
-
case "background-color":
|
|
67
|
-
this.updateBackgroundColor(t, n, g);
|
|
68
|
-
break;
|
|
69
|
-
default: super.attributeChangedCallback(e, t, n);
|
|
70
|
+
case "background-color": this.updateBackgroundColor(t, n, S);
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
updateCenterPrefix() {
|
|
@@ -137,13 +138,14 @@ var g = [
|
|
|
137
138
|
this._updateAttribute("visual", e);
|
|
138
139
|
}
|
|
139
140
|
};
|
|
140
|
-
customElements.get("px-tile") || customElements.define("px-tile",
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
customElements.get("px-tile") || customElements.define("px-tile", C);
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/tile-button.css?inline
|
|
144
|
+
var w = ":host(:not([disabled])):host(:active){padding:0}:host(:not([disabled])):host(:active) .tile-button{border-width:var(--px-size-border-m);border-color:var(--px-color-border-state-active-default)}.tile-button{font-size:var(--px-text-size-body-m-mobile);background:0 0;padding:0}@media screen and (width>=48rem){.tile-button{font-size:var(--px-text-size-body-m-tablet)}}@media screen and (width>=64.0625rem){.tile-button{font-size:var(--px-text-size-body-m-laptop)}}@media screen and (width>=90.0625rem){.tile-button{font-size:var(--px-text-size-body-m-desktop)}}:host([inverted]):host(:not([disabled])):host(:active) .tile-button{border-color:var(--px-color-border-state-active-inverted)}", T = ":host{padding:calc(var(--px-size-border-m) - var(--px-size-border-s));outline:none;display:block}:is(:host .tile-link,:host .tile-button,:host .tile-checkbox,:host .tile-radio,:host .tile-switch),:is(:host .tile-link,:host .tile-button,:host .tile-checkbox,:host .tile-radio,:host .tile-switch) *{box-sizing:border-box}:host .tile-link,:host .tile-button,:host .tile-checkbox,:host .tile-radio,:host .tile-switch{border-radius:var(--px-radius-main);height:100%}:is(:host .tile-link,:host .tile-button,:host .tile-checkbox,:host .tile-radio,:host .tile-switch) px-tile{height:100%}:host .tile-link,:host .tile-button,:host .tile-checkbox,:host .tile-radio,:host .tile-switch{cursor:pointer;border:var(--px-size-border-s) solid transparent;outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile);border:var(--px-size-border-s) solid var(--px-color-border-main-default);width:100%;display:block}:host:host(:not([disabled])):host(:hover) .tile-link,:host:host(:not([disabled])):host(:hover) .tile-button,:host:host(:not([disabled])):host(:hover) .tile-checkbox,:host:host(:not([disabled])):host(:hover) .tile-radio,:host:host(:not([disabled])):host(:hover) .tile-switch{border-color:var(--px-color-border-state-hover-default)}:host:host(:not([disabled])):host(:focus-visible) .tile-checkbox,:host:host(:not([disabled])):host(:focus-visible) .tile-radio,:host:host(:not([disabled])):host(:focus-visible) .tile-switch{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}:is(:host:host(:not([disabled])) .tile-link,:host:host(:not([disabled])) .tile-button):focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}:host:host([checked]){padding:0}:host:host([checked]) .tile-checkbox,:host:host([checked]) .tile-radio,:host:host([checked]) .tile-switch{border-width:var(--px-size-border-m);border-color:var(--px-color-border-state-active-default)}:host:host([disabled]) .tile-link,:host:host([disabled]) .tile-button,:host:host([disabled]) .tile-checkbox,:host:host([disabled]) .tile-radio,:host:host([disabled]) .tile-switch{cursor:default;pointer-events:none}:host:host([disabled]) .tile-checkbox,:host:host([disabled]) .tile-radio,:host:host([disabled]) .tile-switch{border-color:#0000}:host:host([state=error]) .tile-checkbox,:host:host([state=error]) .tile-radio,:host:host([state=error]) .tile-switch{border-color:var(--px-color-border-purpose-error-default)}:host:host([state=error]):hover:not([disabled]) .tile-checkbox,:host:host([state=error]):hover:not([disabled]) .tile-radio,:host:host([state=error]):hover:not([disabled]) .tile-switch{border-color:var(--px-color-border-state-hover-default)}@media screen and (width>=48rem){:scope:host .tile-link,:scope:host .tile-button,:scope:host .tile-checkbox,:scope:host .tile-radio,:scope:host .tile-switch{outline-width:var(--px-focus-outline-tablet)}:scope:host:host(:not([disabled])):host(:focus-visible) .tile-checkbox,:scope:host:host(:not([disabled])):host(:focus-visible) .tile-radio,:scope:host:host(:not([disabled])):host(:focus-visible) .tile-switch{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}:is(:scope:host:host(:not([disabled])) .tile-link,:scope:host:host(:not([disabled])) .tile-button):focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media screen and (width>=64.0625rem){:scope:host .tile-link,:scope:host .tile-button,:scope:host .tile-checkbox,:scope:host .tile-radio,:scope:host .tile-switch{outline-width:var(--px-focus-outline-laptop)}:scope:host:host(:not([disabled])):host(:focus-visible) .tile-checkbox,:scope:host:host(:not([disabled])):host(:focus-visible) .tile-radio,:scope:host:host(:not([disabled])):host(:focus-visible) .tile-switch{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}:is(:scope:host:host(:not([disabled])) .tile-link,:scope:host:host(:not([disabled])) .tile-button):focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media screen and (width>=90.0625rem){:scope:host .tile-link,:scope:host .tile-button,:scope:host .tile-checkbox,:scope:host .tile-radio,:scope:host .tile-switch{outline-width:var(--px-focus-outline-desktop)}:scope:host:host(:not([disabled])):host(:focus-visible) .tile-checkbox,:scope:host:host(:not([disabled])):host(:focus-visible) .tile-radio,:scope:host:host(:not([disabled])):host(:focus-visible) .tile-switch{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}:is(:scope:host:host(:not([disabled])) .tile-link,:scope:host:host(:not([disabled])) .tile-button):focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}:host([inverted]) .tile-link,:host([inverted]) .tile-button,:host([inverted]) .tile-checkbox,:host([inverted]) .tile-radio,:host([inverted]) .tile-switch{outline-color:var(--px-color-border-focus-outline-inverted);border-color:var(--px-color-border-main-inverted)}:host([inverted]):host(:not([disabled])):host(:hover) .tile-link,:host([inverted]):host(:not([disabled])):host(:hover) .tile-button,:host([inverted]):host(:not([disabled])):host(:hover) .tile-checkbox,:host([inverted]):host(:not([disabled])):host(:hover) .tile-radio,:host([inverted]):host(:not([disabled])):host(:hover) .tile-switch{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]):host(:not([disabled])):host(:active) .tile-link,:host([inverted]):host(:not([disabled])):host(:active) .tile-button{border-color:var(--px-color-border-state-active-inverted)}:host([inverted]):host([checked]) .tile-checkbox,:host([inverted]):host([checked]) .tile-radio,:host([inverted]):host([checked]) .tile-switch{border-color:var(--px-color-border-state-active-inverted)}:host([inverted]):host([state=error]) .tile-checkbox,:host([inverted]):host([state=error]) .tile-radio,:host([inverted]):host([state=error]) .tile-switch{border-color:var(--px-color-border-purpose-error-inverted)}:host([inverted]):host([state=error]):host(:hover:not([disabled])) .tile-checkbox,:host([inverted]):host([state=error]):host(:hover:not([disabled])) .tile-radio,:host([inverted]):host([state=error]):host(:hover:not([disabled])) .tile-switch{border-color:var(--px-color-border-state-hover-inverted)}", E = new CSSStyleSheet();
|
|
145
|
+
E.replaceSync(w);
|
|
146
|
+
var D = new CSSStyleSheet();
|
|
147
|
+
D.replaceSync(T);
|
|
148
|
+
var O = class t extends e {
|
|
147
149
|
static {
|
|
148
150
|
this.template = a("<button class=\"tile-button\"><px-tile hoverable><slot name=\"prefix\" slot=\"prefix\"></slot><slot name=\"suffix\" slot=\"suffix\"></slot><slot name=\"label\" slot=\"label\"></slot><slot name=\"description\" slot=\"description\"></slot></px-tile></button>");
|
|
149
151
|
}
|
|
@@ -151,15 +153,24 @@ var S = class t extends e {
|
|
|
151
153
|
this.nativeName = "button";
|
|
152
154
|
}
|
|
153
155
|
static {
|
|
154
|
-
this.
|
|
156
|
+
this.nativeProperties = f;
|
|
157
|
+
}
|
|
158
|
+
static {
|
|
159
|
+
this.nativeMethods = d;
|
|
160
|
+
}
|
|
161
|
+
static {
|
|
162
|
+
this.nativeAttributes = {
|
|
163
|
+
...u,
|
|
164
|
+
disabled: []
|
|
165
|
+
};
|
|
155
166
|
}
|
|
156
167
|
constructor() {
|
|
157
|
-
super(
|
|
168
|
+
super(D, E), m(this.shadowRoot, t.template);
|
|
158
169
|
}
|
|
159
170
|
connectedCallback() {
|
|
160
171
|
if (this.$slotPrefix) {
|
|
161
172
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
162
|
-
e &&
|
|
173
|
+
e && _(e);
|
|
163
174
|
}
|
|
164
175
|
this.backgroundColor ||= "container-default";
|
|
165
176
|
}
|
|
@@ -185,10 +196,10 @@ var S = class t extends e {
|
|
|
185
196
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
186
197
|
break;
|
|
187
198
|
case "inverted":
|
|
188
|
-
|
|
199
|
+
v(this.$tile, this.$children, this.inverted);
|
|
189
200
|
break;
|
|
190
201
|
case "disabled":
|
|
191
|
-
|
|
202
|
+
super.attributeChangedCallback(e, t, n), y(this.$tile, this.$children, this.disabled, [], {
|
|
192
203
|
ariaEl: this.$el,
|
|
193
204
|
setAria: !0,
|
|
194
205
|
setTabIndex: !0
|
|
@@ -243,21 +254,22 @@ var S = class t extends e {
|
|
|
243
254
|
this._updateAttribute("visual", e);
|
|
244
255
|
}
|
|
245
256
|
};
|
|
246
|
-
customElements.get("px-tile-button") || customElements.define("px-tile-button",
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
257
|
+
customElements.get("px-tile-button") || customElements.define("px-tile-button", O);
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/TileCheckbox.ts
|
|
260
|
+
var k = new CSSStyleSheet();
|
|
261
|
+
k.replaceSync(T);
|
|
262
|
+
var A = class e extends n {
|
|
251
263
|
static {
|
|
252
264
|
this.template = a("<div class=\"tile-checkbox\"><px-tile hoverable><slot name=\"prefix\" slot=\"prefix\"></slot><px-checkbox slot=\"suffix\" inert></px-checkbox><slot name=\"label\" slot=\"label\"></slot><slot name=\"description\" slot=\"description\"></slot></px-tile></div>");
|
|
253
265
|
}
|
|
254
266
|
constructor() {
|
|
255
|
-
super(
|
|
267
|
+
super(k), m(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
|
|
256
268
|
}
|
|
257
269
|
connectedCallback() {
|
|
258
270
|
if (this.tabIndex = 0, this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`, this.$slotPrefix) {
|
|
259
271
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
260
|
-
e &&
|
|
272
|
+
e && _(e);
|
|
261
273
|
}
|
|
262
274
|
this.addEventListener("mouseover", () => {
|
|
263
275
|
this.$checkbox.setAttribute("hover", "");
|
|
@@ -288,7 +300,7 @@ var w = class e extends n {
|
|
|
288
300
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
289
301
|
break;
|
|
290
302
|
case "inverted":
|
|
291
|
-
|
|
303
|
+
v(this, this.$children, this.inverted, [this.$tile, this.$checkbox]);
|
|
292
304
|
break;
|
|
293
305
|
case "name":
|
|
294
306
|
case "value":
|
|
@@ -296,9 +308,9 @@ var w = class e extends n {
|
|
|
296
308
|
break;
|
|
297
309
|
case "state":
|
|
298
310
|
if (this.$checkbox) {
|
|
299
|
-
if (this.checkName(
|
|
311
|
+
if (this.checkName(h, n)) this.$checkbox.setAttribute("state", n);
|
|
300
312
|
else {
|
|
301
|
-
o(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${
|
|
313
|
+
o(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${h.join("\", \"")}".`);
|
|
302
314
|
return;
|
|
303
315
|
}
|
|
304
316
|
}
|
|
@@ -354,13 +366,13 @@ var w = class e extends n {
|
|
|
354
366
|
return this.getAttribute("background-color");
|
|
355
367
|
}
|
|
356
368
|
set backgroundColor(e) {
|
|
357
|
-
|
|
369
|
+
p(this, "background-color", e);
|
|
358
370
|
}
|
|
359
371
|
get visual() {
|
|
360
372
|
return this.getAttribute("visual");
|
|
361
373
|
}
|
|
362
374
|
set visual(e) {
|
|
363
|
-
|
|
375
|
+
p(this, "visual", e);
|
|
364
376
|
}
|
|
365
377
|
get inverted() {
|
|
366
378
|
return this.hasAttribute("inverted");
|
|
@@ -378,13 +390,13 @@ var w = class e extends n {
|
|
|
378
390
|
return this.getAttribute("name");
|
|
379
391
|
}
|
|
380
392
|
set name(e) {
|
|
381
|
-
|
|
393
|
+
p(this, "name", e);
|
|
382
394
|
}
|
|
383
395
|
get state() {
|
|
384
396
|
return this.getAttribute("state");
|
|
385
397
|
}
|
|
386
398
|
set state(e) {
|
|
387
|
-
|
|
399
|
+
p(this, "state", e);
|
|
388
400
|
}
|
|
389
401
|
get disabled() {
|
|
390
402
|
return this.hasAttribute("disabled");
|
|
@@ -396,24 +408,25 @@ var w = class e extends n {
|
|
|
396
408
|
return this.getAttribute("value");
|
|
397
409
|
}
|
|
398
410
|
set value(e) {
|
|
399
|
-
|
|
411
|
+
p(this, "value", e);
|
|
400
412
|
}
|
|
401
413
|
};
|
|
402
|
-
customElements.get("px-tile-checkbox") || customElements.define("px-tile-checkbox",
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
414
|
+
customElements.get("px-tile-checkbox") || customElements.define("px-tile-checkbox", A);
|
|
415
|
+
//#endregion
|
|
416
|
+
//#region src/TileRadio.ts
|
|
417
|
+
var j = new CSSStyleSheet();
|
|
418
|
+
j.replaceSync(T);
|
|
419
|
+
var M = class e extends n {
|
|
407
420
|
static {
|
|
408
421
|
this.template = a("<div class=\"tile-radio\"><px-tile hoverable><slot name=\"prefix\" slot=\"prefix\"></slot><px-radio slot=\"suffix\" inert></px-radio><slot name=\"label\" slot=\"label\"></slot><slot name=\"description\" slot=\"description\"></slot></px-tile></div>");
|
|
409
422
|
}
|
|
410
423
|
constructor() {
|
|
411
|
-
super(
|
|
424
|
+
super(j), m(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
|
|
412
425
|
}
|
|
413
426
|
connectedCallback() {
|
|
414
427
|
if (this.role = "radio", this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`, this.tabIndex = this.parentElement?.querySelector("px-tile-radio") === this ? 0 : -1, this.$slotPrefix) {
|
|
415
428
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
416
|
-
e &&
|
|
429
|
+
e && _(e);
|
|
417
430
|
}
|
|
418
431
|
this.addEventListener("mouseover", () => {
|
|
419
432
|
this.$radio.setAttribute("hover", "");
|
|
@@ -444,7 +457,7 @@ var E = class e extends n {
|
|
|
444
457
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
445
458
|
break;
|
|
446
459
|
case "inverted":
|
|
447
|
-
|
|
460
|
+
v(this, this.$children, this.inverted, [this.$tile, this.$radio]);
|
|
448
461
|
break;
|
|
449
462
|
case "name":
|
|
450
463
|
case "value":
|
|
@@ -452,9 +465,9 @@ var E = class e extends n {
|
|
|
452
465
|
break;
|
|
453
466
|
case "state":
|
|
454
467
|
if (this.$radio) {
|
|
455
|
-
if (this.checkName(
|
|
468
|
+
if (this.checkName(g, n)) this.$radio.setAttribute("state", n);
|
|
456
469
|
else {
|
|
457
|
-
o(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${
|
|
470
|
+
o(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${g.join("\", \"")}".`);
|
|
458
471
|
return;
|
|
459
472
|
}
|
|
460
473
|
}
|
|
@@ -510,13 +523,13 @@ var E = class e extends n {
|
|
|
510
523
|
return this.getAttribute("background-color");
|
|
511
524
|
}
|
|
512
525
|
set backgroundColor(e) {
|
|
513
|
-
|
|
526
|
+
p(this, "background-color", e);
|
|
514
527
|
}
|
|
515
528
|
get visual() {
|
|
516
529
|
return this.getAttribute("visual");
|
|
517
530
|
}
|
|
518
531
|
set visual(e) {
|
|
519
|
-
|
|
532
|
+
p(this, "visual", e);
|
|
520
533
|
}
|
|
521
534
|
get inverted() {
|
|
522
535
|
return this.hasAttribute("inverted");
|
|
@@ -534,13 +547,13 @@ var E = class e extends n {
|
|
|
534
547
|
return this.getAttribute("name");
|
|
535
548
|
}
|
|
536
549
|
set name(e) {
|
|
537
|
-
|
|
550
|
+
p(this, "name", e);
|
|
538
551
|
}
|
|
539
552
|
get state() {
|
|
540
553
|
return this.getAttribute("state") ?? "";
|
|
541
554
|
}
|
|
542
555
|
set state(e) {
|
|
543
|
-
|
|
556
|
+
p(this, "state", e);
|
|
544
557
|
}
|
|
545
558
|
get disabled() {
|
|
546
559
|
return this.hasAttribute("disabled");
|
|
@@ -552,29 +565,39 @@ var E = class e extends n {
|
|
|
552
565
|
return this.getAttribute("value");
|
|
553
566
|
}
|
|
554
567
|
set value(e) {
|
|
555
|
-
|
|
568
|
+
p(this, "value", e);
|
|
556
569
|
}
|
|
557
570
|
};
|
|
558
|
-
customElements.get("px-tile-radio") || customElements.define("px-tile-radio",
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
571
|
+
customElements.get("px-tile-radio") || customElements.define("px-tile-radio", M);
|
|
572
|
+
//#endregion
|
|
573
|
+
//#region src/tile-link.css?inline
|
|
574
|
+
var N = ":host(:not([disabled])):host(:active){padding:0}:host(:not([disabled])):host(:active) .tile-link{border-width:var(--px-size-border-m);border-color:var(--px-color-border-state-active-default)}.tile-link{text-decoration:none}.tile-link px-icon{color:var(--px-color-icon-brand-default)}.tile-link[aria-disabled=true] px-icon{color:var(--px-color-icon-state-disabled-default)}:host([inverted]):host(:not([disabled])):host(:active) .tile-link{border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .tile-link px-icon{color:var(--px-color-icon-brand-inverted)}:host([inverted]) .tile-link[aria-disabled=true] px-icon{color:var(--px-color-icon-state-disabled-inverted)}", P = new CSSStyleSheet();
|
|
575
|
+
P.replaceSync(N);
|
|
576
|
+
var F = new CSSStyleSheet();
|
|
577
|
+
F.replaceSync(T);
|
|
578
|
+
var I = class t extends e {
|
|
565
579
|
static {
|
|
566
580
|
this.template = a("<a class=\"tile-link\"><px-tile hoverable><slot name=\"prefix\" slot=\"prefix\"></slot><px-icon\n name=\"chevron_right\"\n slot=\"suffix\"\n from=\"lavender\"\n size=\"s\"\n color=\"inherit\"\n ></px-icon><slot name=\"label\" slot=\"label\"></slot><slot name=\"description\" slot=\"description\"></slot></px-tile></a>");
|
|
567
581
|
}
|
|
568
582
|
static {
|
|
569
583
|
this.nativeName = "a";
|
|
570
584
|
}
|
|
585
|
+
static {
|
|
586
|
+
this.nativeProperties = l;
|
|
587
|
+
}
|
|
588
|
+
static {
|
|
589
|
+
this.nativeMethods = c;
|
|
590
|
+
}
|
|
591
|
+
static {
|
|
592
|
+
this.nativeAttributes = s;
|
|
593
|
+
}
|
|
571
594
|
constructor() {
|
|
572
|
-
super(
|
|
595
|
+
super(F, P), m(this.shadowRoot, t.template);
|
|
573
596
|
}
|
|
574
597
|
connectedCallback() {
|
|
575
598
|
if (this.$slotPrefix) {
|
|
576
599
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
577
|
-
e &&
|
|
600
|
+
e && _(e);
|
|
578
601
|
}
|
|
579
602
|
this.backgroundColor ||= "container-default", this.hasAttribute("target") && this.getAttribute("target") === "_blank" && (this.$pxIcon.setAttribute("name", "target_blank"), this.$pxIcon.setAttribute("aria-label", this.targetBlankAriaLabel ? this.targetBlankAriaLabel : "Opens in a new tab"));
|
|
580
603
|
}
|
|
@@ -595,10 +618,10 @@ var A = class t extends e {
|
|
|
595
618
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
596
619
|
break;
|
|
597
620
|
case "inverted":
|
|
598
|
-
|
|
621
|
+
v(this.$tile, this.$children, this.inverted, [this.$pxIcon]);
|
|
599
622
|
break;
|
|
600
623
|
case "disabled":
|
|
601
|
-
|
|
624
|
+
y(this.$tile, this.$children, this.disabled, [], {
|
|
602
625
|
ariaEl: this.$el,
|
|
603
626
|
setAria: !0,
|
|
604
627
|
setTabIndex: !0
|
|
@@ -653,21 +676,22 @@ var A = class t extends e {
|
|
|
653
676
|
this._updateAttribute("target-blank-aria-label", e);
|
|
654
677
|
}
|
|
655
678
|
};
|
|
656
|
-
customElements.get("px-tile-link") || customElements.define("px-tile-link",
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
679
|
+
customElements.get("px-tile-link") || customElements.define("px-tile-link", I);
|
|
680
|
+
//#endregion
|
|
681
|
+
//#region src/TileSwitch.ts
|
|
682
|
+
var L = new CSSStyleSheet();
|
|
683
|
+
L.replaceSync(T);
|
|
684
|
+
var R = class e extends n {
|
|
661
685
|
static {
|
|
662
686
|
this.template = a("<div class=\"tile-switch\"><px-tile hoverable><slot name=\"prefix\" slot=\"prefix\"></slot><px-switch slot=\"suffix\" inert></px-switch><slot name=\"label\" slot=\"label\"></slot><slot name=\"description\" slot=\"description\"></slot></px-tile></div>");
|
|
663
687
|
}
|
|
664
688
|
constructor() {
|
|
665
|
-
super(
|
|
689
|
+
super(L), m(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
|
|
666
690
|
}
|
|
667
691
|
connectedCallback() {
|
|
668
692
|
if (this.tabIndex = 0, this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`, this.$slotPrefix) {
|
|
669
693
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
670
|
-
e &&
|
|
694
|
+
e && _(e);
|
|
671
695
|
}
|
|
672
696
|
this.addEventListener("mouseover", () => {
|
|
673
697
|
this.$switch.setAttribute("hover", "");
|
|
@@ -697,7 +721,7 @@ var M = class e extends n {
|
|
|
697
721
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
698
722
|
break;
|
|
699
723
|
case "inverted":
|
|
700
|
-
|
|
724
|
+
v(this, this.$children, this.inverted, [this.$tile, this.$switch]);
|
|
701
725
|
break;
|
|
702
726
|
case "name":
|
|
703
727
|
case "value":
|
|
@@ -754,13 +778,13 @@ var M = class e extends n {
|
|
|
754
778
|
return this.getAttribute("background-color");
|
|
755
779
|
}
|
|
756
780
|
set backgroundColor(e) {
|
|
757
|
-
|
|
781
|
+
p(this, "background-color", e);
|
|
758
782
|
}
|
|
759
783
|
get visual() {
|
|
760
784
|
return this.getAttribute("visual");
|
|
761
785
|
}
|
|
762
786
|
set visual(e) {
|
|
763
|
-
|
|
787
|
+
p(this, "visual", e);
|
|
764
788
|
}
|
|
765
789
|
get inverted() {
|
|
766
790
|
return this.hasAttribute("inverted");
|
|
@@ -778,7 +802,7 @@ var M = class e extends n {
|
|
|
778
802
|
return this.getAttribute("name");
|
|
779
803
|
}
|
|
780
804
|
set name(e) {
|
|
781
|
-
|
|
805
|
+
p(this, "name", e);
|
|
782
806
|
}
|
|
783
807
|
get disabled() {
|
|
784
808
|
return this.hasAttribute("disabled");
|
|
@@ -790,8 +814,9 @@ var M = class e extends n {
|
|
|
790
814
|
return this.getAttribute("value");
|
|
791
815
|
}
|
|
792
816
|
set value(e) {
|
|
793
|
-
|
|
817
|
+
p(this, "value", e);
|
|
794
818
|
}
|
|
795
819
|
};
|
|
796
|
-
customElements.get("px-tile-switch") || customElements.define("px-tile-switch",
|
|
797
|
-
|
|
820
|
+
customElements.get("px-tile-switch") || customElements.define("px-tile-switch", R);
|
|
821
|
+
//#endregion
|
|
822
|
+
export { C as Tile, O as TileButton, A as TileCheckbox, I as TileLink, M as TileRadio, R as TileSwitch, S as tileBackgroundColorValues };
|
|
@@ -23,8 +23,91 @@
|
|
|
23
23
|
{ "name": "center-content", "values": [] },
|
|
24
24
|
{ "name": "background-color", "values": [] },
|
|
25
25
|
{ "name": "inverted", "values": [] },
|
|
26
|
-
{
|
|
27
|
-
|
|
26
|
+
{
|
|
27
|
+
"name": "disabled",
|
|
28
|
+
"description": "Whether the native control is disabled.",
|
|
29
|
+
"values": []
|
|
30
|
+
},
|
|
31
|
+
{ "name": "visual", "values": [] },
|
|
32
|
+
{
|
|
33
|
+
"name": "name",
|
|
34
|
+
"description": "The native element name.",
|
|
35
|
+
"values": []
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "value",
|
|
39
|
+
"description": "The initial native value; use value for live state.",
|
|
40
|
+
"values": []
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "type",
|
|
44
|
+
"description": "The native element type.",
|
|
45
|
+
"values": [
|
|
46
|
+
{ "name": "submit" },
|
|
47
|
+
{ "name": "reset" },
|
|
48
|
+
{ "name": "button" }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "formaction",
|
|
53
|
+
"description": "The submission URL override.",
|
|
54
|
+
"values": []
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "formenctype",
|
|
58
|
+
"description": "The submission encoding override.",
|
|
59
|
+
"values": []
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "formmethod",
|
|
63
|
+
"description": "The submission method override.",
|
|
64
|
+
"values": []
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "formnovalidate",
|
|
68
|
+
"description": "Whether submission bypasses validation.",
|
|
69
|
+
"values": []
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "formtarget",
|
|
73
|
+
"description": "The submission target override.",
|
|
74
|
+
"values": []
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "autofocus",
|
|
78
|
+
"description": "Whether the native element requests autofocus.",
|
|
79
|
+
"values": []
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "title",
|
|
83
|
+
"description": "The native element tooltip.",
|
|
84
|
+
"values": []
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "popovertargetaction",
|
|
88
|
+
"description": "The action for the target popover.",
|
|
89
|
+
"values": []
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "command",
|
|
93
|
+
"description": "The command for the target element, where supported.",
|
|
94
|
+
"values": []
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "form",
|
|
98
|
+
"description": "The ID of the associated form; the form property is the native form reference.",
|
|
99
|
+
"values": []
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "popovertarget",
|
|
103
|
+
"description": "The ID of the target popover.",
|
|
104
|
+
"values": []
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "commandfor",
|
|
108
|
+
"description": "The ID of the command target.",
|
|
109
|
+
"values": []
|
|
110
|
+
}
|
|
28
111
|
],
|
|
29
112
|
"references": []
|
|
30
113
|
},
|
|
@@ -51,7 +134,72 @@
|
|
|
51
134
|
{ "name": "inverted", "values": [] },
|
|
52
135
|
{ "name": "disabled", "values": [] },
|
|
53
136
|
{ "name": "visual", "values": [] },
|
|
54
|
-
{ "name": "target-blank-aria-label", "values": [] }
|
|
137
|
+
{ "name": "target-blank-aria-label", "values": [] },
|
|
138
|
+
{
|
|
139
|
+
"name": "href",
|
|
140
|
+
"description": "The destination URL; relative URLs remain relative in attributes.",
|
|
141
|
+
"values": []
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "target",
|
|
145
|
+
"description": "Where to open the destination.",
|
|
146
|
+
"values": []
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "rel",
|
|
150
|
+
"description": "The relationship to the destination.",
|
|
151
|
+
"values": []
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "download",
|
|
155
|
+
"description": "The suggested download filename; an empty value is valid.",
|
|
156
|
+
"values": []
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "hreflang",
|
|
160
|
+
"description": "The language of the destination.",
|
|
161
|
+
"values": []
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "type",
|
|
165
|
+
"description": "The native element type.",
|
|
166
|
+
"values": []
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "ping",
|
|
170
|
+
"description": "Space-separated tracking URLs.",
|
|
171
|
+
"values": []
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "referrerpolicy",
|
|
175
|
+
"description": "The referrer policy.",
|
|
176
|
+
"values": []
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "title",
|
|
180
|
+
"description": "The native element tooltip.",
|
|
181
|
+
"values": []
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "charset",
|
|
185
|
+
"description": "The legacy character encoding hint.",
|
|
186
|
+
"values": []
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "coords",
|
|
190
|
+
"description": "The legacy image-map coordinates.",
|
|
191
|
+
"values": []
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "name",
|
|
195
|
+
"description": "The native element name.",
|
|
196
|
+
"values": []
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "rev",
|
|
200
|
+
"description": "The legacy reverse link relationship.",
|
|
201
|
+
"values": []
|
|
202
|
+
}
|
|
55
203
|
],
|
|
56
204
|
"references": []
|
|
57
205
|
},
|