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