@fattureincloud/fic-design-system 0.4.21 → 0.4.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/form/datepicker/DatePicker.d.ts +9 -3
- package/dist/components/form/datepicker/DatePickerImpl.d.ts +2 -23
- package/dist/components/form/datepicker/components/hooks/useDatePickerHeaderShowLogic.d.ts +2 -2
- package/dist/components/form/datepicker/datePickerPalette.d.ts +5 -5
- package/dist/components/form/datepicker/datepicker.stories.d.ts +1 -1
- package/dist/components/form/datepicker/index.d.ts +5 -5
- package/dist/components/form/datepicker/styled.d.ts +3 -0
- package/dist/components/form/datepicker/types.d.ts +28 -3
- package/dist/components/form/inputText/types.d.ts +2 -0
- package/dist/components/tabs/common/Item.d.ts +1 -1
- package/dist/components/tabs/common/types.d.ts +2 -0
- package/dist/components/tooltip/Tooltip.d.ts +5 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import {
|
3
|
-
|
4
|
-
|
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
|
+
*/
|
5
11
|
declare const DatePicker: (props: DatePickerProps) => JSX.Element;
|
6
12
|
export default DatePicker;
|
@@ -1,25 +1,4 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
import { CommonFormTypes } from '../common/types';
|
4
|
-
export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactChild;
|
5
|
-
export declare type CustomButtonProps = {
|
6
|
-
text: string;
|
7
|
-
onClick: (props: RenderCustomFooterProps) => void;
|
8
|
-
};
|
9
|
-
export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
|
10
|
-
date: Date | null;
|
11
|
-
setDate: Dispatch<SetStateAction<Date | null>>;
|
12
|
-
allowMonthView?: boolean;
|
13
|
-
allowYearView?: boolean;
|
14
|
-
yearsDisplayed?: number;
|
15
|
-
hasTodayButton?: boolean;
|
16
|
-
customButtons?: CustomButtonProps[];
|
17
|
-
renderCustomFooter?: RenderCustomFooterType;
|
18
|
-
isPrefilled?: boolean;
|
19
|
-
}
|
20
|
-
export interface RenderCustomFooterProps extends DatePickerImplProps {
|
21
|
-
isOpen: boolean;
|
22
|
-
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
23
|
-
}
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { DatePickerImplProps } from './types';
|
24
3
|
declare const DatePickerImpl: (props: DatePickerImplProps) => JSX.Element;
|
25
4
|
export default DatePickerImpl;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { DatePickerStatus } from '../../types';
|
2
2
|
import { DatePickerHeaderProps } from '../DatePickerHeader';
|
3
3
|
interface ReturnType {
|
4
|
-
status:
|
4
|
+
status: DatePickerStatus;
|
5
5
|
title: string;
|
6
6
|
leftArrowOnClick: () => void;
|
7
7
|
leftArrowIsDisabled: boolean;
|
@@ -1,20 +1,20 @@
|
|
1
1
|
import { colorsPalette } from '../../../common/types/colorsPalette';
|
2
2
|
import { paletteColor } from '../../../styles/types';
|
3
|
-
declare type
|
3
|
+
declare type ItemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover' | 'disabled';
|
4
4
|
declare type DayPalette = {
|
5
5
|
borderRadius: string;
|
6
6
|
today: {
|
7
|
-
[k in
|
7
|
+
[k in Exclude<ItemStatus, 'disabled'>]: colorsPalette;
|
8
8
|
};
|
9
9
|
inMonth: {
|
10
|
-
[k in
|
10
|
+
[k in ItemStatus]: colorsPalette;
|
11
11
|
};
|
12
12
|
outMonth: {
|
13
|
-
[k in Exclude<
|
13
|
+
[k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
|
14
14
|
};
|
15
15
|
};
|
16
16
|
declare type ItemStatusPalette = {
|
17
|
-
[k in
|
17
|
+
[k in ItemStatus]: colorsPalette;
|
18
18
|
};
|
19
19
|
interface ItemPalette extends ItemStatusPalette {
|
20
20
|
borderRadius: string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
2
|
-
import { DatePickerProps } from './
|
2
|
+
import { DatePickerProps } from './types';
|
3
3
|
export declare const Normal: Story<DatePickerProps>;
|
4
4
|
export declare const WithCustomButton: Story<DatePickerProps>;
|
5
5
|
declare const DatePickerStories: Meta<DatePickerProps>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export {
|
1
|
+
export { default as DatePicker } from './DatePicker';
|
2
|
+
export { default as datePickerPalette, DatePickerPalette } from './datePickerPalette';
|
3
|
+
export { default as useFormattedDate } from './hooks/useFormattedDate';
|
4
|
+
export { DatePickerProps } from './types';
|
5
|
+
export { timeConversionOptions } from './utils';
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
export declare const FooterWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const SelectedOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -1,4 +1,29 @@
|
|
1
|
-
|
1
|
+
import { Dispatch, ReactChild, 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' | 'monthPicker' | 'yearPicker';
|
2
6
|
export declare const dateFormatsArray: [string, ...string[]];
|
3
|
-
export declare type
|
4
|
-
export declare type DateFormats = [
|
7
|
+
export declare type DateFormat = typeof dateFormatsArray[number];
|
8
|
+
export declare type DateFormats = [DateFormat, ...DateFormat[]];
|
9
|
+
export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactChild;
|
10
|
+
export declare type CustomButtonProps = {
|
11
|
+
text: string;
|
12
|
+
onClick: (props: RenderCustomFooterProps) => void;
|
13
|
+
};
|
14
|
+
export interface RenderCustomFooterProps extends DatePickerImplProps {
|
15
|
+
isOpen: boolean;
|
16
|
+
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
17
|
+
}
|
18
|
+
export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
|
19
|
+
date: Date | null;
|
20
|
+
setDate: Dispatch<SetStateAction<Date | null>>;
|
21
|
+
allowMonthView?: boolean;
|
22
|
+
allowYearView?: boolean;
|
23
|
+
yearsDisplayed?: number;
|
24
|
+
hasTodayButton?: boolean;
|
25
|
+
customButtons?: CustomButtonProps[];
|
26
|
+
renderCustomFooter?: RenderCustomFooterType;
|
27
|
+
isPrefilled?: boolean;
|
28
|
+
}
|
29
|
+
export declare type DatePickerProps = LabelProps & DatePickerImplProps;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Dispatch, InputHTMLAttributes, ReactText, SetStateAction } from 'react';
|
2
2
|
import { IconProps } from '../../icon';
|
3
|
+
import { TooltipProps } from '../../tooltip';
|
3
4
|
import { CommonFormTypes } from '../common/types';
|
4
5
|
import { UnitDropdownProps } from './components/UnitDropdown';
|
5
6
|
export declare const inputTypesArray: readonly ["password", "text", "number"];
|
@@ -14,4 +15,5 @@ export interface InputElementProps extends CommonFormTypes, Pick<InputHTMLAttrib
|
|
14
15
|
isPrefilled?: boolean;
|
15
16
|
isTransparent?: boolean;
|
16
17
|
unitDropdownProps?: UnitDropdownProps;
|
18
|
+
tooltip?: TooltipProps;
|
17
19
|
}
|
@@ -3,5 +3,5 @@ import { TabsItem } from './types';
|
|
3
3
|
interface Props extends TabsItem {
|
4
4
|
tabRef?: () => RefObject<HTMLDivElement>;
|
5
5
|
}
|
6
|
-
declare const Item: ({ active, handleClick, tabRef, text }: Props) => JSX.Element;
|
6
|
+
declare const Item: ({ active, handleClick, tabRef, text, tooltip }: Props) => JSX.Element;
|
7
7
|
export default Item;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { TooltipProps } from '../../tooltip';
|
2
3
|
export interface TabsProps {
|
3
4
|
className?: string;
|
4
5
|
tabs: TabsItem[];
|
@@ -9,4 +10,5 @@ export interface TabsItem {
|
|
9
10
|
text: string | JSX.Element;
|
10
11
|
active?: boolean;
|
11
12
|
handleClick?: () => void;
|
13
|
+
tooltip?: TooltipProps;
|
12
14
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { BasePlacement } from '@popperjs/core';
|
2
2
|
import { MouseEventHandler, ReactNode } from 'react';
|
3
3
|
import { MessageProps } from './components/Message';
|
4
|
+
export declare const defaultTooltipProps: TooltipProps;
|
4
5
|
export interface TooltipProps extends MessageProps {
|
5
6
|
message: string | JSX.Element;
|
6
7
|
className?: string;
|
@@ -8,6 +9,9 @@ export interface TooltipProps extends MessageProps {
|
|
8
9
|
placement: BasePlacement;
|
9
10
|
onMouseEnter?: MouseEventHandler;
|
10
11
|
onMouseLeave?: MouseEventHandler;
|
12
|
+
showAlways?: boolean;
|
13
|
+
hideAfterSeconds?: number;
|
14
|
+
callbackAfterTimeout?: () => void;
|
11
15
|
}
|
12
|
-
declare const Tooltip: ({ message, placement, className, children, type, onMouseEnter, onMouseLeave, }: TooltipProps) => JSX.Element;
|
16
|
+
declare const Tooltip: ({ message, placement, className, children, type, onMouseEnter, onMouseLeave, showAlways, hideAfterSeconds, callbackAfterTimeout, }: TooltipProps) => JSX.Element;
|
13
17
|
export default Tooltip;
|