react-magma-dom 4.10.0-next.9 → 4.10.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/dist/components/AIButton/StyledAIButton.d.ts +13 -0
- package/dist/components/AIButton/StyledAIButtonTemplate.d.ts +15 -0
- package/dist/components/AIButton/index.d.ts +124 -0
- package/dist/components/AIButton/styles.d.ts +14 -0
- package/dist/components/Combobox/index.d.ts +1 -14
- package/dist/components/DatePicker/CalendarContext.d.ts +4 -0
- package/dist/components/DatePicker/CalendarHeader.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMonth.d.ts +1 -0
- package/dist/components/DatePicker/MonthPicker.d.ts +6 -0
- package/dist/components/DatePicker/StyledSelect.d.ts +9 -0
- package/dist/components/DatePicker/YearPicker.d.ts +7 -0
- package/dist/components/DatePicker/index.d.ts +24 -0
- package/dist/components/DatePicker/utils.d.ts +6 -0
- package/dist/components/DateTimePicker/index.d.ts +99 -0
- package/dist/components/Drawer/Drawer.d.ts +5 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +5 -0
- package/dist/components/Popover/Popover.d.ts +15 -1
- package/dist/components/Select/index.d.ts +0 -13
- package/dist/components/Table/Table.d.ts +26 -0
- package/dist/components/Table/TableHeaderCell.d.ts +9 -1
- package/dist/components/Table/TablePagination.d.ts +5 -0
- package/dist/components/Table/TableRow.d.ts +1 -1
- package/dist/components/Tabs/CustomTab.d.ts +7 -0
- package/dist/components/Tabs/Tab.d.ts +6 -0
- package/dist/components/Toggle/index.d.ts +2 -2
- package/dist/components/Transition/Transition.d.ts +5 -0
- package/dist/components/TreeView/TreeViewContext.d.ts +5 -0
- package/dist/components/TreeView/useTreeItem.d.ts +27 -18
- package/dist/components/TreeView/useTreeView.d.ts +55 -39
- package/dist/esm/index.js +16830 -15462
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/useMagmaFloating.d.ts +24 -0
- package/dist/i18n/interface.d.ts +12 -0
- package/dist/index.d.ts +5 -2
- package/dist/properties.json +4136 -2583
- package/dist/react-magma-dom.cjs.development.js +13890 -12538
- package/dist/react-magma-dom.cjs.development.js.map +1 -1
- package/dist/react-magma-dom.cjs.production.min.js +1 -1
- package/dist/react-magma-dom.cjs.production.min.js.map +1 -1
- package/dist/theme/ThemeContext.d.ts +14 -0
- package/dist/theme/components/drawerTransition.d.ts +2 -0
- package/dist/theme/magma.d.ts +28 -0
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AIButtonSize, BaseAIButtonProps } from '.';
|
|
3
|
+
export interface StyledAIButtonProps extends BaseAIButtonProps {
|
|
4
|
+
iconOnly?: boolean;
|
|
5
|
+
trailingIcon?: React.ReactElement;
|
|
6
|
+
leadingIcon?: boolean | React.ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export declare function getIconSize(size: any, theme: any): any;
|
|
9
|
+
export interface SpanProps {
|
|
10
|
+
hasIconLeading?: boolean;
|
|
11
|
+
size?: AIButtonSize;
|
|
12
|
+
}
|
|
13
|
+
export declare const StyledAIButton: React.ForwardRefExoticComponent<StyledAIButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyledAIButtonProps } from './StyledAIButton';
|
|
3
|
+
export declare const buttonStyles: (props: any) => import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const BaseStyledAIButton: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme;
|
|
6
|
+
as?: React.ElementType<any>;
|
|
7
|
+
}, React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
8
|
+
export declare const ChildrenWrapper: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme;
|
|
10
|
+
as?: React.ElementType<any>;
|
|
11
|
+
} & {
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
testId?: string;
|
|
14
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
15
|
+
export declare const StyledAIButtonTemplate: React.ForwardRefExoticComponent<StyledAIButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IconProps } from 'react-magma-icons';
|
|
3
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
4
|
+
import { XOR } from '../../utils';
|
|
5
|
+
export declare enum AIButtonVariant {
|
|
6
|
+
variantA = "variantA",
|
|
7
|
+
variantB = "variantB"
|
|
8
|
+
}
|
|
9
|
+
export declare enum AIButtonShape {
|
|
10
|
+
fill = "fill",
|
|
11
|
+
leftCap = "leftCap",
|
|
12
|
+
rightCap = "rightCap",
|
|
13
|
+
round = "round"
|
|
14
|
+
}
|
|
15
|
+
export declare enum AIButtonSize {
|
|
16
|
+
large = "large",
|
|
17
|
+
medium = "medium",
|
|
18
|
+
small = "small"
|
|
19
|
+
}
|
|
20
|
+
export declare enum AIButtonTextTransform {
|
|
21
|
+
uppercase = "uppercase",
|
|
22
|
+
none = "none"
|
|
23
|
+
}
|
|
24
|
+
export declare enum AIButtonType {
|
|
25
|
+
button = "button",
|
|
26
|
+
submit = "submit",
|
|
27
|
+
reset = "reset"
|
|
28
|
+
}
|
|
29
|
+
export interface BaseAIButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
30
|
+
/**
|
|
31
|
+
* Set the button to display full-width.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
isFullWidth?: boolean;
|
|
35
|
+
isInverse?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Defines the border radius
|
|
38
|
+
* @default AIButtonShape.fill
|
|
39
|
+
*/
|
|
40
|
+
shape?: AIButtonShape;
|
|
41
|
+
/**
|
|
42
|
+
* Set the button to a loading state
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
isLoading?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The relative size of the button
|
|
48
|
+
* @default AIButtonSize.medium
|
|
49
|
+
*/
|
|
50
|
+
size?: AIButtonSize;
|
|
51
|
+
/**
|
|
52
|
+
* Determines whether the button appears in all-caps
|
|
53
|
+
* @default AIButtonTextTransform.uppercase
|
|
54
|
+
*/
|
|
55
|
+
textTransform?: AIButtonTextTransform;
|
|
56
|
+
/**
|
|
57
|
+
* The variant of the button
|
|
58
|
+
* @default AIButtonVariant.variantA
|
|
59
|
+
*/
|
|
60
|
+
variant?: AIButtonVariant;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
testId?: string;
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
theme?: ThemeInterface;
|
|
69
|
+
/**
|
|
70
|
+
* The type attribute of the button
|
|
71
|
+
* @default AIButtonType.button
|
|
72
|
+
*/
|
|
73
|
+
type?: AIButtonType;
|
|
74
|
+
/**
|
|
75
|
+
* Sets the color for the left side of the button gradient.
|
|
76
|
+
*/
|
|
77
|
+
leftColor?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Sets the color for the right side of the button gradient.
|
|
80
|
+
*/
|
|
81
|
+
rightColor?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Sets the color when the button is hovered.
|
|
84
|
+
*/
|
|
85
|
+
hoverColor?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Sets the color when the button is pressed (active).
|
|
88
|
+
*/
|
|
89
|
+
pressedColor?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Enables gradient animation for the button background.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
isAnimated?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface TextAIButtonProps extends BaseAIButtonProps {
|
|
97
|
+
/**
|
|
98
|
+
* The content of the component
|
|
99
|
+
*/
|
|
100
|
+
children: React.ReactChild | React.ReactChild[];
|
|
101
|
+
/**
|
|
102
|
+
* Icon to display on the right side within the component
|
|
103
|
+
*/
|
|
104
|
+
trailingIcon?: React.ReactElement<IconProps>;
|
|
105
|
+
/**
|
|
106
|
+
* Leading icon to display on the left side within the component
|
|
107
|
+
*/
|
|
108
|
+
leadingIcon?: boolean | React.ReactElement<IconProps>;
|
|
109
|
+
}
|
|
110
|
+
export interface IconOnlyAIButtonProps extends BaseAIButtonProps {
|
|
111
|
+
/**
|
|
112
|
+
* Icon to display on the right side within the component
|
|
113
|
+
*/
|
|
114
|
+
leadingIcon?: true | React.ReactElement<IconProps>;
|
|
115
|
+
/**
|
|
116
|
+
* The text the screen reader will announce. Required for icon-only buttons
|
|
117
|
+
*/
|
|
118
|
+
'aria-label': string;
|
|
119
|
+
children?: never;
|
|
120
|
+
}
|
|
121
|
+
export declare type AIButtonProps = XOR<TextAIButtonProps, IconOnlyAIButtonProps>;
|
|
122
|
+
export declare const AIButton: React.ForwardRefExoticComponent<({
|
|
123
|
+
trailingIcon?: never;
|
|
124
|
+
} & IconOnlyAIButtonProps & React.RefAttributes<HTMLButtonElement>) | ({} & TextAIButtonProps & React.RefAttributes<HTMLButtonElement>)>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function buildPropsWithDefaultAIButtonStyles(props: any): any;
|
|
2
|
+
export declare function buildAIButtonBorderRadius(props: any): any;
|
|
3
|
+
export declare function buildAIButtonFontSize(props: any): any;
|
|
4
|
+
export declare function buildAIButtonLineHeight(props: any): any;
|
|
5
|
+
export declare function buildAIButtonSize(props: any): any;
|
|
6
|
+
export declare function buildAIButtonPadding(props: any): string;
|
|
7
|
+
export declare function buildAIButtonBackground(initialProps: any): any;
|
|
8
|
+
export declare function buildAIBorderColor(initialProps: any): any;
|
|
9
|
+
export declare function buildAIColor(initialProps: any): any;
|
|
10
|
+
export declare function buildAIFocusBackground(initialProps: any): string;
|
|
11
|
+
export declare function buildAIFocusColor(initialProps: any): any;
|
|
12
|
+
export declare function buildAIActiveBackground(initialProps: any): string;
|
|
13
|
+
export declare function buildAIActiveColor(initialProps: any): any;
|
|
14
|
+
export declare function buildBoxShadow(props: any): string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ReferenceType } from '@floating-ui/react-dom';
|
|
3
2
|
import { UseComboboxProps, UseComboboxState, UseMultipleSelectionProps } from 'downshift';
|
|
4
3
|
import { InternalMultiProps, InternalSelectProps, SelectOptions } from '../Select';
|
|
5
4
|
import { Omit, XOR } from '../../utils';
|
|
@@ -14,7 +13,7 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
14
13
|
*/
|
|
15
14
|
containerStyle?: React.CSSProperties;
|
|
16
15
|
/**
|
|
17
|
-
* Default selectable options. Allows for uncontrolled component and internal creation of items. Can be an array of strings or objects
|
|
16
|
+
* Default selectable options. Allows for an uncontrolled component and internal creation of items. Can be an array of strings or objects
|
|
18
17
|
*/
|
|
19
18
|
defaultItems?: T[];
|
|
20
19
|
/**
|
|
@@ -22,10 +21,6 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
22
21
|
* @default false
|
|
23
22
|
*/
|
|
24
23
|
disableCreateItem?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
floatingElementStyles?: React.CSSProperties;
|
|
29
24
|
/**
|
|
30
25
|
* @internal
|
|
31
26
|
*/
|
|
@@ -98,14 +93,6 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
98
93
|
* Event that fires when a new item is created with the create item option is clicked in the item list menu
|
|
99
94
|
*/
|
|
100
95
|
onItemCreated?: (newItem: T) => void;
|
|
101
|
-
/**
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
setFloating?: (node: ReferenceType) => void;
|
|
105
|
-
/**
|
|
106
|
-
* @internal
|
|
107
|
-
*/
|
|
108
|
-
setReference?: (node: ReferenceType) => void;
|
|
109
96
|
/**
|
|
110
97
|
* Reference to the toggle button element wrapping the input in the combobox
|
|
111
98
|
*/
|
|
@@ -16,5 +16,9 @@ export interface CalendarContextInterface {
|
|
|
16
16
|
onPrevMonthClick: () => void;
|
|
17
17
|
onNextMonthClick: () => void;
|
|
18
18
|
setDateFocused: (value: boolean) => void;
|
|
19
|
+
setFocusedDate: (day: Date) => void;
|
|
20
|
+
setFocusedTodayDate: (event: React.SyntheticEvent) => void;
|
|
21
|
+
setMonthFocusedDate: (monthNumber: number) => void;
|
|
22
|
+
setYearFocusedDate: (yearNumber: number) => void;
|
|
19
23
|
}
|
|
20
24
|
export declare const CalendarContext: React.Context<CalendarContextInterface>;
|
|
@@ -3,5 +3,5 @@ interface CalendarHeaderProps {
|
|
|
3
3
|
focusHeader?: boolean;
|
|
4
4
|
isInverse?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const CalendarHeader: React.
|
|
6
|
+
export declare const CalendarHeader: React.FunctionComponent<CalendarHeaderProps>;
|
|
7
7
|
export {};
|
|
@@ -5,6 +5,7 @@ interface CalendarMonthProps {
|
|
|
5
5
|
isInverse?: boolean;
|
|
6
6
|
handleCloseButtonClick: (event: React.SyntheticEvent) => void;
|
|
7
7
|
setDateFocused?: (value: boolean) => void;
|
|
8
|
+
dateTimePickerContent?: React.ReactNode;
|
|
8
9
|
}
|
|
9
10
|
export declare const CalendarMonth: React.FunctionComponent<CalendarMonthProps>;
|
|
10
11
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Theme } from '@emotion/react';
|
|
3
|
+
export declare const StyledSelect: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: Theme;
|
|
5
|
+
as?: import("react").ElementType<any>;
|
|
6
|
+
} & {
|
|
7
|
+
isInverse: boolean;
|
|
8
|
+
theme: Theme;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Omit } from '../../utils';
|
|
3
|
+
export interface DatePickerApi {
|
|
4
|
+
openDatePickerManually(event: any): void;
|
|
5
|
+
closeDatePickerManually(event: any): void;
|
|
6
|
+
}
|
|
3
7
|
export interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
4
8
|
/**
|
|
5
9
|
* Style properties for the component container element
|
|
@@ -88,5 +92,25 @@ export interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInpu
|
|
|
88
92
|
* Event that will fire when the text input gains focus
|
|
89
93
|
*/
|
|
90
94
|
onInputFocus?: (event: React.FocusEvent) => void;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
dateTimePickerContent?: any;
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
additionalInputContent?: any;
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
apiRef?: React.MutableRefObject<DatePickerApi | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
setAdditionalInputContent?: (value: string) => void;
|
|
111
|
+
/**
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
onClear?: (event: React.MouseEvent) => void;
|
|
91
115
|
}
|
|
92
116
|
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -6,3 +6,9 @@ export declare function getPrevMonthFromDate(prevDate: any): Date;
|
|
|
6
6
|
export declare function getNextMonthFromDate(prevDate: any): Date;
|
|
7
7
|
export declare function i18nFormat(date: any, formatStr?: string, locale?: Locale): string;
|
|
8
8
|
export declare function getDateFromString(date: any): Date;
|
|
9
|
+
export declare function getCurrentMonthAndYear(date: Date, locale: Locale): {
|
|
10
|
+
month: string;
|
|
11
|
+
year: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function setMonthForDate(prevDate: any, numberMonth: number): Date;
|
|
14
|
+
export declare function setYearForDate(prevDate: any, numberYear: number): Date;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DateTimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'defaultValue'> {
|
|
3
|
+
/**
|
|
4
|
+
* Default selected date and time values
|
|
5
|
+
*/
|
|
6
|
+
defaultValue?: Date;
|
|
7
|
+
/**
|
|
8
|
+
* Content of the error message. If a value is provided, the component will be styled to show an error state
|
|
9
|
+
*/
|
|
10
|
+
errorMessage?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Content of the helper message
|
|
13
|
+
*/
|
|
14
|
+
helperMessage?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Style properties for the input element
|
|
17
|
+
*/
|
|
18
|
+
inputStyle?: React.CSSProperties;
|
|
19
|
+
/**
|
|
20
|
+
* Clear contents of input by clicking a clear button
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
isClearable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* If true, the component will have inverse styling to better appear on a dark background
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
isInverse?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Style properties for the label element
|
|
31
|
+
*/
|
|
32
|
+
labelStyle?: React.CSSProperties;
|
|
33
|
+
/**
|
|
34
|
+
* Text for label
|
|
35
|
+
*/
|
|
36
|
+
labelText: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Text for time picker label
|
|
39
|
+
*/
|
|
40
|
+
timePickerLabelText?: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Text for button label
|
|
43
|
+
*/
|
|
44
|
+
buttonLabelText?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Maximum date allowed to be chosen in the calendar
|
|
47
|
+
*/
|
|
48
|
+
maxDate?: Date;
|
|
49
|
+
/**
|
|
50
|
+
* Style properties for the helper or error message
|
|
51
|
+
*/
|
|
52
|
+
messageStyle?: React.CSSProperties;
|
|
53
|
+
/**
|
|
54
|
+
* Minimum date allowed to be chosen in the calendar
|
|
55
|
+
*/
|
|
56
|
+
minDate?: Date;
|
|
57
|
+
/**
|
|
58
|
+
* Text for input placeholder
|
|
59
|
+
*/
|
|
60
|
+
placeholder?: string;
|
|
61
|
+
/**
|
|
62
|
+
* If true, this component must have a value
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
required?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
testId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Value of the date input, used when setting the date value externally
|
|
72
|
+
*/
|
|
73
|
+
value?: Date;
|
|
74
|
+
/**
|
|
75
|
+
* Event that will fire when day is changed
|
|
76
|
+
*/
|
|
77
|
+
onDateChange?: (day: Date, event: React.SyntheticEvent) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Event that will fire when time is changed
|
|
80
|
+
*/
|
|
81
|
+
onTimeChange?: (time: string) => void;
|
|
82
|
+
/**
|
|
83
|
+
* Event that will fire when the text input loses focus
|
|
84
|
+
*/
|
|
85
|
+
onInputBlur?: (event: React.FocusEvent) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Event that will fire when the text input is changed
|
|
88
|
+
*/
|
|
89
|
+
onInputChange?: (event: React.ChangeEvent) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Event that will fire when the text input gains focus
|
|
92
|
+
*/
|
|
93
|
+
onInputFocus?: (event: React.FocusEvent) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Event that will fire when the done button is clicked
|
|
96
|
+
*/
|
|
97
|
+
onDone?: (event: React.SyntheticEvent) => void;
|
|
98
|
+
}
|
|
99
|
+
export declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -32,6 +32,11 @@ export interface DrawerProps extends Omit<ModalProps, 'size'> {
|
|
|
32
32
|
* @default true
|
|
33
33
|
*/
|
|
34
34
|
showBackgroundOverlay?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* If true, enables sliding animations for the drawer
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
isAnimated?: boolean;
|
|
35
40
|
isInverse?: boolean;
|
|
36
41
|
}
|
|
37
42
|
export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -40,6 +40,7 @@ export interface SpanProps {
|
|
|
40
40
|
hasIconLeading?: boolean;
|
|
41
41
|
size?: ButtonSize;
|
|
42
42
|
}
|
|
43
|
+
export declare function getIconSize(size: any, theme: any): any;
|
|
43
44
|
export declare function instanceOfIconOnly(object: any): object is IconOnlyButtonProps;
|
|
44
45
|
export declare const IconButton: React.ForwardRefExoticComponent<({} & IconTextButtonProps & React.RefAttributes<HTMLButtonElement>) | ({
|
|
45
46
|
children?: never;
|
|
@@ -96,5 +96,10 @@ export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
96
96
|
* @internal
|
|
97
97
|
*/
|
|
98
98
|
theme?: ThemeInterface;
|
|
99
|
+
/**
|
|
100
|
+
* Shows the drawer transition animation
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
hasDrawerAnimation?: boolean;
|
|
99
104
|
}
|
|
100
105
|
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,8 +4,15 @@ export declare enum PopoverPosition {
|
|
|
4
4
|
bottom = "bottom",
|
|
5
5
|
top = "top"
|
|
6
6
|
}
|
|
7
|
+
export declare enum PopoverAlignment {
|
|
8
|
+
center = "center",
|
|
9
|
+
start = "start",
|
|
10
|
+
end = "end"
|
|
11
|
+
}
|
|
12
|
+
export declare type PopoverPlacement = 'bottom' | 'bottom-start' | 'bottom-end' | 'top' | 'top-start' | 'top-end';
|
|
7
13
|
export interface PopoverApi {
|
|
8
14
|
closePopoverManually(event: any): void;
|
|
15
|
+
openPopoverManually(event: any): void;
|
|
9
16
|
}
|
|
10
17
|
export interface PopoverProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
18
|
/**
|
|
@@ -64,6 +71,7 @@ export interface PopoverProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
64
71
|
* The ref object that allows Popover manipulation.
|
|
65
72
|
* Actions available:
|
|
66
73
|
* closePopoverManually(event): void - Closes the popover manually.
|
|
74
|
+
* openPopoverManually(event): void - Opens the popover manually.
|
|
67
75
|
*/
|
|
68
76
|
apiRef?: React.MutableRefObject<PopoverApi | undefined>;
|
|
69
77
|
/**
|
|
@@ -72,10 +80,15 @@ export interface PopoverProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
72
80
|
* @default false
|
|
73
81
|
*/
|
|
74
82
|
focusTrap?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Alignment of the popover content
|
|
85
|
+
* @default PopoverAlignment.center
|
|
86
|
+
*/
|
|
87
|
+
alignment?: PopoverAlignment;
|
|
75
88
|
}
|
|
76
89
|
export interface PopoverContextInterface {
|
|
77
90
|
floatingStyles?: React.CSSProperties;
|
|
78
|
-
position?:
|
|
91
|
+
position?: PopoverPlacement;
|
|
79
92
|
closePopover?: (event: React.SyntheticEvent | React.KeyboardEvent) => void;
|
|
80
93
|
popoverTriggerId?: React.MutableRefObject<string>;
|
|
81
94
|
popoverContentId?: React.MutableRefObject<string>;
|
|
@@ -99,4 +112,5 @@ export interface PopoverContextInterface {
|
|
|
99
112
|
}
|
|
100
113
|
export declare const PopoverContext: React.Context<PopoverContextInterface>;
|
|
101
114
|
export declare function hasActiveElementsChecker(ref: any): boolean;
|
|
115
|
+
export declare function isElementInteractive(element: EventTarget | null): boolean;
|
|
102
116
|
export declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom';
|
|
3
2
|
import { UseMultipleSelectionProps, UseSelectProps } from 'downshift';
|
|
4
3
|
import { Omit, XOR } from '../../utils';
|
|
5
4
|
import { LabelPosition } from '../Label';
|
|
@@ -108,10 +107,6 @@ export interface SelectProps<T extends SelectOptions> extends UseSelectProps<T>,
|
|
|
108
107
|
* Id of the element that describes the select trigger button
|
|
109
108
|
*/
|
|
110
109
|
ariaDescribedBy?: string;
|
|
111
|
-
/**
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
floatingElementStyles?: React.CSSProperties;
|
|
115
110
|
/**
|
|
116
111
|
* @internal
|
|
117
112
|
*/
|
|
@@ -148,14 +143,6 @@ export interface SelectProps<T extends SelectOptions> extends UseSelectProps<T>,
|
|
|
148
143
|
* Event that will fire when a keypress is released while focused on the trigger button
|
|
149
144
|
*/
|
|
150
145
|
onKeyUp?: (event: React.KeyboardEvent) => void;
|
|
151
|
-
/**
|
|
152
|
-
* @internal
|
|
153
|
-
*/
|
|
154
|
-
setFloating?: (node: ReferenceType) => void;
|
|
155
|
-
/**
|
|
156
|
-
* @internal
|
|
157
|
-
*/
|
|
158
|
-
setReference?: (node: ReferenceType) => void;
|
|
159
146
|
}
|
|
160
147
|
export interface MultiSelectProps<T extends SelectOptions> extends UseMultipleSelectionProps<T>, Omit<SelectProps<T>, 'onStateChange' | 'stateReducer' | 'isMulti'>, InternalMultiProps<T> {
|
|
161
148
|
/**
|
|
@@ -13,11 +13,21 @@ export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
|
13
13
|
* @default false
|
|
14
14
|
*/
|
|
15
15
|
hasHoverStyles?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* If true, the table will have additional styles for table.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
hasTablePagination?: boolean;
|
|
16
21
|
/**
|
|
17
22
|
* If true, the table will have square edges
|
|
18
23
|
* @default false
|
|
19
24
|
*/
|
|
20
25
|
hasSquareCorners?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* If true, the table will have outer border
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
hasOutsideBorder?: boolean;
|
|
21
31
|
/**
|
|
22
32
|
* If true, columns will have vertical borders
|
|
23
33
|
*/
|
|
@@ -42,6 +52,12 @@ export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
|
42
52
|
minWidth?: number;
|
|
43
53
|
rowCount?: number;
|
|
44
54
|
selectedItems?: Array<number>;
|
|
55
|
+
/**
|
|
56
|
+
* The title or caption of a table inside a <caption> HTML element that provides the table an accessible
|
|
57
|
+
* description.
|
|
58
|
+
* It can be a simple string or a React node, such as a heading element (e.g., <h1>, <h2>).
|
|
59
|
+
*/
|
|
60
|
+
tableTitle?: React.ReactNode | string;
|
|
45
61
|
/**
|
|
46
62
|
* @internal
|
|
47
63
|
*/
|
|
@@ -74,6 +90,7 @@ interface TableContextInterface {
|
|
|
74
90
|
density?: TableDensity;
|
|
75
91
|
hasHoverStyles?: boolean;
|
|
76
92
|
hasSquareCorners?: boolean;
|
|
93
|
+
hasTablePagination?: boolean;
|
|
77
94
|
hasVerticalBorders?: boolean;
|
|
78
95
|
hasZebraStripes?: boolean;
|
|
79
96
|
isInverse?: boolean;
|
|
@@ -97,11 +114,20 @@ export declare const TableWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
97
114
|
} & {
|
|
98
115
|
minWidth: number;
|
|
99
116
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
117
|
+
export declare const StyledTableTitle: import("@emotion/styled").StyledComponent<{
|
|
118
|
+
theme?: import("@emotion/react").Theme;
|
|
119
|
+
as?: React.ElementType<any>;
|
|
120
|
+
} & {
|
|
121
|
+
isInverse: boolean;
|
|
122
|
+
isTitleNode: boolean;
|
|
123
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
100
124
|
export declare const StyledTable: import("@emotion/styled").StyledComponent<{
|
|
101
125
|
theme?: import("@emotion/react").Theme;
|
|
102
126
|
as?: React.ElementType<any>;
|
|
103
127
|
} & {
|
|
128
|
+
hasOutsideBorder?: boolean;
|
|
104
129
|
hasSquareCorners?: boolean;
|
|
130
|
+
hasTablePagination?: boolean;
|
|
105
131
|
isInverse?: boolean;
|
|
106
132
|
minWidth: number;
|
|
107
133
|
}, React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TableCellAlign, TableSortDirection } from './Table';
|
|
3
|
-
export interface TableHeaderCellProps extends React.HTMLAttributes<
|
|
3
|
+
export interface TableHeaderCellProps extends React.HTMLAttributes<HTMLTableCellElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Text alignment of the cell content. Right alignment should be used for numeric values
|
|
6
6
|
* @default TableCellAlign.left
|
|
@@ -38,6 +38,14 @@ export interface TableHeaderCellProps extends React.HTMLAttributes<HTMLTableHead
|
|
|
38
38
|
* @default auto
|
|
39
39
|
*/
|
|
40
40
|
width?: string | number;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates how many columns the header cell spans or extends
|
|
43
|
+
*/
|
|
44
|
+
colSpan?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Indicates how many rows the header cell spans or extends
|
|
47
|
+
*/
|
|
48
|
+
rowSpan?: number;
|
|
41
49
|
}
|
|
42
50
|
export declare enum TableHeaderCellScope {
|
|
43
51
|
col = "col",
|
|
@@ -35,6 +35,11 @@ export interface BaseTablePaginationProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
35
35
|
* @default true
|
|
36
36
|
*/
|
|
37
37
|
hasSquareCorners?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* If true, the table paginator will have outer border
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
hasOutsideBorder?: boolean;
|
|
38
43
|
}
|
|
39
44
|
export interface ControlledPageProps {
|
|
40
45
|
/**
|
|
@@ -25,7 +25,7 @@ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>
|
|
|
25
25
|
onTableRowSelect?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
26
|
rowIndex?: number;
|
|
27
27
|
/**
|
|
28
|
-
* Unique name to be used to identify row for
|
|
28
|
+
* Unique name to be used to identify row for screen readers
|
|
29
29
|
*/
|
|
30
30
|
rowName?: string;
|
|
31
31
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TabProps } from './Tab';
|
|
3
|
+
/**
|
|
4
|
+
* CustomTab allows full customization of the tab content while preserving tab behavior.
|
|
5
|
+
* You can pass any children (e.g., a Button) and all tab context/props will be handled.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CustomTab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -8,6 +8,11 @@ export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
8
8
|
*/
|
|
9
9
|
icon?: React.ReactElement<any> | React.ReactElement<any>[];
|
|
10
10
|
isInverse?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* If true, the tab will have no styles and will render the children directly.
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
unstyled?: boolean;
|
|
11
16
|
/**
|
|
12
17
|
* Determines whether the tab appears in all-caps
|
|
13
18
|
* @default TabsTextTransform.uppercase
|
|
@@ -33,6 +38,7 @@ export declare const StyledTabsChild: import("@emotion/styled").StyledComponent<
|
|
|
33
38
|
isInverse?: boolean;
|
|
34
39
|
orientation: TabsOrientation;
|
|
35
40
|
theme: ThemeInterface;
|
|
41
|
+
unstyled?: boolean;
|
|
36
42
|
}, React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
37
43
|
export declare const TabStyles: (props: any) => import("@emotion/react").SerializedStyles;
|
|
38
44
|
export declare const StyledIcon: import("@emotion/styled").StyledComponent<{
|