@fattureincloud/fic-design-system 0.4.27 → 0.4.29-new-table

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. package/dist/components/badge/Badge.d.ts +11 -1
  2. package/dist/components/badge/badge.stories.d.ts +3 -2
  3. package/dist/components/badge/badgePalette.d.ts +3 -0
  4. package/dist/components/badge/index.d.ts +3 -3
  5. package/dist/components/badge/types.d.ts +17 -1
  6. package/dist/components/banner/Banner.d.ts +10 -9
  7. package/dist/components/banner/banner.stories.d.ts +3 -4
  8. package/dist/components/banner/bannerPalette.d.ts +3 -0
  9. package/dist/components/banner/index.d.ts +3 -2
  10. package/dist/components/banner/styled.d.ts +5 -0
  11. package/dist/components/banner/types.d.ts +23 -0
  12. package/dist/components/chip/Chip.d.ts +13 -0
  13. package/dist/components/chip/chip.stories.d.ts +6 -0
  14. package/dist/components/chip/chipPalette.d.ts +3 -0
  15. package/dist/components/chip/index.d.ts +3 -0
  16. package/dist/components/chip/styled.d.ts +6 -0
  17. package/dist/components/chip/types.d.ts +25 -0
  18. package/dist/components/dropdown/DropdownImpl.d.ts +1 -1
  19. package/dist/components/dropdown/types.d.ts +1 -0
  20. package/dist/components/floatingBadge/NotificationBadge.d.ts +9 -0
  21. package/dist/components/floatingBadge/floatingBadge.d.ts +7 -1
  22. package/dist/components/floatingBadge/floatingBadge.stories.d.ts +2 -1
  23. package/dist/components/floatingBadge/floatingBadgePalette.d.ts +3 -0
  24. package/dist/components/floatingBadge/index.d.ts +4 -2
  25. package/dist/components/floatingBadge/types.d.ts +24 -3
  26. package/dist/components/floatingBadge/withBadge.d.ts +5 -0
  27. package/dist/components/form/datepicker/StyledDatePicker.d.ts +1 -0
  28. package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +13 -0
  29. package/dist/components/form/label/Label.d.ts +9 -8
  30. package/dist/components/form/label/index.d.ts +3 -2
  31. package/dist/components/form/label/labelPalette.d.ts +3 -0
  32. package/dist/components/form/label/styled.d.ts +2 -0
  33. package/dist/components/form/label/types.d.ts +21 -0
  34. package/dist/components/form/label/utils.d.ts +9 -0
  35. package/dist/components/form/radioGroup/index.d.ts +1 -1
  36. package/dist/components/form/radioGroup/types.d.ts +3 -2
  37. package/dist/components/form/select/components/Placeholder.d.ts +4 -0
  38. package/dist/components/form/textArea/TextArea.d.ts +3 -3
  39. package/dist/components/form/textArea/components/TextAreaElement.d.ts +2 -2
  40. package/dist/components/layout/index.d.ts +1 -2
  41. package/dist/components/layout/sidebarItem/SidebarItem.d.ts +19 -26
  42. package/dist/components/layout/sidebarItem/components/SidebarItemDropdown.d.ts +2 -7
  43. package/dist/components/layout/sidebarItem/index.d.ts +5 -5
  44. package/dist/components/layout/sidebarItem/sidebarItem.stories.d.ts +2 -1
  45. package/dist/components/layout/sidebarItem/sidebarItemPalette.d.ts +1 -12
  46. package/dist/components/layout/sidebarItem/styled.d.ts +13 -0
  47. package/dist/components/layout/sidebarItem/types.d.ts +58 -2
  48. package/dist/components/layout/sidebarItem/utils.d.ts +2 -2
  49. package/dist/components/newTable/Table.d.ts +32 -0
  50. package/dist/components/newTable/components/action/favorite/Favorite.d.ts +14 -0
  51. package/dist/components/newTable/components/action/favorite/index.d.ts +1 -0
  52. package/dist/components/newTable/components/action/favorite/styled.d.ts +4 -0
  53. package/dist/components/newTable/components/action/settings/ColumnsSettings/ColumnItem/ColumnItem.d.ts +8 -0
  54. package/dist/components/newTable/components/action/settings/ColumnsSettings/ColumnItem/styled.d.ts +4 -0
  55. package/dist/components/newTable/components/action/settings/ColumnsSettings/ColumnsSettings.d.ts +8 -0
  56. package/dist/components/newTable/components/action/settings/ColumnsSettings/DraggableContent/DraggableContent.d.ts +7 -0
  57. package/dist/components/newTable/components/action/settings/ColumnsSettings/index.d.ts +2 -0
  58. package/dist/components/newTable/components/action/settings/ColumnsSettings/styled.d.ts +4 -0
  59. package/dist/components/newTable/components/action/settings/DropdownSettings/DropdownSettings.d.ts +7 -0
  60. package/dist/components/newTable/components/action/settings/DropdownSettings/index.d.ts +1 -0
  61. package/dist/components/newTable/components/action/settings/DropdownSettings/styled.d.ts +4 -0
  62. package/dist/components/newTable/components/action/settings/RowHeightSettings/RowHeightSettings.d.ts +10 -0
  63. package/dist/components/newTable/components/action/settings/RowHeightSettings/index.d.ts +1 -0
  64. package/dist/components/newTable/components/action/settings/RowHeightSettings/styled.d.ts +2 -0
  65. package/dist/components/newTable/components/action/settings/Settings.d.ts +8 -0
  66. package/dist/components/newTable/components/action/settings/hooks/index.d.ts +2 -0
  67. package/dist/components/newTable/components/action/settings/hooks/useColumnValues.d.ts +8 -0
  68. package/dist/components/newTable/components/action/settings/hooks/useDropdownSettingsValues.d.ts +13 -0
  69. package/dist/components/newTable/components/action/settings/index.d.ts +1 -0
  70. package/dist/components/newTable/components/action/settings/styled.d.ts +2 -0
  71. package/dist/components/newTable/components/action/toggle/Toggle.d.ts +14 -0
  72. package/dist/components/newTable/components/action/toggle/constants.d.ts +3 -0
  73. package/dist/components/newTable/components/action/toggle/index.d.ts +1 -0
  74. package/dist/components/newTable/components/action/toggle/styled.d.ts +5 -0
  75. package/dist/components/newTable/components/body/Body.d.ts +9 -0
  76. package/dist/components/newTable/components/bulkBar/BulkBar.d.ts +9 -0
  77. package/dist/components/newTable/components/bulkBar/styled.d.ts +10 -0
  78. package/dist/components/newTable/components/cell/Cell.d.ts +12 -0
  79. package/dist/components/newTable/components/cell/customActionCell/CustomActionCell.d.ts +12 -0
  80. package/dist/components/newTable/components/cell/customActionCell/DropdownActionCell.d.ts +10 -0
  81. package/dist/components/newTable/components/cell/customActionCell/PrimaryActionCell.d.ts +9 -0
  82. package/dist/components/newTable/components/cell/customActionCell/index.d.ts +3 -0
  83. package/dist/components/newTable/components/cell/customActionCell/styled.d.ts +4 -0
  84. package/dist/components/newTable/components/cell/customCell/CustomCell.d.ts +11 -0
  85. package/dist/components/newTable/components/cell/customCell/CustomInput.d.ts +9 -0
  86. package/dist/components/newTable/components/cell/customCell/TextAreaPopup.d.ts +9 -0
  87. package/dist/components/newTable/components/cell/customCell/constants.d.ts +1 -0
  88. package/dist/components/newTable/components/cell/customCell/index.d.ts +1 -0
  89. package/dist/components/newTable/components/cell/customCell/styled.d.ts +7 -0
  90. package/dist/components/newTable/components/cell/hooks/index.d.ts +1 -0
  91. package/dist/components/newTable/components/cell/hooks/useCellValues.d.ts +16 -0
  92. package/dist/components/newTable/components/cell/loadingCell/LoadingCell.d.ts +7 -0
  93. package/dist/components/newTable/components/cell/loadingCell/index.d.ts +1 -0
  94. package/dist/components/newTable/components/cell/styled.d.ts +20 -0
  95. package/dist/components/newTable/components/footer/Footer.d.ts +7 -0
  96. package/dist/components/newTable/components/header/Header.d.ts +10 -0
  97. package/dist/components/newTable/components/header/headerCell/ActionHeaderCell.d.ts +8 -0
  98. package/dist/components/newTable/components/header/headerCell/HeaderCell.d.ts +12 -0
  99. package/dist/components/newTable/components/header/headerCell/styled.d.ts +9 -0
  100. package/dist/components/newTable/components/header/hooks/index.d.ts +2 -0
  101. package/dist/components/newTable/components/header/hooks/useActionHeaderValues.d.ts +16 -0
  102. package/dist/components/newTable/components/header/hooks/useHeaderValues.d.ts +14 -0
  103. package/dist/components/newTable/components/row/Row.d.ts +10 -0
  104. package/dist/components/newTable/components/row/styled.d.ts +6 -0
  105. package/dist/components/newTable/components/utils.d.ts +10 -0
  106. package/dist/components/newTable/constants.d.ts +2 -0
  107. package/dist/components/newTable/hooks/useColumnPinning.d.ts +8 -0
  108. package/dist/components/newTable/hooks/usePagination.d.ts +9 -0
  109. package/dist/components/newTable/index.d.ts +2 -0
  110. package/dist/components/newTable/providers/TableProvider/TableProvider.d.ts +5 -0
  111. package/dist/components/newTable/providers/TableProvider/index.d.ts +3 -0
  112. package/dist/components/newTable/providers/TableProvider/types.d.ts +10 -0
  113. package/dist/components/newTable/stories/actions.d.ts +4 -0
  114. package/dist/components/newTable/stories/columns.d.ts +3 -0
  115. package/dist/components/newTable/stories/data.d.ts +2 -0
  116. package/dist/components/newTable/stories/styled.d.ts +1 -0
  117. package/dist/components/newTable/stories/types.d.ts +9 -0
  118. package/dist/components/newTable/styled.d.ts +9 -0
  119. package/dist/components/newTable/table.stories.d.ts +6 -0
  120. package/dist/components/newTable/types.d.ts +170 -0
  121. package/dist/components/newTable/utils.d.ts +8 -0
  122. package/dist/components/pagination/Pagination.d.ts +15 -0
  123. package/dist/components/pagination/index.d.ts +3 -3
  124. package/dist/components/pagination/pagination.stories.d.ts +3 -3
  125. package/dist/components/pagination/paginationPalette.d.ts +3 -0
  126. package/dist/components/pagination/styled.d.ts +4 -0
  127. package/dist/components/pagination/types.d.ts +18 -0
  128. package/dist/components/progressbar/index.d.ts +3 -2
  129. package/dist/components/progressbar/progressBarPalette.d.ts +3 -0
  130. package/dist/components/progressbar/progressbar.d.ts +9 -8
  131. package/dist/components/progressbar/progressbar.stories.d.ts +6 -4
  132. package/dist/components/progressbar/styled.d.ts +3 -0
  133. package/dist/components/progressbar/types.d.ts +15 -9
  134. package/dist/components/table/components/ActionsCell.d.ts +10 -0
  135. package/dist/components/table/components/SortIndicator.d.ts +6 -0
  136. package/dist/components/table/components/TableBody.d.ts +14 -0
  137. package/dist/components/table/components/TableFoot.d.ts +2 -0
  138. package/dist/components/table/components/TableHeader.d.ts +7 -0
  139. package/dist/components/table/components/tableBody/TableBodyLoader.d.ts +7 -0
  140. package/dist/components/table/components/tableBody/styled.d.ts +3 -0
  141. package/dist/components/tip/index.d.ts +4 -3
  142. package/dist/components/tip/shortcutTip.d.ts +12 -1
  143. package/dist/components/tip/styled.d.ts +5 -0
  144. package/dist/components/tip/tip.d.ts +11 -1
  145. package/dist/components/tip/tip.stories.d.ts +4 -5
  146. package/dist/components/tip/tipPalette.d.ts +3 -0
  147. package/dist/components/tip/types.d.ts +24 -6
  148. package/dist/components/toast/components/{ToastContent.d.ts → toastContent.d.ts} +0 -0
  149. package/dist/components/toast/{Toast.d.ts → toast.d.ts} +0 -0
  150. package/dist/components/tooltip/Tooltip.d.ts +3 -1
  151. package/dist/index.d.ts +12 -11
  152. package/dist/index.esm.js +26 -5
  153. package/dist/index.esm.js.map +1 -1
  154. package/dist/index.js +25 -4
  155. package/dist/index.js.map +1 -1
  156. package/dist/styles/theme.d.ts +16 -0
  157. package/package.json +2 -1
  158. package/CHANGELOG.md +0 -508
@@ -1,3 +1,13 @@
1
1
  /// <reference types="react" />
2
- import { BadgeProps } from './types';
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 './types';
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>;
@@ -0,0 +1,3 @@
1
+ import { BadgePalette } from './';
2
+ declare const badgePalette: BadgePalette;
3
+ export default badgePalette;
@@ -1,3 +1,3 @@
1
- import { Badge } from './Badge';
2
- import { BadgeProps } from './types';
3
- export { Badge, BadgeProps };
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
- color?: 'red' | 'green';
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 { IconProps } from '../icon';
3
- export declare type bannerColorType = 'red' | 'blue' | 'yellow' | 'green' | 'grey' | undefined;
4
- export interface BannerProps {
5
- color?: bannerColorType;
6
- onClose?: () => void;
7
- content: string | JSX.Element;
8
- icon?: IconProps;
9
- }
10
- declare const Banner: ({ color, content, icon, onClose }: BannerProps) => JSX.Element;
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
- /// <reference types="react" />
2
- import { Meta } from '@storybook/react';
3
- import { BannerProps } from './Banner';
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;
@@ -0,0 +1,3 @@
1
+ import { BannerPalette } from '.';
2
+ declare const bannerPalette: BannerPalette;
3
+ export default bannerPalette;
@@ -1,2 +1,3 @@
1
- import Banner, { BannerProps } from './Banner';
2
- export { Banner, BannerProps };
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
+ import { Meta, Story } from '@storybook/react';
2
+ import { ChipProps } from './types';
3
+ export declare const Template: Story<ChipProps>;
4
+ export declare const WithIcon: Story<ChipProps>;
5
+ declare const ChipStories: Meta<ChipProps>;
6
+ export default ChipStories;
@@ -0,0 +1,3 @@
1
+ import { ChipPalette } from '.';
2
+ declare const chipPalette: ChipPalette;
3
+ export default chipPalette;
@@ -0,0 +1,3 @@
1
+ export { ChipPalette, ChipProps, ChipType } from './types';
2
+ export { default as Chip } from './Chip';
3
+ export { default as chipPalette } from './chipPalette';
@@ -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
- export declare const FloatingBadge: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, FloatingBadgeProps, never>;
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>;
@@ -0,0 +1,3 @@
1
+ import { FloatingBadgePalette } from './types';
2
+ declare const floatingBadgePalette: FloatingBadgePalette;
3
+ export default floatingBadgePalette;
@@ -1,2 +1,4 @@
1
- import WithBadge from './withBadge';
2
- export { WithBadge };
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
- export interface FloatingBadgeProps {
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
- export interface LabelProps extends WrapperProps {
3
- label?: string | JSX.Element;
4
- }
5
- declare const Label: ({ label, disabled, required }: LabelProps) => JSX.Element | null;
6
- interface WrapperProps {
7
- disabled?: boolean;
8
- required?: boolean;
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
- import Label, { LabelProps } from './Label';
2
- export { LabelProps, Label };
1
+ export { default as Label } from './Label';
2
+ export { LabelProps, LabelType, LabelPalette } from './types';
3
+ export { default as labelPalette } from './labelPalette';
@@ -0,0 +1,3 @@
1
+ import { LabelPalette } from './';
2
+ declare const labelPalette: LabelPalette;
3
+ export default labelPalette;
@@ -0,0 +1,2 @@
1
+ import { WrapperProps } from './types';
2
+ export declare const LabelWrapper: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, WrapperProps, never>;
@@ -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/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: Omit<RadioProps, 'value' | 'onClick' | 'helper'>[];
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
- /// <reference types="react" />
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 TextArea: (props: TextAreaProps) => JSX.Element;
6
- export default TextArea;
5
+ declare const _default: React.ForwardRefExoticComponent<LabelProps & TextAreaElementProps & React.RefAttributes<HTMLTextAreaElement>>;
6
+ export default _default;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { BoxedInputWrapperProps } from '../../common/styles';
3
3
  import { TextAreaElementProps } from '../types';
4
- declare const TextAreaElement: ({ autoFocus, onBlur, onChange, value, placeholder, disabled, name, onKeyPress, status, onKeyDown, onKeyUp, onFocus, className, setValue, initialHeight, maxLength, isResizable, showCounter, isPrefilled, }: TextAreaElementProps) => JSX.Element;
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
- import { CustomSidebarItemProps, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps } from './sidebarItem';
2
- export { SidebarItem, SidebarItemProps, sidebarItemHeight, SidebarItemPalette, CustomSidebarItemProps };
1
+ export { CustomSidebarItemProps, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps, SidebarBadgeConfigType, SidebarBadgeConfigProps, } from './sidebarItem';
@@ -1,28 +1,21 @@
1
- import { MouseEventHandler } from 'react';
2
- import { paletteColor } from '../../../styles/types';
3
- import { DropdownItemProps } from '../../dropdown';
4
- import { IconProps } from './../../icon';
5
- import { CustomSidebarItemProps } from './types';
6
- export interface SidebarItemProps {
7
- icon?: IconProps;
8
- title: string;
9
- isDisabled?: boolean;
10
- isHidden?: boolean;
11
- onClick?: MouseEventHandler;
12
- isOpen?: boolean;
13
- caretVisible?: boolean;
14
- dropdownContent?: DropdownItemProps[];
15
- className?: string;
16
- isActive?: boolean;
17
- forceOpenDropdown?: boolean;
18
- customProps?: CustomSidebarItemProps;
19
- href?: string;
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 { DropdownItemProps } from '../../../dropdown';
3
- interface Props {
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
- import SidebarItemDropdown from './components/SidebarItemDropdown';
2
- import SidebarItem, { sidebarItemHeight, SidebarItemProps } from './SidebarItem';
3
- import sidebarItemPalette, { SidebarItemPalette } from './sidebarItemPalette';
4
- import { CustomSidebarItemProps } from './types';
5
- export { SidebarItem, SidebarItemProps, sidebarItemHeight, sidebarItemPalette, SidebarItemPalette, SidebarItemDropdown, CustomSidebarItemProps, };
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 './SidebarItem';
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 { colorsPalette } from '../../../common/types/colorsPalette';
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>;