@fattureincloud/fic-design-system 0.15.0 → 0.15.1

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.
@@ -1,9 +1,13 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { ProgressBarProps } from './types';
3
3
  /**
4
4
  * Component Props:
5
- * @param {ProgressBarType} color Used to set the colors of the component
6
- * @param {number} percentage Numeric value used to set the progress bar percentage value
5
+ * @param {string} [className] - Used to style the component with styled-components or a CSS
6
+ * @param {number} percentage - Numeric value used to set the progress bar percentage value
7
+ * @param {ProgressBarSize} [size] - The dimension of the progress bar, default MEDIUM
8
+ * @param {Record<number, ComponentType>} [steps] - Choose the type and color of the progress bar based on the percentage
9
+ * @param {CSSProperties} [style] - CSS object used to style the component
10
+ * @param {ComponentType} [type] - Choose the type and color of the progress bar
7
11
  */
8
- declare const ProgressBar: (props: ProgressBarProps) => React.JSX.Element;
12
+ declare const ProgressBar: ({ percentage, size, steps, type, ...rest }: ProgressBarProps) => JSX.Element;
9
13
  export default ProgressBar;
@@ -1,3 +1,3 @@
1
1
  export { default as ProgressBar } from './ProgressBar';
2
- export { ProgressBarProps, ProgressBarPalette, ProgressBarType } from './types';
2
+ export { ProgressBarProps, ProgressBarPalette, ProgressBarSize } from './types';
3
3
  export { default as progressBarPalette } from './progressBarPalette';
@@ -1,10 +1,6 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
- import React, { ComponentProps } from 'react';
3
- import { ProgressBar } from '.';
4
- import { ProgressBarProps } from './';
2
+ import { ComponentProps } from 'react';
3
+ import { ProgressBar, ProgressBarProps } from '.';
5
4
  export declare const Template: Story<ProgressBarProps>;
6
- export declare const Editable: () => React.JSX.Element;
7
- export declare const Autocomplete: () => React.JSX.Element;
8
- export declare const AllColors: () => React.JSX.Element;
9
5
  declare const ProgressBarStories: Meta<ComponentProps<typeof ProgressBar>>;
10
6
  export default ProgressBarStories;
@@ -1,3 +1,9 @@
1
- import { ProgressBarProps } from './types';
2
- export declare const ProgressContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const ProgressionBar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ProgressBarProps, never>;
1
+ import { ComponentType } from '../../common/types';
2
+ import { ProgressBarSize } from './types';
3
+ declare type BarProps = {
4
+ percentage: number;
5
+ pbsize: ProgressBarSize;
6
+ type: ComponentType;
7
+ };
8
+ export declare const Bar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, BarProps, never>;
9
+ export {};
@@ -1,17 +1,30 @@
1
+ import { CSSProperties } from 'react';
2
+ import { ComponentType } from '../../common/types';
1
3
  import { paletteColor } from '../../styles/types';
2
- export declare enum ProgressBarType {
3
- GREY = "grey",
4
- RED = "red",
5
- BLUE = "blue",
6
- YELLOW = "yellow",
7
- GREEN = "green"
4
+ export declare enum ProgressBarSize {
5
+ SMALL = 4,
6
+ MEDIUM = 8,
7
+ LARGE = 12
8
8
  }
9
- export interface ProgressBarProps {
10
- color?: ProgressBarType;
9
+ declare type CommonProps = {
10
+ className?: string;
11
11
  percentage: number;
12
- }
13
- export declare type ProgressBarPalette = {
14
- [key in ProgressBarType]: {
15
- backgroundColor: paletteColor;
16
- };
12
+ size?: ProgressBarSize;
13
+ style?: CSSProperties;
14
+ };
15
+ declare type FixedTypeProps = CommonProps & {
16
+ steps?: never;
17
+ type: ComponentType;
18
+ };
19
+ declare type AutomaticTypeProps = CommonProps & {
20
+ steps: Record<number, ComponentType>;
21
+ type?: never;
22
+ };
23
+ export declare type ProgressBarProps = FixedTypeProps | AutomaticTypeProps;
24
+ declare type ProgressBarPaletteConfig = {
25
+ backgroundColor: paletteColor;
26
+ borderColor: paletteColor;
27
+ barColor: paletteColor;
17
28
  };
29
+ export declare type ProgressBarPalette = Record<ComponentType, ProgressBarPaletteConfig>;
30
+ export {};
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ export * from './components/newTable_v2';
41
41
  export { Column, ManualPagination, OnSelectionChange, OnSort, Row, RowActions, Table, TableData, TablePalette, TableProps, useTableValues, } from './components/oldTable';
42
42
  export { PageEmptySet } from './components/pageEmptySet';
43
43
  export { Pagination, PaginationPalette, PaginationType } from './components/pagination';
44
- export { ProgressBar, ProgressBarPalette, ProgressBarProps, ProgressBarType } from './components/progressbar';
44
+ export * from './components/progressbar';
45
45
  export { Segment, SegmentButton, SegmentButtonPalette, SegmentButtonProps } from './components/segmentButton';
46
46
  export { Stepper, StepperPalette, StepperProps } from './components/stepper';
47
47
  export { Switch } from './components/switch';