@m4l/components 9.1.16 → 9.1.17
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/@types/types.d.ts +1 -1
- package/components/Chip/Chip.d.ts +9 -0
- package/components/Chip/Chip.test.d.ts +1 -0
- package/components/Chip/slots/ChipSlots.d.ts +16 -0
- package/components/{mui_extended/Chip → Chip}/types.d.ts +6 -7
- package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.d.ts +1 -1
- package/package.json +1 -1
- package/storybook/components/{extended/mui/Chip → Chip}/Chip.stories.d.ts +1 -5
- package/components/mui_extended/Chip/Chip.d.ts +0 -13
- package/components/mui_extended/Chip/index.d.ts +0 -0
- package/components/mui_extended/Chip/slots/ChipSlots.d.ts +0 -16
- /package/components/{mui_extended/Chip → Chip}/ChipStyles.d.ts +0 -0
- /package/components/{mui_extended/Chip → Chip}/constants.d.ts +0 -0
- /package/components/{mui_extended/Chip/index copy.d.ts → Chip/index.d.ts} +0 -0
- /package/components/{mui_extended/Chip → Chip}/slots/ChipEnum.d.ts +0 -0
- /package/components/{mui_extended/Chip → Chip}/slots/index.d.ts +0 -0
package/@types/types.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChipProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A chip is a component that displays information in a compact way.
|
|
4
|
+
* @author SebastianM - automatic
|
|
5
|
+
* @createdAt 2024-12-06 12:48:15 - automatic
|
|
6
|
+
* @updatedAt 2024-12-06 13:56:58 - automatic
|
|
7
|
+
* @updatedUser SebastianM - automatic
|
|
8
|
+
*/
|
|
9
|
+
export declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const ChipRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ChipOwnerState> & Record<string, unknown> & {
|
|
2
|
+
ownerState: Partial<import('..').ChipOwnerState> & Record<string, unknown>;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
declare const SkeletonChipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Skeleton/types').SkeletonProps, keyof import('../../mui_extended/Skeleton/types').SkeletonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ChipOwnerState> & Record<string, unknown> & {
|
|
5
|
+
ownerState: Partial<import('..').ChipOwnerState> & Record<string, unknown>;
|
|
6
|
+
}, {}, {}>;
|
|
7
|
+
declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ChipOwnerState> & Record<string, unknown> & {
|
|
8
|
+
ownerState: Partial<import('..').ChipOwnerState> & Record<string, unknown>;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
declare const TextChipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Typography/types').TypographyProps, keyof import('../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ChipOwnerState> & Record<string, unknown> & {
|
|
11
|
+
ownerState: Partial<import('..').ChipOwnerState> & Record<string, unknown>;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
declare const IconButtonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/IconButton/types').IconButtonProps, keyof import('../../mui_extended/IconButton/types').IconButtonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ChipOwnerState> & Record<string, unknown> & {
|
|
14
|
+
ownerState: Partial<import('..').ChipOwnerState> & Record<string, unknown>;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export { ChipRootStyled, SkeletonChipStyled, IconStyled, TextChipStyled, IconButtonStyled };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PaletteColor, Theme } from '@mui/material';
|
|
2
2
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
3
|
-
import { ChipProps as MUIChipProps } from '@mui/material/Chip';
|
|
4
3
|
import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
5
4
|
import { ReactNode } from 'react';
|
|
6
5
|
import { ChipSlots } from './slots';
|
|
@@ -12,30 +11,30 @@ type ChipVariants = 'contained' | 'outlined';
|
|
|
12
11
|
* [endIcon] - Optional prop for the icon on the right in the `Chip`.
|
|
13
12
|
* label - Text describing the `Chip`.
|
|
14
13
|
* [componentPaletteColor] - Customization of the component's palette color.
|
|
15
|
-
* [disabled] - Indicates if the `Chip` is disabled.
|
|
16
14
|
* [size] - Size of the `Chip` (default 'medium').
|
|
17
15
|
* [error] - Indicates if the `Chip` is in an error state.
|
|
18
16
|
* [variant] - Defines the variant of the `Chip` (default 'contained').
|
|
19
17
|
* [color] - Defines the color of the `Chip`.
|
|
18
|
+
* @createdAt 2024-12-06 11:17:21 - automatic
|
|
20
19
|
*/
|
|
21
|
-
export interface ChipProps
|
|
20
|
+
export interface ChipProps {
|
|
22
21
|
startIcon?: ReactNode;
|
|
23
22
|
endIcon?: ReactNode;
|
|
24
23
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
25
|
-
|
|
26
|
-
label: string;
|
|
24
|
+
label?: string;
|
|
27
25
|
variant?: ChipVariants;
|
|
28
26
|
color?: Exclude<ComponentPalletColor, 'primary'>;
|
|
29
27
|
skeletonWidth?: string | number;
|
|
30
28
|
hasIconClose?: boolean;
|
|
31
29
|
opacity?: boolean;
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
onDeleted?: () => void;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Owner state of the `Chip` used to define internal style and behavior properties.
|
|
35
35
|
*/
|
|
36
|
-
export interface ChipOwnerState extends Pick<ChipProps, 'size' | 'variant' | 'color'
|
|
36
|
+
export interface ChipOwnerState extends Pick<ChipProps, 'size' | 'variant' | 'color'> {
|
|
37
37
|
opacity?: boolean;
|
|
38
|
-
disabled?: boolean;
|
|
39
38
|
paletteColor: PaletteColor;
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
@@ -4,7 +4,7 @@ export declare const IconButtonStyled: import('@emotion/styled').StyledComponent
|
|
|
4
4
|
export declare const AutocompleteStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').AutocompleteProps<unknown, boolean | undefined, boolean | undefined, boolean | undefined, import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>>, keyof import('@mui/material').AutocompleteProps<unknown, boolean | undefined, boolean | undefined, boolean | undefined, import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
|
|
5
5
|
ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
|
|
6
6
|
}, {}, {}>;
|
|
7
|
-
export declare const ChipStyled: import('@emotion/styled').StyledComponent<Pick<
|
|
7
|
+
export declare const ChipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Chip').ChipProps & import('react').RefAttributes<HTMLDivElement>, keyof import('react').RefAttributes<HTMLDivElement> | keyof import('../../../Chip').ChipProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
|
|
8
8
|
ownerState: Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown>;
|
|
9
9
|
}, {}, {}>;
|
|
10
10
|
export declare const MenuItemStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuItem').MenuItemProps, keyof import('../../MenuItem').MenuItemProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
-
import { Chip } from '
|
|
2
|
+
import { Chip } from '../../../src/components/Chip';
|
|
3
3
|
declare const meta: Meta<typeof Chip>;
|
|
4
4
|
type Story = StoryObj<typeof Chip>;
|
|
5
5
|
/**
|
|
@@ -18,10 +18,6 @@ export declare const WithEndIcon: Story;
|
|
|
18
18
|
* Base story for `Chip` with a start and end icon.
|
|
19
19
|
*/
|
|
20
20
|
export declare const WithStartAndEndIcon: Story;
|
|
21
|
-
/**
|
|
22
|
-
* Base story for `Chip` in a disabled state.
|
|
23
|
-
*/
|
|
24
|
-
export declare const Disabled: Story;
|
|
25
21
|
/**
|
|
26
22
|
* Base story for `Chip` in skeleton mode.
|
|
27
23
|
*/
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ChipProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* The Button component renders a button with an optional icon and label.
|
|
4
|
-
* It supports different sizes, colors, and states such as disabled.
|
|
5
|
-
* If the module is in skeleton mode, it renders a skeleton button instead.
|
|
6
|
-
* @param props
|
|
7
|
-
* @returns
|
|
8
|
-
* @author SebastianM - automatic
|
|
9
|
-
* @createdAt 2024-12-02 13:49:12 - automatic
|
|
10
|
-
* @updatedAt 2024-12-03 09:46:12 - automatic
|
|
11
|
-
* @updatedUser SebastianM - automatic
|
|
12
|
-
*/
|
|
13
|
-
export declare const Chip: import('react').ForwardRefExoticComponent<Omit<ChipProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
File without changes
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const ChipRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ChipOwnerState> & Record<string, unknown> & {
|
|
2
|
-
ownerState: Partial<import('../types').ChipOwnerState> & Record<string, unknown>;
|
|
3
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
-
declare const SkeletonChipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Skeleton/types').SkeletonProps, keyof import('../../Skeleton/types').SkeletonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ChipOwnerState> & Record<string, unknown> & {
|
|
5
|
-
ownerState: Partial<import('../types').ChipOwnerState> & Record<string, unknown>;
|
|
6
|
-
}, {}, {}>;
|
|
7
|
-
declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Icon').IconProps, keyof import('../../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ChipOwnerState> & Record<string, unknown> & {
|
|
8
|
-
ownerState: Partial<import('../types').ChipOwnerState> & Record<string, unknown>;
|
|
9
|
-
}, {}, {}>;
|
|
10
|
-
declare const TextChipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Typography/types').TypographyProps, keyof import('../../Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ChipOwnerState> & Record<string, unknown> & {
|
|
11
|
-
ownerState: Partial<import('../types').ChipOwnerState> & Record<string, unknown>;
|
|
12
|
-
}, {}, {}>;
|
|
13
|
-
declare const IconButtonStyled: import('@emotion/styled').StyledComponent<Pick<import('../../IconButton/types').IconButtonProps, keyof import('../../IconButton/types').IconButtonProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ChipOwnerState> & Record<string, unknown> & {
|
|
14
|
-
ownerState: Partial<import('../types').ChipOwnerState> & Record<string, unknown>;
|
|
15
|
-
}, {}, {}>;
|
|
16
|
-
export { ChipRootStyled, SkeletonChipStyled, IconStyled, TextChipStyled, IconButtonStyled };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|