@tracktor/design-system 4.3.2 → 4.4.0

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,7 +1,8 @@
1
- import { SxProps } from '@mui/material';
1
+ import { SvgIconProps, SxProps } from '@mui/material';
2
2
  interface CloseIconProps {
3
3
  color?: string;
4
4
  sx?: SxProps;
5
+ fontSize?: SvgIconProps["fontSize"];
5
6
  }
6
- declare const ChevronIcon: ({ sx, color }: CloseIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ declare const ChevronIcon: ({ sx, fontSize, color }: CloseIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
8
  export default ChevronIcon;
@@ -1,7 +1,8 @@
1
- import { SxProps } from '@mui/material';
1
+ import { SvgIconProps, SxProps } from '@mui/material';
2
2
  interface CloseIconProps {
3
3
  color?: string;
4
4
  sx?: SxProps;
5
+ fontSize?: SvgIconProps["fontSize"];
5
6
  }
6
- declare const CloseIcon: ({ sx, color }: CloseIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
+ declare const CloseIcon: ({ sx, fontSize, color }: CloseIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
8
  export default CloseIcon;
@@ -0,0 +1,71 @@
1
+ import { ChipProps } from '@mui/material';
2
+ type Option = {
3
+ id?: string | number;
4
+ label: string;
5
+ value: string;
6
+ };
7
+ interface ChipFilterBaseProps {
8
+ /**
9
+ * The label of the chip filter.
10
+ */
11
+ label?: ChipProps["label"];
12
+ /**
13
+ * The label displayed in the menu for the chip filter, only with multiple options.
14
+ */
15
+ labelMenu?: string;
16
+ /**
17
+ * The size of the chip filter.
18
+ */
19
+ size?: ChipProps["size"];
20
+ /**
21
+ * The variant of the chip filter.
22
+ */
23
+ variant?: ChipProps["variant"];
24
+ /**
25
+ * Indicates if the chip filter is disabled.
26
+ */
27
+ disabled?: ChipProps["disabled"];
28
+ /**
29
+ * The options available for selection in the chip filter.
30
+ * If "options" is not an array, it is considered a single option (toggle behavior).
31
+ */
32
+ options?: Option | Option[];
33
+ /**
34
+ * Indicates if there should be a separator between the label menu and the options selected in the menu.
35
+ * Defaults to ":"
36
+ */
37
+ separatorBetweenLabelMenuAndOptionSelected?: string;
38
+ }
39
+ export interface ChipFilterSingleProps extends ChipFilterBaseProps {
40
+ /**
41
+ * Indicates if the chip filter allows multiple selections.
42
+ */
43
+ multiple?: false;
44
+ /**
45
+ * The value of the chip filter.
46
+ */
47
+ value?: string;
48
+ /**
49
+ * Callback function triggered when the value of the chip filter changes.
50
+ * @param value
51
+ */
52
+ onChange?: (value?: string) => void;
53
+ }
54
+ export interface ChipFilterMultipleProps extends ChipFilterBaseProps {
55
+ /**
56
+ * Indicates if the chip filter allows multiple selections.
57
+ */
58
+ multiple: true;
59
+ /**
60
+ * The value of the chip filter.
61
+ */
62
+ value?: string[];
63
+ /**
64
+ * Callback function triggered when the value of the chip filter changes.
65
+ * @param value
66
+ */
67
+ onChange?: (value: string[]) => void;
68
+ }
69
+ export type ChipFilterProps = ChipFilterSingleProps | ChipFilterMultipleProps;
70
+ declare const ChipFilter: ({ label, value, onChange, options, variant, disabled, labelMenu, separatorBetweenLabelMenuAndOptionSelected, multiple, size, }: ChipFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
71
+ export default ChipFilter;
@@ -24,6 +24,9 @@ declare module "@mui/material/Chip" {
24
24
  interface ChipPropsSizeOverrides {
25
25
  xSmall: true;
26
26
  }
27
+ interface ChipPropsColorOverrides {
28
+ active: true;
29
+ }
27
30
  }
28
31
  declare module "@mui/material/FormControlLabel" {
29
32
  interface FormControlLabelProps {
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ apply: string;
2
3
  clickToUpload: string;
3
4
  files: string;
4
5
  reset: string;
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ apply: string;
2
3
  clickToUpload: string;
3
4
  files: string;
4
5
  reset: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tracktor/design-system",
3
3
  "description": "Tracktor Design System",
4
4
  "sideEffects": false,
5
- "version": "4.3.2",
5
+ "version": "4.4.0",
6
6
  "license": "ISC",
7
7
  "type": "module",
8
8
  "types": "./dist/src/main.d.ts",