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
|
@@ -1,11 +1,38 @@
|
|
|
1
|
+
/** Props for `RudiTag`. */
|
|
1
2
|
export interface RudiTagProps {
|
|
3
|
+
/**
|
|
4
|
+
* Semantic color of the tag.
|
|
5
|
+
* @default 'default'
|
|
6
|
+
*/
|
|
2
7
|
variant?: 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
8
|
+
/**
|
|
9
|
+
* Shows a remove control that hides the tag when pressed.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
3
12
|
dismissible?: boolean;
|
|
13
|
+
/** Called after the user removes the tag. Not called when `isDisabled` is set. */
|
|
4
14
|
onDismiss?: () => void;
|
|
15
|
+
/** Makes the tag's content a button; called when it is pressed. Without it the tag is static text. The remove control stays a separate sibling button. */
|
|
5
16
|
onPress?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Disables the tag's press behavior and its remove control, and marks it `aria-disabled`.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
6
21
|
isDisabled?: boolean;
|
|
22
|
+
/** Tag content, usually a short string. */
|
|
7
23
|
children: React.ReactNode;
|
|
24
|
+
/** Extra class names, merged with the component's own classes rather than replacing them. */
|
|
8
25
|
className?: string;
|
|
9
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Compact label for a keyword, filter, or selection. Becomes a button when `onPress` is set (the tag stays a non-interactive wrapper around two sibling buttons), and shows a remove control when `dismissible`. Use `RudiBadge` for status that is never interactive.
|
|
29
|
+
* Dismissal is internal: the tag unmounts after the remove control is pressed. The remove button is labelled "Remove {children}" when `children` is a string, otherwise "Remove".
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <RudiTag variant="info" dismissible onDismiss={() => removeFilter('open')}>
|
|
33
|
+
* Open
|
|
34
|
+
* </RudiTag>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
10
37
|
export declare function RudiTag({ variant, dismissible, onDismiss, onPress, isDisabled, children, className, }: RudiTagProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
38
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAIA,OAAO,WAAW,CAAA;AAElB,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,OAAO,CAAC,EACtB,OAAmB,EACnB,WAAmB,EACnB,SAAS,EACT,OAAO,EACP,UAAkB,EAClB,QAAQ,EACR,SAAS,GACV,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAIA,OAAO,WAAW,CAAA;AAElB,2BAA2B;AAC3B,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC9D;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,0JAA0J;IAC1J,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,2CAA2C;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAmB,EACnB,WAAmB,EACnB,SAAS,EACT,OAAO,EACP,UAAkB,EAClB,QAAQ,EACR,SAAS,GACV,EAAE,YAAY,kDAoDd"}
|
|
@@ -1,17 +1,60 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/** Props for `RudiTextarea`. */
|
|
2
3
|
export interface RudiTextareaProps {
|
|
4
|
+
/** Visible label and the field's accessible name. Required. */
|
|
3
5
|
label: string;
|
|
6
|
+
/** Hint text shown while the field is empty. Not a substitute for `label`. */
|
|
4
7
|
placeholder?: string;
|
|
8
|
+
/** Help text under the field. Hidden while `errorMessage` is shown. */
|
|
5
9
|
description?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Error text shown under the field. Setting it marks the field invalid; leave it unset when the value is valid.
|
|
12
|
+
*/
|
|
6
13
|
errorMessage?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Marks the field required and adds an asterisk to the label.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
7
18
|
isRequired?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Disables the field.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
8
23
|
isDisabled?: boolean;
|
|
24
|
+
/** Controlled value. Pair with `onChange`. */
|
|
9
25
|
value?: string;
|
|
26
|
+
/** Initial value for an uncontrolled field. */
|
|
10
27
|
defaultValue?: string;
|
|
28
|
+
/** Called with the new text (a string, not an event) on every edit. */
|
|
11
29
|
onChange?: (value: string) => void;
|
|
30
|
+
/** Called when the field loses focus, e.g. to validate on blur. */
|
|
31
|
+
onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
32
|
+
/** Form field name, for native form submission. */
|
|
33
|
+
name?: string;
|
|
34
|
+
/** Maximum number of characters the user can enter. */
|
|
35
|
+
maxLength?: number;
|
|
36
|
+
/** Makes the value selectable and focusable but not editable. */
|
|
37
|
+
isReadOnly?: boolean;
|
|
38
|
+
/** Focuses the field on mount. */
|
|
39
|
+
autoFocus?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Visible height in text rows.
|
|
42
|
+
* @default 4
|
|
43
|
+
*/
|
|
12
44
|
rows?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Which directions the user can drag-resize the field.
|
|
47
|
+
* @default 'vertical'
|
|
48
|
+
*/
|
|
13
49
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
50
|
+
/** Extra class names for the wrapper element, merged with the component's own classes. */
|
|
14
51
|
className?: string;
|
|
15
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* A multi-line text field with label, description and error message. `label` is required and is the accessible name. `onChange` receives the string value, not an event. The ref points at the `<textarea>`.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* <RudiTextarea label="Notes" rows={6} value={notes} onChange={setNotes} />
|
|
58
|
+
*/
|
|
16
59
|
export declare const RudiTextarea: React.ForwardRefExoticComponent<RudiTextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
17
60
|
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,gBAAgB,CAAA;AAEvB,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CA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,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IAC/D,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kCAAkC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IACpD,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,+FAuFvB,CAAA"}
|
|
@@ -1,15 +1,29 @@
|
|
|
1
|
+
/** Props for `RudiToastRegion`. */
|
|
1
2
|
export interface RudiToastRegionProps {
|
|
2
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Where the toasts stack: the top or bottom inline-end corner of the viewport, or bottom center.
|
|
5
|
+
* @default 'bottom-end'
|
|
6
|
+
*/
|
|
3
7
|
placement?: 'top-end' | 'bottom-end' | 'bottom-center';
|
|
4
8
|
/** Accessible name for the notifications landmark. Defaults to a localized "Notifications" label. */
|
|
5
9
|
'aria-label'?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Accessible label of every toast's close button.
|
|
12
|
+
* @default 'Close'
|
|
13
|
+
*/
|
|
14
|
+
closeLabel?: string;
|
|
15
|
+
/** Class merged onto the region element. */
|
|
6
16
|
className?: string;
|
|
7
17
|
}
|
|
8
18
|
/**
|
|
9
19
|
* Renders toasts queued with `rudiToast`. Mount exactly one, near the app
|
|
10
20
|
* root. It portals into `document.body` and renders nothing while the queue
|
|
11
21
|
* is empty. The region is an ARIA landmark (F6 moves focus into it) and each
|
|
12
|
-
* toast is announced to screen readers when it appears.
|
|
22
|
+
* toast is announced to screen readers when it appears. Queue toasts with `rudiToast`, not
|
|
23
|
+
* through props.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <RudiToastRegion placement="bottom-end" />
|
|
13
27
|
*/
|
|
14
|
-
export declare function RudiToastRegion({ placement, 'aria-label': ariaLabel, className, }: RudiToastRegionProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function RudiToastRegion({ placement, 'aria-label': ariaLabel, closeLabel, className, }: RudiToastRegionProps): import("react/jsx-runtime").JSX.Element;
|
|
15
29
|
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAcA,OAAO,aAAa,CAAA;AAEpB,MAAM,WAAW,oBAAoB;IACnC
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAcA,OAAO,aAAa,CAAA;AAEpB,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,eAAe,CAAA;IACtD,qGAAqG;IACrG,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAkDD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAwB,EACxB,YAAY,EAAE,SAAS,EACvB,UAAoB,EACpB,SAAS,GACV,EAAE,oBAAoB,2CAUtB"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { UNSTABLE_ToastQueue as ToastQueue } from 'react-aria-components';
|
|
2
|
+
/** Severity of a toast. Sets its icon and colors, and its default timeout (`error` stays until closed). */
|
|
2
3
|
export type RudiToastVariant = 'info' | 'success' | 'warning' | 'error';
|
|
3
4
|
/** The content stored for each queued toast. */
|
|
4
5
|
export interface RudiToastContent {
|
|
6
|
+
/** Main message. */
|
|
5
7
|
title: string;
|
|
8
|
+
/** Supporting text under the title. */
|
|
6
9
|
description?: string;
|
|
10
|
+
/** Severity of the toast. */
|
|
7
11
|
variant: RudiToastVariant;
|
|
8
12
|
}
|
|
13
|
+
/** Options accepted by `rudiToast.success`, `info`, `warning` and `error`. */
|
|
9
14
|
export interface RudiToastOptions {
|
|
10
15
|
/** Supporting text shown under the title. */
|
|
11
16
|
description?: string;
|
|
@@ -14,8 +19,11 @@ export interface RudiToastOptions {
|
|
|
14
19
|
/** Called when the toast closes, by the user or by timeout. */
|
|
15
20
|
onClose?: () => void;
|
|
16
21
|
}
|
|
22
|
+
/** Options for `rudiToast.add`: the shared options plus the title and variant. */
|
|
17
23
|
export interface RudiToastAddOptions extends RudiToastOptions {
|
|
24
|
+
/** Main message shown in bold. */
|
|
18
25
|
title: string;
|
|
26
|
+
/** Severity of the toast; sets icon, colors and the default timeout. */
|
|
19
27
|
variant: RudiToastVariant;
|
|
20
28
|
}
|
|
21
29
|
/** The single queue rendered by `RudiToastRegion`. */
|
|
@@ -24,14 +32,25 @@ declare function add({ title, description, variant, timeout, onClose }: RudiToas
|
|
|
24
32
|
/**
|
|
25
33
|
* Show toasts from anywhere: `rudiToast.success('Saved')`. Requires one
|
|
26
34
|
* `RudiToastRegion` mounted near the app root. Every method returns the
|
|
27
|
-
* toast's key, which `rudiToast.close(key)` accepts.
|
|
35
|
+
* toast's key, which `rudiToast.close(key)` accepts. Success, info and warning toasts dismiss
|
|
36
|
+
* after 5000 ms by default; error toasts stay until closed.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* const key = rudiToast.error('Upload failed', { description: 'Try again.' })
|
|
40
|
+
* rudiToast.close(key)
|
|
28
41
|
*/
|
|
29
42
|
export declare const rudiToast: {
|
|
43
|
+
/** Queues a toast from a single options object (`title`, `variant`, plus `RudiToastOptions`). Returns its key. */
|
|
30
44
|
add: typeof add;
|
|
45
|
+
/** Queues a success toast: `rudiToast.success(title, options?)`. Auto-dismisses after 5000 ms. Returns its key. */
|
|
31
46
|
success: (title: string, options?: RudiToastOptions) => string;
|
|
47
|
+
/** Queues an info toast: `rudiToast.info(title, options?)`. Auto-dismisses after 5000 ms. Returns its key. */
|
|
32
48
|
info: (title: string, options?: RudiToastOptions) => string;
|
|
49
|
+
/** Queues a warning toast: `rudiToast.warning(title, options?)`. Auto-dismisses after 5000 ms. Returns its key. */
|
|
33
50
|
warning: (title: string, options?: RudiToastOptions) => string;
|
|
51
|
+
/** Queues an error toast: `rudiToast.error(title, options?)`. Stays until closed unless `timeout` is set. Returns its key. */
|
|
34
52
|
error: (title: string, options?: RudiToastOptions) => string;
|
|
53
|
+
/** Closes the toast with the given key, as returned by the other methods. */
|
|
35
54
|
close: (key: string) => void;
|
|
36
55
|
/** Removes every toast. Mainly useful in tests. */
|
|
37
56
|
clear: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toastQueue.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/toastQueue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEzE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AAEvE,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,gBAAgB,CAAA;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,mBAAoB,SA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mB,GAAG,MAAM,CAM3F;AAOD;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS;IACpB,kHAAkH;;IAElH,mHAAmH;qBAhB3G,MAAM,YAAW,gBAAgB,KAAQ,MAAM;IAkBvD,8GAA8G;kBAlBtG,MAAM,YAAW,gBAAgB,KAAQ,MAAM;IAoBvD,mHAAmH;qBApB3G,MAAM,YAAW,gBAAgB,KAAQ,MAAM;IAsBvD,8HAA8H;mBAtBtH,MAAM,YAAW,gBAAgB,KAAQ,MAAM;IAwBvD,6EAA6E;iBAChE,MAAM;IACnB,mDAAmD;;CAEpD,CAAA"}
|
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AriaTooltipProps } from 'react-aria';
|
|
3
|
+
/** Props for `RudiTooltipTrigger`. */
|
|
3
4
|
export interface RudiTooltipTriggerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Milliseconds the pointer or focus must rest on the trigger before the tooltip opens.
|
|
7
|
+
* @default 500
|
|
8
|
+
*/
|
|
4
9
|
delay?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Milliseconds to wait before closing after the pointer or focus leaves.
|
|
12
|
+
* @default 0
|
|
13
|
+
*/
|
|
5
14
|
closeDelay?: number;
|
|
15
|
+
/** Exactly two elements: the trigger (must accept a `ref`, e.g. `RudiButton`), then the `RudiTooltip`. */
|
|
6
16
|
children: [React.ReactElement, React.ReactElement];
|
|
7
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Shows a `RudiTooltip` when its trigger is hovered or focused. Takes exactly two children, the
|
|
20
|
+
* trigger element then the `RudiTooltip`. The trigger is linked to the tooltip with
|
|
21
|
+
* `aria-describedby`, so keep the tooltip to short supplementary text, not essential content or
|
|
22
|
+
* interactive controls. The forwarded ref points at the wrapping `span`.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <RudiTooltipTrigger delay={300}>
|
|
26
|
+
* <RudiIconButton aria-label="Refresh" onPress={refresh}><RudiIcon icon="mdi:refresh" /></RudiIconButton>
|
|
27
|
+
* <RudiTooltip>Refresh data</RudiTooltip>
|
|
28
|
+
* </RudiTooltipTrigger>
|
|
29
|
+
*/
|
|
8
30
|
export declare const RudiTooltipTrigger: React.ForwardRefExoticComponent<RudiTooltipTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
31
|
+
/** Props for `RudiTooltip`. Also accepts React Aria's `AriaTooltipProps`. */
|
|
9
32
|
export interface RudiTooltipProps extends AriaTooltipProps {
|
|
33
|
+
/** Tooltip text. */
|
|
10
34
|
children: React.ReactNode;
|
|
35
|
+
/** Class merged onto the tooltip element. */
|
|
11
36
|
className?: string;
|
|
12
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Tooltip bubble. Use only as the second child of `RudiTooltipTrigger`, which controls when it
|
|
40
|
+
* appears and where the open state comes from.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <RudiTooltip>Copy to clipboard</RudiTooltip>
|
|
44
|
+
*/
|
|
13
45
|
export declare const RudiTooltip: React.ForwardRefExoticComponent<RudiTooltipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
14
46
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAKjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGlD,OAAO,eAAe,CAAA;AAEtB,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;CACnD;AAED,eAAO,MAAM,kBAAkB,iGAoB9B,CAAA;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,0FAevB,CAAA"}
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAKjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGlD,OAAO,eAAe,CAAA;AAEtB,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0GAA0G;IAC1G,QAAQ,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;CACnD;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,iGAoB9B,CAAA;AAED,6EAA6E;AAC7E,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,0FAevB,CAAA"}
|
|
@@ -6,13 +6,28 @@ export interface RudiTopBarProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
6
6
|
end?: React.ReactNode;
|
|
7
7
|
/** Optional strip rendered above the main row, e.g. an announcement. */
|
|
8
8
|
announcement?: React.ReactNode;
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Whether the bar sticks to the top of its scroll container.
|
|
11
|
+
*
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
10
14
|
sticky?: boolean;
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Element to render. Defaults to `header`.
|
|
17
|
+
*
|
|
18
|
+
* @default 'header'
|
|
19
|
+
*/
|
|
12
20
|
as?: React.ElementType;
|
|
13
21
|
/** Fills the growing center of the main row (brand, nav, title). */
|
|
14
22
|
children?: React.ReactNode;
|
|
23
|
+
/** Extra class names, merged with the built-in classes. */
|
|
15
24
|
className?: string;
|
|
16
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Horizontal application bar with start, center, and end slots and an optional announcement strip above. Use it at the top of `RudiAppShell.Content` or a page; use `RudiPageHeader` for a page title. Each slot is rendered only when provided. Polymorphic through `as` (default `header`); DOM props are spread onto the root.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <RudiTopBar start={<RudiBrand name="Acme" />} end={<RudiButton onPress={signOut}>Sign out</RudiButton>} />
|
|
31
|
+
*/
|
|
17
32
|
export declare const RudiTopBar: React.ForwardRefExoticComponent<RudiTopBarProps & React.RefAttributes<HTMLElement>>;
|
|
18
33
|
//# sourceMappingURL=TopBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../../src/components/TopBar/TopBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,eAAe,CAAA;AAEtB,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACxE,qDAAqD;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,mDAAmD;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,wEAAwE;IACxE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B
|
|
1
|
+
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../../src/components/TopBar/TopBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,eAAe,CAAA;AAEtB,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACxE,qDAAqD;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,mDAAmD;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,wEAAwE;IACxE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,qFAuCtB,CAAA"}
|