@aaas-pro/library 0.0.0-stage → 0.1.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 (247) hide show
  1. package/README.md +107 -2
  2. package/dist/components/address-picker.d.ts +18 -0
  3. package/dist/components/address-picker.js +46 -0
  4. package/dist/components/card-date-filter.d.ts +12 -0
  5. package/dist/components/card-date-filter.js +95 -0
  6. package/dist/components/date-time-picker.d.ts +12 -0
  7. package/dist/components/date-time-picker.js +96 -0
  8. package/dist/components/detail-dialog.d.ts +48 -0
  9. package/dist/components/detail-dialog.js +97 -0
  10. package/dist/components/document-links.d.ts +13 -0
  11. package/dist/components/document-links.js +19 -0
  12. package/dist/components/draft-row-actions.d.ts +14 -0
  13. package/dist/components/draft-row-actions.js +70 -0
  14. package/dist/components/error-boundary.d.ts +14 -0
  15. package/dist/components/error-boundary.js +35 -0
  16. package/dist/components/glow-card.d.ts +13 -0
  17. package/dist/components/glow-card.js +48 -0
  18. package/dist/components/org-picker.d.ts +17 -0
  19. package/dist/components/org-picker.js +56 -0
  20. package/dist/components/overflow-row-actions.d.ts +29 -0
  21. package/dist/components/overflow-row-actions.js +135 -0
  22. package/dist/components/page-header.d.ts +21 -0
  23. package/dist/components/page-header.js +21 -0
  24. package/dist/components/permission-button.d.ts +4 -0
  25. package/dist/components/permission-button.js +17 -0
  26. package/dist/components/permission-context.d.ts +12 -0
  27. package/dist/components/permission-context.js +17 -0
  28. package/dist/components/person-picker.d.ts +20 -0
  29. package/dist/components/person-picker.js +38 -0
  30. package/dist/components/process-flow-bar.d.ts +15 -0
  31. package/dist/components/process-flow-bar.js +19 -0
  32. package/dist/components/product-picker.d.ts +19 -0
  33. package/dist/components/product-picker.js +155 -0
  34. package/dist/components/ref-doc-picker.d.ts +24 -0
  35. package/dist/components/ref-doc-picker.js +139 -0
  36. package/dist/components/scroll-to-top.d.ts +1 -0
  37. package/dist/components/scroll-to-top.js +20 -0
  38. package/dist/components/state-view.d.ts +26 -0
  39. package/dist/components/state-view.js +75 -0
  40. package/dist/components/theme-switcher.d.ts +27 -0
  41. package/dist/components/theme-switcher.js +77 -0
  42. package/dist/components/time-filter.d.ts +7 -0
  43. package/dist/components/time-filter.js +65 -0
  44. package/dist/components/ui/accordion.d.ts +7 -0
  45. package/dist/components/ui/accordion.js +64 -0
  46. package/dist/components/ui/alert-dialog.d.ts +15 -0
  47. package/dist/components/ui/alert-dialog.js +160 -0
  48. package/dist/components/ui/alert.d.ts +12 -0
  49. package/dist/components/ui/alert.js +66 -0
  50. package/dist/components/ui/aspect-ratio.d.ts +3 -0
  51. package/dist/components/ui/aspect-ratio.js +10 -0
  52. package/dist/components/ui/avatar.d.ts +6 -0
  53. package/dist/components/ui/avatar.js +53 -0
  54. package/dist/components/ui/badge.d.ts +12 -0
  55. package/dist/components/ui/badge.js +44 -0
  56. package/dist/components/ui/breadcrumb.d.ts +11 -0
  57. package/dist/components/ui/breadcrumb.js +103 -0
  58. package/dist/components/ui/button-group.d.ts +14 -0
  59. package/dist/components/ui/button-group.js +76 -0
  60. package/dist/components/ui/button.d.ts +20 -0
  61. package/dist/components/ui/button.js +93 -0
  62. package/dist/components/ui/calendar.d.ts +73 -0
  63. package/dist/components/ui/calendar.js +103 -0
  64. package/dist/components/ui/card.d.ts +9 -0
  65. package/dist/components/ui/card.js +90 -0
  66. package/dist/components/ui/carousel.d.ts +14 -0
  67. package/dist/components/ui/carousel.js +200 -0
  68. package/dist/components/ui/chart.d.ts +43 -0
  69. package/dist/components/ui/chart.js +252 -0
  70. package/dist/components/ui/checkbox.d.ts +4 -0
  71. package/dist/components/ui/checkbox.js +31 -0
  72. package/dist/components/ui/collapsible.d.ts +5 -0
  73. package/dist/components/ui/collapsible.js +34 -0
  74. package/dist/components/ui/command.d.ts +18 -0
  75. package/dist/components/ui/command.js +170 -0
  76. package/dist/components/ui/context-menu.d.ts +26 -0
  77. package/dist/components/ui/context-menu.js +237 -0
  78. package/dist/components/ui/dialog.d.ts +17 -0
  79. package/dist/components/ui/dialog.js +139 -0
  80. package/dist/components/ui/drawer.d.ts +13 -0
  81. package/dist/components/ui/drawer.js +129 -0
  82. package/dist/components/ui/dropdown-menu.d.ts +26 -0
  83. package/dist/components/ui/dropdown-menu.js +245 -0
  84. package/dist/components/ui/empty.d.ts +14 -0
  85. package/dist/components/ui/empty.js +102 -0
  86. package/dist/components/ui/field.d.ts +27 -0
  87. package/dist/components/ui/field.js +229 -0
  88. package/dist/components/ui/form.d.ts +26 -0
  89. package/dist/components/ui/form.js +118 -0
  90. package/dist/components/ui/hover-card.d.ts +6 -0
  91. package/dist/components/ui/hover-card.js +39 -0
  92. package/dist/components/ui/input-group.d.ts +22 -0
  93. package/dist/components/ui/input-group.js +156 -0
  94. package/dist/components/ui/input-otp.d.ts +11 -0
  95. package/dist/components/ui/input-otp.js +66 -0
  96. package/dist/components/ui/input.d.ts +3 -0
  97. package/dist/components/ui/input.js +21 -0
  98. package/dist/components/ui/item.d.ts +29 -0
  99. package/dist/components/ui/item.js +187 -0
  100. package/dist/components/ui/kbd.d.ts +3 -0
  101. package/dist/components/ui/kbd.js +31 -0
  102. package/dist/components/ui/label.d.ts +4 -0
  103. package/dist/components/ui/label.js +22 -0
  104. package/dist/components/ui/menubar.d.ts +26 -0
  105. package/dist/components/ui/menubar.js +252 -0
  106. package/dist/components/ui/navigation-menu.d.ts +17 -0
  107. package/dist/components/ui/navigation-menu.js +170 -0
  108. package/dist/components/ui/pagination.d.ts +13 -0
  109. package/dist/components/ui/pagination.js +118 -0
  110. package/dist/components/ui/popover.d.ts +8 -0
  111. package/dist/components/ui/popover.js +47 -0
  112. package/dist/components/ui/progress.d.ts +4 -0
  113. package/dist/components/ui/progress.js +34 -0
  114. package/dist/components/ui/radio-group.d.ts +5 -0
  115. package/dist/components/ui/radio-group.js +45 -0
  116. package/dist/components/ui/resizable.d.ts +7 -0
  117. package/dist/components/ui/resizable.js +49 -0
  118. package/dist/components/ui/scroll-area.d.ts +5 -0
  119. package/dist/components/ui/scroll-area.js +60 -0
  120. package/dist/components/ui/select.d.ts +17 -0
  121. package/dist/components/ui/select.js +215 -0
  122. package/dist/components/ui/separator.d.ts +4 -0
  123. package/dist/components/ui/separator.js +26 -0
  124. package/dist/components/ui/sheet.d.ts +13 -0
  125. package/dist/components/ui/sheet.js +127 -0
  126. package/dist/components/ui/sidebar.d.ts +72 -0
  127. package/dist/components/ui/sidebar.js +656 -0
  128. package/dist/components/ui/skeleton.d.ts +2 -0
  129. package/dist/components/ui/skeleton.js +15 -0
  130. package/dist/components/ui/slider.d.ts +4 -0
  131. package/dist/components/ui/slider.js +63 -0
  132. package/dist/components/ui/sonner.d.ts +4 -0
  133. package/dist/components/ui/sonner.js +34 -0
  134. package/dist/components/ui/spinner.d.ts +2 -0
  135. package/dist/components/ui/spinner.js +17 -0
  136. package/dist/components/ui/switch.d.ts +4 -0
  137. package/dist/components/ui/switch.js +31 -0
  138. package/dist/components/ui/table.d.ts +10 -0
  139. package/dist/components/ui/table.js +114 -0
  140. package/dist/components/ui/tabs.d.ts +7 -0
  141. package/dist/components/ui/tabs.js +67 -0
  142. package/dist/components/ui/textarea.d.ts +3 -0
  143. package/dist/components/ui/textarea.js +18 -0
  144. package/dist/components/ui/toggle-group.d.ts +9 -0
  145. package/dist/components/ui/toggle-group.js +68 -0
  146. package/dist/components/ui/toggle.d.ts +12 -0
  147. package/dist/components/ui/toggle.js +43 -0
  148. package/dist/components/ui/tooltip.d.ts +7 -0
  149. package/dist/components/ui/tooltip.js +56 -0
  150. package/dist/hooks/use-mobile.d.ts +1 -0
  151. package/dist/hooks/use-mobile.js +18 -0
  152. package/dist/icons/index.d.ts +57 -0
  153. package/dist/icons/index.js +115 -0
  154. package/dist/icons/paths.d.ts +556 -0
  155. package/dist/icons/paths.js +231 -0
  156. package/dist/index.d.ts +68 -0
  157. package/dist/index.js +399 -0
  158. package/dist/internal/selection-base.d.ts +37 -0
  159. package/dist/internal/selection-base.js +40 -0
  160. package/dist/lib/class-names.d.ts +6 -0
  161. package/dist/lib/class-names.js +159 -0
  162. package/dist/lib/utils.d.ts +3 -0
  163. package/dist/lib/utils.js +7 -0
  164. package/dist/lib/variants.d.ts +21 -0
  165. package/dist/lib/variants.js +21 -0
  166. package/dist/primitives/accordion.d.ts +29 -0
  167. package/dist/primitives/accordion.js +49 -0
  168. package/dist/primitives/alert-dialog.d.ts +10 -0
  169. package/dist/primitives/alert-dialog.js +22 -0
  170. package/dist/primitives/aspect-ratio.d.ts +4 -0
  171. package/dist/primitives/aspect-ratio.js +7 -0
  172. package/dist/primitives/avatar.d.ts +8 -0
  173. package/dist/primitives/avatar.js +45 -0
  174. package/dist/primitives/carousel.d.ts +22 -0
  175. package/dist/primitives/carousel.js +78 -0
  176. package/dist/primitives/chart.d.ts +71 -0
  177. package/dist/primitives/chart.js +125 -0
  178. package/dist/primitives/checkbox.d.ts +13 -0
  179. package/dist/primitives/checkbox.js +24 -0
  180. package/dist/primitives/collapsible.d.ts +14 -0
  181. package/dist/primitives/collapsible.js +29 -0
  182. package/dist/primitives/command.d.ts +43 -0
  183. package/dist/primitives/command.js +98 -0
  184. package/dist/primitives/context-menu.d.ts +24 -0
  185. package/dist/primitives/context-menu.js +19 -0
  186. package/dist/primitives/core.d.ts +25 -0
  187. package/dist/primitives/core.js +89 -0
  188. package/dist/primitives/dialog.d.ts +7 -0
  189. package/dist/primitives/dialog.js +15 -0
  190. package/dist/primitives/drawer.d.ts +30 -0
  191. package/dist/primitives/drawer.js +39 -0
  192. package/dist/primitives/dropdown-menu.d.ts +24 -0
  193. package/dist/primitives/dropdown-menu.js +19 -0
  194. package/dist/primitives/form.d.ts +154 -0
  195. package/dist/primitives/form.js +139 -0
  196. package/dist/primitives/hover-card.d.ts +4 -0
  197. package/dist/primitives/hover-card.js +8 -0
  198. package/dist/primitives/input-otp.d.ts +21 -0
  199. package/dist/primitives/input-otp.js +78 -0
  200. package/dist/primitives/label.d.ts +2 -0
  201. package/dist/primitives/label.js +7 -0
  202. package/dist/primitives/layer.d.ts +84 -0
  203. package/dist/primitives/layer.js +300 -0
  204. package/dist/primitives/menu.d.ts +56 -0
  205. package/dist/primitives/menu.js +126 -0
  206. package/dist/primitives/menubar.d.ts +91 -0
  207. package/dist/primitives/menubar.js +44 -0
  208. package/dist/primitives/navigation-menu.d.ts +32 -0
  209. package/dist/primitives/navigation-menu.js +121 -0
  210. package/dist/primitives/popover.d.ts +4 -0
  211. package/dist/primitives/popover.js +12 -0
  212. package/dist/primitives/progress.d.ts +7 -0
  213. package/dist/primitives/progress.js +13 -0
  214. package/dist/primitives/radio-group.d.ts +18 -0
  215. package/dist/primitives/radio-group.js +36 -0
  216. package/dist/primitives/resizable.d.ts +19 -0
  217. package/dist/primitives/resizable.js +91 -0
  218. package/dist/primitives/scroll-area.d.ts +12 -0
  219. package/dist/primitives/scroll-area.js +26 -0
  220. package/dist/primitives/select.d.ts +42 -0
  221. package/dist/primitives/select.js +167 -0
  222. package/dist/primitives/separator.d.ts +5 -0
  223. package/dist/primitives/separator.js +7 -0
  224. package/dist/primitives/slider.d.ts +25 -0
  225. package/dist/primitives/slider.js +98 -0
  226. package/dist/primitives/slot.d.ts +1 -0
  227. package/dist/primitives/slot.js +4 -0
  228. package/dist/primitives/switch.d.ts +11 -0
  229. package/dist/primitives/switch.js +22 -0
  230. package/dist/primitives/tabs.d.ts +23 -0
  231. package/dist/primitives/tabs.js +38 -0
  232. package/dist/primitives/toast.d.ts +55 -0
  233. package/dist/primitives/toast.js +86 -0
  234. package/dist/primitives/toggle-group.d.ts +24 -0
  235. package/dist/primitives/toggle-group.js +33 -0
  236. package/dist/primitives/toggle.d.ts +7 -0
  237. package/dist/primitives/toggle.js +13 -0
  238. package/dist/primitives/tooltip.d.ts +7 -0
  239. package/dist/primitives/tooltip.js +10 -0
  240. package/dist/style-entry.d.ts +1 -0
  241. package/dist/style-entry.js +1 -0
  242. package/dist/styles.css +7016 -0
  243. package/dist/styles.js +1 -0
  244. package/dist/theme/index.d.ts +110 -0
  245. package/dist/theme/index.js +199 -0
  246. package/licenses/Lucide.txt +15 -0
  247. package/package.json +67 -4
@@ -0,0 +1,170 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Command as Command$1 } from "../../primitives/command.js";
3
+ import { SearchIcon } from "../../icons/index.js";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "./dialog.js";
6
+ function Command({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ Command$1,
12
+ {
13
+ "data-slot": "command",
14
+ className: cn(
15
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
16
+ className
17
+ ),
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ function CommandDialog({
23
+ title = "Command Palette",
24
+ description = "Search for a command to run...",
25
+ children,
26
+ className,
27
+ showCloseButton = true,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxs(
31
+ DialogContent,
32
+ {
33
+ className: cn("overflow-hidden p-0", className),
34
+ showCloseButton,
35
+ children: [
36
+ /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
37
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
38
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
39
+ ] }),
40
+ /* @__PURE__ */ jsx(Command, { className: "[&_[data-command-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[data-command-group-heading]]:px-2 [&_[data-command-group-heading]]:font-medium [&_[data-command-group]]:px-2 [&_[data-command-group]:not([hidden])_~[data-command-group]]:pt-0 [&_[data-command-input-wrapper]_svg]:h-5 [&_[data-command-input-wrapper]_svg]:w-5 [&_[data-command-input]]:h-12 [&_[data-command-item]]:px-2 [&_[data-command-item]]:py-3 [&_[data-command-item]_svg]:h-5 [&_[data-command-item]_svg]:w-5", children })
41
+ ]
42
+ }
43
+ ) });
44
+ }
45
+ function CommandInput({
46
+ className,
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsxs(
50
+ "div",
51
+ {
52
+ "data-slot": "command-input-wrapper",
53
+ className: "flex h-9 items-center gap-2 border-b px-3",
54
+ children: [
55
+ /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
56
+ /* @__PURE__ */ jsx(
57
+ Command$1.Input,
58
+ {
59
+ "data-slot": "command-input",
60
+ className: cn(
61
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
62
+ className
63
+ ),
64
+ ...props
65
+ }
66
+ )
67
+ ]
68
+ }
69
+ );
70
+ }
71
+ function CommandList({
72
+ className,
73
+ ...props
74
+ }) {
75
+ return /* @__PURE__ */ jsx(
76
+ Command$1.List,
77
+ {
78
+ "data-slot": "command-list",
79
+ className: cn(
80
+ "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
81
+ className
82
+ ),
83
+ ...props
84
+ }
85
+ );
86
+ }
87
+ function CommandEmpty({
88
+ ...props
89
+ }) {
90
+ return /* @__PURE__ */ jsx(
91
+ Command$1.Empty,
92
+ {
93
+ "data-slot": "command-empty",
94
+ className: "py-6 text-center text-sm",
95
+ ...props
96
+ }
97
+ );
98
+ }
99
+ function CommandGroup({
100
+ className,
101
+ ...props
102
+ }) {
103
+ return /* @__PURE__ */ jsx(
104
+ Command$1.Group,
105
+ {
106
+ "data-slot": "command-group",
107
+ className: cn(
108
+ "text-foreground [&_[data-command-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[data-command-group-heading]]:px-2 [&_[data-command-group-heading]]:py-1.5 [&_[data-command-group-heading]]:text-xs [&_[data-command-group-heading]]:font-medium",
109
+ className
110
+ ),
111
+ ...props
112
+ }
113
+ );
114
+ }
115
+ function CommandSeparator({
116
+ className,
117
+ ...props
118
+ }) {
119
+ return /* @__PURE__ */ jsx(
120
+ Command$1.Separator,
121
+ {
122
+ "data-slot": "command-separator",
123
+ className: cn("bg-border -mx-1 h-px", className),
124
+ ...props
125
+ }
126
+ );
127
+ }
128
+ function CommandItem({
129
+ className,
130
+ ...props
131
+ }) {
132
+ return /* @__PURE__ */ jsx(
133
+ Command$1.Item,
134
+ {
135
+ "data-slot": "command-item",
136
+ className: cn(
137
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-8 w-full cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
138
+ className
139
+ ),
140
+ ...props
141
+ }
142
+ );
143
+ }
144
+ function CommandShortcut({
145
+ className,
146
+ ...props
147
+ }) {
148
+ return /* @__PURE__ */ jsx(
149
+ "span",
150
+ {
151
+ "data-slot": "command-shortcut",
152
+ className: cn(
153
+ "text-muted-foreground ml-auto text-xs tracking-widest",
154
+ className
155
+ ),
156
+ ...props
157
+ }
158
+ );
159
+ }
160
+ export {
161
+ Command,
162
+ CommandDialog,
163
+ CommandEmpty,
164
+ CommandGroup,
165
+ CommandInput,
166
+ CommandItem,
167
+ CommandList,
168
+ CommandSeparator,
169
+ CommandShortcut
170
+ };
@@ -0,0 +1,26 @@
1
+ import { type PermissionProps } from '../permission-context';
2
+ import * as React from "react";
3
+ import * as ContextMenuPrimitive from "../../primitives/context-menu";
4
+ declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): React.JSX.Element;
5
+ declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
6
+ declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): React.JSX.Element;
7
+ declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): React.JSX.Element;
8
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): React.JSX.Element;
9
+ declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): React.JSX.Element;
10
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
11
+ inset?: boolean;
12
+ }): React.JSX.Element;
13
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): React.JSX.Element;
14
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): React.JSX.Element;
15
+ declare function ContextMenuItem({ className, inset, permissionAction, permissionResource, permissionCommand, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & PermissionProps & {
16
+ inset?: boolean;
17
+ variant?: "default" | "destructive";
18
+ }): React.JSX.Element | null;
19
+ declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): React.JSX.Element;
20
+ declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): React.JSX.Element;
21
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
22
+ inset?: boolean;
23
+ }): React.JSX.Element;
24
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): React.JSX.Element;
25
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
26
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -0,0 +1,237 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { usePermissionCheck } from "../permission-context.js";
3
+ import { useThemePortalContainer } from "../../theme/index.js";
4
+ import { Root, CheckboxItem, ItemIndicator, Portal, Content, Group, Item, Label, RadioGroup, RadioItem, Separator, Sub, SubContent, SubTrigger, Trigger } from "../../primitives/context-menu.js";
5
+ import { CheckIcon, CircleIcon, ChevronRightIcon } from "../../icons/index.js";
6
+ import { cn } from "../../lib/utils.js";
7
+ function ContextMenu({
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(Root, { "data-slot": "context-menu", ...props });
11
+ }
12
+ function ContextMenuTrigger({
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsx(Trigger, { "data-slot": "context-menu-trigger", ...props });
16
+ }
17
+ function ContextMenuGroup({
18
+ ...props
19
+ }) {
20
+ return /* @__PURE__ */ jsx(Group, { "data-slot": "context-menu-group", ...props });
21
+ }
22
+ function ContextMenuPortal({
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(Portal, { container: useThemePortalContainer(), "data-slot": "context-menu-portal", ...props });
26
+ }
27
+ function ContextMenuSub({
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsx(Sub, { "data-slot": "context-menu-sub", ...props });
31
+ }
32
+ function ContextMenuRadioGroup({
33
+ ...props
34
+ }) {
35
+ return /* @__PURE__ */ jsx(
36
+ RadioGroup,
37
+ {
38
+ "data-slot": "context-menu-radio-group",
39
+ ...props
40
+ }
41
+ );
42
+ }
43
+ function ContextMenuSubTrigger({
44
+ className,
45
+ inset,
46
+ children,
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsxs(
50
+ SubTrigger,
51
+ {
52
+ "data-slot": "context-menu-sub-trigger",
53
+ "data-inset": inset,
54
+ className: cn(
55
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex min-h-8 w-full text-start cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
56
+ className
57
+ ),
58
+ ...props,
59
+ children: [
60
+ children,
61
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
62
+ ]
63
+ }
64
+ );
65
+ }
66
+ function ContextMenuSubContent({
67
+ className,
68
+ ...props
69
+ }) {
70
+ return /* @__PURE__ */ jsx(
71
+ SubContent,
72
+ {
73
+ "data-slot": "context-menu-sub-content",
74
+ className: cn(
75
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[80] min-w-[10rem] origin-(--aaas-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg",
76
+ className
77
+ ),
78
+ ...props
79
+ }
80
+ );
81
+ }
82
+ function ContextMenuContent({
83
+ className,
84
+ ...props
85
+ }) {
86
+ return /* @__PURE__ */ jsx(Portal, { container: useThemePortalContainer(), children: /* @__PURE__ */ jsx(
87
+ Content,
88
+ {
89
+ "data-slot": "context-menu-content",
90
+ className: cn(
91
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-[80] max-h-(--aaas-content-available-height) min-w-[10rem] origin-(--aaas-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",
92
+ className
93
+ ),
94
+ ...props
95
+ }
96
+ ) });
97
+ }
98
+ function ContextMenuItem({
99
+ className,
100
+ inset,
101
+ permissionAction,
102
+ permissionResource,
103
+ permissionCommand,
104
+ variant = "default",
105
+ ...props
106
+ }) {
107
+ const permitted = usePermissionCheck({ permissionAction, permissionResource, permissionCommand });
108
+ if (!permitted()) return null;
109
+ return /* @__PURE__ */ jsx(
110
+ Item,
111
+ {
112
+ "data-slot": "context-menu-item",
113
+ "data-inset": inset,
114
+ "data-variant": variant,
115
+ className: cn(
116
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-8 w-full text-start cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
117
+ className
118
+ ),
119
+ ...props,
120
+ onSelect: (event) => {
121
+ if (!permitted()) {
122
+ event.preventDefault();
123
+ return;
124
+ }
125
+ props.onSelect?.(event);
126
+ }
127
+ }
128
+ );
129
+ }
130
+ function ContextMenuCheckboxItem({
131
+ className,
132
+ children,
133
+ checked,
134
+ ...props
135
+ }) {
136
+ return /* @__PURE__ */ jsxs(
137
+ CheckboxItem,
138
+ {
139
+ "data-slot": "context-menu-checkbox-item",
140
+ className: cn(
141
+ "focus:bg-accent focus:text-accent-foreground relative flex min-h-8 w-full text-start cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
142
+ className
143
+ ),
144
+ checked,
145
+ ...props,
146
+ children: [
147
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
148
+ children
149
+ ]
150
+ }
151
+ );
152
+ }
153
+ function ContextMenuRadioItem({
154
+ className,
155
+ children,
156
+ ...props
157
+ }) {
158
+ return /* @__PURE__ */ jsxs(
159
+ RadioItem,
160
+ {
161
+ "data-slot": "context-menu-radio-item",
162
+ className: cn(
163
+ "focus:bg-accent focus:text-accent-foreground relative flex min-h-8 w-full text-start cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
164
+ className
165
+ ),
166
+ ...props,
167
+ children: [
168
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
169
+ children
170
+ ]
171
+ }
172
+ );
173
+ }
174
+ function ContextMenuLabel({
175
+ className,
176
+ inset,
177
+ ...props
178
+ }) {
179
+ return /* @__PURE__ */ jsx(
180
+ Label,
181
+ {
182
+ "data-slot": "context-menu-label",
183
+ "data-inset": inset,
184
+ className: cn(
185
+ "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
186
+ className
187
+ ),
188
+ ...props
189
+ }
190
+ );
191
+ }
192
+ function ContextMenuSeparator({
193
+ className,
194
+ ...props
195
+ }) {
196
+ return /* @__PURE__ */ jsx(
197
+ Separator,
198
+ {
199
+ "data-slot": "context-menu-separator",
200
+ className: cn("bg-border -mx-1 my-1 h-px", className),
201
+ ...props
202
+ }
203
+ );
204
+ }
205
+ function ContextMenuShortcut({
206
+ className,
207
+ ...props
208
+ }) {
209
+ return /* @__PURE__ */ jsx(
210
+ "span",
211
+ {
212
+ "data-slot": "context-menu-shortcut",
213
+ className: cn(
214
+ "text-muted-foreground ml-auto text-xs tracking-widest",
215
+ className
216
+ ),
217
+ ...props
218
+ }
219
+ );
220
+ }
221
+ export {
222
+ ContextMenu,
223
+ ContextMenuCheckboxItem,
224
+ ContextMenuContent,
225
+ ContextMenuGroup,
226
+ ContextMenuItem,
227
+ ContextMenuLabel,
228
+ ContextMenuPortal,
229
+ ContextMenuRadioGroup,
230
+ ContextMenuRadioItem,
231
+ ContextMenuSeparator,
232
+ ContextMenuShortcut,
233
+ ContextMenuSub,
234
+ ContextMenuSubContent,
235
+ ContextMenuSubTrigger,
236
+ ContextMenuTrigger
237
+ };
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "../../primitives/dialog";
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, showOverlay, overlayClassName, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ showOverlay?: boolean;
11
+ overlayClassName?: string;
12
+ }): React.JSX.Element;
13
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
14
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
15
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
16
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
17
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,139 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useThemePortalContainer } from "../../theme/index.js";
3
+ import { Root, Close, Content, Description, Overlay, Portal, Title, Trigger } from "../../primitives/dialog.js";
4
+ import { XIcon } from "../../icons/index.js";
5
+ import { cn } from "../../lib/utils.js";
6
+ function Dialog({
7
+ ...props
8
+ }) {
9
+ return /* @__PURE__ */ jsx(Root, { "data-slot": "dialog", ...props });
10
+ }
11
+ function DialogTrigger({
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsx(Trigger, { "data-slot": "dialog-trigger", ...props });
15
+ }
16
+ function DialogPortal({
17
+ ...props
18
+ }) {
19
+ return /* @__PURE__ */ jsx(Portal, { container: useThemePortalContainer(), "data-slot": "dialog-portal", ...props });
20
+ }
21
+ function DialogClose({
22
+ ...props
23
+ }) {
24
+ return /* @__PURE__ */ jsx(Close, { "data-slot": "dialog-close", ...props });
25
+ }
26
+ function DialogOverlay({
27
+ className,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsx(
31
+ Overlay,
32
+ {
33
+ "data-slot": "dialog-overlay",
34
+ className: cn(
35
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[60] bg-[rgb(12_22_18/0.45)] backdrop-blur-[2px]",
36
+ className
37
+ ),
38
+ ...props
39
+ }
40
+ );
41
+ }
42
+ function DialogContent({
43
+ className,
44
+ children,
45
+ showCloseButton = true,
46
+ showOverlay = true,
47
+ overlayClassName,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
51
+ showOverlay && /* @__PURE__ */ jsx(DialogOverlay, { className: overlayClassName }),
52
+ /* @__PURE__ */ jsxs(
53
+ Content,
54
+ {
55
+ "data-slot": "dialog-content",
56
+ className: cn(
57
+ "bg-card text-card-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] fixed top-[50%] left-[50%] z-[60] grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-5 overflow-y-auto rounded-xl border p-6 shadow-xl duration-200 outline-none sm:max-w-lg",
58
+ className
59
+ ),
60
+ ...props,
61
+ children: [
62
+ children,
63
+ showCloseButton && /* @__PURE__ */ jsxs(
64
+ Close,
65
+ {
66
+ "data-slot": "dialog-close",
67
+ className: "text-muted-foreground absolute top-4 right-4 grid size-8 place-items-center rounded-md transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-ring/40 focus-visible:ring-[3px] focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
68
+ children: [
69
+ /* @__PURE__ */ jsx(XIcon, {}),
70
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "关闭" })
71
+ ]
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ )
77
+ ] });
78
+ }
79
+ function DialogHeader({ className, ...props }) {
80
+ return /* @__PURE__ */ jsx(
81
+ "div",
82
+ {
83
+ "data-slot": "dialog-header",
84
+ className: cn("flex flex-col gap-1.5 pr-8 text-center sm:text-left", className),
85
+ ...props
86
+ }
87
+ );
88
+ }
89
+ function DialogFooter({ className, ...props }) {
90
+ return /* @__PURE__ */ jsx(
91
+ "div",
92
+ {
93
+ "data-slot": "dialog-footer",
94
+ className: cn(
95
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
96
+ className
97
+ ),
98
+ ...props
99
+ }
100
+ );
101
+ }
102
+ function DialogTitle({
103
+ className,
104
+ ...props
105
+ }) {
106
+ return /* @__PURE__ */ jsx(
107
+ Title,
108
+ {
109
+ "data-slot": "dialog-title",
110
+ className: cn("text-lg leading-7 font-semibold", className),
111
+ ...props
112
+ }
113
+ );
114
+ }
115
+ function DialogDescription({
116
+ className,
117
+ ...props
118
+ }) {
119
+ return /* @__PURE__ */ jsx(
120
+ Description,
121
+ {
122
+ "data-slot": "dialog-description",
123
+ className: cn("text-muted-foreground text-sm", className),
124
+ ...props
125
+ }
126
+ );
127
+ }
128
+ export {
129
+ Dialog,
130
+ DialogClose,
131
+ DialogContent,
132
+ DialogDescription,
133
+ DialogFooter,
134
+ DialogHeader,
135
+ DialogOverlay,
136
+ DialogPortal,
137
+ DialogTitle,
138
+ DialogTrigger
139
+ };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import { Drawer as DrawerPrimitive } from "../../primitives/drawer";
3
+ declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element;
4
+ declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): React.JSX.Element;
5
+ declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): React.JSX.Element;
6
+ declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): React.JSX.Element;
7
+ declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): React.JSX.Element;
8
+ declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): React.JSX.Element;
9
+ declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): React.JSX.Element;
12
+ declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): React.JSX.Element;
13
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };