@proximus/lavender-tile 2.0.0-alpha.228 → 2.0.0-alpha.229
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 +96 -78
- package/dist/vscode.html-custom-data.json +151 -3
- package/dist/web-types.json +212 -7
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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
|
|
3
|
+
import { checkboxStateValues as h } from "@proximus/lavender-checkbox";
|
|
4
|
+
import { stateValues as g } from "@proximus/lavender-radio-group";
|
|
5
5
|
//#region src/Common.ts
|
|
6
|
-
function
|
|
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) => {
|
|
@@ -22,27 +22,30 @@ function p(e, t, n, r = [], i = {}) {
|
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/tile.css?inline
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
var
|
|
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 = [
|
|
28
28
|
"",
|
|
29
29
|
"default",
|
|
30
30
|
"container-light",
|
|
31
31
|
"container-default"
|
|
32
|
-
],
|
|
32
|
+
], C = class e extends t {
|
|
33
33
|
static {
|
|
34
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>");
|
|
35
35
|
}
|
|
36
36
|
static {
|
|
37
37
|
this.nativeName = "div";
|
|
38
38
|
}
|
|
39
|
+
static {
|
|
40
|
+
this.nativeAttributes = {};
|
|
41
|
+
}
|
|
39
42
|
constructor() {
|
|
40
|
-
super(
|
|
43
|
+
super(x), m(this.shadowRoot, e.template);
|
|
41
44
|
}
|
|
42
45
|
connectedCallback() {
|
|
43
46
|
if (super.connectedCallback(), this.$slotPrefix) {
|
|
44
47
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
45
|
-
e &&
|
|
48
|
+
e && _(e);
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
static get observedAttributes() {
|
|
@@ -64,10 +67,7 @@ var g = [
|
|
|
64
67
|
case "center-content":
|
|
65
68
|
this.updateCenterContent();
|
|
66
69
|
break;
|
|
67
|
-
case "background-color":
|
|
68
|
-
this.updateBackgroundColor(t, n, g);
|
|
69
|
-
break;
|
|
70
|
-
default: super.attributeChangedCallback(e, t, n);
|
|
70
|
+
case "background-color": this.updateBackgroundColor(t, n, S);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
updateCenterPrefix() {
|
|
@@ -138,14 +138,14 @@ var g = [
|
|
|
138
138
|
this._updateAttribute("visual", e);
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
|
-
customElements.get("px-tile") || customElements.define("px-tile",
|
|
141
|
+
customElements.get("px-tile") || customElements.define("px-tile", C);
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region src/tile-button.css?inline
|
|
144
|
-
var
|
|
145
|
-
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
var
|
|
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-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)}}@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-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)}}@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 {
|
|
149
149
|
static {
|
|
150
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>");
|
|
151
151
|
}
|
|
@@ -153,15 +153,24 @@ var S = class t extends e {
|
|
|
153
153
|
this.nativeName = "button";
|
|
154
154
|
}
|
|
155
155
|
static {
|
|
156
|
-
this.
|
|
156
|
+
this.nativeProperties = f;
|
|
157
|
+
}
|
|
158
|
+
static {
|
|
159
|
+
this.nativeMethods = d;
|
|
160
|
+
}
|
|
161
|
+
static {
|
|
162
|
+
this.nativeAttributes = {
|
|
163
|
+
...u,
|
|
164
|
+
disabled: []
|
|
165
|
+
};
|
|
157
166
|
}
|
|
158
167
|
constructor() {
|
|
159
|
-
super(
|
|
168
|
+
super(D, E), m(this.shadowRoot, t.template);
|
|
160
169
|
}
|
|
161
170
|
connectedCallback() {
|
|
162
171
|
if (this.$slotPrefix) {
|
|
163
172
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
164
|
-
e &&
|
|
173
|
+
e && _(e);
|
|
165
174
|
}
|
|
166
175
|
this.backgroundColor ||= "container-default";
|
|
167
176
|
}
|
|
@@ -187,10 +196,10 @@ var S = class t extends e {
|
|
|
187
196
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
188
197
|
break;
|
|
189
198
|
case "inverted":
|
|
190
|
-
|
|
199
|
+
v(this.$tile, this.$children, this.inverted);
|
|
191
200
|
break;
|
|
192
201
|
case "disabled":
|
|
193
|
-
|
|
202
|
+
super.attributeChangedCallback(e, t, n), y(this.$tile, this.$children, this.disabled, [], {
|
|
194
203
|
ariaEl: this.$el,
|
|
195
204
|
setAria: !0,
|
|
196
205
|
setTabIndex: !0
|
|
@@ -245,22 +254,22 @@ var S = class t extends e {
|
|
|
245
254
|
this._updateAttribute("visual", e);
|
|
246
255
|
}
|
|
247
256
|
};
|
|
248
|
-
customElements.get("px-tile-button") || customElements.define("px-tile-button",
|
|
257
|
+
customElements.get("px-tile-button") || customElements.define("px-tile-button", O);
|
|
249
258
|
//#endregion
|
|
250
259
|
//#region src/TileCheckbox.ts
|
|
251
|
-
var
|
|
252
|
-
|
|
253
|
-
var
|
|
260
|
+
var k = new CSSStyleSheet();
|
|
261
|
+
k.replaceSync(T);
|
|
262
|
+
var A = class e extends n {
|
|
254
263
|
static {
|
|
255
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>");
|
|
256
265
|
}
|
|
257
266
|
constructor() {
|
|
258
|
-
super(
|
|
267
|
+
super(k), m(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
|
|
259
268
|
}
|
|
260
269
|
connectedCallback() {
|
|
261
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) {
|
|
262
271
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
263
|
-
e &&
|
|
272
|
+
e && _(e);
|
|
264
273
|
}
|
|
265
274
|
this.addEventListener("mouseover", () => {
|
|
266
275
|
this.$checkbox.setAttribute("hover", "");
|
|
@@ -291,7 +300,7 @@ var w = class e extends n {
|
|
|
291
300
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
292
301
|
break;
|
|
293
302
|
case "inverted":
|
|
294
|
-
|
|
303
|
+
v(this, this.$children, this.inverted, [this.$tile, this.$checkbox]);
|
|
295
304
|
break;
|
|
296
305
|
case "name":
|
|
297
306
|
case "value":
|
|
@@ -299,9 +308,9 @@ var w = class e extends n {
|
|
|
299
308
|
break;
|
|
300
309
|
case "state":
|
|
301
310
|
if (this.$checkbox) {
|
|
302
|
-
if (this.checkName(
|
|
311
|
+
if (this.checkName(h, n)) this.$checkbox.setAttribute("state", n);
|
|
303
312
|
else {
|
|
304
|
-
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("\", \"")}".`);
|
|
305
314
|
return;
|
|
306
315
|
}
|
|
307
316
|
}
|
|
@@ -357,13 +366,13 @@ var w = class e extends n {
|
|
|
357
366
|
return this.getAttribute("background-color");
|
|
358
367
|
}
|
|
359
368
|
set backgroundColor(e) {
|
|
360
|
-
|
|
369
|
+
p(this, "background-color", e);
|
|
361
370
|
}
|
|
362
371
|
get visual() {
|
|
363
372
|
return this.getAttribute("visual");
|
|
364
373
|
}
|
|
365
374
|
set visual(e) {
|
|
366
|
-
|
|
375
|
+
p(this, "visual", e);
|
|
367
376
|
}
|
|
368
377
|
get inverted() {
|
|
369
378
|
return this.hasAttribute("inverted");
|
|
@@ -381,13 +390,13 @@ var w = class e extends n {
|
|
|
381
390
|
return this.getAttribute("name");
|
|
382
391
|
}
|
|
383
392
|
set name(e) {
|
|
384
|
-
|
|
393
|
+
p(this, "name", e);
|
|
385
394
|
}
|
|
386
395
|
get state() {
|
|
387
396
|
return this.getAttribute("state");
|
|
388
397
|
}
|
|
389
398
|
set state(e) {
|
|
390
|
-
|
|
399
|
+
p(this, "state", e);
|
|
391
400
|
}
|
|
392
401
|
get disabled() {
|
|
393
402
|
return this.hasAttribute("disabled");
|
|
@@ -399,25 +408,25 @@ var w = class e extends n {
|
|
|
399
408
|
return this.getAttribute("value");
|
|
400
409
|
}
|
|
401
410
|
set value(e) {
|
|
402
|
-
|
|
411
|
+
p(this, "value", e);
|
|
403
412
|
}
|
|
404
413
|
};
|
|
405
|
-
customElements.get("px-tile-checkbox") || customElements.define("px-tile-checkbox",
|
|
414
|
+
customElements.get("px-tile-checkbox") || customElements.define("px-tile-checkbox", A);
|
|
406
415
|
//#endregion
|
|
407
416
|
//#region src/TileRadio.ts
|
|
408
|
-
var
|
|
409
|
-
|
|
410
|
-
var
|
|
417
|
+
var j = new CSSStyleSheet();
|
|
418
|
+
j.replaceSync(T);
|
|
419
|
+
var M = class e extends n {
|
|
411
420
|
static {
|
|
412
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>");
|
|
413
422
|
}
|
|
414
423
|
constructor() {
|
|
415
|
-
super(
|
|
424
|
+
super(j), m(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
|
|
416
425
|
}
|
|
417
426
|
connectedCallback() {
|
|
418
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) {
|
|
419
428
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
420
|
-
e &&
|
|
429
|
+
e && _(e);
|
|
421
430
|
}
|
|
422
431
|
this.addEventListener("mouseover", () => {
|
|
423
432
|
this.$radio.setAttribute("hover", "");
|
|
@@ -448,7 +457,7 @@ var E = class e extends n {
|
|
|
448
457
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
449
458
|
break;
|
|
450
459
|
case "inverted":
|
|
451
|
-
|
|
460
|
+
v(this, this.$children, this.inverted, [this.$tile, this.$radio]);
|
|
452
461
|
break;
|
|
453
462
|
case "name":
|
|
454
463
|
case "value":
|
|
@@ -456,9 +465,9 @@ var E = class e extends n {
|
|
|
456
465
|
break;
|
|
457
466
|
case "state":
|
|
458
467
|
if (this.$radio) {
|
|
459
|
-
if (this.checkName(
|
|
468
|
+
if (this.checkName(g, n)) this.$radio.setAttribute("state", n);
|
|
460
469
|
else {
|
|
461
|
-
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("\", \"")}".`);
|
|
462
471
|
return;
|
|
463
472
|
}
|
|
464
473
|
}
|
|
@@ -514,13 +523,13 @@ var E = class e extends n {
|
|
|
514
523
|
return this.getAttribute("background-color");
|
|
515
524
|
}
|
|
516
525
|
set backgroundColor(e) {
|
|
517
|
-
|
|
526
|
+
p(this, "background-color", e);
|
|
518
527
|
}
|
|
519
528
|
get visual() {
|
|
520
529
|
return this.getAttribute("visual");
|
|
521
530
|
}
|
|
522
531
|
set visual(e) {
|
|
523
|
-
|
|
532
|
+
p(this, "visual", e);
|
|
524
533
|
}
|
|
525
534
|
get inverted() {
|
|
526
535
|
return this.hasAttribute("inverted");
|
|
@@ -538,13 +547,13 @@ var E = class e extends n {
|
|
|
538
547
|
return this.getAttribute("name");
|
|
539
548
|
}
|
|
540
549
|
set name(e) {
|
|
541
|
-
|
|
550
|
+
p(this, "name", e);
|
|
542
551
|
}
|
|
543
552
|
get state() {
|
|
544
553
|
return this.getAttribute("state") ?? "";
|
|
545
554
|
}
|
|
546
555
|
set state(e) {
|
|
547
|
-
|
|
556
|
+
p(this, "state", e);
|
|
548
557
|
}
|
|
549
558
|
get disabled() {
|
|
550
559
|
return this.hasAttribute("disabled");
|
|
@@ -556,30 +565,39 @@ var E = class e extends n {
|
|
|
556
565
|
return this.getAttribute("value");
|
|
557
566
|
}
|
|
558
567
|
set value(e) {
|
|
559
|
-
|
|
568
|
+
p(this, "value", e);
|
|
560
569
|
}
|
|
561
570
|
};
|
|
562
|
-
customElements.get("px-tile-radio") || customElements.define("px-tile-radio",
|
|
571
|
+
customElements.get("px-tile-radio") || customElements.define("px-tile-radio", M);
|
|
563
572
|
//#endregion
|
|
564
573
|
//#region src/tile-link.css?inline
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
var
|
|
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 {
|
|
570
579
|
static {
|
|
571
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>");
|
|
572
581
|
}
|
|
573
582
|
static {
|
|
574
583
|
this.nativeName = "a";
|
|
575
584
|
}
|
|
585
|
+
static {
|
|
586
|
+
this.nativeProperties = l;
|
|
587
|
+
}
|
|
588
|
+
static {
|
|
589
|
+
this.nativeMethods = c;
|
|
590
|
+
}
|
|
591
|
+
static {
|
|
592
|
+
this.nativeAttributes = s;
|
|
593
|
+
}
|
|
576
594
|
constructor() {
|
|
577
|
-
super(
|
|
595
|
+
super(F, P), m(this.shadowRoot, t.template);
|
|
578
596
|
}
|
|
579
597
|
connectedCallback() {
|
|
580
598
|
if (this.$slotPrefix) {
|
|
581
599
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
582
|
-
e &&
|
|
600
|
+
e && _(e);
|
|
583
601
|
}
|
|
584
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"));
|
|
585
603
|
}
|
|
@@ -600,10 +618,10 @@ var A = class t extends e {
|
|
|
600
618
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
601
619
|
break;
|
|
602
620
|
case "inverted":
|
|
603
|
-
|
|
621
|
+
v(this.$tile, this.$children, this.inverted, [this.$pxIcon]);
|
|
604
622
|
break;
|
|
605
623
|
case "disabled":
|
|
606
|
-
|
|
624
|
+
y(this.$tile, this.$children, this.disabled, [], {
|
|
607
625
|
ariaEl: this.$el,
|
|
608
626
|
setAria: !0,
|
|
609
627
|
setTabIndex: !0
|
|
@@ -658,22 +676,22 @@ var A = class t extends e {
|
|
|
658
676
|
this._updateAttribute("target-blank-aria-label", e);
|
|
659
677
|
}
|
|
660
678
|
};
|
|
661
|
-
customElements.get("px-tile-link") || customElements.define("px-tile-link",
|
|
679
|
+
customElements.get("px-tile-link") || customElements.define("px-tile-link", I);
|
|
662
680
|
//#endregion
|
|
663
681
|
//#region src/TileSwitch.ts
|
|
664
|
-
var
|
|
665
|
-
|
|
666
|
-
var
|
|
682
|
+
var L = new CSSStyleSheet();
|
|
683
|
+
L.replaceSync(T);
|
|
684
|
+
var R = class e extends n {
|
|
667
685
|
static {
|
|
668
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>");
|
|
669
687
|
}
|
|
670
688
|
constructor() {
|
|
671
|
-
super(
|
|
689
|
+
super(L), m(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
|
|
672
690
|
}
|
|
673
691
|
connectedCallback() {
|
|
674
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) {
|
|
675
693
|
let e = this.querySelector("px-img[slot=\"prefix\"]");
|
|
676
|
-
e &&
|
|
694
|
+
e && _(e);
|
|
677
695
|
}
|
|
678
696
|
this.addEventListener("mouseover", () => {
|
|
679
697
|
this.$switch.setAttribute("hover", "");
|
|
@@ -703,7 +721,7 @@ var M = class e extends n {
|
|
|
703
721
|
this.$tile.setAttribute(e, this.getAttribute(e) || "");
|
|
704
722
|
break;
|
|
705
723
|
case "inverted":
|
|
706
|
-
|
|
724
|
+
v(this, this.$children, this.inverted, [this.$tile, this.$switch]);
|
|
707
725
|
break;
|
|
708
726
|
case "name":
|
|
709
727
|
case "value":
|
|
@@ -760,13 +778,13 @@ var M = class e extends n {
|
|
|
760
778
|
return this.getAttribute("background-color");
|
|
761
779
|
}
|
|
762
780
|
set backgroundColor(e) {
|
|
763
|
-
|
|
781
|
+
p(this, "background-color", e);
|
|
764
782
|
}
|
|
765
783
|
get visual() {
|
|
766
784
|
return this.getAttribute("visual");
|
|
767
785
|
}
|
|
768
786
|
set visual(e) {
|
|
769
|
-
|
|
787
|
+
p(this, "visual", e);
|
|
770
788
|
}
|
|
771
789
|
get inverted() {
|
|
772
790
|
return this.hasAttribute("inverted");
|
|
@@ -784,7 +802,7 @@ var M = class e extends n {
|
|
|
784
802
|
return this.getAttribute("name");
|
|
785
803
|
}
|
|
786
804
|
set name(e) {
|
|
787
|
-
|
|
805
|
+
p(this, "name", e);
|
|
788
806
|
}
|
|
789
807
|
get disabled() {
|
|
790
808
|
return this.hasAttribute("disabled");
|
|
@@ -796,9 +814,9 @@ var M = class e extends n {
|
|
|
796
814
|
return this.getAttribute("value");
|
|
797
815
|
}
|
|
798
816
|
set value(e) {
|
|
799
|
-
|
|
817
|
+
p(this, "value", e);
|
|
800
818
|
}
|
|
801
819
|
};
|
|
802
|
-
customElements.get("px-tile-switch") || customElements.define("px-tile-switch",
|
|
820
|
+
customElements.get("px-tile-switch") || customElements.define("px-tile-switch", R);
|
|
803
821
|
//#endregion
|
|
804
|
-
export {
|
|
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
|
},
|