@proximus/lavender-cell 2.0.0-alpha.1 → 2.0.0-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/CellRadio.d.ts +2 -2
- package/dist/index.es.js +47 -46
- package/package.json +1 -1
package/dist/CellRadio.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WithExtraAttributes } from '@proximus/lavender-common';
|
|
2
2
|
import { Cell } from '@proximus/lavender-cell';
|
|
3
|
-
import { type IRadio, type
|
|
3
|
+
import { type IRadio, type Radio } from '@proximus/lavender-radio-group';
|
|
4
4
|
export declare const cellRadioPosition: string[];
|
|
5
5
|
export declare class CellRadio extends WithExtraAttributes implements IRadio {
|
|
6
6
|
protected internals: ElementInternals;
|
|
@@ -18,7 +18,7 @@ export declare class CellRadio extends WithExtraAttributes implements IRadio {
|
|
|
18
18
|
formData(): FormData;
|
|
19
19
|
get $cell(): Cell;
|
|
20
20
|
get $el(): HTMLElement;
|
|
21
|
-
get $radio():
|
|
21
|
+
get $radio(): Radio;
|
|
22
22
|
get $slotVisual(): HTMLSlotElement;
|
|
23
23
|
get $children(): NodeListOf<Element>;
|
|
24
24
|
get inverted(): boolean;
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { checkName as
|
|
1
|
+
import { checkName as u, PxElement as v, WithExtraAttributes as g } from "@proximus/lavender-common";
|
|
2
2
|
import "@proximus/lavender-layout";
|
|
3
3
|
import { checkboxStateValues as q } from "@proximus/lavender-checkbox";
|
|
4
4
|
import { stateValues as M } from "@proximus/lavender-radio-group";
|
|
@@ -14,7 +14,7 @@ function c(r) {
|
|
|
14
14
|
r.getAttribute("variant") === "contained" && !r.getAttribute("background-color") && r.setAttribute("background-color", "container-light");
|
|
15
15
|
}
|
|
16
16
|
function P(r, t, e) {
|
|
17
|
-
if (!
|
|
17
|
+
if (!u(R, e)) {
|
|
18
18
|
console.error(`${e} is not an allowed variant value.`);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
@@ -28,7 +28,7 @@ function d(r, t, e, s = []) {
|
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
function B(r, t, e, s, i) {
|
|
31
|
-
if (!
|
|
31
|
+
if (!u(i, s)) {
|
|
32
32
|
console.error(`${s} is not an allowed ${t} value`);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
@@ -50,10 +50,10 @@ function $(r, t, e, s = [], i = {}) {
|
|
|
50
50
|
a.hasAttribute("disabled") && a.removeAttribute("disabled");
|
|
51
51
|
}), i.ariaEl && i.setAria && i.ariaEl.setAttribute("aria-disabled", "false"), i.ariaEl && i.setTabIndex && (i.ariaEl.tabIndex = 0));
|
|
52
52
|
}
|
|
53
|
-
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(),
|
|
53
|
+
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();
|
|
54
54
|
S.replaceSync(n);
|
|
55
|
-
|
|
56
|
-
const x = ["secondary"], F = ["", "default", "top", "bottom", "none"], k = class k extends
|
|
55
|
+
C.replaceSync(H);
|
|
56
|
+
const x = ["secondary"], F = ["", "default", "top", "bottom", "none"], k = class k extends v {
|
|
57
57
|
template() {
|
|
58
58
|
return `
|
|
59
59
|
<px-hstack gap="s" justify-content="space-between" align-items="center">
|
|
@@ -75,7 +75,7 @@ const x = ["secondary"], F = ["", "default", "top", "bottom", "none"], k = class
|
|
|
75
75
|
`;
|
|
76
76
|
}
|
|
77
77
|
constructor() {
|
|
78
|
-
super(
|
|
78
|
+
super(C, S);
|
|
79
79
|
const t = document.createElement(this.nativeName);
|
|
80
80
|
t.classList.add("cell"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
81
81
|
}
|
|
@@ -146,7 +146,7 @@ const x = ["secondary"], F = ["", "default", "top", "bottom", "none"], k = class
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
configureSlotSuffixButtonIcon(t) {
|
|
149
|
-
t.hasAttribute("variant") ?
|
|
149
|
+
t.hasAttribute("variant") ? u(
|
|
150
150
|
x,
|
|
151
151
|
t.getAttribute("variant")
|
|
152
152
|
) || (console.error(
|
|
@@ -156,7 +156,7 @@ const x = ["secondary"], F = ["", "default", "top", "bottom", "none"], k = class
|
|
|
156
156
|
), t.setAttribute("variant", "secondary")) : t.setAttribute("variant", "secondary");
|
|
157
157
|
}
|
|
158
158
|
updateRadius(t, e, s, i) {
|
|
159
|
-
if (!
|
|
159
|
+
if (!u(i, s)) {
|
|
160
160
|
console.error(`${s} is not a valid ${t} value`);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
@@ -164,11 +164,11 @@ const x = ["secondary"], F = ["", "default", "top", "bottom", "none"], k = class
|
|
|
164
164
|
if (!a)
|
|
165
165
|
this.separatorMobile || o.push("mobile"), this.separatorTablet || o.push("tablet"), this.separatorLaptop || o.push("laptop"), this.separatorDesktop || o.push("desktop");
|
|
166
166
|
else {
|
|
167
|
-
const
|
|
168
|
-
o.push(
|
|
167
|
+
const h = t.split("--")[1];
|
|
168
|
+
o.push(h);
|
|
169
169
|
}
|
|
170
|
-
o.forEach((
|
|
171
|
-
e !== null && e !== "" && e !== "default" && this.updateStyle(
|
|
170
|
+
o.forEach((h) => {
|
|
171
|
+
e !== null && e !== "" && e !== "default" && this.updateStyle(h, e), s !== null && s !== "" && s !== "default" && this.updateStyle(h, s);
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
updateStyle(t, e) {
|
|
@@ -286,11 +286,11 @@ const x = ["secondary"], F = ["", "default", "top", "bottom", "none"], k = class
|
|
|
286
286
|
k.nativeName = "div";
|
|
287
287
|
let b = k;
|
|
288
288
|
customElements.get("px-cell") || customElements.define("px-cell", b);
|
|
289
|
-
const _ = '.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)}',
|
|
290
|
-
|
|
289
|
+
const _ = '.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
291
|
const w = new CSSStyleSheet();
|
|
292
292
|
w.replaceSync(_);
|
|
293
|
-
const m = class m extends
|
|
293
|
+
const m = class m extends v {
|
|
294
294
|
template() {
|
|
295
295
|
return `
|
|
296
296
|
<px-cell hoverable>
|
|
@@ -309,7 +309,7 @@ const m = class m extends g {
|
|
|
309
309
|
`;
|
|
310
310
|
}
|
|
311
311
|
constructor() {
|
|
312
|
-
super(w,
|
|
312
|
+
super(w, y);
|
|
313
313
|
const t = document.createElement(this.nativeName);
|
|
314
314
|
t.classList.add("cell-link"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
315
315
|
}
|
|
@@ -504,7 +504,7 @@ const j = ".cell-button{padding:0;background:none;border:none;text-align:left;fo
|
|
|
504
504
|
E.replaceSync(n);
|
|
505
505
|
const D = new CSSStyleSheet();
|
|
506
506
|
D.replaceSync(j);
|
|
507
|
-
const A = class A extends
|
|
507
|
+
const A = class A extends v {
|
|
508
508
|
template() {
|
|
509
509
|
return `
|
|
510
510
|
<px-cell hoverable>
|
|
@@ -683,12 +683,12 @@ const A = class A extends g {
|
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
685
|
A.nativeName = "button";
|
|
686
|
-
let
|
|
687
|
-
customElements.get("px-cell-button") || customElements.define("px-cell-button",
|
|
686
|
+
let f = A;
|
|
687
|
+
customElements.get("px-cell-button") || customElements.define("px-cell-button", f);
|
|
688
688
|
const L = new CSSStyleSheet();
|
|
689
689
|
L.replaceSync(n);
|
|
690
690
|
const O = ["", "left", "right"];
|
|
691
|
-
class W extends
|
|
691
|
+
class W extends g {
|
|
692
692
|
template() {
|
|
693
693
|
return `
|
|
694
694
|
<div class="cell-checkbox">
|
|
@@ -703,7 +703,7 @@ class W extends f {
|
|
|
703
703
|
}
|
|
704
704
|
constructor() {
|
|
705
705
|
var t;
|
|
706
|
-
super(L), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`)
|
|
706
|
+
super(L), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
707
707
|
}
|
|
708
708
|
connectedCallback() {
|
|
709
709
|
if (this.$slotVisual) {
|
|
@@ -798,15 +798,15 @@ class W extends f {
|
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
800
|
handleDisabledAttributeChange(t) {
|
|
801
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$cell.disabled = !0, this.$checkbox.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
801
|
+
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$cell.disabled = !0, this.$checkbox.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
802
802
|
e.hasAttribute("disabled") || e.setAttribute("disabled", "");
|
|
803
|
-
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$cell.disabled = !1, this.$checkbox.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
803
|
+
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$cell.disabled = !1, this.$checkbox.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
804
804
|
e.hasAttribute("disabled") && e.removeAttribute("disabled");
|
|
805
805
|
}));
|
|
806
806
|
}
|
|
807
807
|
handleCheckedAttributeChange(t) {
|
|
808
808
|
var e;
|
|
809
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.checked = !1, this.$checkbox && this.$checkbox.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.checked = !0, this.$checkbox && this.$checkbox.setAttribute("checked", ""), this.dispatchEvent(
|
|
809
|
+
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.checked = !1, this.$checkbox && this.$checkbox.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.checked = !0, this.$checkbox && this.$checkbox.setAttribute("checked", ""), this.dispatchEvent(
|
|
810
810
|
new Event("change", {
|
|
811
811
|
bubbles: !0,
|
|
812
812
|
composed: !0
|
|
@@ -977,7 +977,7 @@ class W extends f {
|
|
|
977
977
|
customElements.get("px-cell-checkbox") || customElements.define("px-cell-checkbox", W);
|
|
978
978
|
const I = new CSSStyleSheet();
|
|
979
979
|
I.replaceSync(n);
|
|
980
|
-
class G extends
|
|
980
|
+
class G extends g {
|
|
981
981
|
template() {
|
|
982
982
|
return `
|
|
983
983
|
<div class="cell-switch">
|
|
@@ -992,7 +992,7 @@ class G extends f {
|
|
|
992
992
|
}
|
|
993
993
|
constructor() {
|
|
994
994
|
var t;
|
|
995
|
-
super(I), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`)
|
|
995
|
+
super(I), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
996
996
|
}
|
|
997
997
|
connectedCallback() {
|
|
998
998
|
if (this.$slotVisual) {
|
|
@@ -1073,15 +1073,15 @@ class G extends f {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
1075
|
handleDisabledAttributeChange(t) {
|
|
1076
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$cell.disabled = !0, this.$switch.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
1076
|
+
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$cell.disabled = !0, this.$switch.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
1077
1077
|
e.hasAttribute("disabled") || e.setAttribute("disabled", "");
|
|
1078
|
-
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$cell.disabled = !1, this.$switch.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
1078
|
+
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$cell.disabled = !1, this.$switch.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
1079
1079
|
e.hasAttribute("disabled") && e.removeAttribute("disabled");
|
|
1080
1080
|
}));
|
|
1081
1081
|
}
|
|
1082
1082
|
handleCheckedAttributeChange(t) {
|
|
1083
1083
|
var e;
|
|
1084
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.checked = !1, this.$switch && this.$switch.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.checked = !0, this.$switch && this.$switch.setAttribute("checked", ""), this.dispatchEvent(
|
|
1084
|
+
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.checked = !1, this.$switch && this.$switch.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.checked = !0, this.$switch && this.$switch.setAttribute("checked", ""), this.dispatchEvent(
|
|
1085
1085
|
new Event("change", {
|
|
1086
1086
|
bubbles: !0,
|
|
1087
1087
|
composed: !0
|
|
@@ -1240,12 +1240,12 @@ customElements.get("px-cell-switch") || customElements.define("px-cell-switch",
|
|
|
1240
1240
|
const T = new CSSStyleSheet();
|
|
1241
1241
|
T.replaceSync(n);
|
|
1242
1242
|
const J = ["", "left", "right"];
|
|
1243
|
-
class K extends
|
|
1243
|
+
class K extends g {
|
|
1244
1244
|
template() {
|
|
1245
1245
|
return `
|
|
1246
1246
|
<div class="cell-radio">
|
|
1247
1247
|
<px-cell hoverable>
|
|
1248
|
-
<px-radio
|
|
1248
|
+
<px-radio slot="prefix" aria-hidden="true" tabindex="-1"></px-radio>
|
|
1249
1249
|
<slot name="visual" slot="visual"></slot>
|
|
1250
1250
|
<slot name="label" slot="label"></slot>
|
|
1251
1251
|
<slot name="description" slot="description"></slot>
|
|
@@ -1254,26 +1254,27 @@ class K extends f {
|
|
|
1254
1254
|
`;
|
|
1255
1255
|
}
|
|
1256
1256
|
constructor() {
|
|
1257
|
-
var t
|
|
1258
|
-
super(T), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.
|
|
1257
|
+
var t;
|
|
1258
|
+
super(T), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.role = "radio", this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
1259
1259
|
}
|
|
1260
1260
|
connectedCallback() {
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1261
|
+
var t;
|
|
1262
|
+
if (this.tabIndex = ((t = this.parentElement) == null ? void 0 : t.firstElementChild) === this ? 0 : -1, this.$slotVisual) {
|
|
1263
|
+
const e = this.querySelector('px-img[slot="visual"]');
|
|
1264
|
+
e && l(e);
|
|
1264
1265
|
}
|
|
1265
1266
|
this.addEventListener("mouseover", () => {
|
|
1266
1267
|
this.$radio.setAttribute("hover", "");
|
|
1267
1268
|
}), this.addEventListener("mouseout", () => {
|
|
1268
1269
|
this.$radio.removeAttribute("hover");
|
|
1269
|
-
}), this.addEventListener("keypress", (
|
|
1270
|
-
switch (
|
|
1270
|
+
}), this.addEventListener("keypress", (e) => {
|
|
1271
|
+
switch (e.stopPropagation(), e.preventDefault(), e.code) {
|
|
1271
1272
|
case "Space":
|
|
1272
1273
|
this.click();
|
|
1273
1274
|
break;
|
|
1274
1275
|
}
|
|
1275
|
-
}), this.addEventListener("click", (
|
|
1276
|
-
this.checked || (this.checked = !0),
|
|
1276
|
+
}), this.addEventListener("click", (e) => {
|
|
1277
|
+
this.checked || (this.checked = !0), e.stopPropagation(), e.preventDefault();
|
|
1277
1278
|
}), this.hasAttribute("checked") && (this.checked = !0), c(this);
|
|
1278
1279
|
}
|
|
1279
1280
|
static get observedAttributes() {
|
|
@@ -1350,15 +1351,15 @@ class K extends f {
|
|
|
1350
1351
|
}
|
|
1351
1352
|
}
|
|
1352
1353
|
handleDisabledAttributeChange(t) {
|
|
1353
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$cell.disabled = !0, this.$radio.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
1354
|
+
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$cell.disabled = !0, this.$radio.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
1354
1355
|
e.hasAttribute("disabled") || e.setAttribute("disabled", "");
|
|
1355
|
-
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$cell.disabled = !1, this.$radio.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
1356
|
+
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$cell.disabled = !1, this.$radio.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
1356
1357
|
e.hasAttribute("disabled") && e.removeAttribute("disabled");
|
|
1357
1358
|
}));
|
|
1358
1359
|
}
|
|
1359
1360
|
handleCheckedAttributeChange(t) {
|
|
1360
1361
|
var e;
|
|
1361
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.
|
|
1362
|
+
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.tabIndex = -1, this.checked = !1, this.$radio && this.$radio.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.tabIndex = 0, this.checked = !0, this.$radio && this.$radio.setAttribute("checked", ""), this.dispatchEvent(
|
|
1362
1363
|
new Event("change", {
|
|
1363
1364
|
bubbles: !0,
|
|
1364
1365
|
composed: !0
|
|
@@ -1397,7 +1398,7 @@ class K extends f {
|
|
|
1397
1398
|
return this.shadowRoot.querySelector(".cell-radio");
|
|
1398
1399
|
}
|
|
1399
1400
|
get $radio() {
|
|
1400
|
-
return this.shadowRoot.querySelector("px-radio
|
|
1401
|
+
return this.shadowRoot.querySelector("px-radio");
|
|
1401
1402
|
}
|
|
1402
1403
|
get $slotVisual() {
|
|
1403
1404
|
return this.querySelector('[slot="visual"]');
|
|
@@ -1529,7 +1530,7 @@ class K extends f {
|
|
|
1529
1530
|
customElements.get("px-cell-radio") || customElements.define("px-cell-radio", K);
|
|
1530
1531
|
export {
|
|
1531
1532
|
b as Cell,
|
|
1532
|
-
|
|
1533
|
+
f as CellButton,
|
|
1533
1534
|
W as CellCheckbox,
|
|
1534
1535
|
p as CellLink,
|
|
1535
1536
|
K as CellRadio,
|