@ng-cn/core 1.0.4 → 1.0.6
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/auto/tailwind/resolve-margin-and-text.py +30 -0
- package/package.json +1 -1
- package/schematics/component/index.js +123 -32
- package/schematics/component/index.ts +123 -32
- package/schematics/ng-add/index.d.ts +3 -1
- package/schematics/ng-add/index.js +552 -87
- package/schematics/ng-add/index.ts +598 -88
- package/schematics/ng-add/schema.json +22 -41
- package/schematics/package.json +8 -0
- package/README.md +0 -200
- package/schematics/README.md +0 -165
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
def process_html_file(file_path):
|
|
5
|
+
with open(file_path, 'r', encoding='utf-8') as file:
|
|
6
|
+
content = file.read()
|
|
7
|
+
|
|
8
|
+
# Replace classes
|
|
9
|
+
new_content = re.sub(r'\bmr-', 'me-', content)
|
|
10
|
+
new_content = re.sub(r'\bml-', 'ms-', new_content)
|
|
11
|
+
new_content = re.sub(r'\btext-left\b', 'text-start', new_content)
|
|
12
|
+
new_content = re.sub(r'\btext-right\b', 'text-end', new_content)
|
|
13
|
+
|
|
14
|
+
if new_content != content:
|
|
15
|
+
with open(file_path, 'w', encoding='utf-8') as file:
|
|
16
|
+
file.write(new_content)
|
|
17
|
+
return True
|
|
18
|
+
return False
|
|
19
|
+
|
|
20
|
+
def traverse_and_process(directory):
|
|
21
|
+
for root, _, files in os.walk(directory):
|
|
22
|
+
for file in files:
|
|
23
|
+
if file.endswith('.html'):
|
|
24
|
+
file_path = os.path.join(root, file)
|
|
25
|
+
if process_html_file(file_path):
|
|
26
|
+
print(f"Changes made to: {file_path}")
|
|
27
|
+
|
|
28
|
+
if __name__ == "__main__":
|
|
29
|
+
src_directory = 'src'
|
|
30
|
+
traverse_and_process(src_directory)
|
package/package.json
CHANGED
|
@@ -6,39 +6,55 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
6
6
|
// Component registry - maps component names to their file structure
|
|
7
7
|
const COMPONENT_REGISTRY = {
|
|
8
8
|
accordion: {
|
|
9
|
-
files: ['accordion.component.ts', 'index.ts'],
|
|
9
|
+
files: ['accordion.component.ts', 'accordion-content.component.ts', 'accordion-context.ts', 'accordion-item.component.ts', 'accordion-trigger.component.ts', 'index.ts'],
|
|
10
10
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
11
11
|
},
|
|
12
12
|
alert: {
|
|
13
|
-
files: ['alert.component.ts', 'alert-title.component.ts', 'alert-description.component.ts', 'index.ts'],
|
|
13
|
+
files: ['alert.component.ts', 'alert-title.component.ts', 'alert-description.component.ts', 'alert-variants.ts', 'index.ts'],
|
|
14
14
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
15
15
|
},
|
|
16
16
|
'alert-dialog': {
|
|
17
|
-
files: ['alert-dialog.component.ts', 'index.ts'],
|
|
17
|
+
files: ['alert-dialog.component.ts', 'alert-dialog-action.component.ts', 'alert-dialog-cancel.component.ts', 'alert-dialog-content.component.ts', 'alert-dialog-context.ts', 'alert-dialog-description.component.ts', 'alert-dialog-footer.component.ts', 'alert-dialog-header.component.ts', 'alert-dialog-title.component.ts', 'alert-dialog-trigger.component.ts', 'index.ts'],
|
|
18
18
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
19
19
|
},
|
|
20
|
+
'aspect-ratio': {
|
|
21
|
+
files: ['aspect-ratio.component.ts', 'index.ts'],
|
|
22
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
23
|
+
},
|
|
20
24
|
avatar: {
|
|
21
|
-
files: ['avatar.component.ts', 'index.ts'],
|
|
25
|
+
files: ['avatar.component.ts', 'avatar-fallback.component.ts', 'avatar-image.component.ts', 'ui-avatar.component.ts', 'index.ts'],
|
|
22
26
|
dependencies: ['clsx', 'tailwind-merge']
|
|
23
27
|
},
|
|
24
28
|
badge: {
|
|
25
|
-
files: ['badge.component.ts', 'index.ts'],
|
|
29
|
+
files: ['badge.component.ts', 'badge-variants.ts', 'index.ts'],
|
|
26
30
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
27
31
|
},
|
|
28
32
|
breadcrumb: {
|
|
29
|
-
files: ['breadcrumb.component.ts', 'index.ts'],
|
|
33
|
+
files: ['breadcrumb.component.ts', 'breadcrumb-ellipsis.component.ts', 'breadcrumb-item.component.ts', 'breadcrumb-link.component.ts', 'breadcrumb-list.component.ts', 'breadcrumb-page.component.ts', 'breadcrumb-separator.component.ts', 'index.ts'],
|
|
30
34
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
31
35
|
},
|
|
32
36
|
button: {
|
|
33
|
-
files: ['button.component.ts', 'index.ts'],
|
|
37
|
+
files: ['button.component.ts', 'button-variants.ts', 'index.ts'],
|
|
34
38
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge', '@angular/cdk']
|
|
35
39
|
},
|
|
40
|
+
'button-group': {
|
|
41
|
+
files: ['button-group.component.ts', 'button-group-variants.ts', 'index.ts'],
|
|
42
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
43
|
+
},
|
|
36
44
|
calendar: {
|
|
37
45
|
files: ['calendar.component.ts', 'index.ts'],
|
|
38
46
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
39
47
|
},
|
|
40
48
|
card: {
|
|
41
|
-
files: ['card.component.ts', 'card-
|
|
49
|
+
files: ['card.component.ts', 'card-action.component.ts', 'card-content.component.ts', 'card-description.component.ts', 'card-footer.component.ts', 'card-header.component.ts', 'card-title.component.ts', 'index.ts'],
|
|
50
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
51
|
+
},
|
|
52
|
+
carousel: {
|
|
53
|
+
files: ['carousel.component.ts', 'carousel-content.component.ts', 'carousel-context.ts', 'carousel-item.component.ts', 'carousel-next.component.ts', 'carousel-previous.component.ts', 'index.ts'],
|
|
54
|
+
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
55
|
+
},
|
|
56
|
+
chart: {
|
|
57
|
+
files: ['chart.component.ts', 'chart-container.component.ts', 'chart-context.ts', 'chart-legend.component.ts', 'chart-legend-content.component.ts', 'chart-tooltip.component.ts', 'chart-tooltip-content.component.ts', 'index.ts'],
|
|
42
58
|
dependencies: ['clsx', 'tailwind-merge']
|
|
43
59
|
},
|
|
44
60
|
checkbox: {
|
|
@@ -46,44 +62,91 @@ const COMPONENT_REGISTRY = {
|
|
|
46
62
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
47
63
|
},
|
|
48
64
|
collapsible: {
|
|
49
|
-
files: ['collapsible.component.ts', 'index.ts'],
|
|
65
|
+
files: ['collapsible.component.ts', 'collapsible-content.component.ts', 'collapsible-context.ts', 'collapsible-trigger.component.ts', 'index.ts'],
|
|
50
66
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
51
67
|
},
|
|
68
|
+
combobox: {
|
|
69
|
+
files: ['combobox.component.ts', 'combobox-content.component.ts', 'combobox-context.ts', 'combobox-empty.component.ts', 'combobox-group.component.ts', 'combobox-input.component.ts', 'combobox-item.component.ts', 'combobox-list.component.ts', 'combobox-trigger.component.ts', 'combobox-value.component.ts', 'index.ts'],
|
|
70
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
71
|
+
},
|
|
72
|
+
command: {
|
|
73
|
+
files: ['command.component.ts', 'command-context.ts', 'command-dialog.component.ts', 'command-empty.component.ts', 'command-group.component.ts', 'command-input.component.ts', 'command-item.component.ts', 'command-list.component.ts', 'command-separator.component.ts', 'command-shortcut.component.ts', 'index.ts'],
|
|
74
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
75
|
+
},
|
|
76
|
+
'context-menu': {
|
|
77
|
+
files: ['context-menu.component.ts', 'context-menu-checkbox-item.component.ts', 'context-menu-content.component.ts', 'context-menu-context.ts', 'context-menu-item.component.ts', 'context-menu-label.component.ts', 'context-menu-radio-group.component.ts', 'context-menu-radio-item.component.ts', 'context-menu-separator.component.ts', 'context-menu-shortcut.component.ts', 'context-menu-sub.component.ts', 'context-menu-sub-content.component.ts', 'context-menu-sub-trigger.component.ts', 'context-menu-trigger.component.ts', 'index.ts'],
|
|
78
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
79
|
+
},
|
|
52
80
|
'data-table': {
|
|
53
|
-
files: [
|
|
54
|
-
'data-table.component.ts',
|
|
55
|
-
'data-table-content.component.ts',
|
|
56
|
-
'data-table-context.ts',
|
|
57
|
-
'data-table-pagination.component.ts',
|
|
58
|
-
'data-table-search.component.ts',
|
|
59
|
-
'data-table-toolbar.component.ts',
|
|
60
|
-
'data-table-view-options.component.ts',
|
|
61
|
-
'index.ts'
|
|
62
|
-
],
|
|
81
|
+
files: ['data-table.component.ts', 'data-table-content.component.ts', 'data-table-context.ts', 'data-table-pagination.component.ts', 'data-table-search.component.ts', 'data-table-toolbar.component.ts', 'data-table-view-options.component.ts', 'index.ts'],
|
|
63
82
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
64
83
|
},
|
|
84
|
+
'date-picker': {
|
|
85
|
+
files: ['date-picker.component.ts', 'index.ts'],
|
|
86
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
87
|
+
},
|
|
65
88
|
dialog: {
|
|
66
|
-
files: ['dialog.component.ts', 'dialog-content.component.ts', 'dialog-
|
|
89
|
+
files: ['dialog.component.ts', 'dialog-close.component.ts', 'dialog-content.component.ts', 'dialog-context.ts', 'dialog-description.component.ts', 'dialog-footer.component.ts', 'dialog-header.component.ts', 'dialog-title.component.ts', 'dialog-trigger.component.ts', 'index.ts'],
|
|
67
90
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
68
91
|
},
|
|
69
92
|
drawer: {
|
|
70
|
-
files: ['drawer.component.ts', 'index.ts'],
|
|
93
|
+
files: ['drawer.component.ts', 'drawer-close.component.ts', 'drawer-content.component.ts', 'drawer-context.ts', 'drawer-description.component.ts', 'drawer-footer.component.ts', 'drawer-header.component.ts', 'drawer-title.component.ts', 'drawer-trigger.component.ts', 'index.ts'],
|
|
71
94
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
72
95
|
},
|
|
73
96
|
'dropdown-menu': {
|
|
74
|
-
files: ['dropdown-menu.component.ts', 'index.ts'],
|
|
97
|
+
files: ['dropdown-menu.component.ts', 'dropdown-menu-checkbox-item.component.ts', 'dropdown-menu-content.component.ts', 'dropdown-menu-context.ts', 'dropdown-menu-group.component.ts', 'dropdown-menu-item.component.ts', 'dropdown-menu-label.component.ts', 'dropdown-menu-radio-group.component.ts', 'dropdown-menu-radio-item.component.ts', 'dropdown-menu-separator.component.ts', 'dropdown-menu-shortcut.component.ts', 'dropdown-menu-sub.component.ts', 'dropdown-menu-sub-content.component.ts', 'dropdown-menu-sub-trigger.component.ts', 'dropdown-menu-trigger.component.ts', 'index.ts'],
|
|
98
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
99
|
+
},
|
|
100
|
+
empty: {
|
|
101
|
+
files: ['empty.component.ts', 'empty-action.component.ts', 'empty-description.component.ts', 'empty-icon.component.ts', 'empty-title.component.ts', 'index.ts'],
|
|
102
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
103
|
+
},
|
|
104
|
+
form: {
|
|
105
|
+
files: ['form.component.ts', 'form-context.ts', 'form-control.component.ts', 'form-description.component.ts', 'form-field.component.ts', 'form-item.component.ts', 'form-label.component.ts', 'form-message.component.ts', 'index.ts'],
|
|
106
|
+
dependencies: ['@angular/forms', 'clsx', 'tailwind-merge']
|
|
107
|
+
},
|
|
108
|
+
'hover-card': {
|
|
109
|
+
files: ['hover-card.component.ts', 'hover-card-content.component.ts', 'hover-card-context.ts', 'hover-card-trigger.component.ts', 'index.ts'],
|
|
75
110
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
76
111
|
},
|
|
77
112
|
input: {
|
|
78
113
|
files: ['input.component.ts', 'index.ts'],
|
|
79
114
|
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
80
115
|
},
|
|
116
|
+
'input-group': {
|
|
117
|
+
files: ['input-group.component.ts', 'input-group-addon.component.ts', 'input-group-input.component.ts', 'index.ts'],
|
|
118
|
+
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
119
|
+
},
|
|
120
|
+
'input-otp': {
|
|
121
|
+
files: ['input-otp.component.ts', 'input-otp-context.ts', 'input-otp-group.component.ts', 'input-otp-separator.component.ts', 'input-otp-slot.component.ts', 'index.ts'],
|
|
122
|
+
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
123
|
+
},
|
|
124
|
+
kbd: {
|
|
125
|
+
files: ['kbd.component.ts', 'kbd-variants.ts', 'index.ts'],
|
|
126
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
127
|
+
},
|
|
81
128
|
label: {
|
|
82
129
|
files: ['label.component.ts', 'index.ts'],
|
|
83
130
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
84
131
|
},
|
|
132
|
+
menubar: {
|
|
133
|
+
files: ['menubar.component.ts', 'menubar-checkbox-item.component.ts', 'menubar-content.component.ts', 'menubar-context.ts', 'menubar-item.component.ts', 'menubar-label.component.ts', 'menubar-menu.component.ts', 'menubar-radio-group.component.ts', 'menubar-radio-item.component.ts', 'menubar-separator.component.ts', 'menubar-shortcut.component.ts', 'menubar-sub.component.ts', 'menubar-sub-content.component.ts', 'menubar-sub-trigger.component.ts', 'menubar-trigger.component.ts', 'index.ts'],
|
|
134
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
135
|
+
},
|
|
136
|
+
'native-select': {
|
|
137
|
+
files: ['native-select.component.ts', 'native-select-variants.ts', 'index.ts'],
|
|
138
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
139
|
+
},
|
|
140
|
+
'navigation-menu': {
|
|
141
|
+
files: ['navigation-menu.component.ts', 'navigation-menu-content.component.ts', 'navigation-menu-context.ts', 'navigation-menu-indicator.component.ts', 'navigation-menu-item.component.ts', 'navigation-menu-link.component.ts', 'navigation-menu-list.component.ts', 'navigation-menu-trigger.component.ts', 'navigation-menu-trigger-style.ts', 'navigation-menu-viewport.component.ts', 'index.ts'],
|
|
142
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
143
|
+
},
|
|
144
|
+
pagination: {
|
|
145
|
+
files: ['pagination.component.ts', 'pagination-content.component.ts', 'pagination-ellipsis.component.ts', 'pagination-item.component.ts', 'pagination-link.component.ts', 'pagination-next.component.ts', 'pagination-previous.component.ts', 'index.ts'],
|
|
146
|
+
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
147
|
+
},
|
|
85
148
|
popover: {
|
|
86
|
-
files: ['popover.component.ts', 'index.ts'],
|
|
149
|
+
files: ['popover.component.ts', 'popover-anchor.component.ts', 'popover-content.component.ts', 'popover-context.ts', 'popover-trigger.component.ts', 'index.ts'],
|
|
87
150
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
88
151
|
},
|
|
89
152
|
progress: {
|
|
@@ -91,11 +154,23 @@ const COMPONENT_REGISTRY = {
|
|
|
91
154
|
dependencies: ['clsx', 'tailwind-merge']
|
|
92
155
|
},
|
|
93
156
|
'radio-group': {
|
|
94
|
-
files: ['radio-group.component.ts', 'index.ts'],
|
|
157
|
+
files: ['radio-group.component.ts', 'radio-group-context.ts', 'radio-group-item.component.ts', 'index.ts'],
|
|
158
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
159
|
+
},
|
|
160
|
+
resizable: {
|
|
161
|
+
files: ['resizable-panel-group.component.ts', 'resizable-context.ts', 'resizable-handle.component.ts', 'resizable-panel.component.ts', 'index.ts'],
|
|
162
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
163
|
+
},
|
|
164
|
+
'scroll-area': {
|
|
165
|
+
files: ['scroll-area.component.ts', 'scroll-bar.component.ts', 'index.ts'],
|
|
95
166
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
96
167
|
},
|
|
168
|
+
segmented: {
|
|
169
|
+
files: ['segmented.component.ts', 'segmented-context.ts', 'segmented-item.component.ts', 'segmented-variants.ts', 'index.ts'],
|
|
170
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
171
|
+
},
|
|
97
172
|
select: {
|
|
98
|
-
files: ['select.component.ts', 'index.ts'],
|
|
173
|
+
files: ['select.component.ts', 'select-content.component.ts', 'select-context.ts', 'select-group.component.ts', 'select-item.component.ts', 'select-label.component.ts', 'select-separator.component.ts', 'select-trigger.component.ts', 'select-value.component.ts', 'index.ts'],
|
|
99
174
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
100
175
|
},
|
|
101
176
|
separator: {
|
|
@@ -103,7 +178,11 @@ const COMPONENT_REGISTRY = {
|
|
|
103
178
|
dependencies: ['clsx', 'tailwind-merge']
|
|
104
179
|
},
|
|
105
180
|
sheet: {
|
|
106
|
-
files: ['sheet.component.ts', 'index.ts'],
|
|
181
|
+
files: ['sheet.component.ts', 'sheet-close.component.ts', 'sheet-content.component.ts', 'sheet-context.ts', 'sheet-description.component.ts', 'sheet-footer.component.ts', 'sheet-header.component.ts', 'sheet-title.component.ts', 'sheet-trigger.component.ts', 'sheet-variants.ts', 'index.ts'],
|
|
182
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
183
|
+
},
|
|
184
|
+
sidebar: {
|
|
185
|
+
files: ['sidebar.component.ts', 'sidebar-content.component.ts', 'sidebar-context.ts', 'sidebar-footer.component.ts', 'sidebar-group.component.ts', 'sidebar-group-action.component.ts', 'sidebar-group-content.component.ts', 'sidebar-group-label.component.ts', 'sidebar-header.component.ts', 'sidebar-input.component.ts', 'sidebar-inset.component.ts', 'sidebar-menu.component.ts', 'sidebar-menu-action.component.ts', 'sidebar-menu-badge.component.ts', 'sidebar-menu-button.component.ts', 'sidebar-menu-item.component.ts', 'sidebar-menu-skeleton.component.ts', 'sidebar-menu-sub.component.ts', 'sidebar-menu-sub-button.component.ts', 'sidebar-menu-sub-item.component.ts', 'sidebar-provider.component.ts', 'sidebar-rail.component.ts', 'sidebar-route-active.service.ts', 'sidebar-separator.component.ts', 'sidebar-trigger.component.ts', 'index.ts'],
|
|
107
186
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
108
187
|
},
|
|
109
188
|
skeleton: {
|
|
@@ -114,16 +193,20 @@ const COMPONENT_REGISTRY = {
|
|
|
114
193
|
files: ['slider.component.ts', 'index.ts'],
|
|
115
194
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
116
195
|
},
|
|
196
|
+
spinner: {
|
|
197
|
+
files: ['spinner.component.ts', 'spinner-variants.ts', 'index.ts'],
|
|
198
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
199
|
+
},
|
|
117
200
|
switch: {
|
|
118
201
|
files: ['switch.component.ts', 'index.ts'],
|
|
119
202
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
120
203
|
},
|
|
121
204
|
table: {
|
|
122
|
-
files: ['table.component.ts', 'index.ts'],
|
|
205
|
+
files: ['table.component.ts', 'table-body.component.ts', 'table-caption.component.ts', 'table-cell.component.ts', 'table-footer.component.ts', 'table-head.component.ts', 'table-header.component.ts', 'table-row.component.ts', 'index.ts'],
|
|
123
206
|
dependencies: ['clsx', 'tailwind-merge']
|
|
124
207
|
},
|
|
125
208
|
tabs: {
|
|
126
|
-
files: ['tabs.component.ts', 'index.ts'],
|
|
209
|
+
files: ['tabs.component.ts', 'tabs-content.component.ts', 'tabs-context.ts', 'tabs-list.component.ts', 'tabs-trigger.component.ts', 'index.ts'],
|
|
127
210
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
128
211
|
},
|
|
129
212
|
textarea: {
|
|
@@ -131,17 +214,25 @@ const COMPONENT_REGISTRY = {
|
|
|
131
214
|
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
132
215
|
},
|
|
133
216
|
toast: {
|
|
134
|
-
files: ['toast.component.ts', '
|
|
217
|
+
files: ['toast.component.ts', 'toast-action.component.ts', 'toast-description.component.ts', 'toast-title.component.ts', 'toast-variants.ts', 'toast.service.ts', 'toaster.component.ts', 'index.ts'],
|
|
135
218
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
136
219
|
},
|
|
137
220
|
toggle: {
|
|
138
|
-
files: ['toggle.component.ts', 'index.ts'],
|
|
221
|
+
files: ['toggle.component.ts', 'toggle-variants.ts', 'index.ts'],
|
|
222
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
223
|
+
},
|
|
224
|
+
'toggle-group': {
|
|
225
|
+
files: ['toggle-group.component.ts', 'toggle-group-context.ts', 'toggle-group-item.component.ts', 'index.ts'],
|
|
139
226
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
140
227
|
},
|
|
141
228
|
tooltip: {
|
|
142
|
-
files: ['tooltip.component.ts', 'index.ts'],
|
|
229
|
+
files: ['tooltip.component.ts', 'tooltip-content.component.ts', 'tooltip-context.ts', 'tooltip-provider.component.ts', 'tooltip-trigger.component.ts', 'index.ts'],
|
|
143
230
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
144
231
|
},
|
|
232
|
+
typography: {
|
|
233
|
+
files: ['typography-blockquote.component.ts', 'typography-h1.component.ts', 'typography-h2.component.ts', 'typography-h3.component.ts', 'typography-h4.component.ts', 'typography-inline-code.component.ts', 'typography-large.component.ts', 'typography-lead.component.ts', 'typography-list.component.ts', 'typography-muted.component.ts', 'typography-p.component.ts', 'typography-small.component.ts', 'index.ts'],
|
|
234
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
235
|
+
},
|
|
145
236
|
};
|
|
146
237
|
function component(options) {
|
|
147
238
|
return (tree, context) => {
|
|
@@ -167,7 +258,7 @@ function component(options) {
|
|
|
167
258
|
return tree;
|
|
168
259
|
}
|
|
169
260
|
// Copy component files from the package source
|
|
170
|
-
const sourceBasePath = `node_modules/@ng-cn/core/lib/components/ui/${componentName}`;
|
|
261
|
+
const sourceBasePath = `node_modules/@ng-cn/core/src/app/lib/components/ui/${componentName}`;
|
|
171
262
|
const fallbackSourcePath = `src/app/lib/components/ui/${componentName}`;
|
|
172
263
|
let filesCreated = 0;
|
|
173
264
|
for (const file of componentInfo.files) {
|
|
@@ -11,39 +11,55 @@ interface ComponentOptions {
|
|
|
11
11
|
// Component registry - maps component names to their file structure
|
|
12
12
|
const COMPONENT_REGISTRY: Record<string, ComponentInfo> = {
|
|
13
13
|
accordion: {
|
|
14
|
-
files: ['accordion.component.ts', 'index.ts'],
|
|
14
|
+
files: ['accordion.component.ts', 'accordion-content.component.ts', 'accordion-context.ts', 'accordion-item.component.ts', 'accordion-trigger.component.ts', 'index.ts'],
|
|
15
15
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
16
16
|
},
|
|
17
17
|
alert: {
|
|
18
|
-
files: ['alert.component.ts', 'alert-title.component.ts', 'alert-description.component.ts', 'index.ts'],
|
|
18
|
+
files: ['alert.component.ts', 'alert-title.component.ts', 'alert-description.component.ts', 'alert-variants.ts', 'index.ts'],
|
|
19
19
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
20
20
|
},
|
|
21
21
|
'alert-dialog': {
|
|
22
|
-
files: ['alert-dialog.component.ts', 'index.ts'],
|
|
22
|
+
files: ['alert-dialog.component.ts', 'alert-dialog-action.component.ts', 'alert-dialog-cancel.component.ts', 'alert-dialog-content.component.ts', 'alert-dialog-context.ts', 'alert-dialog-description.component.ts', 'alert-dialog-footer.component.ts', 'alert-dialog-header.component.ts', 'alert-dialog-title.component.ts', 'alert-dialog-trigger.component.ts', 'index.ts'],
|
|
23
23
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
24
24
|
},
|
|
25
|
+
'aspect-ratio': {
|
|
26
|
+
files: ['aspect-ratio.component.ts', 'index.ts'],
|
|
27
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
28
|
+
},
|
|
25
29
|
avatar: {
|
|
26
|
-
files: ['avatar.component.ts', 'index.ts'],
|
|
30
|
+
files: ['avatar.component.ts', 'avatar-fallback.component.ts', 'avatar-image.component.ts', 'ui-avatar.component.ts', 'index.ts'],
|
|
27
31
|
dependencies: ['clsx', 'tailwind-merge']
|
|
28
32
|
},
|
|
29
33
|
badge: {
|
|
30
|
-
files: ['badge.component.ts', 'index.ts'],
|
|
34
|
+
files: ['badge.component.ts', 'badge-variants.ts', 'index.ts'],
|
|
31
35
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
32
36
|
},
|
|
33
37
|
breadcrumb: {
|
|
34
|
-
files: ['breadcrumb.component.ts', 'index.ts'],
|
|
38
|
+
files: ['breadcrumb.component.ts', 'breadcrumb-ellipsis.component.ts', 'breadcrumb-item.component.ts', 'breadcrumb-link.component.ts', 'breadcrumb-list.component.ts', 'breadcrumb-page.component.ts', 'breadcrumb-separator.component.ts', 'index.ts'],
|
|
35
39
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
36
40
|
},
|
|
37
41
|
button: {
|
|
38
|
-
files: ['button.component.ts', 'index.ts'],
|
|
42
|
+
files: ['button.component.ts', 'button-variants.ts', 'index.ts'],
|
|
39
43
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge', '@angular/cdk']
|
|
40
44
|
},
|
|
45
|
+
'button-group': {
|
|
46
|
+
files: ['button-group.component.ts', 'button-group-variants.ts', 'index.ts'],
|
|
47
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
48
|
+
},
|
|
41
49
|
calendar: {
|
|
42
50
|
files: ['calendar.component.ts', 'index.ts'],
|
|
43
51
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
44
52
|
},
|
|
45
53
|
card: {
|
|
46
|
-
files: ['card.component.ts', 'card-
|
|
54
|
+
files: ['card.component.ts', 'card-action.component.ts', 'card-content.component.ts', 'card-description.component.ts', 'card-footer.component.ts', 'card-header.component.ts', 'card-title.component.ts', 'index.ts'],
|
|
55
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
56
|
+
},
|
|
57
|
+
carousel: {
|
|
58
|
+
files: ['carousel.component.ts', 'carousel-content.component.ts', 'carousel-context.ts', 'carousel-item.component.ts', 'carousel-next.component.ts', 'carousel-previous.component.ts', 'index.ts'],
|
|
59
|
+
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
60
|
+
},
|
|
61
|
+
chart: {
|
|
62
|
+
files: ['chart.component.ts', 'chart-container.component.ts', 'chart-context.ts', 'chart-legend.component.ts', 'chart-legend-content.component.ts', 'chart-tooltip.component.ts', 'chart-tooltip-content.component.ts', 'index.ts'],
|
|
47
63
|
dependencies: ['clsx', 'tailwind-merge']
|
|
48
64
|
},
|
|
49
65
|
checkbox: {
|
|
@@ -51,44 +67,91 @@ const COMPONENT_REGISTRY: Record<string, ComponentInfo> = {
|
|
|
51
67
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
52
68
|
},
|
|
53
69
|
collapsible: {
|
|
54
|
-
files: ['collapsible.component.ts', 'index.ts'],
|
|
70
|
+
files: ['collapsible.component.ts', 'collapsible-content.component.ts', 'collapsible-context.ts', 'collapsible-trigger.component.ts', 'index.ts'],
|
|
55
71
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
56
72
|
},
|
|
73
|
+
combobox: {
|
|
74
|
+
files: ['combobox.component.ts', 'combobox-content.component.ts', 'combobox-context.ts', 'combobox-empty.component.ts', 'combobox-group.component.ts', 'combobox-input.component.ts', 'combobox-item.component.ts', 'combobox-list.component.ts', 'combobox-trigger.component.ts', 'combobox-value.component.ts', 'index.ts'],
|
|
75
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
76
|
+
},
|
|
77
|
+
command: {
|
|
78
|
+
files: ['command.component.ts', 'command-context.ts', 'command-dialog.component.ts', 'command-empty.component.ts', 'command-group.component.ts', 'command-input.component.ts', 'command-item.component.ts', 'command-list.component.ts', 'command-separator.component.ts', 'command-shortcut.component.ts', 'index.ts'],
|
|
79
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
80
|
+
},
|
|
81
|
+
'context-menu': {
|
|
82
|
+
files: ['context-menu.component.ts', 'context-menu-checkbox-item.component.ts', 'context-menu-content.component.ts', 'context-menu-context.ts', 'context-menu-item.component.ts', 'context-menu-label.component.ts', 'context-menu-radio-group.component.ts', 'context-menu-radio-item.component.ts', 'context-menu-separator.component.ts', 'context-menu-shortcut.component.ts', 'context-menu-sub.component.ts', 'context-menu-sub-content.component.ts', 'context-menu-sub-trigger.component.ts', 'context-menu-trigger.component.ts', 'index.ts'],
|
|
83
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
84
|
+
},
|
|
57
85
|
'data-table': {
|
|
58
|
-
files: [
|
|
59
|
-
'data-table.component.ts',
|
|
60
|
-
'data-table-content.component.ts',
|
|
61
|
-
'data-table-context.ts',
|
|
62
|
-
'data-table-pagination.component.ts',
|
|
63
|
-
'data-table-search.component.ts',
|
|
64
|
-
'data-table-toolbar.component.ts',
|
|
65
|
-
'data-table-view-options.component.ts',
|
|
66
|
-
'index.ts'
|
|
67
|
-
],
|
|
86
|
+
files: ['data-table.component.ts', 'data-table-content.component.ts', 'data-table-context.ts', 'data-table-pagination.component.ts', 'data-table-search.component.ts', 'data-table-toolbar.component.ts', 'data-table-view-options.component.ts', 'index.ts'],
|
|
68
87
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
69
88
|
},
|
|
89
|
+
'date-picker': {
|
|
90
|
+
files: ['date-picker.component.ts', 'index.ts'],
|
|
91
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
92
|
+
},
|
|
70
93
|
dialog: {
|
|
71
|
-
files: ['dialog.component.ts', 'dialog-content.component.ts', 'dialog-
|
|
94
|
+
files: ['dialog.component.ts', 'dialog-close.component.ts', 'dialog-content.component.ts', 'dialog-context.ts', 'dialog-description.component.ts', 'dialog-footer.component.ts', 'dialog-header.component.ts', 'dialog-title.component.ts', 'dialog-trigger.component.ts', 'index.ts'],
|
|
72
95
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
73
96
|
},
|
|
74
97
|
drawer: {
|
|
75
|
-
files: ['drawer.component.ts', 'index.ts'],
|
|
98
|
+
files: ['drawer.component.ts', 'drawer-close.component.ts', 'drawer-content.component.ts', 'drawer-context.ts', 'drawer-description.component.ts', 'drawer-footer.component.ts', 'drawer-header.component.ts', 'drawer-title.component.ts', 'drawer-trigger.component.ts', 'index.ts'],
|
|
76
99
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
77
100
|
},
|
|
78
101
|
'dropdown-menu': {
|
|
79
|
-
files: ['dropdown-menu.component.ts', 'index.ts'],
|
|
102
|
+
files: ['dropdown-menu.component.ts', 'dropdown-menu-checkbox-item.component.ts', 'dropdown-menu-content.component.ts', 'dropdown-menu-context.ts', 'dropdown-menu-group.component.ts', 'dropdown-menu-item.component.ts', 'dropdown-menu-label.component.ts', 'dropdown-menu-radio-group.component.ts', 'dropdown-menu-radio-item.component.ts', 'dropdown-menu-separator.component.ts', 'dropdown-menu-shortcut.component.ts', 'dropdown-menu-sub.component.ts', 'dropdown-menu-sub-content.component.ts', 'dropdown-menu-sub-trigger.component.ts', 'dropdown-menu-trigger.component.ts', 'index.ts'],
|
|
103
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
104
|
+
},
|
|
105
|
+
empty: {
|
|
106
|
+
files: ['empty.component.ts', 'empty-action.component.ts', 'empty-description.component.ts', 'empty-icon.component.ts', 'empty-title.component.ts', 'index.ts'],
|
|
107
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
108
|
+
},
|
|
109
|
+
form: {
|
|
110
|
+
files: ['form.component.ts', 'form-context.ts', 'form-control.component.ts', 'form-description.component.ts', 'form-field.component.ts', 'form-item.component.ts', 'form-label.component.ts', 'form-message.component.ts', 'index.ts'],
|
|
111
|
+
dependencies: ['@angular/forms', 'clsx', 'tailwind-merge']
|
|
112
|
+
},
|
|
113
|
+
'hover-card': {
|
|
114
|
+
files: ['hover-card.component.ts', 'hover-card-content.component.ts', 'hover-card-context.ts', 'hover-card-trigger.component.ts', 'index.ts'],
|
|
80
115
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
81
116
|
},
|
|
82
117
|
input: {
|
|
83
118
|
files: ['input.component.ts', 'index.ts'],
|
|
84
119
|
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
85
120
|
},
|
|
121
|
+
'input-group': {
|
|
122
|
+
files: ['input-group.component.ts', 'input-group-addon.component.ts', 'input-group-input.component.ts', 'index.ts'],
|
|
123
|
+
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
124
|
+
},
|
|
125
|
+
'input-otp': {
|
|
126
|
+
files: ['input-otp.component.ts', 'input-otp-context.ts', 'input-otp-group.component.ts', 'input-otp-separator.component.ts', 'input-otp-slot.component.ts', 'index.ts'],
|
|
127
|
+
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
128
|
+
},
|
|
129
|
+
kbd: {
|
|
130
|
+
files: ['kbd.component.ts', 'kbd-variants.ts', 'index.ts'],
|
|
131
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
132
|
+
},
|
|
86
133
|
label: {
|
|
87
134
|
files: ['label.component.ts', 'index.ts'],
|
|
88
135
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
89
136
|
},
|
|
137
|
+
menubar: {
|
|
138
|
+
files: ['menubar.component.ts', 'menubar-checkbox-item.component.ts', 'menubar-content.component.ts', 'menubar-context.ts', 'menubar-item.component.ts', 'menubar-label.component.ts', 'menubar-menu.component.ts', 'menubar-radio-group.component.ts', 'menubar-radio-item.component.ts', 'menubar-separator.component.ts', 'menubar-shortcut.component.ts', 'menubar-sub.component.ts', 'menubar-sub-content.component.ts', 'menubar-sub-trigger.component.ts', 'menubar-trigger.component.ts', 'index.ts'],
|
|
139
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
140
|
+
},
|
|
141
|
+
'native-select': {
|
|
142
|
+
files: ['native-select.component.ts', 'native-select-variants.ts', 'index.ts'],
|
|
143
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
144
|
+
},
|
|
145
|
+
'navigation-menu': {
|
|
146
|
+
files: ['navigation-menu.component.ts', 'navigation-menu-content.component.ts', 'navigation-menu-context.ts', 'navigation-menu-indicator.component.ts', 'navigation-menu-item.component.ts', 'navigation-menu-link.component.ts', 'navigation-menu-list.component.ts', 'navigation-menu-trigger.component.ts', 'navigation-menu-trigger-style.ts', 'navigation-menu-viewport.component.ts', 'index.ts'],
|
|
147
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
148
|
+
},
|
|
149
|
+
pagination: {
|
|
150
|
+
files: ['pagination.component.ts', 'pagination-content.component.ts', 'pagination-ellipsis.component.ts', 'pagination-item.component.ts', 'pagination-link.component.ts', 'pagination-next.component.ts', 'pagination-previous.component.ts', 'index.ts'],
|
|
151
|
+
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
152
|
+
},
|
|
90
153
|
popover: {
|
|
91
|
-
files: ['popover.component.ts', 'index.ts'],
|
|
154
|
+
files: ['popover.component.ts', 'popover-anchor.component.ts', 'popover-content.component.ts', 'popover-context.ts', 'popover-trigger.component.ts', 'index.ts'],
|
|
92
155
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
93
156
|
},
|
|
94
157
|
progress: {
|
|
@@ -96,11 +159,23 @@ const COMPONENT_REGISTRY: Record<string, ComponentInfo> = {
|
|
|
96
159
|
dependencies: ['clsx', 'tailwind-merge']
|
|
97
160
|
},
|
|
98
161
|
'radio-group': {
|
|
99
|
-
files: ['radio-group.component.ts', 'index.ts'],
|
|
162
|
+
files: ['radio-group.component.ts', 'radio-group-context.ts', 'radio-group-item.component.ts', 'index.ts'],
|
|
163
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
164
|
+
},
|
|
165
|
+
resizable: {
|
|
166
|
+
files: ['resizable-panel-group.component.ts', 'resizable-context.ts', 'resizable-handle.component.ts', 'resizable-panel.component.ts', 'index.ts'],
|
|
167
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
168
|
+
},
|
|
169
|
+
'scroll-area': {
|
|
170
|
+
files: ['scroll-area.component.ts', 'scroll-bar.component.ts', 'index.ts'],
|
|
100
171
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
101
172
|
},
|
|
173
|
+
segmented: {
|
|
174
|
+
files: ['segmented.component.ts', 'segmented-context.ts', 'segmented-item.component.ts', 'segmented-variants.ts', 'index.ts'],
|
|
175
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
176
|
+
},
|
|
102
177
|
select: {
|
|
103
|
-
files: ['select.component.ts', 'index.ts'],
|
|
178
|
+
files: ['select.component.ts', 'select-content.component.ts', 'select-context.ts', 'select-group.component.ts', 'select-item.component.ts', 'select-label.component.ts', 'select-separator.component.ts', 'select-trigger.component.ts', 'select-value.component.ts', 'index.ts'],
|
|
104
179
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
105
180
|
},
|
|
106
181
|
separator: {
|
|
@@ -108,7 +183,11 @@ const COMPONENT_REGISTRY: Record<string, ComponentInfo> = {
|
|
|
108
183
|
dependencies: ['clsx', 'tailwind-merge']
|
|
109
184
|
},
|
|
110
185
|
sheet: {
|
|
111
|
-
files: ['sheet.component.ts', 'index.ts'],
|
|
186
|
+
files: ['sheet.component.ts', 'sheet-close.component.ts', 'sheet-content.component.ts', 'sheet-context.ts', 'sheet-description.component.ts', 'sheet-footer.component.ts', 'sheet-header.component.ts', 'sheet-title.component.ts', 'sheet-trigger.component.ts', 'sheet-variants.ts', 'index.ts'],
|
|
187
|
+
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
188
|
+
},
|
|
189
|
+
sidebar: {
|
|
190
|
+
files: ['sidebar.component.ts', 'sidebar-content.component.ts', 'sidebar-context.ts', 'sidebar-footer.component.ts', 'sidebar-group.component.ts', 'sidebar-group-action.component.ts', 'sidebar-group-content.component.ts', 'sidebar-group-label.component.ts', 'sidebar-header.component.ts', 'sidebar-input.component.ts', 'sidebar-inset.component.ts', 'sidebar-menu.component.ts', 'sidebar-menu-action.component.ts', 'sidebar-menu-badge.component.ts', 'sidebar-menu-button.component.ts', 'sidebar-menu-item.component.ts', 'sidebar-menu-skeleton.component.ts', 'sidebar-menu-sub.component.ts', 'sidebar-menu-sub-button.component.ts', 'sidebar-menu-sub-item.component.ts', 'sidebar-provider.component.ts', 'sidebar-rail.component.ts', 'sidebar-route-active.service.ts', 'sidebar-separator.component.ts', 'sidebar-trigger.component.ts', 'index.ts'],
|
|
112
191
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge', 'lucide-angular']
|
|
113
192
|
},
|
|
114
193
|
skeleton: {
|
|
@@ -119,16 +198,20 @@ const COMPONENT_REGISTRY: Record<string, ComponentInfo> = {
|
|
|
119
198
|
files: ['slider.component.ts', 'index.ts'],
|
|
120
199
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
121
200
|
},
|
|
201
|
+
spinner: {
|
|
202
|
+
files: ['spinner.component.ts', 'spinner-variants.ts', 'index.ts'],
|
|
203
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
204
|
+
},
|
|
122
205
|
switch: {
|
|
123
206
|
files: ['switch.component.ts', 'index.ts'],
|
|
124
207
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
125
208
|
},
|
|
126
209
|
table: {
|
|
127
|
-
files: ['table.component.ts', 'index.ts'],
|
|
210
|
+
files: ['table.component.ts', 'table-body.component.ts', 'table-caption.component.ts', 'table-cell.component.ts', 'table-footer.component.ts', 'table-head.component.ts', 'table-header.component.ts', 'table-row.component.ts', 'index.ts'],
|
|
128
211
|
dependencies: ['clsx', 'tailwind-merge']
|
|
129
212
|
},
|
|
130
213
|
tabs: {
|
|
131
|
-
files: ['tabs.component.ts', 'index.ts'],
|
|
214
|
+
files: ['tabs.component.ts', 'tabs-content.component.ts', 'tabs-context.ts', 'tabs-list.component.ts', 'tabs-trigger.component.ts', 'index.ts'],
|
|
132
215
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
133
216
|
},
|
|
134
217
|
textarea: {
|
|
@@ -136,17 +219,25 @@ const COMPONENT_REGISTRY: Record<string, ComponentInfo> = {
|
|
|
136
219
|
dependencies: ['clsx', 'tailwind-merge', '@angular/forms']
|
|
137
220
|
},
|
|
138
221
|
toast: {
|
|
139
|
-
files: ['toast.component.ts', '
|
|
222
|
+
files: ['toast.component.ts', 'toast-action.component.ts', 'toast-description.component.ts', 'toast-title.component.ts', 'toast-variants.ts', 'toast.service.ts', 'toaster.component.ts', 'index.ts'],
|
|
140
223
|
dependencies: ['clsx', 'tailwind-merge', 'lucide-angular']
|
|
141
224
|
},
|
|
142
225
|
toggle: {
|
|
143
|
-
files: ['toggle.component.ts', 'index.ts'],
|
|
226
|
+
files: ['toggle.component.ts', 'toggle-variants.ts', 'index.ts'],
|
|
227
|
+
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
228
|
+
},
|
|
229
|
+
'toggle-group': {
|
|
230
|
+
files: ['toggle-group.component.ts', 'toggle-group-context.ts', 'toggle-group-item.component.ts', 'index.ts'],
|
|
144
231
|
dependencies: ['class-variance-authority', 'clsx', 'tailwind-merge']
|
|
145
232
|
},
|
|
146
233
|
tooltip: {
|
|
147
|
-
files: ['tooltip.component.ts', 'index.ts'],
|
|
234
|
+
files: ['tooltip.component.ts', 'tooltip-content.component.ts', 'tooltip-context.ts', 'tooltip-provider.component.ts', 'tooltip-trigger.component.ts', 'index.ts'],
|
|
148
235
|
dependencies: ['@angular/cdk', 'clsx', 'tailwind-merge']
|
|
149
236
|
},
|
|
237
|
+
typography: {
|
|
238
|
+
files: ['typography-blockquote.component.ts', 'typography-h1.component.ts', 'typography-h2.component.ts', 'typography-h3.component.ts', 'typography-h4.component.ts', 'typography-inline-code.component.ts', 'typography-large.component.ts', 'typography-lead.component.ts', 'typography-list.component.ts', 'typography-muted.component.ts', 'typography-p.component.ts', 'typography-small.component.ts', 'index.ts'],
|
|
239
|
+
dependencies: ['clsx', 'tailwind-merge']
|
|
240
|
+
},
|
|
150
241
|
};
|
|
151
242
|
|
|
152
243
|
interface ComponentInfo {
|
|
@@ -185,7 +276,7 @@ export function component(options: ComponentOptions): Rule {
|
|
|
185
276
|
}
|
|
186
277
|
|
|
187
278
|
// Copy component files from the package source
|
|
188
|
-
const sourceBasePath = `node_modules/@ng-cn/core/lib/components/ui/${componentName}`;
|
|
279
|
+
const sourceBasePath = `node_modules/@ng-cn/core/src/app/lib/components/ui/${componentName}`;
|
|
189
280
|
const fallbackSourcePath = `src/app/lib/components/ui/${componentName}`;
|
|
190
281
|
|
|
191
282
|
let filesCreated = 0;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
type ThemeVariant = 'shadcn' | 'github' | 'vercel' | 'apple' | 'openai' | 'clickup' | 'linear';
|
|
2
3
|
interface NgAddOptions {
|
|
3
4
|
project?: string;
|
|
5
|
+
theme?: ThemeVariant;
|
|
4
6
|
skipInstall?: boolean;
|
|
5
7
|
skipStyles?: boolean;
|
|
6
|
-
components?: string
|
|
8
|
+
components?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare function ngAdd(options: NgAddOptions): Rule;
|
|
9
11
|
export {};
|