@apcrda/ui 0.3.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 +93 -0
- package/dist/colors-C8Jz-F17.js +89 -0
- package/dist/components/Accordion/Accordion.d.ts +9 -0
- package/dist/components/Accordion/Accordion.types.d.ts +10 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +5 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +15 -0
- package/dist/components/AlertDialog/index.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +13 -0
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
- package/dist/components/Autocomplete/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +9 -0
- package/dist/components/Avatar/Avatar.types.d.ts +11 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +10 -0
- package/dist/components/Badge/Badge.types.d.ts +9 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +16 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +10 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +13 -0
- package/dist/components/Button/Button.types.d.ts +11 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Calendar/Calendar.d.ts +6 -0
- package/dist/components/Calendar/Calendar.types.d.ts +4 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +13 -0
- package/dist/components/Card/Card.types.d.ts +9 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +10 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Combobox/Combobox.d.ts +11 -0
- package/dist/components/Combobox/Combobox.types.d.ts +17 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +5 -0
- package/dist/components/CommandPalette/CommandPalette.types.d.ts +20 -0
- package/dist/components/CommandPalette/index.d.ts +2 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +5 -0
- package/dist/components/ContextMenu/ContextMenu.types.d.ts +16 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.d.ts +10 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +11 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +11 -0
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +14 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +22 -0
- package/dist/components/Dialog/Dialog.types.d.ts +16 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +7 -0
- package/dist/components/Divider/Divider.types.d.ts +6 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +23 -0
- package/dist/components/Drawer/Drawer.types.d.ts +18 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/FileUpload/FileUpload.d.ts +11 -0
- package/dist/components/FileUpload/FileUpload.types.d.ts +13 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +13 -0
- package/dist/components/Input/Input.types.d.ts +9 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Label/Label.d.ts +4 -0
- package/dist/components/Label/Label.types.d.ts +6 -0
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +11 -0
- package/dist/components/MultiSelect/MultiSelect.types.d.ts +17 -0
- package/dist/components/MultiSelect/index.d.ts +2 -0
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +5 -0
- package/dist/components/NotificationCenter/NotificationCenter.types.d.ts +26 -0
- package/dist/components/NotificationCenter/NotificationItem.d.ts +8 -0
- package/dist/components/NotificationCenter/NotificationPanel.d.ts +2 -0
- package/dist/components/NotificationCenter/index.d.ts +4 -0
- package/dist/components/Pagination/Pagination.d.ts +13 -0
- package/dist/components/Pagination/Pagination.types.d.ts +15 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +8 -0
- package/dist/components/Popover/Popover.types.d.ts +9 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +9 -0
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +10 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +15 -0
- package/dist/components/Select/Select.types.d.ts +17 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.d.ts +5 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +27 -0
- package/dist/components/Sidebar/SidebarContent.d.ts +7 -0
- package/dist/components/Sidebar/SidebarContext.d.ts +3 -0
- package/dist/components/Sidebar/SidebarItem.d.ts +7 -0
- package/dist/components/Sidebar/index.d.ts +5 -0
- package/dist/components/Switch/Switch.d.ts +8 -0
- package/dist/components/Switch/Switch.types.d.ts +8 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +8 -0
- package/dist/components/Tabs/Tabs.types.d.ts +11 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +9 -0
- package/dist/components/Textarea/Textarea.types.d.ts +7 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Toast/Toast.types.d.ts +13 -0
- package/dist/components/Toast/Toaster.d.ts +4 -0
- package/dist/components/Toast/index.d.ts +3 -0
- package/dist/components/Toast/useToast.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.types.d.ts +12 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/helpers-CgZQleCk.js +12 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useMediaQuery.d.ts +1 -0
- package/dist/hooks/useTheme.d.ts +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +12254 -0
- package/dist/styles.css +2 -0
- package/dist/styles.js +0 -0
- package/dist/themes/ThemeProvider.d.ts +20 -0
- package/dist/themes/dark.d.ts +16 -0
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/light.d.ts +16 -0
- package/dist/themes-CF6D9f5U.js +91 -0
- package/dist/themes.js +2 -0
- package/dist/tokens/colors.d.ts +101 -0
- package/dist/tokens/index.d.ts +12 -0
- package/dist/tokens/motion.d.ts +14 -0
- package/dist/tokens/radius.d.ts +9 -0
- package/dist/tokens/shadows.d.ts +7 -0
- package/dist/tokens/spacing.d.ts +21 -0
- package/dist/tokens/typography.d.ts +63 -0
- package/dist/tokens-CLmSW3VY.js +100 -0
- package/dist/tokens.js +3 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/helpers.d.ts +7 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/mergeClasses.d.ts +1 -0
- package/dist/utils-BIF7GImV.js +1739 -0
- package/dist/utils.js +3 -0
- package/docs/Architecture.md +57 -0
- package/docs/Contributing.md +58 -0
- package/docs/Design-Principles.md +37 -0
- package/package.json +124 -0
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# APCRDA UI
|
|
2
|
+
|
|
3
|
+
APCRDA UI is a production-ready React 19 component library for APCRDA applications. It is published as a single npm package:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @apcrda/ui
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Import the global stylesheet once in your application entrypoint:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import '@apcrda/ui/styles.css'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Use components from the package root:
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { Button, Card, CardContent, Input, ThemeProvider } from '@apcrda/ui'
|
|
21
|
+
|
|
22
|
+
export default function App() {
|
|
23
|
+
return (
|
|
24
|
+
<ThemeProvider defaultTheme="light">
|
|
25
|
+
<Card>
|
|
26
|
+
<CardContent className="space-y-4">
|
|
27
|
+
<Input placeholder="Employee Name" />
|
|
28
|
+
<Button>Save</Button>
|
|
29
|
+
</CardContent>
|
|
30
|
+
</Card>
|
|
31
|
+
</ThemeProvider>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Scripts
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run dev
|
|
40
|
+
npm run test -- --run
|
|
41
|
+
npm run typecheck
|
|
42
|
+
npm run build
|
|
43
|
+
npm run build:storybook
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Theming
|
|
47
|
+
|
|
48
|
+
APCRDA UI uses CSS variables and `data-theme` attributes:
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<html data-theme="light"></html>
|
|
52
|
+
<html data-theme="dark"></html>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`ThemeProvider` manages the attribute and persists the selected theme by default.
|
|
56
|
+
|
|
57
|
+
## Publishing
|
|
58
|
+
|
|
59
|
+
Build before publishing:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm run build
|
|
63
|
+
npm publish
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
For GitLab Package Registry in CI:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run publish:gitlab
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use an `.npmrc` similar to:
|
|
73
|
+
|
|
74
|
+
```ini
|
|
75
|
+
@apcrda:registry=https://gitlab.com/api/v4/projects/<project_id>/packages/npm/
|
|
76
|
+
//gitlab.com/api/v4/projects/<project_id>/packages/npm/:_authToken=${NPM_TOKEN}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Phase 1 Components
|
|
80
|
+
|
|
81
|
+
- Button
|
|
82
|
+
- Input
|
|
83
|
+
- Textarea
|
|
84
|
+
- Checkbox
|
|
85
|
+
- RadioGroup
|
|
86
|
+
- Switch
|
|
87
|
+
- Badge
|
|
88
|
+
- Avatar
|
|
89
|
+
- Card
|
|
90
|
+
- Divider
|
|
91
|
+
- Label
|
|
92
|
+
|
|
93
|
+
Advanced application components such as DataTable, DatePicker, Modal, Drawer, Charts, GIS components, and dashboard widgets are intentionally out of scope for Phase 1.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//#region src/tokens/colors.ts
|
|
2
|
+
var e = {
|
|
3
|
+
primary: {
|
|
4
|
+
50: "#eef7ff",
|
|
5
|
+
100: "#d9ecff",
|
|
6
|
+
200: "#bce0ff",
|
|
7
|
+
300: "#8dcdff",
|
|
8
|
+
400: "#58aff7",
|
|
9
|
+
500: "#318fdd",
|
|
10
|
+
600: "#176fb8",
|
|
11
|
+
700: "#145b95",
|
|
12
|
+
800: "#164d7c",
|
|
13
|
+
900: "#183f66"
|
|
14
|
+
},
|
|
15
|
+
secondary: {
|
|
16
|
+
50: "#eefbf6",
|
|
17
|
+
100: "#d6f5e8",
|
|
18
|
+
200: "#b1ead3",
|
|
19
|
+
300: "#7bd8b4",
|
|
20
|
+
400: "#43bf92",
|
|
21
|
+
500: "#21a77b",
|
|
22
|
+
600: "#168662",
|
|
23
|
+
700: "#146b50",
|
|
24
|
+
800: "#145641",
|
|
25
|
+
900: "#124737"
|
|
26
|
+
},
|
|
27
|
+
success: {
|
|
28
|
+
50: "#ecfdf5",
|
|
29
|
+
100: "#d1fae5",
|
|
30
|
+
200: "#a7f3d0",
|
|
31
|
+
300: "#6ee7b7",
|
|
32
|
+
400: "#34d399",
|
|
33
|
+
500: "#10b981",
|
|
34
|
+
600: "#059669",
|
|
35
|
+
700: "#047857",
|
|
36
|
+
800: "#065f46",
|
|
37
|
+
900: "#064e3b"
|
|
38
|
+
},
|
|
39
|
+
warning: {
|
|
40
|
+
50: "#fffbeb",
|
|
41
|
+
100: "#fef3c7",
|
|
42
|
+
200: "#fde68a",
|
|
43
|
+
300: "#fcd34d",
|
|
44
|
+
400: "#fbbf24",
|
|
45
|
+
500: "#f59e0b",
|
|
46
|
+
600: "#d97706",
|
|
47
|
+
700: "#b45309",
|
|
48
|
+
800: "#92400e",
|
|
49
|
+
900: "#78350f"
|
|
50
|
+
},
|
|
51
|
+
error: {
|
|
52
|
+
50: "#fef2f2",
|
|
53
|
+
100: "#fee2e2",
|
|
54
|
+
200: "#fecaca",
|
|
55
|
+
300: "#fca5a5",
|
|
56
|
+
400: "#f87171",
|
|
57
|
+
500: "#ef4444",
|
|
58
|
+
600: "#dc2626",
|
|
59
|
+
700: "#b91c1c",
|
|
60
|
+
800: "#991b1b",
|
|
61
|
+
900: "#7f1d1d"
|
|
62
|
+
},
|
|
63
|
+
info: {
|
|
64
|
+
50: "#eff6ff",
|
|
65
|
+
100: "#dbeafe",
|
|
66
|
+
200: "#bfdbfe",
|
|
67
|
+
300: "#93c5fd",
|
|
68
|
+
400: "#60a5fa",
|
|
69
|
+
500: "#3b82f6",
|
|
70
|
+
600: "#2563eb",
|
|
71
|
+
700: "#1d4ed8",
|
|
72
|
+
800: "#1e40af",
|
|
73
|
+
900: "#1e3a8a"
|
|
74
|
+
},
|
|
75
|
+
neutral: {
|
|
76
|
+
50: "#f8fafc",
|
|
77
|
+
100: "#f1f5f9",
|
|
78
|
+
200: "#e2e8f0",
|
|
79
|
+
300: "#cbd5e1",
|
|
80
|
+
400: "#94a3b8",
|
|
81
|
+
500: "#64748b",
|
|
82
|
+
600: "#475569",
|
|
83
|
+
700: "#334155",
|
|
84
|
+
800: "#1e293b",
|
|
85
|
+
900: "#0f172a"
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
export { e as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
export declare const Accordion: import("react").ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
3
|
+
type: "single";
|
|
4
|
+
}) | (Omit<AccordionPrimitive.AccordionMultipleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
5
|
+
type: "multiple";
|
|
6
|
+
})) & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const AccordionItem: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const AccordionTrigger: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export declare const AccordionContent: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
export type AccordionProps = (ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
|
|
4
|
+
type: 'single';
|
|
5
|
+
}) | (ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
|
|
6
|
+
type: 'multiple';
|
|
7
|
+
});
|
|
8
|
+
export type AccordionItemProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
|
|
9
|
+
export type AccordionTriggerProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>;
|
|
10
|
+
export type AccordionContentProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AlertDialogProps } from './AlertDialog.types';
|
|
2
|
+
export declare function AlertDialog({ open, defaultOpen, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, variant, loading, children, }: AlertDialogProps): import("react").JSX.Element;
|
|
3
|
+
export declare namespace AlertDialog {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type AlertDialogVariant = 'destructive' | 'warning' | 'info';
|
|
2
|
+
export type AlertDialogProps = {
|
|
3
|
+
readonly open?: boolean;
|
|
4
|
+
readonly defaultOpen?: boolean;
|
|
5
|
+
readonly onOpenChange?: (open: boolean) => void;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly description: string;
|
|
8
|
+
readonly confirmLabel?: string;
|
|
9
|
+
readonly cancelLabel?: string;
|
|
10
|
+
readonly onConfirm?: () => void;
|
|
11
|
+
readonly onCancel?: () => void;
|
|
12
|
+
readonly variant?: AlertDialogVariant;
|
|
13
|
+
readonly loading?: boolean;
|
|
14
|
+
readonly children?: React.ReactNode;
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AutocompleteOption } from './Autocomplete.types';
|
|
2
|
+
export declare const Autocomplete: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & {
|
|
3
|
+
readonly value?: string;
|
|
4
|
+
readonly onChange?: (value: string) => void;
|
|
5
|
+
readonly onSelect?: (option: AutocompleteOption) => void;
|
|
6
|
+
readonly options: AutocompleteOption[];
|
|
7
|
+
readonly placeholder?: string;
|
|
8
|
+
readonly emptyMessage?: string;
|
|
9
|
+
readonly disabled?: boolean;
|
|
10
|
+
readonly error?: boolean;
|
|
11
|
+
readonly size?: "sm" | "md" | "lg";
|
|
12
|
+
readonly name?: string;
|
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type AutocompleteOption = {
|
|
3
|
+
readonly value: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type AutocompleteProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
|
|
8
|
+
readonly value?: string;
|
|
9
|
+
readonly onChange?: (value: string) => void;
|
|
10
|
+
readonly onSelect?: (option: AutocompleteOption) => void;
|
|
11
|
+
readonly options: AutocompleteOption[];
|
|
12
|
+
readonly placeholder?: string;
|
|
13
|
+
readonly emptyMessage?: string;
|
|
14
|
+
readonly disabled?: boolean;
|
|
15
|
+
readonly error?: boolean;
|
|
16
|
+
readonly size?: 'sm' | 'md' | 'lg';
|
|
17
|
+
readonly name?: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
|
+
export declare const avatarVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const Avatar: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
6
|
+
readonly size?: import("./Avatar.types").AvatarSize;
|
|
7
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
export declare const AvatarImage: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
9
|
+
export declare const AvatarFallback: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ElementRef } from 'react';
|
|
2
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
|
+
export type AvatarSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type AvatarProps = ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> & {
|
|
5
|
+
readonly size?: AvatarSize;
|
|
6
|
+
};
|
|
7
|
+
export type AvatarImageProps = ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>;
|
|
8
|
+
export type AvatarFallbackProps = ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>;
|
|
9
|
+
export type AvatarElement = ElementRef<typeof AvatarPrimitive.Root>;
|
|
10
|
+
export type AvatarImageElement = ElementRef<typeof AvatarPrimitive.Image>;
|
|
11
|
+
export type AvatarFallbackElement = ElementRef<typeof AvatarPrimitive.Fallback>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const badgeVariants: (props?: ({
|
|
2
|
+
variant?: "warning" | "info" | "error" | "neutral" | "primary" | "secondary" | "success" | null | undefined;
|
|
3
|
+
size?: "sm" | "md" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
6
|
+
readonly variant?: import("./Badge.types").BadgeVariant;
|
|
7
|
+
readonly size?: import("./Badge.types").BadgeSize;
|
|
8
|
+
readonly loading?: boolean;
|
|
9
|
+
readonly children: import("react").ReactNode;
|
|
10
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type BadgeVariant = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
3
|
+
export type BadgeSize = 'sm' | 'md';
|
|
4
|
+
export type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
+
readonly variant?: BadgeVariant;
|
|
6
|
+
readonly size?: BadgeSize;
|
|
7
|
+
readonly loading?: boolean;
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BreadcrumbEllipsisProps, BreadcrumbSeparatorProps } from './Breadcrumb.types';
|
|
2
|
+
export declare const Breadcrumb: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
3
|
+
export declare const BreadcrumbList: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
4
|
+
export declare const BreadcrumbItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
5
|
+
export declare const BreadcrumbLink: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
6
|
+
readonly asChild?: boolean;
|
|
7
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
8
|
+
export declare const BreadcrumbPage: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
export declare const BreadcrumbSeparator: {
|
|
10
|
+
({ children, className, ...props }: BreadcrumbSeparatorProps): import("react").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const BreadcrumbEllipsis: {
|
|
14
|
+
({ className, ...props }: BreadcrumbEllipsisProps): import("react").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type BreadcrumbProps = ComponentPropsWithoutRef<'nav'>;
|
|
3
|
+
export type BreadcrumbListProps = ComponentPropsWithoutRef<'ol'>;
|
|
4
|
+
export type BreadcrumbItemProps = ComponentPropsWithoutRef<'li'>;
|
|
5
|
+
export type BreadcrumbLinkProps = ComponentPropsWithoutRef<'a'> & {
|
|
6
|
+
readonly asChild?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type BreadcrumbPageProps = ComponentPropsWithoutRef<'span'>;
|
|
9
|
+
export type BreadcrumbSeparatorProps = ComponentPropsWithoutRef<'li'>;
|
|
10
|
+
export type BreadcrumbEllipsisProps = ComponentPropsWithoutRef<'span'>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from './Breadcrumb';
|
|
2
|
+
export type { BreadcrumbEllipsisProps, BreadcrumbItemProps, BreadcrumbLinkProps, BreadcrumbListProps, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparatorProps, } from './Breadcrumb.types';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const buttonVariants: (props?: ({
|
|
2
|
+
variant?: "destructive" | "primary" | "secondary" | "success" | "outline" | "ghost" | null | undefined;
|
|
3
|
+
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
4
|
+
fullWidth?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export declare const Button: import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
+
readonly variant?: import("./Button.types").ButtonVariant;
|
|
8
|
+
readonly size?: import("./Button.types").ButtonSize;
|
|
9
|
+
readonly loading?: boolean;
|
|
10
|
+
readonly fullWidth?: boolean;
|
|
11
|
+
readonly leftIcon?: import("react").ReactNode;
|
|
12
|
+
readonly rightIcon?: import("react").ReactNode;
|
|
13
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'success';
|
|
3
|
+
export type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
|
|
4
|
+
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
|
+
readonly variant?: ButtonVariant;
|
|
6
|
+
readonly size?: ButtonSize;
|
|
7
|
+
readonly loading?: boolean;
|
|
8
|
+
readonly fullWidth?: boolean;
|
|
9
|
+
readonly leftIcon?: ReactNode;
|
|
10
|
+
readonly rightIcon?: ReactNode;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CardDescriptionProps, CardSectionProps, CardTitleProps } from './Card.types';
|
|
2
|
+
export declare const cardVariants: (props?: ({
|
|
3
|
+
variant?: "elevated" | "outlined" | "filled" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const Card: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
readonly variant?: import("./Card.types").CardVariant;
|
|
7
|
+
readonly loading?: boolean;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const CardHeader: import("react").ForwardRefExoticComponent<CardSectionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const CardTitle: import("react").ForwardRefExoticComponent<CardTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
11
|
+
export declare const CardDescription: import("react").ForwardRefExoticComponent<CardDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
export declare const CardContent: import("react").ForwardRefExoticComponent<CardSectionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export declare const CardFooter: import("react").ForwardRefExoticComponent<CardSectionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type CardVariant = 'elevated' | 'outlined' | 'filled';
|
|
3
|
+
export type CardProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
readonly variant?: CardVariant;
|
|
5
|
+
readonly loading?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type CardSectionProps = HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
export type CardTitleProps = HTMLAttributes<HTMLHeadingElement>;
|
|
9
|
+
export type CardDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
+
export declare const checkboxVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
variant?: "error" | "default" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
7
|
+
readonly size?: import("./Checkbox.types").CheckboxSize;
|
|
8
|
+
readonly variant?: import("./Checkbox.types").CheckboxVariant;
|
|
9
|
+
readonly loading?: boolean;
|
|
10
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ElementRef } from 'react';
|
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
+
export type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type CheckboxVariant = 'default' | 'error';
|
|
5
|
+
export type CheckboxProps = ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {
|
|
6
|
+
readonly size?: CheckboxSize;
|
|
7
|
+
readonly variant?: CheckboxVariant;
|
|
8
|
+
readonly loading?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type CheckboxElement = ElementRef<typeof CheckboxPrimitive.Root>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Combobox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & {
|
|
2
|
+
readonly value?: string;
|
|
3
|
+
readonly onValueChange?: (value: string) => void;
|
|
4
|
+
readonly options: import("./Combobox.types").ComboboxOption[];
|
|
5
|
+
readonly placeholder?: string;
|
|
6
|
+
readonly searchPlaceholder?: string;
|
|
7
|
+
readonly emptyMessage?: string;
|
|
8
|
+
readonly disabled?: boolean;
|
|
9
|
+
readonly error?: boolean;
|
|
10
|
+
readonly size?: "sm" | "md" | "lg";
|
|
11
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type ComboboxOption = {
|
|
3
|
+
readonly value: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type ComboboxProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
|
|
8
|
+
readonly value?: string;
|
|
9
|
+
readonly onValueChange?: (value: string) => void;
|
|
10
|
+
readonly options: ComboboxOption[];
|
|
11
|
+
readonly placeholder?: string;
|
|
12
|
+
readonly searchPlaceholder?: string;
|
|
13
|
+
readonly emptyMessage?: string;
|
|
14
|
+
readonly disabled?: boolean;
|
|
15
|
+
readonly error?: boolean;
|
|
16
|
+
readonly size?: 'sm' | 'md' | 'lg';
|
|
17
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CommandPaletteProps } from './CommandPalette.types';
|
|
2
|
+
export declare function CommandPalette({ open, onOpenChange, groups, placeholder, emptyMessage, loading, }: CommandPaletteProps): import("react").JSX.Element;
|
|
3
|
+
export declare namespace CommandPalette {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type CommandItem = {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly icon?: React.ReactNode;
|
|
5
|
+
readonly keywords?: string[];
|
|
6
|
+
readonly onSelect?: () => void;
|
|
7
|
+
readonly href?: string;
|
|
8
|
+
};
|
|
9
|
+
export type CommandGroup = {
|
|
10
|
+
readonly heading: string;
|
|
11
|
+
readonly items: CommandItem[];
|
|
12
|
+
};
|
|
13
|
+
export type CommandPaletteProps = {
|
|
14
|
+
readonly open: boolean;
|
|
15
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
16
|
+
readonly groups: CommandGroup[];
|
|
17
|
+
readonly placeholder?: string;
|
|
18
|
+
readonly emptyMessage?: string;
|
|
19
|
+
readonly loading?: boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type MenuItemType = 'item' | 'separator' | 'label' | 'submenu';
|
|
2
|
+
export type MenuItem = {
|
|
3
|
+
readonly type: MenuItemType;
|
|
4
|
+
readonly label?: string;
|
|
5
|
+
readonly icon?: React.ReactNode;
|
|
6
|
+
readonly shortcut?: string;
|
|
7
|
+
readonly disabled?: boolean;
|
|
8
|
+
readonly variant?: 'default' | 'destructive';
|
|
9
|
+
readonly onSelect?: () => void;
|
|
10
|
+
readonly items?: MenuItem[];
|
|
11
|
+
};
|
|
12
|
+
export type ContextMenuProps = {
|
|
13
|
+
readonly children: React.ReactNode;
|
|
14
|
+
readonly items: MenuItem[];
|
|
15
|
+
readonly onOpenChange?: (open: boolean) => void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const DatePicker: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & {
|
|
2
|
+
readonly value?: Date;
|
|
3
|
+
readonly onChange?: (date: Date | undefined) => void;
|
|
4
|
+
readonly placeholder?: string;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly error?: boolean;
|
|
7
|
+
readonly size?: "sm" | "md" | "lg";
|
|
8
|
+
readonly startMonth?: Date;
|
|
9
|
+
readonly endMonth?: Date;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type DatePickerProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
|
|
3
|
+
readonly value?: Date;
|
|
4
|
+
readonly onChange?: (date: Date | undefined) => void;
|
|
5
|
+
readonly placeholder?: string;
|
|
6
|
+
readonly disabled?: boolean;
|
|
7
|
+
readonly error?: boolean;
|
|
8
|
+
readonly size?: 'sm' | 'md' | 'lg';
|
|
9
|
+
readonly startMonth?: Date;
|
|
10
|
+
readonly endMonth?: Date;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DateRangePicker: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & {
|
|
2
|
+
readonly value?: import("react-day-picker").DateRange;
|
|
3
|
+
readonly onChange?: (range: import("react-day-picker").DateRange | undefined) => void;
|
|
4
|
+
readonly placeholder?: string;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly error?: boolean;
|
|
7
|
+
readonly size?: "sm" | "md" | "lg";
|
|
8
|
+
readonly startMonth?: Date;
|
|
9
|
+
readonly endMonth?: Date;
|
|
10
|
+
readonly numberOfMonths?: number;
|
|
11
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { DateRange } from 'react-day-picker';
|
|
3
|
+
export type { DateRange };
|
|
4
|
+
export type DateRangePickerProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> & {
|
|
5
|
+
readonly value?: DateRange;
|
|
6
|
+
readonly onChange?: (range: DateRange | undefined) => void;
|
|
7
|
+
readonly placeholder?: string;
|
|
8
|
+
readonly disabled?: boolean;
|
|
9
|
+
readonly error?: boolean;
|
|
10
|
+
readonly size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
readonly startMonth?: Date;
|
|
12
|
+
readonly endMonth?: Date;
|
|
13
|
+
readonly numberOfMonths?: number;
|
|
14
|
+
};
|