@ctlyst.id/internal-ui 1.0.4-canary.9 → 1.1.0-canary.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/components/alert/__stories__/alert.stories.d.ts +14 -0
  3. package/dist/components/alert/components/alert-action.d.ts +6 -0
  4. package/dist/components/alert/components/alert-close.d.ts +6 -0
  5. package/dist/components/alert/components/alert-context.d.ts +29 -0
  6. package/dist/components/alert/components/alert-description.d.ts +3 -0
  7. package/dist/components/alert/components/alert-icon.d.ts +6 -0
  8. package/dist/components/alert/components/alert-title.d.ts +3 -0
  9. package/dist/components/alert/components/alert.d.ts +25 -0
  10. package/dist/components/alert/components/icons.d.ts +3 -0
  11. package/dist/components/alert/components/index.d.ts +14 -0
  12. package/dist/components/alert/index.d.ts +1 -0
  13. package/dist/components/{base/stories/button.stories.d.ts → badge/__stories__/badge.stories.d.ts} +1 -1
  14. package/dist/components/badge/components/badge.d.ts +11 -0
  15. package/dist/components/badge/index.d.ts +2 -0
  16. package/dist/components/button/__stories__/button.stories.d.ts +14 -0
  17. package/dist/components/button/components/button.d.ts +4 -0
  18. package/dist/components/button/index.d.ts +2 -0
  19. package/dist/components/card/__stories__/card.stories.d.ts +11 -0
  20. package/dist/components/card/components/card.d.ts +8 -0
  21. package/dist/components/card/index.d.ts +2 -0
  22. package/dist/components/checkbox/__stories__/checkbox-group.stories.d.ts +13 -0
  23. package/dist/components/checkbox/__stories__/checkbox.stories.d.ts +12 -0
  24. package/dist/components/checkbox/components/checkbox-group.d.ts +18 -0
  25. package/dist/components/checkbox/components/checkbox.d.ts +16 -0
  26. package/dist/components/checkbox/index.d.ts +4 -0
  27. package/dist/components/chips/__stories__/chips.stories.d.ts +12 -0
  28. package/dist/components/chips/components/chips.d.ts +19 -0
  29. package/dist/components/chips/index.d.ts +2 -0
  30. package/dist/components/field/components/field.d.ts +4 -2
  31. package/dist/components/field/index.d.ts +0 -4
  32. package/dist/components/form/__stories__/input.stories.d.ts +14 -0
  33. package/dist/components/form/__stories__/textarea.stories.d.ts +10 -0
  34. package/dist/components/form/components/input-addon.d.ts +7 -0
  35. package/dist/components/{field → form}/components/input-field.d.ts +4 -1
  36. package/dist/components/{field/components/textarea-field.d.ts → form/components/textarea.d.ts} +2 -6
  37. package/dist/components/form/index.d.ts +4 -0
  38. package/dist/components/form/styles/input-field.d.ts +4 -0
  39. package/dist/components/index.d.ts +9 -0
  40. package/dist/components/layouting/components/box.d.ts +4 -0
  41. package/dist/components/layouting/components/container.d.ts +4 -0
  42. package/dist/components/layouting/components/flex.d.ts +4 -0
  43. package/dist/components/layouting/components/grid.d.ts +4 -0
  44. package/dist/components/layouting/components/stack.d.ts +4 -0
  45. package/dist/components/layouting/components/wrap.d.ts +4 -0
  46. package/dist/components/layouting/index.d.ts +12 -0
  47. package/dist/components/{base/stories/checkbox.stories.d.ts → loader/__stories__/loader.stories.d.ts} +3 -2
  48. package/dist/components/loader/components/loader.d.ts +9 -0
  49. package/dist/components/loader/index.d.ts +2 -0
  50. package/dist/components/radio/__stories__/radio-group.stories.d.ts +13 -0
  51. package/dist/components/radio/__stories__/radio.stories.d.ts +12 -0
  52. package/dist/components/radio/components/radio-group.d.ts +17 -0
  53. package/dist/components/radio/components/radio.d.ts +16 -0
  54. package/dist/components/radio/index.d.ts +4 -0
  55. package/dist/components/rating/__stories__/rating.stories.d.ts +10 -0
  56. package/dist/components/rating/components/rating.d.ts +6 -0
  57. package/dist/components/rating/index.d.ts +2 -0
  58. package/dist/components/switch/__stories__/switch.stories.d.ts +13 -0
  59. package/dist/components/switch/components/switch.d.ts +18 -0
  60. package/dist/components/switch/index.d.ts +2 -0
  61. package/dist/components/text/components/text.d.ts +4 -0
  62. package/dist/components/text/index.d.ts +2 -0
  63. package/dist/config/{foundations.stories.d.ts → __stories__/foundations.stories.d.ts} +1 -0
  64. package/dist/config/theme/components/alert.d.ts +79 -0
  65. package/dist/config/theme/components/card.d.ts +18 -0
  66. package/dist/config/theme/components/checkbox.d.ts +87 -2
  67. package/dist/config/theme/components/chips.d.ts +30 -0
  68. package/dist/config/theme/components/index.d.ts +5 -1
  69. package/dist/config/theme/components/input.d.ts +8 -21
  70. package/dist/config/theme/components/loader.d.ts +85 -0
  71. package/dist/config/theme/components/radio.d.ts +98 -2
  72. package/dist/config/theme/components/switch.d.ts +43 -9
  73. package/dist/config/theme/components/textarea.d.ts +54 -2
  74. package/dist/config/theme/foundations/index.d.ts +3 -2
  75. package/dist/config/theme/foundations/shadows.d.ts +15 -0
  76. package/dist/config/theme/foundations/typography.d.ts +25 -7
  77. package/dist/config/theme/themeConfiguration.d.ts +4 -2
  78. package/dist/internal-ui.cjs.development.js +1411 -377
  79. package/dist/internal-ui.cjs.development.js.map +1 -1
  80. package/dist/internal-ui.cjs.production.min.js +10 -10
  81. package/dist/internal-ui.cjs.production.min.js.map +1 -1
  82. package/dist/internal-ui.esm.js +1413 -395
  83. package/dist/internal-ui.esm.js.map +1 -1
  84. package/dist/provider/{provider.d.ts → components/provider.d.ts} +1 -1
  85. package/dist/provider/index.d.ts +2 -2
  86. package/package.json +12 -11
  87. package/dist/components/base/stories/input.stories.d.ts +0 -16
  88. package/dist/components/base/stories/radio.stories.d.ts +0 -15
  89. /package/dist/components/base/{stories → __stories__}/switch.stories.d.ts +0 -0
  90. /package/dist/components/breadcrumb/{components/BreadCrumb.stories.d.ts → __stories__/breadcrumb.stories.d.ts} +0 -0
  91. /package/dist/components/data-table/{stories/data-table.stories.d.ts → __stories__/datatable.stories.d.ts} +0 -0
  92. /package/dist/components/datepicker/{components → __stories__}/datepicker.stories.d.ts +0 -0
  93. /package/dist/components/header/{stories → __stories__}/header.stories.d.ts +0 -0
  94. /package/dist/components/modal/{stories → __stories__}/modal.stories.d.ts +0 -0
  95. /package/dist/components/navigation/{stories → __stories__}/navigation.stories.d.ts +0 -0
  96. /package/dist/components/pagination/{stories → __stories__}/pagination.stories.d.ts +0 -0
  97. /package/dist/components/select/{stories → __stories__}/select.stories.d.ts +0 -0
  98. /package/dist/components/tabs/{stories → __stories__}/tabs.stories.d.ts +0 -0
  99. /package/dist/components/uploader/{stories → __stories__}/uploader.stories.d.ts +0 -0
  100. /package/dist/provider/{provider.stories.d.ts → __stories__/provider.stories.d.ts} +0 -0
@@ -1,22 +1,24 @@
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';
1
+ import { 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, Badge, 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, 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
- import { css, Global } from '@emotion/react';
6
+ import { css, Global, keyframes } from '@emotion/react';
7
7
  import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
8
8
  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, radioAnatomy, switchAnatomy, popoverAnatomy } from '@chakra-ui/anatomy';
19
- import { createMultiStyleConfigHelpers, cssVar, defineStyleConfig, defineStyle } from '@chakra-ui/styled-system';
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';
20
22
  import axios from 'axios';
21
23
 
22
24
  /* eslint-disable react-hooks/rules-of-hooks */
@@ -114,6 +116,181 @@ BreadCrumb.defaultProps = {
114
116
  spacing: 2
115
117
  };
116
118
 
119
+ const Loader = /*#__PURE__*/forwardRef((props, ref) => {
120
+ const styles = useStyleConfig('LoaderStyle', props);
121
+ return /*#__PURE__*/React__default.createElement(Box, {
122
+ ref: ref,
123
+ __css: styles
124
+ });
125
+ });
126
+
127
+ const Button = props => {
128
+ const {
129
+ children,
130
+ variant,
131
+ size,
132
+ ...rest
133
+ } = props;
134
+ const getLoaderSize = () => {
135
+ if (size === 'lg') return 'md';
136
+ if (size === 'md') return 'sm';
137
+ return 'xs';
138
+ };
139
+ const getLoaderColor = () => {
140
+ if (variant === 'primary' || variant === 'danger') return 'white';
141
+ if (variant === 'outline-danger') return 'danger';
142
+ return 'primary';
143
+ };
144
+ return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
145
+ size: size,
146
+ variant: variant,
147
+ spinner: /*#__PURE__*/React__default.createElement(Loader, {
148
+ size: getLoaderSize(),
149
+ color: getLoaderColor()
150
+ })
151
+ }, rest), children);
152
+ };
153
+
154
+ const CardCustom = /*#__PURE__*/forwardRef$1(({
155
+ children,
156
+ ...rest
157
+ }, ref) => {
158
+ const styles = useStyleConfig('Card', rest);
159
+ return /*#__PURE__*/React__default.createElement(Card, Object.assign({
160
+ __css: styles,
161
+ backgroundColor: "white.high",
162
+ ref: ref
163
+ }, rest), children);
164
+ });
165
+ CardCustom.defaultProps = {
166
+ withShadow: true,
167
+ isRounded: true
168
+ };
169
+
170
+ function CheckboxComponent({
171
+ isError = false,
172
+ helpText = '',
173
+ errorText = '',
174
+ children,
175
+ isDisabled,
176
+ ...rest
177
+ }) {
178
+ const variant = isError ? 'errors' : 'unstyled';
179
+ return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
180
+ display: "flex"
181
+ }, /*#__PURE__*/React__default.createElement(Checkbox$1, Object.assign({
182
+ variant: variant
183
+ }, rest, {
184
+ isDisabled: isDisabled
185
+ }), children && /*#__PURE__*/React__default.createElement(Text, {
186
+ textStyle: "text.sm",
187
+ color: isDisabled ? 'black.low' : 'black.high'
188
+ }, children))), /*#__PURE__*/React__default.createElement(Box, {
189
+ mt: "5px",
190
+ ml: "24px"
191
+ }, isError ? /*#__PURE__*/React__default.createElement(Text, {
192
+ textStyle: "text.xs",
193
+ color: "danger.500"
194
+ }, errorText) : /*#__PURE__*/React__default.createElement(Text, {
195
+ textStyle: "text.xs",
196
+ color: "black.medium"
197
+ }, helpText)));
198
+ }
199
+ CheckboxComponent.defaultProps = {
200
+ isError: false,
201
+ helpText: '',
202
+ errorText: ''
203
+ };
204
+
205
+ /* eslint-disable no-nested-ternary */
206
+ const Field = props => {
207
+ const {
208
+ label,
209
+ isError,
210
+ errorMessage,
211
+ leftHelperText,
212
+ rightHelperText,
213
+ isRequired,
214
+ children,
215
+ isSuccess
216
+ } = props;
217
+ const getHelperColor = () => {
218
+ if (isError) return 'danger.500';
219
+ if (isSuccess) return 'success.500';
220
+ return 'black.medium';
221
+ };
222
+ const getJustifyContentHelper = () => {
223
+ if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
224
+ return 'space-between';
225
+ };
226
+ const helperColor = getHelperColor();
227
+ const justifyHelper = getJustifyContentHelper();
228
+ return /*#__PURE__*/React__default.createElement(FormControl, {
229
+ isInvalid: isError
230
+ }, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
231
+ mb: 1,
232
+ fontSize: "text.sm",
233
+ requiredIndicator: undefined
234
+ }, isRequired && /*#__PURE__*/React__default.createElement(Box, {
235
+ as: "span",
236
+ color: "danger.500",
237
+ ml: 0,
238
+ mr: 1
239
+ }, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
240
+ display: "flex",
241
+ width: "full",
242
+ justifyContent: justifyHelper
243
+ }, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
244
+ fontSize: "text.xs",
245
+ color: helperColor,
246
+ mt: 1
247
+ }, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
248
+ fontSize: "text.xs",
249
+ color: "danger.500",
250
+ mt: 1
251
+ }, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
252
+ fontSize: "text.xs",
253
+ color: helperColor,
254
+ mt: 1
255
+ }, rightHelperText)));
256
+ };
257
+ Field.defaultProps = {
258
+ label: '',
259
+ isError: false,
260
+ isSuccess: false,
261
+ errorMessage: undefined,
262
+ leftHelperText: undefined,
263
+ rightHelperText: undefined,
264
+ isRequired: false
265
+ };
266
+
267
+ function CheckboxGroupComponent(props) {
268
+ const {
269
+ children,
270
+ label,
271
+ helpText,
272
+ isError,
273
+ errorMessage,
274
+ ...rest
275
+ } = props;
276
+ return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
277
+ label: label,
278
+ leftHelperText: helpText,
279
+ isError: isError,
280
+ errorMessage: errorMessage
281
+ }), /*#__PURE__*/React__default.createElement(Box, {
282
+ mt: "12px"
283
+ }, /*#__PURE__*/React__default.createElement(CheckboxGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
284
+ spacing: [1, '16px'],
285
+ direction: ['column', 'row']
286
+ }, children))));
287
+ }
288
+ CheckboxGroupComponent.defaultProps = {
289
+ helpText: '',
290
+ isError: false,
291
+ errorMessage: ''
292
+ };
293
+
117
294
  const IndeterminateCheckbox = ({
118
295
  indeterminate = false,
119
296
  ...rest
@@ -1302,7 +1479,7 @@ const success = {
1302
1479
  '200': '#A9F9B5',
1303
1480
  '300': '#7CEE98',
1304
1481
  '400': '#58DD86',
1305
- '500': '#28c76f',
1482
+ '500': '#28C76F',
1306
1483
  '600': '#1DAB6A',
1307
1484
  '700': '#148F63',
1308
1485
  '800': '#0C7359',
@@ -1430,8 +1607,13 @@ const radius = {
1430
1607
  full: '9999px'
1431
1608
  };
1432
1609
 
1433
- const spacing = {
1434
- ...theme$1.space,
1610
+ const shadows = {
1611
+ ...theme$1.shadows,
1612
+ raised: '0px 4px 20px rgba(0, 0, 0, 0.05)'
1613
+ };
1614
+
1615
+ const sizes = {
1616
+ ...theme$1.sizes,
1435
1617
  4.5: '1.125rem',
1436
1618
  9.5: '2.375rem',
1437
1619
  18: '4.5rem',
@@ -1440,8 +1622,8 @@ const spacing = {
1440
1622
  30: '7.5rem'
1441
1623
  };
1442
1624
 
1443
- const sizes = {
1444
- ...theme$1.sizes,
1625
+ const spacing = {
1626
+ ...theme$1.space,
1445
1627
  4.5: '1.125rem',
1446
1628
  9.5: '2.375rem',
1447
1629
  18: '4.5rem',
@@ -1472,6 +1654,11 @@ const lineHeights = {
1472
1654
  short: 1.375,
1473
1655
  base: 1.5,
1474
1656
  tall: 1.625,
1657
+ 64: '4rem',
1658
+ 56: '3.5rem',
1659
+ 48: '3rem',
1660
+ 40: '2.5rem',
1661
+ 36: '2.25rem',
1475
1662
  34: '2.125rem',
1476
1663
  32: '2rem',
1477
1664
  30: '1.875rem',
@@ -1485,14 +1672,22 @@ const lineHeights = {
1485
1672
  14: '0.875rem',
1486
1673
  12: '0.75rem'
1487
1674
  };
1675
+ const letterSpacings = {
1676
+ tighter: '-0.05em',
1677
+ tight: '-0.025em',
1678
+ normal: '0',
1679
+ wide: '0.025em',
1680
+ wider: '0.05em',
1681
+ widest: '0.1em'
1682
+ };
1488
1683
  const fontSizes = {
1489
1684
  heading: {
1490
- 1: '1.75rem',
1491
- 2: '1.5rem',
1492
- 3: '1.25rem',
1493
- 4: '1.125rem',
1494
- 5: '1rem',
1495
- 6: '0.875rem'
1685
+ 1: '2.5rem',
1686
+ 2: '2rem',
1687
+ 3: '1.75rem',
1688
+ 4: '1.5rem',
1689
+ 5: '1.375rem',
1690
+ 6: '1.125rem'
1496
1691
  },
1497
1692
  text: {
1498
1693
  xl: '1.125rem',
@@ -1518,85 +1713,90 @@ const fontSizes = {
1518
1713
  const heading = {
1519
1714
  1: {
1520
1715
  fontSize: fontSizes.heading[1],
1521
- fontWeight: 'bold',
1522
- lineHeight: '3.5rem',
1523
- letterSpacing: '0'
1716
+ fontWeight: fontWeights.semibold,
1717
+ lineHeight: lineHeights[64],
1718
+ letterSpacing: letterSpacings.normal
1524
1719
  },
1525
1720
  2: {
1526
1721
  fontSize: fontSizes.heading[2],
1527
- fontWeight: 'bold',
1528
- lineHeight: '2.875rem',
1529
- letterSpacing: '0'
1722
+ fontWeight: fontWeights.semibold,
1723
+ lineHeight: lineHeights[56],
1724
+ letterSpacing: letterSpacings.normal
1530
1725
  },
1531
1726
  3: {
1532
1727
  fontSize: fontSizes.heading[3],
1533
- fontWeight: 'bold',
1534
- lineHeight: '2.5rem',
1535
- letterSpacing: '0'
1728
+ fontWeight: fontWeights.semibold,
1729
+ lineHeight: lineHeights[48],
1730
+ letterSpacing: letterSpacings.normal
1536
1731
  },
1537
1732
  4: {
1538
1733
  fontSize: fontSizes.heading[4],
1539
- fontWeight: 'bold',
1540
- lineHeight: '2rem',
1541
- letterSpacing: '0'
1734
+ fontWeight: fontWeights.semibold,
1735
+ lineHeight: lineHeights[40],
1736
+ letterSpacing: letterSpacings.normal
1542
1737
  },
1543
1738
  5: {
1544
1739
  fontSize: fontSizes.heading[5],
1545
- fontWeight: 'bold',
1546
- lineHeight: '1.5rem',
1547
- letterSpacing: '0'
1740
+ fontWeight: fontWeights.semibold,
1741
+ lineHeight: lineHeights[36],
1742
+ letterSpacing: letterSpacings.normal
1548
1743
  },
1549
1744
  6: {
1550
1745
  fontSize: fontSizes.heading[6],
1551
- fontWeight: 'bold',
1552
- lineHeight: '1.375rem',
1553
- letterSpacing: '0'
1746
+ fontWeight: fontWeights.semibold,
1747
+ lineHeight: lineHeights[32],
1748
+ letterSpacing: letterSpacings.normal
1554
1749
  }
1555
1750
  };
1556
1751
  const text = {
1557
1752
  xl: {
1558
1753
  fontSize: fontSizes.text.xl,
1754
+ fontWeight: fontWeights.normal,
1559
1755
  lineHeight: lineHeights[28],
1560
- letterSpacing: '0'
1756
+ letterSpacing: letterSpacings.normal
1561
1757
  },
1562
1758
  lg: {
1563
1759
  fontSize: fontSizes.text.lg,
1760
+ fontWeight: fontWeights.normal,
1564
1761
  lineHeight: lineHeights[24],
1565
- letterSpacing: '0'
1762
+ letterSpacing: letterSpacings.normal
1566
1763
  },
1567
1764
  md: {
1568
1765
  fontSize: fontSizes.text.md,
1766
+ fontWeight: fontWeights.normal,
1569
1767
  lineHeight: lineHeights[22],
1570
- letterSpacing: '0'
1768
+ letterSpacing: letterSpacings.normal
1571
1769
  },
1572
1770
  sm: {
1573
1771
  fontSize: fontSizes.text.sm,
1772
+ fontWeight: fontWeights.normal,
1574
1773
  lineHeight: lineHeights[18],
1575
- letterSpacing: '0'
1774
+ letterSpacing: letterSpacings.normal
1576
1775
  },
1577
1776
  xs: {
1578
1777
  fontSize: fontSizes.text.xs,
1778
+ fontWeight: fontWeights.normal,
1579
1779
  lineHeight: lineHeights[14],
1580
- letterSpacing: '0'
1780
+ letterSpacing: letterSpacings.normal
1581
1781
  }
1582
1782
  };
1583
1783
  const button = {
1584
1784
  lg: {
1585
1785
  fontSize: fontSizes.button.lg,
1586
1786
  lineHeight: lineHeights[28],
1587
- letterSpacing: '0',
1787
+ letterSpacing: letterSpacings.normal,
1588
1788
  fontWeight: fontWeights.normal
1589
1789
  },
1590
1790
  md: {
1591
1791
  fontSize: fontSizes.button.md,
1592
1792
  lineHeight: lineHeights[22],
1593
- letterSpacing: '0',
1793
+ letterSpacing: letterSpacings.normal,
1594
1794
  fontWeight: fontWeights.normal
1595
1795
  },
1596
1796
  sm: {
1597
1797
  fontSize: fontSizes.button.sm,
1598
1798
  lineHeight: lineHeights[14],
1599
- letterSpacing: '0',
1799
+ letterSpacing: letterSpacings.normal,
1600
1800
  fontWeight: fontWeights.normal
1601
1801
  }
1602
1802
  };
@@ -1604,19 +1804,19 @@ const field = {
1604
1804
  lg: {
1605
1805
  fontSize: fontSizes.field.lg,
1606
1806
  lineHeight: lineHeights[24],
1607
- letterSpacing: '0',
1807
+ letterSpacing: letterSpacings.normal,
1608
1808
  fontWeight: fontWeights.normal
1609
1809
  },
1610
1810
  md: {
1611
1811
  fontSize: fontSizes.field.md,
1612
1812
  lineHeight: lineHeights[22],
1613
- letterSpacing: '0',
1813
+ letterSpacing: letterSpacings.normal,
1614
1814
  fontWeight: fontWeights.normal
1615
1815
  },
1616
1816
  sm: {
1617
1817
  fontSize: fontSizes.field.sm,
1618
1818
  lineHeight: lineHeights[18],
1619
- letterSpacing: '0',
1819
+ letterSpacing: letterSpacings.normal,
1620
1820
  fontWeight: fontWeights.normal
1621
1821
  }
1622
1822
  };
@@ -1633,10 +1833,12 @@ var foundations = {
1633
1833
  __proto__: null,
1634
1834
  colors: colors,
1635
1835
  radii: radius,
1636
- space: spacing,
1836
+ shadows: shadows,
1637
1837
  sizes: sizes,
1838
+ space: spacing,
1638
1839
  fonts: fonts,
1639
1840
  fontSizes: fontSizes,
1841
+ letterSpacings: letterSpacings,
1640
1842
  lineHeights: lineHeights,
1641
1843
  textStyles: textStyles
1642
1844
  };
@@ -1685,41 +1887,60 @@ MultiDatePickerMonth.defaultProps = {
1685
1887
  isError: false
1686
1888
  };
1687
1889
 
1688
- /* eslint-disable no-nested-ternary */
1689
- const Field = props => {
1890
+ const getProperties = props => {
1690
1891
  const {
1691
- label,
1692
1892
  isError,
1693
- error,
1694
- helperText,
1695
- isRequired,
1696
- children
1893
+ isDisabled,
1894
+ isSuccess
1697
1895
  } = props;
1698
- return /*#__PURE__*/React__default.createElement(FormControl, {
1699
- isInvalid: isError
1700
- }, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
1701
- fontSize: "field.sm",
1702
- requiredIndicator: undefined
1703
- }, isRequired && /*#__PURE__*/React__default.createElement(Box, {
1704
- as: "span",
1705
- color: "red.500",
1706
- ml: 0,
1707
- mr: 1
1708
- }, "*"), label) : label), children, !isError ? helperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
1709
- fontSize: "field.sm"
1710
- }, helperText) : typeof error === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
1711
- textStyle: "field.sm",
1712
- fontSize: "field.sm",
1713
- mt: 1,
1714
- marginStart: 1
1715
- }, error) : error);
1896
+ let outlineColor = 'neutral.400';
1897
+ let focusColor = 'primary.500';
1898
+ if (isError || isDisabled || isSuccess) {
1899
+ if (isError) outlineColor = 'danger.500';else if (isSuccess) outlineColor = 'success.500';
1900
+ focusColor = outlineColor;
1901
+ }
1902
+ return {
1903
+ outlineColor,
1904
+ focusColor
1905
+ };
1716
1906
  };
1717
- Field.defaultProps = {
1718
- label: '',
1719
- isError: false,
1720
- error: undefined,
1721
- helperText: undefined,
1722
- isRequired: false
1907
+ const getWrapperStyle = props => {
1908
+ const {
1909
+ outlineColor,
1910
+ focusColor
1911
+ } = getProperties(props);
1912
+ const style = {
1913
+ border: '1px solid',
1914
+ borderColor: outlineColor,
1915
+ borderRadius: 'md',
1916
+ transition: 'all 0.15s',
1917
+ boxShadow: 'none',
1918
+ _focusWithin: {
1919
+ borderColor: focusColor
1920
+ }
1921
+ };
1922
+ return defineStyle(style);
1923
+ };
1924
+
1925
+ const InputAddonLeft = ({
1926
+ children
1927
+ }) => {
1928
+ return /*#__PURE__*/React__default.createElement(Box, {
1929
+ borderLeftRadius: "md",
1930
+ backgroundColor: "neutral.200",
1931
+ px: 3,
1932
+ py: 2.5
1933
+ }, children);
1934
+ };
1935
+ const InputAddonRight = ({
1936
+ children
1937
+ }) => {
1938
+ return /*#__PURE__*/React__default.createElement(Box, {
1939
+ borderRightRadius: "md",
1940
+ backgroundColor: "neutral.200",
1941
+ px: 3,
1942
+ py: 2.5
1943
+ }, children);
1723
1944
  };
1724
1945
 
1725
1946
  const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
@@ -1734,46 +1955,126 @@ const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1734
1955
  isRequired,
1735
1956
  label,
1736
1957
  isError,
1737
- error,
1738
- helperText,
1958
+ isSuccess,
1959
+ isDisabled,
1960
+ errorMessage,
1961
+ leftHelperText,
1962
+ rightHelperText,
1963
+ withClear,
1964
+ onClear,
1965
+ isLoading,
1739
1966
  ...inputProps
1740
1967
  } = props;
1968
+ const wrapperStyle = getWrapperStyle(props);
1969
+ const [isShowPassword, setIsShowPassword] = useState(false);
1970
+ const inputType = useMemo(() => {
1971
+ return type === 'password' && isShowPassword ? 'text' : type;
1972
+ }, [isShowPassword, type]);
1973
+ const fontSize = useMemo(() => {
1974
+ if (type === 'password') {
1975
+ if (!isShowPassword && value) return 'text.xl';
1976
+ }
1977
+ return 'text.sm';
1978
+ }, [isShowPassword, type, value]);
1979
+ const iconColor = useMemo(() => {
1980
+ return isDisabled ? 'black.low' : 'black.medium';
1981
+ }, [isDisabled]);
1741
1982
  return /*#__PURE__*/React__default.createElement(Field, {
1742
1983
  label: label,
1984
+ isSuccess: isSuccess,
1743
1985
  isError: isError,
1744
- error: error,
1745
- helperText: helperText,
1986
+ errorMessage: errorMessage,
1987
+ leftHelperText: leftHelperText,
1988
+ rightHelperText: rightHelperText,
1746
1989
  isRequired: isRequired
1990
+ }, /*#__PURE__*/React__default.createElement(Box, {
1991
+ __css: wrapperStyle
1747
1992
  }, /*#__PURE__*/React__default.createElement(InputGroup, {
1748
- size: size
1749
- }, addOnLeft && /*#__PURE__*/React__default.createElement(InputLeftAddon, null, addOnLeft), elementLeft && /*#__PURE__*/React__default.createElement(InputLeftElement, null, elementLeft), /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
1993
+ size: size,
1994
+ borderRadius: "md",
1995
+ backgroundColor: isDisabled ? 'neutral.300' : 'white.high',
1996
+ cursor: isDisabled ? 'not-allowed' : 'default'
1997
+ }, addOnLeft && /*#__PURE__*/React__default.createElement(InputAddonLeft, null, addOnLeft), /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
1750
1998
  ref: ref,
1751
- type: type,
1752
- value: value
1753
- }, inputProps)), addOnRight && /*#__PURE__*/React__default.createElement(InputRightAddon, null, addOnRight), elementRight && /*#__PURE__*/React__default.createElement(InputRightElement, null, elementRight)));
1999
+ type: inputType,
2000
+ value: value,
2001
+ isDisabled: isDisabled,
2002
+ isSuccess: isSuccess
2003
+ }, inputProps, {
2004
+ fontSize: fontSize
2005
+ })), (withClear || isLoading || type === 'password') && /*#__PURE__*/React__default.createElement(Box, {
2006
+ "data-test-id": "Pg7ttgRey7InxE4qzTjW_",
2007
+ display: "flex",
2008
+ alignItems: "center",
2009
+ justifyContent: "center",
2010
+ width: "16px",
2011
+ mr: "10px"
2012
+ }, withClear && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
2013
+ display: "flex",
2014
+ justifyContent: "center",
2015
+ onClick: !isDisabled ? onClear : undefined,
2016
+ cursor: isDisabled ? 'not-allowed' : 'pointer'
2017
+ }, /*#__PURE__*/React__default.createElement(Close, {
2018
+ size: 4,
2019
+ color: iconColor
2020
+ })), type === 'password' && !isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
2021
+ "data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
2022
+ onClick: () => {
2023
+ if (!isDisabled) setIsShowPassword(true);
2024
+ },
2025
+ cursor: isDisabled ? 'not-allowed' : 'pointer',
2026
+ display: "flex",
2027
+ justifyContent: "center"
2028
+ }, /*#__PURE__*/React__default.createElement(EyeOff, {
2029
+ size: 4,
2030
+ color: iconColor
2031
+ })), type === 'password' && isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
2032
+ "data-test-id": "sfc2388bmeXBmdla45Ibk",
2033
+ onClick: () => {
2034
+ if (!isDisabled) setIsShowPassword(false);
2035
+ },
2036
+ cursor: isDisabled ? 'not-allowed' : 'pointer',
2037
+ display: "flex",
2038
+ justifyContent: "center"
2039
+ }, /*#__PURE__*/React__default.createElement(Eye, {
2040
+ size: 4,
2041
+ color: iconColor
2042
+ })), isLoading && /*#__PURE__*/React__default.createElement(Loader, {
2043
+ size: "sm"
2044
+ })), "(", addOnRight && /*#__PURE__*/React__default.createElement(InputAddonRight, null, addOnRight))));
1754
2045
  });
1755
2046
  InputField.defaultProps = {
1756
2047
  addOnLeft: undefined,
1757
2048
  addOnRight: undefined,
1758
2049
  elementLeft: undefined,
1759
- elementRight: undefined
2050
+ elementRight: undefined,
2051
+ withClear: undefined,
2052
+ isLoading: undefined,
2053
+ onClear: undefined
1760
2054
  };
1761
2055
 
1762
2056
  const TextareaField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1763
2057
  const {
1764
2058
  value,
2059
+ isLoading,
1765
2060
  ...inputProps
1766
2061
  } = props;
1767
- return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, inputProps), /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
2062
+ return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, inputProps), /*#__PURE__*/React__default.createElement(Box, {
2063
+ position: "relative"
2064
+ }, /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1768
2065
  ref: ref,
1769
2066
  value: value
1770
- }, inputProps)));
2067
+ }, inputProps)), isLoading && /*#__PURE__*/React__default.createElement(Box, {
2068
+ zIndex: 999,
2069
+ top: 2,
2070
+ right: 2,
2071
+ position: "absolute"
2072
+ }, /*#__PURE__*/React__default.createElement(Loader, {
2073
+ size: "sm"
2074
+ }))));
1771
2075
  });
1772
2076
  TextareaField.defaultProps = {
1773
- addOnLeft: undefined,
1774
- addOnRight: undefined,
1775
- elementLeft: undefined,
1776
- elementRight: undefined
2077
+ isLoading: undefined
1777
2078
  };
1778
2079
 
1779
2080
  const XMSLogo = () => /*#__PURE__*/React__default.createElement(Image, {
@@ -1970,7 +2271,7 @@ const ModalBody = /*#__PURE__*/React__default.forwardRef(({
1970
2271
  }, rest), children);
1971
2272
  });
1972
2273
 
1973
- const ModalCloseButton = /*#__PURE__*/forwardRef((props, ref) => {
2274
+ const ModalCloseButton = /*#__PURE__*/forwardRef$1((props, ref) => {
1974
2275
  return /*#__PURE__*/React__default.createElement(ModalCloseButton$1, Object.assign({
1975
2276
  ref: ref,
1976
2277
  top: 4,
@@ -1980,7 +2281,7 @@ const ModalCloseButton = /*#__PURE__*/forwardRef((props, ref) => {
1980
2281
  }, props));
1981
2282
  });
1982
2283
 
1983
- const ModalFooter = /*#__PURE__*/forwardRef(({
2284
+ const ModalFooter = /*#__PURE__*/forwardRef$1(({
1984
2285
  children,
1985
2286
  ...rest
1986
2287
  }, ref) => {
@@ -1991,7 +2292,7 @@ const ModalFooter = /*#__PURE__*/forwardRef(({
1991
2292
  }, rest), children);
1992
2293
  });
1993
2294
 
1994
- const ModalHeader = /*#__PURE__*/forwardRef(({
2295
+ const ModalHeader = /*#__PURE__*/forwardRef$1(({
1995
2296
  children,
1996
2297
  ...rest
1997
2298
  }, ref) => {
@@ -2142,7 +2443,7 @@ Navigation.defaultProps = {
2142
2443
  host: undefined
2143
2444
  };
2144
2445
 
2145
- const PaginationButton = /*#__PURE__*/forwardRef$1(({
2446
+ const PaginationButton = /*#__PURE__*/forwardRef(({
2146
2447
  className,
2147
2448
  style,
2148
2449
  isActive,
@@ -2153,7 +2454,7 @@ const PaginationButton = /*#__PURE__*/forwardRef$1(({
2153
2454
  const btnColor = useColorModeValue('black.high', 'primary.300');
2154
2455
  const btnNotActiveBg = useColorModeValue('secondary.50', 'primary.500');
2155
2456
  const btnNotActiveColor = useColorModeValue('primary.500', 'white');
2156
- return /*#__PURE__*/React__default.createElement(Button$1, Object.assign({
2457
+ return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
2157
2458
  "data-test-id": "Pagination-Button",
2158
2459
  ref: ref,
2159
2460
  className: className,
@@ -2362,6 +2663,68 @@ PaginationFilter.defaultProps = {
2362
2663
  label: undefined
2363
2664
  };
2364
2665
 
2666
+ function RadioComponent({
2667
+ isError = false,
2668
+ helpText = '',
2669
+ errorText = '',
2670
+ children,
2671
+ isDisabled,
2672
+ ...rest
2673
+ }) {
2674
+ const variant = isError ? 'errors' : 'unstyled';
2675
+ return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
2676
+ display: "flex"
2677
+ }, /*#__PURE__*/React__default.createElement(Radio$1, Object.assign({
2678
+ variant: variant
2679
+ }, rest, {
2680
+ isDisabled: isDisabled
2681
+ }), children && /*#__PURE__*/React__default.createElement(Text, {
2682
+ textStyle: "text.sm",
2683
+ color: isDisabled ? 'black.low' : 'black.high'
2684
+ }, children))), /*#__PURE__*/React__default.createElement(Box, {
2685
+ mt: "5px",
2686
+ ml: "24px"
2687
+ }, isError ? /*#__PURE__*/React__default.createElement(Text, {
2688
+ textStyle: "text.xs",
2689
+ color: "danger.500"
2690
+ }, errorText) : /*#__PURE__*/React__default.createElement(Text, {
2691
+ textStyle: "text.xs",
2692
+ color: "black.medium"
2693
+ }, helpText)));
2694
+ }
2695
+ RadioComponent.defaultProps = {
2696
+ isError: false,
2697
+ helpText: '',
2698
+ errorText: ''
2699
+ };
2700
+
2701
+ function RadioGroupComponent(props) {
2702
+ const {
2703
+ children,
2704
+ label,
2705
+ helpText,
2706
+ isError,
2707
+ errorMessage,
2708
+ ...rest
2709
+ } = props;
2710
+ return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
2711
+ label: label,
2712
+ leftHelperText: helpText,
2713
+ isError: isError,
2714
+ errorMessage: errorMessage
2715
+ }), /*#__PURE__*/React__default.createElement(Box, {
2716
+ mt: "12px"
2717
+ }, /*#__PURE__*/React__default.createElement(RadioGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
2718
+ spacing: [1, '16px'],
2719
+ direction: ['column', 'row']
2720
+ }, children))));
2721
+ }
2722
+ RadioGroupComponent.defaultProps = {
2723
+ helpText: '',
2724
+ isError: false,
2725
+ errorMessage: ''
2726
+ };
2727
+
2365
2728
  const SelectWrapper = ({
2366
2729
  children,
2367
2730
  isError = false
@@ -2554,7 +2917,96 @@ function SelectCreatable({
2554
2917
  })));
2555
2918
  }
2556
2919
 
2557
- const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
2920
+ /**
2921
+ * The `Switch` component is used as an alternative for the checkbox component for switching between "enabled" and "disabled" states.
2922
+ *
2923
+ * @see Docs https://chakra-ui.com/docs/components/switch
2924
+ * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/
2925
+ */
2926
+ const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
2927
+ const styles = useMultiStyleConfig('Switch', props);
2928
+ const {
2929
+ size = 'md'
2930
+ } = props;
2931
+ const {
2932
+ spacing = '0.5rem',
2933
+ children,
2934
+ ...ownProps
2935
+ } = omitThemingProps(props);
2936
+ const {
2937
+ state,
2938
+ getInputProps,
2939
+ getCheckboxProps,
2940
+ getRootProps,
2941
+ getLabelProps
2942
+ } = useCheckbox(ownProps);
2943
+ const containerStyles = useMemo(() => ({
2944
+ display: 'inline-block',
2945
+ position: 'relative',
2946
+ verticalAlign: 'middle',
2947
+ lineHeight: 0,
2948
+ ...styles.container
2949
+ }), [styles.container]);
2950
+ const trackStyles = useMemo(() => ({
2951
+ display: 'inline-flex',
2952
+ flexShrink: 0,
2953
+ justifyContent: 'flex-start',
2954
+ boxSizing: 'content-box',
2955
+ cursor: 'pointer',
2956
+ width: 200,
2957
+ ...styles.track
2958
+ }), [styles.track]);
2959
+ const labelStyles = useMemo(() => ({
2960
+ userSelect: 'none',
2961
+ marginStart: spacing,
2962
+ ...styles.label
2963
+ }), [spacing, styles.label]);
2964
+ const getIconSize = value => {
2965
+ const iconSize = {
2966
+ sm: 3,
2967
+ md: 4,
2968
+ lg: 5
2969
+ };
2970
+ return iconSize[value];
2971
+ };
2972
+ return /*#__PURE__*/React__default.createElement(chakra.label, Object.assign({}, getRootProps(), {
2973
+ display: "flex",
2974
+ alignItems: "center",
2975
+ className: cx('chakra-switch', props.className),
2976
+ __css: containerStyles
2977
+ }), /*#__PURE__*/React__default.createElement("input", Object.assign({
2978
+ "data-test-id": "",
2979
+ className: "chakra-switch__input"
2980
+ }, getInputProps({}, ref))), /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({}, getCheckboxProps(), {
2981
+ className: "chakra-switch__track",
2982
+ pos: "relative",
2983
+ __css: trackStyles
2984
+ }), /*#__PURE__*/React__default.createElement(Flex, {
2985
+ gap: 2,
2986
+ pos: "absolute",
2987
+ top: "50%",
2988
+ left: "50%",
2989
+ transform: "translate(-50%, -50%)"
2990
+ }, /*#__PURE__*/React__default.createElement(Check, {
2991
+ color: "white",
2992
+ size: getIconSize(size)
2993
+ }), /*#__PURE__*/React__default.createElement(Close, {
2994
+ color: state.isDisabled ? 'neutral.600' : 'neutral.900',
2995
+ size: getIconSize(size)
2996
+ })), /*#__PURE__*/React__default.createElement(chakra.span, {
2997
+ __css: styles.thumb,
2998
+ className: "chakra-switch__thumb",
2999
+ "data-checked": dataAttr(state.isChecked),
3000
+ "data-hover": dataAttr(state.isHovered)
3001
+ })), children && /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
3002
+ className: "chakra-switch__label",
3003
+ color: state.isDisabled ? 'black.low' : 'black.high'
3004
+ }, getLabelProps(), {
3005
+ __css: labelStyles
3006
+ }), children));
3007
+ });
3008
+
3009
+ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
2558
3010
  var _props$leftAddon, _props$rightAddon;
2559
3011
  const tabProps = useTab({
2560
3012
  ...props,
@@ -2562,7 +3014,7 @@ const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
2562
3014
  });
2563
3015
  const isSelected = !!tabProps['aria-selected'];
2564
3016
  const styles = useMultiStyleConfig('Tabs', tabProps);
2565
- return /*#__PURE__*/createElement(Button$1, Object.assign({
3017
+ return /*#__PURE__*/createElement(Button$2, Object.assign({
2566
3018
  p: 3,
2567
3019
  fontSize: "text.md",
2568
3020
  _selected: {
@@ -2582,13 +3034,13 @@ const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
2582
3034
  })));
2583
3035
  });
2584
3036
 
2585
- const TabList = /*#__PURE__*/forwardRef$1((props, ref) => /*#__PURE__*/React__default.createElement(TabList$1, {
3037
+ const TabList = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(TabList$1, {
2586
3038
  borderBottom: "1px solid",
2587
3039
  borderColor: useColorModeValue('gray.200', 'bright-gray.800'),
2588
3040
  ref: ref
2589
3041
  }, props.children));
2590
3042
 
2591
- const TabPanel = /*#__PURE__*/forwardRef$1((props, ref) => /*#__PURE__*/React__default.createElement(TabPanel$1, {
3043
+ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(TabPanel$1, {
2592
3044
  px: 0,
2593
3045
  ref: ref
2594
3046
  }, props.children));
@@ -2683,201 +3135,564 @@ Uploader.defaultProps = {
2683
3135
  selected: false
2684
3136
  };
2685
3137
 
3138
+ const {
3139
+ definePartsStyle,
3140
+ defineMultiStyleConfig
3141
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(alertAnatomy.keys);
3142
+ const $fg = /*#__PURE__*/cssVar('alert-fg');
3143
+ const $bg = /*#__PURE__*/cssVar('alert-bg');
3144
+ const baseStyle = /*#__PURE__*/definePartsStyle({
3145
+ container: {
3146
+ bg: $bg.reference,
3147
+ px: '4',
3148
+ py: '2',
3149
+ borderRadius: 'md'
3150
+ },
3151
+ title: {
3152
+ fontWeight: '400',
3153
+ lineHeight: '18px',
3154
+ marginEnd: '2'
3155
+ },
3156
+ description: {
3157
+ lineHeight: '6'
3158
+ },
3159
+ icon: {
3160
+ color: $fg.reference,
3161
+ flexShrink: 0,
3162
+ marginEnd: '3',
3163
+ w: '4',
3164
+ h: '4'
3165
+ },
3166
+ action: {
3167
+ '& +.chakra-alert__close': {
3168
+ ml: '3'
3169
+ }
3170
+ },
3171
+ close: {
3172
+ color: $fg.reference,
3173
+ w: '4',
3174
+ h: '4'
3175
+ },
3176
+ spinner: {
3177
+ color: $fg.reference,
3178
+ flexShrink: 0,
3179
+ marginEnd: '3',
3180
+ w: '5',
3181
+ h: '5'
3182
+ }
3183
+ });
3184
+ function getBg(props) {
3185
+ const {
3186
+ theme,
3187
+ colorScheme: c
3188
+ } = props;
3189
+ const darkBg = transparentize(`${c}.200`, 0.16)(theme);
3190
+ return {
3191
+ light: `colors.${c}.50`,
3192
+ dark: darkBg
3193
+ };
3194
+ }
3195
+ const variantSubtle = /*#__PURE__*/definePartsStyle(props => {
3196
+ const {
3197
+ colorScheme: c
3198
+ } = props;
3199
+ const bg = getBg(props);
3200
+ return {
3201
+ container: {
3202
+ [$fg.variable]: `colors.${c}.700`,
3203
+ [$bg.variable]: bg.light,
3204
+ _dark: {
3205
+ [$fg.variable]: `colors.${c}.200`,
3206
+ [$bg.variable]: bg.dark
3207
+ },
3208
+ color: $fg.reference
3209
+ }
3210
+ };
3211
+ });
3212
+ const variantSolid = /*#__PURE__*/definePartsStyle(props => {
3213
+ const {
3214
+ colorScheme: c
3215
+ } = props;
3216
+ return {
3217
+ container: {
3218
+ [$fg.variable]: `colors.white.high`,
3219
+ [$bg.variable]: `colors.${c}.500`,
3220
+ _dark: {
3221
+ [$fg.variable]: `colors.gray.900`,
3222
+ [$bg.variable]: `colors.${c}.200`
3223
+ },
3224
+ color: $fg.reference
3225
+ }
3226
+ };
3227
+ });
3228
+ const variants = {
3229
+ subtle: variantSubtle,
3230
+ solid: variantSolid
3231
+ };
3232
+ const alertTheme = /*#__PURE__*/defineMultiStyleConfig({
3233
+ baseStyle,
3234
+ variants,
3235
+ defaultProps: {
3236
+ variant: 'subtle',
3237
+ colorScheme: 'info'
3238
+ }
3239
+ });
3240
+
2686
3241
  // You can also use the more specific type for
2687
3242
  // a single part component: ComponentSingleStyleConfig
2688
- const Button = {
3243
+ const Button$1 = /*#__PURE__*/defineStyleConfig({
2689
3244
  // The styles all button have in common
2690
3245
  baseStyle: {
2691
3246
  fontSize: 'body.1',
2692
3247
  fontWeight: 'normal',
2693
- lineHeight: '1.25',
2694
- minW: 24,
2695
3248
  px: 4,
2696
- py: 2,
3249
+ py: 2.5,
2697
3250
  borderRadius: 'md',
2698
3251
  _disabled: {
2699
- opacity: 0.3
3252
+ opacity: 1,
3253
+ bg: 'neutral.300',
3254
+ color: 'black.low'
2700
3255
  },
2701
3256
  _hover: {
2702
3257
  _disabled: {
2703
- opacity: 0.3
2704
- }
2705
- },
2706
- _active: {
2707
- _disabled: {
2708
- opacity: 0.3
3258
+ bg: 'neutral.300',
3259
+ color: 'black.low'
2709
3260
  }
2710
- },
2711
- _loading: {
2712
- opacity: 0.7
2713
3261
  }
2714
3262
  },
2715
3263
  sizes: {
2716
- lg: {
2717
- fontSize: 'button.lg',
2718
- h: 12
3264
+ lg: props => {
3265
+ const {
3266
+ variant
3267
+ } = props;
3268
+ const base = {
3269
+ fontSize: 'text.xl',
3270
+ h: 12,
3271
+ px: 4,
3272
+ py: 2.5
3273
+ };
3274
+ const icon = {
3275
+ h: 10,
3276
+ w: 10,
3277
+ p: 0
3278
+ };
3279
+ return variant === 'icon' ? icon : base;
2719
3280
  },
2720
- md: {
2721
- fontSize: 'button.md',
2722
- h: 9
3281
+ md: props => {
3282
+ const {
3283
+ variant
3284
+ } = props;
3285
+ const base = {
3286
+ fontSize: 'text.md',
3287
+ h: 9,
3288
+ px: 3,
3289
+ py: '7px'
3290
+ };
3291
+ const icon = {
3292
+ h: 9,
3293
+ w: 9,
3294
+ p: 0
3295
+ };
3296
+ return variant === 'icon' ? icon : base;
2723
3297
  },
2724
- sm: {
2725
- fontSize: 'button.sm',
2726
- h: 6
3298
+ sm: props => {
3299
+ const {
3300
+ variant
3301
+ } = props;
3302
+ const base = {
3303
+ fontSize: 'text.xs',
3304
+ h: 6,
3305
+ px: 2,
3306
+ py: '5px'
3307
+ };
3308
+ const icon = {
3309
+ h: 6,
3310
+ w: 6,
3311
+ p: 0
3312
+ };
3313
+ return variant === 'icon' ? icon : base;
2727
3314
  }
2728
3315
  },
2729
- // Two variants: outline and solid
2730
3316
  variants: {
2731
- solid: {
2732
- color: 'white',
2733
- bg: 'primary.500',
2734
- _disabled: {
2735
- bg: 'primary.700'
2736
- },
2737
- _hover: {
2738
- bg: 'primary.600'
2739
- },
2740
- _active: {
2741
- bg: 'primary.700'
2742
- },
2743
- _focus: {
2744
- bg: 'primary.700'
2745
- }
3317
+ primary: props => {
3318
+ const {
3319
+ isLoading
3320
+ } = props;
3321
+ const basePrimary = {
3322
+ color: 'white.high',
3323
+ bg: 'primary.500',
3324
+ _hover: {
3325
+ bg: 'primary.600'
3326
+ },
3327
+ _active: {
3328
+ bg: 'primary.700'
3329
+ }
3330
+ };
3331
+ const disabledLoading = {
3332
+ _disabled: {
3333
+ bg: 'primary.500'
3334
+ },
3335
+ _hover: {
3336
+ _disabled: {
3337
+ bg: 'primary.500'
3338
+ }
3339
+ }
3340
+ };
3341
+ return isLoading ? disabledLoading : basePrimary;
2746
3342
  },
2747
- outline: props => ({
2748
- color: 'primary.500',
2749
- borderWidth: 1,
2750
- borderStyle: 'inside',
2751
- bg: mode('white', 'transparent')(props),
2752
- borderColor: mode('primary.500', 'primary.500')(props),
2753
- _hover: {
2754
- bg: 'primary.50'
2755
- },
2756
- _active: {
2757
- bg: 'primary.100'
2758
- },
2759
- _focus: {
2760
- bg: 'primary.100'
2761
- }
2762
- }),
2763
- 'outline-danger': {
2764
- color: 'danger.500',
2765
- bg: 'white',
2766
- borderStyle: 'inside',
2767
- borderWidth: 1,
2768
- borderColor: 'danger.500'
3343
+ secondary: props => {
3344
+ const {
3345
+ isLoading
3346
+ } = props;
3347
+ const baseSecondary = {
3348
+ color: 'primary.500',
3349
+ borderWidth: 1,
3350
+ borderStyle: 'inside',
3351
+ bg: 'white.high',
3352
+ borderColor: 'primary.500',
3353
+ _hover: {
3354
+ bg: 'primary.50'
3355
+ },
3356
+ _active: {
3357
+ bg: 'primary.100'
3358
+ },
3359
+ _disabled: {
3360
+ border: 0
3361
+ }
3362
+ };
3363
+ const disabledLoading = {
3364
+ ...baseSecondary,
3365
+ _disabled: {
3366
+ bg: 'white.high'
3367
+ },
3368
+ _hover: {
3369
+ _disabled: {
3370
+ bg: 'white.high'
3371
+ }
3372
+ }
3373
+ };
3374
+ return isLoading ? disabledLoading : baseSecondary;
3375
+ },
3376
+ tertiary: props => {
3377
+ const {
3378
+ isLoading
3379
+ } = props;
3380
+ const baseTertiary = {
3381
+ color: 'primary.500',
3382
+ _hover: {
3383
+ bg: 'primary.50'
3384
+ },
3385
+ _active: {
3386
+ bg: 'primary.100'
3387
+ }
3388
+ };
3389
+ const disabledLoading = {
3390
+ ...baseTertiary,
3391
+ _disabled: {
3392
+ bg: 'transparent'
3393
+ },
3394
+ _hover: {
3395
+ _disabled: {
3396
+ bg: 'transparent'
3397
+ }
3398
+ }
3399
+ };
3400
+ return isLoading ? disabledLoading : baseTertiary;
3401
+ },
3402
+ danger: props => {
3403
+ const {
3404
+ isLoading
3405
+ } = props;
3406
+ const baseDanger = {
3407
+ bg: 'danger.500',
3408
+ color: 'white.high',
3409
+ _hover: {
3410
+ bg: 'danger.600'
3411
+ },
3412
+ _active: {
3413
+ bg: 'danger.700'
3414
+ }
3415
+ };
3416
+ const disabledLoading = {
3417
+ ...baseDanger,
3418
+ _disabled: {
3419
+ bg: 'danger.500'
3420
+ },
3421
+ _hover: {
3422
+ _disabled: {
3423
+ bg: 'danger.500'
3424
+ }
3425
+ }
3426
+ };
3427
+ return isLoading ? disabledLoading : baseDanger;
3428
+ },
3429
+ 'outline-danger': props => {
3430
+ const {
3431
+ isLoading
3432
+ } = props;
3433
+ const baseSecondary = {
3434
+ color: 'danger.500',
3435
+ borderWidth: 1,
3436
+ borderStyle: 'inside',
3437
+ bg: 'white.high',
3438
+ borderColor: 'danger.500',
3439
+ _hover: {
3440
+ bg: 'danger.50'
3441
+ },
3442
+ _active: {
3443
+ bg: 'danger.100'
3444
+ },
3445
+ _disabled: {
3446
+ border: 0
3447
+ }
3448
+ };
3449
+ const disabledLoading = {
3450
+ ...baseSecondary,
3451
+ _disabled: {
3452
+ bg: 'white.high'
3453
+ },
3454
+ _hover: {
3455
+ _disabled: {
3456
+ bg: 'white.high'
3457
+ }
3458
+ }
3459
+ };
3460
+ return isLoading ? disabledLoading : baseSecondary;
2769
3461
  },
2770
- ghost: {
3462
+ link: {
3463
+ bg: 'transparent',
2771
3464
  color: 'primary.500',
2772
3465
  _disabled: {
2773
- bg: 'primary.100'
3466
+ opacity: '1',
3467
+ bg: 'transparent',
3468
+ color: 'black.medium'
3469
+ },
3470
+ _hover: {
3471
+ _disabled: {
3472
+ bg: 'transparent',
3473
+ color: 'black.medium'
3474
+ }
2774
3475
  }
2775
3476
  },
2776
- link: {
2777
- bg: 'transparent',
2778
- color: 'primary.500'
3477
+ icon: {
3478
+ bg: 'neutral.50',
3479
+ minW: 0,
3480
+ borderColor: 'neutral.200',
3481
+ borderWidth: '1px',
3482
+ _active: {
3483
+ bg: 'neutral.500',
3484
+ borderColor: 'neutral.50'
3485
+ },
3486
+ _disabled: {
3487
+ bg: 'neutral.500',
3488
+ opacity: 0.3,
3489
+ borderColor: 'neutral.50'
3490
+ },
3491
+ _hover: {
3492
+ bg: 'neutral.400',
3493
+ _disabled: {
3494
+ bg: 'neutral.500',
3495
+ opacity: 0.3,
3496
+ borderColor: 'neutral.50'
3497
+ }
3498
+ }
2779
3499
  }
2780
3500
  },
2781
- // The default size and variant values
2782
3501
  defaultProps: {
2783
3502
  size: 'md',
2784
- variant: 'solid',
2785
- orientation: 'vertical',
3503
+ variant: 'primary',
2786
3504
  colorScheme: 'primary'
2787
3505
  }
2788
- };
3506
+ });
3507
+
3508
+ const CardStyle = /*#__PURE__*/defineStyleConfig({
3509
+ baseStyle: props => {
3510
+ return {
3511
+ shadow: props.withShadow ? 'raised' : 'none',
3512
+ borderRadius: props.isRounded ? 'lg' : 'none'
3513
+ };
3514
+ }
3515
+ });
2789
3516
 
2790
3517
  const {
2791
- definePartsStyle
2792
- } = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys);
2793
- const $size = /*#__PURE__*/cssVar('checkbox-size');
2794
- // You can also use the more specific type for
2795
- // a single part component: ComponentSingleStyleConfig
2796
- const Checkbox = {
2797
- // The styles all checkbox have in common
2798
- baseStyle: {
2799
- borderRadius: 'sm'
3518
+ definePartsStyle: definePartsStyle$1,
3519
+ defineMultiStyleConfig: defineMultiStyleConfig$1
3520
+ } = /*#__PURE__*/createMultiStyleConfigHelpers$1(checkboxAnatomy.keys);
3521
+ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
3522
+ control: {
3523
+ borderRadius: '4px',
3524
+ width: '16px',
3525
+ height: '16px',
3526
+ border: '1px solid'
2800
3527
  },
2801
- // Two sizes: sm and md
2802
- sizes: {
2803
- sm: /*#__PURE__*/definePartsStyle({
2804
- control: {
2805
- [$size.variable]: 'sizes.4',
2806
- borderRadius: 'md'
2807
- },
2808
- label: {
2809
- fontSize: 'text.sm'
2810
- },
2811
- icon: {
2812
- fontSize: '3xs'
2813
- }
2814
- }),
2815
- md: /*#__PURE__*/definePartsStyle({
2816
- control: {
2817
- [$size.variable]: 'sizes.5',
2818
- borderRadius: 'md'
2819
- },
2820
- label: {
2821
- fontSize: 'text.md'
2822
- },
2823
- icon: {
2824
- fontSize: '2xs'
3528
+ icon: {
3529
+ color: 'neutral.50',
3530
+ width: '9px'
3531
+ },
3532
+ label: {
3533
+ fontWeight: '400',
3534
+ lineHeight: '18px',
3535
+ color: 'black.high',
3536
+ ml: '8px'
3537
+ },
3538
+ _disabled: {
3539
+ background: 'neutral.500',
3540
+ border: '1px solid',
3541
+ borderColor: 'neutral.500',
3542
+ cursor: 'not-allowed'
3543
+ }
3544
+ });
3545
+ const errors = /*#__PURE__*/definePartsStyle$1({
3546
+ control: {
3547
+ borderColor: 'danger.500',
3548
+ _checked: {
3549
+ borderColor: 'danger.500',
3550
+ backgroundColor: 'danger.500',
3551
+ _hover: {
3552
+ borderColor: 'danger.600',
3553
+ backgroundColor: 'danger.600'
2825
3554
  }
2826
- }),
2827
- lg: /*#__PURE__*/definePartsStyle({
2828
- control: {
2829
- [$size.variable]: 'sizes.6',
2830
- borderRadius: 'md'
2831
- },
2832
- label: {
2833
- fontSize: 'text.lg'
3555
+ },
3556
+ _indeterminate: {
3557
+ borderColor: 'danger.500',
3558
+ backgroundColor: 'danger.500'
3559
+ }
3560
+ },
3561
+ label: {
3562
+ fontSize: '12px'
3563
+ }
3564
+ });
3565
+ const unstyled = /*#__PURE__*/definePartsStyle$1({
3566
+ control: {
3567
+ borderColor: 'neutral.500',
3568
+ _checked: {
3569
+ borderColor: 'primary.500',
3570
+ backgroundColor: 'primary.500',
3571
+ _hover: {
3572
+ borderColor: 'primary.600',
3573
+ backgroundColor: 'primary.600'
2834
3574
  },
2835
- icon: {
2836
- fontSize: 'xs'
3575
+ _disabled: {
3576
+ backgroundColor: 'neutral.500',
3577
+ borderColor: 'neutral.500'
2837
3578
  }
2838
- })
3579
+ },
3580
+ _disabled: {
3581
+ backgroundColor: 'neutral.500',
3582
+ borderColor: 'neutral.500'
3583
+ },
3584
+ _indeterminate: {
3585
+ borderColor: 'primary.500',
3586
+ backgroundColor: 'primary.500'
3587
+ }
2839
3588
  },
2840
- // Two variants: outline and solid
2841
- variants: {},
2842
- // The default size and variant values
2843
- defaultProps: {
2844
- size: 'sm',
2845
- variant: 'solid',
2846
- orientation: 'vertical',
2847
- colorScheme: 'primary'
3589
+ label: {
3590
+ fontSize: '12px'
2848
3591
  }
3592
+ });
3593
+ const variants$1 = {
3594
+ errors,
3595
+ unstyled
2849
3596
  };
3597
+ const Checkbox = /*#__PURE__*/defineMultiStyleConfig$1({
3598
+ baseStyle: baseStyle$1,
3599
+ variants: variants$1,
3600
+ defaultProps: {
3601
+ variant: 'unstyled'
3602
+ }
3603
+ });
3604
+
3605
+ const Chips = /*#__PURE__*/defineStyleConfig({
3606
+ baseStyle: props => {
3607
+ const {
3608
+ isDisabled,
3609
+ isActive
3610
+ } = props;
3611
+ const defaultProps = {
3612
+ color: 'primary.500',
3613
+ fontSize: 'text.small',
3614
+ borderRadius: '24px',
3615
+ borderWidth: '1px',
3616
+ borderColor: 'primary.500',
3617
+ bg: 'white.high',
3618
+ paddingX: 3,
3619
+ paddingY: 1,
3620
+ cursor: 'default'
3621
+ };
3622
+ let chipsProps = {
3623
+ ...defaultProps
3624
+ };
3625
+ if (isActive) {
3626
+ const isActiveProps = {
3627
+ bg: 'primary.500',
3628
+ color: 'white.high'
3629
+ };
3630
+ chipsProps = {
3631
+ ...chipsProps,
3632
+ ...isActiveProps
3633
+ };
3634
+ }
3635
+ if (isDisabled) {
3636
+ const isDisabledProps = {
3637
+ bg: 'neutral.200',
3638
+ color: 'black.low',
3639
+ borderColor: 'neutral.200',
3640
+ cursor: 'not-allowed'
3641
+ };
3642
+ chipsProps = {
3643
+ ...chipsProps,
3644
+ ...isDisabledProps
3645
+ };
3646
+ }
3647
+ return {
3648
+ ...chipsProps
3649
+ };
3650
+ },
3651
+ sizes: {
3652
+ sm: {
3653
+ fontSize: '12px'
3654
+ },
3655
+ md: {
3656
+ fontSize: '14px'
3657
+ }
3658
+ },
3659
+ defaultProps: {
3660
+ size: 'sm'
3661
+ }
3662
+ });
2850
3663
 
2851
- const baseStyle = /*#__PURE__*/defineStyle({
3664
+ const baseStyle$2 = /*#__PURE__*/defineStyle$1({
2852
3665
  fontSize: 'field.sm',
2853
3666
  marginEnd: 1,
2854
3667
  mb: 1
2855
3668
  });
2856
3669
  const FormLabel = /*#__PURE__*/defineStyleConfig({
2857
- baseStyle
3670
+ baseStyle: baseStyle$2
2858
3671
  });
2859
3672
 
2860
3673
  const {
2861
- definePartsStyle: definePartsStyle$1,
2862
- defineMultiStyleConfig
3674
+ definePartsStyle: definePartsStyle$2,
3675
+ defineMultiStyleConfig: defineMultiStyleConfig$2
2863
3676
  } = /*#__PURE__*/createMultiStyleConfigHelpers(inputAnatomy.keys);
2864
- const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
3677
+ const baseStyle$3 = /*#__PURE__*/definePartsStyle$2({
2865
3678
  field: {
2866
3679
  width: '100%',
2867
3680
  minWidth: 0,
2868
3681
  outline: 0,
2869
- px: 2.5,
2870
- py: 2,
3682
+ px: 2,
3683
+ py: 2.5,
3684
+ paddingInlineStart: 2,
3685
+ paddingInlineEnd: 2,
2871
3686
  position: 'relative',
2872
3687
  appearance: 'none',
2873
- transitionProperty: 'common',
2874
- transitionDuration: 'normal',
2875
3688
  color: 'black.high',
2876
3689
  _disabled: {
2877
3690
  bg: 'neutral.300',
2878
- border: '1px solid',
2879
- borderColor: 'neutral.400',
2880
- cursor: 'not-allowed'
3691
+ border: 0,
3692
+ cursor: 'not-allowed',
3693
+ opacity: 1,
3694
+ boxShadow: 'none',
3695
+ color: 'black.medium'
2881
3696
  },
2882
3697
  _placeholder: {
2883
3698
  color: 'black.low'
@@ -2885,89 +3700,55 @@ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
2885
3700
  }
2886
3701
  });
2887
3702
  const size = {
2888
- lg: /*#__PURE__*/defineStyle({
2889
- fontSize: 'field.lg',
3703
+ lg: /*#__PURE__*/defineStyle$1({
3704
+ fontSize: 'text.lg',
2890
3705
  h: 12,
2891
3706
  borderRadius: 'md'
2892
3707
  }),
2893
- md: /*#__PURE__*/defineStyle({
2894
- fontSize: 'field.md',
3708
+ md: /*#__PURE__*/defineStyle$1({
3709
+ fontSize: 'text.md',
2895
3710
  h: 10,
2896
3711
  borderRadius: 'md'
2897
3712
  }),
2898
- sm: /*#__PURE__*/defineStyle({
2899
- fontSize: 'field.sm',
3713
+ sm: /*#__PURE__*/defineStyle$1({
3714
+ fontSize: 'text.sm',
2900
3715
  h: 9.5,
2901
3716
  borderRadius: 'md'
2902
3717
  })
2903
3718
  };
2904
3719
  const sizes$1 = {
2905
- lg: /*#__PURE__*/definePartsStyle$1({
3720
+ lg: /*#__PURE__*/definePartsStyle$2({
2906
3721
  field: size.lg,
2907
3722
  addon: size.lg
2908
3723
  }),
2909
- md: /*#__PURE__*/definePartsStyle$1({
3724
+ md: /*#__PURE__*/definePartsStyle$2({
2910
3725
  field: size.md,
2911
3726
  addon: size.md
2912
3727
  }),
2913
- sm: /*#__PURE__*/definePartsStyle$1({
3728
+ sm: /*#__PURE__*/definePartsStyle$2({
2914
3729
  field: size.sm,
2915
3730
  addon: size.sm
2916
3731
  })
2917
3732
  };
2918
- function getDefaults(props) {
2919
- const {
2920
- focusBorderColor,
2921
- errorBorderColor,
2922
- readOnlyBorderColor
2923
- } = props;
2924
- return {
2925
- focusBorderColor: focusBorderColor || mode('primary.500', 'primary.300')(props),
2926
- errorBorderColor: errorBorderColor || mode('danger.500', 'danger.300')(props),
2927
- readOnlyBorderColor: readOnlyBorderColor || mode('.500', 'danger.300')(props)
2928
- };
2929
- }
2930
- const outline = /*#__PURE__*/definePartsStyle$1(props => {
2931
- const {
2932
- theme
2933
- } = props;
2934
- const {
2935
- focusBorderColor: fc,
2936
- errorBorderColor: ec,
2937
- readOnlyBorderColor: rc
2938
- } = getDefaults(props);
2939
- return {
2940
- field: {
2941
- border: '1px solid',
2942
- borderColor: mode('dark.200', 'inherit')(props),
2943
- bg: mode('white', 'inherit')(props),
2944
- color: mode('inherit', 'white')(props),
2945
- _hover: {
2946
- borderColor: mode('gray.300', 'whiteAlpha.400')(props)
2947
- },
2948
- _readOnly: {
2949
- userSelect: 'all',
2950
- borderColor: getColor(theme, rc),
2951
- boxShadow: `0 0 0 0 ${getColor(theme, rc)}`
2952
- },
2953
- _invalid: {
2954
- borderColor: getColor(theme, ec),
2955
- boxShadow: `0 0 0 0 ${getColor(theme, ec)}`
2956
- },
2957
- _focusVisible: {
2958
- zIndex: 1,
2959
- borderColor: getColor(theme, fc),
2960
- boxShadow: `0 0 0 0 ${getColor(theme, fc)}`
2961
- }
3733
+ const outline = /*#__PURE__*/definePartsStyle$2(props => {
3734
+ const field = {
3735
+ border: 0,
3736
+ outline: 0,
3737
+ bg: mode('white', 'inherit')(props),
3738
+ color: mode('inherit', 'white')(props),
3739
+ _invalid: {
3740
+ boxShadow: 'none'
2962
3741
  },
2963
- addon: {
2964
- border: '1px solid',
2965
- borderColor: mode('inherit', 'whiteAlpha.50')(props),
2966
- bg: mode('gray.100', 'whiteAlpha.300')(props)
3742
+ _focusVisible: {
3743
+ zIndex: 1,
3744
+ boxShadow: 'none'
2967
3745
  }
2968
3746
  };
3747
+ return {
3748
+ field
3749
+ };
2969
3750
  });
2970
- const unstyled = /*#__PURE__*/definePartsStyle$1({
3751
+ const unstyled$1 = /*#__PURE__*/definePartsStyle$2({
2971
3752
  field: {
2972
3753
  bg: 'transparent',
2973
3754
  px: '0',
@@ -2979,156 +3760,392 @@ const unstyled = /*#__PURE__*/definePartsStyle$1({
2979
3760
  height: 'auto'
2980
3761
  }
2981
3762
  });
2982
- const variants = {
3763
+ const variants$2 = {
2983
3764
  outline,
2984
- unstyled
3765
+ unstyled: unstyled$1
2985
3766
  };
2986
- const Input = /*#__PURE__*/defineMultiStyleConfig({
2987
- baseStyle: baseStyle$1,
3767
+ const Input = /*#__PURE__*/defineMultiStyleConfig$2({
3768
+ baseStyle: baseStyle$3,
2988
3769
  sizes: sizes$1,
2989
- variants,
3770
+ variants: variants$2,
2990
3771
  defaultProps: {
2991
3772
  size: 'sm',
2992
3773
  variant: 'outline'
2993
3774
  }
2994
3775
  });
2995
3776
 
3777
+ const rotate = /*#__PURE__*/keyframes({
3778
+ '0%': {
3779
+ transform: 'rotate(0deg)'
3780
+ },
3781
+ '100%': {
3782
+ transform: 'rotate(360deg)'
3783
+ }
3784
+ });
3785
+ const getLoaderColor = color => {
3786
+ if (color === 'primary') return colors.primary[600];
3787
+ if (color === 'danger') return colors.danger[500];
3788
+ return colors.white.high;
3789
+ };
3790
+ const LoaderStyle = /*#__PURE__*/defineStyleConfig({
3791
+ baseStyle: props => {
3792
+ const colors = getLoaderColor(props.color);
3793
+ return {
3794
+ borderRadius: '50%',
3795
+ display: 'flex',
3796
+ justifyContent: 'center',
3797
+ alignItems: 'center',
3798
+ animation: `${rotate} 1s linear infinite`,
3799
+ background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,
3800
+ ':before': {
3801
+ content: `''`,
3802
+ display: 'block',
3803
+ borderRadius: '50%',
3804
+ width: '6px',
3805
+ height: '6px',
3806
+ position: 'absolute',
3807
+ bottom: 0,
3808
+ background: colors
3809
+ }
3810
+ };
3811
+ },
3812
+ sizes: {
3813
+ xs: {
3814
+ width: '12px',
3815
+ height: '12px',
3816
+ WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);',
3817
+ ':before': {
3818
+ width: '1.4px',
3819
+ height: '1.4px'
3820
+ }
3821
+ },
3822
+ sm: {
3823
+ width: '16px',
3824
+ height: '16px',
3825
+ WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);',
3826
+ ':before': {
3827
+ width: '1.87px',
3828
+ height: '1.87px'
3829
+ }
3830
+ },
3831
+ md: {
3832
+ width: '24px',
3833
+ height: '24px',
3834
+ WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);',
3835
+ ':before': {
3836
+ width: '2.8px',
3837
+ height: '2.8px'
3838
+ }
3839
+ },
3840
+ lg: {
3841
+ width: '50px',
3842
+ height: '50px',
3843
+ WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);',
3844
+ ':before': {
3845
+ width: '5.83px',
3846
+ height: '5.83px'
3847
+ }
3848
+ },
3849
+ xl: {
3850
+ width: '75px',
3851
+ height: '75px',
3852
+ WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);',
3853
+ ':before': {
3854
+ width: '8.75px',
3855
+ height: '8.75px'
3856
+ }
3857
+ },
3858
+ xxl: {
3859
+ width: '100px',
3860
+ height: '100px',
3861
+ WebkitMask: `radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);`,
3862
+ ':before': {
3863
+ width: '11.67px',
3864
+ height: '11.67px'
3865
+ }
3866
+ }
3867
+ },
3868
+ defaultProps: {
3869
+ size: 'lg'
3870
+ }
3871
+ });
3872
+
2996
3873
  const {
2997
- definePartsStyle: definePartsStyle$2
2998
- } = /*#__PURE__*/createMultiStyleConfigHelpers(radioAnatomy.keys);
2999
- // You can also use the more specific type for
3000
- // a single part component: ComponentSingleStyleConfig
3001
- const Radio = {
3002
- // The styles all checkbox have in common
3003
- baseStyle: /*#__PURE__*/definePartsStyle$2({
3004
- control: {
3005
- _checked: {
3006
- borderColor: 'primary.500',
3874
+ definePartsStyle: definePartsStyle$3
3875
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(popoverAnatomy.keys);
3876
+ const Popover = {
3877
+ baseStyle: props => definePartsStyle$3({
3878
+ popper: {
3879
+ background: mode('white', 'inherit')(props)
3880
+ }
3881
+ })
3882
+ };
3883
+
3884
+ const {
3885
+ definePartsStyle: definePartsStyle$4,
3886
+ defineMultiStyleConfig: defineMultiStyleConfig$3
3887
+ } = /*#__PURE__*/createMultiStyleConfigHelpers$1(radioAnatomy.keys);
3888
+ const baseStyle$4 = /*#__PURE__*/definePartsStyle$4({
3889
+ control: {
3890
+ border: '1px solid',
3891
+ width: '16px',
3892
+ height: '16px'
3893
+ },
3894
+ label: {
3895
+ marginLeft: '8px',
3896
+ textStyle: 'text.sm',
3897
+ color: 'black.high',
3898
+ _disabled: {
3899
+ color: 'black.low'
3900
+ }
3901
+ }
3902
+ });
3903
+ const errors$1 = /*#__PURE__*/definePartsStyle$4({
3904
+ control: {
3905
+ borderColor: 'danger.500',
3906
+ _checked: {
3907
+ borderColor: 'danger.500',
3908
+ bg: 'white',
3909
+ _before: {
3910
+ h: '10px',
3911
+ w: '10px',
3912
+ bg: 'danger.500'
3913
+ },
3914
+ _hover: {
3915
+ borderColor: 'danger.500',
3916
+ bg: 'gray.200'
3917
+ },
3918
+ _disabled: {
3919
+ borderColor: 'danger.500',
3007
3920
  bg: 'white',
3008
3921
  _before: {
3009
- h: '72%',
3010
- w: '72%',
3011
- bg: 'primary.500'
3012
- },
3013
- _hover: {
3014
- borderColor: 'primary.500',
3015
- bg: 'gray.200'
3922
+ h: '10px',
3923
+ w: '10px',
3924
+ bg: 'neutral.500'
3016
3925
  }
3017
3926
  }
3927
+ },
3928
+ _disabled: {
3929
+ borderColor: 'danger.500',
3930
+ bg: 'neutral.500'
3018
3931
  }
3019
- }),
3020
- // Two sizes: sm and md
3021
- sizes: {
3022
- sm: /*#__PURE__*/definePartsStyle$2({
3023
- control: {
3024
- w: '3',
3025
- h: '3'
3026
- },
3027
- label: {
3028
- fontSize: 'text.sm'
3029
- }
3030
- }),
3031
- md: /*#__PURE__*/definePartsStyle$2({
3032
- control: {
3033
- w: '4',
3034
- h: '4'
3932
+ },
3933
+ label: {
3934
+ fontSize: '12px'
3935
+ }
3936
+ });
3937
+ const unstyled$2 = /*#__PURE__*/definePartsStyle$4({
3938
+ control: {
3939
+ borderColor: 'neutral.600',
3940
+ _checked: {
3941
+ borderColor: 'primary.500',
3942
+ bg: 'white',
3943
+ _before: {
3944
+ h: '10px',
3945
+ w: '10px',
3946
+ bg: 'primary.500'
3035
3947
  },
3036
- label: {
3037
- fontSize: 'text.md'
3038
- }
3039
- }),
3040
- lg: /*#__PURE__*/definePartsStyle$2({
3041
- control: {
3042
- w: '5',
3043
- h: '5'
3948
+ _hover: {
3949
+ borderColor: 'primary.500',
3950
+ bg: 'gray.200'
3044
3951
  },
3045
- label: {
3046
- fontSize: 'text.lg'
3952
+ _disabled: {
3953
+ borderColor: 'neutral.500',
3954
+ bg: 'white',
3955
+ _before: {
3956
+ h: '10px',
3957
+ w: '10px',
3958
+ bg: 'neutral.500'
3959
+ }
3047
3960
  }
3048
- })
3961
+ },
3962
+ _disabled: {
3963
+ borderColor: 'neutral.500',
3964
+ bg: 'neutral.500'
3965
+ }
3049
3966
  },
3050
- // Two variants: outline and solid
3051
- variants: {},
3052
- // The default size and variant values
3053
- defaultProps: {
3054
- size: 'sm',
3055
- variant: 'solid',
3056
- orientation: 'vertical',
3057
- colorScheme: 'primary'
3967
+ label: {
3968
+ fontSize: '12px'
3058
3969
  }
3970
+ });
3971
+ const variants$3 = {
3972
+ errors: errors$1,
3973
+ unstyled: unstyled$2
3059
3974
  };
3975
+ const Radio = /*#__PURE__*/defineMultiStyleConfig$3({
3976
+ baseStyle: baseStyle$4,
3977
+ variants: variants$3,
3978
+ defaultProps: {
3979
+ variant: 'unstyled'
3980
+ }
3981
+ });
3060
3982
 
3061
3983
  const {
3062
- definePartsStyle: definePartsStyle$3,
3063
- defineMultiStyleConfig: defineMultiStyleConfig$1
3064
- } = /*#__PURE__*/createMultiStyleConfigHelpers$1(switchAnatomy.keys);
3065
- const baseStyle$2 = /*#__PURE__*/definePartsStyle$3({
3066
- // define the part you're going to style
3984
+ defineMultiStyleConfig: defineMultiStyleConfig$4,
3985
+ definePartsStyle: definePartsStyle$5
3986
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(switchAnatomy.keys);
3987
+ const $width = /*#__PURE__*/cssVar$1('switch-track-width');
3988
+ const $height = /*#__PURE__*/cssVar$1('switch-track-height');
3989
+ const $diff = /*#__PURE__*/cssVar$1('switch-track-diff');
3990
+ const diffValue = /*#__PURE__*/calc.subtract($width, $height);
3991
+ const $translateX = /*#__PURE__*/cssVar$1('switch-thumb-x');
3992
+ const baseStyleThumb = /*#__PURE__*/defineStyle$1({
3993
+ bg: 'white',
3994
+ transitionProperty: 'transform',
3995
+ transitionDuration: 'normal',
3996
+ borderRadius: 'inherit',
3997
+ width: [$height.reference],
3998
+ height: [$height.reference],
3999
+ _checked: {
4000
+ transform: `translateX(${$translateX.reference})`
4001
+ }
4002
+ });
4003
+ const baseStyle$5 = /*#__PURE__*/definePartsStyle$5(() => ({
3067
4004
  container: {
3068
- // ...
3069
- },
3070
- thumb: {
3071
- bg: 'white'
4005
+ [$diff.variable]: diffValue,
4006
+ [$translateX.variable]: $diff.reference,
4007
+ _rtl: {
4008
+ [$translateX.variable]: calc($diff).negate().toString()
4009
+ }
3072
4010
  },
3073
4011
  track: {
3074
4012
  bg: 'neutral.400',
3075
4013
  p: 1,
3076
4014
  _checked: {
3077
- bg: 'primary.500'
4015
+ bg: 'primary.500',
4016
+ _disabled: {
4017
+ bg: 'neutral.600'
4018
+ }
4019
+ },
4020
+ _disabled: {
4021
+ bg: 'neutral.500',
4022
+ opacity: '100%'
3078
4023
  }
3079
- }
3080
- });
3081
- const Switch = /*#__PURE__*/defineMultiStyleConfig$1({
3082
- baseStyle: baseStyle$2
3083
- });
3084
-
3085
- const {
3086
- definePartsStyle: definePartsStyle$4
3087
- } = /*#__PURE__*/createMultiStyleConfigHelpers(popoverAnatomy.keys);
3088
- const Popover = {
3089
- baseStyle: props => definePartsStyle$4({
3090
- popper: {
3091
- background: mode('white', 'inherit')(props)
4024
+ },
4025
+ thumb: baseStyleThumb
4026
+ }));
4027
+ const sizes$2 = {
4028
+ sm: /*#__PURE__*/definePartsStyle$5({
4029
+ container: {
4030
+ [$width.variable]: '2.125rem',
4031
+ [$height.variable]: '1.063rem'
4032
+ }
4033
+ }),
4034
+ md: /*#__PURE__*/definePartsStyle$5({
4035
+ container: {
4036
+ [$width.variable]: '2.875rem',
4037
+ [$height.variable]: '1.5rem'
4038
+ }
4039
+ }),
4040
+ lg: /*#__PURE__*/definePartsStyle$5({
4041
+ container: {
4042
+ [$width.variable]: '3.625rem',
4043
+ [$height.variable]: '1.813rem'
3092
4044
  }
3093
4045
  })
3094
4046
  };
4047
+ const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$4({
4048
+ baseStyle: baseStyle$5,
4049
+ sizes: sizes$2,
4050
+ defaultProps: {
4051
+ size: 'md'
4052
+ }
4053
+ });
3095
4054
 
3096
- const Textarea = {
3097
- baseStyle: {
4055
+ const getProps = props => {
4056
+ const {
4057
+ isError,
4058
+ isSuccess,
4059
+ isDisabled
4060
+ } = props;
4061
+ let borderColor = 'neutral.400';
4062
+ let focusBorderColor = 'primary.500';
4063
+ if (isError) {
4064
+ borderColor = 'danger.500';
4065
+ focusBorderColor = 'danger.500';
4066
+ } else if (isSuccess) {
4067
+ borderColor = 'success.500';
4068
+ focusBorderColor = 'success.500';
4069
+ } else if (isDisabled && !isError && !isSuccess) {
4070
+ borderColor = 'neutral.400';
4071
+ focusBorderColor = 'danger.500';
4072
+ }
4073
+ return {
4074
+ focusBorderColor,
4075
+ borderColor
4076
+ };
4077
+ };
4078
+ const outline$1 = /*#__PURE__*/defineStyle(props => {
4079
+ const {
4080
+ focusBorderColor,
4081
+ borderColor
4082
+ } = getProps(props);
4083
+ return {
4084
+ background: 'white.high',
4085
+ color: 'black.high',
4086
+ borderColor,
4087
+ fontSize: 'text.sm',
4088
+ padding: 2,
4089
+ borderRadius: 'md',
4090
+ borderWidth: '1px',
4091
+ outline: 'none',
4092
+ _disabled: {
4093
+ opacity: 1,
4094
+ color: 'black.medium',
4095
+ background: 'neutral.300'
4096
+ },
4097
+ _placeholder: {
4098
+ color: 'black.low'
4099
+ },
3098
4100
  _hover: {
3099
- borderColor: 'primary.500',
3100
- boxShadow: 'none',
3101
- outline: 'none'
4101
+ borderColor
3102
4102
  },
3103
4103
  _focus: {
3104
- borderColor: 'primary.500',
3105
- boxShadow: 'none',
3106
- outline: 'none'
4104
+ outline: 'none',
4105
+ borderColor: focusBorderColor,
4106
+ boxShadow: 'none'
3107
4107
  },
3108
4108
  _focusVisible: {
3109
- borderColor: 'primary.500',
3110
- boxShadow: 'none',
3111
- outline: 'none'
4109
+ outline: 'none',
4110
+ borderColor: focusBorderColor,
4111
+ boxShadow: 'none'
3112
4112
  },
3113
4113
  _focusWithin: {
3114
- borderColor: 'primary.500',
3115
- boxShadow: 'none',
3116
- outline: 'none'
4114
+ outline: 'none',
4115
+ borderColor: focusBorderColor,
4116
+ boxShadow: 'none'
4117
+ },
4118
+ _invalid: {
4119
+ outline: 'none',
4120
+ borderColor: 'danger.500',
4121
+ boxShadow: 'none'
3117
4122
  }
4123
+ };
4124
+ });
4125
+ const Textarea = /*#__PURE__*/defineStyleConfig$1({
4126
+ variants: {
4127
+ outline: outline$1
4128
+ },
4129
+ defaultProps: {
4130
+ variant: 'outline'
3118
4131
  }
3119
- };
4132
+ });
3120
4133
 
3121
4134
 
3122
4135
 
3123
4136
  var components = {
3124
4137
  __proto__: null,
3125
- Button: Button,
4138
+ Alert: alertTheme,
4139
+ Button: Button$1,
4140
+ Card: CardStyle,
3126
4141
  Checkbox: Checkbox,
4142
+ Chips: Chips,
3127
4143
  FormLabel: FormLabel,
3128
4144
  Input: Input,
3129
- Radio: Radio,
3130
- Switch: Switch,
4145
+ LoaderStyle: LoaderStyle,
3131
4146
  Popover: Popover,
4147
+ Radio: Radio,
4148
+ Switch: Switch$1,
3132
4149
  Textarea: Textarea
3133
4150
  };
3134
4151
 
@@ -3147,7 +4164,8 @@ const theme = /*#__PURE__*/extendTheme({
3147
4164
  background: 'neutral.400'
3148
4165
  },
3149
4166
  body: {
3150
- fontSize: 'text.sm'
4167
+ fontSize: 'text.sm',
4168
+ color: 'black.high'
3151
4169
  }
3152
4170
  }
3153
4171
  },
@@ -3189,5 +4207,5 @@ const Provider = ({
3189
4207
  };
3190
4208
  Provider.displayName = 'Provider';
3191
4209
 
3192
- export { BreadCrumb, DataTable, DatePickerMonth, Datepicker, Field, Header, InputField, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Tab, TabList, TabPanel, TextareaField, Uploader, theme, useInternalUI };
4210
+ export { 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 };
3193
4211
  //# sourceMappingURL=internal-ui.esm.js.map