@inspirare/design-system 0.0.22 → 0.0.24

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 (297) hide show
  1. package/README.md +82 -61
  2. package/dist/book-logo-filled.svg +55 -0
  3. package/dist/components/ui/accessibility-improvements.js +26 -23
  4. package/dist/components/ui/accordion.js +34 -24
  5. package/dist/components/ui/alert-dialog.js +91 -57
  6. package/dist/components/ui/alert.js +38 -26
  7. package/dist/components/ui/aspect-ratio.js +11 -3
  8. package/dist/components/ui/avatar.js +30 -8
  9. package/dist/components/ui/badge.js +20 -14
  10. package/dist/components/ui/breadcrumb.js +69 -56
  11. package/dist/components/ui/button-group.js +17 -13
  12. package/dist/components/ui/button.js +19 -15
  13. package/dist/components/ui/calendar.js +63 -59
  14. package/dist/components/ui/card.js +11 -9
  15. package/dist/components/ui/carousel.js +70 -75
  16. package/dist/components/ui/chart.js +75 -72
  17. package/dist/components/ui/checkbox.js +4 -5
  18. package/dist/components/ui/collapsible.js +12 -14
  19. package/dist/components/ui/color-picker.js +60 -80
  20. package/dist/components/ui/combobox.js +153 -33
  21. package/dist/components/ui/command.js +50 -48
  22. package/dist/components/ui/context-menu.js +129 -68
  23. package/dist/components/ui/dialog.js +65 -60
  24. package/dist/components/ui/drawer.js +81 -40
  25. package/dist/components/ui/dropdown-menu.js +100 -87
  26. package/dist/components/ui/empty.js +7 -6
  27. package/dist/components/ui/field.js +44 -47
  28. package/dist/components/ui/form.js +22 -23
  29. package/dist/components/ui/hover-card.js +14 -11
  30. package/dist/components/ui/input-group.js +16 -13
  31. package/dist/components/ui/input-otp.js +37 -32
  32. package/dist/components/ui/input.js +9 -7
  33. package/dist/components/ui/item.js +42 -36
  34. package/dist/components/ui/kbd.js +2 -1
  35. package/dist/components/ui/label.js +6 -7
  36. package/dist/components/ui/menubar.js +124 -93
  37. package/dist/components/ui/navigation-menu.js +79 -54
  38. package/dist/components/ui/pagination.js +78 -58
  39. package/dist/components/ui/popover.js +35 -16
  40. package/dist/components/ui/progress.js +37 -13
  41. package/dist/components/ui/radio-group.js +14 -14
  42. package/dist/components/ui/resizable.js +24 -15
  43. package/dist/components/ui/scroll-area.js +29 -11
  44. package/dist/components/ui/select.js +98 -56
  45. package/dist/components/ui/separator.js +5 -7
  46. package/dist/components/ui/sheet.js +47 -42
  47. package/dist/components/ui/sidebar.js +279 -248
  48. package/dist/components/ui/skeleton.js +4 -40
  49. package/dist/components/ui/slider.js +27 -29
  50. package/dist/components/ui/sonner.js +27 -10
  51. package/dist/components/ui/spinner.js +2 -0
  52. package/dist/components/ui/switch.js +3 -4
  53. package/dist/components/ui/table.js +6 -6
  54. package/dist/components/ui/tabs.js +45 -22
  55. package/dist/components/ui/textarea.js +3 -2
  56. package/dist/components/ui/theme-toggle.js +38 -41
  57. package/dist/components/ui/toggle-group.js +30 -21
  58. package/dist/components/ui/toggle.js +8 -9
  59. package/dist/components/ui/tooltip.js +28 -23
  60. package/dist/index.css +1 -1
  61. package/dist/index.d.ts +446 -468
  62. package/dist/index.js +58 -58
  63. package/package.json +42 -41
  64. package/src/App.tsx +28 -34
  65. package/src/components/branding/assets/book-logo-filled.svg +55 -0
  66. package/src/components/branding/logo/logo.tsx +56 -0
  67. package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
  68. package/src/components/ui/accessibility-improvements.test.tsx +13 -0
  69. package/src/components/ui/accessibility-improvements.tsx +16 -6
  70. package/src/components/ui/accordion.stories.tsx +19 -0
  71. package/src/components/ui/accordion.test.tsx +14 -0
  72. package/src/components/ui/accordion.tsx +28 -20
  73. package/src/components/ui/alert-dialog.stories.tsx +19 -0
  74. package/src/components/ui/alert-dialog.test.tsx +14 -0
  75. package/src/components/ui/alert-dialog.tsx +159 -123
  76. package/src/components/ui/alert.stories.tsx +19 -0
  77. package/src/components/ui/alert.test.tsx +14 -0
  78. package/src/components/ui/alert.tsx +60 -41
  79. package/src/components/ui/aspect-ratio.stories.tsx +19 -0
  80. package/src/components/ui/aspect-ratio.test.tsx +14 -0
  81. package/src/components/ui/aspect-ratio.tsx +19 -2
  82. package/src/components/ui/attachment.stories.tsx +19 -0
  83. package/src/components/ui/attachment.test.tsx +14 -0
  84. package/src/components/ui/attachment.tsx +209 -0
  85. package/src/components/ui/avatar.stories.tsx +19 -0
  86. package/src/components/ui/avatar.test.tsx +14 -0
  87. package/src/components/ui/avatar.tsx +73 -17
  88. package/src/components/ui/badge.stories.tsx +19 -0
  89. package/src/components/ui/badge.test.tsx +14 -0
  90. package/src/components/ui/badge.tsx +33 -25
  91. package/src/components/ui/breadcrumb.stories.tsx +19 -0
  92. package/src/components/ui/breadcrumb.test.tsx +14 -0
  93. package/src/components/ui/breadcrumb.tsx +98 -86
  94. package/src/components/ui/bubble.stories.tsx +19 -0
  95. package/src/components/ui/bubble.test.tsx +14 -0
  96. package/src/components/ui/bubble.tsx +130 -0
  97. package/src/components/ui/button-group.stories.tsx +19 -0
  98. package/src/components/ui/button-group.test.tsx +14 -0
  99. package/src/components/ui/button-group.tsx +26 -20
  100. package/src/components/ui/button.stories.tsx +19 -0
  101. package/src/components/ui/button.test.tsx +14 -0
  102. package/src/components/ui/button.tsx +30 -31
  103. package/src/components/ui/calendar.stories.tsx +19 -0
  104. package/src/components/ui/calendar.test.tsx +14 -0
  105. package/src/components/ui/calendar.tsx +28 -26
  106. package/src/components/ui/card.stories.tsx +19 -0
  107. package/src/components/ui/card.test.tsx +14 -0
  108. package/src/components/ui/card.tsx +30 -17
  109. package/src/components/ui/carousel.stories.tsx +19 -0
  110. package/src/components/ui/carousel.test.tsx +14 -0
  111. package/src/components/ui/carousel.tsx +115 -135
  112. package/src/components/ui/chart.stories.tsx +18 -0
  113. package/src/components/ui/chart.test.tsx +13 -0
  114. package/src/components/ui/chart.tsx +220 -216
  115. package/src/components/ui/checkbox.stories.tsx +19 -0
  116. package/src/components/ui/checkbox.test.tsx +14 -0
  117. package/src/components/ui/checkbox.tsx +7 -10
  118. package/src/components/ui/collapsible.stories.tsx +19 -0
  119. package/src/components/ui/collapsible.test.tsx +14 -0
  120. package/src/components/ui/collapsible.tsx +11 -26
  121. package/src/components/ui/color-picker.stories.tsx +19 -0
  122. package/src/components/ui/color-picker.test.tsx +14 -0
  123. package/src/components/ui/color-picker.tsx +36 -26
  124. package/src/components/ui/combobox.stories.tsx +19 -0
  125. package/src/components/ui/combobox.test.tsx +14 -0
  126. package/src/components/ui/combobox.tsx +281 -96
  127. package/src/components/ui/command.stories.tsx +19 -0
  128. package/src/components/ui/command.test.tsx +14 -0
  129. package/src/components/ui/command.tsx +59 -47
  130. package/src/components/ui/context-menu.stories.tsx +19 -0
  131. package/src/components/ui/context-menu.test.tsx +14 -0
  132. package/src/components/ui/context-menu.tsx +231 -160
  133. package/src/components/ui/dialog.stories.tsx +19 -0
  134. package/src/components/ui/dialog.test.tsx +14 -0
  135. package/src/components/ui/dialog.tsx +81 -72
  136. package/src/components/ui/direction.stories.tsx +19 -0
  137. package/src/components/ui/direction.test.tsx +14 -0
  138. package/src/components/ui/direction.tsx +6 -0
  139. package/src/components/ui/drawer.stories.tsx +19 -0
  140. package/src/components/ui/drawer.test.tsx +14 -0
  141. package/src/components/ui/drawer.tsx +143 -64
  142. package/src/components/ui/dropdown-menu.stories.tsx +19 -0
  143. package/src/components/ui/dropdown-menu.test.tsx +14 -0
  144. package/src/components/ui/dropdown-menu.tsx +199 -153
  145. package/src/components/ui/empty.stories.tsx +18 -0
  146. package/src/components/ui/empty.test.tsx +13 -0
  147. package/src/components/ui/empty.tsx +11 -9
  148. package/src/components/ui/field.stories.tsx +18 -0
  149. package/src/components/ui/field.test.tsx +13 -0
  150. package/src/components/ui/field.tsx +26 -32
  151. package/src/components/ui/form.stories.tsx +22 -0
  152. package/src/components/ui/form.test.tsx +15 -0
  153. package/src/components/ui/form.tsx +1 -2
  154. package/src/components/ui/hover-card.stories.tsx +19 -0
  155. package/src/components/ui/hover-card.test.tsx +14 -0
  156. package/src/components/ui/hover-card.tsx +34 -32
  157. package/src/components/ui/input-group.stories.tsx +18 -0
  158. package/src/components/ui/input-group.test.tsx +13 -0
  159. package/src/components/ui/input-group.tsx +21 -28
  160. package/src/components/ui/input-otp.stories.tsx +19 -0
  161. package/src/components/ui/input-otp.test.tsx +14 -0
  162. package/src/components/ui/input-otp.tsx +58 -42
  163. package/src/components/ui/input.stories.tsx +19 -0
  164. package/src/components/ui/input.test.tsx +14 -0
  165. package/src/components/ui/input.tsx +9 -8
  166. package/src/components/ui/item.stories.tsx +18 -0
  167. package/src/components/ui/item.test.tsx +13 -0
  168. package/src/components/ui/item.tsx +38 -28
  169. package/src/components/ui/kbd.stories.tsx +18 -0
  170. package/src/components/ui/kbd.test.tsx +13 -0
  171. package/src/components/ui/kbd.tsx +3 -3
  172. package/src/components/ui/label.stories.tsx +18 -0
  173. package/src/components/ui/label.test.tsx +13 -0
  174. package/src/components/ui/label.tsx +7 -11
  175. package/src/components/ui/marker.stories.tsx +19 -0
  176. package/src/components/ui/marker.test.tsx +14 -0
  177. package/src/components/ui/marker.tsx +73 -0
  178. package/src/components/ui/menubar.stories.tsx +19 -0
  179. package/src/components/ui/menubar.test.tsx +14 -0
  180. package/src/components/ui/menubar.tsx +226 -202
  181. package/src/components/ui/message-scroller.stories.tsx +19 -0
  182. package/src/components/ui/message-scroller.test.tsx +14 -0
  183. package/src/components/ui/message-scroller.tsx +131 -0
  184. package/src/components/ui/message.stories.tsx +19 -0
  185. package/src/components/ui/message.test.tsx +14 -0
  186. package/src/components/ui/message.tsx +94 -0
  187. package/src/components/ui/native-select.stories.tsx +18 -0
  188. package/src/components/ui/native-select.test.tsx +13 -0
  189. package/src/components/ui/native-select.tsx +63 -0
  190. package/src/components/ui/navigation-menu.stories.tsx +19 -0
  191. package/src/components/ui/navigation-menu.test.tsx +14 -0
  192. package/src/components/ui/navigation-menu.tsx +145 -103
  193. package/src/components/ui/pagination.stories.tsx +19 -0
  194. package/src/components/ui/pagination.test.tsx +14 -0
  195. package/src/components/ui/pagination.tsx +114 -83
  196. package/src/components/ui/popover.stories.tsx +19 -0
  197. package/src/components/ui/popover.test.tsx +14 -0
  198. package/src/components/ui/popover.tsx +68 -33
  199. package/src/components/ui/progress.stories.tsx +19 -0
  200. package/src/components/ui/progress.test.tsx +14 -0
  201. package/src/components/ui/progress.tsx +67 -15
  202. package/src/components/ui/questionnaire.stories.tsx +19 -0
  203. package/src/components/ui/questionnaire.test.tsx +14 -0
  204. package/src/components/ui/questionnaire.tsx +324 -0
  205. package/src/components/ui/radio-group.stories.tsx +19 -0
  206. package/src/components/ui/radio-group.test.tsx +14 -0
  207. package/src/components/ui/radio-group.tsx +15 -20
  208. package/src/components/ui/resizable.stories.tsx +19 -0
  209. package/src/components/ui/resizable.test.tsx +14 -0
  210. package/src/components/ui/resizable.tsx +37 -30
  211. package/src/components/ui/scroll-area.stories.tsx +19 -0
  212. package/src/components/ui/scroll-area.test.tsx +14 -0
  213. package/src/components/ui/scroll-area.tsx +41 -19
  214. package/src/components/ui/select.stories.tsx +19 -0
  215. package/src/components/ui/select.test.tsx +14 -0
  216. package/src/components/ui/select.tsx +145 -78
  217. package/src/components/ui/separator.stories.tsx +19 -0
  218. package/src/components/ui/separator.test.tsx +14 -0
  219. package/src/components/ui/separator.tsx +8 -11
  220. package/src/components/ui/sheet.stories.tsx +19 -0
  221. package/src/components/ui/sheet.test.tsx +14 -0
  222. package/src/components/ui/sheet.tsx +56 -71
  223. package/src/components/ui/sidebar.stories.tsx +18 -0
  224. package/src/components/ui/sidebar.test.tsx +13 -0
  225. package/src/components/ui/sidebar.tsx +469 -513
  226. package/src/components/ui/skeleton.stories.tsx +19 -0
  227. package/src/components/ui/skeleton.test.tsx +14 -0
  228. package/src/components/ui/skeleton.tsx +8 -114
  229. package/src/components/ui/slider.stories.tsx +19 -0
  230. package/src/components/ui/slider.test.tsx +14 -0
  231. package/src/components/ui/slider.tsx +31 -40
  232. package/src/components/ui/sonner.stories.tsx +19 -0
  233. package/src/components/ui/sonner.test.tsx +14 -0
  234. package/src/components/ui/sonner.tsx +39 -7
  235. package/src/components/ui/spinner.stories.tsx +18 -0
  236. package/src/components/ui/spinner.test.tsx +13 -0
  237. package/src/components/ui/spinner.tsx +3 -7
  238. package/src/components/ui/switch.stories.tsx +19 -0
  239. package/src/components/ui/switch.test.tsx +14 -0
  240. package/src/components/ui/switch.tsx +4 -7
  241. package/src/components/ui/table.stories.tsx +19 -0
  242. package/src/components/ui/table.test.tsx +14 -0
  243. package/src/components/ui/table.tsx +17 -17
  244. package/src/components/ui/tabs.stories.tsx +19 -0
  245. package/src/components/ui/tabs.test.tsx +14 -0
  246. package/src/components/ui/tabs.tsx +71 -31
  247. package/src/components/ui/textarea.stories.tsx +19 -0
  248. package/src/components/ui/textarea.test.tsx +14 -0
  249. package/src/components/ui/textarea.tsx +7 -5
  250. package/src/components/ui/theme-toggle.stories.tsx +18 -0
  251. package/src/components/ui/theme-toggle.test.tsx +13 -0
  252. package/src/components/ui/theme-toggle.tsx +35 -37
  253. package/src/components/ui/toggle-group.stories.tsx +19 -0
  254. package/src/components/ui/toggle-group.test.tsx +14 -0
  255. package/src/components/ui/toggle-group.tsx +41 -25
  256. package/src/components/ui/toggle.stories.tsx +19 -0
  257. package/src/components/ui/toggle.test.tsx +14 -0
  258. package/src/components/ui/toggle.tsx +17 -19
  259. package/src/components/ui/tooltip.stories.tsx +19 -0
  260. package/src/components/ui/tooltip.test.tsx +14 -0
  261. package/src/components/ui/tooltip.tsx +53 -44
  262. package/src/demo/AIDemo.tsx +50 -0
  263. package/src/demo/ButtonsDemo.tsx +41 -18
  264. package/src/demo/CalendarDemo.tsx +1 -1
  265. package/src/demo/FeedbackDemo.tsx +4 -6
  266. package/src/demo/FormsDemo.tsx +34 -11
  267. package/src/demo/NavigationDemo.tsx +38 -13
  268. package/src/demo/OverlaysDemo.tsx +22 -36
  269. package/src/demo/update-demos.js +82 -0
  270. package/src/index.css +66 -46
  271. package/src/lib/utils.ts +3 -3
  272. package/src/stories/Button.stories.ts +54 -0
  273. package/src/stories/Button.tsx +36 -0
  274. package/src/stories/Configure.mdx +388 -0
  275. package/src/stories/Header.stories.ts +34 -0
  276. package/src/stories/Header.tsx +55 -0
  277. package/src/stories/Page.stories.ts +33 -0
  278. package/src/stories/Page.tsx +73 -0
  279. package/src/stories/assets/accessibility.png +0 -0
  280. package/src/stories/assets/accessibility.svg +1 -0
  281. package/src/stories/assets/addon-library.png +0 -0
  282. package/src/stories/assets/assets.png +0 -0
  283. package/src/stories/assets/avif-test-image.avif +0 -0
  284. package/src/stories/assets/context.png +0 -0
  285. package/src/stories/assets/discord.svg +1 -0
  286. package/src/stories/assets/docs.png +0 -0
  287. package/src/stories/assets/figma-plugin.png +0 -0
  288. package/src/stories/assets/github.svg +1 -0
  289. package/src/stories/assets/share.png +0 -0
  290. package/src/stories/assets/styling.png +0 -0
  291. package/src/stories/assets/testing.png +0 -0
  292. package/src/stories/assets/theming.png +0 -0
  293. package/src/stories/assets/tutorials.svg +1 -0
  294. package/src/stories/assets/youtube.svg +1 -0
  295. package/src/stories/button.css +30 -0
  296. package/src/stories/header.css +32 -0
  297. package/src/stories/page.css +68 -0
@@ -1,32 +1,44 @@
1
+ "use client";
1
2
  import { cn as e } from "../../lib/utils.js";
2
- import * as t from "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { cva as r } from "class-variance-authority";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import "react";
5
+ import { cva as n } from "class-variance-authority";
5
6
  //#region src/components/ui/alert.tsx
6
- var i = r("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
7
+ var r = n("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
7
8
  variants: { variant: {
8
- default: "bg-background text-foreground",
9
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
9
+ default: "bg-card text-card-foreground",
10
+ destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
10
11
  } },
11
12
  defaultVariants: { variant: "default" }
12
- }), a = t.forwardRef(({ className: t, variant: r, ...a }, o) => /* @__PURE__ */ n("div", {
13
- ref: o,
14
- role: "alert",
15
- className: e(i({ variant: r }), t),
16
- ...a
17
- }));
18
- a.displayName = "Alert";
19
- var o = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("h5", {
20
- ref: i,
21
- className: e("mb-1 font-medium leading-none tracking-tight", t),
22
- ...r
23
- }));
24
- o.displayName = "AlertTitle";
25
- var s = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("div", {
26
- ref: i,
27
- className: e("text-sm [&_p]:leading-relaxed", t),
28
- ...r
29
- }));
30
- s.displayName = "AlertDescription";
13
+ });
14
+ function i({ className: n, variant: i, ...a }) {
15
+ return /* @__PURE__ */ t("div", {
16
+ "data-slot": "alert",
17
+ role: "alert",
18
+ className: e(r({ variant: i }), n),
19
+ ...a
20
+ });
21
+ }
22
+ function a({ className: n, ...r }) {
23
+ return /* @__PURE__ */ t("div", {
24
+ "data-slot": "alert-title",
25
+ className: e("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", n),
26
+ ...r
27
+ });
28
+ }
29
+ function o({ className: n, ...r }) {
30
+ return /* @__PURE__ */ t("div", {
31
+ "data-slot": "alert-description",
32
+ className: e("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", n),
33
+ ...r
34
+ });
35
+ }
36
+ function s({ className: n, ...r }) {
37
+ return /* @__PURE__ */ t("div", {
38
+ "data-slot": "alert-action",
39
+ className: e("absolute top-2 right-2", n),
40
+ ...r
41
+ });
42
+ }
31
43
  //#endregion
32
- export { a as Alert, s as AlertDescription, o as AlertTitle };
44
+ export { i as Alert, s as AlertAction, o as AlertDescription, a as AlertTitle };
@@ -1,6 +1,14 @@
1
1
  "use client";
2
- import * as e from "@radix-ui/react-aspect-ratio";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { jsx as t } from "react/jsx-runtime";
3
4
  //#region src/components/ui/aspect-ratio.tsx
4
- var t = e.Root;
5
+ function n({ ratio: n, className: r, ...i }) {
6
+ return /* @__PURE__ */ t("div", {
7
+ "data-slot": "aspect-ratio",
8
+ style: { "--ratio": n },
9
+ className: e("relative aspect-(--ratio)", r),
10
+ ...i
11
+ });
12
+ }
5
13
  //#endregion
6
- export { t as AspectRatio };
14
+ export { n as AspectRatio };
@@ -1,29 +1,51 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import "react";
4
3
  import { jsx as t } from "react/jsx-runtime";
5
- import * as n from "@radix-ui/react-avatar";
4
+ import "react";
5
+ import { Avatar as n } from "@base-ui/react/avatar";
6
6
  //#region src/components/ui/avatar.tsx
7
- function r({ className: r, ...i }) {
7
+ function r({ className: r, size: i = "default", ...a }) {
8
8
  return /* @__PURE__ */ t(n.Root, {
9
9
  "data-slot": "avatar",
10
- className: e("relative flex size-8 shrink-0 overflow-hidden rounded-full", r),
11
- ...i
10
+ "data-size": i,
11
+ className: e("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", r),
12
+ ...a
12
13
  });
13
14
  }
14
15
  function i({ className: r, ...i }) {
15
16
  return /* @__PURE__ */ t(n.Image, {
16
17
  "data-slot": "avatar-image",
17
- className: e("aspect-square size-full", r),
18
+ className: e("aspect-square size-full rounded-full object-cover", r),
18
19
  ...i
19
20
  });
20
21
  }
21
22
  function a({ className: r, ...i }) {
22
23
  return /* @__PURE__ */ t(n.Fallback, {
23
24
  "data-slot": "avatar-fallback",
24
- className: e("bg-muted flex size-full items-center justify-center rounded-full", r),
25
+ className: e("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs", r),
25
26
  ...i
26
27
  });
27
28
  }
29
+ function o({ className: n, ...r }) {
30
+ return /* @__PURE__ */ t("span", {
31
+ "data-slot": "avatar-badge",
32
+ className: e("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", n),
33
+ ...r
34
+ });
35
+ }
36
+ function s({ className: n, ...r }) {
37
+ return /* @__PURE__ */ t("div", {
38
+ "data-slot": "avatar-group",
39
+ className: e("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", n),
40
+ ...r
41
+ });
42
+ }
43
+ function c({ className: n, ...r }) {
44
+ return /* @__PURE__ */ t("div", {
45
+ "data-slot": "avatar-group-count",
46
+ className: e("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", n),
47
+ ...r
48
+ });
49
+ }
28
50
  //#endregion
29
- export { r as Avatar, a as AvatarFallback, i as AvatarImage };
51
+ export { r as Avatar, o as AvatarBadge, a as AvatarFallback, s as AvatarGroup, c as AvatarGroupCount, i as AvatarImage };
@@ -1,23 +1,29 @@
1
+ "use client";
1
2
  import { cn as e } from "../../lib/utils.js";
2
- import "react";
3
- import { jsx as t } from "react/jsx-runtime";
4
- import { cva as n } from "class-variance-authority";
5
- import { Slot as r } from "@radix-ui/react-slot";
3
+ import { cva as t } from "class-variance-authority";
4
+ import { mergeProps as n } from "@base-ui/react/merge-props";
5
+ import { useRender as r } from "@base-ui/react/use-render";
6
6
  //#region src/components/ui/badge.tsx
7
- var i = n("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
7
+ var i = t("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
8
8
  variants: { variant: {
9
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
10
- secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
11
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
12
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
9
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
10
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
11
+ destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
12
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
13
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
14
+ link: "text-primary underline-offset-4 hover:underline"
13
15
  } },
14
16
  defaultVariants: { variant: "default" }
15
17
  });
16
- function a({ className: n, variant: a, asChild: o = !1, ...s }) {
17
- return /* @__PURE__ */ t(o ? r : "span", {
18
- "data-slot": "badge",
19
- className: e(i({ variant: a }), n),
20
- ...s
18
+ function a({ className: t, variant: a = "default", render: o, ...s }) {
19
+ return r({
20
+ defaultTagName: "span",
21
+ props: n({ className: e(i({ variant: a }), t) }, s),
22
+ render: o,
23
+ state: {
24
+ slot: "badge",
25
+ variant: a
26
+ }
21
27
  });
22
28
  }
23
29
  //#endregion
@@ -1,60 +1,73 @@
1
+ "use client";
1
2
  import { cn as e } from "../../lib/utils.js";
2
- import * as t from "react";
3
- import { ChevronRight as n, MoreHorizontal as r } from "lucide-react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import { Slot as o } from "@radix-ui/react-slot";
3
+ import { ChevronRightIcon as t, MoreHorizontalIcon as n } from "lucide-react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import "react";
6
+ import { mergeProps as a } from "@base-ui/react/merge-props";
7
+ import { useRender as o } from "@base-ui/react/use-render";
6
8
  //#region src/components/ui/breadcrumb.tsx
7
- var s = t.forwardRef(({ ...e }, t) => /* @__PURE__ */ i("nav", {
8
- ref: t,
9
- "aria-label": "breadcrumb",
10
- ...e
11
- }));
12
- s.displayName = "Breadcrumb";
13
- var c = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i("ol", {
14
- ref: r,
15
- className: e("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", t),
16
- ...n
17
- }));
18
- c.displayName = "BreadcrumbList";
19
- var l = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i("li", {
20
- ref: r,
21
- className: e("inline-flex items-center gap-1.5", t),
22
- ...n
23
- }));
24
- l.displayName = "BreadcrumbItem";
25
- var u = t.forwardRef(({ asChild: t, className: n, ...r }, a) => /* @__PURE__ */ i(t ? o : "a", {
26
- ref: a,
27
- className: e("transition-colors hover:text-foreground", n),
28
- ...r
29
- }));
30
- u.displayName = "BreadcrumbLink";
31
- var d = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ i("span", {
32
- ref: r,
33
- role: "link",
34
- "aria-disabled": "true",
35
- "aria-current": "page",
36
- className: e("font-normal text-foreground", t),
37
- ...n
38
- }));
39
- d.displayName = "BreadcrumbPage";
40
- var f = ({ children: t, className: r, ...a }) => /* @__PURE__ */ i("li", {
41
- role: "presentation",
42
- "aria-hidden": "true",
43
- className: e("[&>svg]:w-3.5 [&>svg]:h-3.5", r),
44
- ...a,
45
- children: t ?? /* @__PURE__ */ i(n, {})
46
- });
47
- f.displayName = "BreadcrumbSeparator";
48
- var p = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
49
- role: "presentation",
50
- "aria-hidden": "true",
51
- className: e("flex h-9 w-9 items-center justify-center", t),
52
- ...n,
53
- children: [/* @__PURE__ */ i(r, { className: "h-4 w-4" }), /* @__PURE__ */ i("span", {
54
- className: "sr-only",
55
- children: "More"
56
- })]
57
- });
58
- p.displayName = "BreadcrumbElipssis";
9
+ function s({ className: t, ...n }) {
10
+ return /* @__PURE__ */ r("nav", {
11
+ "aria-label": "breadcrumb",
12
+ "data-slot": "breadcrumb",
13
+ className: e(t),
14
+ ...n
15
+ });
16
+ }
17
+ function c({ className: t, ...n }) {
18
+ return /* @__PURE__ */ r("ol", {
19
+ "data-slot": "breadcrumb-list",
20
+ className: e("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground", t),
21
+ ...n
22
+ });
23
+ }
24
+ function l({ className: t, ...n }) {
25
+ return /* @__PURE__ */ r("li", {
26
+ "data-slot": "breadcrumb-item",
27
+ className: e("inline-flex items-center gap-1", t),
28
+ ...n
29
+ });
30
+ }
31
+ function u({ className: t, render: n, ...r }) {
32
+ return o({
33
+ defaultTagName: "a",
34
+ props: a({ className: e("transition-colors hover:text-foreground", t) }, r),
35
+ render: n,
36
+ state: { slot: "breadcrumb-link" }
37
+ });
38
+ }
39
+ function d({ className: t, ...n }) {
40
+ return /* @__PURE__ */ r("span", {
41
+ "data-slot": "breadcrumb-page",
42
+ role: "link",
43
+ "aria-disabled": "true",
44
+ "aria-current": "page",
45
+ className: e("font-normal text-foreground", t),
46
+ ...n
47
+ });
48
+ }
49
+ function f({ children: n, className: i, ...a }) {
50
+ return /* @__PURE__ */ r("li", {
51
+ "data-slot": "breadcrumb-separator",
52
+ role: "presentation",
53
+ "aria-hidden": "true",
54
+ className: e("[&>svg]:size-3.5", i),
55
+ ...a,
56
+ children: n ?? /* @__PURE__ */ r(t, {})
57
+ });
58
+ }
59
+ function p({ className: t, ...a }) {
60
+ return /* @__PURE__ */ i("span", {
61
+ "data-slot": "breadcrumb-ellipsis",
62
+ role: "presentation",
63
+ "aria-hidden": "true",
64
+ className: e("flex size-5 items-center justify-center [&>svg]:size-4", t),
65
+ ...a,
66
+ children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r("span", {
67
+ className: "sr-only",
68
+ children: "More"
69
+ })]
70
+ });
71
+ }
59
72
  //#endregion
60
73
  export { s as Breadcrumb, p as BreadcrumbEllipsis, l as BreadcrumbItem, u as BreadcrumbLink, c as BreadcrumbList, d as BreadcrumbPage, f as BreadcrumbSeparator };
@@ -1,38 +1,42 @@
1
+ "use client";
1
2
  import { cn as e } from "../../lib/utils.js";
2
3
  import { Separator as t } from "./separator.js";
3
4
  import { jsx as n } from "react/jsx-runtime";
4
5
  import { cva as r } from "class-variance-authority";
5
- import { Slot as i } from "@radix-ui/react-slot";
6
+ import { mergeProps as i } from "@base-ui/react/merge-props";
7
+ import { useRender as a } from "@base-ui/react/use-render";
6
8
  //#region src/components/ui/button-group.tsx
7
- var a = r("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
9
+ var o = r("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
8
10
  variants: { orientation: {
9
- horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
10
- vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
11
+ horizontal: "*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
12
+ vertical: "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
11
13
  } },
12
14
  defaultVariants: { orientation: "horizontal" }
13
15
  });
14
- function o({ className: t, orientation: r, ...i }) {
16
+ function s({ className: t, orientation: r, ...i }) {
15
17
  return /* @__PURE__ */ n("div", {
16
18
  role: "group",
17
19
  "data-slot": "button-group",
18
20
  "data-orientation": r,
19
- className: e(a({ orientation: r }), t),
21
+ className: e(o({ orientation: r }), t),
20
22
  ...i
21
23
  });
22
24
  }
23
- function s({ className: t, asChild: r = !1, ...a }) {
24
- return /* @__PURE__ */ n(r ? i : "div", {
25
- className: e("bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none", t),
26
- ...a
25
+ function c({ className: t, render: n, ...r }) {
26
+ return a({
27
+ defaultTagName: "div",
28
+ props: i({ className: e("flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", t) }, r),
29
+ render: n,
30
+ state: { slot: "button-group-text" }
27
31
  });
28
32
  }
29
- function c({ className: r, orientation: i = "vertical", ...a }) {
33
+ function l({ className: r, orientation: i = "vertical", ...a }) {
30
34
  return /* @__PURE__ */ n(t, {
31
35
  "data-slot": "button-group-separator",
32
36
  orientation: i,
33
- className: e("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", r),
37
+ className: e("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", r),
34
38
  ...a
35
39
  });
36
40
  }
37
41
  //#endregion
38
- export { o as ButtonGroup, c as ButtonGroupSeparator, s as ButtonGroupText, a as buttonGroupVariants };
42
+ export { s as ButtonGroup, l as ButtonGroupSeparator, c as ButtonGroupText, o as buttonGroupVariants };
@@ -1,24 +1,28 @@
1
+ "use client";
1
2
  import { cn as e } from "../../lib/utils.js";
2
- import "react";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  import { cva as n } from "class-variance-authority";
5
- import { Slot as r } from "@radix-ui/react-slot";
5
+ import { Button as r } from "@base-ui/react/button";
6
6
  //#region src/components/ui/button.tsx
7
- var i = n("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
7
+ var i = n("group/button inline-flex shrink-0 items-center justify-center cursor-pointer rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
8
8
  variants: {
9
9
  variant: {
10
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
11
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
12
- outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-card dark:border-border dark:hover:bg-accent dark:hover:text-accent-foreground",
13
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80 dark:bg-secondary/20 dark:text-secondary-foreground dark:hover:bg-secondary/30",
14
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",
10
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
11
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
12
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
13
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
14
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
15
15
  link: "text-primary underline-offset-4 hover:underline"
16
16
  },
17
17
  size: {
18
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
19
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
20
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
21
- icon: "size-9"
18
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
19
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
20
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
21
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
22
+ icon: "size-8",
23
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
24
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
25
+ "icon-lg": "size-9"
22
26
  }
23
27
  },
24
28
  defaultVariants: {
@@ -26,15 +30,15 @@ var i = n("inline-flex items-center justify-center gap-2 whitespace-nowrap round
26
30
  size: "default"
27
31
  }
28
32
  });
29
- function a({ className: n, variant: a, size: o, asChild: s = !1, ...c }) {
30
- return /* @__PURE__ */ t(s ? r : "button", {
33
+ function a({ className: n, variant: a = "default", size: o = "default", ...s }) {
34
+ return /* @__PURE__ */ t(r, {
31
35
  "data-slot": "button",
32
36
  className: e(i({
33
37
  variant: a,
34
38
  size: o,
35
39
  className: n
36
40
  })),
37
- ...c
41
+ ...s
38
42
  });
39
43
  }
40
44
  //#endregion
@@ -1,89 +1,93 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  import { Button as t, buttonVariants as n } from "./button.js";
4
- import * as r from "react";
5
- import { ChevronDownIcon as i, ChevronLeftIcon as a, ChevronRightIcon as o } from "lucide-react";
6
- import { jsx as s } from "react/jsx-runtime";
4
+ import { ChevronDownIcon as r, ChevronLeftIcon as i, ChevronRightIcon as a } from "lucide-react";
5
+ import { jsx as o } from "react/jsx-runtime";
6
+ import * as s from "react";
7
7
  import { DayPicker as c, getDefaultClassNames as l } from "react-day-picker";
8
+ import { ptBR as u } from "date-fns/locale";
8
9
  //#region src/components/ui/calendar.tsx
9
- function u({ className: t, classNames: r, showOutsideDays: u = !0, captionLayout: f = "label", buttonVariant: p = "ghost", formatters: m, components: h, ...g }) {
10
- let _ = l();
11
- return /* @__PURE__ */ s(c, {
12
- showOutsideDays: u,
13
- className: e("group/calendar bg-background 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`, t),
14
- captionLayout: f,
10
+ function d({ className: t, classNames: s, showOutsideDays: d = !0, captionLayout: p = "label", buttonVariant: m = "ghost", locale: h = u, formatters: g, components: _, ...v }) {
11
+ let y = l();
12
+ return /* @__PURE__ */ o(c, {
13
+ showOutsideDays: d,
14
+ className: e("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, t),
15
+ captionLayout: p,
16
+ locale: h,
15
17
  formatters: {
16
- formatMonthDropdown: (e) => e.toLocaleString("default", { month: "short" }),
17
- ...m
18
+ formatMonthDropdown: (e) => e.toLocaleString(h?.code, { month: "short" }),
19
+ ...g
18
20
  },
19
21
  classNames: {
20
- root: e("w-fit", _.root),
21
- months: e("relative flex flex-col gap-4 md:flex-row", _.months),
22
- month: e("flex w-full flex-col gap-4", _.month),
23
- nav: e("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", _.nav),
24
- button_previous: e(n({ variant: p }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", _.button_previous),
25
- button_next: e(n({ variant: p }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", _.button_next),
26
- month_caption: e("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", _.month_caption),
27
- dropdowns: e("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", _.dropdowns),
28
- dropdown_root: e("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", _.dropdown_root),
29
- dropdown: e("absolute inset-0 bg-popover opacity-0", _.dropdown),
30
- caption_label: e("font-medium select-none", f === "label" ? "text-sm" : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", _.caption_label),
31
- table: "w-full border-collapse",
32
- weekdays: e("flex", _.weekdays),
33
- weekday: e("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none", _.weekday),
34
- week: e("mt-2 flex w-full", _.week),
35
- week_number_header: e("w-(--cell-size) select-none", _.week_number_header),
36
- week_number: e("text-[0.8rem] text-muted-foreground select-none", _.week_number),
37
- day: e("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", g.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md", _.day),
38
- range_start: e("rounded-l-md bg-accent", _.range_start),
39
- range_middle: e("rounded-none", _.range_middle),
40
- range_end: e("rounded-r-md bg-accent", _.range_end),
41
- today: e("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", _.today),
42
- outside: e("text-muted-foreground aria-selected:text-muted-foreground", _.outside),
43
- disabled: e("text-muted-foreground opacity-50", _.disabled),
44
- hidden: e("invisible", _.hidden),
45
- ...r
22
+ root: e("w-fit", y.root),
23
+ months: e("relative flex flex-col gap-4 md:flex-row", y.months),
24
+ month: e("flex w-full flex-col gap-4", y.month),
25
+ nav: e("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", y.nav),
26
+ button_previous: e(n({ variant: m }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", y.button_previous),
27
+ button_next: e(n({ variant: m }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", y.button_next),
28
+ month_caption: e("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", y.month_caption),
29
+ dropdowns: e("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", y.dropdowns),
30
+ dropdown_root: e("relative rounded-(--cell-radius)", y.dropdown_root),
31
+ dropdown: e("absolute inset-0 bg-popover opacity-0", y.dropdown),
32
+ caption_label: e("font-medium select-none", p === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", y.caption_label),
33
+ month_grid: e("w-full border-collapse", y.month_grid),
34
+ weekdays: e("flex", y.weekdays),
35
+ weekday: e("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", y.weekday),
36
+ week: e("mt-2 flex w-full", y.week),
37
+ week_number_header: e("w-(--cell-size) select-none", y.week_number_header),
38
+ week_number: e("text-[0.8rem] text-muted-foreground select-none", y.week_number),
39
+ day: e("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", v.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", y.day),
40
+ range_start: e("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", y.range_start),
41
+ range_middle: e("rounded-none", y.range_middle),
42
+ range_end: e("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", y.range_end),
43
+ today: e("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", y.today),
44
+ outside: e("text-muted-foreground aria-selected:text-muted-foreground", y.outside),
45
+ disabled: e("text-muted-foreground opacity-50", y.disabled),
46
+ hidden: e("invisible", y.hidden),
47
+ ...s
46
48
  },
47
49
  components: {
48
- Root: ({ className: t, rootRef: n, ...r }) => /* @__PURE__ */ s("div", {
50
+ Root: ({ className: t, rootRef: n, ...r }) => /* @__PURE__ */ o("div", {
49
51
  "data-slot": "calendar",
50
52
  ref: n,
51
53
  className: e(t),
52
54
  ...r
53
55
  }),
54
- Chevron: ({ className: t, orientation: n, ...r }) => s(n === "left" ? a : n === "right" ? o : i, {
56
+ Chevron: ({ className: t, orientation: n, ...s }) => o(n === "left" ? i : n === "right" ? a : r, {
55
57
  className: e("size-4", t),
56
- ...r
58
+ ...s
59
+ }),
60
+ DayButton: ({ ...e }) => /* @__PURE__ */ o(f, {
61
+ locale: h,
62
+ ...e
57
63
  }),
58
- DayButton: d,
59
- WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ s("td", {
64
+ WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ o("td", {
60
65
  ...t,
61
- children: /* @__PURE__ */ s("div", {
66
+ children: /* @__PURE__ */ o("div", {
62
67
  className: "flex size-(--cell-size) items-center justify-center text-center",
63
68
  children: e
64
69
  })
65
70
  }),
66
- ...h
71
+ ..._
67
72
  },
68
- ...g
73
+ ...v
69
74
  });
70
75
  }
71
- function d({ className: n, day: i, modifiers: a, ...o }) {
72
- let c = l(), u = r.useRef(null);
73
- return r.useEffect(() => {
74
- a.focused && u.current?.focus();
75
- }, [a.focused]), /* @__PURE__ */ s(t, {
76
- ref: u,
76
+ function f({ className: n, day: r, modifiers: i, locale: a, ...c }) {
77
+ let u = l(), d = s.useRef(null);
78
+ return s.useEffect(() => {
79
+ i.focused && d.current?.focus();
80
+ }, [i.focused]), /* @__PURE__ */ o(t, {
77
81
  variant: "ghost",
78
82
  size: "icon",
79
- "data-day": i.date.toLocaleDateString(),
80
- "data-selected-single": a.selected && !a.range_start && !a.range_end && !a.range_middle,
81
- "data-range-start": a.range_start,
82
- "data-range-end": a.range_end,
83
- "data-range-middle": a.range_middle,
84
- className: e("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:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", c.day, n),
85
- ...o
83
+ "data-day": r.date.toLocaleDateString(a?.code),
84
+ "data-selected-single": i.selected && !i.range_start && !i.range_end && !i.range_middle,
85
+ "data-range-start": i.range_start,
86
+ "data-range-end": i.range_end,
87
+ "data-range-middle": i.range_middle,
88
+ className: e("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", u.day, n),
89
+ ...c
86
90
  });
87
91
  }
88
92
  //#endregion
89
- export { u as Calendar, d as CalendarDayButton };
93
+ export { d as Calendar, f as CalendarDayButton };