@ctlyst.id/internal-ui 1.0.4-canary.9 → 2.0.0-canary.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/components/checkbox/__stories__/checkbox.stories.d.ts +12 -0
- package/dist/components/checkbox/components/checkbox.d.ts +16 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/field/components/field.d.ts +5 -2
- package/dist/components/field/index.d.ts +0 -2
- package/dist/components/form/__stories__/textarea.stories.d.ts +10 -0
- package/dist/components/{field/components/textarea-field.d.ts → form/components/textarea.d.ts} +2 -6
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/{base/stories/checkbox.stories.d.ts → loader/__stories__/loader.stories.d.ts} +3 -2
- package/dist/components/loader/components/loader.d.ts +9 -0
- package/dist/components/loader/index.d.ts +2 -0
- package/dist/config/{foundations.stories.d.ts → __stories__/foundations.stories.d.ts} +1 -0
- package/dist/config/theme/components/checkbox.d.ts +86 -2
- package/dist/config/theme/components/index.d.ts +2 -1
- package/dist/config/theme/components/loader.d.ts +85 -0
- package/dist/config/theme/components/textarea.d.ts +54 -2
- package/dist/config/theme/foundations/index.d.ts +3 -2
- package/dist/config/theme/foundations/shadows.d.ts +15 -0
- package/dist/config/theme/foundations/typography.d.ts +25 -7
- package/dist/internal-ui.cjs.development.js +451 -164
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +10 -10
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +464 -179
- package/dist/internal-ui.esm.js.map +1 -1
- package/dist/provider/{provider.d.ts → components/provider.d.ts} +2 -1
- package/dist/provider/index.d.ts +2 -2
- package/package.json +2 -2
- /package/dist/components/base/{stories → __stories__}/button.stories.d.ts +0 -0
- /package/dist/components/base/{stories → __stories__}/input.stories.d.ts +0 -0
- /package/dist/components/base/{stories → __stories__}/radio.stories.d.ts +0 -0
- /package/dist/components/base/{stories → __stories__}/switch.stories.d.ts +0 -0
- /package/dist/components/breadcrumb/{components/BreadCrumb.stories.d.ts → __stories__/breadcrumb.stories.d.ts} +0 -0
- /package/dist/components/data-table/{stories/data-table.stories.d.ts → __stories__/datatable.stories.d.ts} +0 -0
- /package/dist/components/datepicker/{components → __stories__}/datepicker.stories.d.ts +0 -0
- /package/dist/components/header/{stories → __stories__}/header.stories.d.ts +0 -0
- /package/dist/components/modal/{stories → __stories__}/modal.stories.d.ts +0 -0
- /package/dist/components/navigation/{stories → __stories__}/navigation.stories.d.ts +0 -0
- /package/dist/components/pagination/{stories → __stories__}/pagination.stories.d.ts +0 -0
- /package/dist/components/select/{stories → __stories__}/select.stories.d.ts +0 -0
- /package/dist/components/tabs/{stories → __stories__}/tabs.stories.d.ts +0 -0
- /package/dist/components/uploader/{stories → __stories__}/uploader.stories.d.ts +0 -0
- /package/dist/provider/{provider.stories.d.ts → __stories__/provider.stories.d.ts} +0 -0
package/dist/internal-ui.esm.js
CHANGED
@@ -1,9 +1,9 @@
|
|
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,
|
1
|
+
import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Checkbox as Checkbox$1, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, FormControl, FormLabel as FormLabel$1, InputRightElement, FormHelperText, FormErrorMessage, theme as theme$1, InputLeftAddon, InputLeftElement, forwardRef, useStyleConfig, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Badge, ModalBody as ModalBody$1, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, createIcon, Icon, Portal, Link, Button as Button$1, VisuallyHidden, Select as Select$1, useTab, useMultiStyleConfig, TabList as TabList$1, TabPanel as TabPanel$1, Stack, Heading, createMultiStyleConfigHelpers, defineStyleConfig as defineStyleConfig$1, defineStyle as defineStyle$1, extendTheme } from '@chakra-ui/react';
|
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, useRef, useEffect, useState, useMemo, Fragment, forwardRef as forwardRef$1, 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';
|
@@ -15,8 +15,9 @@ import ReactSelectAsyncCreatable from 'react-select/async-creatable';
|
|
15
15
|
import ReactSelectCreatable from 'react-select/creatable';
|
16
16
|
import { useDropzone } from 'react-dropzone';
|
17
17
|
import { mode, getColor } from '@chakra-ui/theme-tools';
|
18
|
-
import { checkboxAnatomy, inputAnatomy, radioAnatomy, switchAnatomy
|
19
|
-
import {
|
18
|
+
import { checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy } from '@chakra-ui/anatomy';
|
19
|
+
import { defineStyleConfig, defineStyle, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1 } from '@chakra-ui/styled-system';
|
20
|
+
import '@fontsource/poppins';
|
20
21
|
import axios from 'axios';
|
21
22
|
|
22
23
|
/* eslint-disable react-hooks/rules-of-hooks */
|
@@ -114,6 +115,43 @@ BreadCrumb.defaultProps = {
|
|
114
115
|
spacing: 2
|
115
116
|
};
|
116
117
|
|
118
|
+
function CheckboxComponent({
|
119
|
+
isError = false,
|
120
|
+
helpText = '',
|
121
|
+
errorText = '',
|
122
|
+
children,
|
123
|
+
isDisabled,
|
124
|
+
...rest
|
125
|
+
}) {
|
126
|
+
const variant = isError ? 'errors' : 'unstyled';
|
127
|
+
return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
|
128
|
+
display: "flex"
|
129
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox$1, Object.assign({
|
130
|
+
variant: variant
|
131
|
+
}, rest, {
|
132
|
+
isDisabled: isDisabled
|
133
|
+
})), children && /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
|
134
|
+
ml: "8px"
|
135
|
+
}, /*#__PURE__*/React__default.createElement(Text, {
|
136
|
+
textStyle: "text.sm",
|
137
|
+
color: isDisabled ? 'black.low' : 'black.high'
|
138
|
+
}, children)))), /*#__PURE__*/React__default.createElement(Box, {
|
139
|
+
mt: "5px",
|
140
|
+
ml: "24px"
|
141
|
+
}, isError ? /*#__PURE__*/React__default.createElement(Text, {
|
142
|
+
textStyle: "text.xs",
|
143
|
+
color: "danger.500"
|
144
|
+
}, errorText) : /*#__PURE__*/React__default.createElement(Text, {
|
145
|
+
textStyle: "text.xs",
|
146
|
+
color: isDisabled ? 'black.low' : 'black.medium'
|
147
|
+
}, helpText)));
|
148
|
+
}
|
149
|
+
CheckboxComponent.defaultProps = {
|
150
|
+
isError: false,
|
151
|
+
helpText: '',
|
152
|
+
errorText: ''
|
153
|
+
};
|
154
|
+
|
117
155
|
const IndeterminateCheckbox = ({
|
118
156
|
indeterminate = false,
|
119
157
|
...rest
|
@@ -1302,7 +1340,7 @@ const success = {
|
|
1302
1340
|
'200': '#A9F9B5',
|
1303
1341
|
'300': '#7CEE98',
|
1304
1342
|
'400': '#58DD86',
|
1305
|
-
'500': '#
|
1343
|
+
'500': '#28C76F',
|
1306
1344
|
'600': '#1DAB6A',
|
1307
1345
|
'700': '#148F63',
|
1308
1346
|
'800': '#0C7359',
|
@@ -1430,8 +1468,13 @@ const radius = {
|
|
1430
1468
|
full: '9999px'
|
1431
1469
|
};
|
1432
1470
|
|
1433
|
-
const
|
1434
|
-
...theme$1.
|
1471
|
+
const shadows = {
|
1472
|
+
...theme$1.shadows,
|
1473
|
+
raised: '0px 4px 20px rgba(0, 0, 0, 0.05)'
|
1474
|
+
};
|
1475
|
+
|
1476
|
+
const sizes = {
|
1477
|
+
...theme$1.sizes,
|
1435
1478
|
4.5: '1.125rem',
|
1436
1479
|
9.5: '2.375rem',
|
1437
1480
|
18: '4.5rem',
|
@@ -1440,8 +1483,8 @@ const spacing = {
|
|
1440
1483
|
30: '7.5rem'
|
1441
1484
|
};
|
1442
1485
|
|
1443
|
-
const
|
1444
|
-
...theme$1.
|
1486
|
+
const spacing = {
|
1487
|
+
...theme$1.space,
|
1445
1488
|
4.5: '1.125rem',
|
1446
1489
|
9.5: '2.375rem',
|
1447
1490
|
18: '4.5rem',
|
@@ -1472,6 +1515,11 @@ const lineHeights = {
|
|
1472
1515
|
short: 1.375,
|
1473
1516
|
base: 1.5,
|
1474
1517
|
tall: 1.625,
|
1518
|
+
64: '4rem',
|
1519
|
+
56: '3.5rem',
|
1520
|
+
48: '3rem',
|
1521
|
+
40: '2.5rem',
|
1522
|
+
36: '2.25rem',
|
1475
1523
|
34: '2.125rem',
|
1476
1524
|
32: '2rem',
|
1477
1525
|
30: '1.875rem',
|
@@ -1485,14 +1533,22 @@ const lineHeights = {
|
|
1485
1533
|
14: '0.875rem',
|
1486
1534
|
12: '0.75rem'
|
1487
1535
|
};
|
1536
|
+
const letterSpacings = {
|
1537
|
+
tighter: '-0.05em',
|
1538
|
+
tight: '-0.025em',
|
1539
|
+
normal: '0',
|
1540
|
+
wide: '0.025em',
|
1541
|
+
wider: '0.05em',
|
1542
|
+
widest: '0.1em'
|
1543
|
+
};
|
1488
1544
|
const fontSizes = {
|
1489
1545
|
heading: {
|
1490
|
-
1: '
|
1491
|
-
2: '
|
1492
|
-
3: '1.
|
1493
|
-
4: '1.
|
1494
|
-
5: '
|
1495
|
-
6: '
|
1546
|
+
1: '2.5rem',
|
1547
|
+
2: '2rem',
|
1548
|
+
3: '1.75rem',
|
1549
|
+
4: '1.5rem',
|
1550
|
+
5: '1.375rem',
|
1551
|
+
6: '1.125rem'
|
1496
1552
|
},
|
1497
1553
|
text: {
|
1498
1554
|
xl: '1.125rem',
|
@@ -1518,85 +1574,90 @@ const fontSizes = {
|
|
1518
1574
|
const heading = {
|
1519
1575
|
1: {
|
1520
1576
|
fontSize: fontSizes.heading[1],
|
1521
|
-
fontWeight:
|
1522
|
-
lineHeight:
|
1523
|
-
letterSpacing:
|
1577
|
+
fontWeight: fontWeights.semibold,
|
1578
|
+
lineHeight: lineHeights[64],
|
1579
|
+
letterSpacing: letterSpacings.normal
|
1524
1580
|
},
|
1525
1581
|
2: {
|
1526
1582
|
fontSize: fontSizes.heading[2],
|
1527
|
-
fontWeight:
|
1528
|
-
lineHeight:
|
1529
|
-
letterSpacing:
|
1583
|
+
fontWeight: fontWeights.semibold,
|
1584
|
+
lineHeight: lineHeights[56],
|
1585
|
+
letterSpacing: letterSpacings.normal
|
1530
1586
|
},
|
1531
1587
|
3: {
|
1532
1588
|
fontSize: fontSizes.heading[3],
|
1533
|
-
fontWeight:
|
1534
|
-
lineHeight:
|
1535
|
-
letterSpacing:
|
1589
|
+
fontWeight: fontWeights.semibold,
|
1590
|
+
lineHeight: lineHeights[48],
|
1591
|
+
letterSpacing: letterSpacings.normal
|
1536
1592
|
},
|
1537
1593
|
4: {
|
1538
1594
|
fontSize: fontSizes.heading[4],
|
1539
|
-
fontWeight:
|
1540
|
-
lineHeight:
|
1541
|
-
letterSpacing:
|
1595
|
+
fontWeight: fontWeights.semibold,
|
1596
|
+
lineHeight: lineHeights[40],
|
1597
|
+
letterSpacing: letterSpacings.normal
|
1542
1598
|
},
|
1543
1599
|
5: {
|
1544
1600
|
fontSize: fontSizes.heading[5],
|
1545
|
-
fontWeight:
|
1546
|
-
lineHeight:
|
1547
|
-
letterSpacing:
|
1601
|
+
fontWeight: fontWeights.semibold,
|
1602
|
+
lineHeight: lineHeights[36],
|
1603
|
+
letterSpacing: letterSpacings.normal
|
1548
1604
|
},
|
1549
1605
|
6: {
|
1550
1606
|
fontSize: fontSizes.heading[6],
|
1551
|
-
fontWeight:
|
1552
|
-
lineHeight:
|
1553
|
-
letterSpacing:
|
1607
|
+
fontWeight: fontWeights.semibold,
|
1608
|
+
lineHeight: lineHeights[32],
|
1609
|
+
letterSpacing: letterSpacings.normal
|
1554
1610
|
}
|
1555
1611
|
};
|
1556
1612
|
const text = {
|
1557
1613
|
xl: {
|
1558
1614
|
fontSize: fontSizes.text.xl,
|
1615
|
+
fontWeight: fontWeights.normal,
|
1559
1616
|
lineHeight: lineHeights[28],
|
1560
|
-
letterSpacing:
|
1617
|
+
letterSpacing: letterSpacings.normal
|
1561
1618
|
},
|
1562
1619
|
lg: {
|
1563
1620
|
fontSize: fontSizes.text.lg,
|
1621
|
+
fontWeight: fontWeights.normal,
|
1564
1622
|
lineHeight: lineHeights[24],
|
1565
|
-
letterSpacing:
|
1623
|
+
letterSpacing: letterSpacings.normal
|
1566
1624
|
},
|
1567
1625
|
md: {
|
1568
1626
|
fontSize: fontSizes.text.md,
|
1627
|
+
fontWeight: fontWeights.normal,
|
1569
1628
|
lineHeight: lineHeights[22],
|
1570
|
-
letterSpacing:
|
1629
|
+
letterSpacing: letterSpacings.normal
|
1571
1630
|
},
|
1572
1631
|
sm: {
|
1573
1632
|
fontSize: fontSizes.text.sm,
|
1633
|
+
fontWeight: fontWeights.normal,
|
1574
1634
|
lineHeight: lineHeights[18],
|
1575
|
-
letterSpacing:
|
1635
|
+
letterSpacing: letterSpacings.normal
|
1576
1636
|
},
|
1577
1637
|
xs: {
|
1578
1638
|
fontSize: fontSizes.text.xs,
|
1639
|
+
fontWeight: fontWeights.normal,
|
1579
1640
|
lineHeight: lineHeights[14],
|
1580
|
-
letterSpacing:
|
1641
|
+
letterSpacing: letterSpacings.normal
|
1581
1642
|
}
|
1582
1643
|
};
|
1583
1644
|
const button = {
|
1584
1645
|
lg: {
|
1585
1646
|
fontSize: fontSizes.button.lg,
|
1586
1647
|
lineHeight: lineHeights[28],
|
1587
|
-
letterSpacing:
|
1648
|
+
letterSpacing: letterSpacings.normal,
|
1588
1649
|
fontWeight: fontWeights.normal
|
1589
1650
|
},
|
1590
1651
|
md: {
|
1591
1652
|
fontSize: fontSizes.button.md,
|
1592
1653
|
lineHeight: lineHeights[22],
|
1593
|
-
letterSpacing:
|
1654
|
+
letterSpacing: letterSpacings.normal,
|
1594
1655
|
fontWeight: fontWeights.normal
|
1595
1656
|
},
|
1596
1657
|
sm: {
|
1597
1658
|
fontSize: fontSizes.button.sm,
|
1598
1659
|
lineHeight: lineHeights[14],
|
1599
|
-
letterSpacing:
|
1660
|
+
letterSpacing: letterSpacings.normal,
|
1600
1661
|
fontWeight: fontWeights.normal
|
1601
1662
|
}
|
1602
1663
|
};
|
@@ -1604,19 +1665,19 @@ const field = {
|
|
1604
1665
|
lg: {
|
1605
1666
|
fontSize: fontSizes.field.lg,
|
1606
1667
|
lineHeight: lineHeights[24],
|
1607
|
-
letterSpacing:
|
1668
|
+
letterSpacing: letterSpacings.normal,
|
1608
1669
|
fontWeight: fontWeights.normal
|
1609
1670
|
},
|
1610
1671
|
md: {
|
1611
1672
|
fontSize: fontSizes.field.md,
|
1612
1673
|
lineHeight: lineHeights[22],
|
1613
|
-
letterSpacing:
|
1674
|
+
letterSpacing: letterSpacings.normal,
|
1614
1675
|
fontWeight: fontWeights.normal
|
1615
1676
|
},
|
1616
1677
|
sm: {
|
1617
1678
|
fontSize: fontSizes.field.sm,
|
1618
1679
|
lineHeight: lineHeights[18],
|
1619
|
-
letterSpacing:
|
1680
|
+
letterSpacing: letterSpacings.normal,
|
1620
1681
|
fontWeight: fontWeights.normal
|
1621
1682
|
}
|
1622
1683
|
};
|
@@ -1633,10 +1694,12 @@ var foundations = {
|
|
1633
1694
|
__proto__: null,
|
1634
1695
|
colors: colors,
|
1635
1696
|
radii: radius,
|
1636
|
-
|
1697
|
+
shadows: shadows,
|
1637
1698
|
sizes: sizes,
|
1699
|
+
space: spacing,
|
1638
1700
|
fonts: fonts,
|
1639
1701
|
fontSizes: fontSizes,
|
1702
|
+
letterSpacings: letterSpacings,
|
1640
1703
|
lineHeights: lineHeights,
|
1641
1704
|
textStyles: textStyles
|
1642
1705
|
};
|
@@ -1690,35 +1753,63 @@ const Field = props => {
|
|
1690
1753
|
const {
|
1691
1754
|
label,
|
1692
1755
|
isError,
|
1693
|
-
|
1694
|
-
|
1756
|
+
errorMessage,
|
1757
|
+
leftHelperText,
|
1758
|
+
rightHelperText,
|
1695
1759
|
isRequired,
|
1696
|
-
children
|
1760
|
+
children,
|
1761
|
+
isSuccess,
|
1762
|
+
isDisabled
|
1697
1763
|
} = props;
|
1764
|
+
const getHelperColor = () => {
|
1765
|
+
if (isError) return 'danger.500';
|
1766
|
+
if (isSuccess) return 'success.500';
|
1767
|
+
if (isDisabled) return 'black.low';
|
1768
|
+
return 'black.medium';
|
1769
|
+
};
|
1770
|
+
const getJustifyContentHelper = () => {
|
1771
|
+
if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
|
1772
|
+
return 'space-between';
|
1773
|
+
};
|
1774
|
+
const helperColor = getHelperColor();
|
1775
|
+
const justifyHelper = getJustifyContentHelper();
|
1698
1776
|
return /*#__PURE__*/React__default.createElement(FormControl, {
|
1699
1777
|
isInvalid: isError
|
1700
1778
|
}, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
|
1701
|
-
|
1779
|
+
mb: 1,
|
1780
|
+
fontSize: "text.sm",
|
1702
1781
|
requiredIndicator: undefined
|
1703
1782
|
}, isRequired && /*#__PURE__*/React__default.createElement(Box, {
|
1704
1783
|
as: "span",
|
1705
|
-
color: "
|
1784
|
+
color: "danger.500",
|
1706
1785
|
ml: 0,
|
1707
1786
|
mr: 1
|
1708
|
-
}, "*"), label) : label), children,
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1787
|
+
}, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
|
1788
|
+
display: "flex",
|
1789
|
+
width: "full",
|
1790
|
+
justifyContent: justifyHelper
|
1791
|
+
}, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
1792
|
+
fontSize: "text.xs",
|
1793
|
+
color: helperColor,
|
1794
|
+
mt: 1
|
1795
|
+
}, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
|
1796
|
+
fontSize: "text.xs",
|
1797
|
+
color: "danger.500",
|
1798
|
+
mt: 1
|
1799
|
+
}, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
1800
|
+
fontSize: "text.xs",
|
1801
|
+
color: helperColor,
|
1802
|
+
mt: 1
|
1803
|
+
}, rightHelperText)));
|
1716
1804
|
};
|
1717
1805
|
Field.defaultProps = {
|
1718
1806
|
label: '',
|
1719
1807
|
isError: false,
|
1720
|
-
|
1721
|
-
|
1808
|
+
isSuccess: false,
|
1809
|
+
isDisabled: false,
|
1810
|
+
errorMessage: undefined,
|
1811
|
+
leftHelperText: undefined,
|
1812
|
+
rightHelperText: undefined,
|
1722
1813
|
isRequired: false
|
1723
1814
|
};
|
1724
1815
|
|
@@ -1734,15 +1825,21 @@ const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
1734
1825
|
isRequired,
|
1735
1826
|
label,
|
1736
1827
|
isError,
|
1737
|
-
|
1738
|
-
|
1828
|
+
isSuccess,
|
1829
|
+
isDisabled,
|
1830
|
+
errorMessage,
|
1831
|
+
leftHelperText,
|
1832
|
+
rightHelperText,
|
1739
1833
|
...inputProps
|
1740
1834
|
} = props;
|
1741
1835
|
return /*#__PURE__*/React__default.createElement(Field, {
|
1742
1836
|
label: label,
|
1837
|
+
isSuccess: isSuccess,
|
1838
|
+
isDisabled: isDisabled,
|
1743
1839
|
isError: isError,
|
1744
|
-
|
1745
|
-
|
1840
|
+
errorMessage: errorMessage,
|
1841
|
+
leftHelperText: leftHelperText,
|
1842
|
+
rightHelperText: rightHelperText,
|
1746
1843
|
isRequired: isRequired
|
1747
1844
|
}, /*#__PURE__*/React__default.createElement(InputGroup, {
|
1748
1845
|
size: size
|
@@ -1759,21 +1856,36 @@ InputField.defaultProps = {
|
|
1759
1856
|
elementRight: undefined
|
1760
1857
|
};
|
1761
1858
|
|
1859
|
+
const Loader = /*#__PURE__*/forwardRef((props, ref) => {
|
1860
|
+
const styles = useStyleConfig('LoaderStyle', props);
|
1861
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
1862
|
+
ref: ref,
|
1863
|
+
__css: styles
|
1864
|
+
});
|
1865
|
+
});
|
1866
|
+
|
1762
1867
|
const TextareaField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
1763
1868
|
const {
|
1764
1869
|
value,
|
1870
|
+
isLoading,
|
1765
1871
|
...inputProps
|
1766
1872
|
} = props;
|
1767
|
-
return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, inputProps), /*#__PURE__*/React__default.createElement(
|
1873
|
+
return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, inputProps), /*#__PURE__*/React__default.createElement(Box, {
|
1874
|
+
position: "relative"
|
1875
|
+
}, /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
|
1768
1876
|
ref: ref,
|
1769
1877
|
value: value
|
1770
|
-
}, inputProps))
|
1878
|
+
}, inputProps)), isLoading && /*#__PURE__*/React__default.createElement(Box, {
|
1879
|
+
zIndex: 999,
|
1880
|
+
top: 2,
|
1881
|
+
right: 2,
|
1882
|
+
position: "absolute"
|
1883
|
+
}, /*#__PURE__*/React__default.createElement(Loader, {
|
1884
|
+
size: "sm"
|
1885
|
+
}))));
|
1771
1886
|
});
|
1772
1887
|
TextareaField.defaultProps = {
|
1773
|
-
|
1774
|
-
addOnRight: undefined,
|
1775
|
-
elementLeft: undefined,
|
1776
|
-
elementRight: undefined
|
1888
|
+
isLoading: undefined
|
1777
1889
|
};
|
1778
1890
|
|
1779
1891
|
const XMSLogo = () => /*#__PURE__*/React__default.createElement(Image, {
|
@@ -1970,7 +2082,7 @@ const ModalBody = /*#__PURE__*/React__default.forwardRef(({
|
|
1970
2082
|
}, rest), children);
|
1971
2083
|
});
|
1972
2084
|
|
1973
|
-
const ModalCloseButton = /*#__PURE__*/forwardRef((props, ref) => {
|
2085
|
+
const ModalCloseButton = /*#__PURE__*/forwardRef$1((props, ref) => {
|
1974
2086
|
return /*#__PURE__*/React__default.createElement(ModalCloseButton$1, Object.assign({
|
1975
2087
|
ref: ref,
|
1976
2088
|
top: 4,
|
@@ -1980,7 +2092,7 @@ const ModalCloseButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
1980
2092
|
}, props));
|
1981
2093
|
});
|
1982
2094
|
|
1983
|
-
const ModalFooter = /*#__PURE__*/forwardRef(({
|
2095
|
+
const ModalFooter = /*#__PURE__*/forwardRef$1(({
|
1984
2096
|
children,
|
1985
2097
|
...rest
|
1986
2098
|
}, ref) => {
|
@@ -1991,7 +2103,7 @@ const ModalFooter = /*#__PURE__*/forwardRef(({
|
|
1991
2103
|
}, rest), children);
|
1992
2104
|
});
|
1993
2105
|
|
1994
|
-
const ModalHeader = /*#__PURE__*/forwardRef(({
|
2106
|
+
const ModalHeader = /*#__PURE__*/forwardRef$1(({
|
1995
2107
|
children,
|
1996
2108
|
...rest
|
1997
2109
|
}, ref) => {
|
@@ -2142,7 +2254,7 @@ Navigation.defaultProps = {
|
|
2142
2254
|
host: undefined
|
2143
2255
|
};
|
2144
2256
|
|
2145
|
-
const PaginationButton = /*#__PURE__*/forwardRef
|
2257
|
+
const PaginationButton = /*#__PURE__*/forwardRef(({
|
2146
2258
|
className,
|
2147
2259
|
style,
|
2148
2260
|
isActive,
|
@@ -2554,7 +2666,7 @@ function SelectCreatable({
|
|
2554
2666
|
})));
|
2555
2667
|
}
|
2556
2668
|
|
2557
|
-
const Tab = /*#__PURE__*/forwardRef
|
2669
|
+
const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
2558
2670
|
var _props$leftAddon, _props$rightAddon;
|
2559
2671
|
const tabProps = useTab({
|
2560
2672
|
...props,
|
@@ -2582,13 +2694,13 @@ const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
|
|
2582
2694
|
})));
|
2583
2695
|
});
|
2584
2696
|
|
2585
|
-
const TabList = /*#__PURE__*/forwardRef
|
2697
|
+
const TabList = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(TabList$1, {
|
2586
2698
|
borderBottom: "1px solid",
|
2587
2699
|
borderColor: useColorModeValue('gray.200', 'bright-gray.800'),
|
2588
2700
|
ref: ref
|
2589
2701
|
}, props.children));
|
2590
2702
|
|
2591
|
-
const TabPanel = /*#__PURE__*/forwardRef
|
2703
|
+
const TabPanel = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(TabPanel$1, {
|
2592
2704
|
px: 0,
|
2593
2705
|
ref: ref
|
2594
2706
|
}, props.children));
|
@@ -2788,80 +2900,106 @@ const Button = {
|
|
2788
2900
|
};
|
2789
2901
|
|
2790
2902
|
const {
|
2791
|
-
definePartsStyle
|
2903
|
+
definePartsStyle,
|
2904
|
+
defineMultiStyleConfig
|
2792
2905
|
} = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys);
|
2793
|
-
const
|
2794
|
-
|
2795
|
-
|
2796
|
-
|
2797
|
-
|
2798
|
-
|
2799
|
-
borderRadius: 'sm'
|
2906
|
+
const baseStyle = /*#__PURE__*/definePartsStyle({
|
2907
|
+
control: {
|
2908
|
+
borderRadius: '4px',
|
2909
|
+
width: '16px',
|
2910
|
+
height: '16px',
|
2911
|
+
border: '1px solid'
|
2800
2912
|
},
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2810
|
-
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
|
2824
|
-
|
2913
|
+
icon: {
|
2914
|
+
color: 'neutral.50',
|
2915
|
+
width: '9px'
|
2916
|
+
},
|
2917
|
+
label: {
|
2918
|
+
fontWeight: '400',
|
2919
|
+
lineHeight: '18px',
|
2920
|
+
color: 'black.high',
|
2921
|
+
ml: '8px'
|
2922
|
+
},
|
2923
|
+
_disabled: {
|
2924
|
+
background: 'neutral.500',
|
2925
|
+
border: '1px solid',
|
2926
|
+
borderColor: 'neutral.500',
|
2927
|
+
cursor: 'not-allowed'
|
2928
|
+
}
|
2929
|
+
});
|
2930
|
+
const errors = /*#__PURE__*/definePartsStyle({
|
2931
|
+
control: {
|
2932
|
+
borderColor: 'danger.500',
|
2933
|
+
_checked: {
|
2934
|
+
borderColor: 'danger.500',
|
2935
|
+
backgroundColor: 'danger.500',
|
2936
|
+
_hover: {
|
2937
|
+
borderColor: 'danger.600',
|
2938
|
+
backgroundColor: 'danger.600'
|
2825
2939
|
}
|
2826
|
-
}
|
2827
|
-
|
2828
|
-
|
2829
|
-
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2940
|
+
},
|
2941
|
+
_indeterminate: {
|
2942
|
+
borderColor: 'danger.500',
|
2943
|
+
backgroundColor: 'danger.500'
|
2944
|
+
}
|
2945
|
+
},
|
2946
|
+
label: {
|
2947
|
+
fontSize: '12px'
|
2948
|
+
}
|
2949
|
+
});
|
2950
|
+
const unstyled = /*#__PURE__*/definePartsStyle({
|
2951
|
+
control: {
|
2952
|
+
borderColor: 'neutral.500',
|
2953
|
+
_checked: {
|
2954
|
+
borderColor: 'primary.500',
|
2955
|
+
backgroundColor: 'primary.500',
|
2956
|
+
_hover: {
|
2957
|
+
borderColor: 'primary.600',
|
2958
|
+
backgroundColor: 'primary.600'
|
2834
2959
|
},
|
2835
|
-
|
2836
|
-
|
2960
|
+
_disabled: {
|
2961
|
+
backgroundColor: 'neutral.500',
|
2962
|
+
borderColor: 'neutral.500'
|
2837
2963
|
}
|
2838
|
-
}
|
2964
|
+
},
|
2965
|
+
_disabled: {
|
2966
|
+
backgroundColor: 'neutral.500'
|
2967
|
+
},
|
2968
|
+
_indeterminate: {
|
2969
|
+
borderColor: 'primary.500',
|
2970
|
+
backgroundColor: 'primary.500'
|
2971
|
+
}
|
2839
2972
|
},
|
2840
|
-
|
2841
|
-
|
2842
|
-
// The default size and variant values
|
2843
|
-
defaultProps: {
|
2844
|
-
size: 'sm',
|
2845
|
-
variant: 'solid',
|
2846
|
-
orientation: 'vertical',
|
2847
|
-
colorScheme: 'primary'
|
2973
|
+
label: {
|
2974
|
+
fontSize: '12px'
|
2848
2975
|
}
|
2976
|
+
});
|
2977
|
+
const variants = {
|
2978
|
+
errors,
|
2979
|
+
unstyled
|
2849
2980
|
};
|
2981
|
+
const Checkbox = /*#__PURE__*/defineMultiStyleConfig({
|
2982
|
+
baseStyle,
|
2983
|
+
variants,
|
2984
|
+
defaultProps: {
|
2985
|
+
variant: 'errors'
|
2986
|
+
}
|
2987
|
+
});
|
2850
2988
|
|
2851
|
-
const baseStyle = /*#__PURE__*/defineStyle({
|
2989
|
+
const baseStyle$1 = /*#__PURE__*/defineStyle({
|
2852
2990
|
fontSize: 'field.sm',
|
2853
2991
|
marginEnd: 1,
|
2854
2992
|
mb: 1
|
2855
2993
|
});
|
2856
2994
|
const FormLabel = /*#__PURE__*/defineStyleConfig({
|
2857
|
-
baseStyle
|
2995
|
+
baseStyle: baseStyle$1
|
2858
2996
|
});
|
2859
2997
|
|
2860
2998
|
const {
|
2861
2999
|
definePartsStyle: definePartsStyle$1,
|
2862
|
-
defineMultiStyleConfig
|
2863
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers(inputAnatomy.keys);
|
2864
|
-
const baseStyle$
|
3000
|
+
defineMultiStyleConfig: defineMultiStyleConfig$1
|
3001
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(inputAnatomy.keys);
|
3002
|
+
const baseStyle$2 = /*#__PURE__*/definePartsStyle$1({
|
2865
3003
|
field: {
|
2866
3004
|
width: '100%',
|
2867
3005
|
minWidth: 0,
|
@@ -2967,7 +3105,7 @@ const outline = /*#__PURE__*/definePartsStyle$1(props => {
|
|
2967
3105
|
}
|
2968
3106
|
};
|
2969
3107
|
});
|
2970
|
-
const unstyled = /*#__PURE__*/definePartsStyle$1({
|
3108
|
+
const unstyled$1 = /*#__PURE__*/definePartsStyle$1({
|
2971
3109
|
field: {
|
2972
3110
|
bg: 'transparent',
|
2973
3111
|
px: '0',
|
@@ -2979,28 +3117,130 @@ const unstyled = /*#__PURE__*/definePartsStyle$1({
|
|
2979
3117
|
height: 'auto'
|
2980
3118
|
}
|
2981
3119
|
});
|
2982
|
-
const variants = {
|
3120
|
+
const variants$1 = {
|
2983
3121
|
outline,
|
2984
|
-
unstyled
|
3122
|
+
unstyled: unstyled$1
|
2985
3123
|
};
|
2986
|
-
const Input = /*#__PURE__*/defineMultiStyleConfig({
|
2987
|
-
baseStyle: baseStyle$
|
3124
|
+
const Input = /*#__PURE__*/defineMultiStyleConfig$1({
|
3125
|
+
baseStyle: baseStyle$2,
|
2988
3126
|
sizes: sizes$1,
|
2989
|
-
variants,
|
3127
|
+
variants: variants$1,
|
2990
3128
|
defaultProps: {
|
2991
3129
|
size: 'sm',
|
2992
3130
|
variant: 'outline'
|
2993
3131
|
}
|
2994
3132
|
});
|
2995
3133
|
|
3134
|
+
const rotate = /*#__PURE__*/keyframes({
|
3135
|
+
'0%': {
|
3136
|
+
transform: 'rotate(0deg)'
|
3137
|
+
},
|
3138
|
+
'100%': {
|
3139
|
+
transform: 'rotate(360deg)'
|
3140
|
+
}
|
3141
|
+
});
|
3142
|
+
const LoaderStyle = /*#__PURE__*/defineStyleConfig({
|
3143
|
+
baseStyle: props => {
|
3144
|
+
const colors$1 = props.color === 'white' ? 'white' : colors.primary[600];
|
3145
|
+
return {
|
3146
|
+
borderRadius: '50%',
|
3147
|
+
display: 'flex',
|
3148
|
+
justifyContent: 'center',
|
3149
|
+
alignItems: 'center',
|
3150
|
+
animation: `${rotate} 1s linear infinite`,
|
3151
|
+
background: `conic-gradient(from 180deg at 50% 50%, ${colors$1} 0deg, rgba(217, 217, 217, 0) 360deg);`,
|
3152
|
+
':before': {
|
3153
|
+
content: `''`,
|
3154
|
+
display: 'block',
|
3155
|
+
borderRadius: '50%',
|
3156
|
+
width: '6px',
|
3157
|
+
height: '6px',
|
3158
|
+
position: 'absolute',
|
3159
|
+
bottom: 0,
|
3160
|
+
background: colors$1
|
3161
|
+
}
|
3162
|
+
};
|
3163
|
+
},
|
3164
|
+
sizes: {
|
3165
|
+
xs: {
|
3166
|
+
width: '12px',
|
3167
|
+
height: '12px',
|
3168
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);',
|
3169
|
+
':before': {
|
3170
|
+
width: '1.4px',
|
3171
|
+
height: '1.4px'
|
3172
|
+
}
|
3173
|
+
},
|
3174
|
+
sm: {
|
3175
|
+
width: '16px',
|
3176
|
+
height: '16px',
|
3177
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);',
|
3178
|
+
':before': {
|
3179
|
+
width: '1.87px',
|
3180
|
+
height: '1.87px'
|
3181
|
+
}
|
3182
|
+
},
|
3183
|
+
md: {
|
3184
|
+
width: '24px',
|
3185
|
+
height: '24px',
|
3186
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);',
|
3187
|
+
':before': {
|
3188
|
+
width: '2.8px',
|
3189
|
+
height: '2.8px'
|
3190
|
+
}
|
3191
|
+
},
|
3192
|
+
lg: {
|
3193
|
+
width: '50px',
|
3194
|
+
height: '50px',
|
3195
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);',
|
3196
|
+
':before': {
|
3197
|
+
width: '5.83px',
|
3198
|
+
height: '5.83px'
|
3199
|
+
}
|
3200
|
+
},
|
3201
|
+
xl: {
|
3202
|
+
width: '75px',
|
3203
|
+
height: '75px',
|
3204
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);',
|
3205
|
+
':before': {
|
3206
|
+
width: '8.75px',
|
3207
|
+
height: '8.75px'
|
3208
|
+
}
|
3209
|
+
},
|
3210
|
+
xxl: {
|
3211
|
+
width: '100px',
|
3212
|
+
height: '100px',
|
3213
|
+
WebkitMask: `radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);`,
|
3214
|
+
':before': {
|
3215
|
+
width: '11.67px',
|
3216
|
+
height: '11.67px'
|
3217
|
+
}
|
3218
|
+
}
|
3219
|
+
},
|
3220
|
+
defaultProps: {
|
3221
|
+
size: 'lg'
|
3222
|
+
}
|
3223
|
+
});
|
3224
|
+
|
2996
3225
|
const {
|
2997
3226
|
definePartsStyle: definePartsStyle$2
|
2998
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers(
|
3227
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(popoverAnatomy.keys);
|
3228
|
+
const Popover = {
|
3229
|
+
baseStyle: props => definePartsStyle$2({
|
3230
|
+
popper: {
|
3231
|
+
background: mode('white', 'inherit')(props)
|
3232
|
+
}
|
3233
|
+
})
|
3234
|
+
};
|
3235
|
+
|
3236
|
+
const {
|
3237
|
+
definePartsStyle: definePartsStyle$3
|
3238
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(radioAnatomy.keys);
|
2999
3239
|
// You can also use the more specific type for
|
3000
3240
|
// a single part component: ComponentSingleStyleConfig
|
3001
3241
|
const Radio = {
|
3002
3242
|
// The styles all checkbox have in common
|
3003
|
-
baseStyle: /*#__PURE__*/definePartsStyle$
|
3243
|
+
baseStyle: /*#__PURE__*/definePartsStyle$3({
|
3004
3244
|
control: {
|
3005
3245
|
_checked: {
|
3006
3246
|
borderColor: 'primary.500',
|
@@ -3019,7 +3259,7 @@ const Radio = {
|
|
3019
3259
|
}),
|
3020
3260
|
// Two sizes: sm and md
|
3021
3261
|
sizes: {
|
3022
|
-
sm: /*#__PURE__*/definePartsStyle$
|
3262
|
+
sm: /*#__PURE__*/definePartsStyle$3({
|
3023
3263
|
control: {
|
3024
3264
|
w: '3',
|
3025
3265
|
h: '3'
|
@@ -3028,7 +3268,7 @@ const Radio = {
|
|
3028
3268
|
fontSize: 'text.sm'
|
3029
3269
|
}
|
3030
3270
|
}),
|
3031
|
-
md: /*#__PURE__*/definePartsStyle$
|
3271
|
+
md: /*#__PURE__*/definePartsStyle$3({
|
3032
3272
|
control: {
|
3033
3273
|
w: '4',
|
3034
3274
|
h: '4'
|
@@ -3037,7 +3277,7 @@ const Radio = {
|
|
3037
3277
|
fontSize: 'text.md'
|
3038
3278
|
}
|
3039
3279
|
}),
|
3040
|
-
lg: /*#__PURE__*/definePartsStyle$
|
3280
|
+
lg: /*#__PURE__*/definePartsStyle$3({
|
3041
3281
|
control: {
|
3042
3282
|
w: '5',
|
3043
3283
|
h: '5'
|
@@ -3059,10 +3299,10 @@ const Radio = {
|
|
3059
3299
|
};
|
3060
3300
|
|
3061
3301
|
const {
|
3062
|
-
definePartsStyle: definePartsStyle$
|
3063
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
3064
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers
|
3065
|
-
const baseStyle$
|
3302
|
+
definePartsStyle: definePartsStyle$4,
|
3303
|
+
defineMultiStyleConfig: defineMultiStyleConfig$2
|
3304
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers(switchAnatomy.keys);
|
3305
|
+
const baseStyle$3 = /*#__PURE__*/definePartsStyle$4({
|
3066
3306
|
// define the part you're going to style
|
3067
3307
|
container: {
|
3068
3308
|
// ...
|
@@ -3078,45 +3318,88 @@ const baseStyle$2 = /*#__PURE__*/definePartsStyle$3({
|
|
3078
3318
|
}
|
3079
3319
|
}
|
3080
3320
|
});
|
3081
|
-
const Switch = /*#__PURE__*/defineMultiStyleConfig$
|
3082
|
-
baseStyle: baseStyle$
|
3321
|
+
const Switch = /*#__PURE__*/defineMultiStyleConfig$2({
|
3322
|
+
baseStyle: baseStyle$3
|
3083
3323
|
});
|
3084
3324
|
|
3085
|
-
const {
|
3086
|
-
|
3087
|
-
|
3088
|
-
|
3089
|
-
|
3090
|
-
|
3091
|
-
|
3092
|
-
|
3093
|
-
|
3325
|
+
const getProps = props => {
|
3326
|
+
const {
|
3327
|
+
isError,
|
3328
|
+
isSuccess,
|
3329
|
+
isDisabled
|
3330
|
+
} = props;
|
3331
|
+
let borderColor = 'neutral.400';
|
3332
|
+
let focusBorderColor = 'primary.500';
|
3333
|
+
if (isError) {
|
3334
|
+
borderColor = 'danger.500';
|
3335
|
+
focusBorderColor = 'danger.500';
|
3336
|
+
} else if (isSuccess) {
|
3337
|
+
borderColor = 'success.500';
|
3338
|
+
focusBorderColor = 'success.500';
|
3339
|
+
} else if (isDisabled && !isError && !isSuccess) {
|
3340
|
+
borderColor = 'neutral.400';
|
3341
|
+
focusBorderColor = 'danger.500';
|
3342
|
+
}
|
3343
|
+
return {
|
3344
|
+
focusBorderColor,
|
3345
|
+
borderColor
|
3346
|
+
};
|
3094
3347
|
};
|
3095
|
-
|
3096
|
-
const
|
3097
|
-
|
3348
|
+
const outline$1 = /*#__PURE__*/defineStyle$1(props => {
|
3349
|
+
const {
|
3350
|
+
focusBorderColor,
|
3351
|
+
borderColor
|
3352
|
+
} = getProps(props);
|
3353
|
+
return {
|
3354
|
+
background: 'white.high',
|
3355
|
+
color: 'black.high',
|
3356
|
+
borderColor,
|
3357
|
+
fontSize: 'text.sm',
|
3358
|
+
padding: 2,
|
3359
|
+
borderRadius: 'md',
|
3360
|
+
borderWidth: '1px',
|
3361
|
+
outline: 'none',
|
3362
|
+
_disabled: {
|
3363
|
+
opacity: 1,
|
3364
|
+
color: 'black.low',
|
3365
|
+
background: 'neutral.300'
|
3366
|
+
},
|
3367
|
+
_placeholder: {
|
3368
|
+
color: 'black.low'
|
3369
|
+
},
|
3098
3370
|
_hover: {
|
3099
|
-
borderColor
|
3100
|
-
boxShadow: 'none',
|
3101
|
-
outline: 'none'
|
3371
|
+
borderColor
|
3102
3372
|
},
|
3103
3373
|
_focus: {
|
3104
|
-
|
3105
|
-
|
3106
|
-
|
3374
|
+
outline: 'none',
|
3375
|
+
borderColor: focusBorderColor,
|
3376
|
+
boxShadow: 'none'
|
3107
3377
|
},
|
3108
3378
|
_focusVisible: {
|
3109
|
-
|
3110
|
-
|
3111
|
-
|
3379
|
+
outline: 'none',
|
3380
|
+
borderColor: focusBorderColor,
|
3381
|
+
boxShadow: 'none'
|
3112
3382
|
},
|
3113
3383
|
_focusWithin: {
|
3114
|
-
|
3115
|
-
|
3116
|
-
|
3384
|
+
outline: 'none',
|
3385
|
+
borderColor: focusBorderColor,
|
3386
|
+
boxShadow: 'none'
|
3387
|
+
},
|
3388
|
+
_invalid: {
|
3389
|
+
outline: 'none',
|
3390
|
+
borderColor: 'danger.500',
|
3391
|
+
boxShadow: 'none'
|
3117
3392
|
}
|
3393
|
+
};
|
3394
|
+
});
|
3395
|
+
const Textarea = /*#__PURE__*/defineStyleConfig$1({
|
3396
|
+
variants: {
|
3397
|
+
outline: outline$1
|
3398
|
+
},
|
3399
|
+
defaultProps: {
|
3400
|
+
variant: 'outline'
|
3118
3401
|
}
|
3119
|
-
};
|
3402
|
+
});
|
3120
3403
|
|
3121
3404
|
|
3122
3405
|
|
@@ -3126,9 +3409,10 @@ var components = {
|
|
3126
3409
|
Checkbox: Checkbox,
|
3127
3410
|
FormLabel: FormLabel,
|
3128
3411
|
Input: Input,
|
3412
|
+
LoaderStyle: LoaderStyle,
|
3413
|
+
Popover: Popover,
|
3129
3414
|
Radio: Radio,
|
3130
3415
|
Switch: Switch,
|
3131
|
-
Popover: Popover,
|
3132
3416
|
Textarea: Textarea
|
3133
3417
|
};
|
3134
3418
|
|
@@ -3147,7 +3431,8 @@ const theme = /*#__PURE__*/extendTheme({
|
|
3147
3431
|
background: 'neutral.400'
|
3148
3432
|
},
|
3149
3433
|
body: {
|
3150
|
-
fontSize: 'text.sm'
|
3434
|
+
fontSize: 'text.sm',
|
3435
|
+
color: 'black.high'
|
3151
3436
|
}
|
3152
3437
|
}
|
3153
3438
|
},
|
@@ -3189,5 +3474,5 @@ const Provider = ({
|
|
3189
3474
|
};
|
3190
3475
|
Provider.displayName = 'Provider';
|
3191
3476
|
|
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 };
|
3477
|
+
export { BreadCrumb, CheckboxComponent as Checkbox, DataTable, DatePickerMonth, Datepicker, Field, Header, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Tab, TabList, TabPanel, TextareaField, Uploader, theme, useInternalUI };
|
3193
3478
|
//# sourceMappingURL=internal-ui.esm.js.map
|