norma-library 0.6.87 → 0.6.89
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/esm/components/ProductCard/ProductCard.js +7 -5
- package/dist/esm/components/ProductCard/ProductCard.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js.map +1 -1
- package/dist/esm/interfaces/ProductCard.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/ProductCard/ProductCard.style.ts +0 -1
- package/src/components/ProductCard/ProductCard.tsx +6 -5
- package/src/interfaces/ProductCard.ts +1 -1
- package/src/stories/ProductCard.stories.tsx +53 -5
- package/dist/esm/components/Button/index.d.ts +0 -9
- package/dist/esm/components/Button/index.js +0 -16
- package/dist/esm/components/Button/index.js.map +0 -1
- package/dist/esm/components/Button/types.d.ts +0 -18
- package/dist/esm/components/Button/types.js +0 -2
- package/dist/esm/components/Button/types.js.map +0 -1
- package/dist/esm/components/IconifyIcon.d.ts +0 -8
- package/dist/esm/components/IconifyIcon.js +0 -7
- package/dist/esm/components/IconifyIcon.js.map +0 -1
|
@@ -18,15 +18,17 @@ export var ProductCard = function (_a) {
|
|
|
18
18
|
*/
|
|
19
19
|
return (React.createElement(ProductCardStyle, { disabled: disabled, "$bColor": icon === null || icon === void 0 ? void 0 : icon.iconColor, hasBorder: hasBorder },
|
|
20
20
|
React.createElement(Card, { variant: "outlined", onClick: function () { return onClick && onClick(); } },
|
|
21
|
-
|
|
21
|
+
favorite && (React.createElement(Grid, { container: true, justifyContent: 'flex-end', alignItems: 'flex-start', position: 'relative' },
|
|
22
22
|
React.createElement(Grid, { item: true },
|
|
23
23
|
React.createElement(IconButton, { sx: {
|
|
24
24
|
padding: 0,
|
|
25
25
|
position: 'absolute',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
right: '2px',
|
|
27
|
+
}, "aria-label": "favorite", onClick: favorite.onFlag, cursor: "pointer" },
|
|
28
|
+
React.createElement(GradeIcon, { sx: {
|
|
29
|
+
color: favorite.flagged ? '#FDDA0D' : '#666',
|
|
30
|
+
fontSize: 24,
|
|
31
|
+
} }))))),
|
|
30
32
|
React.createElement(TitleContainer, null,
|
|
31
33
|
React.createElement(IconCardStyle, { "$iColor": (icon === null || icon === void 0 ? void 0 : icon.iconColor) || "", "$bColor": color },
|
|
32
34
|
React.createElement(Icons, { icon: icon === null || icon === void 0 ? void 0 : icon.iconName, color: icon === null || icon === void 0 ? void 0 : icon.iconColor, scale: icon === null || icon === void 0 ? void 0 : icon.scale, width: icon === null || icon === void 0 ? void 0 : icon.iconWidth, height: icon === null || icon === void 0 ? void 0 : icon.iconHeight })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.js","sourceRoot":"","sources":["../../../../src/components/ProductCard/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,2BAA2B,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAIhC,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAUvD;;IATC,wBAAwB;IACxB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,iBAAgB,EAAhB,SAAS,mBAAG,IAAI,KAAA,EAChB,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,QAAQ,cAAA;IAGR;;;;;;IAMA;IACA,OAAO,CACL,oBAAC,g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xToRem";
|
|
4
|
-
export var ProductCardStyle = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([" \n max-width: 380px;\n cursor: ", ";\n opacity: ", ";\n
|
|
4
|
+
export var ProductCardStyle = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject([" \n max-width: 380px;\n cursor: ", ";\n opacity: ", ";\n border-left: 7px solid ", " !important;\n border-radius: 5px;\n\n p.title {\n font-weight: 600;\n }\n\n p.description {\n margin-bottom: ", ";\n line-height: ", ";\n }\n\n .MuiPaper-root {\n min-height: 180px;\n }\n\n @media (max-width: 1535px) {\n max-width: 100%;\n }\n"], [" \n max-width: 380px;\n cursor: ", ";\n opacity: ", ";\n border-left: 7px solid ", " !important;\n border-radius: 5px;\n\n p.title {\n font-weight: 600;\n }\n\n p.description {\n margin-bottom: ", ";\n line-height: ", ";\n }\n\n .MuiPaper-root {\n min-height: 180px;\n }\n\n @media (max-width: 1535px) {\n max-width: 100%;\n }\n"])), function (props) { return (props.disabled ? "not-allowed" : "pointer"); }, function (props) { return (props.disabled ? 0.5 : 1); }, function (props) { return props.hasBorder ? props.$bColor : 'transparent'; }, pxToRem(17), pxToRem(24));
|
|
5
5
|
export var IconCardStyle = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-flex;\n border-radius: 5px;\n align-items: center;\n justify-content: center;\n padding: 10px;\n background-color: ", ";\n min-width: ", ";\n min-height: ", ";\n margin-right: ", ";\n box-sizing: border-box;\n\n svg {\n max-height: 100%;\n max-width: 100%;\n path {\n fill: ", ";\n }\n }\n"], ["\n display: inline-flex;\n border-radius: 5px;\n align-items: center;\n justify-content: center;\n padding: 10px;\n background-color: ", ";\n min-width: ", ";\n min-height: ", ";\n margin-right: ", ";\n box-sizing: border-box;\n\n svg {\n max-height: 100%;\n max-width: 100%;\n path {\n fill: ", ";\n }\n }\n"])), function (props) { return props.$bColor; }, pxToRem(50), pxToRem(50), pxToRem(10), function (props) { return props.$iColor; });
|
|
6
6
|
export var TitleContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ", ";\n\n p {\n font-size: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n margin-bottom: ", ";\n\n p {\n font-size: ", ";\n }\n"])), pxToRem(16), pxToRem(24));
|
|
7
7
|
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.style.js","sourceRoot":"","sources":["../../../../src/components/ProductCard/ProductCard.style.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,CAAC,IAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"ProductCard.style.js","sourceRoot":"","sources":["../../../../src/components/ProductCard/ProductCard.style.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,MAAM,CAAC,IAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,yaAA+D,oCAE7F,EAAuD,gBACtD,EAAqC,8BACvB,EAA0D,0HAQhE,EAAW,sBACb,EAAW,0HAU7B,KArBW,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,EAA5C,CAA4C,EACtD,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAA1B,CAA0B,EACvB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAA/C,CAA+C,EAQhE,OAAO,CAAC,EAAE,CAAC,EACb,OAAO,CAAC,EAAE,CAAC,CAU7B,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,kZAAuC,8IAMxD,EAAwB,kBAC/B,EAAW,mBACV,EAAW,qBACT,EAAW,4GAOf,EAAwB,iBAGrC,KAbqB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EAC/B,OAAO,CAAC,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,CAAC,EACT,OAAO,CAAC,EAAE,CAAC,EAOf,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,CAGrC,CAAC;AAEF,MAAM,CAAC,IAAM,cAAc,GAAG,MAAM,CAAC,GAAG,6KAAA,+DAGrB,EAAW,6BAGb,EAAW,UAE3B,KALkB,OAAO,CAAC,EAAE,CAAC,EAGb,OAAO,CAAC,EAAE,CAAC,CAE3B,CAAC"}
|
|
@@ -16,7 +16,7 @@ export interface ProductCardProps {
|
|
|
16
16
|
icon?: {
|
|
17
17
|
bgColor?: string;
|
|
18
18
|
iconColor?: string;
|
|
19
|
-
iconName?: keyof typeof iconsSVG | SvgIconComponent;
|
|
19
|
+
iconName?: keyof typeof iconsSVG | SvgIconComponent | string;
|
|
20
20
|
iconWidth?: string | number;
|
|
21
21
|
iconHeight?: string | number;
|
|
22
22
|
scale?: IconScale;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "norma-library",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.89",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.",
|
|
6
6
|
"scripts": {
|
|
@@ -5,7 +5,6 @@ export const ProductCardStyle = styled.div<{ disabled?: boolean, $bColor?: strin
|
|
|
5
5
|
max-width: 380px;
|
|
6
6
|
cursor: ${(props) => (props.disabled ? "not-allowed" : "pointer")};
|
|
7
7
|
opacity: ${(props) => (props.disabled ? 0.5 : 1)};
|
|
8
|
-
height: 100%;
|
|
9
8
|
border-left: 7px solid ${(props) => props.hasBorder ? props.$bColor : 'transparent'} !important;
|
|
10
9
|
border-radius: 5px;
|
|
11
10
|
|
|
@@ -34,22 +34,23 @@ export const ProductCard: React.FC<ProductCardProps> = ({
|
|
|
34
34
|
variant="outlined"
|
|
35
35
|
onClick={() => onClick && onClick()}
|
|
36
36
|
>
|
|
37
|
-
{favorite
|
|
37
|
+
{favorite && (
|
|
38
38
|
<Grid container justifyContent={'flex-end'} alignItems={'flex-start'} position={'relative'}>
|
|
39
39
|
<Grid item>
|
|
40
40
|
<IconButton
|
|
41
41
|
sx={{
|
|
42
42
|
padding: 0,
|
|
43
43
|
position: 'absolute',
|
|
44
|
-
|
|
45
|
-
right: '5px',
|
|
44
|
+
right: '2px',
|
|
46
45
|
}}
|
|
47
46
|
aria-label="favorite"
|
|
48
47
|
onClick={favorite.onFlag}
|
|
49
|
-
color={favorite.flagged ? 'primary' : 'inherit'}
|
|
50
48
|
cursor="pointer"
|
|
51
49
|
>
|
|
52
|
-
<GradeIcon
|
|
50
|
+
<GradeIcon sx={{
|
|
51
|
+
color: favorite.flagged ? '#FDDA0D' : '#666',
|
|
52
|
+
fontSize: 24,
|
|
53
|
+
}}/>
|
|
53
54
|
</IconButton>
|
|
54
55
|
</Grid>
|
|
55
56
|
</Grid>
|
|
@@ -18,7 +18,7 @@ export interface ProductCardProps {
|
|
|
18
18
|
icon?: {
|
|
19
19
|
bgColor?: string;
|
|
20
20
|
iconColor?: string;
|
|
21
|
-
iconName?: keyof typeof iconsSVG | SvgIconComponent;
|
|
21
|
+
iconName?: keyof typeof iconsSVG | SvgIconComponent | string;
|
|
22
22
|
iconWidth?: string | number;
|
|
23
23
|
iconHeight?: string | number;
|
|
24
24
|
scale?: IconScale;
|
|
@@ -16,7 +16,10 @@ export default meta
|
|
|
16
16
|
|
|
17
17
|
export const BasicProductCard = () => (
|
|
18
18
|
<ProductCard
|
|
19
|
-
|
|
19
|
+
favorite={{
|
|
20
|
+
flagged: false,
|
|
21
|
+
onFlag: () => console.log('flagged'),
|
|
22
|
+
}}
|
|
20
23
|
title="Financeiro e Jurídico"
|
|
21
24
|
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
22
25
|
color="#FDF6E3"
|
|
@@ -34,7 +37,6 @@ BasicProductCard.storyName = 'Basic Product Card'
|
|
|
34
37
|
|
|
35
38
|
export const DisabledProductCard = () => (
|
|
36
39
|
<ProductCard
|
|
37
|
-
flaggable
|
|
38
40
|
title="Financeiro e Jurídico"
|
|
39
41
|
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
40
42
|
color="#FDF6E3"
|
|
@@ -53,8 +55,10 @@ DisabledProductCard.storyName = 'Disabled Product Card'
|
|
|
53
55
|
|
|
54
56
|
export const FlaggedProductCard = () => (
|
|
55
57
|
<ProductCard
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
favorite={{
|
|
59
|
+
flagged: true,
|
|
60
|
+
onFlag: () => console.log('flagged')
|
|
61
|
+
}}
|
|
58
62
|
title="Financeiro e Jurídico"
|
|
59
63
|
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
60
64
|
color="#FDF6E3"
|
|
@@ -73,7 +77,6 @@ FlaggedProductCard.storyName = 'Flagged Product Card'
|
|
|
73
77
|
|
|
74
78
|
export const NoBorderProductCard = () => (
|
|
75
79
|
<ProductCard
|
|
76
|
-
flaggable
|
|
77
80
|
title="Financeiro e Jurídico"
|
|
78
81
|
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
79
82
|
color="#FDF6E3"
|
|
@@ -89,3 +92,48 @@ export const NoBorderProductCard = () => (
|
|
|
89
92
|
/>
|
|
90
93
|
)
|
|
91
94
|
NoBorderProductCard.storyName = 'No Border Product Card'
|
|
95
|
+
|
|
96
|
+
export const ProductCardGroup = () => (
|
|
97
|
+
<div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', justifyContent: 'center', width: '1024px'}}>
|
|
98
|
+
<ProductCard
|
|
99
|
+
title="Financeiro e Jurídico"
|
|
100
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
101
|
+
color="#FDF6E3"
|
|
102
|
+
icon={{
|
|
103
|
+
iconName: 'olosAnalytics',
|
|
104
|
+
iconColor: '#B16E4B',
|
|
105
|
+
bgColor: '#F6F07F',
|
|
106
|
+
scale: 'medium',
|
|
107
|
+
iconWidth: '36px',
|
|
108
|
+
iconHeight: '36px',
|
|
109
|
+
}}
|
|
110
|
+
/>
|
|
111
|
+
<ProductCard
|
|
112
|
+
title="Financeiro e Jurídico"
|
|
113
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
114
|
+
color="#FDF6E3"
|
|
115
|
+
icon={{
|
|
116
|
+
iconName: 'olosCloud',
|
|
117
|
+
iconColor: '#B16E4B',
|
|
118
|
+
bgColor: '#F6F07F',
|
|
119
|
+
scale: 'medium',
|
|
120
|
+
iconWidth: '36px',
|
|
121
|
+
iconHeight: '36px',
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
<ProductCard
|
|
125
|
+
title="Financeiro e Jurídico"
|
|
126
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
127
|
+
color="#FDF6E3"
|
|
128
|
+
icon={{
|
|
129
|
+
iconName: 'olosAnywhere',
|
|
130
|
+
iconColor: '#B16E4B',
|
|
131
|
+
bgColor: '#F6F07F',
|
|
132
|
+
scale: 'medium',
|
|
133
|
+
iconWidth: '36px',
|
|
134
|
+
iconHeight: '36px',
|
|
135
|
+
}}
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
)
|
|
139
|
+
ProductCardGroup.storyName = 'Product Card Group'
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { __assign, __rest } from "tslib";
|
|
3
|
-
import { Button as MuiButton } from '@mui/material';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
export var Button = function (_a) {
|
|
6
|
-
var label = _a.label, rest = __rest(_a, ["label"]);
|
|
7
|
-
var t = useTranslation().t;
|
|
8
|
-
var newLabel = label ? label : t('buttonText');
|
|
9
|
-
return (React.createElement(MuiButton, __assign({}, rest, { sx: { color: rest.variant === 'contained' ? '#FFFF' : rest.color } }), newLabel));
|
|
10
|
-
};
|
|
11
|
-
Button.defaultProps = {
|
|
12
|
-
variant: 'contained',
|
|
13
|
-
size: 'medium',
|
|
14
|
-
color: 'primary',
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,CAAC,IAAM,MAAM,GAAG,UAAC,EAAmC;IAAjC,IAAA,KAAK,WAAA,EAAK,IAAI,cAAhB,SAAkB,CAAF;IAC7B,IAAA,CAAC,GAAK,cAAc,EAAE,EAArB,CAAqB;IAC9B,IAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAA;IAChD,OAAO,CACL,oBAAC,SAAS,eAAK,IAAI,IAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,KACpF,QAAQ,CACC,CACb,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,YAAY,GAAG;IACpB,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;CACjB,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Theme } from '@emotion/react';
|
|
3
|
-
import { Button } from './index';
|
|
4
|
-
import { ButtonPropsColorOverrides, ButtonPropsSizeOverrides, ButtonPropsVariantOverrides, ButtonProps as MuiButtonProps, SxProps } from '@mui/material';
|
|
5
|
-
import { OverridableStringUnion } from '@mui/types';
|
|
6
|
-
type MuiButtonBaseProps = Pick<MuiButtonProps, 'sx' | 'color' | 'size' | 'variant'>;
|
|
7
|
-
export interface ButtonBaseProps extends MuiButtonBaseProps {
|
|
8
|
-
label: string;
|
|
9
|
-
sx?: SxProps<Theme>;
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
onClick?: (event: React.MouseEvent | React.KeyboardEvent | React.TouchEvent) => void;
|
|
12
|
-
color?: OverridableStringUnion<'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning', ButtonPropsColorOverrides>;
|
|
13
|
-
size?: OverridableStringUnion<'small' | 'medium' | 'large', ButtonPropsSizeOverrides>;
|
|
14
|
-
variant?: OverridableStringUnion<'text' | 'outlined' | 'contained', ButtonPropsVariantOverrides>;
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
}
|
|
17
|
-
export type ButtonType = keyof typeof Button;
|
|
18
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/Button/types.tsx"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Icon } from '@iconify/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export var IconifyIcon = function (_a) {
|
|
4
|
-
var iconName = _a.iconName, color = _a.color, size = _a.size;
|
|
5
|
-
return (React.createElement(Icon, { icon: iconName, color: color, width: size, strokeWidth: 2.5 }));
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=IconifyIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconifyIcon.js","sourceRoot":"","sources":["../../../src/components/IconifyIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,CAAC,IAAM,WAAW,GAAwB,UAAC,EAIhD;QAHG,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,IAAI,UAAA;IAEJ,OAAO,CACH,oBAAC,IAAI,IACD,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,EACX,WAAW,EAAE,GAAG,GAClB,CACL,CAAA;AACL,CAAC,CAAA"}
|