freemium-ui 1.0.334 → 2.0.0-beta.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/.husky/pre-commit +5 -0
- package/README.md +26 -51
- package/lib/index.d.ts +833 -0
- package/lib/index.esm.js +833 -42
- package/lib/index.js +833 -0
- package/package.json +94 -87
- package/rollup.config.mjs +47 -0
- package/.github/workflows/security.yml +0 -52
- package/lib/index.cjs.js +0 -28
- package/lib/types/components/Alert/Alert.d.ts +0 -17
- package/lib/types/components/Alert/index.d.ts +0 -1
- package/lib/types/components/BoxedRadio/boxedRadio.d.ts +0 -9
- package/lib/types/components/BoxedRadio/boxedRadioContext.d.ts +0 -7
- package/lib/types/components/BoxedRadio/boxedRadioGroup.d.ts +0 -2
- package/lib/types/components/BoxedRadio/index.d.ts +0 -2
- package/lib/types/components/Button/Buttons.d.ts +0 -19
- package/lib/types/components/Button/index.d.ts +0 -1
- package/lib/types/components/ButtonDropdown/ButtonDropdown.d.ts +0 -20
- package/lib/types/components/ButtonDropdown/index.d.ts +0 -1
- package/lib/types/components/Checkbox/Checkbox.d.ts +0 -13
- package/lib/types/components/Checkbox/index.d.ts +0 -1
- package/lib/types/components/Confirmation/Confirmation.d.ts +0 -38
- package/lib/types/components/Confirmation/index.d.ts +0 -2
- package/lib/types/components/Confirmation/useConfirmation.d.ts +0 -10
- package/lib/types/components/ControlledTable/ControlledTable.d.ts +0 -50
- package/lib/types/components/ControlledTable/index.d.ts +0 -1
- package/lib/types/components/CssBaseLine/index.d.ts +0 -1
- package/lib/types/components/Drawer/Drawer.d.ts +0 -17
- package/lib/types/components/Drawer/index.d.ts +0 -2
- package/lib/types/components/Drawer/styles.d.ts +0 -6
- package/lib/types/components/Dropdown/DropdownButton.d.ts +0 -14
- package/lib/types/components/Dropdown/DropdownInput.d.ts +0 -4
- package/lib/types/components/Dropdown/DropdownMenu.d.ts +0 -4
- package/lib/types/components/Dropdown/index.d.ts +0 -30
- package/lib/types/components/Dropdown/styles.d.ts +0 -7
- package/lib/types/components/Dropdown/withDownshift.d.ts +0 -8
- package/lib/types/components/Icons/Icons.d.ts +0 -20
- package/lib/types/components/Icons/index.d.ts +0 -1
- package/lib/types/components/Input/Input.d.ts +0 -57
- package/lib/types/components/Input/index.d.ts +0 -1
- package/lib/types/components/Loader/Loader.d.ts +0 -8
- package/lib/types/components/Loader/index.d.ts +0 -1
- package/lib/types/components/Menu/Menu.d.ts +0 -20
- package/lib/types/components/Menu/index.d.ts +0 -1
- package/lib/types/components/Modal/Modal.d.ts +0 -13
- package/lib/types/components/Modal/index.d.ts +0 -3
- package/lib/types/components/Modal/styles.d.ts +0 -12
- package/lib/types/components/Modal/use-modal.d.ts +0 -10
- package/lib/types/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +0 -32
- package/lib/types/components/MultiSelectDropdown/index.d.ts +0 -1
- package/lib/types/components/Pickers/DatePicker.d.ts +0 -4
- package/lib/types/components/Pickers/DateRangePicker.d.ts +0 -4
- package/lib/types/components/Pickers/DateTimePicker.d.ts +0 -4
- package/lib/types/components/Pickers/TimePicker.d.ts +0 -4
- package/lib/types/components/Pickers/index.d.ts +0 -4
- package/lib/types/components/Pickers/styles.d.ts +0 -4
- package/lib/types/components/Pickers/types.d.ts +0 -29
- package/lib/types/components/Popover/Popover.d.ts +0 -21
- package/lib/types/components/Popover/index.d.ts +0 -1
- package/lib/types/components/Radio/Radio.d.ts +0 -9
- package/lib/types/components/Radio/index.d.ts +0 -1
- package/lib/types/components/RestTable/RestTable.d.ts +0 -19
- package/lib/types/components/RestTable/index.d.ts +0 -1
- package/lib/types/components/Table/Table.d.ts +0 -56
- package/lib/types/components/Table/index.d.ts +0 -1
- package/lib/types/components/Tabs/Tabs.d.ts +0 -20
- package/lib/types/components/Tabs/index.d.ts +0 -1
- package/lib/types/components/Tag/Tag.d.ts +0 -7
- package/lib/types/components/Tag/index.d.ts +0 -1
- package/lib/types/components/ThemeProvider/index.d.ts +0 -12
- package/lib/types/components/Toast/Toast.d.ts +0 -14
- package/lib/types/components/Toast/index.d.ts +0 -3
- package/lib/types/components/Toggle/Toggle.d.ts +0 -15
- package/lib/types/components/Toggle/index.d.ts +0 -1
- package/lib/types/components/Tooltip/Tooltip.d.ts +0 -24
- package/lib/types/components/Tooltip/index.d.ts +0 -1
- package/lib/types/components/Transition/Transition.d.ts +0 -14
- package/lib/types/components/Transition/fade.d.ts +0 -6
- package/lib/types/components/Transition/index.d.ts +0 -4
- package/lib/types/components/Transition/slide-fade.d.ts +0 -13
- package/lib/types/components/Transition/slide.d.ts +0 -11
- package/lib/types/components/UiProvider/UiProvider.d.ts +0 -2
- package/lib/types/components/UiProvider/index.d.ts +0 -1
- package/lib/types/components/use-toasts/index.d.ts +0 -1
- package/lib/types/components/use-toasts/toast-container.d.ts +0 -8
- package/lib/types/components/use-toasts/toast-item.d.ts +0 -15
- package/lib/types/components/use-toasts/use-toast.d.ts +0 -17
- package/lib/types/index.d.ts +0 -30
- package/lib/types/theme/default/colors.d.ts +0 -3
- package/lib/types/theme/default/index.d.ts +0 -7
- package/lib/types/theme/default/palette.d.ts +0 -3
- package/lib/types/theme/default/typography.d.ts +0 -3
- package/lib/types/theme/freshstatus/colors.d.ts +0 -3
- package/lib/types/theme/freshstatus/index.d.ts +0 -7
- package/lib/types/theme/freshstatus/palette.d.ts +0 -3
- package/lib/types/theme/freshstatus/typography.d.ts +0 -3
- package/lib/types/theme/index.d.ts +0 -352
- package/lib/types/theme/shared.d.ts +0 -2
- package/lib/types/utils/date.d.ts +0 -7
- package/lib/types/utils/index.d.ts +0 -1
- package/lib/types/utils/use-current-state.d.ts +0 -4
- package/lib/types/utils/use-portal.d.ts +0 -2
- package/lib/types/utils/use-ssr.d.ts +0 -6
- package/lib/types/utils/use-ui-context.d.ts +0 -11
- package/lib/types/utils/with-defaults.d.ts +0 -3
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { Dispatch, SetStateAction, MutableRefObject } from 'react';
|
|
4
|
+
import { UseSelectProps, UseComboboxProps } from 'downshift';
|
|
5
|
+
import { LabelProps } from '@radix-ui/react-label';
|
|
6
|
+
import styleInject from '/Users/basembulingam/Files/Code Repo/freemium-ui/node_modules/style-inject/dist/style-inject.es.js';
|
|
7
|
+
import { DateInput3Props, DateRangeInput3Props } from '@blueprintjs/datetime2';
|
|
8
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
9
|
+
import { RadioGroupContextValue } from '@radix-ui/react-radio-group';
|
|
10
|
+
import { TabsProps as TabsProps$1 } from '@radix-ui/react-tabs';
|
|
11
|
+
import { TooltipProviderProps, TooltipProps as TooltipProps$1, TooltipArrowProps } from '@radix-ui/react-tooltip';
|
|
12
|
+
import { TransitionProps as TransitionProps$1 } from 'react-transition-group/Transition';
|
|
13
|
+
export { TransitionStatus } from 'react-transition-group/Transition';
|
|
14
|
+
|
|
15
|
+
type LevelType = 'warning' | 'success' | 'error' | 'info';
|
|
16
|
+
type AlertData = {
|
|
17
|
+
message: string;
|
|
18
|
+
linkText?: string;
|
|
19
|
+
href?: string;
|
|
20
|
+
};
|
|
21
|
+
interface AlertProps {
|
|
22
|
+
/**
|
|
23
|
+
* How large should the button be?
|
|
24
|
+
*/
|
|
25
|
+
data?: AlertData;
|
|
26
|
+
level: LevelType;
|
|
27
|
+
canDismiss?: boolean;
|
|
28
|
+
timeout?: number;
|
|
29
|
+
overideClassName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The children or label
|
|
32
|
+
*/
|
|
33
|
+
children?: React.ReactNode | string;
|
|
34
|
+
onClose?: () => any;
|
|
35
|
+
onDisappear?: () => any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Primary UI component for user interaction
|
|
40
|
+
*/
|
|
41
|
+
declare const Alert: ({ canDismiss, onClose, children, level, onDisappear, data, timeout, overideClassName, }: AlertProps) => react_jsx_runtime.JSX.Element | null;
|
|
42
|
+
|
|
43
|
+
type ButtonSizeKey = 'mini' | 'normal' | 'large';
|
|
44
|
+
type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link';
|
|
45
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
46
|
+
/**
|
|
47
|
+
* How large should the button be?
|
|
48
|
+
*/
|
|
49
|
+
size?: ButtonSizeKey;
|
|
50
|
+
/**
|
|
51
|
+
* Which variant the button should be
|
|
52
|
+
*/
|
|
53
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'link';
|
|
54
|
+
/**
|
|
55
|
+
* The children or label
|
|
56
|
+
*/
|
|
57
|
+
children?: React.ReactNode | string;
|
|
58
|
+
/**
|
|
59
|
+
* Is the button loading
|
|
60
|
+
*/
|
|
61
|
+
loading?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Is the button inline
|
|
64
|
+
*/
|
|
65
|
+
inline?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Primary UI component for user interaction
|
|
70
|
+
*/
|
|
71
|
+
declare const Button: ({ size, variant, children, loading, inline, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
72
|
+
|
|
73
|
+
interface CheckboxProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
74
|
+
/**
|
|
75
|
+
* The position of the tooltip
|
|
76
|
+
*/
|
|
77
|
+
isRequired?: boolean;
|
|
78
|
+
isErrored?: boolean;
|
|
79
|
+
label?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Primary UI component for user interaction
|
|
83
|
+
*/
|
|
84
|
+
declare const Checkbox: ({ isRequired, isErrored, label, ...rest }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
interface ConfirmationProps {
|
|
87
|
+
/**
|
|
88
|
+
* Is the button inline
|
|
89
|
+
*/
|
|
90
|
+
isOpen?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Is the button inline
|
|
93
|
+
*/
|
|
94
|
+
confirmButtonDisabled?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Is the button inline
|
|
97
|
+
*/
|
|
98
|
+
cancelButtonDisabled?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Is the button inline
|
|
101
|
+
*/
|
|
102
|
+
title?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Is the button inline
|
|
105
|
+
*/
|
|
106
|
+
description?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Is the button inline
|
|
109
|
+
*/
|
|
110
|
+
width?: string;
|
|
111
|
+
/**
|
|
112
|
+
* How large should the button be?
|
|
113
|
+
*/
|
|
114
|
+
onDismiss?: (type: 'overlay' | 'button') => void;
|
|
115
|
+
/**
|
|
116
|
+
* How large should the button be?
|
|
117
|
+
*/
|
|
118
|
+
onConfirm?: () => void;
|
|
119
|
+
/**
|
|
120
|
+
* Which variant the button should be
|
|
121
|
+
*/
|
|
122
|
+
confirmButtonText?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Which variant the button should be
|
|
125
|
+
*/
|
|
126
|
+
cancelButtonText?: string;
|
|
127
|
+
/**
|
|
128
|
+
* The children or label
|
|
129
|
+
*/
|
|
130
|
+
bodyStyles?: React__default.CSSProperties;
|
|
131
|
+
/**
|
|
132
|
+
* The children or label
|
|
133
|
+
*/
|
|
134
|
+
contentStyles?: React__default.CSSProperties;
|
|
135
|
+
/**
|
|
136
|
+
* The children or label
|
|
137
|
+
*/
|
|
138
|
+
footerStyles?: React__default.CSSProperties;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Primary UI component for user interaction
|
|
142
|
+
*/
|
|
143
|
+
declare const Confirmation: ({ isOpen, title, description, onConfirm, onDismiss, cancelButtonText, cancelButtonDisabled, confirmButtonDisabled, confirmButtonText, bodyStyles, contentStyles, footerStyles, width, }: ConfirmationProps) => react_jsx_runtime.JSX.Element;
|
|
144
|
+
|
|
145
|
+
declare const useConfirmation: (initialVisible?: boolean) => {
|
|
146
|
+
visible: boolean;
|
|
147
|
+
setVisible: Dispatch<SetStateAction<boolean>>;
|
|
148
|
+
currentRef: MutableRefObject<boolean>;
|
|
149
|
+
bindings: {
|
|
150
|
+
isOpen: boolean;
|
|
151
|
+
onDismiss: () => void;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
type DropdownTypes = 'button' | 'input';
|
|
156
|
+
type DefaultDropdownItem$1 = {};
|
|
157
|
+
interface DropdownProps<T extends DefaultDropdownItem$1> {
|
|
158
|
+
items?: Array<T>;
|
|
159
|
+
itemIdentifier?: string;
|
|
160
|
+
defaultSelectedItem?: T | null;
|
|
161
|
+
onChange?: (item?: T | null) => void;
|
|
162
|
+
itemToString: (item: T | null) => string;
|
|
163
|
+
itemToStringListItem?: (item: T | null) => string;
|
|
164
|
+
/**
|
|
165
|
+
* Which type of the dropdown should be
|
|
166
|
+
*/
|
|
167
|
+
type: DropdownTypes;
|
|
168
|
+
/**
|
|
169
|
+
* Is the dropdown readonly
|
|
170
|
+
*/
|
|
171
|
+
readOnly?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Is the dropdown disabled
|
|
174
|
+
*/
|
|
175
|
+
disabled?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Is the dropdown disabled
|
|
178
|
+
*/
|
|
179
|
+
name?: string;
|
|
180
|
+
width?: string;
|
|
181
|
+
filterKey?: string;
|
|
182
|
+
getCustomMessage?: (inoutValue: string) => string;
|
|
183
|
+
emptyItemsText?: string;
|
|
184
|
+
hideClear?: boolean;
|
|
185
|
+
errorText?: string;
|
|
186
|
+
className?: string;
|
|
187
|
+
style?: React__default.CSSProperties;
|
|
188
|
+
isErrored?: boolean;
|
|
189
|
+
isRequired?: boolean;
|
|
190
|
+
isMenuLoading?: boolean;
|
|
191
|
+
onCustomValueAdd?: (item: {
|
|
192
|
+
inputValue: string;
|
|
193
|
+
customValues: boolean;
|
|
194
|
+
}) => void;
|
|
195
|
+
customValues?: boolean;
|
|
196
|
+
id?: string;
|
|
197
|
+
label?: string;
|
|
198
|
+
placeholder?: string;
|
|
199
|
+
useSelectProps?: UseSelectProps<T>;
|
|
200
|
+
useComboboxProps?: UseComboboxProps<T>;
|
|
201
|
+
}
|
|
202
|
+
declare const Dropdown: <T extends DefaultDropdownItem$1>(props: DropdownProps<T>) => react_jsx_runtime.JSX.Element;
|
|
203
|
+
/**
|
|
204
|
+
* Primary UI component for user interaction
|
|
205
|
+
*/
|
|
206
|
+
declare const DropdownButton: <T extends DefaultDropdownItem$1>({ itemIdentifier, label, id, items, onChange, placeholder, readOnly, disabled, isRequired, itemToString, itemToStringListItem, name, width, className, style, useSelectProps, defaultSelectedItem, isErrored, isMenuLoading, errorText, }: DropdownProps<T>) => react_jsx_runtime.JSX.Element;
|
|
207
|
+
/**
|
|
208
|
+
* Primary UI component for user interaction
|
|
209
|
+
*/
|
|
210
|
+
declare const DropdownInput: <T extends DefaultDropdownItem$1>({ itemIdentifier, label, id, items, placeholder, readOnly, disabled, isRequired, hideClear, itemToString, name, filterKey, width, customValues, onCustomValueAdd, emptyItemsText, getCustomMessage, onChange, useComboboxProps, isErrored, errorText, defaultSelectedItem, isMenuLoading, }: DropdownProps<T>) => react_jsx_runtime.JSX.Element;
|
|
211
|
+
|
|
212
|
+
interface CommonProps {
|
|
213
|
+
/**
|
|
214
|
+
* Is this a required field?
|
|
215
|
+
*/
|
|
216
|
+
isRequired?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Is this a error field?
|
|
219
|
+
*/
|
|
220
|
+
isErrored?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Error text to be shown
|
|
223
|
+
*/
|
|
224
|
+
errorText?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Id of the button
|
|
227
|
+
*/
|
|
228
|
+
id?: string;
|
|
229
|
+
/**
|
|
230
|
+
* Id of the button
|
|
231
|
+
*/
|
|
232
|
+
label?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Label of the button
|
|
235
|
+
*/
|
|
236
|
+
inline?: boolean;
|
|
237
|
+
maxLength?: number;
|
|
238
|
+
showCount?: boolean;
|
|
239
|
+
inputStyle?: React__default.CSSProperties;
|
|
240
|
+
startLabel?: React__default.ReactNode | any;
|
|
241
|
+
startAdornment?: React__default.ReactNode | any;
|
|
242
|
+
endLabel?: React__default.ReactNode | any;
|
|
243
|
+
endAdornment?: React__default.ReactNode | any;
|
|
244
|
+
labelProps?: LabelProps;
|
|
245
|
+
containerProps?: React__default.HTMLAttributes<HTMLDivElement>;
|
|
246
|
+
}
|
|
247
|
+
interface InputProps extends CommonProps, React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
248
|
+
ref?: React__default.Ref<HTMLInputElement>;
|
|
249
|
+
}
|
|
250
|
+
interface TextAreaProps extends CommonProps, React__default.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
251
|
+
ref?: React__default.Ref<HTMLTextAreaElement>;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Primary UI component for user interaction
|
|
255
|
+
*/
|
|
256
|
+
declare const Input: ({ label, inline, startLabel, startAdornment, endLabel, endAdornment, isRequired, isErrored, showCount, inputStyle, style, errorText, ref, maxLength, labelProps, containerProps, ...props }: InputProps) => react_jsx_runtime.JSX.Element;
|
|
257
|
+
/**
|
|
258
|
+
* Primary UI component for user interaction
|
|
259
|
+
*/
|
|
260
|
+
declare const TextArea: ({ label, inline, startLabel, startAdornment, endLabel, endAdornment, isRequired, isErrored, showCount, inputStyle, style, errorText, ref, maxLength, ...props }: TextAreaProps) => react_jsx_runtime.JSX.Element;
|
|
261
|
+
|
|
262
|
+
declare const Loader: (props: LoaderPropTypes) => react_jsx_runtime.JSX.Element;
|
|
263
|
+
type Sizes = 'mini' | 'small' | 'medium' | 'big';
|
|
264
|
+
type Speeds = 'slow' | 'medium' | 'fast';
|
|
265
|
+
type LoaderPropTypes = {
|
|
266
|
+
size?: Sizes;
|
|
267
|
+
speed?: Speeds;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
type ModalAlignType = 'top' | 'center' | 'bottom';
|
|
271
|
+
type ModalPositionType = 'left' | 'center' | 'right';
|
|
272
|
+
type ModalSizeType = 'default' | 'medium' | 'small' | 'large' | 'x-large';
|
|
273
|
+
interface ModalProps {
|
|
274
|
+
/**
|
|
275
|
+
* The children or label
|
|
276
|
+
*/
|
|
277
|
+
children?: React__default.ReactNode | string;
|
|
278
|
+
/**
|
|
279
|
+
* Is the button inline
|
|
280
|
+
*/
|
|
281
|
+
isOpen?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Is the button inline
|
|
284
|
+
*/
|
|
285
|
+
fullWidth?: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Is the button inline
|
|
288
|
+
*/
|
|
289
|
+
align?: ModalAlignType;
|
|
290
|
+
/**
|
|
291
|
+
* Is the button inline
|
|
292
|
+
*/
|
|
293
|
+
position?: ModalPositionType;
|
|
294
|
+
/**
|
|
295
|
+
* Is the button inline
|
|
296
|
+
*/
|
|
297
|
+
size?: ModalSizeType;
|
|
298
|
+
/**
|
|
299
|
+
* How large should the button be?
|
|
300
|
+
*/
|
|
301
|
+
onDismiss?: () => void;
|
|
302
|
+
/**
|
|
303
|
+
* The children or label
|
|
304
|
+
*/
|
|
305
|
+
customClass?: string;
|
|
306
|
+
/**
|
|
307
|
+
* The children or label
|
|
308
|
+
*/
|
|
309
|
+
customModalContentStyles?: React__default.CSSProperties;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Primary UI component for user interaction
|
|
313
|
+
*/
|
|
314
|
+
declare const Modal: ({ isOpen, children, align, customClass, fullWidth, customModalContentStyles, onDismiss, position, size, }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
315
|
+
|
|
316
|
+
declare const useModal: (initialVisible?: boolean) => {
|
|
317
|
+
visible: boolean;
|
|
318
|
+
setVisible: Dispatch<SetStateAction<boolean>>;
|
|
319
|
+
currentRef: MutableRefObject<boolean>;
|
|
320
|
+
bindings: {
|
|
321
|
+
isOpen: boolean;
|
|
322
|
+
onDismiss: () => void;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
type DefaultDropdownItem = {};
|
|
327
|
+
interface MultiSelectDropdownProps<T extends DefaultDropdownItem> {
|
|
328
|
+
items?: Array<T>;
|
|
329
|
+
itemIdentifier?: string;
|
|
330
|
+
defaultSelectedItem?: T | null;
|
|
331
|
+
onChange?: (item?: T | null) => void;
|
|
332
|
+
itemToString: (item: T | null) => string;
|
|
333
|
+
/**
|
|
334
|
+
* Is the dropdown readonly
|
|
335
|
+
*/
|
|
336
|
+
readOnly?: boolean;
|
|
337
|
+
/**
|
|
338
|
+
* Is the dropdown disabled
|
|
339
|
+
*/
|
|
340
|
+
disabled?: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* Is the dropdown disabled
|
|
343
|
+
*/
|
|
344
|
+
name?: string;
|
|
345
|
+
width?: string;
|
|
346
|
+
filterKey?: string;
|
|
347
|
+
getCustomMessage?: (inoutValue: string) => string;
|
|
348
|
+
emptyItemsText?: string;
|
|
349
|
+
hideClear?: boolean;
|
|
350
|
+
errorText?: string;
|
|
351
|
+
isErrored?: boolean;
|
|
352
|
+
isRequired?: boolean;
|
|
353
|
+
isMenuLoading?: boolean;
|
|
354
|
+
handleInputChange?: (inputValue: string) => void;
|
|
355
|
+
onCustomValueAdd?: (item: {
|
|
356
|
+
inputValue: string;
|
|
357
|
+
customValues: boolean;
|
|
358
|
+
}) => void;
|
|
359
|
+
customValues?: boolean;
|
|
360
|
+
id?: string;
|
|
361
|
+
label?: string;
|
|
362
|
+
placeholder?: string;
|
|
363
|
+
useSelectProps?: UseSelectProps<T>;
|
|
364
|
+
useComboboxProps?: UseComboboxProps<T>;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Primary UI component for user interaction
|
|
368
|
+
*/
|
|
369
|
+
declare const MultiSelectDropdown: <T extends DefaultDropdownItem>({ itemIdentifier, label, id, items, onChange, placeholder, readOnly, disabled, isRequired, itemToString, name, filterKey, width, useSelectProps, emptyItemsText, getCustomMessage, onCustomValueAdd, customValues, hideClear, defaultSelectedItem, handleInputChange, isErrored, isMenuLoading, errorText, }: MultiSelectDropdownProps<T>) => react_jsx_runtime.JSX.Element;
|
|
370
|
+
|
|
371
|
+
var css_248z = ".rdp{\n --rdp-cell-size:40px;\n --rdp-caption-font-size:18px;\n --rdp-accent-color:#0000ff;\n --rdp-background-color:#e7edff;\n --rdp-accent-color-dark:#3003e1;\n --rdp-background-color-dark:#180270;\n --rdp-outline:2px solid var(--rdp-accent-color);\n --rdp-outline-selected:3px solid var(--rdp-accent-color);\n --rdp-selected-color:#fff;\n margin:1em;\n}\n.rdp-vhidden{\n box-sizing:border-box;\n padding:0;\n margin:0;\n background:transparent;\n border:0;\n -moz-appearance:none;\n -webkit-appearance:none;\n appearance:none;\n position:absolute !important;\n top:0;\n width:1px !important;\n height:1px !important;\n padding:0 !important;\n overflow:hidden !important;\n clip:rect(1px, 1px, 1px, 1px) !important;\n border:0 !important;\n}\n.rdp-button_reset{\n appearance:none;\n position:relative;\n margin:0;\n padding:0;\n cursor:default;\n color:inherit;\n background:none;\n font:inherit;\n -moz-appearance:none;\n -webkit-appearance:none;\n}\n\n.rdp-button_reset:focus-visible{\n outline:none;\n}\n\n.rdp-button{\n border:2px solid transparent;\n}\n\n.rdp-button[disabled]:not(.rdp-day_selected){\n opacity:0.25;\n}\n\n.rdp-button:not([disabled]){\n cursor:pointer;\n}\n\n.rdp-button:focus-visible:not([disabled]){\n color:inherit;\n background-color:var(--rdp-background-color);\n border:var(--rdp-outline);\n}\n\n.rdp-button:hover:not([disabled]):not(.rdp-day_selected){\n background-color:var(--rdp-background-color);\n}\n\n.rdp-months{\n display:flex;\n}\n\n.rdp-month{\n margin:0 1em;\n}\n\n.rdp-month:first-child{\n margin-left:0;\n}\n\n.rdp-month:last-child{\n margin-right:0;\n}\n\n.rdp-table{\n margin:0;\n max-width:calc(var(--rdp-cell-size) * 7);\n border-collapse:collapse;\n}\n\n.rdp-with_weeknumber .rdp-table{\n max-width:calc(var(--rdp-cell-size) * 8);\n border-collapse:collapse;\n}\n\n.rdp-caption{\n display:flex;\n align-items:center;\n justify-content:space-between;\n padding:0;\n text-align:left;\n}\n\n.rdp-multiple_months .rdp-caption{\n position:relative;\n display:block;\n text-align:center;\n}\n\n.rdp-caption_dropdowns{\n position:relative;\n display:inline-flex;\n}\n\n.rdp-caption_label{\n position:relative;\n z-index:1;\n display:inline-flex;\n align-items:center;\n margin:0;\n padding:0 0.25em;\n white-space:nowrap;\n color:currentColor;\n border:0;\n border:2px solid transparent;\n font-family:inherit;\n font-size:var(--rdp-caption-font-size);\n font-weight:bold;\n}\n\n.rdp-nav{\n white-space:nowrap;\n}\n\n.rdp-multiple_months .rdp-caption_start .rdp-nav{\n position:absolute;\n top:50%;\n left:0;\n transform:translateY(-50%);\n}\n\n.rdp-multiple_months .rdp-caption_end .rdp-nav{\n position:absolute;\n top:50%;\n right:0;\n transform:translateY(-50%);\n}\n\n.rdp-nav_button{\n display:inline-flex;\n align-items:center;\n justify-content:center;\n width:var(--rdp-cell-size);\n height:var(--rdp-cell-size);\n padding:0.25em;\n border-radius:100%;\n}\n.rdp-dropdown_year,\n.rdp-dropdown_month{\n position:relative;\n display:inline-flex;\n align-items:center;\n}\n\n.rdp-dropdown{\n -webkit-appearance:none;\n -moz-appearance:none;\n appearance:none;\n position:absolute;\n z-index:2;\n top:0;\n bottom:0;\n left:0;\n width:100%;\n margin:0;\n padding:0;\n cursor:inherit;\n opacity:0;\n border:none;\n background-color:transparent;\n font-family:inherit;\n font-size:inherit;\n line-height:inherit;\n}\n\n.rdp-dropdown[disabled]{\n opacity:unset;\n color:unset;\n}\n\n.rdp-dropdown:focus-visible:not([disabled]) + .rdp-caption_label{\n background-color:var(--rdp-background-color);\n border:var(--rdp-outline);\n border-radius:6px;\n}\n\n.rdp-dropdown_icon{\n margin:0 0 0 5px;\n}\n\n.rdp-head{\n border:0;\n}\n\n.rdp-head_row,\n.rdp-row{\n height:100%;\n}\n\n.rdp-head_cell{\n vertical-align:middle;\n font-size:0.75em;\n font-weight:700;\n text-align:center;\n height:100%;\n height:var(--rdp-cell-size);\n padding:0;\n text-transform:uppercase;\n}\n\n.rdp-tbody{\n border:0;\n}\n\n.rdp-tfoot{\n margin:0.5em;\n}\n\n.rdp-cell{\n width:var(--rdp-cell-size);\n height:100%;\n height:var(--rdp-cell-size);\n padding:0;\n text-align:center;\n}\n\n.rdp-weeknumber{\n font-size:0.75em;\n}\n\n.rdp-weeknumber,\n.rdp-day{\n display:flex;\n overflow:hidden;\n align-items:center;\n justify-content:center;\n box-sizing:border-box;\n width:var(--rdp-cell-size);\n max-width:var(--rdp-cell-size);\n height:var(--rdp-cell-size);\n margin:0;\n border:2px solid transparent;\n border-radius:100%;\n}\n\n.rdp-day_today:not(.rdp-day_outside){\n font-weight:bold;\n}\n\n.rdp-day_selected,\n.rdp-day_selected:focus-visible,\n.rdp-day_selected:hover{\n color:var(--rdp-selected-color);\n opacity:1;\n background-color:var(--rdp-accent-color);\n}\n\n.rdp-day_outside{\n opacity:0.5;\n}\n\n.rdp-day_selected:focus-visible{\n outline:var(--rdp-outline);\n outline-offset:2px;\n z-index:1;\n}\n\n.rdp:not([dir=rtl]) .rdp-day_range_start:not(.rdp-day_range_end){\n border-top-right-radius:0;\n border-bottom-right-radius:0;\n}\n\n.rdp:not([dir=rtl]) .rdp-day_range_end:not(.rdp-day_range_start){\n border-top-left-radius:0;\n border-bottom-left-radius:0;\n}\n\n.rdp[dir=rtl] .rdp-day_range_start:not(.rdp-day_range_end){\n border-top-left-radius:0;\n border-bottom-left-radius:0;\n}\n\n.rdp[dir=rtl] .rdp-day_range_end:not(.rdp-day_range_start){\n border-top-right-radius:0;\n border-bottom-right-radius:0;\n}\n\n.rdp-day_range_end.rdp-day_range_start{\n border-radius:100%;\n}\n\n.rdp-day_range_middle{\n border-radius:0;\n}\n\n\n.bp5-datepicker-content .rdp{\n --rdp-cell-size:30px;\n --rdp-accent-color:#2d72d2;\n --rdp-background-color:#ffffff;\n --rdp-accent-color-dark:#215db0;\n --rdp-background-color-dark:#2f343c;\n --rdp-outline:2px solid var(--rdp-accent-color);\n --rdp-outline-selected:2px solid rgba(0, 0, 0, 75%);\n margin:0;\n min-width:auto;\n}\n.bp5-datepicker .rdp{\n display:inline-block;\n min-width:210px;\n position:relative;\n vertical-align:top;\n}\n.bp5-datepicker .rdp:focus{\n outline:none;\n}\n.bp5-datepicker .rdp-month{\n display:flex;\n flex-direction:column;\n margin:0 5px;\n -webkit-user-select:none;\n -moz-user-select:none;\n -ms-user-select:none;\n user-select:none;\n}\n.bp5-datepicker .rdp-month + .bp5-datepicker .rdp-month{\n margin-left:10px;\n}\n.bp5-datepicker .rdp-caption{\n border-bottom:solid 1px rgba(17, 20, 24, 0.15);\n padding-bottom:5px;\n}\n.bp5-datepicker .rdp-table{\n align-self:center;\n}\n.bp5-datepicker .rdp-head_cell{\n font-size:inherit;\n font-weight:600;\n padding-top:5px;\n text-decoration:none;\n text-transform:none;\n}\n.bp5-datepicker .rdp-weeknumber{\n color:#5f6b7c;\n}\n.bp5-datepicker .rdp-day{\n border-radius:2px;\n}\n.bp5-datepicker .rdp-day.rdp-day_outside{\n color:rgba(95, 107, 124, 0.6);\n}\n.bp5-datepicker .rdp-day.rdp-day_today{\n font-weight:400;\n}\n.bp5-datepicker .rdp-day:not([disabled]):not(.rdp-day_selected):hover, .bp5-datepicker .rdp-day:not([disabled]):not(.rdp-day_selected):focus{\n background:rgba(143, 153, 168, 0.15);\n color:#1c2127;\n}\n.bp5-datepicker .rdp-day:not([disabled]):not(.rdp-day_selected):active{\n background:rgba(143, 153, 168, 0.3);\n}\n.bp5-datepicker .rdp-day.rdp-day_disabled{\n background:none;\n color:rgba(95, 107, 124, 0.6);\n cursor:not-allowed;\n}\n.bp5-datepicker .rdp-day.rdp-day_selected{\n background-color:#2d72d2;\n border-radius:2px;\n color:#ffffff;\n}\n.bp5-datepicker .rdp-day.rdp-day_selected:hover{\n background-color:#215db0;\n color:#ffffff;\n}\n.bp5-datepicker .rdp-day.rdp-day_selected:active{\n background-color:#184a90;\n}\n.bp5-datepicker.bp5-datepicker-highlight-current-day .rdp-day.rdp-day_today{\n border:1px solid rgba(17, 20, 24, 0.15);\n}\n.bp5-datepicker.bp5-datepicker-reverse-month-and-year .rdp-caption_dropdowns{\n flex-direction:row-reverse;\n}\n\n.bp5-datepicker-content{\n align-items:center;\n display:flex;\n flex-direction:column;\n gap:5px;\n}\n.bp5-datepicker-content > .bp5-divider{\n margin:0;\n width:calc(100% - 10px);\n}\n\n.bp5-datepicker-month-select select, .bp5-datepicker-year-select select{\n font-weight:600;\n padding-left:5px;\n padding-right:16px;\n}\n.bp5-datepicker-month-select select + .bp5-icon, .bp5-datepicker-year-select select + .bp5-icon{\n right:2px;\n}\n\n.bp5-datepicker-footer{\n display:flex;\n justify-content:space-between;\n width:100%;\n}\n\n.bp5-dark .bp5-datepicker{\n background:#2f343c;\n}\n.bp5-dark .bp5-datepicker .rdp-week-number{\n color:#abb3bf;\n}\n.bp5-dark .bp5-datepicker .rdp-day.rdp-day_outside{\n color:rgba(171, 179, 191, 0.6);\n}\n.bp5-dark .bp5-datepicker .rdp-day:not([disabled]):not(.rdp-day_selected):hover, .bp5-dark .bp5-datepicker .rdp-day:not([disabled]):not(.rdp-day_selected):focus{\n background:rgba(143, 153, 168, 0.15);\n color:#ffffff;\n}\n.bp5-dark .bp5-datepicker .rdp-day:not([disabled]):not(.rdp-day_selected):active{\n background:rgba(143, 153, 168, 0.3);\n}\n.bp5-dark .bp5-datepicker .rdp-day.rdp-day_selected{\n background-color:#2d72d2;\n}\n.bp5-dark .bp5-datepicker .rdp-day.rdp-day_selected:hover{\n background-color:#215db0;\n}\n.bp5-dark .bp5-datepicker .rdp-day.rdp-day_selected:active{\n background-color:#184a90;\n}\n.bp5-dark .bp5-datepicker .rdp-day.rdp-day_disabled{\n background:none;\n color:rgba(171, 179, 191, 0.6);\n}\n.bp5-dark .bp5-datepicker.bp5-datepicker-highlight-current-day .rdp-day.rdp-day_today{\n border:1px solid rgba(255, 255, 255, 0.2);\n}\n.bp5-dark .bp5-datepicker .bp5-datepicker-footer{\n border-top-color:rgba(17, 20, 24, 0.4);\n}\n\n.bp5-datepicker-timepicker-wrapper{\n align-items:center;\n display:flex;\n flex-direction:column;\n}\n.bp5-datepicker-timepicker-wrapper .bp5-timepicker-arrow-row:empty + .bp5-timepicker-input-row{\n margin:5px 0;\n}\n.bp5-datepicker-caption.rdp-caption{\n display:flex;\n flex-direction:row;\n justify-content:space-between;\n margin:0;\n}\n.bp5-datepicker-caption.rdp-caption > *{\n flex-grow:0;\n flex-shrink:0;\n}\n.bp5-datepicker-caption.rdp-caption > .bp5-fill{\n flex-grow:1;\n flex-shrink:1;\n}\n.bp5-datepicker-caption.rdp-caption .bp5-html-select select{\n font-weight:600;\n padding-left:5px;\n padding-right:16px;\n}\n.bp5-datepicker-caption.rdp-caption .bp5-html-select select + .bp5-icon{\n right:2px;\n}\n.bp5-datepicker-caption.rdp-caption + .bp5-divider{\n margin:0;\n}\n.bp5-datepicker-caption.rdp-caption .bp5-datepicker-nav-button-hidden{\n visibility:hidden;\n}\n\n.bp5-datepicker-month-select{\n flex-shrink:1;\n}\n\n.bp5-datepicker-year-select{\n flex-shrink:1;\n min-width:60px;\n}\n\n.bp5-datepicker-caption-measure{\n font-weight:600;\n padding-left:5px;\n}\n.bp5-daterangepicker{\n}\n.bp5-daterangepicker.bp5-daterangepicker-contiguous .rdp{\n min-width:220px;\n}\n.bp5-daterangepicker.bp5-daterangepicker-single-month .rdp{\n min-width:210px;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-caption{\n display:flex;\n flex-direction:row;\n justify-content:space-between;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-caption > *{\n flex-grow:0;\n flex-shrink:0;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-caption > .bp5-fill{\n flex-grow:1;\n flex-shrink:1;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-caption_start .rdp-caption{\n flex-direction:row-reverse;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-caption_start .rdp-caption::before{\n content:\"\";\n height:30px;\n width:30px;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-caption_end .rdp-caption{\n flex-direction:row;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-caption_end .rdp-caption::before{\n content:\"\";\n height:30px;\n width:30px;\n}\n.bp5-daterangepicker .rdp.rdp-multiple_months .rdp-nav{\n left:initial;\n position:initial;\n top:initial;\n transform:none;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_outside{\n visibility:hidden;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_hovered:not(.rdp-day_selected){\n border-radius:0;\n color:#215db0;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_hovered:not(.rdp-day_selected):not(.rdp-day_range_start):not(.rdp-day_range_middle):not(.rdp-day_range_end){\n background-color:rgba(45, 114, 210, 0.1);\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_range_middle{\n background-color:rgba(45, 114, 210, 0.1);\n border-radius:0;\n color:#215db0;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_range_middle:hover{\n background-color:rgba(45, 114, 210, 0.2);\n color:#215db0;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_range_start:not(.rdp-day_range_end):not(.rdp-day_hovered_end){\n border-bottom-right-radius:0;\n border-top-right-radius:0;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_range_end:not(.rdp-day_range_start):not(.rdp_day_hovered_start){\n border-bottom-left-radius:0;\n border-top-left-radius:0;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_hovered_start:not(.rdp-day_hovered_end){\n border-bottom-right-radius:0;\n border-top-right-radius:0;\n}\n.bp5-daterangepicker.bp5-datepicker .rdp-day_hovered_end:not(.rdp-day_hovered_start){\n border-bottom-left-radius:0;\n border-top-left-radius:0;\n}\n.bp5-daterangepicker.bp5-datepicker-highlight-current-day .rdp-day.rdp-day_today{\n border:1px solid rgba(17, 20, 24, 0.15);\n}\n.bp5-daterangepicker.bp5-daterangepicker-reverse-month-and-year.bp5-daterangepicker-contiguous .rdp-caption_dropdowns{\n flex-direction:row-reverse;\n}\n\n.bp5-daterangepicker-timepickers.bp5-daterangepicker-timepickers-stacked{\n align-items:center;\n flex-direction:column;\n}\n\n.bp5-dark .bp5-daterangepicker.bp5-datepicker .rdp-day_hovered{\n color:#f6f7f9;\n}\n.bp5-dark .bp5-daterangepicker.bp5-datepicker .rdp-day_hovered:not(.rdp-day_selected):not(.rdp-day_range_start):not(.rdp-day_range_middle):not(.rdp-day_range_end){\n background-color:rgba(45, 114, 210, 0.2);\n}\n.bp5-dark .bp5-daterangepicker.bp5-datepicker .rdp-day_range_middle{\n background-color:rgba(45, 114, 210, 0.2);\n color:#f6f7f9;\n}\n.bp5-dark .bp5-daterangepicker.bp5-datepicker .rdp-day_range_middle:hover{\n background-color:rgba(45, 114, 210, 0.4);\n}\n.bp5-dark .bp5-daterangepicker.bp5-datepicker-highlight-current-day .rdp-day.rdp-day_today{\n border:1px solid rgba(255, 255, 255, 0.2);\n}";
|
|
372
|
+
styleInject(css_248z);
|
|
373
|
+
|
|
374
|
+
type DefaultProps = {
|
|
375
|
+
isRequired?: boolean;
|
|
376
|
+
isErrored?: boolean;
|
|
377
|
+
errorText?: string;
|
|
378
|
+
id?: string;
|
|
379
|
+
name?: string;
|
|
380
|
+
label?: string;
|
|
381
|
+
placeholder?: string;
|
|
382
|
+
disabled?: boolean;
|
|
383
|
+
};
|
|
384
|
+
type DatePickerProps = DefaultProps & Partial<DateInput3Props> & {
|
|
385
|
+
displayFormat?: string;
|
|
386
|
+
};
|
|
387
|
+
type DateRangePickerProps = DefaultProps & Partial<DateRangeInput3Props> & {
|
|
388
|
+
displayFormat?: string;
|
|
389
|
+
};
|
|
390
|
+
type DateTimePickerProps = DefaultProps & Partial<DateInput3Props> & {
|
|
391
|
+
displayFormat?: string;
|
|
392
|
+
};
|
|
393
|
+
type DateTimeRangePickerProps = DefaultProps & Partial<DateRangeInput3Props> & {
|
|
394
|
+
displayFormat?: string;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
declare const DatePicker: (props: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
398
|
+
|
|
399
|
+
declare const DateTimePicker: (props: DateTimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
400
|
+
|
|
401
|
+
declare const DateRangePicker: (props: DateRangePickerProps) => react_jsx_runtime.JSX.Element;
|
|
402
|
+
|
|
403
|
+
declare const DateTimeRangePicker: (props: DateTimeRangePickerProps) => react_jsx_runtime.JSX.Element;
|
|
404
|
+
|
|
405
|
+
type Origin = {
|
|
406
|
+
vertical?: 'top' | 'center' | 'bottom';
|
|
407
|
+
horizontal?: 'left' | 'center' | 'right';
|
|
408
|
+
};
|
|
409
|
+
interface PopoverProps {
|
|
410
|
+
/**
|
|
411
|
+
* How large should the button be?
|
|
412
|
+
*/
|
|
413
|
+
onClose?: (event?: React__default.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
414
|
+
/**
|
|
415
|
+
* Which variant the button should be
|
|
416
|
+
*/
|
|
417
|
+
id?: string;
|
|
418
|
+
/**
|
|
419
|
+
* The children or label
|
|
420
|
+
*/
|
|
421
|
+
trigger: React__default.ReactNode | string;
|
|
422
|
+
/**
|
|
423
|
+
* The children or label
|
|
424
|
+
*/
|
|
425
|
+
children?: React__default.ReactNode | string;
|
|
426
|
+
/**
|
|
427
|
+
* Is the button inline
|
|
428
|
+
*/
|
|
429
|
+
hoverOutToClose?: boolean;
|
|
430
|
+
/**
|
|
431
|
+
* Is the button inline
|
|
432
|
+
*/
|
|
433
|
+
hoverToOpen?: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* Is the button inline
|
|
436
|
+
*/
|
|
437
|
+
arrow?: boolean;
|
|
438
|
+
/**
|
|
439
|
+
* Is the button inline
|
|
440
|
+
*/
|
|
441
|
+
avoidCollisions?: boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Is the button inline
|
|
444
|
+
*/
|
|
445
|
+
side?: RadixPopover.PopperContentProps['side'];
|
|
446
|
+
/**
|
|
447
|
+
* Is the button inline
|
|
448
|
+
*/
|
|
449
|
+
align?: RadixPopover.PopperContentProps['align'];
|
|
450
|
+
/**
|
|
451
|
+
* Is the button inline
|
|
452
|
+
* @deprecated
|
|
453
|
+
*/
|
|
454
|
+
anchorOrigin?: Origin;
|
|
455
|
+
/**
|
|
456
|
+
* Is the button inline
|
|
457
|
+
* * @deprecated
|
|
458
|
+
*/
|
|
459
|
+
transformOrigin?: Origin;
|
|
460
|
+
/**
|
|
461
|
+
* Is the button inline
|
|
462
|
+
* * @deprecated
|
|
463
|
+
*/
|
|
464
|
+
clickOutToClose?: boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Is the button inline
|
|
467
|
+
* * @deprecated
|
|
468
|
+
*/
|
|
469
|
+
autoCloseDuration?: number;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Primary UI component for user interaction
|
|
473
|
+
*/
|
|
474
|
+
declare const Popover: ({ children, trigger, arrow, hoverOutToClose, align, hoverToOpen, avoidCollisions, side: s, anchorOrigin, autoCloseDuration, clickOutToClose, transformOrigin, }: PopoverProps) => react_jsx_runtime.JSX.Element;
|
|
475
|
+
|
|
476
|
+
interface RadioItemProps {
|
|
477
|
+
id: string;
|
|
478
|
+
name: string;
|
|
479
|
+
hide?: boolean;
|
|
480
|
+
disabled?: boolean;
|
|
481
|
+
[key: string]: any;
|
|
482
|
+
}
|
|
483
|
+
type RadioGroupProps<T extends RadioItemProps = RadioItemProps> = {
|
|
484
|
+
options?: Array<T>;
|
|
485
|
+
idAccessor?: string;
|
|
486
|
+
defaultValue?: string;
|
|
487
|
+
value?: RadioGroupContextValue['value'];
|
|
488
|
+
onChange?: RadioGroupContextValue['onValueChange'];
|
|
489
|
+
nameAccessor?: string;
|
|
490
|
+
label?: string;
|
|
491
|
+
className?: string;
|
|
492
|
+
id?: string;
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* Primary UI component for user interaction
|
|
496
|
+
*/
|
|
497
|
+
declare const RadioGroup: ({ options, defaultValue, idAccessor, nameAccessor, onChange, className, id, label, value, }: RadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
498
|
+
|
|
499
|
+
interface TabsItemProps {
|
|
500
|
+
id: string;
|
|
501
|
+
name: string;
|
|
502
|
+
hide?: boolean;
|
|
503
|
+
disabled?: boolean;
|
|
504
|
+
[key: string]: any;
|
|
505
|
+
}
|
|
506
|
+
type TabsProps<T extends TabsItemProps = TabsItemProps> = {
|
|
507
|
+
options?: Array<T>;
|
|
508
|
+
renderTabsContent?: (tabOption: T) => React__default.ReactNode;
|
|
509
|
+
idAccessor?: string;
|
|
510
|
+
nameAccessor?: string;
|
|
511
|
+
ref?: React__default.RefObject<HTMLDivElement>;
|
|
512
|
+
value?: TabsProps$1['value'];
|
|
513
|
+
defaultValue?: TabsProps$1['defaultValue'];
|
|
514
|
+
onChange?: TabsProps$1['onValueChange'];
|
|
515
|
+
};
|
|
516
|
+
/**
|
|
517
|
+
* Primary UI component for user interaction
|
|
518
|
+
*/
|
|
519
|
+
declare const Tabs: ({ options, idAccessor, nameAccessor, onChange, defaultValue, renderTabsContent, value, }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
520
|
+
|
|
521
|
+
interface TagProps extends React__default.HTMLAttributes<HTMLSpanElement> {
|
|
522
|
+
children?: React__default.ReactNode;
|
|
523
|
+
iconProps?: React__default.HTMLAttributes<HTMLDivElement>;
|
|
524
|
+
}
|
|
525
|
+
declare const Tag: ({ children, iconProps, ...rest }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
526
|
+
|
|
527
|
+
type BreakpointKeys = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
528
|
+
type UiUnits = 'px' | 'rem' | 'em' | '%';
|
|
529
|
+
type TypographyType = {
|
|
530
|
+
fontFamily: string;
|
|
531
|
+
fontSize: string;
|
|
532
|
+
fontWeight: number;
|
|
533
|
+
lineHeight: string | number;
|
|
534
|
+
letterSpacing: number;
|
|
535
|
+
};
|
|
536
|
+
type BaseColorVariantType = {
|
|
537
|
+
mildest: string;
|
|
538
|
+
mild: string;
|
|
539
|
+
main: string;
|
|
540
|
+
};
|
|
541
|
+
type ColorVariantType = BaseColorVariantType & {
|
|
542
|
+
bold: string;
|
|
543
|
+
};
|
|
544
|
+
type SemanticTypes = 'success' | 'warning' | 'error' | 'info' | 'highlight';
|
|
545
|
+
type FuiTheme = {
|
|
546
|
+
breakpoints: {
|
|
547
|
+
keys: BreakpointKeys[];
|
|
548
|
+
values: Record<BreakpointKeys, number>;
|
|
549
|
+
unit: UiUnits;
|
|
550
|
+
};
|
|
551
|
+
colors: {
|
|
552
|
+
text: {
|
|
553
|
+
brand: string;
|
|
554
|
+
primary: string;
|
|
555
|
+
secondary: string;
|
|
556
|
+
disabled: string;
|
|
557
|
+
placeholder: string;
|
|
558
|
+
error: string;
|
|
559
|
+
inverse: string;
|
|
560
|
+
semantic: Record<SemanticTypes, string>;
|
|
561
|
+
};
|
|
562
|
+
icon: {
|
|
563
|
+
primary: string;
|
|
564
|
+
selected: string;
|
|
565
|
+
disabled: string;
|
|
566
|
+
inverse: string;
|
|
567
|
+
semantic: Record<SemanticTypes, string>;
|
|
568
|
+
};
|
|
569
|
+
fill: {
|
|
570
|
+
base: string;
|
|
571
|
+
container: string;
|
|
572
|
+
surface: string;
|
|
573
|
+
inverse: string;
|
|
574
|
+
brand: string;
|
|
575
|
+
semantic: Record<SemanticTypes, ColorVariantType>;
|
|
576
|
+
};
|
|
577
|
+
boundary: {
|
|
578
|
+
border: {
|
|
579
|
+
main: string;
|
|
580
|
+
mildest: string;
|
|
581
|
+
};
|
|
582
|
+
divider: string;
|
|
583
|
+
brand: string;
|
|
584
|
+
semantic: Record<SemanticTypes, BaseColorVariantType>;
|
|
585
|
+
};
|
|
586
|
+
shadow: string;
|
|
587
|
+
scrim: string;
|
|
588
|
+
};
|
|
589
|
+
shadows: string[];
|
|
590
|
+
transitions: {
|
|
591
|
+
easing: {
|
|
592
|
+
easeInOut: string;
|
|
593
|
+
easeOut: string;
|
|
594
|
+
easeIn: string;
|
|
595
|
+
sharp: string;
|
|
596
|
+
};
|
|
597
|
+
duration: {
|
|
598
|
+
shortest: number;
|
|
599
|
+
shorter: number;
|
|
600
|
+
short: number;
|
|
601
|
+
standard: number;
|
|
602
|
+
complex: number;
|
|
603
|
+
enteringScreen: number;
|
|
604
|
+
leavingScreen: number;
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
zIndex: {
|
|
608
|
+
mobileStepper: number;
|
|
609
|
+
fab: number;
|
|
610
|
+
speedDial: number;
|
|
611
|
+
appBar: number;
|
|
612
|
+
drawer: number;
|
|
613
|
+
modal: number;
|
|
614
|
+
snackbar: number;
|
|
615
|
+
tooltip: number;
|
|
616
|
+
};
|
|
617
|
+
typography: {
|
|
618
|
+
primary: TypographyType;
|
|
619
|
+
secondary: TypographyType;
|
|
620
|
+
h1: TypographyType;
|
|
621
|
+
h2: TypographyType;
|
|
622
|
+
h3: TypographyType;
|
|
623
|
+
h4: TypographyType;
|
|
624
|
+
h5: TypographyType;
|
|
625
|
+
h6: TypographyType;
|
|
626
|
+
body: TypographyType;
|
|
627
|
+
subtitle: TypographyType;
|
|
628
|
+
caption: TypographyType;
|
|
629
|
+
info: TypographyType;
|
|
630
|
+
};
|
|
631
|
+
components: {
|
|
632
|
+
button: {
|
|
633
|
+
variants: Record<ButtonVariant, {
|
|
634
|
+
from: string;
|
|
635
|
+
to: string;
|
|
636
|
+
color: string;
|
|
637
|
+
aBgColor: string;
|
|
638
|
+
dColor: string;
|
|
639
|
+
hoverColor: string;
|
|
640
|
+
borderColor: string;
|
|
641
|
+
aBorderColor: string;
|
|
642
|
+
dBorderColor: string;
|
|
643
|
+
dFrom: string;
|
|
644
|
+
dTo: string;
|
|
645
|
+
}>;
|
|
646
|
+
sizes: Record<ButtonSizeKey, {
|
|
647
|
+
height: string;
|
|
648
|
+
lineHeight: string;
|
|
649
|
+
fontSize: string;
|
|
650
|
+
}>;
|
|
651
|
+
};
|
|
652
|
+
tooltip: {
|
|
653
|
+
bgColor: string;
|
|
654
|
+
textColor: string;
|
|
655
|
+
fontSize: string;
|
|
656
|
+
fontWeight: number;
|
|
657
|
+
lineHeight: string;
|
|
658
|
+
};
|
|
659
|
+
input: {
|
|
660
|
+
border: {
|
|
661
|
+
normal: string;
|
|
662
|
+
hover: string;
|
|
663
|
+
active: string;
|
|
664
|
+
disabled: string;
|
|
665
|
+
error: string;
|
|
666
|
+
};
|
|
667
|
+
bgColor: string;
|
|
668
|
+
dBgColor: string;
|
|
669
|
+
};
|
|
670
|
+
dropdown: {
|
|
671
|
+
hilightColor: string;
|
|
672
|
+
hoverColor: string;
|
|
673
|
+
addColor: string;
|
|
674
|
+
};
|
|
675
|
+
loader: {
|
|
676
|
+
color: string;
|
|
677
|
+
};
|
|
678
|
+
tag: {
|
|
679
|
+
background: {
|
|
680
|
+
normal: string;
|
|
681
|
+
hover: string;
|
|
682
|
+
active: string;
|
|
683
|
+
disabled: string;
|
|
684
|
+
error: string;
|
|
685
|
+
};
|
|
686
|
+
color: {
|
|
687
|
+
normal: string;
|
|
688
|
+
hover: string;
|
|
689
|
+
active: string;
|
|
690
|
+
disabled: string;
|
|
691
|
+
error: string;
|
|
692
|
+
};
|
|
693
|
+
border: {
|
|
694
|
+
normal: string;
|
|
695
|
+
hover: string;
|
|
696
|
+
active: string;
|
|
697
|
+
disabled: string;
|
|
698
|
+
error: string;
|
|
699
|
+
};
|
|
700
|
+
actionButton: {
|
|
701
|
+
background: {
|
|
702
|
+
normal: string;
|
|
703
|
+
hover: string;
|
|
704
|
+
active: string;
|
|
705
|
+
disabled: string;
|
|
706
|
+
error: string;
|
|
707
|
+
};
|
|
708
|
+
color: {
|
|
709
|
+
normal: string;
|
|
710
|
+
hover: string;
|
|
711
|
+
active: string;
|
|
712
|
+
disabled: string;
|
|
713
|
+
error: string;
|
|
714
|
+
};
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
toggle: {
|
|
718
|
+
bg: string;
|
|
719
|
+
onBg: string;
|
|
720
|
+
offBg: string;
|
|
721
|
+
dOnBg: string;
|
|
722
|
+
dOffBg: string;
|
|
723
|
+
onHover: string;
|
|
724
|
+
offHover: string;
|
|
725
|
+
};
|
|
726
|
+
checkbox: {
|
|
727
|
+
bg: string;
|
|
728
|
+
border: string;
|
|
729
|
+
fill: string;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
type ThemeProviderType<Theme> = React.ComponentType<{
|
|
735
|
+
children: React.ReactNode;
|
|
736
|
+
theme: Theme;
|
|
737
|
+
}>;
|
|
738
|
+
declare const ThemeProvider: ThemeProviderType<FuiTheme>;
|
|
739
|
+
declare const useTheme: () => FuiTheme;
|
|
740
|
+
|
|
741
|
+
declare const ToastContainer: () => React__default.ReactPortal | null;
|
|
742
|
+
|
|
743
|
+
type ToggleSizes = 'sm' | 'md' | 'lg';
|
|
744
|
+
interface ToggleProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
745
|
+
/**
|
|
746
|
+
* The position of the tooltip
|
|
747
|
+
*/
|
|
748
|
+
on?: boolean;
|
|
749
|
+
handleChange?: (on: boolean) => void;
|
|
750
|
+
size?: ToggleSizes;
|
|
751
|
+
hasIcon?: boolean;
|
|
752
|
+
thumbProps?: React.HTMLAttributes<HTMLSpanElement>;
|
|
753
|
+
isRequired?: boolean;
|
|
754
|
+
isErrored?: boolean;
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Primary UI component for user interaction
|
|
758
|
+
*/
|
|
759
|
+
declare const Toggle: ({ handleChange, hasIcon, on, isErrored, isRequired, size, thumbProps, ...rest }: ToggleProps) => react_jsx_runtime.JSX.Element;
|
|
760
|
+
|
|
761
|
+
type Position = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
762
|
+
type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
763
|
+
type Align = 'start' | 'end' | 'center';
|
|
764
|
+
interface TooltipProps {
|
|
765
|
+
/**
|
|
766
|
+
* HTML to be rendered in the tooltip
|
|
767
|
+
*/
|
|
768
|
+
html?: React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
769
|
+
/**
|
|
770
|
+
* String to be rendered in the tooltip
|
|
771
|
+
*/
|
|
772
|
+
label?: string;
|
|
773
|
+
/**
|
|
774
|
+
* The position of the tooltip
|
|
775
|
+
*/
|
|
776
|
+
position: Position;
|
|
777
|
+
delay?: number;
|
|
778
|
+
arrow?: boolean;
|
|
779
|
+
disabled?: boolean;
|
|
780
|
+
className?: string;
|
|
781
|
+
style?: React$1.CSSProperties;
|
|
782
|
+
replaceChild?: boolean;
|
|
783
|
+
tabIndex?: number;
|
|
784
|
+
children?: React$1.ReactNode | string | null;
|
|
785
|
+
providerProps?: TooltipProviderProps;
|
|
786
|
+
rootProps?: TooltipProps$1;
|
|
787
|
+
arrowProps?: TooltipArrowProps;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Primary UI component for user interaction
|
|
791
|
+
*/
|
|
792
|
+
declare const Tooltip: ({ position, label, html, style, children, className, disabled, delay, arrow, replaceChild, providerProps, rootProps, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
793
|
+
|
|
794
|
+
type BaseProps = Pick<TransitionProps$1, 'in' | 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited' | 'unmountOnExit' | 'timeout'>;
|
|
795
|
+
interface TransitionProps extends BaseProps {
|
|
796
|
+
transition?: string;
|
|
797
|
+
children: (styles: React$1.CSSProperties) => React$1.ReactNode;
|
|
798
|
+
styles: TransitionStyles;
|
|
799
|
+
}
|
|
800
|
+
type TransitionStyleState = 'init' | 'entered' | 'exiting';
|
|
801
|
+
type TransitionStyles = {
|
|
802
|
+
[K in TransitionStyleState]?: React$1.CSSProperties;
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
declare function Transition(props: TransitionProps): react_jsx_runtime.JSX.Element;
|
|
806
|
+
|
|
807
|
+
type FadeProps = Omit<TransitionProps, 'styles' | 'timeout'> & {
|
|
808
|
+
timeout?: number;
|
|
809
|
+
};
|
|
810
|
+
declare function Fade(props: FadeProps): react_jsx_runtime.JSX.Element;
|
|
811
|
+
|
|
812
|
+
type Placement = 'left' | 'right' | 'bottom' | 'top';
|
|
813
|
+
type SlideProps = Omit<TransitionProps, 'styles' | 'timeout'> & {
|
|
814
|
+
/** The direction to slide drawer from */
|
|
815
|
+
placement?: Placement;
|
|
816
|
+
/** The transition timeout */
|
|
817
|
+
timeout?: number;
|
|
818
|
+
};
|
|
819
|
+
declare function Slide(props: SlideProps): react_jsx_runtime.JSX.Element;
|
|
820
|
+
|
|
821
|
+
interface SlideFadeProps extends Omit<TransitionProps, 'styles' | 'timeout'> {
|
|
822
|
+
/**
|
|
823
|
+
* The initial offset to slide from
|
|
824
|
+
*/
|
|
825
|
+
initialOffset?: string;
|
|
826
|
+
/**
|
|
827
|
+
* The transition timeout
|
|
828
|
+
*/
|
|
829
|
+
timeout?: number;
|
|
830
|
+
}
|
|
831
|
+
declare const SlideFade: (props: SlideFadeProps) => react_jsx_runtime.JSX.Element;
|
|
832
|
+
|
|
833
|
+
export { Alert, type AlertProps, type Align, type BaseProps, Button, type ButtonProps, type ButtonSizeKey, type ButtonVariant, Checkbox, type CheckboxProps, Confirmation, type ConfirmationProps, DatePicker, DateRangePicker, DateTimePicker, DateTimeRangePicker, Dropdown, DropdownButton, DropdownInput, type DropdownProps, type DropdownTypes, Fade, type FadeProps, Input, type LevelType, Loader, Modal, type ModalAlignType, type ModalPositionType, type ModalProps, type ModalSizeType, MultiSelectDropdown, type MultiSelectDropdownProps, Popover, type PopoverProps, type Position, RadioGroup, type RadioItemProps, type Side, Slide, SlideFade, type SlideFadeProps, type SlideProps, Tabs, type TabsItemProps, Tag, TextArea, ThemeProvider, ToastContainer, Toggle, type ToggleProps, type ToggleSizes, Tooltip, type TooltipProps, Transition, type TransitionProps, type TransitionStyleState, type TransitionStyles, useConfirmation, useModal, useTheme };
|