@tuturuuu/ui 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/.checksum +1 -0
  2. package/README.md +46 -0
  3. package/components.json +20 -0
  4. package/eslint.config.mjs +20 -0
  5. package/jsr.json +10 -0
  6. package/package.json +120 -0
  7. package/postcss.config.mjs +8 -0
  8. package/rollup.config.js +40 -0
  9. package/src/components/ui/accordion.tsx +70 -0
  10. package/src/components/ui/alert-dialog.tsx +156 -0
  11. package/src/components/ui/alert.tsx +58 -0
  12. package/src/components/ui/aspect-ratio.tsx +11 -0
  13. package/src/components/ui/avatar.tsx +52 -0
  14. package/src/components/ui/badge.tsx +49 -0
  15. package/src/components/ui/breadcrumb.tsx +108 -0
  16. package/src/components/ui/button.tsx +61 -0
  17. package/src/components/ui/calendar.tsx +212 -0
  18. package/src/components/ui/card.tsx +74 -0
  19. package/src/components/ui/carousel.tsx +240 -0
  20. package/src/components/ui/chart.tsx +365 -0
  21. package/src/components/ui/checkbox.tsx +31 -0
  22. package/src/components/ui/codeblock.tsx +161 -0
  23. package/src/components/ui/collapsible.tsx +33 -0
  24. package/src/components/ui/color-picker.tsx +143 -0
  25. package/src/components/ui/command.tsx +176 -0
  26. package/src/components/ui/context-menu.tsx +251 -0
  27. package/src/components/ui/custom/autosize-textarea.tsx +111 -0
  28. package/src/components/ui/custom/calendar/core.tsx +61 -0
  29. package/src/components/ui/custom/calendar/day-cell.tsx +74 -0
  30. package/src/components/ui/custom/calendar/month-header.tsx +59 -0
  31. package/src/components/ui/custom/calendar/month-view.tsx +110 -0
  32. package/src/components/ui/custom/calendar/utils.ts +76 -0
  33. package/src/components/ui/custom/calendar/year-calendar.tsx +64 -0
  34. package/src/components/ui/custom/calendar/year-view.tsx +58 -0
  35. package/src/components/ui/custom/combobox.tsx +197 -0
  36. package/src/components/ui/custom/common-footer.tsx +215 -0
  37. package/src/components/ui/custom/compared-date-range-picker.tsx +561 -0
  38. package/src/components/ui/custom/date-input.tsx +279 -0
  39. package/src/components/ui/custom/empty-card.tsx +39 -0
  40. package/src/components/ui/custom/feature-summary.tsx +135 -0
  41. package/src/components/ui/custom/file-uploader.tsx +349 -0
  42. package/src/components/ui/custom/input-field.tsx +29 -0
  43. package/src/components/ui/custom/loading-indicator.tsx +28 -0
  44. package/src/components/ui/custom/modifiable-dialog-trigger.tsx +83 -0
  45. package/src/components/ui/custom/month-picker.tsx +157 -0
  46. package/src/components/ui/custom/report-preview.tsx +175 -0
  47. package/src/components/ui/custom/search-bar.tsx +56 -0
  48. package/src/components/ui/custom/select-field.tsx +78 -0
  49. package/src/components/ui/custom/tables/data-table-column-header.tsx +72 -0
  50. package/src/components/ui/custom/tables/data-table-create-button.tsx +31 -0
  51. package/src/components/ui/custom/tables/data-table-faceted-filter.tsx +142 -0
  52. package/src/components/ui/custom/tables/data-table-pagination.tsx +243 -0
  53. package/src/components/ui/custom/tables/data-table-refresh-button.tsx +45 -0
  54. package/src/components/ui/custom/tables/data-table-toolbar.tsx +133 -0
  55. package/src/components/ui/custom/tables/data-table-view-options.tsx +112 -0
  56. package/src/components/ui/custom/tables/data-table.tsx +228 -0
  57. package/src/components/ui/custom/uploaded-files-card.tsx +50 -0
  58. package/src/components/ui/dialog.tsx +137 -0
  59. package/src/components/ui/drawer.tsx +131 -0
  60. package/src/components/ui/dropdown-menu.tsx +256 -0
  61. package/src/components/ui/form.tsx +167 -0
  62. package/src/components/ui/hover-card.tsx +41 -0
  63. package/src/components/ui/icons.tsx +506 -0
  64. package/src/components/ui/input-otp.tsx +78 -0
  65. package/src/components/ui/input.tsx +18 -0
  66. package/src/components/ui/label.tsx +23 -0
  67. package/src/components/ui/markdown.tsx +7 -0
  68. package/src/components/ui/menubar.tsx +275 -0
  69. package/src/components/ui/navigation-menu.tsx +169 -0
  70. package/src/components/ui/pagination.tsx +126 -0
  71. package/src/components/ui/popover.tsx +47 -0
  72. package/src/components/ui/progress.tsx +30 -0
  73. package/src/components/ui/radio-group.tsx +44 -0
  74. package/src/components/ui/resizable.tsx +55 -0
  75. package/src/components/ui/scroll-area.tsx +57 -0
  76. package/src/components/ui/select.tsx +180 -0
  77. package/src/components/ui/separator.tsx +27 -0
  78. package/src/components/ui/sheet.tsx +138 -0
  79. package/src/components/ui/sidebar.tsx +734 -0
  80. package/src/components/ui/skeleton.tsx +13 -0
  81. package/src/components/ui/slider.tsx +62 -0
  82. package/src/components/ui/sonner.tsx +29 -0
  83. package/src/components/ui/switch.tsx +30 -0
  84. package/src/components/ui/table.tsx +112 -0
  85. package/src/components/ui/tabs.tsx +68 -0
  86. package/src/components/ui/tag-input.tsx +141 -0
  87. package/src/components/ui/textarea.tsx +17 -0
  88. package/src/components/ui/time-picker-input.tsx +117 -0
  89. package/src/components/ui/time-picker-utils.tsx +146 -0
  90. package/src/components/ui/toast.tsx +128 -0
  91. package/src/components/ui/toaster.tsx +35 -0
  92. package/src/components/ui/toggle-group.tsx +72 -0
  93. package/src/components/ui/toggle.tsx +46 -0
  94. package/src/components/ui/tooltip.tsx +60 -0
  95. package/src/globals.css +252 -0
  96. package/src/hooks/use-callback-ref.ts +28 -0
  97. package/src/hooks/use-controllable-state.ts +68 -0
  98. package/src/hooks/use-copy-to-clipboard.ts +46 -0
  99. package/src/hooks/use-form.ts +23 -0
  100. package/src/hooks/use-forwarded-ref.ts +17 -0
  101. package/src/hooks/use-mobile.tsx +21 -0
  102. package/src/hooks/use-toast.ts +191 -0
  103. package/src/resolvers.ts +3 -0
  104. package/tsconfig.json +17 -0
@@ -0,0 +1,506 @@
1
+ 'use client';
2
+
3
+ import { cn } from '@tuturuuu/utils/format';
4
+ import * as React from 'react';
5
+
6
+ function IconNextChat({
7
+ className,
8
+ inverted,
9
+ ...props
10
+ }: React.ComponentProps<'svg'> & { inverted?: boolean }) {
11
+ const id = React.useId();
12
+
13
+ return (
14
+ <svg
15
+ viewBox="0 0 17 17"
16
+ fill="none"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ className={cn('h-4 w-4', className)}
19
+ {...props}
20
+ >
21
+ <defs>
22
+ <linearGradient
23
+ id={`gradient-${id}-1`}
24
+ x1="10.6889"
25
+ y1="10.3556"
26
+ x2="13.8445"
27
+ y2="14.2667"
28
+ gradientUnits="userSpaceOnUse"
29
+ >
30
+ <stop stopColor={inverted ? 'white' : 'black'} />
31
+ <stop
32
+ offset={1}
33
+ stopColor={inverted ? 'white' : 'black'}
34
+ stopOpacity={0}
35
+ />
36
+ </linearGradient>
37
+ <linearGradient
38
+ id={`gradient-${id}-2`}
39
+ x1="11.7555"
40
+ y1="4.8"
41
+ x2="11.7376"
42
+ y2="9.50002"
43
+ gradientUnits="userSpaceOnUse"
44
+ >
45
+ <stop stopColor={inverted ? 'white' : 'black'} />
46
+ <stop
47
+ offset={1}
48
+ stopColor={inverted ? 'white' : 'black'}
49
+ stopOpacity={0}
50
+ />
51
+ </linearGradient>
52
+ </defs>
53
+ <path
54
+ d="M1 16L2.58314 11.2506C1.83084 9.74642 1.63835 8.02363 2.04013 6.39052C2.4419 4.75741 3.41171 3.32057 4.776 2.33712C6.1403 1.35367 7.81003 0.887808 9.4864 1.02289C11.1628 1.15798 12.7364 1.8852 13.9256 3.07442C15.1148 4.26363 15.842 5.83723 15.9771 7.5136C16.1122 9.18997 15.6463 10.8597 14.6629 12.224C13.6794 13.5883 12.2426 14.5581 10.6095 14.9599C8.97637 15.3616 7.25358 15.1692 5.74942 14.4169L1 16Z"
55
+ fill={inverted ? 'black' : 'white'}
56
+ stroke={inverted ? 'black' : 'white'}
57
+ strokeWidth={2}
58
+ strokeLinecap="round"
59
+ strokeLinejoin="round"
60
+ />
61
+ <mask
62
+ id="mask0_91_2047"
63
+ style={{ maskType: 'alpha' }}
64
+ maskUnits="userSpaceOnUse"
65
+ x={1}
66
+ y={0}
67
+ width={16}
68
+ height={16}
69
+ >
70
+ <circle cx={9} cy={8} r={8} fill={inverted ? 'black' : 'white'} />
71
+ </mask>
72
+ <g mask="url(#mask0_91_2047)">
73
+ <circle cx={9} cy={8} r={8} fill={inverted ? 'black' : 'white'} />
74
+ <path
75
+ d="M14.2896 14.0018L7.146 4.8H5.80005V11.1973H6.87681V6.16743L13.4444 14.6529C13.7407 14.4545 14.0231 14.2369 14.2896 14.0018Z"
76
+ fill={`url(#gradient-${id}-1)`}
77
+ />
78
+ <rect
79
+ x="11.2222"
80
+ y="4.8"
81
+ width="1.06667"
82
+ height="6.4"
83
+ fill={`url(#gradient-${id}-2)`}
84
+ />
85
+ </g>
86
+ </svg>
87
+ );
88
+ }
89
+
90
+ function IconOpenAI({ className, ...props }: React.ComponentProps<'svg'>) {
91
+ return (
92
+ <svg
93
+ fill="currentColor"
94
+ viewBox="0 0 24 24"
95
+ role="img"
96
+ xmlns="http://www.w3.org/2000/svg"
97
+ className={cn('h-4 w-4', className)}
98
+ {...props}
99
+ >
100
+ <title>OpenAI icon</title>
101
+ <path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z" />
102
+ </svg>
103
+ );
104
+ }
105
+
106
+ function IconVercel({ className, ...props }: React.ComponentProps<'svg'>) {
107
+ return (
108
+ <svg
109
+ aria-label="Vercel logomark"
110
+ role="img"
111
+ viewBox="0 0 74 64"
112
+ className={cn('h-4 w-4', className)}
113
+ {...props}
114
+ >
115
+ <path
116
+ d="M37.5896 0.25L74.5396 64.25H0.639648L37.5896 0.25Z"
117
+ fill="currentColor"
118
+ ></path>
119
+ </svg>
120
+ );
121
+ }
122
+
123
+ function IconGitHub({ className, ...props }: React.ComponentProps<'svg'>) {
124
+ return (
125
+ <svg
126
+ role="img"
127
+ viewBox="0 0 24 24"
128
+ xmlns="http://www.w3.org/2000/svg"
129
+ fill="currentColor"
130
+ className={cn('h-4 w-4', className)}
131
+ {...props}
132
+ >
133
+ <title>GitHub</title>
134
+ <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
135
+ </svg>
136
+ );
137
+ }
138
+
139
+ function IconSeparator({ className, ...props }: React.ComponentProps<'svg'>) {
140
+ return (
141
+ <svg
142
+ fill="none"
143
+ shapeRendering="geometricPrecision"
144
+ stroke="currentColor"
145
+ strokeLinecap="round"
146
+ strokeLinejoin="round"
147
+ strokeWidth="1"
148
+ viewBox="0 0 24 24"
149
+ aria-hidden="true"
150
+ className={cn('h-4 w-4', className)}
151
+ {...props}
152
+ >
153
+ <path d="M16.88 3.549L7.12 20.451"></path>
154
+ </svg>
155
+ );
156
+ }
157
+
158
+ function IconArrowDown({ className, ...props }: React.ComponentProps<'svg'>) {
159
+ return (
160
+ <svg
161
+ xmlns="http://www.w3.org/2000/svg"
162
+ viewBox="0 0 256 256"
163
+ fill="currentColor"
164
+ className={cn('h-4 w-4', className)}
165
+ {...props}
166
+ >
167
+ <path d="m205.66 149.66-72 72a8 8 0 0 1-11.32 0l-72-72a8 8 0 0 1 11.32-11.32L120 196.69V40a8 8 0 0 1 16 0v156.69l58.34-58.35a8 8 0 0 1 11.32 11.32Z" />
168
+ </svg>
169
+ );
170
+ }
171
+
172
+ function IconArrowRight({ className, ...props }: React.ComponentProps<'svg'>) {
173
+ return (
174
+ <svg
175
+ xmlns="http://www.w3.org/2000/svg"
176
+ viewBox="0 0 256 256"
177
+ fill="currentColor"
178
+ className={cn('h-4 w-4', className)}
179
+ {...props}
180
+ >
181
+ <path d="m221.66 133.66-72 72a8 8 0 0 1-11.32-11.32L196.69 136H40a8 8 0 0 1 0-16h156.69l-58.35-58.34a8 8 0 0 1 11.32-11.32l72 72a8 8 0 0 1 0 11.32Z" />
182
+ </svg>
183
+ );
184
+ }
185
+
186
+ function IconUser({ className, ...props }: React.ComponentProps<'svg'>) {
187
+ return (
188
+ <svg
189
+ xmlns="http://www.w3.org/2000/svg"
190
+ viewBox="0 0 256 256"
191
+ fill="currentColor"
192
+ className={cn('h-4 w-4', className)}
193
+ {...props}
194
+ >
195
+ <path d="M230.92 212c-15.23-26.33-38.7-45.21-66.09-54.16a72 72 0 1 0-73.66 0c-27.39 8.94-50.86 27.82-66.09 54.16a8 8 0 1 0 13.85 8c18.84-32.56 52.14-52 89.07-52s70.23 19.44 89.07 52a8 8 0 1 0 13.85-8ZM72 96a56 56 0 1 1 56 56 56.06 56.06 0 0 1-56-56Z" />
196
+ </svg>
197
+ );
198
+ }
199
+
200
+ function IconPlus({ className, ...props }: React.ComponentProps<'svg'>) {
201
+ return (
202
+ <svg
203
+ xmlns="http://www.w3.org/2000/svg"
204
+ viewBox="0 0 256 256"
205
+ fill="currentColor"
206
+ className={cn('h-4 w-4', className)}
207
+ {...props}
208
+ >
209
+ <path d="M224 128a8 8 0 0 1-8 8h-80v80a8 8 0 0 1-16 0v-80H40a8 8 0 0 1 0-16h80V40a8 8 0 0 1 16 0v80h80a8 8 0 0 1 8 8Z" />
210
+ </svg>
211
+ );
212
+ }
213
+
214
+ function IconArrowElbow({ className, ...props }: React.ComponentProps<'svg'>) {
215
+ return (
216
+ <svg
217
+ xmlns="http://www.w3.org/2000/svg"
218
+ viewBox="0 0 256 256"
219
+ fill="currentColor"
220
+ className={cn('h-4 w-4', className)}
221
+ {...props}
222
+ >
223
+ <path d="M200 32v144a8 8 0 0 1-8 8H67.31l34.35 34.34a8 8 0 0 1-11.32 11.32l-48-48a8 8 0 0 1 0-11.32l48-48a8 8 0 0 1 11.32 11.32L67.31 168H184V32a8 8 0 0 1 16 0Z" />
224
+ </svg>
225
+ );
226
+ }
227
+
228
+ function IconSpinner({ className, ...props }: React.ComponentProps<'svg'>) {
229
+ return (
230
+ <svg
231
+ xmlns="http://www.w3.org/2000/svg"
232
+ viewBox="0 0 256 256"
233
+ fill="currentColor"
234
+ className={cn('h-4 w-4 animate-spin', className)}
235
+ {...props}
236
+ >
237
+ <path d="M232 128a104 104 0 0 1-208 0c0-41 23.81-78.36 60.66-95.27a8 8 0 0 1 6.68 14.54C60.15 61.59 40 93.27 40 128a88 88 0 0 0 176 0c0-34.73-20.15-66.41-51.34-80.73a8 8 0 0 1 6.68-14.54C208.19 49.64 232 87 232 128Z" />
238
+ </svg>
239
+ );
240
+ }
241
+
242
+ function IconMessage({ className, ...props }: React.ComponentProps<'svg'>) {
243
+ return (
244
+ <svg
245
+ xmlns="http://www.w3.org/2000/svg"
246
+ viewBox="0 0 256 256"
247
+ fill="currentColor"
248
+ className={cn('h-4 w-4', className)}
249
+ {...props}
250
+ >
251
+ <path d="M216 48H40a16 16 0 0 0-16 16v160a15.84 15.84 0 0 0 9.25 14.5A16.05 16.05 0 0 0 40 240a15.89 15.89 0 0 0 10.25-3.78.69.69 0 0 0 .13-.11L82.5 208H216a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16ZM40 224Zm176-32H82.5a16 16 0 0 0-10.3 3.75l-.12.11L40 224V64h176Z" />
252
+ </svg>
253
+ );
254
+ }
255
+
256
+ function IconTrash({ className, ...props }: React.ComponentProps<'svg'>) {
257
+ return (
258
+ <svg
259
+ xmlns="http://www.w3.org/2000/svg"
260
+ viewBox="0 0 256 256"
261
+ fill="currentColor"
262
+ className={cn('h-4 w-4', className)}
263
+ {...props}
264
+ >
265
+ <path d="M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16ZM96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Zm48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Z" />
266
+ </svg>
267
+ );
268
+ }
269
+
270
+ function IconRefresh({ className, ...props }: React.ComponentProps<'svg'>) {
271
+ return (
272
+ <svg
273
+ xmlns="http://www.w3.org/2000/svg"
274
+ viewBox="0 0 256 256"
275
+ fill="currentColor"
276
+ className={cn('h-4 w-4', className)}
277
+ {...props}
278
+ >
279
+ <path d="M197.67 186.37a8 8 0 0 1 0 11.29C196.58 198.73 170.82 224 128 224c-37.39 0-64.53-22.4-80-39.85V208a8 8 0 0 1-16 0v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16H55.44C67.76 183.35 93 208 128 208c36 0 58.14-21.46 58.36-21.68a8 8 0 0 1 11.31.05ZM216 40a8 8 0 0 0-8 8v23.85C192.53 54.4 165.39 32 128 32c-42.82 0-68.58 25.27-69.66 26.34a8 8 0 0 0 11.3 11.34C69.86 69.46 92 48 128 48c35 0 60.24 24.65 72.56 40H168a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8Z" />
280
+ </svg>
281
+ );
282
+ }
283
+
284
+ function IconStop({ className, ...props }: React.ComponentProps<'svg'>) {
285
+ return (
286
+ <svg
287
+ xmlns="http://www.w3.org/2000/svg"
288
+ viewBox="0 0 256 256"
289
+ fill="currentColor"
290
+ className={cn('h-4 w-4', className)}
291
+ {...props}
292
+ >
293
+ <path d="M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24Zm0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88Zm24-120h-48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8Zm-8 48h-32v-32h32Z" />
294
+ </svg>
295
+ );
296
+ }
297
+
298
+ function IconSidebar({ className, ...props }: React.ComponentProps<'svg'>) {
299
+ return (
300
+ <svg
301
+ xmlns="http://www.w3.org/2000/svg"
302
+ viewBox="0 0 256 256"
303
+ fill="currentColor"
304
+ className={cn('h-4 w-4', className)}
305
+ {...props}
306
+ >
307
+ <path d="M216 40H40a16 16 0 0 0-16 16v144a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16ZM40 56h40v144H40Zm176 144H96V56h120v144Z" />
308
+ </svg>
309
+ );
310
+ }
311
+
312
+ function IconMoon({ className, ...props }: React.ComponentProps<'svg'>) {
313
+ return (
314
+ <svg
315
+ xmlns="http://www.w3.org/2000/svg"
316
+ viewBox="0 0 256 256"
317
+ fill="currentColor"
318
+ className={cn('h-4 w-4', className)}
319
+ {...props}
320
+ >
321
+ <path d="M233.54 142.23a8 8 0 0 0-8-2 88.08 88.08 0 0 1-109.8-109.8 8 8 0 0 0-10-10 104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.09 103.09 0 0 0 62.52-20.88 104.84 104.84 0 0 0 37-52.91 8 8 0 0 0-1.98-7.98Zm-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104 106 106 0 0 0 14.92-1.06 89 89 0 0 1-26.02 31.4Z" />
322
+ </svg>
323
+ );
324
+ }
325
+
326
+ function IconSun({ className, ...props }: React.ComponentProps<'svg'>) {
327
+ return (
328
+ <svg
329
+ xmlns="http://www.w3.org/2000/svg"
330
+ viewBox="0 0 256 256"
331
+ fill="currentColor"
332
+ className={cn('h-4 w-4', className)}
333
+ {...props}
334
+ >
335
+ <path d="M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0Zm72 88a64 64 0 1 1-64-64 64.07 64.07 0 0 1 64 64Zm-16 0a48 48 0 1 0-48 48 48.05 48.05 0 0 0 48-48ZM58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32ZM192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72Zm5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8Zm80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8Zm112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16Z" />
336
+ </svg>
337
+ );
338
+ }
339
+
340
+ function IconCopy({ className, ...props }: React.ComponentProps<'svg'>) {
341
+ return (
342
+ <svg
343
+ xmlns="http://www.w3.org/2000/svg"
344
+ viewBox="0 0 256 256"
345
+ fill="currentColor"
346
+ className={cn('h-4 w-4', className)}
347
+ {...props}
348
+ >
349
+ <path d="M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8Zm-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z" />
350
+ </svg>
351
+ );
352
+ }
353
+
354
+ function IconCheck({ className, ...props }: React.ComponentProps<'svg'>) {
355
+ return (
356
+ <svg
357
+ xmlns="http://www.w3.org/2000/svg"
358
+ viewBox="0 0 256 256"
359
+ fill="currentColor"
360
+ className={cn('h-4 w-4', className)}
361
+ {...props}
362
+ >
363
+ <path d="m229.66 77.66-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69 218.34 66.34a8 8 0 0 1 11.32 11.32Z" />
364
+ </svg>
365
+ );
366
+ }
367
+
368
+ function IconDownload({ className, ...props }: React.ComponentProps<'svg'>) {
369
+ return (
370
+ <svg
371
+ xmlns="http://www.w3.org/2000/svg"
372
+ viewBox="0 0 256 256"
373
+ fill="currentColor"
374
+ className={cn('h-4 w-4', className)}
375
+ {...props}
376
+ >
377
+ <path d="M224 152v56a16 16 0 0 1-16 16H48a16 16 0 0 1-16-16v-56a8 8 0 0 1 16 0v56h160v-56a8 8 0 0 1 16 0Zm-101.66 5.66a8 8 0 0 0 11.32 0l40-40a8 8 0 0 0-11.32-11.32L136 132.69V40a8 8 0 0 0-16 0v92.69l-26.34-26.35a8 8 0 0 0-11.32 11.32Z" />
378
+ </svg>
379
+ );
380
+ }
381
+
382
+ function IconClose({ className, ...props }: React.ComponentProps<'svg'>) {
383
+ return (
384
+ <svg
385
+ xmlns="http://www.w3.org/2000/svg"
386
+ viewBox="0 0 256 256"
387
+ fill="currentColor"
388
+ className={cn('h-4 w-4', className)}
389
+ {...props}
390
+ >
391
+ <path d="M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128 50.34 61.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z" />
392
+ </svg>
393
+ );
394
+ }
395
+
396
+ function IconEdit({ className, ...props }: React.ComponentProps<'svg'>) {
397
+ return (
398
+ <svg
399
+ xmlns="http://www.w3.org/2000/svg"
400
+ fill="none"
401
+ viewBox="0 0 24 24"
402
+ strokeWidth={1.5}
403
+ stroke="currentColor"
404
+ className={cn('h-4 w-4', className)}
405
+ {...props}
406
+ >
407
+ <path
408
+ strokeLinecap="round"
409
+ strokeLinejoin="round"
410
+ d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"
411
+ />
412
+ </svg>
413
+ );
414
+ }
415
+
416
+ function IconShare({ className, ...props }: React.ComponentProps<'svg'>) {
417
+ return (
418
+ <svg
419
+ xmlns="http://www.w3.org/2000/svg"
420
+ fill="currentColor"
421
+ className={cn('h-4 w-4', className)}
422
+ viewBox="0 0 256 256"
423
+ {...props}
424
+ >
425
+ <path d="m237.66 106.35-80-80A8 8 0 0 0 144 32v40.35c-25.94 2.22-54.59 14.92-78.16 34.91-28.38 24.08-46.05 55.11-49.76 87.37a12 12 0 0 0 20.68 9.58c11-11.71 50.14-48.74 107.24-52V192a8 8 0 0 0 13.66 5.65l80-80a8 8 0 0 0 0-11.3ZM160 172.69V144a8 8 0 0 0-8-8c-28.08 0-55.43 7.33-81.29 21.8a196.17 196.17 0 0 0-36.57 26.52c5.8-23.84 20.42-46.51 42.05-64.86C99.41 99.77 127.75 88 152 88a8 8 0 0 0 8-8V51.32L220.69 112Z" />
426
+ </svg>
427
+ );
428
+ }
429
+
430
+ function IconUsers({ className, ...props }: React.ComponentProps<'svg'>) {
431
+ return (
432
+ <svg
433
+ xmlns="http://www.w3.org/2000/svg"
434
+ fill="currentColor"
435
+ className={cn('h-4 w-4', className)}
436
+ viewBox="0 0 256 256"
437
+ {...props}
438
+ >
439
+ <path d="M117.25 157.92a60 60 0 1 0-66.5 0 95.83 95.83 0 0 0-47.22 37.71 8 8 0 1 0 13.4 8.74 80 80 0 0 1 134.14 0 8 8 0 0 0 13.4-8.74 95.83 95.83 0 0 0-47.22-37.71ZM40 108a44 44 0 1 1 44 44 44.05 44.05 0 0 1-44-44Zm210.14 98.7a8 8 0 0 1-11.07-2.33A79.83 79.83 0 0 0 172 168a8 8 0 0 1 0-16 44 44 0 1 0-16.34-84.87 8 8 0 1 1-5.94-14.85 60 60 0 0 1 55.53 105.64 95.83 95.83 0 0 1 47.22 37.71 8 8 0 0 1-2.33 11.07Z" />
440
+ </svg>
441
+ );
442
+ }
443
+
444
+ function IconExternalLink({
445
+ className,
446
+ ...props
447
+ }: React.ComponentProps<'svg'>) {
448
+ return (
449
+ <svg
450
+ xmlns="http://www.w3.org/2000/svg"
451
+ fill="currentColor"
452
+ className={cn('h-4 w-4', className)}
453
+ viewBox="0 0 256 256"
454
+ {...props}
455
+ >
456
+ <path d="M224 104a8 8 0 0 1-16 0V59.32l-66.33 66.34a8 8 0 0 1-11.32-11.32L196.68 48H152a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8Zm-40 24a8 8 0 0 0-8 8v72H48V80h72a8 8 0 0 0 0-16H48a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-72a8 8 0 0 0-8-8Z" />
457
+ </svg>
458
+ );
459
+ }
460
+
461
+ function IconChevronUpDown({
462
+ className,
463
+ ...props
464
+ }: React.ComponentProps<'svg'>) {
465
+ return (
466
+ <svg
467
+ xmlns="http://www.w3.org/2000/svg"
468
+ fill="currentColor"
469
+ className={cn('h-4 w-4', className)}
470
+ viewBox="0 0 256 256"
471
+ {...props}
472
+ >
473
+ <path d="M181.66 170.34a8 8 0 0 1 0 11.32l-48 48a8 8 0 0 1-11.32 0l-48-48a8 8 0 0 1 11.32-11.32L128 212.69l42.34-42.35a8 8 0 0 1 11.32 0Zm-96-84.68L128 43.31l42.34 42.35a8 8 0 0 0 11.32-11.32l-48-48a8 8 0 0 0-11.32 0l-48 48a8 8 0 0 0 11.32 11.32Z" />
474
+ </svg>
475
+ );
476
+ }
477
+
478
+ export {
479
+ IconArrowDown,
480
+ IconArrowElbow,
481
+ IconArrowRight,
482
+ IconCheck,
483
+ IconChevronUpDown,
484
+ IconClose,
485
+ IconCopy,
486
+ IconDownload,
487
+ IconEdit,
488
+ IconExternalLink,
489
+ IconGitHub,
490
+ IconMessage,
491
+ IconMoon,
492
+ IconNextChat,
493
+ IconOpenAI,
494
+ IconPlus,
495
+ IconRefresh,
496
+ IconSeparator,
497
+ IconShare,
498
+ IconSidebar,
499
+ IconSpinner,
500
+ IconStop,
501
+ IconSun,
502
+ IconTrash,
503
+ IconUser,
504
+ IconUsers,
505
+ IconVercel,
506
+ };
@@ -0,0 +1,78 @@
1
+ 'use client';
2
+
3
+ import { cn } from '@tuturuuu/utils/format';
4
+ import { OTPInput, OTPInputContext, type SlotProps } from 'input-otp';
5
+ import { MinusIcon } from 'lucide-react';
6
+ import * as React from 'react';
7
+
8
+ function InputOTP({
9
+ className,
10
+ containerClassName,
11
+ ...props
12
+ }: React.ComponentProps<typeof OTPInput> & {
13
+ containerClassName?: string;
14
+ }) {
15
+ return (
16
+ <OTPInput
17
+ data-slot="input-otp"
18
+ containerClassName={cn(
19
+ 'flex items-center gap-2 has-disabled:opacity-50',
20
+ containerClassName
21
+ )}
22
+ className={cn('disabled:cursor-not-allowed', className)}
23
+ {...props}
24
+ />
25
+ );
26
+ }
27
+
28
+ function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>) {
29
+ return (
30
+ <div
31
+ data-slot="input-otp-group"
32
+ className={cn('flex items-center', className)}
33
+ {...props}
34
+ />
35
+ );
36
+ }
37
+
38
+ function InputOTPSlot({
39
+ index,
40
+ className,
41
+ ...props
42
+ }: React.ComponentProps<'div'> & {
43
+ index: number;
44
+ }) {
45
+ const inputOTPContext = React.useContext(OTPInputContext);
46
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[
47
+ index
48
+ ] as SlotProps;
49
+
50
+ return (
51
+ <div
52
+ data-slot="input-otp-slot"
53
+ data-active={isActive}
54
+ className={cn(
55
+ 'relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs ring-ring/10 outline-ring/50 transition-all first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-4 data-[active=true]:outline-1 dark:ring-ring/20 dark:outline-ring/40',
56
+ className
57
+ )}
58
+ {...props}
59
+ >
60
+ {char}
61
+ {hasFakeCaret && (
62
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
63
+ <div className="animate-caret-blink h-4 w-px bg-foreground duration-1000" />
64
+ </div>
65
+ )}
66
+ </div>
67
+ );
68
+ }
69
+
70
+ function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>) {
71
+ return (
72
+ <div data-slot="input-otp-separator" role="separator" {...props}>
73
+ <MinusIcon />
74
+ </div>
75
+ );
76
+ }
77
+
78
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,18 @@
1
+ import { cn } from '@tuturuuu/utils/format';
2
+ import * as React from 'react';
3
+
4
+ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
5
+ return (
6
+ <input
7
+ type={type}
8
+ data-slot="input"
9
+ className={cn(
10
+ 'flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs ring-ring/10 outline-ring/50 transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:ring-4 focus-visible:outline-1 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive/60 aria-invalid:ring-destructive/20 aria-invalid:outline-destructive/60 aria-invalid:focus-visible:ring-[3px] aria-invalid:focus-visible:outline-none md:text-sm dark:ring-ring/20 dark:outline-ring/40 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 dark:aria-invalid:ring-destructive/50 dark:aria-invalid:outline-destructive dark:aria-invalid:focus-visible:ring-4',
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ );
16
+ }
17
+
18
+ export { Input };
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import { cn } from '@tuturuuu/utils/format';
5
+ import * as React from 'react';
6
+
7
+ function Label({
8
+ className,
9
+ ...props
10
+ }: React.ComponentProps<typeof LabelPrimitive.Root>) {
11
+ return (
12
+ <LabelPrimitive.Root
13
+ data-slot="label"
14
+ className={cn(
15
+ 'text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ );
21
+ }
22
+
23
+ export { Label };
@@ -0,0 +1,7 @@
1
+ import { FC, memo } from 'react';
2
+ import ReactMarkdown, { Options } from 'react-markdown';
3
+
4
+ export const MemoizedReactMarkdown: FC<Options> = memo(
5
+ ReactMarkdown,
6
+ (prevProps, nextProps) => prevProps.children === nextProps.children
7
+ );