@ctlyst.id/internal-ui 1.0.1-canary.4 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/dist/components/base/stories/button.stories.d.ts +10 -0
  2. package/dist/components/base/stories/checkbox.stories.d.ts +11 -0
  3. package/dist/components/base/stories/input.stories.d.ts +16 -0
  4. package/dist/components/base/stories/radio.stories.d.ts +15 -0
  5. package/dist/components/base/stories/switch.stories.d.ts +11 -0
  6. package/dist/{types/components → components}/breadcrumb/components/BreadCrumb.d.ts +17 -17
  7. package/dist/components/breadcrumb/components/BreadCrumb.stories.d.ts +10 -0
  8. package/dist/{types/components → components}/breadcrumb/index.d.ts +2 -2
  9. package/dist/{types/components → components}/data-table/components/data-table.d.ts +40 -40
  10. package/dist/{types/components → components}/data-table/components/indeterminate-checkbox.d.ts +5 -5
  11. package/dist/{types/components → components}/data-table/index.d.ts +3 -3
  12. package/dist/components/data-table/stories/data-table.stories.d.ts +38 -0
  13. package/dist/{types/components → components}/data-table/types/table-core.d.ts +1 -1
  14. package/dist/{types/components → components}/datepicker/components/datepicker.d.ts +17 -17
  15. package/dist/components/datepicker/components/datepicker.stories.d.ts +13 -0
  16. package/dist/{types/components → components}/datepicker/components/styles.d.ts +2 -2
  17. package/dist/{types/components → components}/datepicker/components/time-input.d.ts +9 -9
  18. package/dist/{types/components → components}/datepicker/index.d.ts +2 -2
  19. package/dist/{types/components → components}/field/components/field.d.ts +11 -11
  20. package/dist/{types/components → components}/field/components/input-field.d.ts +12 -12
  21. package/dist/{types/components → components}/field/components/textarea-field.d.ts +12 -12
  22. package/dist/{types/components → components}/field/index.d.ts +6 -6
  23. package/dist/{types/components → components}/header/components/header.d.ts +10 -10
  24. package/dist/{types/components → components}/header/components/logo.d.ts +2 -2
  25. package/dist/{types/components → components}/header/components/profile.d.ts +8 -8
  26. package/dist/{types/components → components}/header/components/switch-mode.d.ts +3 -3
  27. package/dist/{types/components → components}/header/components/version.d.ts +9 -9
  28. package/dist/{types/components → components}/header/index.d.ts +3 -3
  29. package/dist/components/header/stories/header.stories.d.ts +10 -0
  30. package/dist/{types/components → components}/header/types.d.ts +10 -10
  31. package/dist/{types/components → components}/header/utils/formatter.d.ts +2 -2
  32. package/dist/{types/components → components}/index.d.ts +11 -11
  33. package/dist/{types/components → components}/modal/components/modal-close-button.d.ts +4 -4
  34. package/dist/{types/components → components}/modal/components/modal-footer.d.ts +4 -4
  35. package/dist/{types/components → components}/modal/components/modal-header.d.ts +4 -4
  36. package/dist/{types/components → components}/modal/index.d.ts +4 -4
  37. package/dist/components/modal/stories/modal.stories.d.ts +10 -0
  38. package/dist/{types/components → components}/navigation/components/navigation.d.ts +10 -10
  39. package/dist/{types/components → components}/navigation/index.d.ts +2 -2
  40. package/dist/components/navigation/stories/navigation.stories.d.ts +10 -0
  41. package/dist/{types/components → components}/navigation/types.d.ts +8 -8
  42. package/dist/{types/components → components}/pagination/components/pagination-button-trigger.d.ts +10 -10
  43. package/dist/{types/components → components}/pagination/components/pagination-button.d.ts +6 -6
  44. package/dist/{types/components → components}/pagination/components/pagination-detail.d.ts +10 -10
  45. package/dist/{types/components → components}/pagination/components/pagination-filter.d.ts +13 -13
  46. package/dist/{types/components → components}/pagination/components/pagination.d.ts +16 -16
  47. package/dist/{types/components → components}/pagination/index.d.ts +6 -6
  48. package/dist/components/pagination/stories/pagination.stories.d.ts +13 -0
  49. package/dist/{types/components → components}/select/components/select-async-creatable.d.ts +4 -4
  50. package/dist/{types/components → components}/select/components/select-async.d.ts +5 -5
  51. package/dist/{types/components → components}/select/components/select-creatable.d.ts +4 -4
  52. package/dist/{types/components → components}/select/components/select.d.ts +4 -4
  53. package/dist/{types/components → components}/select/components/utils.d.ts +26 -26
  54. package/dist/{types/components → components}/select/index.d.ts +8 -8
  55. package/dist/components/select/stories/select.stories.d.ts +13 -0
  56. package/dist/{types/components → components}/tabs/components/tab-list.d.ts +3 -3
  57. package/dist/{types/components → components}/tabs/components/tab-panel.d.ts +3 -3
  58. package/dist/{types/components → components}/tabs/components/tab.d.ts +11 -11
  59. package/dist/{types/components → components}/tabs/index.d.ts +4 -4
  60. package/dist/components/tabs/stories/tabs.stories.d.ts +10 -0
  61. package/dist/{types/components → components}/uploader/components/uploader.d.ts +12 -12
  62. package/dist/{types/components → components}/uploader/constants.d.ts +8 -8
  63. package/dist/{types/components → components}/uploader/index.d.ts +2 -2
  64. package/dist/components/uploader/stories/uploader.stories.d.ts +12 -0
  65. package/dist/config/foundations.stories.d.ts +13 -0
  66. package/dist/{types/config → config}/index.d.ts +1 -1
  67. package/dist/{types/config → config}/theme/components/button.d.ts +3 -3
  68. package/dist/{types/config → config}/theme/components/checkbox.d.ts +3 -3
  69. package/dist/{types/config → config}/theme/components/form-label.d.ts +19 -19
  70. package/dist/{types/config → config}/theme/components/index.d.ts +8 -8
  71. package/dist/{types/config → config}/theme/components/input.d.ts +114 -114
  72. package/dist/{types/config → config}/theme/components/popover.d.ts +3 -3
  73. package/dist/{types/config → config}/theme/components/radio.d.ts +3 -3
  74. package/dist/{types/config → config}/theme/components/switch.d.ts +32 -32
  75. package/dist/{types/config → config}/theme/components/textarea.d.ts +3 -3
  76. package/dist/config/theme/foundations/colors.d.ts +158 -0
  77. package/dist/{types/config → config}/theme/foundations/index.d.ts +5 -5
  78. package/dist/{types/config → config}/theme/foundations/radius.d.ts +8 -8
  79. package/dist/{types/config → config}/theme/foundations/sizes.d.ts +66 -66
  80. package/dist/{types/config → config}/theme/foundations/spacing.d.ts +42 -42
  81. package/dist/{types/config → config}/theme/foundations/typography.d.ts +173 -173
  82. package/dist/{types/config → config}/theme/index.d.ts +1 -1
  83. package/dist/{types/config → config}/theme/themeConfiguration.d.ts +4 -4
  84. package/dist/hooks/index.d.ts +1 -0
  85. package/dist/hooks/useFetcher.d.ts +4 -0
  86. package/dist/{types/index.d.ts → index.d.ts} +3 -3
  87. package/dist/index.js +6 -892
  88. package/dist/interfaces/common.d.ts +17 -0
  89. package/dist/internal-ui.cjs.development.js +3279 -0
  90. package/dist/internal-ui.cjs.development.js.map +1 -0
  91. package/dist/internal-ui.cjs.production.min.js +10 -0
  92. package/dist/internal-ui.cjs.production.min.js.map +1 -0
  93. package/dist/internal-ui.esm.js +3008 -0
  94. package/dist/internal-ui.esm.js.map +1 -0
  95. package/dist/{types/provider → provider}/index.d.ts +2 -2
  96. package/dist/{types/provider → provider}/provider.d.ts +6 -6
  97. package/dist/provider/provider.stories.d.ts +5 -0
  98. package/dist/provider/types.d.ts +14 -0
  99. package/package.json +8 -7
  100. package/dist/index.mjs +0 -20509
  101. package/dist/types/config/theme/foundations/colors.d.ts +0 -158
  102. package/dist/types/provider/types.d.ts +0 -14
@@ -0,0 +1,3008 @@
1
+ import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, FormControl, FormLabel as FormLabel$1, InputRightElement, FormHelperText, FormErrorMessage, InputLeftAddon, InputLeftElement, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Badge, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, Icon, Portal, Link, forwardRef as forwardRef$1, Button as Button$1, VisuallyHidden, Select as Select$1, theme as theme$1, useTab, useMultiStyleConfig, TabList as TabList$1, TabPanel as TabPanel$1, Stack, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, extendTheme } from '@chakra-ui/react';
2
+ export { AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, Modal, ModalBody, ModalContent, ModalContextProvider, ModalFocusScope, ModalOverlay, TabIndicator, TabPanels, Tabs, TabsDescendantsProvider, TabsProvider, useDrawerContext, useModal, useModalContext, useModalStyles, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles } from '@chakra-ui/react';
3
+ import React__default, { createElement, useRef, useEffect, useState, useMemo, Fragment, forwardRef, useCallback, createContext, useContext } from 'react';
4
+ import { FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiChevronDown } from 'react-icons/fi';
5
+ import { ChevronUpIcon, ChevronDownIcon, UpDownIcon, ArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, ArrowRightIcon } from '@chakra-ui/icons';
6
+ import { css, Global } from '@emotion/react';
7
+ import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
8
+ import classnames from 'classnames';
9
+ import ReactDatePicker from 'react-datepicker';
10
+ import { useColorMode } from '@chakra-ui/system';
11
+ import ReactSelect from 'react-select';
12
+ import { AsyncPaginate } from 'react-select-async-paginate';
13
+ import ReactSelectCreatable from 'react-select/creatable';
14
+ import ReactSelectAsyncCreatable from 'react-select/async-creatable';
15
+ import { useDropzone } from 'react-dropzone';
16
+ import { mode, getColor } from '@chakra-ui/theme-tools';
17
+ import { checkboxAnatomy, inputAnatomy, radioAnatomy, switchAnatomy, popoverAnatomy } from '@chakra-ui/anatomy';
18
+ import { createMultiStyleConfigHelpers, cssVar, defineStyleConfig, defineStyle } from '@chakra-ui/styled-system';
19
+ import axios from 'axios';
20
+
21
+ /* eslint-disable react-hooks/rules-of-hooks */
22
+ const BreadCrumb = props => {
23
+ const {
24
+ title,
25
+ children,
26
+ parents,
27
+ className,
28
+ disableHome,
29
+ spacing = 2
30
+ } = props;
31
+ const [neutral7, dark5] = useToken('colors', ['neutral.700', 'dark.500']);
32
+ return /*#__PURE__*/createElement(Box, {
33
+ "data-test-id": "CT_component_breadcrumb_breadcrumb",
34
+ className: className,
35
+ display: "flex",
36
+ justifyContent: "space-between",
37
+ alignItems: "center",
38
+ paddingY: 2
39
+ }, /*#__PURE__*/createElement(Box, {
40
+ display: "flex",
41
+ alignItems: "center"
42
+ }, /*#__PURE__*/createElement(Text, {
43
+ pr: 2,
44
+ fontWeight: 500,
45
+ textStyle: "heading.3",
46
+ color: useColorModeValue('neutral.700', 'white')
47
+ }, title), /*#__PURE__*/createElement(Box, {
48
+ h: "22px",
49
+ borderLeft: "1px solid",
50
+ borderColor: useColorModeValue('neutral.700', 'white')
51
+ }), /*#__PURE__*/createElement(Breadcrumb, {
52
+ separator: /*#__PURE__*/createElement(FiChevronsRight, {
53
+ color: useColorModeValue(neutral7, dark5),
54
+ size: 14
55
+ }),
56
+ pl: 2.5,
57
+ pr: 4,
58
+ spacing: spacing,
59
+ sx: {
60
+ ol: {
61
+ display: 'flex',
62
+ alignItems: 'center'
63
+ }
64
+ },
65
+ display: "flex",
66
+ alignItems: "center",
67
+ className: "breadcrumb-wrapper"
68
+ }, /*#__PURE__*/createElement(BreadcrumbItem, null, /*#__PURE__*/createElement(BreadcrumbLink, {
69
+ href: !disableHome ? '/' : undefined,
70
+ style: {
71
+ ...(disableHome && {
72
+ cursor: 'default'
73
+ })
74
+ }
75
+ }, /*#__PURE__*/createElement(FiHome, {
76
+ className: "align-top",
77
+ size: 16,
78
+ color: useColorModeValue('#12784A', '#ffffff')
79
+ }))), parents === null || parents === void 0 ? void 0 : parents.map(val => /*#__PURE__*/createElement(BreadcrumbItem, {
80
+ key: val.name
81
+ }, /*#__PURE__*/createElement(BreadcrumbLink, {
82
+ "data-test-id": "iadKcMAul3QAdvmfIQjRE",
83
+ href: !val.disable ? val.link : undefined,
84
+ onClick: val.onClick,
85
+ style: {
86
+ ...(val.disable && {
87
+ cursor: 'default'
88
+ })
89
+ },
90
+ _hover: {
91
+ textDecoration: 'none'
92
+ }
93
+ }, /*#__PURE__*/createElement(Text, {
94
+ color: val.disable ? 'dark.600' : useColorModeValue('primary.500', 'white'),
95
+ fontSize: "text.sm",
96
+ fontWeight: 400
97
+ }, val.name)))), /*#__PURE__*/createElement(BreadcrumbItem, null, /*#__PURE__*/createElement(BreadcrumbLink, {
98
+ _hover: {
99
+ textDecor: 'none',
100
+ cursor: 'default'
101
+ }
102
+ }, /*#__PURE__*/createElement(Text, {
103
+ color: useColorModeValue('dark.700', 'white'),
104
+ fontSize: "text.sm",
105
+ fontWeight: 400
106
+ }, title))))), children && /*#__PURE__*/createElement(Box, null, children));
107
+ };
108
+ BreadCrumb.defaultProps = {
109
+ children: undefined,
110
+ parents: undefined,
111
+ className: undefined,
112
+ disableHome: undefined,
113
+ spacing: 2
114
+ };
115
+
116
+ const IndeterminateCheckbox = ({
117
+ indeterminate = false,
118
+ ...rest
119
+ }) => {
120
+ const ref = useRef(null);
121
+ useEffect(() => {
122
+ if (ref.current && typeof indeterminate === 'boolean') {
123
+ ref.current.indeterminate = !rest.checked && indeterminate;
124
+ }
125
+ }, [ref, indeterminate]);
126
+ return /*#__PURE__*/createElement(Flex, {
127
+ align: "center"
128
+ }, /*#__PURE__*/createElement("input", Object.assign({
129
+ type: "checkbox",
130
+ ref: ref
131
+ }, rest)));
132
+ };
133
+
134
+ /* eslint-disable react-hooks/rules-of-hooks */
135
+ const DataTable = ({
136
+ columns,
137
+ dataSource = [],
138
+ isLoading,
139
+ withSelectedRow,
140
+ onSelectedRow,
141
+ onSort,
142
+ manualSorting,
143
+ sortingState,
144
+ styles,
145
+ ...props
146
+ }) => {
147
+ const [sorting, setSorting] = useState(sortingState !== null && sortingState !== void 0 ? sortingState : []);
148
+ const [rowSelection, onRowSelectionChange] = useState({});
149
+ const dataColumns = useMemo(() => columns, [columns]);
150
+ const checkboxColumn = useMemo(() => [{
151
+ id: 'select',
152
+ header: ({
153
+ table
154
+ }) => /*#__PURE__*/createElement(IndeterminateCheckbox, Object.assign({}, {
155
+ checked: table.getIsAllRowsSelected(),
156
+ indeterminate: table.getIsSomeRowsSelected(),
157
+ onChange: table.getToggleAllRowsSelectedHandler()
158
+ })),
159
+ cell: ({
160
+ row
161
+ }) => /*#__PURE__*/createElement(IndeterminateCheckbox, Object.assign({}, {
162
+ checked: row.getIsSelected(),
163
+ indeterminate: row.getIsSomeSelected(),
164
+ onChange: row.getToggleSelectedHandler()
165
+ }))
166
+ }], []);
167
+ const generateColumn = () => {
168
+ if (withSelectedRow) {
169
+ return [...checkboxColumn, ...dataColumns];
170
+ }
171
+ return dataColumns;
172
+ };
173
+ const onSortingChange = data => {
174
+ setSorting(data);
175
+ if (onSort) {
176
+ onSort(data);
177
+ }
178
+ };
179
+ const table = useReactTable({
180
+ data: dataSource,
181
+ columns: generateColumn(),
182
+ getCoreRowModel: getCoreRowModel(),
183
+ getSortedRowModel: getSortedRowModel(),
184
+ manualPagination: true,
185
+ sortDescFirst: true,
186
+ state: {
187
+ sorting,
188
+ rowSelection
189
+ },
190
+ onRowSelectionChange,
191
+ onSortingChange,
192
+ manualSorting
193
+ });
194
+ const {
195
+ flatRows
196
+ } = table.getSelectedRowModel();
197
+ useEffect(() => {
198
+ const rowData = flatRows.map(row => row.original);
199
+ if (onSelectedRow) {
200
+ onSelectedRow(rowData);
201
+ }
202
+ }, [flatRows]);
203
+ return /*#__PURE__*/createElement(Box, Object.assign({}, props), isLoading && /*#__PURE__*/createElement(Flex, {
204
+ w: "100%",
205
+ h: "100%",
206
+ pos: "absolute",
207
+ bg: "white",
208
+ align: "center",
209
+ justify: "center",
210
+ zIndex: 2
211
+ }, /*#__PURE__*/createElement(Spinner, {
212
+ color: "primary.500",
213
+ thickness: "4px",
214
+ size: "lg"
215
+ })), /*#__PURE__*/createElement(Table, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.table), /*#__PURE__*/createElement(Thead, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.tableHead), table.getHeaderGroups().map(headerGroup => /*#__PURE__*/createElement(Tr, Object.assign({
216
+ key: headerGroup.id,
217
+ bg: useColorModeValue('initial', 'ebony-clay.700')
218
+ }, styles === null || styles === void 0 ? void 0 : styles.tableRow), headerGroup.headers.map(header => {
219
+ var _ref;
220
+ return /*#__PURE__*/createElement(Th, Object.assign({
221
+ key: header.id,
222
+ colSpan: header.colSpan
223
+ }, styles === null || styles === void 0 ? void 0 : styles.tableColumnHeader), /*#__PURE__*/createElement(Flex, {
224
+ "data-test-id": `CT_Container_TableHeader_${header.id}`,
225
+ textTransform: "capitalize",
226
+ userSelect: "none",
227
+ align: "center",
228
+ justifyContent: "space-between",
229
+ onClick: header.column.getToggleSortingHandler(),
230
+ cursor: header.column.getCanSort() ? 'pointer' : 'default'
231
+ }, /*#__PURE__*/createElement(Text, {
232
+ fontSize: "text.sm",
233
+ fontWeight: 400,
234
+ lineHeight: "18px",
235
+ color: useColorModeValue('neutral.900', 'white')
236
+ }, flexRender(header.column.columnDef.header, header.getContext())), /*#__PURE__*/createElement(Box, {
237
+ as: "span",
238
+ pl: "2",
239
+ "data-test-id": `CT_Container_SortingIcon_${header.id}`
240
+ }, (_ref = header.column.getCanSort() && {
241
+ asc: /*#__PURE__*/createElement(ChevronUpIcon, null),
242
+ desc: /*#__PURE__*/createElement(ChevronDownIcon, null)
243
+ }[header.column.getIsSorted()]) !== null && _ref !== void 0 ? _ref : /*#__PURE__*/createElement(UpDownIcon, {
244
+ h: 2
245
+ }))));
246
+ })))), /*#__PURE__*/createElement(Tbody, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.tableBody), table.getRowModel().rows.map(row => /*#__PURE__*/createElement(Tr, Object.assign({
247
+ key: row.id
248
+ }, styles === null || styles === void 0 ? void 0 : styles.tableRow, {
249
+ css: css`
250
+ &:last-child {
251
+ td {
252
+ border-bottom: none;
253
+ }
254
+ }
255
+ `
256
+ }), row.getVisibleCells().map(cell => /*#__PURE__*/createElement(Td, Object.assign({
257
+ key: cell.id,
258
+ fontSize: "text.sm",
259
+ color: useColorModeValue('dark.800', 'dark.300')
260
+ }, styles === null || styles === void 0 ? void 0 : styles.tableCell), flexRender(cell.column.columnDef.cell, cell.getContext()))))))));
261
+ };
262
+ /* eslint-disable react/default-props-match-prop-types */
263
+ DataTable.defaultProps = {
264
+ withSelectedRow: false,
265
+ overflowX: 'scroll',
266
+ pos: 'relative',
267
+ maxW: '100%',
268
+ minH: 400,
269
+ w: 'full',
270
+ styles: undefined,
271
+ isLoading: undefined,
272
+ onSelectedRow: undefined,
273
+ onSort: undefined,
274
+ manualSorting: false,
275
+ sortingState: []
276
+ };
277
+
278
+ const Styles = () => {
279
+ const {
280
+ colorMode
281
+ } = useColorMode();
282
+ return React.createElement(Global, {
283
+ styles: `
284
+ @charset "UTF-8";
285
+ .react-datepicker__year-read-view--down-arrow,
286
+ .react-datepicker__month-read-view--down-arrow,
287
+ .react-datepicker__month-year-read-view--down-arrow, .react-datepicker__navigation-icon::before {
288
+ border-color: ${colorMode === 'light' ? '#6E6B7B' : '#d0d1d2'};
289
+ border-style: solid;
290
+ border-width: 1px 1px 0 0;
291
+ content: "";
292
+ display: block;
293
+ height: 7px;
294
+ position: absolute;
295
+ top: 13px;
296
+ width: 7px;
297
+ }
298
+ .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {
299
+ margin-left: -4px;
300
+ position: absolute;
301
+ width: 0;
302
+ }
303
+ .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 {
304
+ box-sizing: content-box;
305
+ position: absolute;
306
+ border: 8px solid transparent;
307
+ height: 0;
308
+ width: 1px;
309
+ content: "";
310
+ z-index: -1;
311
+ border-width: 8px;
312
+ left: -8px;
313
+ }
314
+ .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {
315
+ border-bottom-color: #aeaeae;
316
+ }
317
+
318
+ .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle {
319
+ top: 0;
320
+ margin-top: -8px;
321
+ }
322
+ .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {
323
+ border-top: none;
324
+ border-bottom-color: #f0f0f0;
325
+ }
326
+ .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::after {
327
+ top: 0;
328
+ }
329
+ .react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle::before {
330
+ top: -1px;
331
+ border-bottom-color: #aeaeae;
332
+ }
333
+
334
+ .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle {
335
+ bottom: 0;
336
+ margin-bottom: -8px;
337
+ }
338
+ .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before, .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {
339
+ border-bottom: none;
340
+ border-top-color: #fff;
341
+ }
342
+ .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::after {
343
+ bottom: 0;
344
+ }
345
+ .react-datepicker-popper[data-placement^=top] .react-datepicker__triangle::before {
346
+ bottom: -1px;
347
+ border-top-color: #aeaeae;
348
+ }
349
+
350
+ .react-datepicker-wrapper {
351
+ display: inline-block;
352
+ padding: 0;
353
+ border: 0;
354
+ width: 100%;
355
+ }
356
+
357
+ .react-datepicker {
358
+ font-family: "inherit", helvetica, arial, sans-serif;
359
+ font-size: 0.75;
360
+ background-color: ${colorMode === 'light' ? '#ffffff' : '#283046'};
361
+ color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
362
+ filter: drop-shadow(0px 3px 10px rgba(0, 0, 0, 0.08));
363
+ border-radius: 0.3rem;
364
+ display: inline-block;
365
+ position: relative;
366
+ }
367
+
368
+ .react-datepicker.inline {
369
+ filter: none;
370
+ }
371
+
372
+ .react-datepicker--time-only .react-datepicker__triangle {
373
+ left: 35px;
374
+ }
375
+ .react-datepicker--time-only .react-datepicker__time-container {
376
+ border-left: 0;
377
+ }
378
+ .react-datepicker--time-only .react-datepicker__time,
379
+ .react-datepicker--time-only .react-datepicker__time-box {
380
+ border-bottom-left-radius: 0.3rem;
381
+ border-bottom-right-radius: 0.3rem;
382
+ }
383
+
384
+ .react-datepicker__triangle {
385
+ position: absolute;
386
+ left: 50px;
387
+ }
388
+
389
+ .react-datepicker-popper {
390
+ z-index: 1;
391
+ }
392
+ .react-datepicker-popper[data-placement^=bottom] {
393
+ padding-top: 10px;
394
+ }
395
+ .react-datepicker-popper[data-placement=bottom-end] .react-datepicker__triangle, .react-datepicker-popper[data-placement=top-end] .react-datepicker__triangle {
396
+ left: auto;
397
+ right: 50px;
398
+ }
399
+ .react-datepicker-popper[data-placement^=top] {
400
+ padding-bottom: 10px;
401
+ }
402
+ .react-datepicker-popper[data-placement^=right] {
403
+ padding-left: 8px;
404
+ }
405
+ .react-datepicker-popper[data-placement^=right] .react-datepicker__triangle {
406
+ left: auto;
407
+ right: 42px;
408
+ }
409
+ .react-datepicker-popper[data-placement^=left] {
410
+ padding-right: 8px;
411
+ }
412
+ .react-datepicker-popper[data-placement^=left] .react-datepicker__triangle {
413
+ left: 42px;
414
+ right: auto;
415
+ }
416
+
417
+ .react-datepicker__header {
418
+ text-align: center;
419
+ background-color: ${colorMode === 'light' ? '#ffffff' : '#131620'};
420
+ border-top-left-radius: 0.3rem;
421
+ padding: 8px 0;
422
+ position: relative;
423
+ }
424
+ .react-datepicker__header--time {
425
+ padding-bottom: 8px;
426
+ padding-left: 5px;
427
+ padding-right: 5px;
428
+ }
429
+ .react-datepicker__header--time:not(.react-datepicker__header--time--only) {
430
+ border-top-left-radius: 0;
431
+ }
432
+ .react-datepicker__header:not(.react-datepicker__header--has-time-select) {
433
+ border-top-right-radius: 0.3rem;
434
+ }
435
+
436
+ .react-datepicker__year-dropdown-container--select,
437
+ .react-datepicker__month-dropdown-container--select,
438
+ .react-datepicker__month-year-dropdown-container--select,
439
+ .react-datepicker__year-dropdown-container--scroll,
440
+ .react-datepicker__month-dropdown-container--scroll,
441
+ .react-datepicker__month-year-dropdown-container--scroll {
442
+ display: inline-block;
443
+ margin: 0 2px;
444
+ }
445
+
446
+ .react-datepicker__current-month,
447
+ .react-datepicker-time__header,
448
+ .react-datepicker-year-header {
449
+ margin-top: 0;
450
+ color: ${colorMode === 'light' ? '#111111' : '#d0d1d2'};
451
+ font-size: 0.75;
452
+ }
453
+
454
+ .react-datepicker-time__header {
455
+ text-overflow: ellipsis;
456
+ white-space: nowrap;
457
+ overflow: hidden;
458
+ }
459
+
460
+ .react-datepicker__navigation {
461
+ align-items: center;
462
+ background: none;
463
+ display: flex;
464
+ justify-content: center;
465
+ text-align: center;
466
+ cursor: pointer;
467
+ position: absolute;
468
+ top: 2px;
469
+ padding: 0;
470
+ border: none;
471
+ z-index: 1;
472
+ height: 32px;
473
+ width: 32px;
474
+ text-indent: -999em;
475
+ overflow: hidden;
476
+ }
477
+ .react-datepicker__navigation--previous {
478
+ left: 2px;
479
+ }
480
+ .react-datepicker__navigation--next {
481
+ right: 2px;
482
+ }
483
+ .react-datepicker__navigation--next--with-time:not(.react-datepicker__navigation--next--with-today-button) {
484
+ right: 85px;
485
+ }
486
+ .react-datepicker__navigation--years {
487
+ position: relative;
488
+ top: 0;
489
+ display: block;
490
+ margin-left: auto;
491
+ margin-right: auto;
492
+ }
493
+ .react-datepicker__navigation--years-previous {
494
+ top: 4px;
495
+ }
496
+ .react-datepicker__navigation--years-upcoming {
497
+ top: -4px;
498
+ }
499
+ .react-datepicker__navigation:hover *::before {
500
+ border-color: #a6a6a6;
501
+ }
502
+
503
+ .react-datepicker__navigation-icon {
504
+ position: relative;
505
+ top: -1px;
506
+ font-size: 20px;
507
+ width: 0;
508
+ }
509
+ .react-datepicker__navigation-icon--next {
510
+ left: -2px;
511
+ }
512
+ .react-datepicker__navigation-icon--next::before {
513
+ transform: rotate(45deg);
514
+ left: -7px;
515
+ }
516
+ .react-datepicker__navigation-icon--previous {
517
+ right: -2px;
518
+ }
519
+ .react-datepicker__navigation-icon--previous::before {
520
+ transform: rotate(225deg);
521
+ right: -7px;
522
+ }
523
+
524
+ .react-datepicker__month-container {
525
+ float: left;
526
+ border-radius: 8px;
527
+ }
528
+
529
+ .react-datepicker__year {
530
+ margin: 0.4rem;
531
+ text-align: center;
532
+ }
533
+ .react-datepicker__year-wrapper {
534
+ display: flex;
535
+ flex-wrap: wrap;
536
+ max-width: 180px;
537
+ }
538
+ .react-datepicker__year .react-datepicker__year-text {
539
+ display: inline-block;
540
+ width: 4rem;
541
+ margin: 2px;
542
+ }
543
+
544
+ .react-datepicker__month {
545
+ margin: 0.4rem;
546
+ text-align: center;
547
+ }
548
+ .react-datepicker__month .react-datepicker__month-text,
549
+ .react-datepicker__month .react-datepicker__quarter-text {
550
+ display: inline-block;
551
+ width: 4rem;
552
+ margin: 2px;
553
+ }
554
+
555
+ .react-datepicker__input-time-container {
556
+ width: 100%;
557
+ }
558
+ .react-datepicker__input-time-container .react-datepicker-time__caption {
559
+ width: 100%;
560
+ display: inline-block;
561
+ }
562
+ .react-datepicker__input-time-container .react-datepicker-time__input-container {
563
+ width: 100%;
564
+ display: inline-block;
565
+ }
566
+ .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input {
567
+ width: 100%;
568
+ display: inline-block;
569
+ }
570
+ .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input {
571
+ width: auto;
572
+ }
573
+ .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-inner-spin-button,
574
+ .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time]::-webkit-outer-spin-button {
575
+ -webkit-appearance: none;
576
+ margin: 0;
577
+ }
578
+ .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__input input[type=time] {
579
+ -moz-appearance: textfield;
580
+ }
581
+ .react-datepicker__input-time-container .react-datepicker-time__input-container .react-datepicker-time__delimiter {
582
+ width: 100%;
583
+ display: inline-block;
584
+ }
585
+
586
+ .react-datepicker__time-container {
587
+ float: right;
588
+ border-left: 1px solid #aeaeae;
589
+ width: 85px;
590
+ }
591
+ .react-datepicker__time-container--with-today-button {
592
+ display: inline;
593
+ border: 1px solid #aeaeae;
594
+ border-radius: 0.3rem;
595
+ position: absolute;
596
+ right: -72px;
597
+ top: 0;
598
+ }
599
+ .react-datepicker__time-container .react-datepicker__time {
600
+ position: relative;
601
+ background: white;
602
+ border-bottom-right-radius: 0.3rem;
603
+ }
604
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {
605
+ width: 85px;
606
+ overflow-x: hidden;
607
+ margin: 0 auto;
608
+ text-align: center;
609
+ border-bottom-right-radius: 0.3rem;
610
+ }
611
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list {
612
+ list-style: none;
613
+ margin: 0;
614
+ height: calc(195px + (1.7rem / 2));
615
+ overflow-y: scroll;
616
+ padding-right: 0;
617
+ padding-left: 0;
618
+ width: 100%;
619
+ box-sizing: content-box;
620
+ }
621
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item {
622
+ height: 30px;
623
+ padding: 5px 10px;
624
+ white-space: nowrap;
625
+ }
626
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item:hover {
627
+ cursor: pointer;
628
+ background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
629
+ }
630
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected {
631
+ background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
632
+ color: white;
633
+ font-weight: bold;
634
+ }
635
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected:hover {
636
+ background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
637
+ }
638
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled {
639
+ color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};
640
+ }
641
+ .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--disabled:hover {
642
+ cursor: default;
643
+ background-color: transparent;
644
+ }
645
+
646
+ .react-datepicker__week-number {
647
+ color: ${colorMode === 'light' ? '#ccc' : '#d0d1d2'};
648
+ display: inline-block;
649
+ width: 1.7rem;
650
+ line-height: 1.7rem;
651
+ text-align: center;
652
+ margin: 0.166rem;
653
+ }
654
+ .react-datepicker__week-number.react-datepicker__week-number--clickable {
655
+ cursor: pointer;
656
+ }
657
+ .react-datepicker__week-number.react-datepicker__week-number--clickable:hover {
658
+ border-radius: 0.3rem;
659
+ background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
660
+ }
661
+
662
+ .react-datepicker__day-names,
663
+ .react-datepicker__week {
664
+ white-space: nowrap;
665
+ }
666
+
667
+ .react-datepicker__day-names {
668
+ margin-bottom: 0px;
669
+ }
670
+
671
+ .react-datepicker__day-name,
672
+ .react-datepicker__day,
673
+ .react-datepicker__time-name {
674
+ color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
675
+ display: inline-block;
676
+ width: 1.7rem;
677
+ line-height: 1.7rem;
678
+ text-align: center;
679
+ padding: 0.166rem;
680
+ }
681
+
682
+ .react-datepicker__month--selected, .react-datepicker__month--in-selecting-range, .react-datepicker__month--in-range,
683
+ .react-datepicker__quarter--selected,
684
+ .react-datepicker__quarter--in-selecting-range,
685
+ .react-datepicker__quarter--in-range {
686
+ border-radius: 0.3rem;
687
+ background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
688
+ color: #fff;
689
+ }
690
+ .react-datepicker__month--selected:hover, .react-datepicker__month--in-selecting-range:hover, .react-datepicker__month--in-range:hover,
691
+ .react-datepicker__quarter--selected:hover,
692
+ .react-datepicker__quarter--in-selecting-range:hover,
693
+ .react-datepicker__quarter--in-range:hover {
694
+ background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
695
+ }
696
+ .react-datepicker__month--disabled,
697
+ .react-datepicker__quarter--disabled {
698
+ color: #ccc;
699
+ pointer-events: none;
700
+ }
701
+ .react-datepicker__month--disabled:hover,
702
+ .react-datepicker__quarter--disabled:hover {
703
+ cursor: default;
704
+ background-color: transparent;
705
+ }
706
+
707
+ .react-datepicker__day,
708
+ .react-datepicker__month-text,
709
+ .react-datepicker__quarter-text,
710
+ .react-datepicker__year-text {
711
+ cursor: pointer;
712
+ }
713
+ .react-datepicker__day:hover,
714
+ .react-datepicker__month-text:hover,
715
+ .react-datepicker__quarter-text:hover,
716
+ .react-datepicker__year-text:hover {
717
+ border-radius: 0.3rem;
718
+ background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
719
+ }
720
+ .react-datepicker__day--highlighted,
721
+ .react-datepicker__month-text--highlighted,
722
+ .react-datepicker__quarter-text--highlighted,
723
+ .react-datepicker__year-text--highlighted {
724
+ border-radius: 0.3rem;
725
+ background-color: #3dcc4a;
726
+ color: #fff;
727
+ }
728
+ .react-datepicker__day--highlighted:hover,
729
+ .react-datepicker__month-text--highlighted:hover,
730
+ .react-datepicker__quarter-text--highlighted:hover,
731
+ .react-datepicker__year-text--highlighted:hover {
732
+ background-color: #32be3f;
733
+ }
734
+ .react-datepicker__day--highlighted-custom-1,
735
+ .react-datepicker__month-text--highlighted-custom-1,
736
+ .react-datepicker__quarter-text--highlighted-custom-1,
737
+ .react-datepicker__year-text--highlighted-custom-1 {
738
+ color: magenta;
739
+ }
740
+ .react-datepicker__day--highlighted-custom-2,
741
+ .react-datepicker__month-text--highlighted-custom-2,
742
+ .react-datepicker__quarter-text--highlighted-custom-2,
743
+ .react-datepicker__year-text--highlighted-custom-2 {
744
+ color: green;
745
+ }
746
+ .react-datepicker__day--selected, .react-datepicker__day--in-selecting-range, .react-datepicker__day--in-range,
747
+ .react-datepicker__month-text--selected,
748
+ .react-datepicker__month-text--in-selecting-range,
749
+ .react-datepicker__month-text--in-range,
750
+ .react-datepicker__quarter-text--selected,
751
+ .react-datepicker__quarter-text--in-selecting-range,
752
+ .react-datepicker__quarter-text--in-range,
753
+ .react-datepicker__year-text--selected,
754
+ .react-datepicker__year-text--in-selecting-range,
755
+ .react-datepicker__year-text--in-range {
756
+ border-radius: 0.3rem;
757
+ background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
758
+ color: #fff;
759
+ }
760
+ .react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,
761
+ .react-datepicker__month-text--selected:hover,
762
+ .react-datepicker__month-text--in-selecting-range:hover,
763
+ .react-datepicker__month-text--in-range:hover,
764
+ .react-datepicker__quarter-text--selected:hover,
765
+ .react-datepicker__quarter-text--in-selecting-range:hover,
766
+ .react-datepicker__quarter-text--in-range:hover,
767
+ .react-datepicker__year-text--selected:hover,
768
+ .react-datepicker__year-text--in-selecting-range:hover,
769
+ .react-datepicker__year-text--in-range:hover {
770
+ background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
771
+ }
772
+ .react-datepicker__day--keyboard-selected,
773
+ .react-datepicker__month-text--keyboard-selected,
774
+ .react-datepicker__quarter-text--keyboard-selected,
775
+ .react-datepicker__year-text--keyboard-selected {
776
+ border-radius: 0.3rem;
777
+ background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
778
+ color: #fff;
779
+ }
780
+ .react-datepicker__day--keyboard-selected:hover,
781
+ .react-datepicker__month-text--keyboard-selected:hover,
782
+ .react-datepicker__quarter-text--keyboard-selected:hover,
783
+ .react-datepicker__year-text--keyboard-selected:hover {
784
+ background-color: ${colorMode === 'light' ? '#075331' : '#131620'};
785
+ }
786
+ .react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,
787
+ .react-datepicker__month-text--in-range,
788
+ .react-datepicker__quarter-text--in-range,
789
+ .react-datepicker__year-text--in-range),
790
+ .react-datepicker__month-text--in-selecting-range:not(.react-datepicker__day--in-range,
791
+ .react-datepicker__month-text--in-range,
792
+ .react-datepicker__quarter-text--in-range,
793
+ .react-datepicker__year-text--in-range),
794
+ .react-datepicker__quarter-text--in-selecting-range:not(.react-datepicker__day--in-range,
795
+ .react-datepicker__month-text--in-range,
796
+ .react-datepicker__quarter-text--in-range,
797
+ .react-datepicker__year-text--in-range),
798
+ .react-datepicker__year-text--in-selecting-range:not(.react-datepicker__day--in-range,
799
+ .react-datepicker__month-text--in-range,
800
+ .react-datepicker__quarter-text--in-range,
801
+ .react-datepicker__year-text--in-range) {
802
+ background-color: rgba(18, 120, 74, 0.1);
803
+ color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
804
+ }
805
+ .react-datepicker__month--selecting-range .react-datepicker__day--in-range:not(.react-datepicker__day--in-selecting-range,
806
+ .react-datepicker__month-text--in-selecting-range,
807
+ .react-datepicker__quarter-text--in-selecting-range,
808
+ .react-datepicker__year-text--in-selecting-range),
809
+ .react-datepicker__month--selecting-range .react-datepicker__month-text--in-range:not(.react-datepicker__day--in-selecting-range,
810
+ .react-datepicker__month-text--in-selecting-range,
811
+ .react-datepicker__quarter-text--in-selecting-range,
812
+ .react-datepicker__year-text--in-selecting-range),
813
+ .react-datepicker__month--selecting-range .react-datepicker__quarter-text--in-range:not(.react-datepicker__day--in-selecting-range,
814
+ .react-datepicker__month-text--in-selecting-range,
815
+ .react-datepicker__quarter-text--in-selecting-range,
816
+ .react-datepicker__year-text--in-selecting-range),
817
+ .react-datepicker__month--selecting-range .react-datepicker__year-text--in-range:not(.react-datepicker__day--in-selecting-range,
818
+ .react-datepicker__month-text--in-selecting-range,
819
+ .react-datepicker__quarter-text--in-selecting-range,
820
+ .react-datepicker__year-text--in-selecting-range) {
821
+ background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
822
+ color: ${colorMode === 'light' ? '#000' : '#d0d1d2'};
823
+ }
824
+ .react-datepicker__day--disabled,
825
+ .react-datepicker__month-text--disabled,
826
+ .react-datepicker__quarter-text--disabled,
827
+ .react-datepicker__year-text--disabled {
828
+ cursor: default;
829
+ color: #ccc;
830
+ }
831
+ .react-datepicker__day--disabled:hover,
832
+ .react-datepicker__month-text--disabled:hover,
833
+ .react-datepicker__quarter-text--disabled:hover,
834
+ .react-datepicker__year-text--disabled:hover {
835
+ background-color: transparent;
836
+ }
837
+
838
+ .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,
839
+ .react-datepicker__quarter-text.react-datepicker__month--selected:hover,
840
+ .react-datepicker__quarter-text.react-datepicker__month--in-range:hover,
841
+ .react-datepicker__quarter-text.react-datepicker__quarter--selected:hover,
842
+ .react-datepicker__quarter-text.react-datepicker__quarter--in-range:hover {
843
+ background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
844
+ }
845
+ .react-datepicker__month-text:hover,
846
+ .react-datepicker__quarter-text:hover {
847
+ background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
848
+ }
849
+
850
+ .react-datepicker__input-container {
851
+ position: relative;
852
+ display: inline-block;
853
+ width: 100%;
854
+ }
855
+
856
+ .react-datepicker__year-read-view,
857
+ .react-datepicker__month-read-view,
858
+ .react-datepicker__month-year-read-view {
859
+ border: 1px solid transparent;
860
+ border-radius: 0.3rem;
861
+ position: relative;
862
+ }
863
+ .react-datepicker__year-read-view:hover,
864
+ .react-datepicker__month-read-view:hover,
865
+ .react-datepicker__month-year-read-view:hover {
866
+ cursor: pointer;
867
+ }
868
+ .react-datepicker__year-read-view:hover .react-datepicker__year-read-view--down-arrow,
869
+ .react-datepicker__year-read-view:hover .react-datepicker__month-read-view--down-arrow,
870
+ .react-datepicker__month-read-view:hover .react-datepicker__year-read-view--down-arrow,
871
+ .react-datepicker__month-read-view:hover .react-datepicker__month-read-view--down-arrow,
872
+ .react-datepicker__month-year-read-view:hover .react-datepicker__year-read-view--down-arrow,
873
+ .react-datepicker__month-year-read-view:hover .react-datepicker__month-read-view--down-arrow {
874
+ border-top-color: #b3b3b3;
875
+ }
876
+ .react-datepicker__year-read-view--down-arrow,
877
+ .react-datepicker__month-read-view--down-arrow,
878
+ .react-datepicker__month-year-read-view--down-arrow {
879
+ transform: rotate(135deg);
880
+ right: -16px;
881
+ top: 5px;
882
+ width: 5px;
883
+ height: 5px;
884
+ fill: #111111;
885
+
886
+ }
887
+ .react-datepicker__header:not(.react-datepicker__header--has-time-select) {
888
+ background: ${colorMode === 'light' ? '#F5F5F5' : 'inherit'} ;
889
+
890
+ border-top-left-radius: 8px;
891
+ border-top-right-radius: 8px;
892
+ }
893
+
894
+ .react-datepicker__year-dropdown,
895
+ .react-datepicker__month-dropdown,
896
+ .react-datepicker__month-year-dropdown {
897
+ background-color: ${colorMode === 'light' ? '#f0f0f0' : '#131620'};
898
+ position: absolute;
899
+ width: 50%;
900
+ left: 25%;
901
+ top: 30px;
902
+ z-index: 1;
903
+ text-align: center;
904
+ border-radius: 0.3rem;
905
+ border: 1px solid #aeaeae;
906
+ }
907
+ .react-datepicker__year-dropdown:hover,
908
+ .react-datepicker__month-dropdown:hover,
909
+ .react-datepicker__month-year-dropdown:hover {
910
+ cursor: pointer;
911
+ }
912
+ .react-datepicker__year-dropdown--scrollable,
913
+ .react-datepicker__month-dropdown--scrollable,
914
+ .react-datepicker__month-year-dropdown--scrollable {
915
+ height: 150px;
916
+ overflow-y: scroll;
917
+ }
918
+
919
+ .react-datepicker__year-option,
920
+ .react-datepicker__month-option,
921
+ .react-datepicker__month-year-option {
922
+ line-height: 20px;
923
+ width: 100%;
924
+ display: block;
925
+ margin-left: auto;
926
+ margin-right: auto;
927
+ }
928
+ .react-datepicker__year-option:first-of-type,
929
+ .react-datepicker__month-option:first-of-type,
930
+ .react-datepicker__month-year-option:first-of-type {
931
+ border-top-left-radius: 0.3rem;
932
+ border-top-right-radius: 0.3rem;
933
+ }
934
+ .react-datepicker__year-option:last-of-type,
935
+ .react-datepicker__month-option:last-of-type,
936
+ .react-datepicker__month-year-option:last-of-type {
937
+ -webkit-user-select: none;
938
+ -moz-user-select: none;
939
+ -ms-user-select: none;
940
+ user-select: none;
941
+ border-bottom-left-radius: 0.3rem;
942
+ border-bottom-right-radius: 0.3rem;
943
+ }
944
+ .react-datepicker__year-option:hover,
945
+ .react-datepicker__month-option:hover,
946
+ .react-datepicker__month-year-option:hover {
947
+ background-color: #ccc;
948
+ }
949
+ .react-datepicker__year-option:hover .react-datepicker__navigation--years-upcoming,
950
+ .react-datepicker__month-option:hover .react-datepicker__navigation--years-upcoming,
951
+ .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-upcoming {
952
+ border-bottom-color: #b3b3b3;
953
+ }
954
+ .react-datepicker__year-option:hover .react-datepicker__navigation--years-previous,
955
+ .react-datepicker__month-option:hover .react-datepicker__navigation--years-previous,
956
+ .react-datepicker__month-year-option:hover .react-datepicker__navigation--years-previous {
957
+ border-top-color: #b3b3b3;
958
+ }
959
+ .react-datepicker__year-option--selected,
960
+ .react-datepicker__month-option--selected,
961
+ .react-datepicker__month-year-option--selected {
962
+ position: absolute;
963
+ left: 15px;
964
+ }
965
+
966
+ .react-datepicker__close-icon {
967
+ cursor: pointer;
968
+ background-color: transparent;
969
+ border: 0;
970
+ outline: 0;
971
+ padding: 0 6px 0 0;
972
+ position: absolute;
973
+ top: 0;
974
+ right: 0;
975
+ height: 100%;
976
+ display: table-cell;
977
+ vertical-align: middle;
978
+ }
979
+ .react-datepicker__close-icon::after {
980
+ cursor: pointer;
981
+ background-color: ${colorMode === 'light' ? '#12784A' : '#131620'};
982
+ color: #fff;
983
+ border-radius: 50%;
984
+ height: 16px;
985
+ width: 16px;
986
+ padding: 2px;
987
+ font-size: 12px;
988
+ line-height: 1;
989
+ text-align: center;
990
+ display: table-cell;
991
+ vertical-align: middle;
992
+ content: "×";
993
+ }
994
+
995
+ .react-datepicker__today-button {
996
+ background: #f0f0f0;
997
+ border-top: 1px solid #aeaeae;
998
+ cursor: pointer;
999
+ text-align: center;
1000
+ font-weight: bold;
1001
+ padding: 5px 0;
1002
+ clear: left;
1003
+ }
1004
+
1005
+ .react-datepicker__portal {
1006
+ position: fixed;
1007
+ width: 100vw;
1008
+ height: 100vh;
1009
+ background-color: rgba(0, 0, 0, 0.8);
1010
+ left: 0;
1011
+ top: 0;
1012
+ justify-content: center;
1013
+ align-items: center;
1014
+ display: flex;
1015
+ z-index: 2147483647;
1016
+ }
1017
+ .react-datepicker__portal .react-datepicker__day-name,
1018
+ .react-datepicker__portal .react-datepicker__day,
1019
+ .react-datepicker__portal .react-datepicker__time-name {
1020
+ width: 3rem;
1021
+ line-height: 3rem;
1022
+ }
1023
+ @media (max-width: 400px), (max-height: 550px) {
1024
+ .react-datepicker__portal .react-datepicker__day-name,
1025
+ .react-datepicker__portal .react-datepicker__day,
1026
+ .react-datepicker__portal .react-datepicker__time-name {
1027
+ width: 2rem;
1028
+ line-height: 2rem;
1029
+ }
1030
+ }
1031
+ .react-datepicker__portal .react-datepicker__current-month,
1032
+ .react-datepicker__portal .react-datepicker-time__header {
1033
+ font-size: 1.44rem;
1034
+ }
1035
+
1036
+ /** injected styles **/
1037
+ .react-datepicker__day--outside-month {
1038
+ color: ${colorMode === 'light' ? '#B9B9C3' : '#4D4D4D'};
1039
+ }
1040
+ .react-datepicker__day.react-datepicker__day--in-range {
1041
+ border-radius: 0;
1042
+ background: rgba(18, 120, 74, 0.1);
1043
+ color: #12784A;
1044
+ }
1045
+ .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range,
1046
+ .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {
1047
+ background: #12784A;
1048
+ color: #fff;
1049
+ }
1050
+ .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day--in-range {
1051
+ border-radius: 100px 0px 0px 100px;
1052
+ }
1053
+ .react-datepicker__day.react-datepicker__day--range-end.react-datepicker__day--in-range {
1054
+ border-radius: 0px 100px 100px 0px;
1055
+ }
1056
+ .react-datepicker__day.react-datepicker__day--range-start.react-datepicker__day.react-datepicker__day--range-end {
1057
+ border-radius: 100px;
1058
+ padding: 0;
1059
+ }
1060
+ .react-datepicker__day.react-datepicker__day--outside-month:empty {
1061
+ padding: 0;
1062
+ }
1063
+ .react-datepicker.inline .react-datepicker__header {
1064
+ background-color: inherit;
1065
+ }
1066
+ .react-datepicker__day--keyboard-selected, .react-datepicker__day--keyboard-selected:hover {
1067
+ background-color: inherit;
1068
+ color: inherit;
1069
+ }
1070
+ .react-datepicker__day--today, .react-datepicker__day--today:hover {
1071
+ color: #D82F23;
1072
+ }
1073
+ .react-datepicker__day--today:hover {
1074
+ background: #f0f0f0;
1075
+ }
1076
+ .react-datepicker__day--selected.react-datepicker__day--today {
1077
+ color: white;
1078
+ background: #12784A;
1079
+ }
1080
+ `
1081
+ });
1082
+ };
1083
+
1084
+ const TimeInput = ({
1085
+ value,
1086
+ onChange,
1087
+ label,
1088
+ rightAddon
1089
+ }) => {
1090
+ const [time, setTime] = React__default.useState(value || '00:00');
1091
+ const handleChange = e => {
1092
+ var _e$target;
1093
+ setTime(((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '00:00');
1094
+ };
1095
+ React__default.useEffect(() => {
1096
+ if (onChange) {
1097
+ onChange(time);
1098
+ }
1099
+ }, [time]);
1100
+ return /*#__PURE__*/React__default.createElement(Flex, {
1101
+ flexDir: "column",
1102
+ alignItems: "center",
1103
+ justifyContent: "center",
1104
+ p: 4,
1105
+ pt: 0
1106
+ }, /*#__PURE__*/React__default.createElement(Text, {
1107
+ mb: 2
1108
+ }, label), /*#__PURE__*/React__default.createElement(InputGroup, {
1109
+ alignItems: "center",
1110
+ justifyContent: "center"
1111
+ }, /*#__PURE__*/React__default.createElement(Input$1, {
1112
+ onChange: handleChange,
1113
+ type: "time",
1114
+ value: time,
1115
+ "data-test-id": "CT_Component_datepicker_input_time"
1116
+ }), rightAddon && /*#__PURE__*/React__default.createElement(InputRightAddon, null, rightAddon)));
1117
+ };
1118
+ TimeInput.displayName = 'DatepickerTimeInput';
1119
+ TimeInput.defaultProps = {
1120
+ value: '00:00',
1121
+ onChange: undefined,
1122
+ label: 'Pilih Waktu',
1123
+ rightAddon: 'WIB'
1124
+ };
1125
+
1126
+ const Datepicker = ({
1127
+ id,
1128
+ label,
1129
+ error,
1130
+ isError,
1131
+ helperText,
1132
+ isRequired,
1133
+ withTime,
1134
+ value,
1135
+ name,
1136
+ onClear,
1137
+ showMonth,
1138
+ shortMonth,
1139
+ ...props
1140
+ }) => {
1141
+ var _props$dateFormat;
1142
+ const selected = value ? new Date(value) : undefined;
1143
+ const dateFormat = ((_props$dateFormat = props.dateFormat) !== null && _props$dateFormat !== void 0 ? _props$dateFormat : withTime) ? 'yyyy-MM-dd HH:mm' : 'yyyy-MM-dd';
1144
+ const getTimeProps = () => {
1145
+ if (!withTime) return {};
1146
+ return {
1147
+ timeInputLabel: '',
1148
+ showTimeInput: true,
1149
+ customTimeInput: /*#__PURE__*/React__default.createElement(TimeInput, null)
1150
+ };
1151
+ };
1152
+ const component = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Styles, null), /*#__PURE__*/React__default.createElement(ReactDatePicker, Object.assign({
1153
+ id: id,
1154
+ name: name,
1155
+ selected: selected,
1156
+ customInput: /*#__PURE__*/React__default.createElement(Input$1, {
1157
+ autoComplete: "off"
1158
+ }),
1159
+ dateFormat: dateFormat,
1160
+ showPopperArrow: false,
1161
+ calendarClassName: classnames({
1162
+ inline: props.inline
1163
+ }),
1164
+ showMonthDropdown: showMonth,
1165
+ useShortMonthInDropdown: showMonth ? shortMonth : false
1166
+ }, getTimeProps(), props)));
1167
+ if (props.inline) {
1168
+ return component;
1169
+ }
1170
+ return /*#__PURE__*/React__default.createElement(FormControl, {
1171
+ isRequired: isRequired,
1172
+ "data-test-id": "CT_Component_datepicker_wrapper"
1173
+ }, label && /*#__PURE__*/React__default.createElement(FormLabel$1, {
1174
+ fontSize: "text.sm"
1175
+ }, 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, {
1176
+ "data-test-id": "bcpJJyCP0z_RIAGZXDU6s",
1177
+ onClick: onClear,
1178
+ cursor: "pointer"
1179
+ }))), !isError ? /*#__PURE__*/React__default.createElement(FormHelperText, null, helperText) : /*#__PURE__*/React__default.createElement(FormErrorMessage, null, error));
1180
+ };
1181
+ Datepicker.defaultProps = {
1182
+ id: undefined,
1183
+ isRequired: undefined,
1184
+ label: undefined,
1185
+ error: undefined,
1186
+ isError: undefined,
1187
+ helperText: undefined,
1188
+ withTime: undefined,
1189
+ onClear: undefined,
1190
+ selectsRange: undefined,
1191
+ shortMonth: false,
1192
+ showMonth: false
1193
+ };
1194
+
1195
+ /* eslint-disable no-nested-ternary */
1196
+ const Field = props => {
1197
+ const {
1198
+ label,
1199
+ isError,
1200
+ error,
1201
+ helperText,
1202
+ isRequired,
1203
+ children
1204
+ } = props;
1205
+ return React.createElement(FormControl, {
1206
+ isInvalid: isError
1207
+ }, label && (typeof label === 'string' ? React.createElement(FormLabel$1, {
1208
+ fontSize: "field.sm",
1209
+ requiredIndicator: undefined
1210
+ }, isRequired && React.createElement(Box, {
1211
+ as: "span",
1212
+ color: "red.500",
1213
+ ml: 0,
1214
+ mr: 1
1215
+ }, "*"), label) : label), children, !isError ? helperText && React.createElement(FormHelperText, {
1216
+ fontSize: "field.sm"
1217
+ }, helperText) : typeof error === 'string' ? React.createElement(FormErrorMessage, {
1218
+ textStyle: "field.sm",
1219
+ fontSize: "field.sm",
1220
+ mt: 1,
1221
+ marginStart: 1
1222
+ }, error) : error);
1223
+ };
1224
+ Field.defaultProps = {
1225
+ label: '',
1226
+ isError: false,
1227
+ error: undefined,
1228
+ helperText: undefined,
1229
+ isRequired: false
1230
+ };
1231
+
1232
+ const InputField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1233
+ const {
1234
+ value,
1235
+ type,
1236
+ addOnLeft,
1237
+ addOnRight,
1238
+ elementLeft,
1239
+ elementRight,
1240
+ size,
1241
+ isRequired,
1242
+ label,
1243
+ isError,
1244
+ error,
1245
+ helperText,
1246
+ ...inputProps
1247
+ } = props;
1248
+ return /*#__PURE__*/React__default.createElement(Field, {
1249
+ label: label,
1250
+ isError: isError,
1251
+ error: error,
1252
+ helperText: helperText,
1253
+ isRequired: isRequired
1254
+ }, /*#__PURE__*/React__default.createElement(InputGroup, {
1255
+ size: size
1256
+ }, addOnLeft && /*#__PURE__*/React__default.createElement(InputLeftAddon, null, addOnLeft), elementLeft && /*#__PURE__*/React__default.createElement(InputLeftElement, null, elementLeft), /*#__PURE__*/React__default.createElement(Input$1, Object.assign({
1257
+ ref: ref,
1258
+ type: type,
1259
+ value: value
1260
+ }, inputProps)), addOnRight && /*#__PURE__*/React__default.createElement(InputRightAddon, null, addOnRight), elementRight && /*#__PURE__*/React__default.createElement(InputRightElement, null, elementRight)));
1261
+ });
1262
+ InputField.defaultProps = {
1263
+ addOnLeft: undefined,
1264
+ addOnRight: undefined,
1265
+ elementLeft: undefined,
1266
+ elementRight: undefined
1267
+ };
1268
+
1269
+ const TextareaField = /*#__PURE__*/React__default.forwardRef((props, ref) => {
1270
+ const {
1271
+ value,
1272
+ ...inputProps
1273
+ } = props;
1274
+ return /*#__PURE__*/React__default.createElement(Field, Object.assign({}, inputProps), /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1275
+ ref: ref,
1276
+ value: value
1277
+ }, inputProps)));
1278
+ });
1279
+ TextareaField.defaultProps = {
1280
+ addOnLeft: undefined,
1281
+ addOnRight: undefined,
1282
+ elementLeft: undefined,
1283
+ elementRight: undefined
1284
+ };
1285
+
1286
+ const XMSLogo = () => React.createElement(Image, {
1287
+ height: 8,
1288
+ src: useColorModeValue('https://assets.voila.id/xms/logo-xms.jpg', 'https://assets.voila.id/xms/logo-xms-dark.png')
1289
+ });
1290
+ const VoilaLogo = () => React.createElement(Image, {
1291
+ src: "https://s3.ap-southeast-1.amazonaws.com/assets.voila.id/xms/logo-voila-black.png?v=1",
1292
+ filter: useColorModeValue('none', 'invert(1)'),
1293
+ maxW: 24
1294
+ });
1295
+
1296
+ const Profile = ({
1297
+ data,
1298
+ onLogout
1299
+ }) => {
1300
+ var _data$name;
1301
+ const {
1302
+ isOpen,
1303
+ onToggle,
1304
+ onClose
1305
+ } = useDisclosure();
1306
+ return /*#__PURE__*/createElement(Popover$1, {
1307
+ placement: "bottom-end",
1308
+ isOpen: isOpen,
1309
+ onClose: onClose
1310
+ }, /*#__PURE__*/createElement(Box, {
1311
+ "data-test-id": "WE0UYbA93LOZy6S09IhDO",
1312
+ as: "button",
1313
+ cursor: 'pointer',
1314
+ minW: 0,
1315
+ _hover: {
1316
+ textDecor: 'none'
1317
+ },
1318
+ m: 0,
1319
+ onClick: onToggle
1320
+ }, /*#__PURE__*/createElement(HStack, null, /*#__PURE__*/createElement(VStack, {
1321
+ alignItems: "flex-end",
1322
+ spacing: -0.5,
1323
+ ml: "2"
1324
+ }, /*#__PURE__*/createElement(Text, {
1325
+ fontSize: "text.xs",
1326
+ mb: 1,
1327
+ fontWeight: 400,
1328
+ lineHeight: "14px",
1329
+ color: useColorModeValue('neutral.800', 'white')
1330
+ }, data === null || data === void 0 ? void 0 : data.email), /*#__PURE__*/createElement(Text, {
1331
+ fontSize: "text.xs",
1332
+ fontWeight: 400,
1333
+ lineHeight: "14px",
1334
+ color: useColorModeValue('primary.500', 'success.400')
1335
+ }, (data === null || data === void 0 ? void 0 : data.office) && /*#__PURE__*/createElement(Text, {
1336
+ color: "neutral.700",
1337
+ display: "inline-block",
1338
+ mr: 0.5
1339
+ }, data.office, " |", ' '), data === null || data === void 0 ? void 0 : data.userRole)), /*#__PURE__*/createElement(PopoverTrigger, null, /*#__PURE__*/createElement(Avatar, {
1340
+ size: 'sm',
1341
+ bg: "primary.500",
1342
+ color: "white",
1343
+ 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
1344
+ })))), /*#__PURE__*/createElement(PopoverContent, {
1345
+ bg: useColorModeValue('white', 'mirage.900'),
1346
+ maxW: 200
1347
+ }, /*#__PURE__*/createElement(PopoverArrow, {
1348
+ bg: useColorModeValue('white', 'mirage.900')
1349
+ }), /*#__PURE__*/createElement(PopoverBody, {
1350
+ p: 1
1351
+ }, /*#__PURE__*/createElement(Flex, {
1352
+ "data-test-id": "gA7F9pucPX_Q3_dkgXIYZ",
1353
+ alignItems: "center",
1354
+ px: 3,
1355
+ py: 2,
1356
+ borderRadius: "sm",
1357
+ cursor: "pointer",
1358
+ _hover: {
1359
+ bg: useColorModeValue('primary.500', 'mirage.900'),
1360
+ color: 'white'
1361
+ },
1362
+ onClick: onLogout,
1363
+ fontSize: "text.xs"
1364
+ }, /*#__PURE__*/createElement(FiPower, null), /*#__PURE__*/createElement(Text, {
1365
+ ml: 2
1366
+ }, "Logout")))));
1367
+ };
1368
+ Profile.defaultProps = {
1369
+ data: undefined,
1370
+ onLogout: undefined
1371
+ };
1372
+
1373
+ const SwitchMode = () => {
1374
+ const {
1375
+ colorMode,
1376
+ toggleColorMode
1377
+ } = useColorMode$1();
1378
+ return /*#__PURE__*/createElement(Box, {
1379
+ mx: 5,
1380
+ onClick: toggleColorMode,
1381
+ cursor: "pointer"
1382
+ }, colorMode === 'light' ? /*#__PURE__*/createElement(FiMoon, {
1383
+ size: 20
1384
+ }) : /*#__PURE__*/createElement(FiSun, {
1385
+ size: 20
1386
+ }));
1387
+ };
1388
+
1389
+ // eslint-disable-next-line import/prefer-default-export
1390
+ function environmentName(env) {
1391
+ switch (env) {
1392
+ case 'DEVELOPMENT':
1393
+ return 'Dev';
1394
+ case 'STAGING':
1395
+ return 'Staging';
1396
+ default:
1397
+ return null;
1398
+ }
1399
+ }
1400
+
1401
+ /* eslint-disable react-hooks/rules-of-hooks */
1402
+ const Version = ({
1403
+ version,
1404
+ environment,
1405
+ onOpenModalRelease
1406
+ }) => /*#__PURE__*/createElement(Fragment, null, version && /*#__PURE__*/createElement(Badge, {
1407
+ "data-test-id": "dzl3esjhCphobaaIXpiUE",
1408
+ bg: useColorModeValue('primary.500', 'rgba(124, 124, 124, 0.12)'),
1409
+ color: useColorModeValue('white', 'secondary.400'),
1410
+ fontSize: "text.xs",
1411
+ py: 1,
1412
+ px: 2.5,
1413
+ fontWeight: "bold",
1414
+ textTransform: "lowercase",
1415
+ borderRadius: "md",
1416
+ onClick: onOpenModalRelease,
1417
+ cursor: onOpenModalRelease ? 'pointer' : 'auto'
1418
+ }, version), /*#__PURE__*/createElement(Box, {
1419
+ background: "primary.50",
1420
+ color: "primary.500",
1421
+ fontSize: "text.xs",
1422
+ py: 1,
1423
+ px: 2.5,
1424
+ fontWeight: "bold",
1425
+ borderRadius: "md"
1426
+ }, environmentName(environment)));
1427
+ Version.defaultProps = {
1428
+ environment: undefined,
1429
+ version: undefined,
1430
+ onOpenModalRelease: undefined
1431
+ };
1432
+
1433
+ const Header = ({
1434
+ data,
1435
+ onLogout,
1436
+ onOpenModalRelease,
1437
+ ...props
1438
+ }) => /*#__PURE__*/createElement(Box, Object.assign({
1439
+ minH: 14,
1440
+ bg: useColorModeValue('white', 'ebony-clay.800'),
1441
+ boxShadow: "0 4px 20px 0 rgb(0 0 0 / 5%)",
1442
+ px: 4,
1443
+ py: 1
1444
+ }, props), /*#__PURE__*/createElement(Flex, {
1445
+ h: 14,
1446
+ alignItems: "center",
1447
+ justifyContent: "space-between"
1448
+ }, /*#__PURE__*/createElement(XMSLogo, null), /*#__PURE__*/createElement(HStack, {
1449
+ spacing: 2,
1450
+ alignItems: "center"
1451
+ }, /*#__PURE__*/createElement(VoilaLogo, null), /*#__PURE__*/createElement(Version, {
1452
+ version: data === null || data === void 0 ? void 0 : data.version,
1453
+ environment: data === null || data === void 0 ? void 0 : data.environment,
1454
+ onOpenModalRelease: onOpenModalRelease
1455
+ })), /*#__PURE__*/createElement(Flex, {
1456
+ alignItems: "center"
1457
+ }, /*#__PURE__*/createElement(SwitchMode, null), /*#__PURE__*/createElement(Profile, {
1458
+ data: data,
1459
+ onLogout: onLogout
1460
+ }))));
1461
+ Header.defaultProps = {
1462
+ data: undefined,
1463
+ onLogout: undefined,
1464
+ onOpenModalRelease: undefined
1465
+ };
1466
+
1467
+ const ModalCloseButton = /*#__PURE__*/forwardRef((props, ref) => {
1468
+ return React.createElement(ModalCloseButton$1, Object.assign({
1469
+ ref: ref,
1470
+ top: 4,
1471
+ right: 4,
1472
+ size: "sm",
1473
+ background: useColorModeValue('neutral.50', 'mirage.900')
1474
+ }, props));
1475
+ });
1476
+
1477
+ const ModalFooter = /*#__PURE__*/forwardRef(({
1478
+ children,
1479
+ ...rest
1480
+ }, ref) => {
1481
+ return React.createElement(ModalFooter$1, Object.assign({
1482
+ ref: ref,
1483
+ background: useColorModeValue('neutral.200', 'mirage.900'),
1484
+ borderBottomRadius: "md"
1485
+ }, rest), children);
1486
+ });
1487
+
1488
+ const ModalHeader = /*#__PURE__*/forwardRef(({
1489
+ children,
1490
+ ...rest
1491
+ }, ref) => {
1492
+ return React.createElement(ModalHeader$1, Object.assign({
1493
+ ref: ref,
1494
+ background: useColorModeValue('neutral.200', 'mirage.900'),
1495
+ borderTopRadius: 'md',
1496
+ fontSize: 'lg'
1497
+ }, rest), children);
1498
+ });
1499
+
1500
+ /* eslint-disable react-hooks/rules-of-hooks */
1501
+ const Navigation = ({
1502
+ navigations,
1503
+ activePath,
1504
+ as,
1505
+ ...props
1506
+ }) => {
1507
+ return /*#__PURE__*/createElement(Box, Object.assign({
1508
+ bg: useColorModeValue('white', 'ebony-clay.800'),
1509
+ boxShadow: "0 4px 20px 0 rgb(0 0 0 / 5%)",
1510
+ borderRadius: "md",
1511
+ overflowX: "auto"
1512
+ }, props), /*#__PURE__*/createElement(Flex, {
1513
+ alignItems: "center",
1514
+ p: 2
1515
+ }, /*#__PURE__*/createElement(HStack, {
1516
+ spacing: 2
1517
+ }, navigations === null || navigations === void 0 ? void 0 : navigations.map(navigation => {
1518
+ const isActive = activePath.startsWith(navigation.navLink || '');
1519
+ const activeBg = isActive ? 'primary.500' : undefined;
1520
+ return /*#__PURE__*/createElement(Popover$1, {
1521
+ key: navigation.title,
1522
+ trigger: "hover",
1523
+ placement: "bottom-start"
1524
+ }, ({
1525
+ isOpen
1526
+ }) => /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(PopoverTrigger, null, /*#__PURE__*/createElement(Box, {
1527
+ display: "flex",
1528
+ alignItems: "center",
1529
+ borderRadius: "md",
1530
+ cursor: "pointer",
1531
+ _hover: {
1532
+ backgroundColor: !isActive ? useColorModeValue('dove-gray.50', 'transparent') : activeBg
1533
+ },
1534
+ backgroundColor: isOpen && !isActive ? useColorModeValue('dove-gray.50', 'transparent') : activeBg,
1535
+ color: isActive ? 'white' : 'inherit',
1536
+ p: 2
1537
+ }, /*#__PURE__*/createElement(Icon, {
1538
+ as: navigation.icon,
1539
+ mr: 2
1540
+ }), /*#__PURE__*/createElement(Text, {
1541
+ whiteSpace: "nowrap",
1542
+ fontSize: "text.sm",
1543
+ fontWeight: 400
1544
+ }, navigation.title), /*#__PURE__*/createElement(ChevronDownIcon, {
1545
+ ml: 2
1546
+ }))), navigation.children && /*#__PURE__*/createElement(Portal, null, /*#__PURE__*/createElement(Box, {
1547
+ zIndex: "popover"
1548
+ }, /*#__PURE__*/createElement(PopoverContent, {
1549
+ key: navigation.title,
1550
+ bg: useColorModeValue('white', 'ebony-clay.800'),
1551
+ maxW: 250,
1552
+ border: "none",
1553
+ borderRadius: "md",
1554
+ boxShadow: "0 5px 25px rgb(0 0 0 / 10%)"
1555
+ }, navigation.children.map(({
1556
+ title,
1557
+ navHost,
1558
+ navLink,
1559
+ icon
1560
+ }) => {
1561
+ const link = navHost ? `${navHost}${navLink}` : navLink;
1562
+ const isActiveSub = activePath === navLink;
1563
+ return /*#__PURE__*/createElement(Link, {
1564
+ as: as,
1565
+ key: title,
1566
+ display: "flex",
1567
+ position: "relative",
1568
+ alignItems: "center",
1569
+ transition: "padding 0.35s ease 0s",
1570
+ _hover: {
1571
+ backgroundColor: useColorModeValue('dove-gray.50', 'mirage.900'),
1572
+ color: useColorModeValue('primary.500', 'dove-gray.600'),
1573
+ px: 5,
1574
+ py: 4,
1575
+ _first: {
1576
+ borderTopRadius: 'md'
1577
+ },
1578
+ _last: {
1579
+ borderBottomRadius: 'md'
1580
+ }
1581
+ },
1582
+ px: 6,
1583
+ py: 4,
1584
+ href: link,
1585
+ color: isActiveSub ? 'primary.500' : 'inherit',
1586
+ css: css`
1587
+ border-spacing: 4px;
1588
+ `
1589
+ }, /*#__PURE__*/createElement(Icon, {
1590
+ as: icon,
1591
+ mr: 3
1592
+ }), /*#__PURE__*/createElement(Text, {
1593
+ fontSize: "text.sm"
1594
+ }, title), isActiveSub && /*#__PURE__*/createElement(Box, {
1595
+ width: 0.5,
1596
+ height: 8,
1597
+ position: "absolute",
1598
+ bg: "primary.500",
1599
+ right: 0,
1600
+ zIndex: "popover"
1601
+ }));
1602
+ }))))));
1603
+ }))));
1604
+ };
1605
+ Navigation.defaultProps = {
1606
+ navigations: undefined,
1607
+ as: 'a'
1608
+ };
1609
+
1610
+ const PaginationButton = /*#__PURE__*/forwardRef$1(({
1611
+ className,
1612
+ style,
1613
+ isActive,
1614
+ children,
1615
+ ...rest
1616
+ }, ref) => {
1617
+ const btnBg = useColorModeValue('neutral.300', 'mirage.900');
1618
+ const btnColor = useColorModeValue('black.high', 'primary.300');
1619
+ const btnNotActiveBg = useColorModeValue('secondary.50', 'primary.500');
1620
+ const btnNotActiveColor = useColorModeValue('primary.500', 'white');
1621
+ return React.createElement(Button$1, Object.assign({
1622
+ "data-test-id": "Pagination-Button",
1623
+ ref: ref,
1624
+ className: className,
1625
+ style: style,
1626
+ borderRadius: 50,
1627
+ fontWeight: 700,
1628
+ m: 0,
1629
+ px: 3,
1630
+ py: 2,
1631
+ h: 8,
1632
+ minW: "auto",
1633
+ background: isActive ? 'primary.500' : btnBg,
1634
+ color: isActive ? 'white' : btnColor,
1635
+ _hover: !isActive ? {
1636
+ background: btnNotActiveBg,
1637
+ color: btnNotActiveColor
1638
+ } : {},
1639
+ _disabled: {
1640
+ background: useColorModeValue('neutral.300', 'mirage.900'),
1641
+ color: 'neutral.600',
1642
+ pointerEvents: 'none'
1643
+ }
1644
+ }, rest), children);
1645
+ });
1646
+ PaginationButton.displayName = 'PaginationButton';
1647
+ PaginationButton.defaultProps = {
1648
+ isActive: undefined
1649
+ };
1650
+
1651
+ const PaginationButtonTrigger = ({
1652
+ color,
1653
+ isDisabled,
1654
+ onClick,
1655
+ visuallyHidden,
1656
+ icon
1657
+ }) => /*#__PURE__*/createElement(PaginationButton, {
1658
+ "data-test-id": "DLVCc_fBK35spHm5WxjcJ",
1659
+ color: color,
1660
+ isDisabled: isDisabled,
1661
+ onClick: onClick
1662
+ }, /*#__PURE__*/createElement(VisuallyHidden, null, visuallyHidden), icon);
1663
+ PaginationButtonTrigger.defaultProps = {
1664
+ color: undefined,
1665
+ isDisabled: undefined,
1666
+ onClick: undefined,
1667
+ visuallyHidden: undefined,
1668
+ icon: undefined
1669
+ };
1670
+
1671
+ const Pagination = ({
1672
+ className,
1673
+ current,
1674
+ total,
1675
+ onSelect
1676
+ }) => {
1677
+ const btnColorDisabled = useColorModeValue('secondary.100', 'primary.500');
1678
+ const btnColor = useColorModeValue('primary.500', 'secondary.100');
1679
+ const disabledPrevious = current === 1;
1680
+ const previousButtonColor = disabledPrevious ? btnColorDisabled : btnColor;
1681
+ const disabledNext = current === total;
1682
+ const nextButtonColor = disabledNext ? btnColorDisabled : btnColor;
1683
+ const handleSelectPage = page => {
1684
+ if (onSelect) {
1685
+ onSelect(page);
1686
+ }
1687
+ };
1688
+ const generatePages = () => {
1689
+ const maxButtons = 5;
1690
+ const pageButtons = [];
1691
+ let startPage;
1692
+ let endPage;
1693
+ if ( maxButtons < total) {
1694
+ startPage = Math.max(Math.min(current - Math.floor(maxButtons / 2), total - maxButtons + 1), 1);
1695
+ endPage = startPage + maxButtons - 1;
1696
+ } else {
1697
+ startPage = 1;
1698
+ endPage = total;
1699
+ }
1700
+ // eslint-disable-next-line no-plusplus
1701
+ for (let page = startPage; page <= endPage; ++page) {
1702
+ pageButtons.push(page);
1703
+ }
1704
+ return pageButtons;
1705
+ };
1706
+ return /*#__PURE__*/createElement(Box, {
1707
+ className: className,
1708
+ display: "inline-flex",
1709
+ alignItems: "center"
1710
+ }, /*#__PURE__*/createElement(Box, {
1711
+ mr: 1
1712
+ }, /*#__PURE__*/createElement(PaginationButtonTrigger, {
1713
+ "data-test-id": "Pagination-Button",
1714
+ color: previousButtonColor,
1715
+ isDisabled: disabledPrevious,
1716
+ onClick: () => handleSelectPage(1),
1717
+ visuallyHidden: "First Page",
1718
+ icon: /*#__PURE__*/createElement(ArrowLeftIcon, {
1719
+ width: 2
1720
+ })
1721
+ })), /*#__PURE__*/createElement(Box, {
1722
+ backgroundColor: useColorModeValue('neutral.300', 'mirage.900'),
1723
+ borderRadius: 50
1724
+ }, /*#__PURE__*/createElement(PaginationButtonTrigger, {
1725
+ "data-test-id": "Pagination-Button",
1726
+ color: previousButtonColor,
1727
+ isDisabled: disabledPrevious,
1728
+ onClick: () => handleSelectPage(current - 1),
1729
+ visuallyHidden: "Previous Page",
1730
+ icon: /*#__PURE__*/createElement(ChevronLeftIcon, null)
1731
+ }), generatePages().map(page => {
1732
+ return /*#__PURE__*/createElement(PaginationButton, {
1733
+ "data-test-id": "Pagination-Button",
1734
+ key: page,
1735
+ isActive: page === current,
1736
+ onClick: () => typeof page === 'number' ? handleSelectPage(page) : null
1737
+ }, /*#__PURE__*/createElement(Text, {
1738
+ scale: 300,
1739
+ fontSize: "text.sm",
1740
+ lineHeight: 18,
1741
+ fontWeight: 500
1742
+ }, page));
1743
+ }), /*#__PURE__*/createElement(PaginationButtonTrigger, {
1744
+ "data-test-id": "Pagination-Button",
1745
+ color: nextButtonColor,
1746
+ isDisabled: disabledNext,
1747
+ onClick: () => handleSelectPage(current + 1),
1748
+ visuallyHidden: "Next Page",
1749
+ icon: /*#__PURE__*/createElement(ChevronRightIcon, null)
1750
+ })), /*#__PURE__*/createElement(Box, {
1751
+ ml: 1
1752
+ }, /*#__PURE__*/createElement(PaginationButtonTrigger, {
1753
+ "data-test-id": "Pagination-Button",
1754
+ color: nextButtonColor,
1755
+ isDisabled: disabledNext,
1756
+ onClick: () => handleSelectPage(total),
1757
+ visuallyHidden: "Last Page",
1758
+ icon: /*#__PURE__*/createElement(ArrowRightIcon, {
1759
+ width: 2
1760
+ })
1761
+ })));
1762
+ };
1763
+ Pagination.defaultProps = {
1764
+ className: undefined,
1765
+ onSelect: undefined
1766
+ };
1767
+ Pagination.displayName = 'Pagination';
1768
+
1769
+ const PaginationDetail = ({
1770
+ page,
1771
+ limit,
1772
+ length,
1773
+ scale = 300,
1774
+ fontSize = 'xs',
1775
+ lineHeight = 18,
1776
+ ...rest
1777
+ }) => {
1778
+ return /*#__PURE__*/createElement(Text, Object.assign({
1779
+ scale: scale,
1780
+ fontSize: fontSize,
1781
+ lineHeight: lineHeight
1782
+ }, rest), `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item`);
1783
+ };
1784
+
1785
+ const PaginationFilter = ({
1786
+ limit,
1787
+ label = 'Baris per halaman:',
1788
+ items,
1789
+ onChange,
1790
+ ...rest
1791
+ }) => {
1792
+ const [value, setValue] = useState(limit);
1793
+ return /*#__PURE__*/createElement(Box, {
1794
+ display: "flex",
1795
+ flexDirection: "row",
1796
+ alignItems: "center"
1797
+ }, /*#__PURE__*/createElement(Text, Object.assign({
1798
+ fontSize: "text.sm",
1799
+ lineHeight: 18,
1800
+ color: useColorModeValue('neutral.900', 'white')
1801
+ }, rest), label), /*#__PURE__*/createElement(Select$1, {
1802
+ textAlign: "center",
1803
+ size: "xs",
1804
+ outline: "none",
1805
+ border: "none",
1806
+ boxShadow: "none",
1807
+ width: 18,
1808
+ icon: /*#__PURE__*/createElement(FiChevronDown, null),
1809
+ _focusVisible: {
1810
+ boxShadow: 'none'
1811
+ },
1812
+ onChange: e => {
1813
+ const numberValue = Number(e.target.value);
1814
+ onChange(numberValue);
1815
+ setValue(numberValue);
1816
+ },
1817
+ value: value
1818
+ }, items.map(item => {
1819
+ return /*#__PURE__*/createElement("option", {
1820
+ key: item,
1821
+ value: item
1822
+ }, item);
1823
+ })));
1824
+ };
1825
+ PaginationFilter.defaultProps = {
1826
+ limit: 10,
1827
+ label: undefined
1828
+ };
1829
+
1830
+ const transparent = 'transparent';
1831
+ const black = {
1832
+ high: '#111111',
1833
+ medium: '#707070',
1834
+ low: '#B8B8B8'
1835
+ };
1836
+ const white = {
1837
+ high: '#FFFFFF',
1838
+ medium: '#F1F1F1',
1839
+ low: '#CCCCCC'
1840
+ };
1841
+ const neutral = {
1842
+ '50': '#FFFFFF',
1843
+ '100': '#FAFAFA',
1844
+ '200': '#F5F5F5',
1845
+ '300': '#EEEEEE',
1846
+ '400': '#E0E0E0',
1847
+ '500': '#BDBDBD',
1848
+ '600': '#999999',
1849
+ '700': '#242424',
1850
+ '800': '#181818',
1851
+ '900': '#111111'
1852
+ };
1853
+ const primary = {
1854
+ '50': '#DFFFF1',
1855
+ '100': '#ACF5D5',
1856
+ '200': '#5EE5A9',
1857
+ '300': '#05CB72',
1858
+ '400': '#08A45E',
1859
+ '500': '#12784A',
1860
+ '600': '#0B603A',
1861
+ '700': '#075331',
1862
+ '800': '#064126',
1863
+ '900': '#042E1B'
1864
+ };
1865
+ const secondary = {
1866
+ '50': '#F2F2F3',
1867
+ '100': '#DADBDD',
1868
+ '200': '#C2C4C7',
1869
+ '300': '#AAADB0',
1870
+ '400': '#93969A',
1871
+ '500': '#7B7F84',
1872
+ '600': '#62666A',
1873
+ '700': '#4A4C4F',
1874
+ '800': '#313335',
1875
+ '900': '#19191A'
1876
+ };
1877
+ const success = {
1878
+ '50': '#ECFFED',
1879
+ '100': '#D3FCD5',
1880
+ '200': '#A9F9B5',
1881
+ '300': '#7CEE98',
1882
+ '400': '#58DD86',
1883
+ '500': '#28c76f',
1884
+ '600': '#1DAB6A',
1885
+ '700': '#148F63',
1886
+ '800': '#0C7359',
1887
+ '900': '#075F51'
1888
+ };
1889
+ const danger = {
1890
+ '50': '#FFEDEC',
1891
+ '100': '#FFC7C2',
1892
+ '200': '#FF8279',
1893
+ '300': '#FF5B4F',
1894
+ '400': '#F44336',
1895
+ '500': '#D82F23',
1896
+ '600': '#B71C1C',
1897
+ '700': '#930B0B',
1898
+ '800': '#660909',
1899
+ '900': '#3E0707'
1900
+ };
1901
+ const warning = {
1902
+ '50': '#FFF9EC',
1903
+ '100': '#FFEFCC',
1904
+ '200': '#FFD591',
1905
+ '300': '#FFC069',
1906
+ '400': '#FFA230',
1907
+ '500': '#F68522',
1908
+ '600': '#EF6C00',
1909
+ '700': '#C65B03',
1910
+ '800': '#9F4901',
1911
+ '900': '#652E00'
1912
+ };
1913
+ const info = {
1914
+ '50': '#EBFFFB',
1915
+ '100': '#CBFDF2',
1916
+ '200': '#97FCEF',
1917
+ '300': '#63F8F0',
1918
+ '400': '#3CECF1',
1919
+ '500': '#00CFE8',
1920
+ '600': '#00A1C7',
1921
+ '700': '#007AA7',
1922
+ '800': '#005786',
1923
+ '900': '#003F6F'
1924
+ };
1925
+ const dark = {
1926
+ '50': '#F2F2F2',
1927
+ '100': '#DBDBDB',
1928
+ '200': '#C4C4C4',
1929
+ '300': '#ADADAD',
1930
+ '400': '#969696',
1931
+ '500': '#808080',
1932
+ '600': '#666666',
1933
+ '700': '#4D4D4D',
1934
+ '800': '#333333',
1935
+ '900': '#1A1A1A'
1936
+ };
1937
+ const mirage = {
1938
+ '50': '#EDF0F7',
1939
+ '100': '#CED5E9',
1940
+ '200': '#AEBADB',
1941
+ '300': '#8E9ECC',
1942
+ '400': '#6F83BE',
1943
+ '500': '#4F68B0',
1944
+ '600': '#3F538D',
1945
+ '700': '#2F3E6A',
1946
+ '800': '#202A46',
1947
+ '900': '#101523'
1948
+ };
1949
+ const ebonyClay = {
1950
+ '50': '#EFF1F6',
1951
+ '100': '#D2D7E5',
1952
+ '200': '#B4BDD4',
1953
+ '300': '#97A3C4',
1954
+ '400': '#7A89B3',
1955
+ '500': '#5D6FA2',
1956
+ '600': '#4A5982',
1957
+ '700': '#384361',
1958
+ '800': '#252D41',
1959
+ '900': '#131620'
1960
+ };
1961
+ const brightGray = {
1962
+ '50': '#F0F1F4',
1963
+ '100': '#D5D9E1',
1964
+ '200': '#BAC0CE',
1965
+ '300': '#A0A8BB',
1966
+ '400': '#858FA8',
1967
+ '500': '#6A7795',
1968
+ '600': '#555F77',
1969
+ '700': '#404759',
1970
+ '800': '#2A2F3C',
1971
+ '900': '#15181E'
1972
+ };
1973
+ const doveGray = {
1974
+ '50': '#F2F2F2',
1975
+ '100': '#DBDBDB',
1976
+ '200': '#C4C4C4',
1977
+ '300': '#ADADAD',
1978
+ '400': '#969696',
1979
+ '500': '#808080',
1980
+ '600': '#666666',
1981
+ '700': '#4D4D4D',
1982
+ '800': '#333333',
1983
+ '900': '#1A1A1A'
1984
+ };
1985
+ const colors = {
1986
+ transparent,
1987
+ black,
1988
+ white,
1989
+ neutral,
1990
+ primary,
1991
+ secondary,
1992
+ success,
1993
+ danger,
1994
+ warning,
1995
+ info,
1996
+ dark,
1997
+ mirage,
1998
+ 'ebony-clay': ebonyClay,
1999
+ 'bright-gray': brightGray,
2000
+ 'dove-gray': doveGray
2001
+ };
2002
+
2003
+ const radius = {
2004
+ none: 0,
2005
+ sm: '2px',
2006
+ md: '4px',
2007
+ lg: '8px',
2008
+ full: '9999px'
2009
+ };
2010
+
2011
+ const spacing = {
2012
+ ...theme$1.space,
2013
+ 4.5: '1.125rem',
2014
+ 9.5: '2.375rem',
2015
+ 18: '4.5rem',
2016
+ 22: '5.5rem',
2017
+ 26: '6.5rem',
2018
+ 30: '7.5rem'
2019
+ };
2020
+
2021
+ const sizes = {
2022
+ ...theme$1.sizes,
2023
+ 4.5: '1.125rem',
2024
+ 9.5: '2.375rem',
2025
+ 18: '4.5rem',
2026
+ 22: '5.5rem',
2027
+ 26: '6.5rem',
2028
+ 30: '7.5rem'
2029
+ };
2030
+
2031
+ const fonts = {
2032
+ heading: `'Poppins', sans-serif`,
2033
+ body: `'Poppins', sans-serif`
2034
+ };
2035
+ const fontWeights = {
2036
+ hairline: 100,
2037
+ thin: 200,
2038
+ light: 300,
2039
+ normal: 400,
2040
+ medium: 500,
2041
+ semibold: 600,
2042
+ bold: 700,
2043
+ extrabold: 800,
2044
+ black: 900
2045
+ };
2046
+ const lineHeights = {
2047
+ normal: 'normal',
2048
+ none: 1,
2049
+ shorter: 1.25,
2050
+ short: 1.375,
2051
+ base: 1.5,
2052
+ tall: 1.625,
2053
+ 34: '2.125rem',
2054
+ 32: '2rem',
2055
+ 30: '1.875rem',
2056
+ 28: '1.75',
2057
+ 26: '1.625rem',
2058
+ 24: '1.5rem',
2059
+ 22: '1.375rem',
2060
+ 20: '1.25rem',
2061
+ 18: '1.125rem',
2062
+ 16: '1rem',
2063
+ 14: '0.875rem',
2064
+ 12: '0.75rem'
2065
+ };
2066
+ const fontSizes = {
2067
+ heading: {
2068
+ 1: '1.75rem',
2069
+ 2: '1.5rem',
2070
+ 3: '1.25rem',
2071
+ 4: '1.125rem',
2072
+ 5: '1rem',
2073
+ 6: '0.875rem'
2074
+ },
2075
+ text: {
2076
+ xl: '1.125rem',
2077
+ lg: '1rem',
2078
+ md: '0.875rem',
2079
+ sm: '0.75rem',
2080
+ xs: '0.625rem'
2081
+ },
2082
+ button: {
2083
+ lg: '1.125rem',
2084
+ md: '0.875rem',
2085
+ sm: '0.625rem'
2086
+ },
2087
+ field: {
2088
+ lg: '1rem',
2089
+ md: '0.875rem',
2090
+ sm: '0.75rem'
2091
+ },
2092
+ table: {
2093
+ header: '0.75rem'
2094
+ }
2095
+ };
2096
+ const heading = {
2097
+ 1: {
2098
+ fontSize: fontSizes.heading[1],
2099
+ fontWeight: 'bold',
2100
+ lineHeight: '3.5rem',
2101
+ letterSpacing: '0'
2102
+ },
2103
+ 2: {
2104
+ fontSize: fontSizes.heading[2],
2105
+ fontWeight: 'bold',
2106
+ lineHeight: '2.875rem',
2107
+ letterSpacing: '0'
2108
+ },
2109
+ 3: {
2110
+ fontSize: fontSizes.heading[3],
2111
+ fontWeight: 'bold',
2112
+ lineHeight: '2.5rem',
2113
+ letterSpacing: '0'
2114
+ },
2115
+ 4: {
2116
+ fontSize: fontSizes.heading[4],
2117
+ fontWeight: 'bold',
2118
+ lineHeight: '2rem',
2119
+ letterSpacing: '0'
2120
+ },
2121
+ 5: {
2122
+ fontSize: fontSizes.heading[5],
2123
+ fontWeight: 'bold',
2124
+ lineHeight: '1.5rem',
2125
+ letterSpacing: '0'
2126
+ },
2127
+ 6: {
2128
+ fontSize: fontSizes.heading[6],
2129
+ fontWeight: 'bold',
2130
+ lineHeight: '1.375rem',
2131
+ letterSpacing: '0'
2132
+ }
2133
+ };
2134
+ const text = {
2135
+ xl: {
2136
+ fontSize: fontSizes.text.xl,
2137
+ lineHeight: lineHeights[28],
2138
+ letterSpacing: '0'
2139
+ },
2140
+ lg: {
2141
+ fontSize: fontSizes.text.lg,
2142
+ lineHeight: lineHeights[24],
2143
+ letterSpacing: '0'
2144
+ },
2145
+ md: {
2146
+ fontSize: fontSizes.text.md,
2147
+ lineHeight: lineHeights[22],
2148
+ letterSpacing: '0'
2149
+ },
2150
+ sm: {
2151
+ fontSize: fontSizes.text.sm,
2152
+ lineHeight: lineHeights[18],
2153
+ letterSpacing: '0'
2154
+ },
2155
+ xs: {
2156
+ fontSize: fontSizes.text.xs,
2157
+ lineHeight: lineHeights[14],
2158
+ letterSpacing: '0'
2159
+ }
2160
+ };
2161
+ const button = {
2162
+ lg: {
2163
+ fontSize: fontSizes.button.lg,
2164
+ lineHeight: lineHeights[28],
2165
+ letterSpacing: '0',
2166
+ fontWeight: fontWeights.normal
2167
+ },
2168
+ md: {
2169
+ fontSize: fontSizes.button.md,
2170
+ lineHeight: lineHeights[22],
2171
+ letterSpacing: '0',
2172
+ fontWeight: fontWeights.normal
2173
+ },
2174
+ sm: {
2175
+ fontSize: fontSizes.button.sm,
2176
+ lineHeight: lineHeights[14],
2177
+ letterSpacing: '0',
2178
+ fontWeight: fontWeights.normal
2179
+ }
2180
+ };
2181
+ const field = {
2182
+ lg: {
2183
+ fontSize: fontSizes.field.lg,
2184
+ lineHeight: lineHeights[24],
2185
+ letterSpacing: '0',
2186
+ fontWeight: fontWeights.normal
2187
+ },
2188
+ md: {
2189
+ fontSize: fontSizes.field.md,
2190
+ lineHeight: lineHeights[22],
2191
+ letterSpacing: '0',
2192
+ fontWeight: fontWeights.normal
2193
+ },
2194
+ sm: {
2195
+ fontSize: fontSizes.field.sm,
2196
+ lineHeight: lineHeights[18],
2197
+ letterSpacing: '0',
2198
+ fontWeight: fontWeights.normal
2199
+ }
2200
+ };
2201
+ const textStyles = {
2202
+ heading,
2203
+ text,
2204
+ button,
2205
+ field
2206
+ };
2207
+
2208
+
2209
+
2210
+ var foundations = {
2211
+ __proto__: null,
2212
+ colors: colors,
2213
+ radii: radius,
2214
+ space: spacing,
2215
+ sizes: sizes,
2216
+ fonts: fonts,
2217
+ fontSizes: fontSizes,
2218
+ lineHeights: lineHeights,
2219
+ textStyles: textStyles
2220
+ };
2221
+
2222
+ const styleMd = textStyles.text.sm;
2223
+ const selectStyle = {
2224
+ fontSize: styleMd.fontSize,
2225
+ lineHeight: styleMd.lineHeight,
2226
+ letterSpacing: 0
2227
+ };
2228
+ function selectStyles(colorMode) {
2229
+ return {
2230
+ control: base => colorMode === 'dark' ? {
2231
+ ...base,
2232
+ ...selectStyle,
2233
+ background: 'transparent',
2234
+ color: colors.primary['300'],
2235
+ borderColor: colors.secondary['500']
2236
+ } : {
2237
+ ...base,
2238
+ ...selectStyle
2239
+ },
2240
+ option: (base, {
2241
+ isSelected
2242
+ }) => colorMode === 'dark' ? {
2243
+ ...base,
2244
+ ...selectStyle,
2245
+ background: isSelected ? colors.primary['700'] : colors.dark['800'],
2246
+ color: 'white'
2247
+ } : {
2248
+ ...base,
2249
+ ...selectStyle
2250
+ },
2251
+ menu: base => colorMode === 'dark' ? {
2252
+ ...base,
2253
+ ...selectStyle,
2254
+ background: colors.dark['800'],
2255
+ zIndex: 5
2256
+ } : {
2257
+ ...base,
2258
+ ...selectStyle,
2259
+ zIndex: 5
2260
+ },
2261
+ singleValue: base => colorMode === 'dark' ? {
2262
+ ...base,
2263
+ ...selectStyle,
2264
+ color: 'white'
2265
+ } : {
2266
+ ...base,
2267
+ ...selectStyle
2268
+ },
2269
+ input: base => colorMode === 'dark' ? {
2270
+ ...base,
2271
+ ...selectStyle,
2272
+ color: 'white'
2273
+ } : {
2274
+ ...base,
2275
+ ...selectStyle
2276
+ },
2277
+ dropdownIndicator: base => colorMode === 'dark' ? {
2278
+ ...base,
2279
+ ...selectStyle,
2280
+ color: colors.secondary['500']
2281
+ } : {
2282
+ ...base,
2283
+ ...selectStyle
2284
+ },
2285
+ indicatorSeparator: base => colorMode === 'dark' ? {
2286
+ ...base,
2287
+ ...selectStyle,
2288
+ backgroundColor: colors.secondary['500']
2289
+ } : {
2290
+ ...base,
2291
+ ...selectStyle
2292
+ }
2293
+ };
2294
+ }
2295
+ const themeSelect = theme => {
2296
+ return {
2297
+ ...theme,
2298
+ colors: {
2299
+ ...theme.colors,
2300
+ primary: colors.primary['500'],
2301
+ primary25: colors.primary['50'],
2302
+ primary50: colors.primary['100'],
2303
+ primary75: colors.primary['200']
2304
+ }
2305
+ };
2306
+ };
2307
+
2308
+ function Select({
2309
+ styles,
2310
+ ...rest
2311
+ }) {
2312
+ const {
2313
+ colorMode
2314
+ } = useColorMode();
2315
+ return React.createElement(ReactSelect, Object.assign({}, rest, {
2316
+ styles: {
2317
+ ...selectStyles(colorMode),
2318
+ ...styles
2319
+ },
2320
+ theme: themeSelect
2321
+ }));
2322
+ }
2323
+
2324
+ function SelectAsync({
2325
+ styles,
2326
+ ...rest
2327
+ }) {
2328
+ const {
2329
+ colorMode
2330
+ } = useColorMode();
2331
+ return React.createElement(AsyncPaginate, Object.assign({}, rest, {
2332
+ styles: {
2333
+ ...selectStyles(colorMode),
2334
+ ...styles
2335
+ },
2336
+ theme: themeSelect
2337
+ }));
2338
+ }
2339
+
2340
+ function SelectCreatable({
2341
+ styles,
2342
+ ...rest
2343
+ }) {
2344
+ const {
2345
+ colorMode
2346
+ } = useColorMode();
2347
+ return React.createElement(ReactSelectCreatable, Object.assign({}, rest, {
2348
+ styles: {
2349
+ ...selectStyles(colorMode),
2350
+ ...styles
2351
+ },
2352
+ theme: themeSelect
2353
+ }));
2354
+ }
2355
+
2356
+ function SelectAsyncCreatable({
2357
+ styles,
2358
+ ...rest
2359
+ }) {
2360
+ const {
2361
+ colorMode
2362
+ } = useColorMode();
2363
+ return React.createElement(ReactSelectAsyncCreatable, Object.assign({}, rest, {
2364
+ styles: {
2365
+ ...selectStyles(colorMode),
2366
+ ...styles
2367
+ },
2368
+ theme: themeSelect
2369
+ }));
2370
+ }
2371
+
2372
+ const Tab = /*#__PURE__*/forwardRef$1((props, ref) => {
2373
+ var _props$leftAddon, _props$rightAddon;
2374
+ const tabProps = useTab({
2375
+ ...props,
2376
+ ref
2377
+ });
2378
+ const isSelected = !!tabProps['aria-selected'];
2379
+ const styles = useMultiStyleConfig('Tabs', tabProps);
2380
+ return /*#__PURE__*/createElement(Button$1, Object.assign({
2381
+ p: 3,
2382
+ fontSize: "text.md",
2383
+ _selected: {
2384
+ borderColor: useColorModeValue('primary.400', 'primary.300'),
2385
+ color: useColorModeValue('primary.500', 'primary.300'),
2386
+ transform: 'translateY(-2px)'
2387
+ },
2388
+ color: useColorModeValue('black.high', 'primary.300'),
2389
+ _focus: {
2390
+ bg: 'none'
2391
+ },
2392
+ __css: styles.tab
2393
+ }, tabProps), /*#__PURE__*/createElement(Flex, null, (_props$leftAddon = props.leftAddon) === null || _props$leftAddon === void 0 ? void 0 : _props$leftAddon.call(props, {
2394
+ isSelected
2395
+ }), tabProps.children, (_props$rightAddon = props.rightAddon) === null || _props$rightAddon === void 0 ? void 0 : _props$rightAddon.call(props, {
2396
+ isSelected
2397
+ })));
2398
+ });
2399
+
2400
+ const TabList = /*#__PURE__*/forwardRef$1((props, ref) => React.createElement(TabList$1, {
2401
+ borderBottom: "1px solid",
2402
+ borderColor: useColorModeValue('gray.200', 'bright-gray.800'),
2403
+ ref: ref
2404
+ }, props.children));
2405
+
2406
+ const TabPanel = /*#__PURE__*/forwardRef$1((props, ref) => React.createElement(TabPanel$1, {
2407
+ px: 0,
2408
+ ref: ref
2409
+ }, props.children));
2410
+
2411
+ const messages = {
2412
+ dragActive: 'Drop file disini...',
2413
+ dragInActive: `(Klik atau drag untuk input file)`,
2414
+ dragReplace: `(Klik atau drag untuk mengganti file)`,
2415
+ replaceFile: 'Ganti File',
2416
+ uploadFile: 'Upload File'
2417
+ };
2418
+
2419
+ const Uploader = ({
2420
+ onHandleUploadFile,
2421
+ onHandleRejections,
2422
+ accept,
2423
+ multiple,
2424
+ selected,
2425
+ maxFiles = 1,
2426
+ renderError,
2427
+ validator,
2428
+ ...props
2429
+ }) => {
2430
+ const [selectedFirstFile, setSelectedFirstFile] = useState();
2431
+ const [isSelected, setIsSelected] = useState(selected || false);
2432
+ const onDrop = useCallback(acceptedFiles => {
2433
+ if (acceptedFiles.length > 0) {
2434
+ onHandleUploadFile === null || onHandleUploadFile === void 0 ? void 0 : onHandleUploadFile(acceptedFiles);
2435
+ if (!multiple) {
2436
+ setIsSelected(true);
2437
+ setSelectedFirstFile(acceptedFiles[0]);
2438
+ }
2439
+ }
2440
+ }, [multiple, onHandleUploadFile]);
2441
+ const {
2442
+ getRootProps,
2443
+ getInputProps,
2444
+ isDragActive,
2445
+ fileRejections
2446
+ } = useDropzone({
2447
+ onDrop,
2448
+ accept,
2449
+ maxFiles,
2450
+ multiple,
2451
+ validator
2452
+ });
2453
+ useEffect(() => {
2454
+ if (fileRejections.length > 0 && onHandleRejections) {
2455
+ onHandleRejections(fileRejections);
2456
+ }
2457
+ }, [fileRejections, onHandleRejections]);
2458
+ const isError = useMemo(() => {
2459
+ const error = fileRejections.length > 0;
2460
+ if (error) {
2461
+ setIsSelected(false);
2462
+ }
2463
+ return error;
2464
+ }, [fileRejections]);
2465
+ useEffect(() => {
2466
+ setIsSelected(selected !== null && selected !== void 0 ? selected : false);
2467
+ }, [selected]);
2468
+ return /*#__PURE__*/createElement(Stack, {
2469
+ direction: "column"
2470
+ }, /*#__PURE__*/createElement(Flex, Object.assign({
2471
+ minH: 200,
2472
+ border: "1px dashed",
2473
+ borderColor: isError ? 'danger.500' : 'primary.500',
2474
+ alignItems: "center",
2475
+ justifyContent: "center",
2476
+ cursor: "pointer"
2477
+ }, props, getRootProps()), /*#__PURE__*/createElement("input", Object.assign({}, getInputProps())), isDragActive ? /*#__PURE__*/createElement(Text, null, messages.dragActive) : /*#__PURE__*/createElement(Flex, {
2478
+ flexDirection: "column",
2479
+ alignItems: "center",
2480
+ color: isError ? 'danger.500' : 'primary.500'
2481
+ }, !multiple && isSelected && /*#__PURE__*/createElement(Heading, {
2482
+ fontWeight: 400,
2483
+ fontSize: "18px",
2484
+ lineHeight: 28,
2485
+ color: "black.high",
2486
+ mb: 2
2487
+ }, selectedFirstFile === null || selectedFirstFile === void 0 ? void 0 : selectedFirstFile.name), !isSelected && /*#__PURE__*/createElement(Heading, {
2488
+ fontWeight: 400,
2489
+ fontSize: "18px",
2490
+ lineHeight: 28,
2491
+ mb: 2
2492
+ }, messages.uploadFile), isSelected ? /*#__PURE__*/createElement(Text, null, messages.dragReplace) : /*#__PURE__*/createElement(Text, null, messages.dragInActive))), renderError === null || renderError === void 0 ? void 0 : renderError(fileRejections));
2493
+ };
2494
+ Uploader.defaultProps = {
2495
+ onHandleUploadFile: undefined,
2496
+ onHandleRejections: undefined,
2497
+ renderError: undefined,
2498
+ selected: false
2499
+ };
2500
+
2501
+ // You can also use the more specific type for
2502
+ // a single part component: ComponentSingleStyleConfig
2503
+ const Button = {
2504
+ // The styles all button have in common
2505
+ baseStyle: {
2506
+ fontSize: 'body.1',
2507
+ fontWeight: 'normal',
2508
+ lineHeight: '1.25',
2509
+ minW: 24,
2510
+ px: 4,
2511
+ py: 2,
2512
+ borderRadius: 'md',
2513
+ _disabled: {
2514
+ opacity: 0.3
2515
+ },
2516
+ _hover: {
2517
+ _disabled: {
2518
+ opacity: 0.3
2519
+ }
2520
+ },
2521
+ _active: {
2522
+ _disabled: {
2523
+ opacity: 0.3
2524
+ }
2525
+ },
2526
+ _loading: {
2527
+ opacity: 0.7
2528
+ }
2529
+ },
2530
+ sizes: {
2531
+ lg: {
2532
+ fontSize: 'button.lg',
2533
+ h: 12
2534
+ },
2535
+ md: {
2536
+ fontSize: 'button.md',
2537
+ h: 9
2538
+ },
2539
+ sm: {
2540
+ fontSize: 'button.sm',
2541
+ h: 6
2542
+ }
2543
+ },
2544
+ // Two variants: outline and solid
2545
+ variants: {
2546
+ solid: {
2547
+ color: 'white',
2548
+ bg: 'primary.500',
2549
+ _disabled: {
2550
+ bg: 'primary.700'
2551
+ },
2552
+ _hover: {
2553
+ bg: 'primary.600'
2554
+ },
2555
+ _active: {
2556
+ bg: 'primary.700'
2557
+ },
2558
+ _focus: {
2559
+ bg: 'primary.700'
2560
+ }
2561
+ },
2562
+ outline: props => ({
2563
+ color: 'primary.500',
2564
+ borderWidth: 1,
2565
+ borderStyle: 'inside',
2566
+ bg: mode('white', 'transparent')(props),
2567
+ borderColor: mode('primary.500', 'primary.500')(props),
2568
+ _hover: {
2569
+ bg: 'primary.50'
2570
+ },
2571
+ _active: {
2572
+ bg: 'primary.100'
2573
+ },
2574
+ _focus: {
2575
+ bg: 'primary.100'
2576
+ }
2577
+ }),
2578
+ 'outline-danger': {
2579
+ color: 'danger.500',
2580
+ bg: 'white',
2581
+ borderStyle: 'inside',
2582
+ borderWidth: 1,
2583
+ borderColor: 'danger.500'
2584
+ },
2585
+ ghost: {
2586
+ color: 'primary.500',
2587
+ _disabled: {
2588
+ bg: 'primary.100'
2589
+ }
2590
+ },
2591
+ link: {
2592
+ bg: 'transparent',
2593
+ color: 'primary.500'
2594
+ }
2595
+ },
2596
+ // The default size and variant values
2597
+ defaultProps: {
2598
+ size: 'md',
2599
+ variant: 'solid',
2600
+ orientation: 'vertical',
2601
+ colorScheme: 'primary'
2602
+ }
2603
+ };
2604
+
2605
+ const {
2606
+ definePartsStyle
2607
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys);
2608
+ const $size = /*#__PURE__*/cssVar('checkbox-size');
2609
+ // You can also use the more specific type for
2610
+ // a single part component: ComponentSingleStyleConfig
2611
+ const Checkbox = {
2612
+ // The styles all checkbox have in common
2613
+ baseStyle: {
2614
+ borderRadius: 'sm'
2615
+ },
2616
+ // Two sizes: sm and md
2617
+ sizes: {
2618
+ sm: /*#__PURE__*/definePartsStyle({
2619
+ control: {
2620
+ [$size.variable]: 'sizes.4',
2621
+ borderRadius: 'md'
2622
+ },
2623
+ label: {
2624
+ fontSize: 'text.sm'
2625
+ },
2626
+ icon: {
2627
+ fontSize: '3xs'
2628
+ }
2629
+ }),
2630
+ md: /*#__PURE__*/definePartsStyle({
2631
+ control: {
2632
+ [$size.variable]: 'sizes.5',
2633
+ borderRadius: 'md'
2634
+ },
2635
+ label: {
2636
+ fontSize: 'text.md'
2637
+ },
2638
+ icon: {
2639
+ fontSize: '2xs'
2640
+ }
2641
+ }),
2642
+ lg: /*#__PURE__*/definePartsStyle({
2643
+ control: {
2644
+ [$size.variable]: 'sizes.6',
2645
+ borderRadius: 'md'
2646
+ },
2647
+ label: {
2648
+ fontSize: 'text.lg'
2649
+ },
2650
+ icon: {
2651
+ fontSize: 'xs'
2652
+ }
2653
+ })
2654
+ },
2655
+ // Two variants: outline and solid
2656
+ variants: {},
2657
+ // The default size and variant values
2658
+ defaultProps: {
2659
+ size: 'sm',
2660
+ variant: 'solid',
2661
+ orientation: 'vertical',
2662
+ colorScheme: 'primary'
2663
+ }
2664
+ };
2665
+
2666
+ const baseStyle = /*#__PURE__*/defineStyle({
2667
+ fontSize: 'field.sm',
2668
+ marginEnd: 1,
2669
+ mb: 1
2670
+ });
2671
+ const FormLabel = /*#__PURE__*/defineStyleConfig({
2672
+ baseStyle
2673
+ });
2674
+
2675
+ const {
2676
+ definePartsStyle: definePartsStyle$1,
2677
+ defineMultiStyleConfig
2678
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(inputAnatomy.keys);
2679
+ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
2680
+ field: {
2681
+ width: '100%',
2682
+ minWidth: 0,
2683
+ outline: 0,
2684
+ px: 2.5,
2685
+ py: 2,
2686
+ position: 'relative',
2687
+ appearance: 'none',
2688
+ transitionProperty: 'common',
2689
+ transitionDuration: 'normal',
2690
+ color: 'black.high',
2691
+ _disabled: {
2692
+ bg: 'neutral.300',
2693
+ border: '1px solid',
2694
+ borderColor: 'neutral.400',
2695
+ cursor: 'not-allowed'
2696
+ },
2697
+ _placeholder: {
2698
+ color: 'black.low'
2699
+ }
2700
+ }
2701
+ });
2702
+ const size = {
2703
+ lg: /*#__PURE__*/defineStyle({
2704
+ fontSize: 'field.lg',
2705
+ h: 12,
2706
+ borderRadius: 'md'
2707
+ }),
2708
+ md: /*#__PURE__*/defineStyle({
2709
+ fontSize: 'field.md',
2710
+ h: 10,
2711
+ borderRadius: 'md'
2712
+ }),
2713
+ sm: /*#__PURE__*/defineStyle({
2714
+ fontSize: 'field.sm',
2715
+ h: 9.5,
2716
+ borderRadius: 'md'
2717
+ })
2718
+ };
2719
+ const sizes$1 = {
2720
+ lg: /*#__PURE__*/definePartsStyle$1({
2721
+ field: size.lg,
2722
+ addon: size.lg
2723
+ }),
2724
+ md: /*#__PURE__*/definePartsStyle$1({
2725
+ field: size.md,
2726
+ addon: size.md
2727
+ }),
2728
+ sm: /*#__PURE__*/definePartsStyle$1({
2729
+ field: size.sm,
2730
+ addon: size.sm
2731
+ })
2732
+ };
2733
+ function getDefaults(props) {
2734
+ const {
2735
+ focusBorderColor,
2736
+ errorBorderColor,
2737
+ readOnlyBorderColor
2738
+ } = props;
2739
+ return {
2740
+ focusBorderColor: focusBorderColor || mode('primary.500', 'primary.300')(props),
2741
+ errorBorderColor: errorBorderColor || mode('danger.500', 'danger.300')(props),
2742
+ readOnlyBorderColor: readOnlyBorderColor || mode('.500', 'danger.300')(props)
2743
+ };
2744
+ }
2745
+ const outline = /*#__PURE__*/definePartsStyle$1(props => {
2746
+ const {
2747
+ theme
2748
+ } = props;
2749
+ const {
2750
+ focusBorderColor: fc,
2751
+ errorBorderColor: ec,
2752
+ readOnlyBorderColor: rc
2753
+ } = getDefaults(props);
2754
+ return {
2755
+ field: {
2756
+ border: '1px solid',
2757
+ borderColor: mode('dark.200', 'inherit')(props),
2758
+ bg: mode('white', 'inherit')(props),
2759
+ color: mode('inherit', 'white')(props),
2760
+ _hover: {
2761
+ borderColor: mode('gray.300', 'whiteAlpha.400')(props)
2762
+ },
2763
+ _readOnly: {
2764
+ userSelect: 'all',
2765
+ borderColor: getColor(theme, rc),
2766
+ boxShadow: `0 0 0 0 ${getColor(theme, rc)}`
2767
+ },
2768
+ _invalid: {
2769
+ borderColor: getColor(theme, ec),
2770
+ boxShadow: `0 0 0 0 ${getColor(theme, ec)}`
2771
+ },
2772
+ _focusVisible: {
2773
+ zIndex: 1,
2774
+ borderColor: getColor(theme, fc),
2775
+ boxShadow: `0 0 0 0 ${getColor(theme, fc)}`
2776
+ }
2777
+ },
2778
+ addon: {
2779
+ border: '1px solid',
2780
+ borderColor: mode('inherit', 'whiteAlpha.50')(props),
2781
+ bg: mode('gray.100', 'whiteAlpha.300')(props)
2782
+ }
2783
+ };
2784
+ });
2785
+ const unstyled = /*#__PURE__*/definePartsStyle$1({
2786
+ field: {
2787
+ bg: 'transparent',
2788
+ px: '0',
2789
+ height: 'auto'
2790
+ },
2791
+ addon: {
2792
+ bg: 'transparent',
2793
+ px: '0',
2794
+ height: 'auto'
2795
+ }
2796
+ });
2797
+ const variants = {
2798
+ outline,
2799
+ unstyled
2800
+ };
2801
+ const Input = /*#__PURE__*/defineMultiStyleConfig({
2802
+ baseStyle: baseStyle$1,
2803
+ sizes: sizes$1,
2804
+ variants,
2805
+ defaultProps: {
2806
+ size: 'sm',
2807
+ variant: 'outline'
2808
+ }
2809
+ });
2810
+
2811
+ const {
2812
+ definePartsStyle: definePartsStyle$2
2813
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(radioAnatomy.keys);
2814
+ // You can also use the more specific type for
2815
+ // a single part component: ComponentSingleStyleConfig
2816
+ const Radio = {
2817
+ // The styles all checkbox have in common
2818
+ baseStyle: /*#__PURE__*/definePartsStyle$2({
2819
+ control: {
2820
+ _checked: {
2821
+ borderColor: 'primary.500',
2822
+ bg: 'white',
2823
+ _before: {
2824
+ h: '72%',
2825
+ w: '72%',
2826
+ bg: 'primary.500'
2827
+ },
2828
+ _hover: {
2829
+ borderColor: 'primary.500',
2830
+ bg: 'gray.200'
2831
+ }
2832
+ }
2833
+ }
2834
+ }),
2835
+ // Two sizes: sm and md
2836
+ sizes: {
2837
+ sm: /*#__PURE__*/definePartsStyle$2({
2838
+ control: {
2839
+ w: '3',
2840
+ h: '3'
2841
+ },
2842
+ label: {
2843
+ fontSize: 'text.sm'
2844
+ }
2845
+ }),
2846
+ md: /*#__PURE__*/definePartsStyle$2({
2847
+ control: {
2848
+ w: '4',
2849
+ h: '4'
2850
+ },
2851
+ label: {
2852
+ fontSize: 'text.md'
2853
+ }
2854
+ }),
2855
+ lg: /*#__PURE__*/definePartsStyle$2({
2856
+ control: {
2857
+ w: '5',
2858
+ h: '5'
2859
+ },
2860
+ label: {
2861
+ fontSize: 'text.lg'
2862
+ }
2863
+ })
2864
+ },
2865
+ // Two variants: outline and solid
2866
+ variants: {},
2867
+ // The default size and variant values
2868
+ defaultProps: {
2869
+ size: 'sm',
2870
+ variant: 'solid',
2871
+ orientation: 'vertical',
2872
+ colorScheme: 'primary'
2873
+ }
2874
+ };
2875
+
2876
+ const {
2877
+ definePartsStyle: definePartsStyle$3,
2878
+ defineMultiStyleConfig: defineMultiStyleConfig$1
2879
+ } = /*#__PURE__*/createMultiStyleConfigHelpers$1(switchAnatomy.keys);
2880
+ const baseStyle$2 = /*#__PURE__*/definePartsStyle$3({
2881
+ // define the part you're going to style
2882
+ container: {
2883
+ // ...
2884
+ },
2885
+ thumb: {
2886
+ bg: 'white'
2887
+ },
2888
+ track: {
2889
+ bg: 'neutral.400',
2890
+ p: 1,
2891
+ _checked: {
2892
+ bg: 'primary.500'
2893
+ }
2894
+ }
2895
+ });
2896
+ const Switch = /*#__PURE__*/defineMultiStyleConfig$1({
2897
+ baseStyle: baseStyle$2
2898
+ });
2899
+
2900
+ const {
2901
+ definePartsStyle: definePartsStyle$4
2902
+ } = /*#__PURE__*/createMultiStyleConfigHelpers(popoverAnatomy.keys);
2903
+ const Popover = {
2904
+ baseStyle: props => definePartsStyle$4({
2905
+ popper: {
2906
+ background: mode('white', 'inherit')(props)
2907
+ }
2908
+ })
2909
+ };
2910
+
2911
+ const Textarea = {
2912
+ baseStyle: {
2913
+ _hover: {
2914
+ borderColor: 'primary.500',
2915
+ boxShadow: 'none',
2916
+ outline: 'none'
2917
+ },
2918
+ _focus: {
2919
+ borderColor: 'primary.500',
2920
+ boxShadow: 'none',
2921
+ outline: 'none'
2922
+ },
2923
+ _focusVisible: {
2924
+ borderColor: 'primary.500',
2925
+ boxShadow: 'none',
2926
+ outline: 'none'
2927
+ },
2928
+ _focusWithin: {
2929
+ borderColor: 'primary.500',
2930
+ boxShadow: 'none',
2931
+ outline: 'none'
2932
+ }
2933
+ }
2934
+ };
2935
+
2936
+
2937
+
2938
+ var components = {
2939
+ __proto__: null,
2940
+ Button: Button,
2941
+ Checkbox: Checkbox,
2942
+ FormLabel: FormLabel,
2943
+ Input: Input,
2944
+ Radio: Radio,
2945
+ Switch: Switch,
2946
+ Popover: Popover,
2947
+ Textarea: Textarea
2948
+ };
2949
+
2950
+ const config = {
2951
+ initialColorMode: 'light',
2952
+ useSystemColorMode: false
2953
+ };
2954
+ const theme = /*#__PURE__*/extendTheme({
2955
+ ...foundations,
2956
+ components: {
2957
+ ...components
2958
+ },
2959
+ styles: {
2960
+ global: {
2961
+ '*::-webkit-scrollbar-thumb': {
2962
+ background: 'neutral.400'
2963
+ },
2964
+ body: {
2965
+ fontSize: 'text.sm'
2966
+ }
2967
+ }
2968
+ },
2969
+ config
2970
+ });
2971
+
2972
+ const ProviderContext = /*#__PURE__*/createContext({
2973
+ instance: undefined
2974
+ });
2975
+ const useInternalUI = () => {
2976
+ const {
2977
+ instance
2978
+ } = useContext(ProviderContext);
2979
+ return {
2980
+ instance
2981
+ };
2982
+ };
2983
+ const Provider = ({
2984
+ children,
2985
+ config,
2986
+ requestInterceptors,
2987
+ responseInterceptors
2988
+ }) => {
2989
+ const instanceRef = useRef(axios.create(config));
2990
+ useEffect(() => {
2991
+ requestInterceptors === null || requestInterceptors === void 0 ? void 0 : requestInterceptors.forEach(interceptor => {
2992
+ instanceRef.current.interceptors.request.use(interceptor);
2993
+ });
2994
+ responseInterceptors === null || responseInterceptors === void 0 ? void 0 : responseInterceptors.forEach(interceptor => {
2995
+ instanceRef.current.interceptors.response.use(interceptor);
2996
+ });
2997
+ }, [requestInterceptors, responseInterceptors]);
2998
+ const provider = useMemo(() => ({
2999
+ instance: instanceRef.current
3000
+ }), []);
3001
+ return React.createElement(ProviderContext.Provider, {
3002
+ value: provider
3003
+ }, children);
3004
+ };
3005
+ Provider.displayName = 'Provider';
3006
+
3007
+ export { BreadCrumb, DataTable, Datepicker, Field, Header, InputField, Navigation as MainMenu, ModalCloseButton, ModalFooter, ModalHeader, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Tab, TabList, TabPanel, TextareaField, Uploader, theme, useInternalUI };
3008
+ //# sourceMappingURL=internal-ui.esm.js.map