@fattureincloud/fic-design-system 0.4.31 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/dist/common/components/typography/Typography.d.ts +13 -0
- package/dist/common/components/typography/types.d.ts +21 -0
- package/dist/common/components/typography/utils.d.ts +2 -0
- package/dist/common/types/dateTypes.d.ts +5 -0
- package/dist/common/utils/dateUtils.d.ts +3 -0
- package/dist/common/utils/dsUtils.d.ts +8 -0
- package/dist/components/form/datepicker/hooks/useFormattedDate.d.ts +1 -1
- package/dist/components/form/datepicker/types.d.ts +0 -3
- package/dist/components/form/datepicker/utils.d.ts +1 -1
- package/dist/components/segmentButton/SegmentButton.d.ts +4 -0
- package/dist/components/segmentButton/index.d.ts +3 -0
- package/dist/components/segmentButton/segmentButton.stories.d.ts +5 -0
- package/dist/components/segmentButton/segmentButtonPalette.d.ts +3 -0
- package/dist/components/segmentButton/styled.d.ts +7 -0
- package/dist/components/segmentButton/types.d.ts +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/styles/theme.d.ts +2 -0
- package/dist/styles/types.d.ts +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { MapTextColorReturn, TextProps } from './types';
|
3
|
+
export declare const Body: ({ children, type, ...otherProps }: TextProps) => JSX.Element;
|
4
|
+
export declare const TextImpl: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, MapTextColorReturn & TextProps, "color">;
|
5
|
+
export declare const Title1: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
6
|
+
export declare const Title2: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
7
|
+
export declare const Title3: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
8
|
+
export declare const Title4: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
9
|
+
export declare const Title5: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
10
|
+
export declare const Title6: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
11
|
+
export declare const Headline: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
12
|
+
export declare const Caption: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
13
|
+
export declare const TableText: import("styled-components").StyledComponent<({ children, type, ...otherProps }: TextProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { DefaultTheme } from 'styled-components';
|
3
|
+
import { colors } from '../../../styles/types';
|
4
|
+
import { paletteColor } from '../../../styles/types';
|
5
|
+
export declare type TextProps = {
|
6
|
+
bold?: boolean;
|
7
|
+
centered?: boolean;
|
8
|
+
children: React.ReactNode | React.ReactNode[] | undefined | null;
|
9
|
+
clamp?: number;
|
10
|
+
className?: string;
|
11
|
+
color?: colors | paletteColor;
|
12
|
+
type?: 'date' | 'currency';
|
13
|
+
style?: React.CSSProperties;
|
14
|
+
};
|
15
|
+
export declare type MapTextColorParams = {
|
16
|
+
color?: TextProps['color'];
|
17
|
+
theme: DefaultTheme;
|
18
|
+
};
|
19
|
+
export declare type MapTextColorReturn = {
|
20
|
+
color: paletteColor | undefined;
|
21
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export declare const dateFormatsArray: [string, ...string[]];
|
2
|
+
export declare const timeFormat = "HH:mm:ss";
|
3
|
+
export declare const datetimeFormatsArray: [string, ...string[]];
|
4
|
+
export declare type DateFormat = typeof dateFormatsArray[number];
|
5
|
+
export declare type DateFormats = [DateFormat, ...DateFormat[]];
|
@@ -1,3 +1,11 @@
|
|
1
1
|
export declare const isNumber: (n: number | string | undefined) => boolean;
|
2
2
|
export declare const parseDimension: (d: number | string) => string;
|
3
3
|
export declare const generateRandomId: () => string;
|
4
|
+
export declare const stringToFloat: (n: string) => number;
|
5
|
+
export declare const isNumeric: (n: string) => boolean;
|
6
|
+
/**
|
7
|
+
* Convert a number into italian currency value with euro symbol
|
8
|
+
* @param {number} number
|
9
|
+
* @returns {string} string
|
10
|
+
*/
|
11
|
+
export declare const currency: (number: number | string) => string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
2
|
-
import { DateFormats } from '
|
2
|
+
import { DateFormats } from '../../../../common/types/dateTypes';
|
3
3
|
declare type ReturnType = [Date | null, Dispatch<SetStateAction<Date | null>>, string | null, string];
|
4
4
|
/**
|
5
5
|
* Hook to manage a date in string format
|
@@ -3,9 +3,6 @@ import { ReactDatePickerProps } from 'react-datepicker';
|
|
3
3
|
import { CommonFormTypes } from '../common/types';
|
4
4
|
import { LabelProps } from '../label';
|
5
5
|
export declare type DatePickerStatus = 'dayPicker' | 'monthPicker' | 'yearPicker';
|
6
|
-
export declare const dateFormatsArray: [string, ...string[]];
|
7
|
-
export declare type DateFormat = typeof dateFormatsArray[number];
|
8
|
-
export declare type DateFormats = [DateFormat, ...DateFormat[]];
|
9
6
|
export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactChild;
|
10
7
|
export declare type CustomButtonProps = {
|
11
8
|
text: string;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { DateFormats } from '
|
1
|
+
import { DateFormats } from '../../../common/types/dateTypes';
|
2
2
|
export declare const timeConversionOptions: Intl.DateTimeFormatOptions;
|
3
3
|
export declare const findFormat: (value: string | null | undefined, formats: DateFormats) => string;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
declare type Props = {
|
2
|
+
active: boolean;
|
3
|
+
};
|
4
|
+
export declare const SegmentButtonContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
5
|
+
export declare const Segment: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Props, never>;
|
6
|
+
export declare const Badge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Props, never>;
|
7
|
+
export {};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { paletteColor } from '../../styles/types';
|
2
|
+
import { IconProps } from '../icon';
|
3
|
+
export declare type SegmentButtonPalette = {
|
4
|
+
selected: {
|
5
|
+
background: paletteColor;
|
6
|
+
border: paletteColor;
|
7
|
+
primary: paletteColor;
|
8
|
+
secondary: paletteColor;
|
9
|
+
};
|
10
|
+
unselected: {
|
11
|
+
background: paletteColor;
|
12
|
+
border: paletteColor;
|
13
|
+
primary: paletteColor;
|
14
|
+
secondary: paletteColor;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export declare type Segment = {
|
18
|
+
counter?: number;
|
19
|
+
icon?: IconProps;
|
20
|
+
text: string;
|
21
|
+
};
|
22
|
+
export declare type SegmentButtonProps = {
|
23
|
+
onChange?: (i: number, s: Segment) => void;
|
24
|
+
preselected?: number;
|
25
|
+
segments: Segment[];
|
26
|
+
};
|
package/dist/index.d.ts
CHANGED
@@ -40,6 +40,7 @@ export { LabelPalette } from './components/form/label';
|
|
40
40
|
export { CustomSidebarItemProps, SidebarBadgeConfigProps, SidebarBadgeConfigType, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps, } from './components/layout';
|
41
41
|
export { Pagination, PaginationPalette, PaginationType } from './components/pagination';
|
42
42
|
export { ProgressBar, ProgressBarPalette, ProgressBarProps, ProgressBarType } from './components/progressbar';
|
43
|
+
export { SegmentButton, SegmentButtonPalette } from './components/segmentButton';
|
43
44
|
export { ShortcutTip, ShortcutTipProps, Tip, TipPalette, TipProps, TipType } from './components/tip';
|
44
45
|
export { bwColor } from './styles/types';
|
45
46
|
export { autocompleteYellow, paletteColor, Avatar, Button, ButtonProps, ButtonPalette, IconButton, IconButtonProps, IconButtonPalette, Icon, IconProps, IconPalette, iconColors, IconBackground, IconBackgroundPalette, Table, TableProps, TableData, useTableValues, Row, Column, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Checkbox, useCheckboxValue, CheckboxProps, CheckboxPalette, CheckboxStatus, Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, useSelectSimpleValue, isSimpleValue, simpleValue, CreatableSelectProps, useSelectValue, useSelectMultiValues, SelectPalette, SelectComponentsType, OptionType, PageEmptySet, Modal, ModalBody, ModalSearchable, Tooltip, TooltipProps, TooltipPalette, Accordion, Drawer, Radio, useRadioValue, RadioProps, RadioPalette, RadioStatus, RadioGroup, RadioGroupProps, RadioGroupOptions, InlineMessage, InlineMessageProps, InlineMessagePalette, InlineMessageType, Dropdown, DropdownItemProps, DropdownPalette, DropdownItemType, closeDropdownType, renderContentType, DropdownTabs, ScrollableTabs, TabsItem, Stepper, StepperProps, StepperPalette, ThemeProvider, Theme, Palette, GroupedList, ItemType, GroupType, Toast, ToastProps, toastPalette, ToastPalette, ToastType, ConfirmationModal, MicroTag, MicroTagProps, MicroTagPalette, Tag, TagProps, TagPalette, tagTypes, InputText, InputTextProps, InputTextPalette, UnitDropdownProps, DatePickerProps, DatePickerPalette, DatePicker, useFormattedDate, timeConversionOptions, InputHelper, InputHelperProps, InputHelperPalette, TextArea, TextAreaProps, TextAreaPalette, FileUploader, FileUploaderProps, FileUploaderPalette, FileRejection, fileUploaderOnDrop, Spinner, };
|