@qingmingmu/components 0.1.0-beta.0
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/LICENSE +21 -0
- package/README.md +128 -0
- package/es/components/app-layout/index.cjs +14 -0
- package/es/components/app-layout/index.d.cts +10 -0
- package/es/components/app-layout/index.d.mts +8 -0
- package/es/components/app-layout/index.d.ts +10 -0
- package/es/components/app-layout/index.mjs +8 -0
- package/es/components/app-layout/style/index.js +4 -0
- package/es/components/app-layout/style.css +36 -0
- package/es/components/badge/index.cjs +13 -0
- package/es/components/badge/index.d.cts +10 -0
- package/es/components/badge/index.d.mts +8 -0
- package/es/components/badge/index.d.ts +10 -0
- package/es/components/badge/index.mjs +8 -0
- package/es/components/badge/style/index.js +2 -0
- package/es/components/badge/style.css +36 -0
- package/es/components/breadcrumb/index.cjs +16 -0
- package/es/components/breadcrumb/index.d.cts +10 -0
- package/es/components/breadcrumb/index.d.mts +8 -0
- package/es/components/breadcrumb/index.d.ts +10 -0
- package/es/components/breadcrumb/index.mjs +8 -0
- package/es/components/breadcrumb/style/index.js +4 -0
- package/es/components/breadcrumb/style.css +43 -0
- package/es/components/button/index.cjs +14 -0
- package/es/components/button/index.d.cts +10 -0
- package/es/components/button/index.d.mts +10 -0
- package/es/components/button/index.d.ts +10 -0
- package/es/components/button/index.mjs +10 -0
- package/es/components/button/style/index.js +4 -0
- package/es/components/button/style.css +185 -0
- package/es/components/checkbox/index.cjs +18 -0
- package/es/components/checkbox/index.d.cts +8 -0
- package/es/components/checkbox/index.d.mts +8 -0
- package/es/components/checkbox/index.d.ts +8 -0
- package/es/components/checkbox/index.mjs +8 -0
- package/es/components/checkbox/style/index.js +4 -0
- package/es/components/checkbox/style.css +538 -0
- package/es/components/date-picker/index.cjs +22 -0
- package/es/components/date-picker/index.d.cts +13 -0
- package/es/components/date-picker/index.d.mts +11 -0
- package/es/components/date-picker/index.d.ts +13 -0
- package/es/components/date-picker/index.mjs +11 -0
- package/es/components/date-picker/style/index.js +4 -0
- package/es/components/date-picker/style.css +221 -0
- package/es/components/dialog/index.cjs +278 -0
- package/es/components/dialog/index.d.cts +133 -0
- package/es/components/dialog/index.d.mts +131 -0
- package/es/components/dialog/index.d.ts +133 -0
- package/es/components/dialog/index.mjs +269 -0
- package/es/components/dialog/style/index.js +4 -0
- package/es/components/dialog/style.css +157 -0
- package/es/components/divider/index.cjs +13 -0
- package/es/components/divider/index.d.cts +10 -0
- package/es/components/divider/index.d.mts +8 -0
- package/es/components/divider/index.d.ts +10 -0
- package/es/components/divider/index.mjs +8 -0
- package/es/components/divider/style/index.js +2 -0
- package/es/components/divider/style.css +49 -0
- package/es/components/drawer/index.cjs +18 -0
- package/es/components/drawer/index.d.cts +13 -0
- package/es/components/drawer/index.d.mts +11 -0
- package/es/components/drawer/index.d.ts +13 -0
- package/es/components/drawer/index.mjs +11 -0
- package/es/components/drawer/style/index.js +4 -0
- package/es/components/drawer/style.css +126 -0
- package/es/components/dropdown/index.cjs +19 -0
- package/es/components/dropdown/index.d.cts +11 -0
- package/es/components/dropdown/index.d.mts +9 -0
- package/es/components/dropdown/index.d.ts +11 -0
- package/es/components/dropdown/index.mjs +9 -0
- package/es/components/dropdown/style/index.js +4 -0
- package/es/components/dropdown/style.css +50 -0
- package/es/components/empty/index.cjs +15 -0
- package/es/components/empty/index.d.cts +12 -0
- package/es/components/empty/index.d.mts +10 -0
- package/es/components/empty/index.d.ts +12 -0
- package/es/components/empty/index.mjs +10 -0
- package/es/components/empty/style/index.js +4 -0
- package/es/components/empty/style.css +30 -0
- package/es/components/form/index.cjs +22 -0
- package/es/components/form/index.d.cts +10 -0
- package/es/components/form/index.d.mts +8 -0
- package/es/components/form/index.d.ts +10 -0
- package/es/components/form/index.mjs +8 -0
- package/es/components/form/style/index.js +4 -0
- package/es/components/form/style.css +70 -0
- package/es/components/grid/index.cjs +20 -0
- package/es/components/grid/index.d.cts +10 -0
- package/es/components/grid/index.d.mts +8 -0
- package/es/components/grid/index.d.ts +10 -0
- package/es/components/grid/index.mjs +8 -0
- package/es/components/grid/style/index.js +2 -0
- package/es/components/grid/style.css +45 -0
- package/es/components/icon/index.cjs +14 -0
- package/es/components/icon/index.d.cts +11 -0
- package/es/components/icon/index.d.mts +9 -0
- package/es/components/icon/index.d.ts +11 -0
- package/es/components/icon/index.mjs +9 -0
- package/es/components/icon/style/index.js +2 -0
- package/es/components/icon/style.css +437 -0
- package/es/components/input/index.cjs +18 -0
- package/es/components/input/index.d.cts +12 -0
- package/es/components/input/index.d.mts +10 -0
- package/es/components/input/index.d.ts +12 -0
- package/es/components/input/index.mjs +10 -0
- package/es/components/input/style/index.js +4 -0
- package/es/components/input/style.css +108 -0
- package/es/components/layout/index.cjs +13 -0
- package/es/components/layout/index.d.cts +10 -0
- package/es/components/layout/index.d.mts +8 -0
- package/es/components/layout/index.d.ts +10 -0
- package/es/components/layout/index.mjs +8 -0
- package/es/components/layout/style/index.js +2 -0
- package/es/components/layout/style.css +54 -0
- package/es/components/link/index.cjs +13 -0
- package/es/components/link/index.d.cts +10 -0
- package/es/components/link/index.d.mts +8 -0
- package/es/components/link/index.d.ts +10 -0
- package/es/components/link/index.mjs +8 -0
- package/es/components/link/style/index.js +2 -0
- package/es/components/link/style.css +39 -0
- package/es/components/list/index.cjs +13 -0
- package/es/components/list/index.d.cts +10 -0
- package/es/components/list/index.d.mts +8 -0
- package/es/components/list/index.d.ts +10 -0
- package/es/components/list/index.mjs +8 -0
- package/es/components/list/style/index.js +4 -0
- package/es/components/list/style.css +33 -0
- package/es/components/menu/index.cjs +18 -0
- package/es/components/menu/index.d.cts +12 -0
- package/es/components/menu/index.d.mts +10 -0
- package/es/components/menu/index.d.ts +12 -0
- package/es/components/menu/index.mjs +10 -0
- package/es/components/menu/style/index.js +4 -0
- package/es/components/menu/style.css +148 -0
- package/es/components/message/index.cjs +236 -0
- package/es/components/message/index.d.cts +92 -0
- package/es/components/message/index.d.mts +92 -0
- package/es/components/message/index.d.ts +92 -0
- package/es/components/message/index.mjs +232 -0
- package/es/components/message/style/index.js +4 -0
- package/es/components/message/style.css +121 -0
- package/es/components/notification/index.cjs +288 -0
- package/es/components/notification/index.d.cts +90 -0
- package/es/components/notification/index.d.mts +90 -0
- package/es/components/notification/index.d.ts +90 -0
- package/es/components/notification/index.mjs +284 -0
- package/es/components/notification/style/index.js +4 -0
- package/es/components/notification/style.css +191 -0
- package/es/components/pagination/index.cjs +16 -0
- package/es/components/pagination/index.d.cts +12 -0
- package/es/components/pagination/index.d.mts +10 -0
- package/es/components/pagination/index.d.ts +12 -0
- package/es/components/pagination/index.mjs +10 -0
- package/es/components/pagination/style/index.js +4 -0
- package/es/components/pagination/style.css +112 -0
- package/es/components/popover/index.cjs +17 -0
- package/es/components/popover/index.d.cts +11 -0
- package/es/components/popover/index.d.mts +9 -0
- package/es/components/popover/index.d.ts +11 -0
- package/es/components/popover/index.mjs +9 -0
- package/es/components/popover/style/index.js +4 -0
- package/es/components/popover/style.css +111 -0
- package/es/components/progress/index.cjs +15 -0
- package/es/components/progress/index.d.cts +10 -0
- package/es/components/progress/index.d.mts +8 -0
- package/es/components/progress/index.d.ts +10 -0
- package/es/components/progress/index.mjs +8 -0
- package/es/components/progress/style/index.js +4 -0
- package/es/components/progress/style.css +72 -0
- package/es/components/radio/index.cjs +20 -0
- package/es/components/radio/index.d.cts +8 -0
- package/es/components/radio/index.d.mts +8 -0
- package/es/components/radio/index.d.ts +8 -0
- package/es/components/radio/index.mjs +8 -0
- package/es/components/radio/style/index.js +4 -0
- package/es/components/radio/style.css +109 -0
- package/es/components/row/index.cjs +21 -0
- package/es/components/row/index.d.cts +287 -0
- package/es/components/row/index.d.mts +285 -0
- package/es/components/row/index.d.ts +287 -0
- package/es/components/row/index.mjs +3 -0
- package/es/components/row/style/index.js +2 -0
- package/es/components/row/style.css +2 -0
- package/es/components/select/index.cjs +20 -0
- package/es/components/select/index.d.cts +13 -0
- package/es/components/select/index.d.mts +11 -0
- package/es/components/select/index.d.ts +13 -0
- package/es/components/select/index.mjs +11 -0
- package/es/components/select/style/index.js +4 -0
- package/es/components/select/style.css +210 -0
- package/es/components/skeleton/index.cjs +13 -0
- package/es/components/skeleton/index.d.cts +10 -0
- package/es/components/skeleton/index.d.mts +8 -0
- package/es/components/skeleton/index.d.ts +10 -0
- package/es/components/skeleton/index.mjs +8 -0
- package/es/components/skeleton/style/index.js +4 -0
- package/es/components/skeleton/style.css +41 -0
- package/es/components/slider/index.cjs +18 -0
- package/es/components/slider/index.d.cts +10 -0
- package/es/components/slider/index.d.mts +8 -0
- package/es/components/slider/index.d.ts +10 -0
- package/es/components/slider/index.mjs +8 -0
- package/es/components/slider/style/index.js +4 -0
- package/es/components/slider/style.css +131 -0
- package/es/components/space/index.cjs +13 -0
- package/es/components/space/index.d.cts +10 -0
- package/es/components/space/index.d.mts +8 -0
- package/es/components/space/index.d.ts +10 -0
- package/es/components/space/index.mjs +8 -0
- package/es/components/space/style/index.js +2 -0
- package/es/components/space/style.css +38 -0
- package/es/components/splitter/index.cjs +15 -0
- package/es/components/splitter/index.d.cts +10 -0
- package/es/components/splitter/index.d.mts +8 -0
- package/es/components/splitter/index.d.ts +10 -0
- package/es/components/splitter/index.mjs +8 -0
- package/es/components/splitter/style/index.js +2 -0
- package/es/components/splitter/style.css +53 -0
- package/es/components/statistic/index.cjs +14 -0
- package/es/components/statistic/index.d.cts +10 -0
- package/es/components/statistic/index.d.mts +8 -0
- package/es/components/statistic/index.d.ts +10 -0
- package/es/components/statistic/index.mjs +8 -0
- package/es/components/statistic/style/index.js +4 -0
- package/es/components/statistic/style.css +30 -0
- package/es/components/steps/index.cjs +18 -0
- package/es/components/steps/index.d.cts +12 -0
- package/es/components/steps/index.d.mts +10 -0
- package/es/components/steps/index.d.ts +12 -0
- package/es/components/steps/index.mjs +10 -0
- package/es/components/steps/style/index.js +4 -0
- package/es/components/steps/style.css +123 -0
- package/es/components/switch/index.cjs +16 -0
- package/es/components/switch/index.d.cts +12 -0
- package/es/components/switch/index.d.mts +10 -0
- package/es/components/switch/index.d.ts +12 -0
- package/es/components/switch/index.mjs +10 -0
- package/es/components/switch/style/index.js +4 -0
- package/es/components/switch/style.css +128 -0
- package/es/components/table/index.cjs +15 -0
- package/es/components/table/index.d.cts +10 -0
- package/es/components/table/index.d.mts +8 -0
- package/es/components/table/index.d.ts +10 -0
- package/es/components/table/index.mjs +8 -0
- package/es/components/table/style/index.js +4 -0
- package/es/components/table/style.css +52 -0
- package/es/components/tabs/index.cjs +17 -0
- package/es/components/tabs/index.d.cts +12 -0
- package/es/components/tabs/index.d.mts +10 -0
- package/es/components/tabs/index.d.ts +12 -0
- package/es/components/tabs/index.mjs +10 -0
- package/es/components/tabs/style/index.js +4 -0
- package/es/components/tabs/style.css +123 -0
- package/es/components/tag/index.cjs +15 -0
- package/es/components/tag/index.d.cts +12 -0
- package/es/components/tag/index.d.mts +10 -0
- package/es/components/tag/index.d.ts +12 -0
- package/es/components/tag/index.mjs +10 -0
- package/es/components/tag/style/index.js +2 -0
- package/es/components/tag/style.css +160 -0
- package/es/components/theme-toggle/index.cjs +16 -0
- package/es/components/theme-toggle/index.d.cts +13 -0
- package/es/components/theme-toggle/index.d.mts +11 -0
- package/es/components/theme-toggle/index.d.ts +13 -0
- package/es/components/theme-toggle/index.mjs +11 -0
- package/es/components/theme-toggle/style/index.js +4 -0
- package/es/components/theme-toggle/style.css +35 -0
- package/es/components/title-bar/index.cjs +16 -0
- package/es/components/title-bar/index.d.cts +13 -0
- package/es/components/title-bar/index.d.mts +11 -0
- package/es/components/title-bar/index.d.ts +13 -0
- package/es/components/title-bar/index.mjs +11 -0
- package/es/components/title-bar/style/index.js +4 -0
- package/es/components/title-bar/style.css +46 -0
- package/es/components/tooltip/index.cjs +15 -0
- package/es/components/tooltip/index.d.cts +11 -0
- package/es/components/tooltip/index.d.mts +9 -0
- package/es/components/tooltip/index.d.ts +11 -0
- package/es/components/tooltip/index.mjs +9 -0
- package/es/components/tooltip/style/index.js +4 -0
- package/es/components/tooltip/style.css +71 -0
- package/es/components/tree/index.cjs +16 -0
- package/es/components/tree/index.d.cts +12 -0
- package/es/components/tree/index.d.mts +10 -0
- package/es/components/tree/index.d.ts +12 -0
- package/es/components/tree/index.mjs +10 -0
- package/es/components/tree/style/index.js +4 -0
- package/es/components/tree/style.css +62 -0
- package/es/components/window-controls/index.cjs +15 -0
- package/es/components/window-controls/index.d.cts +12 -0
- package/es/components/window-controls/index.d.mts +10 -0
- package/es/components/window-controls/index.d.ts +12 -0
- package/es/components/window-controls/index.mjs +10 -0
- package/es/components/window-controls/style/index.js +4 -0
- package/es/components/window-controls/style.css +35 -0
- package/es/index.cjs +221 -0
- package/es/index.d.cts +47 -0
- package/es/index.d.mts +47 -0
- package/es/index.d.ts +47 -0
- package/es/index.mjs +49 -0
- package/es/package.json +3 -0
- package/es/shared/components.1AjWnZ2u.cjs +557 -0
- package/es/shared/components.1J_ThqaI.d.cts +95 -0
- package/es/shared/components.3dqa2hsp.d.mts +132 -0
- package/es/shared/components.4UjasbrA.d.cts +51 -0
- package/es/shared/components.4UjasbrA.d.mts +51 -0
- package/es/shared/components.4UjasbrA.d.ts +51 -0
- package/es/shared/components.4lt7h-GW.d.ts +86 -0
- package/es/shared/components.54wxKDZE.mjs +156 -0
- package/es/shared/components.6EXCNxk1.cjs +160 -0
- package/es/shared/components.7VJcWbB3.mjs +61 -0
- package/es/shared/components.7wOMpfjy.d.mts +166 -0
- package/es/shared/components.B-epy07L.d.mts +586 -0
- package/es/shared/components.B0eSL1OS.d.cts +73 -0
- package/es/shared/components.B1zwpYHQ.d.cts +439 -0
- package/es/shared/components.B2Ry54jj.d.ts +272 -0
- package/es/shared/components.B4MHkqZP.d.ts +329 -0
- package/es/shared/components.B4xRhtj-.mjs +60 -0
- package/es/shared/components.B5WOm7ey.mjs +126 -0
- package/es/shared/components.B7BmMQPX.d.mts +97 -0
- package/es/shared/components.B7T7B9Ys.d.mts +73 -0
- package/es/shared/components.B8lNpbQ9.cjs +134 -0
- package/es/shared/components.BChm7h4j.d.ts +75 -0
- package/es/shared/components.BDSFrwdm.d.cts +166 -0
- package/es/shared/components.BEYwGpEo.d.ts +586 -0
- package/es/shared/components.BF2nXG8Y.cjs +64 -0
- package/es/shared/components.BG88vlnG.d.ts +159 -0
- package/es/shared/components.BGcESMXM.d.cts +192 -0
- package/es/shared/components.BGw_jYqb.d.cts +67 -0
- package/es/shared/components.BHiG-Upg.d.mts +359 -0
- package/es/shared/components.BIm7FYRN.d.ts +99 -0
- package/es/shared/components.BJSrGDgZ.d.mts +328 -0
- package/es/shared/components.BJz4u6YX.d.ts +359 -0
- package/es/shared/components.BL34tX_n.mjs +338 -0
- package/es/shared/components.BMUce5Uz.cjs +226 -0
- package/es/shared/components.BNXBaiBD.d.mts +269 -0
- package/es/shared/components.BPdCwk8C.d.ts +272 -0
- package/es/shared/components.BPsETG85.mjs +287 -0
- package/es/shared/components.BQFq0PXl.d.ts +298 -0
- package/es/shared/components.BR0HfmAS.d.mts +97 -0
- package/es/shared/components.BRHYPvpL.mjs +76 -0
- package/es/shared/components.BRK5jSxk.d.mts +192 -0
- package/es/shared/components.BUx4k59U.cjs +332 -0
- package/es/shared/components.BW1vukk6.mjs +135 -0
- package/es/shared/components.BWaRX3BY.d.ts +70 -0
- package/es/shared/components.BWrJKYmt.d.ts +338 -0
- package/es/shared/components.BZZxSpn4.d.mts +338 -0
- package/es/shared/components.BZeq4M6i.cjs +83 -0
- package/es/shared/components.B_aXqCE8.d.cts +34 -0
- package/es/shared/components.B_aXqCE8.d.mts +34 -0
- package/es/shared/components.B_aXqCE8.d.ts +34 -0
- package/es/shared/components.BaUizHWz.mjs +270 -0
- package/es/shared/components.Bar0M_1T.d.ts +132 -0
- package/es/shared/components.BcnhVfkA.d.cts +208 -0
- package/es/shared/components.Be0We_QJ.mjs +79 -0
- package/es/shared/components.BhK__sZJ.d.ts +67 -0
- package/es/shared/components.Bjw8eqP-.d.mts +327 -0
- package/es/shared/components.BkakIO1C.cjs +70 -0
- package/es/shared/components.BldJxPSz.cjs +80 -0
- package/es/shared/components.Bm5Cu9W3.mjs +358 -0
- package/es/shared/components.BmII0Zi4.d.cts +109 -0
- package/es/shared/components.Bn206h5z.d.cts +329 -0
- package/es/shared/components.Bo3WVnTy.d.ts +223 -0
- package/es/shared/components.BrbmPZbT.mjs +297 -0
- package/es/shared/components.BwmjBLGS.d.mts +126 -0
- package/es/shared/components.BxBfOAnD.d.cts +359 -0
- package/es/shared/components.BxOtwzkp.cjs +349 -0
- package/es/shared/components.By4TdR07.d.ts +327 -0
- package/es/shared/components.BzO68qwA.d.mts +95 -0
- package/es/shared/components.BzcvYRS3.d.mts +109 -0
- package/es/shared/components.BzhHVs0e.d.cts +338 -0
- package/es/shared/components.C183F57T.mjs +128 -0
- package/es/shared/components.C1PQgace.mjs +96 -0
- package/es/shared/components.C2qFTFYw.cjs +322 -0
- package/es/shared/components.C6sLxXPo.d.ts +96 -0
- package/es/shared/components.C8Nxn3Ut.d.mts +272 -0
- package/es/shared/components.C9TEQ_29.cjs +385 -0
- package/es/shared/components.C9WJVmII.mjs +71 -0
- package/es/shared/components.CAVYcOKF.cjs +132 -0
- package/es/shared/components.CBELcqkf.cjs +182 -0
- package/es/shared/components.CDS8XKPo.d.ts +257 -0
- package/es/shared/components.CDifg15S.cjs +292 -0
- package/es/shared/components.CF8Mj5bD.cjs +370 -0
- package/es/shared/components.CF_GZPuV.cjs +64 -0
- package/es/shared/components.CFfTemQ4.cjs +74 -0
- package/es/shared/components.CIjY6ZtZ.d.ts +499 -0
- package/es/shared/components.CJqqdhuY.d.cts +86 -0
- package/es/shared/components.CKbZKaMO.mjs +221 -0
- package/es/shared/components.CLBPin--.cjs +306 -0
- package/es/shared/components.CMtYH41Z.mjs +326 -0
- package/es/shared/components.CPjbxzIv.mjs +381 -0
- package/es/shared/components.CRZMSxSQ.mjs +77 -0
- package/es/shared/components.CRtd1JMp.cjs +86 -0
- package/es/shared/components.CTP-w8Dp.d.mts +85 -0
- package/es/shared/components.CUxPJ0rN.cjs +177 -0
- package/es/shared/components.CYrhfnMH.d.mts +439 -0
- package/es/shared/components.CZspoBJZ.mjs +314 -0
- package/es/shared/components.CaILt5c4.d.mts +288 -0
- package/es/shared/components.CerI7DmE.d.ts +192 -0
- package/es/shared/components.Cg0qdMDr.d.mts +272 -0
- package/es/shared/components.CgZUcq5d.d.mts +70 -0
- package/es/shared/components.ChFQqcD8.d.cts +99 -0
- package/es/shared/components.ChHlRGOd.d.mts +257 -0
- package/es/shared/components.ChaKATXZ.d.cts +132 -0
- package/es/shared/components.CjJ96MaL.d.cts +586 -0
- package/es/shared/components.CkYdyZh6.d.ts +97 -0
- package/es/shared/components.Cl7hvWLa.d.ts +208 -0
- package/es/shared/components.ClxGCZuy.cjs +67 -0
- package/es/shared/components.CmUTe-Bu.d.cts +314 -0
- package/es/shared/components.Cp1Zsk-X.mjs +231 -0
- package/es/shared/components.CpHuJl8N.cjs +109 -0
- package/es/shared/components.CqRoc5Cb.d.mts +298 -0
- package/es/shared/components.Ct1bqR7L.d.cts +82 -0
- package/es/shared/components.CtUfYC-G.cjs +256 -0
- package/es/shared/components.CtZrM_rh.mjs +58 -0
- package/es/shared/components.CwRwwkrw.mjs +397 -0
- package/es/shared/components.CxFKLC0I.mjs +68 -0
- package/es/shared/components.CxIEbUM8.d.cts +319 -0
- package/es/shared/components.CxuO1-ev.d.cts +272 -0
- package/es/shared/components.CyCDH-Vb.mjs +281 -0
- package/es/shared/components.D02eI26A.d.cts +257 -0
- package/es/shared/components.D0MDcB1D.cjs +276 -0
- package/es/shared/components.D2M7cpo2.d.cts +126 -0
- package/es/shared/components.D3HPYZ31.d.mts +223 -0
- package/es/shared/components.D3on6_fI.mjs +83 -0
- package/es/shared/components.D48GdgdJ.d.mts +208 -0
- package/es/shared/components.D4C1x9UP.cjs +318 -0
- package/es/shared/components.D4HPwnpE.mjs +363 -0
- package/es/shared/components.D4Yu07Ov.mjs +251 -0
- package/es/shared/components.D5-DJd7f.d.cts +328 -0
- package/es/shared/components.D7KK6ZxT.d.mts +67 -0
- package/es/shared/components.D8Ht88FR.mjs +100 -0
- package/es/shared/components.DB4_ULYr.cjs +405 -0
- package/es/shared/components.DCH8muDL.d.cts +75 -0
- package/es/shared/components.DCuPins-.d.mts +96 -0
- package/es/shared/components.DD-6M8N-.d.ts +314 -0
- package/es/shared/components.DDslVxoU.d.mts +86 -0
- package/es/shared/components.DEs15eJe.cjs +687 -0
- package/es/shared/components.DEwy484E.mjs +67 -0
- package/es/shared/components.DFar9ZQj.cjs +285 -0
- package/es/shared/components.DG3K9DCE.d.ts +439 -0
- package/es/shared/components.DG96RpCG.d.cts +288 -0
- package/es/shared/components.DHIKrYhN.d.ts +95 -0
- package/es/shared/components.DHeLTopf.d.mts +143 -0
- package/es/shared/components.DJ0m5kYN.mjs +548 -0
- package/es/shared/components.DJlTQabT.cjs +103 -0
- package/es/shared/components.DKtogC94.mjs +212 -0
- package/es/shared/components.DLVoUYPv.d.ts +328 -0
- package/es/shared/components.DLjhu3mO.cjs +53 -0
- package/es/shared/components.DNZ8j6Sz.d.cts +269 -0
- package/es/shared/components.DOWndnHb.d.ts +82 -0
- package/es/shared/components.DPGfB1k8.d.cts +223 -0
- package/es/shared/components.DScCDEoT.d.cts +97 -0
- package/es/shared/components.DUidQ77e.cjs +11 -0
- package/es/shared/components.Danqf6j7.d.cts +272 -0
- package/es/shared/components.DclwYyRy.mjs +50 -0
- package/es/shared/components.DdczIXhc.d.mts +82 -0
- package/es/shared/components.De49eXQJ.d.cts +97 -0
- package/es/shared/components.Dfe4D-8g.d.mts +99 -0
- package/es/shared/components.DiS0nfa_.d.mts +314 -0
- package/es/shared/components.DlTJ-jbM.cjs +235 -0
- package/es/shared/components.DnCclrOD.d.cts +70 -0
- package/es/shared/components.DnW9eqJM.cjs +79 -0
- package/es/shared/components.DoInWOkI.d.cts +85 -0
- package/es/shared/components.DpN4r8M6.d.ts +85 -0
- package/es/shared/components.DqdBSuxX.mjs +175 -0
- package/es/shared/components.DtZ1M9RX.d.mts +159 -0
- package/es/shared/components.DuT8IQV_.cjs +71 -0
- package/es/shared/components.Dy6mSGFp.d.ts +97 -0
- package/es/shared/components.Dy9SYm12.d.ts +73 -0
- package/es/shared/components.Dz2FXew2.cjs +371 -0
- package/es/shared/components.FNPonG8w.d.ts +269 -0
- package/es/shared/components.FkGOusVh.d.cts +143 -0
- package/es/shared/components.Mnb2AHkq.d.cts +298 -0
- package/es/shared/components.NdJ3_JnU.d.cts +499 -0
- package/es/shared/components.OJRSZE6i.d.cts +9 -0
- package/es/shared/components.OJRSZE6i.d.mts +9 -0
- package/es/shared/components.OJRSZE6i.d.ts +9 -0
- package/es/shared/components.P8ob4csG.d.mts +499 -0
- package/es/shared/components.PG8w8Qmv.mjs +64 -0
- package/es/shared/components.SHnZTfnN.d.ts +143 -0
- package/es/shared/components.VbnCY-yZ.cjs +58 -0
- package/es/shared/components.Xb8fQVYs.d.ts +109 -0
- package/es/shared/components.aCfs5Zx4.mjs +106 -0
- package/es/shared/components.aEHtkYll.mjs +176 -0
- package/es/shared/components.b0j47s07.d.ts +288 -0
- package/es/shared/components.b5GjJzDh.d.cts +96 -0
- package/es/shared/components.dIJZSGar.d.mts +329 -0
- package/es/shared/components.dk3Zmpq5.cjs +61 -0
- package/es/shared/components.e6NGwmyk.mjs +680 -0
- package/es/shared/components.l2LF8U7V.mjs +55 -0
- package/es/shared/components.ls2ruUoQ.cjs +140 -0
- package/es/shared/components.pAb-8zT2.mjs +316 -0
- package/es/shared/components.pcqpp-6-.mjs +9 -0
- package/es/shared/components.qRljarsw.d.cts +159 -0
- package/es/shared/components.r5I_hKLX.cjs +222 -0
- package/es/shared/components.rFCN7LCl.d.mts +75 -0
- package/es/shared/components.tMYsd3jV.d.ts +126 -0
- package/es/shared/components.tM_tp13v.d.mts +319 -0
- package/es/shared/components.uyAvjCWL.d.cts +327 -0
- package/es/shared/components.v_RwCQEf.d.ts +166 -0
- package/es/shared/components.w4bSE8TV.cjs +99 -0
- package/es/shared/components.x9BKOa3W.d.ts +319 -0
- package/package.json +72 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QmNotification 类型定义(03-T4 命令式 API)
|
|
3
|
+
*
|
|
4
|
+
* 与 Message 的差异:
|
|
5
|
+
* - 卡片化:图标 + 标题 + 内容 + 关闭按钮 + 操作区(footer);
|
|
6
|
+
* - 四角弹出:top-left / top-right / bottom-left / bottom-right;
|
|
7
|
+
* - 不常驻时默认 4500ms 自动关闭;closable 默认 true。
|
|
8
|
+
*/
|
|
9
|
+
/** 通知类型 */
|
|
10
|
+
type NotificationType = 'success' | 'warning' | 'error' | 'info';
|
|
11
|
+
/** 弹出位置(四角) */
|
|
12
|
+
type NotificationPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
13
|
+
/** 操作按钮(imperative 调用提供,渲染到 footer) */
|
|
14
|
+
interface NotificationAction {
|
|
15
|
+
text: string;
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** 命令式调用选项 */
|
|
19
|
+
interface NotificationOptions {
|
|
20
|
+
/** 标题 */
|
|
21
|
+
title?: string;
|
|
22
|
+
/** 正文内容 */
|
|
23
|
+
message?: string;
|
|
24
|
+
/** 类型,默认 info */
|
|
25
|
+
type?: NotificationType;
|
|
26
|
+
/** 自动关闭时长(ms),默认 4500;0 = 常驻 */
|
|
27
|
+
duration?: number;
|
|
28
|
+
/** 是否显示关闭按钮,默认 true */
|
|
29
|
+
closable?: boolean;
|
|
30
|
+
/** 弹出位置,默认 top-right */
|
|
31
|
+
placement?: NotificationPlacement;
|
|
32
|
+
/** 操作按钮(渲染到 footer) */
|
|
33
|
+
action?: NotificationAction;
|
|
34
|
+
/** 关闭回调 */
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
}
|
|
37
|
+
/** 单条通知运行时状态 */
|
|
38
|
+
interface NotificationItemData {
|
|
39
|
+
id: number;
|
|
40
|
+
type: NotificationType;
|
|
41
|
+
title: string;
|
|
42
|
+
message: string;
|
|
43
|
+
closable: boolean;
|
|
44
|
+
placement: NotificationPlacement;
|
|
45
|
+
action?: NotificationAction;
|
|
46
|
+
visible: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** 调用方持有的句柄 */
|
|
49
|
+
interface NotificationInstance {
|
|
50
|
+
close: () => void;
|
|
51
|
+
update: (options: NotificationOptions) => void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* QmNotification 管理器(03-T4 §3.4:四角独立队列 / 堆叠)
|
|
56
|
+
*
|
|
57
|
+
* - 惰性挂载:首次调用才创建容器;容器复用(四角共用一个根容器);
|
|
58
|
+
* - 四角独立队列:top-left / top-right / bottom-left / bottom-right 各自一组列表;
|
|
59
|
+
* - 堆叠:靠近弹出角为最新一条(顶部 unshift,底部 unshift + CSS column-reverse);
|
|
60
|
+
* - 定时器:每条独立 setTimeout,duration=0 常驻;close/update 清理/重置;
|
|
61
|
+
* - 进出场:TransitionGroup 管理 leave,完成后 splice。
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/** 关闭全部并卸载(测试清理 / 统一销毁) */
|
|
65
|
+
declare function destroyNotificationManager(): void;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* QmNotification 命令式入口(03-T4)
|
|
69
|
+
*
|
|
70
|
+
* 用法:
|
|
71
|
+
* import { notification } from '@qingmingmu/components'
|
|
72
|
+
* notification.success({ title: '导出完成', message: '文件已保存到下载目录' })
|
|
73
|
+
* notification.error({ title: '失败', message: '网络异常', placement: 'bottom-right' })
|
|
74
|
+
*
|
|
75
|
+
* auto-import:resolver 将 QmNotification 映射为 `import { notification } from '@qingmingmu/components'`。
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/** 命令式 API 对象:success / error / warning / info */
|
|
79
|
+
declare const notification: {
|
|
80
|
+
success: (input: string | NotificationOptions) => NotificationInstance;
|
|
81
|
+
error: (input: string | NotificationOptions) => NotificationInstance;
|
|
82
|
+
warning: (input: string | NotificationOptions) => NotificationInstance;
|
|
83
|
+
info: (input: string | NotificationOptions) => NotificationInstance;
|
|
84
|
+
};
|
|
85
|
+
/** 别名(兼容 QmNotification.xxx 调用风格) */
|
|
86
|
+
declare const QmNotification: typeof notification;
|
|
87
|
+
type NotificationApi = typeof notification;
|
|
88
|
+
|
|
89
|
+
export { QmNotification, destroyNotificationManager, notification };
|
|
90
|
+
export type { NotificationAction, NotificationApi, NotificationInstance, NotificationItemData, NotificationOptions, NotificationPlacement, NotificationType };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QmNotification 类型定义(03-T4 命令式 API)
|
|
3
|
+
*
|
|
4
|
+
* 与 Message 的差异:
|
|
5
|
+
* - 卡片化:图标 + 标题 + 内容 + 关闭按钮 + 操作区(footer);
|
|
6
|
+
* - 四角弹出:top-left / top-right / bottom-left / bottom-right;
|
|
7
|
+
* - 不常驻时默认 4500ms 自动关闭;closable 默认 true。
|
|
8
|
+
*/
|
|
9
|
+
/** 通知类型 */
|
|
10
|
+
type NotificationType = 'success' | 'warning' | 'error' | 'info';
|
|
11
|
+
/** 弹出位置(四角) */
|
|
12
|
+
type NotificationPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
13
|
+
/** 操作按钮(imperative 调用提供,渲染到 footer) */
|
|
14
|
+
interface NotificationAction {
|
|
15
|
+
text: string;
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** 命令式调用选项 */
|
|
19
|
+
interface NotificationOptions {
|
|
20
|
+
/** 标题 */
|
|
21
|
+
title?: string;
|
|
22
|
+
/** 正文内容 */
|
|
23
|
+
message?: string;
|
|
24
|
+
/** 类型,默认 info */
|
|
25
|
+
type?: NotificationType;
|
|
26
|
+
/** 自动关闭时长(ms),默认 4500;0 = 常驻 */
|
|
27
|
+
duration?: number;
|
|
28
|
+
/** 是否显示关闭按钮,默认 true */
|
|
29
|
+
closable?: boolean;
|
|
30
|
+
/** 弹出位置,默认 top-right */
|
|
31
|
+
placement?: NotificationPlacement;
|
|
32
|
+
/** 操作按钮(渲染到 footer) */
|
|
33
|
+
action?: NotificationAction;
|
|
34
|
+
/** 关闭回调 */
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
}
|
|
37
|
+
/** 单条通知运行时状态 */
|
|
38
|
+
interface NotificationItemData {
|
|
39
|
+
id: number;
|
|
40
|
+
type: NotificationType;
|
|
41
|
+
title: string;
|
|
42
|
+
message: string;
|
|
43
|
+
closable: boolean;
|
|
44
|
+
placement: NotificationPlacement;
|
|
45
|
+
action?: NotificationAction;
|
|
46
|
+
visible: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** 调用方持有的句柄 */
|
|
49
|
+
interface NotificationInstance {
|
|
50
|
+
close: () => void;
|
|
51
|
+
update: (options: NotificationOptions) => void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* QmNotification 管理器(03-T4 §3.4:四角独立队列 / 堆叠)
|
|
56
|
+
*
|
|
57
|
+
* - 惰性挂载:首次调用才创建容器;容器复用(四角共用一个根容器);
|
|
58
|
+
* - 四角独立队列:top-left / top-right / bottom-left / bottom-right 各自一组列表;
|
|
59
|
+
* - 堆叠:靠近弹出角为最新一条(顶部 unshift,底部 unshift + CSS column-reverse);
|
|
60
|
+
* - 定时器:每条独立 setTimeout,duration=0 常驻;close/update 清理/重置;
|
|
61
|
+
* - 进出场:TransitionGroup 管理 leave,完成后 splice。
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/** 关闭全部并卸载(测试清理 / 统一销毁) */
|
|
65
|
+
declare function destroyNotificationManager(): void;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* QmNotification 命令式入口(03-T4)
|
|
69
|
+
*
|
|
70
|
+
* 用法:
|
|
71
|
+
* import { notification } from '@qingmingmu/components'
|
|
72
|
+
* notification.success({ title: '导出完成', message: '文件已保存到下载目录' })
|
|
73
|
+
* notification.error({ title: '失败', message: '网络异常', placement: 'bottom-right' })
|
|
74
|
+
*
|
|
75
|
+
* auto-import:resolver 将 QmNotification 映射为 `import { notification } from '@qingmingmu/components'`。
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/** 命令式 API 对象:success / error / warning / info */
|
|
79
|
+
declare const notification: {
|
|
80
|
+
success: (input: string | NotificationOptions) => NotificationInstance;
|
|
81
|
+
error: (input: string | NotificationOptions) => NotificationInstance;
|
|
82
|
+
warning: (input: string | NotificationOptions) => NotificationInstance;
|
|
83
|
+
info: (input: string | NotificationOptions) => NotificationInstance;
|
|
84
|
+
};
|
|
85
|
+
/** 别名(兼容 QmNotification.xxx 调用风格) */
|
|
86
|
+
declare const QmNotification: typeof notification;
|
|
87
|
+
type NotificationApi = typeof notification;
|
|
88
|
+
|
|
89
|
+
export { QmNotification, destroyNotificationManager, notification };
|
|
90
|
+
export type { NotificationAction, NotificationApi, NotificationInstance, NotificationItemData, NotificationOptions, NotificationPlacement, NotificationType };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QmNotification 类型定义(03-T4 命令式 API)
|
|
3
|
+
*
|
|
4
|
+
* 与 Message 的差异:
|
|
5
|
+
* - 卡片化:图标 + 标题 + 内容 + 关闭按钮 + 操作区(footer);
|
|
6
|
+
* - 四角弹出:top-left / top-right / bottom-left / bottom-right;
|
|
7
|
+
* - 不常驻时默认 4500ms 自动关闭;closable 默认 true。
|
|
8
|
+
*/
|
|
9
|
+
/** 通知类型 */
|
|
10
|
+
type NotificationType = 'success' | 'warning' | 'error' | 'info';
|
|
11
|
+
/** 弹出位置(四角) */
|
|
12
|
+
type NotificationPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
13
|
+
/** 操作按钮(imperative 调用提供,渲染到 footer) */
|
|
14
|
+
interface NotificationAction {
|
|
15
|
+
text: string;
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
}
|
|
18
|
+
/** 命令式调用选项 */
|
|
19
|
+
interface NotificationOptions {
|
|
20
|
+
/** 标题 */
|
|
21
|
+
title?: string;
|
|
22
|
+
/** 正文内容 */
|
|
23
|
+
message?: string;
|
|
24
|
+
/** 类型,默认 info */
|
|
25
|
+
type?: NotificationType;
|
|
26
|
+
/** 自动关闭时长(ms),默认 4500;0 = 常驻 */
|
|
27
|
+
duration?: number;
|
|
28
|
+
/** 是否显示关闭按钮,默认 true */
|
|
29
|
+
closable?: boolean;
|
|
30
|
+
/** 弹出位置,默认 top-right */
|
|
31
|
+
placement?: NotificationPlacement;
|
|
32
|
+
/** 操作按钮(渲染到 footer) */
|
|
33
|
+
action?: NotificationAction;
|
|
34
|
+
/** 关闭回调 */
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
}
|
|
37
|
+
/** 单条通知运行时状态 */
|
|
38
|
+
interface NotificationItemData {
|
|
39
|
+
id: number;
|
|
40
|
+
type: NotificationType;
|
|
41
|
+
title: string;
|
|
42
|
+
message: string;
|
|
43
|
+
closable: boolean;
|
|
44
|
+
placement: NotificationPlacement;
|
|
45
|
+
action?: NotificationAction;
|
|
46
|
+
visible: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** 调用方持有的句柄 */
|
|
49
|
+
interface NotificationInstance {
|
|
50
|
+
close: () => void;
|
|
51
|
+
update: (options: NotificationOptions) => void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* QmNotification 管理器(03-T4 §3.4:四角独立队列 / 堆叠)
|
|
56
|
+
*
|
|
57
|
+
* - 惰性挂载:首次调用才创建容器;容器复用(四角共用一个根容器);
|
|
58
|
+
* - 四角独立队列:top-left / top-right / bottom-left / bottom-right 各自一组列表;
|
|
59
|
+
* - 堆叠:靠近弹出角为最新一条(顶部 unshift,底部 unshift + CSS column-reverse);
|
|
60
|
+
* - 定时器:每条独立 setTimeout,duration=0 常驻;close/update 清理/重置;
|
|
61
|
+
* - 进出场:TransitionGroup 管理 leave,完成后 splice。
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/** 关闭全部并卸载(测试清理 / 统一销毁) */
|
|
65
|
+
declare function destroyNotificationManager(): void;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* QmNotification 命令式入口(03-T4)
|
|
69
|
+
*
|
|
70
|
+
* 用法:
|
|
71
|
+
* import { notification } from '@qingmingmu/components'
|
|
72
|
+
* notification.success({ title: '导出完成', message: '文件已保存到下载目录' })
|
|
73
|
+
* notification.error({ title: '失败', message: '网络异常', placement: 'bottom-right' })
|
|
74
|
+
*
|
|
75
|
+
* auto-import:resolver 将 QmNotification 映射为 `import { notification } from '@qingmingmu/components'`。
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/** 命令式 API 对象:success / error / warning / info */
|
|
79
|
+
declare const notification: {
|
|
80
|
+
success: (input: string | NotificationOptions) => NotificationInstance;
|
|
81
|
+
error: (input: string | NotificationOptions) => NotificationInstance;
|
|
82
|
+
warning: (input: string | NotificationOptions) => NotificationInstance;
|
|
83
|
+
info: (input: string | NotificationOptions) => NotificationInstance;
|
|
84
|
+
};
|
|
85
|
+
/** 别名(兼容 QmNotification.xxx 调用风格) */
|
|
86
|
+
declare const QmNotification: typeof notification;
|
|
87
|
+
type NotificationApi = typeof notification;
|
|
88
|
+
|
|
89
|
+
export { QmNotification, destroyNotificationManager, notification };
|
|
90
|
+
export type { NotificationAction, NotificationApi, NotificationInstance, NotificationItemData, NotificationOptions, NotificationPlacement, NotificationType };
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, toDisplayString, createCommentVNode, renderSlot, reactive, createApp, h, TransitionGroup } from 'vue';
|
|
2
|
+
import { I as Icon } from '../../shared/components.D3on6_fI.mjs';
|
|
3
|
+
import { _ as _export_sfc } from '../../shared/components.pcqpp-6-.mjs';
|
|
4
|
+
import '@qingmingmu/components/es/components/notification/style.css';
|
|
5
|
+
import '@qingmingmu/icons';
|
|
6
|
+
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
...{ name: "QmNotification" },
|
|
9
|
+
__name: "notification",
|
|
10
|
+
props: {
|
|
11
|
+
item: { type: Object, required: true }
|
|
12
|
+
},
|
|
13
|
+
emits: ["close"],
|
|
14
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15
|
+
__expose();
|
|
16
|
+
const props = __props;
|
|
17
|
+
const emit = __emit;
|
|
18
|
+
const iconName = computed(() => {
|
|
19
|
+
switch (props.item.type) {
|
|
20
|
+
case "success":
|
|
21
|
+
return "check-circle";
|
|
22
|
+
case "error":
|
|
23
|
+
return "error";
|
|
24
|
+
case "warning":
|
|
25
|
+
return "warning";
|
|
26
|
+
default:
|
|
27
|
+
return "info";
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
const colorVar = computed(() => {
|
|
31
|
+
switch (props.item.type) {
|
|
32
|
+
case "success":
|
|
33
|
+
return "var(--qm-notification-color-success)";
|
|
34
|
+
case "error":
|
|
35
|
+
return "var(--qm-notification-color-error)";
|
|
36
|
+
case "warning":
|
|
37
|
+
return "var(--qm-notification-color-warning)";
|
|
38
|
+
default:
|
|
39
|
+
return "var(--qm-notification-color-info)";
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
function handleClose() {
|
|
43
|
+
emit("close", props.item.id);
|
|
44
|
+
}
|
|
45
|
+
function handleAction() {
|
|
46
|
+
props.item.action?.onClick();
|
|
47
|
+
}
|
|
48
|
+
const __returned__ = { props, emit, iconName, colorVar, handleClose, handleAction, get QmIcon() {
|
|
49
|
+
return Icon;
|
|
50
|
+
} };
|
|
51
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
52
|
+
return __returned__;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const _hoisted_1 = { class: "qm-notification__main" };
|
|
57
|
+
const _hoisted_2 = { class: "qm-notification__text" };
|
|
58
|
+
const _hoisted_3 = {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: "qm-notification__title"
|
|
61
|
+
};
|
|
62
|
+
const _hoisted_4 = {
|
|
63
|
+
key: 1,
|
|
64
|
+
class: "qm-notification__message"
|
|
65
|
+
};
|
|
66
|
+
const _hoisted_5 = { class: "qm-notification__aside" };
|
|
67
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
68
|
+
return openBlock(), createElementBlock(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
class: normalizeClass(["qm-notification", [`qm-notification--${$props.item.type}`]]),
|
|
72
|
+
role: "status",
|
|
73
|
+
"aria-live": "polite"
|
|
74
|
+
},
|
|
75
|
+
[createElementVNode("div", _hoisted_1, [createElementVNode(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
class: "qm-notification__icon",
|
|
79
|
+
style: normalizeStyle({ color: $setup.colorVar }),
|
|
80
|
+
"aria-hidden": "true"
|
|
81
|
+
},
|
|
82
|
+
[createVNode($setup["QmIcon"], { name: $setup.iconName }, null, 8, ["name"])],
|
|
83
|
+
4
|
|
84
|
+
/* STYLE */
|
|
85
|
+
), createElementVNode("div", _hoisted_2, [
|
|
86
|
+
$props.item.title ? (openBlock(), createElementBlock(
|
|
87
|
+
"h3",
|
|
88
|
+
_hoisted_3,
|
|
89
|
+
toDisplayString($props.item.title),
|
|
90
|
+
1
|
|
91
|
+
/* TEXT */
|
|
92
|
+
)) : createCommentVNode("v-if", true),
|
|
93
|
+
$props.item.message ? (openBlock(), createElementBlock(
|
|
94
|
+
"p",
|
|
95
|
+
_hoisted_4,
|
|
96
|
+
toDisplayString($props.item.message),
|
|
97
|
+
1
|
|
98
|
+
/* TEXT */
|
|
99
|
+
)) : createCommentVNode("v-if", true),
|
|
100
|
+
createCommentVNode(" footer 插槽:组件化使用时可自定义操作区;命令式由 action 渲染 "),
|
|
101
|
+
renderSlot(_ctx.$slots, "footer")
|
|
102
|
+
])]), createElementVNode("div", _hoisted_5, [$props.item.closable ? (openBlock(), createElementBlock("button", {
|
|
103
|
+
key: 0,
|
|
104
|
+
type: "button",
|
|
105
|
+
class: "qm-notification__close",
|
|
106
|
+
"aria-label": "关闭通知",
|
|
107
|
+
onClick: $setup.handleClose
|
|
108
|
+
}, [createVNode($setup["QmIcon"], {
|
|
109
|
+
name: "close",
|
|
110
|
+
style: { "font-size": "14px" }
|
|
111
|
+
})])) : createCommentVNode("v-if", true), $props.item.action ? (openBlock(), createElementBlock(
|
|
112
|
+
"button",
|
|
113
|
+
{
|
|
114
|
+
key: 1,
|
|
115
|
+
type: "button",
|
|
116
|
+
class: "qm-notification__action",
|
|
117
|
+
onClick: $setup.handleAction
|
|
118
|
+
},
|
|
119
|
+
toDisplayString($props.item.action.text),
|
|
120
|
+
1
|
|
121
|
+
/* TEXT */
|
|
122
|
+
)) : createCommentVNode("v-if", true)])],
|
|
123
|
+
2
|
|
124
|
+
/* CLASS */
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
const NotificationItem = /*#__PURE__*/ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "F:\\软件开发\\青冥组件系统\\packages\\components\\src\\components\\notification\\notification.vue"]]);
|
|
128
|
+
|
|
129
|
+
const DEFAULT_DURATION = 4500;
|
|
130
|
+
const PLACEMENTS = ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
131
|
+
let seed = 0;
|
|
132
|
+
const queues = {
|
|
133
|
+
"top-left": reactive([]),
|
|
134
|
+
"top-right": reactive([]),
|
|
135
|
+
"bottom-left": reactive([]),
|
|
136
|
+
"bottom-right": reactive([])
|
|
137
|
+
};
|
|
138
|
+
const timers = /* @__PURE__ */ new Map();
|
|
139
|
+
let container = null;
|
|
140
|
+
let app = null;
|
|
141
|
+
function clearTimer(id) {
|
|
142
|
+
const t = timers.get(id);
|
|
143
|
+
if (t) {
|
|
144
|
+
clearTimeout(t);
|
|
145
|
+
timers.delete(id);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function startTimer(item) {
|
|
149
|
+
clearTimer(item.id);
|
|
150
|
+
if (item.duration > 0) {
|
|
151
|
+
timers.set(
|
|
152
|
+
item.id,
|
|
153
|
+
setTimeout(() => removeInstance(item.id), item.duration)
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function findQueue(id) {
|
|
158
|
+
return PLACEMENTS.map((p) => queues[p]).find((q) => q.some((i) => i.id === id));
|
|
159
|
+
}
|
|
160
|
+
function removeInstance(id) {
|
|
161
|
+
clearTimer(id);
|
|
162
|
+
const queue = findQueue(id);
|
|
163
|
+
if (!queue)
|
|
164
|
+
return;
|
|
165
|
+
const idx = queue.findIndex((i) => i.id === id);
|
|
166
|
+
if (idx === -1)
|
|
167
|
+
return;
|
|
168
|
+
const [removed] = queue.splice(idx, 1);
|
|
169
|
+
removed?.onClose?.();
|
|
170
|
+
}
|
|
171
|
+
function createRoot() {
|
|
172
|
+
return {
|
|
173
|
+
setup() {
|
|
174
|
+
return () => h(
|
|
175
|
+
"div",
|
|
176
|
+
{ class: "qm-notification-container-root" },
|
|
177
|
+
PLACEMENTS.map(
|
|
178
|
+
(placement) => h(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
key: placement,
|
|
182
|
+
class: ["qm-notification-placement", `qm-notification-placement--${placement}`]
|
|
183
|
+
},
|
|
184
|
+
[
|
|
185
|
+
h(
|
|
186
|
+
TransitionGroup,
|
|
187
|
+
{ name: "qm-notification", tag: "div", class: "qm-notification__list" },
|
|
188
|
+
() => queues[placement].map(
|
|
189
|
+
(item) => h(NotificationItem, {
|
|
190
|
+
key: item.id,
|
|
191
|
+
item,
|
|
192
|
+
onClose: () => removeInstance(item.id)
|
|
193
|
+
})
|
|
194
|
+
)
|
|
195
|
+
)
|
|
196
|
+
]
|
|
197
|
+
)
|
|
198
|
+
)
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
function ensureContainer() {
|
|
204
|
+
if (container && app)
|
|
205
|
+
return;
|
|
206
|
+
container = document.createElement("div");
|
|
207
|
+
container.className = "qm-notification-root";
|
|
208
|
+
document.body.appendChild(container);
|
|
209
|
+
app = createApp(createRoot());
|
|
210
|
+
app.mount(container);
|
|
211
|
+
}
|
|
212
|
+
function destroyNotificationManager() {
|
|
213
|
+
for (const id of [...timers.keys()]) clearTimer(id);
|
|
214
|
+
for (const p of PLACEMENTS) queues[p].splice(0, queues[p].length);
|
|
215
|
+
if (app) {
|
|
216
|
+
app.unmount();
|
|
217
|
+
app = null;
|
|
218
|
+
}
|
|
219
|
+
if (container) {
|
|
220
|
+
container.remove();
|
|
221
|
+
container = null;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function normalize(type, input) {
|
|
225
|
+
const opts = typeof input === "string" ? { message: input } : { ...input };
|
|
226
|
+
return {
|
|
227
|
+
...opts,
|
|
228
|
+
type: opts.type ?? type,
|
|
229
|
+
duration: opts.duration ?? DEFAULT_DURATION,
|
|
230
|
+
closable: opts.closable ?? true,
|
|
231
|
+
placement: opts.placement ?? "top-right"
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function openNotification(type, input) {
|
|
235
|
+
const opts = normalize(type, input);
|
|
236
|
+
ensureContainer();
|
|
237
|
+
const item = reactive({
|
|
238
|
+
id: ++seed,
|
|
239
|
+
type: opts.type,
|
|
240
|
+
title: opts.title ?? "",
|
|
241
|
+
message: opts.message ?? "",
|
|
242
|
+
closable: opts.closable ?? true,
|
|
243
|
+
placement: opts.placement ?? "top-right",
|
|
244
|
+
action: opts.action,
|
|
245
|
+
visible: true,
|
|
246
|
+
duration: opts.duration ?? DEFAULT_DURATION,
|
|
247
|
+
onClose: opts.onClose
|
|
248
|
+
});
|
|
249
|
+
queues[item.placement].unshift(item);
|
|
250
|
+
startTimer(item);
|
|
251
|
+
return {
|
|
252
|
+
close: () => removeInstance(item.id),
|
|
253
|
+
update: (patch) => {
|
|
254
|
+
if (typeof patch === "string") {
|
|
255
|
+
item.message = patch;
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (patch.title !== void 0)
|
|
259
|
+
item.title = patch.title;
|
|
260
|
+
if (patch.message !== void 0)
|
|
261
|
+
item.message = patch.message;
|
|
262
|
+
if (patch.type !== void 0)
|
|
263
|
+
item.type = patch.type;
|
|
264
|
+
if (patch.closable !== void 0)
|
|
265
|
+
item.closable = patch.closable;
|
|
266
|
+
if (patch.action !== void 0)
|
|
267
|
+
item.action = patch.action;
|
|
268
|
+
if (patch.duration !== void 0) {
|
|
269
|
+
item.duration = patch.duration;
|
|
270
|
+
startTimer(item);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const notification = {
|
|
277
|
+
success: (input) => openNotification("success", input),
|
|
278
|
+
error: (input) => openNotification("error", input),
|
|
279
|
+
warning: (input) => openNotification("warning", input),
|
|
280
|
+
info: (input) => openNotification("info", input)
|
|
281
|
+
};
|
|
282
|
+
const QmNotification = notification;
|
|
283
|
+
|
|
284
|
+
export { QmNotification, destroyNotificationManager, notification };
|