@ctlyst.id/internal-ui 2.0.0-canary.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/dist/components/alert/__stories__/alert.stories.d.ts +14 -0
  2. package/dist/components/alert/components/alert-action.d.ts +6 -0
  3. package/dist/components/alert/components/alert-close.d.ts +6 -0
  4. package/dist/components/alert/components/alert-context.d.ts +29 -0
  5. package/dist/components/alert/components/alert-description.d.ts +3 -0
  6. package/dist/components/alert/components/alert-icon.d.ts +6 -0
  7. package/dist/components/alert/components/alert-title.d.ts +3 -0
  8. package/dist/components/alert/components/alert.d.ts +25 -0
  9. package/dist/components/alert/components/icons.d.ts +3 -0
  10. package/dist/components/alert/components/index.d.ts +14 -0
  11. package/dist/components/alert/index.d.ts +1 -0
  12. package/dist/components/{base/__stories__/button.stories.d.ts → badge/__stories__/badge.stories.d.ts} +1 -1
  13. package/dist/components/badge/components/badge.d.ts +11 -0
  14. package/dist/components/badge/index.d.ts +2 -0
  15. package/dist/components/button/__stories__/button.stories.d.ts +14 -0
  16. package/dist/components/button/components/button.d.ts +4 -0
  17. package/dist/components/button/index.d.ts +2 -0
  18. package/dist/components/card/__stories__/card.stories.d.ts +11 -0
  19. package/dist/components/card/components/card.d.ts +8 -0
  20. package/dist/components/card/index.d.ts +2 -0
  21. package/dist/components/checkbox/__stories__/checkbox-group.stories.d.ts +13 -0
  22. package/dist/components/checkbox/components/checkbox-group.d.ts +18 -0
  23. package/dist/components/checkbox/index.d.ts +2 -0
  24. package/dist/components/chips/__stories__/chips.stories.d.ts +12 -0
  25. package/dist/components/chips/components/chips.d.ts +19 -0
  26. package/dist/components/chips/index.d.ts +2 -0
  27. package/dist/components/field/components/field.d.ts +0 -1
  28. package/dist/components/field/index.d.ts +0 -2
  29. package/dist/components/form/__stories__/input.stories.d.ts +14 -0
  30. package/dist/components/form/components/input-addon.d.ts +7 -0
  31. package/dist/components/{field → form}/components/input-field.d.ts +4 -1
  32. package/dist/components/form/index.d.ts +2 -0
  33. package/dist/components/form/styles/input-field.d.ts +4 -0
  34. package/dist/components/index.d.ts +7 -0
  35. package/dist/components/layouting/components/box.d.ts +4 -0
  36. package/dist/components/layouting/components/container.d.ts +4 -0
  37. package/dist/components/layouting/components/flex.d.ts +4 -0
  38. package/dist/components/layouting/components/grid.d.ts +4 -0
  39. package/dist/components/layouting/components/stack.d.ts +4 -0
  40. package/dist/components/layouting/components/wrap.d.ts +4 -0
  41. package/dist/components/layouting/index.d.ts +12 -0
  42. package/dist/components/radio/__stories__/radio-group.stories.d.ts +13 -0
  43. package/dist/components/radio/__stories__/radio.stories.d.ts +12 -0
  44. package/dist/components/radio/components/radio-group.d.ts +17 -0
  45. package/dist/components/radio/components/radio.d.ts +16 -0
  46. package/dist/components/radio/index.d.ts +4 -0
  47. package/dist/components/rating/__stories__/rating.stories.d.ts +10 -0
  48. package/dist/components/rating/components/rating.d.ts +6 -0
  49. package/dist/components/rating/index.d.ts +2 -0
  50. package/dist/components/switch/__stories__/switch.stories.d.ts +13 -0
  51. package/dist/components/switch/components/switch.d.ts +18 -0
  52. package/dist/components/switch/index.d.ts +2 -0
  53. package/dist/components/text/components/text.d.ts +4 -0
  54. package/dist/components/text/index.d.ts +2 -0
  55. package/dist/config/theme/components/alert.d.ts +79 -0
  56. package/dist/config/theme/components/card.d.ts +18 -0
  57. package/dist/config/theme/components/checkbox.d.ts +2 -1
  58. package/dist/config/theme/components/chips.d.ts +30 -0
  59. package/dist/config/theme/components/index.d.ts +3 -0
  60. package/dist/config/theme/components/input.d.ts +8 -21
  61. package/dist/config/theme/components/radio.d.ts +98 -2
  62. package/dist/config/theme/components/switch.d.ts +43 -9
  63. package/dist/config/theme/themeConfiguration.d.ts +4 -2
  64. package/dist/internal-ui.cjs.development.js +1088 -316
  65. package/dist/internal-ui.cjs.development.js.map +1 -1
  66. package/dist/internal-ui.cjs.production.min.js +9 -9
  67. package/dist/internal-ui.cjs.production.min.js.map +1 -1
  68. package/dist/internal-ui.esm.js +1073 -316
  69. package/dist/internal-ui.esm.js.map +1 -1
  70. package/dist/provider/components/provider.d.ts +0 -1
  71. package/package.json +12 -11
  72. package/dist/components/base/__stories__/input.stories.d.ts +0 -16
  73. package/dist/components/base/__stories__/radio.stories.d.ts +0 -15
@@ -1,6 +1,6 @@
1
- import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Checkbox as Checkbox$1, 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, forwardRef, useStyleConfig, 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, Button as Button$1, VisuallyHidden, Select as Select$1, useTab, useMultiStyleConfig, TabList as TabList$1, TabPanel as TabPanel$1, Stack, Heading, createMultiStyleConfigHelpers, defineStyleConfig as defineStyleConfig$1, defineStyle as defineStyle$1, extendTheme } from '@chakra-ui/react';
1
+ import { Badge as Badge$1, useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, forwardRef, useStyleConfig, Button as Button$2, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, theme as theme$1, defineStyle, 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, omitThemingProps, useCheckbox, chakra, useTab, TabList as TabList$1, TabPanel as TabPanel$1, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, defineStyleConfig as defineStyleConfig$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
- import React__default, { createElement, useRef, useEffect, useState, useMemo, Fragment, forwardRef as forwardRef$1, useCallback, createContext, useContext } from 'react';
3
+ import React__default, { createElement, forwardRef as forwardRef$1, useRef, useEffect, useState, useMemo, Fragment, useCallback, createContext, useContext } from 'react';
4
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, keyframes } from '@emotion/react';
@@ -9,17 +9,41 @@ import classnames from 'classnames';
9
9
  import ReactDatePicker from 'react-datepicker';
10
10
  import { useColorMode } from '@chakra-ui/system';
11
11
  import styled from '@emotion/styled';
12
+ import { Close, EyeOff, Eye, Check } from '@ctlyst.id/internal-icon';
12
13
  import ReactSelect from 'react-select';
13
14
  import { AsyncPaginate } from 'react-select-async-paginate';
14
15
  import ReactSelectAsyncCreatable from 'react-select/async-creatable';
15
16
  import ReactSelectCreatable from 'react-select/creatable';
17
+ import { cx, dataAttr } from '@chakra-ui/shared-utils';
16
18
  import { useDropzone } from 'react-dropzone';
17
- import { mode, getColor } from '@chakra-ui/theme-tools';
18
- import { checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy } from '@chakra-ui/anatomy';
19
- import { defineStyleConfig, defineStyle, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1 } from '@chakra-ui/styled-system';
20
- import '@fontsource/poppins';
19
+ import { alertAnatomy, checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy } from '@chakra-ui/anatomy';
20
+ import { createMultiStyleConfigHelpers, cssVar, defineStyleConfig, defineStyle as defineStyle$1 } from '@chakra-ui/styled-system';
21
+ import { transparentize, mode, calc, cssVar as cssVar$1 } from '@chakra-ui/theme-tools';
21
22
  import axios from 'axios';
22
23
 
24
+ const Badge = props => {
25
+ const {
26
+ children,
27
+ pill,
28
+ ...rest
29
+ } = props;
30
+ return /*#__PURE__*/React__default.createElement(Badge$1, Object.assign({
31
+ borderRadius: pill ? 10 : 4,
32
+ variant: "solid",
33
+ color: "white",
34
+ fontSize: "10px",
35
+ padding: "0 8px",
36
+ height: "18px",
37
+ display: "flex",
38
+ alignItems: "center",
39
+ justifyContent: "space-between",
40
+ textTransform: "none"
41
+ }, rest), children);
42
+ };
43
+ Badge.defaultProps = {
44
+ pill: false
45
+ };
46
+
23
47
  /* eslint-disable react-hooks/rules-of-hooks */
24
48
  const BreadCrumb = props => {
25
49
  const {
@@ -115,6 +139,57 @@ BreadCrumb.defaultProps = {
115
139
  spacing: 2
116
140
  };
117
141
 
142
+ const Loader = /*#__PURE__*/forwardRef((props, ref) => {
143
+ const styles = useStyleConfig('LoaderStyle', props);
144
+ return /*#__PURE__*/React__default.createElement(Box, {
145
+ ref: ref,
146
+ __css: styles
147
+ });
148
+ });
149
+
150
+ const Button = props => {
151
+ const {
152
+ children,
153
+ variant,
154
+ size,
155
+ ...rest
156
+ } = props;
157
+ const getLoaderSize = () => {
158
+ if (size === 'lg') return 'md';
159
+ if (size === 'md') return 'sm';
160
+ return 'xs';
161
+ };
162
+ const getLoaderColor = () => {
163
+ if (variant === 'primary' || variant === 'danger') return 'white';
164
+ if (variant === 'outline-danger') return 'danger';
165
+ return 'primary';
166
+ };
167
+ return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
168
+ size: size,
169
+ variant: variant,
170
+ spinner: /*#__PURE__*/React__default.createElement(Loader, {
171
+ size: getLoaderSize(),
172
+ color: getLoaderColor()
173
+ })
174
+ }, rest), children);
175
+ };
176
+
177
+ const CardCustom = /*#__PURE__*/forwardRef$1(({
178
+ children,
179
+ ...rest
180
+ }, ref) => {
181
+ const styles = useStyleConfig('Card', rest);
182
+ return /*#__PURE__*/React__default.createElement(Card, Object.assign({
183
+ __css: styles,
184
+ backgroundColor: "white.high",
185
+ ref: ref
186
+ }, rest), children);
187
+ });
188
+ CardCustom.defaultProps = {
189
+ withShadow: true,
190
+ isRounded: true
191
+ };
192
+
118
193
  function CheckboxComponent({
119
194
  isError = false,
120
195
  helpText = '',
@@ -130,12 +205,10 @@ function CheckboxComponent({
130
205
  variant: variant
131
206
  }, rest, {
132
207
  isDisabled: isDisabled
133
- })), children && /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
134
- ml: "8px"
135
- }, /*#__PURE__*/React__default.createElement(Text, {
208
+ }), children && /*#__PURE__*/React__default.createElement(Text, {
136
209
  textStyle: "text.sm",
137
210
  color: isDisabled ? 'black.low' : 'black.high'
138
- }, children)))), /*#__PURE__*/React__default.createElement(Box, {
211
+ }, children))), /*#__PURE__*/React__default.createElement(Box, {
139
212
  mt: "5px",
140
213
  ml: "24px"
141
214
  }, isError ? /*#__PURE__*/React__default.createElement(Text, {
@@ -143,7 +216,7 @@ function CheckboxComponent({
143
216
  color: "danger.500"
144
217
  }, errorText) : /*#__PURE__*/React__default.createElement(Text, {
145
218
  textStyle: "text.xs",
146
- color: isDisabled ? 'black.low' : 'black.medium'
219
+ color: "black.medium"
147
220
  }, helpText)));
148
221
  }
149
222
  CheckboxComponent.defaultProps = {
@@ -152,6 +225,95 @@ CheckboxComponent.defaultProps = {
152
225
  errorText: ''
153
226
  };
154
227
 
228
+ /* eslint-disable no-nested-ternary */
229
+ const Field = props => {
230
+ const {
231
+ label,
232
+ isError,
233
+ errorMessage,
234
+ leftHelperText,
235
+ rightHelperText,
236
+ isRequired,
237
+ children,
238
+ isSuccess
239
+ } = props;
240
+ const getHelperColor = () => {
241
+ if (isError) return 'danger.500';
242
+ if (isSuccess) return 'success.500';
243
+ return 'black.medium';
244
+ };
245
+ const getJustifyContentHelper = () => {
246
+ if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
247
+ return 'space-between';
248
+ };
249
+ const helperColor = getHelperColor();
250
+ const justifyHelper = getJustifyContentHelper();
251
+ return /*#__PURE__*/React__default.createElement(FormControl, {
252
+ isInvalid: isError
253
+ }, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
254
+ mb: 1,
255
+ fontSize: "text.sm",
256
+ requiredIndicator: undefined
257
+ }, isRequired && /*#__PURE__*/React__default.createElement(Box, {
258
+ as: "span",
259
+ color: "danger.500",
260
+ ml: 0,
261
+ mr: 1
262
+ }, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
263
+ display: "flex",
264
+ width: "full",
265
+ justifyContent: justifyHelper
266
+ }, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
267
+ fontSize: "text.xs",
268
+ color: helperColor,
269
+ mt: 1
270
+ }, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
271
+ fontSize: "text.xs",
272
+ color: "danger.500",
273
+ mt: 1
274
+ }, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
275
+ fontSize: "text.xs",
276
+ color: helperColor,
277
+ mt: 1
278
+ }, rightHelperText)));
279
+ };
280
+ Field.defaultProps = {
281
+ label: '',
282
+ isError: false,
283
+ isSuccess: false,
284
+ errorMessage: undefined,
285
+ leftHelperText: undefined,
286
+ rightHelperText: undefined,
287
+ isRequired: false
288
+ };
289
+
290
+ function CheckboxGroupComponent(props) {
291
+ const {
292
+ children,
293
+ label,
294
+ helpText,
295
+ isError,
296
+ errorMessage,
297
+ ...rest
298
+ } = props;
299
+ return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
300
+ label: label,
301
+ leftHelperText: helpText,
302
+ isError: isError,
303
+ errorMessage: errorMessage
304
+ }), /*#__PURE__*/React__default.createElement(Box, {
305
+ mt: "12px"
306
+ }, /*#__PURE__*/React__default.createElement(CheckboxGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
307
+ spacing: [1, '16px'],
308
+ direction: ['column', 'row']
309
+ }, children))));
310
+ }
311
+ CheckboxGroupComponent.defaultProps = {
312
+ helpText: '',
313
+ isError: false,
314
+ errorMessage: ''
315
+ };
316
+
155
317
  const IndeterminateCheckbox = ({
156
318
  indeterminate = false,
157
319
  ...rest
@@ -1748,69 +1910,60 @@ MultiDatePickerMonth.defaultProps = {
1748
1910
  isError: false
1749
1911
  };
1750
1912
 
1751
- /* eslint-disable no-nested-ternary */
1752
- const Field = props => {
1913
+ const getProperties = props => {
1753
1914
  const {
1754
- label,
1755
1915
  isError,
1756
- errorMessage,
1757
- leftHelperText,
1758
- rightHelperText,
1759
- isRequired,
1760
- children,
1761
- isSuccess,
1762
- isDisabled
1916
+ isDisabled,
1917
+ isSuccess
1763
1918
  } = props;
1764
- const getHelperColor = () => {
1765
- if (isError) return 'danger.500';
1766
- if (isSuccess) return 'success.500';
1767
- if (isDisabled) return 'black.low';
1768
- return 'black.medium';
1919
+ let outlineColor = 'neutral.400';
1920
+ let focusColor = 'primary.500';
1921
+ if (isError || isDisabled || isSuccess) {
1922
+ if (isError) outlineColor = 'danger.500';else if (isSuccess) outlineColor = 'success.500';
1923
+ focusColor = outlineColor;
1924
+ }
1925
+ return {
1926
+ outlineColor,
1927
+ focusColor
1769
1928
  };
1770
- const getJustifyContentHelper = () => {
1771
- if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
1772
- return 'space-between';
1929
+ };
1930
+ const getWrapperStyle = props => {
1931
+ const {
1932
+ outlineColor,
1933
+ focusColor
1934
+ } = getProperties(props);
1935
+ const style = {
1936
+ border: '1px solid',
1937
+ borderColor: outlineColor,
1938
+ borderRadius: 'md',
1939
+ transition: 'all 0.15s',
1940
+ boxShadow: 'none',
1941
+ _focusWithin: {
1942
+ borderColor: focusColor
1943
+ }
1773
1944
  };
1774
- const helperColor = getHelperColor();
1775
- const justifyHelper = getJustifyContentHelper();
1776
- return /*#__PURE__*/React__default.createElement(FormControl, {
1777
- isInvalid: isError
1778
- }, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
1779
- mb: 1,
1780
- fontSize: "text.sm",
1781
- requiredIndicator: undefined
1782
- }, isRequired && /*#__PURE__*/React__default.createElement(Box, {
1783
- as: "span",
1784
- color: "danger.500",
1785
- ml: 0,
1786
- mr: 1
1787
- }, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
1788
- display: "flex",
1789
- width: "full",
1790
- justifyContent: justifyHelper
1791
- }, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
1792
- fontSize: "text.xs",
1793
- color: helperColor,
1794
- mt: 1
1795
- }, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
1796
- fontSize: "text.xs",
1797
- color: "danger.500",
1798
- mt: 1
1799
- }, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
1800
- fontSize: "text.xs",
1801
- color: helperColor,
1802
- mt: 1
1803
- }, rightHelperText)));
1945
+ return defineStyle(style);
1804
1946
  };
1805
- Field.defaultProps = {
1806
- label: '',
1807
- isError: false,
1808
- isSuccess: false,
1809
- isDisabled: false,
1810
- errorMessage: undefined,
1811
- leftHelperText: undefined,
1812
- rightHelperText: undefined,
1813
- isRequired: false
1947
+
1948
+ const InputAddonLeft = ({
1949
+ children
1950
+ }) => {
1951
+ return /*#__PURE__*/React__default.createElement(Box, {
1952
+ borderLeftRadius: "md",
1953
+ backgroundColor: "neutral.200",
1954
+ px: 3,
1955
+ py: 2.5
1956
+ }, children);
1957
+ };
1958
+ const InputAddonRight = ({
1959
+ children
1960
+ }) => {
1961
+ return /*#__PURE__*/React__default.createElement(Box, {
1962
+ borderRightRadius: "md",
1963
+ backgroundColor: "neutral.200",
1964
+ px: 3,
1965
+ py: 2.5
1966
+ }, children);
1814
1967
  };
1815
1968
 
1816
1969
  const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
@@ -1830,40 +1983,99 @@ const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1830
1983
  errorMessage,
1831
1984
  leftHelperText,
1832
1985
  rightHelperText,
1986
+ withClear,
1987
+ onClear,
1988
+ isLoading,
1833
1989
  ...inputProps
1834
1990
  } = props;
1991
+ const wrapperStyle = getWrapperStyle(props);
1992
+ const [isShowPassword, setIsShowPassword] = useState(false);
1993
+ const inputType = useMemo(() => {
1994
+ return type === 'password' && isShowPassword ? 'text' : type;
1995
+ }, [isShowPassword, type]);
1996
+ const fontSize = useMemo(() => {
1997
+ if (type === 'password') {
1998
+ if (!isShowPassword && value) return 'text.xl';
1999
+ }
2000
+ return 'text.sm';
2001
+ }, [isShowPassword, type, value]);
2002
+ const iconColor = useMemo(() => {
2003
+ return isDisabled ? 'black.low' : 'black.medium';
2004
+ }, [isDisabled]);
1835
2005
  return /*#__PURE__*/React__default.createElement(Field, {
1836
2006
  label: label,
1837
2007
  isSuccess: isSuccess,
1838
- isDisabled: isDisabled,
1839
2008
  isError: isError,
1840
2009
  errorMessage: errorMessage,
1841
2010
  leftHelperText: leftHelperText,
1842
2011
  rightHelperText: rightHelperText,
1843
2012
  isRequired: isRequired
2013
+ }, /*#__PURE__*/React__default.createElement(Box, {
2014
+ __css: wrapperStyle
1844
2015
  }, /*#__PURE__*/React__default.createElement(InputGroup, {
1845
- size: size
1846
- }, addOnLeft && /*#__PURE__*/React__default.createElement(InputLeftAddon, null, addOnLeft), elementLeft && /*#__PURE__*/React__default.createElement(InputLeftElement, null, elementLeft), /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
2016
+ size: size,
2017
+ borderRadius: "md",
2018
+ backgroundColor: isDisabled ? 'neutral.300' : 'white.high',
2019
+ cursor: isDisabled ? 'not-allowed' : 'default'
2020
+ }, addOnLeft && /*#__PURE__*/React__default.createElement(InputAddonLeft, null, addOnLeft), /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
1847
2021
  ref: ref,
1848
- type: type,
1849
- value: value
1850
- }, inputProps)), addOnRight && /*#__PURE__*/React__default.createElement(InputRightAddon, null, addOnRight), elementRight && /*#__PURE__*/React__default.createElement(InputRightElement, null, elementRight)));
2022
+ type: inputType,
2023
+ value: value,
2024
+ isDisabled: isDisabled,
2025
+ isSuccess: isSuccess
2026
+ }, inputProps, {
2027
+ fontSize: fontSize
2028
+ })), (withClear || isLoading || type === 'password') && /*#__PURE__*/React__default.createElement(Box, {
2029
+ "data-test-id": "Pg7ttgRey7InxE4qzTjW_",
2030
+ display: "flex",
2031
+ alignItems: "center",
2032
+ justifyContent: "center",
2033
+ width: "16px",
2034
+ mr: "10px"
2035
+ }, withClear && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
2036
+ display: "flex",
2037
+ justifyContent: "center",
2038
+ onClick: !isDisabled ? onClear : undefined,
2039
+ cursor: isDisabled ? 'not-allowed' : 'pointer'
2040
+ }, /*#__PURE__*/React__default.createElement(Close, {
2041
+ size: 4,
2042
+ color: iconColor
2043
+ })), type === 'password' && !isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
2044
+ "data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
2045
+ onClick: () => {
2046
+ if (!isDisabled) setIsShowPassword(true);
2047
+ },
2048
+ cursor: isDisabled ? 'not-allowed' : 'pointer',
2049
+ display: "flex",
2050
+ justifyContent: "center"
2051
+ }, /*#__PURE__*/React__default.createElement(EyeOff, {
2052
+ size: 4,
2053
+ color: iconColor
2054
+ })), type === 'password' && isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
2055
+ "data-test-id": "sfc2388bmeXBmdla45Ibk",
2056
+ onClick: () => {
2057
+ if (!isDisabled) setIsShowPassword(false);
2058
+ },
2059
+ cursor: isDisabled ? 'not-allowed' : 'pointer',
2060
+ display: "flex",
2061
+ justifyContent: "center"
2062
+ }, /*#__PURE__*/React__default.createElement(Eye, {
2063
+ size: 4,
2064
+ color: iconColor
2065
+ })), isLoading && /*#__PURE__*/React__default.createElement(Loader, {
2066
+ size: "sm"
2067
+ })), "(", addOnRight && /*#__PURE__*/React__default.createElement(InputAddonRight, null, addOnRight))));
1851
2068
  });
1852
2069
  InputField.defaultProps = {
1853
2070
  addOnLeft: undefined,
1854
2071
  addOnRight: undefined,
1855
2072
  elementLeft: undefined,
1856
- elementRight: undefined
2073
+ elementRight: undefined,
2074
+ withClear: undefined,
2075
+ isLoading: undefined,
2076
+ onClear: undefined
1857
2077
  };
1858
2078
 
1859
- const Loader = /*#__PURE__*/forwardRef((props, ref) => {
1860
- const styles = useStyleConfig('LoaderStyle', props);
1861
- return /*#__PURE__*/React__default.createElement(Box, {
1862
- ref: ref,
1863
- __css: styles
1864
- });
1865
- });
1866
-
1867
2079
  const TextareaField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1868
2080
  const {
1869
2081
  value,
@@ -1893,7 +2105,7 @@ const XMSLogo = () => /*#__PURE__*/React__default.createElement(Image, {
1893
2105
  src: useColorModeValue('https://assets.voila.id/xms/logo-xms.jpg', 'https://assets.voila.id/xms/logo-xms-dark.png')
1894
2106
  });
1895
2107
  const VoilaLogo = () => /*#__PURE__*/React__default.createElement(Image, {
1896
- src: "https://s3.ap-southeast-1.amazonaws.com/assets.voila.id/xms/logo-voila-black.png?v=1",
2108
+ src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
1897
2109
  filter: useColorModeValue('none', 'invert(1)'),
1898
2110
  maxW: 24
1899
2111
  });
@@ -2009,7 +2221,7 @@ const Version = ({
2009
2221
  version,
2010
2222
  environment,
2011
2223
  onOpenModalRelease
2012
- }) => /*#__PURE__*/createElement(Fragment, null, version && /*#__PURE__*/createElement(Badge, {
2224
+ }) => /*#__PURE__*/createElement(Fragment, null, version && /*#__PURE__*/createElement(Badge$1, {
2013
2225
  "data-test-id": "dzl3esjhCphobaaIXpiUE",
2014
2226
  bg: useColorModeValue('primary.500', 'rgba(124, 124, 124, 0.12)'),
2015
2227
  color: useColorModeValue('white', 'secondary.400'),
@@ -2265,7 +2477,7 @@ const PaginationButton = /*#__PURE__*/forwardRef(({
2265
2477
  const btnColor = useColorModeValue('black.high', 'primary.300');
2266
2478
  const btnNotActiveBg = useColorModeValue('secondary.50', 'primary.500');
2267
2479
  const btnNotActiveColor = useColorModeValue('primary.500', 'white');
2268
- return /*#__PURE__*/React__default.createElement(Button$1, Object.assign({
2480
+ return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
2269
2481
  "data-test-id": "Pagination-Button",
2270
2482
  ref: ref,
2271
2483
  className: className,
@@ -2474,6 +2686,68 @@ PaginationFilter.defaultProps = {
2474
2686
  label: undefined
2475
2687
  };
2476
2688
 
2689
+ function RadioComponent({
2690
+ isError = false,
2691
+ helpText = '',
2692
+ errorText = '',
2693
+ children,
2694
+ isDisabled,
2695
+ ...rest
2696
+ }) {
2697
+ const variant = isError ? 'errors' : 'unstyled';
2698
+ return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
2699
+ display: "flex"
2700
+ }, /*#__PURE__*/React__default.createElement(Radio$1, Object.assign({
2701
+ variant: variant
2702
+ }, rest, {
2703
+ isDisabled: isDisabled
2704
+ }), children && /*#__PURE__*/React__default.createElement(Text, {
2705
+ textStyle: "text.sm",
2706
+ color: isDisabled ? 'black.low' : 'black.high'
2707
+ }, children))), /*#__PURE__*/React__default.createElement(Box, {
2708
+ mt: "5px",
2709
+ ml: "24px"
2710
+ }, isError ? /*#__PURE__*/React__default.createElement(Text, {
2711
+ textStyle: "text.xs",
2712
+ color: "danger.500"
2713
+ }, errorText) : /*#__PURE__*/React__default.createElement(Text, {
2714
+ textStyle: "text.xs",
2715
+ color: "black.medium"
2716
+ }, helpText)));
2717
+ }
2718
+ RadioComponent.defaultProps = {
2719
+ isError: false,
2720
+ helpText: '',
2721
+ errorText: ''
2722
+ };
2723
+
2724
+ function RadioGroupComponent(props) {
2725
+ const {
2726
+ children,
2727
+ label,
2728
+ helpText,
2729
+ isError,
2730
+ errorMessage,
2731
+ ...rest
2732
+ } = props;
2733
+ return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
2734
+ label: label,
2735
+ leftHelperText: helpText,
2736
+ isError: isError,
2737
+ errorMessage: errorMessage
2738
+ }), /*#__PURE__*/React__default.createElement(Box, {
2739
+ mt: "12px"
2740
+ }, /*#__PURE__*/React__default.createElement(RadioGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
2741
+ spacing: [1, '16px'],
2742
+ direction: ['column', 'row']
2743
+ }, children))));
2744
+ }
2745
+ RadioGroupComponent.defaultProps = {
2746
+ helpText: '',
2747
+ isError: false,
2748
+ errorMessage: ''
2749
+ };
2750
+
2477
2751
  const SelectWrapper = ({
2478
2752
  children,
2479
2753
  isError = false
@@ -2666,7 +2940,96 @@ function SelectCreatable({
2666
2940
  })));
2667
2941
  }
2668
2942
 
2669
- const Tab = /*#__PURE__*/forwardRef((props, ref) => {
2943
+ /**
2944
+ * The `Switch` component is used as an alternative for the checkbox component for switching between "enabled" and "disabled" states.
2945
+ *
2946
+ * @see Docs https://chakra-ui.com/docs/components/switch
2947
+ * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/
2948
+ */
2949
+ const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
2950
+ const styles = useMultiStyleConfig('Switch', props);
2951
+ const {
2952
+ size = 'md'
2953
+ } = props;
2954
+ const {
2955
+ spacing = '0.5rem',
2956
+ children,
2957
+ ...ownProps
2958
+ } = omitThemingProps(props);
2959
+ const {
2960
+ state,
2961
+ getInputProps,
2962
+ getCheckboxProps,
2963
+ getRootProps,
2964
+ getLabelProps
2965
+ } = useCheckbox(ownProps);
2966
+ const containerStyles = useMemo(() => ({
2967
+ display: 'inline-block',
2968
+ position: 'relative',
2969
+ verticalAlign: 'middle',
2970
+ lineHeight: 0,
2971
+ ...styles.container
2972
+ }), [styles.container]);
2973
+ const trackStyles = useMemo(() => ({
2974
+ display: 'inline-flex',
2975
+ flexShrink: 0,
2976
+ justifyContent: 'flex-start',
2977
+ boxSizing: 'content-box',
2978
+ cursor: 'pointer',
2979
+ width: 200,
2980
+ ...styles.track
2981
+ }), [styles.track]);
2982
+ const labelStyles = useMemo(() => ({
2983
+ userSelect: 'none',
2984
+ marginStart: spacing,
2985
+ ...styles.label
2986
+ }), [spacing, styles.label]);
2987
+ const getIconSize = value => {
2988
+ const iconSize = {
2989
+ sm: 3,
2990
+ md: 4,
2991
+ lg: 5
2992
+ };
2993
+ return iconSize[value];
2994
+ };
2995
+ return /*#__PURE__*/React__default.createElement(chakra.label, Object.assign({}, getRootProps(), {
2996
+ display: "flex",
2997
+ alignItems: "center",
2998
+ className: cx('chakra-switch', props.className),
2999
+ __css: containerStyles
3000
+ }), /*#__PURE__*/React__default.createElement("input", Object.assign({
3001
+ "data-test-id": "",
3002
+ className: "chakra-switch__input"
3003
+ }, getInputProps({}, ref))), /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({}, getCheckboxProps(), {
3004
+ className: "chakra-switch__track",
3005
+ pos: "relative",
3006
+ __css: trackStyles
3007
+ }), /*#__PURE__*/React__default.createElement(Flex, {
3008
+ gap: 2,
3009
+ pos: "absolute",
3010
+ top: "50%",
3011
+ left: "50%",
3012
+ transform: "translate(-50%, -50%)"
3013
+ }, /*#__PURE__*/React__default.createElement(Check, {
3014
+ color: "white",
3015
+ size: getIconSize(size)
3016
+ }), /*#__PURE__*/React__default.createElement(Close, {
3017
+ color: state.isDisabled ? 'neutral.600' : 'neutral.900',
3018
+ size: getIconSize(size)
3019
+ })), /*#__PURE__*/React__default.createElement(chakra.span, {
3020
+ __css: styles.thumb,
3021
+ className: "chakra-switch__thumb",
3022
+ "data-checked": dataAttr(state.isChecked),
3023
+ "data-hover": dataAttr(state.isHovered)
3024
+ })), children && /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
3025
+ className: "chakra-switch__label",
3026
+ color: state.isDisabled ? 'black.low' : 'black.high'
3027
+ }, getLabelProps(), {
3028
+ __css: labelStyles
3029
+ }), children));
3030
+ });
3031
+
3032
+ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
2670
3033
  var _props$leftAddon, _props$rightAddon;
2671
3034
  const tabProps = useTab({
2672
3035
  ...props,
@@ -2674,7 +3037,7 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
2674
3037
  });
2675
3038
  const isSelected = !!tabProps['aria-selected'];
2676
3039
  const styles = useMultiStyleConfig('Tabs', tabProps);
2677
- return /*#__PURE__*/createElement(Button$1, Object.assign({
3040
+ return /*#__PURE__*/createElement(Button$2, Object.assign({
2678
3041
  p: 3,
2679
3042
  fontSize: "text.md",
2680
3043
  _selected: {
@@ -2795,115 +3158,391 @@ Uploader.defaultProps = {
2795
3158
  selected: false
2796
3159
  };
2797
3160
 
3161
+ const {
3162
+ definePartsStyle,
3163
+ defineMultiStyleConfig
3164
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(alertAnatomy.keys);
3165
+ const $fg = /*#__PURE__*/cssVar('alert-fg');
3166
+ const $bg = /*#__PURE__*/cssVar('alert-bg');
3167
+ const baseStyle = /*#__PURE__*/definePartsStyle({
3168
+ container: {
3169
+ bg: $bg.reference,
3170
+ px: '4',
3171
+ py: '2',
3172
+ borderRadius: 'md'
3173
+ },
3174
+ title: {
3175
+ fontWeight: '400',
3176
+ lineHeight: '18px',
3177
+ marginEnd: '2'
3178
+ },
3179
+ description: {
3180
+ lineHeight: '6'
3181
+ },
3182
+ icon: {
3183
+ color: $fg.reference,
3184
+ flexShrink: 0,
3185
+ marginEnd: '3',
3186
+ w: '4',
3187
+ h: '4'
3188
+ },
3189
+ action: {
3190
+ '& +.chakra-alert__close': {
3191
+ ml: '3'
3192
+ }
3193
+ },
3194
+ close: {
3195
+ color: $fg.reference,
3196
+ w: '4',
3197
+ h: '4'
3198
+ },
3199
+ spinner: {
3200
+ color: $fg.reference,
3201
+ flexShrink: 0,
3202
+ marginEnd: '3',
3203
+ w: '5',
3204
+ h: '5'
3205
+ }
3206
+ });
3207
+ function getBg(props) {
3208
+ const {
3209
+ theme,
3210
+ colorScheme: c
3211
+ } = props;
3212
+ const darkBg = transparentize(`${c}.200`, 0.16)(theme);
3213
+ return {
3214
+ light: `colors.${c}.50`,
3215
+ dark: darkBg
3216
+ };
3217
+ }
3218
+ const variantSubtle = /*#__PURE__*/definePartsStyle(props => {
3219
+ const {
3220
+ colorScheme: c
3221
+ } = props;
3222
+ const bg = getBg(props);
3223
+ return {
3224
+ container: {
3225
+ [$fg.variable]: `colors.${c}.700`,
3226
+ [$bg.variable]: bg.light,
3227
+ _dark: {
3228
+ [$fg.variable]: `colors.${c}.200`,
3229
+ [$bg.variable]: bg.dark
3230
+ },
3231
+ color: $fg.reference
3232
+ }
3233
+ };
3234
+ });
3235
+ const variantSolid = /*#__PURE__*/definePartsStyle(props => {
3236
+ const {
3237
+ colorScheme: c
3238
+ } = props;
3239
+ return {
3240
+ container: {
3241
+ [$fg.variable]: `colors.white.high`,
3242
+ [$bg.variable]: `colors.${c}.500`,
3243
+ _dark: {
3244
+ [$fg.variable]: `colors.gray.900`,
3245
+ [$bg.variable]: `colors.${c}.200`
3246
+ },
3247
+ color: $fg.reference
3248
+ }
3249
+ };
3250
+ });
3251
+ const variants = {
3252
+ subtle: variantSubtle,
3253
+ solid: variantSolid
3254
+ };
3255
+ const alertTheme = /*#__PURE__*/defineMultiStyleConfig({
3256
+ baseStyle,
3257
+ variants,
3258
+ defaultProps: {
3259
+ variant: 'subtle',
3260
+ colorScheme: 'info'
3261
+ }
3262
+ });
3263
+
2798
3264
  // You can also use the more specific type for
2799
3265
  // a single part component: ComponentSingleStyleConfig
2800
- const Button = {
3266
+ const Button$1 = /*#__PURE__*/defineStyleConfig({
2801
3267
  // The styles all button have in common
2802
3268
  baseStyle: {
2803
3269
  fontSize: 'body.1',
2804
3270
  fontWeight: 'normal',
2805
- lineHeight: '1.25',
2806
- minW: 24,
2807
3271
  px: 4,
2808
- py: 2,
3272
+ py: 2.5,
2809
3273
  borderRadius: 'md',
2810
3274
  _disabled: {
2811
- opacity: 0.3
3275
+ opacity: 1,
3276
+ bg: 'neutral.300',
3277
+ color: 'black.low'
2812
3278
  },
2813
3279
  _hover: {
2814
3280
  _disabled: {
2815
- opacity: 0.3
3281
+ bg: 'neutral.300',
3282
+ color: 'black.low'
2816
3283
  }
2817
- },
2818
- _active: {
2819
- _disabled: {
2820
- opacity: 0.3
2821
- }
2822
- },
2823
- _loading: {
2824
- opacity: 0.7
2825
3284
  }
2826
3285
  },
2827
3286
  sizes: {
2828
- lg: {
2829
- fontSize: 'button.lg',
2830
- h: 12
3287
+ lg: props => {
3288
+ const {
3289
+ variant
3290
+ } = props;
3291
+ const base = {
3292
+ fontSize: 'text.xl',
3293
+ h: 12,
3294
+ px: 4,
3295
+ py: 2.5
3296
+ };
3297
+ const icon = {
3298
+ h: 10,
3299
+ w: 10,
3300
+ p: 0
3301
+ };
3302
+ return variant === 'icon' ? icon : base;
2831
3303
  },
2832
- md: {
2833
- fontSize: 'button.md',
2834
- h: 9
3304
+ md: props => {
3305
+ const {
3306
+ variant
3307
+ } = props;
3308
+ const base = {
3309
+ fontSize: 'text.md',
3310
+ h: 9,
3311
+ px: 3,
3312
+ py: '7px'
3313
+ };
3314
+ const icon = {
3315
+ h: 9,
3316
+ w: 9,
3317
+ p: 0
3318
+ };
3319
+ return variant === 'icon' ? icon : base;
2835
3320
  },
2836
- sm: {
2837
- fontSize: 'button.sm',
2838
- h: 6
3321
+ sm: props => {
3322
+ const {
3323
+ variant
3324
+ } = props;
3325
+ const base = {
3326
+ fontSize: 'text.sm',
3327
+ h: '26px',
3328
+ lineHeight: 4,
3329
+ px: 2,
3330
+ py: '5px'
3331
+ };
3332
+ const icon = {
3333
+ h: '26px',
3334
+ w: '26px',
3335
+ p: 0
3336
+ };
3337
+ return variant === 'icon' ? icon : base;
2839
3338
  }
2840
3339
  },
2841
- // Two variants: outline and solid
2842
3340
  variants: {
2843
- solid: {
2844
- color: 'white',
2845
- bg: 'primary.500',
3341
+ primary: props => {
3342
+ const {
3343
+ isLoading
3344
+ } = props;
3345
+ const basePrimary = {
3346
+ color: 'white.high',
3347
+ bg: 'primary.500',
3348
+ _hover: {
3349
+ bg: 'primary.600'
3350
+ },
3351
+ _active: {
3352
+ bg: 'primary.700'
3353
+ }
3354
+ };
3355
+ const disabledLoading = {
3356
+ _disabled: {
3357
+ bg: 'primary.500'
3358
+ },
3359
+ _hover: {
3360
+ _disabled: {
3361
+ bg: 'primary.500'
3362
+ }
3363
+ }
3364
+ };
3365
+ return isLoading ? disabledLoading : basePrimary;
3366
+ },
3367
+ secondary: props => {
3368
+ const {
3369
+ isLoading
3370
+ } = props;
3371
+ const baseSecondary = {
3372
+ color: 'primary.500',
3373
+ borderWidth: 1,
3374
+ borderStyle: 'inside',
3375
+ bg: 'white.high',
3376
+ borderColor: 'primary.500',
3377
+ _hover: {
3378
+ bg: 'primary.50'
3379
+ },
3380
+ _active: {
3381
+ bg: 'primary.100'
3382
+ },
3383
+ _disabled: {
3384
+ border: 0
3385
+ }
3386
+ };
3387
+ const disabledLoading = {
3388
+ ...baseSecondary,
3389
+ _disabled: {
3390
+ bg: 'white.high'
3391
+ },
3392
+ _hover: {
3393
+ _disabled: {
3394
+ bg: 'white.high'
3395
+ }
3396
+ }
3397
+ };
3398
+ return isLoading ? disabledLoading : baseSecondary;
3399
+ },
3400
+ tertiary: props => {
3401
+ const {
3402
+ isLoading
3403
+ } = props;
3404
+ const baseTertiary = {
3405
+ color: 'primary.500',
3406
+ _hover: {
3407
+ bg: 'primary.50'
3408
+ },
3409
+ _active: {
3410
+ bg: 'primary.100'
3411
+ }
3412
+ };
3413
+ const disabledLoading = {
3414
+ ...baseTertiary,
3415
+ _disabled: {
3416
+ bg: 'transparent'
3417
+ },
3418
+ _hover: {
3419
+ _disabled: {
3420
+ bg: 'transparent'
3421
+ }
3422
+ }
3423
+ };
3424
+ return isLoading ? disabledLoading : baseTertiary;
3425
+ },
3426
+ danger: props => {
3427
+ const {
3428
+ isLoading
3429
+ } = props;
3430
+ const baseDanger = {
3431
+ bg: 'danger.500',
3432
+ color: 'white.high',
3433
+ _hover: {
3434
+ bg: 'danger.600'
3435
+ },
3436
+ _active: {
3437
+ bg: 'danger.700'
3438
+ }
3439
+ };
3440
+ const disabledLoading = {
3441
+ ...baseDanger,
3442
+ _disabled: {
3443
+ bg: 'danger.500'
3444
+ },
3445
+ _hover: {
3446
+ _disabled: {
3447
+ bg: 'danger.500'
3448
+ }
3449
+ }
3450
+ };
3451
+ return isLoading ? disabledLoading : baseDanger;
3452
+ },
3453
+ 'outline-danger': props => {
3454
+ const {
3455
+ isLoading
3456
+ } = props;
3457
+ const baseSecondary = {
3458
+ color: 'danger.500',
3459
+ borderWidth: 1,
3460
+ borderStyle: 'inside',
3461
+ bg: 'white.high',
3462
+ borderColor: 'danger.500',
3463
+ _hover: {
3464
+ bg: 'danger.50'
3465
+ },
3466
+ _active: {
3467
+ bg: 'danger.100'
3468
+ },
3469
+ _disabled: {
3470
+ border: 0
3471
+ }
3472
+ };
3473
+ const disabledLoading = {
3474
+ ...baseSecondary,
3475
+ _disabled: {
3476
+ bg: 'white.high'
3477
+ },
3478
+ _hover: {
3479
+ _disabled: {
3480
+ bg: 'white.high'
3481
+ }
3482
+ }
3483
+ };
3484
+ return isLoading ? disabledLoading : baseSecondary;
3485
+ },
3486
+ link: {
3487
+ bg: 'transparent',
3488
+ color: 'primary.500',
2846
3489
  _disabled: {
2847
- bg: 'primary.700'
3490
+ opacity: '1',
3491
+ bg: 'transparent',
3492
+ color: 'black.medium'
2848
3493
  },
2849
3494
  _hover: {
2850
- bg: 'primary.600'
2851
- },
2852
- _active: {
2853
- bg: 'primary.700'
2854
- },
2855
- _focus: {
2856
- bg: 'primary.700'
3495
+ _disabled: {
3496
+ bg: 'transparent',
3497
+ color: 'black.medium'
3498
+ }
2857
3499
  }
2858
3500
  },
2859
- outline: props => ({
2860
- color: 'primary.500',
2861
- borderWidth: 1,
2862
- borderStyle: 'inside',
2863
- bg: mode('white', 'transparent')(props),
2864
- borderColor: mode('primary.500', 'primary.500')(props),
2865
- _hover: {
2866
- bg: 'primary.50'
2867
- },
3501
+ icon: {
3502
+ bg: 'neutral.50',
3503
+ minW: 0,
3504
+ borderColor: 'neutral.200',
3505
+ borderWidth: '1px',
2868
3506
  _active: {
2869
- bg: 'primary.100'
3507
+ bg: 'neutral.500',
3508
+ borderColor: 'neutral.50'
2870
3509
  },
2871
- _focus: {
2872
- bg: 'primary.100'
2873
- }
2874
- }),
2875
- 'outline-danger': {
2876
- color: 'danger.500',
2877
- bg: 'white',
2878
- borderStyle: 'inside',
2879
- borderWidth: 1,
2880
- borderColor: 'danger.500'
2881
- },
2882
- ghost: {
2883
- color: 'primary.500',
2884
3510
  _disabled: {
2885
- bg: 'primary.100'
3511
+ bg: 'neutral.500',
3512
+ opacity: 0.3,
3513
+ borderColor: 'neutral.50'
3514
+ },
3515
+ _hover: {
3516
+ bg: 'neutral.400',
3517
+ _disabled: {
3518
+ bg: 'neutral.500',
3519
+ opacity: 0.3,
3520
+ borderColor: 'neutral.50'
3521
+ }
2886
3522
  }
2887
- },
2888
- link: {
2889
- bg: 'transparent',
2890
- color: 'primary.500'
2891
3523
  }
2892
3524
  },
2893
- // The default size and variant values
2894
3525
  defaultProps: {
2895
3526
  size: 'md',
2896
- variant: 'solid',
2897
- orientation: 'vertical',
3527
+ variant: 'primary',
2898
3528
  colorScheme: 'primary'
2899
3529
  }
2900
- };
3530
+ });
3531
+
3532
+ const CardStyle = /*#__PURE__*/defineStyleConfig({
3533
+ baseStyle: props => {
3534
+ return {
3535
+ shadow: props.withShadow ? 'raised' : 'none',
3536
+ borderRadius: props.isRounded ? 'lg' : 'none'
3537
+ };
3538
+ }
3539
+ });
2901
3540
 
2902
3541
  const {
2903
- definePartsStyle,
2904
- defineMultiStyleConfig
2905
- } = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys);
2906
- const baseStyle = /*#__PURE__*/definePartsStyle({
3542
+ definePartsStyle: definePartsStyle$1,
3543
+ defineMultiStyleConfig: defineMultiStyleConfig$1
3544
+ } = /*#__PURE__*/createMultiStyleConfigHelpers$1(checkboxAnatomy.keys);
3545
+ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
2907
3546
  control: {
2908
3547
  borderRadius: '4px',
2909
3548
  width: '16px',
@@ -2927,7 +3566,7 @@ const baseStyle = /*#__PURE__*/definePartsStyle({
2927
3566
  cursor: 'not-allowed'
2928
3567
  }
2929
3568
  });
2930
- const errors = /*#__PURE__*/definePartsStyle({
3569
+ const errors = /*#__PURE__*/definePartsStyle$1({
2931
3570
  control: {
2932
3571
  borderColor: 'danger.500',
2933
3572
  _checked: {
@@ -2947,7 +3586,7 @@ const errors = /*#__PURE__*/definePartsStyle({
2947
3586
  fontSize: '12px'
2948
3587
  }
2949
3588
  });
2950
- const unstyled = /*#__PURE__*/definePartsStyle({
3589
+ const unstyled = /*#__PURE__*/definePartsStyle$1({
2951
3590
  control: {
2952
3591
  borderColor: 'neutral.500',
2953
3592
  _checked: {
@@ -2963,7 +3602,8 @@ const unstyled = /*#__PURE__*/definePartsStyle({
2963
3602
  }
2964
3603
  },
2965
3604
  _disabled: {
2966
- backgroundColor: 'neutral.500'
3605
+ backgroundColor: 'neutral.500',
3606
+ borderColor: 'neutral.500'
2967
3607
  },
2968
3608
  _indeterminate: {
2969
3609
  borderColor: 'primary.500',
@@ -2974,48 +3614,109 @@ const unstyled = /*#__PURE__*/definePartsStyle({
2974
3614
  fontSize: '12px'
2975
3615
  }
2976
3616
  });
2977
- const variants = {
3617
+ const variants$1 = {
2978
3618
  errors,
2979
3619
  unstyled
2980
3620
  };
2981
- const Checkbox = /*#__PURE__*/defineMultiStyleConfig({
2982
- baseStyle,
2983
- variants,
3621
+ const Checkbox = /*#__PURE__*/defineMultiStyleConfig$1({
3622
+ baseStyle: baseStyle$1,
3623
+ variants: variants$1,
3624
+ defaultProps: {
3625
+ variant: 'unstyled'
3626
+ }
3627
+ });
3628
+
3629
+ const Chips = /*#__PURE__*/defineStyleConfig({
3630
+ baseStyle: props => {
3631
+ const {
3632
+ isDisabled,
3633
+ isActive
3634
+ } = props;
3635
+ const defaultProps = {
3636
+ color: 'primary.500',
3637
+ fontSize: 'text.small',
3638
+ borderRadius: '24px',
3639
+ borderWidth: '1px',
3640
+ borderColor: 'primary.500',
3641
+ bg: 'white.high',
3642
+ paddingX: 3,
3643
+ paddingY: 1,
3644
+ cursor: 'default'
3645
+ };
3646
+ let chipsProps = {
3647
+ ...defaultProps
3648
+ };
3649
+ if (isActive) {
3650
+ const isActiveProps = {
3651
+ bg: 'primary.500',
3652
+ color: 'white.high'
3653
+ };
3654
+ chipsProps = {
3655
+ ...chipsProps,
3656
+ ...isActiveProps
3657
+ };
3658
+ }
3659
+ if (isDisabled) {
3660
+ const isDisabledProps = {
3661
+ bg: 'neutral.200',
3662
+ color: 'black.low',
3663
+ borderColor: 'neutral.200',
3664
+ cursor: 'not-allowed'
3665
+ };
3666
+ chipsProps = {
3667
+ ...chipsProps,
3668
+ ...isDisabledProps
3669
+ };
3670
+ }
3671
+ return {
3672
+ ...chipsProps
3673
+ };
3674
+ },
3675
+ sizes: {
3676
+ sm: {
3677
+ fontSize: '12px'
3678
+ },
3679
+ md: {
3680
+ fontSize: '14px'
3681
+ }
3682
+ },
2984
3683
  defaultProps: {
2985
- variant: 'errors'
3684
+ size: 'sm'
2986
3685
  }
2987
3686
  });
2988
3687
 
2989
- const baseStyle$1 = /*#__PURE__*/defineStyle({
3688
+ const baseStyle$2 = /*#__PURE__*/defineStyle$1({
2990
3689
  fontSize: 'field.sm',
2991
3690
  marginEnd: 1,
2992
3691
  mb: 1
2993
3692
  });
2994
3693
  const FormLabel = /*#__PURE__*/defineStyleConfig({
2995
- baseStyle: baseStyle$1
3694
+ baseStyle: baseStyle$2
2996
3695
  });
2997
3696
 
2998
3697
  const {
2999
- definePartsStyle: definePartsStyle$1,
3000
- defineMultiStyleConfig: defineMultiStyleConfig$1
3001
- } = /*#__PURE__*/createMultiStyleConfigHelpers$1(inputAnatomy.keys);
3002
- const baseStyle$2 = /*#__PURE__*/definePartsStyle$1({
3698
+ definePartsStyle: definePartsStyle$2,
3699
+ defineMultiStyleConfig: defineMultiStyleConfig$2
3700
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(inputAnatomy.keys);
3701
+ const baseStyle$3 = /*#__PURE__*/definePartsStyle$2({
3003
3702
  field: {
3004
3703
  width: '100%',
3005
3704
  minWidth: 0,
3006
3705
  outline: 0,
3007
- px: 2.5,
3008
- py: 2,
3706
+ px: 2,
3707
+ py: 2.5,
3708
+ paddingInlineStart: 2,
3709
+ paddingInlineEnd: 2,
3009
3710
  position: 'relative',
3010
3711
  appearance: 'none',
3011
- transitionProperty: 'common',
3012
- transitionDuration: 'normal',
3013
3712
  color: 'black.high',
3014
3713
  _disabled: {
3015
3714
  bg: 'neutral.300',
3016
- border: '1px solid',
3017
- borderColor: 'neutral.400',
3018
- cursor: 'not-allowed'
3715
+ border: 0,
3716
+ cursor: 'not-allowed',
3717
+ opacity: 1,
3718
+ boxShadow: 'none',
3719
+ color: 'black.medium'
3019
3720
  },
3020
3721
  _placeholder: {
3021
3722
  color: 'black.low'
@@ -3023,89 +3724,55 @@ const baseStyle$2 = /*#__PURE__*/definePartsStyle$1({
3023
3724
  }
3024
3725
  });
3025
3726
  const size = {
3026
- lg: /*#__PURE__*/defineStyle({
3027
- fontSize: 'field.lg',
3727
+ lg: /*#__PURE__*/defineStyle$1({
3728
+ fontSize: 'text.lg',
3028
3729
  h: 12,
3029
3730
  borderRadius: 'md'
3030
3731
  }),
3031
- md: /*#__PURE__*/defineStyle({
3032
- fontSize: 'field.md',
3732
+ md: /*#__PURE__*/defineStyle$1({
3733
+ fontSize: 'text.md',
3033
3734
  h: 10,
3034
3735
  borderRadius: 'md'
3035
3736
  }),
3036
- sm: /*#__PURE__*/defineStyle({
3037
- fontSize: 'field.sm',
3737
+ sm: /*#__PURE__*/defineStyle$1({
3738
+ fontSize: 'text.sm',
3038
3739
  h: 9.5,
3039
3740
  borderRadius: 'md'
3040
3741
  })
3041
3742
  };
3042
3743
  const sizes$1 = {
3043
- lg: /*#__PURE__*/definePartsStyle$1({
3744
+ lg: /*#__PURE__*/definePartsStyle$2({
3044
3745
  field: size.lg,
3045
3746
  addon: size.lg
3046
3747
  }),
3047
- md: /*#__PURE__*/definePartsStyle$1({
3748
+ md: /*#__PURE__*/definePartsStyle$2({
3048
3749
  field: size.md,
3049
3750
  addon: size.md
3050
3751
  }),
3051
- sm: /*#__PURE__*/definePartsStyle$1({
3752
+ sm: /*#__PURE__*/definePartsStyle$2({
3052
3753
  field: size.sm,
3053
3754
  addon: size.sm
3054
3755
  })
3055
3756
  };
3056
- function getDefaults(props) {
3057
- const {
3058
- focusBorderColor,
3059
- errorBorderColor,
3060
- readOnlyBorderColor
3061
- } = props;
3062
- return {
3063
- focusBorderColor: focusBorderColor || mode('primary.500', 'primary.300')(props),
3064
- errorBorderColor: errorBorderColor || mode('danger.500', 'danger.300')(props),
3065
- readOnlyBorderColor: readOnlyBorderColor || mode('.500', 'danger.300')(props)
3066
- };
3067
- }
3068
- const outline = /*#__PURE__*/definePartsStyle$1(props => {
3069
- const {
3070
- theme
3071
- } = props;
3072
- const {
3073
- focusBorderColor: fc,
3074
- errorBorderColor: ec,
3075
- readOnlyBorderColor: rc
3076
- } = getDefaults(props);
3077
- return {
3078
- field: {
3079
- border: '1px solid',
3080
- borderColor: mode('dark.200', 'inherit')(props),
3081
- bg: mode('white', 'inherit')(props),
3082
- color: mode('inherit', 'white')(props),
3083
- _hover: {
3084
- borderColor: mode('gray.300', 'whiteAlpha.400')(props)
3085
- },
3086
- _readOnly: {
3087
- userSelect: 'all',
3088
- borderColor: getColor(theme, rc),
3089
- boxShadow: `0 0 0 0 ${getColor(theme, rc)}`
3090
- },
3091
- _invalid: {
3092
- borderColor: getColor(theme, ec),
3093
- boxShadow: `0 0 0 0 ${getColor(theme, ec)}`
3094
- },
3095
- _focusVisible: {
3096
- zIndex: 1,
3097
- borderColor: getColor(theme, fc),
3098
- boxShadow: `0 0 0 0 ${getColor(theme, fc)}`
3099
- }
3757
+ const outline = /*#__PURE__*/definePartsStyle$2(props => {
3758
+ const field = {
3759
+ border: 0,
3760
+ outline: 0,
3761
+ bg: mode('white', 'inherit')(props),
3762
+ color: mode('inherit', 'white')(props),
3763
+ _invalid: {
3764
+ boxShadow: 'none'
3100
3765
  },
3101
- addon: {
3102
- border: '1px solid',
3103
- borderColor: mode('inherit', 'whiteAlpha.50')(props),
3104
- bg: mode('gray.100', 'whiteAlpha.300')(props)
3766
+ _focusVisible: {
3767
+ zIndex: 1,
3768
+ boxShadow: 'none'
3105
3769
  }
3106
3770
  };
3771
+ return {
3772
+ field
3773
+ };
3107
3774
  });
3108
- const unstyled$1 = /*#__PURE__*/definePartsStyle$1({
3775
+ const unstyled$1 = /*#__PURE__*/definePartsStyle$2({
3109
3776
  field: {
3110
3777
  bg: 'transparent',
3111
3778
  px: '0',
@@ -3117,14 +3784,14 @@ const unstyled$1 = /*#__PURE__*/definePartsStyle$1({
3117
3784
  height: 'auto'
3118
3785
  }
3119
3786
  });
3120
- const variants$1 = {
3787
+ const variants$2 = {
3121
3788
  outline,
3122
3789
  unstyled: unstyled$1
3123
3790
  };
3124
- const Input = /*#__PURE__*/defineMultiStyleConfig$1({
3125
- baseStyle: baseStyle$2,
3791
+ const Input = /*#__PURE__*/defineMultiStyleConfig$2({
3792
+ baseStyle: baseStyle$3,
3126
3793
  sizes: sizes$1,
3127
- variants: variants$1,
3794
+ variants: variants$2,
3128
3795
  defaultProps: {
3129
3796
  size: 'sm',
3130
3797
  variant: 'outline'
@@ -3139,16 +3806,21 @@ const rotate = /*#__PURE__*/keyframes({
3139
3806
  transform: 'rotate(360deg)'
3140
3807
  }
3141
3808
  });
3809
+ const getLoaderColor = color => {
3810
+ if (color === 'primary') return colors.primary[600];
3811
+ if (color === 'danger') return colors.danger[500];
3812
+ return colors.white.high;
3813
+ };
3142
3814
  const LoaderStyle = /*#__PURE__*/defineStyleConfig({
3143
3815
  baseStyle: props => {
3144
- const colors$1 = props.color === 'white' ? 'white' : colors.primary[600];
3816
+ const colors = getLoaderColor(props.color);
3145
3817
  return {
3146
3818
  borderRadius: '50%',
3147
3819
  display: 'flex',
3148
3820
  justifyContent: 'center',
3149
3821
  alignItems: 'center',
3150
3822
  animation: `${rotate} 1s linear infinite`,
3151
- background: `conic-gradient(from 180deg at 50% 50%, ${colors$1} 0deg, rgba(217, 217, 217, 0) 360deg);`,
3823
+ background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,
3152
3824
  ':before': {
3153
3825
  content: `''`,
3154
3826
  display: 'block',
@@ -3157,7 +3829,7 @@ const LoaderStyle = /*#__PURE__*/defineStyleConfig({
3157
3829
  height: '6px',
3158
3830
  position: 'absolute',
3159
3831
  bottom: 0,
3160
- background: colors$1
3832
+ background: colors
3161
3833
  }
3162
3834
  };
3163
3835
  },
@@ -3223,10 +3895,10 @@ const LoaderStyle = /*#__PURE__*/defineStyleConfig({
3223
3895
  });
3224
3896
 
3225
3897
  const {
3226
- definePartsStyle: definePartsStyle$2
3227
- } = /*#__PURE__*/createMultiStyleConfigHelpers$1(popoverAnatomy.keys);
3898
+ definePartsStyle: definePartsStyle$3
3899
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(popoverAnatomy.keys);
3228
3900
  const Popover = {
3229
- baseStyle: props => definePartsStyle$2({
3901
+ baseStyle: props => definePartsStyle$3({
3230
3902
  popper: {
3231
3903
  background: mode('white', 'inherit')(props)
3232
3904
  }
@@ -3234,93 +3906,175 @@ const Popover = {
3234
3906
  };
3235
3907
 
3236
3908
  const {
3237
- definePartsStyle: definePartsStyle$3
3909
+ definePartsStyle: definePartsStyle$4,
3910
+ defineMultiStyleConfig: defineMultiStyleConfig$3
3238
3911
  } = /*#__PURE__*/createMultiStyleConfigHelpers$1(radioAnatomy.keys);
3239
- // You can also use the more specific type for
3240
- // a single part component: ComponentSingleStyleConfig
3241
- const Radio = {
3242
- // The styles all checkbox have in common
3243
- baseStyle: /*#__PURE__*/definePartsStyle$3({
3244
- control: {
3245
- _checked: {
3246
- borderColor: 'primary.500',
3912
+ const baseStyle$4 = /*#__PURE__*/definePartsStyle$4({
3913
+ control: {
3914
+ border: '1px solid',
3915
+ width: '16px',
3916
+ height: '16px'
3917
+ },
3918
+ label: {
3919
+ marginLeft: '8px',
3920
+ textStyle: 'text.sm',
3921
+ color: 'black.high',
3922
+ _disabled: {
3923
+ color: 'black.low'
3924
+ }
3925
+ }
3926
+ });
3927
+ const errors$1 = /*#__PURE__*/definePartsStyle$4({
3928
+ control: {
3929
+ borderColor: 'danger.500',
3930
+ _checked: {
3931
+ borderColor: 'danger.500',
3932
+ bg: 'white',
3933
+ _before: {
3934
+ h: '10px',
3935
+ w: '10px',
3936
+ bg: 'danger.500'
3937
+ },
3938
+ _hover: {
3939
+ borderColor: 'danger.500',
3940
+ bg: 'gray.200'
3941
+ },
3942
+ _disabled: {
3943
+ borderColor: 'danger.500',
3247
3944
  bg: 'white',
3248
3945
  _before: {
3249
- h: '72%',
3250
- w: '72%',
3251
- bg: 'primary.500'
3252
- },
3253
- _hover: {
3254
- borderColor: 'primary.500',
3255
- bg: 'gray.200'
3946
+ h: '10px',
3947
+ w: '10px',
3948
+ bg: 'neutral.500'
3256
3949
  }
3257
3950
  }
3951
+ },
3952
+ _disabled: {
3953
+ borderColor: 'danger.500',
3954
+ bg: 'neutral.500'
3258
3955
  }
3259
- }),
3260
- // Two sizes: sm and md
3261
- sizes: {
3262
- sm: /*#__PURE__*/definePartsStyle$3({
3263
- control: {
3264
- w: '3',
3265
- h: '3'
3266
- },
3267
- label: {
3268
- fontSize: 'text.sm'
3269
- }
3270
- }),
3271
- md: /*#__PURE__*/definePartsStyle$3({
3272
- control: {
3273
- w: '4',
3274
- h: '4'
3956
+ },
3957
+ label: {
3958
+ fontSize: '12px'
3959
+ }
3960
+ });
3961
+ const unstyled$2 = /*#__PURE__*/definePartsStyle$4({
3962
+ control: {
3963
+ borderColor: 'neutral.600',
3964
+ _checked: {
3965
+ borderColor: 'primary.500',
3966
+ bg: 'white',
3967
+ _before: {
3968
+ h: '10px',
3969
+ w: '10px',
3970
+ bg: 'primary.500'
3275
3971
  },
3276
- label: {
3277
- fontSize: 'text.md'
3278
- }
3279
- }),
3280
- lg: /*#__PURE__*/definePartsStyle$3({
3281
- control: {
3282
- w: '5',
3283
- h: '5'
3972
+ _hover: {
3973
+ borderColor: 'primary.500',
3974
+ bg: 'gray.200'
3284
3975
  },
3285
- label: {
3286
- fontSize: 'text.lg'
3976
+ _disabled: {
3977
+ borderColor: 'neutral.500',
3978
+ bg: 'white',
3979
+ _before: {
3980
+ h: '10px',
3981
+ w: '10px',
3982
+ bg: 'neutral.500'
3983
+ }
3287
3984
  }
3288
- })
3985
+ },
3986
+ _disabled: {
3987
+ borderColor: 'neutral.500',
3988
+ bg: 'neutral.500'
3989
+ }
3289
3990
  },
3290
- // Two variants: outline and solid
3291
- variants: {},
3292
- // The default size and variant values
3293
- defaultProps: {
3294
- size: 'sm',
3295
- variant: 'solid',
3296
- orientation: 'vertical',
3297
- colorScheme: 'primary'
3991
+ label: {
3992
+ fontSize: '12px'
3298
3993
  }
3994
+ });
3995
+ const variants$3 = {
3996
+ errors: errors$1,
3997
+ unstyled: unstyled$2
3299
3998
  };
3999
+ const Radio = /*#__PURE__*/defineMultiStyleConfig$3({
4000
+ baseStyle: baseStyle$4,
4001
+ variants: variants$3,
4002
+ defaultProps: {
4003
+ variant: 'unstyled'
4004
+ }
4005
+ });
3300
4006
 
3301
4007
  const {
3302
- definePartsStyle: definePartsStyle$4,
3303
- defineMultiStyleConfig: defineMultiStyleConfig$2
4008
+ defineMultiStyleConfig: defineMultiStyleConfig$4,
4009
+ definePartsStyle: definePartsStyle$5
3304
4010
  } = /*#__PURE__*/createMultiStyleConfigHelpers(switchAnatomy.keys);
3305
- const baseStyle$3 = /*#__PURE__*/definePartsStyle$4({
3306
- // define the part you're going to style
4011
+ const $width = /*#__PURE__*/cssVar$1('switch-track-width');
4012
+ const $height = /*#__PURE__*/cssVar$1('switch-track-height');
4013
+ const $diff = /*#__PURE__*/cssVar$1('switch-track-diff');
4014
+ const diffValue = /*#__PURE__*/calc.subtract($width, $height);
4015
+ const $translateX = /*#__PURE__*/cssVar$1('switch-thumb-x');
4016
+ const baseStyleThumb = /*#__PURE__*/defineStyle$1({
4017
+ bg: 'white',
4018
+ transitionProperty: 'transform',
4019
+ transitionDuration: 'normal',
4020
+ borderRadius: 'inherit',
4021
+ width: [$height.reference],
4022
+ height: [$height.reference],
4023
+ _checked: {
4024
+ transform: `translateX(${$translateX.reference})`
4025
+ }
4026
+ });
4027
+ const baseStyle$5 = /*#__PURE__*/definePartsStyle$5(() => ({
3307
4028
  container: {
3308
- // ...
3309
- },
3310
- thumb: {
3311
- bg: 'white'
4029
+ [$diff.variable]: diffValue,
4030
+ [$translateX.variable]: $diff.reference,
4031
+ _rtl: {
4032
+ [$translateX.variable]: calc($diff).negate().toString()
4033
+ }
3312
4034
  },
3313
4035
  track: {
3314
4036
  bg: 'neutral.400',
3315
4037
  p: 1,
3316
4038
  _checked: {
3317
- bg: 'primary.500'
4039
+ bg: 'primary.500',
4040
+ _disabled: {
4041
+ bg: 'neutral.600'
4042
+ }
4043
+ },
4044
+ _disabled: {
4045
+ bg: 'neutral.500',
4046
+ opacity: '100%'
4047
+ }
4048
+ },
4049
+ thumb: baseStyleThumb
4050
+ }));
4051
+ const sizes$2 = {
4052
+ sm: /*#__PURE__*/definePartsStyle$5({
4053
+ container: {
4054
+ [$width.variable]: '2.125rem',
4055
+ [$height.variable]: '1.063rem'
4056
+ }
4057
+ }),
4058
+ md: /*#__PURE__*/definePartsStyle$5({
4059
+ container: {
4060
+ [$width.variable]: '2.875rem',
4061
+ [$height.variable]: '1.5rem'
4062
+ }
4063
+ }),
4064
+ lg: /*#__PURE__*/definePartsStyle$5({
4065
+ container: {
4066
+ [$width.variable]: '3.625rem',
4067
+ [$height.variable]: '1.813rem'
3318
4068
  }
4069
+ })
4070
+ };
4071
+ const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$4({
4072
+ baseStyle: baseStyle$5,
4073
+ sizes: sizes$2,
4074
+ defaultProps: {
4075
+ size: 'md'
3319
4076
  }
3320
4077
  });
3321
- const Switch = /*#__PURE__*/defineMultiStyleConfig$2({
3322
- baseStyle: baseStyle$3
3323
- });
3324
4078
 
3325
4079
  const getProps = props => {
3326
4080
  const {
@@ -3345,7 +4099,7 @@ const getProps = props => {
3345
4099
  borderColor
3346
4100
  };
3347
4101
  };
3348
- const outline$1 = /*#__PURE__*/defineStyle$1(props => {
4102
+ const outline$1 = /*#__PURE__*/defineStyle(props => {
3349
4103
  const {
3350
4104
  focusBorderColor,
3351
4105
  borderColor
@@ -3361,7 +4115,7 @@ const outline$1 = /*#__PURE__*/defineStyle$1(props => {
3361
4115
  outline: 'none',
3362
4116
  _disabled: {
3363
4117
  opacity: 1,
3364
- color: 'black.low',
4118
+ color: 'black.medium',
3365
4119
  background: 'neutral.300'
3366
4120
  },
3367
4121
  _placeholder: {
@@ -3405,14 +4159,17 @@ const Textarea = /*#__PURE__*/defineStyleConfig$1({
3405
4159
 
3406
4160
  var components = {
3407
4161
  __proto__: null,
3408
- Button: Button,
4162
+ Alert: alertTheme,
4163
+ Button: Button$1,
4164
+ Card: CardStyle,
3409
4165
  Checkbox: Checkbox,
4166
+ Chips: Chips,
3410
4167
  FormLabel: FormLabel,
3411
4168
  Input: Input,
3412
4169
  LoaderStyle: LoaderStyle,
3413
4170
  Popover: Popover,
3414
4171
  Radio: Radio,
3415
- Switch: Switch,
4172
+ Switch: Switch$1,
3416
4173
  Textarea: Textarea
3417
4174
  };
3418
4175
 
@@ -3474,5 +4231,5 @@ const Provider = ({
3474
4231
  };
3475
4232
  Provider.displayName = 'Provider';
3476
4233
 
3477
- export { BreadCrumb, CheckboxComponent as Checkbox, DataTable, DatePickerMonth, Datepicker, Field, Header, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Tab, TabList, TabPanel, TextareaField, Uploader, theme, useInternalUI };
4234
+ export { Badge, Box, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Stack, Switch, Tab, TabList, TabPanel, Text, TextareaField, Uploader, Wrap, foundations, theme, useInternalUI };
3478
4235
  //# sourceMappingURL=internal-ui.esm.js.map