@innovaccer/design-system 4.22.0 → 4.24.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/CHANGELOG.md +157 -0
- package/README.md +35 -27
- package/css/dist/index.css +1570 -434
- package/css/dist/index.css.map +1 -1
- package/css/src/ai-components/button.module.css +4 -24
- package/css/src/ai-components/chip.module.css +12 -30
- package/css/src/ai-components/iconButton.module.css +2 -12
- package/css/src/components/avatarGroup.module.css +7 -0
- package/css/src/components/avatarSelection.module.css +22 -0
- package/css/src/components/badge.module.css +3 -3
- package/css/src/components/button.module.css +196 -27
- package/css/src/components/calendar.module.css +61 -20
- package/css/src/components/card.module.css +14 -0
- package/css/src/components/chatBubble.module.css +6 -1
- package/css/src/components/chatInput.module.css +14 -3
- package/css/src/components/chip.module.css +39 -4
- package/css/src/components/chipInput.module.css +19 -17
- package/css/src/components/dropdown.module.css +50 -14
- package/css/src/components/dropdownButton.module.css +5 -3
- package/css/src/components/dropzone.module.css +36 -0
- package/css/src/components/editableChipInput.module.css +48 -1
- package/css/src/components/editableDropdown.module.css +53 -0
- package/css/src/components/editableInput.module.css +31 -0
- package/css/src/components/grid.module.css +33 -13
- package/css/src/components/horizontalNav.module.css +16 -1
- package/css/src/components/input.module.css +0 -1
- package/css/src/components/label.module.css +12 -0
- package/css/src/components/link.module.css +69 -6
- package/css/src/components/linkButton.module.css +82 -10
- package/css/src/components/listbox.module.css +110 -6
- package/css/src/components/metricInput.module.css +89 -35
- package/css/src/components/modal.module.css +16 -0
- package/css/src/components/navigation.module.css +16 -0
- package/css/src/components/segmentedControl.module.css +1 -1
- package/css/src/components/select.module.css +11 -3
- package/css/src/components/selectionCard.module.css +38 -0
- package/css/src/components/sidesheet.module.css +16 -0
- package/css/src/components/slider.module.css +21 -0
- package/css/src/components/switch.module.css +39 -0
- package/css/src/components/table.module.css +32 -1
- package/css/src/components/tabs.module.css +20 -0
- package/css/src/components/timePicker.module.css +4 -0
- package/css/src/components/toast.module.css +19 -0
- package/css/src/components/tooltip.module.css +1 -0
- package/css/src/components/verticalNav.module.css +13 -5
- package/css/src/core/utilities.css +0 -23
- package/css/src/tokens/index.css +156 -156
- package/css/src/utils/utility.css +4 -0
- package/css/src/variables/index.css +116 -1
- package/dist/brotli/index.js +1 -1
- package/dist/brotli/index.js.br +0 -0
- package/dist/cjs/index.js +1 -1
- package/dist/core/accessibility/utils/useAccessibilityProps.d.ts +99 -16
- package/dist/core/components/atoms/_chip/index.d.ts +2 -0
- package/dist/core/components/atoms/_text/index.d.ts +2 -1
- package/dist/core/components/atoms/caption/Caption.d.ts +2 -2
- package/dist/core/components/atoms/chip/Chip.d.ts +2 -0
- package/dist/core/components/atoms/divider/Divider.d.ts +1 -0
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +2 -1
- package/dist/core/components/atoms/dropdown/option/index.d.ts +13 -4
- package/dist/core/components/atoms/helpText/HelpText.d.ts +1 -0
- package/dist/core/components/atoms/icon/Icon.d.ts +2 -3
- package/dist/core/components/atoms/link/Link.d.ts +4 -2
- package/dist/core/components/atoms/linkButton/LinkButton.d.ts +2 -1
- package/dist/core/components/atoms/message/Message.d.ts +1 -0
- package/dist/core/components/atoms/multiSlider/Handle.d.ts +1 -0
- package/dist/core/components/atoms/multiSlider/index.d.ts +2 -0
- package/dist/core/components/atoms/outsideClick/OutsideClick.d.ts +1 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +51 -50
- package/dist/core/components/atoms/progressBar/ProgressBar.d.ts +3 -0
- package/dist/core/components/atoms/progressRing/ProgressRing.d.ts +3 -0
- package/dist/core/components/atoms/segmentedControl/SegmentedControl.d.ts +2 -0
- package/dist/core/components/atoms/spinner/Spinner.d.ts +1 -0
- package/dist/core/components/atoms/statusHint/StatusHint.d.ts +2 -2
- package/dist/core/components/atoms/toast/Toast.d.ts +3 -0
- package/dist/core/components/molecules/chat/Chat.d.ts +3 -0
- package/dist/core/components/molecules/chat/chatBubble/IncomingBubble.d.ts +1 -0
- package/dist/core/components/molecules/chat/chatBubble/OutgoingBubble.d.ts +1 -0
- package/dist/core/components/molecules/chat/chatInput/ChatInput.d.ts +1 -0
- package/dist/core/components/molecules/chat/unreadMessage/UnreadMessage.d.ts +3 -0
- package/dist/core/components/molecules/chipInput/ChipInput.d.ts +1 -1
- package/dist/core/components/molecules/chipInput/utils.d.ts +2 -0
- package/dist/core/components/molecules/dropzone/Dropzone.d.ts +1 -0
- package/dist/core/components/molecules/editableInput/EditableInput.d.ts +4 -0
- package/dist/core/components/molecules/fileUploader/FileUploaderButton.d.ts +2 -0
- package/dist/core/components/molecules/inputMask/InputMask.d.ts +1 -0
- package/dist/core/components/molecules/modal/Modal.d.ts +1 -0
- package/dist/core/components/molecules/popover/Popover.d.ts +1 -0
- package/dist/core/components/molecules/sidesheet/Sidesheet.d.ts +2 -1
- package/dist/core/components/molecules/stepper/Step.d.ts +1 -0
- package/dist/core/components/organisms/calendar/Calendar.d.ts +4 -3
- package/dist/core/components/organisms/calendar/utils.d.ts +6 -5
- package/dist/core/components/organisms/combobox/Combobox.d.ts +2 -0
- package/dist/core/components/organisms/combobox/ComboboxList.d.ts +1 -0
- package/dist/core/components/organisms/combobox/trigger/ComboboxTrigger.d.ts +2 -0
- package/dist/core/components/organisms/combobox/trigger/MultiselectTrigger.d.ts +1 -0
- package/dist/core/components/organisms/grid/Grid.d.ts +1 -0
- package/dist/core/components/organisms/grid/GridContext.d.ts +1 -0
- package/dist/core/components/organisms/grid/VirtualList.d.ts +1 -0
- package/dist/core/components/organisms/inlineMessage/InlineMessage.d.ts +3 -2
- package/dist/core/components/organisms/listbox/Listbox.d.ts +9 -1
- package/dist/core/components/organisms/listbox/listboxItem/ListBody.d.ts +1 -1
- package/dist/core/components/organisms/listbox/listboxItem/ListboxItem.d.ts +2 -0
- package/dist/core/components/organisms/listbox/nestedList/NestedList.d.ts +2 -0
- package/dist/core/components/organisms/listbox/reorderList/Draggable.d.ts +12 -0
- package/dist/core/components/organisms/listbox/reorderList/DraggableList.d.ts +2 -2
- package/dist/core/components/organisms/listbox/reorderList/types.d.ts +2 -0
- package/dist/core/components/organisms/listbox/utils.d.ts +3 -0
- package/dist/core/components/organisms/menu/MenuContext.d.ts +1 -0
- package/dist/core/components/organisms/menu/SubMenuContext.d.ts +1 -0
- package/dist/core/components/organisms/select/Select.d.ts +4 -1
- package/dist/core/components/organisms/select/SelectContext.d.ts +3 -1
- package/dist/core/components/organisms/select/SelectOption.d.ts +1 -0
- package/dist/core/components/organisms/select/SelectTrigger.d.ts +4 -0
- package/dist/core/components/organisms/select/utils.d.ts +7 -2
- package/dist/core/components/organisms/textField/TextFieldCommon.d.ts +1 -0
- package/dist/core/components/organisms/verticalNav/VerticalNav.d.ts +2 -0
- package/dist/core/utils/overlayHelper.d.ts +3 -2
- package/dist/esm/index.js +4343 -1784
- package/dist/gzip/index.js +1 -1
- package/dist/gzip/index.js.gz +0 -0
- package/dist/index.js +4139 -1734
- package/dist/index.js.map +1 -1
- package/dist/index.umd.css +1558 -422
- package/dist/index.umd.js +1 -1
- package/dist/scripts/setupTest.d.ts +1 -0
- package/dist/types/tsconfig.type.tsbuildinfo +399 -243
- package/package.json +8 -13
|
@@ -7,6 +7,9 @@ export interface ProgressBarProps extends BaseProps {
|
|
|
7
7
|
max: number;
|
|
8
8
|
size: ProgressBarSize;
|
|
9
9
|
state?: ProgressBarState;
|
|
10
|
+
'aria-label'?: string;
|
|
11
|
+
'aria-labelledby'?: string;
|
|
12
|
+
id?: string;
|
|
10
13
|
}
|
|
11
14
|
export declare const ProgressBar: {
|
|
12
15
|
(props: ProgressBarProps): React.JSX.Element;
|
|
@@ -5,6 +5,9 @@ export interface ProgressRingProps extends BaseProps {
|
|
|
5
5
|
size: ProgressRingSize;
|
|
6
6
|
value: number;
|
|
7
7
|
max: number;
|
|
8
|
+
'aria-label'?: string;
|
|
9
|
+
'aria-labelledby'?: string;
|
|
10
|
+
id?: string;
|
|
8
11
|
}
|
|
9
12
|
export declare const ProgressRing: {
|
|
10
13
|
(props: ProgressRingProps): React.JSX.Element;
|
|
@@ -12,6 +12,8 @@ export interface SegmentedControlProps extends BaseProps {
|
|
|
12
12
|
isEqualWidth?: boolean;
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
children: React.ReactElement<SegmentedControlItemProps> | React.ReactElement<SegmentedControlItemProps>[];
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
'aria-labelledby'?: string;
|
|
15
17
|
}
|
|
16
18
|
export declare const SegmentedControl: {
|
|
17
19
|
(props: SegmentedControlProps): React.JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BaseProps } from "../../../utils/types";
|
|
2
|
+
import { BaseProps, BaseHtmlProps } from "../../../utils/types";
|
|
3
3
|
import { MessageAppearance } from "../../../common.type";
|
|
4
4
|
declare type StatusHintSize = 'small' | 'regular';
|
|
5
|
-
export interface StatusHintProps extends BaseProps {
|
|
5
|
+
export interface StatusHintProps extends BaseProps, BaseHtmlProps<HTMLDivElement> {
|
|
6
6
|
children: React.ReactText | React.ReactNode;
|
|
7
7
|
size?: StatusHintSize;
|
|
8
8
|
appearance: MessageAppearance;
|
|
@@ -11,6 +11,9 @@ export interface ToastProps extends BaseProps {
|
|
|
11
11
|
message?: string;
|
|
12
12
|
actions?: Action[];
|
|
13
13
|
onClose?: () => void;
|
|
14
|
+
'aria-label'?: string;
|
|
15
|
+
'aria-atomic'?: 'true' | 'false' | boolean;
|
|
16
|
+
id?: string;
|
|
14
17
|
}
|
|
15
18
|
export declare const Toast: {
|
|
16
19
|
(props: ToastProps): React.JSX.Element;
|
|
@@ -2,6 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { BaseProps } from "../../../utils/types";
|
|
3
3
|
export interface ChatProps extends BaseProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
+
role?: string;
|
|
6
|
+
'aria-live'?: 'polite' | 'assertive' | 'off';
|
|
7
|
+
'aria-label'?: string;
|
|
5
8
|
}
|
|
6
9
|
export declare const Chat: {
|
|
7
10
|
(props: ChatProps): React.JSX.Element;
|
|
@@ -18,6 +18,7 @@ export interface IncomingOptionProps extends BaseProps {
|
|
|
18
18
|
urgentMessage?: () => JSX.Element;
|
|
19
19
|
avatarData?: ChatAvatarProps;
|
|
20
20
|
showAvatar?: boolean;
|
|
21
|
+
'aria-label'?: string;
|
|
21
22
|
}
|
|
22
23
|
export declare const IncomingBubble: {
|
|
23
24
|
(props: IncomingOptionProps): React.JSX.Element;
|
|
@@ -9,6 +9,7 @@ export interface OutgoingOptionProps extends BaseProps {
|
|
|
9
9
|
actionBar?: () => JSX.Element;
|
|
10
10
|
urgentMessage?: () => JSX.Element;
|
|
11
11
|
failedMessage?: () => JSX.Element;
|
|
12
|
+
'aria-label'?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare const OutgoingBubble: {
|
|
14
15
|
(props: OutgoingOptionProps): React.JSX.Element;
|
|
@@ -14,6 +14,7 @@ export interface ChatInputProps extends BaseProps {
|
|
|
14
14
|
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
15
15
|
onSend?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>, value?: string) => void;
|
|
16
16
|
onStopGenerating?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
17
|
+
'aria-label'?: string;
|
|
17
18
|
}
|
|
18
19
|
declare const ChatInput: React.FC<ChatInputProps>;
|
|
19
20
|
export default ChatInput;
|
|
@@ -2,6 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { BaseProps } from "../../../../utils/types";
|
|
3
3
|
export interface UnreadMessageProps extends BaseProps {
|
|
4
4
|
text: string;
|
|
5
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
6
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
7
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
5
8
|
}
|
|
6
9
|
declare const UnreadMessage: React.FC<UnreadMessageProps>;
|
|
7
10
|
export default UnreadMessage;
|
|
@@ -20,7 +20,7 @@ export interface ChipInputProps extends BaseProps {
|
|
|
20
20
|
placeholder?: string;
|
|
21
21
|
value?: string[];
|
|
22
22
|
defaultValue: string[];
|
|
23
|
-
autoFocus
|
|
23
|
+
autoFocus?: boolean;
|
|
24
24
|
onChange?: (chips: string[]) => void;
|
|
25
25
|
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
26
26
|
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
@@ -10,6 +10,10 @@ export interface EditableInputProps extends BaseProps {
|
|
|
10
10
|
errorMessage?: string;
|
|
11
11
|
inputOptions: Omit<InputProps, 'error' | 'value' | 'defaultValue' | 'size' | 'placeholder'>;
|
|
12
12
|
onChange?: (value: string) => void;
|
|
13
|
+
'aria-label'?: string;
|
|
14
|
+
'aria-labelledby'?: string;
|
|
15
|
+
'aria-describedby'?: string;
|
|
16
|
+
id?: string;
|
|
13
17
|
}
|
|
14
18
|
export declare const EditableInput: {
|
|
15
19
|
(props: EditableInputProps): React.JSX.Element;
|
|
@@ -8,6 +8,8 @@ export interface FileUploaderButtonProps extends BaseProps {
|
|
|
8
8
|
uploadButtonLabel: string;
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
onChange?: (fileList: File[], event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
'aria-labelledby'?: string;
|
|
12
|
+
'aria-describedby'?: string;
|
|
11
13
|
}
|
|
12
14
|
export declare const FileUploaderButton: {
|
|
13
15
|
(props: FileUploaderButtonProps): React.JSX.Element;
|
|
@@ -13,6 +13,7 @@ export interface MaskProps extends BaseProps {
|
|
|
13
13
|
onPaste?: (e: React.ClipboardEvent<HTMLInputElement>, val?: string) => void;
|
|
14
14
|
clearOnEmptyBlur?: boolean;
|
|
15
15
|
helpText?: string;
|
|
16
|
+
useDefaultValueOnEmpty?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare type InputMaskProps = InputProps & MaskProps;
|
|
18
19
|
declare type InputMaskType = React.ForwardRefExoticComponent<InputProps & MaskProps & React.RefAttributes<HTMLInputElement>> & {
|
|
@@ -26,6 +26,7 @@ declare class Modal extends React.Component<ModalProps, ModalState> {
|
|
|
26
26
|
modalRef: React.RefObject<HTMLDivElement>;
|
|
27
27
|
modalContentRef: React.RefObject<HTMLDivElement>;
|
|
28
28
|
previousActiveElement: HTMLElement | null;
|
|
29
|
+
staticFocusTarget: HTMLElement | null;
|
|
29
30
|
autoHeadingId: string;
|
|
30
31
|
element: Element;
|
|
31
32
|
static defaultProps: {
|
|
@@ -19,6 +19,7 @@ export interface PopoverProps extends Pick<PopperWrapperProps, PopperProps>, Bas
|
|
|
19
19
|
dark?: boolean;
|
|
20
20
|
customStyle: CustomStyle;
|
|
21
21
|
triggerClass?: string;
|
|
22
|
+
wrapperElement?: 'div' | 'span';
|
|
22
23
|
hideOnReferenceEscape?: boolean;
|
|
23
24
|
boundaryElement: React.RefObject<HTMLElement> | Element;
|
|
24
25
|
animationClass?: {
|
|
@@ -27,6 +27,7 @@ declare class Sidesheet extends React.Component<SidesheetProps, SidesheetState>
|
|
|
27
27
|
sidesheetRef: React.RefObject<HTMLDivElement>;
|
|
28
28
|
sidesheetContentRef: React.RefObject<HTMLDivElement>;
|
|
29
29
|
previousActiveElement: HTMLElement | null;
|
|
30
|
+
staticFocusTarget: HTMLElement | null;
|
|
30
31
|
autofocusRAF: number | null;
|
|
31
32
|
autoHeadingId: string;
|
|
32
33
|
element: Element;
|
|
@@ -39,7 +40,7 @@ declare class Sidesheet extends React.Component<SidesheetProps, SidesheetState>
|
|
|
39
40
|
constructor(props: SidesheetProps);
|
|
40
41
|
onCloseHandler: (event: KeyboardEvent) => void;
|
|
41
42
|
onFocusTrapKeyDown: (event: KeyboardEvent) => void;
|
|
42
|
-
|
|
43
|
+
focusOnOpen: () => void;
|
|
43
44
|
onOpenAnimationStart: (event: React.AnimationEvent<HTMLDivElement>) => void;
|
|
44
45
|
activateFocusTrap: () => void;
|
|
45
46
|
deactivateFocusTrap: () => void;
|
|
@@ -8,6 +8,7 @@ export interface StepProps {
|
|
|
8
8
|
onChange?: (label: string, value?: React.ReactText) => void;
|
|
9
9
|
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
10
10
|
isTabStop?: boolean;
|
|
11
|
+
stepIndex: number;
|
|
11
12
|
}
|
|
12
13
|
export declare const Step: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
14
|
export default Step;
|
|
@@ -73,6 +73,7 @@ interface CalendarState {
|
|
|
73
73
|
focusedDateMonthIndex?: number;
|
|
74
74
|
focusedMonth?: number;
|
|
75
75
|
focusedYearIndex?: number;
|
|
76
|
+
pendingFocusDate?: Date;
|
|
76
77
|
}
|
|
77
78
|
export declare class Calendar extends React.Component<CalendarProps, CalendarState> {
|
|
78
79
|
static defaultProps: {
|
|
@@ -93,9 +94,9 @@ export declare class Calendar extends React.Component<CalendarProps, CalendarSta
|
|
|
93
94
|
col: number;
|
|
94
95
|
} | null;
|
|
95
96
|
getInRangeError: () => boolean;
|
|
96
|
-
selectYear: (year: number) => () => void;
|
|
97
|
+
selectYear: (year: number, disabled?: boolean | undefined) => () => void;
|
|
97
98
|
yearMouseOverHandler: (year: number, isCurrentYear: boolean, isDisabled: boolean, ev: React.MouseEvent<HTMLButtonElement>) => void;
|
|
98
|
-
selectMonth: (month: number) => () => void;
|
|
99
|
+
selectMonth: (month: number, disabled?: boolean | undefined) => () => void;
|
|
99
100
|
monthMouseOverHandler: (month: number, isCurrentMonth: boolean, isDisabled: boolean, ev: React.MouseEvent<HTMLButtonElement>) => void;
|
|
100
101
|
selectDate: (index: number, date: number, prevMonthDayRange: number, dayRange: number) => void;
|
|
101
102
|
calculateDate: (index: number, date: number, prevMonthDayRange: number, dayRange: number, isDateHovered: boolean) => Date | undefined;
|
|
@@ -108,7 +109,7 @@ export declare class Calendar extends React.Component<CalendarProps, CalendarSta
|
|
|
108
109
|
onDateRowMouseLeaveHandler: () => void;
|
|
109
110
|
handleMonthCellKeyDown: (event: React.KeyboardEvent, _month: number, disabled: boolean) => void;
|
|
110
111
|
handleYearCellKeyDown: (event: React.KeyboardEvent, _year: number, _offset: number, disabled: boolean) => void;
|
|
111
|
-
handleDateCellKeyDown: (ev: React.KeyboardEvent, index: number,
|
|
112
|
+
handleDateCellKeyDown: (ev: React.KeyboardEvent, index: number, _row: number, _col: number, _noOfRows: number, date: number, prevMonthDayRange: number, dayRange: number, inRangeError: boolean, rangePicker: boolean, startDate?: Date | undefined, endDate?: Date | undefined) => void;
|
|
112
113
|
renderBodyDate: (index: number) => React.JSX.Element;
|
|
113
114
|
renderEventsIndicator(size: string, active: boolean): React.JSX.Element;
|
|
114
115
|
renderDateValues: (index: number) => React.JSX.Element[];
|
|
@@ -18,11 +18,10 @@ export declare const formatDateAriaLabel: (d: Date) => string;
|
|
|
18
18
|
export interface HandleDateViewKeyDownParams {
|
|
19
19
|
event: React.KeyboardEvent;
|
|
20
20
|
container: HTMLElement;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
onNavigate: (row: number, col: number) => void;
|
|
21
|
+
focusedDate: Date;
|
|
22
|
+
startOfWeekIndex?: number;
|
|
23
|
+
isDateDisabled?: (d: Date) => boolean;
|
|
24
|
+
onNavigate: (newDate: Date) => void;
|
|
26
25
|
onSelect: () => void;
|
|
27
26
|
onPageUp: () => void;
|
|
28
27
|
onPageDown: () => void;
|
|
@@ -35,6 +34,7 @@ export interface HandleMonthViewKeyDownParams {
|
|
|
35
34
|
event: React.KeyboardEvent;
|
|
36
35
|
container: HTMLElement;
|
|
37
36
|
focusedMonth: number;
|
|
37
|
+
isMonthDisabled?: (month: number) => boolean;
|
|
38
38
|
onNavigate: (month: number) => void;
|
|
39
39
|
onSelect: (month: number) => void;
|
|
40
40
|
onEscape?: () => void;
|
|
@@ -45,6 +45,7 @@ export interface HandleYearViewKeyDownParams {
|
|
|
45
45
|
container: HTMLElement;
|
|
46
46
|
focusedYearIndex: number;
|
|
47
47
|
yearBlockStart: number;
|
|
48
|
+
isYearDisabled?: (year: number) => boolean;
|
|
48
49
|
onNavigate: (yearIndex: number) => void;
|
|
49
50
|
onSelect: (year: number) => void;
|
|
50
51
|
onPageUp: () => void;
|
|
@@ -29,6 +29,8 @@ export interface ComboboxProps extends BaseProps {
|
|
|
29
29
|
className?: string;
|
|
30
30
|
'aria-label'?: string;
|
|
31
31
|
'aria-labelledby'?: string;
|
|
32
|
+
'aria-describedby'?: string;
|
|
33
|
+
'aria-errormessage'?: string;
|
|
32
34
|
}
|
|
33
35
|
export declare const Combobox: {
|
|
34
36
|
(props: ComboboxProps): React.JSX.Element;
|
|
@@ -19,6 +19,8 @@ interface ComboboxTriggerProps {
|
|
|
19
19
|
clearButton?: boolean;
|
|
20
20
|
'aria-label'?: string;
|
|
21
21
|
'aria-labelledby'?: string;
|
|
22
|
+
'aria-describedby'?: string;
|
|
23
|
+
'aria-errormessage'?: string;
|
|
22
24
|
}
|
|
23
25
|
export declare const ComboboxTrigger: (props: ComboboxTriggerProps) => React.JSX.Element;
|
|
24
26
|
export default ComboboxTrigger;
|
|
@@ -30,6 +30,7 @@ export interface MultiSelectTriggerProps extends BaseProps {
|
|
|
30
30
|
role?: React.AriaRole;
|
|
31
31
|
'aria-label'?: string;
|
|
32
32
|
'aria-labelledby'?: string;
|
|
33
|
+
'aria-invalid'?: boolean | 'true' | 'false' | 'grammar' | 'spelling';
|
|
33
34
|
}
|
|
34
35
|
export declare const MultiSelectTrigger: React.ForwardRefExoticComponent<MultiSelectTriggerProps & React.RefAttributes<HTMLElement>>;
|
|
35
36
|
export default MultiSelectTrigger;
|
|
@@ -156,6 +156,7 @@ export interface GridState {
|
|
|
156
156
|
export declare class Grid extends React.Component<GridProps, GridState> {
|
|
157
157
|
static defaultProps: GridProps;
|
|
158
158
|
gridRef: GridRef;
|
|
159
|
+
gridId: string;
|
|
159
160
|
isHeadSyncing: boolean;
|
|
160
161
|
isBodySyncing: boolean;
|
|
161
162
|
constructor(props: GridProps);
|
|
@@ -9,6 +9,7 @@ interface VirtualScrollProps extends BaseProps {
|
|
|
9
9
|
totalLength: number;
|
|
10
10
|
renderItem: (index: number, item?: object) => React.ReactElement;
|
|
11
11
|
onScroll?: (event: Event, element: HTMLElement) => void;
|
|
12
|
+
role?: React.AriaRole;
|
|
12
13
|
}
|
|
13
14
|
declare const VirtualList: (props: VirtualScrollProps) => React.JSX.Element;
|
|
14
15
|
export default VirtualList;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BaseProps } from "../../../utils/types";
|
|
2
|
+
import { BaseProps, BaseHtmlProps } from "../../../utils/types";
|
|
3
3
|
import { MessageAppearance } from "../../../common.type";
|
|
4
4
|
export declare type MessageSize = 'regular' | 'small';
|
|
5
|
-
export interface InlineMessageProps extends BaseProps {
|
|
5
|
+
export interface InlineMessageProps extends BaseProps, BaseHtmlProps<HTMLDivElement> {
|
|
6
|
+
id?: string;
|
|
6
7
|
appearance: MessageAppearance;
|
|
7
8
|
description: string;
|
|
8
9
|
size: MessageSize;
|
|
@@ -11,7 +11,14 @@ export interface ListboxProps extends BaseProps, BaseHtmlProps<HTMLUListElement
|
|
|
11
11
|
tagName: TagType;
|
|
12
12
|
showDivider: boolean;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export interface ListboxInternalProps extends ListboxProps {
|
|
15
|
+
customFocusManagement?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare type ListboxContextValue = Omit<ListboxInternalProps, 'children' | 'tagName'> & {
|
|
18
|
+
rovingIndex: number;
|
|
19
|
+
setRovingIndex: React.Dispatch<React.SetStateAction<number>>;
|
|
20
|
+
};
|
|
21
|
+
export declare const ListboxContext: React.Context<ListboxContextValue>;
|
|
15
22
|
export declare const Listbox: {
|
|
16
23
|
(props: ListboxProps): React.JSX.Element;
|
|
17
24
|
displayName: string;
|
|
@@ -21,6 +28,7 @@ export declare const Listbox: {
|
|
|
21
28
|
type: string;
|
|
22
29
|
draggable: boolean;
|
|
23
30
|
showDivider: boolean;
|
|
31
|
+
customFocusManagement: boolean;
|
|
24
32
|
};
|
|
25
33
|
Item: {
|
|
26
34
|
(props: import("./listboxItem").ListboxItemProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ListboxItemProps } from "./ListboxItem";
|
|
3
3
|
export declare const ListBody: {
|
|
4
|
-
(props: ListboxItemProps): React.JSX.Element;
|
|
4
|
+
(props: ListboxItemProps & React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default ListBody;
|
|
@@ -5,6 +5,8 @@ export interface ListboxItemProps extends BaseProps, BaseHtmlProps<HTMLLIElement
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
nestedBody?: React.ReactNode;
|
|
7
7
|
expanded?: boolean;
|
|
8
|
+
nestedListId?: string;
|
|
9
|
+
nestedListAriaLabel?: string;
|
|
8
10
|
disabled?: boolean;
|
|
9
11
|
selected?: boolean;
|
|
10
12
|
activated?: boolean;
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
export interface NestedListProp {
|
|
3
3
|
expanded?: boolean;
|
|
4
4
|
nestedBody?: React.ReactNode;
|
|
5
|
+
id?: string;
|
|
6
|
+
'aria-label'?: string;
|
|
5
7
|
}
|
|
6
8
|
export declare const NestedList: (props: NestedListProp) => React.JSX.Element;
|
|
7
9
|
export default NestedList;
|
|
@@ -9,6 +9,9 @@ declare class Draggable<Value = string> extends React.Component<IProps<Value>> {
|
|
|
9
9
|
lastScroll: number;
|
|
10
10
|
lastYOffset: number;
|
|
11
11
|
lastListYOffset: number;
|
|
12
|
+
mouseDownX: number;
|
|
13
|
+
mouseDownY: number;
|
|
14
|
+
hasDragStarted: boolean;
|
|
12
15
|
dropTimeout?: number;
|
|
13
16
|
needle: number;
|
|
14
17
|
afterIndex: number;
|
|
@@ -16,6 +19,7 @@ declare class Draggable<Value = string> extends React.Component<IProps<Value>> {
|
|
|
16
19
|
itemDragged: number;
|
|
17
20
|
itemDraggedOutOfBounds: number;
|
|
18
21
|
selectedItem: number;
|
|
22
|
+
focusedIndex: number;
|
|
19
23
|
initialX: number;
|
|
20
24
|
initialY: number;
|
|
21
25
|
targetX: number;
|
|
@@ -24,6 +28,8 @@ declare class Draggable<Value = string> extends React.Component<IProps<Value>> {
|
|
|
24
28
|
targetWidth: number;
|
|
25
29
|
scrollingSpeed: number;
|
|
26
30
|
scrollWindow: boolean;
|
|
31
|
+
isClickAndFollow: boolean;
|
|
32
|
+
ariaMessage: string;
|
|
27
33
|
};
|
|
28
34
|
schdOnMouseMove: {
|
|
29
35
|
(e: MouseEvent): void;
|
|
@@ -43,6 +49,7 @@ declare class Draggable<Value = string> extends React.Component<IProps<Value>> {
|
|
|
43
49
|
scrollingSpeed: number;
|
|
44
50
|
}): void;
|
|
45
51
|
componentWillUnmount(): void;
|
|
52
|
+
ensureKeyboardReorderVisible: (pickedIndex: number, needleIndex: number) => void;
|
|
46
53
|
doScrolling: () => void;
|
|
47
54
|
getChildren: () => Element[];
|
|
48
55
|
static defaultProps: {
|
|
@@ -63,8 +70,13 @@ declare class Draggable<Value = string> extends React.Component<IProps<Value>> {
|
|
|
63
70
|
autoScrolling: (clientY: number) => void;
|
|
64
71
|
animateItems: (needle: number, movedItem: number, offset: number, animateMovedItem?: boolean) => void;
|
|
65
72
|
isDraggedItemOutOfBounds: () => boolean;
|
|
73
|
+
finalizeActivePointerDrop: () => void;
|
|
74
|
+
completeClickAndFollowDropAtFocusedIndex: (index: number) => void;
|
|
66
75
|
onEnd: (e: TouchEvent & MouseEvent) => void;
|
|
67
76
|
finishDrop: () => void;
|
|
77
|
+
cancelKeyboardPick: () => void;
|
|
78
|
+
commitKeyboardReorder: () => void;
|
|
79
|
+
advanceTabFocusFromActiveElement: (shiftKey: boolean) => void;
|
|
68
80
|
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
69
81
|
render(): React.JSX.Element;
|
|
70
82
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const DraggableList: (props:
|
|
2
|
+
import { ListboxInternalProps } from "../Listbox";
|
|
3
|
+
export declare const DraggableList: (props: ListboxInternalProps) => React.JSX.Element;
|
|
@@ -2,8 +2,10 @@ export interface IItemProps {
|
|
|
2
2
|
key?: number;
|
|
3
3
|
tabIndex?: number;
|
|
4
4
|
'aria-roledescription'?: string;
|
|
5
|
+
'aria-grabbed'?: boolean;
|
|
5
6
|
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
6
7
|
onWheel?: (e: React.WheelEvent) => void;
|
|
8
|
+
onFocus?: () => void;
|
|
7
9
|
style?: React.CSSProperties;
|
|
8
10
|
ref?: React.RefObject<any>;
|
|
9
11
|
}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const resolveListboxOptionFromEvent: (event: React.SyntheticEvent, fallback: HTMLElement) => HTMLElement;
|
|
3
|
+
export declare const isListboxOptionDisabled: (optionElement: HTMLElement) => boolean;
|
|
1
4
|
export declare const onKeyDown: (event: React.KeyboardEvent) => void;
|
|
@@ -8,6 +8,7 @@ export declare type ContextProps = {
|
|
|
8
8
|
setHighlightFirstItem?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
9
|
setHighlightLastItem?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
10
|
setFocusedOption?: React.Dispatch<React.SetStateAction<HTMLElement | undefined>>;
|
|
11
|
+
menuId?: string;
|
|
11
12
|
};
|
|
12
13
|
export declare const MenuContext: React.Context<ContextProps>;
|
|
13
14
|
export default MenuContext;
|
|
@@ -5,6 +5,7 @@ export declare type ContextProps = {
|
|
|
5
5
|
parentListRef?: React.RefObject<HTMLDivElement>;
|
|
6
6
|
menuID?: string;
|
|
7
7
|
triggerID?: string;
|
|
8
|
+
parentMenuTriggerRef?: React.RefObject<HTMLButtonElement>;
|
|
8
9
|
};
|
|
9
10
|
export declare const SubMenuContext: React.Context<ContextProps>;
|
|
10
11
|
export default SubMenuContext;
|
|
@@ -14,7 +14,7 @@ export interface SelectProps extends BaseProps {
|
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
width?: number | string;
|
|
16
16
|
styleType?: SelectStyleType;
|
|
17
|
-
popoverWidth?: number;
|
|
17
|
+
popoverWidth?: number | string;
|
|
18
18
|
maxHeight?: number;
|
|
19
19
|
minHeight?: number;
|
|
20
20
|
value?: OptionType | OptionType[];
|
|
@@ -25,6 +25,9 @@ export interface SelectProps extends BaseProps {
|
|
|
25
25
|
onToggle?: (open: boolean) => void;
|
|
26
26
|
trigger?: React.ReactElement;
|
|
27
27
|
triggerOptions?: SelectTriggerProps;
|
|
28
|
+
'aria-describedby'?: string;
|
|
29
|
+
'aria-errormessage'?: string;
|
|
30
|
+
trapFocus?: boolean;
|
|
28
31
|
}
|
|
29
32
|
export interface SelectMethods {
|
|
30
33
|
setOpen: (open: boolean) => void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { OptionType, TListboxSize, SelectStyleType } from "../../../common.type";
|
|
3
3
|
export declare type ContextProps = {
|
|
4
|
+
listboxId?: string;
|
|
4
5
|
openPopover?: boolean;
|
|
5
6
|
setOpenPopover?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
7
|
selectValue?: OptionType | OptionType[];
|
|
@@ -15,7 +16,7 @@ export declare type ContextProps = {
|
|
|
15
16
|
setWithSearch?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
17
|
multiSelect?: boolean;
|
|
17
18
|
listRef?: React.RefObject<HTMLDivElement>;
|
|
18
|
-
triggerRef?: React.RefObject<
|
|
19
|
+
triggerRef?: React.RefObject<HTMLElement | null>;
|
|
19
20
|
focusedOption?: HTMLElement;
|
|
20
21
|
setFocusedOption?: React.Dispatch<React.SetStateAction<HTMLElement | undefined>>;
|
|
21
22
|
setHighlightFirstItem?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -23,6 +24,7 @@ export declare type ContextProps = {
|
|
|
23
24
|
size?: TListboxSize;
|
|
24
25
|
styleType?: SelectStyleType;
|
|
25
26
|
error?: boolean;
|
|
27
|
+
rovingIndex?: number;
|
|
26
28
|
};
|
|
27
29
|
export declare const SelectContext: React.Context<ContextProps>;
|
|
28
30
|
export default SelectContext;
|
|
@@ -4,6 +4,10 @@ import { BaseProps } from "../../../utils/types";
|
|
|
4
4
|
export declare type SelectTriggerSize = 'small' | 'regular';
|
|
5
5
|
export interface SelectTriggerProps extends BaseProps {
|
|
6
6
|
'aria-label'?: string;
|
|
7
|
+
'aria-describedby'?: string;
|
|
8
|
+
'aria-errormessage'?: string;
|
|
9
|
+
'aria-invalid'?: boolean | 'true' | 'false' | 'grammar' | 'spelling';
|
|
10
|
+
'aria-controls'?: string;
|
|
7
11
|
triggerSize?: SelectTriggerSize;
|
|
8
12
|
icon?: string;
|
|
9
13
|
iconType?: IconType;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { OptionType } from "../../../common.type";
|
|
3
|
+
export declare const getNextFocusableAfterTrigger: (startNode: HTMLElement | null, shiftKey: boolean, excludeContainer?: HTMLElement | null | undefined) => HTMLElement | null;
|
|
4
|
+
export declare const getFocusableElements: (container: HTMLElement) => HTMLElement[];
|
|
3
5
|
export declare const mapInitialValue: (multiSelect: boolean, selectedValue: OptionType | OptionType[] | undefined) => OptionType | OptionType[];
|
|
4
6
|
export declare const elementExist: (targetObject: OptionType, mainList: OptionType | OptionType[] | undefined) => number;
|
|
5
7
|
export declare const removeOrAddToList: (targetObject: OptionType, prevList: OptionType[]) => OptionType[];
|
|
6
8
|
export declare const computeValue: (multiSelect: boolean | undefined, selectValue: any, setLabel?: ((count: number) => string | undefined) | undefined) => any;
|
|
7
9
|
export declare const handleKeyDownTrigger: (event: React.KeyboardEvent, setOpenPopover?: React.Dispatch<React.SetStateAction<boolean>> | undefined, setHighlightFirstItem?: React.Dispatch<React.SetStateAction<boolean>> | undefined, setHighlightLastItem?: React.Dispatch<React.SetStateAction<boolean>> | undefined) => void;
|
|
8
10
|
export declare const focusListItem: (position: string, setFocusedOption?: React.Dispatch<React.SetStateAction<HTMLElement | undefined>> | undefined, listRef?: any) => void;
|
|
9
|
-
export declare const handleKeyDown: (event: React.KeyboardEvent,
|
|
11
|
+
export declare const handleKeyDown: (event: React.KeyboardEvent, _focusedOption: Element | undefined, setFocusedOption?: React.Dispatch<React.SetStateAction<HTMLElement | undefined>> | undefined, setHighlightFirstItem?: React.Dispatch<React.SetStateAction<boolean>> | undefined, setHighlightLastItem?: React.Dispatch<React.SetStateAction<boolean>> | undefined, listRef?: any, withSearch?: boolean | undefined, setOpenPopover?: React.Dispatch<React.SetStateAction<boolean>> | undefined, triggerRef?: any) => void;
|
|
10
12
|
export declare const handleEnterKey: (focusedOption: Element | undefined) => void;
|
|
11
|
-
export declare const navigateOptions: (direction: string,
|
|
13
|
+
export declare const navigateOptions: (direction: string, eventTarget: Element | undefined, setFocusedOption?: React.Dispatch<React.SetStateAction<HTMLElement | undefined>> | undefined, listRef?: any, withSearch?: boolean | undefined) => void;
|
|
12
14
|
export declare const handleInputKeyDown: (event: React.KeyboardEvent, listRef: any, setFocusedOption?: React.Dispatch<React.SetStateAction<HTMLElement | undefined>> | undefined, setOpenPopover?: React.Dispatch<React.SetStateAction<boolean>> | undefined, triggerRef?: any) => void;
|
|
15
|
+
export declare const LISTBOX_ITEM_SELECTOR = "[data-test=\"DesignSystem-Select-Option\"]";
|
|
16
|
+
export declare const getRovingIndex: (listRef: React.RefObject<HTMLDivElement | null> | null, focusedOption: HTMLElement | undefined) => number;
|
|
17
|
+
export declare const focusPopoverInitial: (listRef: React.RefObject<HTMLDivElement | null> | null, setFocusedOption: React.Dispatch<React.SetStateAction<HTMLElement | undefined>> | undefined) => number;
|