@ctlyst.id/internal-ui 1.0.4-canary.8 → 1.1.0-canary.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/card/__stories__/card.stories.d.ts +11 -0
- package/dist/components/card/components/card.d.ts +8 -0
- package/dist/components/card/index.d.ts +2 -0
- 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/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/card.d.ts +18 -0
- package/dist/config/theme/components/checkbox.d.ts +86 -2
- package/dist/config/theme/components/index.d.ts +3 -1
- package/dist/config/theme/components/loader.d.ts +85 -0
- 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 +397 -145
- 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 +401 -152
- 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 +3 -3
- /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, useStyleConfig, Card, 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, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Badge, forwardRef as forwardRef$1, 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, 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,
|
3
|
+
import React__default, { createElement, forwardRef, useRef, useEffect, useState, useMemo, Fragment, useCallback, createContext, useContext } from 'react';
|
4
4
|
import { FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiShoppingBag, FiShoppingCart, FiRepeat, FiBox, FiLayers, FiDollarSign, FiUsers, FiRotateCcw, FiSettings, FiLayout, FiGift, FiChevronDown } from 'react-icons/fi';
|
5
5
|
import { ChevronUpIcon, ChevronDownIcon, UpDownIcon, ArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, ArrowRightIcon } from '@chakra-ui/icons';
|
6
|
-
import { css, Global } from '@emotion/react';
|
6
|
+
import { css, Global, keyframes } from '@emotion/react';
|
7
7
|
import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
|
8
8
|
import classnames from 'classnames';
|
9
9
|
import ReactDatePicker from 'react-datepicker';
|
@@ -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 {
|
19
|
-
import {
|
18
|
+
import { defineStyleConfig, defineStyle, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1 } from '@chakra-ui/styled-system';
|
19
|
+
import { checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy } from '@chakra-ui/anatomy';
|
20
|
+
import '@fontsource/poppins';
|
20
21
|
import axios from 'axios';
|
21
22
|
|
22
23
|
/* eslint-disable react-hooks/rules-of-hooks */
|
@@ -114,6 +115,59 @@ BreadCrumb.defaultProps = {
|
|
114
115
|
spacing: 2
|
115
116
|
};
|
116
117
|
|
118
|
+
const CardCustom = /*#__PURE__*/forwardRef(({
|
119
|
+
children,
|
120
|
+
...rest
|
121
|
+
}, ref) => {
|
122
|
+
const styles = useStyleConfig('Card', rest);
|
123
|
+
return /*#__PURE__*/React__default.createElement(Card, Object.assign({
|
124
|
+
__css: styles,
|
125
|
+
backgroundColor: "white.high",
|
126
|
+
ref: ref
|
127
|
+
}, rest), children);
|
128
|
+
});
|
129
|
+
CardCustom.defaultProps = {
|
130
|
+
withShadow: true,
|
131
|
+
isRounded: true
|
132
|
+
};
|
133
|
+
|
134
|
+
function CheckboxComponent({
|
135
|
+
isError = false,
|
136
|
+
helpText = '',
|
137
|
+
errorText = '',
|
138
|
+
children,
|
139
|
+
isDisabled,
|
140
|
+
...rest
|
141
|
+
}) {
|
142
|
+
const variant = isError ? 'errors' : 'unstyled';
|
143
|
+
return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
|
144
|
+
display: "flex"
|
145
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox$1, Object.assign({
|
146
|
+
variant: variant
|
147
|
+
}, rest, {
|
148
|
+
isDisabled: isDisabled
|
149
|
+
})), children && /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
|
150
|
+
ml: "8px"
|
151
|
+
}, /*#__PURE__*/React__default.createElement(Text, {
|
152
|
+
textStyle: "text.sm",
|
153
|
+
color: isDisabled ? 'black.low' : 'black.high'
|
154
|
+
}, children)))), /*#__PURE__*/React__default.createElement(Box, {
|
155
|
+
mt: "5px",
|
156
|
+
ml: "24px"
|
157
|
+
}, isError ? /*#__PURE__*/React__default.createElement(Text, {
|
158
|
+
textStyle: "text.xs",
|
159
|
+
color: "danger.500"
|
160
|
+
}, errorText) : /*#__PURE__*/React__default.createElement(Text, {
|
161
|
+
textStyle: "text.xs",
|
162
|
+
color: isDisabled ? 'black.low' : 'black.medium'
|
163
|
+
}, helpText)));
|
164
|
+
}
|
165
|
+
CheckboxComponent.defaultProps = {
|
166
|
+
isError: false,
|
167
|
+
helpText: '',
|
168
|
+
errorText: ''
|
169
|
+
};
|
170
|
+
|
117
171
|
const IndeterminateCheckbox = ({
|
118
172
|
indeterminate = false,
|
119
173
|
...rest
|
@@ -1302,7 +1356,7 @@ const success = {
|
|
1302
1356
|
'200': '#A9F9B5',
|
1303
1357
|
'300': '#7CEE98',
|
1304
1358
|
'400': '#58DD86',
|
1305
|
-
'500': '#
|
1359
|
+
'500': '#28C76F',
|
1306
1360
|
'600': '#1DAB6A',
|
1307
1361
|
'700': '#148F63',
|
1308
1362
|
'800': '#0C7359',
|
@@ -1430,8 +1484,13 @@ const radius = {
|
|
1430
1484
|
full: '9999px'
|
1431
1485
|
};
|
1432
1486
|
|
1433
|
-
const
|
1434
|
-
...theme$1.
|
1487
|
+
const shadows = {
|
1488
|
+
...theme$1.shadows,
|
1489
|
+
raised: '0px 4px 20px rgba(0, 0, 0, 0.05)'
|
1490
|
+
};
|
1491
|
+
|
1492
|
+
const sizes = {
|
1493
|
+
...theme$1.sizes,
|
1435
1494
|
4.5: '1.125rem',
|
1436
1495
|
9.5: '2.375rem',
|
1437
1496
|
18: '4.5rem',
|
@@ -1440,8 +1499,8 @@ const spacing = {
|
|
1440
1499
|
30: '7.5rem'
|
1441
1500
|
};
|
1442
1501
|
|
1443
|
-
const
|
1444
|
-
...theme$1.
|
1502
|
+
const spacing = {
|
1503
|
+
...theme$1.space,
|
1445
1504
|
4.5: '1.125rem',
|
1446
1505
|
9.5: '2.375rem',
|
1447
1506
|
18: '4.5rem',
|
@@ -1472,6 +1531,11 @@ const lineHeights = {
|
|
1472
1531
|
short: 1.375,
|
1473
1532
|
base: 1.5,
|
1474
1533
|
tall: 1.625,
|
1534
|
+
64: '4rem',
|
1535
|
+
56: '3.5rem',
|
1536
|
+
48: '3rem',
|
1537
|
+
40: '2.5rem',
|
1538
|
+
36: '2.25rem',
|
1475
1539
|
34: '2.125rem',
|
1476
1540
|
32: '2rem',
|
1477
1541
|
30: '1.875rem',
|
@@ -1485,14 +1549,22 @@ const lineHeights = {
|
|
1485
1549
|
14: '0.875rem',
|
1486
1550
|
12: '0.75rem'
|
1487
1551
|
};
|
1552
|
+
const letterSpacings = {
|
1553
|
+
tighter: '-0.05em',
|
1554
|
+
tight: '-0.025em',
|
1555
|
+
normal: '0',
|
1556
|
+
wide: '0.025em',
|
1557
|
+
wider: '0.05em',
|
1558
|
+
widest: '0.1em'
|
1559
|
+
};
|
1488
1560
|
const fontSizes = {
|
1489
1561
|
heading: {
|
1490
|
-
1: '
|
1491
|
-
2: '
|
1492
|
-
3: '1.
|
1493
|
-
4: '1.
|
1494
|
-
5: '
|
1495
|
-
6: '
|
1562
|
+
1: '2.5rem',
|
1563
|
+
2: '2rem',
|
1564
|
+
3: '1.75rem',
|
1565
|
+
4: '1.5rem',
|
1566
|
+
5: '1.375rem',
|
1567
|
+
6: '1.125rem'
|
1496
1568
|
},
|
1497
1569
|
text: {
|
1498
1570
|
xl: '1.125rem',
|
@@ -1518,85 +1590,90 @@ const fontSizes = {
|
|
1518
1590
|
const heading = {
|
1519
1591
|
1: {
|
1520
1592
|
fontSize: fontSizes.heading[1],
|
1521
|
-
fontWeight:
|
1522
|
-
lineHeight:
|
1523
|
-
letterSpacing:
|
1593
|
+
fontWeight: fontWeights.semibold,
|
1594
|
+
lineHeight: lineHeights[64],
|
1595
|
+
letterSpacing: letterSpacings.normal
|
1524
1596
|
},
|
1525
1597
|
2: {
|
1526
1598
|
fontSize: fontSizes.heading[2],
|
1527
|
-
fontWeight:
|
1528
|
-
lineHeight:
|
1529
|
-
letterSpacing:
|
1599
|
+
fontWeight: fontWeights.semibold,
|
1600
|
+
lineHeight: lineHeights[56],
|
1601
|
+
letterSpacing: letterSpacings.normal
|
1530
1602
|
},
|
1531
1603
|
3: {
|
1532
1604
|
fontSize: fontSizes.heading[3],
|
1533
|
-
fontWeight:
|
1534
|
-
lineHeight:
|
1535
|
-
letterSpacing:
|
1605
|
+
fontWeight: fontWeights.semibold,
|
1606
|
+
lineHeight: lineHeights[48],
|
1607
|
+
letterSpacing: letterSpacings.normal
|
1536
1608
|
},
|
1537
1609
|
4: {
|
1538
1610
|
fontSize: fontSizes.heading[4],
|
1539
|
-
fontWeight:
|
1540
|
-
lineHeight:
|
1541
|
-
letterSpacing:
|
1611
|
+
fontWeight: fontWeights.semibold,
|
1612
|
+
lineHeight: lineHeights[40],
|
1613
|
+
letterSpacing: letterSpacings.normal
|
1542
1614
|
},
|
1543
1615
|
5: {
|
1544
1616
|
fontSize: fontSizes.heading[5],
|
1545
|
-
fontWeight:
|
1546
|
-
lineHeight:
|
1547
|
-
letterSpacing:
|
1617
|
+
fontWeight: fontWeights.semibold,
|
1618
|
+
lineHeight: lineHeights[36],
|
1619
|
+
letterSpacing: letterSpacings.normal
|
1548
1620
|
},
|
1549
1621
|
6: {
|
1550
1622
|
fontSize: fontSizes.heading[6],
|
1551
|
-
fontWeight:
|
1552
|
-
lineHeight:
|
1553
|
-
letterSpacing:
|
1623
|
+
fontWeight: fontWeights.semibold,
|
1624
|
+
lineHeight: lineHeights[32],
|
1625
|
+
letterSpacing: letterSpacings.normal
|
1554
1626
|
}
|
1555
1627
|
};
|
1556
1628
|
const text = {
|
1557
1629
|
xl: {
|
1558
1630
|
fontSize: fontSizes.text.xl,
|
1631
|
+
fontWeight: fontWeights.normal,
|
1559
1632
|
lineHeight: lineHeights[28],
|
1560
|
-
letterSpacing:
|
1633
|
+
letterSpacing: letterSpacings.normal
|
1561
1634
|
},
|
1562
1635
|
lg: {
|
1563
1636
|
fontSize: fontSizes.text.lg,
|
1637
|
+
fontWeight: fontWeights.normal,
|
1564
1638
|
lineHeight: lineHeights[24],
|
1565
|
-
letterSpacing:
|
1639
|
+
letterSpacing: letterSpacings.normal
|
1566
1640
|
},
|
1567
1641
|
md: {
|
1568
1642
|
fontSize: fontSizes.text.md,
|
1643
|
+
fontWeight: fontWeights.normal,
|
1569
1644
|
lineHeight: lineHeights[22],
|
1570
|
-
letterSpacing:
|
1645
|
+
letterSpacing: letterSpacings.normal
|
1571
1646
|
},
|
1572
1647
|
sm: {
|
1573
1648
|
fontSize: fontSizes.text.sm,
|
1649
|
+
fontWeight: fontWeights.normal,
|
1574
1650
|
lineHeight: lineHeights[18],
|
1575
|
-
letterSpacing:
|
1651
|
+
letterSpacing: letterSpacings.normal
|
1576
1652
|
},
|
1577
1653
|
xs: {
|
1578
1654
|
fontSize: fontSizes.text.xs,
|
1655
|
+
fontWeight: fontWeights.normal,
|
1579
1656
|
lineHeight: lineHeights[14],
|
1580
|
-
letterSpacing:
|
1657
|
+
letterSpacing: letterSpacings.normal
|
1581
1658
|
}
|
1582
1659
|
};
|
1583
1660
|
const button = {
|
1584
1661
|
lg: {
|
1585
1662
|
fontSize: fontSizes.button.lg,
|
1586
1663
|
lineHeight: lineHeights[28],
|
1587
|
-
letterSpacing:
|
1664
|
+
letterSpacing: letterSpacings.normal,
|
1588
1665
|
fontWeight: fontWeights.normal
|
1589
1666
|
},
|
1590
1667
|
md: {
|
1591
1668
|
fontSize: fontSizes.button.md,
|
1592
1669
|
lineHeight: lineHeights[22],
|
1593
|
-
letterSpacing:
|
1670
|
+
letterSpacing: letterSpacings.normal,
|
1594
1671
|
fontWeight: fontWeights.normal
|
1595
1672
|
},
|
1596
1673
|
sm: {
|
1597
1674
|
fontSize: fontSizes.button.sm,
|
1598
1675
|
lineHeight: lineHeights[14],
|
1599
|
-
letterSpacing:
|
1676
|
+
letterSpacing: letterSpacings.normal,
|
1600
1677
|
fontWeight: fontWeights.normal
|
1601
1678
|
}
|
1602
1679
|
};
|
@@ -1604,19 +1681,19 @@ const field = {
|
|
1604
1681
|
lg: {
|
1605
1682
|
fontSize: fontSizes.field.lg,
|
1606
1683
|
lineHeight: lineHeights[24],
|
1607
|
-
letterSpacing:
|
1684
|
+
letterSpacing: letterSpacings.normal,
|
1608
1685
|
fontWeight: fontWeights.normal
|
1609
1686
|
},
|
1610
1687
|
md: {
|
1611
1688
|
fontSize: fontSizes.field.md,
|
1612
1689
|
lineHeight: lineHeights[22],
|
1613
|
-
letterSpacing:
|
1690
|
+
letterSpacing: letterSpacings.normal,
|
1614
1691
|
fontWeight: fontWeights.normal
|
1615
1692
|
},
|
1616
1693
|
sm: {
|
1617
1694
|
fontSize: fontSizes.field.sm,
|
1618
1695
|
lineHeight: lineHeights[18],
|
1619
|
-
letterSpacing:
|
1696
|
+
letterSpacing: letterSpacings.normal,
|
1620
1697
|
fontWeight: fontWeights.normal
|
1621
1698
|
}
|
1622
1699
|
};
|
@@ -1633,10 +1710,12 @@ var foundations = {
|
|
1633
1710
|
__proto__: null,
|
1634
1711
|
colors: colors,
|
1635
1712
|
radii: radius,
|
1636
|
-
|
1713
|
+
shadows: shadows,
|
1637
1714
|
sizes: sizes,
|
1715
|
+
space: spacing,
|
1638
1716
|
fonts: fonts,
|
1639
1717
|
fontSizes: fontSizes,
|
1718
|
+
letterSpacings: letterSpacings,
|
1640
1719
|
lineHeights: lineHeights,
|
1641
1720
|
textStyles: textStyles
|
1642
1721
|
};
|
@@ -1690,35 +1769,62 @@ const Field = props => {
|
|
1690
1769
|
const {
|
1691
1770
|
label,
|
1692
1771
|
isError,
|
1693
|
-
|
1694
|
-
|
1772
|
+
errorMessage,
|
1773
|
+
leftHelperText,
|
1774
|
+
rightHelperText,
|
1695
1775
|
isRequired,
|
1696
|
-
children
|
1776
|
+
children,
|
1777
|
+
isSuccess,
|
1778
|
+
isDisabled
|
1697
1779
|
} = props;
|
1780
|
+
const getHelperColor = () => {
|
1781
|
+
if (isError) return 'danger.500';
|
1782
|
+
if (isSuccess) return 'success.500';
|
1783
|
+
if (isDisabled) return 'black.low';
|
1784
|
+
return 'black.medium';
|
1785
|
+
};
|
1786
|
+
const getJustifyContentHelper = () => {
|
1787
|
+
if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
|
1788
|
+
return 'space-between';
|
1789
|
+
};
|
1790
|
+
const helperColor = getHelperColor();
|
1791
|
+
const justifyHelper = getJustifyContentHelper();
|
1698
1792
|
return /*#__PURE__*/React__default.createElement(FormControl, {
|
1699
1793
|
isInvalid: isError
|
1700
1794
|
}, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
|
1701
|
-
fontSize: "
|
1795
|
+
fontSize: "text.sm",
|
1702
1796
|
requiredIndicator: undefined
|
1703
1797
|
}, isRequired && /*#__PURE__*/React__default.createElement(Box, {
|
1704
1798
|
as: "span",
|
1705
|
-
color: "
|
1799
|
+
color: "danger.500",
|
1706
1800
|
ml: 0,
|
1707
1801
|
mr: 1
|
1708
|
-
}, "*"), label) : label), children,
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1802
|
+
}, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
|
1803
|
+
display: "flex",
|
1804
|
+
width: "full",
|
1805
|
+
justifyContent: justifyHelper
|
1806
|
+
}, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
1807
|
+
fontSize: "text.xs",
|
1808
|
+
color: helperColor,
|
1809
|
+
mt: 1
|
1810
|
+
}, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
|
1811
|
+
fontSize: "text.xs",
|
1812
|
+
color: "danger.500",
|
1813
|
+
mt: 1
|
1814
|
+
}, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
1815
|
+
fontSize: "text.xs",
|
1816
|
+
color: helperColor,
|
1817
|
+
mt: 1
|
1818
|
+
}, rightHelperText)));
|
1716
1819
|
};
|
1717
1820
|
Field.defaultProps = {
|
1718
1821
|
label: '',
|
1719
1822
|
isError: false,
|
1720
|
-
|
1721
|
-
|
1823
|
+
isSuccess: false,
|
1824
|
+
isDisabled: false,
|
1825
|
+
errorMessage: undefined,
|
1826
|
+
leftHelperText: undefined,
|
1827
|
+
rightHelperText: undefined,
|
1722
1828
|
isRequired: false
|
1723
1829
|
};
|
1724
1830
|
|
@@ -1734,15 +1840,21 @@ const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
1734
1840
|
isRequired,
|
1735
1841
|
label,
|
1736
1842
|
isError,
|
1737
|
-
|
1738
|
-
|
1843
|
+
isSuccess,
|
1844
|
+
isDisabled,
|
1845
|
+
errorMessage,
|
1846
|
+
leftHelperText,
|
1847
|
+
rightHelperText,
|
1739
1848
|
...inputProps
|
1740
1849
|
} = props;
|
1741
1850
|
return /*#__PURE__*/React__default.createElement(Field, {
|
1742
1851
|
label: label,
|
1852
|
+
isSuccess: isSuccess,
|
1853
|
+
isDisabled: isDisabled,
|
1743
1854
|
isError: isError,
|
1744
|
-
|
1745
|
-
|
1855
|
+
errorMessage: errorMessage,
|
1856
|
+
leftHelperText: leftHelperText,
|
1857
|
+
rightHelperText: rightHelperText,
|
1746
1858
|
isRequired: isRequired
|
1747
1859
|
}, /*#__PURE__*/React__default.createElement(InputGroup, {
|
1748
1860
|
size: size
|
@@ -1960,6 +2072,14 @@ Header.defaultProps = {
|
|
1960
2072
|
hideSwitchMode: false
|
1961
2073
|
};
|
1962
2074
|
|
2075
|
+
const Loader = /*#__PURE__*/forwardRef$1((props, ref) => {
|
2076
|
+
const styles = useStyleConfig('LoaderStyle', props);
|
2077
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
2078
|
+
ref: ref,
|
2079
|
+
__css: styles
|
2080
|
+
});
|
2081
|
+
});
|
2082
|
+
|
1963
2083
|
const ModalBody = /*#__PURE__*/React__default.forwardRef(({
|
1964
2084
|
children,
|
1965
2085
|
...rest
|
@@ -2787,81 +2907,116 @@ const Button = {
|
|
2787
2907
|
}
|
2788
2908
|
};
|
2789
2909
|
|
2910
|
+
const CardStyle = /*#__PURE__*/defineStyleConfig({
|
2911
|
+
baseStyle: props => {
|
2912
|
+
return {
|
2913
|
+
shadow: props.withShadow ? 'raised' : 'none',
|
2914
|
+
borderRadius: props.isRounded ? 'lg' : 'none'
|
2915
|
+
};
|
2916
|
+
}
|
2917
|
+
});
|
2918
|
+
|
2790
2919
|
const {
|
2791
|
-
definePartsStyle
|
2920
|
+
definePartsStyle,
|
2921
|
+
defineMultiStyleConfig
|
2792
2922
|
} = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys);
|
2793
|
-
const
|
2794
|
-
|
2795
|
-
|
2796
|
-
|
2797
|
-
|
2798
|
-
|
2799
|
-
borderRadius: 'sm'
|
2923
|
+
const baseStyle = /*#__PURE__*/definePartsStyle({
|
2924
|
+
control: {
|
2925
|
+
borderRadius: '4px',
|
2926
|
+
width: '16px',
|
2927
|
+
height: '16px',
|
2928
|
+
border: '1px solid'
|
2800
2929
|
},
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2810
|
-
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
|
2824
|
-
|
2930
|
+
icon: {
|
2931
|
+
color: 'neutral.50',
|
2932
|
+
width: '9px'
|
2933
|
+
},
|
2934
|
+
label: {
|
2935
|
+
fontWeight: '400',
|
2936
|
+
lineHeight: '18px',
|
2937
|
+
color: 'black.high',
|
2938
|
+
ml: '8px'
|
2939
|
+
},
|
2940
|
+
_disabled: {
|
2941
|
+
background: 'neutral.500',
|
2942
|
+
border: '1px solid',
|
2943
|
+
borderColor: 'neutral.500',
|
2944
|
+
cursor: 'not-allowed'
|
2945
|
+
}
|
2946
|
+
});
|
2947
|
+
const errors = /*#__PURE__*/definePartsStyle({
|
2948
|
+
control: {
|
2949
|
+
borderColor: 'danger.500',
|
2950
|
+
_checked: {
|
2951
|
+
borderColor: 'danger.500',
|
2952
|
+
backgroundColor: 'danger.500',
|
2953
|
+
_hover: {
|
2954
|
+
borderColor: 'danger.600',
|
2955
|
+
backgroundColor: 'danger.600'
|
2825
2956
|
}
|
2826
|
-
}
|
2827
|
-
|
2828
|
-
|
2829
|
-
|
2830
|
-
|
2831
|
-
|
2832
|
-
|
2833
|
-
|
2957
|
+
},
|
2958
|
+
_indeterminate: {
|
2959
|
+
borderColor: 'danger.500',
|
2960
|
+
backgroundColor: 'danger.500'
|
2961
|
+
}
|
2962
|
+
},
|
2963
|
+
label: {
|
2964
|
+
fontSize: '12px'
|
2965
|
+
}
|
2966
|
+
});
|
2967
|
+
const unstyled = /*#__PURE__*/definePartsStyle({
|
2968
|
+
control: {
|
2969
|
+
borderColor: 'neutral.500',
|
2970
|
+
_checked: {
|
2971
|
+
borderColor: 'primary.500',
|
2972
|
+
backgroundColor: 'primary.500',
|
2973
|
+
_hover: {
|
2974
|
+
borderColor: 'primary.600',
|
2975
|
+
backgroundColor: 'primary.600'
|
2834
2976
|
},
|
2835
|
-
|
2836
|
-
|
2977
|
+
_disabled: {
|
2978
|
+
backgroundColor: 'neutral.500',
|
2979
|
+
borderColor: 'neutral.500'
|
2837
2980
|
}
|
2838
|
-
}
|
2981
|
+
},
|
2982
|
+
_disabled: {
|
2983
|
+
backgroundColor: 'neutral.500'
|
2984
|
+
},
|
2985
|
+
_indeterminate: {
|
2986
|
+
borderColor: 'primary.500',
|
2987
|
+
backgroundColor: 'primary.500'
|
2988
|
+
}
|
2839
2989
|
},
|
2840
|
-
|
2841
|
-
|
2842
|
-
// The default size and variant values
|
2843
|
-
defaultProps: {
|
2844
|
-
size: 'sm',
|
2845
|
-
variant: 'solid',
|
2846
|
-
orientation: 'vertical',
|
2847
|
-
colorScheme: 'primary'
|
2990
|
+
label: {
|
2991
|
+
fontSize: '12px'
|
2848
2992
|
}
|
2993
|
+
});
|
2994
|
+
const variants = {
|
2995
|
+
errors,
|
2996
|
+
unstyled
|
2849
2997
|
};
|
2998
|
+
const Checkbox = /*#__PURE__*/defineMultiStyleConfig({
|
2999
|
+
baseStyle,
|
3000
|
+
variants,
|
3001
|
+
defaultProps: {
|
3002
|
+
variant: 'errors'
|
3003
|
+
}
|
3004
|
+
});
|
2850
3005
|
|
2851
|
-
const baseStyle = /*#__PURE__*/defineStyle({
|
3006
|
+
const baseStyle$1 = /*#__PURE__*/defineStyle({
|
2852
3007
|
fontSize: 'field.sm',
|
2853
3008
|
marginEnd: 1,
|
2854
3009
|
mb: 1
|
2855
3010
|
});
|
2856
3011
|
const FormLabel = /*#__PURE__*/defineStyleConfig({
|
2857
|
-
baseStyle
|
3012
|
+
baseStyle: baseStyle$1
|
2858
3013
|
});
|
2859
3014
|
|
2860
3015
|
const {
|
2861
3016
|
definePartsStyle: definePartsStyle$1,
|
2862
|
-
defineMultiStyleConfig
|
2863
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers(inputAnatomy.keys);
|
2864
|
-
const baseStyle$
|
3017
|
+
defineMultiStyleConfig: defineMultiStyleConfig$1
|
3018
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(inputAnatomy.keys);
|
3019
|
+
const baseStyle$2 = /*#__PURE__*/definePartsStyle$1({
|
2865
3020
|
field: {
|
2866
3021
|
width: '100%',
|
2867
3022
|
minWidth: 0,
|
@@ -2967,7 +3122,7 @@ const outline = /*#__PURE__*/definePartsStyle$1(props => {
|
|
2967
3122
|
}
|
2968
3123
|
};
|
2969
3124
|
});
|
2970
|
-
const unstyled = /*#__PURE__*/definePartsStyle$1({
|
3125
|
+
const unstyled$1 = /*#__PURE__*/definePartsStyle$1({
|
2971
3126
|
field: {
|
2972
3127
|
bg: 'transparent',
|
2973
3128
|
px: '0',
|
@@ -2979,28 +3134,130 @@ const unstyled = /*#__PURE__*/definePartsStyle$1({
|
|
2979
3134
|
height: 'auto'
|
2980
3135
|
}
|
2981
3136
|
});
|
2982
|
-
const variants = {
|
3137
|
+
const variants$1 = {
|
2983
3138
|
outline,
|
2984
|
-
unstyled
|
3139
|
+
unstyled: unstyled$1
|
2985
3140
|
};
|
2986
|
-
const Input = /*#__PURE__*/defineMultiStyleConfig({
|
2987
|
-
baseStyle: baseStyle$
|
3141
|
+
const Input = /*#__PURE__*/defineMultiStyleConfig$1({
|
3142
|
+
baseStyle: baseStyle$2,
|
2988
3143
|
sizes: sizes$1,
|
2989
|
-
variants,
|
3144
|
+
variants: variants$1,
|
2990
3145
|
defaultProps: {
|
2991
3146
|
size: 'sm',
|
2992
3147
|
variant: 'outline'
|
2993
3148
|
}
|
2994
3149
|
});
|
2995
3150
|
|
3151
|
+
const rotate = /*#__PURE__*/keyframes({
|
3152
|
+
'0%': {
|
3153
|
+
transform: 'rotate(0deg)'
|
3154
|
+
},
|
3155
|
+
'100%': {
|
3156
|
+
transform: 'rotate(360deg)'
|
3157
|
+
}
|
3158
|
+
});
|
3159
|
+
const LoaderStyle = /*#__PURE__*/defineStyleConfig({
|
3160
|
+
baseStyle: props => {
|
3161
|
+
const colors$1 = props.color === 'white' ? 'white' : colors.primary[600];
|
3162
|
+
return {
|
3163
|
+
borderRadius: '50%',
|
3164
|
+
display: 'flex',
|
3165
|
+
justifyContent: 'center',
|
3166
|
+
alignItems: 'center',
|
3167
|
+
animation: `${rotate} 1s linear infinite`,
|
3168
|
+
background: `conic-gradient(from 180deg at 50% 50%, ${colors$1} 0deg, rgba(217, 217, 217, 0) 360deg);`,
|
3169
|
+
':before': {
|
3170
|
+
content: `''`,
|
3171
|
+
display: 'block',
|
3172
|
+
borderRadius: '50%',
|
3173
|
+
width: '6px',
|
3174
|
+
height: '6px',
|
3175
|
+
position: 'absolute',
|
3176
|
+
bottom: 0,
|
3177
|
+
background: colors$1
|
3178
|
+
}
|
3179
|
+
};
|
3180
|
+
},
|
3181
|
+
sizes: {
|
3182
|
+
xs: {
|
3183
|
+
width: '12px',
|
3184
|
+
height: '12px',
|
3185
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);',
|
3186
|
+
':before': {
|
3187
|
+
width: '1.4px',
|
3188
|
+
height: '1.4px'
|
3189
|
+
}
|
3190
|
+
},
|
3191
|
+
sm: {
|
3192
|
+
width: '16px',
|
3193
|
+
height: '16px',
|
3194
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);',
|
3195
|
+
':before': {
|
3196
|
+
width: '1.87px',
|
3197
|
+
height: '1.87px'
|
3198
|
+
}
|
3199
|
+
},
|
3200
|
+
md: {
|
3201
|
+
width: '24px',
|
3202
|
+
height: '24px',
|
3203
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);',
|
3204
|
+
':before': {
|
3205
|
+
width: '2.8px',
|
3206
|
+
height: '2.8px'
|
3207
|
+
}
|
3208
|
+
},
|
3209
|
+
lg: {
|
3210
|
+
width: '50px',
|
3211
|
+
height: '50px',
|
3212
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);',
|
3213
|
+
':before': {
|
3214
|
+
width: '5.83px',
|
3215
|
+
height: '5.83px'
|
3216
|
+
}
|
3217
|
+
},
|
3218
|
+
xl: {
|
3219
|
+
width: '75px',
|
3220
|
+
height: '75px',
|
3221
|
+
WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);',
|
3222
|
+
':before': {
|
3223
|
+
width: '8.75px',
|
3224
|
+
height: '8.75px'
|
3225
|
+
}
|
3226
|
+
},
|
3227
|
+
xxl: {
|
3228
|
+
width: '100px',
|
3229
|
+
height: '100px',
|
3230
|
+
WebkitMask: `radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);`,
|
3231
|
+
':before': {
|
3232
|
+
width: '11.67px',
|
3233
|
+
height: '11.67px'
|
3234
|
+
}
|
3235
|
+
}
|
3236
|
+
},
|
3237
|
+
defaultProps: {
|
3238
|
+
size: 'lg'
|
3239
|
+
}
|
3240
|
+
});
|
3241
|
+
|
2996
3242
|
const {
|
2997
3243
|
definePartsStyle: definePartsStyle$2
|
2998
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers(
|
3244
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(popoverAnatomy.keys);
|
3245
|
+
const Popover = {
|
3246
|
+
baseStyle: props => definePartsStyle$2({
|
3247
|
+
popper: {
|
3248
|
+
background: mode('white', 'inherit')(props)
|
3249
|
+
}
|
3250
|
+
})
|
3251
|
+
};
|
3252
|
+
|
3253
|
+
const {
|
3254
|
+
definePartsStyle: definePartsStyle$3
|
3255
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(radioAnatomy.keys);
|
2999
3256
|
// You can also use the more specific type for
|
3000
3257
|
// a single part component: ComponentSingleStyleConfig
|
3001
3258
|
const Radio = {
|
3002
3259
|
// The styles all checkbox have in common
|
3003
|
-
baseStyle: /*#__PURE__*/definePartsStyle$
|
3260
|
+
baseStyle: /*#__PURE__*/definePartsStyle$3({
|
3004
3261
|
control: {
|
3005
3262
|
_checked: {
|
3006
3263
|
borderColor: 'primary.500',
|
@@ -3019,7 +3276,7 @@ const Radio = {
|
|
3019
3276
|
}),
|
3020
3277
|
// Two sizes: sm and md
|
3021
3278
|
sizes: {
|
3022
|
-
sm: /*#__PURE__*/definePartsStyle$
|
3279
|
+
sm: /*#__PURE__*/definePartsStyle$3({
|
3023
3280
|
control: {
|
3024
3281
|
w: '3',
|
3025
3282
|
h: '3'
|
@@ -3028,7 +3285,7 @@ const Radio = {
|
|
3028
3285
|
fontSize: 'text.sm'
|
3029
3286
|
}
|
3030
3287
|
}),
|
3031
|
-
md: /*#__PURE__*/definePartsStyle$
|
3288
|
+
md: /*#__PURE__*/definePartsStyle$3({
|
3032
3289
|
control: {
|
3033
3290
|
w: '4',
|
3034
3291
|
h: '4'
|
@@ -3037,7 +3294,7 @@ const Radio = {
|
|
3037
3294
|
fontSize: 'text.md'
|
3038
3295
|
}
|
3039
3296
|
}),
|
3040
|
-
lg: /*#__PURE__*/definePartsStyle$
|
3297
|
+
lg: /*#__PURE__*/definePartsStyle$3({
|
3041
3298
|
control: {
|
3042
3299
|
w: '5',
|
3043
3300
|
h: '5'
|
@@ -3059,10 +3316,10 @@ const Radio = {
|
|
3059
3316
|
};
|
3060
3317
|
|
3061
3318
|
const {
|
3062
|
-
definePartsStyle: definePartsStyle$
|
3063
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
3064
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers
|
3065
|
-
const baseStyle$
|
3319
|
+
definePartsStyle: definePartsStyle$4,
|
3320
|
+
defineMultiStyleConfig: defineMultiStyleConfig$2
|
3321
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers(switchAnatomy.keys);
|
3322
|
+
const baseStyle$3 = /*#__PURE__*/definePartsStyle$4({
|
3066
3323
|
// define the part you're going to style
|
3067
3324
|
container: {
|
3068
3325
|
// ...
|
@@ -3078,21 +3335,10 @@ const baseStyle$2 = /*#__PURE__*/definePartsStyle$3({
|
|
3078
3335
|
}
|
3079
3336
|
}
|
3080
3337
|
});
|
3081
|
-
const Switch = /*#__PURE__*/defineMultiStyleConfig$
|
3082
|
-
baseStyle: baseStyle$
|
3338
|
+
const Switch = /*#__PURE__*/defineMultiStyleConfig$2({
|
3339
|
+
baseStyle: baseStyle$3
|
3083
3340
|
});
|
3084
3341
|
|
3085
|
-
const {
|
3086
|
-
definePartsStyle: definePartsStyle$4
|
3087
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers(popoverAnatomy.keys);
|
3088
|
-
const Popover = {
|
3089
|
-
baseStyle: props => definePartsStyle$4({
|
3090
|
-
popper: {
|
3091
|
-
background: mode('white', 'inherit')(props)
|
3092
|
-
}
|
3093
|
-
})
|
3094
|
-
};
|
3095
|
-
|
3096
3342
|
const Textarea = {
|
3097
3343
|
baseStyle: {
|
3098
3344
|
_hover: {
|
@@ -3123,12 +3369,14 @@ const Textarea = {
|
|
3123
3369
|
var components = {
|
3124
3370
|
__proto__: null,
|
3125
3371
|
Button: Button,
|
3372
|
+
Card: CardStyle,
|
3126
3373
|
Checkbox: Checkbox,
|
3127
3374
|
FormLabel: FormLabel,
|
3128
3375
|
Input: Input,
|
3376
|
+
LoaderStyle: LoaderStyle,
|
3377
|
+
Popover: Popover,
|
3129
3378
|
Radio: Radio,
|
3130
3379
|
Switch: Switch,
|
3131
|
-
Popover: Popover,
|
3132
3380
|
Textarea: Textarea
|
3133
3381
|
};
|
3134
3382
|
|
@@ -3147,7 +3395,8 @@ const theme = /*#__PURE__*/extendTheme({
|
|
3147
3395
|
background: 'neutral.400'
|
3148
3396
|
},
|
3149
3397
|
body: {
|
3150
|
-
fontSize: 'text.sm'
|
3398
|
+
fontSize: 'text.sm',
|
3399
|
+
color: 'black.high'
|
3151
3400
|
}
|
3152
3401
|
}
|
3153
3402
|
},
|
@@ -3189,5 +3438,5 @@ const Provider = ({
|
|
3189
3438
|
};
|
3190
3439
|
Provider.displayName = 'Provider';
|
3191
3440
|
|
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 };
|
3441
|
+
export { BreadCrumb, CardCustom as Card, 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
3442
|
//# sourceMappingURL=internal-ui.esm.js.map
|