@c-rex/ui 0.1.19 → 0.1.21
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/README.md +19 -19
- package/package.json +207 -205
- package/src/alert.tsx +58 -58
- package/src/avatar.tsx +47 -47
- package/src/badge.tsx +46 -46
- package/src/breadcrumb.tsx +113 -113
- package/src/button.tsx +69 -69
- package/src/card.tsx +92 -92
- package/src/checkbox.tsx +30 -30
- package/src/collapsible.tsx +31 -31
- package/src/command.tsx +151 -151
- package/src/context-menu.tsx +250 -250
- package/src/dialog.tsx +122 -122
- package/src/drawer.tsx +133 -133
- package/src/dropdown-hover-item.tsx +27 -27
- package/src/dropdown-menu.tsx +273 -273
- package/src/hooks/index.tsx +27 -27
- package/src/input-group.tsx +189 -189
- package/src/input.tsx +42 -42
- package/src/label.tsx +22 -22
- package/src/navigation-menu.tsx +169 -168
- package/src/pagination.tsx +124 -124
- package/src/popover.tsx +31 -31
- package/src/radio-group.tsx +43 -43
- package/src/select.tsx +157 -157
- package/src/separator.tsx +29 -29
- package/src/sheet.tsx +140 -140
- package/src/sidebar.tsx +833 -835
- package/src/skeleton.tsx +15 -15
- package/src/sonner.tsx +10 -10
- package/src/switch.tsx +29 -29
- package/src/table.tsx +120 -120
- package/src/tabs.tsx +64 -64
- package/src/textarea.tsx +18 -18
- package/src/toggle-group.tsx +71 -71
- package/src/toggle.tsx +47 -47
- package/src/tooltip.tsx +30 -30
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# UI Components
|
|
2
|
-
|
|
3
|
-
This package contains UI components that are downloaded from [shadcn/ui](https://ui.shadcn.com/).
|
|
4
|
-
|
|
5
|
-
## About shadcn/ui
|
|
6
|
-
|
|
7
|
-
shadcn/ui is a collection of re-usable components built using Radix UI and Tailwind CSS. These components are not installed as a dependency - instead they are copied into our project and customized according to our needs.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
The components in this package can be imported and used in your React applications. Each component maintains the same API and styling conventions as defined in the original shadcn/ui documentation.
|
|
12
|
-
|
|
13
|
-
## Customization
|
|
14
|
-
|
|
15
|
-
While these components are sourced from shadcn/ui, they can be customized and modified to match our specific design requirements and use cases.
|
|
16
|
-
|
|
17
|
-
## Documentation
|
|
18
|
-
|
|
19
|
-
For detailed documentation about the original components, please visit [shadcn/ui documentation](https://ui.shadcn.com/docs).
|
|
1
|
+
# UI Components
|
|
2
|
+
|
|
3
|
+
This package contains UI components that are downloaded from [shadcn/ui](https://ui.shadcn.com/).
|
|
4
|
+
|
|
5
|
+
## About shadcn/ui
|
|
6
|
+
|
|
7
|
+
shadcn/ui is a collection of re-usable components built using Radix UI and Tailwind CSS. These components are not installed as a dependency - instead they are copied into our project and customized according to our needs.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
The components in this package can be imported and used in your React applications. Each component maintains the same API and styling conventions as defined in the original shadcn/ui documentation.
|
|
12
|
+
|
|
13
|
+
## Customization
|
|
14
|
+
|
|
15
|
+
While these components are sourced from shadcn/ui, they can be customized and modified to match our specific design requirements and use cases.
|
|
16
|
+
|
|
17
|
+
## Documentation
|
|
18
|
+
|
|
19
|
+
For detailed documentation about the original components, please visit [shadcn/ui documentation](https://ui.shadcn.com/docs).
|
package/package.json
CHANGED
|
@@ -1,205 +1,207 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@c-rex/ui",
|
|
3
|
-
|
|
4
|
-
"type": "module",
|
|
5
|
-
"files": [
|
|
6
|
-
"src"
|
|
7
|
-
],
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"exports": {
|
|
13
|
-
"./hooks": {
|
|
14
|
-
"types": "./src/hooks/index.tsx",
|
|
15
|
-
"import": "./src/hooks/index.tsx"
|
|
16
|
-
},
|
|
17
|
-
"./collapsible": {
|
|
18
|
-
"types": "./src/collapsible.tsx",
|
|
19
|
-
"import": "./src/collapsible.tsx"
|
|
20
|
-
},
|
|
21
|
-
"./alert": {
|
|
22
|
-
"types": "./src/alert.tsx",
|
|
23
|
-
"import": "./src/alert.tsx"
|
|
24
|
-
},
|
|
25
|
-
"./drawer": {
|
|
26
|
-
"types": "./src/drawer.tsx",
|
|
27
|
-
"import": "./src/drawer.tsx"
|
|
28
|
-
},
|
|
29
|
-
"./breadcrumb": {
|
|
30
|
-
"types": "./src/breadcrumb.tsx",
|
|
31
|
-
"import": "./src/breadcrumb.tsx"
|
|
32
|
-
},
|
|
33
|
-
"./button": {
|
|
34
|
-
"types": "./src/button.tsx",
|
|
35
|
-
"import": "./src/button.tsx"
|
|
36
|
-
},
|
|
37
|
-
"./command": {
|
|
38
|
-
"types": "./src/command.tsx",
|
|
39
|
-
"import": "./src/command.tsx"
|
|
40
|
-
},
|
|
41
|
-
"./dialog": {
|
|
42
|
-
"types": "./src/dialog.tsx",
|
|
43
|
-
"import": "./src/dialog.tsx"
|
|
44
|
-
},
|
|
45
|
-
"./hooks/use-mobile": {
|
|
46
|
-
"types": "./src/hooks/use-mobile.tsx",
|
|
47
|
-
"import": "./src/hooks/use-mobile.tsx"
|
|
48
|
-
},
|
|
49
|
-
"./input": {
|
|
50
|
-
"types": "./src/input.tsx",
|
|
51
|
-
"import": "./src/input.tsx"
|
|
52
|
-
},
|
|
53
|
-
"./input-group": {
|
|
54
|
-
"types": "./src/input-group.tsx",
|
|
55
|
-
"import": "./src/input-group.tsx"
|
|
56
|
-
},
|
|
57
|
-
"./popover": {
|
|
58
|
-
"types": "./src/popover.tsx",
|
|
59
|
-
"import": "./src/popover.tsx"
|
|
60
|
-
},
|
|
61
|
-
"./select": {
|
|
62
|
-
"types": "./src/select.tsx",
|
|
63
|
-
"import": "./src/select.tsx"
|
|
64
|
-
},
|
|
65
|
-
"./separator": {
|
|
66
|
-
"types": "./src/separator.tsx",
|
|
67
|
-
"import": "./src/separator.tsx"
|
|
68
|
-
},
|
|
69
|
-
"./sheet": {
|
|
70
|
-
"types": "./src/sheet.tsx",
|
|
71
|
-
"import": "./src/sheet.tsx"
|
|
72
|
-
},
|
|
73
|
-
"./sidebar": {
|
|
74
|
-
"types": "./src/sidebar.tsx",
|
|
75
|
-
"import": "./src/sidebar.tsx"
|
|
76
|
-
},
|
|
77
|
-
"./skeleton": {
|
|
78
|
-
"types": "./src/skeleton.tsx",
|
|
79
|
-
"import": "./src/skeleton.tsx"
|
|
80
|
-
},
|
|
81
|
-
"./table": {
|
|
82
|
-
"types": "./src/table.tsx",
|
|
83
|
-
"import": "./src/table.tsx"
|
|
84
|
-
},
|
|
85
|
-
"./tooltip": {
|
|
86
|
-
"types": "./src/tooltip.tsx",
|
|
87
|
-
"import": "./src/tooltip.tsx"
|
|
88
|
-
},
|
|
89
|
-
"./avatar": {
|
|
90
|
-
"types": "./src/avatar.tsx",
|
|
91
|
-
"import": "./src/avatar.tsx"
|
|
92
|
-
},
|
|
93
|
-
"./dropdown-menu": {
|
|
94
|
-
"types": "./src/dropdown-menu.tsx",
|
|
95
|
-
"import": "./src/dropdown-menu.tsx"
|
|
96
|
-
},
|
|
97
|
-
"./label": {
|
|
98
|
-
"types": "./src/label.tsx",
|
|
99
|
-
"import": "./src/label.tsx"
|
|
100
|
-
},
|
|
101
|
-
"./checkbox": {
|
|
102
|
-
"types": "./src/checkbox.tsx",
|
|
103
|
-
"import": "./src/checkbox.tsx"
|
|
104
|
-
},
|
|
105
|
-
"./sonner": {
|
|
106
|
-
"types": "./src/sonner.tsx",
|
|
107
|
-
"import": "./src/sonner.tsx"
|
|
108
|
-
},
|
|
109
|
-
"./pagination": {
|
|
110
|
-
"types": "./src/pagination.tsx",
|
|
111
|
-
"import": "./src/pagination.tsx"
|
|
112
|
-
},
|
|
113
|
-
"./radio-group": {
|
|
114
|
-
"types": "./src/radio-group.tsx",
|
|
115
|
-
"import": "./src/radio-group.tsx"
|
|
116
|
-
},
|
|
117
|
-
"./switch": {
|
|
118
|
-
"types": "./src/switch.tsx",
|
|
119
|
-
"import": "./src/switch.tsx"
|
|
120
|
-
},
|
|
121
|
-
"./toggle": {
|
|
122
|
-
"types": "./src/toggle.tsx",
|
|
123
|
-
"import": "./src/toggle.tsx"
|
|
124
|
-
},
|
|
125
|
-
"./toggle-group": {
|
|
126
|
-
"types": "./src/toggle-group.tsx",
|
|
127
|
-
"import": "./src/toggle-group.tsx"
|
|
128
|
-
},
|
|
129
|
-
"./tabs": {
|
|
130
|
-
"types": "./src/tabs.tsx",
|
|
131
|
-
"import": "./src/tabs.tsx"
|
|
132
|
-
},
|
|
133
|
-
"./context-menu": {
|
|
134
|
-
"types": "./src/context-menu.tsx",
|
|
135
|
-
"import": "./src/context-menu.tsx"
|
|
136
|
-
},
|
|
137
|
-
"./badge": {
|
|
138
|
-
"types": "./src/badge.tsx",
|
|
139
|
-
"import": "./src/badge.tsx"
|
|
140
|
-
},
|
|
141
|
-
"./card": {
|
|
142
|
-
"types": "./src/card.tsx",
|
|
143
|
-
"import": "./src/card.tsx"
|
|
144
|
-
},
|
|
145
|
-
"./navigation-menu": {
|
|
146
|
-
"types": "./src/navigation-menu.tsx",
|
|
147
|
-
"import": "./src/navigation-menu.tsx"
|
|
148
|
-
},
|
|
149
|
-
"./dropdown-hover-item": {
|
|
150
|
-
"types": "./src/dropdown-hover-item.tsx",
|
|
151
|
-
"import": "./src/dropdown-hover-item.tsx"
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"scripts": {
|
|
155
|
-
"lint": "eslint .",
|
|
156
|
-
"lint:fix": "eslint . --fix"
|
|
157
|
-
},
|
|
158
|
-
"devDependencies": {
|
|
159
|
-
"@c-rex/eslint-config": "*",
|
|
160
|
-
"@c-rex/typescript-config": "*",
|
|
161
|
-
"@turbo/gen": "^2.4.4",
|
|
162
|
-
"@types/node": "^22.13.10",
|
|
163
|
-
"@types/react": "19.0.10",
|
|
164
|
-
"@types/react-dom": "19.0.4",
|
|
165
|
-
"eslint": "^9.23.0",
|
|
166
|
-
"shadcn": "^2.5.0",
|
|
167
|
-
"typescript": "latest"
|
|
168
|
-
},
|
|
169
|
-
"dependencies": {
|
|
170
|
-
"@c-rex/
|
|
171
|
-
"@
|
|
172
|
-
"@
|
|
173
|
-
"@radix-ui/react-
|
|
174
|
-
"@radix-ui/react-
|
|
175
|
-
"@radix-ui/react-
|
|
176
|
-
"@radix-ui/react-
|
|
177
|
-
"@radix-ui/react-
|
|
178
|
-
"@radix-ui/react-
|
|
179
|
-
"@radix-ui/react-
|
|
180
|
-
"@radix-ui/react-
|
|
181
|
-
"@radix-ui/react-
|
|
182
|
-
"@radix-ui/react-
|
|
183
|
-
"@radix-ui/react-
|
|
184
|
-
"@radix-ui/react-
|
|
185
|
-
"@radix-ui/react-
|
|
186
|
-
"@radix-ui/react-
|
|
187
|
-
"@radix-ui/react-
|
|
188
|
-
"@radix-ui/react-
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"react": "^
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@c-rex/ui",
|
|
3
|
+
"version": "0.1.21",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"src"
|
|
7
|
+
],
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
"./hooks": {
|
|
14
|
+
"types": "./src/hooks/index.tsx",
|
|
15
|
+
"import": "./src/hooks/index.tsx"
|
|
16
|
+
},
|
|
17
|
+
"./collapsible": {
|
|
18
|
+
"types": "./src/collapsible.tsx",
|
|
19
|
+
"import": "./src/collapsible.tsx"
|
|
20
|
+
},
|
|
21
|
+
"./alert": {
|
|
22
|
+
"types": "./src/alert.tsx",
|
|
23
|
+
"import": "./src/alert.tsx"
|
|
24
|
+
},
|
|
25
|
+
"./drawer": {
|
|
26
|
+
"types": "./src/drawer.tsx",
|
|
27
|
+
"import": "./src/drawer.tsx"
|
|
28
|
+
},
|
|
29
|
+
"./breadcrumb": {
|
|
30
|
+
"types": "./src/breadcrumb.tsx",
|
|
31
|
+
"import": "./src/breadcrumb.tsx"
|
|
32
|
+
},
|
|
33
|
+
"./button": {
|
|
34
|
+
"types": "./src/button.tsx",
|
|
35
|
+
"import": "./src/button.tsx"
|
|
36
|
+
},
|
|
37
|
+
"./command": {
|
|
38
|
+
"types": "./src/command.tsx",
|
|
39
|
+
"import": "./src/command.tsx"
|
|
40
|
+
},
|
|
41
|
+
"./dialog": {
|
|
42
|
+
"types": "./src/dialog.tsx",
|
|
43
|
+
"import": "./src/dialog.tsx"
|
|
44
|
+
},
|
|
45
|
+
"./hooks/use-mobile": {
|
|
46
|
+
"types": "./src/hooks/use-mobile.tsx",
|
|
47
|
+
"import": "./src/hooks/use-mobile.tsx"
|
|
48
|
+
},
|
|
49
|
+
"./input": {
|
|
50
|
+
"types": "./src/input.tsx",
|
|
51
|
+
"import": "./src/input.tsx"
|
|
52
|
+
},
|
|
53
|
+
"./input-group": {
|
|
54
|
+
"types": "./src/input-group.tsx",
|
|
55
|
+
"import": "./src/input-group.tsx"
|
|
56
|
+
},
|
|
57
|
+
"./popover": {
|
|
58
|
+
"types": "./src/popover.tsx",
|
|
59
|
+
"import": "./src/popover.tsx"
|
|
60
|
+
},
|
|
61
|
+
"./select": {
|
|
62
|
+
"types": "./src/select.tsx",
|
|
63
|
+
"import": "./src/select.tsx"
|
|
64
|
+
},
|
|
65
|
+
"./separator": {
|
|
66
|
+
"types": "./src/separator.tsx",
|
|
67
|
+
"import": "./src/separator.tsx"
|
|
68
|
+
},
|
|
69
|
+
"./sheet": {
|
|
70
|
+
"types": "./src/sheet.tsx",
|
|
71
|
+
"import": "./src/sheet.tsx"
|
|
72
|
+
},
|
|
73
|
+
"./sidebar": {
|
|
74
|
+
"types": "./src/sidebar.tsx",
|
|
75
|
+
"import": "./src/sidebar.tsx"
|
|
76
|
+
},
|
|
77
|
+
"./skeleton": {
|
|
78
|
+
"types": "./src/skeleton.tsx",
|
|
79
|
+
"import": "./src/skeleton.tsx"
|
|
80
|
+
},
|
|
81
|
+
"./table": {
|
|
82
|
+
"types": "./src/table.tsx",
|
|
83
|
+
"import": "./src/table.tsx"
|
|
84
|
+
},
|
|
85
|
+
"./tooltip": {
|
|
86
|
+
"types": "./src/tooltip.tsx",
|
|
87
|
+
"import": "./src/tooltip.tsx"
|
|
88
|
+
},
|
|
89
|
+
"./avatar": {
|
|
90
|
+
"types": "./src/avatar.tsx",
|
|
91
|
+
"import": "./src/avatar.tsx"
|
|
92
|
+
},
|
|
93
|
+
"./dropdown-menu": {
|
|
94
|
+
"types": "./src/dropdown-menu.tsx",
|
|
95
|
+
"import": "./src/dropdown-menu.tsx"
|
|
96
|
+
},
|
|
97
|
+
"./label": {
|
|
98
|
+
"types": "./src/label.tsx",
|
|
99
|
+
"import": "./src/label.tsx"
|
|
100
|
+
},
|
|
101
|
+
"./checkbox": {
|
|
102
|
+
"types": "./src/checkbox.tsx",
|
|
103
|
+
"import": "./src/checkbox.tsx"
|
|
104
|
+
},
|
|
105
|
+
"./sonner": {
|
|
106
|
+
"types": "./src/sonner.tsx",
|
|
107
|
+
"import": "./src/sonner.tsx"
|
|
108
|
+
},
|
|
109
|
+
"./pagination": {
|
|
110
|
+
"types": "./src/pagination.tsx",
|
|
111
|
+
"import": "./src/pagination.tsx"
|
|
112
|
+
},
|
|
113
|
+
"./radio-group": {
|
|
114
|
+
"types": "./src/radio-group.tsx",
|
|
115
|
+
"import": "./src/radio-group.tsx"
|
|
116
|
+
},
|
|
117
|
+
"./switch": {
|
|
118
|
+
"types": "./src/switch.tsx",
|
|
119
|
+
"import": "./src/switch.tsx"
|
|
120
|
+
},
|
|
121
|
+
"./toggle": {
|
|
122
|
+
"types": "./src/toggle.tsx",
|
|
123
|
+
"import": "./src/toggle.tsx"
|
|
124
|
+
},
|
|
125
|
+
"./toggle-group": {
|
|
126
|
+
"types": "./src/toggle-group.tsx",
|
|
127
|
+
"import": "./src/toggle-group.tsx"
|
|
128
|
+
},
|
|
129
|
+
"./tabs": {
|
|
130
|
+
"types": "./src/tabs.tsx",
|
|
131
|
+
"import": "./src/tabs.tsx"
|
|
132
|
+
},
|
|
133
|
+
"./context-menu": {
|
|
134
|
+
"types": "./src/context-menu.tsx",
|
|
135
|
+
"import": "./src/context-menu.tsx"
|
|
136
|
+
},
|
|
137
|
+
"./badge": {
|
|
138
|
+
"types": "./src/badge.tsx",
|
|
139
|
+
"import": "./src/badge.tsx"
|
|
140
|
+
},
|
|
141
|
+
"./card": {
|
|
142
|
+
"types": "./src/card.tsx",
|
|
143
|
+
"import": "./src/card.tsx"
|
|
144
|
+
},
|
|
145
|
+
"./navigation-menu": {
|
|
146
|
+
"types": "./src/navigation-menu.tsx",
|
|
147
|
+
"import": "./src/navigation-menu.tsx"
|
|
148
|
+
},
|
|
149
|
+
"./dropdown-hover-item": {
|
|
150
|
+
"types": "./src/dropdown-hover-item.tsx",
|
|
151
|
+
"import": "./src/dropdown-hover-item.tsx"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"scripts": {
|
|
155
|
+
"lint": "eslint .",
|
|
156
|
+
"lint:fix": "eslint . --fix"
|
|
157
|
+
},
|
|
158
|
+
"devDependencies": {
|
|
159
|
+
"@c-rex/eslint-config": "*",
|
|
160
|
+
"@c-rex/typescript-config": "*",
|
|
161
|
+
"@turbo/gen": "^2.4.4",
|
|
162
|
+
"@types/node": "^22.13.10",
|
|
163
|
+
"@types/react": "19.0.10",
|
|
164
|
+
"@types/react-dom": "19.0.4",
|
|
165
|
+
"eslint": "^9.23.0",
|
|
166
|
+
"shadcn": "^2.5.0",
|
|
167
|
+
"typescript": "latest"
|
|
168
|
+
},
|
|
169
|
+
"dependencies": {
|
|
170
|
+
"@c-rex/constants": "*",
|
|
171
|
+
"@c-rex/types": "*",
|
|
172
|
+
"@c-rex/utils": "*",
|
|
173
|
+
"@radix-ui/react-avatar": "^1.1.9",
|
|
174
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
175
|
+
"@radix-ui/react-collapsible": "^1.1.11",
|
|
176
|
+
"@radix-ui/react-context-menu": "^2.2.15",
|
|
177
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
178
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
179
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
180
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
181
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
182
|
+
"@radix-ui/react-radio-group": "^1.3.7",
|
|
183
|
+
"@radix-ui/react-select": "^2.1.6",
|
|
184
|
+
"@radix-ui/react-separator": "^1.1.2",
|
|
185
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
186
|
+
"@radix-ui/react-switch": "^1.2.5",
|
|
187
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
188
|
+
"@radix-ui/react-toggle": "^1.1.9",
|
|
189
|
+
"@radix-ui/react-toggle-group": "^1.1.10",
|
|
190
|
+
"@radix-ui/react-tooltip": "^1.1.8",
|
|
191
|
+
"class-variance-authority": "^0.7.1",
|
|
192
|
+
"clsx": "^2.1.1",
|
|
193
|
+
"cmdk": "^1.1.1",
|
|
194
|
+
"lucide-react": "^0.486.0",
|
|
195
|
+
"radix-ui": "^1.4.3",
|
|
196
|
+
"react": "^18.3.1",
|
|
197
|
+
"react-dom": "^18.3.1",
|
|
198
|
+
"sonner": "^2.0.5",
|
|
199
|
+
"tailwind-merge": "^3.3.0",
|
|
200
|
+
"tw-animate-css": "^1.2.9",
|
|
201
|
+
"vaul": "^1.1.2"
|
|
202
|
+
},
|
|
203
|
+
"peerDependencies": {
|
|
204
|
+
"react": "^18.3.1",
|
|
205
|
+
"react-dom": "^18.3.1"
|
|
206
|
+
}
|
|
207
|
+
}
|
package/src/alert.tsx
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
import { cn } from "@c-rex/utils";
|
|
4
|
-
|
|
5
|
-
const alertVariants = cva(
|
|
6
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
7
|
-
{
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default: "bg-background text-foreground",
|
|
11
|
-
destructive:
|
|
12
|
-
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
variant: "default",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const Alert = React.forwardRef<
|
|
22
|
-
HTMLDivElement,
|
|
23
|
-
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
24
|
-
>(({ className, variant, ...props }, ref) => (
|
|
25
|
-
<div
|
|
26
|
-
ref={ref}
|
|
27
|
-
role="alert"
|
|
28
|
-
className={cn(alertVariants({ variant }), className)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
));
|
|
32
|
-
Alert.displayName = "Alert";
|
|
33
|
-
|
|
34
|
-
const AlertTitle = React.forwardRef<
|
|
35
|
-
HTMLParagraphElement,
|
|
36
|
-
React.HTMLAttributes<HTMLHeadingElement>
|
|
37
|
-
>(({ className, ...props }, ref) => (
|
|
38
|
-
<h5
|
|
39
|
-
ref={ref}
|
|
40
|
-
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
41
|
-
{...props}
|
|
42
|
-
/>
|
|
43
|
-
));
|
|
44
|
-
AlertTitle.displayName = "AlertTitle";
|
|
45
|
-
|
|
46
|
-
const AlertDescription = React.forwardRef<
|
|
47
|
-
HTMLParagraphElement,
|
|
48
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
49
|
-
>(({ className, ...props }, ref) => (
|
|
50
|
-
<div
|
|
51
|
-
ref={ref}
|
|
52
|
-
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
));
|
|
56
|
-
AlertDescription.displayName = "AlertDescription";
|
|
57
|
-
|
|
58
|
-
export { Alert, AlertTitle, AlertDescription };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@c-rex/utils";
|
|
4
|
+
|
|
5
|
+
const alertVariants = cva(
|
|
6
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-background text-foreground",
|
|
11
|
+
destructive:
|
|
12
|
+
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const Alert = React.forwardRef<
|
|
22
|
+
HTMLDivElement,
|
|
23
|
+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
24
|
+
>(({ className, variant, ...props }, ref) => (
|
|
25
|
+
<div
|
|
26
|
+
ref={ref}
|
|
27
|
+
role="alert"
|
|
28
|
+
className={cn(alertVariants({ variant }), className)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
));
|
|
32
|
+
Alert.displayName = "Alert";
|
|
33
|
+
|
|
34
|
+
const AlertTitle = React.forwardRef<
|
|
35
|
+
HTMLParagraphElement,
|
|
36
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
37
|
+
>(({ className, ...props }, ref) => (
|
|
38
|
+
<h5
|
|
39
|
+
ref={ref}
|
|
40
|
+
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
));
|
|
44
|
+
AlertTitle.displayName = "AlertTitle";
|
|
45
|
+
|
|
46
|
+
const AlertDescription = React.forwardRef<
|
|
47
|
+
HTMLParagraphElement,
|
|
48
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
49
|
+
>(({ className, ...props }, ref) => (
|
|
50
|
+
<div
|
|
51
|
+
ref={ref}
|
|
52
|
+
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
));
|
|
56
|
+
AlertDescription.displayName = "AlertDescription";
|
|
57
|
+
|
|
58
|
+
export { Alert, AlertTitle, AlertDescription };
|