@ngrr/ds 0.1.5 → 0.1.7
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 +32 -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 +7066 -7025
- package/dist/ds-nagarro.umd.js +69 -74
- package/dist/index.d.ts +151 -0
- package/dist/style.css +1 -1
- package/dist/tokens.css +3 -0
- package/dist/types/common.d.ts +83 -0
- package/package.json +3 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PhoneCountryOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PhoneInputProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
helperText?: string;
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
helperIcon?: React.ReactNode;
|
|
18
|
+
countryCode?: string;
|
|
19
|
+
defaultCountryCode?: string;
|
|
20
|
+
countryOptions?: PhoneCountryOption[];
|
|
21
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
22
|
+
onCountryCodeChange?: (countryCode: string) => void;
|
|
23
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
24
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
25
|
+
'aria-label'?: string;
|
|
26
|
+
'aria-labelledby'?: string;
|
|
27
|
+
countryCodeAriaLabel?: string;
|
|
28
|
+
autoComplete?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function PhoneInput({ id, label, placeholder, value, defaultValue, disabled, error, required, helperText, errorMessage, helperIcon, countryCode, defaultCountryCode, countryOptions, onChange, onCountryCodeChange, onBlur, onFocus, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, countryCodeAriaLabel, autoComplete, name, className, }: PhoneInputProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export default PhoneInput;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ProgressBarProps {
|
|
2
|
+
/**
|
|
3
|
+
* Current progress as a percentage, 0–100. Values are clamped to [0, 100]
|
|
4
|
+
* internally, so out-of-range values are safe to pass.
|
|
5
|
+
*/
|
|
6
|
+
value: number;
|
|
7
|
+
/**
|
|
8
|
+
* Accessible label describing **what** is progressing.
|
|
9
|
+
* Required when there is no visible label in the surrounding UI.
|
|
10
|
+
* Example: `aria-label="Uploading file"`.
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/** Additional CSS class names merged onto the root element. */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function ProgressBar({ value, label, className }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ProgressRingSize = 'sm' | 'lg' | 'xl' | 'xxl';
|
|
2
|
+
export interface ProgressRingProps {
|
|
3
|
+
/**
|
|
4
|
+
* Current progress as a percentage (0–100). Clamped internally.
|
|
5
|
+
*
|
|
6
|
+
* - **Omit** → **indeterminate** mode: a 270° arc spins continuously
|
|
7
|
+
* against a grey track ring. No `aria-valuenow` is set.
|
|
8
|
+
* - **Provide** → **determinate** mode: the ring fills clockwise from
|
|
9
|
+
* 12 o'clock to the given percentage. `aria-valuenow` is set.
|
|
10
|
+
*/
|
|
11
|
+
value?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Visual size of the ring — pixel-identical to Spinner sizes.
|
|
14
|
+
* - `sm` — 16 px
|
|
15
|
+
* - `lg` — 32 px (default)
|
|
16
|
+
* - `xl` — 48 px
|
|
17
|
+
* - `xxl` — 64 px
|
|
18
|
+
* @default 'lg'
|
|
19
|
+
*/
|
|
20
|
+
size?: ProgressRingSize;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible label describing what is progressing / loading.
|
|
23
|
+
* Required when there is no visible label in the surrounding UI.
|
|
24
|
+
*/
|
|
25
|
+
label?: string;
|
|
26
|
+
/** Additional CSS class names merged onto the root element. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function ProgressRing({ value, size, label, className, }: ProgressRingProps): 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 RadioSize = 'md' | 'sm';
|
|
6
|
+
/**
|
|
7
|
+
* Radio atom: row-level single-select control for composition in lists,
|
|
8
|
+
* cells, and form wrappers. Field-level label/helper/error anatomy belongs
|
|
9
|
+
* to dedicated form-field wrappers.
|
|
10
|
+
*/
|
|
11
|
+
export interface RadioProps {
|
|
12
|
+
size?: RadioSize;
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
label?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
descriptionRight?: string;
|
|
18
|
+
showContent?: boolean;
|
|
19
|
+
showLabel?: boolean;
|
|
20
|
+
showDescription?: boolean;
|
|
21
|
+
showDescriptionRight?: boolean;
|
|
22
|
+
showAvatar?: boolean;
|
|
23
|
+
avatarProps?: AvatarProps;
|
|
24
|
+
showLeadingIcon?: boolean;
|
|
25
|
+
leadingIcon?: React.ReactNode;
|
|
26
|
+
showTrailingIcon?: boolean;
|
|
27
|
+
trailingIcon?: React.ReactNode;
|
|
28
|
+
showBadge?: boolean;
|
|
29
|
+
badgeCount?: number;
|
|
30
|
+
badgeSize?: BadgeSize;
|
|
31
|
+
badgeVariant?: BadgeVariant;
|
|
32
|
+
showTag?: boolean;
|
|
33
|
+
tagLabel?: string;
|
|
34
|
+
tagVariant?: TagVariant;
|
|
35
|
+
showButtons?: boolean;
|
|
36
|
+
actionAriaLabel?: string;
|
|
37
|
+
onActionClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
38
|
+
showSwitcherRight?: boolean;
|
|
39
|
+
switcherChecked?: boolean;
|
|
40
|
+
onSwitcherChange?: (checked: boolean) => void;
|
|
41
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
42
|
+
className?: string;
|
|
43
|
+
'aria-label'?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function Radio({ size, checked, 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, }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export default Radio;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SearchBarVariant = 'default' | 'ghost';
|
|
3
|
+
export interface SearchBarProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
variant?: SearchBarVariant;
|
|
6
|
+
label?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
helperText?: string;
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
maxLength?: number;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
helperIcon?: React.ReactNode;
|
|
17
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
18
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
19
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
20
|
+
onClear?: () => void;
|
|
21
|
+
className?: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
autoComplete?: string;
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
'aria-labelledby'?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function SearchBar({ id, variant, label, placeholder, value, defaultValue, disabled, error, helperText, errorMessage, maxLength, required, helperIcon, onChange, onFocus, onBlur, onClear, className, name, autoComplete, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: SearchBarProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export default SearchBar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SectionHeaderSize = 'large' | 'medium' | 'small' | 'xsmall';
|
|
3
|
+
export interface SectionHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
size?: SectionHeaderSize;
|
|
7
|
+
leadingControl?: React.ReactNode;
|
|
8
|
+
trailingControl?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function SectionHeader({ title, description, size, leadingControl, trailingControl, className, }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default SectionHeader;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SegmentControlOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
showLeadingIcon?: boolean;
|
|
7
|
+
leadingIcon?: React.ReactNode;
|
|
8
|
+
showTrailingIcon?: boolean;
|
|
9
|
+
trailingIcon?: React.ReactNode;
|
|
10
|
+
'aria-label'?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SegmentControlProps {
|
|
13
|
+
options: SegmentControlOption[];
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
'aria-label'?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function SegmentControl({ options, value, defaultValue, onChange, fullWidth, className, 'aria-label': ariaLabel, }: SegmentControlProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default SegmentControl;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SegmentControlSelectorProps {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
active: boolean;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
tabIndex: number;
|
|
8
|
+
showLeadingIcon?: boolean;
|
|
9
|
+
leadingIcon?: React.ReactNode;
|
|
10
|
+
showTrailingIcon?: boolean;
|
|
11
|
+
trailingIcon?: React.ReactNode;
|
|
12
|
+
onSelect: () => void;
|
|
13
|
+
onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
14
|
+
onFocus: () => void;
|
|
15
|
+
buttonRef: (node: HTMLButtonElement | null) => void;
|
|
16
|
+
ariaLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function SegmentControlSelector({ id, label, active, disabled, tabIndex, showLeadingIcon, leadingIcon, showTrailingIcon, trailingIcon, onSelect, onKeyDown, onFocus, buttonRef, ariaLabel, }: SegmentControlSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
options?: SelectOption[];
|
|
13
|
+
value?: string;
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
open?: boolean;
|
|
16
|
+
defaultOpen?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
helperText?: string;
|
|
20
|
+
errorMessage?: string;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
helperIcon?: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
onChange?: (value: string, option: SelectOption) => void;
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
'aria-label'?: string;
|
|
28
|
+
'aria-labelledby'?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function Select({ id, label, placeholder, options, value, defaultValue, open, defaultOpen, disabled, error, helperText, errorMessage, required, helperIcon, className, name, onChange, onOpenChange, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default Select;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SeparatorDirection = 'horizontal' | 'vertical';
|
|
2
|
+
export interface SeparatorProps {
|
|
3
|
+
/**
|
|
4
|
+
* Orientation of the separator line.
|
|
5
|
+
* - `horizontal` — spans the full width of its container (default)
|
|
6
|
+
* - `vertical` — spans the full height of its container
|
|
7
|
+
* @default 'horizontal'
|
|
8
|
+
*/
|
|
9
|
+
direction?: SeparatorDirection;
|
|
10
|
+
/**
|
|
11
|
+
* When `true`, marks the separator as purely decorative (`aria-hidden="true"`).
|
|
12
|
+
* Use this when the separator has no semantic meaning and is just visual rhythm.
|
|
13
|
+
* When `false` (default), the separator is exposed to assistive technology.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
decorative?: boolean;
|
|
17
|
+
/** Additional CSS class names merged onto the root element. */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function Separator({ direction, decorative, className, }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls text (and border) colour so the badge stays legible
|
|
3
|
+
* on any background it sits on.
|
|
4
|
+
*
|
|
5
|
+
* Maps to Figma "Content Color" property.
|
|
6
|
+
* - `'default'` → muted grey text + subtle border. Use on light surfaces
|
|
7
|
+
* (secondary buttons, menu cells, help text).
|
|
8
|
+
* - `'inverted'` → white text at 80 % opacity. Use on filled/dark surfaces
|
|
9
|
+
* (primary button, dark tooltips, inverted panels).
|
|
10
|
+
*/
|
|
11
|
+
export type ShortcutContentColor = 'default' | 'inverted';
|
|
12
|
+
export interface ShortcutProps {
|
|
13
|
+
/**
|
|
14
|
+
* The keyboard shortcut string displayed inside the badge.
|
|
15
|
+
* Use platform-standard notation:
|
|
16
|
+
* - Mac: `⌘K`, `⌥⇧P`, `⌃⇧Z`
|
|
17
|
+
* - Windows/Linux: `Ctrl+K`, `Alt+Shift+P`
|
|
18
|
+
*
|
|
19
|
+
* Keep to key characters only — no descriptive text inside the badge.
|
|
20
|
+
*
|
|
21
|
+
* Maps to Figma "Label" property.
|
|
22
|
+
* @default '⌘ ↵'
|
|
23
|
+
*/
|
|
24
|
+
label?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Screen-reader equivalent of `label`.
|
|
27
|
+
* Required because symbol characters (⌘, ⇧, ⌥, ⌃) are not reliably
|
|
28
|
+
* announced by assistive technologies.
|
|
29
|
+
*
|
|
30
|
+
* Write out the key names in plain English:
|
|
31
|
+
* e.g. `"Command K"`, `"Option Shift P"`, `"Control Shift Z"`
|
|
32
|
+
*/
|
|
33
|
+
'aria-label': string;
|
|
34
|
+
/**
|
|
35
|
+
* Colour treatment of the badge content.
|
|
36
|
+
* Maps to Figma "Content Color" property.
|
|
37
|
+
* - `'default'` — for light surfaces (secondary buttons, menus, help text).
|
|
38
|
+
* - `'inverted'` — for filled/dark surfaces (primary button, dark tooltips).
|
|
39
|
+
*
|
|
40
|
+
* @default 'default'
|
|
41
|
+
*/
|
|
42
|
+
contentColor?: ShortcutContentColor;
|
|
43
|
+
/** Extra CSS class names merged onto the root element. */
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* **Shortcut** — a non-interactive display badge for keyboard shortcuts.
|
|
48
|
+
*
|
|
49
|
+
* Used inline within tooltips, menus, button labels, and help text to surface
|
|
50
|
+
* available keyboard shortcuts. Never interactive — display element only.
|
|
51
|
+
*
|
|
52
|
+
* Styles live in `Shortcut.css` alongside this file. All CSS values reference
|
|
53
|
+
* `tokens.css` via `var()`.
|
|
54
|
+
*
|
|
55
|
+
* ### Usage
|
|
56
|
+
* ```tsx
|
|
57
|
+
* // Default — on light surfaces (secondary buttons, menus)
|
|
58
|
+
* <Shortcut label="⌘K" aria-label="Command K" />
|
|
59
|
+
*
|
|
60
|
+
* // Inverted — sitting on a Primary button or dark surface
|
|
61
|
+
* <Shortcut label="⌘K" aria-label="Command K" contentColor="inverted" />
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* ### Accessibility
|
|
65
|
+
* Always supply `aria-label` with plain-English key names — symbol characters
|
|
66
|
+
* (⌘, ⇧, ⌥, ⌃) are not reliably announced by screen readers.
|
|
67
|
+
*/
|
|
68
|
+
export declare function Shortcut({ label, 'aria-label': ariaLabel, contentColor, className, }: ShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export default Shortcut;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SkeletonLoadingType = 'avatar' | 'pill' | 'image' | 'card';
|
|
2
|
+
export interface SkeletonLoadingProps {
|
|
3
|
+
type?: SkeletonLoadingType;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function SkeletonLoading({ type, className }: SkeletonLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SkeletonLoading;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StatVariant = 'default' | 'card';
|
|
3
|
+
export interface StatProps {
|
|
4
|
+
/** Short label describing the metric. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Main metric value. Keep concise (e.g. 1234, 84%, 1.2k). */
|
|
7
|
+
value: React.ReactNode;
|
|
8
|
+
/** Layout treatment: plain or card-contained. */
|
|
9
|
+
variant?: StatVariant;
|
|
10
|
+
/** Additional CSS class names merged on root. */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Optional aria-label for standalone accessibility context. */
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Stat({ title, value, variant, className, 'aria-label': ariaLabel, }: StatProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Stat;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type SwitcherSize = 'md' | 'sm';
|
|
2
|
+
export interface SwitcherProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the switcher is currently on (true) or off (false).
|
|
5
|
+
* This is a **controlled** prop — the consumer must update it in `onChange`.
|
|
6
|
+
*/
|
|
7
|
+
checked: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Called when the user toggles the switcher. Receives the new value.
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Switcher checked={on} onChange={setOn} />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
onChange?: (checked: boolean) => void;
|
|
15
|
+
/**
|
|
16
|
+
* When true, the switcher is non-interactive and removed from tab order.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Visual size.
|
|
22
|
+
* - `md` — default (48 × 32 px); use in standard settings panels
|
|
23
|
+
* - `sm` — compact layouts (36 × 24 px)
|
|
24
|
+
* @default 'md'
|
|
25
|
+
*/
|
|
26
|
+
size?: SwitcherSize;
|
|
27
|
+
/**
|
|
28
|
+
* Native `id` forwarded to the root `<button>`, allowing a visible `<label>`
|
|
29
|
+
* to associate via `htmlFor`. Prefer `aria-labelledby` when the label is a
|
|
30
|
+
* sibling rendered by the same component.
|
|
31
|
+
*/
|
|
32
|
+
id?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Accessible label used when there is **no visible label element**.
|
|
35
|
+
* When a visible label exists, use `aria-labelledby` instead.
|
|
36
|
+
*/
|
|
37
|
+
'aria-label'?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Points to the `id` of the visible label element. Preferred over
|
|
40
|
+
* `aria-label` when a visible text label is present.
|
|
41
|
+
*/
|
|
42
|
+
'aria-labelledby'?: string;
|
|
43
|
+
/** Additional CSS class names merged onto the root `<button>`. */
|
|
44
|
+
className?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function Switcher({ checked, onChange, disabled, size, id, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, }: SwitcherProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TabItem {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
panel?: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
showLeadingIcon?: boolean;
|
|
8
|
+
leadingIcon?: React.ReactNode;
|
|
9
|
+
showTrailingIcon?: boolean;
|
|
10
|
+
trailingIcon?: React.ReactNode;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TabProps {
|
|
14
|
+
tabs: TabItem[];
|
|
15
|
+
value?: string;
|
|
16
|
+
defaultValue?: string;
|
|
17
|
+
onChange?: (value: string) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
showPanels?: boolean;
|
|
20
|
+
panelClassName?: string;
|
|
21
|
+
'aria-label'?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function Tab({ tabs, value, defaultValue, onChange, className, showPanels, panelClassName, 'aria-label': ariaLabel, }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export default Tab;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
export type TagVariant = 'highlight' | 'warning' | 'error' | 'success' | 'neutral';
|
|
3
|
+
export type TagSize = 'md' | 'sm';
|
|
4
|
+
export interface TagProps {
|
|
5
|
+
/**
|
|
6
|
+
* The text label displayed inside the tag.
|
|
7
|
+
* Keep to 1–3 words. Use sentence case ("In review", not "In Review").
|
|
8
|
+
*/
|
|
9
|
+
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* Semantic colour variant — choose based on meaning, not visual preference.
|
|
12
|
+
* - `highlight` — notable but not urgent (featured, active)
|
|
13
|
+
* - `warning` — caution, approaching an issue
|
|
14
|
+
* - `error` — something has gone wrong or is blocked
|
|
15
|
+
* - `success` — completed, healthy, approved
|
|
16
|
+
* - `neutral` — no semantic weight, purely categorical
|
|
17
|
+
* @default 'neutral'
|
|
18
|
+
*/
|
|
19
|
+
variant?: TagVariant;
|
|
20
|
+
/**
|
|
21
|
+
* Visual size.
|
|
22
|
+
* - `md` — default; use in most contexts
|
|
23
|
+
* - `sm` — dense layouts, tight rows, or when multiple tags appear per item
|
|
24
|
+
* @default 'md'
|
|
25
|
+
*/
|
|
26
|
+
size?: TagSize;
|
|
27
|
+
/**
|
|
28
|
+
* Replaces the default diamond indicator with any Lucide icon.
|
|
29
|
+
* Pass the component reference, not a rendered element:
|
|
30
|
+
* `icon={Star}` ✓ `icon={<Star />}` ✗
|
|
31
|
+
* When omitted the built-in CSS diamond shape is rendered.
|
|
32
|
+
*/
|
|
33
|
+
icon?: LucideIcon;
|
|
34
|
+
/**
|
|
35
|
+
* When `false`, the icon (default diamond or custom) is hidden and only the
|
|
36
|
+
* label text is shown. Defaults to `true`.
|
|
37
|
+
*/
|
|
38
|
+
showIcon?: boolean;
|
|
39
|
+
/** Additional CSS class names merged onto the root element. */
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Accessible label for the tag. Tags should not rely on colour alone —
|
|
43
|
+
* the `label` text is the primary semantic signal.
|
|
44
|
+
*
|
|
45
|
+
* When multiple tags appear on the same item, use `aria-describedby` on the
|
|
46
|
+
* host element instead of setting `aria-label` here.
|
|
47
|
+
*/
|
|
48
|
+
'aria-label'?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function Tag({ label, variant, size, icon, showIcon, className, 'aria-label': ariaLabel, }: TagProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TextAreaProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
minRows?: number;
|
|
15
|
+
helperIcon?: React.ReactNode;
|
|
16
|
+
leadingIcon?: React.ReactNode;
|
|
17
|
+
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
18
|
+
onBlur?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
19
|
+
onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
20
|
+
'aria-label'?: string;
|
|
21
|
+
'aria-labelledby'?: string;
|
|
22
|
+
autoComplete?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function TextArea({ id, label, placeholder, value, defaultValue, disabled, error, required, helperText, errorMessage, maxLength, minRows, helperIcon, leadingIcon, onChange, onBlur, onFocus, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, autoComplete, name, className, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default TextArea;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TextInputProps {
|
|
3
|
+
/** Unique id — wires <label htmlFor> ↔ <input id>. Auto-generated via useId() if omitted. */
|
|
4
|
+
id?: string;
|
|
5
|
+
/** Visible label above the control. Omit only when aria-label / aria-labelledby is provided. */
|
|
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
|
+
/** Enables "N/maxLength" character counter in the helper row. */
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
/** Optional 16×16 icon inside the control on the left. */
|
|
23
|
+
leadingIcon?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Optional 16×16 icon inside the control on the right.
|
|
26
|
+
* Hidden when maxLength is set (counter occupies that slot conceptually).
|
|
27
|
+
*/
|
|
28
|
+
trailingIcon?: React.ReactNode;
|
|
29
|
+
/** Optional 16×16 icon rendered at the start of the helper / error text row. */
|
|
30
|
+
helperIcon?: React.ReactNode;
|
|
31
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
32
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
33
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
34
|
+
'aria-label'?: string;
|
|
35
|
+
'aria-labelledby'?: string;
|
|
36
|
+
autoComplete?: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function TextInput({ id, label, placeholder, value, defaultValue, disabled, error, required, helperText, errorMessage, maxLength, leadingIcon, trailingIcon, helperIcon, onChange, onBlur, onFocus, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, autoComplete, name, className, }: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export default TextInput;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface UploadAreaProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
helperIcon?: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
accept?: string;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
maxSizeText?: string;
|
|
11
|
+
dragText?: string;
|
|
12
|
+
dropText?: string;
|
|
13
|
+
onFilesSelected?: (files: File[]) => void;
|
|
14
|
+
onFocus?: React.FocusEventHandler<HTMLButtonElement>;
|
|
15
|
+
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
16
|
+
className?: string;
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function UploadArea({ id, label, helperText, helperIcon, disabled, accept, multiple, maxSizeText, dragText, dropText, onFilesSelected, onFocus, onBlur, className, 'aria-label': ariaLabel, }: UploadAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default UploadArea;
|