@appcorp/shadcn 1.2.0 → 2.0.1

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 (231) hide show
  1. package/components/app-sidebar.js +1 -41
  2. package/components/audio.js +1 -21
  3. package/components/dashboard.js +1 -67
  4. package/components/drawer-generic.js +1 -47
  5. package/components/enhanced-checkbox.js +1 -86
  6. package/components/enhanced-combobox.js +1 -315
  7. package/components/enhanced-drawer-footer.js +1 -39
  8. package/components/enhanced-drawer-header.js +1 -15
  9. package/components/enhanced-dropzone-impl.d.ts +32 -0
  10. package/components/enhanced-dropzone-impl.js +1 -0
  11. package/components/enhanced-dropzone.d.ts +2 -63
  12. package/components/enhanced-dropzone.js +1 -296
  13. package/components/enhanced-input.js +1 -87
  14. package/components/enhanced-label.js +1 -68
  15. package/components/enhanced-radio.js +1 -23
  16. package/components/enhanced-select.js +1 -81
  17. package/components/enhanced-slider.js +1 -80
  18. package/components/enhanced-switch.js +1 -89
  19. package/components/enhanced-table-footer-action.js +1 -110
  20. package/components/enhanced-table-footer-page.js +1 -132
  21. package/components/enhanced-table-footer-pagination.js +1 -118
  22. package/components/enhanced-table-header-action.js +1 -40
  23. package/components/enhanced-table-header-search.js +1 -18
  24. package/components/enhanced-table.js +1 -329
  25. package/components/enhanced-textarea.js +1 -87
  26. package/components/field.d.ts +1 -1
  27. package/components/field.js +1 -153
  28. package/components/image-resize-dialog.js +1 -180
  29. package/components/nav-main.js +1 -86
  30. package/components/nav-projects.js +1 -50
  31. package/components/nav-user.js +1 -62
  32. package/components/show-toast.js +1 -11
  33. package/components/sidebar.d.ts +1 -1
  34. package/components/sidebar.js +1 -326
  35. package/components/team-switcher.js +1 -53
  36. package/components/theme-provider.js +1 -160
  37. package/components/timeline.js +1 -21
  38. package/components/tooltip.js +1 -85
  39. package/components/ui/accordion.js +1 -87
  40. package/components/ui/alert-dialog.js +1 -120
  41. package/components/ui/alert.d.ts +1 -1
  42. package/components/ui/alert.js +1 -90
  43. package/components/ui/area-chart-v1-impl.d.ts +19 -0
  44. package/components/ui/area-chart-v1-impl.js +1 -0
  45. package/components/ui/area-chart-v1.d.ts +2 -19
  46. package/components/ui/area-chart-v1.js +1 -114
  47. package/components/ui/aspect-ratio.js +1 -40
  48. package/components/ui/avatar.js +1 -80
  49. package/components/ui/badge.d.ts +2 -2
  50. package/components/ui/badge.js +1 -80
  51. package/components/ui/breadcrumb.js +1 -107
  52. package/components/ui/button.d.ts +2 -2
  53. package/components/ui/button.js +1 -92
  54. package/components/ui/calendar-impl.d.ts +8 -0
  55. package/components/ui/calendar-impl.js +1 -0
  56. package/components/ui/calendar.d.ts +2 -8
  57. package/components/ui/calendar.js +1 -109
  58. package/components/ui/card.js +1 -96
  59. package/components/ui/carousel-impl.d.ts +18 -0
  60. package/components/ui/carousel-impl.js +1 -0
  61. package/components/ui/carousel.d.ts +6 -18
  62. package/components/ui/carousel.js +1 -171
  63. package/components/ui/chart-impl.d.ts +62 -0
  64. package/components/ui/chart-impl.js +7 -0
  65. package/components/ui/chart.d.ts +7 -62
  66. package/components/ui/chart.js +1 -220
  67. package/components/ui/checkbox.js +1 -71
  68. package/components/ui/collapsible.js +1 -44
  69. package/components/ui/combobox.js +1 -88
  70. package/components/ui/command-impl.d.ts +80 -0
  71. package/components/ui/command-impl.js +1 -0
  72. package/components/ui/command.d.ts +9 -80
  73. package/components/ui/command.js +1 -118
  74. package/components/ui/context-menu.js +1 -141
  75. package/components/ui/dialog.js +1 -113
  76. package/components/ui/drawer-impl.d.ts +22 -0
  77. package/components/ui/drawer-impl.js +1 -0
  78. package/components/ui/drawer.d.ts +10 -22
  79. package/components/ui/drawer.js +1 -112
  80. package/components/ui/dropdown-menu.js +1 -143
  81. package/components/ui/form.d.ts +4 -2
  82. package/components/ui/form.js +1 -132
  83. package/components/ui/hover-card.js +1 -72
  84. package/components/ui/input-otp-impl.d.ts +34 -0
  85. package/components/ui/input-otp-impl.js +1 -0
  86. package/components/ui/input-otp.d.ts +4 -34
  87. package/components/ui/input-otp.js +1 -93
  88. package/components/ui/input.js +1 -66
  89. package/components/ui/label.d.ts +1 -1
  90. package/components/ui/label.js +1 -70
  91. package/components/ui/language-selector.js +1 -63
  92. package/components/ui/menubar.js +1 -165
  93. package/components/ui/navigation-menu.d.ts +1 -1
  94. package/components/ui/navigation-menu.js +1 -114
  95. package/components/ui/pagination.js +1 -113
  96. package/components/ui/popover.js +1 -75
  97. package/components/ui/progress.js +1 -69
  98. package/components/ui/radio-group.js +1 -77
  99. package/components/ui/resizable-impl.d.ts +24 -0
  100. package/components/ui/resizable-impl.js +1 -0
  101. package/components/ui/resizable.d.ts +3 -24
  102. package/components/ui/resizable.js +1 -79
  103. package/components/ui/scroll-area.js +1 -80
  104. package/components/ui/select.js +1 -127
  105. package/components/ui/separator.js +1 -68
  106. package/components/ui/sheet.d.ts +1 -1
  107. package/components/ui/sheet.js +1 -127
  108. package/components/ui/skeleton.js +1 -34
  109. package/components/ui/slider.js +1 -79
  110. package/components/ui/sonner.js +1 -45
  111. package/components/ui/switch.js +1 -69
  112. package/components/ui/table.js +1 -109
  113. package/components/ui/tabs.js +1 -82
  114. package/components/ui/textarea.js +1 -66
  115. package/components/ui/theme-switcher.js +1 -152
  116. package/components/ui/toggle.d.ts +2 -2
  117. package/components/ui/toggle.js +1 -87
  118. package/data/admin-dashboard.js +1 -304
  119. package/hooks/use-enhanced-combobox.js +1 -150
  120. package/hooks/use-mobile.js +1 -51
  121. package/hooks/use-outside-click.js +1 -23
  122. package/lib/themes.js +1 -150
  123. package/lib/toast-utils.js +1 -212
  124. package/lib/utils.js +1 -12
  125. package/package.json +9 -90
  126. package/utils/transform-breadcrumbs.js +1 -11
  127. package/utils/transform-navitems.js +1 -33
  128. package/components/aceternity-ui/apple-cards-carousel.d.ts +0 -35
  129. package/components/aceternity-ui/apple-cards-carousel.js +0 -263
  130. package/components/shadcn-example/ai-chat/chat-interface.d.ts +0 -11
  131. package/components/shadcn-example/ai-chat/chat-interface.js +0 -70
  132. package/components/shadcn-example/ai-chat/index.d.ts +0 -38
  133. package/components/shadcn-example/ai-chat/index.js +0 -66
  134. package/components/shadcn-example/ai-chat/sidebar.d.ts +0 -15
  135. package/components/shadcn-example/ai-chat/sidebar.js +0 -68
  136. package/components/shadcn-example/ai-chat/welcome-section.d.ts +0 -12
  137. package/components/shadcn-example/ai-chat/welcome-section.js +0 -26
  138. package/components/shadcn-example/authentication/index.d.ts +0 -24
  139. package/components/shadcn-example/authentication/index.js +0 -59
  140. package/components/shadcn-example/authentication/user-auth-form.d.ts +0 -11
  141. package/components/shadcn-example/authentication/user-auth-form.js +0 -54
  142. package/components/shadcn-example/blog-detail-page/comment-section.d.ts +0 -15
  143. package/components/shadcn-example/blog-detail-page/comment-section.js +0 -83
  144. package/components/shadcn-example/blog-detail-page/content.d.ts +0 -7
  145. package/components/shadcn-example/blog-detail-page/content.js +0 -15
  146. package/components/shadcn-example/blog-detail-page/header.d.ts +0 -11
  147. package/components/shadcn-example/blog-detail-page/header.js +0 -36
  148. package/components/shadcn-example/blog-detail-page/index.d.ts +0 -25
  149. package/components/shadcn-example/blog-detail-page/index.js +0 -74
  150. package/components/shadcn-example/blog-page/blog-post-card.d.ts +0 -13
  151. package/components/shadcn-example/blog-page/blog-post-card.js +0 -30
  152. package/components/shadcn-example/blog-page/featured-post-sidebar-item.d.ts +0 -10
  153. package/components/shadcn-example/blog-page/featured-post-sidebar-item.js +0 -19
  154. package/components/shadcn-example/blog-page/index.d.ts +0 -20
  155. package/components/shadcn-example/blog-page/index.js +0 -36
  156. package/components/shadcn-example/coming-soon/countdown.d.ts +0 -2
  157. package/components/shadcn-example/coming-soon/countdown.js +0 -82
  158. package/components/shadcn-example/coming-soon/index.d.ts +0 -10
  159. package/components/shadcn-example/coming-soon/index.js +0 -41
  160. package/components/shadcn-io/color-picker/index.d.ts +0 -43
  161. package/components/shadcn-io/color-picker/index.js +0 -304
  162. package/components/shadcn-io/copy-button/index.d.ts +0 -16
  163. package/components/shadcn-io/copy-button/index.js +0 -121
  164. package/components/shadcn-io/dropzone/index.d.ts +0 -19
  165. package/components/shadcn-io/dropzone/index.js +0 -131
  166. package/components/shadcn-io/gantt/index.d.ts +0 -145
  167. package/components/shadcn-io/gantt/index.js +0 -766
  168. package/components/shadcn-io/table/index.d.ts +0 -60
  169. package/components/shadcn-io/table/index.js +0 -138
  170. package/templates/appcorp-v1/footer/bottom-bar.d.ts +0 -6
  171. package/templates/appcorp-v1/footer/bottom-bar.js +0 -25
  172. package/templates/appcorp-v1/footer/cta.d.ts +0 -6
  173. package/templates/appcorp-v1/footer/cta.js +0 -21
  174. package/templates/appcorp-v1/footer/footer-grid.d.ts +0 -14
  175. package/templates/appcorp-v1/footer/footer-grid.js +0 -52
  176. package/templates/appcorp-v1/footer/index.d.ts +0 -3
  177. package/templates/appcorp-v1/footer/index.js +0 -28
  178. package/templates/appcorp-v1/footer/newsletter.d.ts +0 -11
  179. package/templates/appcorp-v1/footer/newsletter.js +0 -28
  180. package/templates/appcorp-v1/footer/stats.d.ts +0 -6
  181. package/templates/appcorp-v1/footer/stats.js +0 -15
  182. package/templates/appcorp-v1/header/announcement-bar.d.ts +0 -3
  183. package/templates/appcorp-v1/header/announcement-bar.js +0 -15
  184. package/templates/appcorp-v1/header/dropdown-panel.d.ts +0 -8
  185. package/templates/appcorp-v1/header/dropdown-panel.js +0 -72
  186. package/templates/appcorp-v1/header/index.d.ts +0 -12
  187. package/templates/appcorp-v1/header/index.js +0 -16
  188. package/templates/appcorp-v1/header/mobile-menu.d.ts +0 -14
  189. package/templates/appcorp-v1/header/mobile-menu.js +0 -101
  190. package/templates/appcorp-v1/header/navigation-bar.d.ts +0 -3
  191. package/templates/appcorp-v1/header/navigation-bar.js +0 -117
  192. package/templates/appcorp-v1/header/social-button.d.ts +0 -7
  193. package/templates/appcorp-v1/header/social-button.js +0 -48
  194. package/templates/appcorp-v1/home.d.ts +0 -3
  195. package/templates/appcorp-v1/home.js +0 -27
  196. package/templates/data/appcorp-v1.d.ts +0 -93
  197. package/templates/data/appcorp-v1.js +0 -348
  198. package/templates/data/edupilotpro-v1.d.ts +0 -33
  199. package/templates/data/edupilotpro-v1.js +0 -116
  200. package/templates/data/school-v1.d.ts +0 -328
  201. package/templates/data/school-v1.js +0 -1563
  202. package/templates/edupilotpro-v1/feature-card.d.ts +0 -13
  203. package/templates/edupilotpro-v1/feature-card.js +0 -28
  204. package/templates/edupilotpro-v1/mockups/dashboard-mockup.d.ts +0 -3
  205. package/templates/edupilotpro-v1/mockups/dashboard-mockup.js +0 -55
  206. package/templates/school-v1/footer.d.ts +0 -3
  207. package/templates/school-v1/footer.js +0 -75
  208. package/templates/school-v1/index.d.ts +0 -18
  209. package/templates/school-v1/index.js +0 -60
  210. package/templates/school-v1/navigation.d.ts +0 -3
  211. package/templates/school-v1/navigation.js +0 -123
  212. package/templates/school-v1/sections/about.d.ts +0 -3
  213. package/templates/school-v1/sections/about.js +0 -49
  214. package/templates/school-v1/sections/admissions.d.ts +0 -3
  215. package/templates/school-v1/sections/admissions.js +0 -77
  216. package/templates/school-v1/sections/contact.d.ts +0 -3
  217. package/templates/school-v1/sections/contact.js +0 -67
  218. package/templates/school-v1/sections/faqs.d.ts +0 -3
  219. package/templates/school-v1/sections/faqs.js +0 -50
  220. package/templates/school-v1/sections/hero.d.ts +0 -3
  221. package/templates/school-v1/sections/hero.js +0 -132
  222. package/templates/school-v1/sections/management.d.ts +0 -3
  223. package/templates/school-v1/sections/management.js +0 -34
  224. package/templates/school-v1/sections/policies.d.ts +0 -3
  225. package/templates/school-v1/sections/policies.js +0 -127
  226. package/templates/school-v1/sections/programs.d.ts +0 -3
  227. package/templates/school-v1/sections/programs.js +0 -107
  228. package/templates/school-v1/sections/testimonials.d.ts +0 -3
  229. package/templates/school-v1/sections/testimonials.js +0 -46
  230. package/templates/school-v1/sections/why-choose-us.d.ts +0 -3
  231. package/templates/school-v1/sections/why-choose-us.js +0 -57
@@ -1,109 +1 @@
1
- "use client";
2
- "use strict";
3
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
4
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
5
- return cooked;
6
- };
7
- var __assign = (this && this.__assign) || function () {
8
- __assign = Object.assign || function(t) {
9
- for (var s, i = 1, n = arguments.length; i < n; i++) {
10
- s = arguments[i];
11
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
12
- t[p] = s[p];
13
- }
14
- return t;
15
- };
16
- return __assign.apply(this, arguments);
17
- };
18
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
19
- if (k2 === undefined) k2 = k;
20
- var desc = Object.getOwnPropertyDescriptor(m, k);
21
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
22
- desc = { enumerable: true, get: function() { return m[k]; } };
23
- }
24
- Object.defineProperty(o, k2, desc);
25
- }) : (function(o, m, k, k2) {
26
- if (k2 === undefined) k2 = k;
27
- o[k2] = m[k];
28
- }));
29
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
30
- Object.defineProperty(o, "default", { enumerable: true, value: v });
31
- }) : function(o, v) {
32
- o["default"] = v;
33
- });
34
- var __importStar = (this && this.__importStar) || (function () {
35
- var ownKeys = function(o) {
36
- ownKeys = Object.getOwnPropertyNames || function (o) {
37
- var ar = [];
38
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
39
- return ar;
40
- };
41
- return ownKeys(o);
42
- };
43
- return function (mod) {
44
- if (mod && mod.__esModule) return mod;
45
- var result = {};
46
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
47
- __setModuleDefault(result, mod);
48
- return result;
49
- };
50
- })();
51
- var __rest = (this && this.__rest) || function (s, e) {
52
- var t = {};
53
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
54
- t[p] = s[p];
55
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
56
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
57
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
58
- t[p[i]] = s[p[i]];
59
- }
60
- return t;
61
- };
62
- Object.defineProperty(exports, "__esModule", { value: true });
63
- exports.Calendar = Calendar;
64
- exports.CalendarDayButton = CalendarDayButton;
65
- var React = __importStar(require("react"));
66
- var lucide_react_1 = require("lucide-react");
67
- var react_day_picker_1 = require("react-day-picker");
68
- var utils_1 = require("../../lib/utils");
69
- var button_1 = require("../ui/button");
70
- function Calendar(_a) {
71
- var className = _a.className, classNames = _a.classNames, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, _c = _a.captionLayout, captionLayout = _c === void 0 ? "label" : _c, _d = _a.buttonVariant, buttonVariant = _d === void 0 ? "ghost" : _d, formatters = _a.formatters, components = _a.components, props = __rest(_a, ["className", "classNames", "showOutsideDays", "captionLayout", "buttonVariant", "formatters", "components"]);
72
- var defaultClassNames = (0, react_day_picker_1.getDefaultClassNames)();
73
- return (React.createElement(react_day_picker_1.DayPicker, __assign({ showOutsideDays: showOutsideDays, className: (0, utils_1.cn)("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw(templateObject_1 || (templateObject_1 = __makeTemplateObject(["rtl:**:[.rdp-button_next>svg]:rotate-180"], ["rtl:**:[.rdp-button\\_next>svg]:rotate-180"]))), String.raw(templateObject_2 || (templateObject_2 = __makeTemplateObject(["rtl:**:[.rdp-button_previous>svg]:rotate-180"], ["rtl:**:[.rdp-button\\_previous>svg]:rotate-180"]))), className), captionLayout: captionLayout, formatters: __assign({ formatMonthDropdown: function (date) {
74
- return date.toLocaleString("default", { month: "short" });
75
- } }, formatters), classNames: __assign({ root: (0, utils_1.cn)("w-fit", defaultClassNames.root), months: (0, utils_1.cn)("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months), month: (0, utils_1.cn)("flex w-full flex-col gap-4", defaultClassNames.month), nav: (0, utils_1.cn)("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav), button_previous: (0, utils_1.cn)((0, button_1.buttonVariants)({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_previous), button_next: (0, utils_1.cn)((0, button_1.buttonVariants)({ variant: buttonVariant }), "h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50", defaultClassNames.button_next), month_caption: (0, utils_1.cn)("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]", defaultClassNames.month_caption), dropdowns: (0, utils_1.cn)("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns), dropdown_root: (0, utils_1.cn)("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border", defaultClassNames.dropdown_root), dropdown: (0, utils_1.cn)("bg-popover absolute inset-0 opacity-0", defaultClassNames.dropdown), caption_label: (0, utils_1.cn)("select-none font-medium", captionLayout === "label"
76
- ? "text-sm"
77
- : "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5", defaultClassNames.caption_label), table: "w-full border-collapse", weekdays: (0, utils_1.cn)("flex", defaultClassNames.weekdays), weekday: (0, utils_1.cn)("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal", defaultClassNames.weekday), week: (0, utils_1.cn)("mt-2 flex w-full", defaultClassNames.week), week_number_header: (0, utils_1.cn)("w-[--cell-size] select-none", defaultClassNames.week_number_header), week_number: (0, utils_1.cn)("text-muted-foreground select-none text-[0.8rem]", defaultClassNames.week_number), day: (0, utils_1.cn)("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md", defaultClassNames.day), range_start: (0, utils_1.cn)("bg-accent rounded-l-md", defaultClassNames.range_start), range_middle: (0, utils_1.cn)("rounded-none", defaultClassNames.range_middle), range_end: (0, utils_1.cn)("bg-accent rounded-r-md", defaultClassNames.range_end), today: (0, utils_1.cn)("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today), outside: (0, utils_1.cn)("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside), disabled: (0, utils_1.cn)("text-muted-foreground opacity-50", defaultClassNames.disabled), hidden: (0, utils_1.cn)("invisible", defaultClassNames.hidden) }, classNames), components: __assign({ Root: function (_a) {
78
- var className = _a.className, rootRef = _a.rootRef, props = __rest(_a, ["className", "rootRef"]);
79
- return (React.createElement("div", __assign({ "data-slot": "calendar", ref: rootRef, className: (0, utils_1.cn)(className) }, props)));
80
- }, Chevron: function (_a) {
81
- var className = _a.className, orientation = _a.orientation, props = __rest(_a, ["className", "orientation"]);
82
- if (orientation === "left") {
83
- return (React.createElement(lucide_react_1.ChevronLeftIcon, __assign({ className: (0, utils_1.cn)("size-4", className) }, props)));
84
- }
85
- if (orientation === "right") {
86
- return (React.createElement(lucide_react_1.ChevronRightIcon, __assign({ className: (0, utils_1.cn)("size-4", className) }, props)));
87
- }
88
- return (React.createElement(lucide_react_1.ChevronDownIcon, __assign({ className: (0, utils_1.cn)("size-4", className) }, props)));
89
- }, DayButton: CalendarDayButton, WeekNumber: function (_a) {
90
- var children = _a.children, props = __rest(_a, ["children"]);
91
- return (React.createElement("td", __assign({}, props),
92
- React.createElement("div", { className: "flex size-[--cell-size] items-center justify-center text-center" }, children)));
93
- } }, components) }, props)));
94
- }
95
- function CalendarDayButton(_a) {
96
- var className = _a.className, day = _a.day, modifiers = _a.modifiers, props = __rest(_a, ["className", "day", "modifiers"]);
97
- var defaultClassNames = (0, react_day_picker_1.getDefaultClassNames)();
98
- var ref = React.useRef(null);
99
- React.useEffect(function () {
100
- var _a;
101
- if (modifiers.focused)
102
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
103
- }, [modifiers.focused]);
104
- return (React.createElement(button_1.Button, __assign({ ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
105
- !modifiers.range_start &&
106
- !modifiers.range_end &&
107
- !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: (0, utils_1.cn)("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className) }, props)));
108
- }
109
- var templateObject_1, templateObject_2;
1
+ "use strict";"use client";import*as n from"react";const o=import("./calendar-impl"),t=a=>n.lazy(()=>o.then(e=>({default:e[a]})));export const Calendar=t("Calendar"),CalendarDayButton=t("CalendarDayButton");
@@ -1,96 +1 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || (function () {
30
- var ownKeys = function(o) {
31
- ownKeys = Object.getOwnPropertyNames || function (o) {
32
- var ar = [];
33
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
- return ar;
35
- };
36
- return ownKeys(o);
37
- };
38
- return function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
45
- })();
46
- var __rest = (this && this.__rest) || function (s, e) {
47
- var t = {};
48
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
49
- t[p] = s[p];
50
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
51
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
53
- t[p[i]] = s[p[i]];
54
- }
55
- return t;
56
- };
57
- Object.defineProperty(exports, "__esModule", { value: true });
58
- exports.CardContent = exports.CardDescription = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = void 0;
59
- var React = __importStar(require("react"));
60
- var utils_1 = require("../../lib/utils");
61
- var Card = React.forwardRef(function (_a, ref) {
62
- var className = _a.className, props = __rest(_a, ["className"]);
63
- return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("rounded-xl border bg-card text-card-foreground shadow", className) }, props)));
64
- });
65
- exports.Card = Card;
66
- Card.displayName = "Card";
67
- var CardHeader = React.forwardRef(function (_a, ref) {
68
- var className = _a.className, props = __rest(_a, ["className"]);
69
- return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("flex flex-col space-y-1.5 p-6", className) }, props)));
70
- });
71
- exports.CardHeader = CardHeader;
72
- CardHeader.displayName = "CardHeader";
73
- var CardTitle = React.forwardRef(function (_a, ref) {
74
- var className = _a.className, props = __rest(_a, ["className"]);
75
- return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("font-semibold leading-none tracking-tight", className) }, props)));
76
- });
77
- exports.CardTitle = CardTitle;
78
- CardTitle.displayName = "CardTitle";
79
- var CardDescription = React.forwardRef(function (_a, ref) {
80
- var className = _a.className, props = __rest(_a, ["className"]);
81
- return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("text-sm text-muted-foreground", className) }, props)));
82
- });
83
- exports.CardDescription = CardDescription;
84
- CardDescription.displayName = "CardDescription";
85
- var CardContent = React.forwardRef(function (_a, ref) {
86
- var className = _a.className, props = __rest(_a, ["className"]);
87
- return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("p-6 pt-0", className) }, props)));
88
- });
89
- exports.CardContent = CardContent;
90
- CardContent.displayName = "CardContent";
91
- var CardFooter = React.forwardRef(function (_a, ref) {
92
- var className = _a.className, props = __rest(_a, ["className"]);
93
- return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("flex items-center p-6 pt-0", className) }, props)));
94
- });
95
- exports.CardFooter = CardFooter;
96
- CardFooter.displayName = "CardFooter";
1
+ "use strict";var c=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(a[r[o]]=e[r[o]]);return a};import*as s from"react";import{cn as n}from"../../lib/utils";const l=s.forwardRef((e,t)=>{var{className:a}=e,r=c(e,["className"]);return s.createElement("div",Object.assign({ref:t,className:n("rounded-xl border bg-card text-card-foreground shadow",a)},r))});l.displayName="Card";const d=s.forwardRef((e,t)=>{var{className:a}=e,r=c(e,["className"]);return s.createElement("div",Object.assign({ref:t,className:n("flex flex-col space-y-1.5 p-6",a)},r))});d.displayName="CardHeader";const m=s.forwardRef((e,t)=>{var{className:a}=e,r=c(e,["className"]);return s.createElement("div",Object.assign({ref:t,className:n("font-semibold leading-none tracking-tight",a)},r))});m.displayName="CardTitle";const p=s.forwardRef((e,t)=>{var{className:a}=e,r=c(e,["className"]);return s.createElement("div",Object.assign({ref:t,className:n("text-sm text-muted-foreground",a)},r))});p.displayName="CardDescription";const f=s.forwardRef((e,t)=>{var{className:a}=e,r=c(e,["className"]);return s.createElement("div",Object.assign({ref:t,className:n("p-6 pt-0",a)},r))});f.displayName="CardContent";const i=s.forwardRef((e,t)=>{var{className:a}=e,r=c(e,["className"]);return s.createElement("div",Object.assign({ref:t,className:n("flex items-center p-6 pt-0",a)},r))});i.displayName="CardFooter";export{l as Card,d as CardHeader,i as CardFooter,m as CardTitle,p as CardDescription,f as CardContent};
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
3
+ type CarouselApi = UseEmblaCarouselType[1];
4
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
5
+ type CarouselOptions = UseCarouselParameters[0];
6
+ type CarouselPlugin = UseCarouselParameters[1];
7
+ type CarouselProps = {
8
+ opts?: CarouselOptions;
9
+ plugins?: CarouselPlugin;
10
+ orientation?: "horizontal" | "vertical";
11
+ setApi?: (api: CarouselApi) => void;
12
+ };
13
+ declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
14
+ declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("../ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
+ declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("../ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
+ export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -0,0 +1 @@
1
+ "use strict";"use client";var p=function(t,s){var l={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.indexOf(r)<0&&(l[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a<r.length;a++)s.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(l[r[a]]=t[r[a]]);return l};import*as e from"react";import k from"embla-carousel-react";import{cn as d}from"../../lib/utils";import{Button as b}from"../ui/button";import{ArrowLeftIcon as A,ArrowRightIcon as I}from"@radix-ui/react-icons";const h=e.createContext(null);function v(){const t=e.useContext(h);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}const w=e.forwardRef((t,s)=>{var{orientation:l="horizontal",opts:r,setApi:a,plugins:i,className:c,children:u}=t,f=p(t,["orientation","opts","setApi","plugins","className","children"]);const[O,o]=k(Object.assign(Object.assign({},r),{axis:l==="horizontal"?"x":"y"}),i),[P,z]=e.useState(!1),[S,j]=e.useState(!1),m=e.useCallback(n=>{n&&(z(n.canScrollPrev()),j(n.canScrollNext()))},[]),N=e.useCallback(()=>{o?.scrollPrev()},[o]),C=e.useCallback(()=>{o?.scrollNext()},[o]),R=e.useCallback(n=>{n.key==="ArrowLeft"?(n.preventDefault(),N()):n.key==="ArrowRight"&&(n.preventDefault(),C())},[N,C]);return e.useEffect(()=>{!o||!a||a(o)},[o,a]),e.useEffect(()=>{if(o)return m(o),o.on("reInit",m),o.on("select",m),()=>{o?.off("select",m)}},[o,m]),e.createElement(h.Provider,{value:{carouselRef:O,api:o,opts:r,orientation:l||(r?.axis==="y"?"vertical":"horizontal"),scrollPrev:N,scrollNext:C,canScrollPrev:P,canScrollNext:S}},e.createElement("div",Object.assign({ref:s,onKeyDownCapture:R,className:d("relative",c),role:"region","aria-roledescription":"carousel"},f),u))});w.displayName="Carousel";const x=e.forwardRef((t,s)=>{var{className:l}=t,r=p(t,["className"]);const{carouselRef:a,orientation:i}=v();return e.createElement("div",{ref:a,className:"overflow-hidden"},e.createElement("div",Object.assign({ref:s,className:d("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col",l)},r)))});x.displayName="CarouselContent";const y=e.forwardRef((t,s)=>{var{className:l}=t,r=p(t,["className"]);const{orientation:a}=v();return e.createElement("div",Object.assign({ref:s,role:"group","aria-roledescription":"slide",className:d("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",l)},r))});y.displayName="CarouselItem";const g=e.forwardRef((t,s)=>{var{className:l,variant:r="outline",size:a="icon"}=t,i=p(t,["className","variant","size"]);const{orientation:c,scrollPrev:u,canScrollPrev:f}=v();return e.createElement(b,Object.assign({ref:s,variant:r,size:a,className:d("absolute h-8 w-8 rounded-full",c==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!f,onClick:u},i),e.createElement(A,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Previous slide"))});g.displayName="CarouselPrevious";const E=e.forwardRef((t,s)=>{var{className:l,variant:r="outline",size:a="icon"}=t,i=p(t,["className","variant","size"]);const{orientation:c,scrollNext:u,canScrollNext:f}=v();return e.createElement(b,Object.assign({ref:s,variant:r,size:a,className:d("absolute h-8 w-8 rounded-full",c==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!f,onClick:u},i),e.createElement(I,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Next slide"))});E.displayName="CarouselNext";export{w as Carousel,x as CarouselContent,y as CarouselItem,g as CarouselPrevious,E as CarouselNext};
@@ -1,18 +1,6 @@
1
- import * as React from "react";
2
- import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
3
- type CarouselApi = UseEmblaCarouselType[1];
4
- type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
5
- type CarouselOptions = UseCarouselParameters[0];
6
- type CarouselPlugin = UseCarouselParameters[1];
7
- type CarouselProps = {
8
- opts?: CarouselOptions;
9
- plugins?: CarouselPlugin;
10
- orientation?: "horizontal" | "vertical";
11
- setApi?: (api: CarouselApi) => void;
12
- };
13
- declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
14
- declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
- declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
- declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("../ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
- declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("../ui/button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
- export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
1
+ export type { CarouselApi } from "./carousel-impl";
2
+ export declare const Carousel: typeof import("./carousel-impl")["Carousel"];
3
+ export declare const CarouselContent: typeof import("./carousel-impl")["CarouselContent"];
4
+ export declare const CarouselItem: typeof import("./carousel-impl")["CarouselItem"];
5
+ export declare const CarouselPrevious: typeof import("./carousel-impl")["CarouselPrevious"];
6
+ export declare const CarouselNext: typeof import("./carousel-impl")["CarouselNext"];
@@ -1,171 +1 @@
1
- "use client";
2
- "use strict";
3
- var __assign = (this && this.__assign) || function () {
4
- __assign = Object.assign || function(t) {
5
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6
- s = arguments[i];
7
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
- t[p] = s[p];
9
- }
10
- return t;
11
- };
12
- return __assign.apply(this, arguments);
13
- };
14
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- var desc = Object.getOwnPropertyDescriptor(m, k);
17
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
- desc = { enumerable: true, get: function() { return m[k]; } };
19
- }
20
- Object.defineProperty(o, k2, desc);
21
- }) : (function(o, m, k, k2) {
22
- if (k2 === undefined) k2 = k;
23
- o[k2] = m[k];
24
- }));
25
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
- Object.defineProperty(o, "default", { enumerable: true, value: v });
27
- }) : function(o, v) {
28
- o["default"] = v;
29
- });
30
- var __importStar = (this && this.__importStar) || (function () {
31
- var ownKeys = function(o) {
32
- ownKeys = Object.getOwnPropertyNames || function (o) {
33
- var ar = [];
34
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
- return ar;
36
- };
37
- return ownKeys(o);
38
- };
39
- return function (mod) {
40
- if (mod && mod.__esModule) return mod;
41
- var result = {};
42
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
- __setModuleDefault(result, mod);
44
- return result;
45
- };
46
- })();
47
- var __rest = (this && this.__rest) || function (s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- };
58
- var __importDefault = (this && this.__importDefault) || function (mod) {
59
- return (mod && mod.__esModule) ? mod : { "default": mod };
60
- };
61
- Object.defineProperty(exports, "__esModule", { value: true });
62
- exports.CarouselNext = exports.CarouselPrevious = exports.CarouselItem = exports.CarouselContent = exports.Carousel = void 0;
63
- var React = __importStar(require("react"));
64
- var embla_carousel_react_1 = __importDefault(require("embla-carousel-react"));
65
- var utils_1 = require("../../lib/utils");
66
- var button_1 = require("../ui/button");
67
- var react_icons_1 = require("@radix-ui/react-icons");
68
- var CarouselContext = React.createContext(null);
69
- function useCarousel() {
70
- var context = React.useContext(CarouselContext);
71
- if (!context) {
72
- throw new Error("useCarousel must be used within a <Carousel />");
73
- }
74
- return context;
75
- }
76
- var Carousel = React.forwardRef(function (_a, ref) {
77
- var _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, opts = _a.opts, setApi = _a.setApi, plugins = _a.plugins, className = _a.className, children = _a.children, props = __rest(_a, ["orientation", "opts", "setApi", "plugins", "className", "children"]);
78
- var _c = (0, embla_carousel_react_1.default)(__assign(__assign({}, opts), { axis: orientation === "horizontal" ? "x" : "y" }), plugins), carouselRef = _c[0], api = _c[1];
79
- var _d = React.useState(false), canScrollPrev = _d[0], setCanScrollPrev = _d[1];
80
- var _e = React.useState(false), canScrollNext = _e[0], setCanScrollNext = _e[1];
81
- var onSelect = React.useCallback(function (api) {
82
- if (!api) {
83
- return;
84
- }
85
- setCanScrollPrev(api.canScrollPrev());
86
- setCanScrollNext(api.canScrollNext());
87
- }, []);
88
- var scrollPrev = React.useCallback(function () {
89
- api === null || api === void 0 ? void 0 : api.scrollPrev();
90
- }, [api]);
91
- var scrollNext = React.useCallback(function () {
92
- api === null || api === void 0 ? void 0 : api.scrollNext();
93
- }, [api]);
94
- var handleKeyDown = React.useCallback(function (event) {
95
- if (event.key === "ArrowLeft") {
96
- event.preventDefault();
97
- scrollPrev();
98
- }
99
- else if (event.key === "ArrowRight") {
100
- event.preventDefault();
101
- scrollNext();
102
- }
103
- }, [scrollPrev, scrollNext]);
104
- React.useEffect(function () {
105
- if (!api || !setApi) {
106
- return;
107
- }
108
- setApi(api);
109
- }, [api, setApi]);
110
- React.useEffect(function () {
111
- if (!api) {
112
- return;
113
- }
114
- onSelect(api);
115
- api.on("reInit", onSelect);
116
- api.on("select", onSelect);
117
- return function () {
118
- api === null || api === void 0 ? void 0 : api.off("select", onSelect);
119
- };
120
- }, [api, onSelect]);
121
- return (React.createElement(CarouselContext.Provider, { value: {
122
- carouselRef: carouselRef,
123
- api: api,
124
- opts: opts,
125
- orientation: orientation || ((opts === null || opts === void 0 ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
126
- scrollPrev: scrollPrev,
127
- scrollNext: scrollNext,
128
- canScrollPrev: canScrollPrev,
129
- canScrollNext: canScrollNext,
130
- } },
131
- React.createElement("div", __assign({ ref: ref, onKeyDownCapture: handleKeyDown, className: (0, utils_1.cn)("relative", className), role: "region", "aria-roledescription": "carousel" }, props), children)));
132
- });
133
- exports.Carousel = Carousel;
134
- Carousel.displayName = "Carousel";
135
- var CarouselContent = React.forwardRef(function (_a, ref) {
136
- var className = _a.className, props = __rest(_a, ["className"]);
137
- var _b = useCarousel(), carouselRef = _b.carouselRef, orientation = _b.orientation;
138
- return (React.createElement("div", { ref: carouselRef, className: "overflow-hidden" },
139
- React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className) }, props))));
140
- });
141
- exports.CarouselContent = CarouselContent;
142
- CarouselContent.displayName = "CarouselContent";
143
- var CarouselItem = React.forwardRef(function (_a, ref) {
144
- var className = _a.className, props = __rest(_a, ["className"]);
145
- var orientation = useCarousel().orientation;
146
- return (React.createElement("div", __assign({ ref: ref, role: "group", "aria-roledescription": "slide", className: (0, utils_1.cn)("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className) }, props)));
147
- });
148
- exports.CarouselItem = CarouselItem;
149
- CarouselItem.displayName = "CarouselItem";
150
- var CarouselPrevious = React.forwardRef(function (_a, ref) {
151
- var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]);
152
- var _d = useCarousel(), orientation = _d.orientation, scrollPrev = _d.scrollPrev, canScrollPrev = _d.canScrollPrev;
153
- return (React.createElement(button_1.Button, __assign({ ref: ref, variant: variant, size: size, className: (0, utils_1.cn)("absolute h-8 w-8 rounded-full", orientation === "horizontal"
154
- ? "-left-12 top-1/2 -translate-y-1/2"
155
- : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev }, props),
156
- React.createElement(react_icons_1.ArrowLeftIcon, { className: "h-4 w-4" }),
157
- React.createElement("span", { className: "sr-only" }, "Previous slide")));
158
- });
159
- exports.CarouselPrevious = CarouselPrevious;
160
- CarouselPrevious.displayName = "CarouselPrevious";
161
- var CarouselNext = React.forwardRef(function (_a, ref) {
162
- var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]);
163
- var _d = useCarousel(), orientation = _d.orientation, scrollNext = _d.scrollNext, canScrollNext = _d.canScrollNext;
164
- return (React.createElement(button_1.Button, __assign({ ref: ref, variant: variant, size: size, className: (0, utils_1.cn)("absolute h-8 w-8 rounded-full", orientation === "horizontal"
165
- ? "-right-12 top-1/2 -translate-y-1/2"
166
- : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext }, props),
167
- React.createElement(react_icons_1.ArrowRightIcon, { className: "h-4 w-4" }),
168
- React.createElement("span", { className: "sr-only" }, "Next slide")));
169
- });
170
- exports.CarouselNext = CarouselNext;
171
- CarouselNext.displayName = "CarouselNext";
1
+ "use strict";"use client";import*as s from"react";const r=import("./carousel-impl"),o=e=>s.lazy(()=>r.then(t=>({default:t[e]})));export const Carousel=o("Carousel"),CarouselContent=o("CarouselContent"),CarouselItem=o("CarouselItem"),CarouselPrevious=o("CarouselPrevious"),CarouselNext=o("CarouselNext");
@@ -0,0 +1,62 @@
1
+ import * as React from "react";
2
+ import * as RechartsPrimitive from "recharts";
3
+ declare const THEMES: {
4
+ readonly light: "";
5
+ readonly dark: ".dark";
6
+ };
7
+ export type ChartConfig = {
8
+ [k in string]: {
9
+ label?: React.ReactNode;
10
+ icon?: React.ComponentType;
11
+ } & ({
12
+ color?: string;
13
+ theme?: never;
14
+ } | {
15
+ color?: never;
16
+ theme: Record<keyof typeof THEMES, string>;
17
+ });
18
+ };
19
+ declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
20
+ config: ChartConfig;
21
+ children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
22
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const ChartStyle: ({ id, config }: {
24
+ id: string;
25
+ config: ChartConfig;
26
+ }) => React.JSX.Element | null;
27
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
+ declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
29
+ active?: boolean;
30
+ payload?: Array<{
31
+ name?: string;
32
+ dataKey?: string;
33
+ value?: number;
34
+ type?: string;
35
+ color?: string;
36
+ payload?: Record<string, unknown>;
37
+ fill?: string;
38
+ }>;
39
+ label?: string;
40
+ labelFormatter?: (label: string, payload: unknown[]) => React.ReactNode;
41
+ formatter?: (value: unknown, name: string, item: unknown, index: number, payload: unknown) => React.ReactNode;
42
+ hideLabel?: boolean;
43
+ hideIndicator?: boolean;
44
+ indicator?: "line" | "dot" | "dashed";
45
+ nameKey?: string;
46
+ labelKey?: string;
47
+ labelClassName?: string;
48
+ color?: string;
49
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
50
+ declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
51
+ declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
52
+ payload?: Array<{
53
+ value?: string;
54
+ dataKey?: string;
55
+ type?: string;
56
+ color?: string;
57
+ }>;
58
+ verticalAlign?: "top" | "bottom";
59
+ hideIcon?: boolean;
60
+ nameKey?: string;
61
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
62
+ export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -0,0 +1,7 @@
1
+ "use strict";"use client";var R=function(o,e){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&e.indexOf(t)<0&&(n[t]=o[t]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,t=Object.getOwnPropertySymbols(o);s<t.length;s++)e.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(o,t[s])&&(n[t[s]]=o[t[s]]);return n};import*as r from"react";import*as C from"recharts";import{cn as v}from"../../lib/utils";const T={light:"",dark:".dark"},y=r.createContext(null);function k(){const o=r.useContext(y);if(!o)throw new Error("useChart must be used within a <ChartContainer />");return o}const N=r.forwardRef((o,e)=>{var{id:n,className:t,children:s,config:m}=o,i=R(o,["id","className","children","config"]);const a=r.useId(),d=`chart-${n||a.replace(/:/g,"")}`;return r.createElement(y.Provider,{value:{config:m}},r.createElement("div",Object.assign({"data-chart":d,ref:e,className:v("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t)},i),r.createElement(j,{id:d,config:m}),r.createElement(C.ResponsiveContainer,null,s)))});N.displayName="Chart";const j=({id:o,config:e})=>{const n=Object.entries(e).filter(([,t])=>t.theme||t.color);return n.length?r.createElement("style",{dangerouslySetInnerHTML:{__html:Object.entries(T).map(([t,s])=>`
2
+ ${s} [data-chart=${o}] {
3
+ ${n.map(([m,i])=>{var a;const d=((a=i.theme)===null||a===void 0?void 0:a[t])||i.color;return d?` --color-${m}: ${d};`:null}).join(`
4
+ `)}
5
+ }
6
+ `).join(`
7
+ `)}}):null},I=C.Tooltip,O=r.forwardRef(({active:o,payload:e,className:n,indicator:t="dot",hideLabel:s=!1,hideIndicator:m=!1,label:i,labelFormatter:a,labelClassName:d,formatter:u,color:L,nameKey:P,labelKey:x},S)=>{const{config:p}=k(),_=r.useMemo(()=>{var l;if(s||!e?.length)return null;const[f]=e,g=`${x||f?.dataKey||f?.name||"value"}`,h=E(p,f,g),c=!x&&typeof i=="string"?((l=p[i])===null||l===void 0?void 0:l.label)||i:h?.label;return a?r.createElement("div",{className:v("font-medium",d)},a(String(c??""),e??[])):c?r.createElement("div",{className:v("font-medium",d)},c):null},[i,a,e,s,d,p,x]);if(!o||!e?.length)return null;const b=e.length===1&&t!=="dot";return r.createElement("div",{ref:S,className:v("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n)},b?null:_,r.createElement("div",{className:"grid gap-1.5"},e.filter(l=>l.type!=="none").map((l,f)=>{var g;const h=`${P||l.name||l.dataKey||"value"}`,c=E(p,l,h),w=L||((g=l.payload)===null||g===void 0?void 0:g.fill)||l.color;return r.createElement("div",{key:l.dataKey,className:v("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",t==="dot"&&"items-center")},u&&l?.value!==void 0&&l.name?u(l.value,l.name,l,f,l.payload):r.createElement(r.Fragment,null,c?.icon?r.createElement(c.icon,null):!m&&r.createElement("div",{className:v("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":t==="dot","w-1":t==="line","w-0 border-[1.5px] border-dashed bg-transparent":t==="dashed","my-0.5":b&&t==="dashed"}),style:{"--color-bg":w,"--color-border":w}}),r.createElement("div",{className:v("flex flex-1 justify-between leading-none",b?"items-end":"items-center")},r.createElement("div",{className:"grid gap-1.5"},b?_:null,r.createElement("span",{className:"text-muted-foreground"},c?.label||l.name)),l.value&&r.createElement("span",{className:"font-mono font-medium tabular-nums text-foreground"},l.value.toLocaleString()))))})))});O.displayName="ChartTooltip";const K=C.Legend,$=r.forwardRef(({className:o,hideIcon:e=!1,payload:n,verticalAlign:t="bottom",nameKey:s},m)=>{const{config:i}=k();return n?.length?r.createElement("div",{ref:m,className:v("flex items-center justify-center gap-4",t==="top"?"pb-3":"pt-3",o)},n.filter(a=>a.type!=="none").map(a=>{const d=`${s||a.dataKey||"value"}`,u=E(i,a,d);return r.createElement("div",{key:a.value,className:v("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground")},u?.icon&&!e?r.createElement(u.icon,null):r.createElement("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:a.color}}),u?.label)})):null});$.displayName="ChartLegend";function E(o,e,n){if(typeof e!="object"||e===null)return;const t="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let s=n;return n in e&&typeof e[n]=="string"?s=e[n]:t&&n in t&&typeof t[n]=="string"&&(s=t[n]),s in o?o[s]:o[n]}export{N as ChartContainer,I as ChartTooltip,O as ChartTooltipContent,K as ChartLegend,$ as ChartLegendContent,j as ChartStyle};
@@ -1,62 +1,7 @@
1
- import * as React from "react";
2
- import * as RechartsPrimitive from "recharts";
3
- declare const THEMES: {
4
- readonly light: "";
5
- readonly dark: ".dark";
6
- };
7
- export type ChartConfig = {
8
- [k in string]: {
9
- label?: React.ReactNode;
10
- icon?: React.ComponentType;
11
- } & ({
12
- color?: string;
13
- theme?: never;
14
- } | {
15
- color?: never;
16
- theme: Record<keyof typeof THEMES, string>;
17
- });
18
- };
19
- declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
20
- config: ChartConfig;
21
- children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
22
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
- declare const ChartStyle: ({ id, config }: {
24
- id: string;
25
- config: ChartConfig;
26
- }) => React.JSX.Element | null;
27
- declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
- declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
29
- active?: boolean;
30
- payload?: Array<{
31
- name?: string;
32
- dataKey?: string;
33
- value?: number;
34
- type?: string;
35
- color?: string;
36
- payload?: Record<string, unknown>;
37
- fill?: string;
38
- }>;
39
- label?: string;
40
- labelFormatter?: (label: string, payload: unknown[]) => React.ReactNode;
41
- formatter?: (value: unknown, name: string, item: unknown, index: number, payload: unknown) => React.ReactNode;
42
- hideLabel?: boolean;
43
- hideIndicator?: boolean;
44
- indicator?: "line" | "dot" | "dashed";
45
- nameKey?: string;
46
- labelKey?: string;
47
- labelClassName?: string;
48
- color?: string;
49
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
50
- declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
51
- declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
52
- payload?: Array<{
53
- value?: string;
54
- dataKey?: string;
55
- type?: string;
56
- color?: string;
57
- }>;
58
- verticalAlign?: "top" | "bottom";
59
- hideIcon?: boolean;
60
- nameKey?: string;
61
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
62
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
1
+ export type { ChartConfig } from "./chart-impl";
2
+ export declare const ChartContainer: typeof import("./chart-impl")["ChartContainer"];
3
+ export declare const ChartTooltip: typeof import("./chart-impl")["ChartTooltip"];
4
+ export declare const ChartTooltipContent: typeof import("./chart-impl")["ChartTooltipContent"];
5
+ export declare const ChartLegend: typeof import("./chart-impl")["ChartLegend"];
6
+ export declare const ChartLegendContent: typeof import("./chart-impl")["ChartLegendContent"];
7
+ export declare const ChartStyle: typeof import("./chart-impl")["ChartStyle"];