@majapisoftwares/ui 6.3.0 → 6.4.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 (81) hide show
  1. package/AGENTS.md +27 -27
  2. package/README.md +79 -79
  3. package/THIRD_PARTY_NOTICES.md +39 -39
  4. package/components.json +25 -25
  5. package/docs/MIGRATION-0.2.md +20 -20
  6. package/docs/MIGRATION-6.0.md +33 -33
  7. package/docs/NEXT-STARTER-VALIDATION.md +14 -14
  8. package/docs/STANDARDS.md +65 -51
  9. package/docs/VALIDATION.md +11 -11
  10. package/docs/VERSIONING.md +32 -28
  11. package/docs/validation/preference-titles.md +22 -22
  12. package/package.json +91 -89
  13. package/scripts/check-standards.mjs +41 -41
  14. package/src/components/ui/accordion.tsx +82 -82
  15. package/src/components/ui/alert-dialog.tsx +187 -187
  16. package/src/components/ui/alert.tsx +77 -77
  17. package/src/components/ui/attachment.tsx +209 -0
  18. package/src/components/ui/avatar.tsx +108 -108
  19. package/src/components/ui/badge.tsx +55 -55
  20. package/src/components/ui/breadcrumb.tsx +125 -125
  21. package/src/components/ui/bubble.tsx +129 -0
  22. package/src/components/ui/button-group.tsx +89 -89
  23. package/src/components/ui/button.tsx +59 -59
  24. package/src/components/ui/card.tsx +101 -101
  25. package/src/components/ui/checkbox.tsx +27 -27
  26. package/src/components/ui/collapsible.tsx +21 -21
  27. package/src/components/ui/context-menu.tsx +271 -271
  28. package/src/components/ui/dialog.tsx +161 -161
  29. package/src/components/ui/dropdown-menu.tsx +271 -271
  30. package/src/components/ui/empty.tsx +105 -105
  31. package/src/components/ui/field.tsx +238 -238
  32. package/src/components/ui/hover-card.tsx +50 -50
  33. package/src/components/ui/input-group.tsx +155 -155
  34. package/src/components/ui/input.tsx +21 -21
  35. package/src/components/ui/item.tsx +203 -0
  36. package/src/components/ui/kbd.tsx +28 -28
  37. package/src/components/ui/label.tsx +19 -19
  38. package/src/components/ui/message-scroller.tsx +166 -0
  39. package/src/components/ui/message.tsx +93 -0
  40. package/src/components/ui/orb.css +1002 -1002
  41. package/src/components/ui/orb.tsx +752 -752
  42. package/src/components/ui/popover.tsx +89 -89
  43. package/src/components/ui/progress.tsx +82 -82
  44. package/src/components/ui/radio-group.tsx +37 -37
  45. package/src/components/ui/scroll-area.tsx +54 -54
  46. package/src/components/ui/select.tsx +204 -204
  47. package/src/components/ui/separator.tsx +24 -24
  48. package/src/components/ui/sheet.tsx +139 -139
  49. package/src/components/ui/sidebar.tsx +1048 -1048
  50. package/src/components/ui/skeleton.tsx +15 -15
  51. package/src/components/ui/slider.tsx +53 -53
  52. package/src/components/ui/sonner.tsx +44 -44
  53. package/src/components/ui/spinner.tsx +32 -32
  54. package/src/components/ui/switch.tsx +31 -31
  55. package/src/components/ui/table.tsx +121 -121
  56. package/src/components/ui/tabs.tsx +81 -81
  57. package/src/components/ui/textarea.tsx +19 -19
  58. package/src/components/ui/toggle-group.tsx +89 -89
  59. package/src/components/ui/toggle.tsx +44 -44
  60. package/src/components/ui/tooltip.tsx +65 -65
  61. package/src/components/ui/trace.tsx +163 -0
  62. package/src/hooks/use-mobile.ts +20 -20
  63. package/src/hooks/use-streamed-text.ts +64 -0
  64. package/src/lib/i18n.tsx +151 -109
  65. package/src/lib/utils.ts +1 -1
  66. package/src/patterns/app-shell.tsx +237 -237
  67. package/src/patterns/chat-markdown.tsx +72 -0
  68. package/src/patterns/chat-trace.tsx +200 -0
  69. package/src/patterns/chat.tsx +317 -0
  70. package/src/patterns/data-table.tsx +2492 -2492
  71. package/src/patterns/filter-tabs.tsx +53 -53
  72. package/src/patterns/majapi-logo.tsx +32 -32
  73. package/src/patterns/page-header.tsx +62 -62
  74. package/src/patterns/prompt-input.tsx +364 -0
  75. package/src/patterns/status-badge.tsx +24 -24
  76. package/src/patterns/user-menu.tsx +218 -218
  77. package/src/patterns/workspace-switcher.tsx +176 -176
  78. package/src/styles.css +170 -165
  79. package/src/templates/admin-dashboard.tsx +44 -44
  80. package/src/templates/auth-layout.tsx +30 -30
  81. package/src/templates/signup-form.tsx +177 -177
@@ -1,161 +1,161 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
5
- import { cn } from "cn";
6
- import { useUiMessages } from "../../lib/i18n";
7
-
8
- import { Button } from "./button";
9
- import { XIcon } from "lucide-react";
10
-
11
- function Dialog({ ...props }: DialogPrimitive.Root.Props) {
12
- return <DialogPrimitive.Root data-slot="dialog" {...props} />;
13
- }
14
-
15
- function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
16
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
17
- }
18
-
19
- function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
20
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
21
- }
22
-
23
- function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
24
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
25
- }
26
-
27
- function DialogOverlay({
28
- className,
29
- ...props
30
- }: DialogPrimitive.Backdrop.Props) {
31
- return (
32
- <DialogPrimitive.Backdrop
33
- data-slot="dialog-overlay"
34
- className={cn(
35
- "fixed inset-0 isolate z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
36
- className,
37
- )}
38
- {...props}
39
- />
40
- );
41
- }
42
-
43
- function DialogContent({
44
- className,
45
- children,
46
- showCloseButton = true,
47
- ...props
48
- }: DialogPrimitive.Popup.Props & {
49
- showCloseButton?: boolean;
50
- }) {
51
- const messages = useUiMessages();
52
- return (
53
- <DialogPortal>
54
- <DialogOverlay />
55
- <DialogPrimitive.Popup
56
- data-slot="dialog-content"
57
- className={cn(
58
- "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-md dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
59
- className,
60
- )}
61
- {...props}
62
- >
63
- {children}
64
- {showCloseButton && (
65
- <DialogPrimitive.Close
66
- data-slot="dialog-close"
67
- render={
68
- <Button
69
- variant="ghost"
70
- className="absolute top-4 right-4 bg-secondary"
71
- size="icon-sm"
72
- />
73
- }
74
- >
75
- <XIcon />
76
- <span className="sr-only">{messages.close}</span>
77
- </DialogPrimitive.Close>
78
- )}
79
- </DialogPrimitive.Popup>
80
- </DialogPortal>
81
- );
82
- }
83
-
84
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
85
- return (
86
- <div
87
- data-slot="dialog-header"
88
- className={cn("flex flex-col gap-1.5", className)}
89
- {...props}
90
- />
91
- );
92
- }
93
-
94
- function DialogFooter({
95
- className,
96
- showCloseButton = false,
97
- children,
98
- ...props
99
- }: React.ComponentProps<"div"> & {
100
- showCloseButton?: boolean;
101
- }) {
102
- return (
103
- <div
104
- data-slot="dialog-footer"
105
- className={cn(
106
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
107
- className,
108
- )}
109
- {...props}
110
- >
111
- {children}
112
- {showCloseButton && (
113
- <DialogPrimitive.Close render={<Button variant="outline" />}>
114
- Close
115
- </DialogPrimitive.Close>
116
- )}
117
- </div>
118
- );
119
- }
120
-
121
- function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
122
- return (
123
- <DialogPrimitive.Title
124
- data-slot="dialog-title"
125
- className={cn(
126
- "font-heading text-base leading-none font-medium",
127
- className,
128
- )}
129
- {...props}
130
- />
131
- );
132
- }
133
-
134
- function DialogDescription({
135
- className,
136
- ...props
137
- }: DialogPrimitive.Description.Props) {
138
- return (
139
- <DialogPrimitive.Description
140
- data-slot="dialog-description"
141
- className={cn(
142
- "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
143
- className,
144
- )}
145
- {...props}
146
- />
147
- );
148
- }
149
-
150
- export {
151
- Dialog,
152
- DialogClose,
153
- DialogContent,
154
- DialogDescription,
155
- DialogFooter,
156
- DialogHeader,
157
- DialogOverlay,
158
- DialogPortal,
159
- DialogTitle,
160
- DialogTrigger,
161
- };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
5
+ import { cn } from "cn";
6
+ import { useUiMessages } from "../../lib/i18n";
7
+
8
+ import { Button } from "./button";
9
+ import { XIcon } from "lucide-react";
10
+
11
+ function Dialog({ ...props }: DialogPrimitive.Root.Props) {
12
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />;
13
+ }
14
+
15
+ function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
16
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
17
+ }
18
+
19
+ function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
20
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
21
+ }
22
+
23
+ function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
24
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
25
+ }
26
+
27
+ function DialogOverlay({
28
+ className,
29
+ ...props
30
+ }: DialogPrimitive.Backdrop.Props) {
31
+ return (
32
+ <DialogPrimitive.Backdrop
33
+ data-slot="dialog-overlay"
34
+ className={cn(
35
+ "fixed inset-0 isolate z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
36
+ className,
37
+ )}
38
+ {...props}
39
+ />
40
+ );
41
+ }
42
+
43
+ function DialogContent({
44
+ className,
45
+ children,
46
+ showCloseButton = true,
47
+ ...props
48
+ }: DialogPrimitive.Popup.Props & {
49
+ showCloseButton?: boolean;
50
+ }) {
51
+ const messages = useUiMessages();
52
+ return (
53
+ <DialogPortal>
54
+ <DialogOverlay />
55
+ <DialogPrimitive.Popup
56
+ data-slot="dialog-content"
57
+ className={cn(
58
+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-4xl bg-popover p-6 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none sm:max-w-md dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
59
+ className,
60
+ )}
61
+ {...props}
62
+ >
63
+ {children}
64
+ {showCloseButton && (
65
+ <DialogPrimitive.Close
66
+ data-slot="dialog-close"
67
+ render={
68
+ <Button
69
+ variant="ghost"
70
+ className="absolute top-4 right-4 bg-secondary"
71
+ size="icon-sm"
72
+ />
73
+ }
74
+ >
75
+ <XIcon />
76
+ <span className="sr-only">{messages.close}</span>
77
+ </DialogPrimitive.Close>
78
+ )}
79
+ </DialogPrimitive.Popup>
80
+ </DialogPortal>
81
+ );
82
+ }
83
+
84
+ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
85
+ return (
86
+ <div
87
+ data-slot="dialog-header"
88
+ className={cn("flex flex-col gap-1.5", className)}
89
+ {...props}
90
+ />
91
+ );
92
+ }
93
+
94
+ function DialogFooter({
95
+ className,
96
+ showCloseButton = false,
97
+ children,
98
+ ...props
99
+ }: React.ComponentProps<"div"> & {
100
+ showCloseButton?: boolean;
101
+ }) {
102
+ return (
103
+ <div
104
+ data-slot="dialog-footer"
105
+ className={cn(
106
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
107
+ className,
108
+ )}
109
+ {...props}
110
+ >
111
+ {children}
112
+ {showCloseButton && (
113
+ <DialogPrimitive.Close render={<Button variant="outline" />}>
114
+ Close
115
+ </DialogPrimitive.Close>
116
+ )}
117
+ </div>
118
+ );
119
+ }
120
+
121
+ function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
122
+ return (
123
+ <DialogPrimitive.Title
124
+ data-slot="dialog-title"
125
+ className={cn(
126
+ "font-heading text-base leading-none font-medium",
127
+ className,
128
+ )}
129
+ {...props}
130
+ />
131
+ );
132
+ }
133
+
134
+ function DialogDescription({
135
+ className,
136
+ ...props
137
+ }: DialogPrimitive.Description.Props) {
138
+ return (
139
+ <DialogPrimitive.Description
140
+ data-slot="dialog-description"
141
+ className={cn(
142
+ "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
143
+ className,
144
+ )}
145
+ {...props}
146
+ />
147
+ );
148
+ }
149
+
150
+ export {
151
+ Dialog,
152
+ DialogClose,
153
+ DialogContent,
154
+ DialogDescription,
155
+ DialogFooter,
156
+ DialogHeader,
157
+ DialogOverlay,
158
+ DialogPortal,
159
+ DialogTitle,
160
+ DialogTrigger,
161
+ };