@sbb-esta/lyne-elements 3.3.0 → 3.3.2
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/autocomplete/autocomplete-base-element.d.ts +3 -4
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete-base-element.js +88 -83
- package/autocomplete/autocomplete.component.d.ts +0 -1
- package/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/autocomplete/autocomplete.component.js +26 -26
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +0 -2
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +34 -44
- package/checkbox/checkbox-panel/checkbox-panel.component.d.ts +3 -2
- package/checkbox/checkbox-panel/checkbox-panel.component.d.ts.map +1 -1
- package/checkbox/checkbox-panel/checkbox-panel.component.js +36 -33
- package/core/mixins/element-internals-mixin.js +6 -6
- package/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-mixin.js +22 -16
- package/core.css +7 -7
- package/custom-elements.json +839 -35
- package/date-input/date-input.component.d.ts +5 -1
- package/date-input/date-input.component.d.ts.map +1 -1
- package/date-input/date-input.component.js +24 -15
- package/development/autocomplete/autocomplete-base-element.d.ts +3 -4
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete-base-element.js +30 -15
- package/development/autocomplete/autocomplete.component.d.ts +0 -1
- package/development/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/development/autocomplete/autocomplete.component.js +16 -21
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts +0 -2
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +26 -35
- package/development/checkbox/checkbox-panel/checkbox-panel.component.d.ts +3 -2
- package/development/checkbox/checkbox-panel/checkbox-panel.component.d.ts.map +1 -1
- package/development/checkbox/checkbox-panel/checkbox-panel.component.js +10 -4
- package/development/core/mixins/element-internals-mixin.js +2 -2
- package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-mixin.js +14 -7
- package/development/date-input/date-input.component.d.ts +5 -1
- package/development/date-input/date-input.component.d.ts.map +1 -1
- package/development/date-input/date-input.component.js +11 -1
- package/development/form-field/form-field/form-field.component.d.ts +6 -3
- package/development/form-field/form-field/form-field.component.d.ts.map +1 -1
- package/development/form-field/form-field/form-field.component.js +1 -3
- package/development/header/common/header-action-common.js +4 -1
- package/development/notification/notification.component.js +1 -1
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option/option-base-element.js +2 -1
- package/development/sbb-tokens-CVLcOi-S.js +1 -1
- package/development/time-input/time-input.component.d.ts +5 -1
- package/development/time-input/time-input.component.d.ts.map +1 -1
- package/development/time-input/time-input.component.js +11 -1
- package/development/toggle-check/toggle-check.component.d.ts +2 -2
- package/development/toggle-check/toggle-check.component.d.ts.map +1 -1
- package/development/toggle-check/toggle-check.component.js +4 -4
- package/form-field/form-field/form-field.component.d.ts +6 -3
- package/form-field/form-field/form-field.component.d.ts.map +1 -1
- package/form-field/form-field/form-field.component.js +0 -2
- package/header/common/header-action-common.js +1 -1
- package/notification/notification.component.js +1 -1
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option/option-base-element.js +18 -18
- package/package.json +1 -1
- package/standard-theme.css +7 -7
- package/time-input/time-input.component.d.ts +5 -1
- package/time-input/time-input.component.d.ts.map +1 -1
- package/time-input/time-input.component.js +24 -16
- package/toggle-check/toggle-check.component.d.ts +2 -2
- package/toggle-check/toggle-check.component.d.ts.map +1 -1
- package/toggle-check/toggle-check.component.js +28 -28
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import { __esDecorate as
|
|
2
|
-
import { customElement as
|
|
3
|
-
import { SbbAutocompleteBaseElement as
|
|
4
|
-
import { getNextElementIndex as
|
|
1
|
+
import { __esDecorate as h, __runInitializers as v } from "tslib";
|
|
2
|
+
import { customElement as g } from "lit/decorators.js";
|
|
3
|
+
import { SbbAutocompleteBaseElement as f } from "../../autocomplete.js";
|
|
4
|
+
import { getNextElementIndex as b } from "../../core/a11y.js";
|
|
5
5
|
import { isSafari as A } from "../../core/dom.js";
|
|
6
|
-
import { setAriaComboBoxAttributes as
|
|
7
|
-
import { SbbAutocompleteGridOptionElement as
|
|
8
|
-
let
|
|
6
|
+
import { setAriaComboBoxAttributes as x } from "../../core/overlay.js";
|
|
7
|
+
import { SbbAutocompleteGridOptionElement as d } from "../autocomplete-grid-option.js";
|
|
8
|
+
let y = 0;
|
|
9
9
|
const m = A;
|
|
10
|
-
let
|
|
11
|
-
var
|
|
12
|
-
let
|
|
13
|
-
return
|
|
10
|
+
let k = (() => {
|
|
11
|
+
var s;
|
|
12
|
+
let p = [g("sbb-autocomplete-grid")], l, n = [], o, c = f;
|
|
13
|
+
return s = class extends c {
|
|
14
14
|
get options() {
|
|
15
15
|
return Array.from(this.querySelectorAll?.("sbb-autocomplete-grid-option") ?? []);
|
|
16
16
|
}
|
|
17
|
-
get _row() {
|
|
18
|
-
return Array.from(this.querySelectorAll?.("sbb-autocomplete-grid-row")).filter((t) => !t.hasAttribute("data-disabled")) ?? [];
|
|
19
|
-
}
|
|
20
17
|
constructor() {
|
|
21
|
-
super(), this.overlayId = `sbb-autocomplete-grid-${++
|
|
18
|
+
super(), this.overlayId = `sbb-autocomplete-grid-${++y}`, this.panelRole = "grid", this._activeColumnIndex = 0, this.addEventListener?.("optionselected", (t) => this.onOptionSelected(t));
|
|
22
19
|
}
|
|
23
20
|
syncNegative() {
|
|
24
21
|
this.querySelectorAll?.("sbb-divider, sbb-autocomplete-grid-button, sbb-option-hint").forEach((t) => t.negative = this.negative), this.querySelectorAll?.("sbb-autocomplete-grid-row, sbb-autocomplete-grid-option, sbb-autocomplete-grid-optgroup").forEach((t) => t.toggleAttribute("data-negative", this.negative));
|
|
@@ -50,49 +47,42 @@ let O = (() => {
|
|
|
50
47
|
* would always return a `SbbAutocompleteGridButtonElement`.
|
|
51
48
|
*/
|
|
52
49
|
selectByKeyboard(t) {
|
|
53
|
-
t.preventDefault(), this._activeColumnIndex !== 0 ? this.
|
|
50
|
+
t.preventDefault(), this._activeColumnIndex !== 0 ? this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-button")[
|
|
51
|
+
// We ignore the option in the selector. Therefore, we have to shift the activeColumnIndex by one.
|
|
52
|
+
this._activeColumnIndex - 1
|
|
53
|
+
]?.click() : this.activeOption?.selectViaUserInteraction(!0);
|
|
54
54
|
}
|
|
55
55
|
setNextActiveOption(t) {
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
56
|
+
const e = this.options.filter((i) => !i.disabled && !i.hasAttribute("data-group-disabled"));
|
|
57
|
+
if (this.activeOption?.setActive(!1), this.triggerElement?.removeAttribute("aria-activedescendant"), Array.from(this.querySelectorAll?.("sbb-autocomplete-grid-row [data-focus-visible]") ?? []).forEach((i) => i.removeAttribute("data-focus-visible")), this._activeColumnIndex = 0, !e.length) {
|
|
58
|
+
this.activeOption = null;
|
|
58
59
|
return;
|
|
59
|
-
const s = i[a];
|
|
60
|
-
if (s.setActive(!0), this.triggerElement?.setAttribute("aria-activedescendant", s.id), s.scrollIntoView({ block: "nearest" }), this._activeColumnIndex !== 0)
|
|
61
|
-
this._row[this._activeItemIndex].querySelectorAll("sbb-autocomplete-grid-button").forEach((e) => e.toggleAttribute("data-focus-visible", !1));
|
|
62
|
-
else {
|
|
63
|
-
const e = i[this._activeItemIndex];
|
|
64
|
-
e && e.setActive(!1);
|
|
65
60
|
}
|
|
66
|
-
this.
|
|
61
|
+
const a = this.activeOption ? e.indexOf(this.activeOption) : -1, r = b(t, a, e.length);
|
|
62
|
+
this.activeOption = e[r], this.activeOption.setActive(!0), this.triggerElement?.setAttribute("aria-activedescendant", this.activeOption.id), this.activeOption.scrollIntoView({ block: "nearest" });
|
|
67
63
|
}
|
|
68
64
|
_setNextHorizontalActiveElement(t) {
|
|
69
|
-
if (this.
|
|
65
|
+
if (!this.activeOption)
|
|
70
66
|
return;
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
67
|
+
const e = Array.from(this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-option, sbb-autocomplete-grid-button") ?? [])?.filter((u) => !u.disabled && !u.hasAttribute("data-group-disabled"));
|
|
68
|
+
if (!e.length)
|
|
73
69
|
return;
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
70
|
+
const a = b(t, this._activeColumnIndex, e.length), r = e[a];
|
|
71
|
+
r instanceof d ? r.setActive(!0) : r.toggleAttribute("data-focus-visible", !0);
|
|
72
|
+
const i = e[this._activeColumnIndex];
|
|
73
|
+
i instanceof d ? i.setActive(!1) : i.toggleAttribute("data-focus-visible", !1), this.triggerElement?.setAttribute("aria-activedescendant", r.id), r.scrollIntoView({ block: "nearest" }), this._activeColumnIndex = a;
|
|
78
74
|
}
|
|
79
75
|
resetActiveElement() {
|
|
80
|
-
|
|
81
|
-
this._row[this._activeItemIndex].querySelectorAll("sbb-autocomplete-grid-button").forEach((t) => t.toggleAttribute("data-focus-visible", !1));
|
|
82
|
-
else {
|
|
83
|
-
const t = this.options.filter((i) => !i.disabled && !i.hasAttribute("data-group-disabled"))[this._activeItemIndex];
|
|
84
|
-
t && t.setActive(!1);
|
|
85
|
-
}
|
|
86
|
-
this._activeItemIndex = -1, this._activeColumnIndex = 0, this.triggerElement?.removeAttribute("aria-activedescendant");
|
|
76
|
+
this._activeColumnIndex !== 0 && this.activeOption?.closest("sbb-autocomplete-grid-row")?.querySelectorAll("sbb-autocomplete-grid-button").forEach((t) => t.toggleAttribute("data-focus-visible", !1)), this.activeOption?.setActive(!1), this.activeOption = null, this._activeColumnIndex = 0, this.triggerElement?.removeAttribute("aria-activedescendant");
|
|
87
77
|
}
|
|
88
78
|
setTriggerAttributes(t) {
|
|
89
|
-
|
|
79
|
+
x(t, m ? this.id : this.overlayId, !1, "grid");
|
|
90
80
|
}
|
|
91
|
-
}, o =
|
|
81
|
+
}, o = s, (() => {
|
|
92
82
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
93
|
-
|
|
94
|
-
})(),
|
|
83
|
+
h(null, l = { value: o }, p, { kind: "class", name: o.name, metadata: t }, null, n), o = l.value, t && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
84
|
+
})(), s.role = m ? "grid" : null, v(o, n), o;
|
|
95
85
|
})();
|
|
96
86
|
export {
|
|
97
|
-
|
|
87
|
+
k as SbbAutocompleteGridElement
|
|
98
88
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSResultGroup, LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
1
|
+
import { CSSResultGroup, LitElement, PropertyDeclaration, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { SbbCheckedStateChange, SbbDisabledStateChange, SbbStateChange } from '../../core/interfaces/types.js';
|
|
3
3
|
import { SbbPanelSize } from '../../core/mixins.js';
|
|
4
4
|
export type SbbCheckboxPanelStateChange = Extract<SbbStateChange, SbbDisabledStateChange | SbbCheckedStateChange>;
|
|
@@ -23,8 +23,9 @@ export declare class SbbCheckboxPanelElement<T = string> extends SbbCheckboxPane
|
|
|
23
23
|
* @default 'm' / 's' (lean)
|
|
24
24
|
*/
|
|
25
25
|
accessor size: SbbPanelSize;
|
|
26
|
-
|
|
26
|
+
requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration): void;
|
|
27
27
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
28
|
+
private _dispatchStateChange;
|
|
28
29
|
protected render(): TemplateResult;
|
|
29
30
|
}
|
|
30
31
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/checkbox/checkbox-panel/checkbox-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,UAAU,EAEV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAKb,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,0BAA0B,CAAC;AAElC,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAC/C,cAAc,EACd,sBAAsB,GAAG,qBAAqB,CAC/C,CAAC;;AAEF;;;;;;;;;;GAUG;AACH,qBAGM,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,4BAEjD;IACC,OAAuB,MAAM,EAAE,cAAc,CAA2C;IAExF,iCAAiC;IACjC,SACgB,KAAK,EAAE,CAAC,GAAG,IAAI,CAAQ;IAEvC;;;OAGG;IACH,SAEgB,IAAI,EAAE,YAAY,CAAwB;
|
|
1
|
+
{"version":3,"file":"checkbox-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/checkbox/checkbox-panel/checkbox-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,UAAU,EAEV,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAKb,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,0BAA0B,CAAC;AAElC,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAC/C,cAAc,EACd,sBAAsB,GAAG,qBAAqB,CAC/C,CAAC;;AAEF;;;;;;;;;;GAUG;AACH,qBAGM,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,4BAEjD;IACC,OAAuB,MAAM,EAAE,cAAc,CAA2C;IAExF,iCAAiC;IACjC,SACgB,KAAK,EAAE,CAAC,GAAG,IAAI,CAAQ;IAEvC;;;OAGG;IACH,SAEgB,IAAI,EAAE,YAAY,CAAwB;IAE1C,aAAa,CAC3B,IAAI,CAAC,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,OAAO,EAClB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,IAAI;cASY,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAe5E,OAAO,CAAC,oBAAoB;cAWT,MAAM,IAAI,cAAc;CA8B5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,oBAAoB,EAAE,uBAAuB,CAAC;KAC/C;IAED,UAAU,2BAA2B;QACnC,WAAW,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;KAC1C;CACF"}
|
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
var z = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var z = (t) => {
|
|
2
|
+
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var S = (
|
|
5
|
-
var h = (
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { LitElement as E, nothing as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { slotState as
|
|
10
|
-
import { isLean as
|
|
11
|
-
import { SbbPanelMixin as
|
|
12
|
-
import { SbbCheckboxCommonElementMixin as
|
|
4
|
+
var S = (t, a, i) => a.has(t) || z("Cannot " + i);
|
|
5
|
+
var h = (t, a, i) => (S(t, a, "read from private field"), i ? i.call(t) : a.get(t)), d = (t, a, i) => a.has(t) ? z("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, i), u = (t, a, i, l) => (S(t, a, "write to private field"), l ? l.call(t, i) : a.set(t, i), i);
|
|
6
|
+
import { __esDecorate as m, __runInitializers as b } from "tslib";
|
|
7
|
+
import { LitElement as E, nothing as $, html as y } from "lit";
|
|
8
|
+
import { customElement as w, property as C } from "lit/decorators.js";
|
|
9
|
+
import { slotState as U, getOverride as D } from "../../core/decorators.js";
|
|
10
|
+
import { isLean as I } from "../../core/dom.js";
|
|
11
|
+
import { SbbPanelMixin as M, SbbUpdateSchedulerMixin as O, panelCommonStyle as j } from "../../core/mixins.js";
|
|
12
|
+
import { SbbCheckboxCommonElementMixin as q, checkboxCommonStyle as L } from "../common.js";
|
|
13
13
|
import "../../screen-reader-only.js";
|
|
14
14
|
import "../../visual-checkbox.js";
|
|
15
15
|
let V = (() => {
|
|
16
|
-
var n,
|
|
17
|
-
let
|
|
16
|
+
var n, o, c;
|
|
17
|
+
let t = [w("sbb-checkbox-panel"), U()], a, i = [], l, p = M(q(O(E))), _, k = [], f = [], x, v = [], g = [];
|
|
18
18
|
return c = class extends p {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
|
-
d(this, n, b(this,
|
|
22
|
-
d(this,
|
|
21
|
+
d(this, n, b(this, k, null));
|
|
22
|
+
d(this, o, (b(this, f), b(this, v, I() ? "s" : "m")));
|
|
23
23
|
b(this, g);
|
|
24
24
|
}
|
|
25
25
|
/** Value of the form element. */
|
|
26
26
|
get value() {
|
|
27
27
|
return h(this, n);
|
|
28
28
|
}
|
|
29
|
-
set value(
|
|
30
|
-
|
|
29
|
+
set value(e) {
|
|
30
|
+
u(this, n, e);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Size variant, either m or s.
|
|
34
34
|
* @default 'm' / 's' (lean)
|
|
35
35
|
*/
|
|
36
36
|
get size() {
|
|
37
|
-
return h(this,
|
|
37
|
+
return h(this, o);
|
|
38
38
|
}
|
|
39
|
-
set size(
|
|
40
|
-
|
|
39
|
+
set size(e) {
|
|
40
|
+
u(this, o, e);
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
requestUpdate(e, s, r) {
|
|
43
|
+
super.requestUpdate(e, s, r), e === "checked" && (this.internals.ariaChecked = `${this.checked}`, this.toggleAttribute("data-checked", this.checked));
|
|
44
44
|
}
|
|
45
|
-
willUpdate(
|
|
46
|
-
super.willUpdate(
|
|
45
|
+
willUpdate(e) {
|
|
46
|
+
super.willUpdate(e), e.has("checked") && this.checked !== e.get("checked") && this._dispatchStateChange({ type: "checked", checked: this.checked }), e.has("disabled") && this.disabled !== e.get("disabled") && this._dispatchStateChange({ type: "disabled", disabled: this.disabled });
|
|
47
|
+
}
|
|
48
|
+
_dispatchStateChange(e) {
|
|
49
|
+
return this.dispatchEvent(new CustomEvent("statechange", { detail: e, bubbles: !0 }));
|
|
47
50
|
}
|
|
48
51
|
render() {
|
|
49
52
|
return y`
|
|
@@ -67,20 +70,20 @@ let V = (() => {
|
|
|
67
70
|
</span>
|
|
68
71
|
</span>
|
|
69
72
|
<slot name="subtext"></slot>
|
|
70
|
-
${this.expansionState ? y`<sbb-screen-reader-only>${this.expansionState}</sbb-screen-reader-only>` :
|
|
73
|
+
${this.expansionState ? y`<sbb-screen-reader-only>${this.expansionState}</sbb-screen-reader-only>` : $}
|
|
71
74
|
</span>
|
|
72
75
|
</span>
|
|
73
76
|
</span>
|
|
74
77
|
`;
|
|
75
78
|
}
|
|
76
|
-
}, n = new WeakMap(),
|
|
77
|
-
const
|
|
78
|
-
_ = [C()], x = [C({ reflect: !0 }),
|
|
79
|
-
|
|
80
|
-
} }, metadata:
|
|
81
|
-
|
|
82
|
-
} }, metadata:
|
|
83
|
-
})(), c.styles = [
|
|
79
|
+
}, n = new WeakMap(), o = new WeakMap(), l = c, (() => {
|
|
80
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
|
|
81
|
+
_ = [C()], x = [C({ reflect: !0 }), D((s, r) => s.group?.size ? s.group.size === "xs" ? "s" : s.group.size : r)], m(c, null, _, { kind: "accessor", name: "value", static: !1, private: !1, access: { has: (s) => "value" in s, get: (s) => s.value, set: (s, r) => {
|
|
82
|
+
s.value = r;
|
|
83
|
+
} }, metadata: e }, k, f), m(c, null, x, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (s) => "size" in s, get: (s) => s.size, set: (s, r) => {
|
|
84
|
+
s.size = r;
|
|
85
|
+
} }, metadata: e }, v, g), m(null, a = { value: l }, t, { kind: "class", name: l.name, metadata: e }, null, i), l = a.value, e && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
86
|
+
})(), c.styles = [L, j], b(l, i), l;
|
|
84
87
|
})();
|
|
85
88
|
export {
|
|
86
89
|
V as SbbCheckboxPanelElement
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
const
|
|
1
|
+
import { isServer as E } from "lit";
|
|
2
|
+
const g = !E && !CSS.supports("selector(:state(loading))") ? class extends Set {
|
|
3
3
|
constructor(e) {
|
|
4
4
|
super(), this._host = e, this._host.addController(this);
|
|
5
5
|
}
|
|
@@ -19,7 +19,7 @@ const E = !g && !CSS.supports("selector(:state(loading))") ? class extends Set {
|
|
|
19
19
|
this._host.toggleAttribute(`state--${e}`, a);
|
|
20
20
|
}
|
|
21
21
|
} : null;
|
|
22
|
-
if (!
|
|
22
|
+
if (!E) {
|
|
23
23
|
let d = 0;
|
|
24
24
|
const e = (l) => l.shadowRoot?.host ?? (l instanceof Element ? l : (() => {
|
|
25
25
|
throw new Error("Unable to resolve related element! This should never happen.");
|
|
@@ -81,7 +81,7 @@ if (!g) {
|
|
|
81
81
|
t = t?.filter((r, h, b) => b.indexOf(r) === h) ?? null;
|
|
82
82
|
const n = i.get(s);
|
|
83
83
|
if (n?.observer?.disconnect(), t === null)
|
|
84
|
-
n && (delete n.elements[l.name], Object.keys(n).length ? Object.values(n.elements).reduce((r, h) => r.concat(h)).forEach((r) => n.observer.observe(r, a)) : i.delete(s));
|
|
84
|
+
n && (delete n.elements[l.name], Object.keys(n).length ? n.elements?.length && Object.values(n.elements).reduce((r, h) => r.concat(h)).forEach((r) => n.observer.observe(r, a)) : i.delete(s));
|
|
85
85
|
else if (n)
|
|
86
86
|
n.elements[l.name] = t, f(s, o, n.elements), Object.values(n.elements).reduce((r, h) => r.concat(h)).forEach((r) => n.observer.observe(r, a));
|
|
87
87
|
else {
|
|
@@ -105,8 +105,8 @@ const y = (d, ...e) => {
|
|
|
105
105
|
}, S = (d) => {
|
|
106
106
|
class e extends d {
|
|
107
107
|
constructor(...c) {
|
|
108
|
-
super(...c), this.internals = this.attachInternals(),
|
|
109
|
-
value: new
|
|
108
|
+
super(...c), this.internals = this.attachInternals(), g && Object.defineProperty(this.internals, "states", {
|
|
109
|
+
value: new g(this),
|
|
110
110
|
writable: !1,
|
|
111
111
|
configurable: !1,
|
|
112
112
|
enumerable: !1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-associated-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/form-associated-mixin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAuC,MAAM,KAAK,CAAC;AAK3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAEjF,OAAO,CAAC,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,mBAAmB;KAAG;IAChC,UAAU,aAAc,SAAQ,mBAAmB;KAAG;IACtD,UAAU,kBAAmB,SAAQ,OAAO,CAAC,mBAAmB,CAAC;KAAG;CACrE;AAoCD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,0BAA0B;IACtD,IAAW,IAAI,IAAI,eAAe,GAAG,IAAI,CAAC;IAC1C,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,IAA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,MAAM,kBAAkB,EAC1D,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAChC,IAAI;IACP,SAAS,CAAC,kBAAkB,CAAC,CAAC,SAAS,MAAM,kBAAkB,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI;IAC/E,SAAS,CAAC,QAAQ,IAAI,IAAI;IAC1B,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO;CACjE;AAED;;GAEG;AAEH,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,mBAAmB,CAAC,UAAU,GAAG,4BAA4B,CAAC,EAExE,YAAY,CAAC,KACZ,mBAAmB,CAAC,0BAA0B,CAAC,GAAG,CAgUpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,cAAc,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var b = (a) => {
|
|
2
2
|
throw TypeError(a);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var g = (a, s, r) => (
|
|
6
|
-
import { __esDecorate as
|
|
4
|
+
var v = (a, s, r) => s.has(a) || b("Cannot " + r);
|
|
5
|
+
var g = (a, s, r) => (v(a, s, "read from private field"), r ? r.call(a) : s.get(a)), _ = (a, s, r) => s.has(a) ? b("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, r), h = (a, s, r, d) => (v(a, s, "write to private field"), d ? d.call(a, r) : s.set(a, r), r);
|
|
6
|
+
import { __esDecorate as V, __runInitializers as c } from "tslib";
|
|
7
7
|
import { property as E, state as w } from "lit/decorators.js";
|
|
8
8
|
import { isWebkit as F } from "../dom.js";
|
|
9
9
|
const S = {
|
|
@@ -33,14 +33,14 @@ if (typeof ValidityState > "u") {
|
|
|
33
33
|
}
|
|
34
34
|
})), globalThis.ValidityState = a;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const C = (a) => (() => {
|
|
37
37
|
var o, n;
|
|
38
38
|
let r = a, d = [], f, m, y = [], p = [];
|
|
39
39
|
return n = class extends r {
|
|
40
40
|
constructor(...t) {
|
|
41
41
|
super(...t);
|
|
42
|
-
|
|
43
|
-
this._validityStates = (
|
|
42
|
+
_(this, o);
|
|
43
|
+
this._validityStates = (c(this, d), /* @__PURE__ */ new Map()), h(this, o, c(this, y, !1)), c(this, p), this.addEventListener?.("invalid", (e) => e.preventDefault());
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Returns the form owner of this element.
|
|
@@ -94,7 +94,7 @@ const A = (a) => (() => {
|
|
|
94
94
|
return g(this, o);
|
|
95
95
|
}
|
|
96
96
|
set formDisabled(t) {
|
|
97
|
-
|
|
97
|
+
h(this, o, t);
|
|
98
98
|
}
|
|
99
99
|
attributeChangedCallback(t, e, i) {
|
|
100
100
|
(t !== "name" || e !== i) && super.attributeChangedCallback(t, e, i);
|
|
@@ -122,15 +122,21 @@ const A = (a) => (() => {
|
|
|
122
122
|
t ? this.setValidityFlag("customError", t) : this.removeValidityFlag("customError");
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
|
-
* Is called whenever a surrounding
|
|
126
|
-
* @param disabled
|
|
125
|
+
* Is called whenever a surrounding fieldset changes disabled state.
|
|
127
126
|
*
|
|
128
127
|
* @internal
|
|
129
128
|
*/
|
|
130
129
|
formDisabledCallback(t) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
this.formDisabled = this._hasDisabledAncestor();
|
|
131
|
+
}
|
|
132
|
+
_hasDisabledAncestor() {
|
|
133
|
+
let t = this.parentElement;
|
|
134
|
+
for (; t; ) {
|
|
135
|
+
if (t.localName === "fieldset" && t.hasAttribute("disabled"))
|
|
136
|
+
return !0;
|
|
137
|
+
t = t.parentElement;
|
|
138
|
+
}
|
|
139
|
+
return !1;
|
|
134
140
|
}
|
|
135
141
|
requestUpdate(t, e, i) {
|
|
136
142
|
super.requestUpdate(t, e, i), t === "value" && this.updateFormValue(), this.hasUpdated && this.shouldValidate(t) && this.validate();
|
|
@@ -212,13 +218,13 @@ const A = (a) => (() => {
|
|
|
212
218
|
}
|
|
213
219
|
}, o = new WeakMap(), (() => {
|
|
214
220
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(r[Symbol.metadata] ?? null) : void 0;
|
|
215
|
-
f = [E()], m = [w()],
|
|
221
|
+
f = [E()], m = [w()], V(n, null, f, { kind: "setter", name: "name", static: !1, private: !1, access: { has: (e) => "name" in e, set: (e, i) => {
|
|
216
222
|
e.name = i;
|
|
217
|
-
} }, metadata: t }, null, d),
|
|
223
|
+
} }, metadata: t }, null, d), V(n, null, m, { kind: "accessor", name: "formDisabled", static: !1, private: !1, access: { has: (e) => "formDisabled" in e, get: (e) => e.formDisabled, set: (e, i) => {
|
|
218
224
|
e.formDisabled = i;
|
|
219
225
|
} }, metadata: t }, y, p), t && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
220
226
|
})(), n.formAssociated = !0, n;
|
|
221
227
|
})();
|
|
222
228
|
export {
|
|
223
|
-
|
|
229
|
+
C as SbbFormAssociatedMixin
|
|
224
230
|
};
|
package/core.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Tue,
|
|
3
|
+
* Generated on Tue, 05 Aug 2025 06:28:50 GMT
|
|
4
4
|
*/
|
|
5
5
|
*,
|
|
6
6
|
::before,
|
|
@@ -172,17 +172,17 @@
|
|
|
172
172
|
--sbb-color-white-alpha-60: rgba(255, 255, 255, 0.6);
|
|
173
173
|
--sbb-color-white-alpha-70: rgba(255, 255, 255, 0.7);
|
|
174
174
|
--sbb-color-white-alpha-80: rgba(255, 255, 255, 0.8);
|
|
175
|
-
--sbb-color-sky: #
|
|
175
|
+
--sbb-color-sky: #0074bf;
|
|
176
176
|
--sbb-color-night: #143a85;
|
|
177
177
|
--sbb-color-violet: #6f2282;
|
|
178
|
-
--sbb-color-pink: #
|
|
179
|
-
--sbb-color-autumn: #
|
|
178
|
+
--sbb-color-pink: #c7387a;
|
|
179
|
+
--sbb-color-autumn: #cf3b00;
|
|
180
180
|
--sbb-color-orange: #f27e00;
|
|
181
181
|
--sbb-color-peach: #fcbb00;
|
|
182
182
|
--sbb-color-lemon: #ffde15;
|
|
183
|
-
--sbb-color-brown: #
|
|
184
|
-
--sbb-color-green: #
|
|
185
|
-
--sbb-color-turquoise: #
|
|
183
|
+
--sbb-color-brown: #a05400;
|
|
184
|
+
--sbb-color-green: #008233;
|
|
185
|
+
--sbb-color-turquoise: #007e84;
|
|
186
186
|
/**
|
|
187
187
|
* Original Value: 3px
|
|
188
188
|
*/
|