rudiment-ui 0.1.0 → 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.
Files changed (124) hide show
  1. package/README.md +325 -35
  2. package/dist/components/Alert/Alert.d.ts +2 -2
  3. package/dist/components/Alert/Alert.d.ts.map +1 -1
  4. package/dist/components/AppShell/AppShell.d.ts +48 -0
  5. package/dist/components/AppShell/AppShell.d.ts.map +1 -0
  6. package/dist/components/Avatar/Avatar.d.ts +2 -2
  7. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  8. package/dist/components/Badge/Badge.d.ts +2 -2
  9. package/dist/components/Badge/Badge.d.ts.map +1 -1
  10. package/dist/components/Breadcrumb/Breadcrumb.d.ts +14 -0
  11. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
  12. package/dist/components/Button/Button.d.ts +2 -2
  13. package/dist/components/Button/Button.d.ts.map +1 -1
  14. package/dist/components/Card/Card.d.ts +8 -8
  15. package/dist/components/Card/Card.d.ts.map +1 -1
  16. package/dist/components/Charts/BarChart/BarChart.d.ts +7 -3
  17. package/dist/components/Charts/BarChart/BarChart.d.ts.map +1 -1
  18. package/dist/components/Charts/DonutChart/DonutChart.d.ts +4 -4
  19. package/dist/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
  20. package/dist/components/Charts/LineChart/LineChart.d.ts +8 -3
  21. package/dist/components/Charts/LineChart/LineChart.d.ts.map +1 -1
  22. package/dist/components/Checkbox/Checkbox.d.ts +2 -2
  23. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  24. package/dist/components/Checkbox/CheckboxGroup.d.ts +2 -2
  25. package/dist/components/Checkbox/CheckboxGroup.d.ts.map +1 -1
  26. package/dist/components/CircularProgress/CircularProgress.d.ts +2 -2
  27. package/dist/components/CircularProgress/CircularProgress.d.ts.map +1 -1
  28. package/dist/components/Dialog/Dialog.d.ts +2 -2
  29. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  30. package/dist/components/Divider/Divider.d.ts +15 -0
  31. package/dist/components/Divider/Divider.d.ts.map +1 -0
  32. package/dist/components/Dot/Dot.d.ts +20 -0
  33. package/dist/components/Dot/Dot.d.ts.map +1 -0
  34. package/dist/components/Footer/Footer.d.ts +31 -0
  35. package/dist/components/Footer/Footer.d.ts.map +1 -0
  36. package/dist/components/Icon/Icon.d.ts +2 -2
  37. package/dist/components/Icon/Icon.d.ts.map +1 -1
  38. package/dist/components/IconButton/IconButton.d.ts +2 -2
  39. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  40. package/dist/components/Image/Image.d.ts +18 -0
  41. package/dist/components/Image/Image.d.ts.map +1 -0
  42. package/dist/components/Input/Input.d.ts +2 -2
  43. package/dist/components/Input/Input.d.ts.map +1 -1
  44. package/dist/components/Kanban/KanbanBoard.d.ts +12 -12
  45. package/dist/components/Kanban/KanbanBoard.d.ts.map +1 -1
  46. package/dist/components/Kanban/KanbanCard.d.ts +2 -2
  47. package/dist/components/Kanban/KanbanCard.d.ts.map +1 -1
  48. package/dist/components/Kanban/KanbanColumn.d.ts +5 -5
  49. package/dist/components/Kanban/KanbanColumn.d.ts.map +1 -1
  50. package/dist/components/Link/Link.d.ts +16 -0
  51. package/dist/components/Link/Link.d.ts.map +1 -0
  52. package/dist/components/Menu/Keyboard.d.ts +2 -2
  53. package/dist/components/Menu/Keyboard.d.ts.map +1 -1
  54. package/dist/components/Menu/Menu.d.ts +2 -2
  55. package/dist/components/Menu/Menu.d.ts.map +1 -1
  56. package/dist/components/Menu/MenuItem.d.ts +11 -2
  57. package/dist/components/Menu/MenuItem.d.ts.map +1 -1
  58. package/dist/components/Menu/MenuSection.d.ts +2 -2
  59. package/dist/components/Menu/MenuSection.d.ts.map +1 -1
  60. package/dist/components/Menu/MenuSeparator.d.ts +5 -0
  61. package/dist/components/Menu/MenuSeparator.d.ts.map +1 -0
  62. package/dist/components/Menu/MenuTrigger.d.ts +2 -2
  63. package/dist/components/Menu/MenuTrigger.d.ts.map +1 -1
  64. package/dist/components/Menu/SubmenuTrigger.d.ts +5 -0
  65. package/dist/components/Menu/SubmenuTrigger.d.ts.map +1 -0
  66. package/dist/components/NavItem/NavItem.d.ts +2 -2
  67. package/dist/components/NavItem/NavItem.d.ts.map +1 -1
  68. package/dist/components/PageHeader/PageHeader.d.ts +12 -0
  69. package/dist/components/PageHeader/PageHeader.d.ts.map +1 -0
  70. package/dist/components/Pagination/Pagination.d.ts +14 -0
  71. package/dist/components/Pagination/Pagination.d.ts.map +1 -0
  72. package/dist/components/ProgressBar/ProgressBar.d.ts +15 -3
  73. package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  74. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  75. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  76. package/dist/components/Rating/Rating.d.ts +18 -0
  77. package/dist/components/Rating/Rating.d.ts.map +1 -0
  78. package/dist/components/SectionHeader/SectionHeader.d.ts +12 -0
  79. package/dist/components/SectionHeader/SectionHeader.d.ts.map +1 -0
  80. package/dist/components/Select/Option.d.ts +3 -0
  81. package/dist/components/Select/Option.d.ts.map +1 -0
  82. package/dist/components/Select/Select.d.ts +2 -2
  83. package/dist/components/Select/Select.d.ts.map +1 -1
  84. package/dist/components/StatCard/StatCard.d.ts +2 -2
  85. package/dist/components/StatCard/StatCard.d.ts.map +1 -1
  86. package/dist/components/Stepper/Stepper.d.ts +17 -0
  87. package/dist/components/Stepper/Stepper.d.ts.map +1 -0
  88. package/dist/components/Switch/Switch.d.ts +2 -2
  89. package/dist/components/Switch/Switch.d.ts.map +1 -1
  90. package/dist/components/Tag/Tag.d.ts +2 -2
  91. package/dist/components/Tag/Tag.d.ts.map +1 -1
  92. package/dist/components/Textarea/Textarea.d.ts +17 -0
  93. package/dist/components/Textarea/Textarea.d.ts.map +1 -0
  94. package/dist/components/Tooltip/Tooltip.d.ts +4 -4
  95. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  96. package/dist/components/TopBar/TopBar.d.ts +18 -0
  97. package/dist/components/TopBar/TopBar.d.ts.map +1 -0
  98. package/dist/index.css +1 -1
  99. package/dist/index.d.ts +109 -85
  100. package/dist/index.d.ts.map +1 -1
  101. package/dist/index.js +1424 -945
  102. package/dist/layouts/Box/Box.d.ts +2 -2
  103. package/dist/layouts/Box/Box.d.ts.map +1 -1
  104. package/dist/layouts/Center/Center.d.ts +2 -2
  105. package/dist/layouts/Center/Center.d.ts.map +1 -1
  106. package/dist/layouts/Cluster/Cluster.d.ts +2 -2
  107. package/dist/layouts/Cluster/Cluster.d.ts.map +1 -1
  108. package/dist/layouts/Cover/Cover.d.ts +2 -2
  109. package/dist/layouts/Cover/Cover.d.ts.map +1 -1
  110. package/dist/layouts/Grid/Grid.d.ts +2 -2
  111. package/dist/layouts/Grid/Grid.d.ts.map +1 -1
  112. package/dist/layouts/Sidebar/Sidebar.d.ts +2 -2
  113. package/dist/layouts/Sidebar/Sidebar.d.ts.map +1 -1
  114. package/dist/layouts/Stack/Stack.d.ts +3 -3
  115. package/dist/layouts/Stack/Stack.d.ts.map +1 -1
  116. package/dist/layouts/Switcher/Switcher.d.ts +2 -2
  117. package/dist/layouts/Switcher/Switcher.d.ts.map +1 -1
  118. package/dist/typography/Heading/Heading.d.ts +11 -2
  119. package/dist/typography/Heading/Heading.d.ts.map +1 -1
  120. package/dist/typography/Prose/Prose.d.ts +2 -2
  121. package/dist/typography/Prose/Prose.d.ts.map +1 -1
  122. package/dist/typography/Text/Text.d.ts +13 -2
  123. package/dist/typography/Text/Text.d.ts.map +1 -1
  124. package/package.json +3 -3
package/README.md CHANGED
@@ -1,21 +1,23 @@
1
1
  # Rudiment UI
2
2
 
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
+
3
5
  A complete, accessible React component library template built on [React Aria](https://react-spectrum.adobe.com/react-aria/), styled with [Tailwind CSS 4](https://tailwindcss.com/), and documented in [Storybook](https://storybook.js.org/).
4
6
 
5
7
  Clone it. Swap the tokens. Ship your design system.
6
8
 
7
9
  ## What's included
8
10
 
9
- | Category | Components |
10
- |----------|-----------|
11
- | **UI Components** | Button, Input, Checkbox, CheckboxGroup, Select, Dialog, Switch, RadioGroup, Tooltip, Alert, IconButton, Badge, Tag, Avatar, Card, Icon, NavItem, ProgressBar, StatCard, CircularProgress |
12
- | **Charts** | BarChart, LineChart, DonutChart |
13
- | **Kanban** | KanbanBoard, KanbanColumn, KanbanCard |
14
- | **Typography** | Heading, Text, Prose |
15
- | **Layout Primitives** | Box, Stack, Cluster, Grid, Sidebar, Center, Cover, Switcher |
16
- | **Page Examples** | App Shell, App Header, App Footer, Settings Page, Sign-In Form, Marketing Hero, Sidebar Layout, Article Page, Simple Form, Empty State |
11
+ | Category | Components |
12
+ | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
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 |
15
+ | **Kanban** | KanbanBoard, KanbanColumn, KanbanCard |
16
+ | **Typography** | Heading, Text, Prose |
17
+ | **Layout Primitives** | Box, Stack, Cluster, Grid, Sidebar, Center, Cover, Switcher |
18
+ | **Page Examples** | App Shell, App Header, App Footer, Settings Page, Sign-In Form, Marketing Hero, Sidebar Layout, Article Page, Simple Form, Empty State |
17
19
 
18
- Also included: a three-tier design token architecture, six built-in themes (Default, Teal, and Cyberpunk in light and dark variants), motion tokens, a data visualization palette, surface tokens, a Vitest test suite with accessibility checks, and interactive Storybook documentation.
20
+ Also included: a three-tier design token architecture, eight built-in themes (Default plus the Roomy, Soft, and Compressed modifier themes, each in light and dark variants), motion tokens, a data visualization palette, surface tokens, a Vitest test suite with accessibility checks, and interactive Storybook documentation.
19
21
 
20
22
  ## Quick start
21
23
 
@@ -51,40 +53,126 @@ Import the stylesheet once at your app's entry point:
51
53
  import 'rudiment-ui/styles'
52
54
  ```
53
55
 
54
- This ships the component styles plus all six themes. It does **not** include Tailwind — components are styled with plain CSS custom properties, so nothing resets your app's own styles.
56
+ This ships the component styles plus all eight themes. It does **not** include Tailwind — components are styled with plain BEM classes and CSS custom properties, and the bundle contains no bare-element selectors, so it will not reset or clobber your app's own styles.
55
57
 
56
58
  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.
57
59
 
58
- ## Customizing for your brand
60
+ ---
59
61
 
60
- 1. Edit primitive values in `tokens/tokens.json` (colors, spacing, typography)
61
- 2. Update semantic mappings in `tokens/semantic.json` (brand colors, theme values)
62
- 3. Adjust component-level tokens in `tokens/components.json` (per-component overrides)
63
- 4. Rebuild tokens: `npm run build:tokens`
64
- 5. Preview changes in Storybook: `npm run dev`
62
+ # Using Rudiment UI in your app
63
+
64
+ ## Setup
65
+
66
+ ```tsx
67
+ // app entry — main.tsx, _app.tsx, or app/layout.tsx
68
+ import 'rudiment-ui/styles'
69
+ ```
70
+
71
+ That single import is the whole setup. There is no provider to mount — `Dialog` portals itself, and `useChartTheme` reads tokens straight off `document.documentElement`.
72
+
73
+ ## Themes
65
74
 
66
- ## Switching themes
75
+ Eight themes ship in the stylesheet. Set `data-theme` on a root element to switch:
67
76
 
68
- Set `data-theme` on a root element. The default theme lives on `:root`, so **omit the attribute** for it — there is no `data-theme="light"`.
77
+ | Theme | Attribute |
78
+ | --------------- | ------------------------------ |
79
+ | Default (light) | _no attribute_ |
80
+ | Dark | `data-theme="dark"` |
81
+ | Roomy | `data-theme="roomy"` |
82
+ | Roomy Dark | `data-theme="roomy-dark"` |
83
+ | Soft | `data-theme="soft"` |
84
+ | Soft Dark | `data-theme="soft-dark"` |
85
+ | Compressed | `data-theme="compressed"` |
86
+ | Compressed Dark | `data-theme="compressed-dark"` |
69
87
 
70
- ```html
71
- <html data-theme="dark"> <!-- dark, teal, teal-dark, cyberpunk, cyberpunk-dark -->
72
- <html> <!-- default -->
88
+ The default theme lives on `:root`, so **omit the attribute for it** — there is no `data-theme="light"`. Remove the attribute to return to default.
89
+
90
+ ```tsx
91
+ type Theme =
92
+ | 'default'
93
+ | 'dark'
94
+ | 'roomy'
95
+ | 'roomy-dark'
96
+ | 'soft'
97
+ | 'soft-dark'
98
+ | 'compressed'
99
+ | 'compressed-dark'
100
+
101
+ function applyTheme(theme: Theme) {
102
+ if (theme === 'default') {
103
+ document.documentElement.removeAttribute('data-theme')
104
+ } else {
105
+ document.documentElement.setAttribute('data-theme', theme)
106
+ }
107
+ }
73
108
  ```
74
109
 
75
- Themes are plain custom-property blocks, so consuming the package as a dependency and overriding a few tokens downstream also works:
110
+ Themes are scoped by attribute rather than element, so you can theme a subtree — a dark sidebar inside a light page — by putting `data-theme` on any wrapper.
111
+
112
+ No `prefers-color-scheme` query ships with the package. If you want OS-driven dark mode, wire it up yourself:
113
+
114
+ ```tsx
115
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
116
+ applyTheme(prefersDark ? 'dark' : 'default')
117
+ ```
118
+
119
+ Charts follow theme changes automatically — `useChartTheme` watches `data-theme` on `<html>` with a `MutationObserver` and re-resolves its colors.
120
+
121
+ ## Tokens
122
+
123
+ Every visual value is a CSS custom property prefixed `--rudi-`, arranged in three tiers that resolve through `var()` chains. Overriding a tier cascades to everything below it.
124
+
125
+ ```css
126
+ --rudi-color-neutral-900: #171717; /* 1. primitive */
127
+ --rudi-color-brand-primary: var(--rudi-color-neutral-900); /* 2. semantic */
128
+ --rudi-component-button-primary-bg: var(
129
+ --rudi-color-brand-primary
130
+ ); /* 3. component */
131
+ ```
132
+
133
+ Rebrand by overriding tier 2 in your own stylesheet, loaded after `rudiment-ui/styles`:
76
134
 
77
135
  ```css
78
136
  :root {
79
- --token-component-button-primary-bg: #7c3aed;
137
+ --rudi-color-brand-primary: #7c3aed;
138
+ --rudi-color-brand-primary-hover: #6d28d9;
139
+ --rudi-color-brand-primary-active: #5b21b6;
80
140
  }
81
141
  ```
82
142
 
83
- ## Using components
143
+ **Scope overrides per theme.** `:root` and `[data-theme="dark"]` have equal specificity, and the theme blocks come later in the stylesheet — so a plain `:root` override loses inside a themed subtree. Repeat it under each theme you use:
144
+
145
+ ```css
146
+ :root {
147
+ --rudi-color-brand-primary: #7c3aed;
148
+ }
149
+ [data-theme='dark'] {
150
+ --rudi-color-brand-primary: #a78bfa;
151
+ }
152
+ ```
153
+
154
+ The tokens worth reaching for most often:
155
+
156
+ | Purpose | Tokens |
157
+ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
158
+ | **Brand** | `--rudi-color-brand-primary`, `-hover`, `-active` |
159
+ | **Surfaces** | `--rudi-color-background-surface`, `-raised`, `-sunken`, `-overlay`, `--rudi-color-background-disabled`, `-inverted` |
160
+ | **Text** | `--rudi-color-text-default`, `-subtle`, `-disabled`, `-on-brand`, `-on-inverted` |
161
+ | **Borders** | `--rudi-color-border-default`, `-focus`, `-error` |
162
+ | **Feedback** | `--rudi-color-feedback-{error,success,warning,info}` each with `-surface`, `-border`, `-text` |
163
+ | **Charts** | `--rudi-color-dataviz-series-1` … `-8` |
164
+ | **Spacing** | `--rudi-spacing-{0,1,2,3,4,6,8,12}` (`0.25rem` steps — note 5, 7, 9–11 don't exist) |
165
+ | **Radius** | `--rudi-radius-{none,sm,md,lg,full}` |
166
+ | **Type** | `--rudi-font-family-{sans,mono}`, `--rudi-font-size-{xs…4xl}`, `--rudi-font-weight-{regular,medium,semibold,bold}` |
167
+ | **Motion** | `--rudi-motion-duration-{fast,base,slow}`, `--rudi-motion-easing-standard` |
168
+ | **Layout** | `--rudi-layout-sidebar-width`, `--rudi-layout-grid-min-cell`, `--rudi-layout-center-max-width`, `--rudi-layout-switcher-threshold` |
169
+
170
+ Component-level tokens (`--rudi-component-*`) are available for surgical changes — `--rudi-component-button-primary-bg`, `--rudi-component-card-bg`, `--rudi-component-input-bg`, and so on — but prefer semantic overrides so the change carries across every component.
171
+
172
+ ## Components
84
173
 
85
174
  ```tsx
86
175
  import { Button, Input, Stack } from 'rudiment-ui'
87
- import 'rudiment-ui/styles'
88
176
 
89
177
  function LoginForm() {
90
178
  return (
@@ -97,17 +185,219 @@ function LoginForm() {
97
185
  }
98
186
  ```
99
187
 
188
+ ### Conventions worth knowing up front
189
+
190
+ - **`onPress`, not `onClick`.** `Button`, `IconButton`, `Tag`, and `NavItem` are built on React Aria and take `onPress`. React Aria handles pointer, touch, and keyboard activation in one event.
191
+ - **`onChange` gives you a value, not an event.** `Input` calls `onChange(value: string)`, `Checkbox` calls `onChange(isSelected: boolean)`, `CheckboxGroup` calls `onChange(value: string[])`.
192
+ - **Labels are required props, not children.** `Input`, `Select`, `RadioGroup`, `CheckboxGroup`, `ProgressBar`, and the charts all take `label` as a string — it wires up the accessible name for you.
193
+ - **Icons are Iconify names.** Any prop typed as an icon takes a `"collection:name"` string, e.g. `icon="mdi:close"`. No icon imports needed.
194
+ - **`className` is merged, not replaced** — every component runs it through `clsx` + `tailwind-merge`. `cn` is exported if you want the same helper.
195
+ - **Layout primitives are polymorphic and spread props**; components are not. `Stack`, `Box`, `Text` etc. accept `as` plus any DOM attribute. `Button`, `Card`, `Alert` have closed prop interfaces.
196
+
197
+ ### Component reference
198
+
199
+ **Actions**
200
+
201
+ | Component | Props |
202
+ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
203
+ | `Button` | `variant?: 'primary' \| 'secondary' \| 'destructive' \| 'ghost'` (`'primary'`), `size?: 'sm' \| 'md' \| 'lg'` (`'md'`), `isLoading?`, `iconBefore?`, `iconAfter?`, `onPress?`, `isDisabled?` |
204
+ | `IconButton` | `aria-label` **(required)**, `variant?` (`'secondary'`), `size?: 'sm' \| 'md' \| 'lg'` (`'md'`), `isLoading?`, `onPress?`; `children` is a single element |
205
+ | `NavItem` | `label` **(required)**, `icon?`, `isActive?`, `href?` (renders `<a>`, else `<button>`), `onPress?`, `badge?`, `isDisabled?` |
206
+
207
+ **Forms**
208
+
209
+ | Component | Props |
210
+ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
211
+ | `Input` | `label` **(required)**, `type?: 'text' \| 'email' \| 'password' \| 'url' \| 'tel' \| 'search' \| 'number'` (`'text'`), `placeholder?`, `description?`, `errorMessage?` (sets invalid state), `isRequired?`, `isDisabled?`, `value?`, `defaultValue?`, `onChange?: (value: string) => void` |
212
+ | `Checkbox` | `children` (label), `isSelected?`, `defaultSelected?`, `isIndeterminate?`, `onChange?: (isSelected: boolean) => void`, `isDisabled?`, `value?` |
213
+ | `CheckboxGroup` | `label` **(required)**, `description?`, `value?: string[]`, `defaultValue?`, `onChange?: (value: string[]) => void`, `errorMessage?`, `isDisabled?` |
214
+ | `Switch` | `children` (label), `isSelected?`, `defaultSelected?`, `onChange?: (isSelected: boolean) => void`, `isDisabled?` |
215
+ | `Select` | `label`, `items`, `children: (item) => ReactNode`, `selectedKey?`, `defaultSelectedKey?`, `onSelectionChange?: (key) => void`, `placeholder?`, `description?`, `errorMessage?`, `isRequired?`, `isDisabled?` |
216
+ | `RadioGroup` | `label`, `orientation?: 'horizontal' \| 'vertical'`, `value?`, `defaultValue?`, `onChange?: (value: string) => void`, `errorMessage?`, `isDisabled?` |
217
+
218
+ `Select` renders its options from an `items` collection plus a render function. The item element comes from `react-stately`:
219
+
220
+ ```tsx
221
+ import { Item } from 'react-stately'
222
+ import { Select } from 'rudiment-ui'
223
+
224
+ const roles = [
225
+ { id: 'viewer', label: 'Viewer' },
226
+ { id: 'editor', label: 'Editor' },
227
+ { id: 'admin', label: 'Admin' },
228
+ ]
229
+
230
+ <Select label="Role" items={roles} placeholder="Choose a role" onSelectionChange={setRole}>
231
+ {(item) => <Item key={item.id}>{item.label}</Item>}
232
+ </Select>
233
+ ```
234
+
235
+ **Feedback & display**
236
+
237
+ | Component | Props |
238
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
239
+ | `Alert` | `variant: 'info' \| 'success' \| 'warning' \| 'error'` **(required)**, `title?`, `icon?`, `isPolite?` (`role="status"` instead of `"alert"`), `dismissible?`, `onDismiss?` |
240
+ | `Badge` | `variant?: 'default' \| 'success' \| 'warning' \| 'error' \| 'info'` (`'default'`), `size?: 'sm' \| 'md'` (`'md'`), `dot?` (hides children) |
241
+ | `Tag` | `variant?` (as Badge), `dismissible?`, `onDismiss?`, `onPress?` (switches root to `<button>`), `isDisabled?` |
242
+ | `Avatar` | `src?`, `alt?`, `name?` (derives initials), `size?: 'sm' \| 'md' \| 'lg'` (`'md'`), `status?: 'success' \| 'warning' \| 'error' \| 'info'` |
243
+ | `Icon` | `icon` **(required)**, `size?: 'sm' \| 'md' \| 'lg' \| number` (`'md'`), `color?`, `label?` (sets `role="img"`; without it the icon is `aria-hidden`) |
244
+ | `ProgressBar` | `value` + `label` **(required)**, `minValue?` (`0`), `maxValue?` (`100`), `showValueLabel?`, `variant?: 'default' \| 'success' \| 'warning' \| 'error'`, `size?: 'sm' \| 'md'` |
245
+ | `CircularProgress` | same as ProgressBar plus `size?: 'sm' \| 'md' \| 'lg'` and `children?` for custom center content |
246
+ | `StatCard` | `label`, `value: string \| number`, `delta?: string`, `trend?: 'up' \| 'down' \| 'neutral'` (`'neutral'`), `children?` |
247
+
248
+ `Alert` and `Tag` handle dismissal with internal state — once dismissed they render `null` and can't be reopened via props. Control visibility yourself if you need it back.
249
+
250
+ **Containers & overlays**
251
+
252
+ | Component | Props |
253
+ | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
254
+ | `Card` | `variant?: 'default' \| 'outlined' \| 'elevated'` (`'default'`), `padding?: 'none' \| 'sm' \| 'md' \| 'lg'` (`'md'`) |
255
+ | `Dialog` | `isOpen`, `onClose`, `title` **(all required)**, `isDismissable?` (`true`), `size?: 'sm' \| 'md' \| 'lg'` (`'md'`) |
256
+ | `TooltipTrigger` / `Tooltip` | `delay?` (`500`ms), `closeDelay?` (`0`ms); children must be exactly `[trigger, tooltip]` |
257
+ | `MenuTrigger` / `Menu` / `MenuItem` / `MenuSection` / `Keyboard` | React Aria menu primitives; `MenuItem` adds `isDestructive?` |
258
+
259
+ `Card` is compound — use the dot subcomponents:
260
+
261
+ ```tsx
262
+ <Card variant="elevated" padding="lg">
263
+ <Card.Header>Monthly revenue</Card.Header>
264
+ <Card.Body>…</Card.Body>
265
+ <Card.Footer>…</Card.Footer>
266
+ </Card>
267
+ ```
268
+
269
+ `Dialog` is fully controlled — it has no internal open state:
270
+
271
+ ```tsx
272
+ const [isOpen, setIsOpen] = useState(false)
273
+
274
+ <Button onPress={() => setIsOpen(true)}>Delete account</Button>
275
+ <Dialog isOpen={isOpen} onClose={() => setIsOpen(false)} title="Are you sure?" size="sm">
276
+ <Button variant="destructive" onPress={confirmDelete}>Delete</Button>
277
+ </Dialog>
278
+ ```
279
+
280
+ `TooltipTrigger` takes exactly two children, in order:
281
+
282
+ ```tsx
283
+ <TooltipTrigger>
284
+ <IconButton aria-label="Delete">
285
+ <Icon icon="mdi:trash-can" />
286
+ </IconButton>
287
+ <Tooltip>Delete this item</Tooltip>
288
+ </TooltipTrigger>
289
+ ```
290
+
291
+ ## Layout primitives
292
+
293
+ Eight primitives handle spacing and composition. **Every spacing prop takes a raw CSS length string** — `"1rem"`, `"2rem"`, or `var(--rudi-spacing-6)` — not a numeric scale. The prop is `space` everywhere (never `gap`); `Box` uses `padding`. All accept `as`, `className`, and any DOM attribute.
294
+
295
+ | Component | Props | Default |
296
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
297
+ | `Box` | `padding?`, `bordered?`, `invert?` | padding `1rem` |
298
+ | `Stack` | `space?`, `recursive?`, `splitAfter?: number` | space `1.5rem` |
299
+ | `Cluster` | `space?`, `justify?: 'flex-start' \| 'flex-end' \| 'center' \| 'space-between' \| 'space-around'`, `align?: 'flex-start' \| 'flex-end' \| 'center' \| 'baseline' \| 'stretch'` | space `1rem`, justify `flex-start`, align `center` |
300
+ | `Grid` | `minCellWidth?`, `space?` | min cell `15rem`, space `1.5rem` |
301
+ | `Sidebar` | `side?: 'left' \| 'right'`, `sideWidth?`, `contentMin?`, `space?`, `noStretch?` | side `left`, width `20rem`, content min `50%` |
302
+ | `Center` | `maxWidth?`, `gutters?`, `intrinsic?` | max width `60rem`, gutters `1rem` |
303
+ | `Cover` | `minHeight?`, `space?` | min height `100vh` |
304
+ | `Switcher` | `threshold?`, `space?` | threshold `30rem`, space `1.5rem` |
305
+
306
+ ```tsx
307
+ <Sidebar side="left" sideWidth="16rem" space="2rem">
308
+ <nav>…</nav>
309
+ <Stack space="1.5rem">
310
+ <Heading level={1}>Dashboard</Heading>
311
+ <Grid minCellWidth="18rem" space="1rem">
312
+ <StatCard label="Revenue" value="$48.2k" delta="+12.5%" trend="up" />
313
+ <StatCard label="Users" value="1,284" delta="+3.1%" trend="up" />
314
+ </Grid>
315
+ </Stack>
316
+ </Sidebar>
317
+ ```
318
+
319
+ `Stack` deserves a note: `recursive` applies the spacing to all nested descendants rather than direct children, and `splitAfter={n}` pushes everything after the nth child to the bottom — useful for pinning a footer inside a sidebar.
320
+
321
+ ## Typography
322
+
323
+ | Component | Props |
324
+ | --------- | ---------------------------------------------------------------------------------------------- |
325
+ | `Heading` | `level: 1–6` **(required, sets the tag)**, `size?: 1–6` (visual size, defaults to `level`) |
326
+ | `Text` | `variant?: 'body' \| 'body-sm' \| 'caption' \| 'overline' \| 'code'` (`'body'`), `as?` (`'p'`) |
327
+ | `Prose` | `size?: 'sm' \| 'base' \| 'lg'` (`'base'`), `as?` (`'div'`) |
328
+
329
+ `level` and `size` are separate so you can keep a correct document outline while styling freely — `<Heading level={2} size={4}>` renders an `<h2>` that looks like an h4. `Prose` styles a block of unstyled HTML (CMS content, rendered Markdown).
330
+
331
+ ## Charts
332
+
333
+ All three wrap Recharts, size themselves to their container, and require a `label` for the accessible name. Series colors come from the dataviz tokens and follow the active theme automatically.
334
+
335
+ | Component | Props |
336
+ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
337
+ | `BarChart` | `data`, `dataKeys: string[]`, `indexKey`, `label`, `layout?: 'vertical' \| 'horizontal'` (`'vertical'`), `stacked?`, `showLegend?` (`true`), `showGrid?` (`true`), `height?` (`300`) |
338
+ | `LineChart` | `data`, `dataKeys`, `indexKey`, `label`, `curved?` (`true`), `showDots?` (`true`), `showGrid?`, `showLegend?`, `height?` |
339
+ | `DonutChart` | `data: { name, value }[]`, `label`, `innerRadius?` (`60`), `showLabels?` (`false`), `showLegend?`, `height?` |
340
+
341
+ ```tsx
342
+ <BarChart
343
+ label="Revenue by month"
344
+ data={[
345
+ { month: 'Jan', revenue: 4200, costs: 2400 },
346
+ { month: 'Feb', revenue: 5100, costs: 2600 },
347
+ ]}
348
+ dataKeys={['revenue', 'costs']}
349
+ indexKey="month"
350
+ stacked
351
+ />
352
+ ```
353
+
354
+ Note that `BarChart`'s `layout` describes the bars, not the Recharts axis: the default `"vertical"` gives you vertical bars, and `"horizontal"` gives horizontal ones.
355
+
356
+ ## Kanban
357
+
358
+ `KanbanBoard` is fully controlled — it never mutates `columns`. Apply the move yourself in `onCardMove`:
359
+
360
+ ```tsx
361
+ import { KanbanBoard, KanbanCard, type KanbanCardMoveEvent } from 'rudiment-ui'
362
+ ;<KanbanBoard
363
+ columns={columns} // { id, title, items: { id, ... }[] }[]
364
+ renderCard={(item) => <KanbanCard id={item.id}>{item.title}</KanbanCard>}
365
+ onCardMove={(e: KanbanCardMoveEvent) => {
366
+ // e: { cardId, fromColumnId, toColumnId, fromIndex, toIndex }
367
+ setColumns((prev) => applyMove(prev, e))
368
+ }}
369
+ />
370
+ ```
371
+
372
+ `renderCard` must return a `<KanbanCard id={item.id}>` — that's what supplies the drag wiring and handle. `onCardMove` doesn't fire when a card is dropped back in its original position.
373
+
374
+ ## Hooks
375
+
376
+ **`useChartTheme()`** returns the resolved chart palette for the active theme — `{ colors, axisColor, gridColor, labelColor, legendColor, tooltipBg, tooltipText, tooltipBorder, chartBg }`. Use it to style custom Recharts compositions so they match the built-in charts. It's SSR-safe and re-resolves on theme change.
377
+
378
+ **`useLoadingButton(ariaProps, isLoading, ref)`** returns `{ buttonProps }` with disabled and `aria-busy` handled. Useful if you're building a custom button rather than using `Button`.
379
+
380
+ ## Customizing the tokens at source
381
+
382
+ If you cloned the template rather than installing the package:
383
+
384
+ 1. Edit primitive values in `tokens/tokens.json` (colors, spacing, typography)
385
+ 2. Update semantic mappings in `tokens/semantic.json` (brand colors, theme values)
386
+ 3. Adjust component-level tokens in `tokens/components.json` (per-component overrides)
387
+ 4. Rebuild tokens: `npm run build:tokens`
388
+ 5. Preview changes in Storybook: `npm run dev`
389
+
100
390
  ## Available scripts
101
391
 
102
- | Command | Description |
103
- |---------|------------|
104
- | `npm run dev` | Start Storybook dev server on port 6006 |
105
- | `npm run build` | Build the component library for distribution |
106
- | `npm run build-storybook` | Build a static Storybook site |
107
- | `npm run build:tokens` | Generate CSS from design token JSON files |
108
- | `npm run test` | Run the test suite |
109
- | `npm run test:coverage` | Run tests with coverage report |
110
- | `npm run test:watch` | Run tests in watch mode |
392
+ | Command | Description |
393
+ | ------------------------- | -------------------------------------------- |
394
+ | `npm run dev` | Start Storybook dev server on port 6006 |
395
+ | `npm run build` | Build the component library for distribution |
396
+ | `npm run build-storybook` | Build a static Storybook site |
397
+ | `npm run build:tokens` | Generate CSS from design token JSON files |
398
+ | `npm run test` | Run the test suite |
399
+ | `npm run test:coverage` | Run tests with coverage report |
400
+ | `npm run test:watch` | Run tests in watch mode |
111
401
 
112
402
  ## Project structure
113
403
 
@@ -147,4 +437,4 @@ See [CHANGELOG.md](CHANGELOG.md) for release history.
147
437
 
148
438
  ## License
149
439
 
150
- ISC
440
+ [MIT](LICENSE)
@@ -1,4 +1,4 @@
1
- export interface AlertProps {
1
+ export interface RudiAlertProps {
2
2
  variant: 'info' | 'success' | 'warning' | 'error';
3
3
  title?: string;
4
4
  icon?: string;
@@ -8,5 +8,5 @@ export interface AlertProps {
8
8
  children: React.ReactNode;
9
9
  className?: string;
10
10
  }
11
- export declare function Alert({ variant, title, icon, isPolite, dismissible, onDismiss, children, className, }: AlertProps): import("react/jsx-runtime").JSX.Element | null;
11
+ export declare function RudiAlert({ variant, title, icon, isPolite, dismissible, onDismiss, children, className, }: RudiAlertProps): import("react/jsx-runtime").JSX.Element | null;
12
12
  //# sourceMappingURL=Alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAGA,OAAO,aAAa,CAAA;AAEpB,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAO,EACP,KAAK,EACL,IAAI,EACJ,QAAgB,EAChB,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,SAAS,GACV,EAAE,UAAU,kDAsCZ"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAGA,OAAO,aAAa,CAAA;AAEpB,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAK,EACL,IAAI,EACJ,QAAgB,EAChB,WAAmB,EACnB,SAAS,EACT,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,kDAsChB"}
@@ -0,0 +1,48 @@
1
+ import { default as React } from 'react';
2
+ export interface RudiAppShellProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Controlled open state of the responsive sidebar drawer. */
4
+ isSidebarOpen?: boolean;
5
+ /** Called when the drawer requests an open-state change. */
6
+ onSidebarOpenChange?: (open: boolean) => void;
7
+ /** Initial open state when uncontrolled. */
8
+ defaultSidebarOpen?: boolean;
9
+ children: React.ReactNode;
10
+ className?: string;
11
+ }
12
+ export interface RudiAppShellSidebarProps extends React.HTMLAttributes<HTMLElement> {
13
+ /** Overrides the sidebar width (defaults to the app-shell token). */
14
+ width?: string;
15
+ 'aria-label'?: string;
16
+ children: React.ReactNode;
17
+ className?: string;
18
+ }
19
+ export interface RudiAppShellContentProps extends React.HTMLAttributes<HTMLDivElement> {
20
+ children: React.ReactNode;
21
+ className?: string;
22
+ }
23
+ export interface RudiAppShellMainProps extends React.HTMLAttributes<HTMLElement> {
24
+ /** Max width of the centered content column (defaults to the token). */
25
+ maxWidth?: string;
26
+ /** Padding around the content column (defaults to the token). */
27
+ padding?: string;
28
+ children: React.ReactNode;
29
+ className?: string;
30
+ }
31
+ export interface RudiAppShellMenuButtonProps {
32
+ 'aria-label'?: string;
33
+ /** Iconify icon name for the hamburger. */
34
+ icon?: string;
35
+ className?: string;
36
+ }
37
+ declare function AppShellSidebar({ width, className, style, children, 'aria-label': ariaLabel, ...props }: RudiAppShellSidebarProps): import("react/jsx-runtime").JSX.Element;
38
+ declare function AppShellContent({ className, children, ...props }: RudiAppShellContentProps): import("react/jsx-runtime").JSX.Element;
39
+ declare function AppShellMain({ maxWidth, padding, className, style, children, ...props }: RudiAppShellMainProps): import("react/jsx-runtime").JSX.Element;
40
+ declare function AppShellMenuButton({ 'aria-label': ariaLabel, icon, className, }: RudiAppShellMenuButtonProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare const RudiAppShell: React.ForwardRefExoticComponent<RudiAppShellProps & React.RefAttributes<HTMLDivElement>> & {
42
+ Sidebar: typeof AppShellSidebar;
43
+ Content: typeof AppShellContent;
44
+ Main: typeof AppShellMain;
45
+ MenuButton: typeof AppShellMenuButton;
46
+ };
47
+ export {};
48
+ //# sourceMappingURL=AppShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAA;AAI9E,OAAO,iBAAiB,CAAA;AAoBxB,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,8DAA8D;IAC9D,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC7C,4CAA4C;IAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,wBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzC,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,wBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA+CD,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,YAAY,EAAE,SAAqB,EACnC,GAAG,KAAK,EACT,EAAE,wBAAwB,2CAwB1B;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,2CAa7B;AAED,eAAO,MAAM,YAAY;;;;;CAKvB,CAAA"}
@@ -1,4 +1,4 @@
1
- export interface AvatarProps {
1
+ export interface RudiAvatarProps {
2
2
  src?: string;
3
3
  alt?: string;
4
4
  name?: string;
@@ -6,5 +6,5 @@ export interface AvatarProps {
6
6
  status?: 'success' | 'warning' | 'error' | 'info';
7
7
  className?: string;
8
8
  }
9
- export declare function Avatar({ src, alt, name, size, status, className, }: AvatarProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function RudiAvatar({ src, alt, name, size, status, className, }: RudiAvatarProps): import("react/jsx-runtime").JSX.Element;
10
10
  //# 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,WAAW;IAC1B,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,MAAM,CAAC,EACrB,GAAG,EACH,GAAG,EACH,IAAI,EACJ,IAAW,EACX,MAAM,EACN,SAAS,GACV,EAAE,WAAW,2CAqCb"}
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,2CAqCjB"}
@@ -1,9 +1,9 @@
1
- export interface BadgeProps {
1
+ export interface RudiBadgeProps {
2
2
  variant?: 'default' | 'success' | 'warning' | 'error' | 'info';
3
3
  size?: 'sm' | 'md';
4
4
  dot?: boolean;
5
5
  children?: React.ReactNode;
6
6
  className?: string;
7
7
  }
8
- export declare function Badge({ variant, size, dot, children, className, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function RudiBadge({ variant, size, dot, children, className, }: RudiBadgeProps): import("react/jsx-runtime").JSX.Element;
9
9
  //# sourceMappingURL=Badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAA;AAEpB,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC9D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAmB,EACnB,IAAW,EACX,GAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,UAAU,2CAcZ"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAA;AAEpB,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC9D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,SAAS,CAAC,EACxB,OAAmB,EACnB,IAAW,EACX,GAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,cAAc,2CAchB"}
@@ -0,0 +1,14 @@
1
+ export interface RudiBreadcrumbItem {
2
+ label: string;
3
+ href?: string;
4
+ }
5
+ export interface RudiBreadcrumbProps {
6
+ items: RudiBreadcrumbItem[];
7
+ /** Iconify name for the separator between items. */
8
+ separator?: string;
9
+ /** Accessible label for the nav landmark. */
10
+ label?: string;
11
+ className?: string;
12
+ }
13
+ export declare function RudiBreadcrumb({ items, separator, label, className, }: RudiBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAGA,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,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,SAAkC,EAClC,KAAoB,EACpB,SAAS,GACV,EAAE,mBAAmB,2CAiCrB"}
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { AriaButtonProps } from 'react-aria';
3
- export interface ButtonProps extends AriaButtonProps {
3
+ export interface RudiButtonProps extends AriaButtonProps {
4
4
  variant?: 'primary' | 'secondary' | 'destructive' | 'ghost';
5
5
  size?: 'sm' | 'md' | 'lg';
6
6
  isLoading?: boolean;
@@ -9,5 +9,5 @@ export interface ButtonProps extends AriaButtonProps {
9
9
  className?: string;
10
10
  children: React.ReactNode;
11
11
  }
12
- export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
+ export declare const RudiButton: React.ForwardRefExoticComponent<RudiButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
13
  //# 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,WAAY,SAAQ,eAAe;IAClD,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,MAAM,uFA4ClB,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,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,25 +1,25 @@
1
- export interface CardProps {
1
+ export interface RudiCardProps {
2
2
  variant?: 'default' | 'outlined' | 'elevated';
3
3
  padding?: 'none' | 'sm' | 'md' | 'lg';
4
4
  children: React.ReactNode;
5
5
  className?: string;
6
6
  }
7
- export interface CardHeaderProps {
7
+ export interface RudiCardHeaderProps {
8
8
  children: React.ReactNode;
9
9
  className?: string;
10
10
  }
11
- export interface CardBodyProps {
11
+ export interface RudiCardBodyProps {
12
12
  children: React.ReactNode;
13
13
  className?: string;
14
14
  }
15
- export interface CardFooterProps {
15
+ export interface RudiCardFooterProps {
16
16
  children: React.ReactNode;
17
17
  className?: string;
18
18
  }
19
- declare function CardHeader({ children, className }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
20
- declare function CardBody({ children, className }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
21
- declare function CardFooter({ children, className }: CardFooterProps): import("react/jsx-runtime").JSX.Element;
22
- export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>> & {
19
+ declare function CardHeader({ children, className }: RudiCardHeaderProps): import("react/jsx-runtime").JSX.Element;
20
+ declare function CardBody({ children, className }: RudiCardBodyProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function CardFooter({ children, className }: RudiCardFooterProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare const RudiCard: import('react').ForwardRefExoticComponent<RudiCardProps & import('react').RefAttributes<HTMLDivElement>> & {
23
23
  Header: typeof CardHeader;
24
24
  Body: typeof CardBody;
25
25
  Footer: typeof CardFooter;
@@ -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,SAAS;IACxB,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,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAuBD,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,2CAI3D;AAED,iBAAS,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,2CAIvD;AAED,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,2CAI3D;AAED,eAAO,MAAM,IAAI;;;;CAIf,CAAA"}
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;;;;CAInB,CAAA"}