scb-wc 0.1.94 → 0.1.96
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/package.json +4 -2
- package/shared/lazy-focus-ring.js +17 -0
- package/shared/lazy-ripple.js +6 -0
- package/shared/scb-icon-svg.js +36 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.96",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"scb-wc.bundle.js",
|
|
18
18
|
"scb-*.js",
|
|
19
19
|
"scb-*/**/*.js",
|
|
20
|
+
"shared/**/*.js",
|
|
20
21
|
"mvc/**/*.js"
|
|
21
22
|
],
|
|
22
23
|
"peerDependencies": {
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
"mvc/**/*",
|
|
38
39
|
"scb-*.js",
|
|
39
40
|
"scb-*/**/*.js",
|
|
41
|
+
"shared/**/*.js",
|
|
40
42
|
"fonts/**/*",
|
|
41
43
|
"blazor/**/*",
|
|
42
44
|
"!**/*.map",
|
|
@@ -460,5 +462,5 @@
|
|
|
460
462
|
},
|
|
461
463
|
"./mvc/*": "./mvc/*"
|
|
462
464
|
},
|
|
463
|
-
"buildHash": "
|
|
465
|
+
"buildHash": "34B51BC64222944BDAA3273655EC4A5F1BF6BFD3DAEE4BC6CFF1331962A9E0B7"
|
|
464
466
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/scb-components/shared/lazy-focus-ring.ts
|
|
2
|
+
var e, t = () => {
|
|
3
|
+
customElements.get("md-focus-ring") || (e ??= import("@material/web/focus/md-focus-ring.js").then(() => void 0));
|
|
4
|
+
}, n = (e) => {
|
|
5
|
+
let n = e.composedPath()[0];
|
|
6
|
+
n instanceof HTMLElement && n.matches(":focus-visible") && t();
|
|
7
|
+
}, r = (e) => {
|
|
8
|
+
e.key === "Tab" && t();
|
|
9
|
+
}, i = (...e) => {
|
|
10
|
+
let t = n, i = r;
|
|
11
|
+
for (let n of e) n.addEventListener("focusin", t), n.addEventListener("keydown", i);
|
|
12
|
+
return () => {
|
|
13
|
+
for (let n of e) n.removeEventListener("focusin", t), n.removeEventListener("keydown", i);
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as addLazyFocusRingListeners, n as ensureFocusRingOnFocusVisible, r as ensureFocusRingOnTab, t as ensureFocusRingReady };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/scb-components/shared/lazy-ripple.ts
|
|
2
|
+
var e, t = () => (e ??= import("@material/web/ripple/ripple.js").then(() => void 0), e), n = async (e, t, n, r = !1) => {
|
|
3
|
+
!e || !t || (e.control = t, t.matches(":hover") && (e.hovered = !0), n?.type === "pointerenter" ? e.handlePointerenter?.(n) : n?.type === "pointerdown" && await e.handlePointerdown?.(n), r && e.handleClick?.());
|
|
4
|
+
};
|
|
5
|
+
//#endregion
|
|
6
|
+
export { t as ensureRippleReady, n as syncRippleToControl };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { nothing as e, svg as t } from "lit";
|
|
2
|
+
//#region src/scb-components/shared/scb-icon-svg.ts
|
|
3
|
+
var n = new Map([
|
|
4
|
+
["arrow_forward", "M12 4l-1.41 1.41L15.17 10H4v2h11.17l-4.58 4.59L12 18l8-8-8-8Z"],
|
|
5
|
+
["chevron_left", "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59Z"],
|
|
6
|
+
["chevron_right", "M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12l-4.58 4.59Z"],
|
|
7
|
+
["close", "M18.3 5.71 16.89 4.3 12 9.17 7.11 4.3 5.7 5.71 10.59 10.6 5.7 15.49 7.11 16.9 12 12.01l4.89 4.89 1.41-1.41-4.89-4.89 4.89-4.89Z"],
|
|
8
|
+
["menu", "M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z"],
|
|
9
|
+
["open_in_new", "M14 3h7v7h-2V6.41l-9.83 9.83-1.41-1.41L17.59 5H14V3ZM5 5h6v2H7v10h10v-4h2v6H5V5Z"],
|
|
10
|
+
["payments", "M3 6h18v12H3V6Zm2 2v8h14V8H5Zm7 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM7 9h2v2H7V9Zm8 4h2v2h-2v-2Z"],
|
|
11
|
+
["person_4", "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 8c0-3.31 3.58-6 8-6s8 2.69 8 6v1H4v-1Z"],
|
|
12
|
+
["price_change", "M12 2 3 6v6c0 5 3.84 9.74 9 10 5.16-.26 9-5 9-10V6l-9-4Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Zm-7 6.5V15h2v2.6a9.1 9.1 0 0 1-2-3.1Zm12-1.9V15h2a9.1 9.1 0 0 1-2 3.1Z"],
|
|
13
|
+
["search", "M9.5 3a6.5 6.5 0 0 1 5.17 10.44l5.45 5.44-1.42 1.42-5.44-5.45A6.5 6.5 0 1 1 9.5 3Zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"],
|
|
14
|
+
["trending_up", "M16 6h5v5h-2V9.41l-6.17 6.17-4-4L3.41 17 2 15.59l6.83-6.83 4 4L17.59 8H16V6Z"],
|
|
15
|
+
["volume_up", "M3 9v6h4l5 5V4L7 9H3Zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.06A4.5 4.5 0 0 0 16.5 12Zm-2.5-8.7v2.06A7 7 0 0 1 18 12a7 7 0 0 1-4 6.64v2.06A9 9 0 0 0 20 12a9 9 0 0 0-6-8.7Z"],
|
|
16
|
+
["work", "M10 4h4a2 2 0 0 1 2 2v2h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h4V6a2 2 0 0 1 2-2Zm0 4h4V6h-4v2Zm-6 2v8h16v-8H4Zm6 3h4v2h-4v-2Z"]
|
|
17
|
+
]);
|
|
18
|
+
function r(e) {
|
|
19
|
+
return n.has((e || "").trim());
|
|
20
|
+
}
|
|
21
|
+
function i(r, i = "material-icon", a) {
|
|
22
|
+
let o = (r || "").trim(), s = n.get(o);
|
|
23
|
+
return s ? t`
|
|
24
|
+
<svg
|
|
25
|
+
class=${`${i} scb-svg-icon`}
|
|
26
|
+
part=${a || e}
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
viewBox="0 0 24 24"
|
|
29
|
+
focusable="false"
|
|
30
|
+
>
|
|
31
|
+
<path d=${s}></path>
|
|
32
|
+
</svg>
|
|
33
|
+
` : e;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { r as hasScbSvgIcon, i as renderScbIcon };
|