freemium-ui 2.0.0-beta.19 → 2.0.0-beta.20
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/index.cjs.js +4902 -4836
- package/index.d.ts +48 -31
- package/index.js +4852 -4788
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3,15 +3,20 @@ import * as react from 'react';
|
|
|
3
3
|
import react__default from 'react';
|
|
4
4
|
import * as Popover$1 from '@radix-ui/react-popover';
|
|
5
5
|
import { PopperContentProps } from '@radix-ui/react-popover';
|
|
6
|
-
import {
|
|
6
|
+
import { RadioGroupProps as RadioGroupProps$1, RadioGroupContextValue } from '@radix-ui/react-radio-group';
|
|
7
7
|
import { CheckboxProps as CheckboxProps$1 } from '@radix-ui/react-checkbox';
|
|
8
|
-
import
|
|
8
|
+
import * as _radix_ui_react_select from '@radix-ui/react-select';
|
|
9
|
+
import { SelectProps, SelectItemProps } from '@radix-ui/react-select';
|
|
10
|
+
export { Item as RadixSelectItem } from '@radix-ui/react-select';
|
|
9
11
|
import { UseSelectProps, UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
|
|
10
12
|
import * as _radix_ui_react_label from '@radix-ui/react-label';
|
|
11
13
|
import { LabelProps } from '@radix-ui/react-label';
|
|
12
|
-
import
|
|
14
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
15
|
+
import { MenuItemProps as MenuItemProps$1 } from '@radix-ui/react-dropdown-menu';
|
|
16
|
+
export { Item as RadixMenuItem } from '@radix-ui/react-dropdown-menu';
|
|
13
17
|
import * as styled_components from 'styled-components';
|
|
14
18
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
19
|
+
import { DateInput3Props, DateRangeInput3Props, TimePrecision } from '@blueprintjs/datetime2';
|
|
15
20
|
import { DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
16
21
|
import { CoreOptions, ColumnDef, Cell, RowSelectionState } from '@tanstack/react-table';
|
|
17
22
|
import * as Tabs$1 from '@radix-ui/react-tabs';
|
|
@@ -26,7 +31,7 @@ type AlertData = {
|
|
|
26
31
|
linkText?: string;
|
|
27
32
|
href?: string;
|
|
28
33
|
};
|
|
29
|
-
interface AlertProps {
|
|
34
|
+
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
30
35
|
/**
|
|
31
36
|
* data to be displayed in the alert
|
|
32
37
|
*/
|
|
@@ -44,6 +49,7 @@ interface AlertProps {
|
|
|
44
49
|
*/
|
|
45
50
|
timeout?: number;
|
|
46
51
|
/**
|
|
52
|
+
* @deprecated
|
|
47
53
|
* Class name to be overriden
|
|
48
54
|
*/
|
|
49
55
|
overideClassName?: string;
|
|
@@ -51,10 +57,6 @@ interface AlertProps {
|
|
|
51
57
|
* Children to be displayed in the alert
|
|
52
58
|
*/
|
|
53
59
|
children?: React.ReactNode | string;
|
|
54
|
-
/**
|
|
55
|
-
* Children to be displayed in the alert
|
|
56
|
-
*/
|
|
57
|
-
style?: React.CSSProperties;
|
|
58
60
|
/**
|
|
59
61
|
* Function to be called when the alert is closed
|
|
60
62
|
*/
|
|
@@ -68,7 +70,7 @@ interface AlertProps {
|
|
|
68
70
|
/**
|
|
69
71
|
* Alert displays an alert on the user interface and enables displaying additional information to the context of the page.
|
|
70
72
|
*/
|
|
71
|
-
declare const Alert: ({ canDismiss, onClose, children, level, onDisappear,
|
|
73
|
+
declare const Alert: ({ canDismiss, onClose, children, level, onDisappear, data, timeout, overideClassName, ...props }: AlertProps) => react__default.JSX.Element | null;
|
|
72
74
|
|
|
73
75
|
type ButtonSizeKey = 'mini' | 'normal' | 'large';
|
|
74
76
|
type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link';
|
|
@@ -157,7 +159,8 @@ interface BoxedRadioItemProps {
|
|
|
157
159
|
disabled?: boolean;
|
|
158
160
|
[key: string]: any;
|
|
159
161
|
}
|
|
160
|
-
type BoxedRadioProps<T extends BoxedRadioItemProps = BoxedRadioItemProps> = {
|
|
162
|
+
type BoxedRadioProps<T extends BoxedRadioItemProps = BoxedRadioItemProps> = react__default.HtmlHTMLAttributes<HTMLDivElement> & {
|
|
163
|
+
dir?: RadioGroupProps$1['dir'];
|
|
161
164
|
/**
|
|
162
165
|
* Select options
|
|
163
166
|
*/
|
|
@@ -190,6 +193,9 @@ type BoxedRadioProps<T extends BoxedRadioItemProps = BoxedRadioItemProps> = {
|
|
|
190
193
|
* The description of the content
|
|
191
194
|
*/
|
|
192
195
|
label?: string;
|
|
196
|
+
errorText?: string;
|
|
197
|
+
isRequired?: boolean;
|
|
198
|
+
isErrored?: boolean;
|
|
193
199
|
/**
|
|
194
200
|
* The description of the content
|
|
195
201
|
*/
|
|
@@ -197,21 +203,13 @@ type BoxedRadioProps<T extends BoxedRadioItemProps = BoxedRadioItemProps> = {
|
|
|
197
203
|
/**
|
|
198
204
|
* The description of the content
|
|
199
205
|
*/
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* class Name of Radio button
|
|
203
|
-
*/
|
|
204
|
-
className?: string;
|
|
205
|
-
/**
|
|
206
|
-
* Id of the button
|
|
207
|
-
*/
|
|
208
|
-
id?: string;
|
|
206
|
+
itemComponent?: (item: T) => react__default.ReactNode | string;
|
|
209
207
|
};
|
|
210
208
|
|
|
211
209
|
/**
|
|
212
210
|
* BoxedRadio displays a group of options with radio buttons and enables selection of one option from the list.
|
|
213
211
|
*/
|
|
214
|
-
declare const BoxedRadio: <T extends BoxedRadioItemProps>({ options, defaultValue, idAccessor, onChange, disabled, getTextContent, className, id, readOnly,
|
|
212
|
+
declare const BoxedRadio: <T extends BoxedRadioItemProps>({ options, defaultValue, idAccessor, onChange, isErrored, errorText, disabled, getTextContent, className, id, isRequired, readOnly, itemComponent, label, value, ...props }: BoxedRadioProps<T>) => react__default.JSX.Element;
|
|
215
213
|
|
|
216
214
|
interface CheckboxProps extends CheckboxProps$1 {
|
|
217
215
|
/**
|
|
@@ -235,7 +233,7 @@ interface CheckboxProps extends CheckboxProps$1 {
|
|
|
235
233
|
/**
|
|
236
234
|
* Checkbox displays a check box on the user interface and enables assigning a state (selected or deselected) to it. In the selected state, the check box displayed on the UI is highlighted and contains a check mark.
|
|
237
235
|
*/
|
|
238
|
-
declare const Checkbox: ({ isRequired, isErrored, readOnly, label, ...rest }: CheckboxProps) => react__default.JSX.Element;
|
|
236
|
+
declare const Checkbox: ({ isRequired, isErrored, className, readOnly, label, ...rest }: CheckboxProps) => react__default.JSX.Element;
|
|
239
237
|
|
|
240
238
|
interface ConfirmationProps {
|
|
241
239
|
/**
|
|
@@ -350,8 +348,9 @@ declare const Drawer: ({ isOpen, children, hideDismissIcon, customClass, size, i
|
|
|
350
348
|
type DropdownTypes = 'button' | 'input';
|
|
351
349
|
type DefaultDropdownItem = {
|
|
352
350
|
[key: string]: any;
|
|
351
|
+
group?: string;
|
|
353
352
|
};
|
|
354
|
-
type PickedSelectProps = Pick<SelectProps, '
|
|
353
|
+
type PickedSelectProps = Pick<SelectProps, 'name' | 'disabled' | 'value'>;
|
|
355
354
|
interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends PickedSelectProps {
|
|
356
355
|
/**
|
|
357
356
|
* The items to be displayed in the dropdown
|
|
@@ -361,6 +360,8 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
|
|
|
361
360
|
* The identifier for the items
|
|
362
361
|
*/
|
|
363
362
|
itemIdentifier?: string;
|
|
363
|
+
isOpen?: SelectProps['open'];
|
|
364
|
+
defaultIsOpen?: SelectProps['defaultOpen'];
|
|
364
365
|
/**
|
|
365
366
|
* The selected item
|
|
366
367
|
*/
|
|
@@ -376,7 +377,7 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
|
|
|
376
377
|
/**
|
|
377
378
|
* Fuction to give the string representation of the item
|
|
378
379
|
*/
|
|
379
|
-
itemComponent?: (item: T) => React.ReactNode | string;
|
|
380
|
+
itemComponent?: (item: T, props?: DropdownItemProps) => React.ReactNode | string;
|
|
380
381
|
/**
|
|
381
382
|
* The type of the dropdown
|
|
382
383
|
*/
|
|
@@ -465,11 +466,17 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
|
|
|
465
466
|
*/
|
|
466
467
|
useComboboxProps?: UseComboboxProps<T>;
|
|
467
468
|
}
|
|
469
|
+
type DropdownItemProps = SelectItemProps & {
|
|
470
|
+
showTick: boolean;
|
|
471
|
+
};
|
|
468
472
|
|
|
469
473
|
/**
|
|
470
474
|
* Dropdown displays a list or drop-down box that enables selection of an option or multiple options from an available list of values.
|
|
471
475
|
*/
|
|
472
476
|
declare const Dropdown: <T extends DefaultDropdownItem>({ type, ...props }: DropdownProps<T>) => react__default.JSX.Element;
|
|
477
|
+
declare const Item: react__default.ForwardRefExoticComponent<_radix_ui_react_select.SelectItemProps & {
|
|
478
|
+
showTick: boolean;
|
|
479
|
+
} & react__default.RefAttributes<HTMLDivElement>>;
|
|
473
480
|
|
|
474
481
|
declare const ChevronUp: (props: react__default.SVGProps<SVGSVGElement>) => react__default.JSX.Element;
|
|
475
482
|
|
|
@@ -559,13 +566,11 @@ type LoaderPropTypes = {
|
|
|
559
566
|
*/
|
|
560
567
|
declare const Loader: (props: LoaderPropTypes) => react__default.JSX.Element;
|
|
561
568
|
|
|
562
|
-
interface
|
|
563
|
-
id: string;
|
|
564
|
-
name: string;
|
|
569
|
+
interface DefaultMenuItemProps {
|
|
565
570
|
disabled?: boolean;
|
|
566
571
|
[key: string]: any;
|
|
567
572
|
}
|
|
568
|
-
type MenuProps<T extends
|
|
573
|
+
type MenuProps<T extends DefaultMenuItemProps = DefaultMenuItemProps> = {
|
|
569
574
|
side?: PopperContentProps['side'];
|
|
570
575
|
sideOffset?: PopperContentProps['sideOffset'];
|
|
571
576
|
align?: PopperContentProps['align'];
|
|
@@ -581,6 +586,7 @@ type MenuProps<T extends MenuItemProps = MenuItemProps> = {
|
|
|
581
586
|
*/
|
|
582
587
|
onSelect?: (option: T) => void;
|
|
583
588
|
closeMenuCallback?: () => void;
|
|
589
|
+
itemComponent?: (item: T, props?: MenuItemProps) => React.ReactNode | string;
|
|
584
590
|
/**
|
|
585
591
|
* options for menu button
|
|
586
592
|
*/
|
|
@@ -611,12 +617,22 @@ type MenuProps<T extends MenuItemProps = MenuItemProps> = {
|
|
|
611
617
|
*/
|
|
612
618
|
showArrow?: boolean;
|
|
613
619
|
};
|
|
620
|
+
type MenuItemProps = MenuItemProps$1 & {
|
|
621
|
+
isSelected: boolean;
|
|
622
|
+
};
|
|
614
623
|
|
|
615
624
|
/**
|
|
616
625
|
* Menu is a container for Menu Item components.
|
|
617
626
|
* Menu item is a component to define each row of a menu components. It takes in prefix, suffix and default slot to place content either at beginning or end or middle of the row respectively.
|
|
618
627
|
*/
|
|
619
|
-
declare const Menu: <T extends
|
|
628
|
+
declare const Menu: <T extends DefaultMenuItemProps>(props: MenuProps<T>) => react__default.JSX.Element;
|
|
629
|
+
|
|
630
|
+
declare const DropdownMenuItem: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<Omit<DropdownMenu.DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
631
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
|
632
|
+
}, {
|
|
633
|
+
isSelected?: boolean | undefined;
|
|
634
|
+
disabled?: boolean | undefined;
|
|
635
|
+
}>> & Omit<react.ForwardRefExoticComponent<DropdownMenu.DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>>, keyof react.Component<any, {}, any>>;
|
|
620
636
|
|
|
621
637
|
type ModalAlignType = 'top' | 'center' | 'bottom';
|
|
622
638
|
type ModalPositionType = 'left' | 'center' | 'right';
|
|
@@ -980,6 +996,8 @@ type RadioGroupProps<T extends RadioItemProps = RadioItemProps> = Pick<RadioGrou
|
|
|
980
996
|
* The description of the content
|
|
981
997
|
*/
|
|
982
998
|
label?: string;
|
|
999
|
+
errorText?: string;
|
|
1000
|
+
isErrored?: boolean;
|
|
983
1001
|
};
|
|
984
1002
|
|
|
985
1003
|
/**
|
|
@@ -990,7 +1008,7 @@ declare const Radio: ({ checked, className, disabled, id, isRequired, label, nam
|
|
|
990
1008
|
/**
|
|
991
1009
|
* RadioGroup displays a group of options with radio buttons and enables selection of one option from the list.
|
|
992
1010
|
*/
|
|
993
|
-
declare const RadioGroup: ({ options, defaultValue, idAccessor, nameAccessor, onChange, className, id,
|
|
1011
|
+
declare const RadioGroup: ({ options, defaultValue, idAccessor, nameAccessor, onChange, className, id, isErrored, errorText, disabled, isRequired, label, readOnly, value, ...props }: RadioGroupProps) => react__default.JSX.Element;
|
|
994
1012
|
|
|
995
1013
|
type ReorderItemType = {
|
|
996
1014
|
id: string | number;
|
|
@@ -1602,7 +1620,6 @@ type InputLabelProps = {
|
|
|
1602
1620
|
};
|
|
1603
1621
|
declare const InputLabel: styled_components.IStyledComponent<"web", styled_components_dist_types.Substitute<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, InputLabelProps>>;
|
|
1604
1622
|
declare const RequiredIndicator: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
1605
|
-
declare const ErrorText: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
|
|
1606
1623
|
declare const IconButton: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>>;
|
|
1607
1624
|
declare const FreshLink: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>>;
|
|
1608
1625
|
declare const CardContent: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -1629,4 +1646,4 @@ declare namespace index_d {
|
|
|
1629
1646
|
export { index_d_dark as dark, index_d_light as light };
|
|
1630
1647
|
}
|
|
1631
1648
|
|
|
1632
|
-
export { Alert, type AlertProps, type BaseProps, BoxedRadio, type BoxedRadioItemProps, type BoxedRadioProps, Button, ButtonDropdown, type ButtonDropdownItemProps, type ButtonDropdownProps, type ButtonProps, type ButtonSizeKey, type ButtonVariant, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, type CheckboxProps, ChevronUp, Confirmation, type ConfirmationProps, Cross as CrossIcon, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DateTimeRangePicker, type DateTimeRangePickerProps, type DefaultDropdownItem, type DefaultMultiSelectDropdownItem, type DefaultProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSizeType, Dropdown, type DropdownProps, type DropdownTypes,
|
|
1649
|
+
export { Alert, type AlertProps, type BaseProps, BoxedRadio, type BoxedRadioItemProps, type BoxedRadioProps, Button, ButtonDropdown, type ButtonDropdownItemProps, type ButtonDropdownProps, type ButtonProps, type ButtonSizeKey, type ButtonVariant, CardActions, CardContent, CardDescription, CardText, CardTitle, Checkbox, type CheckboxProps, ChevronUp, Confirmation, type ConfirmationProps, Cross as CrossIcon, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DateTimeRangePicker, type DateTimeRangePickerProps, type DefaultDropdownItem, type DefaultMultiSelectDropdownItem, type DefaultProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSizeType, Dropdown, Item as DropdownItem, DropdownMenuItem, type DropdownProps, type DropdownTypes, Fade, type FadeProps, type FreemiumUiTheme, FreshLink, type FreshworksPalette, type FuiContextType, IconButton, Input, InputLabel, type InputProps, type LevelType, Loader, type LoaderPropTypes, type LoaderSizes, type LoaderSpeeds, Menu, type MenuItemProps, type MenuProps, Minus, Modal, type ModalAlignType, type ModalCssType, type ModalPositionType, type ModalProps, type ModalSizeType, MoreVertical, MultiSelectDropdown, type MultiSelectDropdownProps, type Origin, Popover, PopoverClose, type PopoverProps, Radio, RadioGroup, type RadioGroupProps, type RadioItemProps, type RadioProps, Reorder, type ReorderItemType, type ReorderProps, RequiredIndicator, type RowData, Slide, SlideFade, type SlideFadeProps, type SlidePlacement, type SlideProps, StyledLabel, Table, type TableProps, Tabs, TabsContent, type TabsItemProps, TabsList, type TabsProps, TabsRoot, TabsTrigger, Tag, type TagProps, TextArea, type TextAreaProps, ThemeProvider, type ThemeProviderType, index_d as Themes, TickIcon, TimePicker, type TimePickerProps, type ToastContextType, type ToastItemProps, ToastProvider, type ToastType, type ToastTypes, type ToastWithID, Toggle, type ToggleProps, type ToggleSizes, Tooltip, type TooltipAlign, type TooltipPosition, type TooltipProps, type TooltipSide, Transition, type TransitionProps, type TransitionStyleState, type TransitionStyles, TriggerButtonWrapper, Typography, type TypographyProps, type TypographyVariantType, type TypographyWeightType, type UpdateToastsFunction, Warning, basicHide, basicShow, contentHide, contentShow, slideDownAndFade, slideLeftAndFade, slideRightAndFade, slideUpAndFade, useToasts };
|