bmi-next-brokers 2.3.0 → 2.3.1

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.
@@ -19,7 +19,6 @@ interface NavbarProps extends React.HTMLAttributes<HTMLDivElement> {
19
19
  activeItem: string;
20
20
  withConfig?: boolean;
21
21
  configAction?: () => void;
22
- ref?: React.Ref<HTMLDivElement>;
23
22
  }
24
23
  /**
25
24
  * Sidebar navegacional adaptable a plataformas web y app.
@@ -47,5 +46,5 @@ interface NavbarProps extends React.HTMLAttributes<HTMLDivElement> {
47
46
  * />
48
47
  * ```
49
48
  */
50
- export declare const Navbar: ({ options, className, activeItem, withConfig, configAction, ref, ...props }: NavbarProps) => import("react/jsx-runtime").JSX.Element;
49
+ export declare const Navbar: React.ForwardRefExoticComponent<NavbarProps & React.RefAttributes<HTMLDivElement>>;
51
50
  export {};
@@ -1,84 +1,77 @@
1
1
  import { jsx as n, jsxs as o } from "react/jsx-runtime";
2
- import { useState as b } from "react";
2
+ import { forwardRef as b, useState as v } from "react";
3
3
  import { Icon as i } from "../../icons/Icon.js";
4
- import { MenuItem as m } from "./menuItem/index.js";
5
- import '../../assets/index2.css';const v = "_sidebar_1c3mn_1", B = "_open_1c3mn_17", N = "_content_1c3mn_21", $ = "_header_1c3mn_28", f = "_toggleButton_1c3mn_43", C = "_menuList_1c3mn_59", L = "_bottomDiv_1c3mn_75", e = {
6
- sidebar: v,
7
- open: B,
8
- content: N,
4
+ import { MenuItem as r } from "./menuItem/index.js";
5
+ import '../../assets/index2.css';const B = "_sidebar_1c3mn_1", N = "_open_1c3mn_17", f = "_content_1c3mn_21", $ = "_header_1c3mn_28", w = "_toggleButton_1c3mn_43", C = "_menuList_1c3mn_59", L = "_bottomDiv_1c3mn_75", e = {
6
+ sidebar: B,
7
+ open: N,
8
+ content: f,
9
9
  header: $,
10
- toggleButton: f,
10
+ toggleButton: w,
11
11
  menuList: C,
12
12
  bottomDiv: L
13
- }, j = ({
14
- options: r,
15
- className: d,
16
- activeItem: l,
17
- withConfig: h = !1,
18
- configAction: s,
19
- ref: _,
20
- ...p
21
- }) => {
22
- const [t, g] = b(!0), c = () => {
23
- g((a) => !a);
24
- };
25
- return /* @__PURE__ */ n(
26
- "aside",
27
- {
28
- ref: _,
29
- className: `${e.sidebar} ${t ? e.open : ""} ${d || ""}`,
30
- ...p,
31
- children: /* @__PURE__ */ o("div", { className: e.content, children: [
32
- /* @__PURE__ */ o("header", { className: `${e.header} ${t && e.open}`, children: [
33
- /* @__PURE__ */ n(
34
- i,
35
- {
36
- name: t ? "BmiLogo" : "BmiCollapsed",
37
- width: t ? 80.86 : 26.62,
38
- height: 32
39
- }
40
- ),
41
- t && /* @__PURE__ */ n("div", { className: e.toggleButton, onClick: c, children: /* @__PURE__ */ n(
42
- i,
43
- {
44
- name: "ClosePanel",
45
- width: 20,
46
- height: 20,
47
- fill: "var(--black-60)"
48
- }
49
- ) })
50
- ] }),
51
- /* @__PURE__ */ o("ul", { className: e.menuList, children: [
52
- r.map((a, u) => /* @__PURE__ */ n(
53
- m,
54
- {
55
- option: a,
56
- activeItem: l,
57
- open: t
58
- },
59
- u
60
- )),
61
- /* @__PURE__ */ o("div", { className: `${e.bottomDiv} ${t && e.open}`, children: [
62
- !t && /* @__PURE__ */ n("div", { className: e.toggleButton, onClick: c, children: /* @__PURE__ */ n(i, { name: "OpenPanel", width: 20, height: 20, fill: "black" }) }),
63
- h && /* @__PURE__ */ n(
64
- m,
13
+ }, O = b(
14
+ ({
15
+ options: c,
16
+ className: d,
17
+ activeItem: l,
18
+ withConfig: h = !1,
19
+ configAction: s,
20
+ ..._
21
+ }, p) => {
22
+ const [t, g] = v(!0), m = () => {
23
+ g((a) => !a);
24
+ };
25
+ return /* @__PURE__ */ n(
26
+ "aside",
27
+ {
28
+ ref: p,
29
+ className: `${e.sidebar} ${t ? e.open : ""} ${d || ""}`,
30
+ ..._,
31
+ children: /* @__PURE__ */ o("div", { className: e.content, children: [
32
+ /* @__PURE__ */ o("header", { className: `${e.header} ${t && e.open}`, children: [
33
+ /* @__PURE__ */ n(
34
+ i,
65
35
  {
66
- option: {
67
- label: "Configuración",
68
- action: () => s == null ? void 0 : s(),
69
- iconAfter: "Settings",
70
- iconBefore: "ArrowRight"
71
- },
72
- open: t,
73
- activeItem: l
36
+ name: t ? "BmiLogo" : "BmiCollapsed",
37
+ width: t ? 80.86 : 26.62,
38
+ height: 32
74
39
  }
75
- )
40
+ ),
41
+ t && /* @__PURE__ */ n("div", { className: e.toggleButton, onClick: m, children: /* @__PURE__ */ n(i, { name: "ClosePanel", width: 20, height: 20 }) })
42
+ ] }),
43
+ /* @__PURE__ */ o("ul", { className: e.menuList, children: [
44
+ c.map((a, u) => /* @__PURE__ */ n(
45
+ r,
46
+ {
47
+ option: a,
48
+ activeItem: l,
49
+ open: t
50
+ },
51
+ u
52
+ )),
53
+ /* @__PURE__ */ o("div", { className: `${e.bottomDiv} ${t && e.open}`, children: [
54
+ !t && /* @__PURE__ */ n("div", { className: e.toggleButton, onClick: m, children: /* @__PURE__ */ n(i, { name: "OpenPanel", width: 20, height: 20, fill: "black" }) }),
55
+ h && /* @__PURE__ */ n(
56
+ r,
57
+ {
58
+ option: {
59
+ label: "Configuración",
60
+ action: () => s == null ? void 0 : s(),
61
+ iconAfter: "Settings",
62
+ iconBefore: "ArrowRight"
63
+ },
64
+ open: t,
65
+ activeItem: l
66
+ }
67
+ )
68
+ ] })
76
69
  ] })
77
70
  ] })
78
- ] })
79
- }
80
- );
81
- };
71
+ }
72
+ );
73
+ }
74
+ );
82
75
  export {
83
- j as Navbar
76
+ O as Navbar
84
77
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bmi-next-brokers",
3
3
  "description": "Componentes de UI para proyecto BMI Next Brokers",
4
- "version": "2.3.0",
4
+ "version": "2.3.1",
5
5
  "author": "BMI Ahorro España",
6
6
  "contributors": [
7
7
  "José Ramón Jiménez <jrjimenez@bmicos.com>",