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