@ctlyst.id/internal-ui 2.0.0-canary.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/alert/__stories__/alert.stories.d.ts +14 -0
- package/dist/components/alert/components/alert-action.d.ts +6 -0
- package/dist/components/alert/components/alert-close.d.ts +6 -0
- package/dist/components/alert/components/alert-context.d.ts +29 -0
- package/dist/components/alert/components/alert-description.d.ts +3 -0
- package/dist/components/alert/components/alert-icon.d.ts +6 -0
- package/dist/components/alert/components/alert-title.d.ts +3 -0
- package/dist/components/alert/components/alert.d.ts +25 -0
- package/dist/components/alert/components/icons.d.ts +3 -0
- package/dist/components/alert/components/index.d.ts +14 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/{base/__stories__/button.stories.d.ts → badge/__stories__/badge.stories.d.ts} +1 -1
- package/dist/components/badge/components/badge.d.ts +11 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/button/__stories__/button.stories.d.ts +14 -0
- package/dist/components/button/components/button.d.ts +4 -0
- package/dist/components/button/index.d.ts +2 -0
- 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-group.stories.d.ts +13 -0
- package/dist/components/checkbox/components/checkbox-group.d.ts +18 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/chips/__stories__/chips.stories.d.ts +12 -0
- package/dist/components/chips/components/chips.d.ts +19 -0
- package/dist/components/chips/index.d.ts +2 -0
- package/dist/components/field/components/field.d.ts +0 -1
- package/dist/components/field/index.d.ts +0 -2
- package/dist/components/form/__stories__/input.stories.d.ts +14 -0
- package/dist/components/form/components/input-addon.d.ts +7 -0
- package/dist/components/{field → form}/components/input-field.d.ts +4 -1
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/styles/input-field.d.ts +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/layouting/components/box.d.ts +4 -0
- package/dist/components/layouting/components/container.d.ts +4 -0
- package/dist/components/layouting/components/flex.d.ts +4 -0
- package/dist/components/layouting/components/grid.d.ts +4 -0
- package/dist/components/layouting/components/stack.d.ts +4 -0
- package/dist/components/layouting/components/wrap.d.ts +4 -0
- package/dist/components/layouting/index.d.ts +12 -0
- package/dist/components/radio/__stories__/radio-group.stories.d.ts +13 -0
- package/dist/components/radio/__stories__/radio.stories.d.ts +12 -0
- package/dist/components/radio/components/radio-group.d.ts +17 -0
- package/dist/components/radio/components/radio.d.ts +16 -0
- package/dist/components/radio/index.d.ts +4 -0
- package/dist/components/rating/__stories__/rating.stories.d.ts +10 -0
- package/dist/components/rating/components/rating.d.ts +6 -0
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/switch/__stories__/switch.stories.d.ts +13 -0
- package/dist/components/switch/components/switch.d.ts +18 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/text/components/text.d.ts +4 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/config/theme/components/alert.d.ts +79 -0
- package/dist/config/theme/components/card.d.ts +18 -0
- package/dist/config/theme/components/checkbox.d.ts +2 -1
- package/dist/config/theme/components/chips.d.ts +30 -0
- package/dist/config/theme/components/index.d.ts +3 -0
- package/dist/config/theme/components/input.d.ts +8 -21
- package/dist/config/theme/components/radio.d.ts +98 -2
- package/dist/config/theme/components/switch.d.ts +43 -9
- package/dist/config/theme/themeConfiguration.d.ts +4 -2
- package/dist/internal-ui.cjs.development.js +1057 -310
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +9 -9
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +1058 -325
- package/dist/internal-ui.esm.js.map +1 -1
- package/dist/provider/components/provider.d.ts +0 -1
- package/package.json +12 -11
- package/dist/components/base/__stories__/input.stories.d.ts +0 -16
- package/dist/components/base/__stories__/radio.stories.d.ts +0 -15
package/dist/internal-ui.esm.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Checkbox as Checkbox$1, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon,
|
1
|
+
import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, forwardRef, useStyleConfig, Button as Button$2, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, theme as theme$1, defineStyle, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Badge, Container, Grid, Wrap, ModalBody as ModalBody$1, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, createIcon, Icon, Portal, Link, VisuallyHidden, Select as Select$1, Radio as Radio$1, RadioGroup, useMultiStyleConfig, omitThemingProps, useCheckbox, chakra, useTab, TabList as TabList$1, TabPanel as TabPanel$1, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, defineStyleConfig as defineStyleConfig$1, extendTheme } from '@chakra-ui/react';
|
2
2
|
export { AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, Modal, ModalContent, ModalContextProvider, ModalFocusScope, ModalOverlay, TabIndicator, TabPanels, Tabs, TabsDescendantsProvider, TabsProvider, useDrawerContext, useModal, useModalContext, useModalStyles, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles } from '@chakra-ui/react';
|
3
|
-
import React__default, { createElement, useRef, useEffect, useState, useMemo, Fragment,
|
3
|
+
import React__default, { createElement, forwardRef as forwardRef$1, useRef, useEffect, useState, useMemo, Fragment, useCallback, createContext, useContext } from 'react';
|
4
4
|
import { FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiShoppingBag, FiShoppingCart, FiRepeat, FiBox, FiLayers, FiDollarSign, FiUsers, FiRotateCcw, FiSettings, FiLayout, FiGift, FiChevronDown } from 'react-icons/fi';
|
5
5
|
import { ChevronUpIcon, ChevronDownIcon, UpDownIcon, ArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, ArrowRightIcon } from '@chakra-ui/icons';
|
6
6
|
import { css, Global, keyframes } from '@emotion/react';
|
@@ -9,15 +9,16 @@ import classnames from 'classnames';
|
|
9
9
|
import ReactDatePicker from 'react-datepicker';
|
10
10
|
import { useColorMode } from '@chakra-ui/system';
|
11
11
|
import styled from '@emotion/styled';
|
12
|
+
import { Close, EyeOff, Eye, Check } from '@ctlyst.id/internal-icon';
|
12
13
|
import ReactSelect from 'react-select';
|
13
14
|
import { AsyncPaginate } from 'react-select-async-paginate';
|
14
15
|
import ReactSelectAsyncCreatable from 'react-select/async-creatable';
|
15
16
|
import ReactSelectCreatable from 'react-select/creatable';
|
17
|
+
import { cx, dataAttr } from '@chakra-ui/shared-utils';
|
16
18
|
import { useDropzone } from 'react-dropzone';
|
17
|
-
import {
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
import '@fontsource/poppins';
|
19
|
+
import { alertAnatomy, checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy } from '@chakra-ui/anatomy';
|
20
|
+
import { createMultiStyleConfigHelpers, cssVar, defineStyleConfig, defineStyle as defineStyle$1 } from '@chakra-ui/styled-system';
|
21
|
+
import { transparentize, mode, calc, cssVar as cssVar$1 } from '@chakra-ui/theme-tools';
|
21
22
|
import axios from 'axios';
|
22
23
|
|
23
24
|
/* eslint-disable react-hooks/rules-of-hooks */
|
@@ -115,6 +116,57 @@ BreadCrumb.defaultProps = {
|
|
115
116
|
spacing: 2
|
116
117
|
};
|
117
118
|
|
119
|
+
const Loader = /*#__PURE__*/forwardRef((props, ref) => {
|
120
|
+
const styles = useStyleConfig('LoaderStyle', props);
|
121
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
122
|
+
ref: ref,
|
123
|
+
__css: styles
|
124
|
+
});
|
125
|
+
});
|
126
|
+
|
127
|
+
const Button = props => {
|
128
|
+
const {
|
129
|
+
children,
|
130
|
+
variant,
|
131
|
+
size,
|
132
|
+
...rest
|
133
|
+
} = props;
|
134
|
+
const getLoaderSize = () => {
|
135
|
+
if (size === 'lg') return 'md';
|
136
|
+
if (size === 'md') return 'sm';
|
137
|
+
return 'xs';
|
138
|
+
};
|
139
|
+
const getLoaderColor = () => {
|
140
|
+
if (variant === 'primary' || variant === 'danger') return 'white';
|
141
|
+
if (variant === 'outline-danger') return 'danger';
|
142
|
+
return 'primary';
|
143
|
+
};
|
144
|
+
return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
|
145
|
+
size: size,
|
146
|
+
variant: variant,
|
147
|
+
spinner: /*#__PURE__*/React__default.createElement(Loader, {
|
148
|
+
size: getLoaderSize(),
|
149
|
+
color: getLoaderColor()
|
150
|
+
})
|
151
|
+
}, rest), children);
|
152
|
+
};
|
153
|
+
|
154
|
+
const CardCustom = /*#__PURE__*/forwardRef$1(({
|
155
|
+
children,
|
156
|
+
...rest
|
157
|
+
}, ref) => {
|
158
|
+
const styles = useStyleConfig('Card', rest);
|
159
|
+
return /*#__PURE__*/React__default.createElement(Card, Object.assign({
|
160
|
+
__css: styles,
|
161
|
+
backgroundColor: "white.high",
|
162
|
+
ref: ref
|
163
|
+
}, rest), children);
|
164
|
+
});
|
165
|
+
CardCustom.defaultProps = {
|
166
|
+
withShadow: true,
|
167
|
+
isRounded: true
|
168
|
+
};
|
169
|
+
|
118
170
|
function CheckboxComponent({
|
119
171
|
isError = false,
|
120
172
|
helpText = '',
|
@@ -130,12 +182,10 @@ function CheckboxComponent({
|
|
130
182
|
variant: variant
|
131
183
|
}, rest, {
|
132
184
|
isDisabled: isDisabled
|
133
|
-
})
|
134
|
-
ml: "8px"
|
135
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
185
|
+
}), children && /*#__PURE__*/React__default.createElement(Text, {
|
136
186
|
textStyle: "text.sm",
|
137
187
|
color: isDisabled ? 'black.low' : 'black.high'
|
138
|
-
}, children)))
|
188
|
+
}, children))), /*#__PURE__*/React__default.createElement(Box, {
|
139
189
|
mt: "5px",
|
140
190
|
ml: "24px"
|
141
191
|
}, isError ? /*#__PURE__*/React__default.createElement(Text, {
|
@@ -143,7 +193,7 @@ function CheckboxComponent({
|
|
143
193
|
color: "danger.500"
|
144
194
|
}, errorText) : /*#__PURE__*/React__default.createElement(Text, {
|
145
195
|
textStyle: "text.xs",
|
146
|
-
color:
|
196
|
+
color: "black.medium"
|
147
197
|
}, helpText)));
|
148
198
|
}
|
149
199
|
CheckboxComponent.defaultProps = {
|
@@ -152,6 +202,95 @@ CheckboxComponent.defaultProps = {
|
|
152
202
|
errorText: ''
|
153
203
|
};
|
154
204
|
|
205
|
+
/* eslint-disable no-nested-ternary */
|
206
|
+
const Field = props => {
|
207
|
+
const {
|
208
|
+
label,
|
209
|
+
isError,
|
210
|
+
errorMessage,
|
211
|
+
leftHelperText,
|
212
|
+
rightHelperText,
|
213
|
+
isRequired,
|
214
|
+
children,
|
215
|
+
isSuccess
|
216
|
+
} = props;
|
217
|
+
const getHelperColor = () => {
|
218
|
+
if (isError) return 'danger.500';
|
219
|
+
if (isSuccess) return 'success.500';
|
220
|
+
return 'black.medium';
|
221
|
+
};
|
222
|
+
const getJustifyContentHelper = () => {
|
223
|
+
if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
|
224
|
+
return 'space-between';
|
225
|
+
};
|
226
|
+
const helperColor = getHelperColor();
|
227
|
+
const justifyHelper = getJustifyContentHelper();
|
228
|
+
return /*#__PURE__*/React__default.createElement(FormControl, {
|
229
|
+
isInvalid: isError
|
230
|
+
}, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
|
231
|
+
mb: 1,
|
232
|
+
fontSize: "text.sm",
|
233
|
+
requiredIndicator: undefined
|
234
|
+
}, isRequired && /*#__PURE__*/React__default.createElement(Box, {
|
235
|
+
as: "span",
|
236
|
+
color: "danger.500",
|
237
|
+
ml: 0,
|
238
|
+
mr: 1
|
239
|
+
}, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
|
240
|
+
display: "flex",
|
241
|
+
width: "full",
|
242
|
+
justifyContent: justifyHelper
|
243
|
+
}, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
244
|
+
fontSize: "text.xs",
|
245
|
+
color: helperColor,
|
246
|
+
mt: 1
|
247
|
+
}, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
|
248
|
+
fontSize: "text.xs",
|
249
|
+
color: "danger.500",
|
250
|
+
mt: 1
|
251
|
+
}, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
252
|
+
fontSize: "text.xs",
|
253
|
+
color: helperColor,
|
254
|
+
mt: 1
|
255
|
+
}, rightHelperText)));
|
256
|
+
};
|
257
|
+
Field.defaultProps = {
|
258
|
+
label: '',
|
259
|
+
isError: false,
|
260
|
+
isSuccess: false,
|
261
|
+
errorMessage: undefined,
|
262
|
+
leftHelperText: undefined,
|
263
|
+
rightHelperText: undefined,
|
264
|
+
isRequired: false
|
265
|
+
};
|
266
|
+
|
267
|
+
function CheckboxGroupComponent(props) {
|
268
|
+
const {
|
269
|
+
children,
|
270
|
+
label,
|
271
|
+
helpText,
|
272
|
+
isError,
|
273
|
+
errorMessage,
|
274
|
+
...rest
|
275
|
+
} = props;
|
276
|
+
return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
|
277
|
+
label: label,
|
278
|
+
leftHelperText: helpText,
|
279
|
+
isError: isError,
|
280
|
+
errorMessage: errorMessage
|
281
|
+
}), /*#__PURE__*/React__default.createElement(Box, {
|
282
|
+
mt: "12px"
|
283
|
+
}, /*#__PURE__*/React__default.createElement(CheckboxGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
|
284
|
+
spacing: [1, '16px'],
|
285
|
+
direction: ['column', 'row']
|
286
|
+
}, children))));
|
287
|
+
}
|
288
|
+
CheckboxGroupComponent.defaultProps = {
|
289
|
+
helpText: '',
|
290
|
+
isError: false,
|
291
|
+
errorMessage: ''
|
292
|
+
};
|
293
|
+
|
155
294
|
const IndeterminateCheckbox = ({
|
156
295
|
indeterminate = false,
|
157
296
|
...rest
|
@@ -1748,69 +1887,60 @@ MultiDatePickerMonth.defaultProps = {
|
|
1748
1887
|
isError: false
|
1749
1888
|
};
|
1750
1889
|
|
1751
|
-
|
1752
|
-
const Field = props => {
|
1890
|
+
const getProperties = props => {
|
1753
1891
|
const {
|
1754
|
-
label,
|
1755
1892
|
isError,
|
1756
|
-
|
1757
|
-
|
1758
|
-
rightHelperText,
|
1759
|
-
isRequired,
|
1760
|
-
children,
|
1761
|
-
isSuccess,
|
1762
|
-
isDisabled
|
1893
|
+
isDisabled,
|
1894
|
+
isSuccess
|
1763
1895
|
} = props;
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
if (
|
1768
|
-
|
1896
|
+
let outlineColor = 'neutral.400';
|
1897
|
+
let focusColor = 'primary.500';
|
1898
|
+
if (isError || isDisabled || isSuccess) {
|
1899
|
+
if (isError) outlineColor = 'danger.500';else if (isSuccess) outlineColor = 'success.500';
|
1900
|
+
focusColor = outlineColor;
|
1901
|
+
}
|
1902
|
+
return {
|
1903
|
+
outlineColor,
|
1904
|
+
focusColor
|
1769
1905
|
};
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1906
|
+
};
|
1907
|
+
const getWrapperStyle = props => {
|
1908
|
+
const {
|
1909
|
+
outlineColor,
|
1910
|
+
focusColor
|
1911
|
+
} = getProperties(props);
|
1912
|
+
const style = {
|
1913
|
+
border: '1px solid',
|
1914
|
+
borderColor: outlineColor,
|
1915
|
+
borderRadius: 'md',
|
1916
|
+
transition: 'all 0.15s',
|
1917
|
+
boxShadow: 'none',
|
1918
|
+
_focusWithin: {
|
1919
|
+
borderColor: focusColor
|
1920
|
+
}
|
1773
1921
|
};
|
1774
|
-
|
1775
|
-
const justifyHelper = getJustifyContentHelper();
|
1776
|
-
return /*#__PURE__*/React__default.createElement(FormControl, {
|
1777
|
-
isInvalid: isError
|
1778
|
-
}, label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
|
1779
|
-
mb: 1,
|
1780
|
-
fontSize: "text.sm",
|
1781
|
-
requiredIndicator: undefined
|
1782
|
-
}, isRequired && /*#__PURE__*/React__default.createElement(Box, {
|
1783
|
-
as: "span",
|
1784
|
-
color: "danger.500",
|
1785
|
-
ml: 0,
|
1786
|
-
mr: 1
|
1787
|
-
}, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
|
1788
|
-
display: "flex",
|
1789
|
-
width: "full",
|
1790
|
-
justifyContent: justifyHelper
|
1791
|
-
}, !isError ? leftHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
1792
|
-
fontSize: "text.xs",
|
1793
|
-
color: helperColor,
|
1794
|
-
mt: 1
|
1795
|
-
}, leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
|
1796
|
-
fontSize: "text.xs",
|
1797
|
-
color: "danger.500",
|
1798
|
-
mt: 1
|
1799
|
-
}, errorMessage) : errorMessage, rightHelperText && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
1800
|
-
fontSize: "text.xs",
|
1801
|
-
color: helperColor,
|
1802
|
-
mt: 1
|
1803
|
-
}, rightHelperText)));
|
1922
|
+
return defineStyle(style);
|
1804
1923
|
};
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1924
|
+
|
1925
|
+
const InputAddonLeft = ({
|
1926
|
+
children
|
1927
|
+
}) => {
|
1928
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
1929
|
+
borderLeftRadius: "md",
|
1930
|
+
backgroundColor: "neutral.200",
|
1931
|
+
px: 3,
|
1932
|
+
py: 2.5
|
1933
|
+
}, children);
|
1934
|
+
};
|
1935
|
+
const InputAddonRight = ({
|
1936
|
+
children
|
1937
|
+
}) => {
|
1938
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
1939
|
+
borderRightRadius: "md",
|
1940
|
+
backgroundColor: "neutral.200",
|
1941
|
+
px: 3,
|
1942
|
+
py: 2.5
|
1943
|
+
}, children);
|
1814
1944
|
};
|
1815
1945
|
|
1816
1946
|
const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
@@ -1830,40 +1960,99 @@ const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
1830
1960
|
errorMessage,
|
1831
1961
|
leftHelperText,
|
1832
1962
|
rightHelperText,
|
1963
|
+
withClear,
|
1964
|
+
onClear,
|
1965
|
+
isLoading,
|
1833
1966
|
...inputProps
|
1834
1967
|
} = props;
|
1968
|
+
const wrapperStyle = getWrapperStyle(props);
|
1969
|
+
const [isShowPassword, setIsShowPassword] = useState(false);
|
1970
|
+
const inputType = useMemo(() => {
|
1971
|
+
return type === 'password' && isShowPassword ? 'text' : type;
|
1972
|
+
}, [isShowPassword, type]);
|
1973
|
+
const fontSize = useMemo(() => {
|
1974
|
+
if (type === 'password') {
|
1975
|
+
if (!isShowPassword && value) return 'text.xl';
|
1976
|
+
}
|
1977
|
+
return 'text.sm';
|
1978
|
+
}, [isShowPassword, type, value]);
|
1979
|
+
const iconColor = useMemo(() => {
|
1980
|
+
return isDisabled ? 'black.low' : 'black.medium';
|
1981
|
+
}, [isDisabled]);
|
1835
1982
|
return /*#__PURE__*/React__default.createElement(Field, {
|
1836
1983
|
label: label,
|
1837
1984
|
isSuccess: isSuccess,
|
1838
|
-
isDisabled: isDisabled,
|
1839
1985
|
isError: isError,
|
1840
1986
|
errorMessage: errorMessage,
|
1841
1987
|
leftHelperText: leftHelperText,
|
1842
1988
|
rightHelperText: rightHelperText,
|
1843
1989
|
isRequired: isRequired
|
1990
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
1991
|
+
__css: wrapperStyle
|
1844
1992
|
}, /*#__PURE__*/React__default.createElement(InputGroup, {
|
1845
|
-
size: size
|
1846
|
-
|
1993
|
+
size: size,
|
1994
|
+
borderRadius: "md",
|
1995
|
+
backgroundColor: isDisabled ? 'neutral.300' : 'white.high',
|
1996
|
+
cursor: isDisabled ? 'not-allowed' : 'default'
|
1997
|
+
}, addOnLeft && /*#__PURE__*/React__default.createElement(InputAddonLeft, null, addOnLeft), /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
|
1847
1998
|
ref: ref,
|
1848
|
-
type:
|
1849
|
-
value: value
|
1850
|
-
|
1999
|
+
type: inputType,
|
2000
|
+
value: value,
|
2001
|
+
isDisabled: isDisabled,
|
2002
|
+
isSuccess: isSuccess
|
2003
|
+
}, inputProps, {
|
2004
|
+
fontSize: fontSize
|
2005
|
+
})), (withClear || isLoading || type === 'password') && /*#__PURE__*/React__default.createElement(Box, {
|
2006
|
+
"data-test-id": "Pg7ttgRey7InxE4qzTjW_",
|
2007
|
+
display: "flex",
|
2008
|
+
alignItems: "center",
|
2009
|
+
justifyContent: "center",
|
2010
|
+
width: "16px",
|
2011
|
+
mr: "10px"
|
2012
|
+
}, withClear && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
|
2013
|
+
display: "flex",
|
2014
|
+
justifyContent: "center",
|
2015
|
+
onClick: !isDisabled ? onClear : undefined,
|
2016
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer'
|
2017
|
+
}, /*#__PURE__*/React__default.createElement(Close, {
|
2018
|
+
size: 4,
|
2019
|
+
color: iconColor
|
2020
|
+
})), type === 'password' && !isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
|
2021
|
+
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
2022
|
+
onClick: () => {
|
2023
|
+
if (!isDisabled) setIsShowPassword(true);
|
2024
|
+
},
|
2025
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
2026
|
+
display: "flex",
|
2027
|
+
justifyContent: "center"
|
2028
|
+
}, /*#__PURE__*/React__default.createElement(EyeOff, {
|
2029
|
+
size: 4,
|
2030
|
+
color: iconColor
|
2031
|
+
})), type === 'password' && isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
|
2032
|
+
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
2033
|
+
onClick: () => {
|
2034
|
+
if (!isDisabled) setIsShowPassword(false);
|
2035
|
+
},
|
2036
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
2037
|
+
display: "flex",
|
2038
|
+
justifyContent: "center"
|
2039
|
+
}, /*#__PURE__*/React__default.createElement(Eye, {
|
2040
|
+
size: 4,
|
2041
|
+
color: iconColor
|
2042
|
+
})), isLoading && /*#__PURE__*/React__default.createElement(Loader, {
|
2043
|
+
size: "sm"
|
2044
|
+
})), "(", addOnRight && /*#__PURE__*/React__default.createElement(InputAddonRight, null, addOnRight))));
|
1851
2045
|
});
|
1852
2046
|
InputField.defaultProps = {
|
1853
2047
|
addOnLeft: undefined,
|
1854
2048
|
addOnRight: undefined,
|
1855
2049
|
elementLeft: undefined,
|
1856
|
-
elementRight: undefined
|
2050
|
+
elementRight: undefined,
|
2051
|
+
withClear: undefined,
|
2052
|
+
isLoading: undefined,
|
2053
|
+
onClear: undefined
|
1857
2054
|
};
|
1858
2055
|
|
1859
|
-
const Loader = /*#__PURE__*/forwardRef((props, ref) => {
|
1860
|
-
const styles = useStyleConfig('LoaderStyle', props);
|
1861
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
1862
|
-
ref: ref,
|
1863
|
-
__css: styles
|
1864
|
-
});
|
1865
|
-
});
|
1866
|
-
|
1867
2056
|
const TextareaField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
1868
2057
|
const {
|
1869
2058
|
value,
|
@@ -2265,7 +2454,7 @@ const PaginationButton = /*#__PURE__*/forwardRef(({
|
|
2265
2454
|
const btnColor = useColorModeValue('black.high', 'primary.300');
|
2266
2455
|
const btnNotActiveBg = useColorModeValue('secondary.50', 'primary.500');
|
2267
2456
|
const btnNotActiveColor = useColorModeValue('primary.500', 'white');
|
2268
|
-
return /*#__PURE__*/React__default.createElement(Button$
|
2457
|
+
return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
|
2269
2458
|
"data-test-id": "Pagination-Button",
|
2270
2459
|
ref: ref,
|
2271
2460
|
className: className,
|
@@ -2474,6 +2663,68 @@ PaginationFilter.defaultProps = {
|
|
2474
2663
|
label: undefined
|
2475
2664
|
};
|
2476
2665
|
|
2666
|
+
function RadioComponent({
|
2667
|
+
isError = false,
|
2668
|
+
helpText = '',
|
2669
|
+
errorText = '',
|
2670
|
+
children,
|
2671
|
+
isDisabled,
|
2672
|
+
...rest
|
2673
|
+
}) {
|
2674
|
+
const variant = isError ? 'errors' : 'unstyled';
|
2675
|
+
return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
|
2676
|
+
display: "flex"
|
2677
|
+
}, /*#__PURE__*/React__default.createElement(Radio$1, Object.assign({
|
2678
|
+
variant: variant
|
2679
|
+
}, rest, {
|
2680
|
+
isDisabled: isDisabled
|
2681
|
+
}), children && /*#__PURE__*/React__default.createElement(Text, {
|
2682
|
+
textStyle: "text.sm",
|
2683
|
+
color: isDisabled ? 'black.low' : 'black.high'
|
2684
|
+
}, children))), /*#__PURE__*/React__default.createElement(Box, {
|
2685
|
+
mt: "5px",
|
2686
|
+
ml: "24px"
|
2687
|
+
}, isError ? /*#__PURE__*/React__default.createElement(Text, {
|
2688
|
+
textStyle: "text.xs",
|
2689
|
+
color: "danger.500"
|
2690
|
+
}, errorText) : /*#__PURE__*/React__default.createElement(Text, {
|
2691
|
+
textStyle: "text.xs",
|
2692
|
+
color: "black.medium"
|
2693
|
+
}, helpText)));
|
2694
|
+
}
|
2695
|
+
RadioComponent.defaultProps = {
|
2696
|
+
isError: false,
|
2697
|
+
helpText: '',
|
2698
|
+
errorText: ''
|
2699
|
+
};
|
2700
|
+
|
2701
|
+
function RadioGroupComponent(props) {
|
2702
|
+
const {
|
2703
|
+
children,
|
2704
|
+
label,
|
2705
|
+
helpText,
|
2706
|
+
isError,
|
2707
|
+
errorMessage,
|
2708
|
+
...rest
|
2709
|
+
} = props;
|
2710
|
+
return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
|
2711
|
+
label: label,
|
2712
|
+
leftHelperText: helpText,
|
2713
|
+
isError: isError,
|
2714
|
+
errorMessage: errorMessage
|
2715
|
+
}), /*#__PURE__*/React__default.createElement(Box, {
|
2716
|
+
mt: "12px"
|
2717
|
+
}, /*#__PURE__*/React__default.createElement(RadioGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
|
2718
|
+
spacing: [1, '16px'],
|
2719
|
+
direction: ['column', 'row']
|
2720
|
+
}, children))));
|
2721
|
+
}
|
2722
|
+
RadioGroupComponent.defaultProps = {
|
2723
|
+
helpText: '',
|
2724
|
+
isError: false,
|
2725
|
+
errorMessage: ''
|
2726
|
+
};
|
2727
|
+
|
2477
2728
|
const SelectWrapper = ({
|
2478
2729
|
children,
|
2479
2730
|
isError = false
|
@@ -2666,19 +2917,108 @@ function SelectCreatable({
|
|
2666
2917
|
})));
|
2667
2918
|
}
|
2668
2919
|
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2672
|
-
|
2673
|
-
|
2674
|
-
|
2675
|
-
|
2676
|
-
const styles = useMultiStyleConfig('
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2920
|
+
/**
|
2921
|
+
* The `Switch` component is used as an alternative for the checkbox component for switching between "enabled" and "disabled" states.
|
2922
|
+
*
|
2923
|
+
* @see Docs https://chakra-ui.com/docs/components/switch
|
2924
|
+
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/
|
2925
|
+
*/
|
2926
|
+
const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
2927
|
+
const styles = useMultiStyleConfig('Switch', props);
|
2928
|
+
const {
|
2929
|
+
size = 'md'
|
2930
|
+
} = props;
|
2931
|
+
const {
|
2932
|
+
spacing = '0.5rem',
|
2933
|
+
children,
|
2934
|
+
...ownProps
|
2935
|
+
} = omitThemingProps(props);
|
2936
|
+
const {
|
2937
|
+
state,
|
2938
|
+
getInputProps,
|
2939
|
+
getCheckboxProps,
|
2940
|
+
getRootProps,
|
2941
|
+
getLabelProps
|
2942
|
+
} = useCheckbox(ownProps);
|
2943
|
+
const containerStyles = useMemo(() => ({
|
2944
|
+
display: 'inline-block',
|
2945
|
+
position: 'relative',
|
2946
|
+
verticalAlign: 'middle',
|
2947
|
+
lineHeight: 0,
|
2948
|
+
...styles.container
|
2949
|
+
}), [styles.container]);
|
2950
|
+
const trackStyles = useMemo(() => ({
|
2951
|
+
display: 'inline-flex',
|
2952
|
+
flexShrink: 0,
|
2953
|
+
justifyContent: 'flex-start',
|
2954
|
+
boxSizing: 'content-box',
|
2955
|
+
cursor: 'pointer',
|
2956
|
+
width: 200,
|
2957
|
+
...styles.track
|
2958
|
+
}), [styles.track]);
|
2959
|
+
const labelStyles = useMemo(() => ({
|
2960
|
+
userSelect: 'none',
|
2961
|
+
marginStart: spacing,
|
2962
|
+
...styles.label
|
2963
|
+
}), [spacing, styles.label]);
|
2964
|
+
const getIconSize = value => {
|
2965
|
+
const iconSize = {
|
2966
|
+
sm: 3,
|
2967
|
+
md: 4,
|
2968
|
+
lg: 5
|
2969
|
+
};
|
2970
|
+
return iconSize[value];
|
2971
|
+
};
|
2972
|
+
return /*#__PURE__*/React__default.createElement(chakra.label, Object.assign({}, getRootProps(), {
|
2973
|
+
display: "flex",
|
2974
|
+
alignItems: "center",
|
2975
|
+
className: cx('chakra-switch', props.className),
|
2976
|
+
__css: containerStyles
|
2977
|
+
}), /*#__PURE__*/React__default.createElement("input", Object.assign({
|
2978
|
+
"data-test-id": "",
|
2979
|
+
className: "chakra-switch__input"
|
2980
|
+
}, getInputProps({}, ref))), /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({}, getCheckboxProps(), {
|
2981
|
+
className: "chakra-switch__track",
|
2982
|
+
pos: "relative",
|
2983
|
+
__css: trackStyles
|
2984
|
+
}), /*#__PURE__*/React__default.createElement(Flex, {
|
2985
|
+
gap: 2,
|
2986
|
+
pos: "absolute",
|
2987
|
+
top: "50%",
|
2988
|
+
left: "50%",
|
2989
|
+
transform: "translate(-50%, -50%)"
|
2990
|
+
}, /*#__PURE__*/React__default.createElement(Check, {
|
2991
|
+
color: "white",
|
2992
|
+
size: getIconSize(size)
|
2993
|
+
}), /*#__PURE__*/React__default.createElement(Close, {
|
2994
|
+
color: state.isDisabled ? 'neutral.600' : 'neutral.900',
|
2995
|
+
size: getIconSize(size)
|
2996
|
+
})), /*#__PURE__*/React__default.createElement(chakra.span, {
|
2997
|
+
__css: styles.thumb,
|
2998
|
+
className: "chakra-switch__thumb",
|
2999
|
+
"data-checked": dataAttr(state.isChecked),
|
3000
|
+
"data-hover": dataAttr(state.isHovered)
|
3001
|
+
})), children && /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
|
3002
|
+
className: "chakra-switch__label",
|
3003
|
+
color: state.isDisabled ? 'black.low' : 'black.high'
|
3004
|
+
}, getLabelProps(), {
|
3005
|
+
__css: labelStyles
|
3006
|
+
}), children));
|
3007
|
+
});
|
3008
|
+
|
3009
|
+
const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
3010
|
+
var _props$leftAddon, _props$rightAddon;
|
3011
|
+
const tabProps = useTab({
|
3012
|
+
...props,
|
3013
|
+
ref
|
3014
|
+
});
|
3015
|
+
const isSelected = !!tabProps['aria-selected'];
|
3016
|
+
const styles = useMultiStyleConfig('Tabs', tabProps);
|
3017
|
+
return /*#__PURE__*/createElement(Button$2, Object.assign({
|
3018
|
+
p: 3,
|
3019
|
+
fontSize: "text.md",
|
3020
|
+
_selected: {
|
3021
|
+
borderColor: useColorModeValue('primary.400', 'primary.300'),
|
2682
3022
|
color: useColorModeValue('primary.500', 'primary.300'),
|
2683
3023
|
transform: 'translateY(-2px)'
|
2684
3024
|
},
|
@@ -2795,115 +3135,390 @@ Uploader.defaultProps = {
|
|
2795
3135
|
selected: false
|
2796
3136
|
};
|
2797
3137
|
|
3138
|
+
const {
|
3139
|
+
definePartsStyle,
|
3140
|
+
defineMultiStyleConfig
|
3141
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers(alertAnatomy.keys);
|
3142
|
+
const $fg = /*#__PURE__*/cssVar('alert-fg');
|
3143
|
+
const $bg = /*#__PURE__*/cssVar('alert-bg');
|
3144
|
+
const baseStyle = /*#__PURE__*/definePartsStyle({
|
3145
|
+
container: {
|
3146
|
+
bg: $bg.reference,
|
3147
|
+
px: '4',
|
3148
|
+
py: '2',
|
3149
|
+
borderRadius: 'md'
|
3150
|
+
},
|
3151
|
+
title: {
|
3152
|
+
fontWeight: '400',
|
3153
|
+
lineHeight: '18px',
|
3154
|
+
marginEnd: '2'
|
3155
|
+
},
|
3156
|
+
description: {
|
3157
|
+
lineHeight: '6'
|
3158
|
+
},
|
3159
|
+
icon: {
|
3160
|
+
color: $fg.reference,
|
3161
|
+
flexShrink: 0,
|
3162
|
+
marginEnd: '3',
|
3163
|
+
w: '4',
|
3164
|
+
h: '4'
|
3165
|
+
},
|
3166
|
+
action: {
|
3167
|
+
'& +.chakra-alert__close': {
|
3168
|
+
ml: '3'
|
3169
|
+
}
|
3170
|
+
},
|
3171
|
+
close: {
|
3172
|
+
color: $fg.reference,
|
3173
|
+
w: '4',
|
3174
|
+
h: '4'
|
3175
|
+
},
|
3176
|
+
spinner: {
|
3177
|
+
color: $fg.reference,
|
3178
|
+
flexShrink: 0,
|
3179
|
+
marginEnd: '3',
|
3180
|
+
w: '5',
|
3181
|
+
h: '5'
|
3182
|
+
}
|
3183
|
+
});
|
3184
|
+
function getBg(props) {
|
3185
|
+
const {
|
3186
|
+
theme,
|
3187
|
+
colorScheme: c
|
3188
|
+
} = props;
|
3189
|
+
const darkBg = transparentize(`${c}.200`, 0.16)(theme);
|
3190
|
+
return {
|
3191
|
+
light: `colors.${c}.50`,
|
3192
|
+
dark: darkBg
|
3193
|
+
};
|
3194
|
+
}
|
3195
|
+
const variantSubtle = /*#__PURE__*/definePartsStyle(props => {
|
3196
|
+
const {
|
3197
|
+
colorScheme: c
|
3198
|
+
} = props;
|
3199
|
+
const bg = getBg(props);
|
3200
|
+
return {
|
3201
|
+
container: {
|
3202
|
+
[$fg.variable]: `colors.${c}.700`,
|
3203
|
+
[$bg.variable]: bg.light,
|
3204
|
+
_dark: {
|
3205
|
+
[$fg.variable]: `colors.${c}.200`,
|
3206
|
+
[$bg.variable]: bg.dark
|
3207
|
+
},
|
3208
|
+
color: $fg.reference
|
3209
|
+
}
|
3210
|
+
};
|
3211
|
+
});
|
3212
|
+
const variantSolid = /*#__PURE__*/definePartsStyle(props => {
|
3213
|
+
const {
|
3214
|
+
colorScheme: c
|
3215
|
+
} = props;
|
3216
|
+
return {
|
3217
|
+
container: {
|
3218
|
+
[$fg.variable]: `colors.white.high`,
|
3219
|
+
[$bg.variable]: `colors.${c}.500`,
|
3220
|
+
_dark: {
|
3221
|
+
[$fg.variable]: `colors.gray.900`,
|
3222
|
+
[$bg.variable]: `colors.${c}.200`
|
3223
|
+
},
|
3224
|
+
color: $fg.reference
|
3225
|
+
}
|
3226
|
+
};
|
3227
|
+
});
|
3228
|
+
const variants = {
|
3229
|
+
subtle: variantSubtle,
|
3230
|
+
solid: variantSolid
|
3231
|
+
};
|
3232
|
+
const alertTheme = /*#__PURE__*/defineMultiStyleConfig({
|
3233
|
+
baseStyle,
|
3234
|
+
variants,
|
3235
|
+
defaultProps: {
|
3236
|
+
variant: 'subtle',
|
3237
|
+
colorScheme: 'info'
|
3238
|
+
}
|
3239
|
+
});
|
3240
|
+
|
2798
3241
|
// You can also use the more specific type for
|
2799
3242
|
// a single part component: ComponentSingleStyleConfig
|
2800
|
-
const Button = {
|
3243
|
+
const Button$1 = /*#__PURE__*/defineStyleConfig({
|
2801
3244
|
// The styles all button have in common
|
2802
3245
|
baseStyle: {
|
2803
3246
|
fontSize: 'body.1',
|
2804
3247
|
fontWeight: 'normal',
|
2805
|
-
lineHeight: '1.25',
|
2806
|
-
minW: 24,
|
2807
3248
|
px: 4,
|
2808
|
-
py: 2,
|
3249
|
+
py: 2.5,
|
2809
3250
|
borderRadius: 'md',
|
2810
3251
|
_disabled: {
|
2811
|
-
opacity:
|
3252
|
+
opacity: 1,
|
3253
|
+
bg: 'neutral.300',
|
3254
|
+
color: 'black.low'
|
2812
3255
|
},
|
2813
3256
|
_hover: {
|
2814
3257
|
_disabled: {
|
2815
|
-
|
3258
|
+
bg: 'neutral.300',
|
3259
|
+
color: 'black.low'
|
2816
3260
|
}
|
2817
|
-
},
|
2818
|
-
_active: {
|
2819
|
-
_disabled: {
|
2820
|
-
opacity: 0.3
|
2821
|
-
}
|
2822
|
-
},
|
2823
|
-
_loading: {
|
2824
|
-
opacity: 0.7
|
2825
3261
|
}
|
2826
3262
|
},
|
2827
3263
|
sizes: {
|
2828
|
-
lg: {
|
2829
|
-
|
2830
|
-
|
3264
|
+
lg: props => {
|
3265
|
+
const {
|
3266
|
+
variant
|
3267
|
+
} = props;
|
3268
|
+
const base = {
|
3269
|
+
fontSize: 'text.xl',
|
3270
|
+
h: 12,
|
3271
|
+
px: 4,
|
3272
|
+
py: 2.5
|
3273
|
+
};
|
3274
|
+
const icon = {
|
3275
|
+
h: 10,
|
3276
|
+
w: 10,
|
3277
|
+
p: 0
|
3278
|
+
};
|
3279
|
+
return variant === 'icon' ? icon : base;
|
2831
3280
|
},
|
2832
|
-
md: {
|
2833
|
-
|
2834
|
-
|
3281
|
+
md: props => {
|
3282
|
+
const {
|
3283
|
+
variant
|
3284
|
+
} = props;
|
3285
|
+
const base = {
|
3286
|
+
fontSize: 'text.md',
|
3287
|
+
h: 9,
|
3288
|
+
px: 3,
|
3289
|
+
py: '7px'
|
3290
|
+
};
|
3291
|
+
const icon = {
|
3292
|
+
h: 9,
|
3293
|
+
w: 9,
|
3294
|
+
p: 0
|
3295
|
+
};
|
3296
|
+
return variant === 'icon' ? icon : base;
|
2835
3297
|
},
|
2836
|
-
sm: {
|
2837
|
-
|
2838
|
-
|
3298
|
+
sm: props => {
|
3299
|
+
const {
|
3300
|
+
variant
|
3301
|
+
} = props;
|
3302
|
+
const base = {
|
3303
|
+
fontSize: 'text.xs',
|
3304
|
+
h: 6,
|
3305
|
+
px: 2,
|
3306
|
+
py: '5px'
|
3307
|
+
};
|
3308
|
+
const icon = {
|
3309
|
+
h: 6,
|
3310
|
+
w: 6,
|
3311
|
+
p: 0
|
3312
|
+
};
|
3313
|
+
return variant === 'icon' ? icon : base;
|
2839
3314
|
}
|
2840
3315
|
},
|
2841
|
-
// Two variants: outline and solid
|
2842
3316
|
variants: {
|
2843
|
-
|
2844
|
-
|
2845
|
-
|
3317
|
+
primary: props => {
|
3318
|
+
const {
|
3319
|
+
isLoading
|
3320
|
+
} = props;
|
3321
|
+
const basePrimary = {
|
3322
|
+
color: 'white.high',
|
3323
|
+
bg: 'primary.500',
|
3324
|
+
_hover: {
|
3325
|
+
bg: 'primary.600'
|
3326
|
+
},
|
3327
|
+
_active: {
|
3328
|
+
bg: 'primary.700'
|
3329
|
+
}
|
3330
|
+
};
|
3331
|
+
const disabledLoading = {
|
3332
|
+
_disabled: {
|
3333
|
+
bg: 'primary.500'
|
3334
|
+
},
|
3335
|
+
_hover: {
|
3336
|
+
_disabled: {
|
3337
|
+
bg: 'primary.500'
|
3338
|
+
}
|
3339
|
+
}
|
3340
|
+
};
|
3341
|
+
return isLoading ? disabledLoading : basePrimary;
|
3342
|
+
},
|
3343
|
+
secondary: props => {
|
3344
|
+
const {
|
3345
|
+
isLoading
|
3346
|
+
} = props;
|
3347
|
+
const baseSecondary = {
|
3348
|
+
color: 'primary.500',
|
3349
|
+
borderWidth: 1,
|
3350
|
+
borderStyle: 'inside',
|
3351
|
+
bg: 'white.high',
|
3352
|
+
borderColor: 'primary.500',
|
3353
|
+
_hover: {
|
3354
|
+
bg: 'primary.50'
|
3355
|
+
},
|
3356
|
+
_active: {
|
3357
|
+
bg: 'primary.100'
|
3358
|
+
},
|
3359
|
+
_disabled: {
|
3360
|
+
border: 0
|
3361
|
+
}
|
3362
|
+
};
|
3363
|
+
const disabledLoading = {
|
3364
|
+
...baseSecondary,
|
3365
|
+
_disabled: {
|
3366
|
+
bg: 'white.high'
|
3367
|
+
},
|
3368
|
+
_hover: {
|
3369
|
+
_disabled: {
|
3370
|
+
bg: 'white.high'
|
3371
|
+
}
|
3372
|
+
}
|
3373
|
+
};
|
3374
|
+
return isLoading ? disabledLoading : baseSecondary;
|
3375
|
+
},
|
3376
|
+
tertiary: props => {
|
3377
|
+
const {
|
3378
|
+
isLoading
|
3379
|
+
} = props;
|
3380
|
+
const baseTertiary = {
|
3381
|
+
color: 'primary.500',
|
3382
|
+
_hover: {
|
3383
|
+
bg: 'primary.50'
|
3384
|
+
},
|
3385
|
+
_active: {
|
3386
|
+
bg: 'primary.100'
|
3387
|
+
}
|
3388
|
+
};
|
3389
|
+
const disabledLoading = {
|
3390
|
+
...baseTertiary,
|
3391
|
+
_disabled: {
|
3392
|
+
bg: 'transparent'
|
3393
|
+
},
|
3394
|
+
_hover: {
|
3395
|
+
_disabled: {
|
3396
|
+
bg: 'transparent'
|
3397
|
+
}
|
3398
|
+
}
|
3399
|
+
};
|
3400
|
+
return isLoading ? disabledLoading : baseTertiary;
|
3401
|
+
},
|
3402
|
+
danger: props => {
|
3403
|
+
const {
|
3404
|
+
isLoading
|
3405
|
+
} = props;
|
3406
|
+
const baseDanger = {
|
3407
|
+
bg: 'danger.500',
|
3408
|
+
color: 'white.high',
|
3409
|
+
_hover: {
|
3410
|
+
bg: 'danger.600'
|
3411
|
+
},
|
3412
|
+
_active: {
|
3413
|
+
bg: 'danger.700'
|
3414
|
+
}
|
3415
|
+
};
|
3416
|
+
const disabledLoading = {
|
3417
|
+
...baseDanger,
|
3418
|
+
_disabled: {
|
3419
|
+
bg: 'danger.500'
|
3420
|
+
},
|
3421
|
+
_hover: {
|
3422
|
+
_disabled: {
|
3423
|
+
bg: 'danger.500'
|
3424
|
+
}
|
3425
|
+
}
|
3426
|
+
};
|
3427
|
+
return isLoading ? disabledLoading : baseDanger;
|
3428
|
+
},
|
3429
|
+
'outline-danger': props => {
|
3430
|
+
const {
|
3431
|
+
isLoading
|
3432
|
+
} = props;
|
3433
|
+
const baseSecondary = {
|
3434
|
+
color: 'danger.500',
|
3435
|
+
borderWidth: 1,
|
3436
|
+
borderStyle: 'inside',
|
3437
|
+
bg: 'white.high',
|
3438
|
+
borderColor: 'danger.500',
|
3439
|
+
_hover: {
|
3440
|
+
bg: 'danger.50'
|
3441
|
+
},
|
3442
|
+
_active: {
|
3443
|
+
bg: 'danger.100'
|
3444
|
+
},
|
3445
|
+
_disabled: {
|
3446
|
+
border: 0
|
3447
|
+
}
|
3448
|
+
};
|
3449
|
+
const disabledLoading = {
|
3450
|
+
...baseSecondary,
|
3451
|
+
_disabled: {
|
3452
|
+
bg: 'white.high'
|
3453
|
+
},
|
3454
|
+
_hover: {
|
3455
|
+
_disabled: {
|
3456
|
+
bg: 'white.high'
|
3457
|
+
}
|
3458
|
+
}
|
3459
|
+
};
|
3460
|
+
return isLoading ? disabledLoading : baseSecondary;
|
3461
|
+
},
|
3462
|
+
link: {
|
3463
|
+
bg: 'transparent',
|
3464
|
+
color: 'primary.500',
|
2846
3465
|
_disabled: {
|
2847
|
-
|
3466
|
+
opacity: '1',
|
3467
|
+
bg: 'transparent',
|
3468
|
+
color: 'black.medium'
|
2848
3469
|
},
|
2849
3470
|
_hover: {
|
2850
|
-
|
2851
|
-
|
2852
|
-
|
2853
|
-
|
2854
|
-
},
|
2855
|
-
_focus: {
|
2856
|
-
bg: 'primary.700'
|
3471
|
+
_disabled: {
|
3472
|
+
bg: 'transparent',
|
3473
|
+
color: 'black.medium'
|
3474
|
+
}
|
2857
3475
|
}
|
2858
3476
|
},
|
2859
|
-
|
2860
|
-
|
2861
|
-
|
2862
|
-
|
2863
|
-
|
2864
|
-
borderColor: mode('primary.500', 'primary.500')(props),
|
2865
|
-
_hover: {
|
2866
|
-
bg: 'primary.50'
|
2867
|
-
},
|
3477
|
+
icon: {
|
3478
|
+
bg: 'neutral.50',
|
3479
|
+
minW: 0,
|
3480
|
+
borderColor: 'neutral.200',
|
3481
|
+
borderWidth: '1px',
|
2868
3482
|
_active: {
|
2869
|
-
bg: '
|
3483
|
+
bg: 'neutral.500',
|
3484
|
+
borderColor: 'neutral.50'
|
2870
3485
|
},
|
2871
|
-
_focus: {
|
2872
|
-
bg: 'primary.100'
|
2873
|
-
}
|
2874
|
-
}),
|
2875
|
-
'outline-danger': {
|
2876
|
-
color: 'danger.500',
|
2877
|
-
bg: 'white',
|
2878
|
-
borderStyle: 'inside',
|
2879
|
-
borderWidth: 1,
|
2880
|
-
borderColor: 'danger.500'
|
2881
|
-
},
|
2882
|
-
ghost: {
|
2883
|
-
color: 'primary.500',
|
2884
3486
|
_disabled: {
|
2885
|
-
bg: '
|
3487
|
+
bg: 'neutral.500',
|
3488
|
+
opacity: 0.3,
|
3489
|
+
borderColor: 'neutral.50'
|
3490
|
+
},
|
3491
|
+
_hover: {
|
3492
|
+
bg: 'neutral.400',
|
3493
|
+
_disabled: {
|
3494
|
+
bg: 'neutral.500',
|
3495
|
+
opacity: 0.3,
|
3496
|
+
borderColor: 'neutral.50'
|
3497
|
+
}
|
2886
3498
|
}
|
2887
|
-
},
|
2888
|
-
link: {
|
2889
|
-
bg: 'transparent',
|
2890
|
-
color: 'primary.500'
|
2891
3499
|
}
|
2892
3500
|
},
|
2893
|
-
// The default size and variant values
|
2894
3501
|
defaultProps: {
|
2895
3502
|
size: 'md',
|
2896
|
-
variant: '
|
2897
|
-
orientation: 'vertical',
|
3503
|
+
variant: 'primary',
|
2898
3504
|
colorScheme: 'primary'
|
2899
3505
|
}
|
2900
|
-
};
|
3506
|
+
});
|
3507
|
+
|
3508
|
+
const CardStyle = /*#__PURE__*/defineStyleConfig({
|
3509
|
+
baseStyle: props => {
|
3510
|
+
return {
|
3511
|
+
shadow: props.withShadow ? 'raised' : 'none',
|
3512
|
+
borderRadius: props.isRounded ? 'lg' : 'none'
|
3513
|
+
};
|
3514
|
+
}
|
3515
|
+
});
|
2901
3516
|
|
2902
3517
|
const {
|
2903
|
-
definePartsStyle,
|
2904
|
-
defineMultiStyleConfig
|
2905
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys);
|
2906
|
-
const baseStyle = /*#__PURE__*/definePartsStyle({
|
3518
|
+
definePartsStyle: definePartsStyle$1,
|
3519
|
+
defineMultiStyleConfig: defineMultiStyleConfig$1
|
3520
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(checkboxAnatomy.keys);
|
3521
|
+
const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
|
2907
3522
|
control: {
|
2908
3523
|
borderRadius: '4px',
|
2909
3524
|
width: '16px',
|
@@ -2927,7 +3542,7 @@ const baseStyle = /*#__PURE__*/definePartsStyle({
|
|
2927
3542
|
cursor: 'not-allowed'
|
2928
3543
|
}
|
2929
3544
|
});
|
2930
|
-
const errors = /*#__PURE__*/definePartsStyle({
|
3545
|
+
const errors = /*#__PURE__*/definePartsStyle$1({
|
2931
3546
|
control: {
|
2932
3547
|
borderColor: 'danger.500',
|
2933
3548
|
_checked: {
|
@@ -2947,7 +3562,7 @@ const errors = /*#__PURE__*/definePartsStyle({
|
|
2947
3562
|
fontSize: '12px'
|
2948
3563
|
}
|
2949
3564
|
});
|
2950
|
-
const unstyled = /*#__PURE__*/definePartsStyle({
|
3565
|
+
const unstyled = /*#__PURE__*/definePartsStyle$1({
|
2951
3566
|
control: {
|
2952
3567
|
borderColor: 'neutral.500',
|
2953
3568
|
_checked: {
|
@@ -2963,7 +3578,8 @@ const unstyled = /*#__PURE__*/definePartsStyle({
|
|
2963
3578
|
}
|
2964
3579
|
},
|
2965
3580
|
_disabled: {
|
2966
|
-
backgroundColor: 'neutral.500'
|
3581
|
+
backgroundColor: 'neutral.500',
|
3582
|
+
borderColor: 'neutral.500'
|
2967
3583
|
},
|
2968
3584
|
_indeterminate: {
|
2969
3585
|
borderColor: 'primary.500',
|
@@ -2974,48 +3590,109 @@ const unstyled = /*#__PURE__*/definePartsStyle({
|
|
2974
3590
|
fontSize: '12px'
|
2975
3591
|
}
|
2976
3592
|
});
|
2977
|
-
const variants = {
|
3593
|
+
const variants$1 = {
|
2978
3594
|
errors,
|
2979
3595
|
unstyled
|
2980
3596
|
};
|
2981
|
-
const Checkbox = /*#__PURE__*/defineMultiStyleConfig({
|
2982
|
-
baseStyle,
|
2983
|
-
variants,
|
3597
|
+
const Checkbox = /*#__PURE__*/defineMultiStyleConfig$1({
|
3598
|
+
baseStyle: baseStyle$1,
|
3599
|
+
variants: variants$1,
|
2984
3600
|
defaultProps: {
|
2985
|
-
variant: '
|
3601
|
+
variant: 'unstyled'
|
2986
3602
|
}
|
2987
3603
|
});
|
2988
3604
|
|
2989
|
-
const
|
3605
|
+
const Chips = /*#__PURE__*/defineStyleConfig({
|
3606
|
+
baseStyle: props => {
|
3607
|
+
const {
|
3608
|
+
isDisabled,
|
3609
|
+
isActive
|
3610
|
+
} = props;
|
3611
|
+
const defaultProps = {
|
3612
|
+
color: 'primary.500',
|
3613
|
+
fontSize: 'text.small',
|
3614
|
+
borderRadius: '24px',
|
3615
|
+
borderWidth: '1px',
|
3616
|
+
borderColor: 'primary.500',
|
3617
|
+
bg: 'white.high',
|
3618
|
+
paddingX: 3,
|
3619
|
+
paddingY: 1,
|
3620
|
+
cursor: 'default'
|
3621
|
+
};
|
3622
|
+
let chipsProps = {
|
3623
|
+
...defaultProps
|
3624
|
+
};
|
3625
|
+
if (isActive) {
|
3626
|
+
const isActiveProps = {
|
3627
|
+
bg: 'primary.500',
|
3628
|
+
color: 'white.high'
|
3629
|
+
};
|
3630
|
+
chipsProps = {
|
3631
|
+
...chipsProps,
|
3632
|
+
...isActiveProps
|
3633
|
+
};
|
3634
|
+
}
|
3635
|
+
if (isDisabled) {
|
3636
|
+
const isDisabledProps = {
|
3637
|
+
bg: 'neutral.200',
|
3638
|
+
color: 'black.low',
|
3639
|
+
borderColor: 'neutral.200',
|
3640
|
+
cursor: 'not-allowed'
|
3641
|
+
};
|
3642
|
+
chipsProps = {
|
3643
|
+
...chipsProps,
|
3644
|
+
...isDisabledProps
|
3645
|
+
};
|
3646
|
+
}
|
3647
|
+
return {
|
3648
|
+
...chipsProps
|
3649
|
+
};
|
3650
|
+
},
|
3651
|
+
sizes: {
|
3652
|
+
sm: {
|
3653
|
+
fontSize: '12px'
|
3654
|
+
},
|
3655
|
+
md: {
|
3656
|
+
fontSize: '14px'
|
3657
|
+
}
|
3658
|
+
},
|
3659
|
+
defaultProps: {
|
3660
|
+
size: 'sm'
|
3661
|
+
}
|
3662
|
+
});
|
3663
|
+
|
3664
|
+
const baseStyle$2 = /*#__PURE__*/defineStyle$1({
|
2990
3665
|
fontSize: 'field.sm',
|
2991
3666
|
marginEnd: 1,
|
2992
3667
|
mb: 1
|
2993
3668
|
});
|
2994
3669
|
const FormLabel = /*#__PURE__*/defineStyleConfig({
|
2995
|
-
baseStyle: baseStyle$
|
3670
|
+
baseStyle: baseStyle$2
|
2996
3671
|
});
|
2997
3672
|
|
2998
3673
|
const {
|
2999
|
-
definePartsStyle: definePartsStyle$
|
3000
|
-
defineMultiStyleConfig: defineMultiStyleConfig$
|
3001
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers
|
3002
|
-
const baseStyle$
|
3674
|
+
definePartsStyle: definePartsStyle$2,
|
3675
|
+
defineMultiStyleConfig: defineMultiStyleConfig$2
|
3676
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers(inputAnatomy.keys);
|
3677
|
+
const baseStyle$3 = /*#__PURE__*/definePartsStyle$2({
|
3003
3678
|
field: {
|
3004
3679
|
width: '100%',
|
3005
3680
|
minWidth: 0,
|
3006
3681
|
outline: 0,
|
3007
|
-
px: 2
|
3008
|
-
py: 2,
|
3682
|
+
px: 2,
|
3683
|
+
py: 2.5,
|
3684
|
+
paddingInlineStart: 2,
|
3685
|
+
paddingInlineEnd: 2,
|
3009
3686
|
position: 'relative',
|
3010
3687
|
appearance: 'none',
|
3011
|
-
transitionProperty: 'common',
|
3012
|
-
transitionDuration: 'normal',
|
3013
3688
|
color: 'black.high',
|
3014
3689
|
_disabled: {
|
3015
3690
|
bg: 'neutral.300',
|
3016
|
-
border:
|
3017
|
-
|
3018
|
-
|
3691
|
+
border: 0,
|
3692
|
+
cursor: 'not-allowed',
|
3693
|
+
opacity: 1,
|
3694
|
+
boxShadow: 'none',
|
3695
|
+
color: 'black.medium'
|
3019
3696
|
},
|
3020
3697
|
_placeholder: {
|
3021
3698
|
color: 'black.low'
|
@@ -3023,89 +3700,55 @@ const baseStyle$2 = /*#__PURE__*/definePartsStyle$1({
|
|
3023
3700
|
}
|
3024
3701
|
});
|
3025
3702
|
const size = {
|
3026
|
-
lg: /*#__PURE__*/defineStyle({
|
3027
|
-
fontSize: '
|
3703
|
+
lg: /*#__PURE__*/defineStyle$1({
|
3704
|
+
fontSize: 'text.lg',
|
3028
3705
|
h: 12,
|
3029
3706
|
borderRadius: 'md'
|
3030
3707
|
}),
|
3031
|
-
md: /*#__PURE__*/defineStyle({
|
3032
|
-
fontSize: '
|
3708
|
+
md: /*#__PURE__*/defineStyle$1({
|
3709
|
+
fontSize: 'text.md',
|
3033
3710
|
h: 10,
|
3034
3711
|
borderRadius: 'md'
|
3035
3712
|
}),
|
3036
|
-
sm: /*#__PURE__*/defineStyle({
|
3037
|
-
fontSize: '
|
3713
|
+
sm: /*#__PURE__*/defineStyle$1({
|
3714
|
+
fontSize: 'text.sm',
|
3038
3715
|
h: 9.5,
|
3039
3716
|
borderRadius: 'md'
|
3040
3717
|
})
|
3041
3718
|
};
|
3042
3719
|
const sizes$1 = {
|
3043
|
-
lg: /*#__PURE__*/definePartsStyle$
|
3720
|
+
lg: /*#__PURE__*/definePartsStyle$2({
|
3044
3721
|
field: size.lg,
|
3045
3722
|
addon: size.lg
|
3046
3723
|
}),
|
3047
|
-
md: /*#__PURE__*/definePartsStyle$
|
3724
|
+
md: /*#__PURE__*/definePartsStyle$2({
|
3048
3725
|
field: size.md,
|
3049
3726
|
addon: size.md
|
3050
3727
|
}),
|
3051
|
-
sm: /*#__PURE__*/definePartsStyle$
|
3728
|
+
sm: /*#__PURE__*/definePartsStyle$2({
|
3052
3729
|
field: size.sm,
|
3053
3730
|
addon: size.sm
|
3054
3731
|
})
|
3055
3732
|
};
|
3056
|
-
|
3057
|
-
const {
|
3058
|
-
|
3059
|
-
|
3060
|
-
|
3061
|
-
|
3062
|
-
|
3063
|
-
|
3064
|
-
errorBorderColor: errorBorderColor || mode('danger.500', 'danger.300')(props),
|
3065
|
-
readOnlyBorderColor: readOnlyBorderColor || mode('.500', 'danger.300')(props)
|
3066
|
-
};
|
3067
|
-
}
|
3068
|
-
const outline = /*#__PURE__*/definePartsStyle$1(props => {
|
3069
|
-
const {
|
3070
|
-
theme
|
3071
|
-
} = props;
|
3072
|
-
const {
|
3073
|
-
focusBorderColor: fc,
|
3074
|
-
errorBorderColor: ec,
|
3075
|
-
readOnlyBorderColor: rc
|
3076
|
-
} = getDefaults(props);
|
3077
|
-
return {
|
3078
|
-
field: {
|
3079
|
-
border: '1px solid',
|
3080
|
-
borderColor: mode('dark.200', 'inherit')(props),
|
3081
|
-
bg: mode('white', 'inherit')(props),
|
3082
|
-
color: mode('inherit', 'white')(props),
|
3083
|
-
_hover: {
|
3084
|
-
borderColor: mode('gray.300', 'whiteAlpha.400')(props)
|
3085
|
-
},
|
3086
|
-
_readOnly: {
|
3087
|
-
userSelect: 'all',
|
3088
|
-
borderColor: getColor(theme, rc),
|
3089
|
-
boxShadow: `0 0 0 0 ${getColor(theme, rc)}`
|
3090
|
-
},
|
3091
|
-
_invalid: {
|
3092
|
-
borderColor: getColor(theme, ec),
|
3093
|
-
boxShadow: `0 0 0 0 ${getColor(theme, ec)}`
|
3094
|
-
},
|
3095
|
-
_focusVisible: {
|
3096
|
-
zIndex: 1,
|
3097
|
-
borderColor: getColor(theme, fc),
|
3098
|
-
boxShadow: `0 0 0 0 ${getColor(theme, fc)}`
|
3099
|
-
}
|
3733
|
+
const outline = /*#__PURE__*/definePartsStyle$2(props => {
|
3734
|
+
const field = {
|
3735
|
+
border: 0,
|
3736
|
+
outline: 0,
|
3737
|
+
bg: mode('white', 'inherit')(props),
|
3738
|
+
color: mode('inherit', 'white')(props),
|
3739
|
+
_invalid: {
|
3740
|
+
boxShadow: 'none'
|
3100
3741
|
},
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3104
|
-
bg: mode('gray.100', 'whiteAlpha.300')(props)
|
3742
|
+
_focusVisible: {
|
3743
|
+
zIndex: 1,
|
3744
|
+
boxShadow: 'none'
|
3105
3745
|
}
|
3106
3746
|
};
|
3747
|
+
return {
|
3748
|
+
field
|
3749
|
+
};
|
3107
3750
|
});
|
3108
|
-
const unstyled$1 = /*#__PURE__*/definePartsStyle$
|
3751
|
+
const unstyled$1 = /*#__PURE__*/definePartsStyle$2({
|
3109
3752
|
field: {
|
3110
3753
|
bg: 'transparent',
|
3111
3754
|
px: '0',
|
@@ -3117,14 +3760,14 @@ const unstyled$1 = /*#__PURE__*/definePartsStyle$1({
|
|
3117
3760
|
height: 'auto'
|
3118
3761
|
}
|
3119
3762
|
});
|
3120
|
-
const variants$
|
3763
|
+
const variants$2 = {
|
3121
3764
|
outline,
|
3122
3765
|
unstyled: unstyled$1
|
3123
3766
|
};
|
3124
|
-
const Input = /*#__PURE__*/defineMultiStyleConfig$
|
3125
|
-
baseStyle: baseStyle$
|
3767
|
+
const Input = /*#__PURE__*/defineMultiStyleConfig$2({
|
3768
|
+
baseStyle: baseStyle$3,
|
3126
3769
|
sizes: sizes$1,
|
3127
|
-
variants: variants$
|
3770
|
+
variants: variants$2,
|
3128
3771
|
defaultProps: {
|
3129
3772
|
size: 'sm',
|
3130
3773
|
variant: 'outline'
|
@@ -3139,16 +3782,21 @@ const rotate = /*#__PURE__*/keyframes({
|
|
3139
3782
|
transform: 'rotate(360deg)'
|
3140
3783
|
}
|
3141
3784
|
});
|
3785
|
+
const getLoaderColor = color => {
|
3786
|
+
if (color === 'primary') return colors.primary[600];
|
3787
|
+
if (color === 'danger') return colors.danger[500];
|
3788
|
+
return colors.white.high;
|
3789
|
+
};
|
3142
3790
|
const LoaderStyle = /*#__PURE__*/defineStyleConfig({
|
3143
3791
|
baseStyle: props => {
|
3144
|
-
const colors
|
3792
|
+
const colors = getLoaderColor(props.color);
|
3145
3793
|
return {
|
3146
3794
|
borderRadius: '50%',
|
3147
3795
|
display: 'flex',
|
3148
3796
|
justifyContent: 'center',
|
3149
3797
|
alignItems: 'center',
|
3150
3798
|
animation: `${rotate} 1s linear infinite`,
|
3151
|
-
background: `conic-gradient(from 180deg at 50% 50%, ${colors
|
3799
|
+
background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,
|
3152
3800
|
':before': {
|
3153
3801
|
content: `''`,
|
3154
3802
|
display: 'block',
|
@@ -3157,7 +3805,7 @@ const LoaderStyle = /*#__PURE__*/defineStyleConfig({
|
|
3157
3805
|
height: '6px',
|
3158
3806
|
position: 'absolute',
|
3159
3807
|
bottom: 0,
|
3160
|
-
background: colors
|
3808
|
+
background: colors
|
3161
3809
|
}
|
3162
3810
|
};
|
3163
3811
|
},
|
@@ -3223,10 +3871,10 @@ const LoaderStyle = /*#__PURE__*/defineStyleConfig({
|
|
3223
3871
|
});
|
3224
3872
|
|
3225
3873
|
const {
|
3226
|
-
definePartsStyle: definePartsStyle$
|
3227
|
-
} = /*#__PURE__*/createMultiStyleConfigHelpers
|
3874
|
+
definePartsStyle: definePartsStyle$3
|
3875
|
+
} = /*#__PURE__*/createMultiStyleConfigHelpers(popoverAnatomy.keys);
|
3228
3876
|
const Popover = {
|
3229
|
-
baseStyle: props => definePartsStyle$
|
3877
|
+
baseStyle: props => definePartsStyle$3({
|
3230
3878
|
popper: {
|
3231
3879
|
background: mode('white', 'inherit')(props)
|
3232
3880
|
}
|
@@ -3234,93 +3882,175 @@ const Popover = {
|
|
3234
3882
|
};
|
3235
3883
|
|
3236
3884
|
const {
|
3237
|
-
definePartsStyle: definePartsStyle$
|
3885
|
+
definePartsStyle: definePartsStyle$4,
|
3886
|
+
defineMultiStyleConfig: defineMultiStyleConfig$3
|
3238
3887
|
} = /*#__PURE__*/createMultiStyleConfigHelpers$1(radioAnatomy.keys);
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
3246
|
-
|
3888
|
+
const baseStyle$4 = /*#__PURE__*/definePartsStyle$4({
|
3889
|
+
control: {
|
3890
|
+
border: '1px solid',
|
3891
|
+
width: '16px',
|
3892
|
+
height: '16px'
|
3893
|
+
},
|
3894
|
+
label: {
|
3895
|
+
marginLeft: '8px',
|
3896
|
+
textStyle: 'text.sm',
|
3897
|
+
color: 'black.high',
|
3898
|
+
_disabled: {
|
3899
|
+
color: 'black.low'
|
3900
|
+
}
|
3901
|
+
}
|
3902
|
+
});
|
3903
|
+
const errors$1 = /*#__PURE__*/definePartsStyle$4({
|
3904
|
+
control: {
|
3905
|
+
borderColor: 'danger.500',
|
3906
|
+
_checked: {
|
3907
|
+
borderColor: 'danger.500',
|
3908
|
+
bg: 'white',
|
3909
|
+
_before: {
|
3910
|
+
h: '10px',
|
3911
|
+
w: '10px',
|
3912
|
+
bg: 'danger.500'
|
3913
|
+
},
|
3914
|
+
_hover: {
|
3915
|
+
borderColor: 'danger.500',
|
3916
|
+
bg: 'gray.200'
|
3917
|
+
},
|
3918
|
+
_disabled: {
|
3919
|
+
borderColor: 'danger.500',
|
3247
3920
|
bg: 'white',
|
3248
3921
|
_before: {
|
3249
|
-
h: '
|
3250
|
-
w: '
|
3251
|
-
bg: '
|
3252
|
-
},
|
3253
|
-
_hover: {
|
3254
|
-
borderColor: 'primary.500',
|
3255
|
-
bg: 'gray.200'
|
3922
|
+
h: '10px',
|
3923
|
+
w: '10px',
|
3924
|
+
bg: 'neutral.500'
|
3256
3925
|
}
|
3257
3926
|
}
|
3927
|
+
},
|
3928
|
+
_disabled: {
|
3929
|
+
borderColor: 'danger.500',
|
3930
|
+
bg: 'neutral.500'
|
3258
3931
|
}
|
3259
|
-
}
|
3260
|
-
|
3261
|
-
|
3262
|
-
|
3263
|
-
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3273
|
-
|
3274
|
-
h: '4'
|
3932
|
+
},
|
3933
|
+
label: {
|
3934
|
+
fontSize: '12px'
|
3935
|
+
}
|
3936
|
+
});
|
3937
|
+
const unstyled$2 = /*#__PURE__*/definePartsStyle$4({
|
3938
|
+
control: {
|
3939
|
+
borderColor: 'neutral.600',
|
3940
|
+
_checked: {
|
3941
|
+
borderColor: 'primary.500',
|
3942
|
+
bg: 'white',
|
3943
|
+
_before: {
|
3944
|
+
h: '10px',
|
3945
|
+
w: '10px',
|
3946
|
+
bg: 'primary.500'
|
3275
3947
|
},
|
3276
|
-
|
3277
|
-
|
3278
|
-
|
3279
|
-
}),
|
3280
|
-
lg: /*#__PURE__*/definePartsStyle$3({
|
3281
|
-
control: {
|
3282
|
-
w: '5',
|
3283
|
-
h: '5'
|
3948
|
+
_hover: {
|
3949
|
+
borderColor: 'primary.500',
|
3950
|
+
bg: 'gray.200'
|
3284
3951
|
},
|
3285
|
-
|
3286
|
-
|
3952
|
+
_disabled: {
|
3953
|
+
borderColor: 'neutral.500',
|
3954
|
+
bg: 'white',
|
3955
|
+
_before: {
|
3956
|
+
h: '10px',
|
3957
|
+
w: '10px',
|
3958
|
+
bg: 'neutral.500'
|
3959
|
+
}
|
3287
3960
|
}
|
3288
|
-
}
|
3961
|
+
},
|
3962
|
+
_disabled: {
|
3963
|
+
borderColor: 'neutral.500',
|
3964
|
+
bg: 'neutral.500'
|
3965
|
+
}
|
3289
3966
|
},
|
3290
|
-
|
3291
|
-
|
3292
|
-
// The default size and variant values
|
3293
|
-
defaultProps: {
|
3294
|
-
size: 'sm',
|
3295
|
-
variant: 'solid',
|
3296
|
-
orientation: 'vertical',
|
3297
|
-
colorScheme: 'primary'
|
3967
|
+
label: {
|
3968
|
+
fontSize: '12px'
|
3298
3969
|
}
|
3970
|
+
});
|
3971
|
+
const variants$3 = {
|
3972
|
+
errors: errors$1,
|
3973
|
+
unstyled: unstyled$2
|
3299
3974
|
};
|
3975
|
+
const Radio = /*#__PURE__*/defineMultiStyleConfig$3({
|
3976
|
+
baseStyle: baseStyle$4,
|
3977
|
+
variants: variants$3,
|
3978
|
+
defaultProps: {
|
3979
|
+
variant: 'unstyled'
|
3980
|
+
}
|
3981
|
+
});
|
3300
3982
|
|
3301
3983
|
const {
|
3302
|
-
|
3303
|
-
|
3984
|
+
defineMultiStyleConfig: defineMultiStyleConfig$4,
|
3985
|
+
definePartsStyle: definePartsStyle$5
|
3304
3986
|
} = /*#__PURE__*/createMultiStyleConfigHelpers(switchAnatomy.keys);
|
3305
|
-
const
|
3306
|
-
|
3987
|
+
const $width = /*#__PURE__*/cssVar$1('switch-track-width');
|
3988
|
+
const $height = /*#__PURE__*/cssVar$1('switch-track-height');
|
3989
|
+
const $diff = /*#__PURE__*/cssVar$1('switch-track-diff');
|
3990
|
+
const diffValue = /*#__PURE__*/calc.subtract($width, $height);
|
3991
|
+
const $translateX = /*#__PURE__*/cssVar$1('switch-thumb-x');
|
3992
|
+
const baseStyleThumb = /*#__PURE__*/defineStyle$1({
|
3993
|
+
bg: 'white',
|
3994
|
+
transitionProperty: 'transform',
|
3995
|
+
transitionDuration: 'normal',
|
3996
|
+
borderRadius: 'inherit',
|
3997
|
+
width: [$height.reference],
|
3998
|
+
height: [$height.reference],
|
3999
|
+
_checked: {
|
4000
|
+
transform: `translateX(${$translateX.reference})`
|
4001
|
+
}
|
4002
|
+
});
|
4003
|
+
const baseStyle$5 = /*#__PURE__*/definePartsStyle$5(() => ({
|
3307
4004
|
container: {
|
3308
|
-
|
3309
|
-
|
3310
|
-
|
3311
|
-
|
4005
|
+
[$diff.variable]: diffValue,
|
4006
|
+
[$translateX.variable]: $diff.reference,
|
4007
|
+
_rtl: {
|
4008
|
+
[$translateX.variable]: calc($diff).negate().toString()
|
4009
|
+
}
|
3312
4010
|
},
|
3313
4011
|
track: {
|
3314
4012
|
bg: 'neutral.400',
|
3315
4013
|
p: 1,
|
3316
4014
|
_checked: {
|
3317
|
-
bg: 'primary.500'
|
4015
|
+
bg: 'primary.500',
|
4016
|
+
_disabled: {
|
4017
|
+
bg: 'neutral.600'
|
4018
|
+
}
|
4019
|
+
},
|
4020
|
+
_disabled: {
|
4021
|
+
bg: 'neutral.500',
|
4022
|
+
opacity: '100%'
|
3318
4023
|
}
|
4024
|
+
},
|
4025
|
+
thumb: baseStyleThumb
|
4026
|
+
}));
|
4027
|
+
const sizes$2 = {
|
4028
|
+
sm: /*#__PURE__*/definePartsStyle$5({
|
4029
|
+
container: {
|
4030
|
+
[$width.variable]: '2.125rem',
|
4031
|
+
[$height.variable]: '1.063rem'
|
4032
|
+
}
|
4033
|
+
}),
|
4034
|
+
md: /*#__PURE__*/definePartsStyle$5({
|
4035
|
+
container: {
|
4036
|
+
[$width.variable]: '2.875rem',
|
4037
|
+
[$height.variable]: '1.5rem'
|
4038
|
+
}
|
4039
|
+
}),
|
4040
|
+
lg: /*#__PURE__*/definePartsStyle$5({
|
4041
|
+
container: {
|
4042
|
+
[$width.variable]: '3.625rem',
|
4043
|
+
[$height.variable]: '1.813rem'
|
4044
|
+
}
|
4045
|
+
})
|
4046
|
+
};
|
4047
|
+
const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$4({
|
4048
|
+
baseStyle: baseStyle$5,
|
4049
|
+
sizes: sizes$2,
|
4050
|
+
defaultProps: {
|
4051
|
+
size: 'md'
|
3319
4052
|
}
|
3320
4053
|
});
|
3321
|
-
const Switch = /*#__PURE__*/defineMultiStyleConfig$2({
|
3322
|
-
baseStyle: baseStyle$3
|
3323
|
-
});
|
3324
4054
|
|
3325
4055
|
const getProps = props => {
|
3326
4056
|
const {
|
@@ -3345,7 +4075,7 @@ const getProps = props => {
|
|
3345
4075
|
borderColor
|
3346
4076
|
};
|
3347
4077
|
};
|
3348
|
-
const outline$1 = /*#__PURE__*/defineStyle
|
4078
|
+
const outline$1 = /*#__PURE__*/defineStyle(props => {
|
3349
4079
|
const {
|
3350
4080
|
focusBorderColor,
|
3351
4081
|
borderColor
|
@@ -3361,7 +4091,7 @@ const outline$1 = /*#__PURE__*/defineStyle$1(props => {
|
|
3361
4091
|
outline: 'none',
|
3362
4092
|
_disabled: {
|
3363
4093
|
opacity: 1,
|
3364
|
-
color: 'black.
|
4094
|
+
color: 'black.medium',
|
3365
4095
|
background: 'neutral.300'
|
3366
4096
|
},
|
3367
4097
|
_placeholder: {
|
@@ -3405,14 +4135,17 @@ const Textarea = /*#__PURE__*/defineStyleConfig$1({
|
|
3405
4135
|
|
3406
4136
|
var components = {
|
3407
4137
|
__proto__: null,
|
3408
|
-
|
4138
|
+
Alert: alertTheme,
|
4139
|
+
Button: Button$1,
|
4140
|
+
Card: CardStyle,
|
3409
4141
|
Checkbox: Checkbox,
|
4142
|
+
Chips: Chips,
|
3410
4143
|
FormLabel: FormLabel,
|
3411
4144
|
Input: Input,
|
3412
4145
|
LoaderStyle: LoaderStyle,
|
3413
4146
|
Popover: Popover,
|
3414
4147
|
Radio: Radio,
|
3415
|
-
Switch: Switch,
|
4148
|
+
Switch: Switch$1,
|
3416
4149
|
Textarea: Textarea
|
3417
4150
|
};
|
3418
4151
|
|
@@ -3474,5 +4207,5 @@ const Provider = ({
|
|
3474
4207
|
};
|
3475
4208
|
Provider.displayName = 'Provider';
|
3476
4209
|
|
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 };
|
4210
|
+
export { Box, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Stack, Switch, Tab, TabList, TabPanel, Text, TextareaField, Uploader, Wrap, foundations, theme, useInternalUI };
|
3478
4211
|
//# sourceMappingURL=internal-ui.esm.js.map
|