@fattureincloud/fic-design-system 0.5.0 → 0.5.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.5.2 - 26/10/2022
4
+
5
+ ### 🐛 Bug Fix
6
+
7
+ - Avatar placeholder behavior
8
+
9
+ ## v0.5.1 - 25/10/2022
10
+
11
+ ### 🐛 Bug Fix
12
+
13
+ - DatePicker format
14
+ - InlineMessage onActionClick
15
+ - Confirmation modal buttons position
16
+
17
+ ### 💅 Enhancement
18
+
19
+ - Avatar refactor
20
+
3
21
  ## v0.5.0 - 18/10/2022
4
22
 
5
23
  ### 🚀 Added
@@ -0,0 +1 @@
1
+ export { Body, Caption, Headline, Title1, Title2, Title3, Title4, Title5, Title6 } from './Typography';
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { AvatarProps } from './types';
3
- declare const Avatar: import("styled-components").StyledComponent<(props: AvatarProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
3
+ declare const Avatar: ({ backgroundColor, className, icon, image, onClick, placeholder, randomColor, size, style, text, textColor, }: AvatarProps) => JSX.Element;
4
4
  export default Avatar;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { Meta } from '@storybook/react';
3
3
  import { AvatarProps } from './types';
4
- export declare const Generic: () => JSX.Element;
5
4
  export declare const Initials: () => JSX.Element;
6
- export declare const Placeholder: () => JSX.Element;
5
+ export declare const RandomColor: () => JSX.Element;
7
6
  export declare const Image: () => JSX.Element;
7
+ export declare const Icon: () => JSX.Element;
8
8
  declare const AvatarStories: Meta<AvatarProps>;
9
9
  export default AvatarStories;
@@ -1,2 +1,2 @@
1
- import Avatar from './Avatar';
2
- export { Avatar };
1
+ export { default as Avatar } from './Avatar';
2
+ export { AvatarProps } from './types';
@@ -0,0 +1,3 @@
1
+ export declare const AvatarContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<import("./types").AvatarProps, "size" | "backgroundColor" | "image" | "placeholder" | "onClick" | "textColor"> & {
2
+ textLenght: number;
3
+ }, never>;
@@ -1,8 +1,20 @@
1
- export interface AvatarProps {
1
+ import { MouseEvent } from 'react';
2
+ import { CSSObject } from 'styled-components';
3
+ import { paletteColor } from '../../styles/types';
4
+ import { IconProps } from '../icon';
5
+ export declare type AvatarProps = {
6
+ backgroundColor?: paletteColor;
2
7
  className?: string;
3
- initials?: string;
4
- size: AvatarAllowedSizes;
5
- placeholder?: string;
8
+ icon?: IconProps;
6
9
  image?: string;
7
- }
8
- export declare type AvatarAllowedSizes = 'xs' | 's' | 'm' | 'l';
10
+ onClick?: (e: MouseEvent) => void;
11
+ placeholder?: string;
12
+ randomColor?: boolean;
13
+ size: number;
14
+ style?: CSSObject;
15
+ text?: string;
16
+ textColor?: paletteColor;
17
+ };
18
+ export declare type AvatarContainerProps = Pick<AvatarProps, 'backgroundColor' | 'image' | 'onClick' | 'placeholder' | 'size' | 'textColor'> & {
19
+ textLenght: number;
20
+ };
@@ -0,0 +1,4 @@
1
+ import { DefaultTheme } from 'styled-components';
2
+ import { paletteColor } from '../../styles/types';
3
+ export declare const scalingFactor: (l: number) => number;
4
+ export declare const pseudoRandomColor: (text: string | undefined, theme: DefaultTheme) => paletteColor;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { BadgeProps } from './';
3
3
  /**
4
4
  * Component Props:
@@ -10,4 +10,4 @@ import { BadgeProps } from './';
10
10
  * @param {IconProps} rightIcon Configuration of the right icon
11
11
  * @param {function} handleRightIconClick Callback called on right icon click
12
12
  */
13
- export declare const Badge: (props: BadgeProps) => JSX.Element;
13
+ export declare const Badge: React.FC<BadgeProps>;
@@ -1,6 +1,5 @@
1
1
  import { Placement } from '@popperjs/core/lib/enums';
2
2
  import React, { CSSProperties, MouseEventHandler } from 'react';
3
- import { AvatarAllowedSizes } from '../avatar/types';
4
3
  import { IconProps } from '../icon';
5
4
  export declare type TitleProps = {
6
5
  text: string;
@@ -42,7 +41,7 @@ export interface DropdownItemProps {
42
41
  export interface UserListItemProps {
43
42
  img?: string;
44
43
  placeholder?: string;
45
- avatarSize?: AvatarAllowedSizes;
44
+ avatarSize?: number;
46
45
  noText?: string;
47
46
  text?: string;
48
47
  renderText?: JSX.Element;
@@ -18,5 +18,5 @@ import { InlineMessageProps } from './types';
18
18
  * @param {'medium' | 'large'} size fake size support
19
19
  *
20
20
  */
21
- declare const InlineMessage: (props: InlineMessageProps) => JSX.Element;
21
+ declare const InlineMessage: ({ onActionClick, ...props }: InlineMessageProps) => JSX.Element;
22
22
  export default InlineMessage;
@@ -1,3 +1,3 @@
1
1
  export { default as segmentButtonPalette } from './segmentButtonPalette';
2
- export { SegmentButtonPalette } from './types';
2
+ export { SegmentButtonPalette, SegmentButtonProps, Segment } from './types';
3
3
  export { default as SegmentButton } from './SegmentButton';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import Spinner from './common/components/Spinner';
2
+ export { Body, Caption, Headline, Title1, Title2, Title3, Title4, Title5, Title6 } from './common/components/typography';
2
3
  import { Accordion } from './components/accordions';
3
4
  import { Avatar } from './components/avatar';
4
5
  import { Button, ButtonPalette, ButtonProps, IconButton, IconButtonPalette, IconButtonProps } from './components/buttons';
@@ -40,7 +41,7 @@ export { LabelPalette } from './components/form/label';
40
41
  export { CustomSidebarItemProps, SidebarBadgeConfigProps, SidebarBadgeConfigType, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps, } from './components/layout';
41
42
  export { Pagination, PaginationPalette, PaginationType } from './components/pagination';
42
43
  export { ProgressBar, ProgressBarPalette, ProgressBarProps, ProgressBarType } from './components/progressbar';
43
- export { SegmentButton, SegmentButtonPalette } from './components/segmentButton';
44
+ export { Segment, SegmentButton, SegmentButtonPalette, SegmentButtonProps } from './components/segmentButton';
44
45
  export { ShortcutTip, ShortcutTipProps, Tip, TipPalette, TipProps, TipType } from './components/tip';
45
46
  export { bwColor } from './styles/types';
46
47
  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, };