@fattureincloud/fic-design-system 0.19.21 → 0.19.22
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/README.md +26 -1
- package/dist/common/components/Label.d.ts +3 -0
- package/dist/common/components/iframeClickBlocker/IframeClickBlocker.d.ts +7 -0
- package/dist/common/components/iframeClickBlocker/iframeClickBlocker.stories.d.ts +6 -0
- package/dist/common/components/iframeClickBlocker/index.d.ts +1 -0
- package/dist/common/components/iframeClickBlocker/styled.d.ts +1 -0
- package/dist/common/types/label.d.ts +12 -0
- package/dist/common/utils/label.d.ts +5 -0
- package/dist/components/accordion/styled.d.ts +5 -0
- package/dist/components/accordions/accordions.d.ts +9 -0
- package/dist/components/accordions/accordions.stories.d.ts +8 -0
- package/dist/components/accordions/components/styledAccordionWrapper.d.ts +1 -0
- package/dist/components/accordions/index.d.ts +2 -0
- package/dist/components/accordions/types.d.ts +19 -0
- package/dist/components/chart/stories/styled.d.ts +2 -20
- package/dist/components/form/datepicker/components/MonthPicker.d.ts +5 -0
- package/dist/components/form/datepickerNew/DatePicker.d.ts +12 -0
- package/dist/components/form/datepickerNew/DatePickerImpl.d.ts +4 -0
- package/dist/components/form/datepickerNew/NewDatePicker.d.ts +12 -0
- package/dist/components/form/datepickerNew/components/CustomButton.d.ts +8 -0
- package/dist/components/form/datepickerNew/components/DatePickerDay.d.ts +3 -0
- package/dist/components/form/datepickerNew/components/DatePickerHeader.d.ts +8 -0
- package/dist/components/form/datepickerNew/components/YearPicker.d.ts +7 -0
- package/dist/components/form/datepickerNew/components/hooks/useDatePickerHeaderShowLogic.d.ts +15 -0
- package/dist/components/form/datepickerNew/components/styled.d.ts +5 -0
- package/dist/components/form/datepickerNew/datePickerPalette.d.ts +33 -0
- package/dist/components/form/datepickerNew/datepicker.stories.d.ts +18 -0
- package/dist/components/form/datepickerNew/hooks/useFormattedDate.d.ts +12 -0
- package/dist/components/form/datepickerNew/hooks/useYearsList.d.ts +2 -0
- package/dist/components/form/datepickerNew/index.d.ts +5 -0
- package/dist/components/form/datepickerNew/newDatePickerPalette.d.ts +33 -0
- package/dist/components/form/datepickerNew/styled.d.ts +6 -0
- package/dist/components/form/datepickerNew/types.d.ts +31 -0
- package/dist/components/form/datepickerNew/utils.d.ts +3 -0
- package/dist/components/form/inputText/InputText.d.ts +3 -0
- package/dist/components/form/inputText/components/InputElement.d.ts +4 -1
- package/dist/components/form/inputText/types.d.ts +2 -1
- package/dist/components/newTable_v2/components/body/Body.d.ts +2 -2
- package/dist/components/newTable_v2/components/cell/hooks/useCellValues.d.ts +0 -1
- package/dist/components/newTable_v2/components/cell/styled.d.ts +1 -11
- package/dist/components/newTable_v2/components/footer/footerCell/styled.d.ts +1 -10
- package/dist/components/newTable_v2/components/footer/styled.d.ts +0 -5
- package/dist/components/newTable_v2/components/header/Header.d.ts +2 -1
- package/dist/components/newTable_v2/components/header/actionsHeader/styled.d.ts +1 -0
- package/dist/components/newTable_v2/components/header/headerCell/styled.d.ts +1 -11
- package/dist/components/newTable_v2/components/header/hooks/useHeaderValues.d.ts +0 -1
- package/dist/components/newTable_v2/components/header/styled.d.ts +4 -1
- package/dist/components/newTable_v2/constants.d.ts +1 -1
- package/dist/components/newTable_v2/index.d.ts +1 -1
- package/dist/components/newTable_v2/styled.d.ts +1 -3
- package/dist/components/newTable_v2/types/columnsTypes.d.ts +0 -1
- package/dist/components/newTable_v2/types/features/actions.d.ts +1 -1
- package/dist/components/newTable_v2/types/tableTypes.d.ts +1 -1
- package/dist/components/newTable_v2/utils.d.ts +0 -11
- package/dist/components/tableV3/components/cell/styled.d.ts +1 -0
- package/dist/components/verticalTab/VerticalTab.d.ts +4 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/VerticalTabSelector.d.ts +13 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/index.d.ts +5 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/styled.d.ts +11 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/types.d.ts +37 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/verticalTabSelector.stories.d.ts +5 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/verticalTabSelectorPalette.d.ts +3 -0
- package/dist/components/verticalTab/index.d.ts +2 -0
- package/dist/components/verticalTab/styled.d.ts +6 -0
- package/dist/components/verticalTab/types.d.ts +6 -0
- package/dist/components/verticalTab/verticalTab.stories.d.ts +8 -0
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/ficFeatures/components/featureCategory/IconSelector.d.ts +0 -10
- package/dist/components/ficFeatures/configExample.d.ts +0 -3
- package/dist/components/ficFeatures/icons.d.ts +0 -6
- package/dist/components/ficFeatures/styled.d.ts +0 -2
- package/dist/components/inlineMessage/const.d.ts +0 -2
- package/dist/components/tableV3/hooks/usePagination.d.ts +0 -8
- /package/dist/components/accordion/{Accordion.d.ts → accordion.d.ts} +0 -0
package/README.md
CHANGED
@@ -11,8 +11,33 @@ Create a `.npmrc` file in the design-system directory and paste the following li
|
|
11
11
|
|
12
12
|
Make sure to replace `<YOUR_FONTAWESOME_LICENSE>` with the real license. Without this step you won't be able to install the FontAwesome Pro dependencies.
|
13
13
|
|
14
|
-
##
|
14
|
+
## Quick guide
|
15
15
|
|
16
|
+
### Installation
|
17
|
+
```
|
18
|
+
yarn
|
19
|
+
```
|
20
|
+
### Local development
|
21
|
+
```
|
22
|
+
yarn storybook
|
23
|
+
```
|
24
|
+
### Try local changes in other projects (with yalc)
|
25
|
+
```
|
26
|
+
yarn build && yalc publish && yalc push --> run in design-sistem repo
|
27
|
+
yalc add @fattureincloud/fic-design-system --> run in repo where design-system is installed
|
28
|
+
```
|
29
|
+
### How to publish
|
30
|
+
- On branch `devel`
|
31
|
+
- Bump package.json version
|
32
|
+
- Update CHANGELOG.md
|
33
|
+
- Run `yarn build`
|
34
|
+
- Run `npm publish`
|
35
|
+
- Commit and push to devel
|
36
|
+
- Merge to master
|
37
|
+
- Remember to close released tickets on Jira and to send a message on the #fic-design-system Slack channel
|
38
|
+
|
39
|
+
|
40
|
+
## Development
|
16
41
|
```
|
17
42
|
yarn storybook
|
18
43
|
```
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Meta } from '@storybook/react';
|
3
|
+
import { DropdownProps } from 'components/dropdown/types';
|
4
|
+
export declare const DropdownWithIflameClickBlocker: () => JSX.Element;
|
5
|
+
declare const DropdownStories: Meta<DropdownProps>;
|
6
|
+
export default DropdownStories;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { IframeClickBlocker } from './IframeClickBlocker';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const FullScreenDiv: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { paletteColor } from '../../styles/types';
|
2
|
+
export interface LabelProps {
|
3
|
+
large?: boolean;
|
4
|
+
disabled?: boolean;
|
5
|
+
hasError: boolean;
|
6
|
+
}
|
7
|
+
export interface MappedLabelProps {
|
8
|
+
fontSize: string;
|
9
|
+
cursor: string;
|
10
|
+
color: paletteColor;
|
11
|
+
opacity: number;
|
12
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export declare const TitleContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
export declare const Title: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const ActionIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
4
|
+
export declare const HeaderElement: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
5
|
+
export declare const Body: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React, { Component } from 'react';
|
2
|
+
import { TAccordion, UnstyledAccordionProps, UnstyledAccordionState } from './types';
|
3
|
+
export declare class UnstyledAccordion extends Component<UnstyledAccordionProps, UnstyledAccordionState> {
|
4
|
+
constructor(props: UnstyledAccordionProps);
|
5
|
+
handleOpenAccordion: () => void;
|
6
|
+
render(): React.JSX.Element;
|
7
|
+
}
|
8
|
+
declare const Accordion: TAccordion;
|
9
|
+
export default Accordion;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Meta } from '@storybook/react';
|
2
|
+
import React, { ComponentProps } from 'react';
|
3
|
+
import { TAccordion } from './types';
|
4
|
+
export declare const Normal: () => React.JSX.Element;
|
5
|
+
export declare const NormalThemed: () => React.JSX.Element;
|
6
|
+
export declare const ShowingBodyAtFirstRender: () => React.JSX.Element;
|
7
|
+
declare const AccordionStories: Meta<ComponentProps<TAccordion>>;
|
8
|
+
export default AccordionStories;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const StyledAccordionWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
interface Props {
|
3
|
+
title?: string;
|
4
|
+
renderTitle?: () => JSX.Element;
|
5
|
+
renderBody: () => JSX.Element;
|
6
|
+
renderLateralActions?: JSX.Element;
|
7
|
+
lateralActions?: Array<{
|
8
|
+
icon: JSX.Element;
|
9
|
+
action: () => void;
|
10
|
+
}>;
|
11
|
+
showBodyAtFirstRender?: boolean;
|
12
|
+
}
|
13
|
+
export declare type TAccordion = React.FunctionComponent<Props>;
|
14
|
+
export interface UnstyledAccordionProps extends Props {
|
15
|
+
}
|
16
|
+
export interface UnstyledAccordionState {
|
17
|
+
show: boolean;
|
18
|
+
}
|
19
|
+
export {};
|
@@ -1,22 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
export declare const DropdownText: import("styled-components").StyledComponent<import("
|
3
|
-
|
4
|
-
centered?: boolean | undefined;
|
5
|
-
children: import("react").ReactNode | import("react").ReactNode[];
|
6
|
-
clamp?: number | undefined;
|
7
|
-
className?: string | undefined;
|
8
|
-
color?: string | undefined;
|
9
|
-
type?: "date" | "currency" | undefined;
|
10
|
-
style?: import("react").CSSProperties | undefined;
|
11
|
-
} & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
12
|
-
export declare const DropdownParagraph: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
|
13
|
-
bold?: boolean | undefined;
|
14
|
-
centered?: boolean | undefined;
|
15
|
-
children: import("react").ReactNode | import("react").ReactNode[];
|
16
|
-
clamp?: number | undefined;
|
17
|
-
className?: string | undefined;
|
18
|
-
color?: string | undefined;
|
19
|
-
type?: "date" | "currency" | undefined;
|
20
|
-
style?: import("react").CSSProperties | undefined;
|
21
|
-
} & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
export declare const DropdownText: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const DropdownParagraph: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
22
4
|
export declare const Divider: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
|
3
|
+
declare type Props = Pick<ReactDatePickerCustomHeaderProps, 'changeMonth' | 'date'>;
|
4
|
+
declare const MonthPicker: ({ changeMonth, date }: Props) => JSX.Element;
|
5
|
+
export default MonthPicker;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { DatePickerProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {Date | null} date selected date
|
6
|
+
* @param {function} placeholderText text to show as placeholder
|
7
|
+
* @param {string|ReactNode} minDate minimum selectable date
|
8
|
+
* @param {string|ReactNode} maxDate maximum selectable date
|
9
|
+
* @others ReactDatePickerProps
|
10
|
+
*/
|
11
|
+
declare const DatePicker: (props: DatePickerProps) => JSX.Element;
|
12
|
+
export default DatePicker;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { DatePickerProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {Date | null} date selected date
|
6
|
+
* @param {function} placeholderText text to show as placeholder
|
7
|
+
* @param {string|ReactNode} minDate minimum selectable date
|
8
|
+
* @param {string|ReactNode} maxDate maximum selectable date
|
9
|
+
* @others ReactDatePickerProps
|
10
|
+
*/
|
11
|
+
declare const NewDatePicker: (props: DatePickerProps) => JSX.Element;
|
12
|
+
export default NewDatePicker;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
|
3
|
+
export interface DatePickerHeaderProps extends ReactDatePickerCustomHeaderProps {
|
4
|
+
yearsDisplayed: number;
|
5
|
+
setHideMonth: (value: boolean) => void;
|
6
|
+
}
|
7
|
+
declare const DatePickerHeader: (props: DatePickerHeaderProps) => JSX.Element;
|
8
|
+
export default DatePickerHeader;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
|
3
|
+
interface Props extends Pick<ReactDatePickerCustomHeaderProps, 'date' | 'changeYear'> {
|
4
|
+
yearsDisplayed: number;
|
5
|
+
}
|
6
|
+
declare const YearPicker: ({ date, changeYear, yearsDisplayed }: Props) => JSX.Element;
|
7
|
+
export default YearPicker;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { DatePickerStatus } from '../../types';
|
2
|
+
import { DatePickerHeaderProps } from '../DatePickerHeader';
|
3
|
+
interface ReturnType {
|
4
|
+
status: DatePickerStatus;
|
5
|
+
title: string;
|
6
|
+
leftArrowOnClick: () => void;
|
7
|
+
leftArrowIsDisabled: boolean;
|
8
|
+
rightArrowOnClick: () => void;
|
9
|
+
rightArrowIsDisabled: boolean;
|
10
|
+
onBottomArrowClick: () => void;
|
11
|
+
showBottomArrow: boolean;
|
12
|
+
showLRArrows: boolean;
|
13
|
+
}
|
14
|
+
declare const useDatePickerHeaderShowLogic: ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, nextYearButtonDisabled, prevYearButtonDisabled, decreaseYear, increaseYear, }: DatePickerHeaderProps) => ReturnType;
|
15
|
+
export default useDatePickerHeaderShowLogic;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { colorsPalette } from '../../../common/types/colorsPalette';
|
2
|
+
import { paletteColor } from '../../../styles/types';
|
3
|
+
declare type ItemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover' | 'disabled';
|
4
|
+
declare type DayPalette = {
|
5
|
+
borderRadius: string;
|
6
|
+
today: {
|
7
|
+
[k in Exclude<ItemStatus, 'disabled'>]: colorsPalette;
|
8
|
+
};
|
9
|
+
inMonth: {
|
10
|
+
[k in ItemStatus]: colorsPalette;
|
11
|
+
};
|
12
|
+
outMonth: {
|
13
|
+
[k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
declare type ItemStatusPalette = {
|
17
|
+
[k in ItemStatus]: colorsPalette;
|
18
|
+
};
|
19
|
+
interface ItemPalette extends ItemStatusPalette {
|
20
|
+
borderRadius: string;
|
21
|
+
}
|
22
|
+
interface DaysNamesPalette {
|
23
|
+
color: paletteColor;
|
24
|
+
}
|
25
|
+
export interface DatePickerPalette {
|
26
|
+
background: paletteColor;
|
27
|
+
weekDaysNames: DaysNamesPalette;
|
28
|
+
days: DayPalette;
|
29
|
+
item: ItemPalette;
|
30
|
+
defaultYearsDisplayed: number;
|
31
|
+
}
|
32
|
+
declare const datePickerPalette: DatePickerPalette;
|
33
|
+
export default datePickerPalette;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
2
|
+
import { DatePickerProps } from './types';
|
3
|
+
export declare const Normal: Story<DatePickerProps & {
|
4
|
+
renderWrapper: boolean;
|
5
|
+
containerWidth: number;
|
6
|
+
containerHeight: number;
|
7
|
+
}>;
|
8
|
+
export declare const WithCustomButton: Story<DatePickerProps & {
|
9
|
+
renderWrapper: boolean;
|
10
|
+
containerWidth: number;
|
11
|
+
containerHeight: number;
|
12
|
+
}>;
|
13
|
+
declare const DatePickerStories: Meta<DatePickerProps & {
|
14
|
+
renderWrapper: boolean;
|
15
|
+
containerWidth: number;
|
16
|
+
containerHeight: number;
|
17
|
+
}>;
|
18
|
+
export default DatePickerStories;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { DateFormats } from '../../../../common/types/dateTypes';
|
3
|
+
declare type ReturnType = [Date | null, Dispatch<SetStateAction<Date | null>>, string | null, string];
|
4
|
+
/**
|
5
|
+
* Hook to manage a date in string format
|
6
|
+
* @param {string|null} initialValue Initial string value representing a date
|
7
|
+
* @param {DateFormats} allowedFormats Array of allowed formats, the hook will try to parse the initial value using this formats
|
8
|
+
* @param {dateFormat} outputFormat The string value returned by the hook will be formatted with this format
|
9
|
+
* @returns {[Date|null, function, string|null, string]} Returns an array with a Date object, the function to update it, a string representation of the date (formatted using the third parameter of the hook) and the currently used format
|
10
|
+
*/
|
11
|
+
declare const useFormattedDate: (initialValue?: string | null | undefined, allowedFormats?: DateFormats | null | undefined, outputFormat?: string | undefined) => ReturnType;
|
12
|
+
export default useFormattedDate;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export { default as NewDatePicker } from './NewDatePicker';
|
2
|
+
export { default as newDatePickerPalette, DatePickerPalette } from './newDatePickerPalette';
|
3
|
+
export { default as useFormattedDate } from './hooks/useFormattedDate';
|
4
|
+
export { DatePickerProps as NewDatepickerProps } from './types';
|
5
|
+
export { timeConversionOptions } from './utils';
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { colorsPalette } from '../../../common/types/colorsPalette';
|
2
|
+
import { paletteColor } from '../../../styles/types';
|
3
|
+
declare type ItemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover' | 'disabled';
|
4
|
+
declare type DayPalette = {
|
5
|
+
borderRadius: string;
|
6
|
+
today: {
|
7
|
+
[k in Exclude<ItemStatus, 'disabled'>]: colorsPalette;
|
8
|
+
};
|
9
|
+
inMonth: {
|
10
|
+
[k in ItemStatus]: colorsPalette;
|
11
|
+
};
|
12
|
+
outMonth: {
|
13
|
+
[k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
declare type ItemStatusPalette = {
|
17
|
+
[k in ItemStatus]: colorsPalette;
|
18
|
+
};
|
19
|
+
interface ItemPalette extends ItemStatusPalette {
|
20
|
+
borderRadius: string;
|
21
|
+
}
|
22
|
+
interface DaysNamesPalette {
|
23
|
+
color: paletteColor;
|
24
|
+
}
|
25
|
+
export interface DatePickerPalette {
|
26
|
+
background: paletteColor;
|
27
|
+
weekDaysNames: DaysNamesPalette;
|
28
|
+
days: DayPalette;
|
29
|
+
item: ItemPalette;
|
30
|
+
defaultYearsDisplayed: number;
|
31
|
+
}
|
32
|
+
declare const datePickerPalette: DatePickerPalette;
|
33
|
+
export default datePickerPalette;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
2
|
+
fitBiggerContainer?: boolean | undefined;
|
3
|
+
hideMonth: boolean;
|
4
|
+
}, never>;
|
5
|
+
export declare const FooterWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
6
|
+
export declare const SelectedOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
2
|
+
import { ReactDatePickerProps } from 'react-datepicker';
|
3
|
+
import { CommonFormTypes } from '../common/types';
|
4
|
+
import { LabelProps } from '../label';
|
5
|
+
export declare type DatePickerStatus = 'dayPicker' | 'yearPicker';
|
6
|
+
export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactNode;
|
7
|
+
export declare type CustomButtonProps = {
|
8
|
+
text: string;
|
9
|
+
onClick: (props: RenderCustomFooterProps) => void;
|
10
|
+
};
|
11
|
+
export interface RenderCustomFooterProps extends DatePickerImplProps {
|
12
|
+
isOpen: boolean;
|
13
|
+
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
14
|
+
}
|
15
|
+
export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
|
16
|
+
date?: Date | null;
|
17
|
+
startDate?: Date | null;
|
18
|
+
endDate?: Date | null;
|
19
|
+
setDate: Dispatch<SetStateAction<Date | null>>;
|
20
|
+
yearsDisplayed?: number;
|
21
|
+
hasTodayButton?: boolean;
|
22
|
+
customButtons?: CustomButtonProps[];
|
23
|
+
renderCustomFooter?: RenderCustomFooterType;
|
24
|
+
isPrefilled?: boolean;
|
25
|
+
onChangeManually?: (date: Date | null) => void;
|
26
|
+
inline?: boolean;
|
27
|
+
fitBiggerContainer?: boolean;
|
28
|
+
includeDates?: Date[];
|
29
|
+
excludeDates?: Date[];
|
30
|
+
}
|
31
|
+
export declare type DatePickerProps = LabelProps & DatePickerImplProps;
|
@@ -10,6 +10,8 @@ declare const _default: React.ForwardRefExoticComponent<import("../label").Label
|
|
10
10
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
11
11
|
onKeyPress?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
12
12
|
onKeyUp?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
13
|
+
width?: string | number | undefined;
|
14
|
+
maxLength?: number | undefined;
|
13
15
|
readOnly?: boolean | undefined;
|
14
16
|
required?: boolean | undefined;
|
15
17
|
} & {
|
@@ -27,5 +29,6 @@ declare const _default: React.ForwardRefExoticComponent<import("../label").Label
|
|
27
29
|
unitDropdownProps?: import(".").UnitDropdownProps | undefined;
|
28
30
|
value?: string | number | null | undefined;
|
29
31
|
autoFilled?: boolean | undefined;
|
32
|
+
maxWidth?: string | number | undefined;
|
30
33
|
} & React.RefAttributes<HTMLInputElement>>;
|
31
34
|
export default _default;
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { BoxedInputWrapperProps } from '../../common/styles';
|
3
3
|
import { InputElementProps } from '../types';
|
4
4
|
declare type inputRef = HTMLInputElement | null;
|
5
|
-
export declare type InputTextWrapperProps = Pick<InputElementProps, 'disabled' | 'status' | 'isPrefilled' | 'isTransparent' | 'autoFilled'>;
|
5
|
+
export declare type InputTextWrapperProps = Pick<InputElementProps, 'disabled' | 'status' | 'isPrefilled' | 'isTransparent' | 'autoFilled' | 'maxWidth' | 'width'>;
|
6
6
|
export declare type InputTextStyles = Omit<BoxedInputWrapperProps, 'status'>;
|
7
7
|
declare const _default: React.ForwardRefExoticComponent<import("../../common/types").CommonFormTypes & {
|
8
8
|
className?: string | undefined;
|
@@ -15,6 +15,8 @@ declare const _default: React.ForwardRefExoticComponent<import("../../common/typ
|
|
15
15
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
16
16
|
onKeyPress?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
17
17
|
onKeyUp?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
18
|
+
width?: string | number | undefined;
|
19
|
+
maxLength?: number | undefined;
|
18
20
|
readOnly?: boolean | undefined;
|
19
21
|
required?: boolean | undefined;
|
20
22
|
} & {
|
@@ -32,5 +34,6 @@ declare const _default: React.ForwardRefExoticComponent<import("../../common/typ
|
|
32
34
|
unitDropdownProps?: import("./types").UnitDropdownProps | undefined;
|
33
35
|
value?: string | number | null | undefined;
|
34
36
|
autoFilled?: boolean | undefined;
|
37
|
+
maxWidth?: string | number | undefined;
|
35
38
|
} & React.RefAttributes<inputRef>>;
|
36
39
|
export default _default;
|
@@ -7,7 +7,7 @@ import { OptionType } from '../select';
|
|
7
7
|
import { CustomStylesType } from '../select/hooks/useSelectThemeStyles';
|
8
8
|
import { UnitDropdownProps } from './components/types';
|
9
9
|
export declare const inputTypesArray: readonly ["password", "text", "number", "code", "telephone"];
|
10
|
-
declare type HTMLInputProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'autoFocus' | 'className' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'onKeyDown' | 'onKeyPress' | 'onKeyUp' | 'required' | 'style' | 'readOnly'>;
|
10
|
+
declare type HTMLInputProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'autoFocus' | 'className' | 'name' | 'onBlur' | 'onChange' | 'onFocus' | 'onKeyDown' | 'onKeyPress' | 'onKeyUp' | 'required' | 'style' | 'readOnly' | 'maxLength' | 'width'>;
|
11
11
|
export declare type InputElementProps = CommonFormTypes & HTMLInputProps & {
|
12
12
|
actionIcon?: IconProps;
|
13
13
|
autoComplete?: string;
|
@@ -23,6 +23,7 @@ export declare type InputElementProps = CommonFormTypes & HTMLInputProps & {
|
|
23
23
|
unitDropdownProps?: UnitDropdownProps;
|
24
24
|
value?: number | string | null;
|
25
25
|
autoFilled?: boolean;
|
26
|
+
maxWidth?: number | string | undefined;
|
26
27
|
};
|
27
28
|
export declare type InputCodeProps = LabelProps & CommonFormTypes & Omit<HTMLInputProps, 'onChange'> & {
|
28
29
|
allowLetters?: boolean;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Row as RowType } from '@tanstack/react-table';
|
3
3
|
import { TableProps } from '../../types';
|
4
|
-
interface BodyProps<T> extends Pick<TableProps<T>, 'isLoading' | 'isRowDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip'> {
|
4
|
+
interface BodyProps<T> extends Pick<TableProps<T>, 'bodyHeight' | 'isLoading' | 'isRowDisabled' | 'isRowHighlighted' | 'onRowClick' | 'rowActions' | 'rowHighlightColor' | 'rowSelection' | 'rowTooltip'> {
|
5
5
|
pageIndex: number;
|
6
6
|
rows: RowType<T>[];
|
7
7
|
}
|
8
|
-
declare const Body: <T>({ isLoading, isRowDisabled, isRowHighlighted, onRowClick, pageIndex, rowActions, rowHighlightColor, rowSelection, rowTooltip, rows, }: BodyProps<T>) => JSX.Element;
|
8
|
+
declare const Body: <T>({ bodyHeight, isLoading, isRowDisabled, isRowHighlighted, onRowClick, pageIndex, rowActions, rowHighlightColor, rowSelection, rowTooltip, rows, }: BodyProps<T>) => JSX.Element;
|
9
9
|
export default Body;
|
@@ -1,19 +1,9 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
declare type DSTdProps = {
|
3
|
-
fixedWidth?: number;
|
4
2
|
justifyContent: 'center' | 'left' | 'right';
|
5
3
|
maxWidth?: number;
|
6
4
|
minWidth?: number;
|
7
5
|
};
|
8
6
|
export declare const BaseTd: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme, {}, never>;
|
9
|
-
export declare const DSTd: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme,
|
10
|
-
ref?: ((instance: HTMLTableDataCellElement | null) => void) | import("react").RefObject<HTMLTableDataCellElement> | null | undefined;
|
11
|
-
} & {
|
12
|
-
minWidth?: number | undefined;
|
13
|
-
maxWidth?: number | undefined;
|
14
|
-
fixedWidth?: number | undefined;
|
15
|
-
}> & {
|
16
|
-
[others: string]: any;
|
17
|
-
} & DSTdProps, string | number>;
|
7
|
+
export declare const DSTd: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme, DSTdProps, never>;
|
18
8
|
export declare const CutText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
19
9
|
export {};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ColumnPinningPosition } from '@tanstack/react-table';
|
3
2
|
import { RowSize } from '../../../types';
|
4
3
|
declare type DSThProps = {
|
@@ -7,13 +6,5 @@ declare type DSThProps = {
|
|
7
6
|
minWidth?: number;
|
8
7
|
maxWidth?: number;
|
9
8
|
};
|
10
|
-
export declare const DSThFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme,
|
11
|
-
ref?: ((instance: HTMLTableHeaderCellElement | null) => void) | import("react").RefObject<HTMLTableHeaderCellElement> | null | undefined;
|
12
|
-
} & {
|
13
|
-
minWidth?: number | undefined;
|
14
|
-
maxWidth?: number | undefined;
|
15
|
-
fixedWidth?: number | undefined;
|
16
|
-
}> & {
|
17
|
-
[others: string]: any;
|
18
|
-
} & DSThProps, string | number>;
|
9
|
+
export declare const DSThFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, DSThProps, never>;
|
19
10
|
export {};
|
@@ -4,9 +4,4 @@ declare type DSTHeadProps = {
|
|
4
4
|
footerSize?: RowSize;
|
5
5
|
};
|
6
6
|
export declare const DSTrFooter: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, DSTHeadProps, never>;
|
7
|
-
export declare const CheckboxFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, {}, never>;
|
8
|
-
declare type ActionsFooterProps = {
|
9
|
-
actionColumnWidth: number;
|
10
|
-
};
|
11
|
-
export declare const ActionsFooter: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, ActionsFooterProps, never>;
|
12
7
|
export {};
|
@@ -4,9 +4,10 @@ import { TableProps } from '../../types';
|
|
4
4
|
declare type HeaderProps<T> = Pick<TableProps<T>, 'headerSize' | 'onSort'> & {
|
5
5
|
actionsHeader?: string | JSX.Element;
|
6
6
|
headerGroups: HeaderGroup<T>[];
|
7
|
+
isSelectable?: boolean;
|
7
8
|
onRowSelection?: (e: string[]) => void;
|
8
9
|
rowSelection?: string[];
|
9
10
|
table: Table<T>;
|
10
11
|
};
|
11
|
-
declare const Header: <T>({ actionsHeader, headerGroups, headerSize, onRowSelection, onSort, rowSelection, table, }: HeaderProps<T>) => JSX.Element;
|
12
|
+
declare const Header: <T>({ actionsHeader, headerGroups, headerSize, isSelectable, onRowSelection, onSort, rowSelection, table, }: HeaderProps<T>) => JSX.Element;
|
12
13
|
export default Header;
|
@@ -1,19 +1,9 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ColumnPinningPosition } from '@tanstack/react-table';
|
3
2
|
declare type DSThProps = {
|
4
|
-
fixedWidth?: number;
|
5
3
|
isPinned: ColumnPinningPosition;
|
6
4
|
minWidth?: number;
|
7
5
|
maxWidth?: number;
|
8
6
|
sortable: boolean;
|
9
7
|
};
|
10
|
-
export declare const DSThHeader: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme,
|
11
|
-
ref?: ((instance: HTMLTableHeaderCellElement | null) => void) | import("react").RefObject<HTMLTableHeaderCellElement> | null | undefined;
|
12
|
-
} & {
|
13
|
-
minWidth?: number | undefined;
|
14
|
-
maxWidth?: number | undefined;
|
15
|
-
fixedWidth?: number | undefined;
|
16
|
-
}> & {
|
17
|
-
[others: string]: any;
|
18
|
-
} & DSThProps, string | number>;
|
8
|
+
export declare const DSThHeader: import("styled-components").StyledComponent<"th", import("styled-components").DefaultTheme, DSThProps, never>;
|
19
9
|
export {};
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import { RowSize } from '../../types';
|
2
|
-
|
2
|
+
declare type DSTHeadProps = {
|
3
|
+
scrollbarPadding: number;
|
4
|
+
};
|
5
|
+
export declare const DSTHead: import("styled-components").StyledComponent<"thead", import("styled-components").DefaultTheme, DSTHeadProps, never>;
|
3
6
|
declare type DSTrHeaderProps = {
|
4
7
|
headerSize?: RowSize;
|
5
8
|
};
|