@coveord/plasma-mantine 56.9.0 → 56.10.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.
- package/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-test.log +113 -107
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/InfoToken/InfoToken.d.ts +62 -2
- package/dist/cjs/components/InfoToken/InfoToken.d.ts.map +1 -1
- package/dist/cjs/components/InfoToken/InfoToken.js +5 -0
- package/dist/cjs/components/InfoToken/InfoToken.js.map +1 -1
- package/dist/cjs/components/StatusToken/StatusToken.d.ts +31 -0
- package/dist/cjs/components/StatusToken/StatusToken.d.ts.map +1 -0
- package/dist/cjs/components/StatusToken/StatusToken.js +128 -0
- package/dist/cjs/components/StatusToken/StatusToken.js.map +1 -0
- package/dist/cjs/components/StatusToken/StatusToken.module.css +42 -0
- package/dist/cjs/components/StatusToken/icons/circle.svg +3 -0
- package/dist/cjs/components/StatusToken/icons/info.svg +5 -0
- package/dist/cjs/components/StatusToken/icons/ring.svg +3 -0
- package/dist/cjs/components/StatusToken/icons/square.svg +3 -0
- package/dist/cjs/components/StatusToken/icons/triangle.svg +3 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/svg-raw/index.d.js +3 -0
- package/dist/cjs/types/svg-raw/index.d.js.map +1 -0
- package/dist/esm/components/InfoToken/InfoToken.d.ts +62 -2
- package/dist/esm/components/InfoToken/InfoToken.d.ts.map +1 -1
- package/dist/esm/components/InfoToken/InfoToken.js +5 -0
- package/dist/esm/components/InfoToken/InfoToken.js.map +1 -1
- package/dist/esm/components/StatusToken/StatusToken.d.ts +31 -0
- package/dist/esm/components/StatusToken/StatusToken.d.ts.map +1 -0
- package/dist/esm/components/StatusToken/StatusToken.js +103 -0
- package/dist/esm/components/StatusToken/StatusToken.js.map +1 -0
- package/dist/esm/components/StatusToken/StatusToken.module.css +42 -0
- package/dist/esm/components/StatusToken/icons/circle.svg +3 -0
- package/dist/esm/components/StatusToken/icons/info.svg +5 -0
- package/dist/esm/components/StatusToken/icons/ring.svg +3 -0
- package/dist/esm/components/StatusToken/icons/square.svg +3 -0
- package/dist/esm/components/StatusToken/icons/triangle.svg +3 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/svg-raw/index.d.js +2 -0
- package/dist/esm/types/svg-raw/index.d.js.map +1 -0
- package/package.json +1 -1
- package/src/components/InfoToken/InfoToken.tsx +39 -36
- package/src/components/StatusToken/StatusToken.module.css +42 -0
- package/src/components/StatusToken/StatusToken.tsx +152 -0
- package/src/components/StatusToken/__tests__/StatusToken.component.spec.tsx +28 -0
- package/src/components/StatusToken/icons/circle.svg +3 -0
- package/src/components/StatusToken/icons/info.svg +5 -0
- package/src/components/StatusToken/icons/ring.svg +3 -0
- package/src/components/StatusToken/icons/square.svg +3 -0
- package/src/components/StatusToken/icons/triangle.svg +3 -0
- package/src/index.ts +3 -0
- package/src/types/svg-raw/index.d.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, Factory, MantineSize,
|
|
1
|
+
import { BoxProps, Factory, MantineSize, StylesApiProps } from '@mantine/core';
|
|
2
2
|
export type InfoTokenFactory = Factory<{
|
|
3
3
|
props: InfoTokenProps;
|
|
4
4
|
defaultRef: HTMLDivElement;
|
|
@@ -34,7 +34,67 @@ export interface InfoTokenProps extends BoxProps, StylesApiProps<InfoTokenFactor
|
|
|
34
34
|
*/
|
|
35
35
|
size?: MantineSize;
|
|
36
36
|
}
|
|
37
|
-
export declare const InfoToken:
|
|
37
|
+
export declare const InfoToken: (<C = "div">(props: import("@mantine/core").PolymorphicComponentProps<C, InfoTokenProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(InfoTokenProps & {
|
|
38
|
+
component?: any;
|
|
39
|
+
} & Omit<Omit<any, "ref">, "component" | keyof InfoTokenProps> & {
|
|
40
|
+
ref?: any;
|
|
41
|
+
renderRoot?: (props: any) => any;
|
|
42
|
+
}) | (InfoTokenProps & {
|
|
43
|
+
component: React.ElementType;
|
|
44
|
+
renderRoot?: (props: Record<string, any>) => any;
|
|
45
|
+
})>, never> & import("@mantine/core/lib/core/factory/factory").ThemeExtend<{
|
|
46
|
+
props: InfoTokenProps;
|
|
47
|
+
defaultRef: HTMLDivElement;
|
|
48
|
+
defaultComponent: "div";
|
|
49
|
+
stylesNames: InfoTokenComponentStylesNames;
|
|
50
|
+
vars: InfoTokenCssVariables;
|
|
51
|
+
variant: InfoTokenVariant;
|
|
52
|
+
staticComponents: {
|
|
53
|
+
Information: typeof TokenInformation;
|
|
54
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
55
|
+
Advice: typeof TokenAdvice;
|
|
56
|
+
Warning: typeof TokenWarning;
|
|
57
|
+
Error: typeof TokenError;
|
|
58
|
+
Question: typeof TokenQuestion;
|
|
59
|
+
};
|
|
60
|
+
}> & import("@mantine/core/lib/core/factory/factory").ComponentClasses<{
|
|
61
|
+
props: InfoTokenProps;
|
|
62
|
+
defaultRef: HTMLDivElement;
|
|
63
|
+
defaultComponent: "div";
|
|
64
|
+
stylesNames: InfoTokenComponentStylesNames;
|
|
65
|
+
vars: InfoTokenCssVariables;
|
|
66
|
+
variant: InfoTokenVariant;
|
|
67
|
+
staticComponents: {
|
|
68
|
+
Information: typeof TokenInformation;
|
|
69
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
70
|
+
Advice: typeof TokenAdvice;
|
|
71
|
+
Warning: typeof TokenWarning;
|
|
72
|
+
Error: typeof TokenError;
|
|
73
|
+
Question: typeof TokenQuestion;
|
|
74
|
+
};
|
|
75
|
+
}> & import("@mantine/core/lib/core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
|
|
76
|
+
props: InfoTokenProps;
|
|
77
|
+
defaultRef: HTMLDivElement;
|
|
78
|
+
defaultComponent: "div";
|
|
79
|
+
stylesNames: InfoTokenComponentStylesNames;
|
|
80
|
+
vars: InfoTokenCssVariables;
|
|
81
|
+
variant: InfoTokenVariant;
|
|
82
|
+
staticComponents: {
|
|
83
|
+
Information: typeof TokenInformation;
|
|
84
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
85
|
+
Advice: typeof TokenAdvice;
|
|
86
|
+
Warning: typeof TokenWarning;
|
|
87
|
+
Error: typeof TokenError;
|
|
88
|
+
Question: typeof TokenQuestion;
|
|
89
|
+
};
|
|
90
|
+
}> & {
|
|
91
|
+
Information: typeof TokenInformation;
|
|
92
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
93
|
+
Advice: typeof TokenAdvice;
|
|
94
|
+
Warning: typeof TokenWarning;
|
|
95
|
+
Error: typeof TokenError;
|
|
96
|
+
Question: typeof TokenQuestion;
|
|
97
|
+
};
|
|
38
98
|
declare const TokenInformation: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
|
|
39
99
|
declare const TokenInformationOutline: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
|
|
40
100
|
declare const TokenAdvice: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoToken.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"names":[],"mappings":"AASA,OAAO,EAEH,QAAQ,EAER,OAAO,EACP,WAAW,
|
|
1
|
+
{"version":3,"file":"InfoToken.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"names":[],"mappings":"AASA,OAAO,EAEH,QAAQ,EAER,OAAO,EACP,WAAW,EAEX,cAAc,EAGjB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,gBAAgB,GAA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aAAa,CAAC;KAClC;;WAbM,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,6BAA6B;UACpC,qBAAqB;aAClB,gBAAgB;sBACP;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,kBAAkB,EAAE,OAAO,uBAAuB,CAAC;QACnD,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,KAAK,EAAE,OAAO,UAAU,CAAC;QACzB,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;WAbM,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,6BAA6B;UACpC,qBAAqB;aAClB,gBAAgB;sBACP;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,kBAAkB,EAAE,OAAO,uBAAuB,CAAC;QACnD,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,KAAK,EAAE,OAAO,UAAU,CAAC;QACzB,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;iBANgB,OAAO,gBAAgB;wBAChB,OAAO,uBAAuB;YAC1C,OAAO,WAAW;aACjB,OAAO,YAAY;WACrB,OAAO,UAAU;cACd,OAAO,aAAa;CAwHpC,CAAC;AAEH,QAAA,MAAM,gBAAgB,gHAEpB,CAAC;AAEH,QAAA,MAAM,uBAAuB,gHAE3B,CAAC;AACH,QAAA,MAAM,WAAW,gHAA2C,CAAC;AAE7D,QAAA,MAAM,YAAY,gHAA4C,CAAC;AAE/D,QAAA,MAAM,UAAU,gHAA0C,CAAC;AAE3D,QAAA,MAAM,aAAa,gHAA6C,CAAC"}
|
|
@@ -122,21 +122,26 @@ var InfoToken = (0, _core.polymorphicFactory)(function(_props, ref) {
|
|
|
122
122
|
var TokenInformation = InfoToken.withProps({
|
|
123
123
|
variant: 'information'
|
|
124
124
|
});
|
|
125
|
+
TokenInformation.displayName = 'InfoToken.Information';
|
|
125
126
|
var TokenInformationOutline = InfoToken.withProps({
|
|
126
127
|
variant: 'information-outline'
|
|
127
128
|
});
|
|
128
129
|
var TokenAdvice = InfoToken.withProps({
|
|
129
130
|
variant: 'advice'
|
|
130
131
|
});
|
|
132
|
+
TokenAdvice.displayName = 'InfoToken.Advice';
|
|
131
133
|
var TokenWarning = InfoToken.withProps({
|
|
132
134
|
variant: 'warning'
|
|
133
135
|
});
|
|
136
|
+
TokenWarning.displayName = 'InfoToken.Warning';
|
|
134
137
|
var TokenError = InfoToken.withProps({
|
|
135
138
|
variant: 'error'
|
|
136
139
|
});
|
|
140
|
+
TokenError.displayName = 'InfoToken.Error';
|
|
137
141
|
var TokenQuestion = InfoToken.withProps({
|
|
138
142
|
variant: 'question'
|
|
139
143
|
});
|
|
144
|
+
TokenQuestion.displayName = 'InfoToken.Question';
|
|
140
145
|
InfoToken.Information = TokenInformation;
|
|
141
146
|
InfoToken.InformationOutline = TokenInformationOutline;
|
|
142
147
|
InfoToken.Advice = TokenAdvice;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"sourcesContent":["import {\n IconAlertSquareFilled,\n IconAlertTriangleFilled,\n IconBulbFilled,\n IconHelpCircle,\n IconInfoCircle,\n IconInfoCircleFilled,\n TablerIcon,\n} from '@coveord/plasma-react-icons';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n Factory,\n MantineSize,\n polymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport classes from './InfoToken.module.css';\n\nexport type InfoTokenFactory = Factory<{\n props: InfoTokenProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: InfoTokenComponentStylesNames;\n vars: InfoTokenCssVariables;\n variant: InfoTokenVariant;\n staticComponents: {\n Information: typeof TokenInformation;\n InformationOutline: typeof TokenInformationOutline;\n Advice: typeof TokenAdvice;\n Warning: typeof TokenWarning;\n Error: typeof TokenError;\n Question: typeof TokenQuestion;\n };\n}>;\nexport type InfoTokenComponentStylesNames = 'root';\nexport type InfoTokenVariant = 'information' | 'information-outline' | 'advice' | 'warning' | 'error' | 'question';\nexport type InfoTokenCssVariables = {\n root: '--info-token-color';\n};\n\nexport interface InfoTokenProps extends BoxProps, StylesApiProps<InfoTokenFactory> {\n /**\n * The variant of the token.\n *\n * @default 'information'\n */\n variant?: InfoTokenVariant;\n /**\n * The size of the info token.\n *\n * @default 'sm'\n */\n size?: MantineSize;\n}\n\nconst defaultProps: Partial<InfoTokenProps> = {variant: 'information', size: 'xs'};\n\nconst colorResolver = (variant: InfoTokenVariant): string => {\n switch (variant) {\n case 'error':\n return 'var(--mantine-color-error)';\n case 'advice':\n case 'question':\n return 'var(--coveo-color-text-primary)';\n case 'warning':\n return 'var(--mantine-color-warning-filled)';\n case 'information':\n default:\n return 'var(--mantine-color-gray-3)';\n }\n};\n\nconst sizeResolver = (size: MantineSize): number => {\n if (typeof size === 'number') {\n return size;\n }\n switch (size) {\n case 'sm':\n return 20;\n case 'md':\n return 24;\n case 'lg':\n return 32;\n case 'xl':\n return 40;\n case 'xs':\n default:\n return 16;\n }\n};\n\nconst iconResolver = (variant: InfoTokenVariant): TablerIcon => {\n switch (variant) {\n case 'error':\n return IconAlertSquareFilled;\n case 'information':\n return IconInfoCircleFilled;\n case 'information-outline':\n return IconInfoCircle;\n case 'question':\n return IconHelpCircle;\n case 'warning':\n return IconAlertTriangleFilled;\n case 'advice':\n default:\n return IconBulbFilled;\n }\n};\n\nconst varsResolver = createVarsResolver<InfoTokenFactory>((_theme, {variant}) => {\n const color = colorResolver(variant);\n return {\n root: {\n '--info-token-color': color,\n },\n };\n});\n\nexport const InfoToken
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"sourcesContent":["import {\n IconAlertSquareFilled,\n IconAlertTriangleFilled,\n IconBulbFilled,\n IconHelpCircle,\n IconInfoCircle,\n IconInfoCircleFilled,\n TablerIcon,\n} from '@coveord/plasma-react-icons';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n Factory,\n MantineSize,\n polymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport classes from './InfoToken.module.css';\n\nexport type InfoTokenFactory = Factory<{\n props: InfoTokenProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: InfoTokenComponentStylesNames;\n vars: InfoTokenCssVariables;\n variant: InfoTokenVariant;\n staticComponents: {\n Information: typeof TokenInformation;\n InformationOutline: typeof TokenInformationOutline;\n Advice: typeof TokenAdvice;\n Warning: typeof TokenWarning;\n Error: typeof TokenError;\n Question: typeof TokenQuestion;\n };\n}>;\nexport type InfoTokenComponentStylesNames = 'root';\nexport type InfoTokenVariant = 'information' | 'information-outline' | 'advice' | 'warning' | 'error' | 'question';\nexport type InfoTokenCssVariables = {\n root: '--info-token-color';\n};\n\nexport interface InfoTokenProps extends BoxProps, StylesApiProps<InfoTokenFactory> {\n /**\n * The variant of the token.\n *\n * @default 'information'\n */\n variant?: InfoTokenVariant;\n /**\n * The size of the info token.\n *\n * @default 'sm'\n */\n size?: MantineSize;\n}\n\nconst defaultProps: Partial<InfoTokenProps> = {variant: 'information', size: 'xs'};\n\nconst colorResolver = (variant: InfoTokenVariant): string => {\n switch (variant) {\n case 'error':\n return 'var(--mantine-color-error)';\n case 'advice':\n case 'question':\n return 'var(--coveo-color-text-primary)';\n case 'warning':\n return 'var(--mantine-color-warning-filled)';\n case 'information':\n default:\n return 'var(--mantine-color-gray-3)';\n }\n};\n\nconst sizeResolver = (size: MantineSize): number => {\n if (typeof size === 'number') {\n return size;\n }\n switch (size) {\n case 'sm':\n return 20;\n case 'md':\n return 24;\n case 'lg':\n return 32;\n case 'xl':\n return 40;\n case 'xs':\n default:\n return 16;\n }\n};\n\nconst iconResolver = (variant: InfoTokenVariant): TablerIcon => {\n switch (variant) {\n case 'error':\n return IconAlertSquareFilled;\n case 'information':\n return IconInfoCircleFilled;\n case 'information-outline':\n return IconInfoCircle;\n case 'question':\n return IconHelpCircle;\n case 'warning':\n return IconAlertTriangleFilled;\n case 'advice':\n default:\n return IconBulbFilled;\n }\n};\n\nconst varsResolver = createVarsResolver<InfoTokenFactory>((_theme, {variant}) => {\n const color = colorResolver(variant);\n return {\n root: {\n '--info-token-color': color,\n },\n };\n});\n\nexport const InfoToken = polymorphicFactory<InfoTokenFactory>((_props, ref) => {\n const props = useProps('InfoToken', defaultProps, _props);\n const {variant, vars, className, style, unstyled, styles, classNames, size, ...others} = props;\n const getStyles = useStyles<InfoTokenFactory>({\n name: 'InfoToken',\n classes,\n className,\n props,\n style,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n const IconComponent = iconResolver(variant);\n return (\n <Box\n ref={ref}\n variant={variant}\n role=\"img\"\n aria-label={variant}\n size={size}\n {...getStyles('root', {\n className,\n style,\n styles,\n classNames,\n })}\n {...others}\n >\n <IconComponent size={sizeResolver(size)} />\n </Box>\n );\n});\n\nconst TokenInformation = InfoToken.withProps({\n variant: 'information',\n});\n(TokenInformation as typeof InfoToken).displayName = 'InfoToken.Information';\nconst TokenInformationOutline = InfoToken.withProps({\n variant: 'information-outline',\n});\nconst TokenAdvice = InfoToken.withProps({variant: 'advice'});\n(TokenAdvice as typeof InfoToken).displayName = 'InfoToken.Advice';\nconst TokenWarning = InfoToken.withProps({variant: 'warning'});\n(TokenWarning as typeof InfoToken).displayName = 'InfoToken.Warning';\nconst TokenError = InfoToken.withProps({variant: 'error'});\n(TokenError as typeof InfoToken).displayName = 'InfoToken.Error';\nconst TokenQuestion = InfoToken.withProps({variant: 'question'});\n(TokenQuestion as typeof InfoToken).displayName = 'InfoToken.Question';\n\nInfoToken.Information = TokenInformation;\nInfoToken.InformationOutline = TokenInformationOutline;\nInfoToken.Advice = TokenAdvice;\nInfoToken.Warning = TokenWarning;\nInfoToken.Error = TokenError;\nInfoToken.Question = TokenQuestion;\n"],"names":["InfoToken","defaultProps","variant","size","colorResolver","sizeResolver","iconResolver","IconAlertSquareFilled","IconInfoCircleFilled","IconInfoCircle","IconHelpCircle","IconAlertTriangleFilled","IconBulbFilled","varsResolver","createVarsResolver","_theme","color","root","polymorphicFactory","_props","ref","props","useProps","vars","className","style","unstyled","styles","classNames","others","getStyles","useStyles","name","classes","IconComponent","Box","role","aria-label","TokenInformation","withProps","displayName","TokenInformationOutline","TokenAdvice","TokenWarning","TokenError","TokenQuestion","Information","InformationOutline","Advice","Warning","Error","Question"],"mappings":";;;;+BA0HaA;;;eAAAA;;;;;;;;gCAlHN;oBAWA;2EACa;AAuCpB,IAAMC,eAAwC;IAACC,SAAS;IAAeC,MAAM;AAAI;AAEjF,IAAMC,gBAAgB,SAACF;IACnB,OAAQA;QACJ,KAAK;YACD,OAAO;QACX,KAAK;QACL,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;QACL;YACI,OAAO;IACf;AACJ;AAEA,IAAMG,eAAe,SAACF;IAClB,IAAI,OAAOA,SAAS,UAAU;QAC1B,OAAOA;IACX;IACA,OAAQA;QACJ,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;YACD,OAAO;QACX,KAAK;QACL;YACI,OAAO;IACf;AACJ;AAEA,IAAMG,eAAe,SAACJ;IAClB,OAAQA;QACJ,KAAK;YACD,OAAOK,uCAAqB;QAChC,KAAK;YACD,OAAOC,sCAAoB;QAC/B,KAAK;YACD,OAAOC,gCAAc;QACzB,KAAK;YACD,OAAOC,gCAAc;QACzB,KAAK;YACD,OAAOC,yCAAuB;QAClC,KAAK;QACL;YACI,OAAOC,gCAAc;IAC7B;AACJ;AAEA,IAAMC,eAAeC,IAAAA,wBAAkB,EAAmB,SAACC;QAASb,gBAAAA;IAChE,IAAMc,QAAQZ,cAAcF;IAC5B,OAAO;QACHe,MAAM;YACF,sBAAsBD;QAC1B;IACJ;AACJ;AAEO,IAAMhB,YAAYkB,IAAAA,wBAAkB,EAAmB,SAACC,QAAQC;IACnE,IAAMC,QAA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SAAS,CAAC;IAACrC,SAAS;AAAU;AAC7D2C,cAAmCL,WAAW,GAAG;AAElDxC,UAAU8C,WAAW,GAAGR;AACxBtC,UAAU+C,kBAAkB,GAAGN;AAC/BzC,UAAUgD,MAAM,GAAGN;AACnB1C,UAAUiD,OAAO,GAAGN;AACpB3C,UAAUkD,KAAK,GAAGN;AAClB5C,UAAUmD,QAAQ,GAAGN"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BoxProps, Factory, MantineSize, polymorphicFactory, StylesApiProps } from '@mantine/core';
|
|
2
|
+
export type StatusTokenFactory = Factory<{
|
|
3
|
+
props: StatusTokenProps;
|
|
4
|
+
defaultRef: HTMLDivElement;
|
|
5
|
+
defaultComponent: 'div';
|
|
6
|
+
stylesNames: StatusTokenComponentStylesNames;
|
|
7
|
+
vars: StatusTokenCssVariables;
|
|
8
|
+
variant: StatusTokenVariant;
|
|
9
|
+
}>;
|
|
10
|
+
export type StatusTokenComponentStylesNames = 'root';
|
|
11
|
+
export type StatusTokenVariant = 'info' | 'success' | 'caution' | 'error' | 'disabled' | 'waiting' | 'edited' | 'new';
|
|
12
|
+
export type StatusTokenSize = Extract<MantineSize, 'sm' | 'lg'>;
|
|
13
|
+
export type StatusTokenCssVariables = {
|
|
14
|
+
root: '--status-token-color' | '--status-token-size';
|
|
15
|
+
};
|
|
16
|
+
export interface StatusTokenProps extends BoxProps, StylesApiProps<StatusTokenFactory> {
|
|
17
|
+
/**
|
|
18
|
+
* The size of the token.
|
|
19
|
+
*
|
|
20
|
+
* @default 'lg'
|
|
21
|
+
*/
|
|
22
|
+
size?: StatusTokenSize;
|
|
23
|
+
/**
|
|
24
|
+
* The variant of the token.
|
|
25
|
+
*
|
|
26
|
+
* @default 'info'
|
|
27
|
+
*/
|
|
28
|
+
variant?: StatusTokenVariant;
|
|
29
|
+
}
|
|
30
|
+
export declare const StatusToken: ReturnType<typeof polymorphicFactory<StatusTokenFactory>>;
|
|
31
|
+
//# sourceMappingURL=StatusToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusToken.d.ts","sourceRoot":"","sources":["../../../../src/components/StatusToken/StatusToken.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,QAAQ,EAER,OAAO,EAEP,WAAW,EAEX,kBAAkB,EAClB,cAAc,EAGjB,MAAM,eAAe,CAAC;AASvB,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,EAAE,KAAK,CAAC;IACxB,WAAW,EAAE,+BAA+B,CAAC;IAC7C,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,kBAAkB,CAAC;CAC/B,CAAC,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAC;AACtH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;AAChE,MAAM,MAAM,uBAAuB,GAAG;IAClC,IAAI,EAAE,sBAAsB,GAAG,qBAAqB,CAAC;CACxD,CAAC;AAEF,MAAM,WAAW,gBAAiB,SAAQ,QAAQ,EAAE,cAAc,CAAC,kBAAkB,CAAC;IAClF;;;;OAIG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAChC;AAkED,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,kBAAkB,CAAC,CAkC5E,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "StatusToken", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return StatusToken;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
13
|
+
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
14
|
+
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
15
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
16
|
+
var _core = require("@mantine/core");
|
|
17
|
+
var _circlesvgraw = /*#__PURE__*/ _interop_require_default._(require("./icons/circle.svg?raw"));
|
|
18
|
+
var _ringsvgraw = /*#__PURE__*/ _interop_require_default._(require("./icons/ring.svg?raw"));
|
|
19
|
+
var _squaresvgraw = /*#__PURE__*/ _interop_require_default._(require("./icons/square.svg?raw"));
|
|
20
|
+
var _trianglesvgraw = /*#__PURE__*/ _interop_require_default._(require("./icons/triangle.svg?raw"));
|
|
21
|
+
var _infosvgraw = /*#__PURE__*/ _interop_require_default._(require("./icons/info.svg?raw"));
|
|
22
|
+
var _StatusTokenmodulecss = /*#__PURE__*/ _interop_require_default._(require("./StatusToken.module.css"));
|
|
23
|
+
var defaultProps = {
|
|
24
|
+
size: 'lg',
|
|
25
|
+
variant: 'info'
|
|
26
|
+
};
|
|
27
|
+
var resolveThemeColorFromVariant = function(variant, theme) {
|
|
28
|
+
switch(variant){
|
|
29
|
+
case 'success':
|
|
30
|
+
return theme.colors.green[4];
|
|
31
|
+
case 'caution':
|
|
32
|
+
return theme.colors.yellow[4];
|
|
33
|
+
case 'error':
|
|
34
|
+
return theme.colors.red[5];
|
|
35
|
+
case 'disabled':
|
|
36
|
+
case 'waiting':
|
|
37
|
+
return theme.colors.gray[5];
|
|
38
|
+
case 'edited':
|
|
39
|
+
case 'new':
|
|
40
|
+
return 'var(--mantine-primary-color-filled)';
|
|
41
|
+
case 'info':
|
|
42
|
+
return theme.colors.gray[3];
|
|
43
|
+
default:
|
|
44
|
+
return theme.colors.navy[5];
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var resolveSize = function(size) {
|
|
48
|
+
return size === 'sm' ? 8 : 12;
|
|
49
|
+
};
|
|
50
|
+
var resolveIconSrcFromVariant = function(variant) {
|
|
51
|
+
switch(variant){
|
|
52
|
+
case 'caution':
|
|
53
|
+
return _trianglesvgraw.default;
|
|
54
|
+
case 'error':
|
|
55
|
+
return _squaresvgraw.default;
|
|
56
|
+
case 'disabled':
|
|
57
|
+
return _ringsvgraw.default;
|
|
58
|
+
case 'info':
|
|
59
|
+
return _infosvgraw.default;
|
|
60
|
+
case 'success':
|
|
61
|
+
case 'waiting':
|
|
62
|
+
case 'edited':
|
|
63
|
+
case 'new':
|
|
64
|
+
default:
|
|
65
|
+
return _circlesvgraw.default;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var varsResolver = (0, _core.createVarsResolver)(function(theme, param) {
|
|
69
|
+
var variant = param.variant, size = param.size;
|
|
70
|
+
var color = resolveThemeColorFromVariant(variant, theme);
|
|
71
|
+
return {
|
|
72
|
+
root: {
|
|
73
|
+
'--status-token-color': color,
|
|
74
|
+
'--status-token-size': (0, _core.getSize)(resolveSize(size), 'status-token-size')
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
var statusTokenLabels = {
|
|
79
|
+
info: 'Info',
|
|
80
|
+
success: 'Success',
|
|
81
|
+
caution: 'Caution',
|
|
82
|
+
error: 'Error',
|
|
83
|
+
disabled: 'Disabled',
|
|
84
|
+
waiting: 'Waiting',
|
|
85
|
+
edited: 'Edited',
|
|
86
|
+
new: 'New'
|
|
87
|
+
};
|
|
88
|
+
var StatusToken = (0, _core.polymorphicFactory)(function(props, ref) {
|
|
89
|
+
var _useProps = (0, _core.useProps)('StatusToken', defaultProps, props), variant = _useProps.variant, vars = _useProps.vars, size = _useProps.size, className = _useProps.className, style = _useProps.style, unstyled = _useProps.unstyled, styles = _useProps.styles, classNames = _useProps.classNames, others = _object_without_properties._(_useProps, [
|
|
90
|
+
"variant",
|
|
91
|
+
"vars",
|
|
92
|
+
"size",
|
|
93
|
+
"className",
|
|
94
|
+
"style",
|
|
95
|
+
"unstyled",
|
|
96
|
+
"styles",
|
|
97
|
+
"classNames"
|
|
98
|
+
]);
|
|
99
|
+
var getStyles = (0, _core.useStyles)({
|
|
100
|
+
name: 'StatusToken',
|
|
101
|
+
classes: _StatusTokenmodulecss.default,
|
|
102
|
+
className: className,
|
|
103
|
+
props: props,
|
|
104
|
+
style: style,
|
|
105
|
+
styles: styles,
|
|
106
|
+
unstyled: unstyled,
|
|
107
|
+
vars: vars,
|
|
108
|
+
varsResolver: varsResolver
|
|
109
|
+
});
|
|
110
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Box, _object_spread._(_object_spread_props._(_object_spread._({
|
|
111
|
+
ref: ref,
|
|
112
|
+
variant: variant,
|
|
113
|
+
role: "img",
|
|
114
|
+
"aria-label": statusTokenLabels[variant]
|
|
115
|
+
}, getStyles('root', {
|
|
116
|
+
className: className,
|
|
117
|
+
style: style,
|
|
118
|
+
styles: styles,
|
|
119
|
+
classNames: classNames
|
|
120
|
+
})), {
|
|
121
|
+
dangerouslySetInnerHTML: {
|
|
122
|
+
__html: resolveIconSrcFromVariant(variant)
|
|
123
|
+
}
|
|
124
|
+
}), others));
|
|
125
|
+
});
|
|
126
|
+
StatusToken.displayName = 'StatusToken';
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=StatusToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/StatusToken/StatusToken.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n Factory,\n getSize,\n MantineSize,\n MantineTheme,\n polymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\n\nimport Circle from './icons/circle.svg?raw';\nimport Ring from './icons/ring.svg?raw';\nimport Square from './icons/square.svg?raw';\nimport Triangle from './icons/triangle.svg?raw';\nimport Info from './icons/info.svg?raw';\nimport classes from './StatusToken.module.css';\n\nexport type StatusTokenFactory = Factory<{\n props: StatusTokenProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: StatusTokenComponentStylesNames;\n vars: StatusTokenCssVariables;\n variant: StatusTokenVariant;\n}>;\nexport type StatusTokenComponentStylesNames = 'root';\nexport type StatusTokenVariant = 'info' | 'success' | 'caution' | 'error' | 'disabled' | 'waiting' | 'edited' | 'new';\nexport type StatusTokenSize = Extract<MantineSize, 'sm' | 'lg'>;\nexport type StatusTokenCssVariables = {\n root: '--status-token-color' | '--status-token-size';\n};\n\nexport interface StatusTokenProps extends BoxProps, StylesApiProps<StatusTokenFactory> {\n /**\n * The size of the token.\n *\n * @default 'lg'\n */\n size?: StatusTokenSize;\n /**\n * The variant of the token.\n *\n * @default 'info'\n */\n variant?: StatusTokenVariant;\n}\n\nconst defaultProps: Partial<StatusTokenProps> = {size: 'lg', variant: 'info'};\n\nconst resolveThemeColorFromVariant = (variant: StatusTokenVariant, theme: MantineTheme): string => {\n switch (variant) {\n case 'success':\n return theme.colors.green[4];\n case 'caution':\n return theme.colors.yellow[4];\n case 'error':\n return theme.colors.red[5];\n case 'disabled':\n case 'waiting':\n return theme.colors.gray[5];\n case 'edited':\n case 'new':\n return 'var(--mantine-primary-color-filled)';\n case 'info':\n return theme.colors.gray[3];\n default:\n return theme.colors.navy[5];\n }\n};\nconst resolveSize = (size: StatusTokenSize): number => (size === 'sm' ? 8 : 12);\n\nconst resolveIconSrcFromVariant = (variant: StatusTokenVariant): string => {\n switch (variant) {\n case 'caution':\n return Triangle;\n case 'error':\n return Square;\n case 'disabled':\n return Ring;\n case 'info':\n return Info;\n case 'success':\n case 'waiting':\n case 'edited':\n case 'new':\n default:\n return Circle;\n }\n};\n\nconst varsResolver = createVarsResolver<StatusTokenFactory>((theme, {variant, size}) => {\n const color = resolveThemeColorFromVariant(variant, theme);\n return {\n root: {\n '--status-token-color': color,\n '--status-token-size': getSize(resolveSize(size), 'status-token-size'),\n },\n };\n});\n\nconst statusTokenLabels: Record<StatusTokenVariant, string> = {\n info: 'Info',\n success: 'Success',\n caution: 'Caution',\n error: 'Error',\n disabled: 'Disabled',\n waiting: 'Waiting',\n edited: 'Edited',\n new: 'New',\n};\n\nexport const StatusToken: ReturnType<typeof polymorphicFactory<StatusTokenFactory>> =\n polymorphicFactory<StatusTokenFactory>((props, ref) => {\n const {variant, vars, size, className, style, unstyled, styles, classNames, ...others} = useProps(\n 'StatusToken',\n defaultProps,\n props,\n );\n const getStyles = useStyles<StatusTokenFactory>({\n name: 'StatusToken',\n classes,\n className,\n props,\n style,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n return (\n <Box\n ref={ref}\n variant={variant}\n role=\"img\"\n aria-label={statusTokenLabels[variant]}\n {...getStyles('root', {\n className,\n style,\n styles,\n classNames,\n })}\n dangerouslySetInnerHTML={{__html: resolveIconSrcFromVariant(variant)}}\n {...others}\n />\n );\n });\n\nStatusToken.displayName = 'StatusToken';\n"],"names":["StatusToken","defaultProps","size","variant","resolveThemeColorFromVariant","theme","colors","green","yellow","red","gray","navy","resolveSize","resolveIconSrcFromVariant","Triangle","Square","Ring","Info","Circle","varsResolver","createVarsResolver","color","root","getSize","statusTokenLabels","info","success","caution","error","disabled","waiting","edited","new","polymorphicFactory","props","ref","useProps","vars","className","style","unstyled","styles","classNames","others","getStyles","useStyles","name","classes","Box","role","aria-label","dangerouslySetInnerHTML","__html","displayName"],"mappings":";;;;+BAmHaA;;;eAAAA;;;;;;;;oBAvGN;qEAEY;mEACF;qEACE;uEACE;mEACJ;6EACG;AAgCpB,IAAMC,eAA0C;IAACC,MAAM;IAAMC,SAAS;AAAM;AAE5E,IAAMC,+BAA+B,SAACD,SAA6BE;IAC/D,OAAQF;QACJ,KAAK;YACD,OAAOE,MAAMC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nElC,MAAMoC,YAA6DF,UAA7DE,WAAWC,QAAkDH,UAAlDG,OAAOC,WAA2CJ,UAA3CI,UAAUC,SAAiCL,UAAjCK,QAAQC,aAAyBN,UAAzBM,YAAeC,sCAAUP;QAAlFjC;QAASkC;QAAMnC;QAAMoC;QAAWC;QAAOC;QAAUC;QAAQC;;IAKhE,IAAME,YAAYC,IAAAA,eAAS,EAAqB;QAC5CC,MAAM;QACNC,SAAAA,6BAAO;QACPT,WAAAA;QACAJ,OAAAA;QACAK,OAAAA;QACAE,QAAAA;QACAD,UAAAA;QACAH,MAAAA;QACAlB,cAAAA;IACJ;IACA,qBACI,qBAAC6B,SAAG;QACAb,KAAKA;QACLhC,SAASA;QACT8C,MAAK;QACLC,cAAY1B,iBAAiB,CAACrB,QAAQ;OAClCyC,UAAU,QAAQ;QAClBN,WAAAA;QACAC,OAAAA;QACAE,QAAAA;QACAC,YAAAA;IACJ;QACAS,yBAAyB;YAACC,QAAQvC,0BAA0BV;QAAQ;QAChEwC;AAGhB;AAEJ3C,YAAYqD,WAAW,GAAG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
--status-token-color: var(--mantine-primary-color-filled);
|
|
3
|
+
--status-token-size: 12px;
|
|
4
|
+
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
align-items: center;
|
|
8
|
+
width: var(--status-token-size);
|
|
9
|
+
height: var(--status-token-size);
|
|
10
|
+
color: var(--status-token-color);
|
|
11
|
+
|
|
12
|
+
&:where([data-variant='waiting']) {
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
&::before {
|
|
16
|
+
position: absolute;
|
|
17
|
+
z-index: -1;
|
|
18
|
+
background-color: var(--status-token-color);
|
|
19
|
+
border-radius: 100%;
|
|
20
|
+
animation: pulse 1000ms linear infinite;
|
|
21
|
+
content: '';
|
|
22
|
+
inset: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
svg {
|
|
27
|
+
width: var(--status-token-size);
|
|
28
|
+
height: var(--status-token-size);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes pulse {
|
|
33
|
+
0% {
|
|
34
|
+
transform: scale(0);
|
|
35
|
+
opacity: 0.6;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
100% {
|
|
39
|
+
transform: scale(2.8);
|
|
40
|
+
opacity: 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="12" height="13" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
d="M6 0.125C9.3138 0.125 12 2.81014 12 6.12263C12.0012 7.69729 11.3829 9.20927 10.2785 10.3321C9.17415 11.455 7.67229 12.0987 6.09721 12.1242C4.52214 12.1497 3.0002 11.555 1.86 10.4685C0.719794 9.38199 0.0527931 7.89082 0.00300007 6.31695L0 6.12263L0.00239997 5.95469C0.0912 2.72017 2.742 0.125 6 0.125ZM6 5.52286H5.4L5.3298 5.52706C5.18397 5.5444 5.04957 5.6146 4.95205 5.72436C4.85453 5.83413 4.80067 5.97583 4.80067 6.12263C4.80067 6.26943 4.85453 6.41113 4.95205 6.52089C5.04957 6.63065 5.18397 6.70085 5.3298 6.71819L5.4 6.72239V8.52168L5.4042 8.59185C5.41999 8.72573 5.48045 8.85038 5.57581 8.9457C5.67117 9.04103 5.79587 9.10145 5.9298 9.11724L6 9.12144H6.6L6.6702 9.11724C6.80413 9.10145 6.92883 9.04103 7.02419 8.9457C7.11955 8.85038 7.18 8.72573 7.1958 8.59185L7.2 8.52168L7.1958 8.45151C7.18146 8.32914 7.12976 8.21416 7.04774 8.1222C6.96573 8.03023 6.85737 7.96575 6.7374 7.93751L6.6702 7.92551L6.6 7.92192V6.12263L6.5958 6.05246C6.58 5.91858 6.51955 5.79392 6.42419 5.6986C6.32883 5.60328 6.20413 5.54285 6.0702 5.52706L6 5.52286ZM6.006 3.72358L5.9298 3.72777C5.78397 3.74511 5.64957 3.81531 5.55205 3.92508C5.45453 4.03484 5.40067 4.17654 5.40067 4.32334C5.40067 4.47014 5.45453 4.61184 5.55205 4.7216C5.64957 4.83136 5.78397 4.90156 5.9298 4.9189L6 4.9231L6.0762 4.9189C6.22203 4.90156 6.35643 4.83136 6.45395 4.7216C6.55147 4.61184 6.60533 4.47014 6.60533 4.32334C6.60533 4.17654 6.55147 4.03484 6.45395 3.92508C6.35643 3.81531 6.22203 3.74511 6.0762 3.72777L6.006 3.72358Z"
|
|
4
|
+
fill="currentColor" />
|
|
5
|
+
</svg>
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from './components/DateTimeRangePicker/DateTimeRangePicker.js';
|
|
|
33
33
|
export * from './components/EllipsisText/EllipsisText.js';
|
|
34
34
|
export { Header, type HeaderBreadcrumbsProps, type HeaderDocAnchorProps, type HeaderFactory, type HeaderProps, type HeaderRightProps, type HeaderStyleNames, type HeaderVariant, } from './components/Header/Header.js';
|
|
35
35
|
export * from './components/InfoToken/InfoToken.js';
|
|
36
|
+
export * from './components/StatusToken/StatusToken.js';
|
|
36
37
|
export * from './components/InlineConfirm/InlineConfirm.js';
|
|
37
38
|
export * from './components/InlineConfirm/InlineConfirmContext.js';
|
|
38
39
|
export * from './components/LastUpdated/LastUpdated.js';
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACvD,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAE1D,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;A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;KAC1B;CACJ"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -105,6 +105,7 @@ _export_star._(require("./components/DateTimeRangePicker/DateTimeRangePicker.js"
|
|
|
105
105
|
_export_star._(require("./components/EllipsisText/EllipsisText.js"), exports);
|
|
106
106
|
var _Header = require("./components/Header/Header.js");
|
|
107
107
|
_export_star._(require("./components/InfoToken/InfoToken.js"), exports);
|
|
108
|
+
_export_star._(require("./components/StatusToken/StatusToken.js"), exports);
|
|
108
109
|
_export_star._(require("./components/InlineConfirm/InlineConfirm.js"), exports);
|
|
109
110
|
_export_star._(require("./components/InlineConfirm/InlineConfirmContext.js"), exports);
|
|
110
111
|
_export_star._(require("./components/LastUpdated/LastUpdated.js"), exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {TableActionsColumn} from './components/Table/table-column/TableActionsColumn.js';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["Accordion","ActionIcon","Alert","Badge","Button","Chip","Header","Menu","Modal","Pagination","PasswordInput","RadioCard","Select","Table","TableActionsColumn","TableComponentsOrder","enhanceWithCollectionProps","noop","renderTableCell","flexRender","useTable","useTableContext","useUrlSyncedState"],"mappings":";;;;;;;;;;;QAgBQA;eAAAA,oBAAS;;QAGTC;eAAAA,sBAAU;;QAGVC;eAAAA,YAAK;;QAITC;eAAAA,YAAK;;QAaDC;eAAAA,cAAM;;QAUNC;eAAAA,UAAI;;QA0BRC;eAAAA,cAAM;;
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Status Token\nexport * from './components/StatusToken/StatusToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {TableActionsColumn} from './components/Table/table-column/TableActionsColumn.js';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["Accordion","ActionIcon","Alert","Badge","Button","Chip","Header","Menu","Modal","Pagination","PasswordInput","RadioCard","Select","Table","TableActionsColumn","TableComponentsOrder","enhanceWithCollectionProps","noop","renderTableCell","flexRender","useTable","useTableContext","useUrlSyncedState"],"mappings":";;;;;;;;;;;QAgBQA;eAAAA,oBAAS;;QAGTC;eAAAA,sBAAU;;QAGVC;eAAAA,YAAK;;QAITC;eAAAA,YAAK;;QAaDC;eAAAA,cAAM;;QAUNC;eAAAA,UAAI;;QA0BRC;eAAAA,cAAM;;QA2BFC;eAAAA,UAAI;;QAGJC;eAAAA,YAAK;;QAnGLC;eAAAA,gBAAU;;QA6GVC;eAAAA,4BAAa;;QAHbC;eAAAA,oBAAS;;QAITC;eAAAA,cAAM;;QASNC;eAAAA,YAAK;;QAFLC;eAAAA,sCAAkB;;QAEXC;eAAAA,2BAAoB;;QArE3BC;eAAAA,sDAA0B;;QAgF1BC;eAAAA,UAAI;;QAdUC;eAAdC,sBAAU;;QAWVC;eAAAA,kBAAQ;;QADRC;eAAAA,6BAAe;;QAEfC;eAAAA,oCAAiB;;;;mCAtIc;uBAIzB;uBAIA;uBACA;uBACA;uBAEA;yBAIU;0BAGuB;qBAG3B;qBAQb;uBAGO;uBAGA;sBAGyB;uBAIzB;uBAGA;oBAGK;uBAGL;uBAGA;0CAC2B;uBAG3B;uBAGA;uBACA;uBACA;uBACA;uBAGA;uBAGA;sBAYP;uBAGO;uBAGA;uBAGA;uBACA;uBAGA;uBAGA;oBAGyB;qBAGiB;uBAC1C;uBAGA;yBAG+B;6BAGjB;sBACP;uBAGP;0BAG8B;kCACX;qBAEkC;4BAOrC;wBACiD;iCACO;uBAKxE;uBACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/types/svg-raw/index.d.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoxProps, Factory, MantineSize,
|
|
1
|
+
import { BoxProps, Factory, MantineSize, StylesApiProps } from '@mantine/core';
|
|
2
2
|
export type InfoTokenFactory = Factory<{
|
|
3
3
|
props: InfoTokenProps;
|
|
4
4
|
defaultRef: HTMLDivElement;
|
|
@@ -34,7 +34,67 @@ export interface InfoTokenProps extends BoxProps, StylesApiProps<InfoTokenFactor
|
|
|
34
34
|
*/
|
|
35
35
|
size?: MantineSize;
|
|
36
36
|
}
|
|
37
|
-
export declare const InfoToken:
|
|
37
|
+
export declare const InfoToken: (<C = "div">(props: import("@mantine/core").PolymorphicComponentProps<C, InfoTokenProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(InfoTokenProps & {
|
|
38
|
+
component?: any;
|
|
39
|
+
} & Omit<Omit<any, "ref">, "component" | keyof InfoTokenProps> & {
|
|
40
|
+
ref?: any;
|
|
41
|
+
renderRoot?: (props: any) => any;
|
|
42
|
+
}) | (InfoTokenProps & {
|
|
43
|
+
component: React.ElementType;
|
|
44
|
+
renderRoot?: (props: Record<string, any>) => any;
|
|
45
|
+
})>, never> & import("node_modules/@mantine/core/lib/core/factory/factory").ThemeExtend<{
|
|
46
|
+
props: InfoTokenProps;
|
|
47
|
+
defaultRef: HTMLDivElement;
|
|
48
|
+
defaultComponent: "div";
|
|
49
|
+
stylesNames: InfoTokenComponentStylesNames;
|
|
50
|
+
vars: InfoTokenCssVariables;
|
|
51
|
+
variant: InfoTokenVariant;
|
|
52
|
+
staticComponents: {
|
|
53
|
+
Information: typeof TokenInformation;
|
|
54
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
55
|
+
Advice: typeof TokenAdvice;
|
|
56
|
+
Warning: typeof TokenWarning;
|
|
57
|
+
Error: typeof TokenError;
|
|
58
|
+
Question: typeof TokenQuestion;
|
|
59
|
+
};
|
|
60
|
+
}> & import("node_modules/@mantine/core/lib/core/factory/factory").ComponentClasses<{
|
|
61
|
+
props: InfoTokenProps;
|
|
62
|
+
defaultRef: HTMLDivElement;
|
|
63
|
+
defaultComponent: "div";
|
|
64
|
+
stylesNames: InfoTokenComponentStylesNames;
|
|
65
|
+
vars: InfoTokenCssVariables;
|
|
66
|
+
variant: InfoTokenVariant;
|
|
67
|
+
staticComponents: {
|
|
68
|
+
Information: typeof TokenInformation;
|
|
69
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
70
|
+
Advice: typeof TokenAdvice;
|
|
71
|
+
Warning: typeof TokenWarning;
|
|
72
|
+
Error: typeof TokenError;
|
|
73
|
+
Question: typeof TokenQuestion;
|
|
74
|
+
};
|
|
75
|
+
}> & import("node_modules/@mantine/core/lib/core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
|
|
76
|
+
props: InfoTokenProps;
|
|
77
|
+
defaultRef: HTMLDivElement;
|
|
78
|
+
defaultComponent: "div";
|
|
79
|
+
stylesNames: InfoTokenComponentStylesNames;
|
|
80
|
+
vars: InfoTokenCssVariables;
|
|
81
|
+
variant: InfoTokenVariant;
|
|
82
|
+
staticComponents: {
|
|
83
|
+
Information: typeof TokenInformation;
|
|
84
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
85
|
+
Advice: typeof TokenAdvice;
|
|
86
|
+
Warning: typeof TokenWarning;
|
|
87
|
+
Error: typeof TokenError;
|
|
88
|
+
Question: typeof TokenQuestion;
|
|
89
|
+
};
|
|
90
|
+
}> & {
|
|
91
|
+
Information: typeof TokenInformation;
|
|
92
|
+
InformationOutline: typeof TokenInformationOutline;
|
|
93
|
+
Advice: typeof TokenAdvice;
|
|
94
|
+
Warning: typeof TokenWarning;
|
|
95
|
+
Error: typeof TokenError;
|
|
96
|
+
Question: typeof TokenQuestion;
|
|
97
|
+
};
|
|
38
98
|
declare const TokenInformation: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
|
|
39
99
|
declare const TokenInformationOutline: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
|
|
40
100
|
declare const TokenAdvice: <L = "div">(props: import("@mantine/core").PolymorphicComponentProps<L, InfoTokenProps>) => React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoToken.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"names":[],"mappings":"AASA,OAAO,EAEH,QAAQ,EAER,OAAO,EACP,WAAW,
|
|
1
|
+
{"version":3,"file":"InfoToken.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoToken/InfoToken.tsx"],"names":[],"mappings":"AASA,OAAO,EAEH,QAAQ,EAER,OAAO,EACP,WAAW,EAEX,cAAc,EAGjB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACnC,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,EAAE,KAAK,CAAC;IACxB,WAAW,EAAE,6BAA6B,CAAC;IAC3C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,gBAAgB,EAAE;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,kBAAkB,EAAE,OAAO,uBAAuB,CAAC;QACnD,MAAM,EAA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,CAAC;KAClC;;WAbM,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,6BAA6B;UACpC,qBAAqB;aAClB,gBAAgB;sBACP;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,kBAAkB,EAAE,OAAO,uBAAuB,CAAC;QACnD,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,KAAK,EAAE,OAAO,UAAU,CAAC;QACzB,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;iBANgB,OAAO,gBAAgB;wBAChB,OAAO,uBAAuB;YAC1C,OAAO,WAAW;aACjB,OAAO,YAAY;WACrB,OAAO,UAAU;cACd,OAAO,aAAa;CAwHpC,CAAC;AAEH,QAAA,MAAM,gBAAgB,gHAEpB,CAAC;AAEH,QAAA,MAAM,uBAAuB,gHAE3B,CAAC;AACH,QAAA,MAAM,WAAW,gHAA2C,CAAC;AAE7D,QAAA,MAAM,YAAY,gHAA4C,CAAC;AAE/D,QAAA,MAAM,UAAU,gHAA0C,CAAC;AAE3D,QAAA,MAAM,aAAa,gHAA6C,CAAC"}
|
|
@@ -99,21 +99,26 @@ export const InfoToken = polymorphicFactory((_props, ref)=>{
|
|
|
99
99
|
const TokenInformation = InfoToken.withProps({
|
|
100
100
|
variant: 'information'
|
|
101
101
|
});
|
|
102
|
+
TokenInformation.displayName = 'InfoToken.Information';
|
|
102
103
|
const TokenInformationOutline = InfoToken.withProps({
|
|
103
104
|
variant: 'information-outline'
|
|
104
105
|
});
|
|
105
106
|
const TokenAdvice = InfoToken.withProps({
|
|
106
107
|
variant: 'advice'
|
|
107
108
|
});
|
|
109
|
+
TokenAdvice.displayName = 'InfoToken.Advice';
|
|
108
110
|
const TokenWarning = InfoToken.withProps({
|
|
109
111
|
variant: 'warning'
|
|
110
112
|
});
|
|
113
|
+
TokenWarning.displayName = 'InfoToken.Warning';
|
|
111
114
|
const TokenError = InfoToken.withProps({
|
|
112
115
|
variant: 'error'
|
|
113
116
|
});
|
|
117
|
+
TokenError.displayName = 'InfoToken.Error';
|
|
114
118
|
const TokenQuestion = InfoToken.withProps({
|
|
115
119
|
variant: 'question'
|
|
116
120
|
});
|
|
121
|
+
TokenQuestion.displayName = 'InfoToken.Question';
|
|
117
122
|
InfoToken.Information = TokenInformation;
|
|
118
123
|
InfoToken.InformationOutline = TokenInformationOutline;
|
|
119
124
|
InfoToken.Advice = TokenAdvice;
|