@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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.5.0 - 18/10/2022
4
+
5
+ ### 🚀 Added
6
+
7
+ - A completely new typography
8
+ - SegmentButton
9
+
10
+ ### 💅 Enhancement
11
+
12
+ - Datepicker input controls
13
+
3
14
  ## v0.4.31 - 11/10/2022
4
15
 
5
16
  ### 🚀 Added
@@ -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,2 @@
1
+ import { MapTextColorParams, MapTextColorReturn } from './types';
2
+ export declare const mapTextColor: ({ color, theme }: MapTextColorParams) => MapTextColorReturn;
@@ -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[]];
@@ -0,0 +1,3 @@
1
+ export declare const parseDate: (date: string) => Date | null;
2
+ export declare const format: (date: string, format: string) => string;
3
+ export declare const formatITDate: (date: string) => string;
@@ -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 '../types';
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 './types';
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,4 @@
1
+ /// <reference types="react" />
2
+ import { SegmentButtonProps } from './types';
3
+ declare const SegmentButton: ({ onChange, preselected, segments }: SegmentButtonProps) => JSX.Element;
4
+ export default SegmentButton;
@@ -0,0 +1,3 @@
1
+ export { default as segmentButtonPalette } from './segmentButtonPalette';
2
+ export { SegmentButtonPalette } from './types';
3
+ export { default as SegmentButton } from './SegmentButton';
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { SegmentButtonProps } from './types';
3
+ export declare const Standard: Story<SegmentButtonProps>;
4
+ declare const SegmentButtonStories: Meta<SegmentButtonProps>;
5
+ export default SegmentButtonStories;
@@ -0,0 +1,3 @@
1
+ import { SegmentButtonPalette } from './types';
2
+ declare const segmentButtonPalette: SegmentButtonPalette;
3
+ export default segmentButtonPalette;
@@ -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, };