@adiba-banking-cloud/backoffice 0.0.12 → 0.0.14

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.
@@ -11397,15 +11397,15 @@ const Icons = _ref => {
11397
11397
  let {
11398
11398
  name = "Home",
11399
11399
  size = 16,
11400
+ variant = "Linear",
11400
11401
  stroke = 1,
11401
- variant = "Outline",
11402
11402
  color
11403
11403
  } = _ref;
11404
11404
  const Element = IconSax__namespace[name];
11405
11405
  return /*#__PURE__*/React.createElement(Element, {
11406
- size: size,
11407
- variant: variant,
11408
- color: color,
11406
+ size,
11407
+ color,
11408
+ variant,
11409
11409
  style: {
11410
11410
  strokeWidth: stroke
11411
11411
  }
@@ -11611,14 +11611,16 @@ const UserMenuTarget = _ref => {
11611
11611
  }), /*#__PURE__*/React.createElement(core.Stack, {
11612
11612
  gap: 0,
11613
11613
  align: "flex-start",
11614
- visibleFrom: "md"
11614
+ visibleFrom: "md",
11615
+ fw: 300
11615
11616
  }, /*#__PURE__*/React.createElement(core.Text, {
11617
+ fw: 300,
11616
11618
  size: "sm"
11617
11619
  }, name), /*#__PURE__*/React.createElement(core.Text, {
11618
11620
  c: "dimmed",
11619
11621
  size: "xs"
11620
11622
  }, username)), /*#__PURE__*/React.createElement(Icons, {
11621
- name: "ArrowRight2",
11623
+ name: "ArrowDown2",
11622
11624
  size: 12
11623
11625
  }))));
11624
11626
  };
@@ -11636,12 +11638,16 @@ const UserMenuDropdown = _ref => {
11636
11638
  c: section === null || section === void 0 ? void 0 : section.color,
11637
11639
  key: "menu-item-".concat(key),
11638
11640
  h: height,
11639
- leftSection: /*#__PURE__*/React.createElement(Icons, item.icon),
11641
+ leftSection: /*#__PURE__*/React.createElement(Icons, _extends({}, item.icon, {
11642
+ stroke: 0.5
11643
+ })),
11640
11644
  rightSection: item !== null && item !== void 0 && item.disclosure ? /*#__PURE__*/React.createElement(Icons, {
11641
11645
  name: "ArrowRight2",
11642
- size: 12
11646
+ size: 12,
11647
+ stroke: 0.5
11643
11648
  }) : item.badge ? /*#__PURE__*/React.createElement(core.Badge, {
11644
- color: item === null || item === void 0 || (_item$badge = item.badge) === null || _item$badge === void 0 ? void 0 : _item$badge.color
11649
+ color: item === null || item === void 0 || (_item$badge = item.badge) === null || _item$badge === void 0 ? void 0 : _item$badge.color,
11650
+ size: "sm"
11645
11651
  }, item === null || item === void 0 || (_item$badge2 = item.badge) === null || _item$badge2 === void 0 ? void 0 : _item$badge2.text) : undefined,
11646
11652
  onClick: () => item.callbackFn ? item.callbackFn() : void 0
11647
11653
  }, /*#__PURE__*/React.createElement(core.Text, {
@@ -11651,11 +11657,12 @@ const UserMenuDropdown = _ref => {
11651
11657
  });
11652
11658
  if (index) items.push(/*#__PURE__*/React.createElement(core.Divider, {
11653
11659
  key: "divider-".concat(index),
11654
- my: "xs"
11660
+ my: 2
11655
11661
  }));
11656
11662
  if (section !== null && section !== void 0 && section.title) items.push(/*#__PURE__*/React.createElement(core.Menu.Label, {
11657
- key: "label-".concat(index),
11658
- pt: "xs"
11663
+ fz: 10,
11664
+ fw: 600,
11665
+ key: "label-".concat(index)
11659
11666
  }, section.title));
11660
11667
  items.push(...sectionItems);
11661
11668
  return items;
@@ -11701,11 +11708,11 @@ const SideMenu = _ref => {
11701
11708
  onClick
11702
11709
  } = _ref;
11703
11710
  return /*#__PURE__*/React.createElement(React.Fragment, null, sidemenu.map(item => {
11704
- var _item$children;
11711
+ var _item$children, _item$children2;
11705
11712
  return /*#__PURE__*/React.createElement(core.NavLink, {
11706
- mt: "xs",
11713
+ className: "backoffice-sidemenu",
11714
+ mt: "sm",
11707
11715
  fw: 300,
11708
- c: color,
11709
11716
  style: {
11710
11717
  borderRadius: radius
11711
11718
  },
@@ -11715,8 +11722,9 @@ const SideMenu = _ref => {
11715
11722
  variant,
11716
11723
  onClick,
11717
11724
  leftSection: item.icon ? /*#__PURE__*/React.createElement(Icons, item.icon) : undefined,
11718
- label: item.label
11719
- }, (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length ? item.children.map(subitem => /*#__PURE__*/React.createElement(core.NavLink, {
11725
+ label: item.label,
11726
+ href: (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length ? undefined : item.href
11727
+ }, (_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length ? item.children.map(subitem => /*#__PURE__*/React.createElement(core.NavLink, {
11720
11728
  label: subitem.label,
11721
11729
  active: subitem.active,
11722
11730
  color,
@@ -11376,15 +11376,15 @@ const Icons = _ref => {
11376
11376
  let {
11377
11377
  name = "Home",
11378
11378
  size = 16,
11379
+ variant = "Linear",
11379
11380
  stroke = 1,
11380
- variant = "Outline",
11381
11381
  color
11382
11382
  } = _ref;
11383
11383
  const Element = IconSax[name];
11384
11384
  return /*#__PURE__*/React.createElement(Element, {
11385
- size: size,
11386
- variant: variant,
11387
- color: color,
11385
+ size,
11386
+ color,
11387
+ variant,
11388
11388
  style: {
11389
11389
  strokeWidth: stroke
11390
11390
  }
@@ -11590,14 +11590,16 @@ const UserMenuTarget = _ref => {
11590
11590
  }), /*#__PURE__*/React.createElement(Stack, {
11591
11591
  gap: 0,
11592
11592
  align: "flex-start",
11593
- visibleFrom: "md"
11593
+ visibleFrom: "md",
11594
+ fw: 300
11594
11595
  }, /*#__PURE__*/React.createElement(Text, {
11596
+ fw: 300,
11595
11597
  size: "sm"
11596
11598
  }, name), /*#__PURE__*/React.createElement(Text, {
11597
11599
  c: "dimmed",
11598
11600
  size: "xs"
11599
11601
  }, username)), /*#__PURE__*/React.createElement(Icons, {
11600
- name: "ArrowRight2",
11602
+ name: "ArrowDown2",
11601
11603
  size: 12
11602
11604
  }))));
11603
11605
  };
@@ -11615,12 +11617,16 @@ const UserMenuDropdown = _ref => {
11615
11617
  c: section === null || section === void 0 ? void 0 : section.color,
11616
11618
  key: "menu-item-".concat(key),
11617
11619
  h: height,
11618
- leftSection: /*#__PURE__*/React.createElement(Icons, item.icon),
11620
+ leftSection: /*#__PURE__*/React.createElement(Icons, _extends({}, item.icon, {
11621
+ stroke: 0.5
11622
+ })),
11619
11623
  rightSection: item !== null && item !== void 0 && item.disclosure ? /*#__PURE__*/React.createElement(Icons, {
11620
11624
  name: "ArrowRight2",
11621
- size: 12
11625
+ size: 12,
11626
+ stroke: 0.5
11622
11627
  }) : item.badge ? /*#__PURE__*/React.createElement(Badge, {
11623
- color: item === null || item === void 0 || (_item$badge = item.badge) === null || _item$badge === void 0 ? void 0 : _item$badge.color
11628
+ color: item === null || item === void 0 || (_item$badge = item.badge) === null || _item$badge === void 0 ? void 0 : _item$badge.color,
11629
+ size: "sm"
11624
11630
  }, item === null || item === void 0 || (_item$badge2 = item.badge) === null || _item$badge2 === void 0 ? void 0 : _item$badge2.text) : undefined,
11625
11631
  onClick: () => item.callbackFn ? item.callbackFn() : void 0
11626
11632
  }, /*#__PURE__*/React.createElement(Text, {
@@ -11630,11 +11636,12 @@ const UserMenuDropdown = _ref => {
11630
11636
  });
11631
11637
  if (index) items.push(/*#__PURE__*/React.createElement(Divider, {
11632
11638
  key: "divider-".concat(index),
11633
- my: "xs"
11639
+ my: 2
11634
11640
  }));
11635
11641
  if (section !== null && section !== void 0 && section.title) items.push(/*#__PURE__*/React.createElement(Menu.Label, {
11636
- key: "label-".concat(index),
11637
- pt: "xs"
11642
+ fz: 10,
11643
+ fw: 600,
11644
+ key: "label-".concat(index)
11638
11645
  }, section.title));
11639
11646
  items.push(...sectionItems);
11640
11647
  return items;
@@ -11680,11 +11687,11 @@ const SideMenu = _ref => {
11680
11687
  onClick
11681
11688
  } = _ref;
11682
11689
  return /*#__PURE__*/React.createElement(React.Fragment, null, sidemenu.map(item => {
11683
- var _item$children;
11690
+ var _item$children, _item$children2;
11684
11691
  return /*#__PURE__*/React.createElement(NavLink, {
11685
- mt: "xs",
11692
+ className: "backoffice-sidemenu",
11693
+ mt: "sm",
11686
11694
  fw: 300,
11687
- c: color,
11688
11695
  style: {
11689
11696
  borderRadius: radius
11690
11697
  },
@@ -11694,8 +11701,9 @@ const SideMenu = _ref => {
11694
11701
  variant,
11695
11702
  onClick,
11696
11703
  leftSection: item.icon ? /*#__PURE__*/React.createElement(Icons, item.icon) : undefined,
11697
- label: item.label
11698
- }, (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length ? item.children.map(subitem => /*#__PURE__*/React.createElement(NavLink, {
11704
+ label: item.label,
11705
+ href: (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length ? undefined : item.href
11706
+ }, (_item$children2 = item.children) !== null && _item$children2 !== void 0 && _item$children2.length ? item.children.map(subitem => /*#__PURE__*/React.createElement(NavLink, {
11699
11707
  label: subitem.label,
11700
11708
  active: subitem.active,
11701
11709
  color,
package/build/styles.css CHANGED
@@ -1 +1 @@
1
- svg>path{stroke-width:inherit}
1
+ svg>path{stroke-width:inherit}.backoffice-sidemenu.mantine-NavLink-root{padding:.25rem}.backoffice-sidemenu.mantine-NavLink-root[data-active] .mantine-NavLink-section:first-child{background:var(--mantine-color-adiba-4)}.backoffice-sidemenu.mantine-NavLink-root .mantine-NavLink-section:first-child{border-radius:9999px;display:flex;height:2rem;width:2rem}
@@ -3,6 +3,6 @@ export interface IconsProps {
3
3
  name: keyof typeof IconSax;
4
4
  size?: number;
5
5
  color?: string;
6
- stroke?: number | string;
6
+ stroke?: string | number;
7
7
  variant?: "Linear" | "Outline" | "Broken" | "Bold" | "Bulk" | "TwoTone";
8
8
  }
@@ -1,3 +1,4 @@
1
1
  import React from "react";
2
2
  import { SideMenuProps } from "./Side.types";
3
+ import './Side.css';
3
4
  export declare const SideMenu: React.FC<SideMenuProps>;
@@ -10,6 +10,7 @@ export interface SideMenuProps {
10
10
  export interface SideMenuItemProps {
11
11
  active?: boolean;
12
12
  id: string;
13
+ href?: string;
13
14
  icon?: IconsProps;
14
15
  label: string;
15
16
  variant?: "filled" | "light" | "subtle";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adiba-banking-cloud/backoffice",
3
3
  "author": "TUROG Technologies",
4
- "version": "0.0.12",
4
+ "version": "0.0.14",
5
5
  "description": "An ADIBA component library for backoffice and dashboard applications",
6
6
  "license": "ISC",
7
7
  "main": "build/index.cjs.js",