@livechat/design-system-react-components 1.0.0-alpha.5 → 1.0.0-alpha.51

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.
Files changed (108) hide show
  1. package/dist/dsrc.cjs.js +15 -1
  2. package/dist/dsrc.es.js +3194 -994
  3. package/dist/dsrc.umd.js +15 -1
  4. package/dist/shadow/shadow.css +39 -0
  5. package/dist/shadow/shadow.css.map +1 -0
  6. package/dist/shadow/spacing.css +18 -0
  7. package/dist/shadow/spacing.css.map +1 -0
  8. package/dist/spacing/shadow.css +39 -0
  9. package/dist/spacing/shadow.css.map +1 -0
  10. package/dist/spacing/spacing.css +18 -0
  11. package/dist/spacing/spacing.css.map +1 -0
  12. package/dist/src/components/Alert/Alert.d.ts +4 -14
  13. package/dist/src/components/Avatar/Avatar.d.ts +19 -0
  14. package/dist/src/components/Avatar/Avatar.helpers.d.ts +2 -0
  15. package/dist/src/components/Avatar/index.d.ts +1 -0
  16. package/dist/src/components/Badge/Badge.d.ts +6 -2
  17. package/dist/src/components/Badge/Badge.helpers.d.ts +1 -0
  18. package/dist/src/components/Button/Button.d.ts +13 -5
  19. package/dist/src/components/Button/index.d.ts +1 -1
  20. package/dist/src/components/Card/Card.d.ts +8 -2
  21. package/dist/src/components/Checkbox/Checkbox.d.ts +3 -3
  22. package/dist/src/components/Checkbox/index.d.ts +0 -1
  23. package/dist/src/components/DatePicker/DatePicker.d.ts +4 -0
  24. package/dist/src/components/DatePicker/DatePickerNavbar.d.ts +4 -0
  25. package/dist/src/components/DatePicker/RangeDatePicker.d.ts +16 -0
  26. package/dist/src/components/DatePicker/helpers.d.ts +39 -0
  27. package/dist/src/components/DatePicker/hooks.d.ts +6 -0
  28. package/dist/src/components/DatePicker/index.d.ts +2 -0
  29. package/dist/src/components/DatePicker/types.d.ts +100 -0
  30. package/dist/src/components/FieldGroup/FieldGroup.d.ts +1 -1
  31. package/dist/src/components/FileUploadProgress/FileUploadProgress.d.ts +15 -0
  32. package/dist/src/components/FileUploadProgress/FileUploadProgressActions.d.ts +9 -0
  33. package/dist/src/components/FileUploadProgress/index.d.ts +2 -0
  34. package/dist/src/components/Form/Form.d.ts +1 -1
  35. package/dist/src/components/{TextField/TextField.d.ts → FormField/FormField.d.ts} +2 -2
  36. package/dist/src/components/FormField/index.d.ts +1 -0
  37. package/dist/src/components/FormGroup/FormGroup.d.ts +1 -1
  38. package/dist/src/components/Icon/Icon.d.ts +6 -62
  39. package/dist/src/components/Icon/index.d.ts +1 -1
  40. package/dist/src/components/Input/Input.d.ts +14 -0
  41. package/dist/src/components/Input/index.d.ts +1 -0
  42. package/dist/src/components/Modal/Modal.d.ts +2 -0
  43. package/dist/src/components/Modal/ModalBase.d.ts +2 -1
  44. package/dist/src/components/Modal/ModalCloseButton.d.ts +4 -1
  45. package/dist/src/components/Modal/ModalPortal.d.ts +1 -1
  46. package/dist/src/components/Modal/index.d.ts +0 -2
  47. package/dist/src/components/NumericInput/index.d.ts +0 -1
  48. package/dist/src/components/Picker/Picker.d.ts +23 -0
  49. package/dist/src/components/Picker/PickerList.d.ts +23 -0
  50. package/dist/src/components/Picker/Trigger.d.ts +15 -0
  51. package/dist/src/components/Picker/TriggerBody.d.ts +16 -0
  52. package/dist/src/components/Picker/constants.d.ts +21 -0
  53. package/dist/src/components/Picker/index.d.ts +2 -0
  54. package/dist/src/components/Popover/Popover.d.ts +4 -7
  55. package/dist/src/components/Progress/ProgressBar.d.ts +9 -0
  56. package/dist/src/components/Progress/ProgressCircle.d.ts +1 -1
  57. package/dist/src/components/Progress/constants.d.ts +2 -10
  58. package/dist/src/components/Progress/index.d.ts +1 -0
  59. package/dist/src/components/PromoBanner/PromoBanner.d.ts +1 -7
  60. package/dist/src/components/RadioButton/RadioButton.d.ts +2 -2
  61. package/dist/src/components/Search/Search.d.ts +12 -0
  62. package/dist/src/components/Search/index.d.ts +1 -0
  63. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +18 -0
  64. package/dist/src/components/SegmentedControl/index.d.ts +2 -0
  65. package/dist/src/components/Switch/Switch.d.ts +5 -8
  66. package/dist/src/components/Tab/Tab.d.ts +5 -2
  67. package/dist/src/components/Tag/Tag.d.ts +5 -3
  68. package/dist/src/components/TagInput/TagInput.d.ts +1 -0
  69. package/dist/src/components/Textarea/Textarea.d.ts +6 -0
  70. package/dist/src/components/Textarea/index.d.ts +1 -0
  71. package/dist/src/components/Toast/Toast.d.ts +8 -14
  72. package/dist/src/components/Toast/ToastWrapper.d.ts +2 -9
  73. package/dist/src/components/Tooltip/Info.d.ts +8 -0
  74. package/dist/src/components/Tooltip/Interactive.d.ts +23 -0
  75. package/dist/src/components/Tooltip/Simple.d.ts +4 -0
  76. package/dist/src/components/Tooltip/SpotlightOverlay.d.ts +7 -0
  77. package/dist/src/components/Tooltip/Tooltip.d.ts +22 -0
  78. package/dist/src/components/Tooltip/UserGuide.d.ts +12 -0
  79. package/dist/src/components/Tooltip/helpers.d.ts +2 -0
  80. package/dist/src/components/Tooltip/index.d.ts +5 -0
  81. package/dist/src/components/Tooltip/virtualElementReference.d.ts +9 -0
  82. package/dist/src/components/Typography/Heading.d.ts +1 -1
  83. package/dist/src/components/Typography/Text.d.ts +1 -1
  84. package/dist/src/components/UploadBar/UploadBar.d.ts +16 -0
  85. package/dist/src/components/UploadBar/index.d.ts +1 -0
  86. package/dist/src/foundations/shadow-token.d.ts +5 -0
  87. package/dist/src/foundations/spacing-token.d.ts +16 -0
  88. package/dist/src/global.d.ts +4 -0
  89. package/dist/src/index.d.ts +16 -4
  90. package/dist/src/themes/{designTokens.d.ts → design-token.d.ts} +104 -4
  91. package/dist/src/utils/constants.d.ts +1 -0
  92. package/dist/src/utils/index.d.ts +1 -0
  93. package/dist/style.css +1 -1
  94. package/dist/themes/dark.css +145 -21
  95. package/dist/themes/dark.css.map +1 -1
  96. package/dist/themes/legacy.css +133 -9
  97. package/dist/themes/legacy.css.map +1 -1
  98. package/dist/themes/light.css +133 -9
  99. package/dist/themes/light.css.map +1 -1
  100. package/package.json +23 -13
  101. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +0 -11
  102. package/dist/src/components/ButtonGroup/index.d.ts +0 -1
  103. package/dist/src/components/Checkbox/CheckboxField.d.ts +0 -7
  104. package/dist/src/components/InputField/InputField.d.ts +0 -15
  105. package/dist/src/components/InputField/index.d.ts +0 -1
  106. package/dist/src/components/Modal/ActionModal.d.ts +0 -8
  107. package/dist/src/components/NumericInput/NumericInputField.d.ts +0 -19
  108. package/dist/src/components/TextField/index.d.ts +0 -1
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ declare type AvatarShape = 'circle' | 'rounded-square';
3
+ declare type AvatarSize = 'xxxsmall' | 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
4
+ declare type AvatarStatus = 'available' | 'unavailable' | 'unknown';
5
+ declare type AvatarType = 'image' | 'text';
6
+ export interface AvatarProps {
7
+ alt?: string;
8
+ className?: string;
9
+ color?: string;
10
+ shape?: AvatarShape;
11
+ size?: AvatarSize;
12
+ src?: string;
13
+ status?: AvatarStatus;
14
+ text?: string;
15
+ type: AvatarType;
16
+ withRim?: boolean;
17
+ }
18
+ export declare const Avatar: React.FC<AvatarProps>;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function getInitials(name?: string, count?: number): string;
2
+ export declare function getFontColor(color: string): string;
@@ -0,0 +1 @@
1
+ export { Avatar } from './Avatar';
@@ -1,5 +1,9 @@
1
1
  import * as React from 'react';
2
- export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
3
- secondary?: boolean;
2
+ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ count?: number;
4
+ kind?: 'primary' | 'secondary' | 'tertiary';
5
+ max?: number;
6
+ size?: 'large' | 'medium' | 'compact';
7
+ type?: 'counter' | 'alert' | 'dot';
4
8
  }
5
9
  export declare const Badge: React.FC<BadgeProps>;
@@ -0,0 +1 @@
1
+ export declare function formatCount(count: number, max: number): string;
@@ -1,13 +1,21 @@
1
1
  import * as React from 'react';
2
- export declare type ButtonSize = 'compact' | 'medium' | 'large';
2
+ import { Size } from 'utils';
3
+ export declare type ButtonKind = 'basic' | 'primary' | 'secondary' | 'destructive' | 'text' | 'plain' | 'plain-light' | 'subtle';
3
4
  export declare type ButtonProps = {
4
- kind?: 'basic' | 'primary' | 'secondary' | 'destructive' | 'text' | 'plain' | 'plain-light';
5
- size?: ButtonSize;
6
- disabled?: boolean;
5
+ kind?: ButtonKind;
6
+ size?: Size;
7
7
  loading?: boolean;
8
8
  fullWidth?: boolean;
9
9
  loaderLabel?: string;
10
10
  icon?: React.ReactElement;
11
11
  iconPosition?: 'left' | 'right';
12
12
  } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement>;
13
- export declare const Button: React.FC<ButtonProps>;
13
+ export declare const Button: React.ForwardRefExoticComponent<{
14
+ kind?: ButtonKind | undefined;
15
+ size?: Size | undefined;
16
+ loading?: boolean | undefined;
17
+ fullWidth?: boolean | undefined;
18
+ loaderLabel?: string | undefined;
19
+ icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
20
+ iconPosition?: "left" | "right" | undefined;
21
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLButtonElement & HTMLAnchorElement>>;
@@ -1,2 +1,2 @@
1
1
  export { Button } from './Button';
2
- export type { ButtonSize, ButtonProps } from './Button';
2
+ export type { ButtonKind, ButtonProps } from './Button';
@@ -1,6 +1,12 @@
1
1
  import * as React from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ export declare type CardButtonOptions = Pick<ButtonProps, 'children' | 'kind' | 'onClick'>;
2
4
  export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
3
- title: string;
4
- img?: string;
5
+ alt?: string;
6
+ buttonsOptions?: CardButtonOptions[];
7
+ description?: string;
8
+ expandableContent?: React.ReactNode;
9
+ src?: string;
10
+ title?: string;
5
11
  }
6
12
  export declare const Card: React.FC<CardProps>;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export interface CheckboxProps extends React.HTMLAttributes<HTMLInputElement> {
3
- className?: string;
4
- checked?: boolean;
5
3
  disabled?: boolean;
4
+ checked?: boolean;
5
+ description?: string;
6
6
  }
7
- export declare const Checkbox: React.FC<CheckboxProps>;
7
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,2 +1 @@
1
1
  export { Checkbox } from './Checkbox';
2
- export { CheckboxField } from './CheckboxField';
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import ReactDayPicker from 'react-day-picker';
3
+ import { IDatePickerProps } from './types';
4
+ export declare const DatePicker: React.ForwardRefExoticComponent<IDatePickerProps & React.RefAttributes<ReactDayPicker>>;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import { IDatePickerNavbarProps } from './types';
3
+ declare const DatePickerNavbar: React.FC<IDatePickerNavbarProps>;
4
+ export default DatePickerNavbar;
@@ -0,0 +1,16 @@
1
+ import { ReactElement } from 'react';
2
+ import { IRangeDatePickerProps } from './types';
3
+ export declare const RangeDatePicker: {
4
+ ({ options, initialSelectedItemKey, initialFromDate, initialToDate, toMonth, onChange, children, }: IRangeDatePickerProps): ReactElement;
5
+ defaultProps: {
6
+ options: {
7
+ id: string;
8
+ label: string;
9
+ isManual: boolean;
10
+ value: {
11
+ from: undefined;
12
+ to: undefined;
13
+ };
14
+ }[];
15
+ };
16
+ };
@@ -0,0 +1,39 @@
1
+ import { Modifiers } from 'react-day-picker';
2
+ import { IRangeDatePickerProps, IRangeDatePickerState, IRangeDatePickerOption } from './types';
3
+ import { ClassNames } from 'react-day-picker/types/ClassNames';
4
+ export declare const isDateWithinRange: (date: Date, range: {
5
+ from?: Date;
6
+ to?: Date;
7
+ }) => boolean;
8
+ export declare const calculateDatePickerMonth: (initialFromDate?: Date | undefined, initialToDate?: Date | undefined, toMonth?: Date | undefined) => Date;
9
+ export declare const getRangeDatePickerModifiers: (from?: Date | undefined, to?: Date | undefined) => Partial<Modifiers>;
10
+ export declare const getSelectedOption: (itemId: string | null, options: IRangeDatePickerOption[]) => IRangeDatePickerOption | undefined;
11
+ export declare const isSelectingFirstDay: (from?: Date | undefined, to?: Date | undefined) => boolean;
12
+ export declare const getInitialStateFromProps: (props: IRangeDatePickerProps) => Partial<IRangeDatePickerState>;
13
+ export declare const getDatePickerClassNames: (range?: boolean | undefined, classNames?: ClassNames | undefined) => {
14
+ container: string;
15
+ wrapper: string;
16
+ interactionDisabled: string;
17
+ navBar: string;
18
+ navButtonPrev: string;
19
+ navButtonNext: string;
20
+ navButtonInteractionDisabled: string;
21
+ months: string;
22
+ month: string;
23
+ caption: string;
24
+ weekdays: string;
25
+ weekdaysRow: string;
26
+ weekday: string;
27
+ weekNumber: string;
28
+ body: string;
29
+ week: string;
30
+ day: string;
31
+ footer: string;
32
+ todayButton: string;
33
+ today: string;
34
+ selected: string;
35
+ disabled: string;
36
+ outside: string;
37
+ start: string;
38
+ end: string;
39
+ };
@@ -0,0 +1,6 @@
1
+ import { Dispatch, ReducerAction, ReducerState } from 'react';
2
+ import { IRangeDatePickerProps, RangeDatePickerReducer } from './types';
3
+ export declare const useRangeDatePickerState: (props: IRangeDatePickerProps) => [
4
+ ReducerState<RangeDatePickerReducer>,
5
+ Dispatch<ReducerAction<RangeDatePickerReducer>>
6
+ ];
@@ -0,0 +1,2 @@
1
+ export { DatePicker } from './DatePicker';
2
+ export { RangeDatePicker } from './RangeDatePicker';
@@ -0,0 +1,100 @@
1
+ import { Reducer } from 'react';
2
+ import ReactDayPicker, { DayPickerProps } from 'react-day-picker';
3
+ import { ClassNames } from 'react-day-picker/types/ClassNames';
4
+ export interface IDatePickerProps extends Omit<DayPickerProps, 'todayButton' | 'showWeekNumbers'> {
5
+ innerRef?: React.Ref<ReactDayPicker>;
6
+ range?: boolean;
7
+ }
8
+ export interface IDatePickerNavbarProps {
9
+ showPreviousButton?: boolean;
10
+ showNextButton?: boolean;
11
+ month: Date;
12
+ fromMonth?: Date;
13
+ toMonth?: Date;
14
+ numberOfMonths?: number;
15
+ className?: string;
16
+ classNames: ClassNames;
17
+ onPreviousClick?: () => void;
18
+ onNextClick?: () => void;
19
+ onMonthChange: (newMonth: Date) => void;
20
+ }
21
+ export declare enum RangeDatePickerAction {
22
+ NEW_SELECTED_ITEM = "NEW_SELECTED_ITEM",
23
+ NEW_TEMPORARY_TO_VALUE = "NEW_TEMPORARY_TO_VALUE",
24
+ CLEAR = "CLEAR",
25
+ SET_FROM = "SET_FROM",
26
+ SET_TO = "SET_TO",
27
+ SELECT_FIRST_DAY = "SELECT_FIRST_DAY",
28
+ SELECT_SECOND_DAY_AS_FROM = "SELECT_SECOND_DAY_AS_FROM",
29
+ SELECT_SECOND_DAY_AS_TO = "SELECT_SECOND_DAY_AS_TO",
30
+ CURRENT_MONTH_CHANGE = "CURRENT_MONTH_CHANGE"
31
+ }
32
+ export declare type IRangeDatePickerReducerAction = {
33
+ type: RangeDatePickerAction.NEW_SELECTED_ITEM;
34
+ payload: {
35
+ selectedItem: string | null;
36
+ };
37
+ } | {
38
+ type: RangeDatePickerAction.NEW_TEMPORARY_TO_VALUE | RangeDatePickerAction.SELECT_FIRST_DAY | RangeDatePickerAction.SELECT_SECOND_DAY_AS_FROM | RangeDatePickerAction.SELECT_SECOND_DAY_AS_TO | RangeDatePickerAction.CURRENT_MONTH_CHANGE;
39
+ payload: {
40
+ date: Date;
41
+ };
42
+ } | {
43
+ type: RangeDatePickerAction.SET_FROM | RangeDatePickerAction.SET_TO;
44
+ payload: {
45
+ date?: Date;
46
+ };
47
+ };
48
+ export interface IRangeDatePickerState {
49
+ selectedItem: string | null;
50
+ from?: Date;
51
+ to?: Date;
52
+ temporaryTo?: Date;
53
+ currentMonth: Date;
54
+ }
55
+ export declare type RangeDatePickerReducer = Reducer<IRangeDatePickerState, IRangeDatePickerReducerAction>;
56
+ export interface IRangeDatePickerOption {
57
+ id: string;
58
+ label: string;
59
+ isManual?: boolean;
60
+ value: {
61
+ from?: Date;
62
+ to?: Date;
63
+ } | null;
64
+ }
65
+ interface IRangeDatePickerChildrenPayloadDatePicker {
66
+ modifiers?: DayPickerProps['modifiers'];
67
+ initialMonth?: Date;
68
+ month: Date;
69
+ range?: boolean;
70
+ numberOfMonths: number;
71
+ fromMonth?: Date;
72
+ toMonth?: Date;
73
+ selectedDays?: DayPickerProps['selectedDays'];
74
+ disabledDays?: DayPickerProps['disabledDays'];
75
+ onDayMouseEnter: DayPickerProps['onDayMouseEnter'];
76
+ onDayClick(day: Date): void;
77
+ onMonthChange(month: Date): void;
78
+ }
79
+ export interface IRangeDatePickerChildrenPayload {
80
+ select: {
81
+ selected: string | number;
82
+ onItemSelect(itemKey: string | number): void;
83
+ };
84
+ inputs: {
85
+ fromDate?: Date;
86
+ toDate?: Date;
87
+ };
88
+ datepicker: IRangeDatePickerChildrenPayloadDatePicker;
89
+ selectedOption?: IRangeDatePickerOption;
90
+ }
91
+ export interface IRangeDatePickerProps {
92
+ options: IRangeDatePickerOption[];
93
+ initialSelectedItemKey?: string;
94
+ initialFromDate?: Date;
95
+ initialToDate?: Date;
96
+ toMonth?: Date;
97
+ onChange: (selected: IRangeDatePickerOption | null) => void;
98
+ children(payload: IRangeDatePickerChildrenPayload): React.ReactElement;
99
+ }
100
+ export {};
@@ -5,4 +5,4 @@ export interface FieldGroupProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  inline?: boolean;
6
6
  stretch?: boolean;
7
7
  }
8
- export declare const FieldGroup: React.FC<FieldGroupProps>;
8
+ export declare const FieldGroup: React.FC<React.PropsWithChildren<FieldGroupProps>>;
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { ProgressSize, ProgressStatus } from '../Progress/constants';
3
+ export declare type UploadProgressActionState = 'visible' | 'hover' | 'hidden';
4
+ export interface FileUploadProgressProps {
5
+ actionsVisibility?: UploadProgressActionState;
6
+ className?: string;
7
+ icon?: React.ReactNode;
8
+ title: string;
9
+ progressValue: number;
10
+ size?: ProgressSize;
11
+ status?: ProgressStatus;
12
+ onCloseButtonClick?: () => void;
13
+ onRetryButtonClick?: () => void;
14
+ }
15
+ export declare const FileUploadProgress: React.ExoticComponent<FileUploadProgressProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { ProgressStatus } from '../Progress/constants';
3
+ interface FileUploadProgressActionsProps {
4
+ status: ProgressStatus;
5
+ onCloseButtonClick?: () => void;
6
+ onRetryButtonClick?: () => void;
7
+ }
8
+ export declare const FileUploadProgressActions: React.FC<FileUploadProgressActionsProps>;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './FileUploadProgress';
2
+ export * from './FileUploadProgressActions';
@@ -4,4 +4,4 @@ export interface FormProps extends React.HTMLAttributes<HTMLFormElement> {
4
4
  helperText?: string;
5
5
  formFooter?: React.ReactNode;
6
6
  }
7
- export declare const Form: React.FC<FormProps>;
7
+ export declare const Form: React.FC<React.PropsWithChildren<FormProps>>;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export interface TextFieldProps {
2
+ export interface FormFieldProps {
3
3
  labelText?: string;
4
4
  labelAdornment?: React.ReactNode;
5
5
  labelFor?: string;
@@ -10,4 +10,4 @@ export interface TextFieldProps {
10
10
  children?: React.ReactNode;
11
11
  labelRightNode?: React.ReactNode;
12
12
  }
13
- export declare const TextField: React.FC<TextFieldProps>;
13
+ export declare const FormField: React.FC<FormFieldProps>;
@@ -0,0 +1 @@
1
+ export * from './FormField';
@@ -4,4 +4,4 @@ export interface FormGroupProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  labelText?: string;
5
5
  helperText?: string;
6
6
  }
7
- export declare const FormGroup: React.FC<FormGroupProps>;
7
+ export declare const FormGroup: React.FC<React.PropsWithChildren<FormGroupProps>>;
@@ -1,67 +1,11 @@
1
1
  import * as React from 'react';
2
- export declare enum IconSizeName {
3
- XSmall = "xsmall",
4
- Small = "small",
5
- Medium = "medium",
6
- Large = "large",
7
- XLarge = "xlarge"
8
- }
9
- export declare const IconSize: {
10
- xsmall: {
11
- width: number;
12
- height: number;
13
- };
14
- small: {
15
- width: number;
16
- height: number;
17
- };
18
- medium: {
19
- width: number;
20
- height: number;
21
- };
22
- large: {
23
- width: number;
24
- height: number;
25
- };
26
- xlarge: {
27
- width: number;
28
- height: number;
29
- };
30
- };
31
- export declare enum IconTypeName {
32
- Primary = "primary",
33
- Subtle = "subtle",
34
- Inverted = "inverted",
35
- InvertedSubtle = "inverted_subtle",
36
- Link = "link",
37
- Success = "success",
38
- Warning = "warning",
39
- Error = "error"
40
- }
41
- export declare const IconColorMapper: {
42
- primary: string;
43
- subtle: string;
44
- inverted: string;
45
- inverted_subtle: string;
46
- link: string;
47
- success: string;
48
- warning: string;
49
- error: string;
50
- };
51
- export declare const IconColorDisabledMapper: {
52
- primary: string;
53
- subtle: string;
54
- inverted: string;
55
- inverted_subtle: string;
56
- link: string;
57
- success: string;
58
- warning: string;
59
- error: string;
60
- };
2
+ export declare type IconSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
3
+ export declare type IconKind = 'primary' | 'subtle' | 'inverted' | 'inverted-subtle' | 'link' | 'success' | 'warning' | 'error';
4
+ export declare type IconSource = React.FC<React.SVGProps<SVGSVGElement>> & React.ReactElement;
61
5
  export interface IconProps {
62
- source: React.FC<React.SVGProps<SVGSVGElement>> | string;
63
- size?: IconSizeName;
64
- iconType?: IconTypeName;
6
+ source: IconSource;
7
+ size?: IconSize;
8
+ kind?: IconKind;
65
9
  disabled?: boolean;
66
10
  className?: string;
67
11
  customColor?: string;
@@ -1 +1 @@
1
- export { Icon, IconSizeName, IconTypeName } from './Icon';
1
+ export * from './Icon';
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { Size } from 'utils/constants';
3
+ interface InputIcon {
4
+ source: React.ReactElement;
5
+ place: 'left' | 'right';
6
+ }
7
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
8
+ inputSize?: Size;
9
+ error?: boolean;
10
+ disabled?: boolean;
11
+ icon?: InputIcon;
12
+ }
13
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Input';
@@ -2,6 +2,8 @@ import * as React from 'react';
2
2
  import { ModalBaseProps } from './ModalBase';
3
3
  export interface ModalProps extends ModalBaseProps {
4
4
  heading?: React.ReactNode;
5
+ labelHeading?: React.ReactNode;
6
+ fullSpaceContent?: boolean;
5
7
  footer?: React.ReactNode;
6
8
  }
7
9
  export declare const Modal: React.FC<ModalProps>;
@@ -2,5 +2,6 @@ import * as React from 'react';
2
2
  export interface ModalBaseProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  onClose(): void;
4
4
  closeOnEscPress?: boolean;
5
+ closeOnOverlayPress?: boolean;
5
6
  }
6
- export declare const ModalBase: React.FC<ModalBaseProps>;
7
+ export declare const ModalBase: React.FC<React.PropsWithChildren<ModalBaseProps>>;
@@ -1,3 +1,6 @@
1
1
  import * as React from 'react';
2
- export declare type ModalCloseButtonProps = React.HTMLAttributes<HTMLButtonElement>;
2
+ export interface ModalCloseButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
3
+ labelType?: boolean;
4
+ customColor?: string;
5
+ }
3
6
  export declare const ModalCloseButton: React.FC<ModalCloseButtonProps>;
@@ -2,6 +2,6 @@ import * as React from 'react';
2
2
  export interface ModalPortalProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  children: React.ReactNode;
4
4
  zIndex: number;
5
- parentElementName: string;
5
+ parentElementName?: string;
6
6
  }
7
7
  export declare const ModalPortal: React.FC<ModalPortalProps>;
@@ -1,9 +1,7 @@
1
- export { ActionModal } from './ActionModal';
2
1
  export { Modal } from './Modal';
3
2
  export { ModalBase } from './ModalBase';
4
3
  export { ModalCloseButton } from './ModalCloseButton';
5
4
  export { ModalPortal } from './ModalPortal';
6
- export type { ActionModalProps } from './ActionModal';
7
5
  export type { ModalProps } from './Modal';
8
6
  export type { ModalBaseProps } from './ModalBase';
9
7
  export type { ModalCloseButtonProps } from './ModalCloseButton';
@@ -1,2 +1 @@
1
1
  export { NumericInput } from './NumericInput';
2
- export { NumericInputField } from './NumericInputField';
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { IPickerListItem } from './PickerList';
3
+ import { IconSize } from '../Icon';
4
+ import { Size } from 'utils';
5
+ export declare type PickerType = 'single' | 'multi';
6
+ export interface IPickerProps {
7
+ id?: string;
8
+ className?: string;
9
+ disabled?: boolean;
10
+ error?: boolean;
11
+ options: IPickerListItem[];
12
+ selected?: IPickerListItem[] | null;
13
+ size?: Size;
14
+ tagIconSize?: IconSize;
15
+ placeholder?: string;
16
+ isRequired?: boolean;
17
+ noSearchResultText?: string;
18
+ selectAllOptionText?: string;
19
+ type?: PickerType;
20
+ searchDisabled?: boolean;
21
+ onSelect: (selectedItems: IPickerListItem[] | null) => void;
22
+ }
23
+ export declare const Picker: React.FC<IPickerProps>;
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ export interface IPickerListItem {
3
+ key: string;
4
+ name: string;
5
+ customElement?: {
6
+ listItemBody: React.ReactElement;
7
+ selectedItemBody: React.ReactElement;
8
+ };
9
+ groupHeader?: boolean;
10
+ disabled?: boolean;
11
+ }
12
+ export interface IPickerListProps {
13
+ isOpen: boolean;
14
+ items: IPickerListItem[];
15
+ selectedItemsKeys: string[] | null;
16
+ emptyStateText?: string;
17
+ selectAllOptionText?: string;
18
+ isMultiSelect?: boolean;
19
+ onClose: () => void;
20
+ onSelect: (item: IPickerListItem) => void;
21
+ onSelectAll: () => void;
22
+ }
23
+ export declare const PickerList: React.FC<IPickerListProps>;
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { Size } from 'utils';
3
+ export interface ITriggerProps {
4
+ isSearchDisabled: boolean;
5
+ isDisabled?: boolean;
6
+ isError?: boolean;
7
+ isItemSelected: boolean;
8
+ isOpen: boolean;
9
+ isRequired?: boolean;
10
+ isMultiSelect?: boolean;
11
+ size?: Size;
12
+ onTrigger: (e: React.MouseEvent | KeyboardEvent) => void;
13
+ onClear: () => void;
14
+ }
15
+ export declare const Trigger: React.FC<React.PropsWithChildren<ITriggerProps>>;
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { IPickerListItem } from './PickerList';
3
+ import { PickerType } from './Picker';
4
+ import { IconSize } from 'index';
5
+ export interface ITriggerBodyProps {
6
+ isOpen: boolean;
7
+ isSearchDisabled?: boolean;
8
+ isDisabled?: boolean;
9
+ placeholder: string;
10
+ items?: IPickerListItem[] | null;
11
+ type: PickerType;
12
+ iconSize?: IconSize;
13
+ onItemRemove: (item: IPickerListItem) => void;
14
+ onFilter: (text: string) => void;
15
+ }
16
+ export declare const TriggerBody: React.FC<ITriggerBodyProps>;
@@ -0,0 +1,21 @@
1
+ export declare const defaultPickerOptions: {
2
+ key: string;
3
+ name: string;
4
+ }[];
5
+ export declare const defaultExtendedOptions: ({
6
+ key: string;
7
+ name: string;
8
+ groupHeader: boolean;
9
+ disabled?: undefined;
10
+ } | {
11
+ key: string;
12
+ name: string;
13
+ groupHeader?: undefined;
14
+ disabled?: undefined;
15
+ } | {
16
+ key: string;
17
+ name: string;
18
+ disabled: boolean;
19
+ groupHeader?: undefined;
20
+ })[];
21
+ export declare const SELECT_ALL_OPTION_KEY = "select-all";
@@ -0,0 +1,2 @@
1
+ export * from './Picker';
2
+ export * from './PickerList';
@@ -1,15 +1,12 @@
1
1
  import * as React from 'react';
2
- import * as PopperCore from '@popperjs/core';
3
- declare type PopoverModifiers = {
4
- [key: string]: Partial<PopperCore.StrictModifiers>;
5
- };
2
+ import { Placement, flip } from '@floating-ui/react-dom';
6
3
  export interface IPopoverProps {
7
4
  children?: React.ReactNode;
8
5
  className?: string;
9
- modifiers?: PopoverModifiers;
10
- placement?: PopperCore.Placement;
6
+ placement?: Placement;
11
7
  isVisible?: boolean;
8
+ flipOptions?: Parameters<typeof flip>[0];
12
9
  triggerRenderer: () => React.ReactNode;
10
+ onClose?: () => void;
13
11
  }
14
12
  export declare const Popover: React.FC<IPopoverProps>;
15
- export {};