@consumidor-positivo/aurora 0.0.143 → 0.0.145
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/components/Card/index.es.js +15 -2
- package/dist/components/Card/index.es.js.map +1 -1
- package/dist/components/Spinner/index.es.js +1 -1
- package/dist/components/Spinner/index.es.js.map +1 -1
- package/dist/components/Tag/index.d.ts +12 -0
- package/dist/components/Tag/index.es.js +62 -8
- package/dist/components/Tag/index.es.js.map +1 -1
- package/dist/components/Tag/styles.css +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { CardContainer } from "../Container/index.es.js";
|
|
2
2
|
import { CardEmphasis } from "../Emphasis/index.es.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
5
|
-
import { CardTag } from "../Tag/index.es.js";
|
|
6
5
|
import './styles.css';const CardImage = ({ src, alt, width, height }) => {
|
|
7
6
|
const imageSize = {
|
|
8
7
|
width: `${width}px`,
|
|
@@ -38,6 +37,20 @@ const CardRoot = ({
|
|
|
38
37
|
}
|
|
39
38
|
);
|
|
40
39
|
};
|
|
40
|
+
const CardTag = ({
|
|
41
|
+
color = "primary",
|
|
42
|
+
icon,
|
|
43
|
+
children
|
|
44
|
+
}) => {
|
|
45
|
+
const tagClasses = classNames("au-card__tag", {
|
|
46
|
+
"au-card__tag--primary": color === "primary",
|
|
47
|
+
"au-card__tag--secondary": color === "secondary"
|
|
48
|
+
});
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", { className: tagClasses, children: [
|
|
50
|
+
/* @__PURE__ */ jsx("span", { children: icon }),
|
|
51
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
52
|
+
] });
|
|
53
|
+
};
|
|
41
54
|
const components = {
|
|
42
55
|
Root: CardRoot,
|
|
43
56
|
Container: CardContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Card/Image/index.tsx","../../../lib/components/Card/Root/index.tsx","../../../lib/components/Card/index.tsx"],"sourcesContent":["import { CSSProperties } from 'react'\n\nexport type CardImageProps = {\n src: string\n alt?: string\n width?: number\n height?: number\n}\nexport const CardImage = ({ src, alt, width, height }: CardImageProps) => {\n const imageSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n }\n\n return (\n <div>\n <img style={imageSize} src={src} alt={alt} />\n </div>\n )\n}\n","import classNames from 'classnames'\nimport { CSSProperties, ReactNode } from 'react'\n\nexport type CardRootProps = {\n border?: boolean\n color?: 'primary' | 'secondary'\n width?: number\n height?: number\n maxWidth?: number\n maxHeight?: number\n children: ReactNode\n}\nexport const CardRoot = ({\n border = true,\n color = 'primary',\n width,\n height,\n maxWidth,\n maxHeight,\n children,\n}: CardRootProps) => {\n const rootClasses = classNames('au-card__root', {\n 'au-card__root--border-none': !border,\n 'au-card__root--color-secondary': color === 'secondary',\n })\n const rootSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n maxWidth: `${maxWidth}px`,\n maxHeight: `${maxHeight}px`\n }\n\n return (\n <div\n style={rootSize}\n className={rootClasses}>\n {children}\n </div>\n )\n}\n","import { CardContainer, CardContainerProps } from './Container'\nimport { CardEmphasis, CardEmphasisProps } from './Emphasis'\nimport { CardImage, CardImageProps } from './Image'\nimport { CardRoot, CardRootProps } from './Root'\nimport { CardTag, CardTagProps } from './Tag'\nimport './styles.scss'\n\ntype Components = {\n Root: React.FC<CardRootProps>\n Container: React.FC<CardContainerProps>\n Emphasis: React.FC<CardEmphasisProps>\n Image: React.FC<CardImageProps>\n Tag: React.FC<CardTagProps>\n}\n\nconst components: Components = {\n Root: CardRoot,\n Container: CardContainer,\n Emphasis: CardEmphasis,\n Image: CardImage,\n Tag: CardTag,\n}\n\nObject.keys(components).forEach((key) => {\n const component = components[key as keyof Components]\n component.displayName = `Card.${key}`\n})\n\nexport { components as Card }\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Card/Image/index.tsx","../../../lib/components/Card/Root/index.tsx","../../../lib/components/Card/Tag/index.tsx","../../../lib/components/Card/index.tsx"],"sourcesContent":["import { CSSProperties } from 'react'\n\nexport type CardImageProps = {\n src: string\n alt?: string\n width?: number\n height?: number\n}\nexport const CardImage = ({ src, alt, width, height }: CardImageProps) => {\n const imageSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n }\n\n return (\n <div>\n <img style={imageSize} src={src} alt={alt} />\n </div>\n )\n}\n","import classNames from 'classnames'\nimport { CSSProperties, ReactNode } from 'react'\n\nexport type CardRootProps = {\n border?: boolean\n color?: 'primary' | 'secondary'\n width?: number\n height?: number\n maxWidth?: number\n maxHeight?: number\n children: ReactNode\n}\nexport const CardRoot = ({\n border = true,\n color = 'primary',\n width,\n height,\n maxWidth,\n maxHeight,\n children,\n}: CardRootProps) => {\n const rootClasses = classNames('au-card__root', {\n 'au-card__root--border-none': !border,\n 'au-card__root--color-secondary': color === 'secondary',\n })\n const rootSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n maxWidth: `${maxWidth}px`,\n maxHeight: `${maxHeight}px`\n }\n\n return (\n <div\n style={rootSize}\n className={rootClasses}>\n {children}\n </div>\n )\n}\n","import classNames from 'classnames'\nimport { ReactNode } from 'react'\n\nexport type CardTagProps = {\n color?: 'primary' | 'secondary'\n icon?: ReactNode\n children: ReactNode\n}\nexport const CardTag = ({\n color = 'primary',\n icon,\n children,\n}: CardTagProps) => {\n const tagClasses = classNames('au-card__tag', {\n 'au-card__tag--primary': color === 'primary',\n 'au-card__tag--secondary': color === 'secondary',\n })\n return (\n <div className={tagClasses}>\n <span>{icon}</span>\n <span>{children}</span>\n </div>\n )\n}\n","import { CardContainer, CardContainerProps } from './Container'\nimport { CardEmphasis, CardEmphasisProps } from './Emphasis'\nimport { CardImage, CardImageProps } from './Image'\nimport { CardRoot, CardRootProps } from './Root'\nimport { CardTag, CardTagProps } from './Tag'\nimport './styles.scss'\n\ntype Components = {\n Root: React.FC<CardRootProps>\n Container: React.FC<CardContainerProps>\n Emphasis: React.FC<CardEmphasisProps>\n Image: React.FC<CardImageProps>\n Tag: React.FC<CardTagProps>\n}\n\nconst components: Components = {\n Root: CardRoot,\n Container: CardContainer,\n Emphasis: CardEmphasis,\n Image: CardImage,\n Tag: CardTag,\n}\n\nObject.keys(components).forEach((key) => {\n const component = components[key as keyof Components]\n component.displayName = `Card.${key}`\n})\n\nexport { components as Card }\n"],"names":[],"mappings":";;;;AAQO,MAAM,YAAY,CAAC,EAAE,KAAK,KAAK,OAAO,aAA6B;AACxE,QAAM,YAA2B;AAAA,IAC/B,OAAO,GAAG,KAAK;AAAA,IACf,QAAQ,GAAG,MAAM;AAAA,EAAA;AAIjB,SAAA,oBAAC,SACC,UAAC,oBAAA,OAAA,EAAI,OAAO,WAAW,KAAU,IAAU,CAAA,EAC7C,CAAA;AAEJ;ACPO,MAAM,WAAW,CAAC;AAAA,EACvB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAqB;AACb,QAAA,cAAc,WAAW,iBAAiB;AAAA,IAC9C,8BAA8B,CAAC;AAAA,IAC/B,kCAAkC,UAAU;AAAA,EAAA,CAC7C;AACD,QAAM,WAA0B;AAAA,IAC9B,OAAO,GAAG,KAAK;AAAA,IACf,QAAQ,GAAG,MAAM;AAAA,IACjB,UAAU,GAAG,QAAQ;AAAA,IACrB,WAAW,GAAG,SAAS;AAAA,EAAA;AAIvB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,WAAW;AAAA,MACV;AAAA,IAAA;AAAA,EAAA;AAGP;AC/BO,MAAM,UAAU,CAAC;AAAA,EACtB,QAAQ;AAAA,EACR;AAAA,EACA;AACF,MAAoB;AACZ,QAAA,aAAa,WAAW,gBAAgB;AAAA,IAC5C,yBAAyB,UAAU;AAAA,IACnC,2BAA2B,UAAU;AAAA,EAAA,CACtC;AAEC,SAAA,qBAAC,OAAI,EAAA,WAAW,YACd,UAAA;AAAA,IAAA,oBAAC,UAAM,UAAK,KAAA,CAAA;AAAA,IACZ,oBAAC,UAAM,UAAS;AAAA,EAClB,EAAA,CAAA;AAEJ;ACRA,MAAM,aAAyB;AAAA,EAC7B,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;AACP;AAEA,OAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,QAAQ;AACjC,QAAA,YAAY,WAAW,GAAuB;AAC1C,YAAA,cAAc,QAAQ,GAAG;AACrC,CAAC;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import './styles.css';const Spinner = ({ size, color }) => {
|
|
3
|
-
return /* @__PURE__ */ jsx("div", { className: "au-spinner", children: /* @__PURE__ */ jsxs(
|
|
3
|
+
return /* @__PURE__ */ jsx("div", { className: "au-spinner", style: { width: size, height: size }, children: /* @__PURE__ */ jsxs(
|
|
4
4
|
"svg",
|
|
5
5
|
{
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Spinner/index.tsx"],"sourcesContent":["import './styles.scss'\n\ntype SpinnerProps = {\n size: number\n color: string\n}\n\nexport const Spinner: React.FC<SpinnerProps> = ({ size, color }) => {\n return (\n <div className=\"au-spinner\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 64\"\n width={size}\n height={size}\n color={color}>\n <defs>\n <linearGradient\n id={`au-loading-${color}`}\n gradientUnits=\"objectBoundingBox\"\n x1=\"10%\"\n y1=\"0%\"\n x2=\"90%\"\n y2=\"10%\">\n <stop offset=\"0\" stopColor={color} stopOpacity=\"1\" />\n <stop offset=\"1\" stopColor={color} stopOpacity=\"0\" />\n </linearGradient>\n </defs>\n <g strokeWidth=\"7\" strokeLinecap=\"round\" fill=\"none\">\n <path stroke={color} d=\"M60,32 A28,28 0 1 1 4,32\" />\n\n <path\n d=\"M60,32 A28,28.5 0 1 0 4,32\"\n stroke={`url(#au-loading-${color})`}\n />\n </g>\n </svg>\n </div>\n )\n}\n"],"names":[],"mappings":";AAOO,MAAM,UAAkC,CAAC,EAAE,MAAM,YAAY;AAEhE,SAAA,oBAAC,OAAI,EAAA,WAAU,
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Spinner/index.tsx"],"sourcesContent":["import './styles.scss'\n\ntype SpinnerProps = {\n size: number\n color: string\n}\n\nexport const Spinner: React.FC<SpinnerProps> = ({ size, color }) => {\n return (\n <div className=\"au-spinner\" style={{ width: size, height: size }}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 64\"\n width={size}\n height={size}\n color={color}>\n <defs>\n <linearGradient\n id={`au-loading-${color}`}\n gradientUnits=\"objectBoundingBox\"\n x1=\"10%\"\n y1=\"0%\"\n x2=\"90%\"\n y2=\"10%\">\n <stop offset=\"0\" stopColor={color} stopOpacity=\"1\" />\n <stop offset=\"1\" stopColor={color} stopOpacity=\"0\" />\n </linearGradient>\n </defs>\n <g strokeWidth=\"7\" strokeLinecap=\"round\" fill=\"none\">\n <path stroke={color} d=\"M60,32 A28,28 0 1 1 4,32\" />\n\n <path\n d=\"M60,32 A28,28.5 0 1 0 4,32\"\n stroke={`url(#au-loading-${color})`}\n />\n </g>\n </svg>\n </div>\n )\n}\n"],"names":[],"mappings":";AAOO,MAAM,UAAkC,CAAC,EAAE,MAAM,YAAY;AAEhE,SAAA,oBAAC,OAAI,EAAA,WAAU,cAAa,OAAO,EAAE,OAAO,MAAM,QAAQ,KACxD,GAAA,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,SAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,MACA,UAAA;AAAA,QAAA,oBAAC,QACC,EAAA,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAI,cAAc,KAAK;AAAA,YACvB,eAAc;AAAA,YACd,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,UAAA;AAAA,cAAA,oBAAC,UAAK,QAAO,KAAI,WAAW,OAAO,aAAY,KAAI;AAAA,kCAClD,QAAK,EAAA,QAAO,KAAI,WAAW,OAAO,aAAY,KAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,GAEvD;AAAA,6BACC,KAAE,EAAA,aAAY,KAAI,eAAc,SAAQ,MAAK,QAC5C,UAAA;AAAA,UAAA,oBAAC,QAAK,EAAA,QAAQ,OAAO,GAAE,4BAA2B;AAAA,UAElD;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,GAAE;AAAA,cACF,QAAQ,mBAAmB,KAAK;AAAA,YAAA;AAAA,UAClC;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
export type TagProps = {
|
|
3
|
+
status: 'info' | 'success' | 'error' | 'warning' | 'support' | 'neutral';
|
|
4
|
+
border?: 'rounded' | 'square';
|
|
5
|
+
type?: 'read-only' | 'badge';
|
|
6
|
+
color?: 'primary' | 'secondary';
|
|
7
|
+
size?: 'small' | 'medium' | 'large';
|
|
8
|
+
text: string;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
customIcon?: string | JSX.Element;
|
|
11
|
+
};
|
|
12
|
+
export declare const Tag: ({ status, border, size, type, color, customIcon, text, children, }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,74 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
3
|
-
|
|
3
|
+
import "../Icon/index.es.js";
|
|
4
|
+
import { IconAlertOctagon } from "../icons/IconAlertOctagon/index.es.js";
|
|
5
|
+
import { IconAlertTriangle } from "../icons/IconAlertTriangle/index.es.js";
|
|
6
|
+
import { IconCheck } from "../icons/IconCheck/index.es.js";
|
|
7
|
+
import { IconInfo } from "../icons/IconInfo/index.es.js";
|
|
8
|
+
import { IconSlash } from "../icons/IconSlash/index.es.js";
|
|
9
|
+
import { C as COLOR_SUCCESS_50, b as COLOR_ERROR_50, W as COLOR_WARNING_50, a1 as COLOR_INFO_50, E as COLOR_BRAND_CYAN_50, h as COLOR_NEUTRAL_70 } from "../../tokens-BwvPtuyb.js";
|
|
10
|
+
import { Conditional } from "../Conditional/index.es.js";
|
|
11
|
+
import './styles.css';const Tag = ({
|
|
12
|
+
status,
|
|
13
|
+
border = "square",
|
|
14
|
+
size = "medium",
|
|
15
|
+
type = "read-only",
|
|
4
16
|
color = "primary",
|
|
5
|
-
|
|
17
|
+
customIcon,
|
|
18
|
+
text,
|
|
6
19
|
children
|
|
7
20
|
}) => {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
21
|
+
const statusMap = {
|
|
22
|
+
success: {
|
|
23
|
+
option: "success",
|
|
24
|
+
icon: /* @__PURE__ */ jsx(IconCheck, { rawColor: COLOR_SUCCESS_50 })
|
|
25
|
+
},
|
|
26
|
+
error: {
|
|
27
|
+
option: "error",
|
|
28
|
+
icon: /* @__PURE__ */ jsx(IconAlertOctagon, { rawColor: COLOR_ERROR_50 })
|
|
29
|
+
},
|
|
30
|
+
warning: {
|
|
31
|
+
option: "warning",
|
|
32
|
+
icon: /* @__PURE__ */ jsx(IconAlertTriangle, { rawColor: COLOR_WARNING_50 })
|
|
33
|
+
},
|
|
34
|
+
info: { option: "info", icon: /* @__PURE__ */ jsx(IconInfo, { rawColor: COLOR_INFO_50 }) },
|
|
35
|
+
support: {
|
|
36
|
+
option: "support",
|
|
37
|
+
icon: /* @__PURE__ */ jsx(IconInfo, { rawColor: COLOR_BRAND_CYAN_50 })
|
|
38
|
+
},
|
|
39
|
+
neutral: {
|
|
40
|
+
option: "neutral",
|
|
41
|
+
icon: /* @__PURE__ */ jsx(IconSlash, { rawColor: COLOR_NEUTRAL_70 })
|
|
42
|
+
},
|
|
43
|
+
custom: {
|
|
44
|
+
option: "custom",
|
|
45
|
+
icon: customIcon
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const tagClasses = classNames("au-tag", {
|
|
49
|
+
[`au-tag--${statusMap[status].option}`]: statusMap[status].option,
|
|
50
|
+
[`au-tag--size-${size}`]: !!size,
|
|
51
|
+
[`au-tag--type-${type}`]: !!type,
|
|
52
|
+
[`au-tag--border-${border}`]: !!border,
|
|
53
|
+
[`au-tag--color-${color}`]: !!color
|
|
11
54
|
});
|
|
55
|
+
const isBadgeTag = type === "badge";
|
|
56
|
+
const supportText = isBadgeTag ? text.toUpperCase() : text;
|
|
12
57
|
return /* @__PURE__ */ jsxs("div", { className: tagClasses, children: [
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: "au-tag__content", children: [
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
Conditional,
|
|
61
|
+
{
|
|
62
|
+
condition: !isBadgeTag,
|
|
63
|
+
renderIf: /* @__PURE__ */ jsx("div", { className: "au-tag__content-icon", children: /* @__PURE__ */ jsx(Conditional, { condition: !!customIcon, renderIf: customIcon, renderElse: statusMap[status].icon }) })
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsx("p", { className: `au-tag__content-support-text`, children: supportText })
|
|
67
|
+
] }),
|
|
68
|
+
children
|
|
15
69
|
] });
|
|
16
70
|
};
|
|
17
71
|
export {
|
|
18
|
-
|
|
72
|
+
Tag
|
|
19
73
|
};
|
|
20
74
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Tag/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport {\n IconAlertOctagon,\n IconAlertTriangle,\n IconCheck,\n IconInfo,\n IconSlash,\n} from '@components/icons'\nimport {\n COLOR_ERROR_50,\n COLOR_INFO_50,\n COLOR_SUCCESS_50,\n COLOR_WARNING_50,\n COLOR_BRAND_CYAN_50,\n COLOR_NEUTRAL_70,\n} from '@core/tokens'\nimport './styles.scss'\nimport { Conditional } from '@components/misc'\n\nexport type TagProps = {\n status: 'info' | 'success' | 'error' | 'warning' | 'support' | 'neutral'\n border?: 'rounded' | 'square'\n type?: 'read-only' | 'badge'\n color?: 'primary' | 'secondary'\n size?: 'small' | 'medium' | 'large'\n text: string\n children?: React.ReactNode\n customIcon?: string | JSX.Element\n}\n\nexport const Tag = ({\n status,\n border = 'square',\n size = 'medium',\n type = 'read-only',\n color = 'primary',\n customIcon,\n text,\n children,\n}: TagProps) => {\n\n const statusMap = {\n success: {\n option: 'success',\n icon: <IconCheck rawColor={COLOR_SUCCESS_50} />,\n },\n error: {\n option: 'error',\n icon: <IconAlertOctagon rawColor={COLOR_ERROR_50} />,\n },\n warning: {\n option: 'warning',\n icon: <IconAlertTriangle rawColor={COLOR_WARNING_50} />,\n },\n info: { option: 'info', icon: <IconInfo rawColor={COLOR_INFO_50} /> },\n support: {\n option: 'support',\n icon: <IconInfo rawColor={COLOR_BRAND_CYAN_50} />,\n },\n neutral: {\n option: 'neutral',\n icon: <IconSlash rawColor={COLOR_NEUTRAL_70} />,\n },\n custom: {\n option: 'custom',\n icon: customIcon,\n },\n }\n\n const tagClasses = classNames('au-tag', {\n [`au-tag--${statusMap[status].option}`]: statusMap[status].option,\n [`au-tag--size-${size}`]: !!size,\n [`au-tag--type-${type}`]: !!type,\n [`au-tag--border-${border}`]: !!border,\n [`au-tag--color-${color}`]: !!color,\n })\n\n const isBadgeTag = type === 'badge';\n const supportText = isBadgeTag ? text.toUpperCase() : text\n\n return (\n <div className={tagClasses}>\n <div className=\"au-tag__content\">\n <Conditional\n condition={!isBadgeTag}\n renderIf={\n <div className=\"au-tag__content-icon\">\n <Conditional condition={!!customIcon} renderIf={customIcon} renderElse={statusMap[status].icon}/>\n </div>\n }\n />\n <p className={`au-tag__content-support-text`}>{supportText}</p>\n </div>\n {children}\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;;;;;;AA8BO,MAAM,MAAM,CAAC;AAAA,EAClB;AAAA,EACA,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AACF,MAAgB;AAEd,QAAM,YAAY;AAAA,IAChB,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,MAAM,oBAAC,WAAU,EAAA,UAAU,iBAAkB,CAAA;AAAA,IAC/C;AAAA,IACA,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,MAAM,oBAAC,kBAAiB,EAAA,UAAU,eAAgB,CAAA;AAAA,IACpD;AAAA,IACA,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,MAAM,oBAAC,mBAAkB,EAAA,UAAU,iBAAkB,CAAA;AAAA,IACvD;AAAA,IACA,MAAM,EAAE,QAAQ,QAAQ,MAAO,oBAAA,UAAA,EAAS,UAAU,cAAA,CAAe,EAAG;AAAA,IACpE,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,MAAM,oBAAC,UAAS,EAAA,UAAU,oBAAqB,CAAA;AAAA,IACjD;AAAA,IACA,SAAS;AAAA,MACP,QAAQ;AAAA,MACR,MAAM,oBAAC,WAAU,EAAA,UAAU,iBAAkB,CAAA;AAAA,IAC/C;AAAA,IACA,QAAQ;AAAA,MACN,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EAAA;AAGI,QAAA,aAAa,WAAW,UAAU;AAAA,IACtC,CAAC,WAAW,UAAU,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,MAAM,EAAE;AAAA,IAC3D,CAAC,gBAAgB,IAAI,EAAE,GAAG,CAAC,CAAC;AAAA,IAC5B,CAAC,gBAAgB,IAAI,EAAE,GAAG,CAAC,CAAC;AAAA,IAC5B,CAAC,kBAAkB,MAAM,EAAE,GAAG,CAAC,CAAC;AAAA,IAChC,CAAC,iBAAiB,KAAK,EAAE,GAAG,CAAC,CAAC;AAAA,EAAA,CAC/B;AAED,QAAM,aAAa,SAAS;AAC5B,QAAM,cAAc,aAAa,KAAK,YAAA,IAAgB;AAGpD,SAAA,qBAAC,OAAI,EAAA,WAAW,YACd,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAU,mBACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW,CAAC;AAAA,UACZ,UACG,oBAAA,OAAA,EAAI,WAAU,wBACb,UAAA,oBAAC,eAAY,WAAW,CAAC,CAAC,YAAY,UAAU,YAAY,YAAY,UAAU,MAAM,EAAE,KAAK,CAAA,GACjG;AAAA,QAAA;AAAA,MAEJ;AAAA,MACC,oBAAA,KAAA,EAAE,WAAW,gCAAiC,UAAY,aAAA;AAAA,IAAA,GAC7D;AAAA,IACC;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.au-tag{font-family:"Source Sans 3",sans-serif;display:flex;justify-content:center;border-radius:8px;padding:8px;width:fit-content}.au-tag__content{display:flex;gap:8px;justify-content:center;align-items:center}.au-tag__content-icon .au-icon,.au-tag__content-icon .au-icon>svg{width:16px;height:16px}.au-tag__content-support-text{color:#16181d;font-size:12px;font-weight:600;line-height:18px}.au-tag--size-small{height:26px;padding:4px 8px}.au-tag--size-medium{height:36px}.au-tag--size-large{height:38px}.au-tag--size-large-support-text{font-size:14px;line-height:22px}.au-tag--border-rounded{border-radius:500px}.au-tag--color-primary.au-tag--info{background-color:#eee6ff}.au-tag--color-primary.au-tag--success{background-color:#e5fff0}.au-tag--color-primary.au-tag--error{background-color:#ffe5e5}.au-tag--color-primary.au-tag--warning{background-color:#fff0e6}.au-tag--color-primary.au-tag--support{background-color:#f1fcff}.au-tag--color-primary.au-tag--neutral{background-color:#e2e4e9}.au-tag--color-secondary.au-tag--info{background-color:#d4bfff}.au-tag--color-secondary.au-tag--success{background-color:#a1e5bd}.au-tag--color-secondary.au-tag--error{background-color:#ffbfbf}.au-tag--color-secondary.au-tag--warning{background-color:#ffdabf}.au-tag--color-secondary.au-tag--support{background-color:#ccf3ff}.au-tag--color-secondary.au-tag--neutral{background-color:#c4c9d4}.au-tag--type-badge.au-tag--info p{color:#46008c}.au-tag--type-badge.au-tag--error p{color:#731111}.au-tag--type-badge.au-tag--success p{color:#08331a}.au-tag--type-badge.au-tag--warning p{color:#803500}.au-tag--type-badge.au-tag--support p{color:#004155}.au-tag--type-badge.au-tag--size-large{height:36px;font-size:12px;line-height:18px}
|