@fattureincloud/fic-design-system 0.4.27 → 0.4.29-new-table
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/badge/Badge.d.ts +11 -1
- package/dist/components/badge/badge.stories.d.ts +3 -2
- package/dist/components/badge/badgePalette.d.ts +3 -0
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/badge/types.d.ts +17 -1
- package/dist/components/banner/Banner.d.ts +10 -9
- package/dist/components/banner/banner.stories.d.ts +3 -4
- package/dist/components/banner/bannerPalette.d.ts +3 -0
- package/dist/components/banner/index.d.ts +3 -2
- package/dist/components/banner/styled.d.ts +5 -0
- package/dist/components/banner/types.d.ts +23 -0
- package/dist/components/chip/Chip.d.ts +13 -0
- package/dist/components/chip/chip.stories.d.ts +6 -0
- package/dist/components/chip/chipPalette.d.ts +3 -0
- package/dist/components/chip/index.d.ts +3 -0
- package/dist/components/chip/styled.d.ts +6 -0
- package/dist/components/chip/types.d.ts +25 -0
- package/dist/components/dropdown/DropdownImpl.d.ts +1 -1
- package/dist/components/dropdown/types.d.ts +1 -0
- package/dist/components/floatingBadge/NotificationBadge.d.ts +9 -0
- package/dist/components/floatingBadge/floatingBadge.d.ts +7 -1
- package/dist/components/floatingBadge/floatingBadge.stories.d.ts +2 -1
- package/dist/components/floatingBadge/floatingBadgePalette.d.ts +3 -0
- package/dist/components/floatingBadge/index.d.ts +4 -2
- package/dist/components/floatingBadge/types.d.ts +24 -3
- package/dist/components/floatingBadge/withBadge.d.ts +5 -0
- package/dist/components/form/datepicker/StyledDatePicker.d.ts +1 -0
- package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +13 -0
- package/dist/components/form/label/Label.d.ts +9 -8
- package/dist/components/form/label/index.d.ts +3 -2
- package/dist/components/form/label/labelPalette.d.ts +3 -0
- package/dist/components/form/label/styled.d.ts +2 -0
- package/dist/components/form/label/types.d.ts +21 -0
- package/dist/components/form/label/utils.d.ts +9 -0
- package/dist/components/form/radioGroup/index.d.ts +1 -1
- package/dist/components/form/radioGroup/types.d.ts +3 -2
- package/dist/components/form/select/components/Placeholder.d.ts +4 -0
- package/dist/components/form/textArea/TextArea.d.ts +3 -3
- package/dist/components/form/textArea/components/TextAreaElement.d.ts +2 -2
- package/dist/components/layout/index.d.ts +1 -2
- package/dist/components/layout/sidebarItem/SidebarItem.d.ts +19 -26
- package/dist/components/layout/sidebarItem/components/SidebarItemDropdown.d.ts +2 -7
- package/dist/components/layout/sidebarItem/index.d.ts +5 -5
- package/dist/components/layout/sidebarItem/sidebarItem.stories.d.ts +2 -1
- package/dist/components/layout/sidebarItem/sidebarItemPalette.d.ts +1 -12
- package/dist/components/layout/sidebarItem/styled.d.ts +13 -0
- package/dist/components/layout/sidebarItem/types.d.ts +58 -2
- package/dist/components/layout/sidebarItem/utils.d.ts +2 -2
- package/dist/components/newTable/Table.d.ts +32 -0
- package/dist/components/newTable/components/action/favorite/Favorite.d.ts +14 -0
- package/dist/components/newTable/components/action/favorite/index.d.ts +1 -0
- package/dist/components/newTable/components/action/favorite/styled.d.ts +4 -0
- package/dist/components/newTable/components/action/settings/ColumnsSettings/ColumnItem/ColumnItem.d.ts +8 -0
- package/dist/components/newTable/components/action/settings/ColumnsSettings/ColumnItem/styled.d.ts +4 -0
- package/dist/components/newTable/components/action/settings/ColumnsSettings/ColumnsSettings.d.ts +8 -0
- package/dist/components/newTable/components/action/settings/ColumnsSettings/DraggableContent/DraggableContent.d.ts +7 -0
- package/dist/components/newTable/components/action/settings/ColumnsSettings/index.d.ts +2 -0
- package/dist/components/newTable/components/action/settings/ColumnsSettings/styled.d.ts +4 -0
- package/dist/components/newTable/components/action/settings/DropdownSettings/DropdownSettings.d.ts +7 -0
- package/dist/components/newTable/components/action/settings/DropdownSettings/index.d.ts +1 -0
- package/dist/components/newTable/components/action/settings/DropdownSettings/styled.d.ts +4 -0
- package/dist/components/newTable/components/action/settings/RowHeightSettings/RowHeightSettings.d.ts +10 -0
- package/dist/components/newTable/components/action/settings/RowHeightSettings/index.d.ts +1 -0
- package/dist/components/newTable/components/action/settings/RowHeightSettings/styled.d.ts +2 -0
- package/dist/components/newTable/components/action/settings/Settings.d.ts +8 -0
- package/dist/components/newTable/components/action/settings/hooks/index.d.ts +2 -0
- package/dist/components/newTable/components/action/settings/hooks/useColumnValues.d.ts +8 -0
- package/dist/components/newTable/components/action/settings/hooks/useDropdownSettingsValues.d.ts +13 -0
- package/dist/components/newTable/components/action/settings/index.d.ts +1 -0
- package/dist/components/newTable/components/action/settings/styled.d.ts +2 -0
- package/dist/components/newTable/components/action/toggle/Toggle.d.ts +14 -0
- package/dist/components/newTable/components/action/toggle/constants.d.ts +3 -0
- package/dist/components/newTable/components/action/toggle/index.d.ts +1 -0
- package/dist/components/newTable/components/action/toggle/styled.d.ts +5 -0
- package/dist/components/newTable/components/body/Body.d.ts +9 -0
- package/dist/components/newTable/components/bulkBar/BulkBar.d.ts +9 -0
- package/dist/components/newTable/components/bulkBar/styled.d.ts +10 -0
- package/dist/components/newTable/components/cell/Cell.d.ts +12 -0
- package/dist/components/newTable/components/cell/customActionCell/CustomActionCell.d.ts +12 -0
- package/dist/components/newTable/components/cell/customActionCell/DropdownActionCell.d.ts +10 -0
- package/dist/components/newTable/components/cell/customActionCell/PrimaryActionCell.d.ts +9 -0
- package/dist/components/newTable/components/cell/customActionCell/index.d.ts +3 -0
- package/dist/components/newTable/components/cell/customActionCell/styled.d.ts +4 -0
- package/dist/components/newTable/components/cell/customCell/CustomCell.d.ts +11 -0
- package/dist/components/newTable/components/cell/customCell/CustomInput.d.ts +9 -0
- package/dist/components/newTable/components/cell/customCell/TextAreaPopup.d.ts +9 -0
- package/dist/components/newTable/components/cell/customCell/constants.d.ts +1 -0
- package/dist/components/newTable/components/cell/customCell/index.d.ts +1 -0
- package/dist/components/newTable/components/cell/customCell/styled.d.ts +7 -0
- package/dist/components/newTable/components/cell/hooks/index.d.ts +1 -0
- package/dist/components/newTable/components/cell/hooks/useCellValues.d.ts +16 -0
- package/dist/components/newTable/components/cell/loadingCell/LoadingCell.d.ts +7 -0
- package/dist/components/newTable/components/cell/loadingCell/index.d.ts +1 -0
- package/dist/components/newTable/components/cell/styled.d.ts +20 -0
- package/dist/components/newTable/components/footer/Footer.d.ts +7 -0
- package/dist/components/newTable/components/header/Header.d.ts +10 -0
- package/dist/components/newTable/components/header/headerCell/ActionHeaderCell.d.ts +8 -0
- package/dist/components/newTable/components/header/headerCell/HeaderCell.d.ts +12 -0
- package/dist/components/newTable/components/header/headerCell/styled.d.ts +9 -0
- package/dist/components/newTable/components/header/hooks/index.d.ts +2 -0
- package/dist/components/newTable/components/header/hooks/useActionHeaderValues.d.ts +16 -0
- package/dist/components/newTable/components/header/hooks/useHeaderValues.d.ts +14 -0
- package/dist/components/newTable/components/row/Row.d.ts +10 -0
- package/dist/components/newTable/components/row/styled.d.ts +6 -0
- package/dist/components/newTable/components/utils.d.ts +10 -0
- package/dist/components/newTable/constants.d.ts +2 -0
- package/dist/components/newTable/hooks/useColumnPinning.d.ts +8 -0
- package/dist/components/newTable/hooks/usePagination.d.ts +9 -0
- package/dist/components/newTable/index.d.ts +2 -0
- package/dist/components/newTable/providers/TableProvider/TableProvider.d.ts +5 -0
- package/dist/components/newTable/providers/TableProvider/index.d.ts +3 -0
- package/dist/components/newTable/providers/TableProvider/types.d.ts +10 -0
- package/dist/components/newTable/stories/actions.d.ts +4 -0
- package/dist/components/newTable/stories/columns.d.ts +3 -0
- package/dist/components/newTable/stories/data.d.ts +2 -0
- package/dist/components/newTable/stories/styled.d.ts +1 -0
- package/dist/components/newTable/stories/types.d.ts +9 -0
- package/dist/components/newTable/styled.d.ts +9 -0
- package/dist/components/newTable/table.stories.d.ts +6 -0
- package/dist/components/newTable/types.d.ts +170 -0
- package/dist/components/newTable/utils.d.ts +8 -0
- package/dist/components/pagination/Pagination.d.ts +15 -0
- package/dist/components/pagination/index.d.ts +3 -3
- package/dist/components/pagination/pagination.stories.d.ts +3 -3
- package/dist/components/pagination/paginationPalette.d.ts +3 -0
- package/dist/components/pagination/styled.d.ts +4 -0
- package/dist/components/pagination/types.d.ts +18 -0
- package/dist/components/progressbar/index.d.ts +3 -2
- package/dist/components/progressbar/progressBarPalette.d.ts +3 -0
- package/dist/components/progressbar/progressbar.d.ts +9 -8
- package/dist/components/progressbar/progressbar.stories.d.ts +6 -4
- package/dist/components/progressbar/styled.d.ts +3 -0
- package/dist/components/progressbar/types.d.ts +15 -9
- package/dist/components/table/components/ActionsCell.d.ts +10 -0
- package/dist/components/table/components/SortIndicator.d.ts +6 -0
- package/dist/components/table/components/TableBody.d.ts +14 -0
- package/dist/components/table/components/TableFoot.d.ts +2 -0
- package/dist/components/table/components/TableHeader.d.ts +7 -0
- package/dist/components/table/components/tableBody/TableBodyLoader.d.ts +7 -0
- package/dist/components/table/components/tableBody/styled.d.ts +3 -0
- package/dist/components/tip/index.d.ts +4 -3
- package/dist/components/tip/shortcutTip.d.ts +12 -1
- package/dist/components/tip/styled.d.ts +5 -0
- package/dist/components/tip/tip.d.ts +11 -1
- package/dist/components/tip/tip.stories.d.ts +4 -5
- package/dist/components/tip/tipPalette.d.ts +3 -0
- package/dist/components/tip/types.d.ts +24 -6
- package/dist/components/toast/components/{ToastContent.d.ts → toastContent.d.ts} +0 -0
- package/dist/components/toast/{Toast.d.ts → toast.d.ts} +0 -0
- package/dist/components/tooltip/Tooltip.d.ts +3 -1
- package/dist/index.d.ts +12 -11
- package/dist/index.esm.js +26 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/dist/styles/theme.d.ts +16 -0
- package/package.json +2 -1
- package/CHANGELOG.md +0 -508
@@ -1,3 +1,13 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { BadgeProps } from './
|
2
|
+
import { BadgeProps } from './';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {ReactText} text Component main content
|
6
|
+
* @param {BadgeType} type Used to set the badge variant (standard, error, info, warning, success)
|
7
|
+
* @param {string} className Used to apply custom classes
|
8
|
+
* @param {string} imageUrl Avatar image
|
9
|
+
* @param {IconProps} leftIcon Configuration of the left icon
|
10
|
+
* @param {IconProps} rightIcon Configuration of the right icon
|
11
|
+
* @param {function} handleRightIconClick Callback called on right icon click
|
12
|
+
*/
|
3
13
|
export declare const Badge: (props: BadgeProps) => JSX.Element;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { Meta } from '@storybook/react';
|
3
|
-
import { BadgeProps } from './
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
3
|
+
import { BadgeProps } from './';
|
4
|
+
export declare const Template: Story<BadgeProps>;
|
4
5
|
export declare const Normal: () => JSX.Element;
|
5
6
|
export declare const Advanced: () => JSX.Element;
|
6
7
|
declare const BadgeStories: Meta<BadgeProps>;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export {
|
1
|
+
export { Badge } from './Badge';
|
2
|
+
export { default as badgePalette } from './badgePalette';
|
3
|
+
export { BadgeProps, BadgePalette, BadgeType } from './types';
|
@@ -1,10 +1,26 @@
|
|
1
1
|
import { ReactText } from 'react';
|
2
|
+
import { paletteColor } from '../..';
|
2
3
|
import { IconProps } from '../icon';
|
3
4
|
export interface BadgeProps {
|
4
5
|
text?: ReactText;
|
5
|
-
|
6
|
+
type?: BadgeType;
|
7
|
+
className?: string;
|
6
8
|
imageUrl?: string;
|
7
9
|
leftIcon?: IconProps;
|
8
10
|
rightIcon?: IconProps;
|
9
11
|
handleRightIconClick?: () => void;
|
10
12
|
}
|
13
|
+
export declare enum BadgeType {
|
14
|
+
STANDARD = "standard",
|
15
|
+
ERROR = "error",
|
16
|
+
INFO = "info",
|
17
|
+
WARNING = "warning",
|
18
|
+
SUCCESS = "success"
|
19
|
+
}
|
20
|
+
export declare type BadgeParams = 'color' | 'backgroundColor';
|
21
|
+
export declare type BadgeParts = {
|
22
|
+
[key in BadgeParams]: paletteColor;
|
23
|
+
};
|
24
|
+
export declare type BadgePalette = {
|
25
|
+
[key in BadgeType]: BadgeParts;
|
26
|
+
};
|
@@ -1,11 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
|
2
|
+
import { BannerProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {string} type Used to set style and colors of the component among those present in the palette
|
6
|
+
* @param {function} onClose Callback called on right icon click
|
7
|
+
* @param {string|JSX.Element} content Component main content
|
8
|
+
* @param {IconProps} icon Configuration of the left icon
|
9
|
+
* @param {string} className To support styled-components customization
|
10
|
+
*/
|
11
|
+
declare const Banner: ({ type, content, icon, onClose, className }: BannerProps) => JSX.Element;
|
11
12
|
export default Banner;
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
|
4
|
-
export declare const WithKnobs: () => JSX.Element;
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
2
|
+
import { BannerProps } from './types';
|
3
|
+
export declare const Template: Story<BannerProps>;
|
5
4
|
declare const BannerStories: Meta<BannerProps>;
|
6
5
|
export default BannerStories;
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
export {
|
1
|
+
export { default as Banner } from './Banner';
|
2
|
+
export { default as bannerPalette } from './bannerPalette';
|
3
|
+
export { BannerProps, BannerPalette, BannerType } from './types';
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { BannerProps } from './types';
|
2
|
+
export declare const BannerWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
3
|
+
type: BannerProps['type'];
|
4
|
+
}, never>;
|
5
|
+
export declare const BannerContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { paletteColor } from '../../styles/types';
|
3
|
+
import { IconProps } from '../icon';
|
4
|
+
export interface BannerProps {
|
5
|
+
type?: BannerType;
|
6
|
+
onClose?: () => void;
|
7
|
+
content: string | JSX.Element;
|
8
|
+
icon?: IconProps;
|
9
|
+
className?: string;
|
10
|
+
}
|
11
|
+
export declare enum BannerType {
|
12
|
+
STANDARD = "standard",
|
13
|
+
ERROR = "error",
|
14
|
+
INFO = "info",
|
15
|
+
WARNING = "warning",
|
16
|
+
SUCCESS = "success"
|
17
|
+
}
|
18
|
+
export declare type BannerPalette = {
|
19
|
+
[key in BannerType]: {
|
20
|
+
color: paletteColor;
|
21
|
+
backgroundColor: paletteColor;
|
22
|
+
};
|
23
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ChipProps } from '.';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {string|number} text Component main content
|
6
|
+
* @param {boolean} statusEdit Used to set chip edit status
|
7
|
+
* @param {string} className To support styled-components customization
|
8
|
+
* @param {ChipType} type Used to set style and colors of the component among those present in the palette
|
9
|
+
* @param {IconProps} leftIcon Configuration of the left icon
|
10
|
+
* @param {function} closeAction Callback called on right icon click
|
11
|
+
*/
|
12
|
+
declare const Chip: (props: ChipProps) => JSX.Element;
|
13
|
+
export default Chip;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ChipProps } from './types';
|
3
|
+
export declare const LeftIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
4
|
+
export declare const RightIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
5
|
+
export declare const Text: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
6
|
+
export declare const ChipWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ChipProps, never>;
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { paletteColor } from '../..';
|
2
|
+
import { IconProps } from '../icon';
|
3
|
+
export declare enum ChipType {
|
4
|
+
STANDARD = "standard",
|
5
|
+
ERROR = "error",
|
6
|
+
INFO = "info",
|
7
|
+
WARNING = "warning",
|
8
|
+
SUCCESS = "success"
|
9
|
+
}
|
10
|
+
export interface ChipProps {
|
11
|
+
text?: string | number;
|
12
|
+
statusEdit?: boolean;
|
13
|
+
className?: string;
|
14
|
+
type?: ChipType;
|
15
|
+
leftIcon?: IconProps;
|
16
|
+
closeAction?: () => void;
|
17
|
+
}
|
18
|
+
export declare type ChipPalette = {
|
19
|
+
[key in ChipType]: {
|
20
|
+
color: paletteColor;
|
21
|
+
backgroundColor: paletteColor;
|
22
|
+
hover: paletteColor;
|
23
|
+
active: paletteColor;
|
24
|
+
};
|
25
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { DropdownProps } from './types';
|
3
|
-
declare const DropdownImpl: ({ className, content, fullWidth, maxWidth, maxHeight, minWidthAsTrigger, placement, renderContent, renderTrigger, triggerStyles, title, forceOpen, disableArrowNavigation, isDisabled, emptyState, }: DropdownProps) => JSX.Element;
|
3
|
+
declare const DropdownImpl: ({ className, content, fullWidth, maxWidth, maxHeight, minWidthAsTrigger, placement, renderContent, renderTrigger, triggerStyles, title, forceOpen, disableArrowNavigation, isDisabled, emptyState, onOpen, }: DropdownProps) => JSX.Element;
|
4
4
|
export default DropdownImpl;
|
@@ -23,6 +23,7 @@ export declare type DropdownProps = {
|
|
23
23
|
disableArrowNavigation?: boolean;
|
24
24
|
isDisabled?: boolean;
|
25
25
|
emptyState?: JSX.Element;
|
26
|
+
onOpen?: (isOpen: boolean) => void;
|
26
27
|
};
|
27
28
|
export declare type DropdownItemType = 'default' | 'danger' | 'success' | 'warning' | 'link';
|
28
29
|
export interface DropdownItemProps {
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { NotificationBadgeProps } from './types';
|
2
|
+
/**
|
3
|
+
* Component Props:
|
4
|
+
* @param {'small' | 'medium' | 'large'} size Used to hide the floating badge
|
5
|
+
* @param {string} className Apply custom classes
|
6
|
+
* @param {FloatingBadgeType} type Used to pass and render children nodes
|
7
|
+
*/
|
8
|
+
declare const NotificationBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, NotificationBadgeProps, never>;
|
9
|
+
export default NotificationBadge;
|
@@ -1,2 +1,8 @@
|
|
1
1
|
import { FloatingBadgeProps } from './types';
|
2
|
-
|
2
|
+
/**
|
3
|
+
* Component Props:
|
4
|
+
* @param {string | number} counter Count number
|
5
|
+
* @param {number} top Set top margin
|
6
|
+
* @param {number} right Set right margin
|
7
|
+
*/
|
8
|
+
export declare const FloatingBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, import("./types").NotificationBadgeProps & FloatingBadgeProps, never>;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { Meta } from '@storybook/react';
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
3
3
|
import { WithBadgeProps } from './types';
|
4
|
+
export declare const Template: Story<WithBadgeProps>;
|
4
5
|
export declare const Normal: () => JSX.Element;
|
5
6
|
export declare const WithKnobs: () => JSX.Element;
|
6
7
|
declare const WithBadgeStories: Meta<WithBadgeProps>;
|
@@ -1,2 +1,4 @@
|
|
1
|
-
|
2
|
-
export {
|
1
|
+
export { default as floatingBadgePalette } from './floatingBadgePalette';
|
2
|
+
export { default as NotificationBadge } from './NotificationBadge';
|
3
|
+
export { default as WithBadge } from './WithBadge';
|
4
|
+
export { FloatingBadgePalette, FloatingBadgeType } from './types';
|
@@ -1,12 +1,33 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
|
2
|
+
import { paletteColor } from '../..';
|
3
|
+
export interface FloatingBadgeProps extends NotificationBadgeProps {
|
3
4
|
counter?: string | number;
|
4
|
-
size?: 'small' | 'medium' | 'large';
|
5
5
|
top?: number;
|
6
6
|
right?: number;
|
7
|
-
className?: string;
|
8
7
|
}
|
9
8
|
export interface WithBadgeProps extends FloatingBadgeProps {
|
10
9
|
isDisabled?: boolean;
|
11
10
|
children: React.ReactNode;
|
12
11
|
}
|
12
|
+
export interface NotificationBadgeProps {
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
14
|
+
className?: string;
|
15
|
+
type?: FloatingBadgeType;
|
16
|
+
}
|
17
|
+
export declare enum FloatingBadgeType {
|
18
|
+
STANDARD = "standard",
|
19
|
+
ERROR = "error",
|
20
|
+
INFO = "info",
|
21
|
+
WARNING = "warning",
|
22
|
+
SUCCESS = "success",
|
23
|
+
DISABLED = "disabled"
|
24
|
+
}
|
25
|
+
export declare type FloatingBadgeColors = {
|
26
|
+
[key in FloatingBadgeType]: {
|
27
|
+
color: paletteColor;
|
28
|
+
backgroundColor: paletteColor;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
export declare type FloatingBadgePalette = FloatingBadgeColors & {
|
32
|
+
borderRadius: string | number;
|
33
|
+
};
|
@@ -1,4 +1,9 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { WithBadgeProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {boolean} isDisabled Used to hide the floating badge
|
6
|
+
* @param {React.ReactNode} children Used to pass and render children nodes
|
7
|
+
*/
|
3
8
|
declare const WithBadge: (props: WithBadgeProps) => JSX.Element;
|
4
9
|
export default WithBadge;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
interface ReturnType {
|
3
|
+
date: Date | null;
|
4
|
+
setDate: Dispatch<SetStateAction<Date | null>>;
|
5
|
+
value: string | null;
|
6
|
+
setValue: Dispatch<SetStateAction<string | null>>;
|
7
|
+
}
|
8
|
+
interface Props {
|
9
|
+
initialDate?: Date | null;
|
10
|
+
initialValue?: string | null;
|
11
|
+
}
|
12
|
+
declare const useDatePickerValues: ({ initialDate, initialValue }?: Props) => ReturnType;
|
13
|
+
export default useDatePickerValues;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
import { LabelProps } from './';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {string | JSX.Element} label Label text content
|
6
|
+
* @param {LabelType | paletteColor} color Customize label color
|
7
|
+
* @param {boolean} disabled Used to hide the label
|
8
|
+
* @param {boolean} required Add asterisk and red color
|
9
|
+
*/
|
10
|
+
declare const Label: ({ label, disabled, required, color }: LabelProps) => JSX.Element | null;
|
10
11
|
export default Label;
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
export { LabelProps,
|
1
|
+
export { default as Label } from './Label';
|
2
|
+
export { LabelProps, LabelType, LabelPalette } from './types';
|
3
|
+
export { default as labelPalette } from './labelPalette';
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { paletteColor } from '../../..';
|
3
|
+
export interface WrapperProps {
|
4
|
+
disabled?: boolean;
|
5
|
+
required?: boolean;
|
6
|
+
color?: LabelType | paletteColor;
|
7
|
+
}
|
8
|
+
export interface LabelProps extends WrapperProps {
|
9
|
+
label?: string | JSX.Element;
|
10
|
+
}
|
11
|
+
export declare enum LabelType {
|
12
|
+
STANDARD = "standard",
|
13
|
+
ERROR = "error",
|
14
|
+
INFO = "info",
|
15
|
+
WARNING = "warning",
|
16
|
+
SUCCESS = "success",
|
17
|
+
DISABLED = "disabled"
|
18
|
+
}
|
19
|
+
export declare type LabelPalette = {
|
20
|
+
[key in LabelType]: paletteColor;
|
21
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
2
|
+
import { paletteColor } from '../../../styles/types';
|
3
|
+
import { LabelType } from './types';
|
4
|
+
export interface GetLabelColorParams {
|
5
|
+
theme: DefaultTheme;
|
6
|
+
disabled?: boolean;
|
7
|
+
color?: LabelType | paletteColor;
|
8
|
+
}
|
9
|
+
export declare const getLabelColor: ({ theme, color, disabled }: GetLabelColorParams) => string;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export { RadioGroup } from './RadioGroup';
|
2
|
-
export { RadioGroupProps } from './types';
|
2
|
+
export { RadioGroupProps, RadioGroupOptions } from './types';
|
@@ -1,9 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { spacing } from '../../../styles/spacing';
|
3
|
-
import { InputHelperProps } from '../inputHelper
|
3
|
+
import { InputHelperProps } from '../inputHelper';
|
4
4
|
import { RadioProps } from '../radio';
|
5
|
+
export declare type RadioGroupOptions = Omit<RadioProps, 'value' | 'onClick' | 'helper'>[];
|
5
6
|
export interface RadioGroupProps extends RadioGroupWrapperProps {
|
6
|
-
options:
|
7
|
+
options: RadioGroupOptions;
|
7
8
|
initialSelection?: number;
|
8
9
|
onChange: (selected: number) => void;
|
9
10
|
helper?: InputHelperProps;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { PlaceholderProps } from 'react-select';
|
2
|
+
import { OptionType } from './Option';
|
3
|
+
declare const Placeholder: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ children, }: PlaceholderProps<O, IsMulti, import("react-select").GroupTypeBase<O>>) => JSX.Element;
|
4
|
+
export default Placeholder;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
import React from 'react';
|
2
2
|
import { LabelProps } from '../label';
|
3
3
|
import { TextAreaElementProps } from './types';
|
4
4
|
export declare type TextAreaProps = LabelProps & TextAreaElementProps;
|
5
|
-
declare const
|
6
|
-
export default
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<LabelProps & TextAreaElementProps & React.RefAttributes<HTMLTextAreaElement>>;
|
6
|
+
export default _default;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
import React from 'react';
|
2
2
|
import { BoxedInputWrapperProps } from '../../common/styles';
|
3
3
|
import { TextAreaElementProps } from '../types';
|
4
|
-
declare const TextAreaElement:
|
4
|
+
declare const TextAreaElement: React.ForwardRefExoticComponent<TextAreaElementProps & React.RefAttributes<HTMLTextAreaElement | null>>;
|
5
5
|
export declare type TextAreaWrapperProps = Pick<TextAreaElementProps, 'disabled' | 'status' | 'initialHeight' | 'isResizable' | 'isPrefilled'>;
|
6
6
|
export declare type TextAreaStyles = Omit<BoxedInputWrapperProps, 'status'>;
|
7
7
|
export default TextAreaElement;
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { SidebarItem, SidebarItemProps, sidebarItemHeight, SidebarItemPalette, CustomSidebarItemProps };
|
1
|
+
export { CustomSidebarItemProps, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps, SidebarBadgeConfigType, SidebarBadgeConfigProps, } from './sidebarItem';
|
@@ -1,28 +1,21 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
}
|
21
|
-
export declare const sidebarItemHeight = 44;
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { SidebarItemProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {iconProps} icon Configuration of the left icon
|
6
|
+
* @param {string} title Used to set the sidebar item title
|
7
|
+
* @param {boolean} isDisabled Used to disable the item
|
8
|
+
* @param {boolean} isHidden Hide the sidebar item
|
9
|
+
* @param {function} onClick Callback called on item click
|
10
|
+
* @param {boolean} isOpen Set isOpen state
|
11
|
+
* @param {boolean} caretVisible Used to display caret icon
|
12
|
+
* @param {DropdownItemProps[]} dropdownContent Custom dropdown content
|
13
|
+
* @param {string} className Used to apply custom classes
|
14
|
+
* @param {boolean} isActive Set isOpen state
|
15
|
+
* @param {boolean} forceOpenDropdown Used to force open the dropdown content
|
16
|
+
* @param {CustomSidebarItemProps} customProps Used to set render sidebar item custom content
|
17
|
+
* @param {string} href Specify a redirect URL on item click
|
18
|
+
* @param {SidebarBadgeConfigProps} badgeConfig Used to add a badge, counter, icon to the item
|
19
|
+
*/
|
22
20
|
declare const SidebarItem: (props: SidebarItemProps) => JSX.Element | null;
|
23
|
-
export interface WrapperProps {
|
24
|
-
isActive: boolean;
|
25
|
-
isDisabled: boolean;
|
26
|
-
customColor?: paletteColor;
|
27
|
-
}
|
28
21
|
export default SidebarItem;
|
@@ -1,9 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
|
4
|
-
content: DropdownItemProps[];
|
5
|
-
className?: string;
|
6
|
-
forceOpen?: boolean;
|
7
|
-
}
|
8
|
-
declare const SidebarItemDropdown: ({ className, content, forceOpen }: Props) => JSX.Element;
|
2
|
+
import { SidebarItemDropdownProps } from '../types';
|
3
|
+
declare const SidebarItemDropdown: ({ className, content, forceOpen }: SidebarItemDropdownProps) => JSX.Element;
|
9
4
|
export default SidebarItemDropdown;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export {
|
1
|
+
export { default as SidebarItemDropdown } from './components/SidebarItemDropdown';
|
2
|
+
export { default as SidebarItem } from './SidebarItem';
|
3
|
+
export { default as sidebarItemPalette } from './sidebarItemPalette';
|
4
|
+
export { sidebarItemHeight } from './styled';
|
5
|
+
export { CustomSidebarItemProps, SidebarItemPalette, SidebarItemProps, SidebarBadgeConfigType, SidebarBadgeConfigProps, } from './types';
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
2
|
-
import { SidebarItemProps } from '
|
2
|
+
import { SidebarItemProps } from '.';
|
3
3
|
export declare const Template: Story<SidebarItemProps>;
|
4
|
+
export declare const Normal: Story<SidebarItemProps>;
|
4
5
|
declare const SidebarItemStory: Meta<SidebarItemProps>;
|
5
6
|
export default SidebarItemStory;
|
@@ -1,14 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
import { paletteColor } from '../../../styles/types';
|
3
|
-
declare type statusType = 'normal' | 'active' | 'disabled';
|
4
|
-
export interface SidebarItemStyles extends colorsPalette {
|
5
|
-
hoverColor: paletteColor;
|
6
|
-
hoverBackground: paletteColor;
|
7
|
-
dropdownHover: paletteColor;
|
8
|
-
dropdownActive: paletteColor;
|
9
|
-
}
|
10
|
-
export declare type SidebarItemPalette = {
|
11
|
-
[key in statusType]: SidebarItemStyles;
|
12
|
-
};
|
1
|
+
import { SidebarItemPalette } from './types';
|
13
2
|
declare const sidebarItemPalette: SidebarItemPalette;
|
14
3
|
export default sidebarItemPalette;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { paletteColor } from '../../../styles/types';
|
3
|
+
import { SidebarItemStyles } from './types';
|
4
|
+
export interface WrapperProps {
|
5
|
+
isActive: boolean;
|
6
|
+
isDisabled: boolean;
|
7
|
+
customColor?: paletteColor;
|
8
|
+
}
|
9
|
+
export declare const sidebarItemHeight = 44;
|
10
|
+
export declare const Dropdown: import("styled-components").StyledComponent<({ className, content, forceOpen }: import("./types").SidebarItemDropdownProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
11
|
+
export declare const SidebarItemWrapper: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, SidebarItemStyles & WrapperProps, keyof SidebarItemStyles>;
|
12
|
+
export declare const Title: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
13
|
+
export declare const NoIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|