@middag-io/react 0.32.0 → 0.34.0

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 (211) hide show
  1. package/README.md +2 -2
  2. package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
  3. package/dist-lib/base/shell/AuthShell.js +39 -0
  4. package/dist-lib/base/shell/BasicShell.js +207 -0
  5. package/dist-lib/base/shell/ImmersiveShell.js +55 -0
  6. package/dist-lib/base/shell/partials/InspectorContext.d.ts.map +1 -1
  7. package/dist-lib/base/shell/partials/InspectorContext.js +60 -0
  8. package/dist-lib/base/shell/partials/InspectorPanel.js +22 -0
  9. package/dist-lib/base/shell/partials/NavErrorBoundary.js +66 -0
  10. package/dist-lib/base/shell/partials/OverlayScreen.js +36 -0
  11. package/dist-lib/base/shell/partials/PageActionButton.js +4 -0
  12. package/dist-lib/base/theme/appearance.js +39 -0
  13. package/dist-lib/base/theme/host-layout-detector.js +39 -0
  14. package/dist-lib/base/theme/host-theme-detector.js +131 -0
  15. package/dist-lib/base/theme/sidebar-safelist.txt +20 -0
  16. package/dist-lib/base/theme/theme-bridge.css +164 -0
  17. package/dist-lib/base/theme/theme-context.js +103 -0
  18. package/dist-lib/base/theme/themes/classic.css +174 -0
  19. package/dist-lib/base/theme/tokens.css +290 -0
  20. package/dist-lib/base/theme/useHostTheme.js +34 -0
  21. package/dist-lib/base/utils/clipboard.js +16 -0
  22. package/dist-lib/base/utils/conditions.js +13 -0
  23. package/dist-lib/base/utils/icon-registry.js +16 -0
  24. package/dist-lib/base/utils/icons.js +11 -0
  25. package/dist-lib/base/utils/interpolate.js +6 -0
  26. package/dist-lib/base/utils/register-default-icons.js +9 -0
  27. package/dist-lib/base/utils/storage.js +30 -0
  28. package/dist-lib/base/utils/time.js +59 -0
  29. package/dist-lib/chunks/subpath-BD_PKGUX.js +146 -0
  30. package/dist-lib/chunks/subpath-DLFO_UGQ.js +604 -0
  31. package/dist-lib/components/reui/accordion.js +43 -0
  32. package/dist-lib/components/reui/alert-dialog.js +101 -0
  33. package/dist-lib/components/reui/alert.js +55 -0
  34. package/dist-lib/components/reui/aspect-ratio.js +11 -0
  35. package/dist-lib/components/reui/autocomplete.js +170 -0
  36. package/dist-lib/components/reui/avatar.js +51 -0
  37. package/dist-lib/components/reui/badge.js +64 -0
  38. package/dist-lib/components/reui/breadcrumb.js +69 -0
  39. package/dist-lib/components/reui/button-group.js +38 -0
  40. package/dist-lib/components/reui/button.js +47 -0
  41. package/dist-lib/components/reui/calendar.js +89 -0
  42. package/dist-lib/components/reui/card.js +55 -0
  43. package/dist-lib/components/reui/carousel.js +110 -0
  44. package/dist-lib/components/reui/chart.js +130 -0
  45. package/dist-lib/components/reui/checkbox.js +20 -0
  46. package/dist-lib/components/reui/collapsible.js +23 -0
  47. package/dist-lib/components/reui/combobox.js +166 -0
  48. package/dist-lib/components/reui/command.js +85 -0
  49. package/dist-lib/components/reui/context-menu.js +121 -0
  50. package/dist-lib/components/reui/data-grid/data-grid-column-filter.js +108 -0
  51. package/dist-lib/components/reui/data-grid/data-grid-column-header.js +217 -0
  52. package/dist-lib/components/reui/data-grid/data-grid-column-visibility.js +25 -0
  53. package/dist-lib/components/reui/data-grid/data-grid-pagination.js +132 -0
  54. package/dist-lib/components/reui/data-grid/data-grid-scroll-area.js +183 -0
  55. package/dist-lib/components/reui/data-grid/data-grid-table-dnd-rows.js +125 -0
  56. package/dist-lib/components/reui/data-grid/data-grid-table-dnd.js +130 -0
  57. package/dist-lib/components/reui/data-grid/data-grid-table-virtual.js +156 -0
  58. package/dist-lib/components/reui/data-grid/data-grid-table.js +546 -0
  59. package/dist-lib/components/reui/data-grid/data-grid.js +113 -0
  60. package/dist-lib/components/reui/data-grid-pagination.js +131 -0
  61. package/dist-lib/components/reui/date-selector.js +642 -0
  62. package/dist-lib/components/reui/dialog.js +94 -0
  63. package/dist-lib/components/reui/drawer.js +77 -0
  64. package/dist-lib/components/reui/dropdown-menu.js +123 -0
  65. package/dist-lib/components/reui/empty.js +59 -0
  66. package/dist-lib/components/reui/field.js +115 -0
  67. package/dist-lib/components/reui/filters.js +873 -0
  68. package/dist-lib/components/reui/frame.js +97 -0
  69. package/dist-lib/components/reui/hover-card.js +31 -0
  70. package/dist-lib/components/reui/icon-placeholder.js +14 -0
  71. package/dist-lib/components/reui/index.js +18 -0
  72. package/dist-lib/components/reui/input-group.js +78 -0
  73. package/dist-lib/components/reui/input-otp.js +44 -0
  74. package/dist-lib/components/reui/input.js +14 -0
  75. package/dist-lib/components/reui/item.js +116 -0
  76. package/dist-lib/components/reui/kanban.js +316 -0
  77. package/dist-lib/components/reui/kbd.js +19 -0
  78. package/dist-lib/components/reui/label.js +14 -0
  79. package/dist-lib/components/reui/menubar.js +132 -0
  80. package/dist-lib/components/reui/native-select.js +37 -0
  81. package/dist-lib/components/reui/navigation-menu.js +80 -0
  82. package/dist-lib/components/reui/number-field.js +126 -0
  83. package/dist-lib/components/reui/pagination.js +78 -0
  84. package/dist-lib/components/reui/phone-input.js +124 -0
  85. package/dist-lib/components/reui/popover.js +55 -0
  86. package/dist-lib/components/reui/progress.js +20 -0
  87. package/dist-lib/components/reui/radio-group.js +27 -0
  88. package/dist-lib/components/reui/rating.js +81 -0
  89. package/dist-lib/components/reui/resizable.js +31 -0
  90. package/dist-lib/components/reui/scroll-area.js +36 -0
  91. package/dist-lib/components/reui/scrollspy.js +104 -0
  92. package/dist-lib/components/reui/select.js +97 -0
  93. package/dist-lib/components/reui/separator.js +17 -0
  94. package/dist-lib/components/reui/sheet.js +81 -0
  95. package/dist-lib/components/reui/sidebar.js +350 -0
  96. package/dist-lib/components/reui/skeleton.js +12 -0
  97. package/dist-lib/components/reui/slider.js +35 -0
  98. package/dist-lib/components/reui/sonner.js +28 -0
  99. package/dist-lib/components/reui/sortable.js +172 -0
  100. package/dist-lib/components/reui/spinner.js +14 -0
  101. package/dist-lib/components/reui/stepper.js +193 -0
  102. package/dist-lib/components/reui/svgs/claudeAiIcon.js +13 -0
  103. package/dist-lib/components/reui/svgs/gemini.js +257 -0
  104. package/dist-lib/components/reui/svgs/openai.js +10 -0
  105. package/dist-lib/components/reui/svgs/openaiDark.js +13 -0
  106. package/dist-lib/components/reui/switch.js +19 -0
  107. package/dist-lib/components/reui/table.js +66 -0
  108. package/dist-lib/components/reui/tabs.js +47 -0
  109. package/dist-lib/components/reui/textarea.js +13 -0
  110. package/dist-lib/components/reui/timeline.js +84 -0
  111. package/dist-lib/components/reui/toggle-group.js +48 -0
  112. package/dist-lib/components/reui/toggle.js +36 -0
  113. package/dist-lib/components/reui/tooltip.js +35 -0
  114. package/dist-lib/components/reui/tree.js +102 -0
  115. package/dist-lib/contracts/block-data/data-display.d.ts +8 -0
  116. package/dist-lib/contracts/block-data/data-display.d.ts.map +1 -1
  117. package/dist-lib/i18n/I18nProvider.js +23 -0
  118. package/dist-lib/i18n/host-resolver.js +10 -0
  119. package/dist-lib/i18n/instance.js +2 -0
  120. package/dist-lib/i18n/locales/en/ui.json +266 -0
  121. package/dist-lib/i18n/locales/en/validators.json +13 -0
  122. package/dist-lib/i18n/locales/pt-BR/ui.json +266 -0
  123. package/dist-lib/i18n/locales/pt-BR/validators.json +13 -0
  124. package/dist-lib/i18n/register-strings.js +7 -0
  125. package/dist-lib/i18n/render-label.js +13 -0
  126. package/dist-lib/i18n/resolve-field-error.js +10 -0
  127. package/dist-lib/i18n/useHostString.js +31 -0
  128. package/dist-lib/i18n/useTranslation.js +48 -0
  129. package/dist-lib/lib/actions/resolve-action-target.js +48 -0
  130. package/dist-lib/lib/hooks/use-copy-to-clipboard.js +18 -0
  131. package/dist-lib/lib/hooks/use-file-upload.js +171 -0
  132. package/dist-lib/lib/hooks/use-mobile.js +18 -0
  133. package/dist-lib/lib/portal-container.js +7 -0
  134. package/dist-lib/lib/utils.js +8 -0
  135. package/dist-lib/middag-react.css +1 -1
  136. package/dist-lib/middag-react.js +26 -5
  137. package/package.json +39 -7
  138. package/dist-lib/_redirects +0 -1
  139. package/dist-lib/api/example/moodle/get/books.json +0 -209
  140. package/dist-lib/api/example/moodle/get/dashboard.json +0 -203
  141. package/dist-lib/api/example/wordpress/get/products.json +0 -165
  142. package/dist-lib/api/index.json +0 -66
  143. package/dist-lib/api/inspector/connectors/canvas.json +0 -18
  144. package/dist-lib/api/inspector/connectors/moodle.json +0 -18
  145. package/dist-lib/api/inspector/connectors/n8n.json +0 -18
  146. package/dist-lib/api/inspector/connectors/open-edx.json +0 -18
  147. package/dist-lib/api/inspector/offerings/off-1.json +0 -18
  148. package/dist-lib/api/inspector/offerings/off-2.json +0 -18
  149. package/dist-lib/api/inspector/offerings/off-3.json +0 -18
  150. package/dist-lib/api/inspector/offerings/off-4.json +0 -18
  151. package/dist-lib/api/inspector/offerings/off-5.json +0 -18
  152. package/dist-lib/api/inspector/offerings/off-6.json +0 -17
  153. package/dist-lib/lottie/calendar/schedule-1.json +0 -1
  154. package/dist-lib/lottie/calendar/schedule-2.json +0 -1
  155. package/dist-lib/lottie/celebration/confetti-1.json +0 -1
  156. package/dist-lib/lottie/celebration/confetti-2.json +0 -1
  157. package/dist-lib/lottie/celebration/confetti-3.json +0 -1
  158. package/dist-lib/lottie/cloud/cloud-1.json +0 -1
  159. package/dist-lib/lottie/cloud/cloud-2.json +0 -1
  160. package/dist-lib/lottie/connection/network-1.json +0 -1
  161. package/dist-lib/lottie/connection/network-2.json +0 -1
  162. package/dist-lib/lottie/connection/network-3.json +0 -1
  163. package/dist-lib/lottie/dashboard/analytics-1.json +0 -1
  164. package/dist-lib/lottie/dashboard/analytics-2.json +0 -1
  165. package/dist-lib/lottie/dashboard/analytics-3.json +0 -1
  166. package/dist-lib/lottie/email/mail-1.json +0 -1
  167. package/dist-lib/lottie/email/mail-2.json +0 -1
  168. package/dist-lib/lottie/email/mail-3.json +0 -1
  169. package/dist-lib/lottie/empty-state/empty-1.json +0 -1
  170. package/dist-lib/lottie/empty-state/empty-2.json +0 -1
  171. package/dist-lib/lottie/empty-state/empty-3.json +0 -1
  172. package/dist-lib/lottie/error/warning-1.json +0 -1
  173. package/dist-lib/lottie/error/warning-2.json +0 -1
  174. package/dist-lib/lottie/error/warning-3.json +0 -1
  175. package/dist-lib/lottie/index.ts +0 -49
  176. package/dist-lib/lottie/loading/spinner-1.json +0 -1
  177. package/dist-lib/lottie/loading/spinner-2.json +0 -1
  178. package/dist-lib/lottie/loading/spinner-3.json +0 -1
  179. package/dist-lib/lottie/maintenance/construction-1.json +0 -1
  180. package/dist-lib/lottie/maintenance/construction-2.json +0 -1
  181. package/dist-lib/lottie/maintenance/construction-3.json +0 -1
  182. package/dist-lib/lottie/not-found/404-1.json +0 -1
  183. package/dist-lib/lottie/not-found/404-2.json +0 -1
  184. package/dist-lib/lottie/not-found/404-3.json +0 -1
  185. package/dist-lib/lottie/notification/bell-1.json +0 -1
  186. package/dist-lib/lottie/notification/bell-2.json +0 -1
  187. package/dist-lib/lottie/notification/bell-3.json +0 -1
  188. package/dist-lib/lottie/onboarding/welcome-1.json +0 -1
  189. package/dist-lib/lottie/onboarding/welcome-2.json +0 -1
  190. package/dist-lib/lottie/onboarding/welcome-3.json +0 -1
  191. package/dist-lib/lottie/payment/wallet-1.json +0 -1
  192. package/dist-lib/lottie/payment/wallet-2.json +0 -1
  193. package/dist-lib/lottie/payment/wallet-3.json +0 -1
  194. package/dist-lib/lottie/search/search-1.json +0 -1
  195. package/dist-lib/lottie/search/search-2.json +0 -1
  196. package/dist-lib/lottie/search/search-3.json +0 -1
  197. package/dist-lib/lottie/security/lock-1.json +0 -1
  198. package/dist-lib/lottie/security/lock-2.json +0 -1
  199. package/dist-lib/lottie/security/lock-3.json +0 -1
  200. package/dist-lib/lottie/settings/gear-1.json +0 -1
  201. package/dist-lib/lottie/settings/gear-2.json +0 -1
  202. package/dist-lib/lottie/settings/gear-3.json +0 -1
  203. package/dist-lib/lottie/success/check-1.json +0 -1
  204. package/dist-lib/lottie/success/check-2.json +0 -1
  205. package/dist-lib/lottie/success/check-3.json +0 -1
  206. package/dist-lib/lottie/upload/upload-1.json +0 -1
  207. package/dist-lib/lottie/upload/upload-2.json +0 -1
  208. package/dist-lib/lottie/upload/upload-3.json +0 -1
  209. package/dist-lib/lottie/user/profile-1.json +0 -1
  210. package/dist-lib/lottie/user/profile-2.json +0 -1
  211. package/dist-lib/lottie/user/profile-3.json +0 -1
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import { Button as t } from "./button.js";
4
+ import "react";
5
+ import { XIcon as n } from "lucide-react";
6
+ import { Dialog as r } from "radix-ui";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
8
+ //#region src/components/reui/dialog.tsx
9
+ function o({ ...e }) {
10
+ return /* @__PURE__ */ i(r.Root, {
11
+ "data-slot": "dialog",
12
+ ...e
13
+ });
14
+ }
15
+ function s({ ...e }) {
16
+ return /* @__PURE__ */ i(r.Trigger, {
17
+ "data-slot": "dialog-trigger",
18
+ ...e
19
+ });
20
+ }
21
+ function c({ ...e }) {
22
+ return /* @__PURE__ */ i(r.Portal, {
23
+ "data-slot": "dialog-portal",
24
+ ...e
25
+ });
26
+ }
27
+ function l({ ...e }) {
28
+ return /* @__PURE__ */ i(r.Close, {
29
+ "data-slot": "dialog-close",
30
+ ...e
31
+ });
32
+ }
33
+ function u({ className: t, ...n }) {
34
+ return /* @__PURE__ */ i(r.Overlay, {
35
+ "data-slot": "dialog-overlay",
36
+ className: e("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", t),
37
+ ...n
38
+ });
39
+ }
40
+ function d({ className: t, children: o, showCloseButton: s = !0, ...l }) {
41
+ return /* @__PURE__ */ a(c, {
42
+ "data-slot": "dialog-portal",
43
+ children: [/* @__PURE__ */ i(u, {}), /* @__PURE__ */ a(r.Content, {
44
+ "data-slot": "dialog-content",
45
+ className: e("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", t),
46
+ ...l,
47
+ children: [o, s && /* @__PURE__ */ a(r.Close, {
48
+ "data-slot": "dialog-close",
49
+ className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
50
+ children: [/* @__PURE__ */ i(n, {}), /* @__PURE__ */ i("span", {
51
+ className: "sr-only",
52
+ children: "Close"
53
+ })]
54
+ })]
55
+ })]
56
+ });
57
+ }
58
+ function f({ className: t, ...n }) {
59
+ return /* @__PURE__ */ i("div", {
60
+ "data-slot": "dialog-header",
61
+ className: e("flex flex-col gap-2 text-center sm:text-left", t),
62
+ ...n
63
+ });
64
+ }
65
+ function p({ className: n, showCloseButton: o = !1, children: s, ...c }) {
66
+ return /* @__PURE__ */ a("div", {
67
+ "data-slot": "dialog-footer",
68
+ className: e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", n),
69
+ ...c,
70
+ children: [s, o && /* @__PURE__ */ i(r.Close, {
71
+ asChild: !0,
72
+ children: /* @__PURE__ */ i(t, {
73
+ variant: "outline",
74
+ children: "Close"
75
+ })
76
+ })]
77
+ });
78
+ }
79
+ function m({ className: t, ...n }) {
80
+ return /* @__PURE__ */ i(r.Title, {
81
+ "data-slot": "dialog-title",
82
+ className: e("text-lg leading-none font-semibold", t),
83
+ ...n
84
+ });
85
+ }
86
+ function h({ className: t, ...n }) {
87
+ return /* @__PURE__ */ i(r.Description, {
88
+ "data-slot": "dialog-description",
89
+ className: e("text-sm text-muted-foreground", t),
90
+ ...n
91
+ });
92
+ }
93
+ //#endregion
94
+ export { o as Dialog, l as DialogClose, d as DialogContent, h as DialogDescription, p as DialogFooter, f as DialogHeader, u as DialogOverlay, c as DialogPortal, m as DialogTitle, s as DialogTrigger };
@@ -0,0 +1,77 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import "react";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ import { Drawer as r } from "vaul";
5
+ //#region src/components/reui/drawer.tsx
6
+ function i({ ...e }) {
7
+ return /* @__PURE__ */ t(r.Root, {
8
+ "data-slot": "drawer",
9
+ ...e
10
+ });
11
+ }
12
+ function a({ ...e }) {
13
+ return /* @__PURE__ */ t(r.Trigger, {
14
+ "data-slot": "drawer-trigger",
15
+ ...e
16
+ });
17
+ }
18
+ function o({ ...e }) {
19
+ return /* @__PURE__ */ t(r.Portal, {
20
+ "data-slot": "drawer-portal",
21
+ ...e
22
+ });
23
+ }
24
+ function s({ ...e }) {
25
+ return /* @__PURE__ */ t(r.Close, {
26
+ "data-slot": "drawer-close",
27
+ ...e
28
+ });
29
+ }
30
+ function c({ className: n, ...i }) {
31
+ return /* @__PURE__ */ t(r.Overlay, {
32
+ "data-slot": "drawer-overlay",
33
+ className: e("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", n),
34
+ ...i
35
+ });
36
+ }
37
+ function l({ className: i, children: a, ...s }) {
38
+ return /* @__PURE__ */ n(o, {
39
+ "data-slot": "drawer-portal",
40
+ children: [/* @__PURE__ */ t(c, {}), /* @__PURE__ */ n(r.Content, {
41
+ "data-slot": "drawer-content",
42
+ className: e("group/drawer-content fixed z-50 flex h-auto flex-col bg-background", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", i),
43
+ ...s,
44
+ children: [/* @__PURE__ */ t("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), a]
45
+ })]
46
+ });
47
+ }
48
+ function u({ className: n, ...r }) {
49
+ return /* @__PURE__ */ t("div", {
50
+ "data-slot": "drawer-header",
51
+ className: e("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", n),
52
+ ...r
53
+ });
54
+ }
55
+ function d({ className: n, ...r }) {
56
+ return /* @__PURE__ */ t("div", {
57
+ "data-slot": "drawer-footer",
58
+ className: e("mt-auto flex flex-col gap-2 p-4", n),
59
+ ...r
60
+ });
61
+ }
62
+ function f({ className: n, ...i }) {
63
+ return /* @__PURE__ */ t(r.Title, {
64
+ "data-slot": "drawer-title",
65
+ className: e("font-semibold text-foreground", n),
66
+ ...i
67
+ });
68
+ }
69
+ function p({ className: n, ...i }) {
70
+ return /* @__PURE__ */ t(r.Description, {
71
+ "data-slot": "drawer-description",
72
+ className: e("text-sm text-muted-foreground", n),
73
+ ...i
74
+ });
75
+ }
76
+ //#endregion
77
+ export { i as Drawer, s as DrawerClose, l as DrawerContent, p as DrawerDescription, d as DrawerFooter, u as DrawerHeader, c as DrawerOverlay, o as DrawerPortal, f as DrawerTitle, a as DrawerTrigger };
@@ -0,0 +1,123 @@
1
+ "use client";
2
+ import { cn as e } from "../../lib/utils.js";
3
+ import "react";
4
+ import { CheckIcon as t, ChevronRightIcon as n, CircleIcon as r } from "lucide-react";
5
+ import { DropdownMenu as i } from "radix-ui";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ //#region src/components/reui/dropdown-menu.tsx
8
+ function s({ ...e }) {
9
+ return /* @__PURE__ */ a(i.Root, {
10
+ "data-slot": "dropdown-menu",
11
+ ...e
12
+ });
13
+ }
14
+ function c({ ...e }) {
15
+ return /* @__PURE__ */ a(i.Portal, {
16
+ "data-slot": "dropdown-menu-portal",
17
+ ...e
18
+ });
19
+ }
20
+ function l({ ...e }) {
21
+ return /* @__PURE__ */ a(i.Trigger, {
22
+ "data-slot": "dropdown-menu-trigger",
23
+ ...e
24
+ });
25
+ }
26
+ function u({ className: t, sideOffset: n = 4, ...r }) {
27
+ return /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ a(i.Content, {
28
+ "data-slot": "dropdown-menu-content",
29
+ sideOffset: n,
30
+ className: e("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", t),
31
+ ...r
32
+ }) });
33
+ }
34
+ function d({ ...e }) {
35
+ return /* @__PURE__ */ a(i.Group, {
36
+ "data-slot": "dropdown-menu-group",
37
+ ...e
38
+ });
39
+ }
40
+ function f({ className: t, inset: n, variant: r = "default", ...o }) {
41
+ return /* @__PURE__ */ a(i.Item, {
42
+ "data-slot": "dropdown-menu-item",
43
+ "data-inset": n,
44
+ "data-variant": r,
45
+ className: e("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", t),
46
+ ...o
47
+ });
48
+ }
49
+ function p({ className: n, children: r, checked: s, ...c }) {
50
+ return /* @__PURE__ */ o(i.CheckboxItem, {
51
+ "data-slot": "dropdown-menu-checkbox-item",
52
+ className: e("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", n),
53
+ checked: s,
54
+ ...c,
55
+ children: [/* @__PURE__ */ a("span", {
56
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
57
+ children: /* @__PURE__ */ a(i.ItemIndicator, { children: /* @__PURE__ */ a(t, { className: "size-4" }) })
58
+ }), r]
59
+ });
60
+ }
61
+ function m({ ...e }) {
62
+ return /* @__PURE__ */ a(i.RadioGroup, {
63
+ "data-slot": "dropdown-menu-radio-group",
64
+ ...e
65
+ });
66
+ }
67
+ function h({ className: t, children: n, ...s }) {
68
+ return /* @__PURE__ */ o(i.RadioItem, {
69
+ "data-slot": "dropdown-menu-radio-item",
70
+ className: e("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
71
+ ...s,
72
+ children: [/* @__PURE__ */ a("span", {
73
+ className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
74
+ children: /* @__PURE__ */ a(i.ItemIndicator, { children: /* @__PURE__ */ a(r, { className: "size-2 fill-current" }) })
75
+ }), n]
76
+ });
77
+ }
78
+ function g({ className: t, inset: n, ...r }) {
79
+ return /* @__PURE__ */ a(i.Label, {
80
+ "data-slot": "dropdown-menu-label",
81
+ "data-inset": n,
82
+ className: e("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
83
+ ...r
84
+ });
85
+ }
86
+ function _({ className: t, ...n }) {
87
+ return /* @__PURE__ */ a(i.Separator, {
88
+ "data-slot": "dropdown-menu-separator",
89
+ className: e("-mx-1 my-1 h-px bg-border", t),
90
+ ...n
91
+ });
92
+ }
93
+ function v({ className: t, ...n }) {
94
+ return /* @__PURE__ */ a("span", {
95
+ "data-slot": "dropdown-menu-shortcut",
96
+ className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
97
+ ...n
98
+ });
99
+ }
100
+ function y({ ...e }) {
101
+ return /* @__PURE__ */ a(i.Sub, {
102
+ "data-slot": "dropdown-menu-sub",
103
+ ...e
104
+ });
105
+ }
106
+ function b({ className: t, inset: r, children: s, ...c }) {
107
+ return /* @__PURE__ */ o(i.SubTrigger, {
108
+ "data-slot": "dropdown-menu-sub-trigger",
109
+ "data-inset": r,
110
+ className: e("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", t),
111
+ ...c,
112
+ children: [s, /* @__PURE__ */ a(n, { className: "ml-auto size-4" })]
113
+ });
114
+ }
115
+ function x({ className: t, ...n }) {
116
+ return /* @__PURE__ */ a(i.SubContent, {
117
+ "data-slot": "dropdown-menu-sub-content",
118
+ className: e("z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", t),
119
+ ...n
120
+ });
121
+ }
122
+ //#endregion
123
+ export { s as DropdownMenu, p as DropdownMenuCheckboxItem, u as DropdownMenuContent, d as DropdownMenuGroup, f as DropdownMenuItem, g as DropdownMenuLabel, c as DropdownMenuPortal, m as DropdownMenuRadioGroup, h as DropdownMenuRadioItem, _ as DropdownMenuSeparator, v as DropdownMenuShortcut, y as DropdownMenuSub, x as DropdownMenuSubContent, b as DropdownMenuSubTrigger, l as DropdownMenuTrigger };
@@ -0,0 +1,59 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { cva as n } from "class-variance-authority";
4
+ //#region src/components/reui/empty.tsx
5
+ function r({ className: n, ...r }) {
6
+ return /* @__PURE__ */ t("div", {
7
+ "data-slot": "empty",
8
+ className: e("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", n),
9
+ ...r
10
+ });
11
+ }
12
+ function i({ className: n, ...r }) {
13
+ return /* @__PURE__ */ t("div", {
14
+ "data-slot": "empty-header",
15
+ className: e("flex max-w-sm flex-col items-center gap-2 text-center", n),
16
+ ...r
17
+ });
18
+ }
19
+ var a = n("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
20
+ variants: { variant: {
21
+ default: "bg-transparent",
22
+ icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
23
+ } },
24
+ defaultVariants: { variant: "default" }
25
+ });
26
+ function o({ className: n, variant: r = "default", ...i }) {
27
+ return /* @__PURE__ */ t("div", {
28
+ "data-slot": "empty-icon",
29
+ "data-variant": r,
30
+ className: e(a({
31
+ variant: r,
32
+ className: n
33
+ })),
34
+ ...i
35
+ });
36
+ }
37
+ function s({ className: n, ...r }) {
38
+ return /* @__PURE__ */ t("div", {
39
+ "data-slot": "empty-title",
40
+ className: e("text-lg font-medium tracking-tight", n),
41
+ ...r
42
+ });
43
+ }
44
+ function c({ className: n, ...r }) {
45
+ return /* @__PURE__ */ t("div", {
46
+ "data-slot": "empty-description",
47
+ className: e("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", n),
48
+ ...r
49
+ });
50
+ }
51
+ function l({ className: n, ...r }) {
52
+ return /* @__PURE__ */ t("div", {
53
+ "data-slot": "empty-content",
54
+ className: e("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", n),
55
+ ...r
56
+ });
57
+ }
58
+ //#endregion
59
+ export { r as Empty, l as EmptyContent, c as EmptyDescription, i as EmptyHeader, o as EmptyMedia, s as EmptyTitle };
@@ -0,0 +1,115 @@
1
+ import { cn as e } from "../../lib/utils.js";
2
+ import { Separator as t } from "./separator.js";
3
+ import { Label as n } from "./label.js";
4
+ import { useMemo as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { cva as o } from "class-variance-authority";
7
+ //#region src/components/reui/field.tsx
8
+ function s({ className: t, ...n }) {
9
+ return /* @__PURE__ */ i("fieldset", {
10
+ "data-slot": "field-set",
11
+ className: e("flex flex-col gap-6", "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", t),
12
+ ...n
13
+ });
14
+ }
15
+ function c({ className: t, variant: n = "legend", ...r }) {
16
+ return /* @__PURE__ */ i("legend", {
17
+ "data-slot": "field-legend",
18
+ "data-variant": n,
19
+ className: e("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", t),
20
+ ...r
21
+ });
22
+ }
23
+ function l({ className: t, ...n }) {
24
+ return /* @__PURE__ */ i("div", {
25
+ "data-slot": "field-group",
26
+ className: e("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", t),
27
+ ...n
28
+ });
29
+ }
30
+ var u = o("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
31
+ variants: { orientation: {
32
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
33
+ horizontal: [
34
+ "flex-row items-center",
35
+ "[&>[data-slot=field-label]]:flex-auto",
36
+ "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
37
+ ],
38
+ responsive: [
39
+ "flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
40
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
41
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
42
+ ]
43
+ } },
44
+ defaultVariants: { orientation: "vertical" }
45
+ });
46
+ function d({ className: t, orientation: n = "vertical", ...r }) {
47
+ return /* @__PURE__ */ i("div", {
48
+ role: "group",
49
+ "data-slot": "field",
50
+ "data-orientation": n,
51
+ className: e(u({ orientation: n }), t),
52
+ ...r
53
+ });
54
+ }
55
+ function f({ className: t, ...n }) {
56
+ return /* @__PURE__ */ i("div", {
57
+ "data-slot": "field-content",
58
+ className: e("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", t),
59
+ ...n
60
+ });
61
+ }
62
+ function p({ className: t, ...r }) {
63
+ return /* @__PURE__ */ i(n, {
64
+ "data-slot": "field-label",
65
+ className: e("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4", "has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10", t),
66
+ ...r
67
+ });
68
+ }
69
+ function m({ className: t, ...n }) {
70
+ return /* @__PURE__ */ i("div", {
71
+ "data-slot": "field-label",
72
+ className: e("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50", t),
73
+ ...n
74
+ });
75
+ }
76
+ function h({ className: t, ...n }) {
77
+ return /* @__PURE__ */ i("p", {
78
+ "data-slot": "field-description",
79
+ className: e("text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance", "last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", t),
80
+ ...n
81
+ });
82
+ }
83
+ function g({ children: n, className: r, ...o }) {
84
+ return /* @__PURE__ */ a("div", {
85
+ "data-slot": "field-separator",
86
+ "data-content": !!n,
87
+ className: e("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", r),
88
+ ...o,
89
+ children: [/* @__PURE__ */ i(t, { className: "absolute inset-0 top-1/2" }), n && /* @__PURE__ */ i("span", {
90
+ className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
91
+ "data-slot": "field-separator-content",
92
+ children: n
93
+ })]
94
+ });
95
+ }
96
+ function _({ className: t, children: n, errors: a, ...o }) {
97
+ let s = r(() => {
98
+ if (n) return n;
99
+ if (!a?.length) return null;
100
+ let e = [...new Map(a.map((e) => [e?.message, e])).values()];
101
+ return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ i("ul", {
102
+ className: "ml-4 flex list-disc flex-col gap-1",
103
+ children: e.map((e, t) => e?.message && /* @__PURE__ */ i("li", { children: e.message }, t))
104
+ });
105
+ }, [n, a]);
106
+ return s ? /* @__PURE__ */ i("div", {
107
+ role: "alert",
108
+ "data-slot": "field-error",
109
+ className: e("text-sm font-normal text-destructive", t),
110
+ ...o,
111
+ children: s
112
+ }) : null;
113
+ }
114
+ //#endregion
115
+ export { d as Field, f as FieldContent, h as FieldDescription, _ as FieldError, l as FieldGroup, p as FieldLabel, c as FieldLegend, g as FieldSeparator, s as FieldSet, m as FieldTitle };