@rise-x/apps-sdk 0.7.0 → 0.9.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.
- package/README.md +104 -1
- package/build/rsbuild/index.d.ts +31 -0
- package/build/rsbuild/index.js +204 -0
- package/build/ui/components/accordion.d.ts +7 -0
- package/build/ui/components/app-frame.d.ts +13 -0
- package/build/ui/components/aspect-ratio.d.ts +4 -0
- package/build/ui/components/button-group.d.ts +7 -0
- package/build/ui/components/carousel.d.ts +18 -0
- package/build/ui/components/chart.d.ts +45 -94
- package/build/ui/components/collapsible.d.ts +6 -0
- package/build/ui/components/combobox.d.ts +19 -0
- package/build/ui/components/command.d.ts +18 -0
- package/build/ui/components/context-menu.d.ts +29 -0
- package/build/ui/components/date-picker.d.ts +16 -0
- package/build/ui/components/direction.d.ts +6 -0
- package/build/ui/components/field.d.ts +25 -0
- package/build/ui/components/hover-card.d.ts +6 -0
- package/build/ui/components/input-group.d.ts +13 -0
- package/build/ui/components/input-otp.d.ts +34 -0
- package/build/ui/components/input.d.ts +1 -3
- package/build/ui/components/item.d.ts +23 -0
- package/build/ui/components/kbd.d.ts +4 -0
- package/build/ui/components/menubar.d.ts +26 -0
- package/build/ui/components/message-scroller.d.ts +15 -0
- package/build/ui/components/nav.d.ts +2 -1
- package/build/ui/components/navigation-menu.d.ts +13 -0
- package/build/ui/components/page-header.d.ts +7 -1
- package/build/ui/index.d.ts +20 -0
- package/build/ui/reference/components/accordion.tsx +85 -0
- package/build/ui/reference/components/ai.tsx +3 -1
- package/build/ui/reference/components/alert-dialog.tsx +10 -16
- package/build/ui/reference/components/app-frame.tsx +71 -0
- package/build/ui/reference/components/aspect-ratio.tsx +28 -0
- package/build/ui/reference/components/button-group.tsx +77 -0
- package/build/ui/reference/components/button.tsx +4 -2
- package/build/ui/reference/components/carousel.tsx +248 -0
- package/build/ui/reference/components/chart.tsx +441 -1131
- package/build/ui/reference/components/collapsible.tsx +43 -0
- package/build/ui/reference/components/combobox.tsx +146 -0
- package/build/ui/reference/components/command.tsx +181 -0
- package/build/ui/reference/components/context-menu.tsx +243 -0
- package/build/ui/reference/components/data-table.tsx +3 -3
- package/build/ui/reference/components/date-picker.tsx +218 -0
- package/build/ui/reference/components/dialog.tsx +3 -3
- package/build/ui/reference/components/direction.tsx +22 -0
- package/build/ui/reference/components/dropdown-menu.tsx +1 -1
- package/build/ui/reference/components/field.tsx +252 -0
- package/build/ui/reference/components/hover-card.tsx +64 -0
- package/build/ui/reference/components/input-group.tsx +157 -0
- package/build/ui/reference/components/input-otp.tsx +106 -0
- package/build/ui/reference/components/input.tsx +4 -32
- package/build/ui/reference/components/item.tsx +188 -0
- package/build/ui/reference/components/kbd.tsx +43 -0
- package/build/ui/reference/components/label.tsx +1 -1
- package/build/ui/reference/components/menubar.tsx +275 -0
- package/build/ui/reference/components/message-scroller.tsx +141 -0
- package/build/ui/reference/components/message.tsx +12 -6
- package/build/ui/reference/components/nav.tsx +14 -3
- package/build/ui/reference/components/navigation-menu.tsx +191 -0
- package/build/ui/reference/components/page-header.tsx +32 -0
- package/build/ui/reference/components/popover.tsx +2 -2
- package/build/ui/reference/components/select.tsx +11 -8
- package/build/ui/reference/components/sheet.tsx +10 -2
- package/build/ui/reference/components/timeline.tsx +7 -0
- package/build/ui/reference/components/toggle.tsx +1 -1
- package/build/ui/reference/index.ts +20 -0
- package/build/ui/standalone.js +167 -28
- package/build/ui/styles.css +1 -1
- package/package.json +27 -2
- package/rsbuild/package.json +8 -0
- package/template/AGENTS.md +15 -7
- package/template/src/App.tsx +18 -11
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';
|
|
3
|
+
declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): React.JSX.Element;
|
|
6
|
+
declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): React.JSX.Element;
|
|
7
|
+
declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): React.JSX.Element;
|
|
8
|
+
declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): React.JSX.Element;
|
|
9
|
+
declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): React.JSX.Element;
|
|
10
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: 'default' | 'destructive';
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
declare function ContextMenuRadioItem({ className, children, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): React.JSX.Element;
|
|
24
|
+
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
25
|
+
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
26
|
+
inset?: boolean;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): React.JSX.Element;
|
|
29
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuGroup, ContextMenuPortal, ContextMenuLabel, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface DatePickerRange {
|
|
3
|
+
from?: Date;
|
|
4
|
+
to?: Date;
|
|
5
|
+
}
|
|
6
|
+
declare const DatePicker: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "onChange" | "value"> & {
|
|
7
|
+
value?: Date;
|
|
8
|
+
onValueChange?: (date: Date) => void;
|
|
9
|
+
/** Renders a range span instead of a single day. Selection stays the caller's. */
|
|
10
|
+
range?: DatePickerRange;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Formats the trigger label. Keep it on the date's local parts. */
|
|
13
|
+
format?: (date: Date) => string;
|
|
14
|
+
footer?: React.ReactNode;
|
|
15
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export { DatePicker };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { Label } from './label';
|
|
4
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>): React.JSX.Element;
|
|
5
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<'legend'> & {
|
|
6
|
+
variant?: 'legend' | 'label';
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
9
|
+
declare const fieldVariants: (props?: ({
|
|
10
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): React.JSX.Element;
|
|
13
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
14
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React.JSX.Element;
|
|
15
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
16
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
|
|
17
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<'div'> & {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
|
|
21
|
+
errors?: Array<{
|
|
22
|
+
message?: string;
|
|
23
|
+
} | undefined>;
|
|
24
|
+
}): React.JSX.Element | null;
|
|
25
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { HoverCard as HoverCardPrimitive } from 'radix-ui';
|
|
3
|
+
declare function HoverCard({ openDelay, closeDelay, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): React.JSX.Element;
|
|
6
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { Button } from './button';
|
|
4
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function InputGroupAddon({ className, align, onClick, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
9
|
+
declare function InputGroupButton({ type, variant, size, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
10
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
11
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
12
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): React.JSX.Element;
|
|
13
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "noScriptCSSFallback"> & {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (newValue: string) => unknown;
|
|
5
|
+
maxLength: number;
|
|
6
|
+
textAlign?: "left" | "center" | "right";
|
|
7
|
+
onComplete?: (...args: any[]) => unknown;
|
|
8
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
9
|
+
pasteTransformer?: (pasted: string) => string;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
noScriptCSSFallback?: string | null;
|
|
12
|
+
} & {
|
|
13
|
+
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
14
|
+
children?: never;
|
|
15
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "noScriptCSSFallback"> & {
|
|
16
|
+
value?: string;
|
|
17
|
+
onChange?: (newValue: string) => unknown;
|
|
18
|
+
maxLength: number;
|
|
19
|
+
textAlign?: "left" | "center" | "right";
|
|
20
|
+
onComplete?: (...args: any[]) => unknown;
|
|
21
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
22
|
+
pasteTransformer?: (pasted: string) => string;
|
|
23
|
+
containerClassName?: string;
|
|
24
|
+
noScriptCSSFallback?: string | null;
|
|
25
|
+
} & {
|
|
26
|
+
render?: never;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
30
|
+
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
31
|
+
index: number;
|
|
32
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
declare function InputOTPSeparator({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
34
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -3,6 +3,4 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProp
|
|
|
3
3
|
declare function InputNumeric({ className, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
4
4
|
declare function InputField({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
5
5
|
declare function InputAction({ className, ...props }: React.ComponentProps<'button'>): React.JSX.Element;
|
|
6
|
-
|
|
7
|
-
declare function InputAffix({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
8
|
-
export { Input, InputNumeric, InputField, InputAction, InputGroup, InputAffix };
|
|
6
|
+
export { Input, InputNumeric, InputField, InputAction };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { Separator } from './separator';
|
|
4
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
5
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
6
|
+
declare const itemVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
declare const itemMediaVariants: (props?: ({
|
|
14
|
+
variant?: "image" | "default" | "icon" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
17
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
18
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
19
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
|
|
20
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
21
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
22
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
23
|
+
export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Menubar as MenubarPrimitive } from 'radix-ui';
|
|
3
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
|
|
5
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
|
|
6
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
|
|
7
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): React.JSX.Element;
|
|
8
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): React.JSX.Element;
|
|
9
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
|
|
10
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): React.JSX.Element;
|
|
11
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
variant?: 'default' | 'destructive';
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): React.JSX.Element;
|
|
16
|
+
declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): React.JSX.Element;
|
|
17
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): React.JSX.Element;
|
|
21
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
22
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): React.JSX.Element;
|
|
26
|
+
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarPortal, MenubarLabel, MenubarItem, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const MessageScroller: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
/** Bump this whenever a message is appended — it is what triggers the stick. */
|
|
4
|
+
revision?: number | string;
|
|
5
|
+
/** Shown on the jump affordance while the reader is away from the bottom. */
|
|
6
|
+
unreadCount?: number;
|
|
7
|
+
/** Label for the jump affordance when no count is given. */
|
|
8
|
+
jumpLabel?: string;
|
|
9
|
+
/** Label when `unreadCount` is set. Override to localise — the built-in
|
|
10
|
+
* default is English with an English plural rule, and it is the form that
|
|
11
|
+
* actually shows once a count exists, so `jumpLabel` alone cannot carry a
|
|
12
|
+
* translation. */
|
|
13
|
+
formatUnread?: (count: number) => string;
|
|
14
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export { MessageScroller };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare function Nav({ className, ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
3
|
-
declare function NavItem({ className, current, ...props }: React.ComponentProps<'button'> & {
|
|
3
|
+
declare function NavItem({ className, current, asChild, ...props }: React.ComponentProps<'button'> & {
|
|
4
4
|
current?: boolean;
|
|
5
|
+
asChild?: boolean;
|
|
5
6
|
}): React.JSX.Element;
|
|
6
7
|
declare function NavSection({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
7
8
|
declare function Panel({ className, ...props }: React.ComponentProps<'aside'>): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NavigationMenu as NavigationMenuPrimitive } from 'radix-ui';
|
|
3
|
+
declare function NavigationMenu({ className, children, viewport, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
4
|
+
viewport?: boolean;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): React.JSX.Element;
|
|
7
|
+
declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): React.JSX.Element;
|
|
8
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): React.JSX.Element;
|
|
9
|
+
declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): React.JSX.Element;
|
|
10
|
+
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): React.JSX.Element;
|
|
11
|
+
declare function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): React.JSX.Element;
|
|
12
|
+
declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): React.JSX.Element;
|
|
13
|
+
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuContent, NavigationMenuTrigger, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, };
|
|
@@ -15,6 +15,12 @@ declare function PageHeaderBack({ className, children, ...props }: React.Compone
|
|
|
15
15
|
declare function PageHeaderTitle({ className, ...props }: React.ComponentProps<'h1'>): React.JSX.Element;
|
|
16
16
|
declare function PageHeaderSubtitle({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
|
|
17
17
|
declare function PageHeaderActions({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
18
|
+
declare const PageHeaderActivity: React.ForwardRefExoticComponent<Omit<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & import("class-variance-authority").VariantProps<(props?: ({
|
|
19
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "tint" | "tint-brand" | "destructive" | "destructive-solid" | "brand" | "dashed" | "pill" | null | undefined;
|
|
20
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
22
|
+
asChild?: boolean;
|
|
23
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
24
|
declare function PageHeaderTabs({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
19
25
|
declare function PageHeaderTab({ className, selected, ...props }: React.ComponentProps<'button'> & {
|
|
20
26
|
selected?: boolean;
|
|
@@ -24,4 +30,4 @@ declare function ToolbarEnd({ className, ...props }: React.ComponentProps<'div'>
|
|
|
24
30
|
declare function ToolbarSeparator({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
25
31
|
declare function Breadcrumbs({ className, ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
26
32
|
declare function BreadcrumbSeparator({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
27
|
-
export { PageHeader, PageHeaderRow, PageHeaderBack, PageHeaderTitle, PageHeaderSubtitle, PageHeaderActions, PageHeaderTabs, PageHeaderTab, Toolbar, ToolbarEnd, ToolbarSeparator, Breadcrumbs, BreadcrumbSeparator, };
|
|
33
|
+
export { PageHeader, PageHeaderRow, PageHeaderBack, PageHeaderTitle, PageHeaderSubtitle, PageHeaderActions, PageHeaderActivity, PageHeaderTabs, PageHeaderTab, Toolbar, ToolbarEnd, ToolbarSeparator, Breadcrumbs, BreadcrumbSeparator, };
|
package/build/ui/index.d.ts
CHANGED
|
@@ -1,24 +1,44 @@
|
|
|
1
|
+
export * from './components/accordion';
|
|
1
2
|
export * from './components/ai';
|
|
2
3
|
export * from './components/alert';
|
|
3
4
|
export * from './components/alert-dialog';
|
|
5
|
+
export * from './components/app-frame';
|
|
6
|
+
export * from './components/aspect-ratio';
|
|
4
7
|
export * from './components/avatar';
|
|
5
8
|
export * from './components/badge';
|
|
6
9
|
export * from './components/button';
|
|
10
|
+
export * from './components/button-group';
|
|
7
11
|
export * from './components/calendar';
|
|
8
12
|
export * from './components/card';
|
|
13
|
+
export * from './components/carousel';
|
|
9
14
|
export * from './components/chart';
|
|
10
15
|
export * from './components/checkbox';
|
|
16
|
+
export * from './components/collapsible';
|
|
17
|
+
export * from './components/combobox';
|
|
18
|
+
export * from './components/command';
|
|
19
|
+
export * from './components/context-menu';
|
|
11
20
|
export * from './components/data-table';
|
|
21
|
+
export * from './components/date-picker';
|
|
12
22
|
export * from './components/dialog';
|
|
23
|
+
export * from './components/direction';
|
|
13
24
|
export * from './components/dropdown-menu';
|
|
14
25
|
export * from './components/empty-state';
|
|
26
|
+
export * from './components/field';
|
|
15
27
|
export * from './components/file-upload';
|
|
28
|
+
export * from './components/hover-card';
|
|
16
29
|
export * from './components/input';
|
|
30
|
+
export * from './components/input-group';
|
|
31
|
+
export * from './components/input-otp';
|
|
32
|
+
export * from './components/item';
|
|
33
|
+
export * from './components/kbd';
|
|
17
34
|
export * from './components/label';
|
|
18
35
|
export * from './components/list';
|
|
19
36
|
export * from './components/map';
|
|
37
|
+
export * from './components/menubar';
|
|
20
38
|
export * from './components/message';
|
|
39
|
+
export * from './components/message-scroller';
|
|
21
40
|
export * from './components/nav';
|
|
41
|
+
export * from './components/navigation-menu';
|
|
22
42
|
export * from './components/page-header';
|
|
23
43
|
export * from './components/popover';
|
|
24
44
|
export * from './components/progress';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Accordion as AccordionPrimitive } from 'radix-ui';
|
|
5
|
+
import { ChevronDownIcon } from 'lucide-react';
|
|
6
|
+
|
|
7
|
+
import { cn } from '@rise-x/ui/lib/utils';
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Progressive disclosure for a list of sections. The trigger is the whole row —
|
|
11
|
+
* a chevron you have to hit is a target the size of a full stop.
|
|
12
|
+
*
|
|
13
|
+
* THE CONTAINER OWNS THE DIVIDERS, drawn between items rather than as a border
|
|
14
|
+
* on every row: a top-and-bottom border doubles up at every seam. Same rule as
|
|
15
|
+
* List, and the same reason.
|
|
16
|
+
*
|
|
17
|
+
* NO SURFACE OF ITS OWN by default. An accordion inside a card is already on a
|
|
18
|
+
* surface, and wrapping each item in another one produces a box in a box. Pass
|
|
19
|
+
* `bordered` for the standalone case where the group needs to read as one object.
|
|
20
|
+
*/
|
|
21
|
+
function Accordion({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
22
|
+
return <AccordionPrimitive.Root data-slot="accordion" className={cn(className)} {...props} />;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function AccordionItem({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
29
|
+
return (
|
|
30
|
+
<AccordionPrimitive.Item
|
|
31
|
+
data-slot="accordion-item"
|
|
32
|
+
className={cn('border-t border-border-subtle first:border-t-0', className)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function AccordionTrigger({
|
|
39
|
+
className,
|
|
40
|
+
children,
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
43
|
+
return (
|
|
44
|
+
<AccordionPrimitive.Header className="flex">
|
|
45
|
+
<AccordionPrimitive.Trigger
|
|
46
|
+
data-slot="accordion-trigger"
|
|
47
|
+
className={cn(
|
|
48
|
+
'flex flex-1 cursor-pointer items-center gap-2.5 border-0 bg-transparent py-3 text-left text-ui font-medium outline-none transition-colors duration-150 ease-decelerate',
|
|
49
|
+
'hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring-control/35',
|
|
50
|
+
// the chevron turns rather than swapping glyph: one mark, one meaning
|
|
51
|
+
'[&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-transform [&>svg]:duration-200 [&>svg]:ease-decelerate',
|
|
52
|
+
'data-open:[&>svg]:rotate-180',
|
|
53
|
+
className,
|
|
54
|
+
)}
|
|
55
|
+
{...props}
|
|
56
|
+
>
|
|
57
|
+
<span className="min-w-0 flex-1">{children}</span>
|
|
58
|
+
<ChevronDownIcon aria-hidden />
|
|
59
|
+
</AccordionPrimitive.Trigger>
|
|
60
|
+
</AccordionPrimitive.Header>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function AccordionContent({
|
|
65
|
+
className,
|
|
66
|
+
children,
|
|
67
|
+
...props
|
|
68
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
69
|
+
return (
|
|
70
|
+
<AccordionPrimitive.Content
|
|
71
|
+
data-slot="accordion-content"
|
|
72
|
+
className={cn(
|
|
73
|
+
'overflow-hidden text-xs text-muted-foreground',
|
|
74
|
+
'data-open:animate-accordion-down data-closed:animate-accordion-up',
|
|
75
|
+
)}
|
|
76
|
+
{...props}
|
|
77
|
+
>
|
|
78
|
+
{/* padding on an inner element, not the animated one — animating a box
|
|
79
|
+
whose own padding is part of the measured height stutters at both ends */}
|
|
80
|
+
<div className={cn('pb-3', className)}>{children}</div>
|
|
81
|
+
</AccordionPrimitive.Content>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -72,7 +72,9 @@ function AiWorking({ className, children, ...props }: React.ComponentProps<'span
|
|
|
72
72
|
<span
|
|
73
73
|
data-slot="ai-working"
|
|
74
74
|
className={cn(
|
|
75
|
-
|
|
75
|
+
// gap-1.5 is the icon-to-text step used by AiNote / AiExplainSummary;
|
|
76
|
+
// the dots keep their own tighter gap-1 below.
|
|
77
|
+
'inline-flex items-center gap-1.5 rounded-full bg-ai/9 px-[11px] py-2 text-ui text-ai-text',
|
|
76
78
|
className,
|
|
77
79
|
)}
|
|
78
80
|
{...props}
|
|
@@ -45,7 +45,7 @@ const AlertDialogOverlay = React.forwardRef<
|
|
|
45
45
|
ref={ref}
|
|
46
46
|
data-slot="alert-dialog-overlay"
|
|
47
47
|
className={cn(
|
|
48
|
-
'fixed inset-0 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',
|
|
48
|
+
'fixed inset-0 z-50 bg-black/30 duration-100 dark:bg-black/60 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
49
49
|
className,
|
|
50
50
|
)}
|
|
51
51
|
{...props}
|
|
@@ -155,7 +155,7 @@ const AlertDialogDescription = React.forwardRef<
|
|
|
155
155
|
ref={ref}
|
|
156
156
|
data-slot="alert-dialog-description"
|
|
157
157
|
className={cn(
|
|
158
|
-
'text-
|
|
158
|
+
'text-ui text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
|
|
159
159
|
className,
|
|
160
160
|
)}
|
|
161
161
|
{...props}
|
|
@@ -169,13 +169,12 @@ const AlertDialogAction = React.forwardRef<
|
|
|
169
169
|
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>
|
|
170
170
|
>(function AlertDialogAction({ className, variant = 'default', size = 'default', ...props }, ref) {
|
|
171
171
|
return (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
/>
|
|
172
|
+
// className goes to the Button, not to the slotted child: Radix's Slot
|
|
173
|
+
// CONCATENATES classNames instead of merging them, so a caller's override on
|
|
174
|
+
// the child would tie with the variant's own class and lose or win purely on
|
|
175
|
+
// stylesheet order. Routed here, it goes through Button's cn() and wins.
|
|
176
|
+
<Button variant={variant} size={size} className={className} asChild>
|
|
177
|
+
<AlertDialogPrimitive.Action ref={ref} data-slot="alert-dialog-action" {...props} />
|
|
179
178
|
</Button>
|
|
180
179
|
);
|
|
181
180
|
});
|
|
@@ -186,13 +185,8 @@ const AlertDialogCancel = React.forwardRef<
|
|
|
186
185
|
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>
|
|
187
186
|
>(function AlertDialogCancel({ className, variant = 'outline', size = 'default', ...props }, ref) {
|
|
188
187
|
return (
|
|
189
|
-
<Button variant={variant} size={size} asChild>
|
|
190
|
-
<AlertDialogPrimitive.Cancel
|
|
191
|
-
ref={ref}
|
|
192
|
-
data-slot="alert-dialog-cancel"
|
|
193
|
-
className={cn(className)}
|
|
194
|
-
{...props}
|
|
195
|
-
/>
|
|
188
|
+
<Button variant={variant} size={size} className={className} asChild>
|
|
189
|
+
<AlertDialogPrimitive.Cancel ref={ref} data-slot="alert-dialog-cancel" {...props} />
|
|
196
190
|
</Button>
|
|
197
191
|
);
|
|
198
192
|
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '@rise-x/ui/lib/utils';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* THE APP LAYOUT CONTRACT for federated apps.
|
|
7
|
+
*
|
|
8
|
+
* The next-gen shell hands an app a full-bleed region that extends UNDER its
|
|
9
|
+
* floating top bar and publishes the bar's height as `--topbar-h` on the
|
|
10
|
+
* document. These three primitives split that region the way the shell's own
|
|
11
|
+
* surfaces do: a rail that starts below the bar and never scrolls away, and a
|
|
12
|
+
* content column whose scroller spans the full height so content slides in
|
|
13
|
+
* BEHIND the bar's progressive blur instead of being clipped at its edge.
|
|
14
|
+
*
|
|
15
|
+
* RESPONSIVE STANDARD: below md the frame stacks — the rail becomes a
|
|
16
|
+
* horizontal, scrollable nav strip under the top bar (Nav rows flip to a row,
|
|
17
|
+
* NavSection headers hide) and the content column scrolls beneath it. Apps
|
|
18
|
+
* get a sane phone/tablet layout without writing their own breakpoints.
|
|
19
|
+
*
|
|
20
|
+
* In hosts that don't publish the variable (the classic ClientApp shell,
|
|
21
|
+
* standalone dev) every offset falls back to 0px and the frame degrades to a
|
|
22
|
+
* plain rail-plus-content flex layout in normal flow.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
function AppFrame({ className, ...props }: React.ComponentProps<'div'>) {
|
|
26
|
+
return (
|
|
27
|
+
<div
|
|
28
|
+
data-slot="app-frame"
|
|
29
|
+
className={cn('flex h-full min-h-0 flex-col text-foreground md:flex-row', className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Fixed left rail from md up (180px, the Nav convention; override via
|
|
36
|
+
* className) — long rails scroll themselves, the page never scrolls them
|
|
37
|
+
* away. Below md it renders as a horizontal nav strip under the top bar. */
|
|
38
|
+
function AppRail({ className, ...props }: React.ComponentProps<'aside'>) {
|
|
39
|
+
return (
|
|
40
|
+
<aside
|
|
41
|
+
data-slot="app-rail"
|
|
42
|
+
className={cn(
|
|
43
|
+
'flex w-full shrink-0 flex-row items-center gap-1 overflow-x-auto px-3 pt-[calc(var(--topbar-h,0px)_+_8px)] pb-1',
|
|
44
|
+
'max-md:[&_[data-slot=nav]]:flex-row max-md:[&_[data-slot=nav]]:items-center max-md:[&_[data-slot=nav-item]]:w-auto max-md:[&_[data-slot=nav-item]]:shrink-0 max-md:[&_[data-slot=nav-section]]:hidden',
|
|
45
|
+
'md:w-[180px] md:flex-col md:items-stretch md:gap-0 md:overflow-x-visible md:overflow-y-auto md:p-3 md:pt-[calc(var(--topbar-h,0px)_+_12px)]',
|
|
46
|
+
className,
|
|
47
|
+
)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** The scrolling content column. From md up it spans under the shell top bar —
|
|
54
|
+
* the top padding keeps resting content below it, so only scrolled content
|
|
55
|
+
* passes behind. Below md the rail strip clears the bar and the column
|
|
56
|
+
* scrolls beneath it with plain padding; a rail-less frame (AppContent as
|
|
57
|
+
* the frame's first child) pads itself below the bar instead. */
|
|
58
|
+
function AppContent({ className, ...props }: React.ComponentProps<'main'>) {
|
|
59
|
+
return (
|
|
60
|
+
<main
|
|
61
|
+
data-slot="app-content"
|
|
62
|
+
className={cn(
|
|
63
|
+
'min-w-0 flex-1 overflow-y-auto p-4 max-md:first:pt-[calc(var(--topbar-h,0px)_+_16px)] md:p-6 md:pt-[calc(var(--topbar-h,0px)_+_24px)]',
|
|
64
|
+
className,
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { AppFrame, AppRail, AppContent };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AspectRatio as AspectRatioPrimitive } from 'radix-ui';
|
|
3
|
+
|
|
4
|
+
import { cn } from '@rise-x/ui/lib/utils';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Holds a box at a fixed ratio so media cannot shift the layout while it loads.
|
|
8
|
+
* Deliberately carries no surface, radius or border of its own — the caller
|
|
9
|
+
* decides whether the thing inside is a thumbnail (10px) or a card (14px), and a
|
|
10
|
+
* radius here would clip at the wrong step.
|
|
11
|
+
*
|
|
12
|
+
* Use `MediaThumb` instead for a fixed-size square in a gallery; this is for the
|
|
13
|
+
* responsive case where the width is unknown and only the ratio is fixed.
|
|
14
|
+
*/
|
|
15
|
+
function AspectRatio({
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
19
|
+
return (
|
|
20
|
+
<AspectRatioPrimitive.Root
|
|
21
|
+
data-slot="aspect-ratio"
|
|
22
|
+
className={cn('[&>img]:size-full [&>img]:object-cover [&>video]:size-full', className)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { AspectRatio };
|