@arch-cadre/ui 0.0.11 → 0.0.16

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 (255) hide show
  1. package/build.config.ts +23 -0
  2. package/dist/components/.gitkeep +0 -0
  3. package/dist/components/accordion.cjs +62 -0
  4. package/dist/components/accordion.d.ts +7 -0
  5. package/dist/components/accordion.mjs +58 -0
  6. package/dist/components/alert-dialog.cjs +127 -0
  7. package/dist/components/alert-dialog.d.ts +14 -0
  8. package/dist/components/alert-dialog.mjs +144 -0
  9. package/dist/components/alert.cjs +58 -0
  10. package/dist/components/alert.d.ts +9 -0
  11. package/dist/components/alert.mjs +62 -0
  12. package/dist/components/aspect-ratio.cjs +19 -0
  13. package/dist/components/aspect-ratio.d.ts +4 -0
  14. package/dist/components/aspect-ratio.mjs +9 -0
  15. package/dist/components/avatar.cjs +44 -0
  16. package/dist/components/avatar.d.ts +6 -0
  17. package/dist/components/avatar.mjs +50 -0
  18. package/dist/components/badge.cjs +41 -0
  19. package/dist/components/badge.d.ts +9 -0
  20. package/dist/components/badge.mjs +37 -0
  21. package/dist/components/breadcrumb.cjs +106 -0
  22. package/dist/components/breadcrumb.d.ts +11 -0
  23. package/dist/components/breadcrumb.mjs +105 -0
  24. package/dist/components/button-group.cjs +65 -0
  25. package/dist/components/button-group.d.ts +12 -0
  26. package/dist/components/button-group.mjs +76 -0
  27. package/dist/components/button.cjs +57 -0
  28. package/dist/components/button.d.ts +10 -0
  29. package/dist/components/button.mjs +51 -0
  30. package/dist/components/calendar.cjs +143 -0
  31. package/dist/components/calendar.d.ts +8 -0
  32. package/dist/components/calendar.mjs +191 -0
  33. package/dist/components/card.cjs +86 -0
  34. package/dist/components/card.d.ts +9 -0
  35. package/dist/components/card.mjs +90 -0
  36. package/dist/components/checkbox.cjs +28 -0
  37. package/dist/components/checkbox.d.ts +4 -0
  38. package/dist/components/checkbox.mjs +30 -0
  39. package/dist/components/collapsible.cjs +37 -0
  40. package/dist/components/collapsible.d.ts +6 -0
  41. package/dist/components/collapsible.mjs +31 -0
  42. package/dist/components/command.cjs +125 -0
  43. package/dist/components/command.d.ts +18 -0
  44. package/dist/components/command.mjs +169 -0
  45. package/dist/components/context-menu.cjs +188 -0
  46. package/dist/components/context-menu.d.ts +25 -0
  47. package/dist/components/context-menu.mjs +218 -0
  48. package/dist/components/dialog.cjs +123 -0
  49. package/dist/components/dialog.d.ts +15 -0
  50. package/dist/components/dialog.mjs +130 -0
  51. package/dist/components/drawer.cjs +118 -0
  52. package/dist/components/drawer.d.ts +13 -0
  53. package/dist/components/drawer.mjs +124 -0
  54. package/dist/components/dropdown-menu.cjs +190 -0
  55. package/dist/components/dropdown-menu.d.ts +25 -0
  56. package/dist/components/dropdown-menu.mjs +226 -0
  57. package/dist/components/empty.cjs +92 -0
  58. package/dist/components/empty.d.ts +12 -0
  59. package/dist/components/empty.mjs +102 -0
  60. package/dist/components/field.cjs +173 -0
  61. package/dist/components/field.d.ts +25 -0
  62. package/dist/components/field.mjs +228 -0
  63. package/dist/components/form.cjs +143 -0
  64. package/dist/components/form.d.ts +23 -0
  65. package/dist/components/form.mjs +123 -0
  66. package/dist/components/hover-card.cjs +46 -0
  67. package/dist/components/hover-card.d.ts +6 -0
  68. package/dist/components/hover-card.mjs +35 -0
  69. package/dist/components/input-group.cjs +130 -0
  70. package/dist/components/input-group.d.ts +16 -0
  71. package/dist/components/input-group.mjs +155 -0
  72. package/dist/components/input-otp.cjs +69 -0
  73. package/dist/components/input-otp.d.ts +11 -0
  74. package/dist/components/input-otp.mjs +59 -0
  75. package/dist/components/input.cjs +22 -0
  76. package/dist/components/input.d.ts +3 -0
  77. package/dist/components/input.mjs +19 -0
  78. package/dist/components/item.cjs +168 -0
  79. package/dist/components/item.d.ts +23 -0
  80. package/dist/components/item.mjs +187 -0
  81. package/dist/components/kbd.cjs +31 -0
  82. package/dist/components/kbd.d.ts +4 -0
  83. package/dist/components/kbd.mjs +28 -0
  84. package/dist/components/label.cjs +22 -0
  85. package/dist/components/label.d.ts +4 -0
  86. package/dist/components/label.mjs +21 -0
  87. package/dist/components/language-switcher.cjs +43 -0
  88. package/dist/components/language-switcher.d.ts +2 -0
  89. package/dist/components/language-switcher.mjs +30 -0
  90. package/dist/components/menubar.cjs +207 -0
  91. package/dist/components/menubar.d.ts +26 -0
  92. package/dist/components/menubar.mjs +246 -0
  93. package/dist/components/navigation-menu.cjs +113 -0
  94. package/dist/components/navigation-menu.d.ts +14 -0
  95. package/dist/components/navigation-menu.mjs +166 -0
  96. package/dist/components/pagination.cjs +106 -0
  97. package/dist/components/pagination.d.ts +15 -0
  98. package/dist/components/pagination.mjs +116 -0
  99. package/dist/components/popover.cjs +53 -0
  100. package/dist/components/popover.d.ts +7 -0
  101. package/dist/components/popover.mjs +40 -0
  102. package/dist/components/progress.cjs +29 -0
  103. package/dist/components/progress.d.ts +4 -0
  104. package/dist/components/progress.mjs +30 -0
  105. package/dist/components/radio-group.cjs +39 -0
  106. package/dist/components/radio-group.d.ts +5 -0
  107. package/dist/components/radio-group.mjs +43 -0
  108. package/dist/components/scroll-area.cjs +45 -0
  109. package/dist/components/scroll-area.d.ts +7 -0
  110. package/dist/components/scroll-area.mjs +59 -0
  111. package/dist/components/select.cjs +140 -0
  112. package/dist/components/select.d.ts +15 -0
  113. package/dist/components/select.mjs +173 -0
  114. package/dist/components/separator.cjs +26 -0
  115. package/dist/components/separator.d.ts +4 -0
  116. package/dist/components/separator.mjs +25 -0
  117. package/dist/components/sheet.cjs +120 -0
  118. package/dist/components/sheet.d.ts +13 -0
  119. package/dist/components/sheet.mjs +119 -0
  120. package/dist/components/sidebar.cjs +508 -0
  121. package/dist/components/sidebar.d.ts +69 -0
  122. package/dist/components/sidebar.mjs +635 -0
  123. package/dist/components/skeleton.cjs +20 -0
  124. package/dist/components/skeleton.d.ts +3 -0
  125. package/dist/components/skeleton.mjs +13 -0
  126. package/dist/components/slider.cjs +43 -0
  127. package/dist/components/slider.d.ts +4 -0
  128. package/dist/components/slider.mjs +59 -0
  129. package/dist/components/sonner.cjs +49 -0
  130. package/dist/components/sonner.d.ts +4 -0
  131. package/dist/components/sonner.mjs +36 -0
  132. package/dist/components/spinner.cjs +22 -0
  133. package/dist/components/spinner.d.ts +3 -0
  134. package/dist/components/spinner.mjs +15 -0
  135. package/dist/components/switch.cjs +25 -0
  136. package/dist/components/switch.d.ts +4 -0
  137. package/dist/components/switch.mjs +30 -0
  138. package/dist/components/table.cjs +101 -0
  139. package/dist/components/table.d.ts +10 -0
  140. package/dist/components/table.mjs +115 -0
  141. package/dist/components/tabs.cjs +55 -0
  142. package/dist/components/tabs.d.ts +7 -0
  143. package/dist/components/tabs.mjs +63 -0
  144. package/dist/components/textarea.cjs +20 -0
  145. package/dist/components/textarea.d.ts +3 -0
  146. package/dist/components/textarea.mjs +16 -0
  147. package/dist/components/toggle-group.cjs +65 -0
  148. package/dist/components/toggle-group.d.ts +9 -0
  149. package/dist/components/toggle-group.mjs +65 -0
  150. package/dist/components/toggle.cjs +47 -0
  151. package/dist/components/toggle.d.ts +9 -0
  152. package/dist/components/toggle.mjs +41 -0
  153. package/dist/components/tooltip.cjs +56 -0
  154. package/dist/components/tooltip.d.ts +7 -0
  155. package/dist/components/tooltip.mjs +49 -0
  156. package/dist/hooks/.gitkeep +0 -0
  157. package/dist/hooks/use-mobile.cjs +23 -0
  158. package/dist/hooks/use-mobile.d.ts +1 -0
  159. package/dist/hooks/use-mobile.mjs +17 -0
  160. package/dist/hooks/use-user.cjs +21 -0
  161. package/dist/hooks/use-user.d.ts +12 -0
  162. package/dist/hooks/use-user.mjs +12 -0
  163. package/dist/index.cjs +179 -0
  164. package/dist/index.d.ts +15 -0
  165. package/dist/index.mjs +15 -0
  166. package/dist/lib/utils.cjs +11 -0
  167. package/dist/lib/utils.d.ts +2 -0
  168. package/dist/lib/utils.mjs +5 -0
  169. package/dist/logo.cjs +49 -0
  170. package/dist/logo.d.ts +15 -0
  171. package/dist/logo.mjs +32 -0
  172. package/dist/postcss.config.cjs +13 -0
  173. package/dist/postcss.config.d.mts +3 -0
  174. package/dist/postcss.config.mjs +6 -0
  175. package/dist/providers/auth-provider.cjs +44 -0
  176. package/dist/providers/auth-provider.d.ts +15 -0
  177. package/dist/providers/auth-provider.mjs +37 -0
  178. package/dist/providers/index.cjs +47 -0
  179. package/dist/providers/index.d.ts +7 -0
  180. package/dist/providers/index.mjs +33 -0
  181. package/dist/shared/access-denied.cjs +38 -0
  182. package/dist/shared/access-denied.d.ts +2 -0
  183. package/dist/shared/access-denied.mjs +12 -0
  184. package/dist/shared/loader.cjs +95 -0
  185. package/dist/shared/loader.d.ts +11 -0
  186. package/dist/shared/loader.mjs +98 -0
  187. package/dist/shared/page-loader.cjs +23 -0
  188. package/dist/shared/page-loader.d.ts +7 -0
  189. package/dist/shared/page-loader.mjs +6 -0
  190. package/dist/shared/scroll-fade-effect.cjs +21 -0
  191. package/dist/shared/scroll-fade-effect.d.ts +4 -0
  192. package/dist/shared/scroll-fade-effect.mjs +20 -0
  193. package/dist/styles/globals.css +1 -0
  194. package/package.json +58 -49
  195. package/scripts/switchToDist.js +55 -0
  196. package/scripts/switchToSrc.js +52 -0
  197. package/src/components/accordion.tsx +2 -2
  198. package/src/components/alert-dialog.tsx +1 -1
  199. package/src/components/alert.tsx +1 -1
  200. package/src/components/aspect-ratio.tsx +2 -1
  201. package/src/components/avatar.tsx +1 -1
  202. package/src/components/badge.tsx +3 -3
  203. package/src/components/breadcrumb.tsx +5 -3
  204. package/src/components/button-group.tsx +4 -2
  205. package/src/components/button.tsx +3 -3
  206. package/src/components/calendar.tsx +2 -2
  207. package/src/components/checkbox.tsx +2 -2
  208. package/src/components/collapsible.tsx +2 -1
  209. package/src/components/command.tsx +1 -1
  210. package/src/components/context-menu.tsx +2 -2
  211. package/src/components/dialog.tsx +2 -2
  212. package/src/components/dropdown-menu.tsx +2 -2
  213. package/src/components/empty.tsx +1 -0
  214. package/src/components/field.tsx +5 -2
  215. package/src/components/form.tsx +9 -7
  216. package/src/components/hover-card.tsx +1 -1
  217. package/src/components/input-group.tsx +1 -1
  218. package/src/components/input-otp.tsx +1 -1
  219. package/src/components/item.tsx +3 -3
  220. package/src/components/kbd.tsx +1 -0
  221. package/src/components/label.tsx +1 -1
  222. package/src/components/language-switcher.tsx +16 -17
  223. package/src/components/menubar.tsx +2 -2
  224. package/src/components/navigation-menu.tsx +2 -2
  225. package/src/components/pagination.tsx +5 -2
  226. package/src/components/popover.tsx +1 -1
  227. package/src/components/progress.tsx +1 -1
  228. package/src/components/radio-group.tsx +2 -2
  229. package/src/components/scroll-area.tsx +1 -1
  230. package/src/components/select.tsx +2 -2
  231. package/src/components/separator.tsx +1 -1
  232. package/src/components/sheet.tsx +2 -2
  233. package/src/components/sidebar.tsx +6 -6
  234. package/src/components/skeleton.tsx +1 -0
  235. package/src/components/slider.tsx +1 -1
  236. package/src/components/sonner.tsx +1 -0
  237. package/src/components/spinner.tsx +1 -0
  238. package/src/components/switch.tsx +1 -1
  239. package/src/components/tabs.tsx +1 -1
  240. package/src/components/toggle-group.tsx +2 -2
  241. package/src/components/toggle.tsx +2 -2
  242. package/src/components/tooltip.tsx +1 -1
  243. package/src/hooks/use-user.ts +2 -2
  244. package/src/index.ts +10 -5
  245. package/src/logo.tsx +1 -0
  246. package/src/providers/auth-provider.tsx +7 -6
  247. package/src/providers/index.tsx +1 -0
  248. package/src/shared/access-denied.tsx +1 -0
  249. package/src/shared/loader.tsx +2 -1
  250. package/src/shared/page-loader.tsx +1 -0
  251. package/src/shared/scroll-fade-effect.tsx +1 -1
  252. package/src/styles/globals.css +258 -244
  253. package/biome.json +0 -38
  254. package/src/components/carousel.tsx +0 -241
  255. package/src/components/chart.tsx +0 -357
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Calendar = Calendar;
8
+ exports.CalendarDayButton = CalendarDayButton;
9
+ var _lucideReact = require("lucide-react");
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _reactDayPicker = require("react-day-picker");
12
+ var _utils = require("../lib/utils.cjs");
13
+ var _button = require("./button.cjs");
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function Calendar({
17
+ className,
18
+ classNames,
19
+ showOutsideDays = true,
20
+ captionLayout = "label",
21
+ buttonVariant = "ghost",
22
+ formatters,
23
+ components,
24
+ ...props
25
+ }) {
26
+ const defaultClassNames = (0, _reactDayPicker.getDefaultClassNames)();
27
+ return /* @__PURE__ */React.createElement(_reactDayPicker.DayPicker, {
28
+ showOutsideDays,
29
+ className: (0, _utils.cn)("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
30
+ captionLayout,
31
+ formatters: {
32
+ formatMonthDropdown: date => date.toLocaleString("default", {
33
+ month: "short"
34
+ }),
35
+ ...formatters
36
+ },
37
+ classNames: {
38
+ root: (0, _utils.cn)("w-fit", defaultClassNames.root),
39
+ months: (0, _utils.cn)("flex gap-4 flex-col md:flex-row relative", defaultClassNames.months),
40
+ month: (0, _utils.cn)("flex flex-col w-full gap-4", defaultClassNames.month),
41
+ nav: (0, _utils.cn)("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", defaultClassNames.nav),
42
+ button_previous: (0, _utils.cn)((0, _button.buttonVariants)({
43
+ variant: buttonVariant
44
+ }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_previous),
45
+ button_next: (0, _utils.cn)((0, _button.buttonVariants)({
46
+ variant: buttonVariant
47
+ }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_next),
48
+ month_caption: (0, _utils.cn)("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", defaultClassNames.month_caption),
49
+ dropdowns: (0, _utils.cn)("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", defaultClassNames.dropdowns),
50
+ dropdown_root: (0, _utils.cn)("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md", defaultClassNames.dropdown_root),
51
+ dropdown: (0, _utils.cn)("absolute bg-popover inset-0 opacity-0", defaultClassNames.dropdown),
52
+ caption_label: (0, _utils.cn)("select-none font-medium", captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5", defaultClassNames.caption_label),
53
+ table: "w-full border-collapse",
54
+ weekdays: (0, _utils.cn)("flex", defaultClassNames.weekdays),
55
+ weekday: (0, _utils.cn)("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none", defaultClassNames.weekday),
56
+ week: (0, _utils.cn)("flex w-full mt-2", defaultClassNames.week),
57
+ week_number_header: (0, _utils.cn)("select-none w-(--cell-size)", defaultClassNames.week_number_header),
58
+ week_number: (0, _utils.cn)("text-[0.8rem] select-none text-muted-foreground", defaultClassNames.week_number),
59
+ day: (0, _utils.cn)("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
60
+ range_start: (0, _utils.cn)("rounded-l-md bg-accent", defaultClassNames.range_start),
61
+ range_middle: (0, _utils.cn)("rounded-none", defaultClassNames.range_middle),
62
+ range_end: (0, _utils.cn)("rounded-r-md bg-accent", defaultClassNames.range_end),
63
+ today: (0, _utils.cn)("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today),
64
+ outside: (0, _utils.cn)("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
65
+ disabled: (0, _utils.cn)("text-muted-foreground opacity-50", defaultClassNames.disabled),
66
+ hidden: (0, _utils.cn)("invisible", defaultClassNames.hidden),
67
+ ...classNames
68
+ },
69
+ components: {
70
+ Root: ({
71
+ className: className2,
72
+ rootRef,
73
+ ...props2
74
+ }) => {
75
+ return /* @__PURE__ */React.createElement("div", {
76
+ "data-slot": "calendar",
77
+ ref: rootRef,
78
+ className: (0, _utils.cn)(className2),
79
+ ...props2
80
+ });
81
+ },
82
+ Chevron: ({
83
+ className: className2,
84
+ orientation,
85
+ ...props2
86
+ }) => {
87
+ if (orientation === "left") {
88
+ return /* @__PURE__ */React.createElement(_lucideReact.ChevronLeftIcon, {
89
+ className: (0, _utils.cn)("size-4", className2),
90
+ ...props2
91
+ });
92
+ }
93
+ if (orientation === "right") {
94
+ return /* @__PURE__ */React.createElement(_lucideReact.ChevronRightIcon, {
95
+ className: (0, _utils.cn)("size-4", className2),
96
+ ...props2
97
+ });
98
+ }
99
+ return /* @__PURE__ */React.createElement(_lucideReact.ChevronDownIcon, {
100
+ className: (0, _utils.cn)("size-4", className2),
101
+ ...props2
102
+ });
103
+ },
104
+ DayButton: CalendarDayButton,
105
+ WeekNumber: ({
106
+ children,
107
+ ...props2
108
+ }) => {
109
+ return /* @__PURE__ */React.createElement("td", {
110
+ ...props2
111
+ }, /* @__PURE__ */React.createElement("div", {
112
+ className: "flex size-(--cell-size) items-center justify-center text-center"
113
+ }, children));
114
+ },
115
+ ...components
116
+ },
117
+ ...props
118
+ });
119
+ }
120
+ function CalendarDayButton({
121
+ className,
122
+ day,
123
+ modifiers,
124
+ ...props
125
+ }) {
126
+ const defaultClassNames = (0, _reactDayPicker.getDefaultClassNames)();
127
+ const ref = React.useRef(null);
128
+ React.useEffect(() => {
129
+ if (modifiers.focused) ref.current?.focus();
130
+ }, [modifiers.focused]);
131
+ return /* @__PURE__ */React.createElement(_button.Button, {
132
+ ref,
133
+ variant: "ghost",
134
+ size: "icon",
135
+ "data-day": day.date.toLocaleDateString(),
136
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
137
+ "data-range-start": modifiers.range_start,
138
+ "data-range-end": modifiers.range_end,
139
+ "data-range-middle": modifiers.range_middle,
140
+ className: (0, _utils.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 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
141
+ ...props
142
+ });
143
+ }
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { type DayButton, DayPicker } from "react-day-picker";
3
+ import { Button } from "./button";
4
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
+ }): React.JSX.Element;
7
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
8
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,191 @@
1
+ "use client";
2
+ import {
3
+ ChevronDownIcon,
4
+ ChevronLeftIcon,
5
+ ChevronRightIcon
6
+ } from "lucide-react";
7
+ import * as React from "react";
8
+ import {
9
+ DayPicker,
10
+ getDefaultClassNames
11
+ } from "react-day-picker";
12
+ import { cn } from "../lib/utils.mjs";
13
+ import { Button, buttonVariants } from "./button.mjs";
14
+ function Calendar({
15
+ className,
16
+ classNames,
17
+ showOutsideDays = true,
18
+ captionLayout = "label",
19
+ buttonVariant = "ghost",
20
+ formatters,
21
+ components,
22
+ ...props
23
+ }) {
24
+ const defaultClassNames = getDefaultClassNames();
25
+ return /* @__PURE__ */ React.createElement(
26
+ DayPicker,
27
+ {
28
+ showOutsideDays,
29
+ className: cn(
30
+ "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
31
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
32
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
33
+ className
34
+ ),
35
+ captionLayout,
36
+ formatters: {
37
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
38
+ ...formatters
39
+ },
40
+ classNames: {
41
+ root: cn("w-fit", defaultClassNames.root),
42
+ months: cn(
43
+ "flex gap-4 flex-col md:flex-row relative",
44
+ defaultClassNames.months
45
+ ),
46
+ month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
47
+ nav: cn(
48
+ "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
49
+ defaultClassNames.nav
50
+ ),
51
+ button_previous: cn(
52
+ buttonVariants({ variant: buttonVariant }),
53
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
54
+ defaultClassNames.button_previous
55
+ ),
56
+ button_next: cn(
57
+ buttonVariants({ variant: buttonVariant }),
58
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
59
+ defaultClassNames.button_next
60
+ ),
61
+ month_caption: cn(
62
+ "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
63
+ defaultClassNames.month_caption
64
+ ),
65
+ dropdowns: cn(
66
+ "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
67
+ defaultClassNames.dropdowns
68
+ ),
69
+ dropdown_root: cn(
70
+ "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
71
+ defaultClassNames.dropdown_root
72
+ ),
73
+ dropdown: cn(
74
+ "absolute bg-popover inset-0 opacity-0",
75
+ defaultClassNames.dropdown
76
+ ),
77
+ caption_label: cn(
78
+ "select-none font-medium",
79
+ captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
80
+ defaultClassNames.caption_label
81
+ ),
82
+ table: "w-full border-collapse",
83
+ weekdays: cn("flex", defaultClassNames.weekdays),
84
+ weekday: cn(
85
+ "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
86
+ defaultClassNames.weekday
87
+ ),
88
+ week: cn("flex w-full mt-2", defaultClassNames.week),
89
+ week_number_header: cn(
90
+ "select-none w-(--cell-size)",
91
+ defaultClassNames.week_number_header
92
+ ),
93
+ week_number: cn(
94
+ "text-[0.8rem] select-none text-muted-foreground",
95
+ defaultClassNames.week_number
96
+ ),
97
+ day: cn(
98
+ "relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
99
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
100
+ defaultClassNames.day
101
+ ),
102
+ range_start: cn(
103
+ "rounded-l-md bg-accent",
104
+ defaultClassNames.range_start
105
+ ),
106
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
107
+ range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
108
+ today: cn(
109
+ "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
110
+ defaultClassNames.today
111
+ ),
112
+ outside: cn(
113
+ "text-muted-foreground aria-selected:text-muted-foreground",
114
+ defaultClassNames.outside
115
+ ),
116
+ disabled: cn(
117
+ "text-muted-foreground opacity-50",
118
+ defaultClassNames.disabled
119
+ ),
120
+ hidden: cn("invisible", defaultClassNames.hidden),
121
+ ...classNames
122
+ },
123
+ components: {
124
+ Root: ({ className: className2, rootRef, ...props2 }) => {
125
+ return /* @__PURE__ */ React.createElement(
126
+ "div",
127
+ {
128
+ "data-slot": "calendar",
129
+ ref: rootRef,
130
+ className: cn(className2),
131
+ ...props2
132
+ }
133
+ );
134
+ },
135
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
136
+ if (orientation === "left") {
137
+ return /* @__PURE__ */ React.createElement(ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
138
+ }
139
+ if (orientation === "right") {
140
+ return /* @__PURE__ */ React.createElement(
141
+ ChevronRightIcon,
142
+ {
143
+ className: cn("size-4", className2),
144
+ ...props2
145
+ }
146
+ );
147
+ }
148
+ return /* @__PURE__ */ React.createElement(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
149
+ },
150
+ DayButton: CalendarDayButton,
151
+ WeekNumber: ({ children, ...props2 }) => {
152
+ return /* @__PURE__ */ React.createElement("td", { ...props2 }, /* @__PURE__ */ React.createElement("div", { className: "flex size-(--cell-size) items-center justify-center text-center" }, children));
153
+ },
154
+ ...components
155
+ },
156
+ ...props
157
+ }
158
+ );
159
+ }
160
+ function CalendarDayButton({
161
+ className,
162
+ day,
163
+ modifiers,
164
+ ...props
165
+ }) {
166
+ const defaultClassNames = getDefaultClassNames();
167
+ const ref = React.useRef(null);
168
+ React.useEffect(() => {
169
+ if (modifiers.focused) ref.current?.focus();
170
+ }, [modifiers.focused]);
171
+ return /* @__PURE__ */ React.createElement(
172
+ Button,
173
+ {
174
+ ref,
175
+ variant: "ghost",
176
+ size: "icon",
177
+ "data-day": day.date.toLocaleDateString(),
178
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
179
+ "data-range-start": modifiers.range_start,
180
+ "data-range-end": modifiers.range_end,
181
+ "data-range-middle": modifiers.range_middle,
182
+ className: cn(
183
+ "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 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
184
+ defaultClassNames.day,
185
+ className
186
+ ),
187
+ ...props
188
+ }
189
+ );
190
+ }
191
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Card = Card;
7
+ exports.CardAction = CardAction;
8
+ exports.CardContent = CardContent;
9
+ exports.CardDescription = CardDescription;
10
+ exports.CardFooter = CardFooter;
11
+ exports.CardHeader = CardHeader;
12
+ exports.CardTitle = CardTitle;
13
+ var React = _interopRequireWildcard(require("react"));
14
+ var _utils = require("../lib/utils.cjs");
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function Card({
18
+ className,
19
+ ...props
20
+ }) {
21
+ return /* @__PURE__ */React.createElement("div", {
22
+ "data-slot": "card",
23
+ className: (0, _utils.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className),
24
+ ...props
25
+ });
26
+ }
27
+ function CardHeader({
28
+ className,
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */React.createElement("div", {
32
+ "data-slot": "card-header",
33
+ className: (0, _utils.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
34
+ ...props
35
+ });
36
+ }
37
+ function CardTitle({
38
+ className,
39
+ ...props
40
+ }) {
41
+ return /* @__PURE__ */React.createElement("div", {
42
+ "data-slot": "card-title",
43
+ className: (0, _utils.cn)("leading-none font-semibold", className),
44
+ ...props
45
+ });
46
+ }
47
+ function CardDescription({
48
+ className,
49
+ ...props
50
+ }) {
51
+ return /* @__PURE__ */React.createElement("div", {
52
+ "data-slot": "card-description",
53
+ className: (0, _utils.cn)("text-muted-foreground text-sm", className),
54
+ ...props
55
+ });
56
+ }
57
+ function CardAction({
58
+ className,
59
+ ...props
60
+ }) {
61
+ return /* @__PURE__ */React.createElement("div", {
62
+ "data-slot": "card-action",
63
+ className: (0, _utils.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
64
+ ...props
65
+ });
66
+ }
67
+ function CardContent({
68
+ className,
69
+ ...props
70
+ }) {
71
+ return /* @__PURE__ */React.createElement("div", {
72
+ "data-slot": "card-content",
73
+ className: (0, _utils.cn)("px-6", className),
74
+ ...props
75
+ });
76
+ }
77
+ function CardFooter({
78
+ className,
79
+ ...props
80
+ }) {
81
+ return /* @__PURE__ */React.createElement("div", {
82
+ "data-slot": "card-footer",
83
+ className: (0, _utils.cn)("flex items-center px-6 [.border-t]:pt-6", className),
84
+ ...props
85
+ });
86
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,90 @@
1
+ import * as React from "react";
2
+ import { cn } from "../lib/utils.mjs";
3
+ function Card({ className, ...props }) {
4
+ return /* @__PURE__ */ React.createElement(
5
+ "div",
6
+ {
7
+ "data-slot": "card",
8
+ className: cn(
9
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
10
+ className
11
+ ),
12
+ ...props
13
+ }
14
+ );
15
+ }
16
+ function CardHeader({ className, ...props }) {
17
+ return /* @__PURE__ */ React.createElement(
18
+ "div",
19
+ {
20
+ "data-slot": "card-header",
21
+ className: cn(
22
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
23
+ className
24
+ ),
25
+ ...props
26
+ }
27
+ );
28
+ }
29
+ function CardTitle({ className, ...props }) {
30
+ return /* @__PURE__ */ React.createElement(
31
+ "div",
32
+ {
33
+ "data-slot": "card-title",
34
+ className: cn("leading-none font-semibold", className),
35
+ ...props
36
+ }
37
+ );
38
+ }
39
+ function CardDescription({ className, ...props }) {
40
+ return /* @__PURE__ */ React.createElement(
41
+ "div",
42
+ {
43
+ "data-slot": "card-description",
44
+ className: cn("text-muted-foreground text-sm", className),
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+ function CardAction({ className, ...props }) {
50
+ return /* @__PURE__ */ React.createElement(
51
+ "div",
52
+ {
53
+ "data-slot": "card-action",
54
+ className: cn(
55
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ function CardContent({ className, ...props }) {
63
+ return /* @__PURE__ */ React.createElement(
64
+ "div",
65
+ {
66
+ "data-slot": "card-content",
67
+ className: cn("px-6", className),
68
+ ...props
69
+ }
70
+ );
71
+ }
72
+ function CardFooter({ className, ...props }) {
73
+ return /* @__PURE__ */ React.createElement(
74
+ "div",
75
+ {
76
+ "data-slot": "card-footer",
77
+ className: cn("flex items-center px-6 [.border-t]:pt-6", className),
78
+ ...props
79
+ }
80
+ );
81
+ }
82
+ export {
83
+ Card,
84
+ CardHeader,
85
+ CardFooter,
86
+ CardTitle,
87
+ CardAction,
88
+ CardDescription,
89
+ CardContent
90
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Checkbox = Checkbox;
8
+ var _radixUi = require("radix-ui");
9
+ var _lucideReact = require("lucide-react");
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _utils = require("../lib/utils.cjs");
12
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function Checkbox({
15
+ className,
16
+ ...props
17
+ }) {
18
+ return /* @__PURE__ */React.createElement(_radixUi.Checkbox.Root, {
19
+ "data-slot": "checkbox",
20
+ className: (0, _utils.cn)("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
21
+ ...props
22
+ }, /* @__PURE__ */React.createElement(_radixUi.Checkbox.Indicator, {
23
+ "data-slot": "checkbox-indicator",
24
+ className: "grid place-content-center text-current transition-none"
25
+ }, /* @__PURE__ */React.createElement(_lucideReact.CheckIcon, {
26
+ className: "size-3.5"
27
+ })));
28
+ }
@@ -0,0 +1,4 @@
1
+ import { Checkbox as CheckboxPrimitive } from "radix-ui";
2
+ import * as React from "react";
3
+ declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { Checkbox as CheckboxPrimitive } from "radix-ui";
3
+ import { CheckIcon } from "lucide-react";
4
+ import * as React from "react";
5
+ import { cn } from "../lib/utils.mjs";
6
+ function Checkbox({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ React.createElement(
11
+ CheckboxPrimitive.Root,
12
+ {
13
+ "data-slot": "checkbox",
14
+ className: cn(
15
+ "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
16
+ className
17
+ ),
18
+ ...props
19
+ },
20
+ /* @__PURE__ */ React.createElement(
21
+ CheckboxPrimitive.Indicator,
22
+ {
23
+ "data-slot": "checkbox-indicator",
24
+ className: "grid place-content-center text-current transition-none"
25
+ },
26
+ /* @__PURE__ */ React.createElement(CheckIcon, { className: "size-3.5" })
27
+ )
28
+ );
29
+ }
30
+ export { Checkbox };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Collapsible = Collapsible;
8
+ exports.CollapsibleContent = CollapsibleContent;
9
+ exports.CollapsibleTrigger = CollapsibleTrigger;
10
+ var _radixUi = require("radix-ui");
11
+ var React = _interopRequireWildcard(require("react"));
12
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function Collapsible({
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */React.createElement(_radixUi.Collapsible.Root, {
18
+ "data-slot": "collapsible",
19
+ ...props
20
+ });
21
+ }
22
+ function CollapsibleTrigger({
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */React.createElement(_radixUi.Collapsible.CollapsibleTrigger, {
26
+ "data-slot": "collapsible-trigger",
27
+ ...props
28
+ });
29
+ }
30
+ function CollapsibleContent({
31
+ ...props
32
+ }) {
33
+ return /* @__PURE__ */React.createElement(_radixUi.Collapsible.CollapsibleContent, {
34
+ "data-slot": "collapsible-content",
35
+ ...props
36
+ });
37
+ }
@@ -0,0 +1,6 @@
1
+ import { Collapsible as CollapsiblePrimitive } from "radix-ui";
2
+ import * as React from "react";
3
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): React.JSX.Element;
4
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): React.JSX.Element;
5
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): React.JSX.Element;
6
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };