@ctlyst.id/internal-ui 1.0.4-canary.1 → 1.0.4-canary.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/navigation/components/customer-icon.d.ts +2 -0
- package/dist/components/navigation/components/mapping-icon.d.ts +2 -0
- package/dist/components/navigation/types.d.ts +1 -1
- package/dist/internal-ui.cjs.development.js +26 -5
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +2 -2
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +28 -7
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +2 -2
@@ -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.
|
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;
|
@@ -2076,7 +2097,6 @@ const Navigation = ({
|
|
2076
2097
|
as: isLocalLink ? as : undefined,
|
2077
2098
|
key: title,
|
2078
2099
|
href: link,
|
2079
|
-
cursor: "pointer",
|
2080
2100
|
_hover: {
|
2081
2101
|
textDecoration: 'none'
|
2082
2102
|
}
|
@@ -2084,6 +2104,7 @@ const Navigation = ({
|
|
2084
2104
|
display: "flex",
|
2085
2105
|
position: "relative",
|
2086
2106
|
alignItems: "center",
|
2107
|
+
cursor: "pointer",
|
2087
2108
|
transition: "padding 0.35s ease 0s",
|
2088
2109
|
_hover: {
|
2089
2110
|
backgroundColor: react.useColorModeValue('dove-gray.50', 'mirage.900'),
|
@@ -2104,7 +2125,7 @@ const Navigation = ({
|
|
2104
2125
|
px: 6,
|
2105
2126
|
py: 4
|
2106
2127
|
}, /*#__PURE__*/React.createElement(react.Icon, {
|
2107
|
-
as:
|
2128
|
+
as: mappingIcon.get(navigation.title),
|
2108
2129
|
mr: 3
|
2109
2130
|
}), /*#__PURE__*/React.createElement(react.Text, {
|
2110
2131
|
fontSize: "text.sm"
|