@karakuri-ui/react 0.2.2 → 0.2.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 (238) hide show
  1. package/README.md +9 -0
  2. package/dist/components/ui/accordion.d.mts +49 -0
  3. package/dist/components/ui/accordion.d.ts +49 -0
  4. package/dist/components/ui/accordion.js +220 -0
  5. package/dist/components/ui/accordion.js.map +1 -0
  6. package/dist/components/ui/accordion.mjs +181 -0
  7. package/dist/components/ui/accordion.mjs.map +1 -0
  8. package/dist/components/ui/alert.d.mts +47 -0
  9. package/dist/components/ui/alert.d.ts +47 -0
  10. package/dist/components/ui/alert.js +223 -0
  11. package/dist/components/ui/alert.js.map +1 -0
  12. package/dist/components/ui/alert.mjs +185 -0
  13. package/dist/components/ui/alert.mjs.map +1 -0
  14. package/dist/components/ui/avatar.d.mts +232 -0
  15. package/dist/components/ui/avatar.d.ts +232 -0
  16. package/dist/components/ui/avatar.js +250 -0
  17. package/dist/components/ui/avatar.js.map +1 -0
  18. package/dist/components/ui/avatar.mjs +209 -0
  19. package/dist/components/ui/avatar.mjs.map +1 -0
  20. package/dist/components/ui/badge.d.mts +31 -0
  21. package/dist/components/ui/badge.d.ts +31 -0
  22. package/dist/components/ui/badge.js +205 -0
  23. package/dist/components/ui/badge.js.map +1 -0
  24. package/dist/components/ui/badge.mjs +170 -0
  25. package/dist/components/ui/badge.mjs.map +1 -0
  26. package/dist/components/ui/breadcrumb.d.mts +57 -0
  27. package/dist/components/ui/breadcrumb.d.ts +57 -0
  28. package/dist/components/ui/breadcrumb.js +209 -0
  29. package/dist/components/ui/breadcrumb.js.map +1 -0
  30. package/dist/components/ui/breadcrumb.mjs +168 -0
  31. package/dist/components/ui/breadcrumb.mjs.map +1 -0
  32. package/dist/components/ui/button-group.d.mts +22 -0
  33. package/dist/components/ui/button-group.d.ts +22 -0
  34. package/dist/components/ui/button-group.js +107 -0
  35. package/dist/components/ui/button-group.js.map +1 -0
  36. package/dist/components/ui/button-group.mjs +72 -0
  37. package/dist/components/ui/button-group.mjs.map +1 -0
  38. package/dist/components/ui/button.d.mts +31 -0
  39. package/dist/components/ui/button.d.ts +31 -0
  40. package/dist/components/ui/button.js +176 -0
  41. package/dist/components/ui/button.js.map +1 -0
  42. package/dist/components/ui/button.mjs +141 -0
  43. package/dist/components/ui/button.mjs.map +1 -0
  44. package/dist/components/ui/card.d.mts +77 -0
  45. package/dist/components/ui/card.d.ts +77 -0
  46. package/dist/components/ui/card.js +370 -0
  47. package/dist/components/ui/card.js.map +1 -0
  48. package/dist/components/ui/card.mjs +328 -0
  49. package/dist/components/ui/card.mjs.map +1 -0
  50. package/dist/{chart.js → components/ui/chart.js} +29 -39
  51. package/dist/components/ui/chart.js.map +1 -0
  52. package/dist/{chart.mjs → components/ui/chart.mjs} +21 -31
  53. package/dist/components/ui/chart.mjs.map +1 -0
  54. package/dist/components/ui/checkbox.d.mts +24 -0
  55. package/dist/components/ui/checkbox.d.ts +24 -0
  56. package/dist/components/ui/checkbox.js +173 -0
  57. package/dist/components/ui/checkbox.js.map +1 -0
  58. package/dist/components/ui/checkbox.mjs +138 -0
  59. package/dist/components/ui/checkbox.mjs.map +1 -0
  60. package/dist/components/ui/divider.d.mts +27 -0
  61. package/dist/components/ui/divider.d.ts +27 -0
  62. package/dist/components/ui/divider.js +147 -0
  63. package/dist/components/ui/divider.js.map +1 -0
  64. package/dist/components/ui/divider.mjs +112 -0
  65. package/dist/components/ui/divider.mjs.map +1 -0
  66. package/dist/components/ui/drawer.d.mts +51 -0
  67. package/dist/components/ui/drawer.d.ts +51 -0
  68. package/dist/components/ui/drawer.js +225 -0
  69. package/dist/components/ui/drawer.js.map +1 -0
  70. package/dist/components/ui/drawer.mjs +178 -0
  71. package/dist/components/ui/drawer.mjs.map +1 -0
  72. package/dist/components/ui/dropdown.d.mts +59 -0
  73. package/dist/components/ui/dropdown.d.ts +59 -0
  74. package/dist/components/ui/dropdown.js +310 -0
  75. package/dist/components/ui/dropdown.js.map +1 -0
  76. package/dist/components/ui/dropdown.mjs +263 -0
  77. package/dist/components/ui/dropdown.mjs.map +1 -0
  78. package/dist/components/ui/field.d.mts +33 -0
  79. package/dist/components/ui/field.d.ts +33 -0
  80. package/dist/components/ui/field.js +146 -0
  81. package/dist/components/ui/field.js.map +1 -0
  82. package/dist/components/ui/field.mjs +108 -0
  83. package/dist/components/ui/field.mjs.map +1 -0
  84. package/dist/components/ui/icon-button.d.mts +20 -0
  85. package/dist/components/ui/icon-button.d.ts +20 -0
  86. package/dist/components/ui/icon-button.js +147 -0
  87. package/dist/components/ui/icon-button.js.map +1 -0
  88. package/dist/components/ui/icon-button.mjs +112 -0
  89. package/dist/components/ui/icon-button.mjs.map +1 -0
  90. package/dist/components/ui/index.d.mts +55 -0
  91. package/dist/components/ui/index.d.ts +55 -0
  92. package/dist/components/ui/index.js +476 -0
  93. package/dist/components/ui/index.js.map +1 -0
  94. package/dist/components/ui/index.mjs +246 -0
  95. package/dist/components/ui/index.mjs.map +1 -0
  96. package/dist/components/ui/input.d.mts +20 -0
  97. package/dist/components/ui/input.d.ts +20 -0
  98. package/dist/components/ui/input.js +250 -0
  99. package/dist/components/ui/input.js.map +1 -0
  100. package/dist/components/ui/input.mjs +215 -0
  101. package/dist/components/ui/input.mjs.map +1 -0
  102. package/dist/components/ui/metric-card.d.mts +53 -0
  103. package/dist/components/ui/metric-card.d.ts +53 -0
  104. package/dist/components/ui/metric-card.js +258 -0
  105. package/dist/components/ui/metric-card.js.map +1 -0
  106. package/dist/components/ui/metric-card.mjs +217 -0
  107. package/dist/components/ui/metric-card.mjs.map +1 -0
  108. package/dist/components/ui/modal.d.mts +77 -0
  109. package/dist/components/ui/modal.d.ts +77 -0
  110. package/dist/components/ui/modal.js +396 -0
  111. package/dist/components/ui/modal.js.map +1 -0
  112. package/dist/components/ui/modal.mjs +338 -0
  113. package/dist/components/ui/modal.mjs.map +1 -0
  114. package/dist/components/ui/navigation-menu.d.mts +139 -0
  115. package/dist/components/ui/navigation-menu.d.ts +139 -0
  116. package/dist/components/ui/navigation-menu.js +531 -0
  117. package/dist/components/ui/navigation-menu.js.map +1 -0
  118. package/dist/components/ui/navigation-menu.mjs +488 -0
  119. package/dist/components/ui/navigation-menu.mjs.map +1 -0
  120. package/dist/components/ui/pagination.d.mts +130 -0
  121. package/dist/components/ui/pagination.d.ts +130 -0
  122. package/dist/components/ui/pagination.js +495 -0
  123. package/dist/components/ui/pagination.js.map +1 -0
  124. package/dist/components/ui/pagination.mjs +449 -0
  125. package/dist/components/ui/pagination.mjs.map +1 -0
  126. package/dist/components/ui/popover.d.mts +41 -0
  127. package/dist/components/ui/popover.d.ts +41 -0
  128. package/dist/components/ui/popover.js +175 -0
  129. package/dist/components/ui/popover.js.map +1 -0
  130. package/dist/components/ui/popover.mjs +133 -0
  131. package/dist/components/ui/popover.mjs.map +1 -0
  132. package/dist/components/ui/progress.d.mts +35 -0
  133. package/dist/components/ui/progress.d.ts +35 -0
  134. package/dist/components/ui/progress.js +194 -0
  135. package/dist/components/ui/progress.js.map +1 -0
  136. package/dist/components/ui/progress.mjs +159 -0
  137. package/dist/components/ui/progress.mjs.map +1 -0
  138. package/dist/components/ui/radio-group.d.mts +40 -0
  139. package/dist/components/ui/radio-group.d.ts +40 -0
  140. package/dist/components/ui/radio-group.js +177 -0
  141. package/dist/components/ui/radio-group.js.map +1 -0
  142. package/dist/components/ui/radio-group.mjs +140 -0
  143. package/dist/components/ui/radio-group.mjs.map +1 -0
  144. package/dist/components/ui/segmented.d.mts +30 -0
  145. package/dist/components/ui/segmented.d.ts +30 -0
  146. package/dist/components/ui/segmented.js +241 -0
  147. package/dist/components/ui/segmented.js.map +1 -0
  148. package/dist/components/ui/segmented.mjs +204 -0
  149. package/dist/components/ui/segmented.mjs.map +1 -0
  150. package/dist/components/ui/select.d.mts +31 -0
  151. package/dist/components/ui/select.d.ts +31 -0
  152. package/dist/components/ui/select.js +317 -0
  153. package/dist/components/ui/select.js.map +1 -0
  154. package/dist/components/ui/select.mjs +276 -0
  155. package/dist/components/ui/select.mjs.map +1 -0
  156. package/dist/components/ui/skeleton.d.mts +26 -0
  157. package/dist/components/ui/skeleton.d.ts +26 -0
  158. package/dist/components/ui/skeleton.js +144 -0
  159. package/dist/components/ui/skeleton.js.map +1 -0
  160. package/dist/components/ui/skeleton.mjs +109 -0
  161. package/dist/components/ui/skeleton.mjs.map +1 -0
  162. package/dist/components/ui/slider.d.mts +38 -0
  163. package/dist/components/ui/slider.d.ts +38 -0
  164. package/dist/components/ui/slider.js +180 -0
  165. package/dist/components/ui/slider.js.map +1 -0
  166. package/dist/components/ui/slider.mjs +145 -0
  167. package/dist/components/ui/slider.mjs.map +1 -0
  168. package/dist/components/ui/spinner.d.mts +23 -0
  169. package/dist/components/ui/spinner.d.ts +23 -0
  170. package/dist/components/ui/spinner.js +471 -0
  171. package/dist/components/ui/spinner.js.map +1 -0
  172. package/dist/components/ui/spinner.mjs +436 -0
  173. package/dist/components/ui/spinner.mjs.map +1 -0
  174. package/dist/components/ui/switch.d.mts +22 -0
  175. package/dist/components/ui/switch.d.ts +22 -0
  176. package/dist/components/ui/switch.js +173 -0
  177. package/dist/components/ui/switch.js.map +1 -0
  178. package/dist/components/ui/switch.mjs +138 -0
  179. package/dist/components/ui/switch.mjs.map +1 -0
  180. package/dist/components/ui/table.d.mts +74 -0
  181. package/dist/components/ui/table.d.ts +74 -0
  182. package/dist/components/ui/table.js +240 -0
  183. package/dist/components/ui/table.js.map +1 -0
  184. package/dist/components/ui/table.mjs +199 -0
  185. package/dist/components/ui/table.mjs.map +1 -0
  186. package/dist/components/ui/tabs.d.mts +40 -0
  187. package/dist/components/ui/tabs.d.ts +40 -0
  188. package/dist/components/ui/tabs.js +238 -0
  189. package/dist/components/ui/tabs.js.map +1 -0
  190. package/dist/components/ui/tabs.mjs +199 -0
  191. package/dist/components/ui/tabs.mjs.map +1 -0
  192. package/dist/components/ui/textarea.d.mts +19 -0
  193. package/dist/components/ui/textarea.d.ts +19 -0
  194. package/dist/components/ui/textarea.js +181 -0
  195. package/dist/components/ui/textarea.js.map +1 -0
  196. package/dist/components/ui/textarea.mjs +146 -0
  197. package/dist/components/ui/textarea.mjs.map +1 -0
  198. package/dist/components/ui/toast.d.mts +93 -0
  199. package/dist/components/ui/toast.d.ts +93 -0
  200. package/dist/components/ui/toast.js +429 -0
  201. package/dist/components/ui/toast.js.map +1 -0
  202. package/dist/components/ui/toast.mjs +393 -0
  203. package/dist/components/ui/toast.mjs.map +1 -0
  204. package/dist/components/ui/toggle-group.d.mts +47 -0
  205. package/dist/components/ui/toggle-group.d.ts +47 -0
  206. package/dist/components/ui/toggle-group.js +186 -0
  207. package/dist/components/ui/toggle-group.js.map +1 -0
  208. package/dist/components/ui/toggle-group.mjs +149 -0
  209. package/dist/components/ui/toggle-group.mjs.map +1 -0
  210. package/dist/components/ui/toggle.d.mts +19 -0
  211. package/dist/components/ui/toggle.d.ts +19 -0
  212. package/dist/components/ui/toggle.js +194 -0
  213. package/dist/components/ui/toggle.js.map +1 -0
  214. package/dist/components/ui/toggle.mjs +159 -0
  215. package/dist/components/ui/toggle.mjs.map +1 -0
  216. package/dist/components/ui/tooltip.d.mts +37 -0
  217. package/dist/components/ui/tooltip.d.ts +37 -0
  218. package/dist/components/ui/tooltip.js +137 -0
  219. package/dist/components/ui/tooltip.js.map +1 -0
  220. package/dist/components/ui/tooltip.mjs +96 -0
  221. package/dist/components/ui/tooltip.mjs.map +1 -0
  222. package/dist/lib/utils.d.mts +10 -0
  223. package/dist/lib/utils.d.ts +10 -0
  224. package/dist/lib/utils.js +33 -0
  225. package/dist/lib/utils.js.map +1 -0
  226. package/dist/lib/utils.mjs +9 -0
  227. package/dist/lib/utils.mjs.map +1 -0
  228. package/package.json +11 -11
  229. package/dist/chart.js.map +0 -1
  230. package/dist/chart.mjs.map +0 -1
  231. package/dist/index.d.mts +0 -1636
  232. package/dist/index.d.ts +0 -1636
  233. package/dist/index.js +0 -7291
  234. package/dist/index.js.map +0 -1
  235. package/dist/index.mjs +0 -7048
  236. package/dist/index.mjs.map +0 -1
  237. /package/dist/{chart.d.mts → components/ui/chart.d.mts} +0 -0
  238. /package/dist/{chart.d.ts → components/ui/chart.d.ts} +0 -0
@@ -0,0 +1,232 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const avatarVariants: (props?: ({
7
+ size?: "default" | "sm" | "lg" | "xl" | "2xl" | "xs" | null | undefined;
8
+ shape?: "circle" | "square" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ declare const avatarColors: readonly [{
11
+ readonly vivid: {
12
+ readonly bg: "bg-[#DC2626]";
13
+ readonly text: "text-white";
14
+ };
15
+ readonly soft: {
16
+ readonly bg: "bg-[#FEE2E2]";
17
+ readonly text: "text-[#DC2626]";
18
+ };
19
+ }, {
20
+ readonly vivid: {
21
+ readonly bg: "bg-[#EA580C]";
22
+ readonly text: "text-white";
23
+ };
24
+ readonly soft: {
25
+ readonly bg: "bg-[#FFEDD5]";
26
+ readonly text: "text-[#EA580C]";
27
+ };
28
+ }, {
29
+ readonly vivid: {
30
+ readonly bg: "bg-[#D97706]";
31
+ readonly text: "text-white";
32
+ };
33
+ readonly soft: {
34
+ readonly bg: "bg-[#FEF3C7]";
35
+ readonly text: "text-[#B45309]";
36
+ };
37
+ }, {
38
+ readonly vivid: {
39
+ readonly bg: "bg-[#CA8A04]";
40
+ readonly text: "text-white";
41
+ };
42
+ readonly soft: {
43
+ readonly bg: "bg-[#FEF9C3]";
44
+ readonly text: "text-[#A16207]";
45
+ };
46
+ }, {
47
+ readonly vivid: {
48
+ readonly bg: "bg-[#059669]";
49
+ readonly text: "text-white";
50
+ };
51
+ readonly soft: {
52
+ readonly bg: "bg-[#D1FAE5]";
53
+ readonly text: "text-[#047857]";
54
+ };
55
+ }, {
56
+ readonly vivid: {
57
+ readonly bg: "bg-[#0D9488]";
58
+ readonly text: "text-white";
59
+ };
60
+ readonly soft: {
61
+ readonly bg: "bg-[#CCFBF1]";
62
+ readonly text: "text-[#0F766E]";
63
+ };
64
+ }, {
65
+ readonly vivid: {
66
+ readonly bg: "bg-[#0891B2]";
67
+ readonly text: "text-white";
68
+ };
69
+ readonly soft: {
70
+ readonly bg: "bg-[#CFFAFE]";
71
+ readonly text: "text-[#0E7490]";
72
+ };
73
+ }, {
74
+ readonly vivid: {
75
+ readonly bg: "bg-[#2563EB]";
76
+ readonly text: "text-white";
77
+ };
78
+ readonly soft: {
79
+ readonly bg: "bg-[#DBEAFE]";
80
+ readonly text: "text-[#1D4ED8]";
81
+ };
82
+ }, {
83
+ readonly vivid: {
84
+ readonly bg: "bg-[#4F46E5]";
85
+ readonly text: "text-white";
86
+ };
87
+ readonly soft: {
88
+ readonly bg: "bg-[#E0E7FF]";
89
+ readonly text: "text-[#4338CA]";
90
+ };
91
+ }, {
92
+ readonly vivid: {
93
+ readonly bg: "bg-[#7C3AED]";
94
+ readonly text: "text-white";
95
+ };
96
+ readonly soft: {
97
+ readonly bg: "bg-[#EDE9FE]";
98
+ readonly text: "text-[#6D28D9]";
99
+ };
100
+ }, {
101
+ readonly vivid: {
102
+ readonly bg: "bg-[#9333EA]";
103
+ readonly text: "text-white";
104
+ };
105
+ readonly soft: {
106
+ readonly bg: "bg-[#F3E8FF]";
107
+ readonly text: "text-[#7E22CE]";
108
+ };
109
+ }, {
110
+ readonly vivid: {
111
+ readonly bg: "bg-[#DB2777]";
112
+ readonly text: "text-white";
113
+ };
114
+ readonly soft: {
115
+ readonly bg: "bg-[#FCE7F3]";
116
+ readonly text: "text-[#BE185D]";
117
+ };
118
+ }];
119
+ type AvatarColorVariant = 'vivid' | 'soft';
120
+ /** Extract initials from a name string (e.g. "John Doe" → "JD", "김민수" → "김민") */
121
+ declare function getAvatarInitials(name: string, maxChars?: number): string;
122
+ /** Hash a name string to a deterministic avatar color pair (djb2 xor variant) */
123
+ declare function getAvatarColor(name: string, variant?: AvatarColorVariant): {
124
+ readonly bg: "bg-[#DC2626]";
125
+ readonly text: "text-white";
126
+ } | {
127
+ readonly bg: "bg-[#FEE2E2]";
128
+ readonly text: "text-[#DC2626]";
129
+ } | {
130
+ readonly bg: "bg-[#EA580C]";
131
+ readonly text: "text-white";
132
+ } | {
133
+ readonly bg: "bg-[#FFEDD5]";
134
+ readonly text: "text-[#EA580C]";
135
+ } | {
136
+ readonly bg: "bg-[#D97706]";
137
+ readonly text: "text-white";
138
+ } | {
139
+ readonly bg: "bg-[#FEF3C7]";
140
+ readonly text: "text-[#B45309]";
141
+ } | {
142
+ readonly bg: "bg-[#CA8A04]";
143
+ readonly text: "text-white";
144
+ } | {
145
+ readonly bg: "bg-[#FEF9C3]";
146
+ readonly text: "text-[#A16207]";
147
+ } | {
148
+ readonly bg: "bg-[#059669]";
149
+ readonly text: "text-white";
150
+ } | {
151
+ readonly bg: "bg-[#D1FAE5]";
152
+ readonly text: "text-[#047857]";
153
+ } | {
154
+ readonly bg: "bg-[#0D9488]";
155
+ readonly text: "text-white";
156
+ } | {
157
+ readonly bg: "bg-[#CCFBF1]";
158
+ readonly text: "text-[#0F766E]";
159
+ } | {
160
+ readonly bg: "bg-[#0891B2]";
161
+ readonly text: "text-white";
162
+ } | {
163
+ readonly bg: "bg-[#CFFAFE]";
164
+ readonly text: "text-[#0E7490]";
165
+ } | {
166
+ readonly bg: "bg-[#2563EB]";
167
+ readonly text: "text-white";
168
+ } | {
169
+ readonly bg: "bg-[#DBEAFE]";
170
+ readonly text: "text-[#1D4ED8]";
171
+ } | {
172
+ readonly bg: "bg-[#4F46E5]";
173
+ readonly text: "text-white";
174
+ } | {
175
+ readonly bg: "bg-[#E0E7FF]";
176
+ readonly text: "text-[#4338CA]";
177
+ } | {
178
+ readonly bg: "bg-[#7C3AED]";
179
+ readonly text: "text-white";
180
+ } | {
181
+ readonly bg: "bg-[#EDE9FE]";
182
+ readonly text: "text-[#6D28D9]";
183
+ } | {
184
+ readonly bg: "bg-[#9333EA]";
185
+ readonly text: "text-white";
186
+ } | {
187
+ readonly bg: "bg-[#F3E8FF]";
188
+ readonly text: "text-[#7E22CE]";
189
+ } | {
190
+ readonly bg: "bg-[#DB2777]";
191
+ readonly text: "text-white";
192
+ } | {
193
+ readonly bg: "bg-[#FCE7F3]";
194
+ readonly text: "text-[#BE185D]";
195
+ };
196
+ type AvatarSize = 'xs' | 'sm' | 'default' | 'lg' | 'xl' | '2xl';
197
+ type AvatarShape = 'circle' | 'square';
198
+ type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
199
+ interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
200
+ status?: AvatarStatus;
201
+ }
202
+ interface AvatarImageProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image> {
203
+ }
204
+ declare const AvatarImage: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
205
+ interface AvatarFallbackProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback> {
206
+ size?: AvatarSize;
207
+ /** Shorthand: auto-generates initials + color from a name. Children override auto-initials. */
208
+ name?: string;
209
+ /** Pass a name/key to enable colorized mode. The string is hashed to pick a deterministic color. */
210
+ colorized?: string;
211
+ /** Color style: "vivid" (strong bg + white text) or "soft" (pastel bg + dark text). Default: "vivid" */
212
+ colorVariant?: AvatarColorVariant;
213
+ }
214
+ declare const AvatarFallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
215
+ interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
216
+ max?: number;
217
+ size?: AvatarSize;
218
+ shape?: AvatarShape;
219
+ }
220
+ declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
221
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>> & {
222
+ Image: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
223
+ Fallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
224
+ Group: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
225
+ };
226
+ declare namespace Avatar {
227
+ type ImageProps = AvatarImageProps;
228
+ type FallbackProps = AvatarFallbackProps;
229
+ type GroupProps = AvatarGroupProps;
230
+ }
231
+
232
+ export { Avatar, type AvatarColorVariant, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, avatarColors, avatarVariants, getAvatarColor, getAvatarInitials };
@@ -0,0 +1,232 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const avatarVariants: (props?: ({
7
+ size?: "default" | "sm" | "lg" | "xl" | "2xl" | "xs" | null | undefined;
8
+ shape?: "circle" | "square" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ declare const avatarColors: readonly [{
11
+ readonly vivid: {
12
+ readonly bg: "bg-[#DC2626]";
13
+ readonly text: "text-white";
14
+ };
15
+ readonly soft: {
16
+ readonly bg: "bg-[#FEE2E2]";
17
+ readonly text: "text-[#DC2626]";
18
+ };
19
+ }, {
20
+ readonly vivid: {
21
+ readonly bg: "bg-[#EA580C]";
22
+ readonly text: "text-white";
23
+ };
24
+ readonly soft: {
25
+ readonly bg: "bg-[#FFEDD5]";
26
+ readonly text: "text-[#EA580C]";
27
+ };
28
+ }, {
29
+ readonly vivid: {
30
+ readonly bg: "bg-[#D97706]";
31
+ readonly text: "text-white";
32
+ };
33
+ readonly soft: {
34
+ readonly bg: "bg-[#FEF3C7]";
35
+ readonly text: "text-[#B45309]";
36
+ };
37
+ }, {
38
+ readonly vivid: {
39
+ readonly bg: "bg-[#CA8A04]";
40
+ readonly text: "text-white";
41
+ };
42
+ readonly soft: {
43
+ readonly bg: "bg-[#FEF9C3]";
44
+ readonly text: "text-[#A16207]";
45
+ };
46
+ }, {
47
+ readonly vivid: {
48
+ readonly bg: "bg-[#059669]";
49
+ readonly text: "text-white";
50
+ };
51
+ readonly soft: {
52
+ readonly bg: "bg-[#D1FAE5]";
53
+ readonly text: "text-[#047857]";
54
+ };
55
+ }, {
56
+ readonly vivid: {
57
+ readonly bg: "bg-[#0D9488]";
58
+ readonly text: "text-white";
59
+ };
60
+ readonly soft: {
61
+ readonly bg: "bg-[#CCFBF1]";
62
+ readonly text: "text-[#0F766E]";
63
+ };
64
+ }, {
65
+ readonly vivid: {
66
+ readonly bg: "bg-[#0891B2]";
67
+ readonly text: "text-white";
68
+ };
69
+ readonly soft: {
70
+ readonly bg: "bg-[#CFFAFE]";
71
+ readonly text: "text-[#0E7490]";
72
+ };
73
+ }, {
74
+ readonly vivid: {
75
+ readonly bg: "bg-[#2563EB]";
76
+ readonly text: "text-white";
77
+ };
78
+ readonly soft: {
79
+ readonly bg: "bg-[#DBEAFE]";
80
+ readonly text: "text-[#1D4ED8]";
81
+ };
82
+ }, {
83
+ readonly vivid: {
84
+ readonly bg: "bg-[#4F46E5]";
85
+ readonly text: "text-white";
86
+ };
87
+ readonly soft: {
88
+ readonly bg: "bg-[#E0E7FF]";
89
+ readonly text: "text-[#4338CA]";
90
+ };
91
+ }, {
92
+ readonly vivid: {
93
+ readonly bg: "bg-[#7C3AED]";
94
+ readonly text: "text-white";
95
+ };
96
+ readonly soft: {
97
+ readonly bg: "bg-[#EDE9FE]";
98
+ readonly text: "text-[#6D28D9]";
99
+ };
100
+ }, {
101
+ readonly vivid: {
102
+ readonly bg: "bg-[#9333EA]";
103
+ readonly text: "text-white";
104
+ };
105
+ readonly soft: {
106
+ readonly bg: "bg-[#F3E8FF]";
107
+ readonly text: "text-[#7E22CE]";
108
+ };
109
+ }, {
110
+ readonly vivid: {
111
+ readonly bg: "bg-[#DB2777]";
112
+ readonly text: "text-white";
113
+ };
114
+ readonly soft: {
115
+ readonly bg: "bg-[#FCE7F3]";
116
+ readonly text: "text-[#BE185D]";
117
+ };
118
+ }];
119
+ type AvatarColorVariant = 'vivid' | 'soft';
120
+ /** Extract initials from a name string (e.g. "John Doe" → "JD", "김민수" → "김민") */
121
+ declare function getAvatarInitials(name: string, maxChars?: number): string;
122
+ /** Hash a name string to a deterministic avatar color pair (djb2 xor variant) */
123
+ declare function getAvatarColor(name: string, variant?: AvatarColorVariant): {
124
+ readonly bg: "bg-[#DC2626]";
125
+ readonly text: "text-white";
126
+ } | {
127
+ readonly bg: "bg-[#FEE2E2]";
128
+ readonly text: "text-[#DC2626]";
129
+ } | {
130
+ readonly bg: "bg-[#EA580C]";
131
+ readonly text: "text-white";
132
+ } | {
133
+ readonly bg: "bg-[#FFEDD5]";
134
+ readonly text: "text-[#EA580C]";
135
+ } | {
136
+ readonly bg: "bg-[#D97706]";
137
+ readonly text: "text-white";
138
+ } | {
139
+ readonly bg: "bg-[#FEF3C7]";
140
+ readonly text: "text-[#B45309]";
141
+ } | {
142
+ readonly bg: "bg-[#CA8A04]";
143
+ readonly text: "text-white";
144
+ } | {
145
+ readonly bg: "bg-[#FEF9C3]";
146
+ readonly text: "text-[#A16207]";
147
+ } | {
148
+ readonly bg: "bg-[#059669]";
149
+ readonly text: "text-white";
150
+ } | {
151
+ readonly bg: "bg-[#D1FAE5]";
152
+ readonly text: "text-[#047857]";
153
+ } | {
154
+ readonly bg: "bg-[#0D9488]";
155
+ readonly text: "text-white";
156
+ } | {
157
+ readonly bg: "bg-[#CCFBF1]";
158
+ readonly text: "text-[#0F766E]";
159
+ } | {
160
+ readonly bg: "bg-[#0891B2]";
161
+ readonly text: "text-white";
162
+ } | {
163
+ readonly bg: "bg-[#CFFAFE]";
164
+ readonly text: "text-[#0E7490]";
165
+ } | {
166
+ readonly bg: "bg-[#2563EB]";
167
+ readonly text: "text-white";
168
+ } | {
169
+ readonly bg: "bg-[#DBEAFE]";
170
+ readonly text: "text-[#1D4ED8]";
171
+ } | {
172
+ readonly bg: "bg-[#4F46E5]";
173
+ readonly text: "text-white";
174
+ } | {
175
+ readonly bg: "bg-[#E0E7FF]";
176
+ readonly text: "text-[#4338CA]";
177
+ } | {
178
+ readonly bg: "bg-[#7C3AED]";
179
+ readonly text: "text-white";
180
+ } | {
181
+ readonly bg: "bg-[#EDE9FE]";
182
+ readonly text: "text-[#6D28D9]";
183
+ } | {
184
+ readonly bg: "bg-[#9333EA]";
185
+ readonly text: "text-white";
186
+ } | {
187
+ readonly bg: "bg-[#F3E8FF]";
188
+ readonly text: "text-[#7E22CE]";
189
+ } | {
190
+ readonly bg: "bg-[#DB2777]";
191
+ readonly text: "text-white";
192
+ } | {
193
+ readonly bg: "bg-[#FCE7F3]";
194
+ readonly text: "text-[#BE185D]";
195
+ };
196
+ type AvatarSize = 'xs' | 'sm' | 'default' | 'lg' | 'xl' | '2xl';
197
+ type AvatarShape = 'circle' | 'square';
198
+ type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
199
+ interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
200
+ status?: AvatarStatus;
201
+ }
202
+ interface AvatarImageProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image> {
203
+ }
204
+ declare const AvatarImage: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
205
+ interface AvatarFallbackProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback> {
206
+ size?: AvatarSize;
207
+ /** Shorthand: auto-generates initials + color from a name. Children override auto-initials. */
208
+ name?: string;
209
+ /** Pass a name/key to enable colorized mode. The string is hashed to pick a deterministic color. */
210
+ colorized?: string;
211
+ /** Color style: "vivid" (strong bg + white text) or "soft" (pastel bg + dark text). Default: "vivid" */
212
+ colorVariant?: AvatarColorVariant;
213
+ }
214
+ declare const AvatarFallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
215
+ interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
216
+ max?: number;
217
+ size?: AvatarSize;
218
+ shape?: AvatarShape;
219
+ }
220
+ declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
221
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>> & {
222
+ Image: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
223
+ Fallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
224
+ Group: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
225
+ };
226
+ declare namespace Avatar {
227
+ type ImageProps = AvatarImageProps;
228
+ type FallbackProps = AvatarFallbackProps;
229
+ type GroupProps = AvatarGroupProps;
230
+ }
231
+
232
+ export { Avatar, type AvatarColorVariant, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, avatarColors, avatarVariants, getAvatarColor, getAvatarInitials };