@zauru-sdk/components 1.0.11 → 1.0.13

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.
Files changed (163) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/Alerts/index.d.ts +2 -0
  3. package/dist/Alerts/index.js +2 -0
  4. package/dist/BlockUI/BlockUI.d.ts +8 -0
  5. package/dist/BlockUI/BlockUI.js +8 -0
  6. package/dist/BlockUI/index.d.ts +1 -0
  7. package/dist/BlockUI/index.js +1 -0
  8. package/dist/Buttons/Button.d.ts +15 -0
  9. package/dist/Buttons/Button.js +43 -0
  10. package/dist/Buttons/index.d.ts +1 -0
  11. package/dist/Buttons/index.js +1 -0
  12. package/dist/Card/Card.d.ts +8 -0
  13. package/dist/Card/Card.js +5 -0
  14. package/dist/Card/index.d.ts +1 -0
  15. package/dist/Card/index.js +1 -0
  16. package/dist/Containers/BodyContainer.d.ts +6 -0
  17. package/dist/Containers/BodyContainer.js +5 -0
  18. package/dist/Containers/ButtonSectionContainer.d.ts +8 -0
  19. package/dist/Containers/ButtonSectionContainer.js +5 -0
  20. package/dist/Containers/Container.d.ts +10 -0
  21. package/dist/Containers/Container.js +6 -0
  22. package/dist/Containers/DoubleContainer.d.ts +9 -0
  23. package/dist/Containers/DoubleContainer.js +14 -0
  24. package/dist/Containers/MainContainer.d.ts +6 -0
  25. package/dist/Containers/MainContainer.js +5 -0
  26. package/dist/Containers/OutletContainer.d.ts +6 -0
  27. package/dist/Containers/OutletContainer.js +5 -0
  28. package/dist/Containers/SubContainer.d.ts +10 -0
  29. package/dist/Containers/SubContainer.js +6 -0
  30. package/dist/Containers/index.d.ts +7 -0
  31. package/dist/Containers/index.js +7 -0
  32. package/dist/Footer/Footer.d.ts +7 -0
  33. package/dist/Footer/Footer.js +25 -0
  34. package/dist/Footer/index.d.ts +1 -0
  35. package/dist/Footer/index.js +1 -0
  36. package/dist/Labels/InfoLabel/index.d.ts +7 -0
  37. package/dist/Labels/InfoLabel/index.js +5 -0
  38. package/dist/Labels/index.d.ts +1 -0
  39. package/dist/Labels/index.js +1 -0
  40. package/dist/Layouts/homeLayout/index.d.ts +6 -0
  41. package/dist/Layouts/homeLayout/index.js +10 -0
  42. package/dist/Layouts/index.d.ts +1 -0
  43. package/dist/Layouts/index.js +1 -0
  44. package/dist/LineSeparator/LineSeparator.d.ts +1 -0
  45. package/dist/LineSeparator/LineSeparator.js +4 -0
  46. package/dist/LineSeparator/index.d.ts +1 -0
  47. package/dist/LineSeparator/index.js +1 -0
  48. package/dist/Modal/Modal.d.ts +10 -0
  49. package/dist/Modal/Modal.js +32 -0
  50. package/dist/Modal/index.d.ts +1 -0
  51. package/dist/Modal/index.js +1 -0
  52. package/dist/NavBar/NavBar.js +2 -2
  53. package/dist/NavBar/index.d.ts +3 -0
  54. package/dist/NavBar/index.js +3 -0
  55. package/dist/ProgressBar/ProgressBar.d.ts +6 -0
  56. package/dist/ProgressBar/ProgressBar.js +5 -0
  57. package/dist/ProgressBar/ProgressCircle.d.ts +6 -0
  58. package/dist/ProgressBar/ProgressCircle.js +22 -0
  59. package/dist/ProgressBar/index.d.ts +2 -0
  60. package/dist/ProgressBar/index.js +2 -0
  61. package/dist/Skeletons/LoadingInputSkeleton.d.ts +1 -0
  62. package/dist/Skeletons/LoadingInputSkeleton.js +8 -0
  63. package/dist/Skeletons/index.d.ts +1 -0
  64. package/dist/Skeletons/index.js +1 -0
  65. package/dist/Tab/Tab.d.ts +9 -0
  66. package/dist/Tab/Tab.js +19 -0
  67. package/dist/Tab/index.d.ts +1 -0
  68. package/dist/Tab/index.js +1 -0
  69. package/dist/Table/ZauruTable.d.ts +25 -0
  70. package/dist/Table/ZauruTable.js +148 -0
  71. package/dist/Table/index.d.ts +1 -0
  72. package/dist/Table/index.js +1 -0
  73. package/dist/TaskList/TaskList.d.ts +14 -0
  74. package/dist/TaskList/TaskList.js +35 -0
  75. package/dist/TaskList/index.d.ts +1 -0
  76. package/dist/TaskList/index.js +1 -0
  77. package/dist/Titles/LabelArray.d.ts +4 -0
  78. package/dist/Titles/LabelArray.js +7 -0
  79. package/dist/Titles/TableColumnTitle.d.ts +4 -0
  80. package/dist/Titles/TableColumnTitle.js +5 -0
  81. package/dist/Titles/TitleH1.d.ts +1 -0
  82. package/dist/Titles/TitleH1.js +5 -0
  83. package/dist/Titles/TitleH2.d.ts +1 -0
  84. package/dist/Titles/TitleH2.js +5 -0
  85. package/dist/Titles/TitleH3.d.ts +1 -0
  86. package/dist/Titles/TitleH3.js +5 -0
  87. package/dist/Titles/index.d.ts +5 -0
  88. package/dist/Titles/index.js +5 -0
  89. package/dist/Tooltip/Tooltip.d.ts +7 -0
  90. package/dist/Tooltip/Tooltip.js +14 -0
  91. package/dist/Tooltip/index.d.ts +1 -0
  92. package/dist/Tooltip/index.js +1 -0
  93. package/dist/WithTooltip/WithTooltip.d.ts +7 -0
  94. package/dist/WithTooltip/WithTooltip.js +5 -0
  95. package/dist/WithTooltip/index.d.ts +1 -0
  96. package/dist/WithTooltip/index.js +1 -0
  97. package/dist/Wizards/StepWizard.d.ts +14 -0
  98. package/dist/Wizards/StepWizard.js +14 -0
  99. package/dist/Wizards/index.d.ts +1 -0
  100. package/dist/Wizards/index.js +1 -0
  101. package/dist/index.d.ts +19 -0
  102. package/dist/index.js +21 -1
  103. package/package.json +8 -5
  104. package/src/Alerts/index.ts +2 -0
  105. package/src/BlockUI/BlockUI.tsx +50 -0
  106. package/src/BlockUI/index.tsx +1 -0
  107. package/src/Buttons/Button.tsx +90 -0
  108. package/src/Buttons/index.ts +1 -0
  109. package/src/Card/Card.tsx +24 -0
  110. package/src/Card/index.ts +1 -0
  111. package/src/Containers/BodyContainer.tsx +14 -0
  112. package/src/Containers/ButtonSectionContainer.tsx +21 -0
  113. package/src/Containers/Container.tsx +39 -0
  114. package/src/Containers/DoubleContainer.tsx +48 -0
  115. package/src/Containers/MainContainer.tsx +17 -0
  116. package/src/Containers/OutletContainer.tsx +14 -0
  117. package/src/Containers/SubContainer.tsx +37 -0
  118. package/src/Containers/index.ts +7 -0
  119. package/src/Footer/Footer.tsx +61 -0
  120. package/src/Footer/index.tsx +1 -0
  121. package/src/Labels/InfoLabel/index.tsx +21 -0
  122. package/src/Labels/index.tsx +1 -0
  123. package/src/Layouts/homeLayout/index.tsx +34 -0
  124. package/src/Layouts/index.ts +1 -0
  125. package/src/LineSeparator/LineSeparator.tsx +3 -0
  126. package/src/LineSeparator/index.tsx +1 -0
  127. package/src/Modal/Modal.tsx +104 -0
  128. package/src/Modal/index.tsx +1 -0
  129. package/src/NavBar/NavBar.tsx +2 -2
  130. package/src/NavBar/index.tsx +5 -0
  131. package/src/ProgressBar/ProgressBar.tsx +25 -0
  132. package/src/ProgressBar/ProgressCircle.tsx +75 -0
  133. package/src/ProgressBar/index.tsx +2 -0
  134. package/src/Skeletons/LoadingInputSkeleton.tsx +12 -0
  135. package/src/Skeletons/index.ts +1 -0
  136. package/src/Tab/Tab.tsx +63 -0
  137. package/src/Tab/index.ts +1 -0
  138. package/src/Table/ZauruTable.tsx +263 -0
  139. package/src/Table/index.tsx +1 -0
  140. package/src/TaskList/TaskList.tsx +88 -0
  141. package/src/TaskList/index.ts +1 -0
  142. package/src/Titles/LabelArray.tsx +17 -0
  143. package/src/Titles/TableColumnTitle.tsx +9 -0
  144. package/src/Titles/TitleH1.tsx +11 -0
  145. package/src/Titles/TitleH2.tsx +10 -0
  146. package/src/Titles/TitleH3.tsx +10 -0
  147. package/src/Titles/index.ts +5 -0
  148. package/src/Tooltip/Tooltip.tsx +42 -0
  149. package/src/Tooltip/index.ts +1 -0
  150. package/src/WithTooltip/WithTooltip.tsx +21 -0
  151. package/src/WithTooltip/index.tsx +1 -0
  152. package/src/Wizards/StepWizard.tsx +88 -0
  153. package/src/Wizards/index.ts +1 -0
  154. package/src/index.ts +21 -0
  155. package/dist/Alerts/Alert.d.ts +0 -9
  156. package/dist/Alerts/Alert.js +0 -97
  157. package/dist/Icons/Icons.d.ts +0 -47
  158. package/dist/Icons/Icons.js +0 -110
  159. package/dist/Icons/StylesConstants.d.ts +0 -26
  160. package/dist/Icons/StylesConstants.js +0 -34
  161. package/src/Alerts/Alert.tsx +0 -149
  162. package/src/Icons/Icons.tsx +0 -782
  163. package/src/Icons/StylesConstants.tsx +0 -66
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.13](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.12...v1.0.13) (2024-03-21)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/components
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.0.12](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.11...v1.0.12) (2024-03-21)
15
+
16
+ **Note:** Version bump only for package @zauru-sdk/components
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.0.11](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.10...v1.0.11) (2024-03-18)
7
23
 
8
24
  **Note:** Version bump only for package @zauru-sdk/components
@@ -0,0 +1,2 @@
1
+ export * from "./ErrorBoundaryAlert/ErrorBoundaryAlert";
2
+ export * from "./StaticAlert";
@@ -0,0 +1,2 @@
1
+ export * from "./ErrorBoundaryAlert/ErrorBoundaryAlert";
2
+ export * from "./StaticAlert";
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ active: boolean;
5
+ loadingText?: string;
6
+ };
7
+ export declare const BlockUI: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const BlockUI = (props) => {
3
+ const { children, active, loadingText } = props;
4
+ if (!active) {
5
+ return _jsx(_Fragment, { children: children });
6
+ }
7
+ return (_jsx("div", { children: _jsxs("div", { className: "relative", children: [_jsx("div", { className: "absolute bg-gray-100 bg-opacity-20 z-10 h-full w-full flex items-center justify-center", children: _jsxs("div", { className: "flex items-center", children: [_jsx("span", { className: "text-3xl mr-4", children: loadingText }), _jsxs("svg", { className: "animate-spin h-5 w-5 text-gray-600", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] })] }) }), children] }) }));
8
+ };
@@ -0,0 +1 @@
1
+ export * from "./BlockUI";
@@ -0,0 +1 @@
1
+ export * from "./BlockUI";
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ type?: "reset" | "button" | "submit" | undefined;
4
+ title?: string;
5
+ name?: string;
6
+ onClickSave?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
7
+ loading?: boolean;
8
+ loadingText?: string;
9
+ selectedColor?: "indigo" | "green" | "red" | "yellow";
10
+ children?: React.ReactNode;
11
+ className?: string;
12
+ disabled?: boolean;
13
+ };
14
+ export declare const Button: (props: Props) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const Button = (props) => {
3
+ const { type = "submit", loading = false, loadingText = "Guardando...", title = "Guardar", name = "save", onClickSave, selectedColor = "indigo", children, className = "", disabled = false, } = props;
4
+ const COLORS = {
5
+ green: {
6
+ bg900: "bg-green-900",
7
+ bg700: "bg-green-700",
8
+ bg600: "bg-green-600",
9
+ bg500: "bg-green-500",
10
+ ring600: "ring-green-600",
11
+ ring500: "ring-green-500",
12
+ },
13
+ indigo: {
14
+ bg900: "bg-indigo-900",
15
+ bg700: "bg-indigo-700",
16
+ bg600: "bg-indigo-600",
17
+ bg500: "bg-indigo-500",
18
+ ring600: "ring-indigo-600",
19
+ ring500: "ring-indigo-500",
20
+ },
21
+ red: {
22
+ bg900: "bg-red-900",
23
+ bg700: "bg-red-700",
24
+ bg600: "bg-red-600",
25
+ bg500: "bg-red-500",
26
+ ring600: "ring-red-600",
27
+ ring500: "ring-red-500",
28
+ },
29
+ yellow: {
30
+ bg900: "bg-yellow-900",
31
+ bg700: "bg-yellow-700",
32
+ bg600: "bg-yellow-600",
33
+ bg500: "bg-yellow-500",
34
+ ring600: "ring-yellow-600",
35
+ ring500: "ring-yellow-500",
36
+ },
37
+ };
38
+ const color = COLORS[selectedColor];
39
+ const inside = children ?? title;
40
+ return (_jsx("button", { type: type, name: "action", disabled: loading || disabled, value: name, onClick: onClickSave, className: `ml-2 ${loading || disabled ? " bg-opacity-25 " : ""} ${loading
41
+ ? " cursor-progress"
42
+ : `${disabled ? "" : `hover:${color.bg700}`}`} inline-flex justify-center rounded-md border border-transparent ${color.bg600} py-2 px-4 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:${color.ring500} focus:ring-offset-2 ${className}`, children: loading ? loadingText : inside }));
43
+ };
@@ -0,0 +1 @@
1
+ export * from "./Button";
@@ -0,0 +1 @@
1
+ export * from "./Button";
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ title?: string;
5
+ className?: string;
6
+ };
7
+ export declare const Card: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const Card = (props) => {
3
+ const { children, title, className } = props;
4
+ return (_jsxs("div", { className: `p-4 space-y-3 shadow sm:overflow-hidden sm:rounded-md ${className}`, children: [title && (_jsx("label", { className: "inline text-lg font-medium text-gray-700", children: `${title.toUpperCase()}` })), children] }));
5
+ };
@@ -0,0 +1 @@
1
+ export * from "./Card";
@@ -0,0 +1 @@
1
+ export * from "./Card";
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ };
5
+ export declare const BodyContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ export const BodyContainer = (props) => {
3
+ const { children } = props;
4
+ return (_jsx(_Fragment, { children: _jsx("body", { className: "flex flex-col min-h-screen m-0", children: children }) }));
5
+ };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ whitBg?: boolean;
6
+ };
7
+ export declare const ButtonSectionContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const ButtonSectionContainer = (props) => {
3
+ const { children, className, whitBg = true } = props;
4
+ return (_jsx("div", { className: `${whitBg ? "bg-gray-50" : ""} px-4 py-3 text-right sm:px-6 ${className}`, children: children }));
5
+ };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ type Props = {
3
+ title?: string;
4
+ description?: string;
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ rightContent?: React.ReactNode;
8
+ };
9
+ export declare const Container: (props: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const Container = (props) => {
3
+ const { title, description, children, className = "", rightContent } = props;
4
+ const titleInfo = (_jsxs(_Fragment, { children: [title && (_jsx("h3", { className: "text-3xl font-bold leading-8 text-gray-900", children: title })), description && (_jsx("p", { className: "mt-1 text-md text-gray-600", children: description }))] }));
5
+ return (_jsx(_Fragment, { children: _jsxs("div", { className: `mx-2 ${className}`, children: [rightContent && (_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("div", { children: titleInfo }), _jsx("div", { children: rightContent })] })), !rightContent && titleInfo, _jsx("div", { className: "mt-5 space-y-5", children: children })] }) }));
6
+ };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ type Props = {
3
+ title?: string;
4
+ description?: string;
5
+ className?: string;
6
+ children: React.ReactNode;
7
+ };
8
+ export declare const DoubleContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const DoubleContainer = (props) => {
3
+ const { title, description, className = "", children } = props;
4
+ const getChildren = (index) => {
5
+ if (children && Array.isArray(children) && children[index]) {
6
+ return children[index];
7
+ }
8
+ if (children && index === 0) {
9
+ return children;
10
+ }
11
+ return _jsx(_Fragment, {});
12
+ };
13
+ return (_jsx(_Fragment, { children: _jsxs("div", { className: `mx-2 ${className}`, children: [title && (_jsx("h3", { className: "text-3xl font-bold leading-8 text-gray-900", children: title })), description && (_jsx("p", { className: "mt-1 text-md text-gray-600", children: description })), _jsxs("div", { className: "grid xl:grid-cols-3 md:grid-cols-1 gap-4", children: [_jsx("div", { className: "xl:col-span-2 md:col-span-1 mt-5", children: getChildren(0) }), _jsx("div", { className: "xl:col-span-1 md:col-span-1 mt-5", children: getChildren(1) })] })] }) }));
14
+ };
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ };
5
+ export declare const MainContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ export const MainContainer = (props) => {
3
+ const { children } = props;
4
+ return (_jsx(_Fragment, { children: _jsx("div", { className: "md:p-10 p-0 mt-10 ml-2 mr-2 mb-10 md:mt-0 md:ml-0 md:mr-0 md:mb-0", children: children }) }));
5
+ };
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ type Props = {
3
+ children: React.ReactNode;
4
+ };
5
+ export declare const OutletContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ export const OutletContainer = (props) => {
3
+ const { children } = props;
4
+ return (_jsx(_Fragment, { children: _jsx("div", { className: "flex-1 overflow-x-auto", children: children }) }));
5
+ };
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ type Props = {
3
+ title?: string;
4
+ description?: string;
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ rightContent?: React.ReactNode;
8
+ };
9
+ export declare const SubContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const SubContainer = (props) => {
3
+ const { title, description, children, className = "", rightContent } = props;
4
+ const titleInfo = (_jsxs(_Fragment, { children: [title && (_jsx("h3", { className: "text-xl font-bold leading-8 text-gray-900", children: title })), description && (_jsx("p", { className: "mt-1 text-md text-gray-600", children: description }))] }));
5
+ return (_jsxs("div", { className: `${className}`, children: [rightContent && (_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("div", { children: titleInfo }), _jsx("div", { children: rightContent })] })), !rightContent && titleInfo, _jsx("div", { className: "mt-5 space-y-3", children: children })] }));
6
+ };
@@ -0,0 +1,7 @@
1
+ export * from "./BodyContainer";
2
+ export * from "./ButtonSectionContainer";
3
+ export * from "./Container";
4
+ export * from "./DoubleContainer";
5
+ export * from "./MainContainer";
6
+ export * from "./OutletContainer";
7
+ export * from "./SubContainer";
@@ -0,0 +1,7 @@
1
+ export * from "./BodyContainer";
2
+ export * from "./ButtonSectionContainer";
3
+ export * from "./Container";
4
+ export * from "./DoubleContainer";
5
+ export * from "./MainContainer";
6
+ export * from "./OutletContainer";
7
+ export * from "./SubContainer";
@@ -0,0 +1,7 @@
1
+ type FooterProps = {
2
+ href: string;
3
+ showConnection?: boolean;
4
+ selectedColor: "purple" | "pink" | "indigo" | "cyan" | "slate" | "green" | "red" | "sky";
5
+ };
6
+ export declare const Footer: ({ href, selectedColor, showConnection, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ //import ConnectionState from "../ConnectionState";
4
+ import { LoadingInputSkeleton } from "src";
5
+ const COLORS = {
6
+ purple: "bg-purple-500",
7
+ pink: "bg-pink-500",
8
+ indigo: "bg-indigo-500",
9
+ cyan: "bg-cyan-500",
10
+ slate: "bg-slate-500",
11
+ green: "bg-green-500",
12
+ red: "bg-red-500",
13
+ sky: "bg-sky-500",
14
+ };
15
+ export const Footer = ({ href, selectedColor, showConnection = false, }) => {
16
+ const [client, setIsClient] = useState(false);
17
+ const color = COLORS[selectedColor];
18
+ useEffect(() => {
19
+ setIsClient(true);
20
+ }, []);
21
+ if (!client) {
22
+ return _jsx(LoadingInputSkeleton, {});
23
+ }
24
+ return (_jsx("footer", { className: `inset-x-0 bottom-0 px-2 py-[20px] ${color}`, children: _jsx("div", { className: "px-4 mx-auto flex flex-wrap items-center justify-center", children: _jsxs("p", { className: "text-white text-[1.2rem]", children: [`Creado en `, " ", _jsx("a", { href: href, children: "Zauru" }), " ", `con ❤️ ${new Date().getFullYear()} v.3.2`] }) }) }));
25
+ };
@@ -0,0 +1 @@
1
+ export * from "./Footer";
@@ -0,0 +1 @@
1
+ export * from "./Footer";
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ description: string;
3
+ title: string;
4
+ className?: string;
5
+ };
6
+ export declare const InfoLabel: (props: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const InfoLabel = (props) => {
3
+ const { description, title, className } = props;
4
+ return (_jsxs("div", { className: `block ${className}`, children: [_jsx("label", { className: "inline text-sm font-medium text-gray-700", children: `${title.toUpperCase()} ` }), _jsx("label", { className: "inline text-sm font-medium text-gray-500", children: description })] }));
5
+ };
@@ -0,0 +1 @@
1
+ export * from "./InfoLabel";
@@ -0,0 +1 @@
1
+ export * from "./InfoLabel";
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ title?: string;
3
+ description?: string;
4
+ };
5
+ export declare const HomeLayout: ({ title, description }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const HomeLayout = ({ title, description }) => {
3
+ return (_jsx("div", { className: "bg-cover bg-center h-screen", style: { backgroundImage: 'url("/wallpaper.webp")' }, children: _jsxs("div", { className: "flex flex-col h-screen justify-center items-center", children: [_jsx("h1", { className: "text-6xl md:text-7xl lg:text-8xl text-white font-bold mb-6 text-center", style: {
4
+ textShadow: "0.5px 0.5px 1px #000000",
5
+ WebkitTextStroke: "2px #000000",
6
+ }, children: title ?? _jsx(_Fragment, { children: "Bienvenido, inicie sesi\u00F3n para continuar." }) }), _jsx("p", { className: "text-xl md:text-2xl lg:text-3xl text-white text-center max-w-md mb-12", style: {
7
+ textShadow: "0.5px 0.5px 1px #000000",
8
+ WebkitTextStroke: "1px #000000",
9
+ }, children: description ?? _jsx(_Fragment, { children: "Web app, realizada en Zauru." }) })] }) }));
10
+ };
@@ -0,0 +1 @@
1
+ export * from "./homeLayout";
@@ -0,0 +1 @@
1
+ export * from "./homeLayout";
@@ -0,0 +1 @@
1
+ export declare const LineSeparator: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const LineSeparator = () => {
3
+ return _jsx("hr", { className: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-400" });
4
+ };
@@ -0,0 +1 @@
1
+ export * from "./LineSeparator";
@@ -0,0 +1 @@
1
+ export * from "./LineSeparator";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export type ModalOption = "OK" | "CANCEL" | null;
3
+ type ModalParams = {
4
+ title: string;
5
+ description: React.ReactNode;
6
+ okButtonText?: string;
7
+ showOptions?: boolean;
8
+ };
9
+ export declare const createModal: ({ title, description, okButtonText, showOptions, }: ModalParams) => Promise<ModalOption>;
10
+ export {};
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createRoot } from "react-dom/client";
3
+ export const createModal = ({ title, description, okButtonText, showOptions = true, }) => {
4
+ return new Promise((resolve) => {
5
+ const handleClose = () => {
6
+ resolve(null);
7
+ removeModal();
8
+ };
9
+ const handleOk = () => {
10
+ resolve("OK");
11
+ removeModal();
12
+ };
13
+ const handleCancel = () => {
14
+ resolve("CANCEL");
15
+ removeModal();
16
+ };
17
+ const removeModal = () => {
18
+ document.body.removeChild(modalWrapper);
19
+ document.body.removeChild(modalOverlay);
20
+ };
21
+ const modalWrapper = document.createElement("div");
22
+ modalWrapper.classList.add("justify-center", "items-center", "flex", "overflow-x-hidden", "overflow-y-auto", "fixed", "inset-0", "z-50", "outline-none", "focus:outline-none");
23
+ // Crear capa de fondo detrás del modal
24
+ const modalOverlay = document.createElement("div");
25
+ modalOverlay.classList.add("fixed", "inset-0", "bg-black", "opacity-50", "z-40");
26
+ document.body.appendChild(modalOverlay);
27
+ document.body.appendChild(modalWrapper);
28
+ const ModalContent = () => (_jsx("div", { className: "relative w-auto my-6 mx-auto max-w-3xl", children: _jsxs("div", { className: "border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none", children: [_jsxs("div", { className: "flex items-start justify-between p-5 border-b border-solid border-slate-200 rounded-t", children: [_jsx("h3", { className: "text-3xl font-semibold", children: title }), _jsx("button", { className: "p-1 ml-auto bg-transparent border-0 text-black float-right text-3xl leading-none font-semibold outline-none focus:outline-none", children: _jsx("span", { className: "close-button", onClick: handleClose, children: "\u00D7" }) })] }), _jsx("div", { className: "relative p-6 flex-auto", children: description }), showOptions && (_jsxs("div", { className: "flex items-center justify-end p-6 border-t border-solid border-slate-200 rounded-b", children: [_jsx("button", { className: "cancel-button text-red-700 background-transparent font-bold uppercase px-6 py-2 text-sm outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150", type: "button", onClick: handleCancel, children: "Cancelar" }), _jsx("button", { className: "ok-button bg-emerald-700 text-white active:bg-emerald-600 font-bold uppercase text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150", type: "button", onClick: handleOk, children: okButtonText ?? "Aceptar" })] }))] }) }));
29
+ const root = createRoot(modalWrapper);
30
+ root.render(_jsx(ModalContent, {}));
31
+ });
32
+ };
@@ -0,0 +1 @@
1
+ export * from "./Modal";
@@ -0,0 +1 @@
1
+ export * from "./Modal";
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { DropDownArrowSvgIcon, LogoutDropDownSvgIcon, MenuAlt4Svg, OpcionButtonSvgIcon, } from "../Icons/Icons";
3
+ import { DropDownArrowSvgIcon, LogoutDropDownSvgIcon, MenuAlt4Svg, OpcionButtonSvgIcon, } from "@zauru-sdk/icons";
4
4
  import { COLORS } from "./NavBar.utils";
5
5
  import { Link } from "@remix-run/react";
6
6
  const DropDownLinkButton = ({ text, path, icon, buttonHover, }) => (_jsx(Link, { className: `block px-4 py-3 text-sm text-gray-600 capitalize transition-colors duration-200 transform dark:text-gray-300 ${buttonHover ?? ""} dark:hover:bg-gray-700 dark:hover:text-white`, to: path, prefetch: "none", children: _jsxs("div", { className: "mx-auto pt-2", children: [icon, _jsx("span", { children: text })] }) }));
@@ -28,5 +28,5 @@ export const NavBar = ({ title, loggedIn, items, selectedColor, }) => {
28
28
  .map((item, index) => {
29
29
  return (_jsx(NavItem, { name: item.name, link: item.link, icon: item.icon, color: color }, index));
30
30
  })) })] }));
31
- return (_jsx("nav", { className: `py-3 ${color.bg600}`, children: _jsxs("div", { className: "flex items-center justify-between ml-5 mr-5", children: [_jsxs("div", { className: "flex justify-between w-full lg:w-auto", children: [_jsx(Link, { className: "text-sm font-bold leading-relaxed inline-block mr-4 py-2 whitespace-nowrap uppercase text-white", to: "/home", prefetch: "none", children: _jsxs(_Fragment, { children: [_jsx("div", { className: "inline-block mr-2 mb-2 align-middle", children: _jsx("img", { className: "w-auto h-7", src: "/logo.png", alt: "logo-zauru" }) }), title] }) }), _jsx("button", { className: `rounded lg:hidden focus:outline-none focus:ring focus:${color.ring600} focus:ring-opacity-50`, "aria-label": "Toggle mobile menu", type: "button", onClick: () => setNavBarOpen(!NavBarOpen), children: _jsx(MenuAlt4Svg, { NavBarOpen: NavBarOpen, setNavBarOpen: undefined }) })] }), _jsx("div", { className: `lg:hidden absolute top-0 left-0 z-50 w-64 h-full ${color.bg700} shadow-lg transform ${NavBarOpen ? "translate-x-0" : "-translate-x-full"} transition-transform duration-300 ease-in-out`, children: options }), _jsx("div", { className: "hidden lg:flex w-full lg:w-auto", children: options })] }) }));
31
+ return (_jsx("nav", { className: `py-3 ${color.bg600}`, children: _jsxs("div", { className: "flex items-center justify-between ml-5 mr-5", children: [_jsxs("div", { className: "flex justify-between w-full lg:w-auto", children: [_jsx(Link, { className: "text-sm font-bold leading-relaxed inline-block mr-4 py-2 whitespace-nowrap uppercase text-white", to: "/home", prefetch: "none", children: _jsxs(_Fragment, { children: [_jsx("div", { className: "inline-block mr-2 mb-2 align-middle", children: _jsx("img", { className: "w-auto h-7", src: "/logo.png", alt: "logo-zauru" }) }), title] }) }), _jsx("button", { className: `rounded lg:hidden focus:outline-none focus:ring focus:${color.ring600} focus:ring-opacity-50`, "aria-label": "Toggle mobile menu", type: "button", onClick: () => setNavBarOpen(!NavBarOpen), children: _jsx(MenuAlt4Svg, { open: NavBarOpen }) })] }), _jsx("div", { className: `lg:hidden absolute top-0 left-0 z-50 w-64 h-full ${color.bg700} shadow-lg transform ${NavBarOpen ? "translate-x-0" : "-translate-x-full"} transition-transform duration-300 ease-in-out`, children: options }), _jsx("div", { className: "hidden lg:flex w-full lg:w-auto", children: options })] }) }));
32
32
  };
@@ -0,0 +1,3 @@
1
+ export * from "./NavBar";
2
+ export * from "./NavBar.types";
3
+ export * from "./NavBar.utils";
@@ -0,0 +1,3 @@
1
+ export * from "./NavBar";
2
+ export * from "./NavBar.types";
3
+ export * from "./NavBar.utils";
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ title?: string;
3
+ percent?: string;
4
+ };
5
+ export declare const ProgressBar: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
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
+ };
@@ -0,0 +1,6 @@
1
+ export declare const ProgressCircle: ({ total, completed, description, title, }: {
2
+ total: number;
3
+ completed: number;
4
+ description: string;
5
+ title?: string | undefined;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
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
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./ProgressBar";
2
+ export * from "./ProgressCircle";
@@ -0,0 +1,2 @@
1
+ export * from "./ProgressBar";
2
+ export * from "./ProgressCircle";
@@ -0,0 +1 @@
1
+ export declare const LoadingInputSkeleton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
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
+ };
@@ -0,0 +1 @@
1
+ export * from "./LoadingInputSkeleton";
@@ -0,0 +1 @@
1
+ export * from "./LoadingInputSkeleton";
@@ -0,0 +1,9 @@
1
+ export type TabItem = {
2
+ title: string;
3
+ link: string;
4
+ };
5
+ type Props = {
6
+ items: Array<TabItem>;
7
+ };
8
+ export declare const Tabs: (props: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,19 @@
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
+ };
@@ -0,0 +1 @@
1
+ export * from "./Tab";
@@ -0,0 +1 @@
1
+ export * from "./Tab";