@moderneinc/neo-styled-components 2.8.0-next.8fabcb → 2.8.0-next.9034c2
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/dist/Tag/Tag.d.ts +12 -7
- package/dist/index.d.ts +11 -8
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/Tag/Tag.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Chip from '@mui/material/Chip';
|
|
2
|
+
import type { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
2
3
|
declare module '@mui/material/Chip' {
|
|
3
4
|
interface ChipPropsColorOverrides {
|
|
4
5
|
violet: true;
|
|
@@ -12,7 +13,7 @@ declare module '@mui/material/Chip' {
|
|
|
12
13
|
filled: true;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
type NeoTagOwnProps = {
|
|
16
17
|
/**
|
|
17
18
|
* The size of the tag
|
|
18
19
|
* @figma m (sm|md|lg)
|
|
@@ -31,7 +32,10 @@ export interface NeoTagProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
31
32
|
* @default "default"
|
|
32
33
|
*/
|
|
33
34
|
color?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet' | 'beta';
|
|
34
|
-
}
|
|
35
|
+
};
|
|
36
|
+
export type NeoTagProps<C extends ElementType = typeof Chip> = NeoTagOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof NeoTagOwnProps> & {
|
|
37
|
+
component?: C;
|
|
38
|
+
};
|
|
35
39
|
/**
|
|
36
40
|
* NeoTag - Small pill-shaped label component based on MUI Chip
|
|
37
41
|
*
|
|
@@ -43,7 +47,8 @@ export interface NeoTagProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
43
47
|
* - state (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
44
48
|
* - Label text → label prop
|
|
45
49
|
*/
|
|
46
|
-
export declare
|
|
47
|
-
|
|
48
|
-
displayName: string;
|
|
49
|
-
}
|
|
50
|
+
export declare function NeoTag<C extends ElementType = typeof Chip>({ size, variant, ...props }: NeoTagProps<C>): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare namespace NeoTag {
|
|
52
|
+
var displayName: string;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ReactNode, ElementType, HTMLAttributes, ComponentType } from 'react';
|
|
3
|
+
import React__default, { ReactNode, ElementType, HTMLAttributes, ComponentType, ComponentPropsWithoutRef } from 'react';
|
|
4
4
|
import { GridDensity, GridFilterPanel } from '@mui/x-data-grid';
|
|
5
5
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
6
|
-
import { ChipProps } from '@mui/material/Chip';
|
|
6
|
+
import Chip, { ChipProps } from '@mui/material/Chip';
|
|
7
7
|
import { AlertProps } from '@mui/material/Alert';
|
|
8
8
|
import { LinkProps } from '@mui/material/Link';
|
|
9
9
|
import * as ButtonBase from '@mui/material/ButtonBase';
|
|
@@ -2218,7 +2218,7 @@ declare module '@mui/material/Chip' {
|
|
|
2218
2218
|
filled: true;
|
|
2219
2219
|
}
|
|
2220
2220
|
}
|
|
2221
|
-
|
|
2221
|
+
type NeoTagOwnProps = {
|
|
2222
2222
|
/**
|
|
2223
2223
|
* The size of the tag
|
|
2224
2224
|
* @figma m (sm|md|lg)
|
|
@@ -2237,7 +2237,10 @@ interface NeoTagProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
2237
2237
|
* @default "default"
|
|
2238
2238
|
*/
|
|
2239
2239
|
color?: 'default' | 'error' | 'warning' | 'success' | 'info' | 'violet' | 'beta';
|
|
2240
|
-
}
|
|
2240
|
+
};
|
|
2241
|
+
type NeoTagProps<C extends ElementType = typeof Chip> = NeoTagOwnProps & Omit<ComponentPropsWithoutRef<C>, keyof NeoTagOwnProps> & {
|
|
2242
|
+
component?: C;
|
|
2243
|
+
};
|
|
2241
2244
|
/**
|
|
2242
2245
|
* NeoTag - Small pill-shaped label component based on MUI Chip
|
|
2243
2246
|
*
|
|
@@ -2249,10 +2252,10 @@ interface NeoTagProps extends Omit<ChipProps, 'variant' | 'size'> {
|
|
|
2249
2252
|
* - state (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
2250
2253
|
* - Label text → label prop
|
|
2251
2254
|
*/
|
|
2252
|
-
declare
|
|
2253
|
-
|
|
2254
|
-
displayName: string;
|
|
2255
|
-
}
|
|
2255
|
+
declare function NeoTag<C extends ElementType = typeof Chip>({ size, variant, ...props }: NeoTagProps<C>): react_jsx_runtime.JSX.Element;
|
|
2256
|
+
declare namespace NeoTag {
|
|
2257
|
+
var displayName: string;
|
|
2258
|
+
}
|
|
2256
2259
|
|
|
2257
2260
|
interface NeoToastProps extends Omit<AlertProps, 'variant' | 'severity' | 'color'> {
|
|
2258
2261
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -2847,9 +2847,9 @@ const StyledChip$1 = styled(Chip)(({ theme, size, variant, color }) => ({
|
|
|
2847
2847
|
* - state (Neutral|Error|Warning|Success|Info|Violet|Beta) → color (default|error|warning|success|info|violet|beta)
|
|
2848
2848
|
* - Label text → label prop
|
|
2849
2849
|
*/
|
|
2850
|
-
|
|
2850
|
+
function NeoTag({ size = 'small', variant = 'outlined', ...props }) {
|
|
2851
2851
|
return jsx(StyledChip$1, { size: size, variant: variant, ...props });
|
|
2852
|
-
}
|
|
2852
|
+
}
|
|
2853
2853
|
NeoTag.displayName = 'NeoTag';
|
|
2854
2854
|
|
|
2855
2855
|
/**
|