morya-ui 0.3.5 → 0.3.7
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/CHANGELOG.md +573 -523
- package/LICENSE +21 -21
- package/README.md +150 -150
- package/README.zh-CN.md +150 -150
- package/dist/Input-DQiiKSm3.js +174 -0
- package/dist/accordion/style.css +1146 -1148
- package/dist/auto-complete/style.css +1688 -1690
- package/dist/avatar/style.css +1259 -1261
- package/dist/badge/style.css +1313 -1315
- package/dist/block-ui/style.css +1146 -1148
- package/dist/breadcrumb/style.css +1146 -1148
- package/dist/button/style.css +2136 -2138
- package/dist/card/style.css +1146 -1148
- package/dist/carousel/style.css +1247 -1249
- package/dist/cascade-select/style.css +1837 -1839
- package/dist/checkbox/style.css +1146 -1148
- package/dist/chip/style.css +1290 -1292
- package/dist/command-menu/style.css +1379 -1381
- package/dist/component-registry.d.ts.map +1 -1
- package/dist/components/AutoComplete/styles.css +209 -209
- package/dist/components/Avatar/styles.css +113 -113
- package/dist/components/Badge/styles.css +165 -165
- package/dist/components/Button/styles.css +962 -962
- package/dist/components/Carousel/styles.css +101 -101
- package/dist/components/CascadeSelect/styles.css +157 -157
- package/dist/components/Chip/styles.css +144 -144
- package/dist/components/CommandMenu/styles.css +102 -102
- package/dist/components/ConfigProvider/styles.css +6 -6
- package/dist/components/ConfirmDialog/styles.css +24 -24
- package/dist/components/ConfirmPopup/styles.css +35 -35
- package/dist/components/ContextMenu/styles.css +138 -138
- package/dist/components/DatePicker/styles.css +335 -335
- package/dist/components/Dialog/styles.css +421 -421
- package/dist/components/Dock/styles.css +84 -84
- package/dist/components/Drawer/Drawer.vue.d.ts +3 -1
- package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
- package/dist/components/Drawer/styles.css +346 -334
- package/dist/components/Dropdown/styles.css +130 -130
- package/dist/components/Empty/styles.css +146 -146
- package/dist/components/FileUpload/styles.css +359 -359
- package/dist/components/Form/styles.css +114 -114
- package/dist/components/Gallery/styles.css +100 -100
- package/dist/components/Input/styles.css +356 -356
- package/dist/components/InputColor/styles.css +129 -129
- package/dist/components/InputNumber/styles.css +261 -261
- package/dist/components/InputPassword/styles.css +178 -178
- package/dist/components/InputTags/styles.css +112 -112
- package/dist/components/Layout/styles.css +433 -433
- package/dist/components/Loading/styles.css +378 -378
- package/dist/components/MegaMenu/styles.css +97 -97
- package/dist/components/Menu/styles.css +564 -564
- package/dist/components/Menubar/styles.css +144 -144
- package/dist/components/Message/styles.css +250 -250
- package/dist/components/MeterGroup/styles.css +49 -49
- package/dist/components/Page/styles.css +430 -430
- package/dist/components/Pagination/styles.css +105 -105
- package/dist/components/Popover/styles.css +92 -92
- package/dist/components/Result/styles.css +146 -146
- package/dist/components/Scrollbar/styles.css +131 -131
- package/dist/components/Select/styles.css +192 -192
- package/dist/components/SelectButton/styles.css +105 -105
- package/dist/components/Sidebar/styles.css +74 -74
- package/dist/components/Slider/styles.css +211 -211
- package/dist/components/SplitButton/styles.css +216 -216
- package/dist/components/Status/styles.css +191 -191
- package/dist/components/Stepper/styles.css +135 -135
- package/dist/components/Switch/styles.css +129 -129
- package/dist/components/Table/Table.vue.d.ts +188 -733
- package/dist/components/Table/Table.vue.d.ts.map +1 -1
- package/dist/components/Table/columns/keys.d.ts +13 -0
- package/dist/components/Table/columns/keys.d.ts.map +1 -0
- package/dist/components/Table/{hooks → columns}/useFixedColumn.d.ts +1 -1
- package/dist/components/Table/columns/useFixedColumn.d.ts.map +1 -0
- package/dist/components/Table/columns/useHeaders.d.ts +37 -0
- package/dist/components/Table/columns/useHeaders.d.ts.map +1 -0
- package/dist/components/Table/core/layout.d.ts +26 -0
- package/dist/components/Table/core/layout.d.ts.map +1 -0
- package/dist/components/Table/core/normalize.d.ts +30 -0
- package/dist/components/Table/core/normalize.d.ts.map +1 -0
- package/dist/components/Table/{tableQuery.d.ts → core/tableQuery.d.ts} +3 -2
- package/dist/components/Table/core/tableQuery.d.ts.map +1 -0
- package/dist/components/Table/core/tree.d.ts +31 -0
- package/dist/components/Table/core/tree.d.ts.map +1 -0
- package/dist/components/Table/core/treeSelection.d.ts +35 -0
- package/dist/components/Table/core/treeSelection.d.ts.map +1 -0
- package/dist/components/Table/core/utils.d.ts +15 -0
- package/dist/components/Table/core/utils.d.ts.map +1 -0
- package/dist/components/Table/hooks/index.d.ts +14 -10
- package/dist/components/Table/hooks/index.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/render/TableDefaultCell.vue.d.ts +11 -0
- package/dist/components/Table/render/TableDefaultCell.vue.d.ts.map +1 -0
- package/dist/components/Table/render/TableHeaderFilter.vue.d.ts +20 -0
- package/dist/components/Table/render/TableHeaderFilter.vue.d.ts.map +1 -0
- package/dist/components/Table/render/TableLoadingLine.vue.d.ts.map +1 -0
- package/dist/components/Table/render/TableTbody.vue.d.ts +154 -0
- package/dist/components/Table/render/TableTbody.vue.d.ts.map +1 -0
- package/dist/components/Table/render/TableThead.vue.d.ts +76 -0
- package/dist/components/Table/render/TableThead.vue.d.ts.map +1 -0
- package/dist/components/Table/{hooks → state}/internal.d.ts +8 -2
- package/dist/components/Table/state/internal.d.ts.map +1 -0
- package/dist/components/Table/state/useClickRow.d.ts +7 -0
- package/dist/components/Table/state/useClickRow.d.ts.map +1 -0
- package/dist/components/Table/state/useColumnResize.d.ts +11 -0
- package/dist/components/Table/state/useColumnResize.d.ts.map +1 -0
- package/dist/components/Table/state/useExpandableRow.d.ts +25 -0
- package/dist/components/Table/state/useExpandableRow.d.ts.map +1 -0
- package/dist/components/Table/state/usePageItems.d.ts +15 -0
- package/dist/components/Table/state/usePageItems.d.ts.map +1 -0
- package/dist/components/Table/{hooks → state}/usePagination.d.ts.map +1 -1
- package/dist/components/Table/{hooks → state}/useRows.d.ts +2 -2
- package/dist/components/Table/{hooks → state}/useRows.d.ts.map +1 -1
- package/dist/components/Table/state/useServerOptions.d.ts.map +1 -0
- package/dist/components/Table/{hooks → state}/useTotalItems.d.ts +2 -2
- package/dist/components/Table/{hooks → state}/useTotalItems.d.ts.map +1 -1
- package/dist/components/Table/state/useTreeRows.d.ts +21 -0
- package/dist/components/Table/state/useTreeRows.d.ts.map +1 -0
- package/dist/components/Table/state/useVirtualRows.d.ts +23 -0
- package/dist/components/Table/state/useVirtualRows.d.ts.map +1 -0
- package/dist/components/Table/styles.css +182 -6
- package/dist/components/Table/types.d.ts +108 -25
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/components/Tabs/styles.css +131 -131
- package/dist/components/Terminal/styles.css +74 -74
- package/dist/components/Textarea/styles.css +126 -126
- package/dist/components/TieredMenu/styles.css +125 -125
- package/dist/components/Timeline/styles.css +159 -159
- package/dist/components/Tree/Tree.vue.d.ts +2 -2
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts +1 -1
- package/dist/components/TreeSelect/styles.css +161 -161
- package/dist/components/VirtualScroller/styles.css +27 -27
- package/dist/config-provider/style.css +2470 -2472
- package/dist/confirm-dialog/style.css +2553 -2555
- package/dist/confirm-popup/style.css +2143 -2145
- package/dist/context-menu/style.css +1415 -1417
- package/dist/data-view/style.css +1629 -1631
- package/dist/date-picker/style.css +1481 -1483
- package/dist/dialog/style.css +2529 -2531
- package/dist/divider/style.css +1146 -1148
- package/dist/dock/style.css +1230 -1232
- package/dist/drawer/index.js +57 -50
- package/dist/drawer/style.css +1492 -1482
- package/dist/dropdown/style.css +1407 -1409
- package/dist/empty/style.css +1292 -1294
- package/dist/fieldset/style.css +1146 -1148
- package/dist/file-upload/style.css +1505 -1507
- package/dist/flex/style.css +1146 -1148
- package/dist/float-label/style.css +1146 -1148
- package/dist/fluid/style.css +1146 -1148
- package/dist/form/style.css +1262 -1264
- package/dist/gallery/style.css +1377 -1379
- package/dist/grid/style.css +1146 -1148
- package/dist/icon/style.css +1146 -1148
- package/dist/icon-field/style.css +1502 -1504
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4899 -3591
- package/dist/inplace/style.css +1146 -1148
- package/dist/input/index.js +2 -174
- package/dist/input/style.css +1502 -1504
- package/dist/input-color/style.css +1277 -1279
- package/dist/input-group/style.css +1146 -1148
- package/dist/input-number/style.css +1407 -1409
- package/dist/input-otp/style.css +1146 -1148
- package/dist/input-password/style.css +1324 -1326
- package/dist/input-tags/style.css +1258 -1260
- package/dist/knob/style.css +1146 -1148
- package/dist/label/style.css +1146 -1148
- package/dist/layout/style.css +1710 -1712
- package/dist/listbox/style.css +1304 -1306
- package/dist/loading/style.css +1526 -1528
- package/dist/mega-menu/style.css +1243 -1245
- package/dist/menu/style.css +1999 -2001
- package/dist/menubar/style.css +1421 -1423
- package/dist/message/style.css +1396 -1398
- package/dist/meter-group/style.css +1197 -1199
- package/dist/order-list/style.css +1146 -1148
- package/dist/page/style.css +2802 -2804
- package/dist/pagination/style.css +1443 -1445
- package/dist/panel/style.css +1146 -1148
- package/dist/pick-list/style.css +1146 -1148
- package/dist/popover/style.css +1240 -1242
- package/dist/progress-bar/style.css +1146 -1148
- package/dist/progress-spinner/style.css +1146 -1148
- package/dist/radio/style.css +1146 -1148
- package/dist/rating/style.css +1146 -1148
- package/dist/resolver-map.d.ts.map +1 -1
- package/dist/resolver.js +0 -1
- package/dist/result/style.css +1292 -1294
- package/dist/scroll-top/style.css +1277 -1279
- package/dist/scrollbar/style.css +1279 -1281
- package/dist/select/style.css +1899 -1901
- package/dist/select-button/style.css +1253 -1255
- package/dist/shared/styles/control-affix-icon.css +110 -110
- package/dist/shared/styles/control-suffix.css +118 -118
- package/dist/shared/styles/select-overlay.css +175 -175
- package/dist/sidebar/style.css +1220 -1222
- package/dist/skeleton/style.css +1146 -1148
- package/dist/slider/style.css +1359 -1361
- package/dist/space/style.css +1146 -1148
- package/dist/speed-dial/style.css +1146 -1148
- package/dist/split-button/style.css +2324 -2326
- package/dist/splitter/style.css +1146 -1148
- package/dist/status/style.css +1337 -1339
- package/dist/stepper/style.css +1281 -1283
- package/dist/styles/base.css +788 -790
- package/dist/styles.css +1 -1
- package/dist/switch/style.css +1277 -1279
- package/dist/table/index.js +2027 -601
- package/dist/table/style.css +1940 -1917
- package/dist/table/style.js +0 -4
- package/dist/tabs/style.css +1408 -1410
- package/dist/tag/style.css +1146 -1148
- package/dist/terminal/style.css +1222 -1224
- package/dist/textarea/style.css +1272 -1274
- package/dist/theme/styles.css +358 -358
- package/dist/tiered-menu/style.css +1402 -1404
- package/dist/timeline/style.css +1436 -1438
- package/dist/toast/style.css +1146 -1148
- package/dist/toggle-button/style.css +1146 -1148
- package/dist/toolbar/style.css +1146 -1148
- package/dist/tooltip/style.css +1146 -1148
- package/dist/tree/style.css +1146 -1148
- package/dist/tree-select/style.css +1841 -1843
- package/dist/virtual-scroller/style.css +1307 -1309
- package/package.json +1 -8
- package/dist/components/Table/TableLoadingLine.vue.d.ts.map +0 -1
- package/dist/components/Table/hooks/internal.d.ts.map +0 -1
- package/dist/components/Table/hooks/useClickRow.d.ts +0 -7
- package/dist/components/Table/hooks/useClickRow.d.ts.map +0 -1
- package/dist/components/Table/hooks/useExpandableRow.d.ts +0 -9
- package/dist/components/Table/hooks/useExpandableRow.d.ts.map +0 -1
- package/dist/components/Table/hooks/useFixedColumn.d.ts.map +0 -1
- package/dist/components/Table/hooks/useHeaders.d.ts +0 -14
- package/dist/components/Table/hooks/useHeaders.d.ts.map +0 -1
- package/dist/components/Table/hooks/usePageItems.d.ts +0 -17
- package/dist/components/Table/hooks/usePageItems.d.ts.map +0 -1
- package/dist/components/Table/hooks/useServerOptions.d.ts.map +0 -1
- package/dist/components/Table/normalize.d.ts +0 -9
- package/dist/components/Table/normalize.d.ts.map +0 -1
- package/dist/components/Table/tableQuery.d.ts.map +0 -1
- package/dist/components/Table/utils.d.ts +0 -10
- package/dist/components/Table/utils.d.ts.map +0 -1
- package/dist/components/TreeTable/TreeTable.vue.d.ts +0 -24
- package/dist/components/TreeTable/TreeTable.vue.d.ts.map +0 -1
- package/dist/components/TreeTable/TreeTableRow.vue.d.ts +0 -17
- package/dist/components/TreeTable/TreeTableRow.vue.d.ts.map +0 -1
- package/dist/components/TreeTable/index.d.ts +0 -3
- package/dist/components/TreeTable/index.d.ts.map +0 -1
- package/dist/components/TreeTable/styles.css +0 -97
- package/dist/components/TreeTable/types.d.ts +0 -25
- package/dist/components/TreeTable/types.d.ts.map +0 -1
- package/dist/tree-table/index.js +0 -128
- package/dist/tree-table/style.css +0 -1296
- package/dist/tree-table/style.js +0 -4
- /package/dist/components/Table/{TableLoadingLine.vue.d.ts → render/TableLoadingLine.vue.d.ts} +0 -0
- /package/dist/components/Table/{hooks → state}/usePagination.d.ts +0 -0
- /package/dist/components/Table/{hooks → state}/useServerOptions.d.ts +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Morya UI contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Morya UI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://morya-space.github.io/morya-ui/">
|
|
3
|
-
<img src="./assets/logo.svg" alt="Morya UI" width="96" height="96" />
|
|
4
|
-
</a>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<h1 align="center">Morya UI</h1>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
A Vue 3 component library with design tokens, light/dark themes, and interactive docs.
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
|
-
<p align="center">
|
|
14
|
-
English | <a href="./README.zh-CN.md">中文</a>
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
<p align="center">
|
|
18
|
-
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/v/morya-ui?style=flat-square" alt="npm version" /></a>
|
|
19
|
-
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/dm/morya-ui?style=flat-square" alt="npm downloads" /></a>
|
|
20
|
-
<a href="./LICENSE"><img src="https://img.shields.io/github/license/morya-space/morya-ui?style=flat-square" alt="license" /></a>
|
|
21
|
-
<a href="https://vuejs.org/"><img src="https://img.shields.io/badge/Vue-3-42b883?style=flat-square&logo=vue.js&logoColor=white" alt="Vue 3" /></a>
|
|
22
|
-
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.x-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /></a>
|
|
23
|
-
</p>
|
|
24
|
-
|
|
25
|
-
<p align="center">
|
|
26
|
-
<a href="https://morya-space.github.io/morya-ui/"><b>Documentation</b></a>
|
|
27
|
-
·
|
|
28
|
-
<a href="https://morya-space.github.io/morya-ui/components">Components</a>
|
|
29
|
-
·
|
|
30
|
-
<a href="https://github.com/morya-space/morya-ui/issues">Issues</a>
|
|
31
|
-
·
|
|
32
|
-
<a href="./CHANGELOG.md">Changelog</a>
|
|
33
|
-
</p>
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Introduction
|
|
38
|
-
|
|
39
|
-
**Morya UI** (`morya-ui`) is an open-source Vue 3 component library for building modern web applications. It ships **90+ components**, a token-based theme system, built-in i18n, and a documentation site with live previews.
|
|
40
|
-
|
|
41
|
-
Whether you are starting a new admin dashboard, SaaS product, or internal tool, you get consistent forms, overlays, data display, and feedback primitives out of the box.
|
|
42
|
-
|
|
43
|
-
## Features
|
|
44
|
-
|
|
45
|
-
### Complete
|
|
46
|
-
|
|
47
|
-
90+ components covering basics, forms, navigation, data display, layout, and feedback — all tree-shakeable via ESM subpath imports.
|
|
48
|
-
|
|
49
|
-
### Theme-ready
|
|
50
|
-
|
|
51
|
-
Light and dark modes powered by `--m-*` CSS variables. Switch themes with `useTheme`, tune density and motion with `useDensity` / `useMotion`, and override per subtree via `MConfigProvider`.
|
|
52
|
-
|
|
53
|
-
### TypeScript-first
|
|
54
|
-
|
|
55
|
-
Written in Vue 3 Composition API + TypeScript. Props, emits, and locale messages are fully typed.
|
|
56
|
-
|
|
57
|
-
### Flexible consumption
|
|
58
|
-
|
|
59
|
-
Use full registration, named imports, on-demand subpaths, or `MoryaUIResolver` with `unplugin-vue-components` — pick one style per app.
|
|
60
|
-
|
|
61
|
-
### Docs as preview
|
|
62
|
-
|
|
63
|
-
Every component includes Markdown docs with interactive `vue preview` blocks. Browse them online or run the docs site locally.
|
|
64
|
-
|
|
65
|
-
### SSR & meta-frameworks
|
|
66
|
-
|
|
67
|
-
Works with **Nuxt 3**, **Astro + Vue**, **Vite SSR**, and similar setups. Includes the [`@morya-ui/nuxt`](./packages/nuxt) module — see the [SSR guide](https://morya-space.github.io/morya-ui/docs/ssr).
|
|
68
|
-
|
|
69
|
-
## Documentation
|
|
70
|
-
|
|
71
|
-
**https://morya-space.github.io/morya-ui/**
|
|
72
|
-
|
|
73
|
-
| Section | Link |
|
|
74
|
-
| --- | --- |
|
|
75
|
-
| Quick start | [Guide](https://morya-space.github.io/morya-ui/docs/quick-start) |
|
|
76
|
-
| Theme | [Theme](https://morya-space.github.io/morya-ui/docs/theme) |
|
|
77
|
-
| Configuration | [Config](https://morya-space.github.io/morya-ui/docs/config) |
|
|
78
|
-
| SSR | [Nuxt / Astro / Vite SSR](https://morya-space.github.io/morya-ui/docs/ssr) |
|
|
79
|
-
| Components | [Catalog](https://morya-space.github.io/morya-ui/components) |
|
|
80
|
-
| Changelog | [Releases](https://morya-space.github.io/morya-ui/changelog) |
|
|
81
|
-
|
|
82
|
-
## Install
|
|
83
|
-
|
|
84
|
-
Requires **Vue 3** (3.5+ recommended) and a bundler that resolves package `exports` (Vite, webpack 5+, etc.).
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
pnpm add morya-ui
|
|
88
|
-
# npm i morya-ui
|
|
89
|
-
# yarn add morya-ui
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Quick start
|
|
93
|
-
|
|
94
|
-
Register all components and import the full stylesheet:
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
import MoryaUI from 'morya-ui'
|
|
98
|
-
import { createApp } from 'vue'
|
|
99
|
-
import App from './App.vue'
|
|
100
|
-
import 'morya-ui/styles.css'
|
|
101
|
-
|
|
102
|
-
createApp(App).use(MoryaUI).mount('#app')
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
On-demand import (styles included automatically):
|
|
106
|
-
|
|
107
|
-
```ts
|
|
108
|
-
import { MButton } from 'morya-ui/button'
|
|
109
|
-
import { MInput } from 'morya-ui/input'
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
For global defaults (locale, size, overlay mount point):
|
|
113
|
-
|
|
114
|
-
```ts
|
|
115
|
-
import { createMoryaUI, enUS } from 'morya-ui'
|
|
116
|
-
|
|
117
|
-
createApp(App).use(createMoryaUI({ locale: enUS })).mount('#app')
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
See the [Quick start guide](https://morya-space.github.io/morya-ui/docs/quick-start) for full import modes, Vite resolver setup, and theme APIs.
|
|
121
|
-
|
|
122
|
-
## Ecosystem
|
|
123
|
-
|
|
124
|
-
| Package | Description |
|
|
125
|
-
| --- | --- |
|
|
126
|
-
| [`morya-ui`](https://www.npmjs.com/package/morya-ui) | Components, styles, theme & locale helpers |
|
|
127
|
-
| [`@morya-ui/nuxt`](./packages/nuxt) | Nuxt 3 module (styles, transpile, overlay context) |
|
|
128
|
-
| [`@morya-ui/mcp`](https://www.npmjs.com/package/@morya-ui/mcp) | Optional MCP server for AI-assisted doc lookup |
|
|
129
|
-
| [`@morya-ui/setup`](https://www.npmjs.com/package/@morya-ui/setup) | One-shot consumer setup: library, styles, Agent skill, Cursor rules, and MCP |
|
|
130
|
-
|
|
131
|
-
## Contributing
|
|
132
|
-
|
|
133
|
-
We welcome issues and pull requests. Please read [CONTRIBUTING.md](./CONTRIBUTING.md) before submitting changes.
|
|
134
|
-
|
|
135
|
-
For maintainers: [Development guide](./docs/DEVELOPMENT.md) · [Release scripts](./scripts/README.md)
|
|
136
|
-
|
|
137
|
-
## Local development
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
pnpm install
|
|
141
|
-
pnpm dev # docs site → http://localhost:5182
|
|
142
|
-
pnpm build # library → dist/
|
|
143
|
-
pnpm build:docs:pages # GitHub Pages build
|
|
144
|
-
pnpm test
|
|
145
|
-
pnpm typecheck
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## License
|
|
149
|
-
|
|
150
|
-
[MIT](./LICENSE) © Morya UI contributors
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://morya-space.github.io/morya-ui/">
|
|
3
|
+
<img src="./assets/logo.svg" alt="Morya UI" width="96" height="96" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">Morya UI</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
A Vue 3 component library with design tokens, light/dark themes, and interactive docs.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
English | <a href="./README.zh-CN.md">中文</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/v/morya-ui?style=flat-square" alt="npm version" /></a>
|
|
19
|
+
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/dm/morya-ui?style=flat-square" alt="npm downloads" /></a>
|
|
20
|
+
<a href="./LICENSE"><img src="https://img.shields.io/github/license/morya-space/morya-ui?style=flat-square" alt="license" /></a>
|
|
21
|
+
<a href="https://vuejs.org/"><img src="https://img.shields.io/badge/Vue-3-42b883?style=flat-square&logo=vue.js&logoColor=white" alt="Vue 3" /></a>
|
|
22
|
+
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.x-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /></a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<a href="https://morya-space.github.io/morya-ui/"><b>Documentation</b></a>
|
|
27
|
+
·
|
|
28
|
+
<a href="https://morya-space.github.io/morya-ui/components">Components</a>
|
|
29
|
+
·
|
|
30
|
+
<a href="https://github.com/morya-space/morya-ui/issues">Issues</a>
|
|
31
|
+
·
|
|
32
|
+
<a href="./CHANGELOG.md">Changelog</a>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Introduction
|
|
38
|
+
|
|
39
|
+
**Morya UI** (`morya-ui`) is an open-source Vue 3 component library for building modern web applications. It ships **90+ components**, a token-based theme system, built-in i18n, and a documentation site with live previews.
|
|
40
|
+
|
|
41
|
+
Whether you are starting a new admin dashboard, SaaS product, or internal tool, you get consistent forms, overlays, data display, and feedback primitives out of the box.
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
### Complete
|
|
46
|
+
|
|
47
|
+
90+ components covering basics, forms, navigation, data display, layout, and feedback — all tree-shakeable via ESM subpath imports.
|
|
48
|
+
|
|
49
|
+
### Theme-ready
|
|
50
|
+
|
|
51
|
+
Light and dark modes powered by `--m-*` CSS variables. Switch themes with `useTheme`, tune density and motion with `useDensity` / `useMotion`, and override per subtree via `MConfigProvider`.
|
|
52
|
+
|
|
53
|
+
### TypeScript-first
|
|
54
|
+
|
|
55
|
+
Written in Vue 3 Composition API + TypeScript. Props, emits, and locale messages are fully typed.
|
|
56
|
+
|
|
57
|
+
### Flexible consumption
|
|
58
|
+
|
|
59
|
+
Use full registration, named imports, on-demand subpaths, or `MoryaUIResolver` with `unplugin-vue-components` — pick one style per app.
|
|
60
|
+
|
|
61
|
+
### Docs as preview
|
|
62
|
+
|
|
63
|
+
Every component includes Markdown docs with interactive `vue preview` blocks. Browse them online or run the docs site locally.
|
|
64
|
+
|
|
65
|
+
### SSR & meta-frameworks
|
|
66
|
+
|
|
67
|
+
Works with **Nuxt 3**, **Astro + Vue**, **Vite SSR**, and similar setups. Includes the [`@morya-ui/nuxt`](./packages/nuxt) module — see the [SSR guide](https://morya-space.github.io/morya-ui/docs/ssr).
|
|
68
|
+
|
|
69
|
+
## Documentation
|
|
70
|
+
|
|
71
|
+
**https://morya-space.github.io/morya-ui/**
|
|
72
|
+
|
|
73
|
+
| Section | Link |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| Quick start | [Guide](https://morya-space.github.io/morya-ui/docs/quick-start) |
|
|
76
|
+
| Theme | [Theme](https://morya-space.github.io/morya-ui/docs/theme) |
|
|
77
|
+
| Configuration | [Config](https://morya-space.github.io/morya-ui/docs/config) |
|
|
78
|
+
| SSR | [Nuxt / Astro / Vite SSR](https://morya-space.github.io/morya-ui/docs/ssr) |
|
|
79
|
+
| Components | [Catalog](https://morya-space.github.io/morya-ui/components) |
|
|
80
|
+
| Changelog | [Releases](https://morya-space.github.io/morya-ui/changelog) |
|
|
81
|
+
|
|
82
|
+
## Install
|
|
83
|
+
|
|
84
|
+
Requires **Vue 3** (3.5+ recommended) and a bundler that resolves package `exports` (Vite, webpack 5+, etc.).
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pnpm add morya-ui
|
|
88
|
+
# npm i morya-ui
|
|
89
|
+
# yarn add morya-ui
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Quick start
|
|
93
|
+
|
|
94
|
+
Register all components and import the full stylesheet:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import MoryaUI from 'morya-ui'
|
|
98
|
+
import { createApp } from 'vue'
|
|
99
|
+
import App from './App.vue'
|
|
100
|
+
import 'morya-ui/styles.css'
|
|
101
|
+
|
|
102
|
+
createApp(App).use(MoryaUI).mount('#app')
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
On-demand import (styles included automatically):
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { MButton } from 'morya-ui/button'
|
|
109
|
+
import { MInput } from 'morya-ui/input'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For global defaults (locale, size, overlay mount point):
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
import { createMoryaUI, enUS } from 'morya-ui'
|
|
116
|
+
|
|
117
|
+
createApp(App).use(createMoryaUI({ locale: enUS })).mount('#app')
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
See the [Quick start guide](https://morya-space.github.io/morya-ui/docs/quick-start) for full import modes, Vite resolver setup, and theme APIs.
|
|
121
|
+
|
|
122
|
+
## Ecosystem
|
|
123
|
+
|
|
124
|
+
| Package | Description |
|
|
125
|
+
| --- | --- |
|
|
126
|
+
| [`morya-ui`](https://www.npmjs.com/package/morya-ui) | Components, styles, theme & locale helpers |
|
|
127
|
+
| [`@morya-ui/nuxt`](./packages/nuxt) | Nuxt 3 module (styles, transpile, overlay context) |
|
|
128
|
+
| [`@morya-ui/mcp`](https://www.npmjs.com/package/@morya-ui/mcp) | Optional MCP server for AI-assisted doc lookup |
|
|
129
|
+
| [`@morya-ui/setup`](https://www.npmjs.com/package/@morya-ui/setup) | One-shot consumer setup: library, styles, Agent skill, Cursor rules, and MCP |
|
|
130
|
+
|
|
131
|
+
## Contributing
|
|
132
|
+
|
|
133
|
+
We welcome issues and pull requests. Please read [CONTRIBUTING.md](./CONTRIBUTING.md) before submitting changes.
|
|
134
|
+
|
|
135
|
+
For maintainers: [Development guide](./docs/DEVELOPMENT.md) · [Release scripts](./scripts/README.md)
|
|
136
|
+
|
|
137
|
+
## Local development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pnpm install
|
|
141
|
+
pnpm dev # docs site → http://localhost:5182
|
|
142
|
+
pnpm build # library → dist/
|
|
143
|
+
pnpm build:docs:pages # GitHub Pages build
|
|
144
|
+
pnpm test
|
|
145
|
+
pnpm typecheck
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
[MIT](./LICENSE) © Morya UI contributors
|
package/README.zh-CN.md
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://morya-space.github.io/morya-ui/">
|
|
3
|
-
<img src="./assets/logo.svg" alt="Morya UI" width="96" height="96" />
|
|
4
|
-
</a>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<h1 align="center">Morya UI</h1>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
带设计令牌、亮暗主题与交互式文档的 Vue 3 组件库。
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
|
-
<p align="center">
|
|
14
|
-
<a href="./README.md">English</a> | 中文
|
|
15
|
-
</p>
|
|
16
|
-
|
|
17
|
-
<p align="center">
|
|
18
|
-
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/v/morya-ui?style=flat-square" alt="npm version" /></a>
|
|
19
|
-
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/dm/morya-ui?style=flat-square" alt="npm downloads" /></a>
|
|
20
|
-
<a href="./LICENSE"><img src="https://img.shields.io/github/license/morya-space/morya-ui?style=flat-square" alt="license" /></a>
|
|
21
|
-
<a href="https://vuejs.org/"><img src="https://img.shields.io/badge/Vue-3-42b883?style=flat-square&logo=vue.js&logoColor=white" alt="Vue 3" /></a>
|
|
22
|
-
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.x-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /></a>
|
|
23
|
-
</p>
|
|
24
|
-
|
|
25
|
-
<p align="center">
|
|
26
|
-
<a href="https://morya-space.github.io/morya-ui/"><b>文档站</b></a>
|
|
27
|
-
·
|
|
28
|
-
<a href="https://morya-space.github.io/morya-ui/components">组件</a>
|
|
29
|
-
·
|
|
30
|
-
<a href="https://github.com/morya-space/morya-ui/issues">Issues</a>
|
|
31
|
-
·
|
|
32
|
-
<a href="./CHANGELOG.md">更新日志</a>
|
|
33
|
-
</p>
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 介绍
|
|
38
|
-
|
|
39
|
-
**Morya UI**(`morya-ui`)是一套开源的 Vue 3 组件库,提供 **90+ 个组件**、基于令牌的主题系统、内置国际化,以及带实时预览的文档站。
|
|
40
|
-
|
|
41
|
-
无论你是做管理后台、SaaS 产品还是内部工具,都可以直接使用统一的表单、浮层、数据展示与反馈能力。
|
|
42
|
-
|
|
43
|
-
## 特性
|
|
44
|
-
|
|
45
|
-
### 组件齐全
|
|
46
|
-
|
|
47
|
-
覆盖基础、表单、导航、数据展示、布局与反馈等 90+ 个组件,均支持 ESM 按需引入与 tree-shaking。
|
|
48
|
-
|
|
49
|
-
### 主题开箱即用
|
|
50
|
-
|
|
51
|
-
亮/暗色模式基于 `--m-*` CSS 变量;通过 `useTheme` 切换主题,用 `useDensity` / `useMotion` 调整密度与动效,子树可用 `MConfigProvider` 覆盖。
|
|
52
|
-
|
|
53
|
-
### TypeScript 优先
|
|
54
|
-
|
|
55
|
-
基于 Vue 3 Composition API 与 TypeScript 编写,Props、Emits 与 locale 均有完整类型。
|
|
56
|
-
|
|
57
|
-
### 多种接入方式
|
|
58
|
-
|
|
59
|
-
支持全量注册、按名导入、按需子路径,以及配合 `unplugin-vue-components` 的 `MoryaUIResolver`——同一应用内建议保持一致。
|
|
60
|
-
|
|
61
|
-
### 文档即预览
|
|
62
|
-
|
|
63
|
-
每个组件自带 Markdown 文档与可交互 `vue preview` 示例,可在线浏览或本地启动文档站。
|
|
64
|
-
|
|
65
|
-
### SSR 与元框架
|
|
66
|
-
|
|
67
|
-
兼容 **Nuxt 3**、**Astro + Vue**、**Vite SSR** 等场景;提供 [`@morya-ui/nuxt`](./packages/nuxt) 模块,详见 [SSR 指南](https://morya-space.github.io/morya-ui/docs/ssr)。
|
|
68
|
-
|
|
69
|
-
## 文档
|
|
70
|
-
|
|
71
|
-
**https://morya-space.github.io/morya-ui/**
|
|
72
|
-
|
|
73
|
-
| 章节 | 链接 |
|
|
74
|
-
| --- | --- |
|
|
75
|
-
| 快速上手 | [指南](https://morya-space.github.io/morya-ui/docs/quick-start) |
|
|
76
|
-
| 主题 | [主题](https://morya-space.github.io/morya-ui/docs/theme) |
|
|
77
|
-
| 全局配置 | [配置](https://morya-space.github.io/morya-ui/docs/config) |
|
|
78
|
-
| SSR | [Nuxt / Astro / Vite SSR](https://morya-space.github.io/morya-ui/docs/ssr) |
|
|
79
|
-
| 组件 | [目录](https://morya-space.github.io/morya-ui/components) |
|
|
80
|
-
| 更新日志 | [版本](https://morya-space.github.io/morya-ui/changelog) |
|
|
81
|
-
|
|
82
|
-
## 安装
|
|
83
|
-
|
|
84
|
-
需要 **Vue 3**(推荐 3.5 及以上),以及能解析包 `exports` 的构建工具(Vite、webpack 5+ 等)。
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
pnpm add morya-ui
|
|
88
|
-
# npm i morya-ui
|
|
89
|
-
# yarn add morya-ui
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## 快速开始
|
|
93
|
-
|
|
94
|
-
全量注册并引入样式:
|
|
95
|
-
|
|
96
|
-
```ts
|
|
97
|
-
import MoryaUI from 'morya-ui'
|
|
98
|
-
import { createApp } from 'vue'
|
|
99
|
-
import App from './App.vue'
|
|
100
|
-
import 'morya-ui/styles.css'
|
|
101
|
-
|
|
102
|
-
createApp(App).use(MoryaUI).mount('#app')
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
按需引入(样式自动带入):
|
|
106
|
-
|
|
107
|
-
```ts
|
|
108
|
-
import { MButton } from 'morya-ui/button'
|
|
109
|
-
import { MInput } from 'morya-ui/input'
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
应用级默认配置(语言、尺寸、浮层挂载点等):
|
|
113
|
-
|
|
114
|
-
```ts
|
|
115
|
-
import { createMoryaUI, zhCN } from 'morya-ui'
|
|
116
|
-
|
|
117
|
-
createApp(App).use(createMoryaUI({ locale: zhCN })).mount('#app')
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
完整接入方式、Vite 解析器与主题 API 见 [快速上手](https://morya-space.github.io/morya-ui/docs/quick-start)。
|
|
121
|
-
|
|
122
|
-
## 生态
|
|
123
|
-
|
|
124
|
-
| 包 | 说明 |
|
|
125
|
-
| --- | --- |
|
|
126
|
-
| [`morya-ui`](https://www.npmjs.com/package/morya-ui) | 组件、样式、主题与语言工具 |
|
|
127
|
-
| [`@morya-ui/nuxt`](./packages/nuxt) | Nuxt 3 模块(样式、transpile、overlay 上下文) |
|
|
128
|
-
| [`@morya-ui/mcp`](https://www.npmjs.com/package/@morya-ui/mcp) | 可选 MCP 服务,供 AI 客户端检索文档 |
|
|
129
|
-
| [`@morya-ui/setup`](https://www.npmjs.com/package/@morya-ui/setup) | 业务项目一键接入:组件库、样式、Agent Skill、Cursor 规则与 MCP |
|
|
130
|
-
|
|
131
|
-
## 参与贡献
|
|
132
|
-
|
|
133
|
-
欢迎提交 Issue 与 Pull Request。请先阅读 [CONTRIBUTING.zh-CN.md](./CONTRIBUTING.zh-CN.md)。
|
|
134
|
-
|
|
135
|
-
维护者文档:[开发指南](./docs/DEVELOPMENT.zh-CN.md) · [发版脚本](./scripts/README.md)
|
|
136
|
-
|
|
137
|
-
## 本地开发
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
pnpm install
|
|
141
|
-
pnpm dev # 文档站 → http://localhost:5182
|
|
142
|
-
pnpm build # 组件库 → dist/
|
|
143
|
-
pnpm build:docs:pages # GitHub Pages 构建
|
|
144
|
-
pnpm test
|
|
145
|
-
pnpm typecheck
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## 许可证
|
|
149
|
-
|
|
150
|
-
[MIT](./LICENSE) © Morya UI contributors
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://morya-space.github.io/morya-ui/">
|
|
3
|
+
<img src="./assets/logo.svg" alt="Morya UI" width="96" height="96" />
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">Morya UI</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
带设计令牌、亮暗主题与交互式文档的 Vue 3 组件库。
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="./README.md">English</a> | 中文
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/v/morya-ui?style=flat-square" alt="npm version" /></a>
|
|
19
|
+
<a href="https://www.npmjs.com/package/morya-ui"><img src="https://img.shields.io/npm/dm/morya-ui?style=flat-square" alt="npm downloads" /></a>
|
|
20
|
+
<a href="./LICENSE"><img src="https://img.shields.io/github/license/morya-space/morya-ui?style=flat-square" alt="license" /></a>
|
|
21
|
+
<a href="https://vuejs.org/"><img src="https://img.shields.io/badge/Vue-3-42b883?style=flat-square&logo=vue.js&logoColor=white" alt="Vue 3" /></a>
|
|
22
|
+
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.x-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /></a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<a href="https://morya-space.github.io/morya-ui/"><b>文档站</b></a>
|
|
27
|
+
·
|
|
28
|
+
<a href="https://morya-space.github.io/morya-ui/components">组件</a>
|
|
29
|
+
·
|
|
30
|
+
<a href="https://github.com/morya-space/morya-ui/issues">Issues</a>
|
|
31
|
+
·
|
|
32
|
+
<a href="./CHANGELOG.md">更新日志</a>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 介绍
|
|
38
|
+
|
|
39
|
+
**Morya UI**(`morya-ui`)是一套开源的 Vue 3 组件库,提供 **90+ 个组件**、基于令牌的主题系统、内置国际化,以及带实时预览的文档站。
|
|
40
|
+
|
|
41
|
+
无论你是做管理后台、SaaS 产品还是内部工具,都可以直接使用统一的表单、浮层、数据展示与反馈能力。
|
|
42
|
+
|
|
43
|
+
## 特性
|
|
44
|
+
|
|
45
|
+
### 组件齐全
|
|
46
|
+
|
|
47
|
+
覆盖基础、表单、导航、数据展示、布局与反馈等 90+ 个组件,均支持 ESM 按需引入与 tree-shaking。
|
|
48
|
+
|
|
49
|
+
### 主题开箱即用
|
|
50
|
+
|
|
51
|
+
亮/暗色模式基于 `--m-*` CSS 变量;通过 `useTheme` 切换主题,用 `useDensity` / `useMotion` 调整密度与动效,子树可用 `MConfigProvider` 覆盖。
|
|
52
|
+
|
|
53
|
+
### TypeScript 优先
|
|
54
|
+
|
|
55
|
+
基于 Vue 3 Composition API 与 TypeScript 编写,Props、Emits 与 locale 均有完整类型。
|
|
56
|
+
|
|
57
|
+
### 多种接入方式
|
|
58
|
+
|
|
59
|
+
支持全量注册、按名导入、按需子路径,以及配合 `unplugin-vue-components` 的 `MoryaUIResolver`——同一应用内建议保持一致。
|
|
60
|
+
|
|
61
|
+
### 文档即预览
|
|
62
|
+
|
|
63
|
+
每个组件自带 Markdown 文档与可交互 `vue preview` 示例,可在线浏览或本地启动文档站。
|
|
64
|
+
|
|
65
|
+
### SSR 与元框架
|
|
66
|
+
|
|
67
|
+
兼容 **Nuxt 3**、**Astro + Vue**、**Vite SSR** 等场景;提供 [`@morya-ui/nuxt`](./packages/nuxt) 模块,详见 [SSR 指南](https://morya-space.github.io/morya-ui/docs/ssr)。
|
|
68
|
+
|
|
69
|
+
## 文档
|
|
70
|
+
|
|
71
|
+
**https://morya-space.github.io/morya-ui/**
|
|
72
|
+
|
|
73
|
+
| 章节 | 链接 |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| 快速上手 | [指南](https://morya-space.github.io/morya-ui/docs/quick-start) |
|
|
76
|
+
| 主题 | [主题](https://morya-space.github.io/morya-ui/docs/theme) |
|
|
77
|
+
| 全局配置 | [配置](https://morya-space.github.io/morya-ui/docs/config) |
|
|
78
|
+
| SSR | [Nuxt / Astro / Vite SSR](https://morya-space.github.io/morya-ui/docs/ssr) |
|
|
79
|
+
| 组件 | [目录](https://morya-space.github.io/morya-ui/components) |
|
|
80
|
+
| 更新日志 | [版本](https://morya-space.github.io/morya-ui/changelog) |
|
|
81
|
+
|
|
82
|
+
## 安装
|
|
83
|
+
|
|
84
|
+
需要 **Vue 3**(推荐 3.5 及以上),以及能解析包 `exports` 的构建工具(Vite、webpack 5+ 等)。
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pnpm add morya-ui
|
|
88
|
+
# npm i morya-ui
|
|
89
|
+
# yarn add morya-ui
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 快速开始
|
|
93
|
+
|
|
94
|
+
全量注册并引入样式:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import MoryaUI from 'morya-ui'
|
|
98
|
+
import { createApp } from 'vue'
|
|
99
|
+
import App from './App.vue'
|
|
100
|
+
import 'morya-ui/styles.css'
|
|
101
|
+
|
|
102
|
+
createApp(App).use(MoryaUI).mount('#app')
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
按需引入(样式自动带入):
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import { MButton } from 'morya-ui/button'
|
|
109
|
+
import { MInput } from 'morya-ui/input'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
应用级默认配置(语言、尺寸、浮层挂载点等):
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
import { createMoryaUI, zhCN } from 'morya-ui'
|
|
116
|
+
|
|
117
|
+
createApp(App).use(createMoryaUI({ locale: zhCN })).mount('#app')
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
完整接入方式、Vite 解析器与主题 API 见 [快速上手](https://morya-space.github.io/morya-ui/docs/quick-start)。
|
|
121
|
+
|
|
122
|
+
## 生态
|
|
123
|
+
|
|
124
|
+
| 包 | 说明 |
|
|
125
|
+
| --- | --- |
|
|
126
|
+
| [`morya-ui`](https://www.npmjs.com/package/morya-ui) | 组件、样式、主题与语言工具 |
|
|
127
|
+
| [`@morya-ui/nuxt`](./packages/nuxt) | Nuxt 3 模块(样式、transpile、overlay 上下文) |
|
|
128
|
+
| [`@morya-ui/mcp`](https://www.npmjs.com/package/@morya-ui/mcp) | 可选 MCP 服务,供 AI 客户端检索文档 |
|
|
129
|
+
| [`@morya-ui/setup`](https://www.npmjs.com/package/@morya-ui/setup) | 业务项目一键接入:组件库、样式、Agent Skill、Cursor 规则与 MCP |
|
|
130
|
+
|
|
131
|
+
## 参与贡献
|
|
132
|
+
|
|
133
|
+
欢迎提交 Issue 与 Pull Request。请先阅读 [CONTRIBUTING.zh-CN.md](./CONTRIBUTING.zh-CN.md)。
|
|
134
|
+
|
|
135
|
+
维护者文档:[开发指南](./docs/DEVELOPMENT.zh-CN.md) · [发版脚本](./scripts/README.md)
|
|
136
|
+
|
|
137
|
+
## 本地开发
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pnpm install
|
|
141
|
+
pnpm dev # 文档站 → http://localhost:5182
|
|
142
|
+
pnpm build # 组件库 → dist/
|
|
143
|
+
pnpm build:docs:pages # GitHub Pages 构建
|
|
144
|
+
pnpm test
|
|
145
|
+
pnpm typecheck
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## 许可证
|
|
149
|
+
|
|
150
|
+
[MIT](./LICENSE) © Morya UI contributors
|