@ctlyst.id/internal-ui 2.0.7 → 2.0.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/button/__stories__/button.stories.d.ts +1 -1
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/data-table/__stories__/datatable.stories.d.ts +3 -17
- package/dist/components/data-table/components/data-table.d.ts +10 -20
- package/dist/components/data-table/components/indeterminate-checkbox.d.ts +7 -4
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/layouting/index.d.ts +1 -16
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/loader/components/loader.d.ts +1 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/text/index.d.ts +1 -2
- package/dist/components/tooltip/__stories__/tooltip.stories.d.ts +10 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/config/theme/components/checkbox.d.ts +15 -1
- package/dist/config/theme/components/radio.d.ts +3 -0
- package/dist/hooks/index.d.ts +1 -2
- package/dist/index.d.ts +2 -0
- package/dist/internal-ui.cjs.development.js +420 -72
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +13 -13
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +218 -67
- package/dist/internal-ui.esm.js.map +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components/layouting/components/box.d.ts +0 -4
- package/dist/components/layouting/components/button-group.d.ts +0 -4
- package/dist/components/layouting/components/container.d.ts +0 -4
- package/dist/components/layouting/components/flex.d.ts +0 -4
- package/dist/components/layouting/components/grid.d.ts +0 -4
- package/dist/components/layouting/components/list.d.ts +0 -6
- package/dist/components/layouting/components/stack.d.ts +0 -5
- package/dist/components/layouting/components/wrap.d.ts +0 -4
- package/dist/components/text/components/text.d.ts +0 -4
- package/dist/hooks/useDisclosure.d.ts +0 -4
@@ -405,15 +405,21 @@ function CheckboxComponent({
|
|
405
405
|
}, rest, {
|
406
406
|
isDisabled: isDisabled
|
407
407
|
}), children && /*#__PURE__*/React__default.createElement(react.Text, {
|
408
|
+
as: "span",
|
409
|
+
display: "block",
|
408
410
|
textStyle: "text.sm",
|
409
|
-
color: isDisabled ? 'black.
|
411
|
+
color: isDisabled ? 'black.medium' : 'black.high'
|
410
412
|
}, children))), /*#__PURE__*/React__default.createElement(react.Box, {
|
411
413
|
mt: "5px",
|
412
414
|
ml: "24px"
|
413
415
|
}, isError ? /*#__PURE__*/React__default.createElement(react.Text, {
|
416
|
+
as: "span",
|
417
|
+
display: "block",
|
414
418
|
textStyle: "text.xs",
|
415
419
|
color: "danger.500"
|
416
420
|
}, errorText) : /*#__PURE__*/React__default.createElement(react.Text, {
|
421
|
+
as: "span",
|
422
|
+
display: "block",
|
417
423
|
textStyle: "text.xs",
|
418
424
|
color: "black.medium"
|
419
425
|
}, helpText)));
|
@@ -514,37 +520,104 @@ CheckboxGroupComponent.defaultProps = {
|
|
514
520
|
errorMessage: ''
|
515
521
|
};
|
516
522
|
|
517
|
-
const
|
518
|
-
|
523
|
+
const Chips = ({
|
524
|
+
children,
|
519
525
|
...rest
|
520
526
|
}) => {
|
521
|
-
const
|
527
|
+
const {
|
528
|
+
isActive,
|
529
|
+
isDisabled,
|
530
|
+
onClose
|
531
|
+
} = rest;
|
532
|
+
const styles = react.useStyleConfig('Chips', rest);
|
533
|
+
const closeColor = React.useMemo(() => {
|
534
|
+
if (isActive) return 'white.high';
|
535
|
+
if (isDisabled) return 'black.low';
|
536
|
+
return 'primary.500';
|
537
|
+
}, [isActive, isDisabled]);
|
538
|
+
return /*#__PURE__*/React__default.createElement(react.Box, Object.assign({
|
539
|
+
__css: styles,
|
540
|
+
display: "inline-flex",
|
541
|
+
alignItems: "center",
|
542
|
+
justifyContent: "center"
|
543
|
+
}, rest), children, onClose && /*#__PURE__*/React__default.createElement(react.Box, {
|
544
|
+
onClick: isDisabled ? undefined : onClose,
|
545
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
546
|
+
ml: 2,
|
547
|
+
display: "flex",
|
548
|
+
alignItems: "center",
|
549
|
+
justifyContent: "center"
|
550
|
+
}, /*#__PURE__*/React__default.createElement(internalIcon.Close, {
|
551
|
+
color: closeColor,
|
552
|
+
size: 4
|
553
|
+
})));
|
554
|
+
};
|
555
|
+
Chips.defaultProps = {
|
556
|
+
isDisabled: false,
|
557
|
+
isActive: false,
|
558
|
+
onClose: undefined,
|
559
|
+
children: undefined,
|
560
|
+
size: 'sm'
|
561
|
+
};
|
562
|
+
|
563
|
+
const useCombinedRefs = (...refs) => {
|
564
|
+
const targetRef = React.useRef();
|
522
565
|
React.useEffect(() => {
|
523
|
-
|
524
|
-
|
566
|
+
refs.forEach(ref => {
|
567
|
+
/* eslint-disable no-param-reassign */
|
568
|
+
if (!ref) return;
|
569
|
+
if (typeof ref === 'function') {
|
570
|
+
ref(targetRef.current);
|
571
|
+
} else {
|
572
|
+
ref.current = targetRef.current;
|
573
|
+
}
|
574
|
+
});
|
575
|
+
}, [refs]);
|
576
|
+
return targetRef;
|
577
|
+
};
|
578
|
+
const IndeterminateCheckbox = /*#__PURE__*/React.forwardRef(({
|
579
|
+
isIndeterminate,
|
580
|
+
isChecked,
|
581
|
+
...rest
|
582
|
+
}, ref) => {
|
583
|
+
const defaultRef = React.useRef(null);
|
584
|
+
const combinedRef = useCombinedRefs(ref, defaultRef);
|
585
|
+
React.useEffect(() => {
|
586
|
+
if (combinedRef !== null && combinedRef !== void 0 && combinedRef.current) {
|
587
|
+
combinedRef.current.indeterminate = isIndeterminate !== null && isIndeterminate !== void 0 ? isIndeterminate : false;
|
525
588
|
}
|
526
|
-
}, [
|
527
|
-
return /*#__PURE__*/
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
589
|
+
}, [combinedRef, isIndeterminate]);
|
590
|
+
return /*#__PURE__*/React__default.createElement(react.Checkbox, Object.assign({
|
591
|
+
ref: combinedRef,
|
592
|
+
focusBorderColor: "0",
|
593
|
+
isIndeterminate: isIndeterminate,
|
594
|
+
isChecked: isChecked,
|
595
|
+
inputProps: {
|
596
|
+
'data-test-id': `CT_component_indeterminate-checkbox_${rest.id || rest.name}`
|
597
|
+
}
|
598
|
+
}, rest));
|
599
|
+
});
|
600
|
+
IndeterminateCheckbox.displayName = 'IndeterminateCheckbox';
|
601
|
+
IndeterminateCheckbox.defaultProps = {
|
602
|
+
isIndeterminate: false
|
533
603
|
};
|
534
604
|
|
535
605
|
/* eslint-disable react-hooks/rules-of-hooks */
|
536
|
-
const DataTable = ({
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
606
|
+
const DataTable = /*#__PURE__*/React.forwardRef((props, ref) => {
|
607
|
+
const {
|
608
|
+
columns,
|
609
|
+
dataSource = [],
|
610
|
+
isLoading,
|
611
|
+
withSelectedRow,
|
612
|
+
onSelectedRow,
|
613
|
+
onSort,
|
614
|
+
sortDescFirst,
|
615
|
+
styles,
|
616
|
+
sortingState,
|
617
|
+
headerSticky,
|
618
|
+
manualSorting,
|
619
|
+
onRowClick
|
620
|
+
} = props;
|
548
621
|
const [sorting, setSorting] = React.useState(sortingState !== null && sortingState !== void 0 ? sortingState : []);
|
549
622
|
const [rowSelection, onRowSelectionChange] = React.useState({});
|
550
623
|
const dataColumns = React.useMemo(() => columns, [columns]);
|
@@ -552,14 +625,18 @@ const DataTable = ({
|
|
552
625
|
id: 'select',
|
553
626
|
header: ({
|
554
627
|
table
|
555
|
-
}) => /*#__PURE__*/React.createElement(IndeterminateCheckbox, Object.assign({
|
628
|
+
}) => /*#__PURE__*/React.createElement(IndeterminateCheckbox, Object.assign({
|
629
|
+
name: "select-header"
|
630
|
+
}, {
|
556
631
|
checked: table.getIsAllRowsSelected(),
|
557
632
|
indeterminate: table.getIsSomeRowsSelected(),
|
558
633
|
onChange: table.getToggleAllRowsSelectedHandler()
|
559
634
|
})),
|
560
635
|
cell: ({
|
561
636
|
row
|
562
|
-
}) => /*#__PURE__*/React.createElement(IndeterminateCheckbox, Object.assign({
|
637
|
+
}) => /*#__PURE__*/React.createElement(IndeterminateCheckbox, Object.assign({
|
638
|
+
name: `select-${row.index}`
|
639
|
+
}, {
|
563
640
|
checked: row.getIsSelected(),
|
564
641
|
indeterminate: row.getIsSomeSelected(),
|
565
642
|
onChange: row.getToggleSelectedHandler()
|
@@ -583,24 +660,31 @@ const DataTable = ({
|
|
583
660
|
getCoreRowModel: reactTable.getCoreRowModel(),
|
584
661
|
getSortedRowModel: reactTable.getSortedRowModel(),
|
585
662
|
manualPagination: true,
|
586
|
-
|
663
|
+
manualSorting,
|
664
|
+
sortDescFirst,
|
587
665
|
state: {
|
588
666
|
sorting,
|
589
667
|
rowSelection
|
590
668
|
},
|
591
669
|
onRowSelectionChange,
|
592
|
-
onSortingChange
|
593
|
-
manualSorting
|
670
|
+
onSortingChange
|
594
671
|
});
|
672
|
+
const {
|
673
|
+
getSelectedRowModel,
|
674
|
+
toggleAllRowsSelected
|
675
|
+
} = table;
|
595
676
|
const {
|
596
677
|
flatRows
|
597
|
-
} =
|
678
|
+
} = getSelectedRowModel();
|
598
679
|
React.useEffect(() => {
|
599
680
|
const rowData = flatRows.map(row => row.original);
|
600
681
|
if (onSelectedRow) {
|
601
682
|
onSelectedRow(rowData);
|
602
683
|
}
|
603
684
|
}, [flatRows]);
|
685
|
+
React.useImperativeHandle(ref, () => ({
|
686
|
+
toggleAllRowsSelected
|
687
|
+
}));
|
604
688
|
return /*#__PURE__*/React.createElement(react.Box, Object.assign({}, props), isLoading && /*#__PURE__*/React.createElement(react.Flex, {
|
605
689
|
w: "100%",
|
606
690
|
h: "100%",
|
@@ -613,7 +697,12 @@ const DataTable = ({
|
|
613
697
|
color: "primary.500",
|
614
698
|
thickness: "4px",
|
615
699
|
size: "lg"
|
616
|
-
})), /*#__PURE__*/React.createElement(react.Table, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.table), /*#__PURE__*/React.createElement(react.Thead, Object.assign({},
|
700
|
+
})), /*#__PURE__*/React.createElement(react.Table, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.table), /*#__PURE__*/React.createElement(react.Thead, Object.assign({}, (headerSticky ? {
|
701
|
+
position: 'sticky',
|
702
|
+
top: 0,
|
703
|
+
bg: 'white',
|
704
|
+
zIndex: 1
|
705
|
+
} : {})), table.getHeaderGroups().map(headerGroup => /*#__PURE__*/React.createElement(react.Tr, Object.assign({
|
617
706
|
key: headerGroup.id,
|
618
707
|
bg: react.useColorModeValue('initial', 'ebony-clay.700')
|
619
708
|
}, styles === null || styles === void 0 ? void 0 : styles.tableRow), headerGroup.headers.map(header => {
|
@@ -645,21 +734,27 @@ const DataTable = ({
|
|
645
734
|
h: 2
|
646
735
|
}))));
|
647
736
|
})))), /*#__PURE__*/React.createElement(react.Tbody, Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.tableBody), table.getRowModel().rows.map(row => /*#__PURE__*/React.createElement(react.Tr, Object.assign({
|
737
|
+
"data-test-id": "6aZAeefGHBA2oG1wLuv-L",
|
648
738
|
key: row.id
|
649
739
|
}, styles === null || styles === void 0 ? void 0 : styles.tableRow, {
|
650
740
|
css: react$1.css`
|
651
|
-
|
652
|
-
|
653
|
-
|
741
|
+
&:last-child {
|
742
|
+
td {
|
743
|
+
border-bottom: none;
|
744
|
+
}
|
654
745
|
}
|
655
|
-
|
656
|
-
|
746
|
+
`,
|
747
|
+
onClick: () => {
|
748
|
+
if (onRowClick) {
|
749
|
+
onRowClick(row.original);
|
750
|
+
}
|
751
|
+
}
|
657
752
|
}), row.getVisibleCells().map(cell => /*#__PURE__*/React.createElement(react.Td, Object.assign({
|
658
753
|
key: cell.id,
|
659
754
|
fontSize: "text.sm",
|
660
755
|
color: react.useColorModeValue('dark.800', 'dark.300')
|
661
756
|
}, styles === null || styles === void 0 ? void 0 : styles.tableCell), reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()))))))));
|
662
|
-
};
|
757
|
+
});
|
663
758
|
/* eslint-disable react/default-props-match-prop-types */
|
664
759
|
DataTable.defaultProps = {
|
665
760
|
withSelectedRow: false,
|
@@ -673,7 +768,10 @@ DataTable.defaultProps = {
|
|
673
768
|
onSelectedRow: undefined,
|
674
769
|
onSort: undefined,
|
675
770
|
manualSorting: false,
|
676
|
-
sortingState: []
|
771
|
+
sortingState: [],
|
772
|
+
sortDescFirst: false,
|
773
|
+
headerSticky: false,
|
774
|
+
onRowClick: undefined
|
677
775
|
};
|
678
776
|
|
679
777
|
const getProperties = props => {
|
@@ -2906,15 +3004,21 @@ function RadioComponent({
|
|
2906
3004
|
}, rest, {
|
2907
3005
|
isDisabled: isDisabled
|
2908
3006
|
}), children && /*#__PURE__*/React__default.createElement(react.Text, {
|
3007
|
+
as: "span",
|
3008
|
+
display: "block",
|
2909
3009
|
textStyle: "text.sm",
|
2910
|
-
color: isDisabled ? 'black.
|
3010
|
+
color: isDisabled ? 'black.medium' : 'black.high'
|
2911
3011
|
}, children))), /*#__PURE__*/React__default.createElement(react.Box, {
|
2912
3012
|
mt: "5px",
|
2913
3013
|
ml: "24px"
|
2914
3014
|
}, isError ? /*#__PURE__*/React__default.createElement(react.Text, {
|
3015
|
+
as: "span",
|
3016
|
+
display: "block",
|
2915
3017
|
textStyle: "text.xs",
|
2916
3018
|
color: "danger.500"
|
2917
3019
|
}, errorText) : /*#__PURE__*/React__default.createElement(react.Text, {
|
3020
|
+
as: "span",
|
3021
|
+
display: "block",
|
2918
3022
|
textStyle: "text.xs",
|
2919
3023
|
color: "black.medium"
|
2920
3024
|
}, helpText)));
|
@@ -3840,8 +3944,7 @@ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
|
|
3840
3944
|
border: '1px solid'
|
3841
3945
|
},
|
3842
3946
|
icon: {
|
3843
|
-
color: 'neutral.50'
|
3844
|
-
width: '9px'
|
3947
|
+
color: 'neutral.50'
|
3845
3948
|
},
|
3846
3949
|
label: {
|
3847
3950
|
fontWeight: '400',
|
@@ -3850,8 +3953,8 @@ const baseStyle$1 = /*#__PURE__*/definePartsStyle$1({
|
|
3850
3953
|
ml: '8px'
|
3851
3954
|
},
|
3852
3955
|
_disabled: {
|
3853
|
-
background: 'neutral.
|
3854
|
-
border: '
|
3956
|
+
background: 'neutral.200',
|
3957
|
+
border: '0',
|
3855
3958
|
borderColor: 'neutral.500',
|
3856
3959
|
cursor: 'not-allowed'
|
3857
3960
|
}
|
@@ -3874,11 +3977,14 @@ const errors = /*#__PURE__*/definePartsStyle$1({
|
|
3874
3977
|
},
|
3875
3978
|
label: {
|
3876
3979
|
fontSize: '12px'
|
3980
|
+
},
|
3981
|
+
icon: {
|
3982
|
+
fontSize: '7px'
|
3877
3983
|
}
|
3878
3984
|
});
|
3879
3985
|
const unstyled = /*#__PURE__*/definePartsStyle$1({
|
3880
3986
|
control: {
|
3881
|
-
borderColor: 'neutral.
|
3987
|
+
borderColor: 'neutral.600',
|
3882
3988
|
_checked: {
|
3883
3989
|
borderColor: 'primary.500',
|
3884
3990
|
backgroundColor: 'primary.500',
|
@@ -3887,21 +3993,33 @@ const unstyled = /*#__PURE__*/definePartsStyle$1({
|
|
3887
3993
|
backgroundColor: 'primary.600'
|
3888
3994
|
},
|
3889
3995
|
_disabled: {
|
3890
|
-
backgroundColor: '
|
3891
|
-
borderColor: '
|
3996
|
+
backgroundColor: 'primary.500',
|
3997
|
+
borderColor: 'primary.500',
|
3998
|
+
opacity: 0.3
|
3892
3999
|
}
|
3893
4000
|
},
|
3894
4001
|
_disabled: {
|
3895
|
-
backgroundColor: 'neutral.
|
3896
|
-
borderColor: 'neutral.
|
4002
|
+
backgroundColor: 'neutral.200',
|
4003
|
+
borderColor: 'neutral.200'
|
3897
4004
|
},
|
3898
4005
|
_indeterminate: {
|
3899
4006
|
borderColor: 'primary.500',
|
3900
|
-
backgroundColor: 'primary.500'
|
4007
|
+
backgroundColor: 'primary.500',
|
4008
|
+
_disabled: {
|
4009
|
+
backgroundColor: 'primary.500',
|
4010
|
+
borderColor: 'primary.500',
|
4011
|
+
opacity: 0.3
|
4012
|
+
}
|
3901
4013
|
}
|
3902
4014
|
},
|
3903
4015
|
label: {
|
3904
|
-
fontSize: '12px'
|
4016
|
+
fontSize: '12px',
|
4017
|
+
_disabled: {
|
4018
|
+
opacity: 1
|
4019
|
+
}
|
4020
|
+
},
|
4021
|
+
icon: {
|
4022
|
+
fontSize: '7px'
|
3905
4023
|
}
|
3906
4024
|
});
|
3907
4025
|
const variants$1 = {
|
@@ -3916,7 +4034,7 @@ const Checkbox = /*#__PURE__*/defineMultiStyleConfig$1({
|
|
3916
4034
|
}
|
3917
4035
|
});
|
3918
4036
|
|
3919
|
-
const Chips = /*#__PURE__*/styledSystem.defineStyleConfig({
|
4037
|
+
const Chips$1 = /*#__PURE__*/styledSystem.defineStyleConfig({
|
3920
4038
|
baseStyle: props => {
|
3921
4039
|
const {
|
3922
4040
|
isDisabled,
|
@@ -4103,6 +4221,7 @@ const rotate = /*#__PURE__*/react$1.keyframes({
|
|
4103
4221
|
const getLoaderColor = color => {
|
4104
4222
|
if (color === 'primary') return colors.primary[600];
|
4105
4223
|
if (color === 'danger') return colors.danger[500];
|
4224
|
+
if (color === 'warning') return colors.warning[700];
|
4106
4225
|
return colors.white.high;
|
4107
4226
|
};
|
4108
4227
|
const LoaderStyle = /*#__PURE__*/styledSystem.defineStyleConfig({
|
@@ -4214,7 +4333,8 @@ const baseStyle$4 = /*#__PURE__*/definePartsStyle$4({
|
|
4214
4333
|
textStyle: 'text.sm',
|
4215
4334
|
color: 'black.high',
|
4216
4335
|
_disabled: {
|
4217
|
-
|
4336
|
+
opacity: 1,
|
4337
|
+
color: 'black.medium'
|
4218
4338
|
}
|
4219
4339
|
}
|
4220
4340
|
});
|
@@ -4231,21 +4351,22 @@ const errors$1 = /*#__PURE__*/definePartsStyle$4({
|
|
4231
4351
|
},
|
4232
4352
|
_hover: {
|
4233
4353
|
borderColor: 'danger.500',
|
4234
|
-
bg: '
|
4354
|
+
bg: 'neutral.200'
|
4235
4355
|
},
|
4236
4356
|
_disabled: {
|
4237
4357
|
borderColor: 'danger.500',
|
4238
|
-
bg: 'white',
|
4358
|
+
bg: 'white.high',
|
4239
4359
|
_before: {
|
4240
4360
|
h: '10px',
|
4241
4361
|
w: '10px',
|
4242
|
-
bg: '
|
4362
|
+
bg: 'primary.500',
|
4363
|
+
opacity: 0.3
|
4243
4364
|
}
|
4244
4365
|
}
|
4245
4366
|
},
|
4246
4367
|
_disabled: {
|
4247
4368
|
borderColor: 'danger.500',
|
4248
|
-
bg: 'neutral.
|
4369
|
+
bg: 'neutral.200'
|
4249
4370
|
}
|
4250
4371
|
},
|
4251
4372
|
label: {
|
@@ -4268,18 +4389,19 @@ const unstyled$2 = /*#__PURE__*/definePartsStyle$4({
|
|
4268
4389
|
bg: 'gray.200'
|
4269
4390
|
},
|
4270
4391
|
_disabled: {
|
4271
|
-
borderColor: '
|
4272
|
-
bg: 'white',
|
4392
|
+
borderColor: 'primary.500',
|
4393
|
+
bg: 'white.high',
|
4394
|
+
opacity: 0.3,
|
4273
4395
|
_before: {
|
4274
4396
|
h: '10px',
|
4275
4397
|
w: '10px',
|
4276
|
-
bg: '
|
4398
|
+
bg: 'primary.500'
|
4277
4399
|
}
|
4278
4400
|
}
|
4279
4401
|
},
|
4280
4402
|
_disabled: {
|
4281
|
-
borderColor: 'neutral.
|
4282
|
-
bg: 'neutral.
|
4403
|
+
borderColor: 'neutral.200',
|
4404
|
+
bg: 'neutral.200'
|
4283
4405
|
}
|
4284
4406
|
},
|
4285
4407
|
label: {
|
@@ -4458,7 +4580,7 @@ var components = {
|
|
4458
4580
|
Button: Button$1,
|
4459
4581
|
Card: CardStyle,
|
4460
4582
|
Checkbox: Checkbox,
|
4461
|
-
Chips: Chips,
|
4583
|
+
Chips: Chips$1,
|
4462
4584
|
FormLabel: FormLabel,
|
4463
4585
|
Input: Input,
|
4464
4586
|
LoaderStyle: LoaderStyle,
|
@@ -4526,6 +4648,35 @@ const Provider = ({
|
|
4526
4648
|
};
|
4527
4649
|
Provider.displayName = 'Provider';
|
4528
4650
|
|
4651
|
+
function useFetcher() {
|
4652
|
+
const {
|
4653
|
+
instance
|
4654
|
+
} = useInternalUI();
|
4655
|
+
const axiosInstance = React.useMemo(() => instance || axios, [instance]);
|
4656
|
+
const fetcher = async ({
|
4657
|
+
url,
|
4658
|
+
data,
|
4659
|
+
method,
|
4660
|
+
headers,
|
4661
|
+
...config
|
4662
|
+
}) => {
|
4663
|
+
const response = await axiosInstance.request({
|
4664
|
+
data,
|
4665
|
+
url,
|
4666
|
+
method,
|
4667
|
+
headers: {
|
4668
|
+
'Content-Type': 'application/json; charset=utf-8',
|
4669
|
+
...headers
|
4670
|
+
},
|
4671
|
+
...config
|
4672
|
+
});
|
4673
|
+
return response;
|
4674
|
+
};
|
4675
|
+
return {
|
4676
|
+
fetcher
|
4677
|
+
};
|
4678
|
+
}
|
4679
|
+
|
4529
4680
|
Object.defineProperty(exports, 'AlertDialog', {
|
4530
4681
|
enumerable: true,
|
4531
4682
|
get: function () {
|
@@ -4568,6 +4719,42 @@ Object.defineProperty(exports, 'AlertDialogOverlay', {
|
|
4568
4719
|
return react.ModalOverlay;
|
4569
4720
|
}
|
4570
4721
|
});
|
4722
|
+
Object.defineProperty(exports, 'Box', {
|
4723
|
+
enumerable: true,
|
4724
|
+
get: function () {
|
4725
|
+
return react.Box;
|
4726
|
+
}
|
4727
|
+
});
|
4728
|
+
Object.defineProperty(exports, 'ButtonGroup', {
|
4729
|
+
enumerable: true,
|
4730
|
+
get: function () {
|
4731
|
+
return react.ButtonGroup;
|
4732
|
+
}
|
4733
|
+
});
|
4734
|
+
Object.defineProperty(exports, 'ChakraProvider', {
|
4735
|
+
enumerable: true,
|
4736
|
+
get: function () {
|
4737
|
+
return react.ChakraProvider;
|
4738
|
+
}
|
4739
|
+
});
|
4740
|
+
Object.defineProperty(exports, 'CloseButton', {
|
4741
|
+
enumerable: true,
|
4742
|
+
get: function () {
|
4743
|
+
return react.CloseButton;
|
4744
|
+
}
|
4745
|
+
});
|
4746
|
+
Object.defineProperty(exports, 'Container', {
|
4747
|
+
enumerable: true,
|
4748
|
+
get: function () {
|
4749
|
+
return react.Container;
|
4750
|
+
}
|
4751
|
+
});
|
4752
|
+
Object.defineProperty(exports, 'Divider', {
|
4753
|
+
enumerable: true,
|
4754
|
+
get: function () {
|
4755
|
+
return react.Divider;
|
4756
|
+
}
|
4757
|
+
});
|
4571
4758
|
Object.defineProperty(exports, 'Drawer', {
|
4572
4759
|
enumerable: true,
|
4573
4760
|
get: function () {
|
@@ -4610,12 +4797,48 @@ Object.defineProperty(exports, 'DrawerOverlay', {
|
|
4610
4797
|
return react.ModalOverlay;
|
4611
4798
|
}
|
4612
4799
|
});
|
4800
|
+
Object.defineProperty(exports, 'Flex', {
|
4801
|
+
enumerable: true,
|
4802
|
+
get: function () {
|
4803
|
+
return react.Flex;
|
4804
|
+
}
|
4805
|
+
});
|
4806
|
+
Object.defineProperty(exports, 'Grid', {
|
4807
|
+
enumerable: true,
|
4808
|
+
get: function () {
|
4809
|
+
return react.Grid;
|
4810
|
+
}
|
4811
|
+
});
|
4812
|
+
Object.defineProperty(exports, 'GridItem', {
|
4813
|
+
enumerable: true,
|
4814
|
+
get: function () {
|
4815
|
+
return react.GridItem;
|
4816
|
+
}
|
4817
|
+
});
|
4613
4818
|
Object.defineProperty(exports, 'HStack', {
|
4614
4819
|
enumerable: true,
|
4615
4820
|
get: function () {
|
4616
4821
|
return react.HStack;
|
4617
4822
|
}
|
4618
4823
|
});
|
4824
|
+
Object.defineProperty(exports, 'Heading', {
|
4825
|
+
enumerable: true,
|
4826
|
+
get: function () {
|
4827
|
+
return react.Heading;
|
4828
|
+
}
|
4829
|
+
});
|
4830
|
+
Object.defineProperty(exports, 'Icon', {
|
4831
|
+
enumerable: true,
|
4832
|
+
get: function () {
|
4833
|
+
return react.Icon;
|
4834
|
+
}
|
4835
|
+
});
|
4836
|
+
Object.defineProperty(exports, 'Image', {
|
4837
|
+
enumerable: true,
|
4838
|
+
get: function () {
|
4839
|
+
return react.Image;
|
4840
|
+
}
|
4841
|
+
});
|
4619
4842
|
Object.defineProperty(exports, 'InputElementLeft', {
|
4620
4843
|
enumerable: true,
|
4621
4844
|
get: function () {
|
@@ -4628,6 +4851,18 @@ Object.defineProperty(exports, 'InputElementRight', {
|
|
4628
4851
|
return react.InputRightElement;
|
4629
4852
|
}
|
4630
4853
|
});
|
4854
|
+
Object.defineProperty(exports, 'List', {
|
4855
|
+
enumerable: true,
|
4856
|
+
get: function () {
|
4857
|
+
return react.List;
|
4858
|
+
}
|
4859
|
+
});
|
4860
|
+
Object.defineProperty(exports, 'ListIcon', {
|
4861
|
+
enumerable: true,
|
4862
|
+
get: function () {
|
4863
|
+
return react.ListIcon;
|
4864
|
+
}
|
4865
|
+
});
|
4631
4866
|
Object.defineProperty(exports, 'ListItem', {
|
4632
4867
|
enumerable: true,
|
4633
4868
|
get: function () {
|
@@ -4664,6 +4899,78 @@ Object.defineProperty(exports, 'ModalOverlay', {
|
|
4664
4899
|
return react.ModalOverlay;
|
4665
4900
|
}
|
4666
4901
|
});
|
4902
|
+
Object.defineProperty(exports, 'OrderedList', {
|
4903
|
+
enumerable: true,
|
4904
|
+
get: function () {
|
4905
|
+
return react.OrderedList;
|
4906
|
+
}
|
4907
|
+
});
|
4908
|
+
Object.defineProperty(exports, 'Popover', {
|
4909
|
+
enumerable: true,
|
4910
|
+
get: function () {
|
4911
|
+
return react.Popover;
|
4912
|
+
}
|
4913
|
+
});
|
4914
|
+
Object.defineProperty(exports, 'PopoverAnchor', {
|
4915
|
+
enumerable: true,
|
4916
|
+
get: function () {
|
4917
|
+
return react.PopoverAnchor;
|
4918
|
+
}
|
4919
|
+
});
|
4920
|
+
Object.defineProperty(exports, 'PopoverArrow', {
|
4921
|
+
enumerable: true,
|
4922
|
+
get: function () {
|
4923
|
+
return react.PopoverArrow;
|
4924
|
+
}
|
4925
|
+
});
|
4926
|
+
Object.defineProperty(exports, 'PopoverBody', {
|
4927
|
+
enumerable: true,
|
4928
|
+
get: function () {
|
4929
|
+
return react.PopoverBody;
|
4930
|
+
}
|
4931
|
+
});
|
4932
|
+
Object.defineProperty(exports, 'PopoverCloseButton', {
|
4933
|
+
enumerable: true,
|
4934
|
+
get: function () {
|
4935
|
+
return react.PopoverCloseButton;
|
4936
|
+
}
|
4937
|
+
});
|
4938
|
+
Object.defineProperty(exports, 'PopoverContent', {
|
4939
|
+
enumerable: true,
|
4940
|
+
get: function () {
|
4941
|
+
return react.PopoverContent;
|
4942
|
+
}
|
4943
|
+
});
|
4944
|
+
Object.defineProperty(exports, 'PopoverFooter', {
|
4945
|
+
enumerable: true,
|
4946
|
+
get: function () {
|
4947
|
+
return react.PopoverFooter;
|
4948
|
+
}
|
4949
|
+
});
|
4950
|
+
Object.defineProperty(exports, 'PopoverHeader', {
|
4951
|
+
enumerable: true,
|
4952
|
+
get: function () {
|
4953
|
+
return react.PopoverHeader;
|
4954
|
+
}
|
4955
|
+
});
|
4956
|
+
Object.defineProperty(exports, 'PopoverTrigger', {
|
4957
|
+
enumerable: true,
|
4958
|
+
get: function () {
|
4959
|
+
return react.PopoverTrigger;
|
4960
|
+
}
|
4961
|
+
});
|
4962
|
+
Object.defineProperty(exports, 'Portal', {
|
4963
|
+
enumerable: true,
|
4964
|
+
get: function () {
|
4965
|
+
return react.Portal;
|
4966
|
+
}
|
4967
|
+
});
|
4968
|
+
Object.defineProperty(exports, 'Stack', {
|
4969
|
+
enumerable: true,
|
4970
|
+
get: function () {
|
4971
|
+
return react.Stack;
|
4972
|
+
}
|
4973
|
+
});
|
4667
4974
|
Object.defineProperty(exports, 'TabIndicator', {
|
4668
4975
|
enumerable: true,
|
4669
4976
|
get: function () {
|
@@ -4694,12 +5001,60 @@ Object.defineProperty(exports, 'TabsProvider', {
|
|
4694
5001
|
return react.TabsProvider;
|
4695
5002
|
}
|
4696
5003
|
});
|
5004
|
+
Object.defineProperty(exports, 'Text', {
|
5005
|
+
enumerable: true,
|
5006
|
+
get: function () {
|
5007
|
+
return react.Text;
|
5008
|
+
}
|
5009
|
+
});
|
5010
|
+
Object.defineProperty(exports, 'Tooltip', {
|
5011
|
+
enumerable: true,
|
5012
|
+
get: function () {
|
5013
|
+
return react.Tooltip;
|
5014
|
+
}
|
5015
|
+
});
|
5016
|
+
Object.defineProperty(exports, 'UnorderedList', {
|
5017
|
+
enumerable: true,
|
5018
|
+
get: function () {
|
5019
|
+
return react.UnorderedList;
|
5020
|
+
}
|
5021
|
+
});
|
4697
5022
|
Object.defineProperty(exports, 'VStack', {
|
4698
5023
|
enumerable: true,
|
4699
5024
|
get: function () {
|
4700
5025
|
return react.VStack;
|
4701
5026
|
}
|
4702
5027
|
});
|
5028
|
+
Object.defineProperty(exports, 'Wrap', {
|
5029
|
+
enumerable: true,
|
5030
|
+
get: function () {
|
5031
|
+
return react.Wrap;
|
5032
|
+
}
|
5033
|
+
});
|
5034
|
+
Object.defineProperty(exports, 'WrapItem', {
|
5035
|
+
enumerable: true,
|
5036
|
+
get: function () {
|
5037
|
+
return react.WrapItem;
|
5038
|
+
}
|
5039
|
+
});
|
5040
|
+
Object.defineProperty(exports, 'extendTheme', {
|
5041
|
+
enumerable: true,
|
5042
|
+
get: function () {
|
5043
|
+
return react.extendTheme;
|
5044
|
+
}
|
5045
|
+
});
|
5046
|
+
Object.defineProperty(exports, 'useColorModeValue', {
|
5047
|
+
enumerable: true,
|
5048
|
+
get: function () {
|
5049
|
+
return react.useColorModeValue;
|
5050
|
+
}
|
5051
|
+
});
|
5052
|
+
Object.defineProperty(exports, 'useDisclosure', {
|
5053
|
+
enumerable: true,
|
5054
|
+
get: function () {
|
5055
|
+
return react.useDisclosure;
|
5056
|
+
}
|
5057
|
+
});
|
4703
5058
|
Object.defineProperty(exports, 'useDrawerContext', {
|
4704
5059
|
enumerable: true,
|
4705
5060
|
get: function () {
|
@@ -4797,25 +5152,20 @@ exports.AlertDescription = AlertDescription;
|
|
4797
5152
|
exports.AlertIcon = AlertIcon;
|
4798
5153
|
exports.AlertTitle = AlertTitle;
|
4799
5154
|
exports.Badge = Badge;
|
4800
|
-
exports.Box = react.Box;
|
4801
5155
|
exports.BreadCrumb = BreadCrumb;
|
4802
5156
|
exports.Button = Button;
|
4803
|
-
exports.ButtonGroup = react.ButtonGroup;
|
4804
5157
|
exports.Card = CardCustom;
|
4805
5158
|
exports.Checkbox = CheckboxComponent;
|
4806
5159
|
exports.CheckboxGroup = CheckboxGroupComponent;
|
4807
|
-
exports.
|
5160
|
+
exports.Chips = Chips;
|
4808
5161
|
exports.DataTable = DataTable;
|
4809
5162
|
exports.DatePickerMonth = DatePickerMonth;
|
4810
5163
|
exports.Datepicker = Datepicker;
|
4811
5164
|
exports.Field = Field;
|
4812
|
-
exports.Flex = react.Flex;
|
4813
|
-
exports.Grid = react.Grid;
|
4814
5165
|
exports.Header = Header;
|
4815
5166
|
exports.InputAddonLeft = InputAddonLeft;
|
4816
5167
|
exports.InputAddonRight = InputAddonRight;
|
4817
5168
|
exports.InputField = InputField;
|
4818
|
-
exports.List = react.List;
|
4819
5169
|
exports.Loader = Loader;
|
4820
5170
|
exports.MainMenu = Navigation;
|
4821
5171
|
exports.ModalBody = ModalBody;
|
@@ -4835,17 +5185,15 @@ exports.Select = Select;
|
|
4835
5185
|
exports.SelectAsync = SelectAsync;
|
4836
5186
|
exports.SelectAsyncCreatable = SelectAsyncCreatable;
|
4837
5187
|
exports.SelectCreatable = SelectCreatable;
|
4838
|
-
exports.Stack = react.Stack;
|
4839
5188
|
exports.Switch = Switch;
|
4840
5189
|
exports.Tab = Tab;
|
4841
5190
|
exports.TabList = TabList;
|
4842
5191
|
exports.TabPanel = TabPanel;
|
4843
|
-
exports.Text = react.Text;
|
4844
5192
|
exports.TextareaField = TextareaField;
|
4845
5193
|
exports.Uploader = Uploader;
|
4846
|
-
exports.Wrap = react.Wrap;
|
4847
5194
|
exports.foundations = foundations;
|
4848
5195
|
exports.theme = theme;
|
4849
5196
|
exports.useAlertStyles = useAlertStyles;
|
5197
|
+
exports.useFetcher = useFetcher;
|
4850
5198
|
exports.useInternalUI = useInternalUI;
|
4851
5199
|
//# sourceMappingURL=internal-ui.cjs.development.js.map
|