@greypan/web-ui 10.1.0 → 10.1.1
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/README.CN.md +10 -1
- package/README.md +12 -1
- package/dist/components/autocomplete/index.js +62 -60
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/collapse/index.js.map +1 -1
- package/dist/components/collapse/style.js +1 -1
- package/dist/components/collapse/style.js.map +1 -1
- package/dist/components/context-menu/index.d.ts +16 -0
- package/dist/components/context-menu/index.js +9 -4
- package/dist/components/context-menu/index.js.map +1 -1
- package/dist/components/dialog/index.js +39 -37
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/drawer/index.js +64 -62
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/empty/style.js +1 -1
- package/dist/components/empty/style.js.map +1 -1
- package/dist/components/segmented/index.js +17 -7
- package/dist/components/segmented/index.js.map +1 -1
- package/dist/components/select/index.js +45 -43
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/toast/manager.js +1 -1
- package/dist/components/toast/manager.js.map +1 -1
- package/dist/scrollbars/internal.js +6 -0
- package/dist/scrollbars/internal.js.map +1 -0
- package/dist/scrollbars/style.css +1 -1
- package/dist/shared/menu-portal/menu-portal.js +16 -14
- package/dist/shared/menu-portal/menu-portal.js.map +1 -1
- package/dist/shared/overlay/overlay-root.js +13 -12
- package/dist/shared/overlay/overlay-root.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import e from "../../assets/glass.js";
|
|
2
2
|
import t from "../../assets/overlay-motion.js";
|
|
3
|
-
import n from "../../
|
|
4
|
-
import r from "../../assets/
|
|
3
|
+
import n from "../../scrollbars/internal.js";
|
|
4
|
+
import r from "../../assets/menu-portal.js";
|
|
5
|
+
import i from "../../assets/toast-containers.js";
|
|
5
6
|
//#region src/shared/overlay/overlay-root.ts
|
|
6
|
-
var
|
|
7
|
-
function
|
|
7
|
+
var a = "data-wui-overlay-root", o = `${e}\n${i}\n${r}\n${t}\n${n}`;
|
|
8
|
+
function s(e) {
|
|
8
9
|
let t = document.createElement("style");
|
|
9
|
-
t.textContent =
|
|
10
|
+
t.textContent = o, e.prepend(t);
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
let e = document.querySelector(`[${
|
|
13
|
-
if (e?.shadowRoot) return
|
|
12
|
+
function c() {
|
|
13
|
+
let e = document.querySelector(`[${a}]`);
|
|
14
|
+
if (e?.shadowRoot) return l(e.shadowRoot);
|
|
14
15
|
let t = document.createElement("div");
|
|
15
|
-
t.setAttribute(
|
|
16
|
+
t.setAttribute(a, "");
|
|
16
17
|
let n = t.attachShadow({ mode: "open" });
|
|
17
|
-
return
|
|
18
|
+
return s(n), document.body.appendChild(t), l(n);
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
+
function l(e) {
|
|
20
21
|
let t = e.querySelector("[data-wui-overlay-container]");
|
|
21
22
|
if (t) return t;
|
|
22
23
|
let n = document.createElement("div");
|
|
23
24
|
return n.setAttribute("data-wui-overlay-container", ""), e.appendChild(n), n;
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
|
-
export {
|
|
27
|
+
export { s as applyOverlayRootStyles, c as getFallbackOverlayRoot, l as getOverlayContainer };
|
|
27
28
|
|
|
28
29
|
//# sourceMappingURL=overlay-root.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-root.js","names":[],"sources":["../../../src/shared/overlay/overlay-root.ts"],"sourcesContent":["import glass from '@/assets/glass.css?inline'\nimport menuPortalStyle from '@/assets/menu-portal.css?inline'\nimport overlayMotion from '@/assets/overlay-motion.css?inline'\nimport toastContainerStyle from '@/assets/toast-containers.css?inline'\n\n/**\n * Theme-owned overlay root plumbing: applies shared overlay styles to a theme\n * root and lazily creates the document-level fallback overlay root.\n */\nconst FALLBACK_ROOT_ATTRIBUTE = 'data-wui-overlay-root'\n\nconst overlayStyle = `${glass}\\n${toastContainerStyle}\\n${menuPortalStyle}\\n${overlayMotion}`\n\nexport function applyOverlayRootStyles(root: ShadowRoot) {\n const style = document.createElement('style')\n style.textContent = overlayStyle\n root.prepend(style)\n}\n\nexport function getFallbackOverlayRoot(): HTMLElement {\n const existing = document.querySelector<HTMLElement>(`[${FALLBACK_ROOT_ATTRIBUTE}]`)\n if (existing?.shadowRoot) return getOverlayContainer(existing.shadowRoot)\n\n const host = document.createElement('div')\n host.setAttribute(FALLBACK_ROOT_ATTRIBUTE, '')\n const root = host.attachShadow({ mode: 'open' })\n applyOverlayRootStyles(root)\n document.body.appendChild(host)\n return getOverlayContainer(root)\n}\n\nexport function getOverlayContainer(root: ShadowRoot): HTMLElement {\n const existing = root.querySelector<HTMLElement>('[data-wui-overlay-container]')\n if (existing) return existing\n\n const container = document.createElement('div')\n container.setAttribute('data-wui-overlay-container', '')\n root.appendChild(container)\n return container\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"overlay-root.js","names":[],"sources":["../../../src/shared/overlay/overlay-root.ts"],"sourcesContent":["import glass from '@/assets/glass.css?inline'\nimport menuPortalStyle from '@/assets/menu-portal.css?inline'\nimport overlayMotion from '@/assets/overlay-motion.css?inline'\nimport toastContainerStyle from '@/assets/toast-containers.css?inline'\nimport internalScrollbars from '@/scrollbars/internal.css?inline'\n\n/**\n * Theme-owned overlay root plumbing: applies shared overlay styles to a theme\n * root and lazily creates the document-level fallback overlay root.\n */\nconst FALLBACK_ROOT_ATTRIBUTE = 'data-wui-overlay-root'\n\nconst overlayStyle = `${glass}\\n${toastContainerStyle}\\n${menuPortalStyle}\\n${overlayMotion}\\n${internalScrollbars}`\n\nexport function applyOverlayRootStyles(root: ShadowRoot) {\n const style = document.createElement('style')\n style.textContent = overlayStyle\n root.prepend(style)\n}\n\nexport function getFallbackOverlayRoot(): HTMLElement {\n const existing = document.querySelector<HTMLElement>(`[${FALLBACK_ROOT_ATTRIBUTE}]`)\n if (existing?.shadowRoot) return getOverlayContainer(existing.shadowRoot)\n\n const host = document.createElement('div')\n host.setAttribute(FALLBACK_ROOT_ATTRIBUTE, '')\n const root = host.attachShadow({ mode: 'open' })\n applyOverlayRootStyles(root)\n document.body.appendChild(host)\n return getOverlayContainer(root)\n}\n\nexport function getOverlayContainer(root: ShadowRoot): HTMLElement {\n const existing = root.querySelector<HTMLElement>('[data-wui-overlay-container]')\n if (existing) return existing\n\n const container = document.createElement('div')\n container.setAttribute('data-wui-overlay-container', '')\n root.appendChild(container)\n return container\n}\n"],"mappings":";;;;;;AAUA,IAAM,IAA0B,yBAE1B,IAAe,GAAG,EAAM,IAAI,EAAoB,IAAI,EAAgB,IAAI,EAAc,IAAI;AAEhG,SAAgB,EAAuB,GAAkB;CACvD,IAAM,IAAQ,SAAS,cAAc,OAAO;CAE5C,AADA,EAAM,cAAc,GACpB,EAAK,QAAQ,CAAK;AACpB;AAEA,SAAgB,IAAsC;CACpD,IAAM,IAAW,SAAS,cAA2B,IAAI,EAAwB,EAAE;CACnF,IAAI,GAAU,YAAY,OAAO,EAAoB,EAAS,UAAU;CAExE,IAAM,IAAO,SAAS,cAAc,KAAK;CACzC,EAAK,aAAa,GAAyB,EAAE;CAC7C,IAAM,IAAO,EAAK,aAAa,EAAE,MAAM,OAAO,CAAC;CAG/C,OAFA,EAAuB,CAAI,GAC3B,SAAS,KAAK,YAAY,CAAI,GACvB,EAAoB,CAAI;AACjC;AAEA,SAAgB,EAAoB,GAA+B;CACjE,IAAM,IAAW,EAAK,cAA2B,8BAA8B;CAC/E,IAAI,GAAU,OAAO;CAErB,IAAM,IAAY,SAAS,cAAc,KAAK;CAG9C,OAFA,EAAU,aAAa,8BAA8B,EAAE,GACvD,EAAK,YAAY,CAAS,GACnB;AACT"}
|