asma-core-ui 2.19.67 → 2.19.69

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.
Files changed (93) hide show
  1. package/dist/asma-core-ui.es.js +22 -21
  2. package/dist/src/components/data-display/badge/StyledBadge.d.ts +4 -1
  3. package/dist/src/components/data-display/chip/StyledChip.d.ts +4 -1
  4. package/dist/src/components/data-display/icons/delete-outline-icon/DeleteOutlineIcon.d.ts +3 -0
  5. package/dist/src/components/data-display/icons/delete-outline-icon/index.d.ts +1 -0
  6. package/dist/src/components/data-display/icons/drag-horizontal-icon/DragHorizontalIcon.d.ts +3 -0
  7. package/dist/src/components/data-display/icons/drag-horizontal-icon/index.d.ts +1 -0
  8. package/dist/src/components/data-display/icons/file-pdf-icon/FilePdfIcon.d.ts +3 -0
  9. package/dist/src/components/data-display/icons/file-pdf-icon/index.d.ts +1 -0
  10. package/dist/src/components/data-display/icons/filter-icon/FilterIcon.d.ts +3 -0
  11. package/dist/src/components/data-display/icons/filter-icon/index.d.ts +1 -0
  12. package/dist/src/components/data-display/icons/index.d.ts +5 -0
  13. package/dist/src/components/data-display/icons/lock-icon/LockIcon.d.ts +3 -0
  14. package/dist/src/components/data-display/icons/lock-icon/index.d.ts +1 -0
  15. package/dist/src/components/feedback/dialog/StyledDialog.d.ts +2 -1
  16. package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +12 -0
  17. package/dist/src/components/feedback/snack-bar/components/processMessageError.d.ts +3 -0
  18. package/dist/src/components/feedback/snack-bar/components/processMessageInfo.d.ts +3 -0
  19. package/dist/src/components/feedback/snack-bar/components/types.d.ts +10 -0
  20. package/dist/src/components/feedback/snack-bar/components-styled/InfoMessages.d.ts +2 -0
  21. package/dist/src/components/feedback/snack-bar/index.d.ts +2 -0
  22. package/dist/src/components/feedback/snack-bar/message.d.ts +17 -0
  23. package/dist/src/components/feedback/snack-bar/processInfoSnackbar.d.ts +1 -0
  24. package/dist/src/components/filter-menu/StyledFilterMenu.d.ts +13 -0
  25. package/dist/src/components/inputs/button/StyledButton.d.ts +8 -4
  26. package/dist/src/components/inputs/checkbox/StyledCheckbox.d.ts +4 -1
  27. package/dist/src/components/inputs/input/StyledInput.d.ts +6 -10
  28. package/dist/src/components/inputs/input-field/StyledInputField.d.ts +7 -1
  29. package/dist/src/components/inputs/input-field/index.d.ts +1 -0
  30. package/dist/src/components/inputs/input-field/story/components/StyledInputFieldExample.d.ts +2 -0
  31. package/dist/src/components/inputs/radio-button/StyledRadio.d.ts +4 -0
  32. package/dist/src/components/inputs/radio-button/StyledRadioGroup.d.ts +4 -0
  33. package/dist/src/components/inputs/radio-button/index.d.ts +2 -0
  34. package/dist/src/components/inputs/rich-input/RichInput.d.ts +1 -0
  35. package/dist/src/components/inputs/select/StyledSelect.d.ts +10 -3
  36. package/dist/src/components/inputs/select/index.d.ts +1 -0
  37. package/dist/src/components/inputs/select/story/components/StyledSelectExample.d.ts +2 -0
  38. package/dist/src/components/inputs/select-autocomplete/StyledSelectAutocomplete.d.ts +11 -0
  39. package/dist/src/components/inputs/select-autocomplete/index.d.ts +1 -0
  40. package/dist/src/components/inputs/select-autocomplete/story/components/StyledSelectAutocompleteExample.d.ts +2 -0
  41. package/dist/src/components/inputs/slider/StyledSlider.d.ts +4 -1
  42. package/dist/src/components/inputs/switch/StyledSwitch.d.ts +3 -1
  43. package/dist/src/components/navigation/menu/index.d.ts +1 -0
  44. package/dist/src/components/pickers/date-picker/StyledDatePicker.d.ts +2 -0
  45. package/dist/src/components/pickers/date-picker/components/DefaultInput.d.ts +5 -0
  46. package/dist/src/components/pickers/date-picker/components/RangeInput.d.ts +5 -0
  47. package/dist/src/components/pickers/date-picker/components/StyledCalendarPicker.d.ts +8 -0
  48. package/dist/src/components/pickers/date-picker/components/StyledCalendarPickerCaption.d.ts +7 -0
  49. package/dist/src/components/pickers/date-picker/components/StyledCalendarPickerFooter.d.ts +10 -0
  50. package/dist/src/components/pickers/date-picker/components/StyledCalendarPickerSelectMonth.d.ts +3 -0
  51. package/dist/src/components/pickers/date-picker/components/StyledCalendarPickerSelectYear.d.ts +3 -0
  52. package/dist/src/components/pickers/date-picker/helpers.d.ts +3 -0
  53. package/dist/src/components/pickers/date-picker/story/components/DatePickerContainer.d.ts +5 -0
  54. package/dist/src/components/pickers/date-picker/story/components/DefaultPickerExample.d.ts +2 -0
  55. package/dist/src/components/pickers/date-picker/story/components/NestedRangePickerExample.d.ts +2 -0
  56. package/dist/src/components/pickers/date-picker/story/components/RangePickerExample.d.ts +2 -0
  57. package/dist/src/components/{inputs/date-picker/StyledDatePicker.d.ts → pickers/date-picker/types.d.ts} +10 -2
  58. package/dist/src/components/pickers/time-picker/StyledTimePicker.d.ts +16 -0
  59. package/dist/src/components/pickers/time-picker/components/TimePickerBody.d.ts +5 -0
  60. package/dist/src/components/pickers/time-picker/components/TimePickerColumn.d.ts +6 -0
  61. package/dist/src/components/pickers/time-picker/index.d.ts +1 -0
  62. package/dist/src/components/table/StyledTable.d.ts +12 -27
  63. package/dist/src/components/table/components/TableHeader.d.ts +6 -0
  64. package/dist/src/components/table/components/TablePagination.d.ts +6 -0
  65. package/dist/src/components/table/components/columns/action-column/actionColumn.d.ts +21 -0
  66. package/dist/src/components/table/components/columns/action-column/components/HeaderActionMenu.d.ts +5 -0
  67. package/dist/src/components/table/components/columns/action-column/components/RowActionMenu.d.ts +12 -0
  68. package/dist/src/components/table/components/columns/expandColumn.d.ts +10 -0
  69. package/dist/src/components/table/components/columns/injectColumns.d.ts +2 -0
  70. package/dist/src/components/table/components/columns/selectColumn.d.ts +8 -0
  71. package/dist/src/components/table/index.d.ts +1 -1
  72. package/dist/src/components/table/story/components/useTableColumns.d.ts +10 -0
  73. package/dist/src/components/table/types.d.ts +35 -3
  74. package/dist/src/helpers/date.helpers.d.ts +2 -0
  75. package/dist/src/hooks/useWindowWidthSize.hook.d.ts +5 -0
  76. package/dist/src/index.d.ts +6 -1
  77. package/dist/style.css +2 -2
  78. package/dist/tailwind.config.d.ts +0 -2
  79. package/package.json +1 -1
  80. package/dist/src/components/inputs/checkbox/StyledCheckbox.stories.d.ts +0 -14
  81. package/dist/src/components/inputs/date-picker/StyledCalendarPicker.d.ts +0 -4
  82. package/dist/src/components/table/components/columns/actionColumn.d.ts +0 -8
  83. package/dist/src/components/table/components/columns/widthStabilizer.d.ts +0 -6
  84. /package/dist/src/components/{inputs → pickers}/date-picker/index.d.ts +0 -0
  85. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/StyledDataGrid.d.ts +0 -0
  86. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/StyledGridActionsCellItem.d.ts +0 -0
  87. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/components/ColumnFormControlItem.d.ts +0 -0
  88. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/components/ColumnsMenu.d.ts +0 -0
  89. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/components/columnActions.d.ts +0 -0
  90. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/index.d.ts +0 -0
  91. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/types.d.ts +0 -0
  92. /package/dist/src/components/{data-grid → table/__deprecated-data-grid}/x-data-grid-types.d.ts +0 -0
  93. /package/dist/src/{components/table/useToggleMenuVisibility.d.ts → hooks/useToggleMenuVisibility.hook.d.ts} +0 -0
@@ -1,2 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { type BadgeProps } from '@mui/material';
2
- export declare const StyledBadge: ({ color, ...props }: BadgeProps) => JSX.Element;
3
+ export declare const StyledBadge: React.FC<BadgeProps & {
4
+ dataTest: string;
5
+ }>;
@@ -1,2 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { type ChipProps } from '@mui/material';
2
- export declare const StyledChip: (props: ChipProps) => JSX.Element;
3
+ export declare const StyledChip: React.FC<ChipProps & {
4
+ dataTest: string;
5
+ }>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { IIcon } from '../Icons.types';
3
+ export declare const DeleteOutlineIcon: React.FC<IIcon>;
@@ -0,0 +1 @@
1
+ export * from './DeleteOutlineIcon';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { IIcon } from '../Icons.types';
3
+ export declare const DragHorizontalIcon: React.FC<IIcon>;
@@ -0,0 +1 @@
1
+ export * from './DragHorizontalIcon';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { IIcon } from '../Icons.types';
3
+ export declare const FilePdfIcon: React.FC<IIcon>;
@@ -0,0 +1 @@
1
+ export * from './FilePdfIcon';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { IIcon } from '../Icons.types';
3
+ export declare const FilterIcon: React.FC<IIcon>;
@@ -0,0 +1 @@
1
+ export * from './FilterIcon';
@@ -46,3 +46,8 @@ export * from './inbox-outbox-icon';
46
46
  export * from './inbox-outbox-outline-icon';
47
47
  export * from './topic-icon';
48
48
  export * from './empty-page-icon';
49
+ export * from './drag-horizontal-icon';
50
+ export * from './file-pdf-icon';
51
+ export * from './delete-outline-icon';
52
+ export * from './filter-icon';
53
+ export * from './lock-icon';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { IIcon } from '../Icons.types';
3
+ export declare const LockIcon: React.FC<IIcon>;
@@ -0,0 +1 @@
1
+ export * from './LockIcon';
@@ -3,5 +3,6 @@ import type { ReactNode } from 'react';
3
3
  export interface IStyledDialogProps extends DialogProps {
4
4
  onCloseText?: ReactNode;
5
5
  showCloseIcon?: boolean;
6
+ dataTest: string;
6
7
  }
7
- export declare const StyledDialog: ({ onCloseText, children, onClose, showCloseIcon, ...rest }: IStyledDialogProps) => JSX.Element;
8
+ export declare const StyledDialog: React.FC<IStyledDialogProps>;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { AlertColor } from '@mui/material';
3
+ import { type CustomContentProps } from 'notistack';
4
+ interface StyledInfoSnackbarProps extends CustomContentProps {
5
+ severity?: AlertColor;
6
+ alertClassName?: string;
7
+ alertVariant?: 'standard' | 'filled' | 'outlined';
8
+ closeButton?: boolean;
9
+ type?: 'loading';
10
+ }
11
+ export declare const StyledInfoSnackbar: import("react").ForwardRefExoticComponent<StyledInfoSnackbarProps & import("react").RefAttributes<HTMLDivElement>>;
12
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { MessageProps } from './types';
3
+ export declare function processMessageError(messageInfo: string | ReactNode, options?: MessageProps): () => void;
@@ -0,0 +1,3 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { MessageProps } from './types';
3
+ export declare function processMessageInfo(messageInfo: string | ReactNode, options?: MessageProps): () => void;
@@ -0,0 +1,10 @@
1
+ import type { AlertColor } from '@mui/material';
2
+ import type { SnackbarProviderProps } from 'notistack';
3
+ export type MessageProps = SnackbarProviderProps & {
4
+ severity?: AlertColor;
5
+ persist?: boolean;
6
+ closeButton?: boolean;
7
+ className?: string;
8
+ id?: string;
9
+ type?: 'loading';
10
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const InfoMessages: React.FC;
@@ -2,3 +2,5 @@ export * from './SnackbarProvider';
2
2
  export { enqueueSnackbar, closeSnackbar, useSnackbar } from 'notistack';
3
3
  export * from './StyledSnackbar';
4
4
  export * from './processAlertSnackBar';
5
+ export * from './processInfoSnackbar';
6
+ export * from './message';
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { MessageProps } from './components/types';
3
+ /**
4
+ * Important props:
5
+ * @param id - string. To control the message
6
+ * @remarks use callBack function to close the message manually. Providing ID as a param is important in this case.
7
+ * Without ID, callback fil force close all active notifications
8
+ * @param closeButton - true | false
9
+ * @param persist - true | false
10
+ * @param autoHideDuration - number
11
+ * @moreProps https://notistack.com/api-reference#mutual-props
12
+ */
13
+ export declare const message: {
14
+ info: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
15
+ error: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
16
+ loading: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
17
+ };
@@ -0,0 +1 @@
1
+ export declare function processInfoSnackbar(message: string): void;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ /**
3
+ * Custom props:
4
+ * @param filterIsActive - needed to determine whether or not to show the dot in the top right corner indicating some changes were made
5
+ * @param popoverContent
6
+ */
7
+ type StyledFilterMenuProps = {
8
+ dataTest: string;
9
+ filterIsActive: boolean;
10
+ popoverContent: React.ReactNode;
11
+ };
12
+ export declare const StyledFilterMenu: React.FC<StyledFilterMenuProps>;
13
+ export {};
@@ -2,20 +2,24 @@ import React, { type ReactNode } from 'react';
2
2
  export type StyledButtonType = 'contained' | 'outlined' | 'text' | 'textGray';
3
3
  type commonProps = {
4
4
  refLink?: React.Ref<HTMLButtonElement>;
5
- size?: 'large' | 'small';
5
+ size?: 'large' | 'small' | 'medium';
6
6
  startIcon?: ReactNode;
7
7
  endIcon?: ReactNode;
8
- dataTest?: string;
8
+ dataTest: string;
9
9
  };
10
10
  type variantTextGrayProps = {
11
11
  variant?: 'textGray';
12
12
  error?: never;
13
13
  };
14
+ type variantTextWhiteProps = {
15
+ variant?: 'textWhite';
16
+ error?: never;
17
+ };
14
18
  type buttonStandartVariantsProps = {
15
19
  variant?: 'contained' | 'outlined' | 'text';
16
20
  error?: boolean;
17
21
  };
18
- type conditionalProps = variantTextGrayProps | buttonStandartVariantsProps;
22
+ type conditionalProps = variantTextGrayProps | variantTextWhiteProps | buttonStandartVariantsProps;
19
23
  export type StyledButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & commonProps & conditionalProps;
20
24
  /**
21
25
  * Developer: daria.bogatiriov@carasent.com
@@ -25,7 +29,7 @@ export type StyledButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
25
29
  *
26
30
  * Custom props:
27
31
  * @param variant - 'contained' | 'outlined' | 'text' | 'textGray'
28
- * @param size - 'large' | 'small'
32
+ * @param size - 'large' | 'small' | 'medium'
29
33
  * @param startIcon - ReactNode
30
34
  * @param endIcon - ReactNode
31
35
  * @param error - boolean
@@ -1,2 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { type CheckboxProps } from '@mui/material';
2
- export declare const StyledCheckbox: (props: CheckboxProps) => JSX.Element;
3
+ export declare const StyledCheckbox: React.FC<CheckboxProps & {
4
+ dataTest: string;
5
+ }>;
@@ -1,15 +1,6 @@
1
1
  import { type FC, type ReactNode } from 'react';
2
2
  /**
3
- * Developer: bragari.andrei@carasent.com
4
- * Custom props:
5
- * @param description - message under input (string)
6
- * @param startIcon - icon before input (JSX.Element)
7
- * @param endIcon - icon after input (JSX.Element)
8
- * @param dataTest - data-test tag (string)
9
- * @param label - string
10
- * @param refLink - ref to component
11
- * @param size - 'large' | 'small'
12
- * @param className - for styles (width)
3
+ * @deprecated The input should not be used, use ->> StyledInputField
13
4
  */
14
5
  type ConditionalProps = {
15
6
  disabled?: boolean;
@@ -41,5 +32,10 @@ export type StyledInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>,
41
32
  label?: ReactNode;
42
33
  refLink?: React.Ref<HTMLInputElement>;
43
34
  } & ConditionalProps;
35
+ /**
36
+ * @deprecated The input should not be used, use ->> StyledInputField
37
+ *
38
+ * USE @@@@ StyledInputField @@@
39
+ */
44
40
  export declare const StyledInput: FC<StyledInputProps>;
45
41
  export {};
@@ -1,8 +1,14 @@
1
+ /// <reference types="react" />
1
2
  import { type TextFieldProps } from '@mui/material';
2
3
  /**
3
4
  *
4
5
  * @inputRef
5
6
  * inputRef to get Node of Input Element inside
6
7
  *
8
+ * type='mui-input' is temporary, remove it after deleting antd from all projects. Antd lib overwrites styles for type[text]
7
9
  */
8
- export declare const StyledInputField: (props: TextFieldProps) => JSX.Element;
10
+ export declare const StyledInputField: React.FC<TextFieldProps & {
11
+ allowClear?: boolean;
12
+ onClear?: () => void;
13
+ dataTest: string;
14
+ }>;
@@ -1 +1,2 @@
1
1
  export * from './StyledInputField';
2
+ export { type TextFieldProps } from '@mui/material';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledInputFieldExample: React.FC;
@@ -0,0 +1,4 @@
1
+ import { type RadioProps } from '@mui/material';
2
+ export declare const StyledRadio: ({ dataTest, ...props }: RadioProps & {
3
+ dataTest: string;
4
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type RadioGroupProps } from '@mui/material';
2
+ export declare const StyledRadioGroup: ({ dataTest, ...props }: RadioGroupProps & {
3
+ dataTest: string;
4
+ }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './StyledRadio';
2
+ export * from './StyledRadioGroup';
@@ -7,6 +7,7 @@ export interface IRichInput extends ReactQuill.ReactQuillProps {
7
7
  error?: string;
8
8
  is_error?: boolean;
9
9
  is_warning?: boolean;
10
+ dataTest?: string;
10
11
  }
11
12
  declare const RichInput: FC<IRichInput>;
12
13
  export { RichInput };
@@ -1,11 +1,18 @@
1
1
  /// <reference types="react" />
2
2
  import { type SelectProps } from '@mui/material';
3
3
  /**
4
+ *
5
+ * @usage
6
+ * use StyleSelect only inside StyledFormControl
7
+ *
8
+ * @size
9
+ * control the size through StyledFormControl
4
10
  *
5
11
  * @inputRef
6
12
  * inputRef to get Node of Input Element inside
7
13
  *
8
14
  */
9
- export declare const StyledSelect: (props: SelectProps<unknown> & {
10
- reflink?: import("react").RefObject<unknown> | ((instance: unknown) => void) | null | undefined;
11
- }) => JSX.Element;
15
+ export declare const StyledSelect: React.FC<SelectProps & {
16
+ allowClear?: boolean;
17
+ dataTest: string;
18
+ }>;
@@ -1,2 +1,3 @@
1
1
  export * from './StyledSelect';
2
2
  export * from './StyledSelectItem';
3
+ export { type SelectChangeEvent } from '@mui/material';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledSelectExample: React.FC;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { type AutocompleteProps, type ChipTypeMap } from '@mui/material';
3
+ /**
4
+ *
5
+ * @inputRef
6
+ * inputRef to get Node of Input Element inside
7
+ *
8
+ */
9
+ export declare function StyledSelectAutocomplete<T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent']>({ dataTest, ...props }: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent> & {
10
+ dataTest: string;
11
+ }): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './StyledSelectAutocomplete';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledSelectAutocompleteExample: React.FC;
@@ -1,2 +1,5 @@
1
1
  import { type SliderProps } from '@mui/material';
2
- export declare const StyledSlider: (props: SliderProps) => JSX.Element;
2
+ export interface StyledSliderProps extends SliderProps {
3
+ dataTest: string;
4
+ }
5
+ export declare const StyledSlider: ({ dataTest, ...props }: StyledSliderProps) => JSX.Element;
@@ -1,3 +1,5 @@
1
1
  import { type SwitchProps as _SwitchProps } from '@mui/material';
2
2
  export type SwitchProps = _SwitchProps;
3
- export declare const StyledSwitch: (props: SwitchProps) => JSX.Element;
3
+ export declare const StyledSwitch: ({ dataTest, ...props }: _SwitchProps & {
4
+ dataTest: string;
5
+ }) => JSX.Element;
@@ -1,3 +1,4 @@
1
1
  export * from './StyledMenu';
2
2
  export * from './StyledMenuItem';
3
3
  export * from './StyledMenuList';
4
+ export { type MenuProps } from '@mui/material';
@@ -0,0 +1,2 @@
1
+ import type { DatePickerProps } from './types';
2
+ export declare const StyledDatePicker: (props: DatePickerProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { DatePickerProps } from '../types';
3
+ export declare const DefaultInput: React.FC<DatePickerProps & {
4
+ onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
5
+ }>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { DatePickerProps } from '../types';
3
+ export declare const RangeInput: React.FC<DatePickerProps & {
4
+ onClick: (e: React.MouseEvent<HTMLDivElement>) => void;
5
+ }>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { DatePickerProps } from '../types';
3
+ import { type PopoverProps } from '@mui/material';
4
+ export declare const StyledCalendarPicker: React.FC<{
5
+ datePickerProps: DatePickerProps;
6
+ popoverProps: PopoverProps;
7
+ positionAbove: boolean;
8
+ }>;
@@ -0,0 +1,7 @@
1
+ import { type CaptionProps } from 'react-day-picker';
2
+ import { type Dispatch, type SetStateAction } from 'react';
3
+ export declare function CustomCaption(props: CaptionProps & {
4
+ month: Date | undefined;
5
+ setMonth: Dispatch<SetStateAction<Date | undefined>>;
6
+ isNb: boolean;
7
+ }): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type Matcher } from 'react-day-picker';
2
+ import type { Dispatch, SetStateAction } from 'react';
3
+ export declare const StyledCalendarPickerFooter: React.FC<{
4
+ onClose: ((event: object, reason: 'backdropClick' | 'escapeKeyDown') => void) | undefined;
5
+ isNb: boolean;
6
+ selected: Matcher | Matcher[] | undefined;
7
+ removeSelection: (e: React.MouseEvent) => void;
8
+ month: Date | undefined;
9
+ setMonth: Dispatch<SetStateAction<Date | undefined>>;
10
+ }>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { type DropdownProps } from 'react-day-picker';
3
+ export declare const StyledCalendarPickerSelectMonth: React.FC<DropdownProps>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { type DropdownProps } from 'react-day-picker';
3
+ export declare const StyledCalendarPickerSelectYear: React.FC<DropdownProps>;
@@ -0,0 +1,3 @@
1
+ import type { Dispatch, SetStateAction } from 'react';
2
+ export declare const getValue: (date?: Date, dateFormat?: string) => string;
3
+ export declare const setPickerPosition: (e: React.MouseEvent<HTMLDivElement>, setPositionAbove: Dispatch<SetStateAction<boolean>>) => void;
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from "react";
2
+ export declare const DatePickerContainer: React.FC<{
3
+ title: string;
4
+ node: ReactNode;
5
+ }>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const DefaultPickerExample: React.FC;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const NestedRangePickerExample: React.FC;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const RangePickerExample: React.FC;
@@ -1,14 +1,21 @@
1
- import { type CalendarProps } from './StyledCalendarPicker';
1
+ /// <reference types="react" />
2
+ import type { DayPicker, Matcher } from 'react-day-picker';
3
+ export type CalendarProps = React.ComponentProps<typeof DayPicker>;
2
4
  type CommonDatePickerProps = {
3
5
  dateFormat?: string;
4
6
  className?: string;
5
7
  inputClassName?: string;
8
+ onClear?: () => void;
9
+ allowClear?: boolean;
10
+ disabledDays?: Matcher | Matcher[];
11
+ dataTest: string;
6
12
  } & CalendarProps;
7
13
  type CompactRangeProps = {
8
14
  mode: 'range';
9
15
  compact: true;
10
16
  placeholderFrom?: string;
11
17
  placeholderTo?: string;
18
+ allowClear?: never;
12
19
  placeholder?: never;
13
20
  };
14
21
  type DefaultRangeProps = {
@@ -17,6 +24,8 @@ type DefaultRangeProps = {
17
24
  placeholder?: string;
18
25
  placeholderFrom?: never;
19
26
  placeholderTo?: never;
27
+ onClearFrom?: () => void;
28
+ onClearTo?: () => void;
20
29
  };
21
30
  type DefaultSingleProps = {
22
31
  mode: 'single';
@@ -26,5 +35,4 @@ type DefaultSingleProps = {
26
35
  placeholderTo?: never;
27
36
  };
28
37
  export type DatePickerProps = CommonDatePickerProps & (CompactRangeProps | DefaultRangeProps | DefaultSingleProps);
29
- export declare const StyledDatePicker: ({ placeholder, placeholderFrom, placeholderTo, compact, dateFormat, className, inputClassName, disabled, ...props }: DatePickerProps) => JSX.Element;
30
38
  export {};
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { type PopoverOrigin } from '@mui/material';
3
+ export type StyledTimePickerProps = {
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ inputClassName?: string;
7
+ value?: Date;
8
+ onSelect: (date: Date | undefined) => void;
9
+ dataTest: string;
10
+ width?: number;
11
+ anchorOrigin?: PopoverOrigin;
12
+ transformOrigin?: PopoverOrigin;
13
+ error?: boolean;
14
+ helperText?: string;
15
+ };
16
+ export declare const StyledTimePicker: React.FC<StyledTimePickerProps>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { StyledTimePickerProps } from '../StyledTimePicker';
3
+ type TimePickerBodyProps = Omit<StyledTimePickerProps, 'placeholder' | 'disabled' | 'inputClassName'>;
4
+ export declare const TimePickerBody: React.FC<Omit<TimePickerBodyProps, 'anchorOrigin' | 'anchorPosition'>>;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { StyledTimePickerProps } from '../StyledTimePicker';
3
+ export type TimePickerColumnProps = Omit<StyledTimePickerProps, 'placeholder' | 'disabled' | 'inputClassName' | 'dataTest'> & {
4
+ type: 'hours' | 'minutes';
5
+ };
6
+ export declare const TimePickerColumn: React.FC<TimePickerColumnProps>;
@@ -0,0 +1 @@
1
+ export * from './StyledTimePicker';
@@ -1,29 +1,14 @@
1
- import { type TableOptions, type Table, type Row } from '@tanstack/react-table';
2
- import { type ReactElement, type MouseEvent } from 'react';
3
- export interface StyledTableProps<TData, TCustomData> extends Omit<TableOptions<TData>, 'getCoreRowModel' | 'getExpandedRowModel' | 'getFilteredRowModel' | 'getSortedRowModel'> {
4
- actions?: (row: Row<TData>) => {
5
- label: string;
6
- className?: string;
7
- disabled?: boolean;
8
- hide?: boolean;
9
- onClick?: (row: Row<TData>) => void;
10
- }[];
11
- autoSize?: boolean;
12
- customSubRowData?: Map<string, TCustomData[]>;
13
- disableHeaderPin?: boolean;
14
- loading?: boolean;
15
- noRowsOverlay?: ReactElement;
16
- tableInstanceRef?: React.MutableRefObject<Table<TData> | null>;
17
- className?: string;
18
- rowHeight?: number;
19
- tdClassName?: string;
20
- thClassName?: string;
21
- getRowClassName?: (row: Row<TData>) => string;
22
- onRowClick?: (e: MouseEvent<HTMLTableRowElement, globalThis.MouseEvent>, row: Row<TData>) => void;
23
- renderSubRows?: (props: {
24
- rows: TCustomData[];
25
- }) => ReactElement;
26
- }
1
+ import { type StyledTableProps } from './types';
2
+ /**
3
+ *
4
+ * Custom props:
5
+ * @param size: Column sizing. use NaN (width 100%) - only one time for the main column. It will make the column very responsive.. Example is in Storybook.
6
+ *
7
+ * If you have a very long data, like descriptions. use input to render long strings instead of div. Example is in Storybook.
8
+ *
9
+ * @param focusable: Used for controlling the focus of rows. If set to true, the tabIndex={0} attribute will be added to each table row. Used, for example, when adding a new item to scroll to it and focus it
10
+ *
11
+ */
27
12
  export declare const StyledTable: <TData extends {
28
13
  id: string | number;
29
- }, TCustomData = Record<string, unknown>>({ actions, autoSize, columns, data, customSubRowData, initialState, enableRowSelection, disableHeaderPin, loading, noRowsOverlay, tableInstanceRef, className, rowHeight, tdClassName, thClassName, getRowClassName, onRowClick, renderSubRows, ...rest }: StyledTableProps<TData, TCustomData>) => JSX.Element;
14
+ }, TCustomData = Record<string, unknown>>({ actions, columns, data, customSubRowData, initialState, enableRowSelection, headerPin, loading, noRowsOverlay, tableInstanceRef, className, rowHeight, tdClassName, getRowClassName, onRowClick, renderSubRows, customActionsNode, focusable, stickyHeader, expandArrow, height, locale, ...rest }: StyledTableProps<TData, TCustomData>) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { type Table } from '@tanstack/react-table';
3
+ export declare function TableHeader<TData>({ table, stickyHeader }: {
4
+ table: Table<TData>;
5
+ stickyHeader?: boolean;
6
+ }): JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import type { Table } from '@tanstack/react-table';
3
+ export declare function TablePagination<TData>({ table, locale }: {
4
+ locale: 'en' | 'no';
5
+ table: Table<TData>;
6
+ }): JSX.Element | null;
@@ -0,0 +1,21 @@
1
+ import { type CellContext, type HeaderContext, type Row } from '@tanstack/react-table';
2
+ import type { ReactNode } from 'react';
3
+ export declare function generateActionsColumn<TData>(options: {
4
+ headerPin: boolean;
5
+ actions?: (row: Row<TData>) => {
6
+ label: string;
7
+ className?: string;
8
+ disabled?: boolean;
9
+ hide?: boolean;
10
+ onClick?: (row: Row<TData>) => void;
11
+ }[];
12
+ customActionsNode?: (row: CellContext<TData, TData>) => ReactNode;
13
+ }): {
14
+ id: string;
15
+ enableHiding: boolean;
16
+ enableSorting: boolean;
17
+ accessorFn: (row: TData) => TData;
18
+ header: (props: HeaderContext<TData, TData>) => JSX.Element | null;
19
+ cell: (cell: CellContext<TData, TData>) => JSX.Element | null;
20
+ size: number;
21
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { HeaderContext } from '@tanstack/react-table';
3
+ export declare function HeaderActionMenu<TData>({ headerData }: {
4
+ headerData: HeaderContext<TData, TData>;
5
+ }): JSX.Element;