@ctlyst.id/internal-ui 2.1.9 → 2.1.11-canary.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. package/dist/index.d.mts +549 -0
  2. package/dist/index.d.ts +549 -5
  3. package/dist/index.js +9768 -5
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +9760 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +10 -11
  8. package/dist/components/accordion/__stories__/accordion.stories.d.ts +0 -9
  9. package/dist/components/accordion/components/accordion-indicator.d.ts +0 -1
  10. package/dist/components/accordion/components/index.d.ts +0 -2
  11. package/dist/components/accordion/index.d.ts +0 -1
  12. package/dist/components/alert/__stories__/alert.stories.d.ts +0 -11
  13. package/dist/components/alert/components/alert-action.d.ts +0 -6
  14. package/dist/components/alert/components/alert-close.d.ts +0 -6
  15. package/dist/components/alert/components/alert-context.d.ts +0 -33
  16. package/dist/components/alert/components/alert-description.d.ts +0 -3
  17. package/dist/components/alert/components/alert-icon.d.ts +0 -6
  18. package/dist/components/alert/components/alert-title.d.ts +0 -3
  19. package/dist/components/alert/components/alert.d.ts +0 -25
  20. package/dist/components/alert/components/icons.d.ts +0 -3
  21. package/dist/components/alert/components/index.d.ts +0 -14
  22. package/dist/components/alert/index.d.ts +0 -1
  23. package/dist/components/badge/__stories__/badge.stories.d.ts +0 -15
  24. package/dist/components/badge/components/badge.d.ts +0 -11
  25. package/dist/components/badge/index.d.ts +0 -2
  26. package/dist/components/base/__stories__/switch.stories.d.ts +0 -8
  27. package/dist/components/breadcrumb/__stories__/breadcrumb.stories.d.ts +0 -8
  28. package/dist/components/breadcrumb/components/bread-crumb.d.ts +0 -18
  29. package/dist/components/breadcrumb/index.d.ts +0 -2
  30. package/dist/components/button/__stories__/button.stories.d.ts +0 -12
  31. package/dist/components/button/components/button.d.ts +0 -4
  32. package/dist/components/button/index.d.ts +0 -3
  33. package/dist/components/card/__stories__/card.stories.d.ts +0 -8
  34. package/dist/components/card/components/card.d.ts +0 -8
  35. package/dist/components/card/index.d.ts +0 -2
  36. package/dist/components/checkbox/__stories__/checkbox-group.stories.d.ts +0 -10
  37. package/dist/components/checkbox/__stories__/checkbox.stories.d.ts +0 -9
  38. package/dist/components/checkbox/components/checkbox-group.d.ts +0 -18
  39. package/dist/components/checkbox/components/checkbox.d.ts +0 -10
  40. package/dist/components/checkbox/index.d.ts +0 -4
  41. package/dist/components/chips/__stories__/chips.stories.d.ts +0 -9
  42. package/dist/components/chips/components/chips.d.ts +0 -19
  43. package/dist/components/chips/index.d.ts +0 -2
  44. package/dist/components/data-table/__stories__/datatable.stories.d.ts +0 -21
  45. package/dist/components/data-table/components/data-table.d.ts +0 -30
  46. package/dist/components/data-table/index.d.ts +0 -3
  47. package/dist/components/data-table/types/table-core.d.ts +0 -1
  48. package/dist/components/datepicker/__stories__/datepicker.stories.d.ts +0 -13
  49. package/dist/components/datepicker/components/datepicker-month/datepicker-month.d.ts +0 -9
  50. package/dist/components/datepicker/components/datepicker-month/index.d.ts +0 -4
  51. package/dist/components/datepicker/components/datepicker-month/multi-datepicker-month.d.ts +0 -9
  52. package/dist/components/datepicker/components/datepicker.d.ts +0 -17
  53. package/dist/components/datepicker/components/styles.d.ts +0 -2
  54. package/dist/components/datepicker/components/time-input.d.ts +0 -9
  55. package/dist/components/datepicker/index.d.ts +0 -3
  56. package/dist/components/field/components/field.d.ts +0 -15
  57. package/dist/components/field/index.d.ts +0 -2
  58. package/dist/components/form/__stories__/input.stories.d.ts +0 -15
  59. package/dist/components/form/__stories__/textarea.stories.d.ts +0 -7
  60. package/dist/components/form/components/input-addon.d.ts +0 -7
  61. package/dist/components/form/components/input-element.d.ts +0 -2
  62. package/dist/components/form/components/input-field.d.ts +0 -13
  63. package/dist/components/form/components/textarea.d.ts +0 -8
  64. package/dist/components/form/index.d.ts +0 -7
  65. package/dist/components/form/styles/input-field.d.ts +0 -4
  66. package/dist/components/header/__stories__/header.stories.d.ts +0 -9
  67. package/dist/components/header/components/header.d.ts +0 -19
  68. package/dist/components/header/components/logo.d.ts +0 -10
  69. package/dist/components/header/components/profile.d.ts +0 -11
  70. package/dist/components/header/components/switch-mode.d.ts +0 -3
  71. package/dist/components/header/components/version.d.ts +0 -10
  72. package/dist/components/header/index.d.ts +0 -3
  73. package/dist/components/header/types.d.ts +0 -10
  74. package/dist/components/header/utils/formatter.d.ts +0 -2
  75. package/dist/components/image/index.d.ts +0 -1
  76. package/dist/components/index.d.ts +0 -29
  77. package/dist/components/layouting/index.d.ts +0 -1
  78. package/dist/components/list/index.d.ts +0 -1
  79. package/dist/components/loader/__stories__/loader.stories.d.ts +0 -9
  80. package/dist/components/loader/components/loader.d.ts +0 -10
  81. package/dist/components/loader/index.d.ts +0 -3
  82. package/dist/components/modal/__stories__/modal.stories.d.ts +0 -7
  83. package/dist/components/modal/components/modal-body.d.ts +0 -4
  84. package/dist/components/modal/components/modal-close-button.d.ts +0 -4
  85. package/dist/components/modal/components/modal-footer.d.ts +0 -4
  86. package/dist/components/modal/components/modal-header.d.ts +0 -4
  87. package/dist/components/modal/index.d.ts +0 -5
  88. package/dist/components/navigation/__stories__/navigation.stories.d.ts +0 -8
  89. package/dist/components/navigation/components/customer-icon.d.ts +0 -2
  90. package/dist/components/navigation/components/mapping-icon.d.ts +0 -2
  91. package/dist/components/navigation/components/navigation-bar.d.ts +0 -12
  92. package/dist/components/navigation/components/navigation.d.ts +0 -11
  93. package/dist/components/navigation/index.d.ts +0 -4
  94. package/dist/components/navigation/types.d.ts +0 -24
  95. package/dist/components/pagination/__stories__/pagination.stories.d.ts +0 -10
  96. package/dist/components/pagination/components/pagination-button-trigger.d.ts +0 -10
  97. package/dist/components/pagination/components/pagination-button.d.ts +0 -6
  98. package/dist/components/pagination/components/pagination-detail.d.ts +0 -10
  99. package/dist/components/pagination/components/pagination-filter.d.ts +0 -13
  100. package/dist/components/pagination/components/pagination.d.ts +0 -16
  101. package/dist/components/pagination/index.d.ts +0 -6
  102. package/dist/components/popover/index.d.ts +0 -1
  103. package/dist/components/radio/__stories__/radio-group.stories.d.ts +0 -10
  104. package/dist/components/radio/__stories__/radio.stories.d.ts +0 -9
  105. package/dist/components/radio/components/radio-group.d.ts +0 -17
  106. package/dist/components/radio/components/radio.d.ts +0 -16
  107. package/dist/components/radio/index.d.ts +0 -4
  108. package/dist/components/rating/__stories__/rating.stories.d.ts +0 -7
  109. package/dist/components/rating/components/rating.d.ts +0 -6
  110. package/dist/components/rating/index.d.ts +0 -2
  111. package/dist/components/select/__stories__/select.stories.d.ts +0 -10
  112. package/dist/components/select/components/select-async-creatable.d.ts +0 -5
  113. package/dist/components/select/components/select-async.d.ts +0 -6
  114. package/dist/components/select/components/select-creatable.d.ts +0 -5
  115. package/dist/components/select/components/select-wrapper.d.ts +0 -6
  116. package/dist/components/select/components/select.d.ts +0 -5
  117. package/dist/components/select/components/types/select.types.d.ts +0 -3
  118. package/dist/components/select/components/utils.d.ts +0 -26
  119. package/dist/components/select/index.d.ts +0 -8
  120. package/dist/components/switch/__stories__/switch.stories.d.ts +0 -10
  121. package/dist/components/switch/components/switch.d.ts +0 -18
  122. package/dist/components/switch/index.d.ts +0 -2
  123. package/dist/components/table/index.d.ts +0 -1
  124. package/dist/components/tabs/__stories__/tabs.stories.d.ts +0 -8
  125. package/dist/components/tabs/components/tab-list.d.ts +0 -3
  126. package/dist/components/tabs/components/tab-panel.d.ts +0 -3
  127. package/dist/components/tabs/components/tab.d.ts +0 -12
  128. package/dist/components/tabs/index.d.ts +0 -4
  129. package/dist/components/text/index.d.ts +0 -1
  130. package/dist/components/toast/__stories__/toast.stories.d.ts +0 -13
  131. package/dist/components/toast/components/toast.d.ts +0 -19
  132. package/dist/components/toast/index.d.ts +0 -1
  133. package/dist/components/tooltip/__stories__/tooltip.stories.d.ts +0 -7
  134. package/dist/components/tooltip/index.d.ts +0 -1
  135. package/dist/components/uploader/__stories__/uploader.stories.d.ts +0 -9
  136. package/dist/components/uploader/components/uploader.d.ts +0 -12
  137. package/dist/components/uploader/constants.d.ts +0 -8
  138. package/dist/components/uploader/index.d.ts +0 -2
  139. package/dist/config/__stories__/foundations.stories.d.ts +0 -15
  140. package/dist/config/__stories__/globals.stories.d.ts +0 -10
  141. package/dist/config/index.d.ts +0 -1
  142. package/dist/config/theme/components/accordion.d.ts +0 -53
  143. package/dist/config/theme/components/alert.d.ts +0 -69
  144. package/dist/config/theme/components/badge.d.ts +0 -3
  145. package/dist/config/theme/components/button.d.ts +0 -3
  146. package/dist/config/theme/components/card.d.ts +0 -18
  147. package/dist/config/theme/components/checkbox.d.ts +0 -101
  148. package/dist/config/theme/components/chips.d.ts +0 -34
  149. package/dist/config/theme/components/form-label.d.ts +0 -20
  150. package/dist/config/theme/components/index.d.ts +0 -15
  151. package/dist/config/theme/components/input.d.ts +0 -101
  152. package/dist/config/theme/components/loader.d.ts +0 -85
  153. package/dist/config/theme/components/popover.d.ts +0 -3
  154. package/dist/config/theme/components/radio.d.ts +0 -102
  155. package/dist/config/theme/components/switch.d.ts +0 -75
  156. package/dist/config/theme/components/table.d.ts +0 -180
  157. package/dist/config/theme/components/textarea.d.ts +0 -55
  158. package/dist/config/theme/foundations/index.d.ts +0 -5
  159. package/dist/config/theme/foundations/radius.d.ts +0 -8
  160. package/dist/config/theme/foundations/shadows.d.ts +0 -15
  161. package/dist/config/theme/foundations/sizes.d.ts +0 -66
  162. package/dist/config/theme/foundations/spacing.d.ts +0 -42
  163. package/dist/config/theme/foundations/typography.d.ts +0 -191
  164. package/dist/config/theme/index.d.ts +0 -1
  165. package/dist/config/theme/themeConfiguration.d.ts +0 -6
  166. package/dist/hooks/index.d.ts +0 -2
  167. package/dist/hooks/useFetcher.d.ts +0 -4
  168. package/dist/interfaces/common.d.ts +0 -17
  169. package/dist/internal-ui.cjs.development.js +0 -5604
  170. package/dist/internal-ui.cjs.development.js.map +0 -1
  171. package/dist/internal-ui.cjs.production.min.js +0 -38
  172. package/dist/internal-ui.cjs.production.min.js.map +0 -1
  173. package/dist/internal-ui.esm.js +0 -4899
  174. package/dist/internal-ui.esm.js.map +0 -1
  175. package/dist/provider/__stories__/provider.stories.d.ts +0 -13
  176. package/dist/provider/components/provider.d.ts +0 -7
  177. package/dist/provider/index.d.ts +0 -3
  178. package/dist/provider/types.d.ts +0 -14
@@ -1,4899 +0,0 @@
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, useMemo, useState, useEffect, useImperativeHandle, Fragment, useCallback, createContext as createContext$1, useContext, useRef } from 'react';
4
- import { createContext } from '@chakra-ui/react-context';
5
- import { CheckCircle, Info, AlertTriangle, Close, EyeOff, Eye, ChevronDown, 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, theme as theme$1, Text, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, useColorModeValue, Th, Tbody, Td, defineStyle, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, InputLeftAddon, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, 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, Grid, 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';
8
- export { AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, Box, ButtonGroup, Center, ChakraProvider, Table as ChakraTable, CloseButton, Code, Collapse, ColorModeScript, Container, Divider, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, Flex, FormControl, FormErrorMessage, FormHelperText, FormLabel, Grid, GridItem, HStack, Heading, Icon, IconButton, Image, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Link, List, ListIcon, ListItem, Modal, ModalContent, ModalContextProvider, ModalFocusScope, ModalOverlay, OrderedList, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, RequiredIndicator, ScaleFade, SimpleGrid, Skeleton, Spacer, Stack, TabIndicator, TabPanels, Tabs, TabsDescendantsProvider, TabsProvider, Tbody, Td, Text, Th, Thead, Tooltip, Tr, UnorderedList, VStack, Wrap, WrapItem, extendTheme, forwardRef, useBoolean, useColorMode, useColorModeValue, useDisclosure, useDrawerContext, useModal, useModalContext, useModalStyles, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles, useToken } from '@chakra-ui/react';
9
- import { FiChevronLeft, FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiShoppingBag, FiShoppingCart, FiRepeat, FiBox, FiLayers, FiDollarSign, FiUsers, FiRotateCcw, FiSettings, FiLayout, FiGift, FiChevronDown } from 'react-icons/fi';
10
- import { ChevronUpIcon, ChevronDownIcon, UpDownIcon, ArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, ArrowRightIcon } from '@chakra-ui/icons';
11
- import { css, Global, keyframes } from '@emotion/react';
12
- import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
13
- import classnames from 'classnames';
14
- import ReactDatePicker from 'react-datepicker';
15
- import styled from '@emotion/styled';
16
- import ReactSelect from 'react-select';
17
- import { AsyncPaginate } from 'react-select-async-paginate';
18
- import ReactSelectAsyncCreatable from 'react-select/async-creatable';
19
- import ReactSelectCreatable from 'react-select/creatable';
20
- import { useDropzone } from 'react-dropzone';
21
- import { accordionAnatomy, alertAnatomy, checkboxAnatomy, inputAnatomy, popoverAnatomy, radioAnatomy, switchAnatomy, tableAnatomy } from '@chakra-ui/anatomy';
22
- import { createMultiStyleConfigHelpers, defineStyle as defineStyle$1, cssVar, defineStyleConfig } from '@chakra-ui/styled-system';
23
- import { mode, calc, cssVar as cssVar$1 } from '@chakra-ui/theme-tools';
24
- import axios from 'axios';
25
- import { ToastContainer } from 'react-toastify';
26
-
27
- /* eslint-disable react/require-default-props */
28
- function CheckIcon() {
29
- return /*#__PURE__*/React__default.createElement(CheckCircle, {
30
- color: "inherit",
31
- size: 4
32
- });
33
- }
34
- function InfoIcon() {
35
- return /*#__PURE__*/React__default.createElement(Info, {
36
- color: "inherit",
37
- size: 4
38
- });
39
- }
40
- function WarningIcon() {
41
- return /*#__PURE__*/React__default.createElement(AlertTriangle, {
42
- color: "inherit",
43
- size: 4
44
- });
45
- }
46
-
47
- const [AlertProvider, useAlertContext] = /*#__PURE__*/createContext({
48
- name: 'AlertContext',
49
- hookName: 'useAlertContext',
50
- providerName: '<Alert />'
51
- });
52
- const [AlertStylesProvider, useAlertStyles] = /*#__PURE__*/createContext({
53
- name: `AlertStylesContext`,
54
- hookName: `useAlertStyles`,
55
- providerName: '<Alert />'
56
- });
57
- const STATUSES = {
58
- info: {
59
- icon: InfoIcon,
60
- colorScheme: 'info'
61
- },
62
- warning: {
63
- icon: InfoIcon,
64
- colorScheme: 'warning'
65
- },
66
- success: {
67
- icon: CheckIcon,
68
- colorScheme: 'success'
69
- },
70
- error: {
71
- icon: WarningIcon,
72
- colorScheme: 'danger'
73
- },
74
- neutral: {
75
- icon: InfoIcon,
76
- colorScheme: 'neutral'
77
- }
78
- };
79
- function getStatusColorScheme(status) {
80
- return STATUSES[status].colorScheme;
81
- }
82
- function getStatusIcon(status) {
83
- return STATUSES[status].icon;
84
- }
85
-
86
- /**
87
- * Alert is used to communicate the state or status of a
88
- * page, feature or action
89
- *
90
- * @see Docs https://chakra-ui.com/docs/components/alert
91
- * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/alert/
92
- */
93
- const Alert = /*#__PURE__*/forwardRef(function Alert(props, ref) {
94
- var _props$colorScheme;
95
- const {
96
- status = 'info',
97
- addRole = true,
98
- children,
99
- ...rest
100
- } = omitThemingProps(props);
101
- const colorScheme = (_props$colorScheme = props.colorScheme) !== null && _props$colorScheme !== void 0 ? _props$colorScheme : getStatusColorScheme(status);
102
- const styles = useMultiStyleConfig('Alert', {
103
- ...props,
104
- colorScheme
105
- });
106
- const alertStyles = {
107
- width: '100%',
108
- display: 'grid',
109
- gridTemplateColumns: 'auto 1fr auto auto',
110
- alignItems: 'center',
111
- position: 'relative',
112
- overflow: 'hidden',
113
- ...styles.container
114
- };
115
- return /*#__PURE__*/React__default.createElement(AlertProvider, {
116
- value: {
117
- status
118
- }
119
- }, /*#__PURE__*/React__default.createElement(AlertStylesProvider, {
120
- value: styles
121
- }, /*#__PURE__*/React__default.createElement(chakra.div, Object.assign({
122
- "data-status": status,
123
- role: addRole ? 'alert' : undefined,
124
- ref: ref
125
- }, rest, {
126
- className: cx('chakra-alert', props.className),
127
- __css: alertStyles
128
- }), children)));
129
- });
130
- Alert.displayName = 'Alert';
131
-
132
- const Loader = /*#__PURE__*/forwardRef$1((props, ref) => {
133
- const styles = useStyleConfig('LoaderStyle', props);
134
- return /*#__PURE__*/React__default.createElement(Box, {
135
- ref: ref,
136
- __css: styles
137
- });
138
- });
139
- Loader.defaultProps = {
140
- size: 'md'
141
- };
142
-
143
- const Button = /*#__PURE__*/forwardRef$1((props, ref) => {
144
- const {
145
- children,
146
- variant,
147
- size,
148
- ...rest
149
- } = props;
150
- const getLoaderSize = () => {
151
- if (size === 'lg') return 'md';
152
- if (size === 'md') return 'sm';
153
- return 'xs';
154
- };
155
- const getLoaderColor = () => {
156
- if (variant === 'primary' || variant === 'danger') return 'white';
157
- if (variant === 'outline-danger') return 'danger';
158
- return 'primary';
159
- };
160
- return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
161
- size: size,
162
- variant: variant,
163
- spinner: /*#__PURE__*/React__default.createElement(Loader, {
164
- size: getLoaderSize(),
165
- color: getLoaderColor()
166
- }),
167
- ref: ref
168
- }, rest), children);
169
- });
170
-
171
- function AlertAction({
172
- children,
173
- className
174
- }) {
175
- const styles = useAlertStyles();
176
- const css = styles.action;
177
- return /*#__PURE__*/React__default.createElement(Button, {
178
- "data-test-id": "alert-action",
179
- className: cx$1('chakra-alert__action', className),
180
- variant: "link",
181
- fontWeight: "semibold",
182
- __css: css
183
- }, children);
184
- }
185
- AlertAction.displayName = 'AlertAction';
186
-
187
- function AlertClose({
188
- className,
189
- children,
190
- ...rest
191
- }) {
192
- const styles = useAlertStyles();
193
- const css = styles.close;
194
- return /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
195
- display: "inherit",
196
- "data-status": 'alert-close'
197
- }, rest, {
198
- className: cx('chakra-alert__close', className),
199
- __css: css
200
- }), children || /*#__PURE__*/React__default.createElement(Close, {
201
- color: "inherit",
202
- size: 4
203
- }));
204
- }
205
- AlertClose.displayName = 'AlertClose';
206
-
207
- const AlertDescription = /*#__PURE__*/forwardRef(function AlertDescription(props, ref) {
208
- const styles = useAlertStyles();
209
- const {
210
- status
211
- } = useAlertContext();
212
- const descriptionStyles = {
213
- display: 'inline',
214
- ...styles.description
215
- };
216
- return /*#__PURE__*/React__default.createElement(chakra.div, Object.assign({
217
- ref: ref,
218
- "data-status": status
219
- }, props, {
220
- className: cx('chakra-alert__desc', props.className),
221
- __css: descriptionStyles
222
- }));
223
- });
224
- AlertDescription.displayName = 'AlertDescription';
225
-
226
- function AlertIcon({
227
- className,
228
- children,
229
- ...rest
230
- }) {
231
- const {
232
- status
233
- } = useAlertContext();
234
- const BaseIcon = getStatusIcon(status);
235
- const styles = useAlertStyles();
236
- const css = styles.icon;
237
- return /*#__PURE__*/React__default.createElement(chakra.span, Object.assign({
238
- display: "inherit",
239
- "data-status": status
240
- }, rest, {
241
- className: cx('chakra-alert__icon', className),
242
- __css: css
243
- }), children || /*#__PURE__*/React__default.createElement(BaseIcon, null));
244
- }
245
- AlertIcon.displayName = 'AlertIcon';
246
-
247
- const AlertTitle = /*#__PURE__*/forwardRef(function AlertTitle(props, ref) {
248
- const styles = useAlertStyles();
249
- const {
250
- status
251
- } = useAlertContext();
252
- return /*#__PURE__*/React__default.createElement(chakra.div, Object.assign({
253
- ref: ref,
254
- "data-status": status
255
- }, props, {
256
- className: cx('chakra-alert__title', props.className),
257
- __css: styles.title
258
- }));
259
- });
260
- AlertTitle.displayName = 'AlertTitle';
261
-
262
- const Badge = props => {
263
- const {
264
- children,
265
- pill,
266
- ...rest
267
- } = props;
268
- return /*#__PURE__*/React__default.createElement(Badge$2, Object.assign({
269
- borderRadius: pill ? 'xl' : 'sm',
270
- display: "inline-flex",
271
- alignItems: "center",
272
- justifyContent: "space-between",
273
- textTransform: "none"
274
- }, rest), children);
275
- };
276
- Badge.defaultProps = {
277
- pill: false
278
- };
279
-
280
- /* eslint-disable react-hooks/rules-of-hooks */
281
- const BreadCrumb = props => {
282
- const {
283
- title,
284
- children,
285
- parents,
286
- className,
287
- disableHome,
288
- spacing = 2,
289
- backButton
290
- } = props;
291
- const [neutral600, primary500] = useToken('colors', ['neutral.600', 'primary.500']);
292
- return /*#__PURE__*/createElement(Box, {
293
- "data-test-id": "CT_component_breadcrumb_breadcrumb",
294
- className: className,
295
- display: "flex",
296
- justifyContent: "space-between",
297
- alignItems: "center",
298
- paddingY: 2
299
- }, /*#__PURE__*/createElement(Box, {
300
- display: "flex",
301
- alignItems: "center"
302
- }, backButton && /*#__PURE__*/createElement(Button, {
303
- variant: "icon",
304
- "data-test-id": "button",
305
- size: "md",
306
- mr: "2",
307
- onClick: backButton
308
- }, /*#__PURE__*/createElement(FiChevronLeft, {
309
- size: theme$1.sizes[5]
310
- })), /*#__PURE__*/createElement(Text, {
311
- pr: "2",
312
- textStyle: "heading.6",
313
- color: "neutral.700"
314
- }, title), /*#__PURE__*/createElement(Box, {
315
- h: "5.5",
316
- borderLeft: "1px solid",
317
- borderColor: neutral600
318
- }), /*#__PURE__*/createElement(Breadcrumb, {
319
- separator: /*#__PURE__*/createElement(FiChevronsRight, {
320
- color: neutral600,
321
- size: theme$1.sizes['3.5']
322
- }),
323
- pl: "2",
324
- pr: "4",
325
- spacing: spacing,
326
- sx: {
327
- ol: {
328
- display: 'flex',
329
- alignItems: 'center'
330
- }
331
- },
332
- display: "flex",
333
- alignItems: "center",
334
- className: "breadcrumb-wrapper"
335
- }, /*#__PURE__*/createElement(BreadcrumbItem, null, /*#__PURE__*/createElement(BreadcrumbLink, {
336
- href: !disableHome ? '/' : undefined,
337
- style: {
338
- ...(disableHome && {
339
- cursor: 'default'
340
- })
341
- }
342
- }, /*#__PURE__*/createElement(FiHome, {
343
- className: "align-top",
344
- size: theme$1.sizes['3.5'],
345
- color: primary500
346
- }))), parents === null || parents === void 0 ? void 0 : parents.map(val => /*#__PURE__*/createElement(BreadcrumbItem, {
347
- key: val.name
348
- }, /*#__PURE__*/createElement(BreadcrumbLink, {
349
- "data-test-id": "iadKcMAul3QAdvmfIQjRE",
350
- href: !val.disable ? val.link : undefined,
351
- onClick: val.onClick,
352
- style: {
353
- ...(val.disable && {
354
- cursor: 'default'
355
- })
356
- },
357
- _hover: {
358
- textDecoration: 'none'
359
- }
360
- }, /*#__PURE__*/createElement(Text, {
361
- color: val.disable ? neutral600 : primary500,
362
- textStyle: "text.sm"
363
- }, val.name)))), /*#__PURE__*/createElement(BreadcrumbItem, null, /*#__PURE__*/createElement(BreadcrumbLink, {
364
- _hover: {
365
- textDecor: 'none',
366
- cursor: 'default'
367
- }
368
- }, /*#__PURE__*/createElement(Text, {
369
- color: "neutral.600",
370
- textStyle: "text.sm"
371
- }, title))))), children && /*#__PURE__*/createElement(Box, null, children));
372
- };
373
- BreadCrumb.defaultProps = {
374
- children: undefined,
375
- parents: undefined,
376
- className: undefined,
377
- disableHome: undefined,
378
- spacing: 2,
379
- backButton: undefined
380
- };
381
-
382
- const CardCustom = /*#__PURE__*/forwardRef$2(({
383
- children,
384
- ...rest
385
- }, ref) => {
386
- const styles = useStyleConfig('Card', rest);
387
- return /*#__PURE__*/React__default.createElement(Card, Object.assign({
388
- __css: styles,
389
- backgroundColor: "white.high",
390
- ref: ref
391
- }, rest), children);
392
- });
393
- CardCustom.defaultProps = {
394
- withShadow: true,
395
- isRounded: true
396
- };
397
-
398
- const CheckboxComponent = /*#__PURE__*/forwardRef$1(({
399
- isError = false,
400
- helpText = '',
401
- errorText = '',
402
- boxProps,
403
- children,
404
- isDisabled,
405
- ...rest
406
- }, ref) => {
407
- const variant = isError ? 'errors' : 'unstyled';
408
- return /*#__PURE__*/React__default.createElement(Box, Object.assign({}, boxProps), /*#__PURE__*/React__default.createElement(Box, {
409
- display: "flex"
410
- }, /*#__PURE__*/React__default.createElement(Checkbox$1, Object.assign({
411
- variant: variant,
412
- ref: ref
413
- }, rest, {
414
- isDisabled: isDisabled
415
- }), children && /*#__PURE__*/React__default.createElement(Text, {
416
- as: "span",
417
- display: "block",
418
- textStyle: "text.sm",
419
- color: isDisabled ? 'black.medium' : 'black.high'
420
- }, children))), (isError || helpText) && /*#__PURE__*/React__default.createElement(Box, {
421
- mt: "5px",
422
- ml: "24px"
423
- }, isError ? /*#__PURE__*/React__default.createElement(Text, {
424
- as: "span",
425
- display: "block",
426
- textStyle: "text.xs",
427
- color: "danger.500"
428
- }, errorText) : /*#__PURE__*/React__default.createElement(Text, {
429
- as: "span",
430
- display: "block",
431
- textStyle: "text.xs",
432
- color: "black.medium"
433
- }, helpText)));
434
- });
435
- CheckboxComponent.defaultProps = {
436
- isError: false,
437
- helpText: '',
438
- errorText: '',
439
- boxProps: {}
440
- };
441
-
442
- const Field = props => {
443
- const {
444
- label,
445
- isError,
446
- errorMessage,
447
- leftHelperText,
448
- rightHelperText,
449
- isRequired,
450
- children,
451
- isSuccess,
452
- boxProps = {}
453
- } = props;
454
- const getHelperColor = () => {
455
- if (isError) return 'danger.500';
456
- if (isSuccess) return 'success.500';
457
- return 'black.medium';
458
- };
459
- const getJustifyContentHelper = () => {
460
- if (rightHelperText && (!leftHelperText || isError && !errorMessage)) return 'flex-end';
461
- return 'space-between';
462
- };
463
- const helperColor = getHelperColor();
464
- const justifyHelper = getJustifyContentHelper();
465
- return /*#__PURE__*/React__default.createElement(FormControl, Object.assign({
466
- isInvalid: isError
467
- }, boxProps), label && (typeof label === 'string' ? /*#__PURE__*/React__default.createElement(FormLabel$1, {
468
- mb: 1,
469
- fontSize: "text.sm",
470
- requiredIndicator: undefined
471
- }, isRequired && /*#__PURE__*/React__default.createElement(Box, {
472
- as: "span",
473
- color: "danger.500",
474
- ml: 0,
475
- mr: 1
476
- }, "*"), label) : label), children, (isError && errorMessage || leftHelperText || rightHelperText) && /*#__PURE__*/React__default.createElement(Box, {
477
- display: "flex",
478
- width: "full",
479
- justifyContent: justifyHelper
480
- }, !isError ? leftHelperText && (typeof leftHelperText === 'string' ? /*#__PURE__*/React__default.createElement(FormHelperText, {
481
- fontSize: "text.xs",
482
- color: helperColor,
483
- mt: 1
484
- }, leftHelperText) : leftHelperText) : typeof errorMessage === 'string' ? /*#__PURE__*/React__default.createElement(FormErrorMessage, {
485
- fontSize: "text.xs",
486
- color: "danger.500",
487
- mt: 1
488
- }, errorMessage) : errorMessage, rightHelperText && (typeof rightHelperText === 'string' ? /*#__PURE__*/React__default.createElement(FormHelperText, {
489
- fontSize: "text.xs",
490
- color: helperColor,
491
- mt: 1
492
- }, rightHelperText) : rightHelperText)));
493
- };
494
- Field.defaultProps = {
495
- label: '',
496
- isError: false,
497
- isSuccess: false,
498
- errorMessage: undefined,
499
- leftHelperText: undefined,
500
- rightHelperText: undefined,
501
- isRequired: false,
502
- boxProps: {}
503
- };
504
-
505
- function CheckboxGroupComponent(props) {
506
- const {
507
- children,
508
- label,
509
- helpText,
510
- isError,
511
- errorMessage,
512
- ...rest
513
- } = props;
514
- return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
515
- label: label,
516
- leftHelperText: helpText,
517
- isError: isError,
518
- errorMessage: errorMessage
519
- }), /*#__PURE__*/React__default.createElement(Box, {
520
- mt: "12px"
521
- }, /*#__PURE__*/React__default.createElement(CheckboxGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
522
- spacing: [1, '16px'],
523
- direction: ['column', 'row']
524
- }, children))));
525
- }
526
- CheckboxGroupComponent.defaultProps = {
527
- helpText: '',
528
- isError: false,
529
- errorMessage: ''
530
- };
531
-
532
- const Chips = ({
533
- children,
534
- ...rest
535
- }) => {
536
- const {
537
- isActive,
538
- isDisabled,
539
- onClose
540
- } = rest;
541
- const styles = useStyleConfig('Chips', rest);
542
- const closeColor = useMemo(() => {
543
- if (isActive) return 'white.high';
544
- if (isDisabled) return 'black.low';
545
- return 'primary.500';
546
- }, [isActive, isDisabled]);
547
- return /*#__PURE__*/React__default.createElement(Box, Object.assign({
548
- __css: styles,
549
- display: "inline-flex",
550
- alignItems: "center",
551
- justifyContent: "center"
552
- }, rest), children, onClose && /*#__PURE__*/React__default.createElement(Box, {
553
- onClick: isDisabled ? undefined : onClose,
554
- cursor: isDisabled ? 'not-allowed' : 'pointer',
555
- ml: 2,
556
- display: "flex",
557
- alignItems: "center",
558
- justifyContent: "center"
559
- }, /*#__PURE__*/React__default.createElement(Close, {
560
- color: closeColor,
561
- size: 4
562
- })));
563
- };
564
- Chips.defaultProps = {
565
- isDisabled: false,
566
- isActive: false,
567
- onClose: undefined,
568
- children: undefined,
569
- size: 'sm'
570
- };
571
-
572
- /* eslint-disable react-hooks/rules-of-hooks */
573
- const DataTable = /*#__PURE__*/forwardRef$2((props, ref) => {
574
- const {
575
- columns,
576
- dataSource = [],
577
- isLoading,
578
- withSelectedRow,
579
- onSelectedRow,
580
- onSort,
581
- sortDescFirst,
582
- styles,
583
- sortingState,
584
- headerSticky,
585
- manualSorting,
586
- onRowClick
587
- } = props;
588
- const [isFirstLoad, setIsFirstLoad] = useState(true);
589
- const [sorting, setSorting] = useState(sortingState !== null && sortingState !== void 0 ? sortingState : []);
590
- const [rowSelection, onRowSelectionChange] = useState({});
591
- const dataColumns = useMemo(() => columns, [columns]);
592
- const checkboxColumn = useMemo(() => [{
593
- id: 'select',
594
- header: ({
595
- table
596
- }) => /*#__PURE__*/createElement(Checkbox$1, Object.assign({
597
- "data-test-id": "select-header-data-table"
598
- }, {
599
- isChecked: table.getIsAllRowsSelected(),
600
- isIndeterminate: table.getIsSomeRowsSelected(),
601
- onChange: table.getToggleAllRowsSelectedHandler()
602
- })),
603
- cell: ({
604
- row
605
- }) => /*#__PURE__*/createElement(Checkbox$1, Object.assign({
606
- "data-test-id": `select-data-table-${row.index}`
607
- }, {
608
- isChecked: row.getIsSelected(),
609
- isIndeterminate: row.getIsSomeSelected(),
610
- onChange: row.getToggleSelectedHandler()
611
- }))
612
- }], []);
613
- const generateColumn = () => {
614
- if (withSelectedRow) {
615
- return [...checkboxColumn, ...dataColumns];
616
- }
617
- return dataColumns;
618
- };
619
- const onSortingChange = data => {
620
- setSorting(data);
621
- };
622
- const table = useReactTable({
623
- data: dataSource,
624
- columns: generateColumn(),
625
- getCoreRowModel: getCoreRowModel(),
626
- getSortedRowModel: getSortedRowModel(),
627
- manualPagination: true,
628
- manualSorting,
629
- sortDescFirst,
630
- state: {
631
- sorting,
632
- rowSelection
633
- },
634
- onRowSelectionChange,
635
- onSortingChange
636
- });
637
- const {
638
- getSelectedRowModel,
639
- toggleAllRowsSelected
640
- } = table;
641
- const {
642
- flatRows
643
- } = getSelectedRowModel();
644
- useEffect(() => {
645
- const rowData = flatRows.map(row => row.original);
646
- if (onSelectedRow) {
647
- onSelectedRow(rowData);
648
- }
649
- }, [flatRows]);
650
- useImperativeHandle(ref, () => ({
651
- toggleAllRowsSelected
652
- }));
653
- useEffect(() => {
654
- if (onSort && !isFirstLoad) {
655
- onSort(sorting);
656
- }
657
- }, [sorting]);
658
- useEffect(() => {
659
- setIsFirstLoad(false);
660
- }, []);
661
- return /*#__PURE__*/createElement(Box, Object.assign({}, props), isLoading && /*#__PURE__*/createElement(Flex, {
662
- w: "100%",
663
- h: "100%",
664
- pos: "absolute",
665
- bg: "white",
666
- align: "center",
667
- justify: "center",
668
- zIndex: 2
669
- }, /*#__PURE__*/createElement(Spinner, {
670
- color: "primary.500",
671
- thickness: "4px",
672
- size: "lg"
673
- })), /*#__PURE__*/createElement(Table, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.table), /*#__PURE__*/createElement(Thead, Object.assign({}, (headerSticky ? {
674
- position: 'sticky',
675
- top: 0,
676
- bg: 'white',
677
- zIndex: 1
678
- } : {})), table.getHeaderGroups().map(headerGroup => /*#__PURE__*/createElement(Tr, Object.assign({
679
- key: headerGroup.id,
680
- bg: useColorModeValue('initial', 'ebony-clay.700')
681
- }, styles === null || styles === void 0 ? void 0 : styles.tableRow), headerGroup.headers.map(header => {
682
- var _ref;
683
- return /*#__PURE__*/createElement(Th, Object.assign({
684
- key: header.id,
685
- colSpan: header.colSpan
686
- }, styles === null || styles === void 0 ? void 0 : styles.tableColumnHeader), /*#__PURE__*/createElement(Flex, {
687
- "data-test-id": `CT_Container_TableHeader_${header.id}`,
688
- textTransform: "capitalize",
689
- userSelect: "none",
690
- align: "center",
691
- gap: 2
692
- }, /*#__PURE__*/createElement(Text, null, flexRender(header.column.columnDef.header, header.getContext())), /*#__PURE__*/createElement(Box, {
693
- as: "span",
694
- cursor: header.column.getCanSort() ? 'pointer' : 'default',
695
- "data-test-id": `CT_Container_SortingIcon_${header.id}`,
696
- onClick: header.column.getToggleSortingHandler()
697
- }, (_ref = header.column.getCanSort() && {
698
- asc: /*#__PURE__*/createElement(ChevronUpIcon, null),
699
- desc: /*#__PURE__*/createElement(ChevronDownIcon, null)
700
- }[header.column.getIsSorted()]) !== null && _ref !== void 0 ? _ref : /*#__PURE__*/createElement(UpDownIcon, {
701
- h: 2
702
- }))));
703
- })))), /*#__PURE__*/createElement(Tbody, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.tableBody), table.getRowModel().rows.map(row => /*#__PURE__*/createElement(Tr, Object.assign({
704
- "data-test-id": "6aZAeefGHBA2oG1wLuv-L",
705
- key: row.id
706
- }, styles === null || styles === void 0 ? void 0 : styles.tableRow, {
707
- css: css`
708
- &:last-child {
709
- td {
710
- border-bottom: none;
711
- }
712
- }
713
- `,
714
- onClick: () => {
715
- if (onRowClick) {
716
- onRowClick(row.original);
717
- }
718
- }
719
- }), row.getVisibleCells().map(cell => /*#__PURE__*/createElement(Td, Object.assign({
720
- key: cell.id,
721
- fontSize: "text.sm",
722
- color: useColorModeValue('dark.800', 'dark.300')
723
- }, styles === null || styles === void 0 ? void 0 : styles.tableCell), flexRender(cell.column.columnDef.cell, cell.getContext()))))))));
724
- });
725
- /* eslint-disable react/default-props-match-prop-types */
726
- DataTable.defaultProps = {
727
- withSelectedRow: false,
728
- overflowX: 'scroll',
729
- pos: 'relative',
730
- maxW: '100%',
731
- minH: 400,
732
- w: 'full',
733
- styles: undefined,
734
- isLoading: undefined,
735
- onSelectedRow: undefined,
736
- onSort: undefined,
737
- manualSorting: false,
738
- sortingState: [],
739
- sortDescFirst: false,
740
- headerSticky: false,
741
- onRowClick: undefined
742
- };
743
-
744
- const getProperties = props => {
745
- const {
746
- isError,
747
- isDisabled,
748
- isSuccess
749
- } = props;
750
- let outlineColor = 'neutral.400';
751
- let focusColor = 'primary.500';
752
- if (isError || isDisabled || isSuccess) {
753
- if (isError) outlineColor = 'danger.500';else if (isSuccess) outlineColor = 'success.500';
754
- focusColor = outlineColor;
755
- }
756
- return {
757
- outlineColor,
758
- focusColor
759
- };
760
- };
761
- const getWrapperStyle = props => {
762
- const {
763
- outlineColor,
764
- focusColor
765
- } = getProperties(props);
766
- const style = {
767
- border: '1px solid',
768
- borderColor: outlineColor,
769
- borderRadius: 'sm',
770
- transition: 'all 0.15s',
771
- boxShadow: 'none',
772
- _focusWithin: {
773
- borderColor: focusColor
774
- }
775
- };
776
- return defineStyle(style);
777
- };
778
-
779
- const Styles = () => {
780
- const {
781
- colorMode
782
- } = useColorMode();
783
- return /*#__PURE__*/React__default.createElement(Global, {
784
- styles: `
785
- @charset "UTF-8";
786
- .react-datepicker__year-read-view--down-arrow,
787
- .react-datepicker__month-read-view--down-arrow,
788
- .react-datepicker__month-year-read-view--down-arrow, .react-datepicker__navigation-icon::before {
789
- border-color: ${colorMode === 'light' ? '#6E6B7B' : '#d0d1d2'};
790
- border-style: solid;
791
- border-width: 1px 1px 0 0;
792
- content: "";
793
- display: block;
794
- height: 7px;
795
- position: absolute;
796
- top: 13px;
797
- width: 7px;
798
- }
799
- .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {
800
- margin-left: -4px;
801
- position: absolute;
802
- width: 0;
803
- }
804
- .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {
805
- box-sizing: content-box;
806
- position: absolute;
807
- border: 8px solid transparent;
808
- height: 0;
809
- width: 1px;
810
- content: "";
811
- z-index: -1;
812
- border-width: 8px;
813
- left: -8px;
814
- }
815
- .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {
816
- border-bottom-color: #aeaeae;
817
- }
818
-
819
- .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {
820
- top: 0;
821
- margin-top: -8px;
822
- }
823
- .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {
824
- border-top: none;
825
- border-bottom-color: #f0f0f0;
826
- }
827
- .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {
828
- top: 0;
829
- }
830
- .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {
831
- top: -1px;
832
- border-bottom-color: #aeaeae;
833
- }
834
-
835
- .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle {
836
- bottom: 0;
837
- margin-bottom: -8px;
838
- }
839
- .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {
840
- border-bottom: none;
841
- border-top-color: #fff;
842
- }
843
- .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {
844
- bottom: 0;
845
- }
846
- .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before {
847
- bottom: -1px;
848
- border-top-color: #aeaeae;
849
- }
850
-
851
- .react-datepicker-wrapper {
852
- display: inline-block;
853
- padding: 0;
854
- border: 0;
855
- width: 100%;
856
- }
857
-
858
- .react-datepicker {
859
- font-family: "inherit", helvetica, arial, sans-serif;
860
- font-size: 0.75;
861
- background-color: ${colorMode === 'light' ? '#ffffff' : '#283046'};
862
- color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
863
- filter: drop-shadow(0px 3px 10px rgba(0, 0, 0, 0.08));
864
- border-radius: 0.3rem;
865
- display: inline-block;
866
- position: relative;
867
- }
868
-
869
- .react-datepicker.inline {
870
- filter: none;
871
- }
872
-
873
- .react-datepicker--time-only .react-datepicker__triangle {
874
- left: 35px;
875
- }
876
- .react-datepicker--time-only .react-datepicker__time-container {
877
- border-left: 0;
878
- }
879
- .react-datepicker--time-only .react-datepicker__time,
880
- .react-datepicker--time-only .react-datepicker__time-box {
881
- border-bottom-left-radius: 0.3rem;
882
- border-bottom-right-radius: 0.3rem;
883
- }
884
-
885
- .react-datepicker__triangle {
886
- position: absolute;
887
- left: 50px;
888
- }
889
-
890
- .react-datepicker-popper {
891
- z-index: 1;
892
- }
893
- .react-datepicker-popper[data-placement^=bottom] {
894
- padding-top: 10px;
895
- }
896
- .react-datepicker-popper[data-placement=bottom-end] .react-datepicker__triangle, .react-datepicker-popper[data-placement=top-end] .react-datepicker__triangle {
897
- left: auto;
898
- right: 50px;
899
- }
900
- .react-datepicker-popper[data-placement^=top] {
901
- padding-bottom: 10px;
902
- }
903
- .react-datepicker-popper[data-placement^=right] {
904
- padding-left: 8px;
905
- }
906
- .react-datepicker-popper[data-placement^=right] .react-datepicker__triangle {
907
- left: auto;
908
- right: 42px;
909
- }
910
- .react-datepicker-popper[data-placement^=left] {
911
- padding-right: 8px;
912
- }
913
- .react-datepicker-popper[data-placement^=left] .react-datepicker__triangle {
914
- left: 42px;
915
- right: auto;
916
- }
917
-
918
- .react-datepicker__header {
919
- text-align: center;
920
- background-color: ${colorMode === 'light' ? '#ffffff' : '#131620'};
921
- border-top-left-radius: 0.3rem;
922
- padding: 8px 0;
923
- position: relative;
924
- }
925
- .react-datepicker__header--time {
926
- padding-bottom: 8px;
927
- padding-left: 5px;
928
- padding-right: 5px;
929
- }
930
- .react-datepicker__header--time:not(.react-datepicker__header--time--only) {
931
- border-top-left-radius: 0;
932
- }
933
- .react-datepicker__header:not(.react-datepicker__header--has-time-select) {
934
- border-top-right-radius: 0.3rem;
935
- }
936
-
937
- .react-datepicker__year-dropdown-container--select,
938
- .react-datepicker__month-dropdown-container--select,
939
- .react-datepicker__month-year-dropdown-container--select,
940
- .react-datepicker__year-dropdown-container--scroll,
941
- .react-datepicker__month-dropdown-container--scroll,
942
- .react-datepicker__month-year-dropdown-container--scroll {
943
- display: inline-block;
944
- margin: 0 2px;
945
- }
946
- .react-datepicker__header__dropdown.react-datepicker__header__dropdown--select {
947
- font-weight: 600;
948
- line-height: 22px;
949
- color: #111111;
950
- }
951
-
952
- .react-datepicker__current-month,
953
- .react-datepicker-time__header,
954
- .react-datepicker-year-header {
955
- margin-top: 0;
956
- color: ${colorMode === 'light' ? '#111111' : '#d0d1d2'};
957
- font-size: 0.75;
958
- }
959
-
960
- .react-datepicker-time__header {
961
- text-overflow: ellipsis;
962
- white-space: nowrap;
963
- overflow: hidden;
964
- }
965
-
966
- .react-datepicker__navigation {
967
- align-items: center;
968
- background: none;
969
- display: flex;
970
- justify-content: center;
971
- text-align: center;
972
- cursor: pointer;
973
- position: absolute;
974
- top: 2px;
975
- padding: 0;
976
- border: none;
977
- z-index: 1;
978
- height: 32px;
979
- width: 32px;
980
- text-indent: -999em;
981
- overflow: hidden;
982
- }
983
- .react-datepicker__navigation--previous {
984
- left: 2px;
985
- }
986
- .react-datepicker__navigation--next {
987
- right: 2px;
988
- }
989
- .react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {
990
- right: 85px;
991
- }
992
- .react-datepicker__navigation--years {
993
- position: relative;
994
- top: 0;
995
- display: block;
996
- margin-left: auto;
997
- margin-right: auto;
998
- }
999
- .react-datepicker__navigation--years-previous {
1000
- top: 4px;
1001
- }
1002
- .react-datepicker__navigation--years-upcoming {
1003
- top: -4px;
1004
- }
1005
- .react-datepicker__navigation:hover *::before {
1006
- border-color: #a6a6a6;
1007
- }
1008
-
1009
- .react-datepicker__navigation-icon {
1010
- position: relative;
1011
- top: -1px;
1012
- font-size: 20px;
1013
- width: 0;
1014
- }
1015
- .react-datepicker__navigation-icon--next {
1016
- left: -2px;
1017
- }
1018
- .react-datepicker__navigation-icon--next::before {
1019
- transform: rotate(45deg);
1020
- left: -7px;
1021
- }
1022
- .react-datepicker__navigation-icon--previous {
1023
- right: -2px;
1024
- }
1025
- .react-datepicker__navigation-icon--previous::before {
1026
- transform: rotate(225deg);
1027
- right: -7px;
1028
- }
1029
-
1030
- .react-datepicker__month-container {
1031
- float: left;
1032
- border-radius: 8px;
1033
- }
1034
-
1035
- .react-datepicker__year {
1036
- margin: 0.4rem;
1037
- text-align: center;
1038
- }
1039
- .react-datepicker__year-wrapper {
1040
- display: flex;
1041
- flex-wrap: wrap;
1042
- max-width: 180px;
1043
- }
1044
- .react-datepicker__year .react-datepicker__year-text {
1045
- display: inline-block;
1046
- width: 4rem;
1047
- margin: 2px;
1048
- }
1049
-
1050
- .react-datepicker__month {
1051
- margin: 0.4rem;
1052
- text-align: center;
1053
- }
1054
- .react-datepicker__month .react-datepicker__month-text,
1055
- .react-datepicker__month .react-datepicker__quarter-text {
1056
- display: inline-block;
1057
- width: 4rem;
1058
- margin: 2px;
1059
- }
1060
-
1061
- .react-datepicker__input-time-container {
1062
- width: 100%;
1063
- }
1064
- .react-datepicker__input-time-container .react-datepicker-time__caption {
1065
- width: 100%;
1066
- display: inline-block;
1067
- }
1068
- .react-datepicker__input-time-container .react-datepicker-time__input-container {
1069
- width: 100%;
1070
- display: inline-block;
1071
- }
1072
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input {
1073
- width: 100%;
1074
- display: inline-block;
1075
- }
1076
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {
1077
- width: auto;
1078
- }
1079
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,
1080
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {
1081
- -webkit-appearance: none;
1082
- margin: 0;
1083
- }
1084
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time] {
1085
- -moz-appearance: textfield;
1086
- }
1087
- .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter {
1088
- width: 100%;
1089
- display: inline-block;
1090
- }
1091
-
1092
- .react-datepicker__time-container {
1093
- float: right;
1094
- border-left: 1px solid #aeaeae;
1095
- width: 85px;
1096
- }
1097
- .react-datepicker__time-container--with-today-button {
1098
- display: inline;
1099
- border: 1px solid #aeaeae;
1100
- border-radius: 0.3rem;
1101
- position: absolute;
1102
- right: -72px;
1103
- top: 0;
1104
- }
1105
- .react-datepicker__time-container .react-datepicker__time {
1106
- position: relative;
1107
- background: white;
1108
- border-bottom-right-radius: 0.3rem;
1109
- }
1110
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {
1111
- width: 85px;
1112
- overflow-x: hidden;
1113
- margin: 0 auto;
1114
- text-align: center;
1115
- border-bottom-right-radius: 0.3rem;
1116
- }
1117
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {
1118
- list-style: none;
1119
- margin: 0;
1120
- height: calc(195px + (1.7rem / 2));
1121
- overflow-y: scroll;
1122
- padding-right: 0;
1123
- padding-left: 0;
1124
- width: 100%;
1125
- box-sizing: content-box;
1126
- }
1127
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {
1128
- height: 30px;
1129
- padding: 5px 10px;
1130
- white-space: nowrap;
1131
- }
1132
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {
1133
- cursor: pointer;
1134
- background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
1135
- }
1136
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {
1137
- background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
1138
- color: white;
1139
- font-weight: bold;
1140
- }
1141
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover {
1142
- background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
1143
- }
1144
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled {
1145
- color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};
1146
- }
1147
- .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover {
1148
- cursor: default;
1149
- background-color: transparent;
1150
- }
1151
-
1152
- .react-datepicker__week-number {
1153
- color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};
1154
- display: inline-block;
1155
- width: 1.7rem;
1156
- line-height: 1.7rem;
1157
- text-align: center;
1158
- margin: 0.166rem;
1159
- }
1160
- .react-datepicker__week-number.react-datepicker__week-number--clickable {
1161
- cursor: pointer;
1162
- }
1163
- .react-datepicker__week-number.react-datepicker__week-number--clickable:hover {
1164
- border-radius: 0.3rem;
1165
- background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
1166
- }
1167
-
1168
- .react-datepicker__day-names,
1169
- .react-datepicker__week {
1170
- white-space: nowrap;
1171
- }
1172
-
1173
- .react-datepicker__day-names {
1174
- margin-bottom: 0px;
1175
- }
1176
-
1177
- .react-datepicker__day-name,
1178
- .react-datepicker__day,
1179
- .react-datepicker__time-name {
1180
- color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
1181
- display: inline-block;
1182
- width: 1.7rem;
1183
- line-height: 1.7rem;
1184
- text-align: center;
1185
- padding: 0.166rem;
1186
- }
1187
-
1188
- .react-datepicker__month--selected, .react-datepicker__month--in-selecting-range, .react-datepicker__month--in-range,
1189
- .react-datepicker__quarter--selected,
1190
- .react-datepicker__quarter--in-selecting-range,
1191
- .react-datepicker__quarter--in-range {
1192
- border-radius: 0.3rem;
1193
- background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
1194
- color: #fff;
1195
- }
1196
- .react-datepicker__month--selected:hover, .react-datepicker__month--in-selecting-range:hover, .react-datepicker__month--in-range:hover,
1197
- .react-datepicker__quarter--selected:hover,
1198
- .react-datepicker__quarter--in-selecting-range:hover,
1199
- .react-datepicker__quarter--in-range:hover {
1200
- background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
1201
- }
1202
- .react-datepicker__month--disabled,
1203
- .react-datepicker__quarter--disabled {
1204
- color: #ccc;
1205
- pointer-events: none;
1206
- }
1207
- .react-datepicker__month--disabled:hover,
1208
- .react-datepicker__quarter--disabled:hover {
1209
- cursor: default;
1210
- background-color: transparent;
1211
- }
1212
-
1213
- .react-datepicker__day,
1214
- .react-datepicker__month-text,
1215
- .react-datepicker__quarter-text,
1216
- .react-datepicker__year-text {
1217
- cursor: pointer;
1218
- }
1219
- .react-datepicker__day:hover,
1220
- .react-datepicker__month-text:hover,
1221
- .react-datepicker__quarter-text:hover,
1222
- .react-datepicker__year-text:hover {
1223
- border-radius: 0.3rem;
1224
- background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
1225
- }
1226
- .react-datepicker__day--highlighted,
1227
- .react-datepicker__month-text--highlighted,
1228
- .react-datepicker__quarter-text--highlighted,
1229
- .react-datepicker__year-text--highlighted {
1230
- border-radius: 0.3rem;
1231
- background-color: #3dcc4a;
1232
- color: #fff;
1233
- }
1234
- .react-datepicker__day--highlighted:hover,
1235
- .react-datepicker__month-text--highlighted:hover,
1236
- .react-datepicker__quarter-text--highlighted:hover,
1237
- .react-datepicker__year-text--highlighted:hover {
1238
- background-color: #32be3f;
1239
- }
1240
- .react-datepicker__day--highlighted-custom-1,
1241
- .react-datepicker__month-text--highlighted-custom-1,
1242
- .react-datepicker__quarter-text--highlighted-custom-1,
1243
- .react-datepicker__year-text--highlighted-custom-1 {
1244
- color: magenta;
1245
- }
1246
- .react-datepicker__day--highlighted-custom-2,
1247
- .react-datepicker__month-text--highlighted-custom-2,
1248
- .react-datepicker__quarter-text--highlighted-custom-2,
1249
- .react-datepicker__year-text--highlighted-custom-2 {
1250
- color: green;
1251
- }
1252
- .react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range,
1253
- .react-datepicker__month-text--selected,
1254
- .react-datepicker__month-text--in-selecting-range,
1255
- .react-datepicker__month-text--in-range,
1256
- .react-datepicker__quarter-text--selected,
1257
- .react-datepicker__quarter-text--in-selecting-range,
1258
- .react-datepicker__quarter-text--in-range,
1259
- .react-datepicker__year-text--selected,
1260
- .react-datepicker__year-text--in-selecting-range,
1261
- .react-datepicker__year-text--in-range {
1262
- border-radius: 0.3rem;
1263
- background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
1264
- color: #fff;
1265
- }
1266
- .react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,
1267
- .react-datepicker__month-text--selected:hover,
1268
- .react-datepicker__month-text--in-selecting-range:hover,
1269
- .react-datepicker__month-text--in-range:hover,
1270
- .react-datepicker__quarter-text--selected:hover,
1271
- .react-datepicker__quarter-text--in-selecting-range:hover,
1272
- .react-datepicker__quarter-text--in-range:hover,
1273
- .react-datepicker__year-text--selected:hover,
1274
- .react-datepicker__year-text--in-selecting-range:hover,
1275
- .react-datepicker__year-text--in-range:hover {
1276
- background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
1277
- }
1278
- .react-datepicker__day--keyboard-selected,
1279
- .react-datepicker__month-text--keyboard-selected,
1280
- .react-datepicker__quarter-text--keyboard-selected,
1281
- .react-datepicker__year-text--keyboard-selected {
1282
- border-radius: 0.3rem;
1283
- background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
1284
- color: #fff;
1285
- }
1286
- .react-datepicker__day--keyboard-selected:hover,
1287
- .react-datepicker__month-text--keyboard-selected:hover,
1288
- .react-datepicker__quarter-text--keyboard-selected:hover,
1289
- .react-datepicker__year-text--keyboard-selected:hover {
1290
- background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
1291
- }
1292
- .react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,
1293
- .react-datepicker__month-text--in-range,
1294
- .react-datepicker__quarter-text--in-range,
1295
- .react-datepicker__year-text--in-range),
1296
- .react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,
1297
- .react-datepicker__month-text--in-range,
1298
- .react-datepicker__quarter-text--in-range,
1299
- .react-datepicker__year-text--in-range),
1300
- .react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,
1301
- .react-datepicker__month-text--in-range,
1302
- .react-datepicker__quarter-text--in-range,
1303
- .react-datepicker__year-text--in-range),
1304
- .react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,
1305
- .react-datepicker__month-text--in-range,
1306
- .react-datepicker__quarter-text--in-range,
1307
- .react-datepicker__year-text--in-range) {
1308
- background-color: rgba(18, 120, 74, 0.1);
1309
- color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
1310
- }
1311
- .react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
1312
- .react-datepicker__month-text--in-selecting-range,
1313
- .react-datepicker__quarter-text--in-selecting-range,
1314
- .react-datepicker__year-text--in-selecting-range),
1315
- .react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
1316
- .react-datepicker__month-text--in-selecting-range,
1317
- .react-datepicker__quarter-text--in-selecting-range,
1318
- .react-datepicker__year-text--in-selecting-range),
1319
- .react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
1320
- .react-datepicker__month-text--in-selecting-range,
1321
- .react-datepicker__quarter-text--in-selecting-range,
1322
- .react-datepicker__year-text--in-selecting-range),
1323
- .react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
1324
- .react-datepicker__month-text--in-selecting-range,
1325
- .react-datepicker__quarter-text--in-selecting-range,
1326
- .react-datepicker__year-text--in-selecting-range) {
1327
- background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
1328
- color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
1329
- }
1330
- .react-datepicker__day--disabled,
1331
- .react-datepicker__month-text--disabled,
1332
- .react-datepicker__quarter-text--disabled,
1333
- .react-datepicker__year-text--disabled {
1334
- cursor: default;
1335
- color: #ccc;
1336
- }
1337
- .react-datepicker__day--disabled:hover,
1338
- .react-datepicker__month-text--disabled:hover,
1339
- .react-datepicker__quarter-text--disabled:hover,
1340
- .react-datepicker__year-text--disabled:hover {
1341
- background-color: transparent;
1342
- }
1343
-
1344
- .react-datepicker__month-text.react-datepicker__month--selected:hover, .react-datepicker__month-text.react-datepicker__month--in-range:hover, .react-datepicker__month-text.react-datepicker__quarter--selected:hover, .react-datepicker__month-text.react-datepicker__quarter--in-range:hover,
1345
- .react-datepicker__quarter-text.react-datepicker__month--selected:hover,
1346
- .react-datepicker__quarter-text.react-datepicker__month--in-range:hover,
1347
- .react-datepicker__quarter-text.react-datepicker__quarter--selected:hover,
1348
- .react-datepicker__quarter-text.react-datepicker__quarter--in-range:hover {
1349
- background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
1350
- }
1351
- .react-datepicker__month-text:hover,
1352
- .react-datepicker__quarter-text:hover {
1353
- background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
1354
- }
1355
-
1356
- .react-datepicker__input-container {
1357
- position: relative;
1358
- display: inline-block;
1359
- width: 100%;
1360
- }
1361
-
1362
- .react-datepicker__year-read-view,
1363
- .react-datepicker__month-read-view,
1364
- .react-datepicker__month-year-read-view {
1365
- border: 1px solid transparent;
1366
- border-radius: 0.3rem;
1367
- position: relative;
1368
- }
1369
- .react-datepicker__year-read-view:hover,
1370
- .react-datepicker__month-read-view:hover,
1371
- .react-datepicker__month-year-read-view:hover {
1372
- cursor: pointer;
1373
- }
1374
- .react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
1375
- .react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,
1376
- .react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,
1377
- .react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,
1378
- .react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,
1379
- .react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {
1380
- border-top-color: #b3b3b3;
1381
- }
1382
- .react-datepicker__year-read-view--down-arrow,
1383
- .react-datepicker__month-read-view--down-arrow,
1384
- .react-datepicker__month-year-read-view--down-arrow {
1385
- transform: rotate(135deg);
1386
- right: -16px;
1387
- top: 5px;
1388
- width: 5px;
1389
- height: 5px;
1390
- fill: #111111;
1391
-
1392
- }
1393
- .react-datepicker__header:not(.react-datepicker__header--has-time-select) {
1394
- background: ${colorMode === 'light' ? '#F5F5F5' : 'inherit'} ;
1395
-
1396
- border-top-left-radius: 8px;
1397
- border-top-right-radius: 8px;
1398
- }
1399
-
1400
- .react-datepicker__year-dropdown,
1401
- .react-datepicker__month-dropdown,
1402
- .react-datepicker__month-year-dropdown {
1403
- background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
1404
- position: absolute;
1405
- width: 50%;
1406
- left: 25%;
1407
- top: 30px;
1408
- z-index: 1;
1409
- text-align: center;
1410
- border-radius: 0.3rem;
1411
- border: 1px solid #aeaeae;
1412
- }
1413
- .react-datepicker__year-dropdown:hover,
1414
- .react-datepicker__month-dropdown:hover,
1415
- .react-datepicker__month-year-dropdown:hover {
1416
- cursor: pointer;
1417
- }
1418
- .react-datepicker__year-dropdown--scrollable,
1419
- .react-datepicker__month-dropdown--scrollable,
1420
- .react-datepicker__month-year-dropdown--scrollable {
1421
- height: 150px;
1422
- overflow-y: scroll;
1423
- }
1424
-
1425
- .react-datepicker__year-option,
1426
- .react-datepicker__month-option,
1427
- .react-datepicker__month-year-option {
1428
- line-height: 20px;
1429
- width: 100%;
1430
- display: block;
1431
- margin-left: auto;
1432
- margin-right: auto;
1433
- }
1434
- .react-datepicker__year-option:first-of-type,
1435
- .react-datepicker__month-option:first-of-type,
1436
- .react-datepicker__month-year-option:first-of-type {
1437
- border-top-left-radius: 0.3rem;
1438
- border-top-right-radius: 0.3rem;
1439
- }
1440
- .react-datepicker__year-option:last-of-type,
1441
- .react-datepicker__month-option:last-of-type,
1442
- .react-datepicker__month-year-option:last-of-type {
1443
- -webkit-user-select: none;
1444
- -moz-user-select: none;
1445
- -ms-user-select: none;
1446
- user-select: none;
1447
- border-bottom-left-radius: 0.3rem;
1448
- border-bottom-right-radius: 0.3rem;
1449
- }
1450
- .react-datepicker__year-option:hover,
1451
- .react-datepicker__month-option:hover,
1452
- .react-datepicker__month-year-option:hover {
1453
- background-color: #ccc;
1454
- }
1455
- .react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,
1456
- .react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,
1457
- .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming {
1458
- border-bottom-color: #b3b3b3;
1459
- }
1460
- .react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,
1461
- .react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,
1462
- .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous {
1463
- border-top-color: #b3b3b3;
1464
- }
1465
- .react-datepicker__year-option--selected,
1466
- .react-datepicker__month-option--selected,
1467
- .react-datepicker__month-year-option--selected {
1468
- position: absolute;
1469
- left: 15px;
1470
- }
1471
-
1472
- .react-datepicker__close-icon {
1473
- cursor: pointer;
1474
- background-color: transparent;
1475
- border: 0;
1476
- outline: 0;
1477
- padding: 0 6px 0 0;
1478
- position: absolute;
1479
- top: 0;
1480
- right: 0;
1481
- height: 100%;
1482
- display: table-cell;
1483
- vertical-align: middle;
1484
- }
1485
- .react-datepicker__close-icon::after {
1486
- cursor: pointer;
1487
- background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
1488
- color: #fff;
1489
- border-radius: 50%;
1490
- height: 16px;
1491
- width: 16px;
1492
- padding: 2px;
1493
- font-size: 12px;
1494
- line-height: 1;
1495
- text-align: center;
1496
- display: table-cell;
1497
- vertical-align: middle;
1498
- content: "×";
1499
- }
1500
-
1501
- .react-datepicker__today-button {
1502
- background: #f0f0f0;
1503
- border-top: 1px solid #aeaeae;
1504
- cursor: pointer;
1505
- text-align: center;
1506
- font-weight: bold;
1507
- padding: 5px 0;
1508
- clear: left;
1509
- }
1510
-
1511
- .react-datepicker__portal {
1512
- position: fixed;
1513
- width: 100vw;
1514
- height: 100vh;
1515
- background-color: rgba(0, 0, 0, 0.8);
1516
- left: 0;
1517
- top: 0;
1518
- justify-content: center;
1519
- align-items: center;
1520
- display: flex;
1521
- z-index: 2147483647;
1522
- }
1523
- .react-datepicker__portal .react-datepicker__day-name,
1524
- .react-datepicker__portal .react-datepicker__day,
1525
- .react-datepicker__portal .react-datepicker__time-name {
1526
- width: 3rem;
1527
- line-height: 3rem;
1528
- }
1529
- @media (max-width: 400px), (max-height: 550px) {
1530
- .react-datepicker__portal .react-datepicker__day-name,
1531
- .react-datepicker__portal .react-datepicker__day,
1532
- .react-datepicker__portal .react-datepicker__time-name {
1533
- width: 2rem;
1534
- line-height: 2rem;
1535
- }
1536
- }
1537
- .react-datepicker__portal .react-datepicker__current-month,
1538
- .react-datepicker__portal .react-datepicker-time__header {
1539
- font-size: 1.44rem;
1540
- }
1541
-
1542
- /** injected styles **/
1543
- .react-datepicker__day--outside-month {
1544
- color: ${colorMode === 'light' ? '#B9B9C3' : '#4D4D4D'};
1545
- }
1546
- .react-datepicker__day.react-datepicker__day--in-range {
1547
- border-radius: 0;
1548
- background: rgba(18, 120, 74, 0.1);
1549
- color: #12784A;
1550
- }
1551
- .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range,
1552
- .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {
1553
- background: #12784A;
1554
- color: #fff;
1555
- }
1556
- .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range {
1557
- border-radius: 100px 0px 0px 100px;
1558
- }
1559
- .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {
1560
- border-radius: 0px 100px 100px 0px;
1561
- }
1562
- .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day.react-datepicker__day--range-end {
1563
- border-radius: 100px;
1564
- padding: 0;
1565
- }
1566
- .react-datepicker__day.react-datepicker__day--outside-month:empty {
1567
- padding: 0;
1568
- }
1569
- .react-datepicker.inline .react-datepicker__header {
1570
- background-color: inherit;
1571
- }
1572
- .react-datepicker__day--keyboard-selected, .react-datepicker__day--keyboard-selected:hover {
1573
- background-color: inherit;
1574
- color: inherit;
1575
- }
1576
- .react-datepicker__day--today, .react-datepicker__day--today:hover {
1577
- color: #D82F23;
1578
- }
1579
- .react-datepicker__day--today:hover {
1580
- background: #f0f0f0;
1581
- }
1582
- .react-datepicker__day--selected.react-datepicker__day--today {
1583
- color: white;
1584
- background: #12784A;
1585
- }
1586
- `
1587
- });
1588
- };
1589
-
1590
- const TimeInput = ({
1591
- value,
1592
- onChange,
1593
- label,
1594
- rightAddon
1595
- }) => {
1596
- const [time, setTime] = React__default.useState(value || '00:00');
1597
- const handleChange = e => {
1598
- var _e$target, _e$target2;
1599
- setTime(((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '00:00');
1600
- if (onChange) onChange(((_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.value) || '00:00');
1601
- };
1602
- return /*#__PURE__*/React__default.createElement(Flex, {
1603
- flexDir: "column",
1604
- alignItems: "center",
1605
- justifyContent: "center",
1606
- p: 4,
1607
- pt: 0
1608
- }, /*#__PURE__*/React__default.createElement(Text, {
1609
- mb: 2
1610
- }, label), /*#__PURE__*/React__default.createElement(InputGroup, {
1611
- alignItems: "center",
1612
- justifyContent: "center"
1613
- }, /*#__PURE__*/React__default.createElement(Input$1, {
1614
- onChange: handleChange,
1615
- type: "time",
1616
- value: time,
1617
- "data-test-id": "CT_Component_datepicker_input_time"
1618
- }), rightAddon && /*#__PURE__*/React__default.createElement(InputRightAddon, null, rightAddon)));
1619
- };
1620
- TimeInput.displayName = 'DatepickerTimeInput';
1621
- TimeInput.defaultProps = {
1622
- value: '00:00',
1623
- onChange: undefined,
1624
- label: 'Pilih Waktu',
1625
- rightAddon: 'WIB'
1626
- };
1627
-
1628
- const Datepicker = ({
1629
- id,
1630
- label,
1631
- error,
1632
- isError,
1633
- helperText,
1634
- isRequired,
1635
- withTime,
1636
- value,
1637
- name,
1638
- onClear,
1639
- showMonth,
1640
- shortMonth,
1641
- ...props
1642
- }) => {
1643
- var _props$dateFormat;
1644
- const selected = value ? new Date(value) : undefined;
1645
- const dateFormat = ((_props$dateFormat = props.dateFormat) !== null && _props$dateFormat !== void 0 ? _props$dateFormat : withTime) ? 'yyyy-MM-dd HH:mm' : 'yyyy-MM-dd';
1646
- const wrapperStyle = getWrapperStyle({});
1647
- const getTimeProps = () => {
1648
- if (!withTime) return {};
1649
- return {
1650
- timeInputLabel: '',
1651
- showTimeInput: true,
1652
- customTimeInput: /*#__PURE__*/React__default.createElement(TimeInput, null)
1653
- };
1654
- };
1655
- const component = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Styles, null), /*#__PURE__*/React__default.createElement(ReactDatePicker, Object.assign({
1656
- id: id,
1657
- name: name,
1658
- selected: selected,
1659
- customInput: /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
1660
- autoComplete: "off"
1661
- }, wrapperStyle)),
1662
- dateFormat: dateFormat,
1663
- showPopperArrow: false,
1664
- calendarClassName: classnames({
1665
- inline: props.inline
1666
- }),
1667
- showMonthDropdown: showMonth,
1668
- useShortMonthInDropdown: showMonth ? shortMonth : false
1669
- }, getTimeProps(), props)));
1670
- if (props.inline) {
1671
- return component;
1672
- }
1673
- return /*#__PURE__*/React__default.createElement(FormControl, {
1674
- isRequired: isRequired,
1675
- "data-test-id": "CT_Component_datepicker_wrapper",
1676
- isInvalid: isError
1677
- }, label && /*#__PURE__*/React__default.createElement(FormLabel$1, {
1678
- fontSize: "text.sm"
1679
- }, label), /*#__PURE__*/React__default.createElement(InputGroup, null, component, /*#__PURE__*/React__default.createElement(InputRightElement, null, !value && /*#__PURE__*/React__default.createElement(FiCalendar, null), value && /*#__PURE__*/React__default.createElement(FiX, {
1680
- "data-test-id": "bcpJJyCP0z_RIAGZXDU6s",
1681
- onClick: onClear,
1682
- cursor: "pointer"
1683
- }))), !isError ? /*#__PURE__*/React__default.createElement(FormHelperText, {
1684
- fontSize: "text.xs",
1685
- mt: 1
1686
- }, helperText) : /*#__PURE__*/React__default.createElement(FormErrorMessage, {
1687
- fontSize: "text.xs",
1688
- mt: 1
1689
- }, error));
1690
- };
1691
- Datepicker.defaultProps = {
1692
- id: undefined,
1693
- isRequired: undefined,
1694
- label: undefined,
1695
- error: undefined,
1696
- isError: undefined,
1697
- helperText: undefined,
1698
- withTime: undefined,
1699
- onClear: undefined,
1700
- selectsRange: undefined,
1701
- shortMonth: false,
1702
- showMonth: false
1703
- };
1704
-
1705
- const DatePickerMonth = ({
1706
- onChange,
1707
- min,
1708
- max,
1709
- ...props
1710
- }) => {
1711
- const [date, setDate] = React__default.useState(null);
1712
- return /*#__PURE__*/React__default.createElement(Box, {
1713
- fontSize: '12px',
1714
- lineHeight: '18px',
1715
- css: css`
1716
- input[type='date']::-webkit-inner-spin-button,
1717
- input[type='date']::-webkit-calendar-picker-indicator {
1718
- display: none;
1719
- -webkit-appearance: none;
1720
- }
1721
- input[value=''] {
1722
- width: 58px;
1723
- }
1724
- `
1725
- }, /*#__PURE__*/React__default.createElement(Input$1, {
1726
- "data-test-id": props['data-test-id'],
1727
- type: "date",
1728
- width: date ? '51px' : '58px',
1729
- onChange: e => {
1730
- onChange(e.target.value);
1731
- setDate(e.target.value);
1732
- },
1733
- p: '8px',
1734
- min: min,
1735
- max: max,
1736
- required: true,
1737
- css: css`
1738
- border: 1px solid transparent;
1739
-
1740
- &:focus,
1741
- &:hover {
1742
- border: 1px solid transparent;
1743
- }
1744
-
1745
- &::placeholder {
1746
- color: #111111;
1747
- }
1748
- `,
1749
- value: date !== null && date !== void 0 ? date : ''
1750
- }));
1751
- };
1752
- DatePickerMonth.defaultProps = {
1753
- 'data-test-id': ''
1754
- };
1755
-
1756
- const MultiDateWrapper = /*#__PURE__*/styled(Box)`
1757
- display: flex;
1758
- align-items: center;
1759
- width: fit-content;
1760
- border: 1px solid;
1761
- box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);
1762
- border-radius: 4px;
1763
- border-color: ${({
1764
- isError
1765
- }) => isError ? 'var(--chakra-colors-danger-500)' : 'var(--chakra-colors-primary-500)'};
1766
- `;
1767
- const MultiDatePickerMonth = ({
1768
- onChange,
1769
- isError = false,
1770
- min = '2020-01-01',
1771
- max = '2020-12-31'
1772
- }) => {
1773
- const [date, setDate] = React__default.useState([null, null]);
1774
- return /*#__PURE__*/React__default.createElement(MultiDateWrapper, {
1775
- isError: isError
1776
- }, /*#__PURE__*/React__default.createElement(DatePickerMonth, {
1777
- "data-test-id": "CT_DatePickerMonth_StartDate",
1778
- onChange: val => {
1779
- onChange(val, date[1]);
1780
- setDate([val, date[1]]);
1781
- },
1782
- min: min,
1783
- max: max
1784
- }), /*#__PURE__*/React__default.createElement(Box, null, "-"), /*#__PURE__*/React__default.createElement(DatePickerMonth, {
1785
- "data-test-id": "CT_DatePickerMonth_EndDate",
1786
- onChange: val => {
1787
- onChange(date[0], val);
1788
- setDate([date[0], val]);
1789
- },
1790
- min: min,
1791
- max: max
1792
- }));
1793
- };
1794
- MultiDatePickerMonth.defaultProps = {
1795
- min: '2020-01-01',
1796
- max: '2020-12-31',
1797
- isError: false
1798
- };
1799
-
1800
- const InputAddonLeft = ({
1801
- children
1802
- }) => {
1803
- return /*#__PURE__*/React__default.createElement(InputLeftAddon, {
1804
- backgroundColor: "neutral.200",
1805
- px: 3,
1806
- py: 2.5,
1807
- style: {
1808
- border: 0,
1809
- marginInlineEnd: 0
1810
- }
1811
- }, children);
1812
- };
1813
- const InputAddonRight = ({
1814
- children
1815
- }) => {
1816
- return /*#__PURE__*/React__default.createElement(InputRightAddon, {
1817
- backgroundColor: "neutral.200",
1818
- px: 3,
1819
- py: 2.5,
1820
- style: {
1821
- border: 0,
1822
- marginInlineStart: 0
1823
- }
1824
- }, children);
1825
- };
1826
-
1827
- const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1828
- const {
1829
- value,
1830
- type,
1831
- addOnLeft,
1832
- addOnRight,
1833
- size,
1834
- isRequired,
1835
- label,
1836
- isError,
1837
- isSuccess,
1838
- isDisabled,
1839
- errorMessage,
1840
- leftHelperText,
1841
- rightHelperText,
1842
- withClear,
1843
- onClear,
1844
- isLoading,
1845
- ...inputProps
1846
- } = props;
1847
- const wrapperStyle = getWrapperStyle(props);
1848
- const [isShowPassword, setIsShowPassword] = useState(false);
1849
- const inputType = useMemo(() => {
1850
- return type === 'password' && isShowPassword ? 'text' : type;
1851
- }, [isShowPassword, type]);
1852
- const fontSize = useMemo(() => {
1853
- if (type === 'password') {
1854
- if (!isShowPassword && value) return 'text.xl';
1855
- }
1856
- return 'text.sm';
1857
- }, [isShowPassword, type, value]);
1858
- const iconColor = useMemo(() => {
1859
- return isDisabled ? 'black.low' : 'black.medium';
1860
- }, [isDisabled]);
1861
- return /*#__PURE__*/React__default.createElement(Field, {
1862
- label: label,
1863
- isSuccess: isSuccess,
1864
- isError: isError,
1865
- errorMessage: errorMessage,
1866
- leftHelperText: leftHelperText,
1867
- rightHelperText: rightHelperText,
1868
- isRequired: isRequired
1869
- }, /*#__PURE__*/React__default.createElement(Box, {
1870
- __css: wrapperStyle
1871
- }, /*#__PURE__*/React__default.createElement(InputGroup, {
1872
- size: size,
1873
- borderRadius: "sm",
1874
- backgroundColor: isDisabled ? 'neutral.300' : 'white.high',
1875
- cursor: isDisabled ? 'not-allowed' : 'default'
1876
- }, addOnLeft, /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
1877
- ref: ref,
1878
- type: inputType,
1879
- value: value,
1880
- isDisabled: isDisabled,
1881
- isSuccess: isSuccess
1882
- }, inputProps, {
1883
- fontSize: fontSize
1884
- })), (withClear || isLoading || type === 'password') && /*#__PURE__*/React__default.createElement(Box, {
1885
- "data-test-id": "CT_Component_ClearInput",
1886
- display: "flex",
1887
- alignItems: "center",
1888
- justifyContent: "center",
1889
- width: "16px",
1890
- mr: "10px"
1891
- }, withClear && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
1892
- display: "flex",
1893
- justifyContent: "center",
1894
- onClick: !isDisabled ? onClear : undefined,
1895
- cursor: isDisabled ? 'not-allowed' : 'pointer'
1896
- }, /*#__PURE__*/React__default.createElement(Close, {
1897
- size: 4,
1898
- color: iconColor
1899
- })), type === 'password' && !isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
1900
- "data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
1901
- onClick: () => {
1902
- if (!isDisabled) setIsShowPassword(true);
1903
- },
1904
- cursor: isDisabled ? 'not-allowed' : 'pointer',
1905
- display: "flex",
1906
- justifyContent: "center"
1907
- }, /*#__PURE__*/React__default.createElement(EyeOff, {
1908
- size: 4,
1909
- color: iconColor
1910
- })), type === 'password' && isShowPassword && !isLoading && /*#__PURE__*/React__default.createElement(Box, {
1911
- "data-test-id": "sfc2388bmeXBmdla45Ibk",
1912
- onClick: () => {
1913
- if (!isDisabled) setIsShowPassword(false);
1914
- },
1915
- cursor: isDisabled ? 'not-allowed' : 'pointer',
1916
- display: "flex",
1917
- justifyContent: "center"
1918
- }, /*#__PURE__*/React__default.createElement(Eye, {
1919
- size: 4,
1920
- color: iconColor
1921
- })), isLoading && /*#__PURE__*/React__default.createElement(Loader, {
1922
- size: "sm"
1923
- })), addOnRight)));
1924
- });
1925
- InputField.defaultProps = {
1926
- addOnLeft: undefined,
1927
- addOnRight: undefined,
1928
- withClear: undefined,
1929
- isLoading: undefined,
1930
- onClear: undefined
1931
- };
1932
-
1933
- const TextareaField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1934
- const {
1935
- value,
1936
- isLoading,
1937
- ...inputProps
1938
- } = props;
1939
- return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, inputProps), /*#__PURE__*/React__default.createElement(Box, {
1940
- position: "relative"
1941
- }, /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1942
- ref: ref,
1943
- value: value
1944
- }, inputProps)), isLoading && /*#__PURE__*/React__default.createElement(Box, {
1945
- zIndex: 999,
1946
- top: 2,
1947
- right: 2,
1948
- position: "absolute"
1949
- }, /*#__PURE__*/React__default.createElement(Loader, {
1950
- size: "sm"
1951
- }))));
1952
- });
1953
- TextareaField.defaultProps = {
1954
- isLoading: undefined
1955
- };
1956
-
1957
- const Logo = ({
1958
- url,
1959
- imageUrl,
1960
- height
1961
- }) => {
1962
- if (url) return /*#__PURE__*/React__default.createElement(Box, {
1963
- as: "a",
1964
- href: url,
1965
- cursor: "pointer",
1966
- target: "_self"
1967
- }, /*#__PURE__*/React__default.createElement(Image, {
1968
- w: "100%",
1969
- h: height !== null && height !== void 0 ? height : 9,
1970
- maxH: height !== null && height !== void 0 ? height : 9,
1971
- src: imageUrl,
1972
- alt: imageUrl
1973
- }));
1974
- return /*#__PURE__*/React__default.createElement(Image, {
1975
- w: "100%",
1976
- h: height !== null && height !== void 0 ? height : 9,
1977
- maxH: height !== null && height !== void 0 ? height : 9,
1978
- src: imageUrl,
1979
- alt: imageUrl
1980
- });
1981
- };
1982
- Logo.defaultProps = {
1983
- url: undefined,
1984
- height: undefined
1985
- };
1986
-
1987
- const Profile = ({
1988
- color,
1989
- brandColor,
1990
- data,
1991
- onLogout
1992
- }) => {
1993
- var _data$name;
1994
- const {
1995
- isOpen,
1996
- onToggle,
1997
- onClose
1998
- } = useDisclosure();
1999
- return /*#__PURE__*/createElement(Popover$1, {
2000
- placement: "bottom-end",
2001
- isOpen: isOpen,
2002
- onClose: onClose
2003
- }, /*#__PURE__*/createElement(Box, {
2004
- "data-test-id": "WE0UYbA93LOZy6S09IhDO",
2005
- as: "button",
2006
- cursor: 'pointer',
2007
- minW: 0,
2008
- _hover: {
2009
- textDecor: 'none'
2010
- },
2011
- m: 0,
2012
- onClick: onToggle,
2013
- color: color
2014
- }, /*#__PURE__*/createElement(HStack, null, /*#__PURE__*/createElement(VStack, {
2015
- alignItems: "flex-end",
2016
- spacing: 0,
2017
- ml: "2",
2018
- color: color
2019
- }, /*#__PURE__*/createElement(Text, {
2020
- textStyle: "text.xs",
2021
- mb: 1
2022
- }, data === null || data === void 0 ? void 0 : data.email), /*#__PURE__*/createElement(Flex, {
2023
- alignItems: "center"
2024
- }, (data === null || data === void 0 ? void 0 : data.userRole) && /*#__PURE__*/createElement(Text, {
2025
- textStyle: "text.xs"
2026
- }, (data === null || data === void 0 ? void 0 : data.userRole) || 'user'), /*#__PURE__*/createElement(Box, {
2027
- h: "3",
2028
- mx: "1",
2029
- borderLeft: "1px solid",
2030
- borderColor: "neutral.400"
2031
- }), typeof (data === null || data === void 0 ? void 0 : data.office) === 'object' ? /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Text, {
2032
- textStyle: "text.xs"
2033
- }, data.office[0]), data.office.length > 1 && /*#__PURE__*/createElement(Badge, {
2034
- ml: "1",
2035
- pill: true,
2036
- variant: "neutral-light"
2037
- }, data.office.length - 1, "+")) : /*#__PURE__*/createElement(Text, {
2038
- textStyle: "text.xs"
2039
- }, (data === null || data === void 0 ? void 0 : data.office) || 'office'))), /*#__PURE__*/createElement(PopoverTrigger, null, /*#__PURE__*/createElement(Avatar, {
2040
- size: "sm",
2041
- bg: brandColor,
2042
- color: "white",
2043
- name: (_data$name = data === null || data === void 0 ? void 0 : data.name) !== null && _data$name !== void 0 ? _data$name : data === null || data === void 0 ? void 0 : data.email
2044
- })))), /*#__PURE__*/createElement(PopoverContent, {
2045
- bg: useColorModeValue('white', 'mirage.900'),
2046
- maxW: 200
2047
- }, /*#__PURE__*/createElement(PopoverArrow, {
2048
- bg: useColorModeValue('white', 'mirage.900')
2049
- }), /*#__PURE__*/createElement(PopoverBody, {
2050
- p: 1
2051
- }, /*#__PURE__*/createElement(Flex, {
2052
- "data-test-id": "gA7F9pucPX_Q3_dkgXIYZ",
2053
- alignItems: "center",
2054
- px: 3,
2055
- py: 2,
2056
- borderRadius: "sm",
2057
- cursor: "pointer",
2058
- _hover: {
2059
- bg: useColorModeValue('primary.500', 'mirage.900'),
2060
- color: 'white'
2061
- },
2062
- onClick: onLogout,
2063
- textStyle: "text.xs"
2064
- }, /*#__PURE__*/createElement(FiPower, null), /*#__PURE__*/createElement(Text, {
2065
- ml: 2
2066
- }, "Logout")))));
2067
- };
2068
- Profile.defaultProps = {
2069
- brandColor: 'primary.500',
2070
- data: undefined,
2071
- onLogout: undefined,
2072
- color: undefined
2073
- };
2074
-
2075
- const SwitchMode = () => {
2076
- const {
2077
- colorMode,
2078
- toggleColorMode
2079
- } = useColorMode$1();
2080
- return /*#__PURE__*/createElement(Box, {
2081
- "data-test-id": "rhYuTDCiWkFqr96upiEEh",
2082
- mx: 5,
2083
- onClick: toggleColorMode,
2084
- cursor: "pointer"
2085
- }, colorMode === 'light' ? /*#__PURE__*/createElement(FiMoon, {
2086
- size: 20
2087
- }) : /*#__PURE__*/createElement(FiSun, {
2088
- size: 20
2089
- }));
2090
- };
2091
-
2092
- // eslint-disable-next-line import/prefer-default-export
2093
- function environmentName(env) {
2094
- switch (env) {
2095
- case 'DEVELOPMENT':
2096
- return 'Dev';
2097
- case 'STAGING':
2098
- return 'Staging';
2099
- default:
2100
- return null;
2101
- }
2102
- }
2103
-
2104
- /* eslint-disable react-hooks/rules-of-hooks */
2105
- const Version = ({
2106
- hideEnv,
2107
- version,
2108
- environment,
2109
- onOpenModalRelease
2110
- }) => /*#__PURE__*/createElement(Fragment, null, version && /*#__PURE__*/createElement(Badge, {
2111
- "data-test-id": "dzl3esjhCphobaaIXpiUE",
2112
- variant: "neutral-light",
2113
- onClick: onOpenModalRelease,
2114
- cursor: onOpenModalRelease ? 'pointer' : 'auto'
2115
- }, version), !hideEnv && environmentName(environment) !== null && version && /*#__PURE__*/createElement(Box, {
2116
- background: "primary.50",
2117
- color: "primary.500",
2118
- fontSize: "text.xs",
2119
- py: 1,
2120
- px: 2.5,
2121
- fontWeight: "bold",
2122
- borderRadius: "md"
2123
- }, environmentName(environment)));
2124
- Version.defaultProps = {
2125
- hideEnv: false,
2126
- environment: undefined,
2127
- version: undefined,
2128
- onOpenModalRelease: undefined
2129
- };
2130
-
2131
- const Header = ({
2132
- brandColor,
2133
- data,
2134
- onLogout,
2135
- onOpenModalRelease,
2136
- hideSwitchMode,
2137
- mainLogo,
2138
- centerLogo,
2139
- mainLogoSize,
2140
- centerLogoSize = 4,
2141
- hideEnv = false,
2142
- urlLogo,
2143
- children,
2144
- profile,
2145
- ...props
2146
- }) => /*#__PURE__*/createElement(Flex, Object.assign({
2147
- minH: 15,
2148
- bg: props.bg,
2149
- bgColor: props.bgColor,
2150
- shadow: "raised",
2151
- px: 6,
2152
- py: 3,
2153
- alignItems: "center"
2154
- }, props), /*#__PURE__*/createElement(Flex, {
2155
- h: "auto",
2156
- w: "full",
2157
- alignItems: "center",
2158
- justifyContent: profile ? 'flex-end' : 'space-between',
2159
- pos: "relative"
2160
- }, mainLogo && /*#__PURE__*/createElement(Flex, {
2161
- alignItems: "center"
2162
- }, /*#__PURE__*/createElement(Logo, {
2163
- url: urlLogo,
2164
- imageUrl: mainLogo,
2165
- height: mainLogoSize
2166
- }), children && children), centerLogo && /*#__PURE__*/createElement(HStack, {
2167
- w: "fit-content",
2168
- spacing: 2,
2169
- alignItems: "center",
2170
- pos: "absolute",
2171
- left: "50%",
2172
- transform: "translate(-50%,0)"
2173
- }, /*#__PURE__*/createElement(Logo, {
2174
- url: urlLogo,
2175
- imageUrl: centerLogo,
2176
- height: centerLogoSize
2177
- }), /*#__PURE__*/createElement(Version, {
2178
- hideEnv: hideEnv,
2179
- version: data === null || data === void 0 ? void 0 : data.version,
2180
- environment: data === null || data === void 0 ? void 0 : data.environment,
2181
- onOpenModalRelease: onOpenModalRelease
2182
- })), profile || /*#__PURE__*/createElement(Flex, {
2183
- alignItems: "center"
2184
- }, !hideSwitchMode && /*#__PURE__*/createElement(SwitchMode, null), /*#__PURE__*/createElement(Profile, {
2185
- color: props.color,
2186
- brandColor: brandColor,
2187
- data: data,
2188
- onLogout: onLogout
2189
- }))));
2190
- Header.defaultProps = {
2191
- brandColor: undefined,
2192
- data: undefined,
2193
- onLogout: undefined,
2194
- onOpenModalRelease: undefined,
2195
- hideSwitchMode: true,
2196
- mainLogo: undefined,
2197
- mainLogoSize: undefined,
2198
- centerLogo: undefined,
2199
- centerLogoSize: undefined,
2200
- hideEnv: false,
2201
- urlLogo: undefined,
2202
- profile: undefined
2203
- };
2204
-
2205
- const ModalBody = /*#__PURE__*/React__default.forwardRef(({
2206
- children,
2207
- ...rest
2208
- }, ref) => {
2209
- return /*#__PURE__*/React__default.createElement(ModalBody$1, Object.assign({
2210
- ref: ref,
2211
- background: useColorModeValue('white', 'mirage.900')
2212
- }, rest), children);
2213
- });
2214
-
2215
- const ModalCloseButton = /*#__PURE__*/forwardRef$2((props, ref) => {
2216
- return /*#__PURE__*/React__default.createElement(ModalCloseButton$1, Object.assign({
2217
- ref: ref,
2218
- top: 4,
2219
- right: 4,
2220
- size: "sm",
2221
- background: useColorModeValue('neutral.50', 'mirage.900')
2222
- }, props));
2223
- });
2224
-
2225
- const ModalFooter = /*#__PURE__*/forwardRef$2(({
2226
- children,
2227
- ...rest
2228
- }, ref) => {
2229
- return /*#__PURE__*/React__default.createElement(ModalFooter$1, Object.assign({
2230
- ref: ref,
2231
- background: useColorModeValue('neutral.200', 'mirage.900'),
2232
- borderBottomRadius: "sm"
2233
- }, rest), children);
2234
- });
2235
-
2236
- const ModalHeader = /*#__PURE__*/forwardRef$2(({
2237
- children,
2238
- ...rest
2239
- }, ref) => {
2240
- return /*#__PURE__*/React__default.createElement(ModalHeader$1, Object.assign({
2241
- ref: ref,
2242
- background: useColorModeValue('neutral.200', 'mirage.900'),
2243
- borderTopRadius: "sm",
2244
- textStyle: "text-lg"
2245
- }, rest), children);
2246
- });
2247
-
2248
- const CustomerIcon = /*#__PURE__*/createIcon({
2249
- displayName: 'CustomerIcon',
2250
- viewBox: '0 0 16 16',
2251
- path: [/*#__PURE__*/React__default.createElement("path", {
2252
- fill: "currentColor",
2253
- fillRule: "inherit",
2254
- d: "M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM.667 8a7.333 7.333 0 1 1 14.666 0A7.333 7.333 0 0 1 .667 8Z",
2255
- clipRule: "inherit"
2256
- }), /*#__PURE__*/React__default.createElement("path", {
2257
- fill: "currentColor",
2258
- d: "M12.416 12.698a1.997 1.997 0 0 0-1.75-1.031H5.334a2 2 0 0 0-1.864 1.277 7.722 7.722 0 0 1-.943-1.074 3.329 3.329 0 0 1 2.807-1.537h5.334a3.333 3.333 0 0 1 2.703 1.384c-.275.325-.594.66-.954.98Z"
2259
- }), /*#__PURE__*/React__default.createElement("path", {
2260
- fill: "currentColor",
2261
- fillRule: "inherit",
2262
- d: "M8 5.333A1.333 1.333 0 1 0 8 8a1.333 1.333 0 0 0 0-2.667ZM5.333 6.667a2.667 2.667 0 1 1 5.334 0 2.667 2.667 0 0 1-5.334 0Z",
2263
- clipRule: "inherit"
2264
- })]
2265
- });
2266
-
2267
- /* eslint-disable import/prefer-default-export */
2268
- const mappingIcon = /*#__PURE__*/new Map([['Order', FiShoppingBag], ['Fulfillment', FiShoppingCart], ['Transfer Stock', FiRepeat], ['Stock', FiBox], ['Product Database', FiLayers], ['Purchasing', FiDollarSign], ['Reseller', FiUsers], ['Retur', FiRotateCcw], ['Other', FiSettings], ['Content', FiLayout], ['Voucher', FiGift], ['Customer', CustomerIcon]]);
2269
-
2270
- /* eslint-disable react-hooks/rules-of-hooks */
2271
- const Navigation = ({
2272
- navigations,
2273
- activePath,
2274
- as,
2275
- host,
2276
- ...props
2277
- }) => {
2278
- return /*#__PURE__*/createElement(Box, Object.assign({
2279
- bg: useColorModeValue('white', 'ebony-clay.800'),
2280
- boxShadow: "0 4px 20px 0 rgb(0 0 0 / 5%)",
2281
- borderRadius: "md",
2282
- overflowX: "auto"
2283
- }, props), /*#__PURE__*/createElement(Flex, {
2284
- alignItems: "center",
2285
- p: 2
2286
- }, /*#__PURE__*/createElement(HStack, {
2287
- spacing: 2
2288
- }, navigations === null || navigations === void 0 ? void 0 : navigations.map(navigation => {
2289
- const isActive = activePath.startsWith(navigation.navLink || '');
2290
- const activeBg = isActive ? 'primary.500' : undefined;
2291
- return /*#__PURE__*/createElement(Popover$1, {
2292
- key: navigation.title,
2293
- trigger: "hover",
2294
- placement: "bottom-start"
2295
- }, ({
2296
- isOpen
2297
- }) => /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(PopoverTrigger, null, /*#__PURE__*/createElement(Box, {
2298
- display: "flex",
2299
- alignItems: "center",
2300
- borderRadius: "md",
2301
- cursor: "pointer",
2302
- _hover: {
2303
- backgroundColor: !isActive ? useColorModeValue('dove-gray.50', 'transparent') : activeBg
2304
- },
2305
- backgroundColor: isOpen && !isActive ? useColorModeValue('dove-gray.50', 'transparent') : activeBg,
2306
- color: isActive ? 'white' : 'inherit',
2307
- p: 2
2308
- }, /*#__PURE__*/createElement(Icon, {
2309
- as: mappingIcon.get(navigation.title),
2310
- mr: 2
2311
- }), /*#__PURE__*/createElement(Text, {
2312
- whiteSpace: "nowrap",
2313
- fontSize: "text.sm",
2314
- fontWeight: 400
2315
- }, navigation.title), /*#__PURE__*/createElement(ChevronDownIcon, {
2316
- ml: 2
2317
- }))), navigation.children && /*#__PURE__*/createElement(Portal, null, /*#__PURE__*/createElement(Box, {
2318
- zIndex: "popover"
2319
- }, /*#__PURE__*/createElement(PopoverContent, {
2320
- key: navigation.title,
2321
- bg: useColorModeValue('white', 'ebony-clay.800'),
2322
- maxW: 250,
2323
- border: "none",
2324
- borderRadius: "md",
2325
- boxShadow: "0 5px 25px rgb(0 0 0 / 10%)"
2326
- }, navigation.children.map(({
2327
- title,
2328
- navHost,
2329
- navLink
2330
- }) => {
2331
- const link = navHost ? `${navHost}${navLink}` : navLink;
2332
- const isLocalLink = host === navHost;
2333
- const isActiveSub = activePath === navLink;
2334
- return /*#__PURE__*/createElement(Link, {
2335
- as: isLocalLink ? as : undefined,
2336
- key: title,
2337
- href: link,
2338
- _hover: {
2339
- textDecoration: 'none'
2340
- }
2341
- }, /*#__PURE__*/createElement(Box, {
2342
- display: "flex",
2343
- position: "relative",
2344
- alignItems: "center",
2345
- cursor: "pointer",
2346
- transition: "padding 0.35s ease 0s",
2347
- _hover: {
2348
- backgroundColor: useColorModeValue('dove-gray.50', 'mirage.900'),
2349
- color: useColorModeValue('primary.500', 'dove-gray.600'),
2350
- px: 5,
2351
- py: 4,
2352
- _first: {
2353
- borderTopRadius: 'md'
2354
- },
2355
- _last: {
2356
- borderBottomRadius: 'md'
2357
- }
2358
- },
2359
- color: isActiveSub ? 'primary.500' : 'inherit',
2360
- css: css`
2361
- border-spacing: 4px;
2362
- `,
2363
- px: 6,
2364
- py: 4
2365
- }, /*#__PURE__*/createElement(Icon, {
2366
- as: mappingIcon.get(navigation.title),
2367
- mr: 3
2368
- }), /*#__PURE__*/createElement(Text, {
2369
- fontSize: "text.sm"
2370
- }, title), isActiveSub && /*#__PURE__*/createElement(Box, {
2371
- width: 0.5,
2372
- height: 8,
2373
- position: "absolute",
2374
- bg: "primary.500",
2375
- right: 0,
2376
- zIndex: "popover"
2377
- })));
2378
- }))))));
2379
- }))));
2380
- };
2381
- Navigation.defaultProps = {
2382
- navigations: undefined,
2383
- as: 'a',
2384
- host: undefined
2385
- };
2386
-
2387
- const NavigationBar = ({
2388
- navigations,
2389
- isFetched,
2390
- pathname,
2391
- asPath,
2392
- mappingIcon,
2393
- ...props
2394
- }) => {
2395
- const urlMenu = subMenu => {
2396
- if (window.location.hostname === 'localhost') {
2397
- return subMenu.navLink;
2398
- }
2399
- return subMenu.navHost + subMenu.navLink;
2400
- };
2401
- return /*#__PURE__*/React__default.createElement(Box, Object.assign({
2402
- hidden: isFetched && navigations === undefined,
2403
- backgroundRepeat: "repeat-x",
2404
- "data-test-id": "CT_component_navigation_cms"
2405
- }, props), /*#__PURE__*/React__default.createElement(Flex, {
2406
- bg: "white",
2407
- w: "full",
2408
- rounded: 'md',
2409
- flexWrap: "wrap",
2410
- alignItems: "center",
2411
- shadow: "raised",
2412
- gap: 1,
2413
- px: 4,
2414
- py: 2
2415
- }, navigations === null || navigations === void 0 ? void 0 : navigations.map(item => {
2416
- var _childMenu$;
2417
- const childMenu = item.children.filter(subMenu => asPath === null || asPath === void 0 ? void 0 : asPath.includes(subMenu.navLink));
2418
- const isActive = pathname === null || pathname === void 0 ? void 0 : pathname.startsWith((_childMenu$ = childMenu[0]) === null || _childMenu$ === void 0 ? void 0 : _childMenu$.navLink);
2419
- const activeBg = isActive ? 'primary.500' : undefined;
2420
- return /*#__PURE__*/React__default.createElement(Popover$1, {
2421
- isLazy: true,
2422
- key: item.id,
2423
- trigger: "hover",
2424
- placement: "bottom-start",
2425
- openDelay: 100,
2426
- closeDelay: 100
2427
- }, ({
2428
- isOpen,
2429
- onClose
2430
- }) => /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(PopoverTrigger, null, /*#__PURE__*/React__default.createElement(Button$2, {
2431
- h: 7.5,
2432
- p: 2,
2433
- size: "sm",
2434
- variant: "ghost",
2435
- "data-test-id": `CT_component_navigation_button-${item.title}${isActive ? '-active' : ''}`,
2436
- _hover: {
2437
- backgroundColor: !isActive ? 'neutral.400' : activeBg
2438
- },
2439
- backgroundColor: isOpen && !isActive ? 'neutral.400' : activeBg,
2440
- color: isActive ? 'primary.50' : 'black.high',
2441
- leftIcon: mappingIcon.get(item.title),
2442
- rightIcon: /*#__PURE__*/React__default.createElement(ChevronDown, {
2443
- size: 4,
2444
- color: "inherit"
2445
- })
2446
- }, item.title)), item.children && /*#__PURE__*/React__default.createElement(PopoverContent, {
2447
- border: "none",
2448
- shadow: "raised",
2449
- py: 1,
2450
- width: 240
2451
- }, item.children.map(subMenu => /*#__PURE__*/React__default.createElement(Link, {
2452
- key: subMenu.id,
2453
- href: urlMenu(subMenu),
2454
- display: "flex",
2455
- alignItems: "center",
2456
- transition: "padding 0.35s ease 0s",
2457
- _hover: {
2458
- pl: 6
2459
- },
2460
- _first: {
2461
- borderTopRadius: 'md'
2462
- },
2463
- _last: {
2464
- borderBottomRadius: 'md'
2465
- },
2466
- py: 3,
2467
- px: 4,
2468
- color: pathname !== null && pathname !== void 0 && pathname.startsWith(subMenu.navLink) ? 'primary.800' : 'black.high',
2469
- onClick: onClose,
2470
- background: pathname !== null && pathname !== void 0 && pathname.startsWith(subMenu.navLink) ? 'primary.50' : 'transparent',
2471
- "data-test-id": `CT_component_navigation_link-${item.id}`
2472
- }, mappingIcon.get(item.title), /*#__PURE__*/React__default.createElement(Text, {
2473
- textStyle: "text-sm",
2474
- ml: 3
2475
- }, subMenu.title))))));
2476
- })));
2477
- };
2478
- NavigationBar.defaultProps = {
2479
- navigations: undefined
2480
- };
2481
-
2482
- const PaginationButton = /*#__PURE__*/forwardRef$1(({
2483
- className,
2484
- style,
2485
- isActive,
2486
- children,
2487
- ...rest
2488
- }, ref) => {
2489
- const btnBg = useColorModeValue('neutral.300', 'mirage.900');
2490
- const btnColor = useColorModeValue('black.high', 'primary.300');
2491
- const btnNotActiveBg = useColorModeValue('secondary.50', 'primary.500');
2492
- const btnNotActiveColor = useColorModeValue('primary.500', 'white');
2493
- return /*#__PURE__*/React__default.createElement(Button$2, Object.assign({
2494
- "data-test-id": "Pagination-Button",
2495
- ref: ref,
2496
- className: className,
2497
- style: style,
2498
- borderRadius: "full",
2499
- fontWeight: "semibold",
2500
- m: 0,
2501
- px: 3,
2502
- py: 2,
2503
- h: 8,
2504
- minW: "auto",
2505
- width: 8,
2506
- background: isActive ? 'primary.500' : btnBg,
2507
- color: isActive ? 'white' : btnColor,
2508
- _hover: !isActive ? {
2509
- background: btnNotActiveBg,
2510
- color: btnNotActiveColor
2511
- } : {},
2512
- _disabled: {
2513
- background: useColorModeValue('neutral.300', 'mirage.900'),
2514
- color: 'neutral.600',
2515
- pointerEvents: 'none'
2516
- }
2517
- }, rest), children);
2518
- });
2519
- PaginationButton.displayName = 'PaginationButton';
2520
- PaginationButton.defaultProps = {
2521
- isActive: undefined
2522
- };
2523
-
2524
- const PaginationButtonTrigger = ({
2525
- color,
2526
- isDisabled,
2527
- onClick,
2528
- visuallyHidden,
2529
- icon
2530
- }) => /*#__PURE__*/createElement(PaginationButton, {
2531
- "data-test-id": "DLVCc_fBK35spHm5WxjcJ",
2532
- color: color,
2533
- isDisabled: isDisabled,
2534
- onClick: onClick
2535
- }, /*#__PURE__*/createElement(VisuallyHidden, null, visuallyHidden), icon);
2536
- PaginationButtonTrigger.defaultProps = {
2537
- color: undefined,
2538
- isDisabled: undefined,
2539
- onClick: undefined,
2540
- visuallyHidden: undefined,
2541
- icon: undefined
2542
- };
2543
-
2544
- const Pagination = ({
2545
- className,
2546
- current,
2547
- total,
2548
- onSelect
2549
- }) => {
2550
- const btnColorDisabled = useColorModeValue('secondary.100', 'primary.500');
2551
- const btnColor = useColorModeValue('primary.500', 'secondary.100');
2552
- const disabledPrevious = current === 1;
2553
- const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
2554
- const disabledNext = current === total;
2555
- const nextButtonColor = disabledNext ? btnColorDisabled : btnColor;
2556
- const handleSelectPage = page => {
2557
- if (onSelect) {
2558
- onSelect(page);
2559
- }
2560
- };
2561
- const generatePages = () => {
2562
- const maxButtons = 5;
2563
- const pageButtons = [];
2564
- let startPage;
2565
- let endPage;
2566
- if ( maxButtons < total) {
2567
- startPage = Math.max(Math.min(current - Math.floor(maxButtons / 2), total - maxButtons + 1), 1);
2568
- endPage = startPage + maxButtons - 1;
2569
- } else {
2570
- startPage = 1;
2571
- endPage = total;
2572
- }
2573
- // eslint-disable-next-line no-plusplus
2574
- for (let page = startPage; page <= endPage; ++page) {
2575
- pageButtons.push(page);
2576
- }
2577
- return pageButtons;
2578
- };
2579
- return /*#__PURE__*/createElement(Box, {
2580
- className: className,
2581
- display: "inline-flex",
2582
- alignItems: "center"
2583
- }, /*#__PURE__*/createElement(Box, {
2584
- mr: 1
2585
- }, /*#__PURE__*/createElement(PaginationButtonTrigger, {
2586
- "data-test-id": "Pagination-Button",
2587
- color: previousButtonColor,
2588
- isDisabled: disabledPrevious,
2589
- onClick: () => handleSelectPage(1),
2590
- visuallyHidden: "First Page",
2591
- icon: /*#__PURE__*/createElement(ArrowLeftIcon, {
2592
- width: 2
2593
- })
2594
- })), /*#__PURE__*/createElement(Box, {
2595
- bg: "neutral.300",
2596
- borderRadius: "full"
2597
- }, /*#__PURE__*/createElement(PaginationButtonTrigger, {
2598
- "data-test-id": "Pagination-Button",
2599
- color: previousButtonColor,
2600
- isDisabled: disabledPrevious,
2601
- onClick: () => handleSelectPage(current - 1),
2602
- visuallyHidden: "Previous Page",
2603
- icon: /*#__PURE__*/createElement(ChevronLeftIcon, null)
2604
- }), generatePages().map(page => {
2605
- return /*#__PURE__*/createElement(PaginationButton, {
2606
- "data-test-id": "Pagination-Button",
2607
- key: page,
2608
- isActive: page === current,
2609
- onClick: () => typeof page === 'number' ? handleSelectPage(page) : null
2610
- }, /*#__PURE__*/createElement(Text, {
2611
- scale: 300,
2612
- fontSize: "text.sm",
2613
- lineHeight: 18,
2614
- fontWeight: 500
2615
- }, page));
2616
- }), /*#__PURE__*/createElement(PaginationButtonTrigger, {
2617
- "data-test-id": "Pagination-Button",
2618
- color: nextButtonColor,
2619
- isDisabled: disabledNext,
2620
- onClick: () => handleSelectPage(current + 1),
2621
- visuallyHidden: "Next Page",
2622
- icon: /*#__PURE__*/createElement(ChevronRightIcon, null)
2623
- })), /*#__PURE__*/createElement(Box, {
2624
- ml: 1
2625
- }, /*#__PURE__*/createElement(PaginationButtonTrigger, {
2626
- "data-test-id": "Pagination-Button",
2627
- color: nextButtonColor,
2628
- isDisabled: disabledNext,
2629
- onClick: () => handleSelectPage(total),
2630
- visuallyHidden: "Last Page",
2631
- icon: /*#__PURE__*/createElement(ArrowRightIcon, {
2632
- width: 2
2633
- })
2634
- })));
2635
- };
2636
- Pagination.defaultProps = {
2637
- className: undefined,
2638
- onSelect: undefined
2639
- };
2640
- Pagination.displayName = 'Pagination';
2641
-
2642
- const PaginationDetail = ({
2643
- page,
2644
- limit,
2645
- length,
2646
- scale = 300,
2647
- fontSize = 'xs',
2648
- lineHeight = 18,
2649
- ...rest
2650
- }) => {
2651
- return /*#__PURE__*/createElement(Text, Object.assign({
2652
- scale: scale,
2653
- fontSize: fontSize,
2654
- lineHeight: lineHeight
2655
- }, rest), `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item`);
2656
- };
2657
-
2658
- const PaginationFilter = ({
2659
- limit,
2660
- label = 'Baris per halaman:',
2661
- items,
2662
- onChange,
2663
- ...rest
2664
- }) => {
2665
- const [value, setValue] = useState(limit);
2666
- return /*#__PURE__*/createElement(Box, {
2667
- display: "flex",
2668
- flexDirection: "row",
2669
- alignItems: "center"
2670
- }, /*#__PURE__*/createElement(Text, Object.assign({
2671
- fontSize: "text.sm",
2672
- lineHeight: 18,
2673
- color: useColorModeValue('neutral.900', 'white')
2674
- }, rest), label), /*#__PURE__*/createElement(Select$1, {
2675
- textAlign: "center",
2676
- size: "xs",
2677
- outline: "none",
2678
- border: "none",
2679
- boxShadow: "none",
2680
- width: 18,
2681
- icon: /*#__PURE__*/createElement(FiChevronDown, null),
2682
- _focusVisible: {
2683
- boxShadow: 'none'
2684
- },
2685
- onChange: e => {
2686
- const numberValue = Number(e.target.value);
2687
- onChange(numberValue);
2688
- setValue(numberValue);
2689
- },
2690
- value: value
2691
- }, items.map(item => {
2692
- return /*#__PURE__*/createElement("option", {
2693
- key: item,
2694
- value: item
2695
- }, item);
2696
- })));
2697
- };
2698
- PaginationFilter.defaultProps = {
2699
- limit: 10,
2700
- label: undefined
2701
- };
2702
-
2703
- function RadioComponent({
2704
- isError = false,
2705
- helpText = '',
2706
- errorText = '',
2707
- children,
2708
- isDisabled,
2709
- ...rest
2710
- }) {
2711
- const variant = isError ? 'errors' : 'unstyled';
2712
- return /*#__PURE__*/React__default.createElement(Box, null, /*#__PURE__*/React__default.createElement(Box, {
2713
- display: "flex"
2714
- }, /*#__PURE__*/React__default.createElement(Radio$1, Object.assign({
2715
- variant: variant
2716
- }, rest, {
2717
- isDisabled: isDisabled
2718
- }), children && /*#__PURE__*/React__default.createElement(Text, {
2719
- as: "span",
2720
- display: "block",
2721
- textStyle: "text.sm",
2722
- color: isDisabled ? 'black.medium' : 'black.high'
2723
- }, children))), /*#__PURE__*/React__default.createElement(Box, {
2724
- mt: "5px",
2725
- ml: "24px"
2726
- }, isError ? /*#__PURE__*/React__default.createElement(Text, {
2727
- as: "span",
2728
- display: "block",
2729
- textStyle: "text.xs",
2730
- color: "danger.500"
2731
- }, errorText) : /*#__PURE__*/React__default.createElement(Text, {
2732
- as: "span",
2733
- display: "block",
2734
- textStyle: "text.xs",
2735
- color: "black.medium"
2736
- }, helpText)));
2737
- }
2738
- RadioComponent.defaultProps = {
2739
- isError: false,
2740
- helpText: '',
2741
- errorText: ''
2742
- };
2743
-
2744
- function RadioGroupComponent(props) {
2745
- const {
2746
- children,
2747
- label,
2748
- helpText,
2749
- isError,
2750
- errorMessage,
2751
- ...rest
2752
- } = props;
2753
- return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, rest, {
2754
- label: label,
2755
- leftHelperText: helpText,
2756
- isError: isError,
2757
- errorMessage: errorMessage
2758
- }), /*#__PURE__*/React__default.createElement(Box, {
2759
- mt: "12px"
2760
- }, /*#__PURE__*/React__default.createElement(RadioGroup, Object.assign({}, rest), /*#__PURE__*/React__default.createElement(Stack, {
2761
- spacing: [1, '16px'],
2762
- direction: ['column', 'row']
2763
- }, children))));
2764
- }
2765
- RadioGroupComponent.defaultProps = {
2766
- helpText: '',
2767
- isError: false,
2768
- errorMessage: ''
2769
- };
2770
-
2771
- const Rating = ({
2772
- value
2773
- }) => {
2774
- return /*#__PURE__*/React__default.createElement(Grid, {
2775
- gap: '4px',
2776
- display: "flex"
2777
- }, [...Array(5)].map((_, i) => /*#__PURE__*/React__default.createElement(Rating$1, {
2778
- color: i < value ? '#FFA230' : '#E0E0E0',
2779
- size: 24
2780
- })));
2781
- };
2782
-
2783
- const SelectWrapper = ({
2784
- children
2785
- }) => {
2786
- return /*#__PURE__*/React__default.createElement(Box, null, children);
2787
- };
2788
- SelectWrapper.defaultProps = {
2789
- isError: false
2790
- };
2791
-
2792
- const fontWeights = {
2793
- hairline: 100,
2794
- thin: 200,
2795
- light: 300,
2796
- normal: 400,
2797
- medium: 500,
2798
- semibold: 600,
2799
- bold: 700,
2800
- extrabold: 800,
2801
- black: 900
2802
- };
2803
- const lineHeights = {
2804
- normal: 'normal',
2805
- none: 1,
2806
- shorter: 1.25,
2807
- short: 1.375,
2808
- base: 1.5,
2809
- tall: 1.625,
2810
- 64: '4rem',
2811
- 56: '3.5rem',
2812
- 48: '3rem',
2813
- 40: '2.5rem',
2814
- 36: '2.25rem',
2815
- 34: '2.125rem',
2816
- 32: '2rem',
2817
- 30: '1.875rem',
2818
- 28: '1.75',
2819
- 26: '1.625rem',
2820
- 24: '1.5rem',
2821
- 22: '1.375rem',
2822
- 20: '1.25rem',
2823
- 18: '1.125rem',
2824
- 16: '1rem',
2825
- 14: '0.875rem',
2826
- 12: '0.75rem'
2827
- };
2828
- const letterSpacings = {
2829
- tighter: '-0.05em',
2830
- tight: '-0.025em',
2831
- normal: '0',
2832
- wide: '0.025em',
2833
- wider: '0.05em',
2834
- widest: '0.1em'
2835
- };
2836
- const fontSizes = {
2837
- heading: {
2838
- 1: '2.5rem',
2839
- 2: '2rem',
2840
- 3: '1.75rem',
2841
- 4: '1.5rem',
2842
- 5: '1.375rem',
2843
- 6: '1.125rem'
2844
- },
2845
- text: {
2846
- xl: '1.125rem',
2847
- lg: '1rem',
2848
- md: '0.875rem',
2849
- sm: '0.75rem',
2850
- xs: '0.625rem'
2851
- },
2852
- button: {
2853
- lg: '1.125rem',
2854
- md: '0.875rem',
2855
- sm: '0.625rem'
2856
- },
2857
- field: {
2858
- lg: '1rem',
2859
- md: '0.875rem',
2860
- sm: '0.75rem'
2861
- },
2862
- table: {
2863
- header: '0.75rem'
2864
- }
2865
- };
2866
- const heading = {
2867
- 1: {
2868
- fontSize: fontSizes.heading[1],
2869
- fontWeight: fontWeights.semibold,
2870
- lineHeight: lineHeights[64],
2871
- letterSpacing: letterSpacings.normal
2872
- },
2873
- 2: {
2874
- fontSize: fontSizes.heading[2],
2875
- fontWeight: fontWeights.semibold,
2876
- lineHeight: lineHeights[56],
2877
- letterSpacing: letterSpacings.normal
2878
- },
2879
- 3: {
2880
- fontSize: fontSizes.heading[3],
2881
- fontWeight: fontWeights.semibold,
2882
- lineHeight: lineHeights[48],
2883
- letterSpacing: letterSpacings.normal
2884
- },
2885
- 4: {
2886
- fontSize: fontSizes.heading[4],
2887
- fontWeight: fontWeights.semibold,
2888
- lineHeight: lineHeights[40],
2889
- letterSpacing: letterSpacings.normal
2890
- },
2891
- 5: {
2892
- fontSize: fontSizes.heading[5],
2893
- fontWeight: fontWeights.semibold,
2894
- lineHeight: lineHeights[36],
2895
- letterSpacing: letterSpacings.normal
2896
- },
2897
- 6: {
2898
- fontSize: fontSizes.heading[6],
2899
- fontWeight: fontWeights.semibold,
2900
- lineHeight: lineHeights[32],
2901
- letterSpacing: letterSpacings.normal
2902
- }
2903
- };
2904
- const text = {
2905
- xl: {
2906
- fontSize: fontSizes.text.xl,
2907
- fontWeight: fontWeights.normal,
2908
- lineHeight: lineHeights[28],
2909
- letterSpacing: letterSpacings.normal
2910
- },
2911
- lg: {
2912
- fontSize: fontSizes.text.lg,
2913
- fontWeight: fontWeights.normal,
2914
- lineHeight: lineHeights[24],
2915
- letterSpacing: letterSpacings.normal
2916
- },
2917
- md: {
2918
- fontSize: fontSizes.text.md,
2919
- fontWeight: fontWeights.normal,
2920
- lineHeight: lineHeights[22],
2921
- letterSpacing: letterSpacings.normal
2922
- },
2923
- sm: {
2924
- fontSize: fontSizes.text.sm,
2925
- fontWeight: fontWeights.normal,
2926
- lineHeight: lineHeights[18],
2927
- letterSpacing: letterSpacings.normal
2928
- },
2929
- xs: {
2930
- fontSize: fontSizes.text.xs,
2931
- fontWeight: fontWeights.normal,
2932
- lineHeight: lineHeights[14],
2933
- letterSpacing: letterSpacings.normal
2934
- }
2935
- };
2936
- const button = {
2937
- lg: {
2938
- fontSize: fontSizes.button.lg,
2939
- lineHeight: lineHeights[28],
2940
- letterSpacing: letterSpacings.normal,
2941
- fontWeight: fontWeights.normal
2942
- },
2943
- md: {
2944
- fontSize: fontSizes.button.md,
2945
- lineHeight: lineHeights[22],
2946
- letterSpacing: letterSpacings.normal,
2947
- fontWeight: fontWeights.normal
2948
- },
2949
- sm: {
2950
- fontSize: fontSizes.button.sm,
2951
- lineHeight: lineHeights[14],
2952
- letterSpacing: letterSpacings.normal,
2953
- fontWeight: fontWeights.normal
2954
- }
2955
- };
2956
- const field = {
2957
- lg: {
2958
- fontSize: fontSizes.field.lg,
2959
- lineHeight: lineHeights[24],
2960
- letterSpacing: letterSpacings.normal,
2961
- fontWeight: fontWeights.normal
2962
- },
2963
- md: {
2964
- fontSize: fontSizes.field.md,
2965
- lineHeight: lineHeights[22],
2966
- letterSpacing: letterSpacings.normal,
2967
- fontWeight: fontWeights.normal
2968
- },
2969
- sm: {
2970
- fontSize: fontSizes.field.sm,
2971
- lineHeight: lineHeights[18],
2972
- letterSpacing: letterSpacings.normal,
2973
- fontWeight: fontWeights.normal
2974
- }
2975
- };
2976
- const textStyles = {
2977
- heading,
2978
- text,
2979
- button,
2980
- field
2981
- };
2982
-
2983
- const styleMd = textStyles.text.sm;
2984
- const selectStyle = {
2985
- fontSize: styleMd.fontSize,
2986
- lineHeight: styleMd.lineHeight,
2987
- letterSpacing: 0
2988
- };
2989
- const boxShadow = color => `0 0 0 1px ${color}`;
2990
- function selectStyles(colorMode, _isError) {
2991
- const boxShadowLight = (isFocused = false, isError = false) => {
2992
- if (isError && isFocused || isError) {
2993
- return boxShadow('danger.500');
2994
- }
2995
- if (isFocused) {
2996
- return boxShadow('primary.500');
2997
- }
2998
- return boxShadow('neutral.400');
2999
- };
3000
- return {
3001
- control: (base, state) => colorMode === 'dark' ? {
3002
- ...base,
3003
- ...selectStyle,
3004
- background: 'transparent',
3005
- color: 'primary.300',
3006
- borderColor: 'secondary.500',
3007
- boxShadow: state.isFocused ? 'none' : `inherit`
3008
- } : {
3009
- ...base,
3010
- ...selectStyle,
3011
- borderWidth: 0,
3012
- boxShadow: boxShadowLight(state.isFocused, _isError)
3013
- },
3014
- option: (base, {
3015
- isSelected
3016
- }) => colorMode === 'dark' ? {
3017
- ...base,
3018
- ...selectStyle,
3019
- background: isSelected ? 'primary.700' : 'dark.800',
3020
- color: 'white'
3021
- } : {
3022
- ...base,
3023
- ...selectStyle
3024
- },
3025
- menu: base => colorMode === 'dark' ? {
3026
- ...base,
3027
- ...selectStyle,
3028
- background: 'dark.800',
3029
- zIndex: 5
3030
- } : {
3031
- ...base,
3032
- ...selectStyle,
3033
- zIndex: 5
3034
- },
3035
- singleValue: base => colorMode === 'dark' ? {
3036
- ...base,
3037
- ...selectStyle,
3038
- color: 'white'
3039
- } : {
3040
- ...base,
3041
- ...selectStyle
3042
- },
3043
- input: base => colorMode === 'dark' ? {
3044
- ...base,
3045
- ...selectStyle,
3046
- color: 'white'
3047
- } : {
3048
- ...base,
3049
- ...selectStyle
3050
- },
3051
- dropdownIndicator: base => colorMode === 'dark' ? {
3052
- ...base,
3053
- ...selectStyle,
3054
- color: 'secondary.500'
3055
- } : {
3056
- ...base,
3057
- ...selectStyle
3058
- },
3059
- indicatorSeparator: base => colorMode === 'dark' ? {
3060
- ...base,
3061
- ...selectStyle,
3062
- backgroundColor: 'secondary.500'
3063
- } : {
3064
- ...base,
3065
- ...selectStyle
3066
- },
3067
- placeholder: base => {
3068
- return {
3069
- ...base,
3070
- ...selectStyle,
3071
- color: 'black.low'
3072
- };
3073
- }
3074
- };
3075
- }
3076
- const themeSelect = theme => {
3077
- return {
3078
- ...theme,
3079
- colors: {
3080
- ...theme.colors,
3081
- primary: 'primary.500',
3082
- primary25: 'primary.50',
3083
- primary50: 'primary.100',
3084
- primary75: 'primary.200'
3085
- }
3086
- };
3087
- };
3088
-
3089
- /* eslint-disable react/require-default-props */
3090
- function Select({
3091
- styles,
3092
- isError = false,
3093
- ...rest
3094
- }) {
3095
- const {
3096
- colorMode
3097
- } = useColorMode();
3098
- return /*#__PURE__*/React__default.createElement(SelectWrapper, {
3099
- isError: isError
3100
- }, /*#__PURE__*/React__default.createElement(ReactSelect, Object.assign({
3101
- classNamePrefix: "react-select"
3102
- }, rest, {
3103
- styles: {
3104
- ...selectStyles(colorMode, isError)
3105
- },
3106
- theme: themeSelect
3107
- })));
3108
- }
3109
-
3110
- function SelectAsync({
3111
- styles,
3112
- isError = false,
3113
- ...rest
3114
- }) {
3115
- const {
3116
- colorMode
3117
- } = useColorMode();
3118
- return /*#__PURE__*/React__default.createElement(SelectWrapper, {
3119
- isError: isError
3120
- }, /*#__PURE__*/React__default.createElement(AsyncPaginate, Object.assign({
3121
- classNamePrefix: "react-select"
3122
- }, rest, {
3123
- styles: {
3124
- ...selectStyles(colorMode, isError),
3125
- ...styles
3126
- },
3127
- theme: themeSelect
3128
- })));
3129
- }
3130
-
3131
- function SelectAsyncCreatable({
3132
- styles,
3133
- isError = false,
3134
- ...rest
3135
- }) {
3136
- const {
3137
- colorMode
3138
- } = useColorMode();
3139
- return /*#__PURE__*/React__default.createElement(SelectWrapper, {
3140
- isError: isError
3141
- }, /*#__PURE__*/React__default.createElement(ReactSelectAsyncCreatable, Object.assign({
3142
- classNamePrefix: "react-select"
3143
- }, rest, {
3144
- styles: {
3145
- ...selectStyles(colorMode, isError),
3146
- ...styles
3147
- },
3148
- theme: themeSelect
3149
- })));
3150
- }
3151
-
3152
- function SelectCreatable({
3153
- styles,
3154
- isError = false,
3155
- ...rest
3156
- }) {
3157
- const {
3158
- colorMode
3159
- } = useColorMode();
3160
- return /*#__PURE__*/React__default.createElement(SelectWrapper, {
3161
- isError: isError
3162
- }, /*#__PURE__*/React__default.createElement(ReactSelectCreatable, Object.assign({
3163
- classNamePrefix: "react-select"
3164
- }, rest, {
3165
- styles: {
3166
- ...selectStyles(colorMode, isError),
3167
- ...styles
3168
- },
3169
- theme: themeSelect
3170
- })));
3171
- }
3172
-
3173
- /**
3174
- * The `Switch` component is used as an alternative for the checkbox component for switching between "enabled" and "disabled" states.
3175
- *
3176
- * @see Docs https://chakra-ui.com/docs/components/switch
3177
- * @see WAI-ARIA https://www.w3.org/WAI/ARIA/apg/patterns/switch/
3178
- */
3179
- const Switch = /*#__PURE__*/forwardRef$1(function Switch(props, ref) {
3180
- const styles = useMultiStyleConfig$1('Switch', props);
3181
- const {
3182
- spacing = '0.5rem',
3183
- children,
3184
- ...ownProps
3185
- } = omitThemingProps$1(props);
3186
- const {
3187
- state,
3188
- getInputProps,
3189
- getCheckboxProps,
3190
- getRootProps,
3191
- getLabelProps
3192
- } = useCheckbox(ownProps);
3193
- const containerStyles = useMemo(() => ({
3194
- display: 'inline-block',
3195
- position: 'relative',
3196
- verticalAlign: 'middle',
3197
- lineHeight: 0,
3198
- ...styles.container
3199
- }), [styles.container]);
3200
- const trackStyles = useMemo(() => ({
3201
- display: 'inline-flex',
3202
- flexShrink: 0,
3203
- justifyContent: 'flex-start',
3204
- boxSizing: 'content-box',
3205
- cursor: 'pointer',
3206
- width: 200,
3207
- ...styles.track
3208
- }), [styles.track]);
3209
- const labelStyles = useMemo(() => ({
3210
- userSelect: 'none',
3211
- marginStart: spacing,
3212
- ...styles.label
3213
- }), [spacing, styles.label]);
3214
- const getIconSize = value => {
3215
- const iconSize = {
3216
- sm: 3,
3217
- md: 4,
3218
- lg: 5
3219
- };
3220
- return iconSize[value];
3221
- };
3222
- return /*#__PURE__*/React__default.createElement(chakra$1.label, Object.assign({}, getRootProps(), {
3223
- display: "flex",
3224
- alignItems: "center",
3225
- className: cx('chakra-switch', props.className),
3226
- __css: containerStyles
3227
- }), /*#__PURE__*/React__default.createElement("input", Object.assign({
3228
- "data-test-id": "",
3229
- className: "chakra-switch__input"
3230
- }, getInputProps({}, ref))), /*#__PURE__*/React__default.createElement(chakra$1.span, Object.assign({}, getCheckboxProps(), {
3231
- className: "chakra-switch__track",
3232
- pos: "relative",
3233
- __css: trackStyles
3234
- }), /*#__PURE__*/React__default.createElement(Flex, {
3235
- gap: 2,
3236
- pos: "absolute",
3237
- top: "50%",
3238
- left: "50%",
3239
- transform: "translate(-50%, -50%)"
3240
- }, /*#__PURE__*/React__default.createElement(Check, {
3241
- color: "white",
3242
- size: getIconSize(props.size)
3243
- }), /*#__PURE__*/React__default.createElement(Close, {
3244
- color: state.isDisabled ? 'neutral.600' : 'neutral.900',
3245
- size: getIconSize(props.size)
3246
- })), /*#__PURE__*/React__default.createElement(chakra$1.span, {
3247
- __css: styles.thumb,
3248
- className: "chakra-switch__thumb",
3249
- "data-checked": dataAttr(state.isChecked),
3250
- "data-hover": dataAttr(state.isHovered)
3251
- })), children && /*#__PURE__*/React__default.createElement(chakra$1.span, Object.assign({
3252
- className: "chakra-switch__label",
3253
- color: state.isDisabled ? 'black.low' : 'black.high'
3254
- }, getLabelProps(), {
3255
- __css: labelStyles
3256
- }), children));
3257
- });
3258
- Switch.defaultProps = {
3259
- size: 'sm'
3260
- };
3261
-
3262
- const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
3263
- var _props$leftAddon, _props$rightAddon;
3264
- const tabProps = useTab({
3265
- ...props,
3266
- ref
3267
- });
3268
- const isSelected = !!tabProps['aria-selected'];
3269
- const styles = useMultiStyleConfig$1('Tabs', tabProps);
3270
- return /*#__PURE__*/createElement(Button$2, Object.assign({
3271
- "data-test-id": props['data-test-id'],
3272
- p: 4,
3273
- fontSize: "text.md",
3274
- _selected: {
3275
- borderColor: 'primary.500',
3276
- color: 'primary.500',
3277
- transform: 'translateY(-2px)',
3278
- _hover: {
3279
- '& .chakra-badge': {
3280
- bg: 'primary.500'
3281
- },
3282
- color: 'primary.500'
3283
- }
3284
- },
3285
- color: "black.medium",
3286
- _focus: {
3287
- bg: 'none'
3288
- },
3289
- _hover: {
3290
- '& .chakra-badge': {
3291
- bg: 'primary.400'
3292
- },
3293
- color: 'primary.400'
3294
- },
3295
- __css: styles.tab
3296
- }, tabProps), /*#__PURE__*/createElement(Flex, {
3297
- alignItems: "center"
3298
- }, (_props$leftAddon = props.leftAddon) === null || _props$leftAddon === void 0 ? void 0 : _props$leftAddon.call(props, {
3299
- isSelected
3300
- }), tabProps.children, (_props$rightAddon = props.rightAddon) === null || _props$rightAddon === void 0 ? void 0 : _props$rightAddon.call(props, {
3301
- isSelected
3302
- })));
3303
- });
3304
-
3305
- const TabList = /*#__PURE__*/forwardRef$1((props, ref) => /*#__PURE__*/React__default.createElement(TabList$1, Object.assign({
3306
- borderBottom: "1px solid",
3307
- borderColor: useColorModeValue('gray.200', 'bright-gray.800')
3308
- }, props, {
3309
- ref: ref
3310
- }), props.children));
3311
-
3312
- const TabPanel = /*#__PURE__*/forwardRef$1((props, ref) => /*#__PURE__*/React__default.createElement(TabPanel$1, Object.assign({
3313
- px: 0
3314
- }, props, {
3315
- ref: ref
3316
- }), props.children));
3317
-
3318
- const messages = {
3319
- dragActive: 'Drop file disini...',
3320
- dragInActive: `(Klik atau drag untuk input file)`,
3321
- dragReplace: `(Klik atau drag untuk mengganti file)`,
3322
- replaceFile: 'Ganti File',
3323
- uploadFile: 'Upload File'
3324
- };
3325
-
3326
- const Uploader = ({
3327
- onHandleUploadFile,
3328
- onHandleRejections,
3329
- accept,
3330
- multiple,
3331
- selected,
3332
- maxFiles = 1,
3333
- renderError,
3334
- validator,
3335
- ...props
3336
- }) => {
3337
- const [selectedFirstFile, setSelectedFirstFile] = useState();
3338
- const [isSelected, setIsSelected] = useState(selected || false);
3339
- const onDrop = useCallback(acceptedFiles => {
3340
- if (acceptedFiles.length > 0) {
3341
- onHandleUploadFile === null || onHandleUploadFile === void 0 ? void 0 : onHandleUploadFile(acceptedFiles);
3342
- if (!multiple) {
3343
- setIsSelected(true);
3344
- setSelectedFirstFile(acceptedFiles[0]);
3345
- }
3346
- }
3347
- }, [multiple, onHandleUploadFile]);
3348
- const {
3349
- getRootProps,
3350
- getInputProps,
3351
- isDragActive,
3352
- fileRejections
3353
- } = useDropzone({
3354
- onDrop,
3355
- accept,
3356
- maxFiles,
3357
- multiple,
3358
- validator
3359
- });
3360
- useEffect(() => {
3361
- if (fileRejections.length > 0 && onHandleRejections) {
3362
- onHandleRejections(fileRejections);
3363
- }
3364
- }, [fileRejections, onHandleRejections]);
3365
- const isError = useMemo(() => {
3366
- const error = fileRejections.length > 0;
3367
- if (error) {
3368
- setIsSelected(false);
3369
- }
3370
- return error;
3371
- }, [fileRejections]);
3372
- useEffect(() => {
3373
- setIsSelected(selected !== null && selected !== void 0 ? selected : false);
3374
- }, [selected]);
3375
- return /*#__PURE__*/createElement(Stack, {
3376
- direction: "column"
3377
- }, /*#__PURE__*/createElement(Flex, Object.assign({
3378
- minH: 200,
3379
- border: "1px dashed",
3380
- borderColor: isError ? 'danger.500' : 'primary.500',
3381
- alignItems: "center",
3382
- justifyContent: "center",
3383
- cursor: "pointer"
3384
- }, props, getRootProps()), /*#__PURE__*/createElement("input", Object.assign({}, getInputProps())), isDragActive ? /*#__PURE__*/createElement(Text, null, messages.dragActive) : /*#__PURE__*/createElement(Flex, {
3385
- flexDirection: "column",
3386
- alignItems: "center",
3387
- color: isError ? 'danger.500' : 'primary.500'
3388
- }, !multiple && isSelected && /*#__PURE__*/createElement(Heading, {
3389
- fontWeight: 400,
3390
- fontSize: "18px",
3391
- lineHeight: 28,
3392
- color: "black.high",
3393
- mb: 2
3394
- }, selectedFirstFile === null || selectedFirstFile === void 0 ? void 0 : selectedFirstFile.name), !isSelected && /*#__PURE__*/createElement(Heading, {
3395
- fontWeight: 400,
3396
- fontSize: "18px",
3397
- lineHeight: 28,
3398
- mb: 2
3399
- }, messages.uploadFile), isSelected ? /*#__PURE__*/createElement(Text, null, messages.dragReplace) : /*#__PURE__*/createElement(Text, null, messages.dragInActive))), renderError === null || renderError === void 0 ? void 0 : renderError(fileRejections));
3400
- };
3401
- Uploader.defaultProps = {
3402
- onHandleUploadFile: undefined,
3403
- onHandleRejections: undefined,
3404
- renderError: undefined,
3405
- selected: false
3406
- };
3407
-
3408
- const {
3409
- definePartsStyle,
3410
- defineMultiStyleConfig
3411
- } = /*#__PURE__*/createMultiStyleConfigHelpers(accordionAnatomy.keys);
3412
- const baseStyleContainer = /*#__PURE__*/defineStyle$1({
3413
- border: 'none'
3414
- });
3415
- const baseStyleButton = /*#__PURE__*/defineStyle$1({
3416
- height: 14,
3417
- transitionProperty: 'common',
3418
- transitionDuration: 'normal',
3419
- gap: 4,
3420
- fontSize: 'text.md',
3421
- bg: 'neutral.50',
3422
- _focusVisible: {
3423
- bg: 'neutral.100'
3424
- },
3425
- _hover: {
3426
- bg: 'neutral.100'
3427
- },
3428
- _disabled: {
3429
- opacity: 0.4,
3430
- cursor: 'not-allowed'
3431
- },
3432
- py: 2,
3433
- px: 4,
3434
- position: 'relative'
3435
- });
3436
- const baseStylePanel = /*#__PURE__*/defineStyle$1({
3437
- pt: '2',
3438
- px: '4',
3439
- pb: '5'
3440
- });
3441
- const baseStyleIcon = /*#__PURE__*/defineStyle$1({
3442
- fontSize: '1.25em'
3443
- });
3444
- const baseStyle = /*#__PURE__*/definePartsStyle({
3445
- container: baseStyleContainer,
3446
- button: baseStyleButton,
3447
- panel: baseStylePanel,
3448
- icon: baseStyleIcon
3449
- });
3450
- const accordionTheme = /*#__PURE__*/defineMultiStyleConfig({
3451
- baseStyle
3452
- });
3453
-
3454
- const {
3455
- definePartsStyle: definePartsStyle$1,
3456
- defineMultiStyleConfig: defineMultiStyleConfig$1
3457
- } = /*#__PURE__*/createMultiStyleConfigHelpers(alertAnatomy.keys);
3458
- const $fg = /*#__PURE__*/cssVar('alert-fg');
3459
- const $bg = /*#__PURE__*/cssVar('alert-bg');
3460
- const baseStyle$1 = /*#__PURE__*/definePartsStyle$1(props => {
3461
- return {
3462
- container: {
3463
- bg: $bg.reference,
3464
- px: '4',
3465
- py: '2',
3466
- borderRadius: 'sm'
3467
- },
3468
- title: {
3469
- fontWeight: 'regular',
3470
- textStyle: 'text.sm',
3471
- marginEnd: '2'
3472
- },
3473
- description: {
3474
- lineHeight: '6'
3475
- },
3476
- icon: {
3477
- color: $fg.reference,
3478
- flexShrink: 0,
3479
- marginEnd: '3',
3480
- w: '4',
3481
- h: '4'
3482
- },
3483
- action: {
3484
- color: props.colorScheme === 'neutral' && props.variant === 'light' ? 'primary.500' : 'inherit',
3485
- '& +.chakra-alert__close': {
3486
- ml: '3'
3487
- }
3488
- },
3489
- close: {
3490
- color: $fg.reference,
3491
- w: '4',
3492
- h: '4'
3493
- },
3494
- spinner: {
3495
- color: $fg.reference,
3496
- flexShrink: 0,
3497
- marginEnd: '3',
3498
- w: '5',
3499
- h: '5'
3500
- }
3501
- };
3502
- });
3503
- function getBg(props) {
3504
- const {
3505
- colorScheme: c
3506
- } = props;
3507
- return {
3508
- light: c === 'neutral' ? `colors.${c}.300` : `colors.${c}.50`
3509
- };
3510
- }
3511
- const variantLight = /*#__PURE__*/definePartsStyle$1(props => {
3512
- const {
3513
- colorScheme: c
3514
- } = props;
3515
- const bg = getBg(props);
3516
- return {
3517
- container: {
3518
- [$fg.variable]: `colors.${c}.700`,
3519
- [$bg.variable]: bg.light,
3520
- color: $fg.reference
3521
- }
3522
- };
3523
- });
3524
- const variantSolid = /*#__PURE__*/definePartsStyle$1(props => {
3525
- const {
3526
- colorScheme: c
3527
- } = props;
3528
- return {
3529
- container: {
3530
- [$fg.variable]: `colors.white.high`,
3531
- [$bg.variable]: c === 'neutral' ? `colors.${c}.700` : `colors.${c}.500`
3532
- }
3533
- };
3534
- });
3535
- const variants = {
3536
- light: variantLight,
3537
- solid: variantSolid
3538
- };
3539
- const alertTheme = /*#__PURE__*/defineMultiStyleConfig$1({
3540
- baseStyle: baseStyle$1,
3541
- variants,
3542
- defaultProps: {
3543
- variant: 'light',
3544
- colorScheme: 'info'
3545
- }
3546
- });
3547
-
3548
- const Badge$1 = {
3549
- baseStyle: {
3550
- display: 'inline-block',
3551
- fontSize: 'text.xs',
3552
- fontWeight: 'semibold',
3553
- lineHeight: '14',
3554
- textTransform: 'none',
3555
- px: 2,
3556
- py: '0.5'
3557
- },
3558
- variants: {
3559
- 'primary-solid': {
3560
- bg: 'primary.500',
3561
- color: 'white'
3562
- },
3563
- 'success-solid': {
3564
- bg: 'success.500',
3565
- color: 'white'
3566
- },
3567
- 'info-solid': {
3568
- bg: 'info.500',
3569
- color: 'white'
3570
- },
3571
- 'warning-solid': {
3572
- bg: 'warning.500',
3573
- color: 'white'
3574
- },
3575
- 'danger-solid': {
3576
- bg: 'danger.500',
3577
- color: 'white'
3578
- },
3579
- 'neutral-solid': {
3580
- bg: 'neutral.900',
3581
- color: 'white'
3582
- },
3583
- 'disabled-solid': {
3584
- bg: 'neutral.600',
3585
- color: 'white'
3586
- },
3587
- 'primary-light': {
3588
- bg: 'primary.50',
3589
- color: 'primary.500'
3590
- },
3591
- 'success-light': {
3592
- bg: 'success.50',
3593
- color: 'success.500'
3594
- },
3595
- 'info-light': {
3596
- bg: 'info.50',
3597
- color: 'info.500'
3598
- },
3599
- 'warning-light': {
3600
- bg: 'warning.50',
3601
- color: 'warning.500'
3602
- },
3603
- 'danger-light': {
3604
- bg: 'danger.50',
3605
- color: 'danger.500'
3606
- },
3607
- 'neutral-light': {
3608
- bg: 'neutral.200',
3609
- color: 'neutral.900'
3610
- },
3611
- 'disabled-light': {
3612
- bg: 'neutral.200',
3613
- color: 'neutral.600'
3614
- }
3615
- },
3616
- // The default size and variant values
3617
- defaultProps: {
3618
- variant: 'primary-solid'
3619
- }
3620
- };
3621
-
3622
- // You can also use the more specific type for
3623
- // a single part component: ComponentSingleStyleConfig
3624
- const Button$1 = /*#__PURE__*/defineStyleConfig({
3625
- // The styles all button have in common
3626
- baseStyle: {
3627
- fontSize: 'body.1',
3628
- fontWeight: 'normal',
3629
- px: 4,
3630
- py: 2.5,
3631
- borderRadius: 'sm',
3632
- _disabled: {
3633
- opacity: 1,
3634
- bg: 'neutral.300',
3635
- color: 'black.low'
3636
- },
3637
- _hover: {
3638
- _disabled: {
3639
- bg: 'neutral.300',
3640
- color: 'black.low'
3641
- }
3642
- }
3643
- },
3644
- sizes: {
3645
- lg: props => {
3646
- const {
3647
- variant
3648
- } = props;
3649
- const base = {
3650
- fontSize: 'text.xl',
3651
- h: 12,
3652
- px: 4,
3653
- py: 2.5
3654
- };
3655
- const icon = {
3656
- h: 10,
3657
- w: 10,
3658
- p: 0
3659
- };
3660
- return variant === 'icon' ? icon : base;
3661
- },
3662
- md: props => {
3663
- const {
3664
- variant
3665
- } = props;
3666
- const base = {
3667
- fontSize: 'text.md',
3668
- h: 9,
3669
- px: 3,
3670
- py: '7px'
3671
- };
3672
- const icon = {
3673
- h: 9,
3674
- w: 9,
3675
- p: 0
3676
- };
3677
- return variant === 'icon' ? icon : base;
3678
- },
3679
- sm: props => {
3680
- const {
3681
- variant
3682
- } = props;
3683
- const base = {
3684
- fontSize: 'text.sm',
3685
- h: '26px',
3686
- lineHeight: 4,
3687
- px: 2,
3688
- py: '5px'
3689
- };
3690
- const icon = {
3691
- h: '26px',
3692
- w: '26px',
3693
- p: 0
3694
- };
3695
- return variant === 'icon' ? icon : base;
3696
- }
3697
- },
3698
- variants: {
3699
- primary: props => {
3700
- const {
3701
- isLoading
3702
- } = props;
3703
- const basePrimary = {
3704
- color: 'white.high',
3705
- bg: 'primary.500',
3706
- _hover: {
3707
- bg: 'primary.600'
3708
- },
3709
- _active: {
3710
- bg: 'primary.700'
3711
- }
3712
- };
3713
- const disabledLoading = {
3714
- _disabled: {
3715
- bg: 'primary.500'
3716
- },
3717
- _hover: {
3718
- _disabled: {
3719
- bg: 'primary.500'
3720
- }
3721
- }
3722
- };
3723
- return isLoading ? disabledLoading : basePrimary;
3724
- },
3725
- secondary: props => {
3726
- const {
3727
- isLoading
3728
- } = props;
3729
- const baseSecondary = {
3730
- color: 'primary.500',
3731
- borderWidth: 1,
3732
- borderStyle: 'inside',
3733
- bg: 'white.high',
3734
- borderColor: 'primary.500',
3735
- _hover: {
3736
- bg: 'primary.50'
3737
- },
3738
- _active: {
3739
- bg: 'primary.100'
3740
- },
3741
- _disabled: {
3742
- border: 0
3743
- },
3744
- '.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)': {
3745
- marginEnd: '-1px'
3746
- },
3747
- '.chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)': {
3748
- marginBottom: '-1px'
3749
- }
3750
- };
3751
- const disabledLoading = {
3752
- ...baseSecondary,
3753
- _disabled: {
3754
- bg: 'white.high'
3755
- },
3756
- _hover: {
3757
- _disabled: {
3758
- bg: 'white.high'
3759
- }
3760
- }
3761
- };
3762
- return isLoading ? disabledLoading : baseSecondary;
3763
- },
3764
- tertiary: props => {
3765
- const {
3766
- isLoading
3767
- } = props;
3768
- const baseTertiary = {
3769
- color: 'primary.500',
3770
- _hover: {
3771
- bg: 'primary.50'
3772
- },
3773
- _active: {
3774
- bg: 'primary.100'
3775
- }
3776
- };
3777
- const disabledLoading = {
3778
- ...baseTertiary,
3779
- _disabled: {
3780
- bg: 'transparent'
3781
- },
3782
- _hover: {
3783
- _disabled: {
3784
- bg: 'transparent'
3785
- }
3786
- }
3787
- };
3788
- return isLoading ? disabledLoading : baseTertiary;
3789
- },
3790
- danger: props => {
3791
- const {
3792
- isLoading
3793
- } = props;
3794
- const baseDanger = {
3795
- bg: 'danger.500',
3796
- color: 'white.high',
3797
- _hover: {
3798
- bg: 'danger.600'
3799
- },
3800
- _active: {
3801
- bg: 'danger.700'
3802
- }
3803
- };
3804
- const disabledLoading = {
3805
- ...baseDanger,
3806
- _disabled: {
3807
- bg: 'danger.500'
3808
- },
3809
- _hover: {
3810
- _disabled: {
3811
- bg: 'danger.500'
3812
- }
3813
- }
3814
- };
3815
- return isLoading ? disabledLoading : baseDanger;
3816
- },
3817
- 'outline-danger': props => {
3818
- const {
3819
- isLoading
3820
- } = props;
3821
- const baseSecondary = {
3822
- color: 'danger.500',
3823
- borderWidth: 1,
3824
- borderStyle: 'inside',
3825
- bg: 'white.high',
3826
- borderColor: 'danger.500',
3827
- _hover: {
3828
- bg: 'danger.50'
3829
- },
3830
- _active: {
3831
- bg: 'danger.100'
3832
- },
3833
- _disabled: {
3834
- border: 0
3835
- }
3836
- };
3837
- const disabledLoading = {
3838
- ...baseSecondary,
3839
- _disabled: {
3840
- bg: 'white.high'
3841
- },
3842
- _hover: {
3843
- _disabled: {
3844
- bg: 'white.high'
3845
- }
3846
- }
3847
- };
3848
- return isLoading ? disabledLoading : baseSecondary;
3849
- },
3850
- link: {
3851
- bg: 'transparent',
3852
- color: 'primary.500',
3853
- _disabled: {
3854
- opacity: '1',
3855
- bg: 'transparent',
3856
- color: 'black.medium'
3857
- },
3858
- _hover: {
3859
- _disabled: {
3860
- bg: 'transparent',
3861
- color: 'black.medium'
3862
- }
3863
- }
3864
- },
3865
- icon: {
3866
- bg: 'neutral.50',
3867
- minW: 0,
3868
- borderColor: 'neutral.200',
3869
- borderWidth: '1px',
3870
- _active: {
3871
- bg: 'neutral.500',
3872
- borderColor: 'neutral.50'
3873
- },
3874
- _disabled: {
3875
- bg: 'neutral.500',
3876
- opacity: 0.3,
3877
- borderColor: 'neutral.50'
3878
- },
3879
- _hover: {
3880
- bg: 'neutral.400',
3881
- _disabled: {
3882
- bg: 'neutral.500',
3883
- opacity: 0.3,
3884
- borderColor: 'neutral.50'
3885
- }
3886
- }
3887
- }
3888
- },
3889
- defaultProps: {
3890
- size: 'md',
3891
- variant: 'primary',
3892
- colorScheme: 'primary'
3893
- }
3894
- });
3895
-
3896
- const CardStyle = /*#__PURE__*/defineStyleConfig({
3897
- baseStyle: props => {
3898
- return {
3899
- shadow: props.withShadow ? 'raised' : 'none',
3900
- borderRadius: props.isRounded ? 'sm' : 'none'
3901
- };
3902
- }
3903
- });
3904
-
3905
- const {
3906
- definePartsStyle: definePartsStyle$2,
3907
- defineMultiStyleConfig: defineMultiStyleConfig$2
3908
- } = /*#__PURE__*/createMultiStyleConfigHelpers$1(checkboxAnatomy.keys);
3909
- const baseStyle$2 = /*#__PURE__*/definePartsStyle$2({
3910
- control: {
3911
- borderRadius: 'sm',
3912
- w: 4,
3913
- h: 4,
3914
- border: '1px solid'
3915
- },
3916
- icon: {
3917
- color: 'neutral.50'
3918
- },
3919
- label: {
3920
- textStyle: 'text.sm',
3921
- color: 'black.high',
3922
- ml: 2
3923
- },
3924
- _disabled: {
3925
- background: 'neutral.200',
3926
- border: '0',
3927
- borderColor: 'neutral.500',
3928
- cursor: 'not-allowed'
3929
- }
3930
- });
3931
- const errors = /*#__PURE__*/definePartsStyle$2({
3932
- control: {
3933
- borderColor: 'danger.500',
3934
- _checked: {
3935
- borderColor: 'danger.500',
3936
- backgroundColor: 'danger.500',
3937
- _hover: {
3938
- borderColor: 'danger.600',
3939
- backgroundColor: 'danger.600'
3940
- }
3941
- },
3942
- _indeterminate: {
3943
- borderColor: 'danger.500',
3944
- backgroundColor: 'danger.500'
3945
- }
3946
- },
3947
- label: {
3948
- textStyle: 'text.xs'
3949
- },
3950
- icon: {
3951
- fontSize: '8px'
3952
- }
3953
- });
3954
- const unstyled = /*#__PURE__*/definePartsStyle$2({
3955
- control: {
3956
- borderColor: 'neutral.600',
3957
- _checked: {
3958
- borderColor: 'primary.500',
3959
- backgroundColor: 'primary.500',
3960
- _hover: {
3961
- borderColor: 'primary.600',
3962
- backgroundColor: 'primary.600'
3963
- },
3964
- _disabled: {
3965
- backgroundColor: 'primary.500',
3966
- borderColor: 'primary.500',
3967
- opacity: 0.3
3968
- }
3969
- },
3970
- _disabled: {
3971
- backgroundColor: 'neutral.200',
3972
- borderColor: 'neutral.200'
3973
- },
3974
- _indeterminate: {
3975
- borderColor: 'primary.500',
3976
- backgroundColor: 'primary.500',
3977
- _disabled: {
3978
- backgroundColor: 'primary.500',
3979
- borderColor: 'primary.500',
3980
- opacity: 0.3
3981
- }
3982
- }
3983
- },
3984
- label: {
3985
- textStyle: 'text.xs',
3986
- _disabled: {
3987
- opacity: 1
3988
- }
3989
- },
3990
- icon: {
3991
- fontSize: '8px'
3992
- }
3993
- });
3994
- const variants$1 = {
3995
- errors,
3996
- unstyled
3997
- };
3998
- const Checkbox = /*#__PURE__*/defineMultiStyleConfig$2({
3999
- baseStyle: baseStyle$2,
4000
- variants: variants$1,
4001
- defaultProps: {
4002
- variant: 'unstyled'
4003
- }
4004
- });
4005
-
4006
- const Chips$1 = /*#__PURE__*/defineStyleConfig({
4007
- baseStyle: props => {
4008
- const {
4009
- isDisabled,
4010
- isActive
4011
- } = props;
4012
- const defaultProps = {
4013
- color: 'primary.500',
4014
- textStyle: 'text.sm',
4015
- borderRadius: '2xl',
4016
- borderWidth: '1px',
4017
- borderColor: 'primary.500',
4018
- bg: 'white.high',
4019
- px: 3,
4020
- py: 1,
4021
- cursor: 'default',
4022
- _hover: {
4023
- bg: 'primary.50'
4024
- }
4025
- };
4026
- let chipsProps = {
4027
- ...defaultProps
4028
- };
4029
- if (isActive) {
4030
- const isActiveProps = {
4031
- bg: 'primary.500',
4032
- color: 'white.high',
4033
- _hover: {
4034
- bg: 'primary.500'
4035
- }
4036
- };
4037
- chipsProps = {
4038
- ...chipsProps,
4039
- ...isActiveProps
4040
- };
4041
- }
4042
- if (isDisabled) {
4043
- const isDisabledProps = {
4044
- bg: 'neutral.200',
4045
- color: 'black.low',
4046
- borderColor: 'neutral.200',
4047
- cursor: 'not-allowed',
4048
- _hover: {
4049
- bg: 'neutral.200'
4050
- }
4051
- };
4052
- chipsProps = {
4053
- ...chipsProps,
4054
- ...isDisabledProps
4055
- };
4056
- }
4057
- return {
4058
- ...chipsProps
4059
- };
4060
- },
4061
- sizes: {
4062
- sm: {
4063
- textStyle: 'text.sm'
4064
- },
4065
- md: {
4066
- textStyle: 'text.md',
4067
- py: 2
4068
- }
4069
- },
4070
- defaultProps: {
4071
- size: 'sm'
4072
- }
4073
- });
4074
-
4075
- const baseStyle$3 = /*#__PURE__*/defineStyle$1({
4076
- fontSize: 'field.sm',
4077
- fontWeight: 'normal',
4078
- marginEnd: 1,
4079
- mb: 1
4080
- });
4081
- const FormLabel = /*#__PURE__*/defineStyleConfig({
4082
- baseStyle: baseStyle$3
4083
- });
4084
-
4085
- const {
4086
- definePartsStyle: definePartsStyle$3,
4087
- defineMultiStyleConfig: defineMultiStyleConfig$3
4088
- } = /*#__PURE__*/createMultiStyleConfigHelpers(inputAnatomy.keys);
4089
- const baseStyle$4 = /*#__PURE__*/definePartsStyle$3({
4090
- field: {
4091
- width: '100%',
4092
- minWidth: 0,
4093
- outline: 0,
4094
- px: 2,
4095
- py: 2.5,
4096
- paddingInlineStart: 2,
4097
- paddingInlineEnd: 2,
4098
- position: 'relative',
4099
- appearance: 'none',
4100
- color: 'black.high',
4101
- _disabled: {
4102
- bg: 'neutral.300',
4103
- border: 0,
4104
- cursor: 'not-allowed',
4105
- opacity: 1,
4106
- boxShadow: 'none',
4107
- color: 'black.medium'
4108
- },
4109
- _placeholder: {
4110
- color: 'black.low'
4111
- }
4112
- }
4113
- });
4114
- const size = {
4115
- lg: /*#__PURE__*/defineStyle$1({
4116
- fontSize: 'text.lg',
4117
- h: 12,
4118
- borderRadius: 'sm'
4119
- }),
4120
- md: /*#__PURE__*/defineStyle$1({
4121
- fontSize: 'text.md',
4122
- h: 10,
4123
- borderRadius: 'sm'
4124
- }),
4125
- sm: /*#__PURE__*/defineStyle$1({
4126
- fontSize: 'text.sm',
4127
- h: 9,
4128
- borderRadius: 'sm'
4129
- })
4130
- };
4131
- const sizes = {
4132
- lg: /*#__PURE__*/definePartsStyle$3({
4133
- field: size.lg,
4134
- addon: size.lg
4135
- }),
4136
- md: /*#__PURE__*/definePartsStyle$3({
4137
- field: size.md,
4138
- addon: size.md
4139
- }),
4140
- sm: /*#__PURE__*/definePartsStyle$3({
4141
- field: size.sm,
4142
- addon: size.sm
4143
- })
4144
- };
4145
- const outline = /*#__PURE__*/definePartsStyle$3(props => {
4146
- const field = {
4147
- border: 0,
4148
- outline: 0,
4149
- bg: mode('white', 'inherit')(props),
4150
- color: mode('inherit', 'white')(props),
4151
- _invalid: {
4152
- boxShadow: 'none'
4153
- },
4154
- _focusVisible: {
4155
- zIndex: 1,
4156
- boxShadow: 'none'
4157
- }
4158
- };
4159
- return {
4160
- field
4161
- };
4162
- });
4163
- const unstyled$1 = /*#__PURE__*/definePartsStyle$3({
4164
- field: {
4165
- bg: 'transparent',
4166
- px: '0',
4167
- height: 'auto'
4168
- },
4169
- addon: {
4170
- bg: 'transparent',
4171
- px: '0',
4172
- height: 'auto'
4173
- }
4174
- });
4175
- const variants$2 = {
4176
- outline,
4177
- unstyled: unstyled$1
4178
- };
4179
- const Input = /*#__PURE__*/defineMultiStyleConfig$3({
4180
- baseStyle: baseStyle$4,
4181
- sizes,
4182
- variants: variants$2,
4183
- defaultProps: {
4184
- size: 'sm',
4185
- variant: 'outline'
4186
- }
4187
- });
4188
-
4189
- /* eslint-disable prefer-destructuring */
4190
- const rotate = /*#__PURE__*/keyframes({
4191
- '0%': {
4192
- transform: 'rotate(0deg)'
4193
- },
4194
- '100%': {
4195
- transform: 'rotate(360deg)'
4196
- }
4197
- });
4198
- const getLoaderColor = color => {
4199
- if (!color) {
4200
- return 'var(--chakra-colors-white-high)';
4201
- }
4202
- const colorValue = color.split('.');
4203
- let backgroundColor;
4204
- switch (colorValue.length) {
4205
- case 1:
4206
- backgroundColor = colorValue[0];
4207
- break;
4208
- case 2:
4209
- backgroundColor = `var(--chakra-colors-${colorValue[0]}-${colorValue[1]})`;
4210
- break;
4211
- default:
4212
- backgroundColor = 'var(--chakra-colors-white-high)';
4213
- break;
4214
- }
4215
- if (color === 'primary') return 'var(--chakra-colors-primary-600)';
4216
- if (color === 'danger') return 'var(--chakra-colors-danger-500)';
4217
- if (color === 'warning') return 'var(--chakra-colors-warning-700)';
4218
- return backgroundColor;
4219
- };
4220
- const LoaderStyle = /*#__PURE__*/defineStyleConfig({
4221
- baseStyle: props => {
4222
- const colors = getLoaderColor(props.color);
4223
- return {
4224
- borderRadius: '50%',
4225
- display: 'flex',
4226
- justifyContent: 'center',
4227
- alignItems: 'center',
4228
- animation: `${rotate} 1s linear infinite`,
4229
- background: `conic-gradient(from 180deg at 50% 50%, ${colors} 0deg, rgba(217, 217, 217, 0) 360deg);`,
4230
- ':before': {
4231
- content: `''`,
4232
- display: 'block',
4233
- borderRadius: '50%',
4234
- width: '6px',
4235
- height: '6px',
4236
- position: 'absolute',
4237
- bottom: 0,
4238
- background: colors
4239
- }
4240
- };
4241
- },
4242
- sizes: {
4243
- xs: {
4244
- width: '12px',
4245
- height: '12px',
4246
- WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.4px),#000 0);',
4247
- ':before': {
4248
- width: '1.4px',
4249
- height: '1.4px'
4250
- }
4251
- },
4252
- sm: {
4253
- width: '16px',
4254
- height: '16px',
4255
- WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 1.87px),#000 0);',
4256
- ':before': {
4257
- width: '1.87px',
4258
- height: '1.87px'
4259
- }
4260
- },
4261
- md: {
4262
- width: '24px',
4263
- height: '24px',
4264
- WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 2.8px),#000 0);',
4265
- ':before': {
4266
- width: '2.8px',
4267
- height: '2.8px'
4268
- }
4269
- },
4270
- lg: {
4271
- width: '50px',
4272
- height: '50px',
4273
- WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 5.83px),#000 0);',
4274
- ':before': {
4275
- width: '5.83px',
4276
- height: '5.83px'
4277
- }
4278
- },
4279
- xl: {
4280
- width: '75px',
4281
- height: '75px',
4282
- WebkitMask: 'radial-gradient(farthest-side,#0000 calc(100% - 8.75px),#000 0);',
4283
- ':before': {
4284
- width: '8.75px',
4285
- height: '8.75px'
4286
- }
4287
- },
4288
- xxl: {
4289
- width: '100px',
4290
- height: '100px',
4291
- WebkitMask: `radial-gradient(farthest-side,#0000 calc(100% - 11.67px),#000 0);`,
4292
- ':before': {
4293
- width: '11.67px',
4294
- height: '11.67px'
4295
- }
4296
- }
4297
- },
4298
- defaultProps: {
4299
- size: 'lg'
4300
- }
4301
- });
4302
-
4303
- const {
4304
- definePartsStyle: definePartsStyle$4
4305
- } = /*#__PURE__*/createMultiStyleConfigHelpers(popoverAnatomy.keys);
4306
- const Popover = {
4307
- baseStyle: props => definePartsStyle$4({
4308
- popper: {
4309
- background: mode('white', 'inherit')(props)
4310
- }
4311
- })
4312
- };
4313
-
4314
- const {
4315
- definePartsStyle: definePartsStyle$5,
4316
- defineMultiStyleConfig: defineMultiStyleConfig$4
4317
- } = /*#__PURE__*/createMultiStyleConfigHelpers$1(radioAnatomy.keys);
4318
- const baseStyle$5 = /*#__PURE__*/definePartsStyle$5({
4319
- control: {
4320
- border: '1px solid',
4321
- width: '16px',
4322
- height: '16px'
4323
- },
4324
- label: {
4325
- marginLeft: '8px',
4326
- textStyle: 'text.sm',
4327
- color: 'black.high',
4328
- _disabled: {
4329
- opacity: 1,
4330
- color: 'black.medium'
4331
- }
4332
- }
4333
- });
4334
- const errors$1 = /*#__PURE__*/definePartsStyle$5({
4335
- control: {
4336
- borderColor: 'danger.500',
4337
- _checked: {
4338
- borderColor: 'danger.500',
4339
- bg: 'white',
4340
- _before: {
4341
- h: '10px',
4342
- w: '10px',
4343
- bg: 'danger.500'
4344
- },
4345
- _hover: {
4346
- borderColor: 'danger.500',
4347
- bg: 'neutral.200'
4348
- },
4349
- _disabled: {
4350
- borderColor: 'danger.500',
4351
- bg: 'white.high',
4352
- _before: {
4353
- h: '10px',
4354
- w: '10px',
4355
- bg: 'primary.500',
4356
- opacity: 0.3
4357
- }
4358
- }
4359
- },
4360
- _disabled: {
4361
- borderColor: 'danger.500',
4362
- bg: 'neutral.200'
4363
- }
4364
- },
4365
- label: {
4366
- fontSize: '12px'
4367
- }
4368
- });
4369
- const unstyled$2 = /*#__PURE__*/definePartsStyle$5({
4370
- control: {
4371
- borderColor: 'neutral.600',
4372
- _checked: {
4373
- borderColor: 'primary.500',
4374
- bg: 'white',
4375
- _before: {
4376
- h: '10px',
4377
- w: '10px',
4378
- bg: 'primary.500'
4379
- },
4380
- _hover: {
4381
- borderColor: 'primary.500',
4382
- bg: 'gray.200'
4383
- },
4384
- _disabled: {
4385
- borderColor: 'primary.500',
4386
- bg: 'white.high',
4387
- opacity: 0.3,
4388
- _before: {
4389
- h: '10px',
4390
- w: '10px',
4391
- bg: 'primary.500'
4392
- }
4393
- }
4394
- },
4395
- _disabled: {
4396
- borderColor: 'neutral.200',
4397
- bg: 'neutral.200'
4398
- }
4399
- },
4400
- label: {
4401
- fontSize: '12px'
4402
- }
4403
- });
4404
- const variants$3 = {
4405
- errors: errors$1,
4406
- unstyled: unstyled$2
4407
- };
4408
- const Radio = /*#__PURE__*/defineMultiStyleConfig$4({
4409
- baseStyle: baseStyle$5,
4410
- variants: variants$3,
4411
- defaultProps: {
4412
- variant: 'unstyled'
4413
- }
4414
- });
4415
-
4416
- const {
4417
- defineMultiStyleConfig: defineMultiStyleConfig$5,
4418
- definePartsStyle: definePartsStyle$6
4419
- } = /*#__PURE__*/createMultiStyleConfigHelpers(switchAnatomy.keys);
4420
- const $width = /*#__PURE__*/cssVar$1('switch-track-width');
4421
- const $height = /*#__PURE__*/cssVar$1('switch-track-height');
4422
- const $diff = /*#__PURE__*/cssVar$1('switch-track-diff');
4423
- const diffValue = /*#__PURE__*/calc.subtract($width, $height);
4424
- const $translateX = /*#__PURE__*/cssVar$1('switch-thumb-x');
4425
- const baseStyleThumb = /*#__PURE__*/defineStyle$1({
4426
- bg: 'white',
4427
- transitionProperty: 'transform',
4428
- transitionDuration: 'normal',
4429
- borderRadius: 'inherit',
4430
- width: [$height.reference],
4431
- height: [$height.reference],
4432
- _checked: {
4433
- transform: `translateX(${$translateX.reference})`
4434
- }
4435
- });
4436
- const baseStyle$6 = /*#__PURE__*/definePartsStyle$6(() => ({
4437
- container: {
4438
- [$diff.variable]: diffValue,
4439
- [$translateX.variable]: $diff.reference,
4440
- _rtl: {
4441
- [$translateX.variable]: calc($diff).negate().toString()
4442
- }
4443
- },
4444
- track: {
4445
- bg: 'neutral.400',
4446
- p: 1,
4447
- _checked: {
4448
- bg: 'primary.500',
4449
- _disabled: {
4450
- bg: 'neutral.600'
4451
- }
4452
- },
4453
- _disabled: {
4454
- bg: 'neutral.500',
4455
- opacity: '100%'
4456
- }
4457
- },
4458
- thumb: baseStyleThumb
4459
- }));
4460
- const sizes$1 = {
4461
- sm: /*#__PURE__*/definePartsStyle$6({
4462
- container: {
4463
- [$width.variable]: '1.875rem',
4464
- [$height.variable]: '0.75rem'
4465
- },
4466
- thumb: {
4467
- [$width.variable]: '0.75rem',
4468
- [$height.variable]: '0.75rem'
4469
- }
4470
- }),
4471
- md: /*#__PURE__*/definePartsStyle$6({
4472
- container: {
4473
- [$width.variable]: '2.375rem',
4474
- [$height.variable]: '1rem'
4475
- },
4476
- thumb: {
4477
- [$width.variable]: '1rem',
4478
- [$height.variable]: '1rem'
4479
- }
4480
- }),
4481
- lg: /*#__PURE__*/definePartsStyle$6({
4482
- container: {
4483
- [$width.variable]: '3.25rem',
4484
- [$height.variable]: '1.375rem'
4485
- },
4486
- thumb: {
4487
- [$width.variable]: '1.375rem',
4488
- [$height.variable]: '1.375rem'
4489
- }
4490
- })
4491
- };
4492
- const Switch$1 = /*#__PURE__*/defineMultiStyleConfig$5({
4493
- baseStyle: baseStyle$6,
4494
- sizes: sizes$1,
4495
- defaultProps: {
4496
- size: 'md'
4497
- }
4498
- });
4499
-
4500
- const {
4501
- defineMultiStyleConfig: defineMultiStyleConfig$6,
4502
- definePartsStyle: definePartsStyle$7
4503
- } = /*#__PURE__*/createMultiStyleConfigHelpers(tableAnatomy.keys);
4504
- const baseStyle$7 = /*#__PURE__*/definePartsStyle$7({
4505
- table: {
4506
- fontVariantNumeric: 'lining-nums tabular-nums',
4507
- borderCollapse: 'collapse',
4508
- width: 'full'
4509
- },
4510
- th: {
4511
- fontFamily: 'heading',
4512
- fontWeight: 'semibold',
4513
- textTransform: 'uppercase',
4514
- letterSpacing: 'normal',
4515
- textAlign: 'start',
4516
- height: '50px',
4517
- color: /*#__PURE__*/mode('neutral.900', 'white'),
4518
- fontSize: 'text.sm',
4519
- lineHeight: '18px'
4520
- },
4521
- td: {
4522
- textAlign: 'start',
4523
- height: '56px'
4524
- },
4525
- caption: {
4526
- mt: 4,
4527
- fontFamily: 'heading',
4528
- textAlign: 'center',
4529
- fontWeight: 'medium'
4530
- }
4531
- });
4532
- const numericStyles = /*#__PURE__*/defineStyle$1({
4533
- '&[data-is-numeric=true]': {
4534
- textAlign: 'end'
4535
- }
4536
- });
4537
- const variantSimple = /*#__PURE__*/definePartsStyle$7(props => {
4538
- const {
4539
- colorScheme: c
4540
- } = props;
4541
- return {
4542
- th: {
4543
- color: mode('gray.600', 'gray.400')(props),
4544
- borderBottom: '1px',
4545
- borderColor: mode(`${c}.100`, `${c}.700`)(props),
4546
- ...numericStyles
4547
- },
4548
- td: {
4549
- borderBottom: '1px',
4550
- borderColor: mode(`${c}.100`, `${c}.700`)(props),
4551
- ...numericStyles
4552
- },
4553
- caption: {
4554
- color: mode('gray.600', 'gray.100')(props)
4555
- },
4556
- tfoot: {
4557
- tr: {
4558
- '&:last-of-type': {
4559
- th: {
4560
- borderBottomWidth: 0
4561
- }
4562
- }
4563
- }
4564
- }
4565
- };
4566
- });
4567
- const variantStripe = /*#__PURE__*/definePartsStyle$7(props => {
4568
- const {
4569
- colorScheme: c
4570
- } = props;
4571
- return {
4572
- th: {
4573
- color: mode('gray.600', 'gray.400')(props),
4574
- borderBottom: '1px',
4575
- borderColor: mode(`${c}.100`, `${c}.700`)(props),
4576
- ...numericStyles
4577
- },
4578
- td: {
4579
- borderBottom: '1px',
4580
- borderColor: mode(`${c}.100`, `${c}.700`)(props),
4581
- ...numericStyles
4582
- },
4583
- caption: {
4584
- color: mode('gray.600', 'gray.100')(props)
4585
- },
4586
- tbody: {
4587
- tr: {
4588
- '&:nth-of-type(odd)': {
4589
- 'th, td': {
4590
- borderBottomWidth: '1px',
4591
- borderColor: mode(`${c}.100`, `${c}.700`)(props)
4592
- },
4593
- td: {
4594
- background: mode(`${c}.100`, `${c}.700`)(props)
4595
- }
4596
- }
4597
- }
4598
- },
4599
- tfoot: {
4600
- tr: {
4601
- '&:last-of-type': {
4602
- th: {
4603
- borderBottomWidth: 0
4604
- }
4605
- }
4606
- }
4607
- }
4608
- };
4609
- });
4610
- const variants$4 = {
4611
- simple: variantSimple,
4612
- striped: variantStripe,
4613
- unstyled: /*#__PURE__*/defineStyle$1({})
4614
- };
4615
- const sizes$2 = {
4616
- sm: /*#__PURE__*/definePartsStyle$7({
4617
- th: {
4618
- px: '4',
4619
- py: '1',
4620
- lineHeight: '4',
4621
- fontSize: 'xs'
4622
- },
4623
- td: {
4624
- px: '4',
4625
- py: '2',
4626
- fontSize: 'sm',
4627
- lineHeight: '4'
4628
- },
4629
- caption: {
4630
- px: '4',
4631
- py: '2',
4632
- fontSize: 'xs'
4633
- }
4634
- }),
4635
- md: /*#__PURE__*/definePartsStyle$7({
4636
- th: {
4637
- px: '2',
4638
- py: '4',
4639
- lineHeight: '4',
4640
- fontSize: 'xs',
4641
- '&:first-of-type': {
4642
- pl: 6
4643
- },
4644
- '&:last-of-type': {
4645
- pr: 6
4646
- }
4647
- },
4648
- td: {
4649
- px: '2',
4650
- py: '4',
4651
- lineHeight: '5',
4652
- '&:first-of-type': {
4653
- pl: 6
4654
- },
4655
- '&:last-of-type': {
4656
- pr: 6
4657
- }
4658
- },
4659
- caption: {
4660
- px: '6',
4661
- py: '2',
4662
- fontSize: 'sm'
4663
- }
4664
- }),
4665
- lg: /*#__PURE__*/definePartsStyle$7({
4666
- th: {
4667
- px: '8',
4668
- py: '4',
4669
- lineHeight: '5',
4670
- fontSize: 'sm'
4671
- },
4672
- td: {
4673
- px: '8',
4674
- py: '5',
4675
- lineHeight: '6'
4676
- },
4677
- caption: {
4678
- px: '6',
4679
- py: '2',
4680
- fontSize: 'md'
4681
- }
4682
- })
4683
- };
4684
- const tableTheme = /*#__PURE__*/defineMultiStyleConfig$6({
4685
- baseStyle: baseStyle$7,
4686
- variants: variants$4,
4687
- sizes: sizes$2,
4688
- defaultProps: {
4689
- variant: 'simple',
4690
- size: 'md',
4691
- colorScheme: 'gray'
4692
- }
4693
- });
4694
-
4695
- const getProps = props => {
4696
- const {
4697
- isError,
4698
- isSuccess,
4699
- isDisabled
4700
- } = props;
4701
- let borderColor = 'neutral.400';
4702
- let focusBorderColor = 'primary.500';
4703
- if (isError) {
4704
- borderColor = 'danger.500';
4705
- focusBorderColor = 'danger.500';
4706
- } else if (isSuccess) {
4707
- borderColor = 'success.500';
4708
- focusBorderColor = 'success.500';
4709
- } else if (isDisabled && !isError && !isSuccess) {
4710
- borderColor = 'neutral.400';
4711
- focusBorderColor = 'danger.500';
4712
- }
4713
- return {
4714
- focusBorderColor,
4715
- borderColor
4716
- };
4717
- };
4718
- const outline$1 = /*#__PURE__*/defineStyle(props => {
4719
- const {
4720
- focusBorderColor,
4721
- borderColor
4722
- } = getProps(props);
4723
- return {
4724
- background: 'white.high',
4725
- color: 'black.high',
4726
- borderColor,
4727
- fontSize: 'text.sm',
4728
- padding: 2,
4729
- borderRadius: 'sm',
4730
- borderWidth: '1px',
4731
- outline: 'none',
4732
- _disabled: {
4733
- opacity: 1,
4734
- color: 'black.medium',
4735
- background: 'neutral.300'
4736
- },
4737
- _placeholder: {
4738
- color: 'black.low'
4739
- },
4740
- _hover: {
4741
- borderColor
4742
- },
4743
- _focus: {
4744
- outline: 'none',
4745
- borderColor: focusBorderColor,
4746
- boxShadow: 'none'
4747
- },
4748
- _focusVisible: {
4749
- outline: 'none',
4750
- borderColor: focusBorderColor,
4751
- boxShadow: 'none'
4752
- },
4753
- _focusWithin: {
4754
- outline: 'none',
4755
- borderColor: focusBorderColor,
4756
- boxShadow: 'none'
4757
- },
4758
- _invalid: {
4759
- outline: 'none',
4760
- borderColor: 'danger.500',
4761
- boxShadow: 'none'
4762
- }
4763
- };
4764
- });
4765
- const Textarea = /*#__PURE__*/defineStyleConfig$1({
4766
- variants: {
4767
- outline: outline$1
4768
- },
4769
- defaultProps: {
4770
- variant: 'outline'
4771
- }
4772
- });
4773
-
4774
-
4775
-
4776
- var components = {
4777
- __proto__: null,
4778
- Accordion: accordionTheme,
4779
- Alert: alertTheme,
4780
- Badge: Badge$1,
4781
- Button: Button$1,
4782
- Card: CardStyle,
4783
- Checkbox: Checkbox,
4784
- Chips: Chips$1,
4785
- FormLabel: FormLabel,
4786
- Input: Input,
4787
- LoaderStyle: LoaderStyle,
4788
- Popover: Popover,
4789
- Radio: Radio,
4790
- Switch: Switch$1,
4791
- Table: tableTheme,
4792
- Textarea: Textarea
4793
- };
4794
-
4795
- const config = {
4796
- initialColorMode: 'light',
4797
- useSystemColorMode: false
4798
- };
4799
- const getTheme = foundations => {
4800
- return extendTheme({
4801
- ...foundations,
4802
- components: {
4803
- ...components
4804
- },
4805
- styles: {
4806
- global: {
4807
- body: {
4808
- fontSize: 'text.sm',
4809
- color: 'black.high'
4810
- }
4811
- }
4812
- },
4813
- config
4814
- });
4815
- };
4816
- const theme = /*#__PURE__*/extendTheme({
4817
- components: {
4818
- ...components
4819
- },
4820
- styles: {
4821
- global: {
4822
- '*::-webkit-scrollbar-thumb': {
4823
- background: 'neutral.400'
4824
- },
4825
- body: {
4826
- fontSize: 'text.sm',
4827
- color: 'black.high'
4828
- }
4829
- }
4830
- },
4831
- config
4832
- });
4833
-
4834
- const ProviderContext = /*#__PURE__*/createContext$1({
4835
- instance: undefined
4836
- });
4837
- const useInternalUI = () => {
4838
- const {
4839
- instance
4840
- } = useContext(ProviderContext);
4841
- return {
4842
- instance
4843
- };
4844
- };
4845
- const Provider = ({
4846
- children,
4847
- config,
4848
- requestInterceptors,
4849
- responseInterceptors
4850
- }) => {
4851
- const instanceRef = useRef(axios.create(config));
4852
- useEffect(() => {
4853
- requestInterceptors === null || requestInterceptors === void 0 ? void 0 : requestInterceptors.forEach(interceptor => {
4854
- instanceRef.current.interceptors.request.use(interceptor);
4855
- });
4856
- responseInterceptors === null || responseInterceptors === void 0 ? void 0 : responseInterceptors.forEach(interceptor => {
4857
- instanceRef.current.interceptors.response.use(interceptor);
4858
- });
4859
- }, [requestInterceptors, responseInterceptors]);
4860
- const provider = useMemo(() => ({
4861
- instance: instanceRef.current
4862
- }), []);
4863
- return /*#__PURE__*/React__default.createElement(ProviderContext.Provider, {
4864
- value: provider
4865
- }, /*#__PURE__*/React__default.createElement(ToastContainer, null), children);
4866
- };
4867
- Provider.displayName = 'Provider';
4868
-
4869
- function useFetcher() {
4870
- const {
4871
- instance
4872
- } = useInternalUI();
4873
- const axiosInstance = useMemo(() => instance || axios, [instance]);
4874
- const fetcher = async ({
4875
- url,
4876
- data,
4877
- method,
4878
- headers,
4879
- ...config
4880
- }) => {
4881
- const response = await axiosInstance.request({
4882
- data,
4883
- url,
4884
- method,
4885
- headers: {
4886
- 'Content-Type': 'application/json; charset=utf-8',
4887
- ...headers
4888
- },
4889
- ...config
4890
- });
4891
- return response;
4892
- };
4893
- return {
4894
- fetcher
4895
- };
4896
- }
4897
-
4898
- export { Alert, AlertAction, AlertClose, AlertDescription, AlertIcon, AlertTitle, Badge, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Chips, DataTable, DatePickerMonth, Datepicker, Field, Header, InputAddonLeft, InputAddonRight, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, NavigationBar, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Rating, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Switch, Tab, TabList, TabPanel, TextareaField, Uploader, getTheme, theme, useAlertStyles, useFetcher, useInternalUI };
4899
- //# sourceMappingURL=internal-ui.esm.js.map