@mt2025ui/mt-design 1.0.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.
Files changed (36) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/LICENSE +21 -0
  3. package/README.md +5 -0
  4. package/index.html +14 -0
  5. package/package.json +25 -0
  6. package/public/vite.svg +1 -0
  7. package/src/App.vue +142 -0
  8. package/src/assets/iconfont/iconfont.js +70 -0
  9. package/src/assets/svg/DragIcon.vue +14 -0
  10. package/src/assets/svg/LockIcon.vue +14 -0
  11. package/src/assets/svg/UnlockIcon.vue +14 -0
  12. package/src/assets/vue.svg +1 -0
  13. package/src/components/MtAttach/MtAttachmentDisplay.vue +240 -0
  14. package/src/components/MtAttach/MtAttachmentUpload.vue +138 -0
  15. package/src/components/MtIcon/MtIcon.vue +48 -0
  16. package/src/components/MtIcon/index.ts +4 -0
  17. package/src/components/MtLayout/MtContainer.vue +97 -0
  18. package/src/components/MtLayout/MtFloatingPanel.vue +583 -0
  19. package/src/components/MtLayout/MtLayout.vue +99 -0
  20. package/src/components/MtLayout/MtLayoutItem.vue +1049 -0
  21. package/src/components/MtLayout/icons/CloseIcon.vue +7 -0
  22. package/src/components/MtLayout/icons/LockIcon.vue +7 -0
  23. package/src/components/MtLayout/icons/MenuIcon.vue +5 -0
  24. package/src/components/MtLayout/icons/UnlockIcon.vue +7 -0
  25. package/src/components/MtLayout/index.ts +7 -0
  26. package/src/components/MtLayout/registry.ts +15 -0
  27. package/src/example/mtFloating/Demo.vue +266 -0
  28. package/src/example/mtIcon/Demo.vue +151 -0
  29. package/src/example/mtLayout/Demo.vue +105 -0
  30. package/src/index.ts +29 -0
  31. package/src/main.ts +7 -0
  32. package/src/style.css +88 -0
  33. package/tsconfig.app.json +17 -0
  34. package/tsconfig.json +7 -0
  35. package/tsconfig.node.json +26 -0
  36. package/vite.config.ts +31 -0
package/src/style.css ADDED
@@ -0,0 +1,88 @@
1
+ :root {
2
+ font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
+ font-weight: 400;
4
+ line-height: 1.5;
5
+ color: rgb(0 0 0 / 87%);
6
+ color-scheme: light dark;
7
+ background-color: #242424;
8
+ font-synthesis: none;
9
+ text-rendering: optimizelegibility;
10
+ -webkit-font-smoothing: antialiased;
11
+ -moz-osx-font-smoothing: grayscale;
12
+ outline: none;
13
+ }
14
+
15
+ html,
16
+ body {
17
+ width: 100%;
18
+ height: 100%;
19
+ padding: 0;
20
+ margin: 0;
21
+ overflow: hidden; /* Optional: prevent scrollbars if layout handles scrolling */
22
+ }
23
+
24
+ a {
25
+ font-weight: 500;
26
+ color: #646cff;
27
+ text-decoration: inherit;
28
+ }
29
+
30
+ a:hover {
31
+ color: #535bf2;
32
+ }
33
+
34
+ body {
35
+ min-width: 320px;
36
+ }
37
+
38
+ h1 {
39
+ font-size: 3.2em;
40
+ line-height: 1.1;
41
+ }
42
+
43
+ button {
44
+ padding: 0.6em 1.2em;
45
+ font-family: inherit;
46
+ font-size: 1em;
47
+ font-weight: 500;
48
+ cursor: pointer;
49
+ background-color: #1a1a1a;
50
+ border: 1px solid transparent;
51
+ border-radius: 8px;
52
+ transition: border-color 0.25s;
53
+ }
54
+
55
+ button:hover {
56
+ border-color: #646cff;
57
+ }
58
+
59
+ button:focus,
60
+ button:focus-visible {
61
+ outline: none;
62
+ }
63
+
64
+ .card {
65
+ padding: 2em;
66
+ }
67
+
68
+ #app {
69
+ width: 100%;
70
+ height: 100%;
71
+ padding: 0;
72
+ margin: 0;
73
+ }
74
+
75
+ @media (prefers-color-scheme: light) {
76
+ :root {
77
+ color: #213547;
78
+ background-color: #fff;
79
+ }
80
+
81
+ a:hover {
82
+ color: #747bff;
83
+ }
84
+
85
+ button {
86
+ background-color: #f9f9f9;
87
+ }
88
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "@vue/tsconfig/tsconfig.dom.json",
3
+ "compilerOptions": {
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
+ "types": ["vite/client"],
6
+
7
+ /* Linting */
8
+ "strict": false,
9
+ "strictNullChecks": false,
10
+ "noUnusedLocals": false,
11
+ "noUnusedParameters": false,
12
+ "erasableSyntaxOnly": true,
13
+ "noFallthroughCasesInSwitch": true,
14
+ "noUncheckedSideEffectImports": true
15
+ },
16
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
17
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "types": ["node"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "verbatimModuleSyntax": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "erasableSyntaxOnly": true,
22
+ "noFallthroughCasesInSwitch": true,
23
+ "noUncheckedSideEffectImports": true
24
+ },
25
+ "include": ["vite.config.ts"]
26
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { defineConfig } from "vite";
2
+ import vue from "@vitejs/plugin-vue";
3
+ import path from "path";
4
+
5
+ // https://vite.dev/config/
6
+ export default defineConfig({
7
+ plugins: [vue()],
8
+ resolve: {
9
+ alias: {
10
+ "@": path.resolve(__dirname, "src"),
11
+ },
12
+ },
13
+ build: {
14
+ lib: {
15
+ entry: path.resolve(__dirname, "src/index.ts"),
16
+ name: "MtCommon",
17
+ fileName: (format) => `mt-design.${format}.js`,
18
+ },
19
+ rollupOptions: {
20
+ // 确保外部化处理那些你不想打包进库的依赖
21
+ external: ["vue", "tdesign-vue-next"],
22
+ output: {
23
+ // 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
24
+ globals: {
25
+ vue: "Vue",
26
+ "tdesign-vue-next": "TDesign",
27
+ },
28
+ },
29
+ },
30
+ },
31
+ });