@sbb-esta/lyne-elements 1.11.1 → 1.11.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/core/a11y.js +26 -26
- package/core/base-elements/action-base-element.d.ts.map +1 -1
- package/core/base-elements/link-base-element.d.ts.map +1 -1
- package/core/base-elements.js +24 -29
- package/core/dom/ssr.d.ts +2 -0
- package/core/dom/ssr.d.ts.map +1 -1
- package/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/core/mixins.js +64 -65
- package/custom-elements.json +2 -1
- package/development/core/a11y.js +2 -2
- package/development/core/base-elements/action-base-element.d.ts.map +1 -1
- package/development/core/base-elements/link-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +3 -8
- package/development/core/dom/ssr.d.ts +2 -0
- package/development/core/dom/ssr.d.ts.map +1 -1
- package/development/core/dom.js +1 -1
- package/development/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +3 -4
- package/package.json +1 -1
package/core/a11y.js
CHANGED
|
@@ -15,16 +15,16 @@ function U(t) {
|
|
|
15
15
|
function V(t) {
|
|
16
16
|
return w(t) || ["PageUp", "PageDown", "Home", "End"].includes(t.key);
|
|
17
17
|
}
|
|
18
|
-
function f(t, e,
|
|
19
|
-
return (t +
|
|
18
|
+
function f(t, e, n) {
|
|
19
|
+
return (t + n + e) % e;
|
|
20
20
|
}
|
|
21
21
|
function R(t) {
|
|
22
22
|
return t - 1;
|
|
23
23
|
}
|
|
24
24
|
const y = 0;
|
|
25
|
-
function Y(t, e,
|
|
25
|
+
function Y(t, e, n) {
|
|
26
26
|
const { prevKey: s, nextKey: r } = d();
|
|
27
|
-
return t.key === s || t.key === "ArrowUp" ? e < y ? R(
|
|
27
|
+
return t.key === s || t.key === "ArrowUp" ? e < y ? R(n) : f(e, n, -1) : t.key === r || t.key === "ArrowDown" ? e >= n ? y : f(e, n, 1) : e;
|
|
28
28
|
}
|
|
29
29
|
function A(t) {
|
|
30
30
|
return t.buttons === 0 || t.detail === 0;
|
|
@@ -44,8 +44,8 @@ class x {
|
|
|
44
44
|
this._mostRecentModality = "mouse", this._mostRecentTarget = null, this._options = {
|
|
45
45
|
...L
|
|
46
46
|
}, this._lastTouchMs = 0, this._onKeydown = (e) => {
|
|
47
|
-
var
|
|
48
|
-
(s = (
|
|
47
|
+
var n, s;
|
|
48
|
+
(s = (n = this._options) == null ? void 0 : n.ignoreKeys) != null && s.some((r) => r === e.keyCode) || (this._mostRecentModality = "keyboard", this._mostRecentTarget = a(e));
|
|
49
49
|
}, this._onMousedown = (e) => {
|
|
50
50
|
Date.now() - this._lastTouchMs < C || (this._mostRecentModality = A(e) ? "keyboard" : "mouse", this._mostRecentTarget = a(e));
|
|
51
51
|
}, this._onTouchstart = (e) => {
|
|
@@ -138,36 +138,36 @@ const I = typeof getComputedStyle > "u" || getComputedStyle(document.documentEle
|
|
|
138
138
|
"details",
|
|
139
139
|
"summary:not(:disabled)",
|
|
140
140
|
"[tabindex]"
|
|
141
|
-
].map((t) => `${t}:not([disabled],[tabindex="-1"])`).join(",");
|
|
142
|
-
function
|
|
143
|
-
const
|
|
141
|
+
].map((t) => `${t}:not([disabled]:not([disabled-interactive]),[tabindex="-1"])`).join(",");
|
|
142
|
+
function b(t, e) {
|
|
143
|
+
const n = /* @__PURE__ */ new Set();
|
|
144
144
|
function s(r, c) {
|
|
145
145
|
var i;
|
|
146
|
-
for (const
|
|
147
|
-
if (!(c && !c(
|
|
148
|
-
if (
|
|
146
|
+
for (const o of r)
|
|
147
|
+
if (!(c && !c(o))) {
|
|
148
|
+
if (o.nodeName === "SLOT") {
|
|
149
149
|
s(
|
|
150
|
-
Array.from(
|
|
150
|
+
Array.from(o.assignedElements()),
|
|
151
151
|
c
|
|
152
152
|
);
|
|
153
153
|
continue;
|
|
154
154
|
}
|
|
155
|
-
if (
|
|
155
|
+
if (o.matches(H) && ((e == null ? void 0 : e.includeInvisibleElements) ?? I.isVisible(o)) && n.add(o), e != null && e.findFirstFocusable && n.size > 0)
|
|
156
156
|
break;
|
|
157
|
-
if (
|
|
158
|
-
const u = Array.from(
|
|
157
|
+
if (o.children.length || (i = o.shadowRoot) != null && i.children.length) {
|
|
158
|
+
const u = Array.from(o.children).length ? Array.from(o.children) : Array.from(o.shadowRoot.children);
|
|
159
159
|
s(u, c);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
return s(t, e == null ? void 0 : e.filter), [...
|
|
163
|
+
return s(t, e == null ? void 0 : e.filter), [...n];
|
|
164
164
|
}
|
|
165
165
|
function X(t, e) {
|
|
166
|
-
const
|
|
166
|
+
const n = b(t, {
|
|
167
167
|
filter: e,
|
|
168
168
|
findFirstFocusable: !0
|
|
169
169
|
});
|
|
170
|
-
return
|
|
170
|
+
return n.length ? n[0] : null;
|
|
171
171
|
}
|
|
172
172
|
class j {
|
|
173
173
|
constructor() {
|
|
@@ -179,7 +179,7 @@ class j {
|
|
|
179
179
|
* @param options.filter filter function which is applied during searching for focusable element. If an element is filtered, also child elements are filtered.
|
|
180
180
|
* @param options.postFilter filter function which is applied after collecting focusable elements.
|
|
181
181
|
*/
|
|
182
|
-
trap(e,
|
|
182
|
+
trap(e, n) {
|
|
183
183
|
e.addEventListener(
|
|
184
184
|
"keydown",
|
|
185
185
|
(s) => {
|
|
@@ -187,15 +187,15 @@ class j {
|
|
|
187
187
|
return;
|
|
188
188
|
const r = Array.from(
|
|
189
189
|
e.shadowRoot.children || []
|
|
190
|
-
), i =
|
|
191
|
-
filter:
|
|
190
|
+
), i = b(r, {
|
|
191
|
+
filter: n == null ? void 0 : n.filter
|
|
192
192
|
}).filter(
|
|
193
|
-
(
|
|
193
|
+
(n == null ? void 0 : n.postFilter) ?? (() => !0)
|
|
194
194
|
);
|
|
195
195
|
if (!i.length)
|
|
196
196
|
return;
|
|
197
|
-
const
|
|
198
|
-
(
|
|
197
|
+
const o = i[0], u = i[i.length - 1], [h, g] = s.shiftKey ? [o, u] : [u, o];
|
|
198
|
+
(o.getRootNode().activeElement === h || u.getRootNode().activeElement === h) && (g.focus(), s.preventDefault());
|
|
199
199
|
},
|
|
200
200
|
{ signal: this._controller.signal }
|
|
201
201
|
);
|
|
@@ -210,7 +210,7 @@ export {
|
|
|
210
210
|
j as SbbFocusHandler,
|
|
211
211
|
W as SbbFocusVisibleWithinController,
|
|
212
212
|
X as getFirstFocusableElement,
|
|
213
|
-
|
|
213
|
+
b as getFocusableElements,
|
|
214
214
|
Y as getNextElementIndex,
|
|
215
215
|
F as hasGeometry,
|
|
216
216
|
I as interactivityChecker,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/action-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"action-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/action-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAe5D,8BAGsB,oBAAqB,SAAQ,UAAU;IAC3D,SAAS,KAAK,aAAa,IAAI,OAAO,GAAG,SAAS,CAGjD;IAED,SAAS,KAAK,wBAAwB,IAAI,OAAO,GAAG,SAAS,CAE5D;IAEe,iBAAiB,IAAI,IAAI;IAezC,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAexC,6DAA6D;IAC7D,SAAS,CAAC,cAAc,IAAI,cAAc;IAI1C,wDAAwD;cACrC,MAAM,IAAI,cAAc;CAG5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,6BAA6B,CAAC;AAErC,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAErE,uBAAuB;AACvB,8BAGsB,kBAAmB,SAAQ,oBAAoB;IACnE,0CAA0C;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEjC,uCAAuC;IACpB,MAAM,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAEpD,wEAAwE;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IAEhC,kEAAkE;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEvD,wEAAwE;IACjB,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9F,SAAS,CAAC,QAAQ,wBAAmC;;IASrD,gBAAgB;IACA,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI/D,gBAAgB;IACA,IAAI,IAAI,IAAI;IAI5B,gBAAgB;IACA,KAAK,IAAI,IAAI;IAI7B,OAAO,CAAC,qBAAqB,CAE3B;IAEF,mHAAmH;cAChG,MAAM,IAAI,cAAc;CAqB5C"}
|
package/core/base-elements.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { LitElement as w, html as m, isServer as g, nothing as o } from "lit";
|
|
2
|
-
import { hostAttributes as
|
|
3
|
-
import { getLocalName as _ } from "./dom.js";
|
|
2
|
+
import { hostAttributes as y } from "./decorators.js";
|
|
4
3
|
import { property as l } from "lit/decorators.js";
|
|
5
|
-
import { isEventPrevented as
|
|
6
|
-
import { SbbLanguageController as
|
|
7
|
-
import { i18nTargetOpensInNewWindow as
|
|
4
|
+
import { isEventPrevented as _, EventEmitter as b } from "./eventing.js";
|
|
5
|
+
import { SbbLanguageController as C } from "./controllers.js";
|
|
6
|
+
import { i18nTargetOpensInNewWindow as O } from "./i18n.js";
|
|
8
7
|
import "../screen-reader-only.js";
|
|
9
|
-
var
|
|
10
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
8
|
+
var E = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, D = (e, t, r, i) => {
|
|
9
|
+
for (var s = i > 1 ? void 0 : i ? $(t, r) : t, a = e.length - 1, n; a >= 0; a--)
|
|
11
10
|
(n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
12
|
-
return i && s &&
|
|
11
|
+
return i && s && E(t, r, s), s;
|
|
13
12
|
};
|
|
14
13
|
let v = class extends w {
|
|
15
14
|
get maybeDisabled() {
|
|
@@ -39,27 +38,23 @@ let v = class extends w {
|
|
|
39
38
|
}
|
|
40
39
|
/** Default render method for button-like components. */
|
|
41
40
|
render() {
|
|
42
|
-
return m`
|
|
43
|
-
<span class="sbb-action-base ${this.localName ?? _(this)}">
|
|
44
|
-
${this.renderTemplate()}
|
|
45
|
-
</span>
|
|
46
|
-
`;
|
|
41
|
+
return m` <span class="sbb-action-base ${this.localName}">${this.renderTemplate()}</span> `;
|
|
47
42
|
}
|
|
48
43
|
};
|
|
49
|
-
v =
|
|
50
|
-
|
|
44
|
+
v = D([
|
|
45
|
+
y({
|
|
51
46
|
"data-action": ""
|
|
52
47
|
})
|
|
53
48
|
], v);
|
|
54
|
-
var
|
|
55
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
49
|
+
var k = Object.defineProperty, A = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
|
|
50
|
+
for (var s = i > 1 ? void 0 : i ? A(t, r) : t, a = e.length - 1, n; a >= 0; a--)
|
|
56
51
|
(n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
57
|
-
return i && s &&
|
|
52
|
+
return i && s && k(t, r, s), s;
|
|
58
53
|
};
|
|
59
54
|
let h = class extends v {
|
|
60
55
|
constructor() {
|
|
61
56
|
if (super(), this.type = "button", this._handleButtonClick = async (e) => {
|
|
62
|
-
if (this.type === "button" || await
|
|
57
|
+
if (this.type === "button" || await _(e))
|
|
63
58
|
return;
|
|
64
59
|
const t = this.form ? this.ownerDocument.querySelector(`form#${this.form}`) : this.closest("form");
|
|
65
60
|
if (t)
|
|
@@ -128,20 +123,20 @@ u([
|
|
|
128
123
|
l()
|
|
129
124
|
], h.prototype, "form", 2);
|
|
130
125
|
h = u([
|
|
131
|
-
|
|
126
|
+
y({
|
|
132
127
|
role: "button",
|
|
133
128
|
tabindex: "0",
|
|
134
129
|
"data-button": ""
|
|
135
130
|
})
|
|
136
131
|
], h);
|
|
137
|
-
var
|
|
138
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
132
|
+
var P = Object.defineProperty, S = Object.getOwnPropertyDescriptor, d = (e, t, r, i) => {
|
|
133
|
+
for (var s = i > 1 ? void 0 : i ? S(t, r) : t, a = e.length - 1, n; a >= 0; a--)
|
|
139
134
|
(n = e[a]) && (s = (i ? n(t, r, s) : n(s)) || s);
|
|
140
|
-
return i && s &&
|
|
135
|
+
return i && s && P(t, r, s), s;
|
|
141
136
|
};
|
|
142
137
|
let p = class extends v {
|
|
143
138
|
constructor() {
|
|
144
|
-
super(), this.language = new
|
|
139
|
+
super(), this.language = new C(this), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : o, g || this.setupBaseEventHandlers();
|
|
145
140
|
}
|
|
146
141
|
/** @internal */
|
|
147
142
|
focus(e) {
|
|
@@ -162,7 +157,7 @@ let p = class extends v {
|
|
|
162
157
|
render() {
|
|
163
158
|
return m`
|
|
164
159
|
<a
|
|
165
|
-
class="sbb-action-base ${this.localName
|
|
160
|
+
class="sbb-action-base ${this.localName}"
|
|
166
161
|
href=${this.href || o}
|
|
167
162
|
?download=${this.download}
|
|
168
163
|
target=${this.target || o}
|
|
@@ -173,7 +168,7 @@ let p = class extends v {
|
|
|
173
168
|
>
|
|
174
169
|
${this.renderTemplate()}
|
|
175
170
|
${this.href && this.target === "_blank" ? m`<sbb-screen-reader-only
|
|
176
|
-
>. ${
|
|
171
|
+
>. ${O[this.language.current]}</sbb-screen-reader-only
|
|
177
172
|
>` : o}
|
|
178
173
|
</a>
|
|
179
174
|
`;
|
|
@@ -195,7 +190,7 @@ d([
|
|
|
195
190
|
l({ attribute: "accessibility-label" })
|
|
196
191
|
], p.prototype, "accessibilityLabel", 2);
|
|
197
192
|
p = d([
|
|
198
|
-
|
|
193
|
+
y({
|
|
199
194
|
"data-link": ""
|
|
200
195
|
})
|
|
201
196
|
], p);
|
|
@@ -233,10 +228,10 @@ c.events = {
|
|
|
233
228
|
willClose: "willClose",
|
|
234
229
|
didClose: "didClose"
|
|
235
230
|
};
|
|
236
|
-
let
|
|
231
|
+
let f = c;
|
|
237
232
|
export {
|
|
238
233
|
v as SbbActionBaseElement,
|
|
239
234
|
h as SbbButtonBaseElement,
|
|
240
235
|
p as SbbLinkBaseElement,
|
|
241
|
-
|
|
236
|
+
f as SbbOpenCloseBaseElement
|
|
242
237
|
};
|
package/core/dom/ssr.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { LitElement } from 'lit';
|
|
|
6
6
|
* https://github.com/lit/lit/blob/main/packages/labs/ssr-dom-shim/src.ts (See CustomElementRegistryShim)
|
|
7
7
|
*
|
|
8
8
|
* Can be removed once https://github.com/lit/lit/pull/4553 is merged/released.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Will be removed with next major version
|
|
9
11
|
*/
|
|
10
12
|
export declare function getLocalName(element: LitElement): string;
|
|
11
13
|
//# sourceMappingURL=ssr.d.ts.map
|
package/core/dom/ssr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/ssr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAItC
|
|
1
|
+
{"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/ssr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAItC;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAcxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-slot-list-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/named-slot-list-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAW,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"named-slot-list-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/named-slot-list-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAW,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAErF,OAAO,6BAA6B,CAAC;AAKrC,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,CAC1B,CAAC,SAAS,yBAAyB,CAAC,CAAC,CAAC,EACtC,CAAC,SAAS,WAAW,GAAG,WAAW,IACjC,CAAC,GAAG;IAAE,YAAY,EAAE,CAAC,EAAE,CAAA;CAAE,CAAC;AAE9B,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,yBAAyB,CACrD,CAAC,SAAS,WAAW,CACrB,SAAQ,qBAAqB;IAC7B,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC;IACjD,SAAS,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC;IACrC,SAAS,CAAC,UAAU,CAClB,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,EACD,kBAAkB,CAAC,EAAE;QACnB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;KAChC,GACA,cAAc;IACjB,SAAS,CAAC,eAAe,IAAI,sBAAsB,EAAE;IACrD,SAAS,CAAC,gBAAgB,IAAI,cAAc;CAC7C;AAGD,eAAO,MAAM,qBAAqB,GAChC,CAAC,SAAS,WAAW,EACrB,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,cAE7B,CAAC,KACZ,mBAAmB,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,GAAG,CAsItD,CAAC"}
|
package/core/mixins.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { property as l, state as
|
|
2
|
-
import { defaultConverter as v, html as b, nothing as c, css as
|
|
3
|
-
import { hostAttributes as
|
|
4
|
-
import { preventScrollOnSpacebarPress as f, EventEmitter as
|
|
5
|
-
import { getLocalName as m } from "./dom.js";
|
|
1
|
+
import { property as l, state as y } from "lit/decorators.js";
|
|
2
|
+
import { defaultConverter as v, html as b, nothing as c, css as C } from "lit";
|
|
3
|
+
import { hostAttributes as k } from "./decorators.js";
|
|
4
|
+
import { preventScrollOnSpacebarPress as f, EventEmitter as w } from "./eventing.js";
|
|
6
5
|
import "../screen-reader-only.js";
|
|
7
|
-
var
|
|
8
|
-
for (var e = t > 1 ? void 0 : t ?
|
|
6
|
+
var S = Object.defineProperty, E = Object.getOwnPropertyDescriptor, x = (n, s, r, t) => {
|
|
7
|
+
for (var e = t > 1 ? void 0 : t ? E(s, r) : s, i = n.length - 1, a; i >= 0; i--)
|
|
9
8
|
(a = n[i]) && (e = (t ? a(s, r, e) : a(e)) || e);
|
|
10
|
-
return t && e &&
|
|
9
|
+
return t && e && S(s, r, e), e;
|
|
11
10
|
};
|
|
12
11
|
const p = (n) => {
|
|
13
12
|
class s extends n {
|
|
@@ -28,26 +27,26 @@ const p = (n) => {
|
|
|
28
27
|
return !1;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
return
|
|
30
|
+
return x([
|
|
32
31
|
l({ reflect: !0, type: Boolean })
|
|
33
32
|
], s.prototype, "disabled", 1), s;
|
|
34
|
-
},
|
|
33
|
+
}, $ = (n) => {
|
|
35
34
|
class s extends n {
|
|
36
35
|
constructor() {
|
|
37
36
|
super(...arguments), this.disabledInteractive = !1;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
|
-
return
|
|
39
|
+
return x([
|
|
41
40
|
l({ attribute: "disabled-interactive", type: Boolean })
|
|
42
41
|
], s.prototype, "disabledInteractive", 2), s;
|
|
43
|
-
},
|
|
44
|
-
class s extends
|
|
42
|
+
}, G = (n) => {
|
|
43
|
+
class s extends $(p(n)) {
|
|
45
44
|
willUpdate(t) {
|
|
46
45
|
super.willUpdate(t), !(!t.has("disabled") && !t.has("disabledInteractive")) && (!this.disabled || this.disabledInteractive ? this.setAttribute("tabindex", "0") : this.removeAttribute("tabindex"), this.disabled ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"));
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
return s;
|
|
50
|
-
},
|
|
49
|
+
}, J = (n) => {
|
|
51
50
|
class s extends p(n) {
|
|
52
51
|
willUpdate(t) {
|
|
53
52
|
super.willUpdate(t), t.has("disabled") && (this.disabled ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"));
|
|
@@ -55,12 +54,12 @@ const p = (n) => {
|
|
|
55
54
|
}
|
|
56
55
|
return s;
|
|
57
56
|
};
|
|
58
|
-
var
|
|
59
|
-
for (var e = t > 1 ? void 0 : t ?
|
|
57
|
+
var P = Object.defineProperty, O = Object.getOwnPropertyDescriptor, h = (n, s, r, t) => {
|
|
58
|
+
for (var e = t > 1 ? void 0 : t ? O(s, r) : s, i = n.length - 1, a; i >= 0; i--)
|
|
60
59
|
(a = n[i]) && (e = (t ? a(s, r, e) : a(e)) || e);
|
|
61
|
-
return t && e &&
|
|
60
|
+
return t && e && P(s, r, e), e;
|
|
62
61
|
};
|
|
63
|
-
const
|
|
62
|
+
const R = (n) => {
|
|
64
63
|
const r = class r extends n {
|
|
65
64
|
constructor() {
|
|
66
65
|
super(...arguments), this._value = null, this.internals = this.attachInternals(), this.formDisabled = !1;
|
|
@@ -158,15 +157,15 @@ const A = (n) => {
|
|
|
158
157
|
], s.prototype, "name", 1), h([
|
|
159
158
|
l()
|
|
160
159
|
], s.prototype, "value", 1), h([
|
|
161
|
-
|
|
160
|
+
y()
|
|
162
161
|
], s.prototype, "formDisabled", 2), s;
|
|
163
162
|
};
|
|
164
|
-
var
|
|
165
|
-
for (var e =
|
|
163
|
+
var A = Object.defineProperty, D = Object.getOwnPropertyDescriptor, q = (n, s, r, t) => {
|
|
164
|
+
for (var e = D(s, r), i = n.length - 1, a; i >= 0; i--)
|
|
166
165
|
(a = n[i]) && (e = a(s, r, e) || e);
|
|
167
|
-
return e &&
|
|
166
|
+
return e && A(s, r, e), e;
|
|
168
167
|
};
|
|
169
|
-
const
|
|
168
|
+
const M = (n) => {
|
|
170
169
|
class s extends n {
|
|
171
170
|
constructor() {
|
|
172
171
|
super(...arguments), this._required = !1;
|
|
@@ -188,17 +187,17 @@ const L = (n) => {
|
|
|
188
187
|
return !1;
|
|
189
188
|
}
|
|
190
189
|
}
|
|
191
|
-
return
|
|
190
|
+
return q([
|
|
192
191
|
l({ reflect: !0, type: Boolean })
|
|
193
192
|
], s.prototype, "required"), s;
|
|
194
193
|
};
|
|
195
|
-
var U = Object.defineProperty,
|
|
196
|
-
for (var e = t > 1 ? void 0 : t ?
|
|
194
|
+
var U = Object.defineProperty, L = Object.getOwnPropertyDescriptor, m = (n, s, r, t) => {
|
|
195
|
+
for (var e = t > 1 ? void 0 : t ? L(s, r) : s, i = n.length - 1, a; i >= 0; i--)
|
|
197
196
|
(a = n[i]) && (e = (t ? a(s, r, e) : a(e)) || e);
|
|
198
197
|
return t && e && U(s, r, e), e;
|
|
199
198
|
};
|
|
200
|
-
const
|
|
201
|
-
let s = class extends p(
|
|
199
|
+
const Q = (n) => {
|
|
200
|
+
let s = class extends p(M(R(n))) {
|
|
202
201
|
constructor() {
|
|
203
202
|
super(), this._attributeMutationBlocked = !1, this._checked = !1, this._handleKeyboardInteraction = (r) => {
|
|
204
203
|
r.key === " " && this._handleUserInteraction();
|
|
@@ -247,7 +246,7 @@ const Y = (n) => {
|
|
|
247
246
|
this.checked ? this.internals.setFormValue(this.value, `${this.checked}`) : this.internals.setFormValue(null);
|
|
248
247
|
}
|
|
249
248
|
};
|
|
250
|
-
return
|
|
249
|
+
return m([
|
|
251
250
|
l({
|
|
252
251
|
type: Boolean,
|
|
253
252
|
converter: {
|
|
@@ -259,12 +258,12 @@ const Y = (n) => {
|
|
|
259
258
|
}
|
|
260
259
|
}
|
|
261
260
|
})
|
|
262
|
-
], s.prototype, "checked", 1), s =
|
|
263
|
-
|
|
261
|
+
], s.prototype, "checked", 1), s = m([
|
|
262
|
+
k({
|
|
264
263
|
tabindex: "0"
|
|
265
264
|
})
|
|
266
265
|
], s), s;
|
|
267
|
-
},
|
|
266
|
+
}, I = (n) => {
|
|
268
267
|
class s extends n {
|
|
269
268
|
constructor(...t) {
|
|
270
269
|
var e;
|
|
@@ -306,21 +305,21 @@ const Y = (n) => {
|
|
|
306
305
|
}
|
|
307
306
|
return s;
|
|
308
307
|
};
|
|
309
|
-
var B = Object.defineProperty,
|
|
308
|
+
var B = Object.defineProperty, N = (n, s, r, t) => {
|
|
310
309
|
for (var e = void 0, i = n.length - 1, a; i >= 0; i--)
|
|
311
310
|
(a = n[i]) && (e = a(s, r, e) || e);
|
|
312
311
|
return e && B(s, r, e), e;
|
|
313
312
|
};
|
|
314
|
-
const
|
|
315
|
-
class s extends
|
|
313
|
+
const _ = "data-ssr-child-count", g = "li", W = (n) => {
|
|
314
|
+
class s extends I(n) {
|
|
316
315
|
constructor() {
|
|
317
316
|
super(...arguments), this.listChildren = [], this._handleSlotchange = () => {
|
|
318
317
|
const t = Array.from(this.children ?? []).filter(
|
|
319
318
|
(e) => this.listChildLocalNames.includes(e.localName)
|
|
320
319
|
);
|
|
321
320
|
t.length === this.listChildren.length && this.listChildren.every((e, i) => t[i] === e) || (this.listChildren.filter((e) => !t.includes(e)).forEach((e) => e.removeAttribute("slot")), this.listChildren = t, this.listChildren.forEach(
|
|
322
|
-
(e, i) => e.setAttribute("slot", `${
|
|
323
|
-
), this.removeAttribute(
|
|
321
|
+
(e, i) => e.setAttribute("slot", `${g}-${i}`)
|
|
322
|
+
), this.removeAttribute(_));
|
|
324
323
|
};
|
|
325
324
|
}
|
|
326
325
|
connectedCallback() {
|
|
@@ -344,7 +343,7 @@ const g = "data-ssr-child-count", y = "li", Z = (n) => {
|
|
|
344
343
|
const i = this.listSlotEntries(e);
|
|
345
344
|
return i.length >= 2 ? b`
|
|
346
345
|
<ul
|
|
347
|
-
class=${t.class ||
|
|
346
|
+
class=${t.class || this.localName}
|
|
348
347
|
aria-label=${t.ariaLabel || c}
|
|
349
348
|
aria-labelledby=${t.ariaLabelledby || c}
|
|
350
349
|
>
|
|
@@ -358,7 +357,7 @@ const g = "data-ssr-child-count", y = "li", Z = (n) => {
|
|
|
358
357
|
</ul>
|
|
359
358
|
${this.renderHiddenSlot()}
|
|
360
359
|
` : i.length === 1 ? b`<sbb-screen-reader-only>${t.ariaLabel}</sbb-screen-reader-only>
|
|
361
|
-
<span class=${t.class ||
|
|
360
|
+
<span class=${t.class || this.localName}>
|
|
362
361
|
<span><slot name=${i[0].name}></slot></span>
|
|
363
362
|
</span>
|
|
364
363
|
${this.renderHiddenSlot()} ` : this.renderHiddenSlot();
|
|
@@ -373,10 +372,10 @@ const g = "data-ssr-child-count", y = "li", Z = (n) => {
|
|
|
373
372
|
* children to be passed via the `data-ssr-child-count` attribute value.
|
|
374
373
|
*/
|
|
375
374
|
listSlotEntries(t) {
|
|
376
|
-
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(
|
|
375
|
+
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(_) ?? 0) })).map((i, a) => {
|
|
377
376
|
var o;
|
|
378
377
|
return {
|
|
379
|
-
name: `${
|
|
378
|
+
name: `${g}-${a}`,
|
|
380
379
|
ariaHidden: ((o = t == null ? void 0 : t.localNameVisualOnly) == null ? void 0 : o.includes(i.localName)) ?? !1
|
|
381
380
|
};
|
|
382
381
|
});
|
|
@@ -390,35 +389,35 @@ const g = "data-ssr-child-count", y = "li", Z = (n) => {
|
|
|
390
389
|
return b`<span hidden><slot></slot></span>`;
|
|
391
390
|
}
|
|
392
391
|
}
|
|
393
|
-
return
|
|
394
|
-
|
|
392
|
+
return N([
|
|
393
|
+
y()
|
|
395
394
|
], s.prototype, "listChildren"), s;
|
|
396
395
|
};
|
|
397
|
-
var
|
|
396
|
+
var V = Object.defineProperty, j = (n, s, r, t) => {
|
|
398
397
|
for (var e = void 0, i = n.length - 1, a; i >= 0; i--)
|
|
399
398
|
(a = n[i]) && (e = a(s, r, e) || e);
|
|
400
|
-
return e &&
|
|
399
|
+
return e && V(s, r, e), e;
|
|
401
400
|
};
|
|
402
|
-
const
|
|
401
|
+
const Y = (n) => {
|
|
403
402
|
class s extends n {
|
|
404
403
|
constructor() {
|
|
405
404
|
super(...arguments), this.negative = !1;
|
|
406
405
|
}
|
|
407
406
|
}
|
|
408
|
-
return
|
|
407
|
+
return j([
|
|
409
408
|
l({ reflect: !0, type: Boolean })
|
|
410
409
|
], s.prototype, "negative"), s;
|
|
411
410
|
};
|
|
412
|
-
var
|
|
411
|
+
var H = Object.defineProperty, u = (n, s, r, t) => {
|
|
413
412
|
for (var e = void 0, i = n.length - 1, a; i >= 0; i--)
|
|
414
413
|
(a = n[i]) && (e = a(s, r, e) || e);
|
|
415
|
-
return e &&
|
|
414
|
+
return e && H(s, r, e), e;
|
|
416
415
|
};
|
|
417
|
-
const
|
|
416
|
+
const Z = (n) => {
|
|
418
417
|
var t;
|
|
419
418
|
const s = (t = class extends n {
|
|
420
419
|
constructor() {
|
|
421
|
-
super(...arguments), this.color = "white", this.borderless = !1, this._panelConnected = new
|
|
420
|
+
super(...arguments), this.color = "white", this.borderless = !1, this._panelConnected = new w(
|
|
422
421
|
this,
|
|
423
422
|
t.events.panelConnected,
|
|
424
423
|
{ bubbles: !0 }
|
|
@@ -437,7 +436,7 @@ const te = (n) => {
|
|
|
437
436
|
], s.prototype, "borderless"), u([
|
|
438
437
|
l()
|
|
439
438
|
], s.prototype, "expansionState"), s;
|
|
440
|
-
},
|
|
439
|
+
}, ee = (n) => {
|
|
441
440
|
class s extends n {
|
|
442
441
|
constructor() {
|
|
443
442
|
super(...arguments), this._updatePromise = Promise.resolve(), this._updateResolve = () => {
|
|
@@ -455,19 +454,19 @@ const te = (n) => {
|
|
|
455
454
|
}
|
|
456
455
|
}
|
|
457
456
|
return s;
|
|
458
|
-
},
|
|
457
|
+
}, te = C`:host{--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-white) );--sbb-selection-panel-border-color: var(--sbb-color-cloud);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-charcoal);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-milk) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-color-charcoal);--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media (forced-colors: active){.sbb-selection-panel:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius)}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--sbb-selection-panel-border-radius);overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{display:block;color:var(--sbb-selection-panel-subtext-color);padding-inline-start:var(--sbb-spacing-fixed-8x)}:host(:not([data-slot-names~=subtext])) slot[name=subtext]{display:none}`;
|
|
459
458
|
export {
|
|
460
|
-
|
|
459
|
+
$ as SbbDisabledInteractiveMixin,
|
|
461
460
|
p as SbbDisabledMixin,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
461
|
+
G as SbbDisabledTabIndexActionMixin,
|
|
462
|
+
J as SbbFocusableDisabledActionMixin,
|
|
463
|
+
Q as SbbFormAssociatedCheckboxMixin,
|
|
464
|
+
R as SbbFormAssociatedMixin,
|
|
465
|
+
I as SbbHydrationMixin,
|
|
466
|
+
W as SbbNamedSlotListMixin,
|
|
467
|
+
Y as SbbNegativeMixin,
|
|
468
|
+
Z as SbbPanelMixin,
|
|
469
|
+
M as SbbRequiredMixin,
|
|
470
|
+
ee as SbbUpdateSchedulerMixin,
|
|
471
|
+
te as panelCommonStyle
|
|
473
472
|
};
|
package/custom-elements.json
CHANGED
|
@@ -30931,7 +30931,8 @@
|
|
|
30931
30931
|
}
|
|
30932
30932
|
}
|
|
30933
30933
|
],
|
|
30934
|
-
"description": "In SSR the local/tag name is not available on the class instance, but it is available\nin the shim customElements registry.\n\nhttps://github.com/lit/lit/blob/main/packages/labs/ssr-dom-shim/src.ts (See CustomElementRegistryShim)\n\nCan be removed once https://github.com/lit/lit/pull/4553 is merged/released."
|
|
30934
|
+
"description": "In SSR the local/tag name is not available on the class instance, but it is available\nin the shim customElements registry.\n\nhttps://github.com/lit/lit/blob/main/packages/labs/ssr-dom-shim/src.ts (See CustomElementRegistryShim)\n\nCan be removed once https://github.com/lit/lit/pull/4553 is merged/released.",
|
|
30935
|
+
"deprecated": "Will be removed with next major version"
|
|
30935
30936
|
}
|
|
30936
30937
|
],
|
|
30937
30938
|
"exports": [
|