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

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
- import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, FormControl, FormLabel as FormLabel$1, InputRightElement, FormHelperText, FormErrorMessage, theme as theme$1, InputLeftAddon, InputLeftElement, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Badge, ModalBody as ModalBody$1, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, Icon, Portal, Link, forwardRef as forwardRef$1, Button as Button$1, VisuallyHidden, Select as Select$1, useTab, useMultiStyleConfig, TabList as TabList$1, TabPanel as TabPanel$1, Stack, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, extendTheme } from '@chakra-ui/react';
1
+ import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, FormControl, FormLabel as FormLabel$1, InputRightElement, FormHelperText, FormErrorMessage, theme as theme$1, InputLeftAddon, InputLeftElement, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Badge, ModalBody as ModalBody$1, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, createIcon, Icon, Portal, Link, forwardRef as forwardRef$1, Button as Button$1, VisuallyHidden, Select as Select$1, useTab, useMultiStyleConfig, TabList as TabList$1, TabPanel as TabPanel$1, Stack, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, extendTheme } from '@chakra-ui/react';
2
2
  export { AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, Modal, ModalContent, ModalContextProvider, ModalFocusScope, ModalOverlay, TabIndicator, TabPanels, Tabs, TabsDescendantsProvider, TabsProvider, useDrawerContext, useModal, useModalContext, useModalStyles, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles } from '@chakra-ui/react';
3
3
  import React__default, { createElement, useRef, useEffect, useState, useMemo, Fragment, forwardRef, useCallback, createContext, useContext } from 'react';
4
- import { FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiChevronDown } from 'react-icons/fi';
4
+ import { FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiShoppingBag, FiShoppingCart, FiRepeat, FiBox, FiLayers, FiDollarSign, FiUsers, FiRotateCcw, FiSettings, FiLayout, FiGift, FiChevronDown } from 'react-icons/fi';
5
5
  import { ChevronUpIcon, ChevronDownIcon, UpDownIcon, ArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, ArrowRightIcon } from '@chakra-ui/icons';
6
6
  import { css, Global } from '@emotion/react';
7
7
  import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
@@ -2001,6 +2001,28 @@ const ModalHeader = /*#__PURE__*/forwardRef(({
2001
2001
  }, rest), children);
2002
2002
  });
2003
2003
 
2004
+ const CustomerIcon = /*#__PURE__*/createIcon({
2005
+ displayName: 'CustomerIcon',
2006
+ viewBox: '0 0 16 16',
2007
+ path: [/*#__PURE__*/React__default.createElement("path", {
2008
+ fill: "currentColor",
2009
+ fillRule: "inherit",
2010
+ 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",
2011
+ clipRule: "inherit"
2012
+ }), /*#__PURE__*/React__default.createElement("path", {
2013
+ fill: "currentColor",
2014
+ 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"
2015
+ }), /*#__PURE__*/React__default.createElement("path", {
2016
+ fill: "currentColor",
2017
+ fillRule: "inherit",
2018
+ 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",
2019
+ clipRule: "inherit"
2020
+ })]
2021
+ });
2022
+
2023
+ /* eslint-disable import/prefer-default-export */
2024
+ const mappingIcon = /*#__PURE__*/new Map([['Order', FiShoppingBag], ['Fulfillment', FiShoppingCart], ['Transfer Stock', FiRepeat], ['Stock', FiBox], ['Product Database', FiLayers], ['Purchasing', FiDollarSign], ['Reseller', FiUsers], ['Retur', FiRotateCcw], ['Other', FiSettings], ['Content', FiLayout], ['Voucher', FiGift], ['Customer', CustomerIcon]]);
2025
+
2004
2026
  /* eslint-disable react-hooks/rules-of-hooks */
2005
2027
  const Navigation = ({
2006
2028
  navigations,
@@ -2040,7 +2062,7 @@ const Navigation = ({
2040
2062
  color: isActive ? 'white' : 'inherit',
2041
2063
  p: 2
2042
2064
  }, /*#__PURE__*/createElement(Icon, {
2043
- as: navigation.icon,
2065
+ as: mappingIcon.get(navigation.title),
2044
2066
  mr: 2
2045
2067
  }), /*#__PURE__*/createElement(Text, {
2046
2068
  whiteSpace: "nowrap",
@@ -2060,8 +2082,7 @@ const Navigation = ({
2060
2082
  }, navigation.children.map(({
2061
2083
  title,
2062
2084
  navHost,
2063
- navLink,
2064
- icon
2085
+ navLink
2065
2086
  }) => {
2066
2087
  const link = navHost ? `${navHost}${navLink}` : navLink;
2067
2088
  const isLocalLink = host === navHost;
@@ -2098,7 +2119,7 @@ const Navigation = ({
2098
2119
  px: 6,
2099
2120
  py: 4
2100
2121
  }, /*#__PURE__*/createElement(Icon, {
2101
- as: icon,
2122
+ as: mappingIcon.get(navigation.title),
2102
2123
  mr: 3
2103
2124
  }), /*#__PURE__*/createElement(Text, {
2104
2125
  fontSize: "text.sm"