@fattureincloud/fic-design-system 0.7.52 → 0.7.53

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.
@@ -1,9 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
3
3
  export interface DatePickerHeaderProps extends ReactDatePickerCustomHeaderProps {
4
- allowMonthView: boolean;
5
- allowYearView: boolean;
6
4
  yearsDisplayed: number;
5
+ setHideMonth: (value: boolean) => void;
7
6
  }
8
7
  declare const DatePickerHeader: (props: DatePickerHeaderProps) => JSX.Element;
9
8
  export default DatePickerHeader;
@@ -11,5 +11,5 @@ interface ReturnType {
11
11
  showBottomArrow: boolean;
12
12
  showLRArrows: boolean;
13
13
  }
14
- declare const useDatePickerHeaderShowLogic: ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, nextYearButtonDisabled, prevYearButtonDisabled, decreaseYear, increaseYear, allowYearView, allowMonthView, }: DatePickerHeaderProps) => ReturnType;
14
+ declare const useDatePickerHeaderShowLogic: ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, nextYearButtonDisabled, prevYearButtonDisabled, decreaseYear, increaseYear, }: DatePickerHeaderProps) => ReturnType;
15
15
  export default useDatePickerHeaderShowLogic;
@@ -1,4 +1,4 @@
1
- import { colorsPalette } from '../../../common/types/colorsPalette';
1
+ import { colorsPalette } from '../../../common/types';
2
2
  import { paletteColor } from '../../../styles/types';
3
3
  declare type ItemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover' | 'disabled';
4
4
  declare type DayPalette = {
@@ -12,6 +12,9 @@ declare type DayPalette = {
12
12
  outMonth: {
13
13
  [k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
14
14
  };
15
+ weekend: {
16
+ [k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
17
+ };
15
18
  };
16
19
  declare type ItemStatusPalette = {
17
20
  [k in ItemStatus]: colorsPalette;
@@ -1,6 +1,17 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
2
  import { DatePickerProps } from './types';
3
- export declare const Normal: Story<DatePickerProps>;
4
- export declare const WithCustomButton: Story<DatePickerProps>;
5
- declare const DatePickerStories: Meta<DatePickerProps>;
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
+ }>;
6
17
  export default DatePickerStories;
@@ -1,3 +1,6 @@
1
- export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ fitBiggerContainer?: boolean | undefined;
3
+ hideMonth: boolean;
4
+ }, never>;
2
5
  export declare const FooterWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
6
  export declare const SelectedOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -2,7 +2,7 @@ import { Dispatch, ReactNode, SetStateAction } from 'react';
2
2
  import { ReactDatePickerProps } from 'react-datepicker';
3
3
  import { CommonFormTypes } from '../common/types';
4
4
  import { LabelProps } from '../label';
5
- export declare type DatePickerStatus = 'dayPicker' | 'monthPicker' | 'yearPicker';
5
+ export declare type DatePickerStatus = 'dayPicker' | 'yearPicker';
6
6
  export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactNode;
7
7
  export declare type CustomButtonProps = {
8
8
  text: string;
@@ -13,15 +13,19 @@ export interface RenderCustomFooterProps extends DatePickerImplProps {
13
13
  setIsOpen: Dispatch<SetStateAction<boolean>>;
14
14
  }
15
15
  export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
16
- date: Date | null;
16
+ date?: Date | null;
17
+ startDate?: Date | null;
18
+ endDate?: Date | null;
17
19
  setDate: Dispatch<SetStateAction<Date | null>>;
18
- allowMonthView?: boolean;
19
- allowYearView?: boolean;
20
20
  yearsDisplayed?: number;
21
21
  hasTodayButton?: boolean;
22
22
  customButtons?: CustomButtonProps[];
23
23
  renderCustomFooter?: RenderCustomFooterType;
24
24
  isPrefilled?: boolean;
25
25
  onChangeManually?: (date: Date | null) => void;
26
+ inline?: boolean;
27
+ fitBiggerContainer?: boolean;
28
+ includeDates?: Date[];
29
+ excludeDates?: Date[];
26
30
  }
27
31
  export declare type DatePickerProps = LabelProps & DatePickerImplProps;
@@ -15,7 +15,7 @@ import { TableProps } from './types';
15
15
  * @param {boolean} sortDescFirst If true, all sorts will default to descending as their first toggle state.
16
16
  * @param {boolean} enableSettings Used to enable table settings
17
17
  * @param {SettingsDropdownConfig} settingsDropdownConfig Define dropdown settings configuration
18
- * @param {RowActions<T>} rowActions Used to define primary and dropdown actions
18
+ * @param {RowActions<T> | ((row?: Row<T>) => RowActions<T>)} rowActions Used to define primary and dropdown actions
19
19
  * @param {BulkAction<T>} bulkActions Used to define bulk bar actions
20
20
  * @param {boolean} isLoading Loading table state
21
21
  * @param {AllSelectedCTA} allSelectedCTA clickable text that appears when all rows are selected
@@ -10,7 +10,7 @@ interface CellValues<T> {
10
10
  onActionChange?: (id: string) => void;
11
11
  minWidth?: number;
12
12
  maxWidth?: number;
13
- rowActions?: RowActions<T>;
13
+ rowActions?: RowActions<T> | ((row?: Row<T>) => RowActions<T>);
14
14
  align: 'center' | 'left' | 'right';
15
15
  }
16
16
  declare const useCellValues: <T>(cell: TCell<T, unknown>, row: Row<T>) => CellValues<T>;
@@ -1,4 +1,5 @@
1
1
  import { BulkAction, RowActions } from '../types';
2
2
  import { DataType } from './types';
3
3
  export declare const rowActions: RowActions<DataType>;
4
+ export declare const rowActionsAlternative: RowActions<DataType>;
4
5
  export declare const bulkActions: BulkAction[];
@@ -2,5 +2,6 @@ import { Meta, Story } from '@storybook/react';
2
2
  import { DataType } from './stories/types';
3
3
  import { TableProps } from './types';
4
4
  export declare const Template: Story<TableProps<DataType>>;
5
+ export declare const WithCustomRowActions: Story<TableProps<DataType>>;
5
6
  declare const TableStories: Meta<TableProps<DataType>>;
6
7
  export default TableStories;
@@ -22,7 +22,7 @@ export interface TableProps<T> {
22
22
  sortDescFirst?: boolean;
23
23
  onSort?: OnSort<T>;
24
24
  isTogglesSortable?: boolean;
25
- rowActions?: RowActions<T>;
25
+ rowActions?: RowActions<T> | ((row?: Row<T>) => RowActions<T>);
26
26
  bulkActions?: BulkAction[];
27
27
  renderBulkActions?: (rows: string[]) => JSX.Element;
28
28
  isLoading?: boolean;
@@ -106,7 +106,7 @@ export declare type ActionColumnDef<T> = {
106
106
  toggles?: string[];
107
107
  enableSorting?: boolean;
108
108
  enableSettings?: boolean;
109
- rowActions?: RowActions<T>;
109
+ rowActions?: RowActions<T> | ((row?: Row<T>) => RowActions<T>);
110
110
  settingsDropdownConfig?: SettingsDropdownConfig;
111
111
  } & IdentifiedColumnDef<T, CellProps>;
112
112
  export declare type AdditionalColumnDef<T> = {