@allbluecn/ui 0.3.13 → 0.4.0
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/dist/ai-command-button.d.ts +10 -0
- package/dist/ai-command-button.js +12 -0
- package/dist/ai-stream-text.d.ts +9 -0
- package/dist/ai-stream-text.js +12 -0
- package/dist/alert-dialog.d.ts +20 -0
- package/dist/alert-dialog.js +101 -0
- package/dist/animated-theme-toggler.d.ts +11 -0
- package/dist/animated-theme-toggler.js +169 -0
- package/dist/auth-client.d.ts +27 -0
- package/dist/auth-client.js +86 -0
- package/dist/auth-layout.d.ts +14 -0
- package/dist/auth-layout.js +43 -0
- package/dist/avatar.d.ts +13 -0
- package/dist/avatar.js +51 -0
- package/dist/badge.d.ts +11 -0
- package/dist/badge.js +28 -0
- package/dist/button.d.ts +12 -0
- package/dist/button.js +48 -0
- package/dist/card.d.ts +13 -0
- package/dist/card.js +56 -0
- package/dist/checkbox.d.ts +6 -0
- package/dist/checkbox.js +22 -0
- package/dist/context-menu.d.ts +33 -0
- package/dist/context-menu.js +125 -0
- package/dist/dialog.d.ts +19 -0
- package/dist/dialog.js +95 -0
- package/dist/dropdown-menu.d.ts +31 -0
- package/dist/dropdown-menu.js +128 -0
- package/dist/empty.d.ts +13 -0
- package/dist/empty.js +59 -0
- package/dist/grid-pattern.d.ts +14 -0
- package/dist/grid-pattern.js +47 -0
- package/dist/icon-packs/index.d.ts +2 -0
- package/dist/icon-packs/index.js +4 -0
- package/dist/icon-packs/knowledge.d.ts +2 -0
- package/dist/icon-packs/knowledge.js +70 -0
- package/dist/icon-packs/prd.d.ts +2 -0
- package/dist/icon-packs/prd.js +86 -0
- package/dist/icon-packs/project.d.ts +2 -0
- package/dist/icon-packs/project.js +74 -0
- package/dist/icon-picker.d.ts +11 -0
- package/dist/icon-picker.js +39 -0
- package/dist/index-CQsbeClc.d.ts +17 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/input.d.ts +5 -0
- package/dist/input.js +14 -0
- package/dist/item.d.ts +25 -0
- package/dist/item.js +118 -0
- package/dist/kbd.d.ts +4 -0
- package/dist/kbd.js +12 -0
- package/dist/label.d.ts +6 -0
- package/dist/label.js +14 -0
- package/dist/layout-panel-top.d.ts +12 -0
- package/dist/layout-panel-top.js +127 -0
- package/dist/name-confirm-dialog.d.ts +15 -0
- package/dist/name-confirm-dialog.js +105 -0
- package/dist/nav-float-button.d.ts +12 -0
- package/dist/nav-float-button.js +249 -0
- package/dist/notion-avatar.d.ts +13 -0
- package/dist/notion-avatar.js +83 -0
- package/dist/placeholder-page.d.ts +10 -0
- package/dist/placeholder-page.js +28 -0
- package/dist/popover.d.ts +12 -0
- package/dist/popover.js +56 -0
- package/dist/reference-inline.d.ts +10 -0
- package/dist/reference-inline.js +35 -0
- package/dist/reference-search.d.ts +12 -0
- package/dist/reference-search.js +26 -0
- package/dist/resizable.d.ts +9 -0
- package/dist/resizable.js +28 -0
- package/dist/select.d.ts +17 -0
- package/dist/select.js +99 -0
- package/dist/separator.d.ts +6 -0
- package/dist/separator.js +17 -0
- package/dist/sheet.d.ts +16 -0
- package/dist/sheet.js +90 -0
- package/dist/sidebar.d.ts +71 -0
- package/dist/sidebar.js +369 -0
- package/dist/skeleton.d.ts +4 -0
- package/dist/skeleton.js +12 -0
- package/dist/sonner.d.ts +5 -0
- package/dist/sonner.js +19 -0
- package/dist/switch.d.ts +8 -0
- package/dist/switch.js +19 -0
- package/dist/textarea.d.ts +5 -0
- package/dist/textarea.js +13 -0
- package/dist/timezone-provider.d.ts +18 -0
- package/dist/timezone-provider.js +29 -0
- package/dist/tooltip.d.ts +9 -0
- package/dist/tooltip.js +35 -0
- package/dist/use-mobile.d.ts +4 -0
- package/dist/use-mobile.js +18 -0
- package/dist/user-avatar.d.ts +14 -0
- package/dist/user-avatar.js +34 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +8 -0
- package/package.json +178 -49
- package/src/ai-command-button.tsx +0 -36
- package/src/ai-stream-text.tsx +0 -37
- package/src/alert-dialog.tsx +0 -216
- package/src/animated-theme-toggler.tsx +0 -272
- package/src/auth-client.ts +0 -108
- package/src/auth-layout.tsx +0 -66
- package/src/avatar.tsx +0 -129
- package/src/badge.tsx +0 -66
- package/src/button.tsx +0 -84
- package/src/card.tsx +0 -120
- package/src/checkbox.tsx +0 -50
- package/src/context-menu.tsx +0 -280
- package/src/dialog.tsx +0 -183
- package/src/dropdown-menu.tsx +0 -286
- package/src/empty.tsx +0 -121
- package/src/grid-pattern.tsx +0 -87
- package/src/icon-packs/index.ts +0 -27
- package/src/icon-packs/knowledge.ts +0 -55
- package/src/icon-packs/prd.ts +0 -63
- package/src/icon-packs/project.ts +0 -59
- package/src/icon-picker.tsx +0 -68
- package/src/index.ts +0 -23
- package/src/input.tsx +0 -36
- package/src/item.tsx +0 -213
- package/src/kbd.tsx +0 -33
- package/src/label.tsx +0 -39
- package/src/layout-panel-top.tsx +0 -160
- package/src/name-confirm-dialog.tsx +0 -153
- package/src/nav-float-button.tsx +0 -301
- package/src/notion-avatar.tsx +0 -126
- package/src/placeholder-page.tsx +0 -42
- package/src/popover.tsx +0 -106
- package/src/reference-inline.tsx +0 -53
- package/src/reference-search.tsx +0 -52
- package/src/resizable.tsx +0 -67
- package/src/select.tsx +0 -207
- package/src/separator.tsx +0 -45
- package/src/sheet.tsx +0 -164
- package/src/sidebar.tsx +0 -708
- package/src/skeleton.tsx +0 -30
- package/src/sonner.tsx +0 -37
- package/src/switch.tsx +0 -48
- package/src/textarea.tsx +0 -35
- package/src/timezone-provider.tsx +0 -55
- package/src/tooltip.tsx +0 -72
- package/src/use-mobile.ts +0 -36
- package/src/user-avatar.tsx +0 -79
- package/src/utils.ts +0 -6
package/package.json
CHANGED
|
@@ -1,52 +1,175 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allbluecn/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
7
|
-
"types": "./
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
|
-
".":
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"./
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"./
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"./
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"./
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"./
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"./
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"./
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"./
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"./
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"./
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./sidebar": {
|
|
14
|
+
"types": "./dist/sidebar.d.ts",
|
|
15
|
+
"default": "./dist/sidebar.js"
|
|
16
|
+
},
|
|
17
|
+
"./tooltip": {
|
|
18
|
+
"types": "./dist/tooltip.d.ts",
|
|
19
|
+
"default": "./dist/tooltip.js"
|
|
20
|
+
},
|
|
21
|
+
"./dialog": {
|
|
22
|
+
"types": "./dist/dialog.d.ts",
|
|
23
|
+
"default": "./dist/dialog.js"
|
|
24
|
+
},
|
|
25
|
+
"./input": {
|
|
26
|
+
"types": "./dist/input.d.ts",
|
|
27
|
+
"default": "./dist/input.js"
|
|
28
|
+
},
|
|
29
|
+
"./button": {
|
|
30
|
+
"types": "./dist/button.d.ts",
|
|
31
|
+
"default": "./dist/button.js"
|
|
32
|
+
},
|
|
33
|
+
"./utils": {
|
|
34
|
+
"types": "./dist/utils.d.ts",
|
|
35
|
+
"default": "./dist/utils.js"
|
|
36
|
+
},
|
|
37
|
+
"./auth-client": {
|
|
38
|
+
"types": "./dist/auth-client.d.ts",
|
|
39
|
+
"default": "./dist/auth-client.js"
|
|
40
|
+
},
|
|
41
|
+
"./sonner": {
|
|
42
|
+
"types": "./dist/sonner.d.ts",
|
|
43
|
+
"default": "./dist/sonner.js"
|
|
44
|
+
},
|
|
45
|
+
"./select": {
|
|
46
|
+
"types": "./dist/select.d.ts",
|
|
47
|
+
"default": "./dist/select.js"
|
|
48
|
+
},
|
|
49
|
+
"./badge": {
|
|
50
|
+
"types": "./dist/badge.d.ts",
|
|
51
|
+
"default": "./dist/badge.js"
|
|
52
|
+
},
|
|
53
|
+
"./alert-dialog": {
|
|
54
|
+
"types": "./dist/alert-dialog.d.ts",
|
|
55
|
+
"default": "./dist/alert-dialog.js"
|
|
56
|
+
},
|
|
57
|
+
"./textarea": {
|
|
58
|
+
"types": "./dist/textarea.d.ts",
|
|
59
|
+
"default": "./dist/textarea.js"
|
|
60
|
+
},
|
|
61
|
+
"./skeleton": {
|
|
62
|
+
"types": "./dist/skeleton.d.ts",
|
|
63
|
+
"default": "./dist/skeleton.js"
|
|
64
|
+
},
|
|
65
|
+
"./dropdown-menu": {
|
|
66
|
+
"types": "./dist/dropdown-menu.d.ts",
|
|
67
|
+
"default": "./dist/dropdown-menu.js"
|
|
68
|
+
},
|
|
69
|
+
"./switch": {
|
|
70
|
+
"types": "./dist/switch.d.ts",
|
|
71
|
+
"default": "./dist/switch.js"
|
|
72
|
+
},
|
|
73
|
+
"./label": {
|
|
74
|
+
"types": "./dist/label.d.ts",
|
|
75
|
+
"default": "./dist/label.js"
|
|
76
|
+
},
|
|
77
|
+
"./empty": {
|
|
78
|
+
"types": "./dist/empty.d.ts",
|
|
79
|
+
"default": "./dist/empty.js"
|
|
80
|
+
},
|
|
81
|
+
"./checkbox": {
|
|
82
|
+
"types": "./dist/checkbox.d.ts",
|
|
83
|
+
"default": "./dist/checkbox.js"
|
|
84
|
+
},
|
|
85
|
+
"./resizable": {
|
|
86
|
+
"types": "./dist/resizable.d.ts",
|
|
87
|
+
"default": "./dist/resizable.js"
|
|
88
|
+
},
|
|
89
|
+
"./popover": {
|
|
90
|
+
"types": "./dist/popover.d.ts",
|
|
91
|
+
"default": "./dist/popover.js"
|
|
92
|
+
},
|
|
93
|
+
"./context-menu": {
|
|
94
|
+
"types": "./dist/context-menu.d.ts",
|
|
95
|
+
"default": "./dist/context-menu.js"
|
|
96
|
+
},
|
|
97
|
+
"./card": {
|
|
98
|
+
"types": "./dist/card.d.ts",
|
|
99
|
+
"default": "./dist/card.js"
|
|
100
|
+
},
|
|
101
|
+
"./placeholder-page": {
|
|
102
|
+
"types": "./dist/placeholder-page.d.ts",
|
|
103
|
+
"default": "./dist/placeholder-page.js"
|
|
104
|
+
},
|
|
105
|
+
"./name-confirm-dialog": {
|
|
106
|
+
"types": "./dist/name-confirm-dialog.d.ts",
|
|
107
|
+
"default": "./dist/name-confirm-dialog.js"
|
|
108
|
+
},
|
|
109
|
+
"./nav-float-button": {
|
|
110
|
+
"types": "./dist/nav-float-button.d.ts",
|
|
111
|
+
"default": "./dist/nav-float-button.js"
|
|
112
|
+
},
|
|
113
|
+
"./icon-picker": {
|
|
114
|
+
"types": "./dist/icon-picker.d.ts",
|
|
115
|
+
"default": "./dist/icon-picker.js"
|
|
116
|
+
},
|
|
117
|
+
"./icon-packs": {
|
|
118
|
+
"types": "./dist/icon-packs/index.d.ts",
|
|
119
|
+
"default": "./dist/icon-packs/index.js"
|
|
120
|
+
},
|
|
121
|
+
"./icon-packs/prd": {
|
|
122
|
+
"types": "./dist/icon-packs/prd.d.ts",
|
|
123
|
+
"default": "./dist/icon-packs/prd.js"
|
|
124
|
+
},
|
|
125
|
+
"./icon-packs/knowledge": {
|
|
126
|
+
"types": "./dist/icon-packs/knowledge.d.ts",
|
|
127
|
+
"default": "./dist/icon-packs/knowledge.js"
|
|
128
|
+
},
|
|
129
|
+
"./icon-packs/project": {
|
|
130
|
+
"types": "./dist/icon-packs/project.d.ts",
|
|
131
|
+
"default": "./dist/icon-packs/project.js"
|
|
132
|
+
},
|
|
133
|
+
"./grid-pattern": {
|
|
134
|
+
"types": "./dist/grid-pattern.d.ts",
|
|
135
|
+
"default": "./dist/grid-pattern.js"
|
|
136
|
+
},
|
|
137
|
+
"./layout-panel-top": {
|
|
138
|
+
"types": "./dist/layout-panel-top.d.ts",
|
|
139
|
+
"default": "./dist/layout-panel-top.js"
|
|
140
|
+
},
|
|
141
|
+
"./timezone-provider": {
|
|
142
|
+
"types": "./dist/timezone-provider.d.ts",
|
|
143
|
+
"default": "./dist/timezone-provider.js"
|
|
144
|
+
},
|
|
145
|
+
"./auth-layout": {
|
|
146
|
+
"types": "./dist/auth-layout.d.ts",
|
|
147
|
+
"default": "./dist/auth-layout.js"
|
|
148
|
+
},
|
|
149
|
+
"./animated-theme-toggler": {
|
|
150
|
+
"types": "./dist/animated-theme-toggler.d.ts",
|
|
151
|
+
"default": "./dist/animated-theme-toggler.js"
|
|
152
|
+
},
|
|
153
|
+
"./separator": {
|
|
154
|
+
"types": "./dist/separator.d.ts",
|
|
155
|
+
"default": "./dist/separator.js"
|
|
156
|
+
},
|
|
157
|
+
"./notion-avatar": {
|
|
158
|
+
"types": "./dist/notion-avatar.d.ts",
|
|
159
|
+
"default": "./dist/notion-avatar.js"
|
|
160
|
+
},
|
|
161
|
+
"./avatar": {
|
|
162
|
+
"types": "./dist/avatar.d.ts",
|
|
163
|
+
"default": "./dist/avatar.js"
|
|
164
|
+
},
|
|
165
|
+
"./item": {
|
|
166
|
+
"types": "./dist/item.d.ts",
|
|
167
|
+
"default": "./dist/item.js"
|
|
168
|
+
},
|
|
169
|
+
"./kbd": {
|
|
170
|
+
"types": "./dist/kbd.d.ts",
|
|
171
|
+
"default": "./dist/kbd.js"
|
|
172
|
+
}
|
|
50
173
|
},
|
|
51
174
|
"dependencies": {
|
|
52
175
|
"@tanstack/react-query": "^5.101.2",
|
|
@@ -62,11 +185,12 @@
|
|
|
62
185
|
"sonner": "^2.0.7",
|
|
63
186
|
"next-themes": "^0.4.6",
|
|
64
187
|
"tailwind-merge": "^3.5.0",
|
|
65
|
-
"@allbluecn/shared": "0.
|
|
188
|
+
"@allbluecn/shared": "0.4.0"
|
|
66
189
|
},
|
|
67
190
|
"devDependencies": {
|
|
68
191
|
"@types/react": "^19",
|
|
69
192
|
"@types/react-dom": "^19",
|
|
193
|
+
"tsdown": "^0.22.0",
|
|
70
194
|
"typescript": "^7"
|
|
71
195
|
},
|
|
72
196
|
"repository": {
|
|
@@ -78,8 +202,13 @@
|
|
|
78
202
|
"url": "https://github.com/urmynami/AllBlue/issues"
|
|
79
203
|
},
|
|
80
204
|
"files": [
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
205
|
+
"dist"
|
|
206
|
+
],
|
|
207
|
+
"publishConfig": {
|
|
208
|
+
"access": "public"
|
|
209
|
+
},
|
|
210
|
+
"scripts": {
|
|
211
|
+
"build": "tsdown",
|
|
212
|
+
"typecheck": "tsc --noEmit"
|
|
213
|
+
}
|
|
85
214
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
import type { AICommandDef } from "@allbluecn/shared";
|
|
19
|
-
|
|
20
|
-
interface Props {
|
|
21
|
-
command: AICommandDef;
|
|
22
|
-
onClick: () => void;
|
|
23
|
-
loading?: boolean;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function AICommandButton({ command, onClick, loading }: Props) {
|
|
27
|
-
return (
|
|
28
|
-
<button
|
|
29
|
-
className="inline-flex items-center gap-1 px-2 py-1 text-xs rounded bg-primary/10 text-primary hover:bg-primary/20"
|
|
30
|
-
onClick={onClick}
|
|
31
|
-
disabled={loading}
|
|
32
|
-
>
|
|
33
|
-
{loading ? "..." : command.label}
|
|
34
|
-
</button>
|
|
35
|
-
);
|
|
36
|
-
}
|
package/src/ai-stream-text.tsx
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
"use client"
|
|
19
|
-
|
|
20
|
-
interface Props {
|
|
21
|
-
text: string
|
|
22
|
-
streaming?: boolean
|
|
23
|
-
className?: string
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function AIStreamText({ text, streaming = false, className }: Props) {
|
|
27
|
-
if (!text && !streaming) return null
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div className={"prose prose-sm max-w-none" + (className ? " " + className : "")}>
|
|
31
|
-
{text || "\u00A0"}
|
|
32
|
-
{streaming && (
|
|
33
|
-
<span className="inline-block w-2 h-4 ml-0.5 bg-primary animate-pulse rounded-sm align-middle" />
|
|
34
|
-
)}
|
|
35
|
-
</div>
|
|
36
|
-
)
|
|
37
|
-
}
|
package/src/alert-dialog.tsx
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
-
// AllBlue - 理想之海
|
|
3
|
-
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
-
//
|
|
5
|
-
// This program is free software: you can redistribute it and/or modify
|
|
6
|
-
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
// (at your option) any later version.
|
|
9
|
-
//
|
|
10
|
-
// This program is distributed in the hope that it will be useful,
|
|
11
|
-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
// GNU Affero General Public License for more details.
|
|
14
|
-
//
|
|
15
|
-
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
-
|
|
18
|
-
"use client"
|
|
19
|
-
|
|
20
|
-
import * as React from "react"
|
|
21
|
-
import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
|
|
22
|
-
|
|
23
|
-
import { cn } from "./utils"
|
|
24
|
-
import { Button } from "./button"
|
|
25
|
-
|
|
26
|
-
function AlertDialog({
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
29
|
-
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function AlertDialogTrigger({
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
35
|
-
return (
|
|
36
|
-
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function AlertDialogPortal({
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
43
|
-
return (
|
|
44
|
-
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function AlertDialogOverlay({
|
|
49
|
-
className,
|
|
50
|
-
...props
|
|
51
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
52
|
-
return (
|
|
53
|
-
<AlertDialogPrimitive.Overlay
|
|
54
|
-
data-slot="alert-dialog-overlay"
|
|
55
|
-
className={cn(
|
|
56
|
-
"fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
57
|
-
className
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function AlertDialogContent({
|
|
65
|
-
className,
|
|
66
|
-
size = "default",
|
|
67
|
-
...props
|
|
68
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
69
|
-
size?: "default" | "sm"
|
|
70
|
-
}) {
|
|
71
|
-
return (
|
|
72
|
-
<AlertDialogPortal>
|
|
73
|
-
<AlertDialogOverlay />
|
|
74
|
-
<AlertDialogPrimitive.Content
|
|
75
|
-
data-slot="alert-dialog-content"
|
|
76
|
-
data-size={size}
|
|
77
|
-
className={cn(
|
|
78
|
-
"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
79
|
-
className
|
|
80
|
-
)}
|
|
81
|
-
{...props}
|
|
82
|
-
/>
|
|
83
|
-
</AlertDialogPortal>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function AlertDialogHeader({
|
|
88
|
-
className,
|
|
89
|
-
...props
|
|
90
|
-
}: React.ComponentProps<"div">) {
|
|
91
|
-
return (
|
|
92
|
-
<div
|
|
93
|
-
data-slot="alert-dialog-header"
|
|
94
|
-
className={cn(
|
|
95
|
-
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
96
|
-
className
|
|
97
|
-
)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function AlertDialogFooter({
|
|
104
|
-
className,
|
|
105
|
-
...props
|
|
106
|
-
}: React.ComponentProps<"div">) {
|
|
107
|
-
return (
|
|
108
|
-
<div
|
|
109
|
-
data-slot="alert-dialog-footer"
|
|
110
|
-
className={cn(
|
|
111
|
-
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
112
|
-
className
|
|
113
|
-
)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function AlertDialogMedia({
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}: React.ComponentProps<"div">) {
|
|
123
|
-
return (
|
|
124
|
-
<div
|
|
125
|
-
data-slot="alert-dialog-media"
|
|
126
|
-
className={cn(
|
|
127
|
-
"mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
|
|
128
|
-
className
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function AlertDialogTitle({
|
|
136
|
-
className,
|
|
137
|
-
...props
|
|
138
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
139
|
-
return (
|
|
140
|
-
<AlertDialogPrimitive.Title
|
|
141
|
-
data-slot="alert-dialog-title"
|
|
142
|
-
className={cn(
|
|
143
|
-
"text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
144
|
-
className
|
|
145
|
-
)}
|
|
146
|
-
{...props}
|
|
147
|
-
/>
|
|
148
|
-
)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function AlertDialogDescription({
|
|
152
|
-
className,
|
|
153
|
-
...props
|
|
154
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
155
|
-
return (
|
|
156
|
-
<AlertDialogPrimitive.Description
|
|
157
|
-
data-slot="alert-dialog-description"
|
|
158
|
-
className={cn(
|
|
159
|
-
"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
160
|
-
className
|
|
161
|
-
)}
|
|
162
|
-
{...props}
|
|
163
|
-
/>
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function AlertDialogAction({
|
|
168
|
-
className,
|
|
169
|
-
variant = "default",
|
|
170
|
-
size = "default",
|
|
171
|
-
...props
|
|
172
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &
|
|
173
|
-
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
|
|
174
|
-
return (
|
|
175
|
-
<Button variant={variant} size={size} asChild>
|
|
176
|
-
<AlertDialogPrimitive.Action
|
|
177
|
-
data-slot="alert-dialog-action"
|
|
178
|
-
className={cn(className)}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
</Button>
|
|
182
|
-
)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function AlertDialogCancel({
|
|
186
|
-
className,
|
|
187
|
-
variant = "outline",
|
|
188
|
-
size = "default",
|
|
189
|
-
...props
|
|
190
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &
|
|
191
|
-
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
|
|
192
|
-
return (
|
|
193
|
-
<Button variant={variant} size={size} asChild>
|
|
194
|
-
<AlertDialogPrimitive.Cancel
|
|
195
|
-
data-slot="alert-dialog-cancel"
|
|
196
|
-
className={cn(className)}
|
|
197
|
-
{...props}
|
|
198
|
-
/>
|
|
199
|
-
</Button>
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export {
|
|
204
|
-
AlertDialog,
|
|
205
|
-
AlertDialogAction,
|
|
206
|
-
AlertDialogCancel,
|
|
207
|
-
AlertDialogContent,
|
|
208
|
-
AlertDialogDescription,
|
|
209
|
-
AlertDialogFooter,
|
|
210
|
-
AlertDialogHeader,
|
|
211
|
-
AlertDialogMedia,
|
|
212
|
-
AlertDialogOverlay,
|
|
213
|
-
AlertDialogPortal,
|
|
214
|
-
AlertDialogTitle,
|
|
215
|
-
AlertDialogTrigger,
|
|
216
|
-
}
|