@ichaingo/ui 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/.babelrc +0 -12
- package/components.json +0 -21
- package/eslint.config.mjs +0 -12
- package/postcss.config.js +0 -6
- package/src/components/ui/accordion.tsx +0 -64
- package/src/components/ui/alert-dialog.tsx +0 -155
- package/src/components/ui/alert.tsx +0 -66
- package/src/components/ui/aspect-ratio.tsx +0 -9
- package/src/components/ui/avatar.tsx +0 -51
- package/src/components/ui/badge.tsx +0 -46
- package/src/components/ui/breadcrumb.tsx +0 -109
- package/src/components/ui/button.tsx +0 -59
- package/src/components/ui/calendar.tsx +0 -211
- package/src/components/ui/card.tsx +0 -92
- package/src/components/ui/carousel.tsx +0 -239
- package/src/components/ui/checkbox.tsx +0 -30
- package/src/components/ui/collapsible.tsx +0 -31
- package/src/components/ui/command.tsx +0 -182
- package/src/components/ui/context-menu.tsx +0 -250
- package/src/components/ui/dialog.tsx +0 -141
- package/src/components/ui/dropdown-menu.tsx +0 -255
- package/src/components/ui/form.tsx +0 -165
- package/src/components/ui/hover-card.tsx +0 -42
- package/src/components/ui/input.tsx +0 -21
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/menubar.tsx +0 -274
- package/src/components/ui/navigation-menu.tsx +0 -168
- package/src/components/ui/pagination.tsx +0 -125
- package/src/components/ui/popover.tsx +0 -46
- package/src/components/ui/progress.tsx +0 -29
- package/src/components/ui/radio-group.tsx +0 -43
- package/src/components/ui/resizable.tsx +0 -54
- package/src/components/ui/scroll-area.tsx +0 -56
- package/src/components/ui/select.tsx +0 -183
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/sheet.tsx +0 -137
- package/src/components/ui/skeleton.tsx +0 -13
- package/src/components/ui/slider.tsx +0 -61
- package/src/components/ui/sonner.tsx +0 -23
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/table.tsx +0 -114
- package/src/components/ui/tabs.tsx +0 -64
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/toggle-group.tsx +0 -71
- package/src/components/ui/toggle.tsx +0 -45
- package/src/components/ui/tooltip.tsx +0 -59
- package/src/index.ts +0 -46
- package/src/lib/utils.ts +0 -6
- package/src/style.css +0 -0
- package/tailwind.config.js +0 -52
- package/tsconfig.json +0 -19
- package/tsconfig.lib.json +0 -54
- package/tsconfig.spec.json +0 -32
- package/vite.config.ts +0 -136
package/vite.config.ts
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/// <reference types='vitest' />
|
|
2
|
-
import { defineConfig } from 'vite';
|
|
3
|
-
import react from '@vitejs/plugin-react';
|
|
4
|
-
import dts from 'vite-plugin-dts';
|
|
5
|
-
import * as path from 'path';
|
|
6
|
-
import tailwindcss from '@tailwindcss/vite';
|
|
7
|
-
import type { Plugin } from 'vite';
|
|
8
|
-
import preserveUseClientDirective from 'rollup-plugin-preserve-use-client';
|
|
9
|
-
|
|
10
|
-
export default defineConfig({
|
|
11
|
-
root: __dirname,
|
|
12
|
-
cacheDir: '../node_modules/.vite/ui',
|
|
13
|
-
plugins: [
|
|
14
|
-
react(),
|
|
15
|
-
tailwindcss() as unknown as Plugin,
|
|
16
|
-
preserveUseClientDirective(),
|
|
17
|
-
dts({
|
|
18
|
-
entryRoot: 'src',
|
|
19
|
-
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
|
|
20
|
-
// 为每个入口点生成对应的 .d.ts 文件
|
|
21
|
-
rollupTypes: true,
|
|
22
|
-
// 确保生成类型声明文件
|
|
23
|
-
insertTypesEntry: false,
|
|
24
|
-
// 为每个组件生成独立的类型文件
|
|
25
|
-
copyDtsFiles: false,
|
|
26
|
-
}),
|
|
27
|
-
],
|
|
28
|
-
resolve: {
|
|
29
|
-
alias: {
|
|
30
|
-
'@': path.resolve(__dirname, 'src'),
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
// Uncomment this if you are using workers.
|
|
34
|
-
// worker: {
|
|
35
|
-
// plugins: [ nxViteTsPaths() ],
|
|
36
|
-
// },
|
|
37
|
-
// Configuration for building your library.
|
|
38
|
-
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
39
|
-
build: {
|
|
40
|
-
outDir: './dist',
|
|
41
|
-
emptyOutDir: true,
|
|
42
|
-
minify: true,
|
|
43
|
-
reportCompressedSize: true,
|
|
44
|
-
commonjsOptions: {
|
|
45
|
-
transformMixedEsModules: true,
|
|
46
|
-
},
|
|
47
|
-
lib: {
|
|
48
|
-
// 多入口配置
|
|
49
|
-
entry: {
|
|
50
|
-
accordion: 'src/components/ui/accordion.tsx',
|
|
51
|
-
alert: 'src/components/ui/alert.tsx',
|
|
52
|
-
'alert-dialog': 'src/components/ui/alert-dialog.tsx',
|
|
53
|
-
'aspect-ratio': 'src/components/ui/aspect-ratio.tsx',
|
|
54
|
-
avatar: 'src/components/ui/avatar.tsx',
|
|
55
|
-
badge: 'src/components/ui/badge.tsx',
|
|
56
|
-
breadcrumb: 'src/components/ui/breadcrumb.tsx',
|
|
57
|
-
button: 'src/components/ui/button.tsx',
|
|
58
|
-
calendar: 'src/components/ui/calendar.tsx',
|
|
59
|
-
card: 'src/components/ui/card.tsx',
|
|
60
|
-
carousel: 'src/components/ui/carousel.tsx',
|
|
61
|
-
checkbox: 'src/components/ui/checkbox.tsx',
|
|
62
|
-
collapsible: 'src/components/ui/collapsible.tsx',
|
|
63
|
-
command: 'src/components/ui/command.tsx',
|
|
64
|
-
'context-menu': 'src/components/ui/context-menu.tsx',
|
|
65
|
-
dialog: 'src/components/ui/dialog.tsx',
|
|
66
|
-
'dropdown-menu': 'src/components/ui/dropdown-menu.tsx',
|
|
67
|
-
form: 'src/components/ui/form.tsx',
|
|
68
|
-
'hover-card': 'src/components/ui/hover-card.tsx',
|
|
69
|
-
input: 'src/components/ui/input.tsx',
|
|
70
|
-
label: 'src/components/ui/label.tsx',
|
|
71
|
-
menubar: 'src/components/ui/menubar.tsx',
|
|
72
|
-
'navigation-menu': 'src/components/ui/navigation-menu.tsx',
|
|
73
|
-
pagination: 'src/components/ui/pagination.tsx',
|
|
74
|
-
popover: 'src/components/ui/popover.tsx',
|
|
75
|
-
progress: 'src/components/ui/progress.tsx',
|
|
76
|
-
'radio-group': 'src/components/ui/radio-group.tsx',
|
|
77
|
-
resizable: 'src/components/ui/resizable.tsx',
|
|
78
|
-
'scroll-area': 'src/components/ui/scroll-area.tsx',
|
|
79
|
-
select: 'src/components/ui/select.tsx',
|
|
80
|
-
separator: 'src/components/ui/separator.tsx',
|
|
81
|
-
sheet: 'src/components/ui/sheet.tsx',
|
|
82
|
-
skeleton: 'src/components/ui/skeleton.tsx',
|
|
83
|
-
slider: 'src/components/ui/slider.tsx',
|
|
84
|
-
sonner: 'src/components/ui/sonner.tsx',
|
|
85
|
-
switch: 'src/components/ui/switch.tsx',
|
|
86
|
-
table: 'src/components/ui/table.tsx',
|
|
87
|
-
tabs: 'src/components/ui/tabs.tsx',
|
|
88
|
-
textarea: 'src/components/ui/textarea.tsx',
|
|
89
|
-
'toggle-group': 'src/components/ui/toggle-group.tsx',
|
|
90
|
-
toggle: 'src/components/ui/toggle.tsx',
|
|
91
|
-
tooltip: 'src/components/ui/tooltip.tsx',
|
|
92
|
-
},
|
|
93
|
-
name: '@ichaingo/ui',
|
|
94
|
-
fileName: (format, entryName) => `${entryName}.${format === 'es' ? 'mjs' : 'js'}`,
|
|
95
|
-
// Change this to the formats you want to support.
|
|
96
|
-
// Don't forget to update your package.json as well.
|
|
97
|
-
formats: ['es' as const]
|
|
98
|
-
},
|
|
99
|
-
rollupOptions: {
|
|
100
|
-
// External packages that should not be bundled into your library.
|
|
101
|
-
external: [
|
|
102
|
-
'react',
|
|
103
|
-
'react-dom',
|
|
104
|
-
'react/jsx-runtime',
|
|
105
|
-
'tailwindcss',
|
|
106
|
-
'tailwind-merge',
|
|
107
|
-
'class-variance-authority',
|
|
108
|
-
/^@radix-ui\/.+/,
|
|
109
|
-
'clsx',
|
|
110
|
-
'lucide-react',
|
|
111
|
-
'date-fns',
|
|
112
|
-
'embla-carousel-react',
|
|
113
|
-
'react-day-picker',
|
|
114
|
-
'react-hook-form',
|
|
115
|
-
'react-resizable-panels',
|
|
116
|
-
'sonner',
|
|
117
|
-
'tailwindcss-animate',
|
|
118
|
-
'zod',
|
|
119
|
-
'@hookform/resolvers',
|
|
120
|
-
'cmdk',
|
|
121
|
-
'next-themes'
|
|
122
|
-
],
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
test: {
|
|
126
|
-
watch: false,
|
|
127
|
-
globals: true,
|
|
128
|
-
environment: 'jsdom',
|
|
129
|
-
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
130
|
-
reporters: ['default'],
|
|
131
|
-
coverage: {
|
|
132
|
-
reportsDirectory: './test-output/vitest/coverage',
|
|
133
|
-
provider: 'v8' as const,
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
});
|