bmi-next 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +2 -0
  2. package/dist/Contratacion.module-DVSWILuV.js +26 -0
  3. package/dist/assets/Contratacion.css +1 -0
  4. package/dist/assets/constantes.css +1 -0
  5. package/dist/assets/index.css +1 -0
  6. package/dist/assets/index10.css +1 -0
  7. package/dist/assets/index11.css +1 -0
  8. package/dist/assets/index12.css +1 -0
  9. package/dist/assets/index13.css +1 -0
  10. package/dist/assets/index14.css +1 -0
  11. package/dist/assets/index15.css +1 -0
  12. package/dist/assets/index16.css +1 -0
  13. package/dist/assets/index17.css +1 -0
  14. package/dist/assets/index18.css +1 -0
  15. package/dist/assets/index19.css +1 -0
  16. package/dist/assets/index2.css +1 -0
  17. package/dist/assets/index20.css +1 -0
  18. package/dist/assets/index21.css +1 -0
  19. package/dist/assets/index22.css +1 -0
  20. package/dist/assets/index23.css +1 -0
  21. package/dist/assets/index24.css +1 -0
  22. package/dist/assets/index3.css +1 -0
  23. package/dist/assets/index4.css +1 -0
  24. package/dist/assets/index5.css +1 -0
  25. package/dist/assets/index6.css +1 -0
  26. package/dist/assets/index7.css +1 -0
  27. package/dist/assets/index8.css +1 -0
  28. package/dist/assets/index9.css +1 -0
  29. package/dist/assets/styles.css +1 -0
  30. package/dist/components/Alert/index.d.ts +64 -0
  31. package/dist/components/Alert/index.js +50 -0
  32. package/dist/components/Button/index.d.ts +37 -0
  33. package/dist/components/Button/index.js +61 -0
  34. package/dist/components/Checkbox/index.d.ts +20 -0
  35. package/dist/components/Checkbox/index.js +16 -0
  36. package/dist/components/ContratacionPage/Link.d.ts +9 -0
  37. package/dist/components/ContratacionPage/Link.js +19 -0
  38. package/dist/components/ContratacionPage/SelectorA/303/261osCobertura.d.ts +8 -0
  39. package/dist/components/ContratacionPage/SelectorA/303/261osCobertura.js +44 -0
  40. package/dist/components/ContratacionPage/Slider.d.ts +9 -0
  41. package/dist/components/ContratacionPage/Slider.js +32 -0
  42. package/dist/components/ContratacionPage/index.d.ts +24 -0
  43. package/dist/components/ContratacionPage/index.js +460 -0
  44. package/dist/components/DatePicker/index.d.ts +16 -0
  45. package/dist/components/DatePicker/index.js +169 -0
  46. package/dist/components/Drawer/index.d.ts +39 -0
  47. package/dist/components/Drawer/index.js +27 -0
  48. package/dist/components/DrawerPortal/index.d.ts +18 -0
  49. package/dist/components/DrawerPortal/index.js +92 -0
  50. package/dist/components/DrawerPortalBase/index.d.ts +16 -0
  51. package/dist/components/DrawerPortalBase/index.js +73 -0
  52. package/dist/components/ExclusionPage/constantes.d.ts +7 -0
  53. package/dist/components/ExclusionPage/constantes.js +5 -0
  54. package/dist/components/ExclusionPage/index.d.ts +14 -0
  55. package/dist/components/ExclusionPage/index.js +61 -0
  56. package/dist/components/ExclusionPage/texto.d.ts +4 -0
  57. package/dist/components/ExclusionPage/texto.js +11 -0
  58. package/dist/components/FakeLoader/index.d.ts +5 -0
  59. package/dist/components/FakeLoader/index.js +16 -0
  60. package/dist/components/FieldError/index.d.ts +19 -0
  61. package/dist/components/FieldError/index.js +11 -0
  62. package/dist/components/Input/index.d.ts +47 -0
  63. package/dist/components/Input/index.js +67 -0
  64. package/dist/components/Label/index.d.ts +23 -0
  65. package/dist/components/Label/index.js +16 -0
  66. package/dist/components/Navbar/index.d.ts +34 -0
  67. package/dist/components/Navbar/index.js +88 -0
  68. package/dist/components/PasswordVisibility/index.d.ts +28 -0
  69. package/dist/components/PasswordVisibility/index.js +14 -0
  70. package/dist/components/Popup/index.d.ts +53 -0
  71. package/dist/components/Popup/index.js +26 -0
  72. package/dist/components/Radio/index.d.ts +27 -0
  73. package/dist/components/Radio/index.js +17 -0
  74. package/dist/components/Search/index.d.ts +53 -0
  75. package/dist/components/Search/index.js +82 -0
  76. package/dist/components/Select/index.d.ts +54 -0
  77. package/dist/components/Select/index.js +98 -0
  78. package/dist/components/SelectDrawer/index.d.ts +66 -0
  79. package/dist/components/SelectDrawer/index.js +73 -0
  80. package/dist/components/Spinner/index.d.ts +1 -0
  81. package/dist/components/Spinner/index.js +8 -0
  82. package/dist/components/Steps/index.d.ts +36 -0
  83. package/dist/components/Steps/index.js +136 -0
  84. package/dist/components/TextArea/index.d.ts +37 -0
  85. package/dist/components/TextArea/index.js +64 -0
  86. package/dist/components/h1/index.d.ts +8 -0
  87. package/dist/components/h1/index.js +11 -0
  88. package/dist/components/h2/index.d.ts +8 -0
  89. package/dist/components/h2/index.js +11 -0
  90. package/dist/components/h3/index.d.ts +8 -0
  91. package/dist/components/h3/index.js +11 -0
  92. package/dist/components/h4/index.d.ts +8 -0
  93. package/dist/components/h4/index.js +11 -0
  94. package/dist/components/h5/index.d.ts +8 -0
  95. package/dist/components/h5/index.js +11 -0
  96. package/dist/components/images/index.d.ts +7 -0
  97. package/dist/components/images/index.js +5 -0
  98. package/dist/constantes-PXVssL1x.js +52 -0
  99. package/dist/hooks/useIsMobile.d.ts +20 -0
  100. package/dist/hooks/useIsMobile.js +17 -0
  101. package/dist/icons/icons.d.ts +104 -0
  102. package/dist/icons/icons.js +4216 -0
  103. package/dist/index-Cb7Kc3pQ.js +19065 -0
  104. package/dist/main.d.ts +27 -0
  105. package/dist/main.js +57 -0
  106. package/dist/styles.module-Cv_LNFFk.js +6 -0
  107. package/package.json +54 -0
@@ -0,0 +1,50 @@
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { useRef as d, useEffect as _ } from "react";
3
+ import { Spinner as f } from "../Spinner/index.js";
4
+ import '../../assets/index23.css';const v = "_alertOverlay_1pqmi_1", h = "_alert_1pqmi_1", p = "_alertHeader_1pqmi_23", q = "_alertTitle_1pqmi_30", B = "_alertContent_1pqmi_37", N = "_buttons_1pqmi_43", b = "_closeButton_1pqmi_48", y = "_confirmButton_1pqmi_72", t = {
5
+ alertOverlay: v,
6
+ alert: h,
7
+ alertHeader: p,
8
+ alertTitle: q,
9
+ alertContent: B,
10
+ buttons: N,
11
+ closeButton: b,
12
+ confirmButton: y
13
+ }, k = ({
14
+ title: c,
15
+ text: i,
16
+ isOpen: n,
17
+ onClose: r,
18
+ onConfirm: a,
19
+ loading: m = !1
20
+ }) => {
21
+ const l = d(null);
22
+ return _(() => {
23
+ const o = (u) => {
24
+ l.current && !l.current.contains(u.target) && r();
25
+ };
26
+ return n && document.addEventListener("mousedown", o), () => {
27
+ document.removeEventListener("mousedown", o);
28
+ };
29
+ }, [n, r]), n ? /* @__PURE__ */ e("div", { className: t.alertOverlay, children: /* @__PURE__ */ s("div", { className: t.alert, ref: l, children: [
30
+ /* @__PURE__ */ e("div", { className: t.alertHeader, children: /* @__PURE__ */ e("h2", { className: t.alertTitle, children: c }) }),
31
+ /* @__PURE__ */ e("div", { className: t.alertContent, children: i }),
32
+ m ? /* @__PURE__ */ e(f, {}) : /* @__PURE__ */ s("div", { className: t.buttons, children: [
33
+ /* @__PURE__ */ e("button", { onClick: r, className: t.closeButton, children: "Cerrar" }),
34
+ a && /* @__PURE__ */ e(
35
+ "button",
36
+ {
37
+ onClick: async () => {
38
+ await a(), r();
39
+ },
40
+ style: { fontWeight: "bold" },
41
+ className: t.confirmButton,
42
+ children: "Confirmar"
43
+ }
44
+ )
45
+ ] })
46
+ ] }) }) : null;
47
+ };
48
+ export {
49
+ k as Alert
50
+ };
@@ -0,0 +1,37 @@
1
+ import { IconName } from '../../icons/icons';
2
+ import { Icon } from '../../main';
3
+ type ButtonVariant = "primary" | "secondary" | "tertiary" | "tertiary-green";
4
+ type Icon = {
5
+ name: IconName;
6
+ fill?: string;
7
+ width?: number;
8
+ height?: number;
9
+ position: "before" | "after";
10
+ };
11
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
12
+ variant: ButtonVariant;
13
+ icon?: Icon;
14
+ small?: boolean;
15
+ }
16
+ /**
17
+ * Button component with customizable styles based on a variant.
18
+ *
19
+ * @param {'primary' | 'secondary'} props.variant - Specifies the style variant of the button.
20
+ * @param {string} [props.className] - Additional custom CSS classes to apply to the button.
21
+ * @param {React.ReactNode} props.children - The content to render inside the button.
22
+ * @param {React.ButtonHTMLAttributes<HTMLButtonElement>} [props] - Additional standard button attributes.
23
+ *
24
+ * @returns {JSX.Element} The styled Button component.
25
+ *
26
+ * @example
27
+ * <Button variant="primary" onClick={() => console.log('Clicked')}>
28
+ * Click Me
29
+ * </Button>
30
+ *
31
+ * @example
32
+ * <Button variant="secondary" className="custom-class">
33
+ * Cancel
34
+ * </Button>
35
+ */
36
+ export declare const Button: React.FC<ButtonProps>;
37
+ export {};
@@ -0,0 +1,61 @@
1
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
+ import { useState as b, useEffect as x } from "react";
3
+ import "../../index-Cb7Kc3pQ.js";
4
+ import { Icon as i } from "../../icons/icons.js";
5
+ import '../../assets/index21.css';const g = "_button_jx6lo_1", j = "_small_jx6lo_15", w = "_primary_jx6lo_21", C = "_secondary_jx6lo_38", $ = "_tertiary_jx6lo_72", s = {
6
+ button: g,
7
+ small: j,
8
+ primary: w,
9
+ secondary: C,
10
+ tertiary: $,
11
+ "tertiary-green": "_tertiary-green_jx6lo_92"
12
+ }, B = ({
13
+ variant: e,
14
+ icon: t,
15
+ className: l,
16
+ children: d,
17
+ small: y,
18
+ ...r
19
+ }) => {
20
+ const m = e === "primary" ? "primary" : e === "secondary" ? "secondary" : e === "tertiary" ? "tertiary" : "tertiary-green", _ = `${s.button} ${s[m]} ${l || ""}`, [a, o] = b(), f = () => {
21
+ e === "secondary" && !r.disabled && o("#749cff");
22
+ }, c = () => {
23
+ e === "secondary" && !r.disabled && o("#2054a5");
24
+ };
25
+ return x(() => {
26
+ const h = (e === "secondary" || e === "tertiary" || e === "tertiary-green") && !r.disabled ? "#2054a5" : e === "primary" && !r.disabled ? "#fff" : "#2054a566";
27
+ o(h);
28
+ }, [r.disabled, e]), /* @__PURE__ */ u(
29
+ "button",
30
+ {
31
+ className: `${_} ${y ? s.small : ""}`,
32
+ ...r,
33
+ onMouseOver: f,
34
+ onMouseLeave: c,
35
+ children: [
36
+ t && t.position === "before" && /* @__PURE__ */ n(
37
+ i,
38
+ {
39
+ name: t.name,
40
+ fill: a,
41
+ width: t.width,
42
+ height: t.height
43
+ }
44
+ ),
45
+ d,
46
+ t && t.position === "after" && /* @__PURE__ */ n(
47
+ i,
48
+ {
49
+ name: t.name,
50
+ fill: a,
51
+ width: t.width,
52
+ height: t.height
53
+ }
54
+ )
55
+ ]
56
+ }
57
+ );
58
+ };
59
+ export {
60
+ B as Button
61
+ };
@@ -0,0 +1,20 @@
1
+ type CheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & {
2
+ label: string;
3
+ };
4
+ /**
5
+ * Checkbox component with a customizable label and styles.
6
+ *
7
+ * @param {string} props.label - The text label displayed next to the checkbox.
8
+ * @param {string} [props.className] - Additional custom CSS classes to apply to the checkbox.
9
+ * @param {React.InputHTMLAttributes<HTMLInputElement>} [props] - Additional standard input attributes (excluding the `type` attribute).
10
+ *
11
+ * @returns {JSX.Element} The styled Checkbox component.
12
+ *
13
+ * @example
14
+ * <Checkbox label="Accept Terms and Conditions" checked={true} onChange={() => console.log('Checked')} />
15
+ *
16
+ * @example
17
+ * <Checkbox label="Subscribe to Newsletter" className="custom-checkbox" />
18
+ */
19
+ export declare const Checkbox: React.FC<CheckboxProps>;
20
+ export {};
@@ -0,0 +1,16 @@
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import { s as p } from "../../styles.module-Cv_LNFFk.js";
3
+ const c = ({
4
+ label: o,
5
+ className: s,
6
+ ...e
7
+ }) => {
8
+ const l = `${s || ""}`;
9
+ return /* @__PURE__ */ a("label", { className: p.label, style: { paddingBottom: "2px" }, children: [
10
+ /* @__PURE__ */ t("input", { type: "checkbox", className: l, ...e }),
11
+ /* @__PURE__ */ t("span", { style: { paddingBottom: "2px" }, children: o })
12
+ ] });
13
+ };
14
+ export {
15
+ c as Checkbox
16
+ };
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface LinkProps {
3
+ children: React.ReactNode;
4
+ handleClick: () => void;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }
8
+ declare const Link: React.FC<LinkProps>;
9
+ export default Link;
@@ -0,0 +1,19 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { s as r } from "../../Contratacion.module-DVSWILuV.js";
3
+ const a = ({
4
+ children: s,
5
+ handleClick: o,
6
+ className: t,
7
+ style: e
8
+ }) => /* @__PURE__ */ i(
9
+ "p",
10
+ {
11
+ className: `m-0 ${r.lightBlue} ${r.cursorPointer} ${t}`,
12
+ onClick: o,
13
+ style: e,
14
+ children: s
15
+ }
16
+ );
17
+ export {
18
+ a as default
19
+ };
@@ -0,0 +1,8 @@
1
+ interface SelectorAñosCoberturaProps {
2
+ devolucionPrima?: boolean;
3
+ añosCobertura: number | false;
4
+ setAñosCobertura: (añosCobertura: number) => void;
5
+ terminos: Array<number>;
6
+ }
7
+ export default function SelectorAñosCobertura({ añosCobertura, setAñosCobertura, terminos, }: SelectorAñosCoberturaProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,44 @@
1
+ import { jsx as c, jsxs as n } from "react/jsx-runtime";
2
+ import { useIsMobile as m } from "../../hooks/useIsMobile.js";
3
+ import { s as r } from "../../Contratacion.module-DVSWILuV.js";
4
+ import { Button as a } from "../Button/index.js";
5
+ function y({
6
+ añosCobertura: e,
7
+ setAñosCobertura: s,
8
+ terminos: l
9
+ }) {
10
+ const t = l, i = m("(max-width: 768px)"), f = (o) => {
11
+ e !== o && s(o);
12
+ };
13
+ return /* @__PURE__ */ c(
14
+ "div",
15
+ {
16
+ className: `${r.flexRow} ${r.gap5}`,
17
+ style: {
18
+ display: "flex",
19
+ flexDirection: i ? "column" : "row"
20
+ },
21
+ children: t.map((o) => /* @__PURE__ */ n(
22
+ a,
23
+ {
24
+ small: !0,
25
+ variant: "secondary",
26
+ onClick: () => f(o),
27
+ style: e === o ? {
28
+ backgroundColor: "#dceaff66",
29
+ color: "#749cff",
30
+ border: "3px solid #749cff"
31
+ } : {},
32
+ children: [
33
+ o,
34
+ " años"
35
+ ]
36
+ },
37
+ o
38
+ ))
39
+ }
40
+ );
41
+ }
42
+ export {
43
+ y as default
44
+ };
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ interface SliderProps {
3
+ cobertura: number;
4
+ setCobertura: (value: number) => void;
5
+ limiteInferior: number;
6
+ limiteSuperior: number;
7
+ }
8
+ declare const Slider: React.FC<SliderProps>;
9
+ export default Slider;
@@ -0,0 +1,32 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { s as l } from "../../Contratacion.module-DVSWILuV.js";
3
+ const m = ({
4
+ cobertura: a,
5
+ setCobertura: n,
6
+ limiteInferior: s,
7
+ limiteSuperior: e
8
+ }) => /* @__PURE__ */ t(
9
+ "div",
10
+ {
11
+ className: l.sliderContainer,
12
+ style: { marginTop: "18px", height: "20px" },
13
+ children: /* @__PURE__ */ t(
14
+ "input",
15
+ {
16
+ className: l.slider,
17
+ type: "range",
18
+ min: s,
19
+ max: e,
20
+ step: "100",
21
+ value: a,
22
+ onChange: (p) => n(parseInt(p.target.value)),
23
+ style: {
24
+ "--value": `${(a - s) / (e - s) * 100}%`
25
+ }
26
+ }
27
+ )
28
+ }
29
+ );
30
+ export {
31
+ m as default
32
+ };
@@ -0,0 +1,24 @@
1
+ type DatosUsuario = {
2
+ idUsuario: number;
3
+ nombre: string;
4
+ surname: string;
5
+ email: string;
6
+ document: string;
7
+ mobile: number;
8
+ documentType: "Cédula de Identidad" | "Pasaporte";
9
+ edad: number;
10
+ sexo: "Masculino" | "Femenino";
11
+ fumador: "si" | "no";
12
+ };
13
+ type DatosCuestionario = {
14
+ sobrePrima: number;
15
+ limiteInfCobertura?: number;
16
+ limiteSupCobertura?: number;
17
+ limiteTermino?: Array<number>;
18
+ };
19
+ type Props = {
20
+ datosUsuario: DatosUsuario;
21
+ datosCuestionario: DatosCuestionario;
22
+ };
23
+ export declare const ContratacionPage: React.FC<Props>;
24
+ export {};