@livechat/design-system-react-components 1.0.0-alpha.9 → 1.0.0-y.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.
Files changed (102) hide show
  1. package/dist/dsrc.cjs.js +15 -1
  2. package/dist/dsrc.es.js +3158 -971
  3. package/dist/dsrc.umd.js +15 -1
  4. package/dist/shadow/shadow.css +7 -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 +7 -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 +3 -7
  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 +4 -3
  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/FileUploadProgress/FileUploadProgress.d.ts +15 -0
  31. package/dist/src/components/FileUploadProgress/FileUploadProgressActions.d.ts +9 -0
  32. package/dist/src/components/FileUploadProgress/index.d.ts +2 -0
  33. package/dist/src/components/{TextField/TextField.d.ts → FormField/FormField.d.ts} +2 -2
  34. package/dist/src/components/FormField/index.d.ts +1 -0
  35. package/dist/src/components/Icon/Icon.d.ts +6 -62
  36. package/dist/src/components/Icon/index.d.ts +1 -1
  37. package/dist/src/components/Input/Input.d.ts +14 -0
  38. package/dist/src/components/Input/index.d.ts +1 -0
  39. package/dist/src/components/Modal/Modal.d.ts +2 -0
  40. package/dist/src/components/Modal/ModalBase.d.ts +1 -0
  41. package/dist/src/components/Modal/ModalCloseButton.d.ts +4 -1
  42. package/dist/src/components/Modal/ModalPortal.d.ts +1 -1
  43. package/dist/src/components/Modal/index.d.ts +0 -2
  44. package/dist/src/components/NumericInput/index.d.ts +0 -1
  45. package/dist/src/components/Picker/Picker.d.ts +23 -0
  46. package/dist/src/components/Picker/PickerList.d.ts +23 -0
  47. package/dist/src/components/Picker/Trigger.d.ts +15 -0
  48. package/dist/src/components/Picker/TriggerBody.d.ts +16 -0
  49. package/dist/src/components/Picker/constants.d.ts +21 -0
  50. package/dist/src/components/Picker/index.d.ts +2 -0
  51. package/dist/src/components/Popover/Popover.d.ts +4 -7
  52. package/dist/src/components/Progress/ProgressBar.d.ts +9 -0
  53. package/dist/src/components/Progress/ProgressCircle.d.ts +1 -1
  54. package/dist/src/components/Progress/constants.d.ts +2 -10
  55. package/dist/src/components/Progress/index.d.ts +1 -0
  56. package/dist/src/components/PromoBanner/PromoBanner.d.ts +0 -6
  57. package/dist/src/components/RadioButton/RadioButton.d.ts +2 -2
  58. package/dist/src/components/Search/Search.d.ts +12 -0
  59. package/dist/src/components/Search/index.d.ts +1 -0
  60. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +18 -0
  61. package/dist/src/components/SegmentedControl/index.d.ts +2 -0
  62. package/dist/src/components/Switch/Switch.d.ts +5 -8
  63. package/dist/src/components/Tab/Tab.d.ts +4 -1
  64. package/dist/src/components/Tag/Tag.d.ts +3 -1
  65. package/dist/src/components/TagInput/TagInput.d.ts +1 -0
  66. package/dist/src/components/Textarea/Textarea.d.ts +6 -0
  67. package/dist/src/components/Textarea/index.d.ts +1 -0
  68. package/dist/src/components/Toast/Toast.d.ts +7 -13
  69. package/dist/src/components/Toast/ToastWrapper.d.ts +2 -9
  70. package/dist/src/components/Tooltip/Info.d.ts +8 -0
  71. package/dist/src/components/Tooltip/Interactive.d.ts +14 -0
  72. package/dist/src/components/Tooltip/Simple.d.ts +4 -0
  73. package/dist/src/components/Tooltip/SpotlightOverlay.d.ts +7 -0
  74. package/dist/src/components/Tooltip/Tooltip.d.ts +22 -0
  75. package/dist/src/components/Tooltip/UserGuide.d.ts +12 -0
  76. package/dist/src/components/Tooltip/helpers.d.ts +2 -0
  77. package/dist/src/components/Tooltip/index.d.ts +5 -0
  78. package/dist/src/components/Tooltip/virtualElementReference.d.ts +9 -0
  79. package/dist/src/components/UploadBar/UploadBar.d.ts +16 -0
  80. package/dist/src/components/UploadBar/index.d.ts +1 -0
  81. package/dist/src/foundations/shadow-token.d.ts +5 -0
  82. package/dist/src/foundations/spacing-token.d.ts +16 -0
  83. package/dist/src/index.d.ts +16 -4
  84. package/dist/src/themes/{designTokens.d.ts → design-token.d.ts} +104 -4
  85. package/dist/src/utils/constants.d.ts +1 -0
  86. package/dist/src/utils/index.d.ts +1 -0
  87. package/dist/style.css +1 -1
  88. package/dist/themes/dark.css +128 -21
  89. package/dist/themes/dark.css.map +1 -1
  90. package/dist/themes/legacy.css +116 -9
  91. package/dist/themes/legacy.css.map +1 -1
  92. package/dist/themes/light.css +116 -9
  93. package/dist/themes/light.css.map +1 -1
  94. package/package.json +21 -11
  95. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +0 -11
  96. package/dist/src/components/ButtonGroup/index.d.ts +0 -1
  97. package/dist/src/components/Checkbox/CheckboxField.d.ts +0 -7
  98. package/dist/src/components/InputField/InputField.d.ts +0 -15
  99. package/dist/src/components/InputField/index.d.ts +0 -1
  100. package/dist/src/components/Modal/ActionModal.d.ts +0 -8
  101. package/dist/src/components/NumericInput/NumericInputField.d.ts +0 -19
  102. package/dist/src/components/TextField/index.d.ts +0 -1
@@ -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 {};
@@ -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';
@@ -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';
@@ -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
7
  export declare const ModalBase: React.FC<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
+ className?: string;
8
+ disabled?: boolean;
9
+ label?: string;
10
+ error?: string;
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<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 defaultOptions: {
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 {};
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { ProgressSize, ProgressStatus } from './constants';
3
+ export interface ProgressBarProps {
4
+ className?: string;
5
+ percent: number;
6
+ status?: ProgressStatus;
7
+ size?: ProgressSize;
8
+ }
9
+ export declare const ProgressBar: React.ExoticComponent<ProgressBarProps & React.RefAttributes<HTMLInputElement>>;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { ProgressSize, ProgressStatus } from './constants';
3
3
  export interface ProgressCircleProps {
4
4
  className?: string;
5
- percent: number;
5
+ progressValue: number;
6
6
  status?: ProgressStatus;
7
7
  size?: ProgressSize;
8
8
  }
@@ -1,12 +1,4 @@
1
- export declare const enum ProgressStatus {
2
- Normal = "normal",
3
- Error = "error",
4
- Success = "success"
5
- }
6
- export declare const enum ProgressSize {
7
- Small = "small",
8
- Medium = "medium",
9
- Large = "large"
10
- }
1
+ export declare type ProgressStatus = 'normal' | 'error' | 'success';
2
+ export declare type ProgressSize = 'small' | 'medium' | 'large';
11
3
  export declare const PROGRESS_STATUSES: ProgressStatus[];
12
4
  export declare const PROGRESS_SIZES: ProgressSize[];
@@ -1 +1,2 @@
1
1
  export { ProgressCircle } from './ProgressCircle';
2
+ export { ProgressBar } from './ProgressBar';
@@ -1,9 +1,4 @@
1
1
  import * as React from 'react';
2
- export declare const enum PromoBannerSize {
3
- Small = "small",
4
- Medium = "medium",
5
- Large = "large"
6
- }
7
2
  export interface PromoBannerProps {
8
3
  className?: string;
9
4
  buttonText?: string;
@@ -11,7 +6,6 @@ export interface PromoBannerProps {
11
6
  img?: string;
12
7
  light?: boolean;
13
8
  linkText?: string;
14
- size?: PromoBannerSize;
15
9
  onButtonClick?: () => void;
16
10
  onClose?: () => void;
17
11
  onLinkClick?: () => void;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export interface RadioButtonProps extends React.HTMLAttributes<HTMLInputElement> {
3
- description?: React.ReactNode;
3
+ description?: string;
4
4
  checked?: boolean;
5
5
  disabled?: boolean;
6
6
  }
7
- export declare const RadioButton: React.FC<RadioButtonProps>;
7
+ export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ export interface ISearchInputProps {
3
+ isCollapsable?: boolean;
4
+ isDisabled?: boolean;
5
+ isLoading?: boolean;
6
+ placeholder?: string;
7
+ size?: 'compact' | 'medium' | 'large';
8
+ value: string;
9
+ className?: string;
10
+ onChange: (value: string) => void;
11
+ }
12
+ export declare const SearchInput: React.FC<ISearchInputProps>;
@@ -0,0 +1 @@
1
+ export { SearchInput } from './Search';
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ export declare type ButtonSize = 'compact' | 'medium' | 'large';
4
+ declare type ButtonElement = {
5
+ id: string;
6
+ label: string;
7
+ } & Pick<ButtonProps, 'disabled' | 'loading' | 'icon'>;
8
+ export interface SegmentedControlProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ className?: string;
10
+ buttons: ButtonElement[];
11
+ fullWidth?: boolean;
12
+ size?: ButtonSize;
13
+ initialId?: string;
14
+ currentId?: string;
15
+ onButtonClick?: (id: string, event: React.MouseEvent<HTMLElement>) => void;
16
+ }
17
+ export declare const SegmentedControl: React.FC<SegmentedControlProps>;
18
+ export {};
@@ -0,0 +1,2 @@
1
+ export { SegmentedControl } from './SegmentedControl';
2
+ export type { SegmentedControlProps } from './SegmentedControl';