@ctlyst.id/internal-ui 2.0.5 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,8 +4,8 @@ import React__default, { createElement, forwardRef as forwardRef$2, useRef, useE
4
4
  import { createContext } from '@chakra-ui/react-context';
5
5
  import { CheckCircle, Info, AlertTriangle, Close, EyeOff, Eye, Rating as Rating$1, Check } from '@ctlyst.id/internal-icon';
6
6
  import { cx as cx$1 } from '@chakra-ui/utils';
7
- import { forwardRef as forwardRef$1, useStyleConfig, Box, Button as Button$2, Badge as Badge$2, useToken, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, defineStyle, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, theme as theme$1, InputLeftAddon, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Container, Grid, Wrap, ModalBody as ModalBody$1, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, createIcon, Icon, Portal, Link, VisuallyHidden, Select as Select$1, Radio as Radio$1, RadioGroup, useMultiStyleConfig as useMultiStyleConfig$1, omitThemingProps as omitThemingProps$1, useCheckbox, chakra as chakra$1, useTab, TabList as TabList$1, TabPanel as TabPanel$1, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, defineStyleConfig as defineStyleConfig$1, extendTheme } from '@chakra-ui/react';
8
- 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, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, 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';
7
+ import { forwardRef as forwardRef$1, useStyleConfig, Box, Button as Button$2, Badge as Badge$2, useToken, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, defineStyle, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, theme as theme$1, InputLeftAddon, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, ButtonGroup, Container, Grid, List, Wrap, ModalBody as ModalBody$1, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, createIcon, Icon, Portal, Link, VisuallyHidden, Select as Select$1, Radio as Radio$1, RadioGroup, useMultiStyleConfig as useMultiStyleConfig$1, omitThemingProps as omitThemingProps$1, useCheckbox, chakra as chakra$1, useTab, TabList as TabList$1, TabPanel as TabPanel$1, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, defineStyleConfig as defineStyleConfig$1, extendTheme } from '@chakra-ui/react';
8
+ 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, HStack, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, ListItem, Modal, ModalContent, ModalContextProvider, ModalFocusScope, ModalOverlay, TabIndicator, TabPanels, Tabs, TabsDescendantsProvider, TabsProvider, VStack, useDrawerContext, useModal, useModalContext, useModalStyles, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles } from '@chakra-ui/react';
9
9
  import { FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiShoppingBag, FiShoppingCart, FiRepeat, FiBox, FiLayers, FiDollarSign, FiUsers, FiRotateCcw, FiSettings, FiLayout, FiGift, FiChevronDown } from 'react-icons/fi';
10
10
  import { ChevronUpIcon, ChevronDownIcon, UpDownIcon, ArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, ArrowRightIcon } from '@chakra-ui/icons';
11
11
  import { css, Global, keyframes } from '@emotion/react';
@@ -2144,20 +2144,26 @@ const InputAddonLeft = ({
2144
2144
  children
2145
2145
  }) => {
2146
2146
  return /*#__PURE__*/React__default.createElement(InputLeftAddon, {
2147
- borderLeftRadius: "md",
2148
2147
  backgroundColor: "neutral.200",
2149
2148
  px: 3,
2150
- py: 2.5
2149
+ py: 2.5,
2150
+ style: {
2151
+ border: 0,
2152
+ marginInlineEnd: 0
2153
+ }
2151
2154
  }, children);
2152
2155
  };
2153
2156
  const InputAddonRight = ({
2154
2157
  children
2155
2158
  }) => {
2156
2159
  return /*#__PURE__*/React__default.createElement(InputRightAddon, {
2157
- borderRightRadius: "md",
2158
2160
  backgroundColor: "neutral.200",
2159
2161
  px: 3,
2160
- py: 2.5
2162
+ py: 2.5,
2163
+ style: {
2164
+ border: 0,
2165
+ marginInlineStart: 0
2166
+ }
2161
2167
  }, children);
2162
2168
  };
2163
2169
 
@@ -2343,7 +2349,8 @@ const Profile = ({
2343
2349
  }, (data === null || data === void 0 ? void 0 : data.office) && /*#__PURE__*/createElement(Text, {
2344
2350
  color: "neutral.700",
2345
2351
  display: "inline-block",
2346
- mr: 0.5
2352
+ mr: 0.5,
2353
+ as: "span"
2347
2354
  }, data.office, " |", ' '), data === null || data === void 0 ? void 0 : data.userRole)), /*#__PURE__*/createElement(PopoverTrigger, null, /*#__PURE__*/createElement(Avatar, {
2348
2355
  size: 'sm',
2349
2356
  bg: "primary.500",
@@ -3151,9 +3158,6 @@ function SelectCreatable({
3151
3158
  */
3152
3159
  const Switch = /*#__PURE__*/forwardRef$1(function Switch(props, ref) {
3153
3160
  const styles = useMultiStyleConfig$1('Switch', props);
3154
- const {
3155
- size = 'md'
3156
- } = props;
3157
3161
  const {
3158
3162
  spacing = '0.5rem',
3159
3163
  children,
@@ -3215,10 +3219,10 @@ const Switch = /*#__PURE__*/forwardRef$1(function Switch(props, ref) {
3215
3219
  transform: "translate(-50%, -50%)"
3216
3220
  }, /*#__PURE__*/React__default.createElement(Check, {
3217
3221
  color: "white",
3218
- size: getIconSize(size)
3222
+ size: getIconSize(props.size)
3219
3223
  }), /*#__PURE__*/React__default.createElement(Close, {
3220
3224
  color: state.isDisabled ? 'neutral.600' : 'neutral.900',
3221
- size: getIconSize(size)
3225
+ size: getIconSize(props.size)
3222
3226
  })), /*#__PURE__*/React__default.createElement(chakra$1.span, {
3223
3227
  __css: styles.thumb,
3224
3228
  className: "chakra-switch__thumb",
@@ -3231,6 +3235,9 @@ const Switch = /*#__PURE__*/forwardRef$1(function Switch(props, ref) {
3231
3235
  __css: labelStyles
3232
3236
  }), children));
3233
3237
  });
3238
+ Switch.defaultProps = {
3239
+ size: 'sm'
3240
+ };
3234
3241
 
3235
3242
  const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
3236
3243
  var _props$leftAddon, _props$rightAddon;
@@ -3496,6 +3503,10 @@ const Badge$1 = {
3496
3503
  color: 'white'
3497
3504
  },
3498
3505
  'neutral-solid': {
3506
+ bg: 'neutral.900',
3507
+ color: 'white'
3508
+ },
3509
+ 'disabled-solid': {
3499
3510
  bg: 'neutral.600',
3500
3511
  color: 'white'
3501
3512
  },
@@ -3520,7 +3531,11 @@ const Badge$1 = {
3520
3531
  color: 'danger.500'
3521
3532
  },
3522
3533
  'neutral-light': {
3523
- bg: 'neutral.100',
3534
+ bg: 'neutral.200',
3535
+ color: 'neutral.900'
3536
+ },
3537
+ 'disabled-light': {
3538
+ bg: 'neutral.200',
3524
3539
  color: 'neutral.600'
3525
3540
  }
3526
3541
  },
@@ -3943,10 +3958,13 @@ const Chips = /*#__PURE__*/defineStyleConfig({
3943
3958
  },
3944
3959
  sizes: {
3945
3960
  sm: {
3946
- fontSize: '12px'
3961
+ fontSize: '12px',
3962
+ lineHeight: 4
3947
3963
  },
3948
3964
  md: {
3949
- fontSize: '14px'
3965
+ fontSize: '14px',
3966
+ paddingY: 2,
3967
+ lineHeight: 5
3950
3968
  }
3951
3969
  },
3952
3970
  defaultProps: {
@@ -3956,6 +3974,7 @@ const Chips = /*#__PURE__*/defineStyleConfig({
3956
3974
 
3957
3975
  const baseStyle$2 = /*#__PURE__*/defineStyle$1({
3958
3976
  fontSize: 'field.sm',
3977
+ fontWeight: 'normal',
3959
3978
  marginEnd: 1,
3960
3979
  mb: 1
3961
3980
  });
@@ -4005,7 +4024,7 @@ const size = {
4005
4024
  }),
4006
4025
  sm: /*#__PURE__*/defineStyle$1({
4007
4026
  fontSize: 'text.sm',
4008
- h: 9.5,
4027
+ h: 9,
4009
4028
  borderRadius: 'md'
4010
4029
  })
4011
4030
  };
@@ -4501,5 +4520,5 @@ const Provider = ({
4501
4520
  };
4502
4521
  Provider.displayName = 'Provider';
4503
4522
 
4504
- export { Alert, AlertAction, AlertClose, AlertDescription, AlertIcon, AlertTitle, Badge, Box, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputAddonLeft, InputAddonRight, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Rating, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Stack, Switch, Tab, TabList, TabPanel, Text, TextareaField, Uploader, Wrap, foundations, theme, useAlertStyles, useInternalUI };
4523
+ export { Alert, AlertAction, AlertClose, AlertDescription, AlertIcon, AlertTitle, Badge, Box, BreadCrumb, Button, ButtonGroup, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputAddonLeft, InputAddonRight, InputField, List, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Rating, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Stack, Switch, Tab, TabList, TabPanel, Text, TextareaField, Uploader, Wrap, foundations, theme, useAlertStyles, useInternalUI };
4505
4524
  //# sourceMappingURL=internal-ui.esm.js.map