@proximus/lavender-cell 1.4.9-beta.2 → 1.4.9
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/index.es.js +67 -69
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { checkName as p, log as l, PxElement as m, WithExtraAttributes as A } from "@proximus/lavender-common";
|
|
2
2
|
import "@proximus/lavender-layout";
|
|
3
|
-
import { checkboxStateValues as
|
|
4
|
-
import { stateValues as
|
|
5
|
-
const
|
|
3
|
+
import { checkboxStateValues as q } from "@proximus/lavender-checkbox";
|
|
4
|
+
import { stateValues as M } from "@proximus/lavender-radio-group";
|
|
5
|
+
const R = ["", "default", "naked", "contained"], z = [
|
|
6
6
|
"",
|
|
7
7
|
"container-light",
|
|
8
8
|
"container-default"
|
|
@@ -13,11 +13,9 @@ function c(r) {
|
|
|
13
13
|
function d(r) {
|
|
14
14
|
r.getAttribute("variant") === "contained" && !r.getAttribute("background-color") && r.setAttribute("background-color", "container-light");
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
if (!p(
|
|
18
|
-
l(
|
|
19
|
-
`"${e}" is not a valid variant value for a cell. Allowed values are: "${C.join('", "')}".`
|
|
20
|
-
);
|
|
16
|
+
function P(r, t, e) {
|
|
17
|
+
if (!p(R, e)) {
|
|
18
|
+
l(`${e} is not an allowed variant value.`);
|
|
21
19
|
return;
|
|
22
20
|
}
|
|
23
21
|
t !== null && t !== "" && t !== "default" && r.classList.toggle(t), e !== null && e !== "" && e !== "default" && r.classList.toggle(e);
|
|
@@ -29,10 +27,10 @@ function u(r, t, e, s = []) {
|
|
|
29
27
|
i.hasAttribute("inverted") && i.removeAttribute("inverted");
|
|
30
28
|
}));
|
|
31
29
|
}
|
|
32
|
-
function
|
|
30
|
+
function B(r, t, e, s, i) {
|
|
33
31
|
if (!p(i, s)) {
|
|
34
32
|
l(
|
|
35
|
-
|
|
33
|
+
`${s} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
36
34
|
);
|
|
37
35
|
return;
|
|
38
36
|
}
|
|
@@ -47,17 +45,17 @@ function j(r, t, e, s, i) {
|
|
|
47
45
|
};
|
|
48
46
|
a(e), a(s);
|
|
49
47
|
}
|
|
50
|
-
function
|
|
48
|
+
function $(r, t, e, s = [], i = {}) {
|
|
51
49
|
e ? (r.setAttribute("disabled", ""), s.forEach((a) => a.setAttribute("disabled", "")), t.forEach((a) => {
|
|
52
50
|
a.hasAttribute("disabled") || a.setAttribute("disabled", "");
|
|
53
51
|
}), i.ariaEl && i.setAria && i.ariaEl.setAttribute("aria-disabled", "true"), i.ariaEl && i.setTabIndex && (i.ariaEl.tabIndex = -1)) : (r.removeAttribute("disabled"), s.forEach((a) => a.removeAttribute("disabled")), t.forEach((a) => {
|
|
54
52
|
a.hasAttribute("disabled") && a.removeAttribute("disabled");
|
|
55
53
|
}), i.ariaEl && i.setAria && i.ariaEl.setAttribute("aria-disabled", "false"), i.ariaEl && i.setTabIndex && (i.ariaEl.tabIndex = 0));
|
|
56
54
|
}
|
|
57
|
-
const n = ":host{display:block;outline:none}:host .cell,:host .cell-link,:host .cell-button,:host .cell-checkbox,:host .cell-radio,:host .cell-switch{display:block;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition)}:host .cell,:host .cell *,:host .cell-link,:host .cell-link *,:host .cell-button,:host .cell-button *,:host .cell-checkbox,:host .cell-checkbox *,:host .cell-radio,:host .cell-radio *,:host .cell-switch,:host .cell-switch *{box-sizing:border-box}:host .cell-link,:host .cell-button,:host .cell-checkbox,:host .cell-radio,:host .cell-switch{width:100%;outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile)}:host .cell-link,:host .cell-button{cursor:pointer}:host .cell-checkbox,:host .cell-radio,:host .cell-switch{cursor:default}:host:host(:not([disabled])):host(:focus-visible) .cell-checkbox,:host:host(:not([disabled])):host(:focus-visible) .cell-radio,:host:host(:not([disabled])):host(:focus-visible) .cell-switch{outline-offset:var(--px-focus-offset-mobile);outline-style:solid;position:relative}:host:host(:not([disabled])) .cell-link:focus-visible,:host:host(:not([disabled])) .cell-button:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid;position:relative}:host:host([disabled]) .cell-link,:host:host([disabled]) .cell-button,:host:host([disabled]) .cell-checkbox,:host:host([disabled]) .cell-radio,:host:host([disabled]) .cell-switch{cursor:default;pointer-events:none}@media screen and (min-width:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
55
|
+
const n = ":host{display:block;outline:none}:host .cell,:host .cell-link,:host .cell-button,:host .cell-checkbox,:host .cell-radio,:host .cell-switch{display:block;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition)}:host .cell,:host .cell *,:host .cell-link,:host .cell-link *,:host .cell-button,:host .cell-button *,:host .cell-checkbox,:host .cell-checkbox *,:host .cell-radio,:host .cell-radio *,:host .cell-switch,:host .cell-switch *{box-sizing:border-box}:host .cell-link,:host .cell-button,:host .cell-checkbox,:host .cell-radio,:host .cell-switch{width:100%;outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile)}:host .cell-link,:host .cell-button{cursor:pointer}:host .cell-checkbox,:host .cell-radio,:host .cell-switch{cursor:default}:host:host(:not([disabled])):host(:focus-visible) .cell-checkbox,:host:host(:not([disabled])):host(:focus-visible) .cell-radio,:host:host(:not([disabled])):host(:focus-visible) .cell-switch{outline-offset:var(--px-focus-offset-mobile);outline-style:solid;position:relative}:host:host(:not([disabled])) .cell-link:focus-visible,:host:host(:not([disabled])) .cell-button:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid;position:relative}:host:host([disabled]) .cell-link,:host:host([disabled]) .cell-button,:host:host([disabled]) .cell-checkbox,:host:host([disabled]) .cell-radio,:host:host([disabled]) .cell-switch{cursor:default;pointer-events:none}@media only screen and (min-width: 768px){:scope:host .cell-link,:scope:host .cell-button,:scope:host .cell-checkbox,:scope:host .cell-radio,:scope:host .cell-switch{outline-width:var(--px-focus-outline-tablet)}:scope:host:host(:not([disabled])):host(:focus-visible) .cell-checkbox,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-radio,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-switch{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}:scope:host:host(:not([disabled])) .cell-link:focus-visible,:scope:host:host(:not([disabled])) .cell-button:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media only screen and (min-width: 1025px){:scope:host .cell-link,:scope:host .cell-button,:scope:host .cell-checkbox,:scope:host .cell-radio,:scope:host .cell-switch{outline-width:var(--px-focus-outline-desktop)}:scope:host:host(:not([disabled])):host(:focus-visible) .cell-checkbox,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-radio,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-switch{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}:scope:host:host(:not([disabled])) .cell-link:focus-visible,:scope:host:host(:not([disabled])) .cell-button:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}:host([inverted]) .cell-link,:host([inverted]) .cell-button,:host([inverted]) .cell-checkbox,:host([inverted]) .cell-radio,:host([inverted]) .cell-switch{outline-color:var(--px-color-border-focus-outline-inverted)}", H = ':host([separator]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.cell{color:var(--px-color-text-neutral-default);padding:var(--px-spacing-s-mobile);font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-mobile);font-weight:var(--px-font-weight-title)}.cell ::slotted([slot="description"]){font-weight:var(--px-font-weight-body);font-size:var(--px-text-size-label-m-mobile)}.cell ::slotted([slot="suffix"]){text-align:right;font-weight:var(--px-font-weight-title)}.cell[compact]{padding-block:var(--px-spacing-xs-mobile)}:host([hoverable]:not([disabled])) .cell{cursor:pointer;text-decoration:none}:host([hoverable]:hover:not([disabled])) .cell{background-color:var(--px-color-background-state-hover-default)}:host([hoverable][disabled]) .cell{cursor:default;pointer-events:none;color:var(--px-color-text-state-disabled-default)}.contained{background-color:var( --cell-contained-background-color-default, var(--px-color-background-container-light-default) )}:host([hoverable]) .contained{border:var(--px-size-border-m) solid transparent}:host([hoverable]:hover:not([disabled])) .contained{background-color:var(--px-color-background-state-hover-bordered-default);border-color:var(--px-color-border-state-hover-default)}:host([hoverable][disabled]) .contained{background-color:var(--px-color-background-state-disabled-default)}@media only screen and (max-width: 47.9375em){:host([separator--mobile]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.contained{border-radius:var( --cell-contained-border-radius-top-left--mobile, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--mobile, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--mobile, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--mobile, var(--px-radius-main) )}}@media only screen and (min-width: 48em){:host{display:block}.cell{padding:var(--px-padding-s-tablet)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-tablet)}.cell ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-tablet)}.cell[compact]{padding-block:var(--px-spacing-xs-tablet)}}@media only screen and (min-width: 48em) and (max-width: 64em){:host([separator--tablet]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.contained{border-radius:var( --cell-contained-border-radius-top-left--tablet, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--tablet, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--tablet, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--tablet, var(--px-radius-main) )}}@media only screen and (min-width: 64.0625em){:host{display:block}.cell{padding:var(--px-spacing-s-laptop)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-laptop)}.cell ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-laptop)}.cell[compact]{padding-block:var(--px-spacing-xs-laptop)}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){:host([separator--laptop]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.contained{border-radius:var( --cell-contained-border-radius-top-left--laptop, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--laptop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--laptop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--laptop, var(--px-radius-main) )}}@media only screen and (min-width: 90.0625em){:host{display:block}:host([separator--desktop]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.cell{padding:var(--px-spacing-s-desktop)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-desktop)}.cell ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-desktop)}.cell[compact]{padding-block:var(--px-spacing-xs-desktop)}.contained{border-radius:var( --cell-contained-border-radius-top-left--desktop, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--desktop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--desktop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--desktop, var(--px-radius-main) )}}:host([inverted]):after{border-bottom-color:var(--px-color-border-main-inverted)}:host([inverted]) .cell{color:var(--px-color-text-neutral-inverted)}:host([inverted]):host([hoverable]:hover:not([disabled])) .cell{background-color:var(--px-color-background-state-hover-inverted)}:host([inverted]):host([hoverable][disabled]) .cell{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]):host([hoverable][disabled]) .contained{background-color:var(--px-color-background-state-disabled-inverted)}:host([inverted]) .contained{background-color:var( --cell-contained-background-color-inverted, var(--px-color-background-container-light-inverted) )}:host([inverted]):host([hoverable]:hover:not([disabled])) .contained{background-color:var( --px-color-background-state-hover-bordered-inverted );border-color:var(--px-color-border-state-hover-inverted)}', S = new CSSStyleSheet(), C = new CSSStyleSheet();
|
|
56
|
+
S.replaceSync(n);
|
|
57
|
+
C.replaceSync(H);
|
|
58
|
+
const F = ["secondary"], _ = ["", "default", "top", "bottom", "none"], x = class x extends m {
|
|
61
59
|
template() {
|
|
62
60
|
return `
|
|
63
61
|
<px-hstack gap="s" justify-content="space-between" align-items="center">
|
|
@@ -79,7 +77,7 @@ const _ = ["secondary"], O = ["", "default", "top", "bottom", "none"], x = class
|
|
|
79
77
|
`;
|
|
80
78
|
}
|
|
81
79
|
constructor() {
|
|
82
|
-
super(
|
|
80
|
+
super(C, S);
|
|
83
81
|
const t = document.createElement("div");
|
|
84
82
|
t.classList.add("cell"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
85
83
|
}
|
|
@@ -122,7 +120,7 @@ const _ = ["secondary"], O = ["", "default", "top", "bottom", "none"], x = class
|
|
|
122
120
|
if (e !== s)
|
|
123
121
|
switch (t) {
|
|
124
122
|
case "variant":
|
|
125
|
-
|
|
123
|
+
P(this.$el, e, s);
|
|
126
124
|
break;
|
|
127
125
|
case "inverted":
|
|
128
126
|
for (let i = 0; i < this.$children.length; i++)
|
|
@@ -133,15 +131,15 @@ const _ = ["secondary"], O = ["", "default", "top", "bottom", "none"], x = class
|
|
|
133
131
|
case "radius--tablet":
|
|
134
132
|
case "radius--laptop":
|
|
135
133
|
case "radius--desktop":
|
|
136
|
-
this.updateRadius(t, e, s,
|
|
134
|
+
this.updateRadius(t, e, s, _);
|
|
137
135
|
break;
|
|
138
136
|
case "background-color":
|
|
139
|
-
|
|
137
|
+
B(
|
|
140
138
|
this.$el,
|
|
141
139
|
t,
|
|
142
140
|
e,
|
|
143
141
|
s,
|
|
144
|
-
|
|
142
|
+
z
|
|
145
143
|
);
|
|
146
144
|
break;
|
|
147
145
|
default:
|
|
@@ -151,14 +149,14 @@ const _ = ["secondary"], O = ["", "default", "top", "bottom", "none"], x = class
|
|
|
151
149
|
}
|
|
152
150
|
configureSlotSuffixButtonIcon(t) {
|
|
153
151
|
t.hasAttribute("variant") && p(
|
|
154
|
-
|
|
152
|
+
F,
|
|
155
153
|
t.getAttribute("variant")
|
|
156
154
|
) || t.setAttribute("variant", "secondary");
|
|
157
155
|
}
|
|
158
156
|
updateRadius(t, e, s, i) {
|
|
159
157
|
if (!p(i, s)) {
|
|
160
158
|
l(
|
|
161
|
-
|
|
159
|
+
`${s} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
162
160
|
);
|
|
163
161
|
return;
|
|
164
162
|
}
|
|
@@ -286,12 +284,12 @@ const _ = ["secondary"], O = ["", "default", "top", "bottom", "none"], x = class
|
|
|
286
284
|
}
|
|
287
285
|
};
|
|
288
286
|
x.nativeName = "div";
|
|
289
|
-
let
|
|
290
|
-
customElements.get("px-cell") || customElements.define("px-cell",
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
const
|
|
294
|
-
|
|
287
|
+
let g = x;
|
|
288
|
+
customElements.get("px-cell") || customElements.define("px-cell", g);
|
|
289
|
+
const O = '.cell-link{text-decoration:none}.cell-link[noicon=""] px-icon{display:none}.cell-link px-icon{color:var(--px-color-icon-brand-default)}.cell-link[aria-disabled=true] px-icon{color:var(--px-color-icon-state-disabled-default)}[compact] .cell-link{padding-block:var(--px-spacing-xs-mobile)}:host([inverted]) .cell-link px-icon{color:var(--px-color-icon-brand-inverted)}:host([inverted]) .cell-link[aria-disabled=true] px-icon{color:var(--px-color-icon-state-disabled-inverted)}', y = new CSSStyleSheet();
|
|
290
|
+
y.replaceSync(n);
|
|
291
|
+
const w = new CSSStyleSheet();
|
|
292
|
+
w.replaceSync(O);
|
|
295
293
|
const f = class f extends m {
|
|
296
294
|
template() {
|
|
297
295
|
return `
|
|
@@ -311,7 +309,7 @@ const f = class f extends m {
|
|
|
311
309
|
`;
|
|
312
310
|
}
|
|
313
311
|
constructor() {
|
|
314
|
-
super(
|
|
312
|
+
super(w, y);
|
|
315
313
|
const t = document.createElement(f.nativeName);
|
|
316
314
|
t.classList.add("cell-link"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
317
315
|
}
|
|
@@ -359,7 +357,7 @@ const f = class f extends m {
|
|
|
359
357
|
]);
|
|
360
358
|
break;
|
|
361
359
|
case "disabled":
|
|
362
|
-
|
|
360
|
+
$(this.$cell, this.$children, this.disabled, [], {
|
|
363
361
|
ariaEl: this.$el,
|
|
364
362
|
setAria: !0,
|
|
365
363
|
setTabIndex: !0
|
|
@@ -500,12 +498,12 @@ const f = class f extends m {
|
|
|
500
498
|
}
|
|
501
499
|
};
|
|
502
500
|
f.nativeName = "a";
|
|
503
|
-
let
|
|
504
|
-
customElements.get("px-cell-link") || customElements.define("px-cell-link",
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const
|
|
508
|
-
|
|
501
|
+
let v = f;
|
|
502
|
+
customElements.get("px-cell-link") || customElements.define("px-cell-link", v);
|
|
503
|
+
const j = ".cell-button{padding:0;background:none;border:none;text-align:left;font-size:inherit}", E = new CSSStyleSheet();
|
|
504
|
+
E.replaceSync(n);
|
|
505
|
+
const D = new CSSStyleSheet();
|
|
506
|
+
D.replaceSync(j);
|
|
509
507
|
const h = class h extends m {
|
|
510
508
|
template() {
|
|
511
509
|
return `
|
|
@@ -518,7 +516,7 @@ const h = class h extends m {
|
|
|
518
516
|
`;
|
|
519
517
|
}
|
|
520
518
|
constructor() {
|
|
521
|
-
super(
|
|
519
|
+
super(D, E);
|
|
522
520
|
const t = document.createElement(h.nativeName);
|
|
523
521
|
t.classList.add("cell-button"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
524
522
|
}
|
|
@@ -559,7 +557,7 @@ const h = class h extends m {
|
|
|
559
557
|
u(this.$cell, this.$children, this.inverted);
|
|
560
558
|
break;
|
|
561
559
|
case "disabled":
|
|
562
|
-
|
|
560
|
+
$(this.$cell, this.$children, this.disabled, [], {
|
|
563
561
|
ariaEl: this.$el,
|
|
564
562
|
setAria: !0,
|
|
565
563
|
setTabIndex: !0
|
|
@@ -687,10 +685,10 @@ const h = class h extends m {
|
|
|
687
685
|
h.nativeName = "button", h.accessorExclusions = ["disabled"];
|
|
688
686
|
let k = h;
|
|
689
687
|
customElements.get("px-cell-button") || customElements.define("px-cell-button", k);
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
class
|
|
688
|
+
const L = new CSSStyleSheet();
|
|
689
|
+
L.replaceSync(n);
|
|
690
|
+
const W = ["", "left", "right"];
|
|
691
|
+
class G extends A {
|
|
694
692
|
template() {
|
|
695
693
|
return `
|
|
696
694
|
<div class="cell-checkbox">
|
|
@@ -705,7 +703,7 @@ class J extends A {
|
|
|
705
703
|
}
|
|
706
704
|
constructor() {
|
|
707
705
|
var t;
|
|
708
|
-
super(
|
|
706
|
+
super(L), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0;
|
|
709
707
|
}
|
|
710
708
|
connectedCallback() {
|
|
711
709
|
if (this.name && this.$checkbox.setAttribute("name", this.name), this.value && this.$checkbox.setAttribute("value", this.value), this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`, this.$slotVisual) {
|
|
@@ -784,11 +782,11 @@ class J extends A {
|
|
|
784
782
|
break;
|
|
785
783
|
case "state":
|
|
786
784
|
if (this.$checkbox)
|
|
787
|
-
if (this.checkName(
|
|
785
|
+
if (this.checkName(q, s))
|
|
788
786
|
this.$checkbox.setAttribute("state", s);
|
|
789
787
|
else {
|
|
790
788
|
l(
|
|
791
|
-
|
|
789
|
+
`${s} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
792
790
|
);
|
|
793
791
|
return;
|
|
794
792
|
}
|
|
@@ -819,9 +817,9 @@ class J extends A {
|
|
|
819
817
|
));
|
|
820
818
|
}
|
|
821
819
|
handleCheckboxPositionChange(t) {
|
|
822
|
-
if (!this.checkName(
|
|
820
|
+
if (!this.checkName(W, t)) {
|
|
823
821
|
l(
|
|
824
|
-
|
|
822
|
+
`${t} is not an allowed position value for ${this.tagName.toLowerCase()}`
|
|
825
823
|
);
|
|
826
824
|
return;
|
|
827
825
|
}
|
|
@@ -980,10 +978,10 @@ class J extends A {
|
|
|
980
978
|
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
981
979
|
}
|
|
982
980
|
}
|
|
983
|
-
customElements.get("px-cell-checkbox") || customElements.define("px-cell-checkbox",
|
|
984
|
-
const
|
|
985
|
-
|
|
986
|
-
class
|
|
981
|
+
customElements.get("px-cell-checkbox") || customElements.define("px-cell-checkbox", G);
|
|
982
|
+
const I = new CSSStyleSheet();
|
|
983
|
+
I.replaceSync(n);
|
|
984
|
+
class J extends A {
|
|
987
985
|
template() {
|
|
988
986
|
return `
|
|
989
987
|
<div class="cell-switch">
|
|
@@ -998,7 +996,7 @@ class K extends A {
|
|
|
998
996
|
}
|
|
999
997
|
constructor() {
|
|
1000
998
|
var t;
|
|
1001
|
-
super(
|
|
999
|
+
super(I), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0;
|
|
1002
1000
|
}
|
|
1003
1001
|
connectedCallback() {
|
|
1004
1002
|
if (this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`, this.$slotVisual) {
|
|
@@ -1242,10 +1240,10 @@ class K extends A {
|
|
|
1242
1240
|
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
1243
1241
|
}
|
|
1244
1242
|
}
|
|
1245
|
-
customElements.get("px-cell-switch") || customElements.define("px-cell-switch",
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1248
|
-
const
|
|
1243
|
+
customElements.get("px-cell-switch") || customElements.define("px-cell-switch", J);
|
|
1244
|
+
const T = new CSSStyleSheet();
|
|
1245
|
+
T.replaceSync(n);
|
|
1246
|
+
const K = ["", "left", "right"];
|
|
1249
1247
|
class Q extends A {
|
|
1250
1248
|
template() {
|
|
1251
1249
|
return `
|
|
@@ -1261,7 +1259,7 @@ class Q extends A {
|
|
|
1261
1259
|
}
|
|
1262
1260
|
constructor() {
|
|
1263
1261
|
var t;
|
|
1264
|
-
super(
|
|
1262
|
+
super(T), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this);
|
|
1265
1263
|
}
|
|
1266
1264
|
connectedCallback() {
|
|
1267
1265
|
var t;
|
|
@@ -1341,11 +1339,11 @@ class Q extends A {
|
|
|
1341
1339
|
break;
|
|
1342
1340
|
case "state":
|
|
1343
1341
|
if (this.$radio)
|
|
1344
|
-
if (this.checkName(
|
|
1342
|
+
if (this.checkName(M, s))
|
|
1345
1343
|
this.$radio.setAttribute("state", s);
|
|
1346
1344
|
else {
|
|
1347
1345
|
l(
|
|
1348
|
-
|
|
1346
|
+
`${s} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
1349
1347
|
);
|
|
1350
1348
|
return;
|
|
1351
1349
|
}
|
|
@@ -1376,9 +1374,9 @@ class Q extends A {
|
|
|
1376
1374
|
));
|
|
1377
1375
|
}
|
|
1378
1376
|
handleRadioPositionChange(t) {
|
|
1379
|
-
if (!this.checkName(
|
|
1377
|
+
if (!this.checkName(K, t)) {
|
|
1380
1378
|
l(
|
|
1381
|
-
|
|
1379
|
+
`${t} is not an allowed position value for ${this.tagName.toLowerCase()}`
|
|
1382
1380
|
);
|
|
1383
1381
|
return;
|
|
1384
1382
|
}
|
|
@@ -1539,14 +1537,14 @@ class Q extends A {
|
|
|
1539
1537
|
}
|
|
1540
1538
|
customElements.get("px-cell-radio") || customElements.define("px-cell-radio", Q);
|
|
1541
1539
|
export {
|
|
1542
|
-
|
|
1540
|
+
g as Cell,
|
|
1543
1541
|
k as CellButton,
|
|
1544
|
-
|
|
1545
|
-
|
|
1542
|
+
G as CellCheckbox,
|
|
1543
|
+
v as CellLink,
|
|
1546
1544
|
Q as CellRadio,
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1545
|
+
J as CellSwitch,
|
|
1546
|
+
W as cellCheckboxPosition,
|
|
1547
|
+
K as cellRadioPosition,
|
|
1548
|
+
_ as radiusValues,
|
|
1549
|
+
F as suffixButtonIconVariantValues
|
|
1552
1550
|
};
|