@ngrr/ds 0.1.6 → 0.1.8
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/dist/components/atoms/Attachment/AttachmentCard/AttachmentCard.d.ts +21 -0
- package/dist/components/atoms/Attachment/AttachmentCard/index.d.ts +2 -0
- package/dist/components/atoms/Attachment/AttachmentChip/AttachmentChip.d.ts +27 -0
- package/dist/components/atoms/Attachment/AttachmentChip/index.d.ts +2 -0
- package/dist/components/atoms/Attachment/AttachmentField/AttachmentField.d.ts +20 -0
- package/dist/components/atoms/Attachment/AttachmentField/index.d.ts +2 -0
- package/dist/components/atoms/Attachment/FileRow/FileRow.d.ts +18 -0
- package/dist/components/atoms/Attachment/FileRow/index.d.ts +2 -0
- package/dist/components/atoms/Attachment/FileThumbnail/FileThumbnail.d.ts +14 -0
- package/dist/components/atoms/Attachment/FileThumbnail/index.d.ts +2 -0
- package/dist/components/atoms/Attachment/index.d.ts +10 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts +74 -0
- package/dist/components/atoms/Avatar/index.d.ts +2 -0
- package/dist/components/atoms/Badge/Badge.d.ts +40 -0
- package/dist/components/atoms/Badge/index.d.ts +2 -0
- package/dist/components/atoms/Button/Button.d.ts +158 -0
- package/dist/components/atoms/Button/ToggleButton.d.ts +17 -0
- package/dist/components/atoms/Button/VerticalButton.d.ts +90 -0
- package/dist/components/atoms/Button/index.d.ts +6 -0
- package/dist/components/atoms/ButtonGroup/ButtonGroup.d.ts +17 -0
- package/dist/components/atoms/ButtonGroup/ButtonGroupVertical.d.ts +17 -0
- package/dist/components/atoms/ButtonGroup/SplitButton/SplitButton.d.ts +37 -0
- package/dist/components/atoms/ButtonGroup/SplitButton/index.d.ts +2 -0
- package/dist/components/atoms/ButtonGroup/index.d.ts +6 -0
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +47 -0
- package/dist/components/atoms/Checkbox/index.d.ts +2 -0
- package/dist/components/atoms/Chip/Chip.d.ts +83 -0
- package/dist/components/atoms/Chip/index.d.ts +2 -0
- package/dist/components/atoms/Combobox/Combobox.d.ts +39 -0
- package/dist/components/atoms/Combobox/index.d.ts +2 -0
- package/dist/components/atoms/CustomViewTab/CustomViewTab.d.ts +31 -0
- package/dist/components/atoms/CustomViewTab/index.d.ts +2 -0
- package/dist/components/atoms/DataListCell/DataListCell.d.ts +21 -0
- package/dist/components/atoms/DataListCell/index.d.ts +2 -0
- package/dist/components/atoms/DataTableCell/DataTableCell.d.ts +17 -0
- package/dist/components/atoms/DataTableCell/index.d.ts +2 -0
- package/dist/components/atoms/DataTableHeaderCell/DataTableHeaderCell.d.ts +33 -0
- package/dist/components/atoms/DataTableHeaderCell/index.d.ts +2 -0
- package/dist/components/atoms/DateTimePicker/DateTimePicker.d.ts +48 -0
- package/dist/components/atoms/DateTimePicker/index.d.ts +2 -0
- package/dist/components/atoms/LoadingBar/LoadingBar.d.ts +20 -0
- package/dist/components/atoms/LoadingBar/index.d.ts +2 -0
- package/dist/components/atoms/MenuCell/MenuCell.d.ts +46 -0
- package/dist/components/atoms/MenuCell/index.d.ts +2 -0
- package/dist/components/atoms/NumberInput/NumberInput.d.ts +41 -0
- package/dist/components/atoms/NumberInput/index.d.ts +2 -0
- package/dist/components/atoms/OTPInput/OTPInput.d.ts +42 -0
- package/dist/components/atoms/OTPInput/index.d.ts +2 -0
- package/dist/components/atoms/Pagination/PageSelector.d.ts +13 -0
- package/dist/components/atoms/Pagination/Pagination.d.ts +30 -0
- package/dist/components/atoms/Pagination/index.d.ts +4 -0
- package/dist/components/atoms/PasswordInput/PasswordInput.d.ts +46 -0
- package/dist/components/atoms/PasswordInput/PasswordRequirement.d.ts +9 -0
- package/dist/components/atoms/PasswordInput/index.d.ts +4 -0
- package/dist/components/atoms/PhoneInput/PhoneInput.d.ts +33 -0
- package/dist/components/atoms/PhoneInput/index.d.ts +2 -0
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +16 -0
- package/dist/components/atoms/ProgressBar/index.d.ts +2 -0
- package/dist/components/atoms/ProgressRing/ProgressRing.d.ts +29 -0
- package/dist/components/atoms/ProgressRing/index.d.ts +2 -0
- package/dist/components/atoms/Radio/Radio.d.ts +46 -0
- package/dist/components/atoms/Radio/index.d.ts +2 -0
- package/dist/components/atoms/SearchBar/SearchBar.d.ts +28 -0
- package/dist/components/atoms/SearchBar/index.d.ts +2 -0
- package/dist/components/atoms/SectionHeader/SectionHeader.d.ts +12 -0
- package/dist/components/atoms/SectionHeader/index.d.ts +2 -0
- package/dist/components/atoms/SegmentControl/SegmentControl.d.ts +22 -0
- package/dist/components/atoms/SegmentControl/SegmentControlSelector.d.ts +19 -0
- package/dist/components/atoms/SegmentControl/index.d.ts +2 -0
- package/dist/components/atoms/Select/Select.d.ts +31 -0
- package/dist/components/atoms/Select/index.d.ts +2 -0
- package/dist/components/atoms/Separator/Separator.d.ts +20 -0
- package/dist/components/atoms/Separator/index.d.ts +2 -0
- package/dist/components/atoms/Shortcut/Shortcut.d.ts +69 -0
- package/dist/components/atoms/Shortcut/index.d.ts +2 -0
- package/dist/components/atoms/SkeletonLoading/SkeletonLoading.d.ts +7 -0
- package/dist/components/atoms/SkeletonLoading/index.d.ts +2 -0
- package/dist/components/atoms/Stat/Stat.d.ts +16 -0
- package/dist/components/atoms/Stat/index.d.ts +2 -0
- package/dist/components/atoms/Switcher/Switcher.d.ts +46 -0
- package/dist/components/atoms/Switcher/index.d.ts +2 -0
- package/dist/components/atoms/Tab/Tab.d.ts +24 -0
- package/dist/components/atoms/Tab/index.d.ts +2 -0
- package/dist/components/atoms/Tag/Tag.d.ts +50 -0
- package/dist/components/atoms/Tag/index.d.ts +2 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts +27 -0
- package/dist/components/atoms/TextArea/index.d.ts +2 -0
- package/dist/components/atoms/TextInput/TextInput.d.ts +41 -0
- package/dist/components/atoms/TextInput/index.d.ts +2 -0
- package/dist/components/atoms/UploadArea/UploadArea.d.ts +20 -0
- package/dist/components/atoms/UploadArea/index.d.ts +2 -0
- package/dist/components/atoms/_dev/PlaceholderIcon.d.ts +12 -0
- package/dist/components/molecules/Accordion/Accordion.d.ts +17 -0
- package/dist/components/molecules/Accordion/index.d.ts +2 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +22 -0
- package/dist/components/molecules/Breadcrumbs/BreadcrumbsController.d.ts +23 -0
- package/dist/components/molecules/Breadcrumbs/index.d.ts +4 -0
- package/dist/components/molecules/BulkActionBar/BulkActionBar.d.ts +34 -0
- package/dist/components/molecules/BulkActionBar/index.d.ts +2 -0
- package/dist/components/molecules/Callout/Callout.d.ts +28 -0
- package/dist/components/molecules/Callout/index.d.ts +2 -0
- package/dist/components/molecules/CheckboxField/CheckboxField.d.ts +26 -0
- package/dist/components/molecules/CheckboxField/index.d.ts +2 -0
- package/dist/components/molecules/ChipField/ChipField.d.ts +27 -0
- package/dist/components/molecules/ChipField/index.d.ts +2 -0
- package/dist/components/molecules/ChoiceList/ChoiceList.d.ts +39 -0
- package/dist/components/molecules/ChoiceList/index.d.ts +2 -0
- package/dist/components/molecules/EmptyState/EmptyState.d.ts +52 -0
- package/dist/components/molecules/EmptyState/index.d.ts +2 -0
- package/dist/components/molecules/HorizontalInput/HorizontalInput.d.ts +22 -0
- package/dist/components/molecules/HorizontalInput/index.d.ts +2 -0
- package/dist/components/molecules/MultiChoice/MultiChoice.d.ts +27 -0
- package/dist/components/molecules/MultiChoice/index.d.ts +2 -0
- package/dist/components/molecules/PopoverWrapper/PopoverWrapper.d.ts +23 -0
- package/dist/components/molecules/PopoverWrapper/index.d.ts +2 -0
- package/dist/components/molecules/RichTextEditor/RichTextEditor.d.ts +35 -0
- package/dist/components/molecules/RichTextEditor/index.d.ts +2 -0
- package/dist/components/molecules/SidebarMenuSelector/SidebarMenuSelector.d.ts +25 -0
- package/dist/components/molecules/SidebarMenuSelector/index.d.ts +2 -0
- package/dist/components/molecules/SingleChoice/SingleChoice.d.ts +28 -0
- package/dist/components/molecules/SingleChoice/index.d.ts +2 -0
- package/dist/components/molecules/Slider/Slider.d.ts +33 -0
- package/dist/components/molecules/Slider/index.d.ts +2 -0
- package/dist/components/molecules/Toast/Toast.d.ts +29 -0
- package/dist/components/molecules/Toast/index.d.ts +2 -0
- package/dist/components/molecules/Toolbar/Toolbar.d.ts +13 -0
- package/dist/components/molecules/Toolbar/index.d.ts +2 -0
- package/dist/components/molecules/Tooltip/Tooltip.d.ts +22 -0
- package/dist/components/molecules/Tooltip/index.d.ts +2 -0
- package/dist/components/organisms/AlertDialog/AlertDialog.d.ts +26 -0
- package/dist/components/organisms/AlertDialog/index.d.ts +2 -0
- package/dist/components/organisms/AppShell/AppShell.d.ts +21 -0
- package/dist/components/organisms/AppShell/index.d.ts +2 -0
- package/dist/components/organisms/Card/Card.d.ts +22 -0
- package/dist/components/organisms/Card/index.d.ts +2 -0
- package/dist/components/organisms/Charts/Charts.d.ts +112 -0
- package/dist/components/organisms/Charts/index.d.ts +2 -0
- package/dist/components/organisms/DataTable/DataTable.d.ts +27 -0
- package/dist/components/organisms/DataTable/index.d.ts +2 -0
- package/dist/components/organisms/Drawer/Drawer.d.ts +43 -0
- package/dist/components/organisms/Drawer/index.d.ts +2 -0
- package/dist/components/organisms/Modal/Modal.d.ts +34 -0
- package/dist/components/organisms/Modal/index.d.ts +2 -0
- package/dist/components/organisms/Navbar/Navbar.d.ts +23 -0
- package/dist/components/organisms/Navbar/index.d.ts +2 -0
- package/dist/components/organisms/PopoverMenu/PopoverMenu.d.ts +33 -0
- package/dist/components/organisms/PopoverMenu/index.d.ts +2 -0
- package/dist/components/organisms/Sidebar/Sidebar.d.ts +39 -0
- package/dist/components/organisms/Sidebar/index.d.ts +2 -0
- package/dist/docs/ThemeToggle.d.ts +4 -0
- package/dist/ds-nagarro.es.js +6109 -6007
- package/dist/ds-nagarro.umd.js +84 -74
- package/dist/index.d.ts +153 -0
- package/dist/style.css +1 -1
- package/dist/types/common.d.ts +83 -0
- package/package.json +2 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AvatarProps } from '../Avatar';
|
|
3
|
+
import { BadgeSize, BadgeVariant } from '../Badge';
|
|
4
|
+
import { TagVariant } from '../Tag';
|
|
5
|
+
export type CheckboxSize = 'md' | 'sm';
|
|
6
|
+
/**
|
|
7
|
+
* Checkbox atom: row-level selectable control that can be embedded in
|
|
8
|
+
* multiple contexts. Field-level label/helper/error anatomy belongs to
|
|
9
|
+
* form wrappers such as CheckboxField and MultiChoice.
|
|
10
|
+
*/
|
|
11
|
+
export interface CheckboxProps {
|
|
12
|
+
size?: CheckboxSize;
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
indeterminate?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
descriptionRight?: string;
|
|
19
|
+
showContent?: boolean;
|
|
20
|
+
showLabel?: boolean;
|
|
21
|
+
showDescription?: boolean;
|
|
22
|
+
showDescriptionRight?: boolean;
|
|
23
|
+
showAvatar?: boolean;
|
|
24
|
+
avatarProps?: AvatarProps;
|
|
25
|
+
showLeadingIcon?: boolean;
|
|
26
|
+
leadingIcon?: React.ReactNode;
|
|
27
|
+
showTrailingIcon?: boolean;
|
|
28
|
+
trailingIcon?: React.ReactNode;
|
|
29
|
+
showBadge?: boolean;
|
|
30
|
+
badgeCount?: number;
|
|
31
|
+
badgeSize?: BadgeSize;
|
|
32
|
+
badgeVariant?: BadgeVariant;
|
|
33
|
+
showTag?: boolean;
|
|
34
|
+
tagLabel?: string;
|
|
35
|
+
tagVariant?: TagVariant;
|
|
36
|
+
showButtons?: boolean;
|
|
37
|
+
actionAriaLabel?: string;
|
|
38
|
+
onActionClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
39
|
+
showSwitcherRight?: boolean;
|
|
40
|
+
switcherChecked?: boolean;
|
|
41
|
+
onSwitcherChange?: (checked: boolean) => void;
|
|
42
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
43
|
+
className?: string;
|
|
44
|
+
'aria-label'?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function Checkbox({ size, checked, indeterminate, disabled, label, description, descriptionRight, showContent, showLabel, showDescription, showDescriptionRight, showAvatar, avatarProps, showLeadingIcon, leadingIcon, showTrailingIcon, trailingIcon, showBadge, badgeCount, badgeSize, badgeVariant, showTag, tagLabel, tagVariant, showButtons, actionAriaLabel, onActionClick, showSwitcherRight, switcherChecked, onSwitcherChange, onCheckedChange, className, 'aria-label': ariaLabel, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export default Checkbox;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export type ChipSize = 'md' | 'sm';
|
|
4
|
+
export interface ChipProps {
|
|
5
|
+
/**
|
|
6
|
+
* The text label displayed inside the chip.
|
|
7
|
+
* Keep to 1–3 words. Use sentence case ("In progress", not "In Progress").
|
|
8
|
+
*/
|
|
9
|
+
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether the chip is in its active/on state — a filter is applied, an option
|
|
12
|
+
* is chosen, etc. Clicking a selected chip deselects it.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* When true, the chip is non-interactive. Uses `aria-disabled` rather than
|
|
18
|
+
* the native `disabled` attribute so the chip remains in the tab/reading order.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Visual size.
|
|
24
|
+
* - `md` — default; use in standard filter bars and option sets (32px height)
|
|
25
|
+
* - `sm` — compact layouts, dense filter panels (24px height)
|
|
26
|
+
* @default 'md'
|
|
27
|
+
*/
|
|
28
|
+
size?: ChipSize;
|
|
29
|
+
/**
|
|
30
|
+
* Replaces the default CSS diamond in the **leading** position with any Lucide
|
|
31
|
+
* icon. Pass the component reference, not a rendered element:
|
|
32
|
+
* `leadingIcon={Star}` ✓ `leadingIcon={<Star />}` ✗
|
|
33
|
+
*/
|
|
34
|
+
leadingIcon?: LucideIcon;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the leading icon slot is rendered.
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
showLeadingIcon?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Replaces the default CSS diamond in the **trailing** position with any
|
|
42
|
+
* Lucide icon. Ignored when `onDismiss` is provided (the dismiss × takes
|
|
43
|
+
* the trailing slot instead).
|
|
44
|
+
*/
|
|
45
|
+
trailingIcon?: LucideIcon;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the trailing icon slot is rendered.
|
|
48
|
+
* Ignored when `onDismiss` is provided.
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
showTrailingIcon?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* When provided, renders a dismiss (×) button in the trailing position.
|
|
54
|
+
* The dismiss button has `aria-label="Remove {label}"` automatically.
|
|
55
|
+
* Calling `onDismiss` removes the chip value; it does NOT toggle selection.
|
|
56
|
+
*/
|
|
57
|
+
onDismiss?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Click / keyboard handler invoked when the user toggles the chip.
|
|
60
|
+
* The consumer is responsible for updating `selected` in response.
|
|
61
|
+
*/
|
|
62
|
+
onClick?: () => void;
|
|
63
|
+
/** Additional CSS class names merged onto the root element. */
|
|
64
|
+
className?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Accessible label for the chip. Falls back to the visible `label` text.
|
|
67
|
+
* Useful when the visual label alone is ambiguous in context.
|
|
68
|
+
*/
|
|
69
|
+
'aria-label'?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ChipGroupProps {
|
|
72
|
+
/**
|
|
73
|
+
* Accessible label for the group, announced by screen readers.
|
|
74
|
+
* Describe the set: "Filter by status", "Select categories".
|
|
75
|
+
*/
|
|
76
|
+
label: string;
|
|
77
|
+
/** One or more Chip elements. */
|
|
78
|
+
children: React.ReactNode;
|
|
79
|
+
/** Additional CSS class names merged onto the group element. */
|
|
80
|
+
className?: string;
|
|
81
|
+
}
|
|
82
|
+
export declare function Chip({ label, selected, disabled, size, leadingIcon, trailingIcon, showLeadingIcon, showTrailingIcon, onDismiss, onClick, className, 'aria-label': ariaLabel, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
export declare function ChipGroup({ label, children, className }: ChipGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ComboboxOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ComboboxProps {
|
|
9
|
+
selectionMode?: 'single' | 'multi';
|
|
10
|
+
id?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
showLabel?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
options?: ComboboxOption[];
|
|
15
|
+
value?: string;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
values?: string[];
|
|
18
|
+
defaultValues?: string[];
|
|
19
|
+
open?: boolean;
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
error?: boolean;
|
|
23
|
+
helperText?: string;
|
|
24
|
+
showHelper?: boolean;
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
helperIcon?: React.ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
onChange?: (value: string, option: ComboboxOption) => void;
|
|
31
|
+
onValuesChange?: (values: string[], options: ComboboxOption[]) => void;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
onInputChange?: (query: string) => void;
|
|
34
|
+
confirmLabel?: string;
|
|
35
|
+
'aria-label'?: string;
|
|
36
|
+
'aria-labelledby'?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function Combobox({ selectionMode, id, label, showLabel, placeholder, options, value, defaultValue, values, defaultValues, open, defaultOpen, disabled, error, helperText, showHelper, errorMessage, required, helperIcon, className, name, onChange, onValuesChange, onOpenChange, onInputChange, confirmLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export default Combobox;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CustomViewTabItem {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
panel?: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
showLeadingIcon?: boolean;
|
|
8
|
+
leadingIcon?: React.ReactNode;
|
|
9
|
+
removable?: boolean;
|
|
10
|
+
removeAriaLabel?: string;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CustomViewTabProps {
|
|
14
|
+
tabs: ReadonlyArray<CustomViewTabItem>;
|
|
15
|
+
value?: string;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
onRemove?: (value: string) => void;
|
|
19
|
+
addActionLabel?: string;
|
|
20
|
+
addActionLeadingIcon?: React.ReactNode;
|
|
21
|
+
onAddAction?: () => void;
|
|
22
|
+
addActionAriaLabel?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
showPanels?: boolean;
|
|
25
|
+
panelClassName?: string;
|
|
26
|
+
'aria-label'?: string;
|
|
27
|
+
}
|
|
28
|
+
export type CustomViewTabsProps = CustomViewTabProps;
|
|
29
|
+
export declare function CustomViewTab({ tabs, value, defaultValue, onChange, onRemove, addActionLabel, addActionLeadingIcon, onAddAction, addActionAriaLabel, className, showPanels, panelClassName, 'aria-label': ariaLabel, }: CustomViewTabProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare const CustomViewTabs: typeof CustomViewTab;
|
|
31
|
+
export default CustomViewTab;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type DataListCellAlignment = 'inline' | 'vertical';
|
|
3
|
+
export type DataListCellVariant = 'with-title' | 'just-icon';
|
|
4
|
+
export type DataListCellState = 'default' | 'hover';
|
|
5
|
+
export interface DataListCellProps {
|
|
6
|
+
alignment?: DataListCellAlignment;
|
|
7
|
+
variant?: DataListCellVariant;
|
|
8
|
+
state?: DataListCellState;
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
content?: React.ReactNode;
|
|
12
|
+
showIcon?: boolean;
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
showActions?: boolean;
|
|
15
|
+
actionAriaLabel?: string;
|
|
16
|
+
onActionClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
17
|
+
className?: string;
|
|
18
|
+
'aria-label'?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function DataListCell({ alignment, variant, state, title, description, content, showIcon, icon, showActions, actionAriaLabel, onActionClick, className, 'aria-label': ariaLabel, }: DataListCellProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default DataListCell;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DataTableCellAlign, DataTableFieldType } from '../../../types/common';
|
|
3
|
+
export type DataTableCellState = 'default' | 'hover';
|
|
4
|
+
export interface DataTableCellProps {
|
|
5
|
+
fieldType?: DataTableFieldType;
|
|
6
|
+
state?: DataTableCellState;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
value?: unknown;
|
|
9
|
+
width?: number;
|
|
10
|
+
onCheckboxChange?: (checked: boolean) => void;
|
|
11
|
+
leadingAccessory?: React.ReactNode;
|
|
12
|
+
align?: DataTableCellAlign;
|
|
13
|
+
className?: string;
|
|
14
|
+
'aria-label'?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function DataTableCell({ fieldType, state, loading, value, width, onCheckboxChange, leadingAccessory, align, className, 'aria-label': ariaLabel, }: DataTableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default DataTableCell;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DataTableSortDirection } from '../../../types/common';
|
|
3
|
+
export type DataTableHeaderCellVariant = 'title' | 'checkbox';
|
|
4
|
+
export type DataTableHeaderCellState = 'default' | 'hover';
|
|
5
|
+
export type DataTableHeaderReorderDirection = 'left' | 'right';
|
|
6
|
+
export type DataTableHeaderResizeDirection = 'decrease' | 'increase';
|
|
7
|
+
export interface DataTableHeaderCellProps {
|
|
8
|
+
variant?: DataTableHeaderCellVariant;
|
|
9
|
+
state?: DataTableHeaderCellState;
|
|
10
|
+
label?: string;
|
|
11
|
+
width?: number;
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
sortDirection?: DataTableSortDirection;
|
|
14
|
+
reorderable?: boolean;
|
|
15
|
+
resizable?: boolean;
|
|
16
|
+
checkboxChecked?: boolean;
|
|
17
|
+
checkboxIndeterminate?: boolean;
|
|
18
|
+
onCheckboxChange?: (checked: boolean) => void;
|
|
19
|
+
onSortChange?: (next: DataTableSortDirection) => void;
|
|
20
|
+
onReorderCommand?: (direction: DataTableHeaderReorderDirection) => void;
|
|
21
|
+
onResizeCommand?: (direction: DataTableHeaderResizeDirection) => void;
|
|
22
|
+
onResizePointerDown?: React.PointerEventHandler<HTMLButtonElement>;
|
|
23
|
+
onMoreClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
24
|
+
onReorderDragStart?: React.DragEventHandler<HTMLElement>;
|
|
25
|
+
onReorderDragEnd?: React.DragEventHandler<HTMLElement>;
|
|
26
|
+
filterValue?: string;
|
|
27
|
+
onFilterChange?: (value: string) => void;
|
|
28
|
+
leadingAccessory?: React.ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
'aria-label'?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function DataTableHeaderCell({ variant, state, label, width, sortable, sortDirection, reorderable, resizable, checkboxChecked, checkboxIndeterminate, onCheckboxChange, onSortChange, onReorderCommand, onResizeCommand, onResizePointerDown, onMoreClick, onReorderDragStart, onReorderDragEnd, filterValue: _filterValue, onFilterChange: _onFilterChange, leadingAccessory, className, 'aria-label': ariaLabel, }: DataTableHeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default DataTableHeaderCell;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type DateTimePickerSelectionMode = 'single' | 'range';
|
|
3
|
+
export type DateRangeValue = {
|
|
4
|
+
start: Date | null;
|
|
5
|
+
end: Date | null;
|
|
6
|
+
};
|
|
7
|
+
export type DateTimePickerValue = Date | DateRangeValue | null;
|
|
8
|
+
export interface DateTimePickerPreset {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
value: DateTimePickerValue;
|
|
12
|
+
}
|
|
13
|
+
export interface DateTimePickerProps {
|
|
14
|
+
id?: string;
|
|
15
|
+
displayMode?: 'popover' | 'inline';
|
|
16
|
+
selectionMode?: DateTimePickerSelectionMode;
|
|
17
|
+
withTime?: boolean;
|
|
18
|
+
label?: string;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
startPlaceholder?: string;
|
|
21
|
+
endPlaceholder?: string;
|
|
22
|
+
value?: DateTimePickerValue;
|
|
23
|
+
defaultValue?: DateTimePickerValue;
|
|
24
|
+
open?: boolean;
|
|
25
|
+
defaultOpen?: boolean;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
error?: boolean;
|
|
29
|
+
helperText?: string;
|
|
30
|
+
errorMessage?: string;
|
|
31
|
+
helperIcon?: React.ReactNode;
|
|
32
|
+
className?: string;
|
|
33
|
+
onChange?: (value: DateTimePickerValue) => void;
|
|
34
|
+
onOpenChange?: (open: boolean) => void;
|
|
35
|
+
presets?: DateTimePickerPreset[];
|
|
36
|
+
selectedPresetId?: string | null;
|
|
37
|
+
defaultSelectedPresetId?: string | null;
|
|
38
|
+
onPresetSelect?: (presetId: string) => void;
|
|
39
|
+
showActions?: boolean;
|
|
40
|
+
cancelLabel?: string;
|
|
41
|
+
confirmLabel?: string;
|
|
42
|
+
onCancel?: () => void;
|
|
43
|
+
onConfirm?: (value: DateTimePickerValue) => void;
|
|
44
|
+
'aria-label'?: string;
|
|
45
|
+
'aria-labelledby'?: string;
|
|
46
|
+
}
|
|
47
|
+
export declare function DateTimePicker({ id, displayMode, selectionMode, withTime, label, placeholder, startPlaceholder, endPlaceholder, value, defaultValue, open, defaultOpen, disabled, required, error, helperText, errorMessage, helperIcon, className, onChange, onOpenChange, presets, selectedPresetId, defaultSelectedPresetId, onPresetSelect, showActions, cancelLabel, confirmLabel, onCancel, onConfirm, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: DateTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export default DateTimePicker;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface LoadingBarProps {
|
|
2
|
+
/**
|
|
3
|
+
* Current progress as a percentage (0–100).
|
|
4
|
+
*
|
|
5
|
+
* - **Omit** this prop for **indeterminate** mode — a segment animates
|
|
6
|
+
* continuously left → right, signalling activity without a known end time.
|
|
7
|
+
* - **Provide** a number for **determinate** mode — the bar fills to the
|
|
8
|
+
* given percentage and exposes `aria-valuenow` to assistive technology.
|
|
9
|
+
* Values are clamped to [0, 100] internally.
|
|
10
|
+
*/
|
|
11
|
+
value?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Accessible label describing the operation in progress.
|
|
14
|
+
* Example: `"Navigating to dashboard"`, `"Uploading files"`.
|
|
15
|
+
*/
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Additional CSS class names merged onto the root element. */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function LoadingBar({ value, label, className }: LoadingBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AvatarProps } from '../Avatar';
|
|
3
|
+
import { BadgeSize, BadgeVariant } from '../Badge';
|
|
4
|
+
import { TagVariant } from '../Tag';
|
|
5
|
+
export type MenuCellVariant = 'default' | 'switcher';
|
|
6
|
+
export interface MenuCellProps {
|
|
7
|
+
variant?: MenuCellVariant;
|
|
8
|
+
destructive?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
descriptionRight?: string;
|
|
15
|
+
showLabel?: boolean;
|
|
16
|
+
showDescription?: boolean;
|
|
17
|
+
showDescriptionRight?: boolean;
|
|
18
|
+
showLeadingIcon?: boolean;
|
|
19
|
+
leadingIcon?: React.ReactNode;
|
|
20
|
+
showTrailingIcon?: boolean;
|
|
21
|
+
trailingIcon?: React.ReactNode;
|
|
22
|
+
showAvatar?: boolean;
|
|
23
|
+
avatarProps?: AvatarProps;
|
|
24
|
+
shortcut?: boolean;
|
|
25
|
+
shortcutLabel?: string;
|
|
26
|
+
shortcutAriaLabel?: string;
|
|
27
|
+
showBadge?: boolean;
|
|
28
|
+
badgeCount?: number;
|
|
29
|
+
badgeSize?: BadgeSize;
|
|
30
|
+
badgeVariant?: BadgeVariant;
|
|
31
|
+
showTag?: boolean;
|
|
32
|
+
tagLabel?: string;
|
|
33
|
+
tagVariant?: TagVariant;
|
|
34
|
+
showButtons?: boolean;
|
|
35
|
+
actionAriaLabel?: string;
|
|
36
|
+
onActionClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
37
|
+
switcherChecked?: boolean;
|
|
38
|
+
onSwitcherChange?: (checked: boolean) => void;
|
|
39
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
40
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
41
|
+
tabIndex?: number;
|
|
42
|
+
className?: string;
|
|
43
|
+
'aria-label'?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const MenuCell: React.ForwardRefExoticComponent<MenuCellProps & React.RefAttributes<HTMLElement>>;
|
|
46
|
+
export default MenuCell;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface NumberInputProps {
|
|
3
|
+
/** Unique id — wires <label htmlFor> ↔ <input id>. Auto-generated if omitted. */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Visible label rendered above the control. */
|
|
6
|
+
label?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** Controlled numeric value. */
|
|
9
|
+
value?: number;
|
|
10
|
+
/** Uncontrolled default numeric value. */
|
|
11
|
+
defaultValue?: number;
|
|
12
|
+
/** Minimum allowed value. Decrement button disables at this boundary. */
|
|
13
|
+
min?: number;
|
|
14
|
+
/** Maximum allowed value. Increment button disables at this boundary. */
|
|
15
|
+
max?: number;
|
|
16
|
+
/** Amount each stepper click changes the value. Default: 1. */
|
|
17
|
+
step?: number;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Enables the error visual state (red border, label, helper text). */
|
|
20
|
+
error?: boolean;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
/** Shown below the control; replaced by errorMessage when error=true. */
|
|
23
|
+
helperText?: string;
|
|
24
|
+
/** Shown below the control only when error=true. */
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
/** Optional 16×16 icon at the start of the helper row. */
|
|
27
|
+
helperIcon?: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Called with the parsed numeric value (or `null` when the field is cleared).
|
|
30
|
+
* For controlled usage, update `value` in response to this callback.
|
|
31
|
+
*/
|
|
32
|
+
onChange?: (value: number | null) => void;
|
|
33
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
34
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
35
|
+
'aria-label'?: string;
|
|
36
|
+
'aria-labelledby'?: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function NumberInput({ id, label, placeholder, value, defaultValue, min, max, step, disabled, error, required, helperText, errorMessage, helperIcon, onChange, onBlur, onFocus, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, name, className, }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export default NumberInput;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface OTPInputProps {
|
|
3
|
+
/** Number of digit cells. Default: 6. */
|
|
4
|
+
length?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Controlled full-string value, e.g. `"123456"`.
|
|
7
|
+
* Provide `onChange` to keep it in sync.
|
|
8
|
+
*/
|
|
9
|
+
value?: string;
|
|
10
|
+
/** Uncontrolled initial value. */
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Visual / interaction state beyond normal typing.
|
|
14
|
+
* - `'idle'` — default typing state (Empty / Partially filled)
|
|
15
|
+
* - `'verifying'` — submission in progress; cells are non-interactive
|
|
16
|
+
* - `'correct'` — verification succeeded; green treatment
|
|
17
|
+
* - `'error'` — verification failed; red label + error message
|
|
18
|
+
*/
|
|
19
|
+
status?: 'idle' | 'verifying' | 'correct' | 'error';
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Label text rendered above the cells. */
|
|
22
|
+
label?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional element displayed to the right of the label.
|
|
25
|
+
* Typical usage: a "Try again" action link shown when `status="error"`.
|
|
26
|
+
*/
|
|
27
|
+
labelAction?: React.ReactNode;
|
|
28
|
+
/** Helper text shown below the cells in idle / verifying states. */
|
|
29
|
+
helperText?: string;
|
|
30
|
+
/** Optional 16×16 icon at the start of the helper row. */
|
|
31
|
+
helperIcon?: React.ReactNode;
|
|
32
|
+
/** Error message shown below the cells when `status="error"`. */
|
|
33
|
+
errorMessage?: string;
|
|
34
|
+
/** Called with the full code string on every change. */
|
|
35
|
+
onChange?: (value: string) => void;
|
|
36
|
+
/** Called with the full code string when every cell is filled. */
|
|
37
|
+
onComplete?: (value: string) => void;
|
|
38
|
+
/** Accessible group label. Default: `"Enter {length}-digit verification code"`. */
|
|
39
|
+
'aria-label'?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function OTPInput({ length, value, defaultValue, status, disabled, label, labelAction, helperText, helperIcon, errorMessage, onChange, onComplete, 'aria-label': ariaLabel, className, }: OTPInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PageSelectorProps {
|
|
2
|
+
/** The page number to display. */
|
|
3
|
+
page: number;
|
|
4
|
+
/** Marks this selector as the current page. Adds `aria-current="page"` and teal border. */
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
/** Prevents interaction. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Called when the selector is clicked. */
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function PageSelector({ page, selected, disabled, onClick, className, }: PageSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default PageSelector;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
/** Current page number (1-based). */
|
|
3
|
+
page: number;
|
|
4
|
+
/** Total number of pages. */
|
|
5
|
+
totalPages: number;
|
|
6
|
+
/** Called when the user navigates to a different page. */
|
|
7
|
+
onPageChange: (page: number) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Total number of records. Used together with `pageSize` to render the
|
|
10
|
+
* "X–Y of Z records" summary string.
|
|
11
|
+
*/
|
|
12
|
+
totalRecords?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Number of records per page. Used together with `totalRecords` to compute
|
|
15
|
+
* the visible range.
|
|
16
|
+
*/
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Currently selected rows-per-page value. When provided, a rows-per-page
|
|
20
|
+
* selector is shown on the left side of the bar.
|
|
21
|
+
*/
|
|
22
|
+
rowsPerPage?: number;
|
|
23
|
+
/** Available rows-per-page options. Defaults to [10, 25, 50, 100]. */
|
|
24
|
+
rowsPerPageOptions?: number[];
|
|
25
|
+
/** Called when the user selects a different rows-per-page value. */
|
|
26
|
+
onRowsPerPageChange?: (rows: number) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function Pagination({ page, totalPages, onPageChange, totalRecords, pageSize, rowsPerPage, rowsPerPageOptions, onRowsPerPageChange, className, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export default Pagination;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PasswordInputProps {
|
|
3
|
+
/** Unique id — wires <label htmlFor> ↔ <input id>. Auto-generated via useId() if omitted. */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Visible label above the control. */
|
|
6
|
+
label?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** Controlled value. */
|
|
9
|
+
value?: string;
|
|
10
|
+
/** Uncontrolled default value. */
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Enables the error visual state on the control, label, and helper row. */
|
|
14
|
+
error?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/** Shown below the control; replaced by errorMessage when error=true. */
|
|
17
|
+
helperText?: string;
|
|
18
|
+
/** Shown below the control only when error=true. */
|
|
19
|
+
errorMessage?: string;
|
|
20
|
+
/** Optional 16×16 icon at the start of the helper / error row. */
|
|
21
|
+
helperIcon?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Optional 16×16 icon rendered between the text field and the show/hide toggle.
|
|
24
|
+
* Maps to Figma's `rhIconWrapper` (trailing icon slot).
|
|
25
|
+
*/
|
|
26
|
+
trailingIcon?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Optional content rendered to the right of the label
|
|
29
|
+
* (e.g. a "Forgot password?" plain link button).
|
|
30
|
+
*/
|
|
31
|
+
labelAction?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* autoComplete value. Defaults to "current-password".
|
|
34
|
+
* Use "new-password" for registration / change-password forms.
|
|
35
|
+
*/
|
|
36
|
+
autoComplete?: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
40
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
41
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
42
|
+
'aria-label'?: string;
|
|
43
|
+
'aria-labelledby'?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function PasswordInput({ id, label, placeholder, value, defaultValue, disabled, error, required, helperText, errorMessage, helperIcon, trailingIcon, labelAction, autoComplete, name, className, onChange, onBlur, onFocus, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export default PasswordInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PasswordRequirementProps {
|
|
2
|
+
/** The requirement text, e.g. "8+ characters". */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Whether this requirement is currently satisfied. */
|
|
5
|
+
met: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function PasswordRequirement({ label, met, className }: PasswordRequirementProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default PasswordRequirement;
|