@ctlyst.id/internal-ui 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/index.d.ts +2 -0
- package/dist/internal-ui.cjs.development.js +255 -40
- 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 +266 -59
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/internal-ui.esm.js
CHANGED
@@ -1,26 +1,256 @@
|
|
1
|
-
import {
|
1
|
+
import { cx, dataAttr } from '@chakra-ui/shared-utils';
|
2
|
+
import { forwardRef, omitThemingProps, useMultiStyleConfig, chakra, useColorMode } from '@chakra-ui/system';
|
3
|
+
import React__default, { createElement, forwardRef as forwardRef$2, useRef, useEffect, useState, useMemo, Fragment, useCallback, createContext as createContext$1, useContext } from 'react';
|
4
|
+
import { createContext } from '@chakra-ui/react-context';
|
5
|
+
import { CheckCircle, Info, AlertTriangle, Close, EyeOff, Eye, Rating as Rating$1, Check } from '@ctlyst.id/internal-icon';
|
6
|
+
import { cx as cx$1 } from '@chakra-ui/utils';
|
7
|
+
import { forwardRef as forwardRef$1, useStyleConfig, Box, Button as Button$2, Badge as Badge$2, useToken, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, defineStyle, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, theme as theme$1, InputLeftAddon, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, 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 as useMultiStyleConfig$1, omitThemingProps as omitThemingProps$1, useCheckbox, chakra as chakra$1, useTab, TabList as TabList$1, TabPanel as TabPanel$1, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, defineStyleConfig as defineStyleConfig$1, extendTheme } from '@chakra-ui/react';
|
2
8
|
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, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, 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, forwardRef as forwardRef$1, useRef, useEffect, useState, useMemo, Fragment, useCallback, createContext, useContext } from 'react';
|
4
9
|
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
10
|
import { ChevronUpIcon, ChevronDownIcon, UpDownIcon, ArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, ArrowRightIcon } from '@chakra-ui/icons';
|
6
11
|
import { css, Global, keyframes } from '@emotion/react';
|
7
12
|
import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
|
8
13
|
import classnames from 'classnames';
|
9
14
|
import ReactDatePicker from 'react-datepicker';
|
10
|
-
import { useColorMode } from '@chakra-ui/system';
|
11
15
|
import styled from '@emotion/styled';
|
12
|
-
import { Close, EyeOff, Eye, Check } from '@ctlyst.id/internal-icon';
|
13
16
|
import ReactSelect from 'react-select';
|
14
17
|
import { AsyncPaginate } from 'react-select-async-paginate';
|
15
18
|
import ReactSelectAsyncCreatable from 'react-select/async-creatable';
|
16
19
|
import ReactSelectCreatable from 'react-select/creatable';
|
17
|
-
import { cx, dataAttr } from '@chakra-ui/shared-utils';
|
18
20
|
import { useDropzone } from 'react-dropzone';
|
19
21
|
import { alertAnatomy, checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy } from '@chakra-ui/anatomy';
|
20
22
|
import { createMultiStyleConfigHelpers, cssVar, defineStyleConfig, defineStyle as defineStyle$1 } from '@chakra-ui/styled-system';
|
21
23
|
import { transparentize, mode, calc, cssVar as cssVar$1 } from '@chakra-ui/theme-tools';
|
22
24
|
import axios from 'axios';
|
23
25
|
|
26
|
+
/* eslint-disable react/require-default-props */
|
27
|
+
function CheckIcon() {
|
28
|
+
return /*#__PURE__*/React__default.createElement(CheckCircle, {
|
29
|
+
color: "inherit",
|
30
|
+
size: 4
|
31
|
+
});
|
32
|
+
}
|
33
|
+
function InfoIcon() {
|
34
|
+
return /*#__PURE__*/React__default.createElement(Info, {
|
35
|
+
color: "inherit",
|
36
|
+
size: 4
|
37
|
+
});
|
38
|
+
}
|
39
|
+
function WarningIcon() {
|
40
|
+
return /*#__PURE__*/React__default.createElement(AlertTriangle, {
|
41
|
+
color: "inherit",
|
42
|
+
size: 4
|
43
|
+
});
|
44
|
+
}
|
45
|
+
|
46
|
+
const [AlertProvider, useAlertContext] = /*#__PURE__*/createContext({
|
47
|
+
name: 'AlertContext',
|
48
|
+
hookName: 'useAlertContext',
|
49
|
+
providerName: '<Alert />'
|
50
|
+
});
|
51
|
+
const [AlertStylesProvider, useAlertStyles] = /*#__PURE__*/createContext({
|
52
|
+
name: `AlertStylesContext`,
|
53
|
+
hookName: `useAlertStyles`,
|
54
|
+
providerName: '<Alert />'
|
55
|
+
});
|
56
|
+
const STATUSES = {
|
57
|
+
info: {
|
58
|
+
icon: InfoIcon,
|
59
|
+
colorScheme: 'info'
|
60
|
+
},
|
61
|
+
warning: {
|
62
|
+
icon: InfoIcon,
|
63
|
+
colorScheme: 'warning'
|
64
|
+
},
|
65
|
+
success: {
|
66
|
+
icon: CheckIcon,
|
67
|
+
colorScheme: 'success'
|
68
|
+
},
|
69
|
+
error: {
|
70
|
+
icon: WarningIcon,
|
71
|
+
colorScheme: 'danger'
|
72
|
+
}
|
73
|
+
};
|
74
|
+
function getStatusColorScheme(status) {
|
75
|
+
return STATUSES[status].colorScheme;
|
76
|
+
}
|
77
|
+
function getStatusIcon(status) {
|
78
|
+
return STATUSES[status].icon;
|
79
|
+
}
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Alert is used to communicate the state or status of a
|
83
|
+
* page, feature or action
|
84
|
+
*
|
85
|
+
* @see Docs https://chakra-ui.com/docs/components/alert
|
86
|
+
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/alert/
|
87
|
+
*/
|
88
|
+
const Alert = /*#__PURE__*/forwardRef(function Alert(props, ref) {
|
89
|
+
var _props$colorScheme;
|
90
|
+
const {
|
91
|
+
status = 'info',
|
92
|
+
addRole = true,
|
93
|
+
children,
|
94
|
+
...rest
|
95
|
+
} = omitThemingProps(props);
|
96
|
+
const colorScheme = (_props$colorScheme = props.colorScheme) !== null && _props$colorScheme !== void 0 ? _props$colorScheme : getStatusColorScheme(status);
|
97
|
+
const styles = useMultiStyleConfig('Alert', {
|
98
|
+
...props,
|
99
|
+
colorScheme
|
100
|
+
});
|
101
|
+
const alertStyles = {
|
102
|
+
width: '100%',
|
103
|
+
display: 'grid',
|
104
|
+
gridTemplateColumns: 'auto 1fr auto auto',
|
105
|
+
alignItems: 'center',
|
106
|
+
position: 'relative',
|
107
|
+
overflow: 'hidden',
|
108
|
+
...styles.container
|
109
|
+
};
|
110
|
+
return /*#__PURE__*/React__default.createElement(AlertProvider, {
|
111
|
+
value: {
|
112
|
+
status
|
113
|
+
}
|
114
|
+
}, /*#__PURE__*/React__default.createElement(AlertStylesProvider, {
|
115
|
+
value: styles
|
116
|
+
}, /*#__PURE__*/React__default.createElement(chakra.div, Object.assign({
|
117
|
+
"data-status": status,
|
118
|
+
role: addRole ? 'alert' : undefined,
|
119
|
+
ref: ref
|
120
|
+
}, rest, {
|
121
|
+
className: cx('chakra-alert', props.className),
|
122
|
+
__css: alertStyles
|
123
|
+
}), children)));
|
124
|
+
});
|
125
|
+
Alert.displayName = 'Alert';
|
126
|
+
|
127
|
+
const Loader = /*#__PURE__*/forwardRef$1((props, ref) => {
|
128
|
+
const styles = useStyleConfig('LoaderStyle', props);
|
129
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
130
|
+
ref: ref,
|
131
|
+
__css: styles
|
132
|
+
});
|
133
|
+
});
|
134
|
+
|
135
|
+
const Button = props => {
|
136
|
+
const {
|
137
|
+
children,
|
138
|
+
variant,
|
139
|
+
size,
|
140
|
+
...rest
|
141
|
+
} = props;
|
142
|
+
const getLoaderSize = () => {
|
143
|
+
if (size === 'lg') return 'md';
|
144
|
+
if (size === 'md') return 'sm';
|
145
|
+
return 'xs';
|
146
|
+
};
|
147
|
+
const getLoaderColor = () => {
|
148
|
+
if (variant === 'primary' || variant === 'danger') return 'white';
|
149
|
+
if (variant === 'outline-danger') return 'danger';
|
150
|
+
return 'primary';
|
151
|
+
};
|
152
|
+
return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
|
153
|
+
size: size,
|
154
|
+
variant: variant,
|
155
|
+
spinner: /*#__PURE__*/React__default.createElement(Loader, {
|
156
|
+
size: getLoaderSize(),
|
157
|
+
color: getLoaderColor()
|
158
|
+
})
|
159
|
+
}, rest), children);
|
160
|
+
};
|
161
|
+
|
162
|
+
function AlertAction({
|
163
|
+
children,
|
164
|
+
className
|
165
|
+
}) {
|
166
|
+
const styles = useAlertStyles();
|
167
|
+
const css = styles.action;
|
168
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
169
|
+
"data-test-id": "alert-action",
|
170
|
+
className: cx$1('chakra-alert__close', className),
|
171
|
+
variant: "link",
|
172
|
+
color: "inherit",
|
173
|
+
fontWeight: "700",
|
174
|
+
__css: css
|
175
|
+
}, children);
|
176
|
+
}
|
177
|
+
AlertAction.displayName = 'AlertAction';
|
178
|
+
|
179
|
+
function AlertClose({
|
180
|
+
className,
|
181
|
+
children,
|
182
|
+
...rest
|
183
|
+
}) {
|
184
|
+
const styles = useAlertStyles();
|
185
|
+
const css = styles.close;
|
186
|
+
return /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
|
187
|
+
display: "inherit",
|
188
|
+
"data-status": 'alert-close'
|
189
|
+
}, rest, {
|
190
|
+
className: cx('chakra-alert__close', className),
|
191
|
+
__css: css
|
192
|
+
}), children || /*#__PURE__*/React__default.createElement(Close, {
|
193
|
+
color: "inherit",
|
194
|
+
size: 4
|
195
|
+
}));
|
196
|
+
}
|
197
|
+
AlertClose.displayName = 'AlertClose';
|
198
|
+
|
199
|
+
const AlertDescription = /*#__PURE__*/forwardRef(function AlertDescription(props, ref) {
|
200
|
+
const styles = useAlertStyles();
|
201
|
+
const {
|
202
|
+
status
|
203
|
+
} = useAlertContext();
|
204
|
+
const descriptionStyles = {
|
205
|
+
display: 'inline',
|
206
|
+
...styles.description
|
207
|
+
};
|
208
|
+
return /*#__PURE__*/React__default.createElement(chakra.div, Object.assign({
|
209
|
+
ref: ref,
|
210
|
+
"data-status": status
|
211
|
+
}, props, {
|
212
|
+
className: cx('chakra-alert__desc', props.className),
|
213
|
+
__css: descriptionStyles
|
214
|
+
}));
|
215
|
+
});
|
216
|
+
AlertDescription.displayName = 'AlertDescription';
|
217
|
+
|
218
|
+
function AlertIcon({
|
219
|
+
className,
|
220
|
+
children,
|
221
|
+
...rest
|
222
|
+
}) {
|
223
|
+
const {
|
224
|
+
status
|
225
|
+
} = useAlertContext();
|
226
|
+
const BaseIcon = getStatusIcon(status);
|
227
|
+
const styles = useAlertStyles();
|
228
|
+
const css = styles.icon;
|
229
|
+
return /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
|
230
|
+
display: "inherit",
|
231
|
+
"data-status": status
|
232
|
+
}, rest, {
|
233
|
+
className: cx('chakra-alert__icon', className),
|
234
|
+
__css: css
|
235
|
+
}), children || /*#__PURE__*/React__default.createElement(BaseIcon, null));
|
236
|
+
}
|
237
|
+
AlertIcon.displayName = 'AlertIcon';
|
238
|
+
|
239
|
+
const AlertTitle = /*#__PURE__*/forwardRef(function AlertTitle(props, ref) {
|
240
|
+
const styles = useAlertStyles();
|
241
|
+
const {
|
242
|
+
status
|
243
|
+
} = useAlertContext();
|
244
|
+
return /*#__PURE__*/React__default.createElement(chakra.div, Object.assign({
|
245
|
+
ref: ref,
|
246
|
+
"data-status": status
|
247
|
+
}, props, {
|
248
|
+
className: cx('chakra-alert__title', props.className),
|
249
|
+
__css: styles.title
|
250
|
+
}));
|
251
|
+
});
|
252
|
+
AlertTitle.displayName = 'AlertTitle';
|
253
|
+
|
24
254
|
const Badge = props => {
|
25
255
|
const {
|
26
256
|
children,
|
@@ -32,7 +262,7 @@ const Badge = props => {
|
|
32
262
|
variant: "primary-solid",
|
33
263
|
padding: "0 8px",
|
34
264
|
height: "18px",
|
35
|
-
display: "flex",
|
265
|
+
display: "inline-flex",
|
36
266
|
alignItems: "center",
|
37
267
|
justifyContent: "space-between",
|
38
268
|
textTransform: "none"
|
@@ -137,42 +367,7 @@ BreadCrumb.defaultProps = {
|
|
137
367
|
spacing: 2
|
138
368
|
};
|
139
369
|
|
140
|
-
const
|
141
|
-
const styles = useStyleConfig('LoaderStyle', props);
|
142
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
143
|
-
ref: ref,
|
144
|
-
__css: styles
|
145
|
-
});
|
146
|
-
});
|
147
|
-
|
148
|
-
const Button = props => {
|
149
|
-
const {
|
150
|
-
children,
|
151
|
-
variant,
|
152
|
-
size,
|
153
|
-
...rest
|
154
|
-
} = props;
|
155
|
-
const getLoaderSize = () => {
|
156
|
-
if (size === 'lg') return 'md';
|
157
|
-
if (size === 'md') return 'sm';
|
158
|
-
return 'xs';
|
159
|
-
};
|
160
|
-
const getLoaderColor = () => {
|
161
|
-
if (variant === 'primary' || variant === 'danger') return 'white';
|
162
|
-
if (variant === 'outline-danger') return 'danger';
|
163
|
-
return 'primary';
|
164
|
-
};
|
165
|
-
return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
|
166
|
-
size: size,
|
167
|
-
variant: variant,
|
168
|
-
spinner: /*#__PURE__*/React__default.createElement(Loader, {
|
169
|
-
size: getLoaderSize(),
|
170
|
-
color: getLoaderColor()
|
171
|
-
})
|
172
|
-
}, rest), children);
|
173
|
-
};
|
174
|
-
|
175
|
-
const CardCustom = /*#__PURE__*/forwardRef$1(({
|
370
|
+
const CardCustom = /*#__PURE__*/forwardRef$2(({
|
176
371
|
children,
|
177
372
|
...rest
|
178
373
|
}, ref) => {
|
@@ -2290,7 +2485,7 @@ const ModalBody = /*#__PURE__*/React__default.forwardRef(({
|
|
2290
2485
|
}, rest), children);
|
2291
2486
|
});
|
2292
2487
|
|
2293
|
-
const ModalCloseButton = /*#__PURE__*/forwardRef$
|
2488
|
+
const ModalCloseButton = /*#__PURE__*/forwardRef$2((props, ref) => {
|
2294
2489
|
return /*#__PURE__*/React__default.createElement(ModalCloseButton$1, Object.assign({
|
2295
2490
|
ref: ref,
|
2296
2491
|
top: 4,
|
@@ -2300,7 +2495,7 @@ const ModalCloseButton = /*#__PURE__*/forwardRef$1((props, ref) => {
|
|
2300
2495
|
}, props));
|
2301
2496
|
});
|
2302
2497
|
|
2303
|
-
const ModalFooter = /*#__PURE__*/forwardRef$
|
2498
|
+
const ModalFooter = /*#__PURE__*/forwardRef$2(({
|
2304
2499
|
children,
|
2305
2500
|
...rest
|
2306
2501
|
}, ref) => {
|
@@ -2311,7 +2506,7 @@ const ModalFooter = /*#__PURE__*/forwardRef$1(({
|
|
2311
2506
|
}, rest), children);
|
2312
2507
|
});
|
2313
2508
|
|
2314
|
-
const ModalHeader = /*#__PURE__*/forwardRef$
|
2509
|
+
const ModalHeader = /*#__PURE__*/forwardRef$2(({
|
2315
2510
|
children,
|
2316
2511
|
...rest
|
2317
2512
|
}, ref) => {
|
@@ -2462,7 +2657,7 @@ Navigation.defaultProps = {
|
|
2462
2657
|
host: undefined
|
2463
2658
|
};
|
2464
2659
|
|
2465
|
-
const PaginationButton = /*#__PURE__*/forwardRef(({
|
2660
|
+
const PaginationButton = /*#__PURE__*/forwardRef$1(({
|
2466
2661
|
className,
|
2467
2662
|
style,
|
2468
2663
|
isActive,
|
@@ -2744,6 +2939,18 @@ RadioGroupComponent.defaultProps = {
|
|
2744
2939
|
errorMessage: ''
|
2745
2940
|
};
|
2746
2941
|
|
2942
|
+
const Rating = ({
|
2943
|
+
value
|
2944
|
+
}) => {
|
2945
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
2946
|
+
gap: '4px',
|
2947
|
+
display: "flex"
|
2948
|
+
}, [...Array(5)].map((_, i) => /*#__PURE__*/React__default.createElement(Rating$1, {
|
2949
|
+
color: i < value ? '#FFA230' : '#E0E0E0',
|
2950
|
+
size: 24
|
2951
|
+
})));
|
2952
|
+
};
|
2953
|
+
|
2747
2954
|
const SelectWrapper = ({
|
2748
2955
|
children,
|
2749
2956
|
isError = false
|
@@ -2942,8 +3149,8 @@ function SelectCreatable({
|
|
2942
3149
|
* @see Docs https://chakra-ui.com/docs/components/switch
|
2943
3150
|
* @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/
|
2944
3151
|
*/
|
2945
|
-
const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
2946
|
-
const styles = useMultiStyleConfig('Switch', props);
|
3152
|
+
const Switch = /*#__PURE__*/forwardRef$1(function Switch(props, ref) {
|
3153
|
+
const styles = useMultiStyleConfig$1('Switch', props);
|
2947
3154
|
const {
|
2948
3155
|
size = 'md'
|
2949
3156
|
} = props;
|
@@ -2951,7 +3158,7 @@ const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
|
2951
3158
|
spacing = '0.5rem',
|
2952
3159
|
children,
|
2953
3160
|
...ownProps
|
2954
|
-
} = omitThemingProps(props);
|
3161
|
+
} = omitThemingProps$1(props);
|
2955
3162
|
const {
|
2956
3163
|
state,
|
2957
3164
|
getInputProps,
|
@@ -2988,7 +3195,7 @@ const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
|
2988
3195
|
};
|
2989
3196
|
return iconSize[value];
|
2990
3197
|
};
|
2991
|
-
return /*#__PURE__*/React__default.createElement(chakra.label, Object.assign({}, getRootProps(), {
|
3198
|
+
return /*#__PURE__*/React__default.createElement(chakra$1.label, Object.assign({}, getRootProps(), {
|
2992
3199
|
display: "flex",
|
2993
3200
|
alignItems: "center",
|
2994
3201
|
className: cx('chakra-switch', props.className),
|
@@ -2996,7 +3203,7 @@ const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
|
2996
3203
|
}), /*#__PURE__*/React__default.createElement("input", Object.assign({
|
2997
3204
|
"data-test-id": "",
|
2998
3205
|
className: "chakra-switch__input"
|
2999
|
-
}, getInputProps({}, ref))), /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({}, getCheckboxProps(), {
|
3206
|
+
}, getInputProps({}, ref))), /*#__PURE__*/React__default.createElement(chakra$1.span, Object.assign({}, getCheckboxProps(), {
|
3000
3207
|
className: "chakra-switch__track",
|
3001
3208
|
pos: "relative",
|
3002
3209
|
__css: trackStyles
|
@@ -3012,12 +3219,12 @@ const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
|
3012
3219
|
}), /*#__PURE__*/React__default.createElement(Close, {
|
3013
3220
|
color: state.isDisabled ? 'neutral.600' : 'neutral.900',
|
3014
3221
|
size: getIconSize(size)
|
3015
|
-
})), /*#__PURE__*/React__default.createElement(chakra.span, {
|
3222
|
+
})), /*#__PURE__*/React__default.createElement(chakra$1.span, {
|
3016
3223
|
__css: styles.thumb,
|
3017
3224
|
className: "chakra-switch__thumb",
|
3018
3225
|
"data-checked": dataAttr(state.isChecked),
|
3019
3226
|
"data-hover": dataAttr(state.isHovered)
|
3020
|
-
})), children && /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
|
3227
|
+
})), children && /*#__PURE__*/React__default.createElement(chakra$1.span, Object.assign({
|
3021
3228
|
className: "chakra-switch__label",
|
3022
3229
|
color: state.isDisabled ? 'black.low' : 'black.high'
|
3023
3230
|
}, getLabelProps(), {
|
@@ -3025,14 +3232,14 @@ const Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
|
3025
3232
|
}), children));
|
3026
3233
|
});
|
3027
3234
|
|
3028
|
-
const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
3235
|
+
const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
|
3029
3236
|
var _props$leftAddon, _props$rightAddon;
|
3030
3237
|
const tabProps = useTab({
|
3031
3238
|
...props,
|
3032
3239
|
ref
|
3033
3240
|
});
|
3034
3241
|
const isSelected = !!tabProps['aria-selected'];
|
3035
|
-
const styles = useMultiStyleConfig('Tabs', tabProps);
|
3242
|
+
const styles = useMultiStyleConfig$1('Tabs', tabProps);
|
3036
3243
|
return /*#__PURE__*/createElement(Button$2, Object.assign({
|
3037
3244
|
p: 3,
|
3038
3245
|
fontSize: "text.md",
|
@@ -3053,13 +3260,13 @@ const Tab = /*#__PURE__*/forwardRef((props, ref) => {
|
|
3053
3260
|
})));
|
3054
3261
|
});
|
3055
3262
|
|
3056
|
-
const TabList = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(TabList$1, {
|
3263
|
+
const TabList = /*#__PURE__*/forwardRef$1((props, ref) => /*#__PURE__*/React__default.createElement(TabList$1, {
|
3057
3264
|
borderBottom: "1px solid",
|
3058
3265
|
borderColor: useColorModeValue('gray.200', 'bright-gray.800'),
|
3059
3266
|
ref: ref
|
3060
3267
|
}, props.children));
|
3061
3268
|
|
3062
|
-
const TabPanel = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(TabPanel$1, {
|
3269
|
+
const TabPanel = /*#__PURE__*/forwardRef$1((props, ref) => /*#__PURE__*/React__default.createElement(TabPanel$1, {
|
3063
3270
|
px: 0,
|
3064
3271
|
ref: ref
|
3065
3272
|
}, props.children));
|
@@ -4259,7 +4466,7 @@ const theme = /*#__PURE__*/extendTheme({
|
|
4259
4466
|
config
|
4260
4467
|
});
|
4261
4468
|
|
4262
|
-
const ProviderContext = /*#__PURE__*/createContext({
|
4469
|
+
const ProviderContext = /*#__PURE__*/createContext$1({
|
4263
4470
|
instance: undefined
|
4264
4471
|
});
|
4265
4472
|
const useInternalUI = () => {
|
@@ -4294,5 +4501,5 @@ const Provider = ({
|
|
4294
4501
|
};
|
4295
4502
|
Provider.displayName = 'Provider';
|
4296
4503
|
|
4297
|
-
export { Badge, Box, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputAddonLeft, InputAddonRight, 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 };
|
4504
|
+
export { Alert, AlertAction, AlertClose, AlertDescription, AlertIcon, AlertTitle, Badge, Box, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputAddonLeft, InputAddonRight, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Rating, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Stack, Switch, Tab, TabList, TabPanel, Text, TextareaField, Uploader, Wrap, foundations, theme, useAlertStyles, useInternalUI };
|
4298
4505
|
//# sourceMappingURL=internal-ui.esm.js.map
|