rudiment-ui 0.4.0 → 0.6.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 +59 -21
- package/dist/components/Alert/Alert.d.ts +28 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/AppShell/AppShell.d.ts +52 -6
- package/dist/components/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +21 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +23 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Brand/Brand.d.ts +17 -2
- package/dist/components/Brand/Brand.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +24 -2
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +31 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +34 -0
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Charts/BarChart/BarChart.d.ts +39 -4
- package/dist/components/Charts/BarChart/BarChart.d.ts.map +1 -1
- package/dist/components/Charts/DonutChart/DonutChart.d.ts +31 -0
- package/dist/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
- package/dist/components/Charts/LineChart/LineChart.d.ts +52 -6
- package/dist/components/Charts/LineChart/LineChart.d.ts.map +1 -1
- package/dist/components/Charts/Sparkline/Sparkline.d.ts +35 -0
- package/dist/components/Charts/Sparkline/Sparkline.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +26 -3
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/CheckboxGroup.d.ts +20 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/CircularProgress/CircularProgress.d.ts +33 -0
- package/dist/components/CircularProgress/CircularProgress.d.ts.map +1 -1
- package/dist/components/ComboBox/ComboBox.d.ts +29 -4
- package/dist/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +30 -2
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DateRangePicker.d.ts +26 -1
- package/dist/components/DatePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/dateUtils.d.ts +1 -0
- package/dist/components/DatePicker/dateUtils.d.ts.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.d.ts +44 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +39 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Divider/Divider.d.ts +18 -5
- package/dist/components/Divider/Divider.d.ts.map +1 -1
- package/dist/components/Dot/Dot.d.ts +22 -8
- package/dist/components/Dot/Dot.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +23 -2
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/Form/Form.d.ts +20 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts +17 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +24 -0
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Image/Image.d.ts +31 -6
- package/dist/components/Image/Image.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +32 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Kanban/KanbanBoard.d.ts +32 -0
- package/dist/components/Kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/Kanban/KanbanCard.d.ts +12 -1
- package/dist/components/Kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/Kanban/KanbanColumn.d.ts +13 -0
- package/dist/components/Kanban/KanbanColumn.d.ts.map +1 -1
- package/dist/components/Kanban/KanbanOverlayContext.d.ts +7 -0
- package/dist/components/Kanban/KanbanOverlayContext.d.ts.map +1 -0
- package/dist/components/Kanban/kanbanMoves.d.ts +18 -0
- package/dist/components/Kanban/kanbanMoves.d.ts.map +1 -0
- package/dist/components/Link/Link.d.ts +24 -3
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Menu/Keyboard.d.ts +9 -0
- package/dist/components/Menu/Keyboard.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts +13 -0
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/MenuItem.d.ts +11 -0
- package/dist/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/components/Menu/MenuSection.d.ts +12 -0
- package/dist/components/Menu/MenuSection.d.ts.map +1 -1
- package/dist/components/Menu/MenuSeparator.d.ts +8 -0
- package/dist/components/Menu/MenuSeparator.d.ts.map +1 -1
- package/dist/components/Menu/MenuTrigger.d.ts +16 -0
- package/dist/components/Menu/MenuTrigger.d.ts.map +1 -1
- package/dist/components/Menu/SubmenuTrigger.d.ts +13 -0
- package/dist/components/Menu/SubmenuTrigger.d.ts.map +1 -1
- package/dist/components/NavItem/NavItem.d.ts +14 -0
- package/dist/components/NavItem/NavItem.d.ts.map +1 -1
- package/dist/components/NumberField/NumberField.d.ts +36 -3
- package/dist/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +18 -1
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts +19 -2
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +36 -2
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/RadioGroup/Radio.d.ts +6 -1
- package/dist/components/RadioGroup/Radio.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +24 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/Rating/Rating.d.ts +26 -6
- package/dist/components/Rating/Rating.d.ts.map +1 -1
- package/dist/components/RouterProvider/RouterProvider.d.ts +1 -0
- package/dist/components/RouterProvider/RouterProvider.d.ts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.ts +14 -1
- package/dist/components/SectionHeader/SectionHeader.d.ts.map +1 -1
- package/dist/components/Select/Option.d.ts +8 -0
- package/dist/components/Select/Option.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +29 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/StatCard/StatCard.d.ts +23 -1
- package/dist/components/StatCard/StatCard.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.d.ts +34 -2
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts +13 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Table/Table.d.ts +31 -3
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/TableBody.d.ts +7 -0
- package/dist/components/Table/TableBody.d.ts.map +1 -1
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.d.ts.map +1 -1
- package/dist/components/Table/TableColumn.d.ts +16 -1
- package/dist/components/Table/TableColumn.d.ts.map +1 -1
- package/dist/components/Table/TableHeader.d.ts +8 -1
- package/dist/components/Table/TableHeader.d.ts.map +1 -1
- package/dist/components/Table/TableRow.d.ts +10 -1
- package/dist/components/Table/TableRow.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.d.ts +8 -0
- package/dist/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/TabList.d.ts +15 -1
- package/dist/components/Tabs/TabList.d.ts.map +1 -1
- package/dist/components/Tabs/TabPanel.d.ts +9 -0
- package/dist/components/Tabs/TabPanel.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +11 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tag/Tag.d.ts +27 -0
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +43 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +17 -3
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/toastQueue.d.ts +20 -1
- package/dist/components/Toast/toastQueue.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +32 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/TopBar/TopBar.d.ts +17 -2
- package/dist/components/TopBar/TopBar.d.ts.map +1 -1
- package/dist/components.json +7919 -0
- package/dist/hooks/useChartTheme.d.ts +10 -0
- package/dist/hooks/useChartTheme.d.ts.map +1 -1
- package/dist/hooks/useLoadingButton.d.ts +10 -0
- package/dist/hooks/useLoadingButton.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1858 -1621
- package/dist/layouts/Box/Box.d.ts +31 -1
- package/dist/layouts/Box/Box.d.ts.map +1 -1
- package/dist/layouts/Center/Center.d.ts +22 -0
- package/dist/layouts/Center/Center.d.ts.map +1 -1
- package/dist/layouts/Cluster/Cluster.d.ts +19 -0
- package/dist/layouts/Cluster/Cluster.d.ts.map +1 -1
- package/dist/layouts/Cover/Cover.d.ts +28 -0
- package/dist/layouts/Cover/Cover.d.ts.map +1 -1
- package/dist/layouts/Grid/Grid.d.ts +18 -0
- package/dist/layouts/Grid/Grid.d.ts.map +1 -1
- package/dist/layouts/Sidebar/Sidebar.d.ts +29 -0
- package/dist/layouts/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/layouts/Stack/Stack.d.ts +21 -2
- package/dist/layouts/Stack/Stack.d.ts.map +1 -1
- package/dist/layouts/Switcher/Switcher.d.ts +19 -0
- package/dist/layouts/Switcher/Switcher.d.ts.map +1 -1
- package/dist/llms-full.txt +2284 -0
- package/dist/llms.txt +162 -0
- package/dist/typography/Heading/Heading.d.ts +12 -0
- package/dist/typography/Heading/Heading.d.ts.map +1 -1
- package/dist/typography/Prose/Prose.d.ts +21 -0
- package/dist/typography/Prose/Prose.d.ts.map +1 -1
- package/dist/typography/Text/Text.d.ts +28 -1
- package/dist/typography/Text/Text.d.ts.map +1 -1
- package/dist/utils/cn.d.ts +7 -0
- package/dist/utils/cn.d.ts.map +1 -1
- package/mcp/README.md +111 -0
- package/mcp/render.mjs +116 -0
- package/mcp/server.mjs +321 -0
- package/package.json +12 -2
package/README.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
> Rudiment is still in beta (not even beta, really) and should not be used in production. I'm happy to accept pull requests that help improve this tool.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
An accessible React 19 component library built on [React Aria](https://react-spectrum.adobe.com/react-aria/), styled with BEM classes and `--rudi-*` design-token custom properties, and documented in [Storybook](https://storybook.js.org/).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Install it as a package, or clone it, swap the tokens, and ship your own design system.
|
|
8
8
|
|
|
9
9
|
## What's included
|
|
10
10
|
|
|
11
11
|
| Category | Components |
|
|
12
12
|
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
13
|
| **UI Components** | Button, Input, Checkbox, CheckboxGroup, Select, Dialog, Switch, RadioGroup, Tooltip, Alert, IconButton, Badge, Tag, Avatar, Card, Icon, NavItem, ProgressBar, StatCard, CircularProgress |
|
|
14
|
-
| **Charts** | BarChart, LineChart, DonutChart
|
|
14
|
+
| **Charts** | BarChart, LineChart, DonutChart, Sparkline |
|
|
15
15
|
| **Kanban** | KanbanBoard, KanbanColumn, KanbanCard |
|
|
16
16
|
| **Typography** | Heading, Text, Prose |
|
|
17
17
|
| **Layout Primitives** | Box, Stack, Cluster, Grid, Sidebar, Center, Cover, Switcher |
|
|
@@ -21,22 +21,6 @@ Also included: a three-tier design token architecture, eight built-in themes (De
|
|
|
21
21
|
|
|
22
22
|
## Quick start
|
|
23
23
|
|
|
24
|
-
### As a template (recommended for your own design system)
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# Clone the template
|
|
28
|
-
git clone https://github.com/Rudiment-UI/rudiment-ui.git my-design-system
|
|
29
|
-
cd my-design-system
|
|
30
|
-
|
|
31
|
-
# Install dependencies
|
|
32
|
-
npm install
|
|
33
|
-
|
|
34
|
-
# Start Storybook (development)
|
|
35
|
-
npm run dev
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Open [http://localhost:6006](http://localhost:6006) to browse components and documentation.
|
|
39
|
-
|
|
40
24
|
### As a dependency
|
|
41
25
|
|
|
42
26
|
```bash
|
|
@@ -57,6 +41,22 @@ This ships the component styles plus all eight themes. It does **not** include T
|
|
|
57
41
|
|
|
58
42
|
Every export is marked `"use client"`, so the package can be imported directly into a Next.js App Router Server Component without a re-export barrel.
|
|
59
43
|
|
|
44
|
+
### As a template (to build your own design system)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Clone the template
|
|
48
|
+
git clone https://github.com/Rudiment-UI/rudiment-ui.git my-design-system
|
|
49
|
+
cd my-design-system
|
|
50
|
+
|
|
51
|
+
# Install dependencies
|
|
52
|
+
npm install
|
|
53
|
+
|
|
54
|
+
# Start Storybook (development)
|
|
55
|
+
npm run dev
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Open [http://localhost:6006](http://localhost:6006) to browse components and documentation.
|
|
59
|
+
|
|
60
60
|
---
|
|
61
61
|
|
|
62
62
|
# Using Rudiment UI in your app
|
|
@@ -70,6 +70,41 @@ import 'rudiment-ui/styles'
|
|
|
70
70
|
|
|
71
71
|
That single import is the whole setup. There is no provider to mount — `RudiDialog` portals itself, and `useChartTheme` reads tokens straight off `document.documentElement`.
|
|
72
72
|
|
|
73
|
+
## API reference for AI agents and tooling
|
|
74
|
+
|
|
75
|
+
The package ships a reference generated from the TypeScript source, so it always matches the version you installed:
|
|
76
|
+
|
|
77
|
+
| File | Contents |
|
|
78
|
+
| ---- | -------- |
|
|
79
|
+
| `node_modules/rudiment-ui/dist/llms.txt` | Read this first: conventions, setup, themes and a one-line index of every component (about 10 KB) |
|
|
80
|
+
| `node_modules/rudiment-ui/dist/llms-full.txt` | Every component's props, defaults, examples, compound parts, inherited React Aria props and `ref` target, in Markdown |
|
|
81
|
+
| `node_modules/rudiment-ui/dist/components.json` | The same data as JSON, including types and descriptions for inherited props |
|
|
82
|
+
| `node_modules/rudiment-ui/dist/**/*.d.ts` | Type declarations with JSDoc on every component and prop, so editor hovers show the same descriptions |
|
|
83
|
+
|
|
84
|
+
They are also exported as `rudiment-ui/llms.txt`, `rudiment-ui/llms-full.txt` and `rudiment-ui/components.json`. To point a coding agent at the library, add this to your project's `CLAUDE.md`, `AGENTS.md` or rules file:
|
|
85
|
+
|
|
86
|
+
```md
|
|
87
|
+
UI components come from `rudiment-ui`. Before using one, read
|
|
88
|
+
`node_modules/rudiment-ui/dist/llms.txt` for the conventions, then look the component
|
|
89
|
+
up in `llms-full.txt` (search for `### RudiName`) for its props.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### MCP server
|
|
93
|
+
|
|
94
|
+
The package also ships an [MCP](https://modelcontextprotocol.io) server, so agents can query the API instead of reading files. It runs locally from your `node_modules` and needs no network or extra install. It has four tools: `get_conventions`, `list_components`, `get_component` and `search`.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Claude Code, from your project root (add --scope project to share it via .mcp.json)
|
|
98
|
+
claude mcp add rudiment-ui -- npx --no rudiment-ui-mcp
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
```jsonc
|
|
102
|
+
// .mcp.json / .cursor/mcp.json
|
|
103
|
+
{ "mcpServers": { "rudiment-ui": { "command": "npx", "args": ["--no", "rudiment-ui-mcp"] } } }
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
See [`mcp/README.md`](mcp/README.md) for VS Code, Codex and Claude Desktop setup, the tool reference and troubleshooting.
|
|
107
|
+
|
|
73
108
|
## Themes
|
|
74
109
|
|
|
75
110
|
Eight themes ship in the stylesheet. Set `data-theme` on a root element to switch:
|
|
@@ -191,6 +226,8 @@ function LoginForm() {
|
|
|
191
226
|
|
|
192
227
|
### Component reference
|
|
193
228
|
|
|
229
|
+
The tables below summarise the most-used props. The complete reference, generated from the source, is [`dist/llms-full.txt`](#api-reference-for-ai-agents-and-tooling). It also covers components not listed here: `RudiTextarea`, `RudiLink`, `RudiImage`, `RudiDivider`, `RudiDot`, `RudiRating`, `RudiStepper`, `RudiBreadcrumb`, `RudiPagination`, `RudiDescriptionList`, `RudiSparkline` and the Menu, Tabs and Table parts.
|
|
230
|
+
|
|
194
231
|
**Actions**
|
|
195
232
|
|
|
196
233
|
| Component | Props |
|
|
@@ -435,7 +472,8 @@ If you cloned the template rather than installing the package:
|
|
|
435
472
|
| Command | Description |
|
|
436
473
|
| ------------------------- | -------------------------------------------- |
|
|
437
474
|
| `npm run dev` | Start Storybook dev server on port 6006 |
|
|
438
|
-
| `npm run build` | Build the
|
|
475
|
+
| `npm run build` | Build the library and generate the agent reference (`dist/llms*.txt`, `dist/components.json`) |
|
|
476
|
+
| `npm run build:docs` | Regenerate only the agent reference |
|
|
439
477
|
| `npm run build-storybook` | Build a static Storybook site |
|
|
440
478
|
| `npm run build:tokens` | Generate CSS from design token JSON files |
|
|
441
479
|
| `npm run test` | Run the test suite |
|
|
@@ -465,7 +503,7 @@ tokens/
|
|
|
465
503
|
## Architecture
|
|
466
504
|
|
|
467
505
|
- **React Aria** handles accessibility (ARIA attributes, keyboard navigation, focus management)
|
|
468
|
-
- **
|
|
506
|
+
- **BEM classes + CSS custom properties** style every component; each component imports its own stylesheet, and the published CSS contains no Tailwind and no reset (Tailwind is used only inside Storybook)
|
|
469
507
|
- **Style Dictionary 4** transforms design tokens into CSS custom properties
|
|
470
508
|
- **Storybook 10** provides the documentation and development environment
|
|
471
509
|
- **Vitest** with vitest-axe runs automated accessibility checks on every component
|
|
@@ -1,12 +1,39 @@
|
|
|
1
|
+
/** Props for `RudiAlert`. */
|
|
1
2
|
export interface RudiAlertProps {
|
|
3
|
+
/** Sets the semantic color and meaning of the alert. */
|
|
2
4
|
variant: 'info' | 'success' | 'warning' | 'error';
|
|
5
|
+
/** Bold heading shown above the content. */
|
|
3
6
|
title?: string;
|
|
7
|
+
/** Iconify icon name shown at the inline-start, e.g. `"mdi:alert"`. Decorative and hidden from assistive technology. */
|
|
4
8
|
icon?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Uses `role="status"` (polite announcement) instead of `role="alert"` (assertive).
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
5
13
|
isPolite?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Shows a close button labelled "Dismiss alert". The alert hides itself when it is pressed.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
6
18
|
dismissible?: boolean;
|
|
19
|
+
/** Called after the user dismisses the alert. */
|
|
7
20
|
onDismiss?: () => void;
|
|
21
|
+
/** Content at the inline-end of the alert, e.g. a button. Wraps below the text when space is tight. */
|
|
22
|
+
action?: React.ReactNode;
|
|
23
|
+
/** Message body. */
|
|
8
24
|
children: React.ReactNode;
|
|
25
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
9
26
|
className?: string;
|
|
10
27
|
}
|
|
11
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Inline message banner for status, feedback, or warnings that sit within the page content. Use `RudiTag` or `RudiBadge` for short labels, and a dialog for messages that must interrupt the user.
|
|
30
|
+
* Renders `role="alert"` by default, which announces assertively; set `isPolite` for non-urgent updates. Dismissal is internal: once dismissed the alert unmounts and stays hidden until the component remounts.
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <RudiAlert variant="warning" title="Storage almost full" dismissible>
|
|
34
|
+
* You have used 92% of your quota.
|
|
35
|
+
* </RudiAlert>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function RudiAlert({ variant, title, icon, isPolite, dismissible, onDismiss, action, children, className, }: RudiAlertProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
39
|
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAA;AAEpB,6BAA6B;AAC7B,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;IACjD,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wHAAwH;IACxH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,uGAAuG;IACvG,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,IAAI,EACJ,QAAgB,EAChB,WAAmB,EACnB,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,kDAoDhB"}
|
|
@@ -1,47 +1,93 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface RudiAppShellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/** Controlled open state of the responsive sidebar drawer. */
|
|
3
|
+
/** Controlled open state of the responsive sidebar drawer, which is only visible below the 900px breakpoint. Pair with `onSidebarOpenChange`. */
|
|
4
4
|
isSidebarOpen?: boolean;
|
|
5
5
|
/** Called when the drawer requests an open-state change. */
|
|
6
6
|
onSidebarOpenChange?: (open: boolean) => void;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Initial open state when uncontrolled.
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
8
12
|
defaultSidebarOpen?: boolean;
|
|
13
|
+
/** `RudiAppShell.Sidebar` and `RudiAppShell.Content`, plus any other layout children. */
|
|
9
14
|
children: React.ReactNode;
|
|
15
|
+
/** Extra class names, merged with the built-in classes. */
|
|
10
16
|
className?: string;
|
|
11
17
|
}
|
|
12
18
|
export interface RudiAppShellSidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
13
|
-
/** Overrides the sidebar width
|
|
19
|
+
/** Overrides the sidebar width; any CSS length. Falls back to the `--rudi-component-app-shell-sidebar-width` token. */
|
|
14
20
|
width?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible name of the `aside` landmark; give it a specific name when the page has other complementary landmarks.
|
|
23
|
+
*
|
|
24
|
+
* @default 'Sidebar'
|
|
25
|
+
*/
|
|
15
26
|
'aria-label'?: string;
|
|
27
|
+
/** Navigation and other sidebar content, such as `RudiNavItem` entries. */
|
|
16
28
|
children: React.ReactNode;
|
|
29
|
+
/** Extra class names, merged with the built-in classes. */
|
|
17
30
|
className?: string;
|
|
18
31
|
}
|
|
19
32
|
export interface RudiAppShellContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
/** The top bar and `RudiAppShell.Main`. */
|
|
20
34
|
children: React.ReactNode;
|
|
35
|
+
/** Extra class names, merged with the built-in classes. */
|
|
21
36
|
className?: string;
|
|
22
37
|
}
|
|
23
38
|
export interface RudiAppShellMainProps extends React.HTMLAttributes<HTMLElement> {
|
|
24
|
-
/** Max width of the centered content column
|
|
39
|
+
/** Max width of the centered content column; any CSS length. Falls back to the `--rudi-component-app-shell-main-max-width` token. */
|
|
25
40
|
maxWidth?: string;
|
|
26
|
-
/** Padding around the content column
|
|
41
|
+
/** Padding around the content column; any CSS length. Falls back to the `--rudi-component-app-shell-main-padding` token. */
|
|
27
42
|
padding?: string;
|
|
43
|
+
/** Page content; it is wrapped in an inner column limited by `maxWidth`. */
|
|
28
44
|
children: React.ReactNode;
|
|
45
|
+
/** Extra class names, merged with the built-in classes. */
|
|
29
46
|
className?: string;
|
|
30
47
|
}
|
|
48
|
+
/** Props for `RudiAppShell.MenuButton`. The button takes no other DOM props. */
|
|
31
49
|
export interface RudiAppShellMenuButtonProps {
|
|
50
|
+
/**
|
|
51
|
+
* Accessible name of the button.
|
|
52
|
+
*
|
|
53
|
+
* @default 'Open navigation'
|
|
54
|
+
*/
|
|
32
55
|
'aria-label'?: string;
|
|
33
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Iconify icon name for the hamburger.
|
|
58
|
+
*
|
|
59
|
+
* @default 'lucide:menu'
|
|
60
|
+
*/
|
|
34
61
|
icon?: string;
|
|
62
|
+
/** Extra class names for the wrapper element, merged with the built-in classes. */
|
|
35
63
|
className?: string;
|
|
36
64
|
}
|
|
37
65
|
declare function AppShellSidebar({ width, className, style, children, 'aria-label': ariaLabel, ...props }: RudiAppShellSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
38
66
|
declare function AppShellContent({ className, children, ...props }: RudiAppShellContentProps): import("react/jsx-runtime").JSX.Element;
|
|
39
67
|
declare function AppShellMain({ maxWidth, padding, className, style, children, ...props }: RudiAppShellMainProps): import("react/jsx-runtime").JSX.Element;
|
|
40
68
|
declare function AppShellMenuButton({ 'aria-label': ariaLabel, icon, className, }: RudiAppShellMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* Application frame with a sidebar and a content area; below 900px the sidebar becomes a drawer that Escape and the backdrop close. Compose it from `RudiAppShell.Sidebar` and `RudiAppShell.Content` (put `RudiTopBar` and `RudiAppShell.Main` inside Content). Use `RudiSidebar` for a simple two-panel layout inside a page instead. The parts throw if rendered outside it. Open state is uncontrolled unless `isSidebarOpen` is set. Other DOM props go on the root `div`.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* <RudiAppShell>
|
|
74
|
+
* <RudiAppShell.Sidebar aria-label="Main">
|
|
75
|
+
* <RudiNavItem label="Home" icon="mdi:home" href="/" />
|
|
76
|
+
* </RudiAppShell.Sidebar>
|
|
77
|
+
* <RudiAppShell.Content>
|
|
78
|
+
* <RudiTopBar start={<RudiAppShell.MenuButton />} />
|
|
79
|
+
* <RudiAppShell.Main>Page</RudiAppShell.Main>
|
|
80
|
+
* </RudiAppShell.Content>
|
|
81
|
+
* </RudiAppShell>
|
|
82
|
+
*/
|
|
41
83
|
export declare const RudiAppShell: React.ForwardRefExoticComponent<RudiAppShellProps & React.RefAttributes<HTMLDivElement>> & {
|
|
84
|
+
/** Navigation drawer (an `aside`) shown inline on wide screens and as a slide-over below 900px; renders its own backdrop. */
|
|
42
85
|
Sidebar: typeof AppShellSidebar;
|
|
86
|
+
/** Column beside the sidebar that holds the top bar and the main area. */
|
|
43
87
|
Content: typeof AppShellContent;
|
|
88
|
+
/** The page's `main` landmark; centers its children in a padded column with a max width. */
|
|
44
89
|
Main: typeof AppShellMain;
|
|
90
|
+
/** Hamburger button that toggles the sidebar drawer; place it in the top bar's `start` slot. Escape returns focus to it. */
|
|
45
91
|
MenuButton: typeof AppShellMenuButton;
|
|
46
92
|
};
|
|
47
93
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAA;AAIxG,OAAO,iBAAiB,CAAA;AAsBxB,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAA;AAIxG,OAAO,iBAAiB,CAAA;AAsBxB,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,iJAAiJ;IACjJ,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7C;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,yFAAyF;IACzF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,wBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzC,uHAAuH;IACvH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2EAA2E;IAC3E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,wBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,2CAA2C;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzC,qIAAqI;IACrI,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4HAA4H;IAC5H,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4EAA4E;IAC5E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,gFAAgF;AAChF,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAiED,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,YAAY,EAAE,SAAqB,EACnC,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAyB1B;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAM1B;AAED,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAcvB;AAED,iBAAS,kBAAkB,CAAC,EAC1B,YAAY,EAAE,SAA6B,EAC3C,IAAoB,EACpB,SAAS,GACV,EAAE,2BAA2B,2CAe7B;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY;IACvB,6HAA6H;;IAE7H,0EAA0E;;IAE1E,4FAA4F;;IAE5F,4HAA4H;;CAE5H,CAAA"}
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
+
/** Props for `RudiAvatar`. */
|
|
1
2
|
export interface RudiAvatarProps {
|
|
3
|
+
/** Image URL. When it is missing or fails to load, initials are shown instead. */
|
|
2
4
|
src?: string;
|
|
5
|
+
/** Accessible name of the avatar. Takes precedence over `name` for the label. */
|
|
3
6
|
alt?: string;
|
|
7
|
+
/** Full name used for the initials (first and last word, uppercased) and as the fallback accessible name. */
|
|
4
8
|
name?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Diameter of the avatar.
|
|
11
|
+
* @default 'md'
|
|
12
|
+
*/
|
|
5
13
|
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
/** Shows a small status dot in the corner. Without `statusLabel` the dot carries no text, so convey the status elsewhere for assistive technology. */
|
|
6
15
|
status?: 'success' | 'warning' | 'error' | 'info';
|
|
16
|
+
/** Text for the status, appended to the accessible name ("Ada Lovelace, Busy"). Only used when `status` is set. */
|
|
17
|
+
statusLabel?: string;
|
|
18
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
7
19
|
className?: string;
|
|
8
20
|
}
|
|
9
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Circular representation of a person or entity: an image when `src` loads, otherwise initials derived from `name`. Falls back to initials if the image fails to load.
|
|
23
|
+
* Exposed as `role="img"` labelled by `alt`, then `name`. With neither, the avatar is decorative (`aria-hidden`, no role).
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <RudiAvatar name="Ada Lovelace" src="/ada.jpg" size="lg" status="success" />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function RudiAvatar({ src, alt, name, size, status, statusLabel, className, }: RudiAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
10
30
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,cAAc,CAAA;AAErB,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAUD,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,IAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,cAAc,CAAA;AAErB,8BAA8B;AAC9B,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,6GAA6G;IAC7G,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,sJAAsJ;IACtJ,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IACjD,mHAAmH;IACnH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAUD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,IAAW,EACX,MAAM,EACN,WAAW,EACX,SAAS,GACV,EAAE,eAAe,2CAsCjB"}
|
|
@@ -1,9 +1,32 @@
|
|
|
1
|
+
/** Props for `RudiBadge`. */
|
|
1
2
|
export interface RudiBadgeProps {
|
|
3
|
+
/**
|
|
4
|
+
* Semantic color of the badge.
|
|
5
|
+
* @default 'default'
|
|
6
|
+
*/
|
|
2
7
|
variant?: 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
8
|
+
/**
|
|
9
|
+
* Controls the badge's size.
|
|
10
|
+
* @default 'md'
|
|
11
|
+
*/
|
|
3
12
|
size?: 'sm' | 'md';
|
|
13
|
+
/**
|
|
14
|
+
* Renders a bare colored dot. `children` are kept as screen-reader-only text; with no children the dot is decorative.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
4
17
|
dot?: boolean;
|
|
18
|
+
/** Badge content, such as a status word or count. With `dot` set it is visually hidden but still announced. */
|
|
5
19
|
children?: React.ReactNode;
|
|
20
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
6
21
|
className?: string;
|
|
7
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Small non-interactive label for status or counts. Use `RudiTag` when the label can be pressed or dismissed, and `RudiDot` for a bare indicator.
|
|
25
|
+
* With `dot` set the badge renders as a dot and `children` become screen-reader-only text.
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <RudiBadge variant="success">Active</RudiBadge>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
8
31
|
export declare function RudiBadge({ variant, size, dot, children, className, }: RudiBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
32
|
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAA;AAEpB,6BAA6B;AAC7B,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC9D;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,+GAA+G;IAC/G,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EACxB,OAAmB,EACnB,IAAW,EACX,GAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,2CAehB"}
|
|
@@ -4,13 +4,28 @@ export interface RudiBrandProps {
|
|
|
4
4
|
name: string;
|
|
5
5
|
/** Logo mark (an icon, `<svg>` or `<img>`). Decorative: hidden from assistive tech. */
|
|
6
6
|
mark?: React.ReactNode;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Hide the visible name when the mark already includes the wordmark.
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
8
12
|
hideName?: boolean;
|
|
9
13
|
/** Makes the lockup a link (usually home). Routes client-side under `RudiRouterProvider`. */
|
|
10
14
|
href?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Size of the mark and name.
|
|
17
|
+
*
|
|
18
|
+
* @default 'md'
|
|
19
|
+
*/
|
|
11
20
|
size?: 'sm' | 'md' | 'lg';
|
|
21
|
+
/** Extra class names, merged with the built-in classes. */
|
|
12
22
|
className?: string;
|
|
13
23
|
}
|
|
14
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Logo lockup: a mark plus the product name, optionally linking home. Use it in `RudiTopBar` or the sidebar header. `name` is the accessible name even when `hideName` is set. It does not spread DOM props.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <RudiBrand name="Acme" mark={<AcmeLogo />} href="/" />
|
|
29
|
+
*/
|
|
15
30
|
export declare function RudiBrand({ name, mark, hideName, href, size, className }: RudiBrandProps): import("react/jsx-runtime").JSX.Element;
|
|
16
31
|
//# sourceMappingURL=Brand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Brand.d.ts","sourceRoot":"","sources":["../../../src/components/Brand/Brand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAGrC,OAAO,aAAa,CAAA;AAEpB,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,uFAAuF;IACvF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB
|
|
1
|
+
{"version":3,"file":"Brand.d.ts","sourceRoot":"","sources":["../../../src/components/Brand/Brand.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAGrC,OAAO,aAAa,CAAA;AAEpB,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAA;IACZ,uFAAuF;IACvF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAyBD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAgB,EAAE,IAAI,EAAE,IAAW,EAAE,SAAS,EAAE,EAAE,cAAc,2CAUvG"}
|
|
@@ -1,14 +1,36 @@
|
|
|
1
|
+
/** One entry in a `RudiBreadcrumb` trail. */
|
|
1
2
|
export interface RudiBreadcrumbItem {
|
|
3
|
+
/** Text shown for the crumb. */
|
|
2
4
|
label: string;
|
|
5
|
+
/** Link target. Without it the crumb renders as plain text. */
|
|
3
6
|
href?: string;
|
|
4
7
|
}
|
|
8
|
+
/** Props for `RudiBreadcrumb`. */
|
|
5
9
|
export interface RudiBreadcrumbProps {
|
|
10
|
+
/** Trail entries in order, from root to current page. */
|
|
6
11
|
items: RudiBreadcrumbItem[];
|
|
7
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Iconify name for the separator between items.
|
|
14
|
+
* @default 'lucide:chevron-right'
|
|
15
|
+
*/
|
|
8
16
|
separator?: string;
|
|
9
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Accessible label for the nav landmark.
|
|
19
|
+
* @default 'Breadcrumb'
|
|
20
|
+
*/
|
|
10
21
|
label?: string;
|
|
22
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
11
23
|
className?: string;
|
|
12
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Navigation trail showing where the current page sits in a hierarchy. Items are ordered root first; the last item is always rendered as the current page (`aria-current="page"`) and is not a link, even if it has an `href`.
|
|
27
|
+
* Links route client-side when a `RudiRouterProvider` is mounted.
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <RudiBreadcrumb
|
|
31
|
+
* items={[{ label: 'Home', href: '/' }, { label: 'Orders', href: '/orders' }, { label: 'Order 1042' }]}
|
|
32
|
+
* />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
13
35
|
export declare function RudiBreadcrumb({ items, separator, label, className, }: RudiBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
14
36
|
//# sourceMappingURL=Breadcrumb.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAIA,OAAO,kBAAkB,CAAA;AAEzB,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B
|
|
1
|
+
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAIA,OAAO,kBAAkB,CAAA;AAEzB,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,KAAK,EAAE,kBAAkB,EAAE,CAAA;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAaD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,SAAkC,EAClC,KAAoB,EACpB,SAAS,GACV,EAAE,mBAAmB,2CA+BrB"}
|
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AriaButtonProps } from 'react-aria';
|
|
3
|
+
/** Props for `RudiButton`. Also accepts React Aria's `AriaButtonProps` (`onPress`, `isDisabled`, `type`, `aria-label`, ...). */
|
|
3
4
|
export interface RudiButtonProps extends AriaButtonProps {
|
|
5
|
+
/**
|
|
6
|
+
* Visual emphasis: `primary` for the main action, `destructive` for irreversible actions, `ghost` for low-emphasis ones.
|
|
7
|
+
* @default 'primary'
|
|
8
|
+
*/
|
|
4
9
|
variant?: 'primary' | 'secondary' | 'destructive' | 'ghost';
|
|
10
|
+
/**
|
|
11
|
+
* Button height and text size.
|
|
12
|
+
* @default 'md'
|
|
13
|
+
*/
|
|
5
14
|
size?: 'sm' | 'md' | 'lg';
|
|
15
|
+
/**
|
|
16
|
+
* Replaces the icons with a spinner, sets `aria-busy`, and disables the button so it cannot be pressed again.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
6
19
|
isLoading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Iconify name shown before the label, e.g. `"mdi:plus"`. Not rendered while `isLoading`.
|
|
22
|
+
*/
|
|
7
23
|
iconBefore?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Iconify name shown after the label, e.g. `"mdi:arrow-right"`. Not rendered while `isLoading`.
|
|
26
|
+
*/
|
|
8
27
|
iconAfter?: string;
|
|
28
|
+
/** Extra class names, merged with the component's own classes. */
|
|
9
29
|
className?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Button label, rendered in a `span`. It is the accessible name unless `aria-label` is set.
|
|
32
|
+
*/
|
|
10
33
|
children: React.ReactNode;
|
|
11
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A text button built on React Aria's `useButton`. Use it for actions on the page (save, delete, open a dialog); use a link for navigation. Handle activation with `onPress`, not `onClick`. For an icon-only button use `RudiIconButton`.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* <RudiButton variant="primary" iconBefore="mdi:plus" onPress={addItem}>
|
|
40
|
+
* Add item
|
|
41
|
+
* </RudiButton>
|
|
42
|
+
*/
|
|
12
43
|
export declare const RudiButton: React.ForwardRefExoticComponent<RudiButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
44
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAIjD,OAAO,cAAc,CAAA;AAErB,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,OAAO,CAAA;IAC3D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,eAAO,MAAM,UAAU,2FA4CtB,CAAA"}
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAIjD,OAAO,cAAc,CAAA;AAErB,gIAAgI;AAChI,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,OAAO,CAAA;IAC3D;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,2FA4CtB,CAAA"}
|
|
@@ -1,27 +1,61 @@
|
|
|
1
|
+
/** Props for `RudiCard`. */
|
|
1
2
|
export interface RudiCardProps {
|
|
3
|
+
/**
|
|
4
|
+
* Surface treatment: plain, bordered, or raised with a shadow.
|
|
5
|
+
* @default 'default'
|
|
6
|
+
*/
|
|
2
7
|
variant?: 'default' | 'outlined' | 'elevated';
|
|
8
|
+
/**
|
|
9
|
+
* Inner padding of the card.
|
|
10
|
+
* @default 'md'
|
|
11
|
+
*/
|
|
3
12
|
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
13
|
+
/** Card content, usually `RudiCard.Header`, `RudiCard.Body`, and `RudiCard.Footer`. */
|
|
4
14
|
children: React.ReactNode;
|
|
15
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
5
16
|
className?: string;
|
|
6
17
|
}
|
|
18
|
+
/** Props for `RudiCard.Header`. */
|
|
7
19
|
export interface RudiCardHeaderProps {
|
|
20
|
+
/** Header content, such as a title and actions. */
|
|
8
21
|
children: React.ReactNode;
|
|
22
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
9
23
|
className?: string;
|
|
10
24
|
}
|
|
25
|
+
/** Props for `RudiCard.Body`. */
|
|
11
26
|
export interface RudiCardBodyProps {
|
|
27
|
+
/** Main card content. */
|
|
12
28
|
children: React.ReactNode;
|
|
29
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
13
30
|
className?: string;
|
|
14
31
|
}
|
|
32
|
+
/** Props for `RudiCard.Footer`. */
|
|
15
33
|
export interface RudiCardFooterProps {
|
|
34
|
+
/** Footer content, such as buttons or metadata. */
|
|
16
35
|
children: React.ReactNode;
|
|
36
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
17
37
|
className?: string;
|
|
18
38
|
}
|
|
19
39
|
declare function CardHeader({ children, className }: RudiCardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
40
|
declare function CardBody({ children, className }: RudiCardBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
21
41
|
declare function CardFooter({ children, className }: RudiCardFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Surface container that groups related content. Compose it with `RudiCard.Header`, `RudiCard.Body`, and `RudiCard.Footer`. Use `RudiStatCard` for a single metric.
|
|
44
|
+
* Forwards its ref to the root `div`.
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <RudiCard variant="outlined">
|
|
48
|
+
* <RudiCard.Header>Billing</RudiCard.Header>
|
|
49
|
+
* <RudiCard.Body>Next invoice on 1 March.</RudiCard.Body>
|
|
50
|
+
* </RudiCard>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
22
53
|
export declare const RudiCard: import('react').ForwardRefExoticComponent<RudiCardProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
54
|
+
/** Top section of the card; holds the title and actions. */
|
|
23
55
|
Header: typeof CardHeader;
|
|
56
|
+
/** Main content area of the card. */
|
|
24
57
|
Body: typeof CardBody;
|
|
58
|
+
/** Bottom section of the card; holds buttons or metadata. */
|
|
25
59
|
Footer: typeof CardFooter;
|
|
26
60
|
};
|
|
27
61
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAEA,OAAO,YAAY,CAAA;AAEnB,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAC7C,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAuBD,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAI/D;AAED,iBAAS,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAI3D;AAED,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAI/D;AAED,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAEA,OAAO,YAAY,CAAA;AAEnB,4BAA4B;AAC5B,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAA;IAC7C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACrC,uFAAuF;IACvF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,mCAAmC;AACnC,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iCAAiC;AACjC,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,mCAAmC;AACnC,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAuBD,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAI/D;AAED,iBAAS,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAI3D;AAED,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAI/D;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ;IACnB,4DAA4D;;IAE5D,qCAAqC;;IAErC,6DAA6D;;CAE7D,CAAA"}
|
|
@@ -1,18 +1,53 @@
|
|
|
1
|
+
/** Props for `RudiBarChart`. */
|
|
1
2
|
export interface RudiBarChartProps {
|
|
2
|
-
/**
|
|
3
|
-
* Row data. Values may be `null` to represent gaps in a series. Strongly-typed
|
|
4
|
-
* data objects are accepted directly — no cast required.
|
|
5
|
-
*/
|
|
3
|
+
/** Row data. Values may be `null` to represent gaps in a series. Strongly-typed data objects are accepted directly, with no cast required. */
|
|
6
4
|
data: Array<Record<string, string | number | null>>;
|
|
5
|
+
/** Keys of `data` rows to plot, one bar series each. Colors come from the chart theme in order. */
|
|
7
6
|
dataKeys: string[];
|
|
7
|
+
/** Key of `data` rows used for the category axis labels. */
|
|
8
8
|
indexKey: string;
|
|
9
|
+
/**
|
|
10
|
+
* `vertical` draws upright columns with categories along the x axis; `horizontal` draws sideways bars with categories along the y axis.
|
|
11
|
+
* @default 'vertical'
|
|
12
|
+
*/
|
|
9
13
|
layout?: 'vertical' | 'horizontal';
|
|
14
|
+
/**
|
|
15
|
+
* Stacks the series instead of placing them side by side.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
10
18
|
stacked?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Shows the series legend.
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
11
23
|
showLegend?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Shows grid lines along the value axis.
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
12
28
|
showGrid?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Chart height in px.
|
|
31
|
+
* @default 300
|
|
32
|
+
*/
|
|
13
33
|
height?: number;
|
|
34
|
+
/** Accessible name describing the chart. */
|
|
14
35
|
label: string;
|
|
36
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
15
37
|
className?: string;
|
|
16
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Bar chart with one series per data key, built on Recharts and the library chart theme. Use `RudiLineChart` for trends over time.
|
|
41
|
+
* `label` is required; the chart is exposed as a single `role="img"` with that name, so summarize the data in it. It fills its container's width.
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <RudiBarChart
|
|
45
|
+
* label="Orders per month"
|
|
46
|
+
* data={[{ month: 'Jan', orders: 12 }, { month: 'Feb', orders: 18 }]}
|
|
47
|
+
* indexKey="month"
|
|
48
|
+
* dataKeys={['orders']}
|
|
49
|
+
* />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
17
52
|
export declare function RudiBarChart({ data, dataKeys, indexKey, layout, stacked, showLegend, showGrid, height, label, className, }: RudiBarChartProps): import("react/jsx-runtime").JSX.Element;
|
|
18
53
|
//# sourceMappingURL=BarChart.d.ts.map
|