analytica-frontend-lib 1.0.93 → 1.0.95
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/IconRender/index.d.mts +36 -0
- package/dist/IconRender/index.d.ts +36 -0
- package/dist/IconRender/index.js +162 -0
- package/dist/IconRender/index.js.map +1 -0
- package/dist/IconRender/index.mjs +127 -0
- package/dist/IconRender/index.mjs.map +1 -0
- package/dist/Search/index.d.mts +27 -0
- package/dist/Search/index.d.ts +27 -0
- package/dist/Search/index.js +639 -0
- package/dist/Search/index.js.map +1 -0
- package/dist/Search/index.mjs +633 -0
- package/dist/Search/index.mjs.map +1 -0
- package/dist/index.css +72 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2049 -1725
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2426 -2107
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +72 -0
- package/dist/styles.css.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
|
|
3
|
+
interface IconRenderProps {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the icon to render
|
|
6
|
+
*/
|
|
7
|
+
iconName: string;
|
|
8
|
+
/**
|
|
9
|
+
* The color of the icon
|
|
10
|
+
* @default '#000000'
|
|
11
|
+
*/
|
|
12
|
+
color?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The size of the icon in pixels
|
|
15
|
+
* @default 24
|
|
16
|
+
*/
|
|
17
|
+
size?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The weight/style of the icon (for Phosphor icons)
|
|
20
|
+
* @default 'regular'
|
|
21
|
+
*/
|
|
22
|
+
weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Dynamic icon component that renders icons based on name
|
|
26
|
+
* Supports Phosphor icons and custom Chat icons (ChatPT, ChatEN, ChatES)
|
|
27
|
+
*
|
|
28
|
+
* @param iconName - The name of the icon to render
|
|
29
|
+
* @param color - The color of the icon
|
|
30
|
+
* @param size - The size of the icon in pixels
|
|
31
|
+
* @param weight - The weight/style of the icon (for Phosphor icons)
|
|
32
|
+
* @returns JSX element with the corresponding icon
|
|
33
|
+
*/
|
|
34
|
+
declare const IconRender: ({ iconName, color, size, weight, }: IconRenderProps) => JSX.Element;
|
|
35
|
+
|
|
36
|
+
export { IconRender, type IconRenderProps, IconRender as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
|
|
3
|
+
interface IconRenderProps {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the icon to render
|
|
6
|
+
*/
|
|
7
|
+
iconName: string;
|
|
8
|
+
/**
|
|
9
|
+
* The color of the icon
|
|
10
|
+
* @default '#000000'
|
|
11
|
+
*/
|
|
12
|
+
color?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The size of the icon in pixels
|
|
15
|
+
* @default 24
|
|
16
|
+
*/
|
|
17
|
+
size?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The weight/style of the icon (for Phosphor icons)
|
|
20
|
+
* @default 'regular'
|
|
21
|
+
*/
|
|
22
|
+
weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Dynamic icon component that renders icons based on name
|
|
26
|
+
* Supports Phosphor icons and custom Chat icons (ChatPT, ChatEN, ChatES)
|
|
27
|
+
*
|
|
28
|
+
* @param iconName - The name of the icon to render
|
|
29
|
+
* @param color - The color of the icon
|
|
30
|
+
* @param size - The size of the icon in pixels
|
|
31
|
+
* @param weight - The weight/style of the icon (for Phosphor icons)
|
|
32
|
+
* @returns JSX element with the corresponding icon
|
|
33
|
+
*/
|
|
34
|
+
declare const IconRender: ({ iconName, color, size, weight, }: IconRenderProps) => JSX.Element;
|
|
35
|
+
|
|
36
|
+
export { IconRender, type IconRenderProps, IconRender as default };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/components/IconRender/IconRender.tsx
|
|
31
|
+
var IconRender_exports = {};
|
|
32
|
+
__export(IconRender_exports, {
|
|
33
|
+
IconRender: () => IconRender,
|
|
34
|
+
default: () => IconRender_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(IconRender_exports);
|
|
37
|
+
var PhosphorIcons = __toESM(require("phosphor-react"));
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
|
+
"svg",
|
|
41
|
+
{
|
|
42
|
+
width: size,
|
|
43
|
+
height: size,
|
|
44
|
+
viewBox: "0 0 32 32",
|
|
45
|
+
fill: "none",
|
|
46
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
+
"path",
|
|
50
|
+
{
|
|
51
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
52
|
+
fill: color
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
+
"path",
|
|
57
|
+
{
|
|
58
|
+
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
59
|
+
fill: color
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
"path",
|
|
64
|
+
{
|
|
65
|
+
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
66
|
+
fill: color
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
73
|
+
"svg",
|
|
74
|
+
{
|
|
75
|
+
width: size,
|
|
76
|
+
height: size,
|
|
77
|
+
viewBox: "0 0 32 32",
|
|
78
|
+
fill: "none",
|
|
79
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
+
"path",
|
|
83
|
+
{
|
|
84
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
85
|
+
fill: color
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
|
+
"path",
|
|
90
|
+
{
|
|
91
|
+
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
92
|
+
fill: color
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
"path",
|
|
97
|
+
{
|
|
98
|
+
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
99
|
+
fill: color
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
106
|
+
"svg",
|
|
107
|
+
{
|
|
108
|
+
width: size,
|
|
109
|
+
height: size,
|
|
110
|
+
viewBox: "0 0 32 32",
|
|
111
|
+
fill: "none",
|
|
112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
+
"path",
|
|
116
|
+
{
|
|
117
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
118
|
+
fill: color
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
125
|
+
fill: color
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
|
+
"path",
|
|
130
|
+
{
|
|
131
|
+
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
132
|
+
fill: color
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
var IconRender = ({
|
|
139
|
+
iconName,
|
|
140
|
+
color = "#000000",
|
|
141
|
+
size = 24,
|
|
142
|
+
weight = "regular"
|
|
143
|
+
}) => {
|
|
144
|
+
switch (iconName) {
|
|
145
|
+
case "Chat_PT":
|
|
146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChatPT, { size, color });
|
|
147
|
+
case "Chat_EN":
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChatEN, { size, color });
|
|
149
|
+
case "Chat_ES":
|
|
150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChatES, { size, color });
|
|
151
|
+
default: {
|
|
152
|
+
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconComponent, { size, color, weight });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
var IconRender_default = IconRender;
|
|
158
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
159
|
+
0 && (module.exports = {
|
|
160
|
+
IconRender
|
|
161
|
+
});
|
|
162
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/IconRender/IconRender.tsx"],"sourcesContent":["import { ComponentType, JSX } from 'react';\nimport * as PhosphorIcons from 'phosphor-react';\n\ntype PhosphorIconName = keyof typeof PhosphorIcons;\ntype PhosphorIconComponent = ComponentType<{\n size?: number;\n color?: string;\n weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';\n}>;\n\nexport interface IconRenderProps {\n /**\n * The name of the icon to render\n */\n iconName: string;\n /**\n * The color of the icon\n * @default '#000000'\n */\n color?: string;\n /**\n * The size of the icon in pixels\n * @default 24\n */\n size?: number;\n /**\n * The weight/style of the icon (for Phosphor icons)\n * @default 'regular'\n */\n weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';\n}\n\n// Custom Chat SVG Components\nconst ChatPT = ({ size, color }: { size: number; color: string }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z\"\n fill={color}\n />\n <path\n d=\"M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z\"\n fill={color}\n />\n <path\n d=\"M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z\"\n fill={color}\n />\n </svg>\n);\n\nconst ChatEN = ({ size, color }: { size: number; color: string }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z\"\n fill={color}\n />\n <path\n d=\"M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z\"\n fill={color}\n />\n <path\n d=\"M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z\"\n fill={color}\n />\n </svg>\n);\n\nconst ChatES = ({ size, color }: { size: number; color: string }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z\"\n fill={color}\n />\n <path\n d=\"M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z\"\n fill={color}\n />\n <path\n d=\"M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z\"\n fill={color}\n />\n </svg>\n);\n\n/**\n * Dynamic icon component that renders icons based on name\n * Supports Phosphor icons and custom Chat icons (ChatPT, ChatEN, ChatES)\n *\n * @param iconName - The name of the icon to render\n * @param color - The color of the icon\n * @param size - The size of the icon in pixels\n * @param weight - The weight/style of the icon (for Phosphor icons)\n * @returns JSX element with the corresponding icon\n */\nexport const IconRender = ({\n iconName,\n color = '#000000',\n size = 24,\n weight = 'regular',\n}: IconRenderProps): JSX.Element => {\n switch (iconName) {\n case 'Chat_PT':\n return <ChatPT size={size} color={color} />;\n case 'Chat_EN':\n return <ChatEN size={size} color={color} />;\n case 'Chat_ES':\n return <ChatES size={size} color={color} />;\n default: {\n const IconComponent = (PhosphorIcons[iconName as PhosphorIconName] ||\n PhosphorIcons.Question) as PhosphorIconComponent;\n\n return <IconComponent size={size} color={color} weight={weight} />;\n }\n }\n};\n\nexport default IconRender;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAiC7B;AADF,IAAM,SAAS,CAAC,EAAE,MAAM,MAAM,MAC5B;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA;AAAA;AACF;AAGF,IAAM,SAAS,CAAC,EAAE,MAAM,MAAM,MAC5B;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA;AAAA;AACF;AAGF,IAAM,SAAS,CAAC,EAAE,MAAM,MAAM,MAC5B;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA;AAAA;AACF;AAaK,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AACX,MAAoC;AAClC,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,4CAAC,UAAO,MAAY,OAAc;AAAA,IAC3C,KAAK;AACH,aAAO,4CAAC,UAAO,MAAY,OAAc;AAAA,IAC3C,KAAK;AACH,aAAO,4CAAC,UAAO,MAAY,OAAc;AAAA,IAC3C,SAAS;AACP,YAAM,gBAAiB,cAAc,QAA4B,KACjD;AAEhB,aAAO,4CAAC,iBAAc,MAAY,OAAc,QAAgB;AAAA,IAClE;AAAA,EACF;AACF;AAEA,IAAO,qBAAQ;","names":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// src/components/IconRender/IconRender.tsx
|
|
2
|
+
import * as PhosphorIcons from "phosphor-react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
width: size,
|
|
8
|
+
height: size,
|
|
9
|
+
viewBox: "0 0 32 32",
|
|
10
|
+
fill: "none",
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsx(
|
|
14
|
+
"path",
|
|
15
|
+
{
|
|
16
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
17
|
+
fill: color
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
"path",
|
|
22
|
+
{
|
|
23
|
+
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
24
|
+
fill: color
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
31
|
+
fill: color
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs(
|
|
38
|
+
"svg",
|
|
39
|
+
{
|
|
40
|
+
width: size,
|
|
41
|
+
height: size,
|
|
42
|
+
viewBox: "0 0 32 32",
|
|
43
|
+
fill: "none",
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
"path",
|
|
48
|
+
{
|
|
49
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
50
|
+
fill: color
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
"path",
|
|
55
|
+
{
|
|
56
|
+
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
57
|
+
fill: color
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ jsx(
|
|
61
|
+
"path",
|
|
62
|
+
{
|
|
63
|
+
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
64
|
+
fill: color
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs(
|
|
71
|
+
"svg",
|
|
72
|
+
{
|
|
73
|
+
width: size,
|
|
74
|
+
height: size,
|
|
75
|
+
viewBox: "0 0 32 32",
|
|
76
|
+
fill: "none",
|
|
77
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(
|
|
80
|
+
"path",
|
|
81
|
+
{
|
|
82
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
83
|
+
fill: color
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
"path",
|
|
88
|
+
{
|
|
89
|
+
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
90
|
+
fill: color
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
"path",
|
|
95
|
+
{
|
|
96
|
+
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
97
|
+
fill: color
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
var IconRender = ({
|
|
104
|
+
iconName,
|
|
105
|
+
color = "#000000",
|
|
106
|
+
size = 24,
|
|
107
|
+
weight = "regular"
|
|
108
|
+
}) => {
|
|
109
|
+
switch (iconName) {
|
|
110
|
+
case "Chat_PT":
|
|
111
|
+
return /* @__PURE__ */ jsx(ChatPT, { size, color });
|
|
112
|
+
case "Chat_EN":
|
|
113
|
+
return /* @__PURE__ */ jsx(ChatEN, { size, color });
|
|
114
|
+
case "Chat_ES":
|
|
115
|
+
return /* @__PURE__ */ jsx(ChatES, { size, color });
|
|
116
|
+
default: {
|
|
117
|
+
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
118
|
+
return /* @__PURE__ */ jsx(IconComponent, { size, color, weight });
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
var IconRender_default = IconRender;
|
|
123
|
+
export {
|
|
124
|
+
IconRender,
|
|
125
|
+
IconRender_default as default
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/IconRender/IconRender.tsx"],"sourcesContent":["import { ComponentType, JSX } from 'react';\nimport * as PhosphorIcons from 'phosphor-react';\n\ntype PhosphorIconName = keyof typeof PhosphorIcons;\ntype PhosphorIconComponent = ComponentType<{\n size?: number;\n color?: string;\n weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';\n}>;\n\nexport interface IconRenderProps {\n /**\n * The name of the icon to render\n */\n iconName: string;\n /**\n * The color of the icon\n * @default '#000000'\n */\n color?: string;\n /**\n * The size of the icon in pixels\n * @default 24\n */\n size?: number;\n /**\n * The weight/style of the icon (for Phosphor icons)\n * @default 'regular'\n */\n weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';\n}\n\n// Custom Chat SVG Components\nconst ChatPT = ({ size, color }: { size: number; color: string }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z\"\n fill={color}\n />\n <path\n d=\"M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z\"\n fill={color}\n />\n <path\n d=\"M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z\"\n fill={color}\n />\n </svg>\n);\n\nconst ChatEN = ({ size, color }: { size: number; color: string }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z\"\n fill={color}\n />\n <path\n d=\"M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z\"\n fill={color}\n />\n <path\n d=\"M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z\"\n fill={color}\n />\n </svg>\n);\n\nconst ChatES = ({ size, color }: { size: number; color: string }) => (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z\"\n fill={color}\n />\n <path\n d=\"M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z\"\n fill={color}\n />\n <path\n d=\"M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z\"\n fill={color}\n />\n </svg>\n);\n\n/**\n * Dynamic icon component that renders icons based on name\n * Supports Phosphor icons and custom Chat icons (ChatPT, ChatEN, ChatES)\n *\n * @param iconName - The name of the icon to render\n * @param color - The color of the icon\n * @param size - The size of the icon in pixels\n * @param weight - The weight/style of the icon (for Phosphor icons)\n * @returns JSX element with the corresponding icon\n */\nexport const IconRender = ({\n iconName,\n color = '#000000',\n size = 24,\n weight = 'regular',\n}: IconRenderProps): JSX.Element => {\n switch (iconName) {\n case 'Chat_PT':\n return <ChatPT size={size} color={color} />;\n case 'Chat_EN':\n return <ChatEN size={size} color={color} />;\n case 'Chat_ES':\n return <ChatES size={size} color={color} />;\n default: {\n const IconComponent = (PhosphorIcons[iconName as PhosphorIconName] ||\n PhosphorIcons.Question) as PhosphorIconComponent;\n\n return <IconComponent size={size} color={color} weight={weight} />;\n }\n }\n};\n\nexport default IconRender;\n"],"mappings":";AACA,YAAY,mBAAmB;AAiC7B,SAOE,KAPF;AADF,IAAM,SAAS,CAAC,EAAE,MAAM,MAAM,MAC5B;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA;AAAA;AACF;AAGF,IAAM,SAAS,CAAC,EAAE,MAAM,MAAM,MAC5B;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA;AAAA;AACF;AAGF,IAAM,SAAS,CAAC,EAAE,MAAM,MAAM,MAC5B;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAM;AAAA;AAAA,MACR;AAAA;AAAA;AACF;AAaK,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AACX,MAAoC;AAClC,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,oBAAC,UAAO,MAAY,OAAc;AAAA,IAC3C,KAAK;AACH,aAAO,oBAAC,UAAO,MAAY,OAAc;AAAA,IAC3C,KAAK;AACH,aAAO,oBAAC,UAAO,MAAY,OAAc;AAAA,IAC3C,SAAS;AACP,YAAM,gBAAiB,cAAc,QAA4B,KACjD;AAEhB,aAAO,oBAAC,iBAAc,MAAY,OAAc,QAAgB;AAAA,IAClE;AAAA,EACF;AACF;AAEA,IAAO,qBAAQ;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const Search: react.ForwardRefExoticComponent<{
|
|
5
|
+
/** List of options to show in dropdown */
|
|
6
|
+
options: string[];
|
|
7
|
+
/** Callback when an option is selected from dropdown */
|
|
8
|
+
onSelect?: (value: string) => void;
|
|
9
|
+
/** Callback when search input changes */
|
|
10
|
+
onSearch?: (query: string) => void;
|
|
11
|
+
/** Control dropdown visibility externally */
|
|
12
|
+
showDropdown?: boolean;
|
|
13
|
+
/** Callback when dropdown open state changes */
|
|
14
|
+
onDropdownChange?: (open: boolean) => void;
|
|
15
|
+
/** Maximum height of dropdown in pixels */
|
|
16
|
+
dropdownMaxHeight?: number;
|
|
17
|
+
/** Text to show when no results are found */
|
|
18
|
+
noResultsText?: string;
|
|
19
|
+
/** Additional CSS classes to apply to the input */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Additional CSS classes to apply to the container */
|
|
22
|
+
containerClassName?: string;
|
|
23
|
+
/** Callback when clear button is clicked */
|
|
24
|
+
onClear?: () => void;
|
|
25
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onSelect"> & react.RefAttributes<HTMLInputElement>>;
|
|
26
|
+
|
|
27
|
+
export { Search as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const Search: react.ForwardRefExoticComponent<{
|
|
5
|
+
/** List of options to show in dropdown */
|
|
6
|
+
options: string[];
|
|
7
|
+
/** Callback when an option is selected from dropdown */
|
|
8
|
+
onSelect?: (value: string) => void;
|
|
9
|
+
/** Callback when search input changes */
|
|
10
|
+
onSearch?: (query: string) => void;
|
|
11
|
+
/** Control dropdown visibility externally */
|
|
12
|
+
showDropdown?: boolean;
|
|
13
|
+
/** Callback when dropdown open state changes */
|
|
14
|
+
onDropdownChange?: (open: boolean) => void;
|
|
15
|
+
/** Maximum height of dropdown in pixels */
|
|
16
|
+
dropdownMaxHeight?: number;
|
|
17
|
+
/** Text to show when no results are found */
|
|
18
|
+
noResultsText?: string;
|
|
19
|
+
/** Additional CSS classes to apply to the input */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Additional CSS classes to apply to the container */
|
|
22
|
+
containerClassName?: string;
|
|
23
|
+
/** Callback when clear button is clicked */
|
|
24
|
+
onClear?: () => void;
|
|
25
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onSelect"> & react.RefAttributes<HTMLInputElement>>;
|
|
26
|
+
|
|
27
|
+
export { Search as default };
|