@taicode/common-web 3.7.4 → 3.7.7

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 (273) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +12 -13
  3. package/styles.css +2 -0
  4. package/output/components/alert-dialog.d.ts +0 -20
  5. package/output/components/alert-dialog.d.ts.map +0 -1
  6. package/output/components/alert-dialog.js +0 -65
  7. package/output/components/alert.d.ts +0 -11
  8. package/output/components/alert.d.ts.map +0 -1
  9. package/output/components/alert.js +0 -38
  10. package/output/components/avatar.d.ts +0 -13
  11. package/output/components/avatar.d.ts.map +0 -1
  12. package/output/components/avatar.js +0 -40
  13. package/output/components/badge.d.ts +0 -11
  14. package/output/components/badge.d.ts.map +0 -1
  15. package/output/components/badge.js +0 -39
  16. package/output/components/button.d.ts +0 -12
  17. package/output/components/button.d.ts.map +0 -1
  18. package/output/components/button.js +0 -48
  19. package/output/components/calendar.d.ts +0 -13
  20. package/output/components/calendar.d.ts.map +0 -1
  21. package/output/components/calendar.js +0 -57
  22. package/output/components/card.d.ts +0 -13
  23. package/output/components/card.d.ts.map +0 -1
  24. package/output/components/card.js +0 -43
  25. package/output/components/chart.d.ts +0 -56
  26. package/output/components/chart.d.ts.map +0 -1
  27. package/output/components/chart.js +0 -127
  28. package/output/components/checkbox.d.ts +0 -5
  29. package/output/components/checkbox.d.ts.map +0 -1
  30. package/output/components/checkbox.js +0 -21
  31. package/output/components/command.d.ts +0 -20
  32. package/output/components/command.d.ts.map +0 -1
  33. package/output/components/command.js +0 -55
  34. package/output/components/dialog.d.ts +0 -20
  35. package/output/components/dialog.d.ts.map +0 -1
  36. package/output/components/dialog.js +0 -58
  37. package/output/components/direction.d.ts +0 -9
  38. package/output/components/direction.d.ts.map +0 -1
  39. package/output/components/direction.js +0 -10
  40. package/output/components/drawer.d.ts +0 -14
  41. package/output/components/drawer.d.ts.map +0 -1
  42. package/output/components/drawer.js +0 -56
  43. package/output/components/dropdown-menu.d.ts +0 -29
  44. package/output/components/dropdown-menu.d.ts.map +0 -1
  45. package/output/components/dropdown-menu.js +0 -78
  46. package/output/components/field.d.ts +0 -39
  47. package/output/components/field.d.ts.map +0 -1
  48. package/output/components/field.js +0 -102
  49. package/output/components/footer/index.d.ts +0 -27
  50. package/output/components/footer/index.d.ts.map +0 -1
  51. package/output/components/footer/index.js +0 -17
  52. package/output/components/form.d.ts +0 -26
  53. package/output/components/form.d.ts.map +0 -1
  54. package/output/components/form.js +0 -69
  55. package/output/components/index.d.ts +0 -46
  56. package/output/components/index.d.ts.map +0 -1
  57. package/output/components/index.js +0 -45
  58. package/output/components/input-group.d.ts +0 -17
  59. package/output/components/input-group.d.ts.map +0 -1
  60. package/output/components/input-group.js +0 -75
  61. package/output/components/input.d.ts +0 -4
  62. package/output/components/input.d.ts.map +0 -1
  63. package/output/components/input.js +0 -19
  64. package/output/components/item.d.ts +0 -25
  65. package/output/components/item.d.ts.map +0 -1
  66. package/output/components/item.js +0 -89
  67. package/output/components/json-view/index.d.ts +0 -11
  68. package/output/components/json-view/index.d.ts.map +0 -1
  69. package/output/components/json-view/index.js +0 -52
  70. package/output/components/json-view/lazy/index.d.ts +0 -18
  71. package/output/components/json-view/lazy/index.d.ts.map +0 -1
  72. package/output/components/json-view/lazy/index.js +0 -22
  73. package/output/components/kbd.d.ts +0 -4
  74. package/output/components/kbd.d.ts.map +0 -1
  75. package/output/components/kbd.js +0 -22
  76. package/output/components/label.d.ts +0 -5
  77. package/output/components/label.d.ts.map +0 -1
  78. package/output/components/label.js +0 -20
  79. package/output/components/list-actions/index.d.ts +0 -23
  80. package/output/components/list-actions/index.d.ts.map +0 -1
  81. package/output/components/list-actions/index.js +0 -15
  82. package/output/components/loading-button/index.d.ts +0 -44
  83. package/output/components/loading-button/index.d.ts.map +0 -1
  84. package/output/components/loading-button/index.js +0 -75
  85. package/output/components/loading-button/index.test.d.ts +0 -2
  86. package/output/components/loading-button/index.test.d.ts.map +0 -1
  87. package/output/components/loading-button/index.test.js +0 -203
  88. package/output/components/native-select.d.ts +0 -9
  89. package/output/components/native-select.d.ts.map +0 -1
  90. package/output/components/native-select.js +0 -28
  91. package/output/components/page-back-button/index.d.ts +0 -8
  92. package/output/components/page-back-button/index.d.ts.map +0 -1
  93. package/output/components/page-back-button/index.js +0 -7
  94. package/output/components/page-state.d.ts +0 -19
  95. package/output/components/page-state.d.ts.map +0 -1
  96. package/output/components/page-state.js +0 -13
  97. package/output/components/pagination/index.d.ts +0 -34
  98. package/output/components/pagination/index.d.ts.map +0 -1
  99. package/output/components/pagination/index.js +0 -75
  100. package/output/components/popover.d.ts +0 -11
  101. package/output/components/popover.d.ts.map +0 -1
  102. package/output/components/popover.js +0 -44
  103. package/output/components/progress.d.ts +0 -5
  104. package/output/components/progress.d.ts.map +0 -1
  105. package/output/components/progress.js +0 -21
  106. package/output/components/radio-group.d.ts +0 -6
  107. package/output/components/radio-group.d.ts.map +0 -1
  108. package/output/components/radio-group.js +0 -25
  109. package/output/components/route-pending-indicator/index.d.ts +0 -20
  110. package/output/components/route-pending-indicator/index.d.ts.map +0 -1
  111. package/output/components/route-pending-indicator/index.js +0 -17
  112. package/output/components/scroll-area.d.ts +0 -6
  113. package/output/components/scroll-area.d.ts.map +0 -1
  114. package/output/components/scroll-area.js +0 -24
  115. package/output/components/searchable-select/index.d.ts +0 -41
  116. package/output/components/searchable-select/index.d.ts.map +0 -1
  117. package/output/components/searchable-select/index.js +0 -46
  118. package/output/components/select.d.ts +0 -17
  119. package/output/components/select.d.ts.map +0 -1
  120. package/output/components/select.js +0 -58
  121. package/output/components/separator.d.ts +0 -5
  122. package/output/components/separator.d.ts.map +0 -1
  123. package/output/components/separator.js +0 -20
  124. package/output/components/sheet.d.ts +0 -16
  125. package/output/components/sheet.d.ts.map +0 -1
  126. package/output/components/sheet.js +0 -58
  127. package/output/components/sidebar.d.ts +0 -78
  128. package/output/components/sidebar.d.ts.map +0 -1
  129. package/output/components/sidebar.js +0 -233
  130. package/output/components/size-provider/index.d.ts +0 -2
  131. package/output/components/size-provider/index.d.ts.map +0 -1
  132. package/output/components/size-provider/index.js +0 -1
  133. package/output/components/size-provider/size-provider.d.ts +0 -9
  134. package/output/components/size-provider/size-provider.d.ts.map +0 -1
  135. package/output/components/size-provider/size-provider.js +0 -29
  136. package/output/components/skeleton.d.ts +0 -3
  137. package/output/components/skeleton.d.ts.map +0 -1
  138. package/output/components/skeleton.js +0 -18
  139. package/output/components/sonner.d.ts +0 -8
  140. package/output/components/sonner.d.ts.map +0 -1
  141. package/output/components/sonner.js +0 -34
  142. package/output/components/spinner.d.ts +0 -3
  143. package/output/components/spinner.d.ts.map +0 -1
  144. package/output/components/spinner.js +0 -19
  145. package/output/components/switch.d.ts +0 -8
  146. package/output/components/switch.d.ts.map +0 -1
  147. package/output/components/switch.js +0 -20
  148. package/output/components/table.d.ts +0 -11
  149. package/output/components/table.d.ts.map +0 -1
  150. package/output/components/table.js +0 -47
  151. package/output/components/tabs.d.ts +0 -12
  152. package/output/components/tabs.d.ts.map +0 -1
  153. package/output/components/tabs.js +0 -45
  154. package/output/components/textarea.d.ts +0 -4
  155. package/output/components/textarea.d.ts.map +0 -1
  156. package/output/components/textarea.js +0 -19
  157. package/output/components/theme-switcher.d.ts +0 -6
  158. package/output/components/theme-switcher.d.ts.map +0 -1
  159. package/output/components/theme-switcher.js +0 -19
  160. package/output/components/toaster/index.d.ts +0 -16
  161. package/output/components/toaster/index.d.ts.map +0 -1
  162. package/output/components/toaster/index.js +0 -70
  163. package/output/components/toggle-group.d.ts +0 -12
  164. package/output/components/toggle-group.d.ts.map +0 -1
  165. package/output/components/toggle-group.js +0 -38
  166. package/output/components/toggle.d.ts +0 -10
  167. package/output/components/toggle.d.ts.map +0 -1
  168. package/output/components/toggle.js +0 -38
  169. package/output/components/tooltip.d.ts +0 -8
  170. package/output/components/tooltip.d.ts.map +0 -1
  171. package/output/components/tooltip.js +0 -33
  172. package/output/features/confirm-dialog/index.d.ts +0 -41
  173. package/output/features/confirm-dialog/index.d.ts.map +0 -1
  174. package/output/features/confirm-dialog/index.js +0 -19
  175. package/output/features/input-confirm/index.d.ts +0 -26
  176. package/output/features/input-confirm/index.d.ts.map +0 -1
  177. package/output/features/input-confirm/index.js +0 -59
  178. package/output/features/signin/context.d.ts +0 -14
  179. package/output/features/signin/context.d.ts.map +0 -1
  180. package/output/features/signin/context.js +0 -13
  181. package/output/features/signin/index.d.ts +0 -58
  182. package/output/features/signin/index.d.ts.map +0 -1
  183. package/output/features/signin/index.js +0 -137
  184. package/output/features/signin/service.d.ts +0 -92
  185. package/output/features/signin/service.d.ts.map +0 -1
  186. package/output/features/signin/service.js +0 -519
  187. package/output/features/signin/service.test.d.ts +0 -2
  188. package/output/features/signin/service.test.d.ts.map +0 -1
  189. package/output/features/signin/service.test.js +0 -211
  190. package/output/features/signin/types.d.ts +0 -63
  191. package/output/features/signin/types.d.ts.map +0 -1
  192. package/output/features/signin/types.js +0 -1
  193. package/output/hooks/use-loading/index.d.ts +0 -6
  194. package/output/hooks/use-loading/index.d.ts.map +0 -1
  195. package/output/hooks/use-loading/index.js +0 -14
  196. package/output/hooks/use-loading/index.test.d.ts +0 -2
  197. package/output/hooks/use-loading/index.test.d.ts.map +0 -1
  198. package/output/hooks/use-loading/index.test.js +0 -24
  199. package/output/hooks/use-mobile/index.d.ts +0 -2
  200. package/output/hooks/use-mobile/index.d.ts.map +0 -1
  201. package/output/hooks/use-mobile/index.js +0 -16
  202. package/output/hooks/use-observer/index.d.ts +0 -2
  203. package/output/hooks/use-observer/index.d.ts.map +0 -1
  204. package/output/hooks/use-observer/index.js +0 -1
  205. package/output/hooks/use-observer/use-observer.d.ts +0 -3
  206. package/output/hooks/use-observer/use-observer.d.ts.map +0 -1
  207. package/output/hooks/use-observer/use-observer.js +0 -16
  208. package/output/hooks/use-observer/use-observer.test.d.ts +0 -2
  209. package/output/hooks/use-observer/use-observer.test.d.ts.map +0 -1
  210. package/output/hooks/use-observer/use-observer.test.js +0 -134
  211. package/output/hooks/use-offline/index.d.ts +0 -6
  212. package/output/hooks/use-offline/index.d.ts.map +0 -1
  213. package/output/hooks/use-offline/index.js +0 -19
  214. package/output/layout/app/index.d.ts +0 -34
  215. package/output/layout/app/index.d.ts.map +0 -1
  216. package/output/layout/app/index.js +0 -34
  217. package/output/layout/dashboard/index.d.ts +0 -76
  218. package/output/layout/dashboard/index.d.ts.map +0 -1
  219. package/output/layout/dashboard/index.js +0 -84
  220. package/output/layout/index.d.ts +0 -3
  221. package/output/layout/index.d.ts.map +0 -1
  222. package/output/layout/index.js +0 -2
  223. package/output/services/cache-api/cache-api.d.ts +0 -23
  224. package/output/services/cache-api/cache-api.d.ts.map +0 -1
  225. package/output/services/cache-api/cache-api.js +0 -145
  226. package/output/services/cache-api/cache-api.test.d.ts +0 -2
  227. package/output/services/cache-api/cache-api.test.d.ts.map +0 -1
  228. package/output/services/cache-api/cache-api.test.js +0 -610
  229. package/output/services/cache-api/index.d.ts +0 -2
  230. package/output/services/cache-api/index.d.ts.map +0 -1
  231. package/output/services/cache-api/index.js +0 -1
  232. package/output/services/cached-fetch/index.d.ts +0 -50
  233. package/output/services/cached-fetch/index.d.ts.map +0 -1
  234. package/output/services/cached-fetch/index.js +0 -196
  235. package/output/services/service/index.d.ts +0 -2
  236. package/output/services/service/index.d.ts.map +0 -1
  237. package/output/services/service/index.js +0 -1
  238. package/output/services/service/service.d.ts +0 -135
  239. package/output/services/service/service.d.ts.map +0 -1
  240. package/output/services/service/service.js +0 -276
  241. package/output/services/service/service.test.d.ts +0 -2
  242. package/output/services/service/service.test.d.ts.map +0 -1
  243. package/output/services/service/service.test.js +0 -1399
  244. package/output/services/side-cache/index.d.ts +0 -2
  245. package/output/services/side-cache/index.d.ts.map +0 -1
  246. package/output/services/side-cache/index.js +0 -1
  247. package/output/services/side-cache/side-cache.d.ts +0 -11
  248. package/output/services/side-cache/side-cache.d.ts.map +0 -1
  249. package/output/services/side-cache/side-cache.js +0 -161
  250. package/output/services/side-cache/side-cache.test.d.ts +0 -2
  251. package/output/services/side-cache/side-cache.test.d.ts.map +0 -1
  252. package/output/services/side-cache/side-cache.test.js +0 -271
  253. package/output/utils/avatar/index.d.ts +0 -28
  254. package/output/utils/avatar/index.d.ts.map +0 -1
  255. package/output/utils/avatar/index.js +0 -35
  256. package/output/utils/delay/index.d.ts +0 -2
  257. package/output/utils/delay/index.d.ts.map +0 -1
  258. package/output/utils/delay/index.js +0 -5
  259. package/output/utils/form/index.d.ts +0 -3
  260. package/output/utils/form/index.d.ts.map +0 -1
  261. package/output/utils/form/index.js +0 -1
  262. package/output/utils/merge-class-names/index.d.ts +0 -3
  263. package/output/utils/merge-class-names/index.d.ts.map +0 -1
  264. package/output/utils/merge-class-names/index.js +0 -5
  265. package/output/utils/merge-class-names/index.test.d.ts +0 -2
  266. package/output/utils/merge-class-names/index.test.d.ts.map +0 -1
  267. package/output/utils/merge-class-names/index.test.js +0 -7
  268. package/output/utils/performance/index.d.ts +0 -82
  269. package/output/utils/performance/index.d.ts.map +0 -1
  270. package/output/utils/performance/index.js +0 -129
  271. package/output/utils/redirect/index.d.ts +0 -6
  272. package/output/utils/redirect/index.d.ts.map +0 -1
  273. package/output/utils/redirect/index.js +0 -32
@@ -1,78 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import * as React from "react";
15
- import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
16
- import { mergeClassNames } from "../utils/merge-class-names/index.js";
17
- import { CheckIcon, ChevronRightIcon } from "lucide-react";
18
- function DropdownMenu(params) {
19
- const props = __rest(params, []);
20
- return _jsx(DropdownMenuPrimitive.Root, Object.assign({ "data-slot": "dropdown-menu" }, props));
21
- }
22
- function DropdownMenuPortal(params) {
23
- const props = __rest(params, []);
24
- return (_jsx(DropdownMenuPrimitive.Portal, Object.assign({ "data-slot": "dropdown-menu-portal" }, props)));
25
- }
26
- function DropdownMenuTrigger(params) {
27
- const props = __rest(params, []);
28
- return (_jsx(DropdownMenuPrimitive.Trigger, Object.assign({ "data-slot": "dropdown-menu-trigger" }, props)));
29
- }
30
- function DropdownMenuContent(params) {
31
- const { className, align = "start", sideOffset = 4 } = params, props = __rest(params, ["className", "align", "sideOffset"]);
32
- return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, Object.assign({ "data-slot": "dropdown-menu-content", sideOffset: sideOffset, align: align, className: mergeClassNames("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-md p-1 shadow-md ring-1 duration-100 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto data-[state=closed]:overflow-hidden", className) }, props)) }));
33
- }
34
- function DropdownMenuGroup(params) {
35
- const props = __rest(params, []);
36
- return (_jsx(DropdownMenuPrimitive.Group, Object.assign({ "data-slot": "dropdown-menu-group" }, props)));
37
- }
38
- function DropdownMenuItem(params) {
39
- const { className, inset, variant = "default" } = params, props = __rest(params, ["className", "inset", "variant"]);
40
- return (_jsx(DropdownMenuPrimitive.Item, Object.assign({ "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: mergeClassNames("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props)));
41
- }
42
- function DropdownMenuCheckboxItem(params) {
43
- const { className, children, checked } = params, props = __rest(params, ["className", "children", "checked"]);
44
- return (_jsxs(DropdownMenuPrimitive.CheckboxItem, Object.assign({ "data-slot": "dropdown-menu-checkbox-item", className: mergeClassNames("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), checked: checked }, props, { children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none", "data-slot": "dropdown-menu-checkbox-item-indicator", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] })));
45
- }
46
- function DropdownMenuRadioGroup(params) {
47
- const props = __rest(params, []);
48
- return (_jsx(DropdownMenuPrimitive.RadioGroup, Object.assign({ "data-slot": "dropdown-menu-radio-group" }, props)));
49
- }
50
- function DropdownMenuRadioItem(params) {
51
- const { className, children } = params, props = __rest(params, ["className", "children"]);
52
- return (_jsxs(DropdownMenuPrimitive.RadioItem, Object.assign({ "data-slot": "dropdown-menu-radio-item", className: mergeClassNames("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none", "data-slot": "dropdown-menu-radio-item-indicator", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] })));
53
- }
54
- function DropdownMenuLabel(params) {
55
- const { className, inset } = params, props = __rest(params, ["className", "inset"]);
56
- return (_jsx(DropdownMenuPrimitive.Label, Object.assign({ "data-slot": "dropdown-menu-label", "data-inset": inset, className: mergeClassNames("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8", className) }, props)));
57
- }
58
- function DropdownMenuSeparator(params) {
59
- const { className } = params, props = __rest(params, ["className"]);
60
- return (_jsx(DropdownMenuPrimitive.Separator, Object.assign({ "data-slot": "dropdown-menu-separator", className: mergeClassNames("bg-border -mx-1 my-1 h-px", className) }, props)));
61
- }
62
- function DropdownMenuShortcut(params) {
63
- const { className } = params, props = __rest(params, ["className"]);
64
- return (_jsx("span", Object.assign({ "data-slot": "dropdown-menu-shortcut", className: mergeClassNames("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest", className) }, props)));
65
- }
66
- function DropdownMenuSub(params) {
67
- const props = __rest(params, []);
68
- return _jsx(DropdownMenuPrimitive.Sub, Object.assign({ "data-slot": "dropdown-menu-sub" }, props));
69
- }
70
- function DropdownMenuSubTrigger(params) {
71
- const { className, inset, children } = params, props = __rest(params, ["className", "inset", "children"]);
72
- return (_jsxs(DropdownMenuPrimitive.SubTrigger, Object.assign({ "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: mergeClassNames("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [children, _jsx(ChevronRightIcon, { className: "ml-auto" })] })));
73
- }
74
- function DropdownMenuSubContent(params) {
75
- const { className } = params, props = __rest(params, ["className"]);
76
- return (_jsx(DropdownMenuPrimitive.SubContent, Object.assign({ "data-slot": "dropdown-menu-sub-content", className: mergeClassNames("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 z-50 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden", className) }, props)));
77
- }
78
- export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -1,39 +0,0 @@
1
- import { type VariantProps } from "class-variance-authority";
2
- import { Label } from "./label.js";
3
- type FieldErrorParams = {
4
- errors?: Array<{
5
- message?: string;
6
- } | undefined>;
7
- };
8
- type FieldLegendParams = {
9
- variant?: "legend" | "label";
10
- };
11
- type FieldSeparatorParams = {
12
- children?: React.ReactNode;
13
- };
14
- declare function FieldSet(params: React.ComponentProps<"fieldset">): import("react").JSX.Element;
15
- declare function FieldLegend(params: React.ComponentProps<"legend"> & FieldLegendParams): import("react").JSX.Element;
16
- declare function FieldGroup(params: React.ComponentProps<"div">): import("react").JSX.Element;
17
- declare const fieldVariants: (props?: ({
18
- orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
19
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
- declare function Field(params: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
21
- declare function FieldContent(params: React.ComponentProps<"div">): import("react").JSX.Element;
22
- declare function FieldLabel(params: React.ComponentProps<typeof Label>): import("react").JSX.Element;
23
- declare function FieldTitle(params: React.ComponentProps<"div">): import("react").JSX.Element;
24
- declare function FieldDescription(params: React.ComponentProps<"p">): import("react").JSX.Element;
25
- declare function FieldSeparator(params: React.ComponentProps<"div"> & FieldSeparatorParams): import("react").JSX.Element;
26
- declare function FieldError(params: React.ComponentProps<"div"> & FieldErrorParams): import("react").JSX.Element | null;
27
- declare const FieldNamespace: typeof Field & {
28
- Label: typeof FieldLabel;
29
- Description: typeof FieldDescription;
30
- Error: typeof FieldError;
31
- Group: typeof FieldGroup;
32
- Legend: typeof FieldLegend;
33
- Separator: typeof FieldSeparator;
34
- Set: typeof FieldSet;
35
- Content: typeof FieldContent;
36
- Title: typeof FieldTitle;
37
- };
38
- export { FieldNamespace as Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
39
- //# sourceMappingURL=field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../source/components/field.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGlC,KAAK,gBAAgB,GAAG;IACtB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAA;CACjD,CAAA;AAED,KAAK,iBAAiB,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;CAAE,CAAA;AAEzD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,iBAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,+BASzD;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,iBAAiB,+BAc9E;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAYtD;AAED,QAAA,MAAM,aAAa;;8EAcjB,CAAA;AAEF,iBAAS,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,+BAetF;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAYxD;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,+BAgB7D;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAYtD;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,+BAc1D;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,oBAAoB,+BAwBjF;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,gBAAgB,sCAgDzE;AAGD,QAAA,MAAM,cAAc;;;;;;;;;;CAUlB,CAAA;AAEF,OAAO,EACL,cAAc,IAAI,KAAK,EACvB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,CAAA"}
@@ -1,102 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { useMemo } from "react";
15
- import { cva } from "class-variance-authority";
16
- import { mergeClassNames } from "../utils/merge-class-names/index.js";
17
- import { Label } from "./label.js";
18
- import { Separator } from "./separator.js";
19
- function FieldSet(params) {
20
- const { className } = params, props = __rest(params, ["className"]);
21
- return (_jsx("fieldset", Object.assign({ "data-slot": "field-set", className: mergeClassNames("gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col", className) }, props)));
22
- }
23
- function FieldLegend(params) {
24
- const { className, variant = "legend" } = params, props = __rest(params, ["className", "variant"]);
25
- return (_jsx("legend", Object.assign({ "data-slot": "field-legend", "data-variant": variant, className: mergeClassNames("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", className) }, props)));
26
- }
27
- function FieldGroup(params) {
28
- const { className } = params, props = __rest(params, ["className"]);
29
- return (_jsx("div", Object.assign({ "data-slot": "field-group", className: mergeClassNames("gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4 group/field-group @container/field-group flex w-full flex-col", className) }, props)));
30
- }
31
- const fieldVariants = cva("data-[invalid=true]:text-destructive gap-3 group/field flex w-full", {
32
- variants: {
33
- orientation: {
34
- vertical: "flex-col [&>*]:w-full [&>.sr-only]:w-auto",
35
- horizontal: "flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
36
- responsive: "flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
37
- },
38
- },
39
- defaultVariants: {
40
- orientation: "vertical",
41
- },
42
- });
43
- function Field(params) {
44
- const { className, orientation = "vertical" } = params, props = __rest(params, ["className", "orientation"]);
45
- return (_jsx("div", Object.assign({ role: "group", "data-slot": "field", "data-orientation": orientation, className: mergeClassNames(fieldVariants({ orientation }), className) }, props)));
46
- }
47
- function FieldContent(params) {
48
- const { className } = params, props = __rest(params, ["className"]);
49
- return (_jsx("div", Object.assign({ "data-slot": "field-content", className: mergeClassNames("gap-1 group/field-content flex flex-1 flex-col leading-snug", className) }, props)));
50
- }
51
- function FieldLabel(params) {
52
- const { className } = params, props = __rest(params, ["className"]);
53
- return (_jsx(Label, Object.assign({ "data-slot": "field-label", className: mergeClassNames("has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit leading-snug", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className) }, props)));
54
- }
55
- function FieldTitle(params) {
56
- const { className } = params, props = __rest(params, ["className"]);
57
- return (_jsx("div", Object.assign({ "data-slot": "field-label", className: mergeClassNames("gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug", className) }, props)));
58
- }
59
- function FieldDescription(params) {
60
- const { className } = params, props = __rest(params, ["className"]);
61
- return (_jsx("p", Object.assign({ "data-slot": "field-description", className: mergeClassNames("text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", className) }, props)));
62
- }
63
- function FieldSeparator(params) {
64
- const { children, className } = params, props = __rest(params, ["children", "className"]);
65
- return (_jsxs("div", Object.assign({ "data-slot": "field-separator", "data-content": !!children, className: mergeClassNames("-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative", className) }, props, { children: [_jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && (_jsx("span", { className: "text-muted-foreground px-2 bg-background relative mx-auto block w-fit", "data-slot": "field-separator-content", children: children }))] })));
66
- }
67
- function FieldError(params) {
68
- const { className, children, errors } = params, props = __rest(params, ["className", "children", "errors"]);
69
- const content = useMemo(() => {
70
- var _a;
71
- if (children) {
72
- return children;
73
- }
74
- if (!(errors === null || errors === void 0 ? void 0 : errors.length)) {
75
- return null;
76
- }
77
- const uniqueErrors = [
78
- ...new Map(errors.map((error) => [error === null || error === void 0 ? void 0 : error.message, error])).values(),
79
- ];
80
- if ((uniqueErrors === null || uniqueErrors === void 0 ? void 0 : uniqueErrors.length) == 1) {
81
- return (_a = uniqueErrors[0]) === null || _a === void 0 ? void 0 : _a.message;
82
- }
83
- return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => (error === null || error === void 0 ? void 0 : error.message) && _jsx("li", { children: error.message }, index)) }));
84
- }, [children, errors]);
85
- if (!content) {
86
- return null;
87
- }
88
- return (_jsx("div", Object.assign({ role: "alert", "data-slot": "field-error", className: mergeClassNames("text-destructive text-sm font-normal", className) }, props, { children: content })));
89
- }
90
- // 命名空间导出
91
- const FieldNamespace = Object.assign(Field, {
92
- Label: FieldLabel,
93
- Description: FieldDescription,
94
- Error: FieldError,
95
- Group: FieldGroup,
96
- Legend: FieldLegend,
97
- Separator: FieldSeparator,
98
- Set: FieldSet,
99
- Content: FieldContent,
100
- Title: FieldTitle,
101
- });
102
- export { FieldNamespace as Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
@@ -1,27 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export interface FooterProps {
3
- /** 版权文本 */
4
- copyright?: ReactNode;
5
- /** 联系邮箱(显示为 mailto 链接) */
6
- contactEmail?: string;
7
- /** 联系链接文本 */
8
- contactText?: ReactNode;
9
- /** 自定义 className */
10
- className?: string;
11
- /** 自定义右侧内容(覆盖 contactEmail/contactText) */
12
- children?: ReactNode;
13
- }
14
- /**
15
- * 通用页面底部组件
16
- *
17
- * @example
18
- * ```tsx
19
- * <Footer
20
- * copyright="© 2024 Taicode Labs. All rights reserved."
21
- * contactEmail="contact@example.com"
22
- * contactText="Contact Us"
23
- * />
24
- * ```
25
- */
26
- export declare function Footer({ copyright, contactEmail, contactText, className, children, }: FooterProps): import("react").JSX.Element;
27
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,MAAM,WAAW,WAAW;IAC1B,WAAW;IACX,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa;IACb,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,GACT,EAAE,WAAW,+BAoBb"}
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { mergeClassNames } from '../../utils/merge-class-names/index.js';
3
- /**
4
- * 通用页面底部组件
5
- *
6
- * @example
7
- * ```tsx
8
- * <Footer
9
- * copyright="© 2024 Taicode Labs. All rights reserved."
10
- * contactEmail="contact@example.com"
11
- * contactText="Contact Us"
12
- * />
13
- * ```
14
- */
15
- export function Footer({ copyright, contactEmail, contactText, className, children, }) {
16
- return (_jsx("footer", { className: mergeClassNames('border-t border-border', className), children: _jsx("div", { className: "mx-auto max-w-7xl px-6 py-8 lg:px-8", children: _jsxs("div", { className: "flex flex-col items-center justify-center gap-4 sm:flex-row sm:justify-between", children: [copyright && (_jsx("p", { className: "text-sm text-muted-foreground", children: copyright })), children !== null && children !== void 0 ? children : (contactEmail && (_jsx("a", { href: `mailto:${contactEmail}`, className: "text-sm text-muted-foreground transition-colors hover:text-foreground", children: contactText !== null && contactText !== void 0 ? contactText : contactEmail })))] }) }) }));
17
- }
@@ -1,26 +0,0 @@
1
- import type * as React from 'react';
2
- import { Label as LabelPrimitive } from 'radix-ui';
3
- import { type ControllerProps, type FieldPath, type FieldValues } from 'react-hook-form';
4
- declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
5
- declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
6
- declare const useFormField: () => {
7
- invalid: boolean;
8
- isDirty: boolean;
9
- isTouched: boolean;
10
- isValidating: boolean;
11
- error?: import("react-hook-form").FieldError | undefined;
12
- id: string;
13
- name: string;
14
- formItemId: string;
15
- formDescriptionId: string;
16
- formMessageId: string;
17
- };
18
- declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
- declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
20
- declare const FormControl: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement> & {
21
- children?: React.ReactNode;
22
- } & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
23
- declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
24
- declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
25
- export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, };
26
- //# sourceMappingURL=form.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../source/components/form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,KAAK,IAAI,cAAc,EAAyB,MAAM,UAAU,CAAA;AACzE,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAA;AAKxB,QAAA,MAAM,IAAI,8ZAAe,CAAA;AAWzB,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,OAAO,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAI5C,CAAA;AAQD,QAAA,MAAM,YAAY;;;;;;;;;;;CAuBjB,CAAA;AAED,QAAA,MAAM,QAAQ,6GAUb,CAAA;AAGD,QAAA,MAAM,SAAS,yJAcb,CAAA;AAGF,QAAA,MAAM,WAAW;;gFAef,CAAA;AAGF,QAAA,MAAM,eAAe,yHAapB,CAAA;AAGD,QAAA,MAAM,WAAW,yHAkBhB,CAAA;AAGD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,GACb,CAAA"}
@@ -1,69 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { createContext, forwardRef, useContext, useId } from 'react';
14
- import { Label as LabelPrimitive, Slot as SlotPrimitive } from 'radix-ui';
15
- import { Controller, FormProvider, useFormContext, } from 'react-hook-form';
16
- import { mergeClassNames } from '../utils/merge-class-names/index.js';
17
- import { Label } from './label.js';
18
- const Form = FormProvider;
19
- const FormFieldContext = createContext(null);
20
- const FormField = (props) => (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, Object.assign({}, props)) }));
21
- const FormItemContext = createContext(null);
22
- const useFormField = () => {
23
- const fieldContext = useContext(FormFieldContext);
24
- const itemContext = useContext(FormItemContext);
25
- const { getFieldState, formState } = useFormContext();
26
- if (!fieldContext) {
27
- throw new Error('useFormField should be used within <FormField>');
28
- }
29
- if (!itemContext) {
30
- throw new Error('useFormField should be used within <FormItem>');
31
- }
32
- const fieldState = getFieldState(fieldContext.name, formState);
33
- const { id } = itemContext;
34
- return Object.assign({ id, name: fieldContext.name, formItemId: `${id}-form-item`, formDescriptionId: `${id}-form-item-description`, formMessageId: `${id}-form-item-message` }, fieldState);
35
- };
36
- const FormItem = forwardRef((_a, ref) => {
37
- var { className } = _a, props = __rest(_a, ["className"]);
38
- const id = useId();
39
- return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", Object.assign({ ref: ref, className: mergeClassNames('space-y-2', className) }, props)) }));
40
- });
41
- FormItem.displayName = 'FormItem';
42
- const FormLabel = forwardRef((_a, ref) => {
43
- var { className } = _a, props = __rest(_a, ["className"]);
44
- const { error, formItemId } = useFormField();
45
- return (_jsx(Label, Object.assign({ ref: ref, className: mergeClassNames(error && 'text-destructive', className), htmlFor: formItemId }, props)));
46
- });
47
- FormLabel.displayName = 'FormLabel';
48
- const FormControl = forwardRef((props, ref) => {
49
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
50
- return (_jsx(SlotPrimitive.Slot, Object.assign({ ref: ref, id: formItemId, "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : formDescriptionId, "aria-invalid": Boolean(error) }, props)));
51
- });
52
- FormControl.displayName = 'FormControl';
53
- const FormDescription = forwardRef((_a, ref) => {
54
- var { className } = _a, props = __rest(_a, ["className"]);
55
- const { formDescriptionId } = useFormField();
56
- return (_jsx("p", Object.assign({ ref: ref, id: formDescriptionId, className: mergeClassNames('text-sm text-muted-foreground', className) }, props)));
57
- });
58
- FormDescription.displayName = 'FormDescription';
59
- const FormMessage = forwardRef((_a, ref) => {
60
- var _b;
61
- var { className, children } = _a, props = __rest(_a, ["className", "children"]);
62
- const { error, formMessageId } = useFormField();
63
- const body = error ? String((_b = error.message) !== null && _b !== void 0 ? _b : '') : children;
64
- if (!body)
65
- return null;
66
- return (_jsx("p", Object.assign({ ref: ref, id: formMessageId, className: mergeClassNames('text-sm font-medium text-destructive', className) }, props, { children: body })));
67
- });
68
- FormMessage.displayName = 'FormMessage';
69
- export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, };
@@ -1,46 +0,0 @@
1
- export * from './alert.js';
2
- export * from './alert-dialog.js';
3
- export * from './avatar.js';
4
- export * from './badge.js';
5
- export * from './button.js';
6
- export * from './card.js';
7
- export * from './calendar.js';
8
- export * from './chart.js';
9
- export * from './checkbox.js';
10
- export * from './command.js';
11
- export * from './dialog.js';
12
- export * from './direction.js';
13
- export * from './dropdown-menu.js';
14
- export * from './drawer.js';
15
- export * from './field.js';
16
- export * from './form.js';
17
- export * from './input-group.js';
18
- export * from './input.js';
19
- export * from './item.js';
20
- export * from './kbd.js';
21
- export * from './label.js';
22
- export * from './list-actions/index.js';
23
- export * from './native-select.js';
24
- export * from './page-back-button/index.js';
25
- export * from './page-state.js';
26
- export * from './pagination/index.js';
27
- export * from './popover.js';
28
- export * from './progress.js';
29
- export * from './radio-group.js';
30
- export * from './scroll-area.js';
31
- export * from './select.js';
32
- export * from './separator.js';
33
- export * from './sheet.js';
34
- export * from './skeleton.js';
35
- export * from './sonner.js';
36
- export * from './spinner.js';
37
- export * from './switch.js';
38
- export * from './table.js';
39
- export * from './tabs.js';
40
- export * from './textarea.js';
41
- export * from './theme-switcher.js';
42
- export * from './toggle.js';
43
- export * from './toggle-group.js';
44
- export * from './tooltip.js';
45
- export * from './sidebar.js';
46
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA"}
@@ -1,45 +0,0 @@
1
- export * from './alert.js';
2
- export * from './alert-dialog.js';
3
- export * from './avatar.js';
4
- export * from './badge.js';
5
- export * from './button.js';
6
- export * from './card.js';
7
- export * from './calendar.js';
8
- export * from './chart.js';
9
- export * from './checkbox.js';
10
- export * from './command.js';
11
- export * from './dialog.js';
12
- export * from './direction.js';
13
- export * from './dropdown-menu.js';
14
- export * from './drawer.js';
15
- export * from './field.js';
16
- export * from './form.js';
17
- export * from './input-group.js';
18
- export * from './input.js';
19
- export * from './item.js';
20
- export * from './kbd.js';
21
- export * from './label.js';
22
- export * from './list-actions/index.js';
23
- export * from './native-select.js';
24
- export * from './page-back-button/index.js';
25
- export * from './page-state.js';
26
- export * from './pagination/index.js';
27
- export * from './popover.js';
28
- export * from './progress.js';
29
- export * from './radio-group.js';
30
- export * from './scroll-area.js';
31
- export * from './select.js';
32
- export * from './separator.js';
33
- export * from './sheet.js';
34
- export * from './skeleton.js';
35
- export * from './sonner.js';
36
- export * from './spinner.js';
37
- export * from './switch.js';
38
- export * from './table.js';
39
- export * from './tabs.js';
40
- export * from './textarea.js';
41
- export * from './theme-switcher.js';
42
- export * from './toggle.js';
43
- export * from './toggle-group.js';
44
- export * from './tooltip.js';
45
- export * from './sidebar.js';
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- import { Button } from "./button.js";
4
- declare function InputGroup(params: React.ComponentProps<"div">): React.JSX.Element;
5
- declare const inputGroupAddonVariants: (props?: ({
6
- align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
7
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- declare function InputGroupAddon(params: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
9
- declare const inputGroupButtonVariants: (props?: ({
10
- size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
11
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
- declare function InputGroupButton(params: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
13
- declare function InputGroupText(params: React.ComponentProps<"span">): React.JSX.Element;
14
- declare function InputGroupInput(params: React.ComponentProps<"input">): React.JSX.Element;
15
- declare function InputGroupTextarea(params: React.ComponentProps<"textarea">): React.JSX.Element;
16
- export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
17
- //# sourceMappingURL=input-group.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../source/components/input-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIpC,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAatD;AAED,QAAA,MAAM,uBAAuB;;8EAiB5B,CAAA;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,qBAqB1G;AAED,QAAA,MAAM,wBAAwB;;8EAe7B,CAAA;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,CAAC,GACjF,YAAY,CAAC,OAAO,wBAAwB,CAAC,qBAiB9C;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW3D;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAY7D;AAED,iBAAS,kBAAkB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAYnE;AAED,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,CAAA"}
@@ -1,75 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import * as React from "react";
14
- import { cva } from "class-variance-authority";
15
- import { mergeClassNames } from "../utils/merge-class-names/index.js";
16
- import { Button } from "./button.js";
17
- import { Input } from "./input.js";
18
- import { Textarea } from "./textarea.js";
19
- function InputGroup(params) {
20
- const { className } = params, props = __rest(params, ["className"]);
21
- return (_jsx("div", Object.assign({ "data-slot": "input-group", role: "group", className: mergeClassNames("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-9 rounded-md border shadow-xs transition-[color,box-shadow] has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot][aria-invalid=true]]:ring-[3px] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto", className) }, props)));
22
- }
23
- const inputGroupAddonVariants = cva("text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none", {
24
- variants: {
25
- align: {
26
- "inline-start": "pl-2 has-[>button]:ml-[-0.25rem] has-[>kbd]:ml-[-0.15rem] order-first",
27
- "inline-end": "pr-2 has-[>button]:mr-[-0.25rem] has-[>kbd]:mr-[-0.15rem] order-last",
28
- "block-start": "px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
29
- "block-end": "px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start",
30
- },
31
- },
32
- defaultVariants: {
33
- align: "inline-start",
34
- },
35
- });
36
- function InputGroupAddon(params) {
37
- const { className, align = "inline-start" } = params, props = __rest(params, ["className", "align"]);
38
- return (_jsx("div", Object.assign({ role: "group", "data-slot": "input-group-addon", "data-align": align, className: mergeClassNames(inputGroupAddonVariants({ align }), className), onClick: (e) => {
39
- var _a, _b;
40
- if (e.target.closest("button")) {
41
- return;
42
- }
43
- (_b = (_a = e.currentTarget.parentElement) === null || _a === void 0 ? void 0 : _a.querySelector("input")) === null || _b === void 0 ? void 0 : _b.focus();
44
- } }, props)));
45
- }
46
- const inputGroupButtonVariants = cva("gap-2 text-sm shadow-none flex items-center", {
47
- variants: {
48
- size: {
49
- xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
50
- sm: "",
51
- "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
52
- "icon-sm": "size-8 p-0 has-[>svg]:p-0",
53
- },
54
- },
55
- defaultVariants: {
56
- size: "xs",
57
- },
58
- });
59
- function InputGroupButton(params) {
60
- const { className, type = "button", variant = "ghost", size = "xs" } = params, props = __rest(params, ["className", "type", "variant", "size"]);
61
- return (_jsx(Button, Object.assign({ type: type, "data-size": size, variant: variant, className: mergeClassNames(inputGroupButtonVariants({ size }), className) }, props)));
62
- }
63
- function InputGroupText(params) {
64
- const { className } = params, props = __rest(params, ["className"]);
65
- return (_jsx("span", Object.assign({ className: mergeClassNames("text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none", className) }, props)));
66
- }
67
- function InputGroupInput(params) {
68
- const { className } = params, props = __rest(params, ["className"]);
69
- return (_jsx(Input, Object.assign({ "data-slot": "input-group-control", className: mergeClassNames("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1", className) }, props)));
70
- }
71
- function InputGroupTextarea(params) {
72
- const { className } = params, props = __rest(params, ["className"]);
73
- return (_jsx(Textarea, Object.assign({ "data-slot": "input-group-control", className: mergeClassNames("rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1 resize-none", className) }, props)));
74
- }
75
- export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- declare function Input(params: React.ComponentProps<'input'>): React.JSX.Element;
3
- export { Input };
4
- //# sourceMappingURL=input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../source/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,qBAanD;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -1,19 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { mergeClassNames } from '../utils/merge-class-names/index.js';
15
- function Input(params) {
16
- const { className, type } = params, props = __rest(params, ["className", "type"]);
17
- return (_jsx("input", Object.assign({ type: type, "data-slot": "input", className: mergeClassNames('dark:bg-input/30 border-input focus-visible:border-ring aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base transition-colors file:h-7 file:text-sm file:font-medium md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50', className) }, props)));
18
- }
19
- export { Input };