@apia/icons 1.0.4 → 2.0.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.
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+
3
+ declare const FileIcon: ({ docName, iconSize, }: {
4
+ docName: string;
5
+ iconSize?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
6
+ }) => React.JSX.Element;
7
+
8
+ export { FileIcon };
9
+ //# sourceMappingURL=FileIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileIcon.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,122 @@
1
+ import { jsx } from '@apia/theme/jsx-runtime';
2
+ import { injectStyles, Box, getVariant } from '@apia/theme';
3
+
4
+ function getFileExtension(fileName) {
5
+ return (fileName.match(/\.([^.]+)$/) ?? [])[1] ?? "";
6
+ }
7
+ injectStyles("layout.common.components.fileIcon", {
8
+ "&": {
9
+ fontFamily: "Arial, Tahoma, sans-serif",
10
+ fontWeight: 300,
11
+ display: "inline-block",
12
+ width: "24px",
13
+ height: "32px",
14
+ background: "#018fef",
15
+ position: "relative",
16
+ borderRadius: "2px",
17
+ textAlign: "left",
18
+ WebkitFontSmoothing: "antialiased",
19
+ margin: "2px !important"
20
+ },
21
+ "&::before": {
22
+ display: "block",
23
+ content: '""',
24
+ position: "absolute",
25
+ top: "0",
26
+ right: "0",
27
+ width: "0",
28
+ height: "0",
29
+ borderBottomLeftRadius: "2px",
30
+ borderWidth: "5px",
31
+ borderStyle: "solid",
32
+ borderTopColor: "palette.background.paper",
33
+ borderRightColor: "palette.background.paper",
34
+ borderBottomColor: "rgba(255,255,255,.35)",
35
+ borderLeftColor: "rgba(255,255,255,.35)"
36
+ },
37
+ "&::after": {
38
+ display: "block",
39
+ content: "attr(data-extension)",
40
+ position: "absolute",
41
+ bottom: "0",
42
+ left: "0",
43
+ fontSize: "10px",
44
+ color: "#fff",
45
+ textTransform: "lowercase",
46
+ width: "100%",
47
+ padding: "2px",
48
+ whiteSpace: "nowrap",
49
+ overflow: "hidden"
50
+ },
51
+ "&.xs": { width: "12px", height: "16px", borderRadius: "2px" },
52
+ "&.xs::before": {
53
+ borderBottomLeftRadius: "1px",
54
+ borderWidth: "3px"
55
+ },
56
+ "&.xs::after": {
57
+ content: '""',
58
+ borderBottom: "2px solid rgba(255,255,255,.45)",
59
+ width: "auto",
60
+ left: "2px",
61
+ right: "2px",
62
+ bottom: "3px"
63
+ },
64
+ "&.sm": { width: "18px", height: "24px", borderRadius: "2px" },
65
+ "&.sm::before": {
66
+ borderBottomLeftRadius: "2px",
67
+ borderWidth: "4px"
68
+ },
69
+ "&.sm::after": { fontSize: "7px", padding: "2px" },
70
+ "&.lg": { width: "48px", height: "64px", borderRadius: "3px" },
71
+ "&.lg::before": {
72
+ borderBottomLeftRadius: "2px",
73
+ borderWidth: "8px"
74
+ },
75
+ "&.lg::after": { fontSize: "11px", padding: "4px 6px" },
76
+ "&.lg.sm": { width: "30px", height: "40px", fontSize: "11px" },
77
+ "&.xl": { width: "96px", height: "128px", borderRadius: "4px" },
78
+ "&.xl::before": {
79
+ borderBottomLeftRadius: "4px",
80
+ borderWidth: "16px"
81
+ },
82
+ "&.xl::after": { fontSize: "24px", padding: "4px 10px" },
83
+ "&.sm.sm": { height: "18px" },
84
+ "&[data-extension=zip], &[data-extension=rar]": {
85
+ background: "#acacac"
86
+ },
87
+ "&[data-extension^=doc], &[data-extension^=docx], &[data-extension^=odt]": {
88
+ background: "#307cf1"
89
+ },
90
+ "&[data-extension^=xls], &[data-extension^=xlsx]": {
91
+ background: "#0f9d58"
92
+ },
93
+ "&[data-extension^=ppt]": { background: "#d24726" },
94
+ "&[data-extension=pdf]": { background: "#e13d34" },
95
+ "&[data-extension=txt]": { background: "#5eb533" },
96
+ "&[data-extension=mp3], &[data-extension=wma], &[data-extension=m4a], &[data-extension=flac]": {
97
+ background: "#8e44ad"
98
+ },
99
+ "&[data-extension=mp4], &[data-extension=wmv], &[data-extension=mov], &[data-extension=avi], &[data-extension=mkv]": {
100
+ background: "#7a3ce7"
101
+ },
102
+ "&[data-extension=bmp], &[data-extension=jpg], &[data-extension=jpeg], &[data-extension=gif], &[data-extension=png]": {
103
+ background: "#f4b400"
104
+ }
105
+ });
106
+ const FileIcon = ({
107
+ docName,
108
+ iconSize
109
+ }) => {
110
+ const extension = getFileExtension(docName);
111
+ return /* @__PURE__ */ jsx(
112
+ Box,
113
+ {
114
+ className: `file__icon ${iconSize ?? ""}`,
115
+ "data-extension": extension,
116
+ ...getVariant("layout.common.components.fileIcon")
117
+ }
118
+ );
119
+ };
120
+
121
+ export { FileIcon };
122
+ //# sourceMappingURL=FileIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileIcon.js","sources":["../src/FileIcon.tsx"],"sourcesContent":["import { Box, getVariant, injectStyles } from '@apia/theme';\n\nfunction getFileExtension(fileName: string) {\n return (fileName.match(/\\.([^.]+)$/) ?? [])[1] ?? '';\n}\n\ninjectStyles('layout.common.components.fileIcon', {\n '&': {\n fontFamily: 'Arial, Tahoma, sans-serif',\n fontWeight: 300,\n display: 'inline-block',\n width: '24px',\n height: '32px',\n background: '#018fef',\n position: 'relative',\n borderRadius: '2px',\n textAlign: 'left',\n WebkitFontSmoothing: 'antialiased',\n margin: '2px !important',\n },\n '&::before': {\n display: 'block',\n content: '\"\"',\n position: 'absolute',\n top: '0',\n right: '0',\n width: '0',\n height: '0',\n borderBottomLeftRadius: '2px',\n borderWidth: '5px',\n borderStyle: 'solid',\n borderTopColor: 'palette.background.paper',\n borderRightColor: 'palette.background.paper',\n borderBottomColor: 'rgba(255,255,255,.35)',\n borderLeftColor: 'rgba(255,255,255,.35)',\n },\n '&::after': {\n display: 'block',\n content: 'attr(data-extension)',\n position: 'absolute',\n bottom: '0',\n left: '0',\n fontSize: '10px',\n color: '#fff',\n textTransform: 'lowercase',\n width: '100%',\n padding: '2px',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n '&.xs': { width: '12px', height: '16px', borderRadius: '2px' },\n '&.xs::before': {\n borderBottomLeftRadius: '1px',\n borderWidth: '3px',\n },\n '&.xs::after': {\n content: '\"\"',\n borderBottom: '2px solid rgba(255,255,255,.45)',\n width: 'auto',\n left: '2px',\n right: '2px',\n bottom: '3px',\n },\n '&.sm': { width: '18px', height: '24px', borderRadius: '2px' },\n '&.sm::before': {\n borderBottomLeftRadius: '2px',\n borderWidth: '4px',\n },\n '&.sm::after': { fontSize: '7px', padding: '2px' },\n '&.lg': { width: '48px', height: '64px', borderRadius: '3px' },\n '&.lg::before': {\n borderBottomLeftRadius: '2px',\n borderWidth: '8px',\n },\n '&.lg::after': { fontSize: '11px', padding: '4px 6px' },\n '&.lg.sm': { width: '30px', height: '40px', fontSize: '11px' },\n '&.xl': { width: '96px', height: '128px', borderRadius: '4px' },\n '&.xl::before': {\n borderBottomLeftRadius: '4px',\n borderWidth: '16px',\n },\n '&.xl::after': { fontSize: '24px', padding: '4px 10px' },\n '&.sm.sm': { height: '18px' },\n '&[data-extension=zip], &[data-extension=rar]': {\n background: '#acacac',\n },\n '&[data-extension^=doc], &[data-extension^=docx], &[data-extension^=odt]': {\n background: '#307cf1',\n },\n '&[data-extension^=xls], &[data-extension^=xlsx]': {\n background: '#0f9d58',\n },\n '&[data-extension^=ppt]': { background: '#d24726' },\n '&[data-extension=pdf]': { background: '#e13d34' },\n '&[data-extension=txt]': { background: '#5eb533' },\n '&[data-extension=mp3], &[data-extension=wma], &[data-extension=m4a], &[data-extension=flac]':\n {\n background: '#8e44ad',\n },\n '&[data-extension=mp4], &[data-extension=wmv], &[data-extension=mov], &[data-extension=avi], &[data-extension=mkv]':\n {\n background: '#7a3ce7',\n },\n '&[data-extension=bmp], &[data-extension=jpg], &[data-extension=jpeg], &[data-extension=gif], &[data-extension=png]':\n {\n background: '#f4b400',\n },\n});\n\nexport const FileIcon = ({\n docName,\n iconSize,\n}: {\n docName: string;\n iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n}) => {\n const extension = getFileExtension(docName);\n\n return (\n <Box\n className={`file__icon ${iconSize ?? ''}`}\n data-extension={extension}\n {...getVariant('layout.common.components.fileIcon')}\n />\n );\n};\n"],"names":[],"mappings":";;;AAEA,SAAS,iBAAiB,QAAkB,EAAA;AAC1C,EAAA,OAAA,CAAQ,SAAS,KAAM,CAAA,YAAY,KAAK,EAAC,EAAG,CAAC,CAAK,IAAA,EAAA,CAAA;AACpD,CAAA;AAEA,YAAA,CAAa,mCAAqC,EAAA;AAAA,EAChD,GAAK,EAAA;AAAA,IACH,UAAY,EAAA,2BAAA;AAAA,IACZ,UAAY,EAAA,GAAA;AAAA,IACZ,OAAS,EAAA,cAAA;AAAA,IACT,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,IACR,UAAY,EAAA,SAAA;AAAA,IACZ,QAAU,EAAA,UAAA;AAAA,IACV,YAAc,EAAA,KAAA;AAAA,IACd,SAAW,EAAA,MAAA;AAAA,IACX,mBAAqB,EAAA,aAAA;AAAA,IACrB,MAAQ,EAAA,gBAAA;AAAA,GACV;AAAA,EACA,WAAa,EAAA;AAAA,IACX,OAAS,EAAA,OAAA;AAAA,IACT,OAAS,EAAA,IAAA;AAAA,IACT,QAAU,EAAA,UAAA;AAAA,IACV,GAAK,EAAA,GAAA;AAAA,IACL,KAAO,EAAA,GAAA;AAAA,IACP,KAAO,EAAA,GAAA;AAAA,IACP,MAAQ,EAAA,GAAA;AAAA,IACR,sBAAwB,EAAA,KAAA;AAAA,IACxB,WAAa,EAAA,KAAA;AAAA,IACb,WAAa,EAAA,OAAA;AAAA,IACb,cAAgB,EAAA,0BAAA;AAAA,IAChB,gBAAkB,EAAA,0BAAA;AAAA,IAClB,iBAAmB,EAAA,uBAAA;AAAA,IACnB,eAAiB,EAAA,uBAAA;AAAA,GACnB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,OAAA;AAAA,IACT,OA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E,CAAA,CAAA;AAAA,MACvC,gBAAgB,EAAA,SAAA;AAAA,MACf,GAAG,WAAW,mCAAmC,CAAA;AAAA,KAAA;AAAA,GACpD,CAAA;AAEJ;;;;"}
package/dist/Icon.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { IconBaseProps } from '@meronex/icons';
2
+ import { RequireExactlyOne } from 'type-fest';
3
+ import React__default from 'react';
4
+ import { TIconName, TIconType } from './iconMap.js';
5
+
6
+ type TIconArgs = RequireExactlyOne<{
7
+ icon: TIconName | TIconType;
8
+ name: TIconName;
9
+ }>;
10
+ declare const Icon: React__default.ForwardRefExoticComponent<(TIconArgs & IconBaseProps & {
11
+ title: string;
12
+ imageSrc?: string | undefined;
13
+ }) & React__default.RefAttributes<any>>;
14
+
15
+ export { Icon };
16
+ //# sourceMappingURL=Icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/Icon.js ADDED
@@ -0,0 +1,44 @@
1
+ import { jsx } from '@apia/theme/jsx-runtime';
2
+ import React, { forwardRef } from 'react';
3
+ import { icons, isIconName } from './iconMap.js';
4
+ import { Box } from '@apia/theme';
5
+
6
+ const Icon = forwardRef(({ icon, name, size, ...props }, ref) => {
7
+ const IconComponent = (
8
+ // eslint-disable-next-line no-nested-ternary
9
+ icon === void 0 ? icons[name] : isIconName(icon) ? icons[icon] : icon
10
+ );
11
+ const sx = React.useMemo(() => {
12
+ return {
13
+ "&.icon__wrapper": {
14
+ display: "inline-flex",
15
+ p: 0,
16
+ m: 0,
17
+ svg: {
18
+ width: size,
19
+ height: size
20
+ }
21
+ }
22
+ };
23
+ }, [size]);
24
+ return /* @__PURE__ */ jsx(Box, { ref, as: "span", className: "icon__wrapper", sx, children: props.imageSrc ? /* @__PURE__ */ jsx(
25
+ "img",
26
+ {
27
+ "aria-label": props["aria-label"] ?? props.title,
28
+ style: {
29
+ height: size,
30
+ width: size
31
+ },
32
+ src: props.imageSrc
33
+ }
34
+ ) : /* @__PURE__ */ jsx(
35
+ IconComponent,
36
+ {
37
+ ...props,
38
+ "aria-label": props["aria-label"] ?? props.title
39
+ }
40
+ ) });
41
+ });
42
+
43
+ export { Icon };
44
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sources":["../src/Icon.tsx"],"sourcesContent":["import { IconBaseProps } from '@meronex/icons';\nimport { RequireExactlyOne } from 'type-fest';\nimport React, { forwardRef } from 'react';\nimport { icons, isIconName, TIconName, TIconType } from './iconMap';\nimport { Box } from '@apia/theme';\n\ntype TIconArgs = RequireExactlyOne<{\n icon: TIconName | TIconType;\n name: TIconName;\n}>;\n\nexport const Icon = forwardRef<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n any,\n TIconArgs & IconBaseProps & { title: string; imageSrc?: string }\n>(({ icon, name, size, ...props }, ref) => {\n const IconComponent =\n // eslint-disable-next-line no-nested-ternary\n icon === undefined ? icons[name] : isIconName(icon) ? icons[icon] : icon;\n\n const sx = React.useMemo(() => {\n return {\n '&.icon__wrapper': {\n display: 'inline-flex',\n p: 0,\n m: 0,\n\n svg: {\n width: size,\n height: size,\n },\n },\n };\n }, [size]);\n\n return (\n <Box ref={ref} as=\"span\" className=\"icon__wrapper\" sx={sx}>\n {props.imageSrc ? (\n <img\n aria-label={props['aria-label'] ?? props.title}\n style={{\n height: size,\n width: size,\n }}\n src={props.imageSrc}\n />\n ) : (\n <IconComponent\n {...props}\n aria-label={props['aria-label'] ?? props.title}\n />\n )}\n </Box>\n );\n});\n"],"names":[],"mappings":";;;;;AAWa,MAAA,IAAA,GAAO,UAIlB,CAAA,CAAC,EAAE,IAAA,EAAM,MAAM,IAAM,EAAA,GAAG,KAAM,EAAA,EAAG,GAAQ,KAAA;AACzC,EAAM,MAAA,aAAA;AAAA;AAAA,IAEJ,IAAA,KAAS,KAAY,CAAA,GAAA,KAAA,CAAM,IAAI,CAAA,GAAI,WAAW,IAAI,CAAA,GAAI,KAAM,CAAA,IAAI,CAAI,GAAA,IAAA;AAAA,GAAA,CAAA;AAEtE,EAAM,MAAA,EAAA,GAAK,KAAM,CAAA,OAAA,CAAQ,MAAM;AAC7B,IAAO,OAAA;AAAA,MACL,iBAAmB,EAAA;AAAA,QACjB,OAAS,EAAA,aAAA;AAAA,QACT,CAAG,EAAA,CAAA;AAAA,QACH,CAAG,EAAA,CAAA;AAAA,QAEH,GAAK,EAAA;AAAA,UACH,KAAO,EAAA,IAAA;AAAA,UACP,MAAQ,EAAA,IAAA;AAAA,SACV;AAAA,OACF;AAAA,KACF,CAAA;AAAA,GACF,EAAG,CAAC,IAAI,CAAC,CAAA,CAAA;AAET,EACE,uBAAA,GAAA,CAAC,OAAI,GAAU,EAAA,EAAA,EAAG,QAAO,SAAU,EAAA,eAAA,EAAgB,EAChD,EAAA,QAAA,EAAA,KAAA,CAAM,QACL,mBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,YAAY,EAAA,KAAA,CAAM,YAAY,CAAA,IAAK,KAAM,CAAA,KAAA;AAAA,MACzC,KAAO,EAAA;AAAA,QACL,MAAQ,EAAA,IAAA;AAAA,QACR,KAAO,EAAA,IAAA;AAAA,OACT;AAAA,MACA,KAAK,KAAM,CAAA,QAAA;AAAA,KAAA;AAAA,GAGb,mBAAA,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,YAAY,EAAA,KAAA,CAAM,YAAY,CAAA,IAAK,KAAM,CAAA,KAAA;AAAA,KAAA;AAAA,GAG/C,EAAA,CAAA,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,386 @@
1
+ import * as _meronex_icons_lib from '@meronex/icons/lib';
2
+ import { IconType } from '@meronex/icons';
3
+
4
+ type TIconType = IconType;
5
+ type TIconName = keyof typeof IconsMap;
6
+ /**
7
+ * La idea original al menos, es que los nombres de los íconos sean lo más
8
+ * genérico posible. Como ejemplo, tenemos el ícono Plus, cuyo nombre no indica
9
+ * nada acerca del rol que ocupa en la aplicación, sino que solamente describe
10
+ * qué ícono podemos esperar encontrar.
11
+ *
12
+ * Para indicar qué uso podría tener en la aplicación, se pueden agregar tags
13
+ * en el array tags correspondiente.
14
+ */
15
+ declare const IconsMap: {
16
+ Alert: {
17
+ icon: IconType;
18
+ tags: string[];
19
+ };
20
+ AreaSelect: {
21
+ icon: IconType;
22
+ tags: never[];
23
+ };
24
+ ArrowLeft: {
25
+ icon: IconType;
26
+ tags: never[];
27
+ };
28
+ ArrowRight: {
29
+ icon: IconType;
30
+ tags: never[];
31
+ };
32
+ ArrowUp: {
33
+ icon: IconType;
34
+ tags: never[];
35
+ };
36
+ ArrowDown: {
37
+ icon: IconType;
38
+ tags: never[];
39
+ };
40
+ ArrowRightThin: {
41
+ icon: _meronex_icons_lib.IconType;
42
+ tags: never[];
43
+ };
44
+ ArrowLeftThin: {
45
+ icon: _meronex_icons_lib.IconType;
46
+ tags: never[];
47
+ };
48
+ ArrowUpThin: {
49
+ icon: IconType;
50
+ tags: never[];
51
+ };
52
+ ArrowDownThin: {
53
+ icon: IconType;
54
+ tags: never[];
55
+ };
56
+ Broom: {
57
+ icon: IconType;
58
+ tags: string[];
59
+ };
60
+ Bulb: {
61
+ icon: IconType;
62
+ tags: string[];
63
+ };
64
+ Calendar: {
65
+ icon: IconType;
66
+ tags: string[];
67
+ };
68
+ Check: {
69
+ icon: IconType;
70
+ tags: string[];
71
+ };
72
+ CircleFilled: {
73
+ icon: IconType;
74
+ tags: never[];
75
+ };
76
+ Clock: {
77
+ icon: IconType;
78
+ tags: never[];
79
+ };
80
+ CloudArrow: {
81
+ icon: IconType;
82
+ tags: string[];
83
+ };
84
+ Close: {
85
+ icon: IconType;
86
+ tags: string[];
87
+ };
88
+ CloseThin: {
89
+ icon: IconType;
90
+ tags: string[];
91
+ };
92
+ Comment: {
93
+ icon: IconType;
94
+ tags: never[];
95
+ };
96
+ Copy: {
97
+ icon: IconType;
98
+ tags: never[];
99
+ };
100
+ CrossFilter: {
101
+ icon: IconType;
102
+ tags: never[];
103
+ };
104
+ Cube: {
105
+ icon: IconType;
106
+ tags: never[];
107
+ };
108
+ Desktop: {
109
+ icon: IconType;
110
+ tags: string[];
111
+ };
112
+ Difference: {
113
+ icon: IconType;
114
+ tags: never[];
115
+ };
116
+ Download: {
117
+ icon: IconType;
118
+ tags: never[];
119
+ };
120
+ DotSmall: {
121
+ icon: IconType;
122
+ tags: never[];
123
+ };
124
+ DotBig: {
125
+ icon: IconType;
126
+ tags: never[];
127
+ };
128
+ DragAndDrop: {
129
+ icon: IconType;
130
+ tags: string[];
131
+ };
132
+ Edit: {
133
+ icon: IconType;
134
+ tags: string[];
135
+ };
136
+ Ellipsis: {
137
+ icon: IconType;
138
+ tags: string[];
139
+ };
140
+ External: {
141
+ icon: IconType;
142
+ tags: string[];
143
+ };
144
+ File: {
145
+ icon: IconType;
146
+ tags: string[];
147
+ };
148
+ Filter: {
149
+ icon: IconType;
150
+ tags: never[];
151
+ };
152
+ First: {
153
+ icon: IconType;
154
+ tags: never[];
155
+ };
156
+ FlowTree: {
157
+ icon: IconType;
158
+ tags: never[];
159
+ };
160
+ FolderClosed: {
161
+ icon: IconType;
162
+ tags: string[];
163
+ };
164
+ FolderOpen: {
165
+ icon: IconType;
166
+ tags: string[];
167
+ };
168
+ FolderPlus: {
169
+ icon: IconType;
170
+ tags: string[];
171
+ };
172
+ Groups: {
173
+ icon: IconType;
174
+ tags: never[];
175
+ };
176
+ Hamburguer: {
177
+ icon: IconType;
178
+ tags: string[];
179
+ };
180
+ Help: {
181
+ icon: IconType;
182
+ tags: string[];
183
+ };
184
+ Home: {
185
+ icon: IconType;
186
+ tags: string[];
187
+ };
188
+ Info: {
189
+ icon: IconType;
190
+ tags: never[];
191
+ };
192
+ Last: {
193
+ icon: IconType;
194
+ tags: never[];
195
+ };
196
+ LetterAutocomplete: {
197
+ icon: IconType;
198
+ tags: never[];
199
+ };
200
+ Locked: {
201
+ icon: IconType;
202
+ tags: string[];
203
+ };
204
+ Magic: {
205
+ icon: IconType;
206
+ tags: string[];
207
+ };
208
+ Maximize: {
209
+ icon: IconType;
210
+ tags: string[];
211
+ };
212
+ Merge: {
213
+ icon: IconType;
214
+ tags: never[];
215
+ };
216
+ Minimize: {
217
+ icon: IconType;
218
+ tags: string[];
219
+ };
220
+ Minus: {
221
+ icon: IconType;
222
+ tags: string[];
223
+ };
224
+ MinusReverse: {
225
+ icon: IconType;
226
+ tags: string[];
227
+ };
228
+ MinusFilled: {
229
+ icon: IconType;
230
+ tags: string[];
231
+ };
232
+ Molecule: {
233
+ icon: IconType;
234
+ tags: string[];
235
+ };
236
+ Next: {
237
+ icon: IconType;
238
+ tags: never[];
239
+ };
240
+ Note: {
241
+ icon: IconType;
242
+ tags: never[];
243
+ };
244
+ PanHand: {
245
+ icon: IconType;
246
+ tags: string[];
247
+ };
248
+ Plus: {
249
+ icon: IconType;
250
+ tags: string[];
251
+ };
252
+ PlusReverse: {
253
+ icon: IconType;
254
+ tags: string[];
255
+ };
256
+ PlusFilled: {
257
+ icon: IconType;
258
+ tags: string[];
259
+ };
260
+ PlusThin: {
261
+ icon: IconType;
262
+ tags: never[];
263
+ };
264
+ Pointer: {
265
+ icon: IconType;
266
+ tags: string[];
267
+ };
268
+ Previous: {
269
+ icon: IconType;
270
+ tags: never[];
271
+ };
272
+ Print: {
273
+ icon: IconType;
274
+ tags: never[];
275
+ };
276
+ Redo: {
277
+ icon: IconType;
278
+ tags: never[];
279
+ };
280
+ Refresh: {
281
+ icon: IconType;
282
+ tags: string[];
283
+ };
284
+ Save: {
285
+ icon: IconType;
286
+ tags: never[];
287
+ };
288
+ Search: {
289
+ icon: IconType;
290
+ tags: never[];
291
+ };
292
+ Settings: {
293
+ icon: IconType;
294
+ tags: string[];
295
+ };
296
+ SquareFilled: {
297
+ icon: IconType;
298
+ tags: never[];
299
+ };
300
+ SquareOutline: {
301
+ icon: IconType;
302
+ tags: never[];
303
+ };
304
+ Sort: {
305
+ icon: IconType;
306
+ tags: never[];
307
+ };
308
+ Star: {
309
+ icon: IconType;
310
+ tags: string[];
311
+ };
312
+ Sum: {
313
+ icon: IconType;
314
+ tags: string[];
315
+ };
316
+ TaskList: {
317
+ icon: IconType;
318
+ tags: string[];
319
+ };
320
+ Translate: {
321
+ icon: IconType;
322
+ tags: string[];
323
+ };
324
+ Trash: {
325
+ icon: IconType;
326
+ tags: string[];
327
+ };
328
+ Undo: {
329
+ icon: IconType;
330
+ tags: string[];
331
+ };
332
+ Upload: {
333
+ icon: IconType;
334
+ tags: never[];
335
+ };
336
+ User: {
337
+ icon: IconType;
338
+ tags: never[];
339
+ };
340
+ User2: {
341
+ icon: IconType;
342
+ tags: never[];
343
+ };
344
+ Volume: {
345
+ icon: IconType;
346
+ tags: never[];
347
+ };
348
+ WindowMaximize: {
349
+ icon: IconType;
350
+ tags: never[];
351
+ };
352
+ WindowMinimize: {
353
+ icon: IconType;
354
+ tags: never[];
355
+ };
356
+ Work: {
357
+ icon: IconType;
358
+ tags: never[];
359
+ };
360
+ ZoomIn: {
361
+ icon: IconType;
362
+ tags: string[];
363
+ };
364
+ ZoomOut: {
365
+ icon: IconType;
366
+ tags: string[];
367
+ };
368
+ };
369
+ declare const icons: Record<"Alert" | "AreaSelect" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowDown" | "ArrowRightThin" | "ArrowLeftThin" | "ArrowUpThin" | "ArrowDownThin" | "Broom" | "Bulb" | "Calendar" | "Check" | "CircleFilled" | "Clock" | "CloudArrow" | "Close" | "CloseThin" | "Comment" | "Copy" | "CrossFilter" | "Cube" | "Desktop" | "Difference" | "Download" | "DotSmall" | "DotBig" | "DragAndDrop" | "Edit" | "Ellipsis" | "External" | "File" | "Filter" | "First" | "FlowTree" | "FolderClosed" | "FolderOpen" | "FolderPlus" | "Groups" | "Hamburguer" | "Help" | "Home" | "Info" | "Last" | "LetterAutocomplete" | "Locked" | "Magic" | "Maximize" | "Merge" | "Minimize" | "Minus" | "MinusReverse" | "MinusFilled" | "Molecule" | "Next" | "Note" | "PanHand" | "Plus" | "PlusReverse" | "PlusFilled" | "PlusThin" | "Pointer" | "Previous" | "Print" | "Redo" | "Refresh" | "Save" | "Search" | "Settings" | "SquareFilled" | "SquareOutline" | "Sort" | "Star" | "Sum" | "TaskList" | "Translate" | "Trash" | "Undo" | "Upload" | "User" | "User2" | "Volume" | "WindowMaximize" | "WindowMinimize" | "Work" | "ZoomIn" | "ZoomOut", IconType>;
370
+ /**
371
+ * Se puede utilizar este type guard para aceptar argumentos en los componentes
372
+ * que permitan pasar tanto un nombre de ícono como un ícono en sí.
373
+ *
374
+ * @example
375
+ *-
376
+ * ({icon}: {icon: TIconName | TIconType}) => {
377
+ * const ActualIcon = React.useMemo(
378
+ * ()=> isIconName(icon) ? (() => <Icon name={icon} />) : icon
379
+ * , [])
380
+ * return <ActualIcon />
381
+ * }
382
+ */
383
+ declare function isIconName(arg: TIconName | TIconType): arg is TIconName;
384
+
385
+ export { IconsMap, type TIconName, type TIconType, icons, isIconName };
386
+ //# sourceMappingURL=iconMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iconMap.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}