@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 CHANGED
@@ -119,7 +119,7 @@ import {
119
119
  import {
120
120
  ChipOwnerState,
121
121
  ChipSlotsType,
122
- } from '../components/mui_extended/Chip/types';
122
+ } from '../components/Chip/types';
123
123
 
124
124
  import {
125
125
  CircularProgressOwnerState,
@@ -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 extends Omit<MUIChipProps, 'color' | 'size' | 'variant'> {
20
+ export interface ChipProps {
22
21
  startIcon?: ReactNode;
23
22
  endIcon?: ReactNode;
24
23
  size?: Extract<Sizes, 'small' | 'medium'>;
25
- disabled?: boolean;
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' | 'disabled'> {
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<Omit<import('../../Chip/types').ChipProps, "ref"> & import('react').RefAttributes<HTMLDivElement>, "children" | "title" | "component" | "size" | "id" | "opacity" | "hidden" | "color" | "content" | "style" | "icon" | "disabled" | "variant" | "label" | "className" | "classes" | "onChange" | "sx" | "translate" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "skeletonWidth" | keyof import('react').RefAttributes<HTMLDivElement> | "endIcon" | "startIcon" | "onDelete" | "avatar" | "clickable" | "deleteIcon" | "skipFocusWhenDisabled" | "hasIconClose"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').AutocompleteOwnerState> & Record<string, unknown> & {
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.16",
3
+ "version": "9.1.17",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react/*';
2
- import { Chip } from '../../../../../src/components/mui_extended/Chip/Chip';
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 };