rudiment-ui 0.5.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kanbanMoves.d.ts","sourceRoot":"","sources":["../../../src/components/Kanban/kanbanMoves.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAKlF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,MAAM,EAAE,MAAM,oCAE/E;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,EAAE,EAAE,EAAE,MAAM,oCAExE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,oBAAoB,EAAE,EAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,GACb,oBAAoB,EAAE,CAYxB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,oBAAoB,EAAE,EAC/B,OAAO,EAAE,oBAAoB,EAAE,EAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,uBAAuB,GAAG,IAAI,CAUhC"}
|
|
@@ -1,16 +1,37 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/** Props for `RudiLink`. Also accepts any native anchor attribute, which is spread onto the `a` element. */
|
|
2
3
|
export interface RudiLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
4
|
+
/** Destination URL. */
|
|
3
5
|
href: string;
|
|
4
6
|
/**
|
|
5
|
-
* `default`
|
|
6
|
-
*
|
|
7
|
+
* `default` inherits weight and uses the brand color; `subtle` is muted until hover; `standalone` is a self-contained link (e.g. "Learn more") in a heavier weight, laid out inline-flex so an icon child sits beside the text.
|
|
8
|
+
* @default 'default'
|
|
7
9
|
*/
|
|
8
10
|
variant?: 'default' | 'subtle' | 'standalone';
|
|
11
|
+
/**
|
|
12
|
+
* When the underline is drawn.
|
|
13
|
+
* @default 'hover'
|
|
14
|
+
*/
|
|
9
15
|
underline?: 'always' | 'hover' | 'none';
|
|
10
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Opens in a new tab with safe `rel` and appends an external-link icon.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
11
20
|
external?: boolean;
|
|
21
|
+
/** Link text or content. */
|
|
12
22
|
children: React.ReactNode;
|
|
23
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
13
24
|
className?: string;
|
|
14
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Styled anchor for navigation. Use `RudiButton` for actions that do not navigate.
|
|
28
|
+
* Same-tab clicks route client-side when a `RudiRouterProvider` is mounted, and behave as a plain link otherwise. With `external`, the link opens in a new tab with `rel="noreferrer noopener"` and shows an arrow icon. Forwards its ref to the `a`.
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <RudiLink href="https://example.com/docs" external>
|
|
32
|
+
* Read the docs
|
|
33
|
+
* </RudiLink>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
15
36
|
export declare const RudiLink: React.ForwardRefExoticComponent<RudiLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
16
37
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,YAAY,CAAA;AAEnB,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAA;IAC7C,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IACvC
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,YAAY,CAAA;AAEnB,4GAA4G;AAC5G,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAA;IAC7C;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IACvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,4BAA4B;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,yFA6CpB,CAAA"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { Keyboard as AriaKeyboard } from 'react-aria-components';
|
|
3
|
+
/** Props for `RudiKeyboard`. Accepts the props of React Aria's `Keyboard` (a `<kbd>` element). */
|
|
3
4
|
export type RudiKeyboardProps = ComponentProps<typeof AriaKeyboard>;
|
|
5
|
+
/**
|
|
6
|
+
* Keyboard shortcut hint, styled as the trailing shortcut text of a menu item. `RudiMenuItem`
|
|
7
|
+
* renders it for you through its `shortcut` prop. Use it directly only for custom item content.
|
|
8
|
+
* The hint is visual only; it does not bind the shortcut.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <RudiKeyboard>⌘S</RudiKeyboard>
|
|
12
|
+
*/
|
|
4
13
|
export declare function RudiKeyboard({ className, ...props }: RudiKeyboardProps): import("react/jsx-runtime").JSX.Element;
|
|
5
14
|
//# sourceMappingURL=Keyboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keyboard.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Keyboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGhE,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAA;AAEnE,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAOtE"}
|
|
1
|
+
{"version":3,"file":"Keyboard.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Keyboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGhE,kGAAkG;AAClG,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,YAAY,CAAC,CAAA;AAEnE;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAOtE"}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { MenuProps as AriaMenuProps } from 'react-aria-components';
|
|
2
|
+
/** Props for `RudiMenu`. Inherits the collection, selection and `onAction` props of React Aria's `Menu`. */
|
|
2
3
|
export interface RudiMenuProps<T extends object> extends AriaMenuProps<T> {
|
|
4
|
+
/** Class merged onto the menu list element, not the popover. */
|
|
3
5
|
className?: string;
|
|
4
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* The popover and item list of a menu. Place it inside `RudiMenuTrigger`, after the trigger
|
|
9
|
+
* element, and fill it with `RudiMenuItem`, `RudiMenuSection` and `RudiMenuSeparator`. It renders
|
|
10
|
+
* its own popover, so do not wrap it in one. Handle activation with `onAction` (receives the item
|
|
11
|
+
* key), or use `selectionMode` and `onSelectionChange` for checkable items.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <RudiMenu onAction={(key) => console.log(key)}>
|
|
15
|
+
* <RudiMenuItem id="edit" label="Edit" />
|
|
16
|
+
* </RudiMenu>
|
|
17
|
+
*/
|
|
5
18
|
export declare function RudiMenu<T extends object>({ className, ...props }: RudiMenuProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
6
19
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,IAAI,aAAa,EAEhC,MAAM,uBAAuB,CAAA;AAE9B,OAAO,YAAY,CAAA;AAEnB,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,2CASnF"}
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,IAAI,aAAa,EAEhC,MAAM,uBAAuB,CAAA;AAE9B,OAAO,YAAY,CAAA;AAEnB,4GAA4G;AAC5G,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IACvE,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,2CASnF"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { MenuItemProps as AriaMenuItemProps } from 'react-aria-components';
|
|
3
|
+
/** Props for `RudiMenuItem`. Inherits `id`, `href`, `onAction`, `isDisabled` and `textValue` from React Aria's `MenuItem`. */
|
|
3
4
|
export interface RudiMenuItemProps extends AriaMenuItemProps {
|
|
5
|
+
/** Styles the item as a destructive action (for example Delete) and sets `data-destructive`. */
|
|
4
6
|
isDestructive?: boolean;
|
|
5
7
|
/** Iconify icon name rendered before the label. */
|
|
6
8
|
icon?: string;
|
|
@@ -11,5 +13,14 @@ export interface RudiMenuItemProps extends AriaMenuItemProps {
|
|
|
11
13
|
/** Keyboard shortcut hint shown at the trailing edge. */
|
|
12
14
|
shortcut?: ReactNode;
|
|
13
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A single action in a `RudiMenu`. Give it a `label` (plus optional `icon`, `description` and
|
|
18
|
+
* `shortcut`) for structured content, or pass plain `children`. Give every item an `id`, which is
|
|
19
|
+
* the key delivered to the menu's `onAction`. When `children` is not a plain string and no `label`
|
|
20
|
+
* is set, pass `textValue` so typeahead works.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <RudiMenuItem id="delete" label="Delete" icon="mdi:delete" shortcut="⌫" isDestructive />
|
|
24
|
+
*/
|
|
14
25
|
export declare function RudiMenuItem({ isDestructive, icon, label, description, shortcut, className, textValue, children, ...props }: RudiMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
15
26
|
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAGL,KAAK,aAAa,IAAI,iBAAiB,EACxC,MAAM,uBAAuB,CAAA;AAK9B,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,aAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,2CA6CnB"}
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAGL,KAAK,aAAa,IAAI,iBAAiB,EACxC,MAAM,uBAAuB,CAAA;AAK9B,8HAA8H;AAC9H,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,gGAAgG;IAChG,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,aAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,2CA6CnB"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { MenuSectionProps as AriaMenuSectionProps } from 'react-aria-components';
|
|
2
|
+
/** Props for `RudiMenuSection`. Inherits `items` and `children` from React Aria's `MenuSection`. */
|
|
2
3
|
export interface RudiMenuSectionProps<T extends object> extends AriaMenuSectionProps<T> {
|
|
4
|
+
/** Heading rendered above the section's items. Omit for an unlabelled group. */
|
|
3
5
|
title?: string;
|
|
6
|
+
/** Class merged onto the section element. */
|
|
4
7
|
className?: string;
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Groups related `RudiMenuItem`s inside a `RudiMenu`, with an optional `title` heading. Use
|
|
11
|
+
* `RudiMenuSeparator` instead when you only need a divider with no heading.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <RudiMenuSection title="Danger zone">
|
|
15
|
+
* <RudiMenuItem id="delete" label="Delete" isDestructive />
|
|
16
|
+
* </RudiMenuSection>
|
|
17
|
+
*/
|
|
6
18
|
export declare function RudiMenuSection<T extends object>({ title, className, children, ...props }: RudiMenuSectionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
7
19
|
//# sourceMappingURL=MenuSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuSection.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,IAAI,oBAAoB,EAG9C,MAAM,uBAAuB,CAAA;AAG9B,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,CACpD,SAAQ,oBAAoB,CAAC,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,EAChD,KAAK,EACL,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CASzB"}
|
|
1
|
+
{"version":3,"file":"MenuSection.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,IAAI,oBAAoB,EAG9C,MAAM,uBAAuB,CAAA;AAG9B,oGAAoG;AACpG,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,CACpD,SAAQ,oBAAoB,CAAC,CAAC,CAAC;IAC/B,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,EAChD,KAAK,EACL,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CASzB"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { SeparatorProps } from 'react-aria-components';
|
|
2
|
+
/** Props for `RudiMenuSeparator`. Accepts the props of React Aria's `Separator`. */
|
|
2
3
|
export interface RudiMenuSeparatorProps extends SeparatorProps {
|
|
3
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Horizontal divider between groups of items in a `RudiMenu`. Use `RudiMenuSection` when the
|
|
7
|
+
* group also needs a heading.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <RudiMenuSeparator />
|
|
11
|
+
*/
|
|
4
12
|
export declare function RudiMenuSeparator({ className, ...props }: RudiMenuSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
5
13
|
//# sourceMappingURL=MenuSeparator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuSeparator.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSeparator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGtE,MAAM,WAAW,sBAAuB,SAAQ,cAAc;CAAG;AAEjE,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,2CAOhF"}
|
|
1
|
+
{"version":3,"file":"MenuSeparator.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuSeparator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAGtE,oFAAoF;AACpF,MAAM,WAAW,sBAAuB,SAAQ,cAAc;CAAG;AAEjE;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,2CAOhF"}
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { MenuTriggerProps as AriaMenuTriggerProps } from 'react-aria-components';
|
|
2
|
+
/** Props for `RudiMenuTrigger`. Inherits `isOpen`, `defaultOpen`, `onOpenChange` and `trigger` from React Aria's `MenuTrigger`. */
|
|
2
3
|
export interface RudiMenuTriggerProps extends AriaMenuTriggerProps {
|
|
3
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Connects a pressable trigger to a `RudiMenu`. It takes exactly two children: the trigger
|
|
7
|
+
* element first (a `RudiButton` or `RudiIconButton`, which handle `onPress`), then the `RudiMenu`.
|
|
8
|
+
* Open state is uncontrolled unless you pass `isOpen` and `onOpenChange`.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <RudiMenuTrigger>
|
|
12
|
+
* <RudiButton variant="secondary">Actions</RudiButton>
|
|
13
|
+
* <RudiMenu onAction={(key) => console.log(key)}>
|
|
14
|
+
* <RudiMenuItem id="edit" label="Edit" />
|
|
15
|
+
* <RudiMenuSeparator />
|
|
16
|
+
* <RudiMenuItem id="delete" label="Delete" isDestructive />
|
|
17
|
+
* </RudiMenu>
|
|
18
|
+
* </RudiMenuTrigger>
|
|
19
|
+
*/
|
|
4
20
|
export declare function RudiMenuTrigger(props: RudiMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
21
|
//# sourceMappingURL=MenuTrigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,IAAI,oBAAoB,EAC9C,MAAM,uBAAuB,CAAA;AAE9B,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;CAAG;AAErE,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAE1D"}
|
|
1
|
+
{"version":3,"file":"MenuTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,IAAI,oBAAoB,EAC9C,MAAM,uBAAuB,CAAA;AAE9B,mIAAmI;AACnI,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;CAAG;AAErE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAE1D"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { SubmenuTriggerProps as AriaSubmenuTriggerProps } from 'react-aria-components';
|
|
2
|
+
/** Props for `RudiSubmenuTrigger`. Inherits `delay` from React Aria's `SubmenuTrigger`. */
|
|
2
3
|
export interface RudiSubmenuTriggerProps extends AriaSubmenuTriggerProps {
|
|
3
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Nests a menu inside a `RudiMenu`. It takes two children: the `RudiMenuItem` that opens the
|
|
7
|
+
* submenu, then a `RudiMenu` holding the nested items.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <RudiSubmenuTrigger>
|
|
11
|
+
* <RudiMenuItem id="share" label="Share" />
|
|
12
|
+
* <RudiMenu>
|
|
13
|
+
* <RudiMenuItem id="email" label="Email" />
|
|
14
|
+
* </RudiMenu>
|
|
15
|
+
* </RudiSubmenuTrigger>
|
|
16
|
+
*/
|
|
4
17
|
export declare function RudiSubmenuTrigger(props: RudiSubmenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
18
|
//# sourceMappingURL=SubmenuTrigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmenuTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/SubmenuTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,IAAI,uBAAuB,EACpD,MAAM,uBAAuB,CAAA;AAE9B,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;CAAG;AAE3E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAEhE"}
|
|
1
|
+
{"version":3,"file":"SubmenuTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/SubmenuTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,IAAI,uBAAuB,EACpD,MAAM,uBAAuB,CAAA;AAE9B,2FAA2F;AAC3F,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;CAAG;AAE3E;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAEhE"}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface RudiNavItemProps {
|
|
3
|
+
/** Visible text and accessible name of the item. */
|
|
3
4
|
label: string;
|
|
5
|
+
/** Iconify icon name shown before the label, such as `"mdi:home"`. */
|
|
4
6
|
icon?: string;
|
|
7
|
+
/** Marks the item as the current location and applies the active style; sets `aria-current`. */
|
|
5
8
|
isActive?: boolean;
|
|
9
|
+
/** Renders the item as a link to this URL; without it the item is a button. Routes client-side under `RudiRouterProvider`. */
|
|
6
10
|
href?: string;
|
|
11
|
+
/** Called when the item is activated by pointer, keyboard, or touch. Use this, not `onClick`. */
|
|
7
12
|
onPress?: () => void;
|
|
13
|
+
/** Content shown after the label, such as a count. */
|
|
8
14
|
badge?: React.ReactNode;
|
|
15
|
+
/** Prevents interaction and applies the disabled style. */
|
|
9
16
|
isDisabled?: boolean;
|
|
17
|
+
/** Extra class names, merged with the built-in classes. */
|
|
10
18
|
className?: string;
|
|
11
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Navigation entry for a sidebar: an `a` when `href` is set, otherwise a `button`. Use it inside `RudiAppShell.Sidebar`; it does not spread DOM props. The ref points to whichever element renders.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <RudiNavItem label="Projects" icon="mdi:folder" href="/projects" isActive />
|
|
25
|
+
*/
|
|
12
26
|
export declare const RudiNavItem: React.ForwardRefExoticComponent<RudiNavItemProps & React.RefAttributes<HTMLElement>>;
|
|
13
27
|
//# sourceMappingURL=NavItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../../../src/components/NavItem/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,gBAAgB,CAAA;AAEvB,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAyED,eAAO,MAAM,WAAW,sFAiBvB,CAAA"}
|
|
1
|
+
{"version":3,"file":"NavItem.d.ts","sourceRoot":"","sources":["../../../src/components/NavItem/NavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,gBAAgB,CAAA;AAEvB,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,8HAA8H;IAC9H,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,sDAAsD;IACtD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAyED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,sFAiBvB,CAAA"}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/** Props for `RudiNumberField`. */
|
|
2
3
|
export interface RudiNumberFieldProps {
|
|
4
|
+
/** Visible label and the field's accessible name. Required. */
|
|
3
5
|
label: string;
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* Hides the label visually but keeps it as the accessible name.
|
|
8
|
+
* @default false
|
|
7
9
|
*/
|
|
8
10
|
labelHidden?: boolean;
|
|
9
11
|
/** Controlled value. `null` renders an empty field. */
|
|
10
12
|
value?: number | null;
|
|
13
|
+
/** Initial value for an uncontrolled field. `null` starts empty. */
|
|
11
14
|
defaultValue?: number | null;
|
|
12
15
|
/** Receives the parsed number, or `null` when the field is cleared. */
|
|
13
16
|
onChange?: (value: number | null) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Smallest allowed value; the stepper and arrow keys stop here and typed values clamp to it.
|
|
19
|
+
*/
|
|
14
20
|
minValue?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Largest allowed value; the stepper and arrow keys stop here and typed values clamp to it.
|
|
23
|
+
*/
|
|
15
24
|
maxValue?: number;
|
|
16
25
|
/** Increment for the stepper buttons and arrow keys; values snap to it. */
|
|
17
26
|
step?: number;
|
|
@@ -20,18 +29,42 @@ export interface RudiNumberFieldProps {
|
|
|
20
29
|
* `{ style: 'percent' }`. Percent values are fractions (`0.25` shows `25%`).
|
|
21
30
|
*/
|
|
22
31
|
formatOptions?: Intl.NumberFormatOptions;
|
|
32
|
+
/** Hint text shown while the field is empty. Not a substitute for `label`. */
|
|
23
33
|
placeholder?: string;
|
|
34
|
+
/** Help text under the field. Hidden while `errorMessage` is shown. */
|
|
24
35
|
description?: string;
|
|
25
36
|
/** Shows the message and marks the field invalid. */
|
|
26
37
|
errorMessage?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Marks the field required and adds an asterisk to the label.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
27
42
|
isRequired?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Disables the field and its stepper buttons.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
28
47
|
isDisabled?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Makes the value selectable and focusable but not editable.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
29
52
|
isReadOnly?: boolean;
|
|
30
53
|
/** Form field name; submits the raw number. */
|
|
31
54
|
name?: string;
|
|
32
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Hides the minus and plus buttons; arrow keys still change the value.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
33
59
|
hideStepper?: boolean;
|
|
60
|
+
/** Extra class names for the wrapper element, merged with the component's own classes. */
|
|
34
61
|
className?: string;
|
|
35
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* A numeric field with locale-aware parsing, optional currency or percent formatting, and stepper buttons. Use it instead of `RudiInput type="number"`. `label` is required. `onChange` receives a number, or `null` when cleared. Ref points at the `<input>`.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* <RudiNumberField label="Quantity" minValue={1} value={qty} onChange={setQty} />
|
|
68
|
+
*/
|
|
36
69
|
export declare const RudiNumberField: React.ForwardRefExoticComponent<RudiNumberFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
37
70
|
//# sourceMappingURL=NumberField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,OAAO,oBAAoB,CAAA;AAE3B,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAA;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,OAAO,oBAAoB,CAAA;AAE3B,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAA;IACxC,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAKD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,+FAwF3B,CAAA"}
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface RudiPageHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
/** Page title, rendered as the heading. */
|
|
3
4
|
title: React.ReactNode;
|
|
5
|
+
/** Supporting line below the title, in caption text. */
|
|
4
6
|
subtitle?: React.ReactNode;
|
|
7
|
+
/** Content above the title, e.g. a breadcrumb or a small overline. Rendered in a `div`. */
|
|
8
|
+
eyebrow?: React.ReactNode;
|
|
9
|
+
/** Content below the subtitle, e.g. a row of badges or key facts. Rendered in a `div`. */
|
|
10
|
+
meta?: React.ReactNode;
|
|
5
11
|
/** Content pinned to the inline-end, e.g. primary page actions. */
|
|
6
12
|
actions?: React.ReactNode;
|
|
7
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Heading level for the title. Defaults to 1.
|
|
15
|
+
*
|
|
16
|
+
* @default 1
|
|
17
|
+
*/
|
|
8
18
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
19
|
+
/** Extra class names, merged with the built-in classes. */
|
|
9
20
|
className?: string;
|
|
10
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Title block for a page: heading with optional eyebrow, subtitle, metadata, and an actions slot. Use it once at the top of a page; use `RudiSectionHeader` for sections within a page. The title is visually sized 2 whatever `headingLevel` is. Other DOM props go on the root `div`.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <RudiPageHeader title="Projects" subtitle="12 active" actions={<RudiButton onPress={create}>New</RudiButton>} />
|
|
27
|
+
*/
|
|
11
28
|
export declare const RudiPageHeader: React.ForwardRefExoticComponent<RudiPageHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
29
|
//# sourceMappingURL=PageHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/PageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,mBAAmB,CAAA;AAE1B,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC3D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,mEAAmE;IACnE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/PageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,mBAAmB,CAAA;AAE1B,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC3D,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,2FAA2F;IAC3F,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,0FAA0F;IAC1F,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,mEAAmE;IACnE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACpC,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,4FAsC1B,CAAA"}
|
|
@@ -1,14 +1,31 @@
|
|
|
1
|
+
/** Props for `RudiPagination`. */
|
|
1
2
|
export interface RudiPaginationProps {
|
|
2
3
|
/** Current page (1-based). */
|
|
3
4
|
page: number;
|
|
4
5
|
/** Total number of pages. */
|
|
5
6
|
pageCount: number;
|
|
7
|
+
/** Called with the new 1-based page number when the user picks a page. Not called when the target is the current page. */
|
|
6
8
|
onPageChange: (page: number) => void;
|
|
7
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Pages shown on each side of the current page before truncating.
|
|
11
|
+
* @default 1
|
|
12
|
+
*/
|
|
8
13
|
siblingCount?: number;
|
|
9
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Accessible label for the nav landmark.
|
|
16
|
+
* @default 'Pagination'
|
|
17
|
+
*/
|
|
10
18
|
label?: string;
|
|
19
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
11
20
|
className?: string;
|
|
12
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Page navigation with previous and next buttons and numbered pages, truncated with ellipses for long ranges. Controlled: the parent owns `page`. A `page` outside 1 to `pageCount` is clamped for rendering.
|
|
24
|
+
* Renders nothing when `pageCount` is 1 or less.
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <RudiPagination page={page} pageCount={12} onPageChange={setPage} />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
13
30
|
export declare function RudiPagination({ page, pageCount, onPageChange, siblingCount, label, className, }: RudiPaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
31
|
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAIA,OAAO,kBAAkB,CAAA;AAEzB,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,0HAA0H;IAC1H,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAwDD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,YAAgB,EAChB,KAAoB,EACpB,SAAS,GACV,EAAE,mBAAmB,kDA2DrB"}
|
|
@@ -1,24 +1,58 @@
|
|
|
1
|
+
/** Semantic color of the progress fill. */
|
|
1
2
|
export type RudiProgressBarVariant = 'default' | 'success' | 'warning' | 'error';
|
|
3
|
+
/** Switches the fill color once progress reaches a percentage. */
|
|
2
4
|
export interface RudiProgressBarThreshold {
|
|
3
5
|
/** Minimum percentage (0–100) at which this variant takes effect. */
|
|
4
6
|
at: number;
|
|
7
|
+
/** Fill variant used once `at` is reached. */
|
|
5
8
|
variant: RudiProgressBarVariant;
|
|
6
9
|
}
|
|
10
|
+
/** Props for `RudiProgressBar`. */
|
|
7
11
|
export interface RudiProgressBarProps {
|
|
12
|
+
/** Current progress, between `minValue` and `maxValue`. */
|
|
8
13
|
value: number;
|
|
14
|
+
/**
|
|
15
|
+
* Value that represents 0%.
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
9
18
|
minValue?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Value that represents 100%.
|
|
21
|
+
* @default 100
|
|
22
|
+
*/
|
|
10
23
|
maxValue?: number;
|
|
24
|
+
/** Accessible name, also displayed above the bar. */
|
|
11
25
|
label: string;
|
|
26
|
+
/**
|
|
27
|
+
* Shows the rounded percentage beside the label.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
12
30
|
showValueLabel?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Fill color when no threshold applies.
|
|
33
|
+
* @default 'default'
|
|
34
|
+
*/
|
|
13
35
|
variant?: RudiProgressBarVariant;
|
|
14
36
|
/**
|
|
15
|
-
* Percentage-driven fill color. The highest `at` the current percentage
|
|
16
|
-
* meets or exceeds wins; below every threshold the `variant` prop applies.
|
|
37
|
+
* Percentage-driven fill color. The highest `at` the current percentage meets or exceeds wins; below every threshold the `variant` prop applies.
|
|
17
38
|
* e.g. `[{ at: 80, variant: 'warning' }, { at: 100, variant: 'error' }]`.
|
|
18
39
|
*/
|
|
19
40
|
thresholds?: RudiProgressBarThreshold[];
|
|
41
|
+
/**
|
|
42
|
+
* Thickness of the track.
|
|
43
|
+
* @default 'md'
|
|
44
|
+
*/
|
|
20
45
|
size?: 'sm' | 'md';
|
|
46
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
21
47
|
className?: string;
|
|
22
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Horizontal bar showing determinate progress. Use `RudiCircularProgress` for a compact circular form.
|
|
51
|
+
* `label` is required and is the accessible name; it is also shown above the bar. The fill is clamped to 0 to 100%.
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <RudiProgressBar label="Storage used" value={72} showValueLabel thresholds={[{ at: 90, variant: 'error' }]} />
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
23
57
|
export declare function RudiProgressBar({ value, minValue, maxValue, label, showValueLabel, variant, thresholds, size, className, }: RudiProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
24
58
|
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAA;AAE3B,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AAEhF,MAAM,WAAW,wBAAwB;IACvC,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,sBAAsB,CAAA;CAChC;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,sBAAsB,CAAA;IAChC
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAA;AAE3B,2CAA2C;AAC3C,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AAEhF,kEAAkE;AAClE,MAAM,WAAW,wBAAwB;IACvC,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,OAAO,EAAE,sBAAsB,CAAA;CAChC;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAA;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAA;IACvC;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAeD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAY,EACZ,QAAc,EACd,KAAK,EACL,cAAsB,EACtB,OAAmB,EACnB,UAAU,EACV,IAAW,EACX,SAAS,GACV,EAAE,oBAAoB,2CA4CtB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Props for `RudiRadio`. */
|
|
1
2
|
export interface RudiRadioProps {
|
|
2
3
|
/** The value submitted and reported to the group's `onChange` when this option is selected. */
|
|
3
4
|
value: string;
|
|
@@ -5,11 +6,15 @@ export interface RudiRadioProps {
|
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
/** Disables just this option. A disabled group disables every option. */
|
|
7
8
|
isDisabled?: boolean;
|
|
9
|
+
/** Extra class names, merged with the component's own classes. */
|
|
8
10
|
className?: string;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* A single option inside `RudiRadioGroup`. Must be rendered as a descendant of
|
|
12
|
-
* a `RudiRadioGroup`, which owns the selection state.
|
|
14
|
+
* a `RudiRadioGroup`, which owns the selection state. The ref points at the `<input>`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <RudiRadio value="monthly">Monthly</RudiRadio>
|
|
13
18
|
*/
|
|
14
19
|
export declare const RudiRadio: import('react').ForwardRefExoticComponent<RudiRadioProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
15
20
|
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/Radio.tsx"],"names":[],"mappings":"AAKA,OAAO,mBAAmB,CAAA;AAE1B,MAAM,WAAW,cAAc;IAC7B,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/Radio.tsx"],"names":[],"mappings":"AAKA,OAAO,mBAAmB,CAAA;AAE1B,6BAA6B;AAC7B,MAAM,WAAW,cAAc;IAC7B,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,6GA6BrB,CAAA"}
|
|
@@ -1,16 +1,40 @@
|
|
|
1
1
|
import { RadioGroupState } from 'react-stately';
|
|
2
|
+
/** Internal context that shares the group's selection state with `RudiRadio`. Not part of the public API. */
|
|
2
3
|
export declare const RadioGroupContext: import('react').Context<RadioGroupState | null>;
|
|
4
|
+
/** Props for `RudiRadioGroup`. */
|
|
3
5
|
export interface RudiRadioGroupProps {
|
|
6
|
+
/** Group legend and accessible name. Required. */
|
|
4
7
|
label: string;
|
|
8
|
+
/** Help text under the group. Hidden while `errorMessage` is shown. */
|
|
5
9
|
description?: string;
|
|
10
|
+
/** Controlled value of the selected `RudiRadio`. Pair with `onChange`. */
|
|
6
11
|
value?: string;
|
|
12
|
+
/** Initial selected value for an uncontrolled group. */
|
|
7
13
|
defaultValue?: string;
|
|
14
|
+
/** Called with the selected option's `value` (a string, not an event). */
|
|
8
15
|
onChange?: (value: string) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Lays the options out in a row or a column. Also sets arrow-key behaviour for assistive tech. Unset renders vertically.
|
|
18
|
+
*/
|
|
9
19
|
orientation?: 'horizontal' | 'vertical';
|
|
20
|
+
/** Disables every option in the group. */
|
|
10
21
|
isDisabled?: boolean;
|
|
22
|
+
/** Error text shown under the group. Setting it marks the group invalid. */
|
|
11
23
|
errorMessage?: string;
|
|
24
|
+
/** The `RudiRadio` elements. */
|
|
12
25
|
children: React.ReactNode;
|
|
26
|
+
/** Extra class names for the group element, merged with the component's own classes. */
|
|
13
27
|
className?: string;
|
|
14
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A labelled set of mutually exclusive `RudiRadio` options. `label` is required. The value is the selected
|
|
31
|
+
* option's `value` string.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* <RudiRadioGroup label="Billing" value={plan} onChange={setPlan}>
|
|
35
|
+
* <RudiRadio value="monthly">Monthly</RudiRadio>
|
|
36
|
+
* <RudiRadio value="yearly">Yearly</RudiRadio>
|
|
37
|
+
* </RudiRadioGroup>
|
|
38
|
+
*/
|
|
15
39
|
export declare function RudiRadioGroup(props: RudiRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
16
40
|
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,mBAAmB,CAAA;AAE1B,eAAO,MAAM,iBAAiB,iDAA8C,CAAA;AAE5E,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAsCxD"}
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,mBAAmB,CAAA;AAE1B,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,iDAA8C,CAAA;AAE5E,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gCAAgC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAsCxD"}
|
|
@@ -1,18 +1,38 @@
|
|
|
1
|
+
/** Props for `RudiRating`. */
|
|
1
2
|
export interface RudiRatingProps {
|
|
2
|
-
/** Current rating. Supports halves (e.g. `4.5`). */
|
|
3
|
+
/** Current rating. Supports halves (e.g. `4.5`) in static mode. When `onChange` is set the value is rounded to the nearest whole number for display and selection, so half stars appear only in static mode. */
|
|
3
4
|
value: number;
|
|
4
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Number of stars.
|
|
7
|
+
* @default 5
|
|
8
|
+
*/
|
|
5
9
|
max?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Size of the stars.
|
|
12
|
+
* @default 'md'
|
|
13
|
+
*/
|
|
6
14
|
size?: 'sm' | 'md' | 'lg';
|
|
7
|
-
/**
|
|
15
|
+
/** Makes the rating interactive. Called with the new rating (1 to `max`) when a star is chosen by pointer or keyboard (Arrow keys move and select, Home and End jump to the first and last star); receives the value, not an event. */
|
|
8
16
|
onChange?: (value: number) => void;
|
|
9
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Shows the numeric value (e.g. `4.8`) beside the stars.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
10
21
|
showValue?: boolean;
|
|
11
|
-
/**
|
|
22
|
+
/** Review count rendered beside the stars, e.g. `(128)`. */
|
|
12
23
|
count?: number;
|
|
13
|
-
/** Accessible
|
|
24
|
+
/** Accessible name. Defaults to `"Rated {value} out of {max}"`. */
|
|
14
25
|
label?: string;
|
|
26
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
15
27
|
className?: string;
|
|
16
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Star rating display that becomes an input when `onChange` is provided. Static mode is a single `role="img"`; interactive mode is a `radiogroup` of one native radio input per star, with a single tab stop and arrow-key navigation.
|
|
31
|
+
* Controlled only: the parent owns `value`. In interactive mode `value` is rounded to a whole number for display and selection, so half stars appear only in static mode.
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* <RudiRating value={rating} onChange={setRating} label="Rate this product" />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
17
37
|
export declare function RudiRating({ value, max, size, onChange, showValue, count, label, className, }: RudiRatingProps): import("react/jsx-runtime").JSX.Element;
|
|
18
38
|
//# sourceMappingURL=Rating.d.ts.map
|