@ctlyst.id/internal-ui 1.0.4-canary.2 → 1.0.4-canary.3

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.
@@ -0,0 +1,2 @@
1
+ declare const CustomerIcon: import("@chakra-ui/system/dist/system.types").ComponentWithAs<"svg", import("@chakra-ui/icon/dist/icon").IconProps>;
2
+ export default CustomerIcon;
@@ -0,0 +1,2 @@
1
+ import type { IconType } from 'react-icons/lib';
2
+ export declare const mappingIcon: Map<string, IconType>;
@@ -1,7 +1,7 @@
1
1
  import type { IconType } from 'react-icons/lib';
2
2
  export declare type NavigationLink = {
3
3
  title: string;
4
- icon: IconType;
4
+ icon?: IconType;
5
5
  navLink?: string;
6
6
  navHost?: string;
7
7
  children?: Omit<NavigationLink, 'children'>[];
@@ -2007,6 +2007,28 @@ const ModalHeader = /*#__PURE__*/React.forwardRef(({
2007
2007
  }, rest), children);
2008
2008
  });
2009
2009
 
2010
+ const CustomerIcon = /*#__PURE__*/react.createIcon({
2011
+ displayName: 'CustomerIcon',
2012
+ viewBox: '0 0 16 16',
2013
+ path: [/*#__PURE__*/React__default.createElement("path", {
2014
+ fill: "currentColor",
2015
+ fillRule: "inherit",
2016
+ d: "M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM.667 8a7.333 7.333 0 1 1 14.666 0A7.333 7.333 0 0 1 .667 8Z",
2017
+ clipRule: "inherit"
2018
+ }), /*#__PURE__*/React__default.createElement("path", {
2019
+ fill: "currentColor",
2020
+ d: "M12.416 12.698a1.997 1.997 0 0 0-1.75-1.031H5.334a2 2 0 0 0-1.864 1.277 7.722 7.722 0 0 1-.943-1.074 3.329 3.329 0 0 1 2.807-1.537h5.334a3.333 3.333 0 0 1 2.703 1.384c-.275.325-.594.66-.954.98Z"
2021
+ }), /*#__PURE__*/React__default.createElement("path", {
2022
+ fill: "currentColor",
2023
+ fillRule: "inherit",
2024
+ d: "M8 5.333A1.333 1.333 0 1 0 8 8a1.333 1.333 0 0 0 0-2.667ZM5.333 6.667a2.667 2.667 0 1 1 5.334 0 2.667 2.667 0 0 1-5.334 0Z",
2025
+ clipRule: "inherit"
2026
+ })]
2027
+ });
2028
+
2029
+ /* eslint-disable import/prefer-default-export */
2030
+ const mappingIcon = /*#__PURE__*/new Map([['Order', fi.FiShoppingBag], ['Fulfillment', fi.FiShoppingCart], ['Transfer Stock', fi.FiRepeat], ['Stock', fi.FiBox], ['Product Database', fi.FiLayers], ['Purchasing', fi.FiDollarSign], ['Reseller', fi.FiUsers], ['Retur', fi.FiRotateCcw], ['Other', fi.FiSettings], ['Content', fi.FiLayout], ['Voucher', fi.FiGift], ['Customer', CustomerIcon]]);
2031
+
2010
2032
  /* eslint-disable react-hooks/rules-of-hooks */
2011
2033
  const Navigation = ({
2012
2034
  navigations,
@@ -2046,7 +2068,7 @@ const Navigation = ({
2046
2068
  color: isActive ? 'white' : 'inherit',
2047
2069
  p: 2
2048
2070
  }, /*#__PURE__*/React.createElement(react.Icon, {
2049
- as: navigation.icon,
2071
+ as: mappingIcon.get(navigation.title),
2050
2072
  mr: 2
2051
2073
  }), /*#__PURE__*/React.createElement(react.Text, {
2052
2074
  whiteSpace: "nowrap",
@@ -2066,8 +2088,7 @@ const Navigation = ({
2066
2088
  }, navigation.children.map(({
2067
2089
  title,
2068
2090
  navHost,
2069
- navLink,
2070
- icon
2091
+ navLink
2071
2092
  }) => {
2072
2093
  const link = navHost ? `${navHost}${navLink}` : navLink;
2073
2094
  const isLocalLink = host === navHost;
@@ -2104,7 +2125,7 @@ const Navigation = ({
2104
2125
  px: 6,
2105
2126
  py: 4
2106
2127
  }, /*#__PURE__*/React.createElement(react.Icon, {
2107
- as: icon,
2128
+ as: mappingIcon.get(navigation.title),
2108
2129
  mr: 3
2109
2130
  }), /*#__PURE__*/React.createElement(react.Text, {
2110
2131
  fontSize: "text.sm"