@zauru-sdk/components 1.0.51 → 1.0.52
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/CHANGELOG.md +8 -0
- package/package.json +10 -17
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.esm.json +11 -0
- package/tsconfig.json +6 -15
- package/dist/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.d.ts +0 -6
- package/dist/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.js +0 -5
- package/dist/Alerts/StaticAlert.d.ts +0 -11
- package/dist/Alerts/StaticAlert.js +0 -28
- package/dist/Alerts/index.d.ts +0 -2
- package/dist/Alerts/index.js +0 -2
- package/dist/BlockUI/BlockUI.d.ts +0 -8
- package/dist/BlockUI/BlockUI.js +0 -8
- package/dist/BlockUI/index.d.ts +0 -1
- package/dist/BlockUI/index.js +0 -1
- package/dist/Buttons/Button.d.ts +0 -15
- package/dist/Buttons/Button.js +0 -43
- package/dist/Buttons/index.d.ts +0 -1
- package/dist/Buttons/index.js +0 -1
- package/dist/Card/Card.d.ts +0 -8
- package/dist/Card/Card.js +0 -5
- package/dist/Card/index.d.ts +0 -1
- package/dist/Card/index.js +0 -1
- package/dist/Chat/ChatLayout.d.ts +0 -17
- package/dist/Chat/ChatLayout.js +0 -27
- package/dist/Chat/ChatMessageHistory.d.ts +0 -12
- package/dist/Chat/ChatMessageHistory.js +0 -53
- package/dist/Chat/index.d.ts +0 -2
- package/dist/Chat/index.js +0 -2
- package/dist/ConnectionState/ConnectionState.d.ts +0 -1
- package/dist/ConnectionState/ConnectionState.js +0 -21
- package/dist/ConnectionState/index.d.ts +0 -1
- package/dist/ConnectionState/index.js +0 -1
- package/dist/Containers/BodyContainer.d.ts +0 -6
- package/dist/Containers/BodyContainer.js +0 -5
- package/dist/Containers/ButtonSectionContainer.d.ts +0 -8
- package/dist/Containers/ButtonSectionContainer.js +0 -5
- package/dist/Containers/Container.d.ts +0 -10
- package/dist/Containers/Container.js +0 -6
- package/dist/Containers/DoubleContainer.d.ts +0 -9
- package/dist/Containers/DoubleContainer.js +0 -14
- package/dist/Containers/MainContainer.d.ts +0 -6
- package/dist/Containers/MainContainer.js +0 -5
- package/dist/Containers/OutletContainer.d.ts +0 -6
- package/dist/Containers/OutletContainer.js +0 -5
- package/dist/Containers/SubContainer.d.ts +0 -10
- package/dist/Containers/SubContainer.js +0 -6
- package/dist/Containers/index.d.ts +0 -7
- package/dist/Containers/index.js +0 -7
- package/dist/DynamicTable/BasicPrintDynamicTable.d.ts +0 -10
- package/dist/DynamicTable/BasicPrintDynamicTable.js +0 -27
- package/dist/DynamicTable/DynamicPrintTable.d.ts +0 -23
- package/dist/DynamicTable/DynamicPrintTable.js +0 -131
- package/dist/DynamicTable/DynamicTable.d.ts +0 -24
- package/dist/DynamicTable/DynamicTable.js +0 -192
- package/dist/DynamicTable/GenericDynamicTable.d.ts +0 -21
- package/dist/DynamicTable/GenericDynamicTable.js +0 -196
- package/dist/DynamicTable/index.d.ts +0 -4
- package/dist/DynamicTable/index.js +0 -4
- package/dist/Footer/Footer.d.ts +0 -7
- package/dist/Footer/Footer.js +0 -16
- package/dist/Footer/index.d.ts +0 -1
- package/dist/Footer/index.js +0 -1
- package/dist/Form/Checkbox/index.d.ts +0 -17
- package/dist/Form/Checkbox/index.js +0 -34
- package/dist/Form/Checklist/index.d.ts +0 -14
- package/dist/Form/Checklist/index.js +0 -10
- package/dist/Form/DatePicker/index.d.ts +0 -18
- package/dist/Form/DatePicker/index.js +0 -31
- package/dist/Form/DynamicBaculoForm/index.d.ts +0 -18
- package/dist/Form/DynamicBaculoForm/index.js +0 -140
- package/dist/Form/FieldContainer/DoubleFieldContainer.d.ts +0 -8
- package/dist/Form/FieldContainer/DoubleFieldContainer.js +0 -14
- package/dist/Form/FieldContainer/QuadrupleFieldContainer.d.ts +0 -7
- package/dist/Form/FieldContainer/QuadrupleFieldContainer.js +0 -14
- package/dist/Form/FieldContainer/TripleFieldContainer.d.ts +0 -7
- package/dist/Form/FieldContainer/TripleFieldContainer.js +0 -14
- package/dist/Form/FieldContainer/index.d.ts +0 -3
- package/dist/Form/FieldContainer/index.js +0 -3
- package/dist/Form/FileUpload/index.d.ts +0 -21
- package/dist/Form/FileUpload/index.js +0 -54
- package/dist/Form/FormButtons/index.d.ts +0 -16
- package/dist/Form/FormButtons/index.js +0 -5
- package/dist/Form/FormLayout/index.d.ts +0 -11
- package/dist/Form/FormLayout/index.js +0 -7
- package/dist/Form/SelectField/index.d.ts +0 -27
- package/dist/Form/SelectField/index.js +0 -74
- package/dist/Form/TextArea/index.d.ts +0 -23
- package/dist/Form/TextArea/index.js +0 -36
- package/dist/Form/TextField/index.d.ts +0 -25
- package/dist/Form/TextField/index.js +0 -70
- package/dist/Form/TimePicker/index.d.ts +0 -16
- package/dist/Form/TimePicker/index.js +0 -31
- package/dist/Form/YesNo/index.d.ts +0 -12
- package/dist/Form/YesNo/index.js +0 -18
- package/dist/Form/index.d.ts +0 -13
- package/dist/Form/index.js +0 -13
- package/dist/Labels/InfoLabel/index.d.ts +0 -7
- package/dist/Labels/InfoLabel/index.js +0 -5
- package/dist/Labels/index.d.ts +0 -1
- package/dist/Labels/index.js +0 -1
- package/dist/Layouts/homeLayout/index.d.ts +0 -6
- package/dist/Layouts/homeLayout/index.js +0 -10
- package/dist/Layouts/index.d.ts +0 -1
- package/dist/Layouts/index.js +0 -1
- package/dist/LineSeparator/LineSeparator.d.ts +0 -1
- package/dist/LineSeparator/LineSeparator.js +0 -4
- package/dist/LineSeparator/index.d.ts +0 -1
- package/dist/LineSeparator/index.js +0 -1
- package/dist/Modal/Modal.d.ts +0 -10
- package/dist/Modal/Modal.js +0 -32
- package/dist/Modal/index.d.ts +0 -1
- package/dist/Modal/index.js +0 -1
- package/dist/NavBar/NavBar.d.ts +0 -2
- package/dist/NavBar/NavBar.js +0 -32
- package/dist/NavBar/NavBar.types.d.ts +0 -50
- package/dist/NavBar/NavBar.types.js +0 -1
- package/dist/NavBar/NavBar.utils.d.ts +0 -58
- package/dist/NavBar/NavBar.utils.js +0 -58
- package/dist/NavBar/index.d.ts +0 -3
- package/dist/NavBar/index.js +0 -3
- package/dist/ProgressBar/ProgressBar.d.ts +0 -6
- package/dist/ProgressBar/ProgressBar.js +0 -5
- package/dist/ProgressBar/ProgressCircle.d.ts +0 -6
- package/dist/ProgressBar/ProgressCircle.js +0 -22
- package/dist/ProgressBar/index.d.ts +0 -2
- package/dist/ProgressBar/index.js +0 -2
- package/dist/Skeletons/LoadingInputSkeleton.d.ts +0 -1
- package/dist/Skeletons/LoadingInputSkeleton.js +0 -8
- package/dist/Skeletons/index.d.ts +0 -1
- package/dist/Skeletons/index.js +0 -1
- package/dist/Tab/Tab.d.ts +0 -9
- package/dist/Tab/Tab.js +0 -19
- package/dist/Tab/index.d.ts +0 -1
- package/dist/Tab/index.js +0 -1
- package/dist/Table/ZauruTable.d.ts +0 -25
- package/dist/Table/ZauruTable.js +0 -148
- package/dist/Table/index.d.ts +0 -1
- package/dist/Table/index.js +0 -1
- package/dist/TaskList/TaskList.d.ts +0 -14
- package/dist/TaskList/TaskList.js +0 -35
- package/dist/TaskList/index.d.ts +0 -1
- package/dist/TaskList/index.js +0 -1
- package/dist/Titles/LabelArray.d.ts +0 -4
- package/dist/Titles/LabelArray.js +0 -7
- package/dist/Titles/TableColumnTitle.d.ts +0 -4
- package/dist/Titles/TableColumnTitle.js +0 -5
- package/dist/Titles/TitleH1.d.ts +0 -1
- package/dist/Titles/TitleH1.js +0 -5
- package/dist/Titles/TitleH2.d.ts +0 -1
- package/dist/Titles/TitleH2.js +0 -5
- package/dist/Titles/TitleH3.d.ts +0 -1
- package/dist/Titles/TitleH3.js +0 -5
- package/dist/Titles/index.d.ts +0 -5
- package/dist/Titles/index.js +0 -5
- package/dist/Tooltip/Tooltip.d.ts +0 -7
- package/dist/Tooltip/Tooltip.js +0 -14
- package/dist/Tooltip/index.d.ts +0 -1
- package/dist/Tooltip/index.js +0 -1
- package/dist/WithTooltip/WithTooltip.d.ts +0 -7
- package/dist/WithTooltip/WithTooltip.js +0 -5
- package/dist/WithTooltip/index.d.ts +0 -1
- package/dist/WithTooltip/index.js +0 -1
- package/dist/Wizards/StepWizard.d.ts +0 -14
- package/dist/Wizards/StepWizard.js +0 -14
- package/dist/Wizards/index.d.ts +0 -1
- package/dist/Wizards/index.js +0 -1
- package/dist/Zendesk/Chat.d.ts +0 -14
- package/dist/Zendesk/Chat.js +0 -63
- package/dist/Zendesk/index.d.ts +0 -2
- package/dist/Zendesk/index.js +0 -2
- package/dist/Zendesk/zendesk.config.d.ts +0 -9
- package/dist/Zendesk/zendesk.config.js +0 -24
- package/dist/index.d.ts +0 -24
- package/dist/index.js +0 -24
- package/dist/tailwind.config.d.ts +0 -1
- package/dist/tailwind.config.js +0 -8
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export const COLORS = {
|
|
2
|
-
sky: {
|
|
3
|
-
bg900: "bg-sky-900",
|
|
4
|
-
bg700: "bg-sky-700",
|
|
5
|
-
bg600: "bg-sky-600",
|
|
6
|
-
bg500: "bg-sky-500",
|
|
7
|
-
ring600: "ring-sky-600",
|
|
8
|
-
ring500: "ring-sky-500",
|
|
9
|
-
},
|
|
10
|
-
purple: {
|
|
11
|
-
bg900: "bg-purple-900",
|
|
12
|
-
bg700: "bg-purple-700",
|
|
13
|
-
bg600: "bg-purple-600",
|
|
14
|
-
bg500: "bg-purple-500",
|
|
15
|
-
ring600: "ring-purple-600",
|
|
16
|
-
ring500: "ring-purple-500",
|
|
17
|
-
},
|
|
18
|
-
pink: {
|
|
19
|
-
bg900: "bg-pink-900",
|
|
20
|
-
bg700: "bg-pink-700",
|
|
21
|
-
bg600: "bg-pink-600",
|
|
22
|
-
bg500: "bg-pink-500",
|
|
23
|
-
ring600: "ring-pink-600",
|
|
24
|
-
ring500: "ring-pink-500",
|
|
25
|
-
},
|
|
26
|
-
slate: {
|
|
27
|
-
bg900: "bg-slate-900",
|
|
28
|
-
bg700: "bg-slate-700",
|
|
29
|
-
bg600: "bg-slate-600",
|
|
30
|
-
bg500: "bg-slate-500",
|
|
31
|
-
ring600: "ring-slate-600",
|
|
32
|
-
ring500: "ring-slate-500",
|
|
33
|
-
},
|
|
34
|
-
green: {
|
|
35
|
-
bg900: "bg-green-900",
|
|
36
|
-
bg700: "bg-green-700",
|
|
37
|
-
bg600: "bg-green-600",
|
|
38
|
-
bg500: "bg-green-500",
|
|
39
|
-
ring600: "ring-green-600",
|
|
40
|
-
ring500: "ring-green-500",
|
|
41
|
-
},
|
|
42
|
-
yellow: {
|
|
43
|
-
bg900: "bg-yellow-900",
|
|
44
|
-
bg700: "bg-yellow-700",
|
|
45
|
-
bg600: "bg-yellow-600",
|
|
46
|
-
bg500: "bg-yellow-500",
|
|
47
|
-
ring600: "ring-yellow-600",
|
|
48
|
-
ring500: "ring-yellow-500",
|
|
49
|
-
},
|
|
50
|
-
red: {
|
|
51
|
-
bg900: "bg-red-900",
|
|
52
|
-
bg700: "bg-red-700",
|
|
53
|
-
bg600: "bg-red-600",
|
|
54
|
-
bg500: "bg-red-500",
|
|
55
|
-
ring600: "ring-red-600",
|
|
56
|
-
ring500: "ring-red-500",
|
|
57
|
-
},
|
|
58
|
-
};
|
package/dist/NavBar/index.d.ts
DELETED
package/dist/NavBar/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export const ProgressBar = (props) => {
|
|
3
|
-
const { title, percent } = props;
|
|
4
|
-
return (_jsx(_Fragment, { children: percent && (_jsxs(_Fragment, { children: [title && _jsx("div", { className: "mb-1 text-lg font-medium", children: title }), _jsx("div", { className: "w-full h-6 bg-gray-200 rounded-full", children: _jsx("div", { className: "h-6 bg-blue-600 rounded-full", style: { width: `${percent}%` } }) })] })) }));
|
|
5
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
export const ProgressCircle = ({ total, completed, description, title, }) => {
|
|
4
|
-
const [percentage, setPercentage] = useState(0);
|
|
5
|
-
const strokeDasharray = 2 * Math.PI * 42; // radio del circulo
|
|
6
|
-
const progressColor = `rgba(${255 - 2.55 * percentage}, ${2.55 * percentage}, 0)`;
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
if (total > 0) {
|
|
9
|
-
setPercentage((completed / total) * 100);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
setPercentage(100);
|
|
13
|
-
}
|
|
14
|
-
}, [total, completed]);
|
|
15
|
-
return (_jsxs("div", { className: "flex flex-col items-center justify-center", children: [title && (_jsx("h2", { className: "mb-4 text-xl text-center text-gray-700", children: title })), _jsxs("svg", { width: "100", height: "100", className: "relative", children: [_jsx("circle", { r: "42", cx: "50", cy: "50", fill: "transparent", stroke: "#eee", strokeWidth: "8" }), _jsx("circle", { r: "42", cx: "50", cy: "50", fill: "transparent", stroke: progressColor, strokeWidth: "8", strokeDasharray: strokeDasharray, strokeDashoffset: strokeDasharray - strokeDasharray * (percentage / 100), strokeLinecap: "round", style: {
|
|
16
|
-
transform: "rotate(-90deg)",
|
|
17
|
-
transformOrigin: "50% 50%",
|
|
18
|
-
} }), _jsx("text", { x: "50", y: "55", textAnchor: "middle", fill: progressColor, style: {
|
|
19
|
-
fontSize: "16px",
|
|
20
|
-
fontWeight: "bold",
|
|
21
|
-
}, children: `${Math.round(percentage)}%` })] }), _jsx("p", { className: "mt-2 text-center text-gray-500", children: description })] }));
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const LoadingInputSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
export const LoadingInputSkeleton = () => {
|
|
3
|
-
return (_jsx("div", { className: "w-full h-full bg-gray-300 animate-pulse rounded", style: {
|
|
4
|
-
maxWidth: "100%",
|
|
5
|
-
height: "40px",
|
|
6
|
-
boxShadow: "0px 0px 0px 1px rgba(0, 0, 0, 0.1)",
|
|
7
|
-
} }));
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./LoadingInputSkeleton.js";
|
package/dist/Skeletons/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./LoadingInputSkeleton.js";
|
package/dist/Tab/Tab.d.ts
DELETED
package/dist/Tab/Tab.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { redirect } from "@remix-run/node";
|
|
3
|
-
import { Outlet } from "@remix-run/react";
|
|
4
|
-
import React from "react";
|
|
5
|
-
//<reference> https://www.creative-tim.com/learning-lab/tailwind-starter-kit/documentation/react/tabs/text
|
|
6
|
-
export const Tabs = (props) => {
|
|
7
|
-
const { items } = props;
|
|
8
|
-
const [openTab, setOpenTab] = React.useState(1);
|
|
9
|
-
return (_jsx(_Fragment, { children: _jsx("div", { className: "flex flex-wrap", children: _jsxs("div", { className: "w-full", children: [_jsx("ul", { className: "flex mb-0 list-none flex-wrap pt-3 pb-4 flex-row", role: "tablist", children: items?.map((item, index) => {
|
|
10
|
-
return (_jsx("li", { className: "mb-px mr-2 last:mr-0 flex-auto text-center", children: _jsx("a", { className: "text-xs font-bold uppercase px-5 py-3 shadow-lg rounded block leading-normal " +
|
|
11
|
-
(openTab === index
|
|
12
|
-
? "text-white bg-red-600"
|
|
13
|
-
: "text-red-600 bg-white"), onClick: (e) => {
|
|
14
|
-
e.preventDefault();
|
|
15
|
-
setOpenTab(index);
|
|
16
|
-
redirect(item.link);
|
|
17
|
-
}, "data-toggle": "tab", href: item.link, role: "tablist", children: item.title }, index) }, index));
|
|
18
|
-
}) }), _jsx("div", { className: "relative flex flex-col min-w-0 break-words bg-white w-full mb-6 shadow-lg rounded", children: _jsx("div", { className: "px-4 py-5 flex-auto", children: _jsx("div", { className: "tab-content tab-space", children: _jsx(Outlet, {}) }) }) })] }) }) }));
|
|
19
|
-
};
|
package/dist/Tab/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Tab.js";
|
package/dist/Tab/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Tab.js";
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { TableProps } from "react-data-table-component";
|
|
2
|
-
import { ExpandableRowsComponent } from "react-data-table-component/dist/DataTable/types";
|
|
3
|
-
type Props = TableProps<any> & {
|
|
4
|
-
columns: any;
|
|
5
|
-
conditionalRowStyles?: any;
|
|
6
|
-
data: any[];
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
pagination?: {
|
|
9
|
-
totalRows: number;
|
|
10
|
-
rowsPerPageOptions: number[];
|
|
11
|
-
};
|
|
12
|
-
whitOutPagination?: boolean;
|
|
13
|
-
offlineSearch?: string[];
|
|
14
|
-
search?: {
|
|
15
|
-
placeholderSearch?: string;
|
|
16
|
-
};
|
|
17
|
-
expandable?: {
|
|
18
|
-
expandableRowExpanded?: (row: any) => boolean;
|
|
19
|
-
expandableRowsComponent?: ExpandableRowsComponent<any>;
|
|
20
|
-
};
|
|
21
|
-
theme?: "solarized" | "subTable";
|
|
22
|
-
className?: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const ZauruTable: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export {};
|
package/dist/Table/ZauruTable.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useSearchParams } from "@remix-run/react";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
import DataTable, { createTheme } from "react-data-table-component";
|
|
5
|
-
import { SearchSVG } from "@zauru-sdk/icons";
|
|
6
|
-
const customStyles = {
|
|
7
|
-
headCells: {
|
|
8
|
-
style: {
|
|
9
|
-
color: "#202124",
|
|
10
|
-
fontSize: "14px",
|
|
11
|
-
justifyContent: "left", // Alinea el texto a la izquierda
|
|
12
|
-
whiteSpace: "normal", // Permite el ajuste de texto
|
|
13
|
-
wordBreak: "break-word", // Asegura que las palabras se rompan correctamente para evitar desbordamientos
|
|
14
|
-
maxWidth: "150px", // Establece un ancho máximo para las celdas del encabezado
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
rows: {
|
|
18
|
-
highlightOnHoverStyle: {
|
|
19
|
-
backgroundColor: "rgb(230, 244, 244)",
|
|
20
|
-
borderBottomColor: "#FFFFFF",
|
|
21
|
-
borderRadius: "25px",
|
|
22
|
-
outline: "1px solid #FFFFFF",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
pagination: {
|
|
26
|
-
style: {
|
|
27
|
-
border: "none",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
createTheme("solarized", {
|
|
32
|
-
text: {
|
|
33
|
-
primary: "#002b36",
|
|
34
|
-
secondary: "#002b36",
|
|
35
|
-
},
|
|
36
|
-
background: {
|
|
37
|
-
default: "#f9f9f9",
|
|
38
|
-
},
|
|
39
|
-
context: {
|
|
40
|
-
background: "#cb4b16",
|
|
41
|
-
text: "#555555",
|
|
42
|
-
},
|
|
43
|
-
divider: {
|
|
44
|
-
default: "#e2e4ff",
|
|
45
|
-
},
|
|
46
|
-
action: {
|
|
47
|
-
button: "rgba(0,0,0,.54)",
|
|
48
|
-
hover: "rgba(0,0,0,.08)",
|
|
49
|
-
disabled: "rgba(0,0,0,.12)",
|
|
50
|
-
},
|
|
51
|
-
headRow: {
|
|
52
|
-
background: "black",
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
createTheme("subTable", {
|
|
56
|
-
text: {
|
|
57
|
-
primary: "#002b36",
|
|
58
|
-
secondary: "#002b36",
|
|
59
|
-
},
|
|
60
|
-
background: {
|
|
61
|
-
default: "#e9e9e9",
|
|
62
|
-
},
|
|
63
|
-
context: {
|
|
64
|
-
background: "#cb4b16",
|
|
65
|
-
text: "#555555",
|
|
66
|
-
},
|
|
67
|
-
divider: {
|
|
68
|
-
default: "#e2e4ff",
|
|
69
|
-
},
|
|
70
|
-
action: {
|
|
71
|
-
button: "rgba(0,0,0,.54)",
|
|
72
|
-
hover: "rgba(0,0,0,.08)",
|
|
73
|
-
disabled: "rgba(0,0,0,.12)",
|
|
74
|
-
},
|
|
75
|
-
headRow: {
|
|
76
|
-
background: "black",
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
//Documentación de la tabla https://react-data-table-component.netlify.app/?path=/docs/getting-started-intro--docs
|
|
80
|
-
export const ZauruTable = (props) => {
|
|
81
|
-
const { columns, conditionalRowStyles, data, loading = false, pagination, search, expandable, theme, className, offlineSearch = [], whitOutPagination = false, ...others } = props;
|
|
82
|
-
const [, setSearchParams] = useSearchParams({
|
|
83
|
-
page: "1",
|
|
84
|
-
perPage: "10",
|
|
85
|
-
search: "",
|
|
86
|
-
});
|
|
87
|
-
const [filteredData, setFilteredData] = useState(data);
|
|
88
|
-
const [showTable, setShowTable] = useState(false);
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
setShowTable(true);
|
|
91
|
-
}, []);
|
|
92
|
-
useEffect(() => {
|
|
93
|
-
setFilteredData(data);
|
|
94
|
-
}, [data]);
|
|
95
|
-
const subHeaderComponentMemo = (_jsxs(_Fragment, { children: [_jsx("input", { name: "search", type: "text", placeholder: search?.placeholderSearch ?? "Filtrar", "aria-label": "Search Input", className: "bg-gray-50 border border-gray-300 text-gray-900 rounded-lg px-2", onChange: (event) => {
|
|
96
|
-
const searchTerm = event.target.value;
|
|
97
|
-
if (offlineSearch.length > 0) {
|
|
98
|
-
filterData(searchTerm);
|
|
99
|
-
}
|
|
100
|
-
}, onBlur: (event) => {
|
|
101
|
-
const searchTerm = event.target.value;
|
|
102
|
-
if (offlineSearch.length <= 0 && search) {
|
|
103
|
-
setSearchParams((prevState) => ({
|
|
104
|
-
...Object.fromEntries(prevState),
|
|
105
|
-
search: searchTerm,
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
} }), _jsx("button", { type: "button", name: "search", className: "px-2 font-bold", children: _jsx(SearchSVG, {}) })] }));
|
|
109
|
-
const filterData = (searchTerm) => {
|
|
110
|
-
if (!searchTerm || !offlineSearch || offlineSearch.length === 0) {
|
|
111
|
-
setFilteredData(data);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const filtered = data.filter((item) => offlineSearch.some((field) => item[field] &&
|
|
115
|
-
item[field]
|
|
116
|
-
.toString()
|
|
117
|
-
.toLowerCase()
|
|
118
|
-
.includes(searchTerm.toLowerCase())));
|
|
119
|
-
setFilteredData(filtered);
|
|
120
|
-
};
|
|
121
|
-
const handlePageChange = (page) => {
|
|
122
|
-
//hacer el fetch de más datos
|
|
123
|
-
setSearchParams((prevState) => ({
|
|
124
|
-
...Object.fromEntries(prevState),
|
|
125
|
-
page: page.toString(),
|
|
126
|
-
}));
|
|
127
|
-
};
|
|
128
|
-
const handlePerRowsChange = async (newPerPage, page) => {
|
|
129
|
-
//hacer el fetch de más datos
|
|
130
|
-
setSearchParams((prevState) => ({
|
|
131
|
-
...Object.fromEntries(prevState),
|
|
132
|
-
perPage: newPerPage.toString(),
|
|
133
|
-
}));
|
|
134
|
-
};
|
|
135
|
-
if (!showTable) {
|
|
136
|
-
return _jsx(_Fragment, { children: "Loading..." });
|
|
137
|
-
}
|
|
138
|
-
//Textos en español de la tabla
|
|
139
|
-
const paginationComponentOptions = {
|
|
140
|
-
rowsPerPageText: "Filas por página",
|
|
141
|
-
rangeSeparatorText: "de",
|
|
142
|
-
selectAllRowsItem: true,
|
|
143
|
-
selectAllRowsItemText: "Todos",
|
|
144
|
-
};
|
|
145
|
-
const loadSubHeader = !!(search || offlineSearch.length > 0);
|
|
146
|
-
const subHeaderComponent = loadSubHeader ? subHeaderComponentMemo : undefined;
|
|
147
|
-
return (_jsx(DataTable, { className: className, subHeaderWrap: true, theme: theme ?? "solarized", columns: columns, conditionalRowStyles: conditionalRowStyles, data: filteredData, customStyles: customStyles, progressPending: loading, highlightOnHover: true, pointerOnHover: true, dense: true, striped: true, pagination: !whitOutPagination, persistTableHead: true, responsive: true, noHeader: true, expandableRows: !!expandable, expandableRowExpanded: expandable ? expandable.expandableRowExpanded : undefined, expandableRowsComponent: expandable ? expandable.expandableRowsComponent : undefined, subHeader: loadSubHeader, subHeaderComponent: subHeaderComponent, paginationServer: !!pagination, paginationTotalRows: pagination ? pagination.totalRows : undefined, onChangeRowsPerPage: pagination ? handlePerRowsChange : undefined, onChangePage: pagination ? handlePageChange : undefined, paginationComponentOptions: paginationComponentOptions, paginationRowsPerPageOptions: pagination?.rowsPerPageOptions ? pagination.rowsPerPageOptions : [10], ...others }));
|
|
148
|
-
};
|
package/dist/Table/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ZauruTable.js";
|
package/dist/Table/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./ZauruTable.js";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type TaskType = {
|
|
2
|
-
title: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
status: "waiting" | "processing" | "done" | "error";
|
|
5
|
-
};
|
|
6
|
-
type TaskProps = {
|
|
7
|
-
task: TaskType;
|
|
8
|
-
};
|
|
9
|
-
export declare const Task: ({ task }: TaskProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
type TaskModalProps = {
|
|
11
|
-
tasks: TaskType[];
|
|
12
|
-
};
|
|
13
|
-
export declare const TaskList: ({ tasks }: TaskModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
export const Task = ({ task }) => {
|
|
4
|
-
const [isDescriptionOpen, setIsDescriptionOpen] = useState(false);
|
|
5
|
-
let statusIcon;
|
|
6
|
-
let taskStyle = {};
|
|
7
|
-
let bgColor;
|
|
8
|
-
switch (task.status) {
|
|
9
|
-
case "waiting":
|
|
10
|
-
statusIcon = "🕗"; // Icono de reloj (como un ejemplo, puedes reemplazarlo con un ícono o SVG real)
|
|
11
|
-
taskStyle = { opacity: 0.5 }; // estilo disabled
|
|
12
|
-
bgColor = "bg-gray-200"; // Color de fondo gris
|
|
13
|
-
break;
|
|
14
|
-
case "processing":
|
|
15
|
-
statusIcon = "⏳"; // Icono de reloj de arena
|
|
16
|
-
taskStyle = { fontWeight: "bold" }; // estilo negrita
|
|
17
|
-
bgColor = "bg-blue-200"; // Color de fondo azul
|
|
18
|
-
break;
|
|
19
|
-
case "done":
|
|
20
|
-
statusIcon = "✅"; // Icono de check
|
|
21
|
-
bgColor = "bg-green-200"; // Color de fondo verde
|
|
22
|
-
break;
|
|
23
|
-
case "error":
|
|
24
|
-
statusIcon = "❌"; // Icono de cruz
|
|
25
|
-
taskStyle = { color: "red" }; // estilo color rojo
|
|
26
|
-
bgColor = "bg-red-200"; // Color de fondo rojo
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
return (_jsxs("div", { style: taskStyle, className: `${bgColor} rounded-lg p-3 mb-3 ${task.description ? "cursor-pointer" : ""}`, onClick: () => task.description && setIsDescriptionOpen(!isDescriptionOpen), children: [_jsxs("div", { className: "flex justify-between", children: [_jsxs("div", { children: [statusIcon, " ", task.title, " ", `${task.status === "processing" ? "..." : ""}`] }), task.description && _jsx("div", { children: "\u25BC" })] }), task.description && isDescriptionOpen && (_jsx("div", { className: "mt-2", children: task.description }))] }));
|
|
30
|
-
};
|
|
31
|
-
export const TaskList = ({ tasks }) => {
|
|
32
|
-
const completedTasks = tasks.filter((task) => task.status === "done" || task.status === "error").length;
|
|
33
|
-
const progressPercentage = (completedTasks / tasks.length) * 100;
|
|
34
|
-
return (_jsxs("div", { children: [tasks.map((task, index) => (_jsx(Task, { task: task }, index))), _jsx("div", { className: "h-2 bg-gray-200 rounded-lg mt-3", children: _jsx("div", { className: "bg-green-500 h-full rounded-lg", style: { width: `${progressPercentage}%`, transition: "width 0.5s" } }) })] }));
|
|
35
|
-
};
|
package/dist/TaskList/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./TaskList.js";
|
package/dist/TaskList/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./TaskList.js";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
//Component to show all information in an array
|
|
3
|
-
export const LabelArray = ({ info }) => {
|
|
4
|
-
return (_jsx("div", { className: "divide-y divide-gray-100", children: info?.map((x) => {
|
|
5
|
-
return (_jsxs("div", { className: "my-1 pt-2", children: [_jsxs("p", { className: "inline font-bold text-lg", children: [x?.label, ": "] }), _jsx("p", { className: "inline text-lg", children: x?.value })] }, x?.label));
|
|
6
|
-
}) }));
|
|
7
|
-
};
|
package/dist/Titles/TitleH1.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TitleH1: ({ texto }: any) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Titles/TitleH1.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
//H1 Title Component
|
|
3
|
-
export const TitleH1 = ({ texto }) => {
|
|
4
|
-
return (_jsx("div", { className: "mb-1", children: _jsx("h1", { className: "text-4xl font-bold leading-normal mt-0 mb-2 text-zinc-800", children: texto }) }));
|
|
5
|
-
};
|
package/dist/Titles/TitleH2.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TitleH2: ({ texto }: any) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Titles/TitleH2.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
//H2 Title Component
|
|
3
|
-
export const TitleH2 = ({ texto }) => {
|
|
4
|
-
return (_jsx("div", { className: "py-1 ", children: _jsx("h2", { className: "text-2xl font-bold leading-normal mt-0 mb-2 text-zinc-800", children: texto }) }));
|
|
5
|
-
};
|
package/dist/Titles/TitleH3.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TitleH3: ({ texto }: any) => import("react/jsx-runtime").JSX.Element;
|
package/dist/Titles/TitleH3.js
DELETED
package/dist/Titles/index.d.ts
DELETED
package/dist/Titles/index.js
DELETED
package/dist/Tooltip/Tooltip.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
export const Tooltip = ({ children, text }) => {
|
|
5
|
-
const [show, setShow] = useState(false);
|
|
6
|
-
return (_jsxs("div", { className: "relative inline-block", children: [_jsx("div", { onMouseEnter: () => setShow(true), onMouseLeave: () => setShow(false), children: children }), show && (_jsxs("div", { className: "absolute z-10 bg-gray-700 text-white px-2 py-1 rounded-md bottom-full left-1/2 transform -translate-x-1/2", style: { whiteSpace: "nowrap", height: "2rem" }, children: [text, _jsx("div", { className: "absolute top-full left-1/2 transform -translate-x-1/2", style: {
|
|
7
|
-
width: "0",
|
|
8
|
-
height: "0",
|
|
9
|
-
borderTop: "6px solid transparent",
|
|
10
|
-
borderLeft: "6px solid transparent",
|
|
11
|
-
borderRight: "6px solid transparent",
|
|
12
|
-
borderBottom: "6px solid gray",
|
|
13
|
-
} })] }))] }));
|
|
14
|
-
};
|
package/dist/Tooltip/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Tooltip.js";
|
package/dist/Tooltip/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Tooltip.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
export const WithTooltip = (props) => {
|
|
3
|
-
const { children, text } = props;
|
|
4
|
-
return (_jsx(_Fragment, { children: _jsxs("span", { className: "group relative", children: [children, _jsx("span", { className: "pointer-events-none absolute -top-10 left-1/2 -translate-x-1/2 whitespace-nowrap rounded bg-black px-2 py-1 text-white opacity-0 transition z-50 before:absolute before:left-1/2 before:top-full before:-translate-x-1/2 before:border-4 before:border-transparent before:border-t-black before:content-[''] group-hover:opacity-100 before:z-50", children: text })] }) }));
|
|
5
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./WithTooltip.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./WithTooltip.js";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export type StepWizard = {
|
|
4
|
-
index: number;
|
|
5
|
-
stepName: string;
|
|
6
|
-
component: ReactNode;
|
|
7
|
-
};
|
|
8
|
-
interface StepWizardProps {
|
|
9
|
-
steps: StepWizard[];
|
|
10
|
-
showStepName?: boolean;
|
|
11
|
-
loading?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const StepWizardComponent: React.FC<StepWizardProps>;
|
|
14
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { LoadingInputSkeleton } from "../Skeletons/index.js";
|
|
4
|
-
export const StepWizardComponent = ({ steps, showStepName = false, loading = false, }) => {
|
|
5
|
-
const [currentStep, setCurrentStep] = useState(0);
|
|
6
|
-
if (loading) {
|
|
7
|
-
return (_jsxs("div", { className: "lg:grid lg:grid-cols-10 gap-4", children: [_jsxs("div", { className: "lg:col-span-2", children: [_jsx("select", { className: "lg:hidden mb-5 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md", children: _jsx("option", {}) }), _jsx("div", { className: "hidden lg:block", children: _jsx(LoadingInputSkeleton, {}) })] }), _jsx("div", { className: "lg:col-span-8", children: _jsx(LoadingInputSkeleton, {}) })] }));
|
|
8
|
-
}
|
|
9
|
-
return (_jsxs("div", { className: "lg:grid lg:grid-cols-10 gap-4", children: [_jsxs("div", { className: "lg:col-span-2", children: [_jsx("select", { className: "lg:hidden mb-5 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md", onChange: (e) => setCurrentStep(parseInt(e.target.value)), value: currentStep, children: steps.map((step, index) => (_jsx("option", { value: index, children: showStepName ? step.stepName : `Step ${index + 1}` }, index))) }), _jsx("div", { className: "scroll-hidden hidden lg:block", children: steps.map((step, index) => (_jsx("div", { onClick: () => setCurrentStep(index), className: `py-2 px-4 mt-5 cursor-pointer rounded ${currentStep === index
|
|
10
|
-
? "bg-blue-500 text-white"
|
|
11
|
-
: "text-blue-500 hover:bg-gray-100 border border-gray-300"} ${showStepName
|
|
12
|
-
? "text-wrap break-words"
|
|
13
|
-
: "rounded-full w-8 h-8 flex items-center justify-center"}`, children: showStepName ? step.stepName : index + 1 }, index))) })] }), _jsx("div", { className: "lg:col-span-8", children: steps.map((step, index) => (_jsx("div", { className: currentStep === index ? "block" : "hidden", children: step.component }, index))) })] }));
|
|
14
|
-
};
|
package/dist/Wizards/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./StepWizard.js";
|
package/dist/Wizards/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./StepWizard.js";
|
package/dist/Zendesk/Chat.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const logoutFromZendesk: () => void;
|
|
3
|
-
export declare const ZendeskAPI: (...args: any[]) => void;
|
|
4
|
-
interface ZendeskProps {
|
|
5
|
-
defer?: boolean;
|
|
6
|
-
onLoaded?: () => void;
|
|
7
|
-
token: string;
|
|
8
|
-
configuration: {
|
|
9
|
-
zendeskChatKey: string;
|
|
10
|
-
};
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}
|
|
13
|
-
export declare const Zendesk: React.FC<ZendeskProps>;
|
|
14
|
-
export {};
|