@mezzanine-ui/react 0.6.2 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.js +3 -2
- package/Accordion/AccordionDetails.js +3 -2
- package/Accordion/AccordionSummary.js +3 -2
- package/Alert/Alert.js +3 -2
- package/AppBar/AppBar.js +3 -2
- package/AppBar/AppBarBrand.js +3 -2
- package/AppBar/AppBarMain.js +3 -2
- package/AppBar/AppBarSupport.js +3 -2
- package/Badge/Badge.js +3 -2
- package/Badge/BadgeContainer.js +3 -2
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +3 -2
- package/Button/ButtonGroup.js +3 -2
- package/Button/IconButton.js +3 -2
- package/Button/index.js +2 -2
- package/Calendar/Calendar.js +3 -2
- package/Calendar/CalendarCell.js +1 -1
- package/Calendar/CalendarContext.js +1 -2
- package/Calendar/CalendarControls.js +1 -1
- package/Calendar/CalendarDayOfWeek.js +1 -1
- package/Calendar/CalendarDays.js +1 -1
- package/Calendar/CalendarMonths.js +1 -1
- package/Calendar/CalendarWeeks.js +1 -1
- package/Calendar/CalendarYears.js +1 -1
- package/Card/Card.js +3 -2
- package/Card/CardActions.js +3 -2
- package/Checkbox/CheckAll.js +3 -2
- package/Checkbox/Checkbox.js +3 -2
- package/Checkbox/CheckboxGroup.js +3 -2
- package/ConfirmActions/ConfirmActions.js +3 -2
- package/DatePicker/DatePicker.js +3 -2
- package/DatePicker/DatePickerCalendar.js +3 -2
- package/DateRangePicker/DateRangePicker.js +3 -2
- package/DateRangePicker/DateRangePickerCalendar.js +3 -2
- package/DateRangePicker/useDateRangePickerValue.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.js +3 -2
- package/DateTimePicker/DateTimePickerPanel.js +3 -2
- package/Drawer/Drawer.js +3 -2
- package/Dropdown/Dropdown.js +3 -2
- package/Empty/Empty.js +3 -2
- package/Form/FormField.js +3 -2
- package/Form/FormLabel.js +3 -2
- package/Form/FormMessage.js +3 -2
- package/Form/useSelectValueControl.js +8 -2
- package/Icon/Icon.js +3 -2
- package/Input/Input.js +3 -2
- package/Loading/Loading.js +3 -2
- package/Menu/Menu.js +3 -2
- package/Menu/MenuDivider.js +3 -2
- package/Menu/MenuItem.js +3 -2
- package/Menu/MenuItemGroup.js +3 -2
- package/Message/Message.d.ts +8 -5
- package/Message/Message.js +29 -13
- package/Message/index.d.ts +1 -1
- package/Modal/Modal.js +3 -2
- package/Modal/ModalActions.js +3 -2
- package/Modal/ModalBody.js +3 -2
- package/Modal/ModalFooter.js +3 -2
- package/Modal/ModalHeader.js +3 -2
- package/Navigation/Navigation.js +3 -2
- package/Navigation/NavigationItem.js +3 -2
- package/Navigation/NavigationSubMenu.js +3 -2
- package/Notification/Notification.js +3 -2
- package/Notifier/NotifierManager.js +1 -1
- package/Overlay/Overlay.js +3 -2
- package/PageFooter/PageFooter.js +3 -2
- package/Pagination/Pagination.js +3 -2
- package/Pagination/PaginationItem.js +3 -2
- package/Pagination/PaginationJumper.js +3 -2
- package/Picker/PickerTrigger.js +3 -2
- package/Picker/RangePickerTrigger.js +3 -2
- package/Picker/usePickerInputValue.js +1 -2
- package/Picker/usePickerValue.d.ts +1 -1
- package/Picker/useRangePickerValue.d.ts +2 -2
- package/Popconfirm/Popconfirm.js +3 -2
- package/Popover/Popover.js +3 -2
- package/Popper/Popper.js +3 -2
- package/Portal/Portal.js +3 -2
- package/Progress/Progress.js +3 -2
- package/Radio/Radio.js +3 -2
- package/Radio/RadioGroup.js +3 -2
- package/Select/AutoComplete.d.ts +1 -1
- package/Select/AutoComplete.js +3 -2
- package/Select/Option.js +3 -2
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +3 -2
- package/Select/SelectTrigger.js +3 -2
- package/Select/TreeSelect.d.ts +1 -1
- package/Select/TreeSelect.js +3 -2
- package/Skeleton/Skeleton.js +3 -2
- package/Slider/Slider.js +20 -3
- package/Slider/useSlider.js +8 -6
- package/Stepper/Step.js +3 -2
- package/Stepper/Stepper.js +3 -2
- package/Switch/Switch.js +3 -2
- package/Table/Table.d.ts +51 -44
- package/Table/Table.js +42 -23
- package/Table/TableBody.js +10 -4
- package/Table/TableBodyRow.js +3 -2
- package/Table/TableCell.js +3 -2
- package/Table/TableHeader.js +3 -2
- package/Table/editable/TableEditRenderWrapper.js +1 -1
- package/Table/expandable/TableExpandable.js +3 -2
- package/Table/pagination/TablePagination.js +13 -14
- package/Table/pagination/useTablePagination.d.ts +5 -13
- package/Table/pagination/useTablePagination.js +3 -23
- package/Table/refresh/TableRefresh.js +3 -2
- package/Table/rowSelection/TableRowSelection.js +3 -2
- package/Table/sorting/TableSortingIcon.js +3 -2
- package/Table/useTableScroll.d.ts +4 -4
- package/Table/useTableScroll.js +1 -1
- package/Tabs/Tab.js +3 -2
- package/Tabs/TabPane.js +3 -2
- package/Tabs/Tabs.js +3 -2
- package/Tabs/useTabsOverflow.js +1 -1
- package/Tag/Tag.js +3 -2
- package/TextField/TextField.js +3 -2
- package/Textarea/Textarea.js +3 -2
- package/TimePanel/TimePanel.js +3 -2
- package/TimePanel/TimePanelAction.js +3 -2
- package/TimePanel/TimePanelColumn.js +3 -2
- package/TimePicker/TimePicker.js +3 -2
- package/TimePicker/TimePickerPanel.js +3 -2
- package/Tooltip/Tooltip.js +3 -2
- package/Transition/Collapse.js +3 -2
- package/Transition/Fade.js +3 -2
- package/Transition/Grow.js +3 -2
- package/Transition/SlideFade.js +3 -2
- package/Transition/Transition.d.ts +1 -1
- package/Transition/Transition.js +2 -2
- package/Transition/Zoom.js +3 -2
- package/Tree/Tree.js +3 -2
- package/Tree/TreeNode.js +3 -2
- package/Tree/TreeNodeList.js +3 -2
- package/Typography/Typography.d.ts +1 -1
- package/Typography/Typography.js +3 -2
- package/Upload/UploadButton.js +3 -2
- package/Upload/UploadInput.js +3 -2
- package/Upload/UploadResult.js +3 -2
- package/_internal/InputCheck/InputCheck.js +3 -2
- package/_internal/InputCheck/InputCheckGroup.js +3 -2
- package/_internal/InputTriggerPopper/InputTriggerPopper.js +3 -2
- package/index.d.ts +4 -2
- package/index.js +51 -49
- package/package.json +5 -5
- package/utils/{rename-types.d.ts → general.d.ts} +3 -0
package/Slider/Slider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef, useState, useEffect } from 'react';
|
|
3
|
-
import { isRangeSlider, sortSliderValue, sliderClasses, roundToStep } from '@mezzanine-ui/core/slider';
|
|
3
|
+
import { isRangeSlider, fixRangeSliderValue, fixSingleSliderValue, sortSliderValue, sliderClasses, roundToStep } from '@mezzanine-ui/core/slider';
|
|
4
4
|
import { useSlider } from './useSlider.js';
|
|
5
5
|
import Input from '../Input/Input.js';
|
|
6
6
|
import Tooltip from '../Tooltip/Tooltip.js';
|
|
@@ -36,6 +36,22 @@ function SliderComponent(props) {
|
|
|
36
36
|
}
|
|
37
37
|
return `${value[1]}`;
|
|
38
38
|
});
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (max > min) {
|
|
41
|
+
if (isRangeSlider(value)) {
|
|
42
|
+
if ((value[0] > max && value[1] > max) ||
|
|
43
|
+
(value[0] < min && value[1] < min) ||
|
|
44
|
+
value[0] < min ||
|
|
45
|
+
value[1] > max) {
|
|
46
|
+
onChange(fixRangeSliderValue(value, min, max));
|
|
47
|
+
}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (value < min || value > max) {
|
|
51
|
+
onChange(fixSingleSliderValue(value, min, max));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}, [min, max, onChange, value]);
|
|
39
55
|
useEffect(() => {
|
|
40
56
|
if (withInput) {
|
|
41
57
|
if (isRangeSlider(value)) {
|
|
@@ -167,6 +183,7 @@ const Slider = forwardRef((props, ref) => {
|
|
|
167
183
|
return (jsx(SliderComponent, Object.assign({}, props, { innerRef: ref }), void 0));
|
|
168
184
|
}
|
|
169
185
|
return (jsx(SliderComponent, Object.assign({}, props, { innerRef: ref }), void 0));
|
|
170
|
-
});
|
|
186
|
+
});
|
|
187
|
+
var Slider$1 = Slider;
|
|
171
188
|
|
|
172
|
-
export default
|
|
189
|
+
export { Slider$1 as default };
|
package/Slider/useSlider.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toSliderCssVars, getPercentage,
|
|
1
|
+
import { isRangeSlider, fixRangeSliderValue, fixSingleSliderValue, toSliderCssVars, getPercentage, findClosetValueIndex, sortSliderValue, getSliderRect, getValueFromClientX, roundToStep } from '@mezzanine-ui/core/slider';
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
3
|
import { useDocumentEvents } from '../hooks/useDocumentEvents.js';
|
|
4
4
|
|
|
@@ -13,12 +13,14 @@ function useSlider(props) {
|
|
|
13
13
|
}
|
|
14
14
|
return isRangeSlider(value) ? Math.abs(1 - value.indexOf(anchorValue)) : undefined;
|
|
15
15
|
}
|
|
16
|
+
const fixedValue = isRangeSlider(value) ? fixRangeSliderValue(value, min, max)
|
|
17
|
+
: fixSingleSliderValue(value, min, max);
|
|
16
18
|
const cssVars = toSliderCssVars({
|
|
17
|
-
trackWidth: getPercentage(isRangeSlider(
|
|
18
|
-
trackPosition: getPercentage(isRangeSlider(
|
|
19
|
-
handlerPosition: getPercentage(isRangeSlider(
|
|
20
|
-
handlerStartPosition: getPercentage(isRangeSlider(
|
|
21
|
-
handlerEndPosition: getPercentage(isRangeSlider(
|
|
19
|
+
trackWidth: getPercentage(isRangeSlider(fixedValue) ? Math.abs(fixedValue[0] - fixedValue[1]) : fixedValue - min, min, max),
|
|
20
|
+
trackPosition: getPercentage(isRangeSlider(fixedValue) ? Math.abs(Math.min(...fixedValue) - min) : 0, min, max),
|
|
21
|
+
handlerPosition: getPercentage(isRangeSlider(fixedValue) ? 0 : fixedValue - min, min, max),
|
|
22
|
+
handlerStartPosition: getPercentage(isRangeSlider(fixedValue) ? Math.abs(Math.min(...fixedValue) - min) : fixedValue, min, max),
|
|
23
|
+
handlerEndPosition: getPercentage(isRangeSlider(fixedValue) ? Math.abs(Math.max(...fixedValue) - min) : fixedValue, min, max),
|
|
22
24
|
});
|
|
23
25
|
const getRoundedNewValue = (e, railElement) => {
|
|
24
26
|
const clientX = e.type === 'touchmove' ? e.changedTouches[0].clientX : e.clientX;
|
package/Stepper/Step.js
CHANGED
|
@@ -14,6 +14,7 @@ const Step = forwardRef(function Step(props, ref) {
|
|
|
14
14
|
/** icon and step number */
|
|
15
15
|
const iconRender = (jsx(Typography, Object.assign({ className: stepClasses.iconBackground, variant: "button3" }, { children: completed ? (jsx(Icon, Object.assign({ className: stepClasses.completedIcon, icon: CheckIcon }, completedIconProps), void 0)) : index + 1 }), void 0));
|
|
16
16
|
return (jsxs("div", Object.assign({ className: cx(stepClasses.host, disabled && stepClasses.disabled, className), ref: ref }, rest, { children: [iconRender, /** title (optional) */ title && (jsx(Typography, Object.assign({ className: stepClasses.title, variant: "button2" }, titleProps, { children: title }), void 0)), children] }), void 0));
|
|
17
|
-
});
|
|
17
|
+
});
|
|
18
|
+
var Step$1 = Step;
|
|
18
19
|
|
|
19
|
-
export default
|
|
20
|
+
export { Step$1 as default };
|
package/Stepper/Stepper.js
CHANGED
|
@@ -28,6 +28,7 @@ const Stepper = forwardRef(function Stepper(props, ref) {
|
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
return (jsx("div", Object.assign({ className: cx(stepperClasses.host, className), ref: ref }, rest, { children: stepsWithState }), void 0));
|
|
31
|
-
});
|
|
31
|
+
});
|
|
32
|
+
var Stepper$1 = Stepper;
|
|
32
33
|
|
|
33
|
-
export default
|
|
34
|
+
export { Stepper$1 as default };
|
package/Switch/Switch.js
CHANGED
|
@@ -24,6 +24,7 @@ const Switch = forwardRef(function Switch(props, ref) {
|
|
|
24
24
|
[switchClasses.large]: size === 'large',
|
|
25
25
|
}, className) }, { children: [jsx("span", Object.assign({ className: switchClasses.control }, { children: loading && jsx(Icon, { icon: SwitchSpinnerIcon, spin: true }, void 0) }), void 0),
|
|
26
26
|
jsx("input", Object.assign({}, inputProps, { "aria-checked": checked, "aria-disabled": disabled, checked: checked, className: switchClasses.input, disabled: disabled, onChange: onChange, type: "checkbox" }), void 0)] }), void 0));
|
|
27
|
-
});
|
|
27
|
+
});
|
|
28
|
+
var Switch$1 = Switch;
|
|
28
29
|
|
|
29
|
-
export default
|
|
30
|
+
export { Switch$1 as default };
|
package/Table/Table.d.ts
CHANGED
|
@@ -2,78 +2,85 @@
|
|
|
2
2
|
import { TableColumn, TableComponents, TableDataSource, TableRowSelection, TableExpandable, TableFetchMore, TablePagination as TablePaginationType, TableRefresh as TableRefreshType } from '@mezzanine-ui/core/table';
|
|
3
3
|
import { EmptyProps } from '../Empty';
|
|
4
4
|
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
5
|
-
export interface
|
|
5
|
+
export interface TableBaseProps<T> extends Omit<NativeElementPropsWithoutKeyAndRef<'div'>, 'role'> {
|
|
6
6
|
/**
|
|
7
7
|
* customized body className
|
|
8
8
|
*/
|
|
9
9
|
bodyClassName?: string;
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* customized body row className
|
|
12
|
+
*/
|
|
13
13
|
bodyRowClassName?: string;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
* Columns of table <br />
|
|
16
|
+
* `column.render` allowed customizing the column body cell rendering. <br />
|
|
17
|
+
* `column.renderTitle` allowed customizing the column header cell rendering. <br />
|
|
18
|
+
* `column.sorter` is the sorting method that you want to apply to your column. <br />
|
|
19
|
+
* `column.onSorted` is the callback triggered whenever sort icon clicked.
|
|
20
|
+
*/
|
|
21
21
|
columns: TableColumn<T>[];
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
* Custom table components <br />
|
|
24
|
+
*/
|
|
25
25
|
components?: TableComponents;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* Data record array to be displayed. <br />
|
|
28
|
+
* Notice that each source should contain `key` or `id` prop as data primary key.
|
|
29
|
+
*/
|
|
30
30
|
dataSource: TableDataSource[];
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
* props exported from `<Empty />` component.
|
|
33
|
+
*/
|
|
34
34
|
emptyProps?: EmptyProps;
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
* When `expandable.rowExpandable` is given, it will control whether row data is expandable or not
|
|
37
|
+
* `expandable.expandedRowRender` is a callback to helps you decides what data should be rendered.
|
|
38
|
+
*/
|
|
39
39
|
expandable?: TableExpandable<T>;
|
|
40
|
-
/**
|
|
41
|
-
* If `fetchMore.callback` is given, table will automatically trigger it when scrolling position reach end. <br />
|
|
42
|
-
* If `fetchMore.isReachEnd` is true, table will stop triggering callback. <br />
|
|
43
|
-
* If `fetchMore.isFetching` is true, a loading spinner will display at the end of table and stop triggering callback.
|
|
44
|
-
* <br />
|
|
45
|
-
* Notice that when `fetchMore.isFetching` is `undefined`, table will take control of it when source length changed.
|
|
46
|
-
*/
|
|
47
|
-
fetchMore?: TableFetchMore;
|
|
48
40
|
/**
|
|
49
41
|
* customized header className
|
|
50
42
|
*/
|
|
51
43
|
headerClassName?: string;
|
|
52
44
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
* Whether table is loading or not
|
|
46
|
+
*/
|
|
55
47
|
loading?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* `pagination.show` controls pagination display. <br />
|
|
58
|
-
* `pagination.current` is the current page number. <br />
|
|
59
|
-
* `pagination.onChange` is the callback when page number changed. <br />
|
|
60
|
-
* `pagination.total` is the total amount of your data. <br />
|
|
61
|
-
* `pagination.options` is the <Pagination /> component props. <br />
|
|
62
|
-
* Notice that if `pagination` object is given, table will disable fetchMore and use pagination instead.
|
|
63
|
-
*/
|
|
64
|
-
pagination?: TablePaginationType;
|
|
65
48
|
/**
|
|
66
49
|
* `refresh.show` is true, refresh button will display at the top-start of table. <br />
|
|
67
50
|
* `refresh.onClick` is the callback of the refresh button.
|
|
68
51
|
*/
|
|
69
52
|
refresh?: TableRefreshType;
|
|
70
53
|
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
54
|
+
* Enable row selection feature <br />
|
|
55
|
+
* `rowSelection.selectedRowKey` is the dataSource keys that are currently selected. <br />
|
|
56
|
+
* `rowSelection.onChange` is the callback when selection changed. <br />
|
|
57
|
+
* `rowSelection.actions` are the actions that you want to do for selected data.
|
|
58
|
+
*/
|
|
76
59
|
rowSelection?: TableRowSelection;
|
|
77
60
|
}
|
|
78
|
-
|
|
61
|
+
export interface TableWithFetchMore<T> extends TableBaseProps<T> {
|
|
62
|
+
/**
|
|
63
|
+
* If `fetchMore.callback` is given, table will automatically trigger it when scrolling position reach end. <br />
|
|
64
|
+
* If `fetchMore.isReachEnd` is true, table will stop triggering callback. <br />
|
|
65
|
+
* If `fetchMore.isFetching` is true, a loading spinner will display at the end of table and stop triggering callback.
|
|
66
|
+
* <br />
|
|
67
|
+
* Notice that when `fetchMore.isFetching` is `undefined`, table will take control of it when source length changed.
|
|
68
|
+
*/
|
|
69
|
+
fetchMore?: TableFetchMore;
|
|
70
|
+
pagination?: undefined;
|
|
71
|
+
}
|
|
72
|
+
export interface TableWithPagination<T> extends TableBaseProps<T> {
|
|
73
|
+
/**
|
|
74
|
+
* `pagination.current` is the current page number. (required) <br />
|
|
75
|
+
* `pagination.onChange` is the callback when page number changed. (required) <br />
|
|
76
|
+
* `pagination.disableAutoSlicing` set this to true if you don't want auto data slicing. <br />
|
|
77
|
+
* `pagination.total` is the total amount of your data. (default will be dataSource length) <br />
|
|
78
|
+
* `pagination.options` is the <Pagination /> component props. <br />
|
|
79
|
+
* Notice that if `pagination` object is given, table will disable fetchMore and use pagination instead.
|
|
80
|
+
*/
|
|
81
|
+
pagination?: TablePaginationType;
|
|
82
|
+
fetchMore?: undefined;
|
|
83
|
+
}
|
|
84
|
+
export declare type TableProps<T> = TableWithFetchMore<T> | TableWithPagination<T>;
|
|
85
|
+
declare const Table: import("react").ForwardRefExoticComponent<(TableWithFetchMore<Record<string, unknown>> & import("react").RefAttributes<HTMLDivElement>) | (TableWithPagination<Record<string, unknown>> & import("react").RefAttributes<HTMLDivElement>)>;
|
|
79
86
|
export default Table;
|
package/Table/Table.js
CHANGED
|
@@ -61,26 +61,44 @@ const Table = forwardRef(function Table(props, ref) {
|
|
|
61
61
|
refreshProp.show) !== null && _a !== void 0 ? _a : false);
|
|
62
62
|
}, [refreshProp === null || refreshProp === void 0 ? void 0 : refreshProp.show]);
|
|
63
63
|
/** context */
|
|
64
|
-
const tableContextValue = useMemo(() =>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
64
|
+
const tableContextValue = useMemo(() => {
|
|
65
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
66
|
+
return ({
|
|
67
|
+
scrollBarSize: 4,
|
|
68
|
+
emptyProps,
|
|
69
|
+
rowSelection,
|
|
70
|
+
sorting: {
|
|
71
|
+
onSort,
|
|
72
|
+
onResetAll,
|
|
73
|
+
sortedOn,
|
|
74
|
+
sortedType,
|
|
75
|
+
},
|
|
76
|
+
loading,
|
|
77
|
+
setLoading,
|
|
78
|
+
expanding: expandableProp,
|
|
79
|
+
fetchMore: onFetchMore ? {
|
|
80
|
+
onFetchMore,
|
|
81
|
+
isFetching,
|
|
82
|
+
isReachEnd,
|
|
83
|
+
} : undefined,
|
|
84
|
+
pagination: paginationProp ? {
|
|
85
|
+
current: paginationProp.current,
|
|
86
|
+
disableAutoSlicing: (_a = paginationProp.disableAutoSlicing) !== null && _a !== void 0 ? _a : false,
|
|
87
|
+
onChange: paginationProp.onChange,
|
|
88
|
+
total: (_b = paginationProp.total) !== null && _b !== void 0 ? _b : dataSource.length,
|
|
89
|
+
options: {
|
|
90
|
+
boundaryCount: (_d = (_c = paginationProp.options) === null || _c === void 0 ? void 0 : _c.boundaryCount) !== null && _d !== void 0 ? _d : 1,
|
|
91
|
+
className: (_e = paginationProp.options) === null || _e === void 0 ? void 0 : _e.className,
|
|
92
|
+
disabled: (_g = (_f = paginationProp.options) === null || _f === void 0 ? void 0 : _f.disabled) !== null && _g !== void 0 ? _g : false,
|
|
93
|
+
hideNextButton: (_j = (_h = paginationProp.options) === null || _h === void 0 ? void 0 : _h.hideNextButton) !== null && _j !== void 0 ? _j : false,
|
|
94
|
+
hidePreviousButton: (_l = (_k = paginationProp.options) === null || _k === void 0 ? void 0 : _k.hidePreviousButton) !== null && _l !== void 0 ? _l : false,
|
|
95
|
+
pageSize: (_o = (_m = paginationProp.options) === null || _m === void 0 ? void 0 : _m.pageSize) !== null && _o !== void 0 ? _o : 10,
|
|
96
|
+
siblingCount: (_q = (_p = paginationProp.options) === null || _p === void 0 ? void 0 : _p.siblingCount) !== null && _q !== void 0 ? _q : 1,
|
|
97
|
+
},
|
|
98
|
+
} : undefined,
|
|
99
|
+
});
|
|
100
|
+
}, [
|
|
101
|
+
dataSource,
|
|
84
102
|
emptyProps,
|
|
85
103
|
expandableProp,
|
|
86
104
|
rowSelection,
|
|
@@ -105,7 +123,8 @@ const Table = forwardRef(function Table(props, ref) {
|
|
|
105
123
|
return (jsx(Loading, Object.assign({ loading: loading, stretch: true, tip: "\u8CC7\u6599\u8F09\u5165\u4E2D..." }, { children: jsx("div", Object.assign({ ref: ref }, rest, { className: cx(tableClasses.host, className), role: "grid" }, { children: jsx(TableContext.Provider, Object.assign({ value: tableContextValue }, { children: jsx(TableDataContext.Provider, Object.assign({ value: tableDataContextValue }, { children: jsxs(TableComponentContext.Provider, Object.assign({ value: tableComponentContextValue }, { children: [isRefreshShow ? (jsx(TableRefresh, { onClick: refreshProp.onClick }, void 0)) : null,
|
|
106
124
|
jsx(TableHeader, { className: headerClassName }, void 0),
|
|
107
125
|
jsx(TableBody, { ref: bodyRef, className: bodyClassName, rowClassName: bodyRowClassName }, void 0),
|
|
108
|
-
|
|
109
|
-
});
|
|
126
|
+
paginationProp ? (jsx(TablePagination, { bodyRef: bodyRef }, void 0)) : null] }), void 0) }), void 0) }), void 0) }), void 0) }), void 0));
|
|
127
|
+
});
|
|
128
|
+
var Table$1 = Table;
|
|
110
129
|
|
|
111
|
-
export default
|
|
130
|
+
export { Table$1 as default };
|
package/Table/TableBody.js
CHANGED
|
@@ -12,12 +12,17 @@ import cx from 'clsx';
|
|
|
12
12
|
const TableBody = forwardRef(function TableBody(props, ref) {
|
|
13
13
|
const { className, rowClassName, ...rest } = props;
|
|
14
14
|
const { dataSource = [], } = useContext(TableDataContext) || {};
|
|
15
|
-
const { emptyProps, scrollBarSize,
|
|
15
|
+
const { emptyProps, fetchMore, scrollBarSize, pagination, } = useContext(TableContext) || {};
|
|
16
16
|
const [tableBody, scrollElement] = useTableScroll();
|
|
17
17
|
const composedRefs = useComposeRefs([ref, tableBody.ref]);
|
|
18
18
|
/** customizing empty */
|
|
19
19
|
const { className: emptyComponentClassName = '', children: emptyComponentChildren = '查無資料', fullHeight: emptyComponentFullHeight = true, ...restEmptyProps } = emptyProps || {};
|
|
20
|
-
|
|
20
|
+
/** pagination feature */
|
|
21
|
+
const { current: currentPage, disableAutoSlicing, total, options: paginationOptions, } = pagination || {};
|
|
22
|
+
const currentStartCount = (paginationOptions === null || paginationOptions === void 0 ? void 0 : paginationOptions.pageSize) && currentPage ? ((paginationOptions.pageSize) * (currentPage - 1)) : 0;
|
|
23
|
+
const currentEndCount = (paginationOptions === null || paginationOptions === void 0 ? void 0 : paginationOptions.pageSize) && currentPage && total ? (Math.min(((paginationOptions.pageSize) * currentPage), total)) : 0;
|
|
24
|
+
const currentDataSource = pagination && !disableAutoSlicing ? (dataSource.slice(currentStartCount, currentEndCount)) : dataSource;
|
|
25
|
+
return (jsxs("div", Object.assign({}, rest, { ref: composedRefs, className: cx(tableClasses.body, className), onScroll: tableBody.onScroll, role: "rowgroup" }, { children: [currentDataSource.length ? currentDataSource.map((rowData) => (jsx(TableBodyRow, { className: rowClassName, rowData: rowData }, (rowData.key || rowData.id)))) : (jsx(Empty, Object.assign({}, restEmptyProps, { className: cx(tableClasses.bodyEmpty, emptyComponentClassName), fullHeight: emptyComponentFullHeight }, { children: emptyComponentChildren }), void 0)),
|
|
21
26
|
(fetchMore === null || fetchMore === void 0 ? void 0 : fetchMore.isFetching) ? (jsx("div", Object.assign({ className: tableClasses.bodyFetchMore }, { children: jsx(Loading, { loading: true }, void 0) }), void 0)) : null,
|
|
22
27
|
jsx("div", Object.assign({ ref: scrollElement.ref, onMouseDown: scrollElement.onMouseDown, onMouseUp: scrollElement.onMouseUp, onMouseEnter: scrollElement.onMouseEnter, onMouseLeave: scrollElement.onMouseLeave, role: "button", style: scrollElement.style, tabIndex: -1 }, { children: jsx("div", { style: {
|
|
23
28
|
width: `${scrollBarSize}px`,
|
|
@@ -26,6 +31,7 @@ const TableBody = forwardRef(function TableBody(props, ref) {
|
|
|
26
31
|
backgroundColor: '#7d7d7d',
|
|
27
32
|
transition: '0.1s',
|
|
28
33
|
} }, void 0) }), void 0)] }), void 0));
|
|
29
|
-
});
|
|
34
|
+
});
|
|
35
|
+
var TableBody$1 = TableBody;
|
|
30
36
|
|
|
31
|
-
export default
|
|
37
|
+
export { TableBody$1 as default };
|
package/Table/TableBodyRow.js
CHANGED
|
@@ -58,6 +58,7 @@ const TableBodyRow = forwardRef(function TableBodyRow(props, ref) {
|
|
|
58
58
|
return (jsx("div", Object.assign({ className: cx(tableClasses.bodyRowCellWrapper, column.bodyClassName), style: getColumnStyle(column) }, { children: jsx(TableEditRenderWrapper, Object.assign({}, column, { rowData: rowData }, { children: jsx(TableCell, Object.assign({ ellipsis: ellipsis, forceShownTooltipWhenHovered: column.forceShownTooltipWhenHovered, style: getCellStyle(column), tooltipTitle: tooltipTitle }, { children: ((_d = column.render) === null || _d === void 0 ? void 0 : _d.call(column, column, rowData, index)) || rowData[column.dataIndex] }), void 0) }), void 0) }), `${column.dataIndex}-${column.title}`));
|
|
59
59
|
})] }), void 0),
|
|
60
60
|
renderedExpandedContent ? (jsx(AccordionDetails, Object.assign({ className: expanding.className, expanded: expanded }, { children: renderedExpandedContent }), void 0)) : null] }, void 0));
|
|
61
|
-
});
|
|
61
|
+
});
|
|
62
|
+
var TableBodyRow$1 = TableBodyRow;
|
|
62
63
|
|
|
63
|
-
export default
|
|
64
|
+
export { TableBodyRow$1 as default };
|
package/Table/TableCell.js
CHANGED
|
@@ -18,6 +18,7 @@ const TableCell = forwardRef(function TableCell(props, ref) {
|
|
|
18
18
|
onMouseEnter(e);
|
|
19
19
|
}
|
|
20
20
|
}, onMouseLeave: onMouseLeave }, { children: children }), void 0)) }), void 0)) : children }), void 0));
|
|
21
|
-
});
|
|
21
|
+
});
|
|
22
|
+
var TableCell$1 = TableCell;
|
|
22
23
|
|
|
23
|
-
export default
|
|
24
|
+
export { TableCell$1 as default };
|
package/Table/TableHeader.js
CHANGED
|
@@ -42,6 +42,7 @@ const TableHeader = forwardRef(function TableHeader(props, ref) {
|
|
|
42
42
|
return (jsx("div", Object.assign({ className: cx(tableClasses.headerCellWrapper, column.headerClassName), style: getColumnStyle(column) }, { children: jsxs(TableCell, Object.assign({ ellipsis: false, role: "columnheader", style: getCellStyle(column) }, { children: [((_a = column.renderTitle) === null || _a === void 0 ? void 0 : _a.call(column, tableClasses)) || column.title,
|
|
43
43
|
typeof column.sorter === 'function' ? (jsx(TableSortingIcon, { column: column }, void 0)) : null] }), void 0) }), `${column.dataIndex}-${column.title}`));
|
|
44
44
|
})] }), void 0));
|
|
45
|
-
});
|
|
45
|
+
});
|
|
46
|
+
var TableHeader$1 = TableHeader;
|
|
46
47
|
|
|
47
|
-
export default
|
|
48
|
+
export { TableHeader$1 as default };
|
|
@@ -10,6 +10,7 @@ const TableExpandable = forwardRef(function TableExpandable(props, ref) {
|
|
|
10
10
|
return (jsx("div", Object.assign({}, rest, { ref: ref, className: cx(tableClasses.collapseAction, className) }, { children: jsx("div", Object.assign({ className: tableClasses.icon }, { children: showIcon ? (jsx(Icon, { className: cx(tableClasses.icon, {
|
|
11
11
|
[tableClasses.iconClickable]: expandable,
|
|
12
12
|
}), color: expandable ? 'primary' : 'disabled', icon: ChevronDownIcon, onClick: () => expandable && (setExpanded === null || setExpanded === void 0 ? void 0 : setExpanded(!expanded)), style: { transform: `rotate(${expanded ? '180deg' : '0'})` } }, void 0)) : null }), void 0) }), void 0));
|
|
13
|
-
});
|
|
13
|
+
});
|
|
14
|
+
var TableExpandable$1 = TableExpandable;
|
|
14
15
|
|
|
15
|
-
export default
|
|
16
|
+
export { TableExpandable$1 as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef, useContext } from 'react';
|
|
3
3
|
import { tableClasses } from '@mezzanine-ui/core/table';
|
|
4
|
-
import { TableContext
|
|
4
|
+
import { TableContext } from '../TableContext.js';
|
|
5
5
|
import { useTablePagination } from './useTablePagination.js';
|
|
6
6
|
import Pagination from '../../Pagination/Pagination.js';
|
|
7
7
|
import cx from 'clsx';
|
|
@@ -9,19 +9,18 @@ import cx from 'clsx';
|
|
|
9
9
|
const TablePagination = forwardRef(function TablePagination(props, ref) {
|
|
10
10
|
const { className, bodyRef, ...rest } = props;
|
|
11
11
|
const { pagination, } = useContext(TableContext) || {};
|
|
12
|
-
const {
|
|
13
|
-
const [currentPage, setCurrentPage
|
|
12
|
+
const { current: currentPageProp, onChange: onChangePageProp, total, options: paginationOptions = {}, } = pagination || {};
|
|
13
|
+
const [currentPage, setCurrentPage] = useTablePagination({
|
|
14
14
|
bodyRef,
|
|
15
|
-
current:
|
|
16
|
-
|
|
17
|
-
onChange: pagination === null || pagination === void 0 ? void 0 : pagination.onChange,
|
|
18
|
-
options: pagination === null || pagination === void 0 ? void 0 : pagination.options,
|
|
19
|
-
total: pagination === null || pagination === void 0 ? void 0 : pagination.total,
|
|
15
|
+
current: currentPageProp,
|
|
16
|
+
onChange: onChangePageProp,
|
|
20
17
|
});
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
18
|
+
const { boundaryCount, className: paginationClassName, disabled, hideNextButton, hidePreviousButton, pageSize: pageSizeProp, siblingCount, } = paginationOptions;
|
|
19
|
+
const currentStartCount = (pageSizeProp * (currentPage - 1)) + 1;
|
|
20
|
+
const currentEndCount = Math.min(pageSizeProp * currentPage, total);
|
|
21
|
+
return (jsxs("div", Object.assign({}, rest, { ref: ref, className: cx(tableClasses.pagination, className) }, { children: [jsx("span", Object.assign({ className: tableClasses.paginationIndicator }, { children: `目前顯示 ${currentStartCount} - ${currentEndCount} 筆,共 ${total} 筆資料` }), void 0),
|
|
22
|
+
jsx("div", Object.assign({ className: tableClasses.paginationActions }, { children: jsx(Pagination, { boundaryCount: boundaryCount, className: paginationClassName, current: currentPage, disabled: disabled, hideNextButton: hideNextButton, hidePreviousButton: hidePreviousButton, onChange: setCurrentPage, pageSize: pageSizeProp, siblingCount: siblingCount, total: total }, void 0) }), void 0)] }), void 0));
|
|
23
|
+
});
|
|
24
|
+
var TablePagination$1 = TablePagination;
|
|
26
25
|
|
|
27
|
-
export default
|
|
26
|
+
export { TablePagination$1 as default };
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { TablePagination
|
|
3
|
-
export interface UseTablePagination
|
|
2
|
+
import { TablePagination } from '@mezzanine-ui/core/table';
|
|
3
|
+
export interface UseTablePagination {
|
|
4
4
|
bodyRef: RefObject<HTMLDivElement>;
|
|
5
|
-
|
|
5
|
+
current?: TablePagination['current'];
|
|
6
|
+
onChange?: TablePagination['onChange'];
|
|
6
7
|
}
|
|
7
|
-
export declare function useTablePagination(props: UseTablePagination): readonly [number, (c: number) => void
|
|
8
|
-
boundaryCount: number;
|
|
9
|
-
className: string | undefined;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
hideNextButton: boolean;
|
|
12
|
-
hidePreviousButton: boolean;
|
|
13
|
-
pageSize: number;
|
|
14
|
-
siblingCount: number;
|
|
15
|
-
total: number;
|
|
16
|
-
}];
|
|
8
|
+
export declare function useTablePagination(props: UseTablePagination): readonly [number, (c: number) => void];
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { useContext
|
|
1
|
+
import { useContext } from 'react';
|
|
2
2
|
import { useControlValueState } from '../../Form/useControlValueState.js';
|
|
3
3
|
import { useLastCallback } from '../../hooks/useLastCallback.js';
|
|
4
4
|
import { TableContext } from '../TableContext.js';
|
|
5
5
|
|
|
6
6
|
const equalityFn = (a, b) => a === b;
|
|
7
7
|
function useTablePagination(props) {
|
|
8
|
-
const { bodyRef, current: currentProp,
|
|
9
|
-
const { boundaryCount = 1, className, disabled = false, hideNextButton = false, hidePreviousButton = false, pageSize: pageSizeProp, siblingCount = 1, } = optionsProp || {};
|
|
8
|
+
const { bodyRef, current: currentProp, onChange: onChangeProp, } = props;
|
|
10
9
|
const { sorting, } = useContext(TableContext) || {};
|
|
11
10
|
const [current, setCurrent] = useControlValueState({
|
|
12
11
|
defaultValue: 1,
|
|
@@ -24,26 +23,7 @@ function useTablePagination(props) {
|
|
|
24
23
|
}
|
|
25
24
|
onChangeProp === null || onChangeProp === void 0 ? void 0 : onChangeProp(newCurrent);
|
|
26
25
|
});
|
|
27
|
-
|
|
28
|
-
const total = useMemo(() => (totalProp !== null && totalProp !== void 0 ? totalProp : (dataSource.length / pageSize)), [totalProp, dataSource.length, pageSize]);
|
|
29
|
-
const defaultOptions = useMemo(() => ({
|
|
30
|
-
boundaryCount,
|
|
31
|
-
className,
|
|
32
|
-
disabled,
|
|
33
|
-
hideNextButton,
|
|
34
|
-
hidePreviousButton,
|
|
35
|
-
pageSize,
|
|
36
|
-
siblingCount,
|
|
37
|
-
total,
|
|
38
|
-
}), [
|
|
39
|
-
boundaryCount,
|
|
40
|
-
className,
|
|
41
|
-
disabled,
|
|
42
|
-
hideNextButton,
|
|
43
|
-
hidePreviousButton,
|
|
44
|
-
siblingCount,
|
|
45
|
-
]);
|
|
46
|
-
return [current, onChange, defaultOptions];
|
|
26
|
+
return [current, onChange];
|
|
47
27
|
}
|
|
48
28
|
|
|
49
29
|
export { useTablePagination };
|
|
@@ -18,6 +18,7 @@ const TableRefresh = forwardRef(function TableRefresh(props, ref) {
|
|
|
18
18
|
setLoading,
|
|
19
19
|
]);
|
|
20
20
|
return (jsx("div", Object.assign({ ref: ref, className: tableClasses.refresh }, rest, { children: jsx(Button, Object.assign({ onClick: onRefreshClicked, prefix: jsx(Icon, { icon: ResetIcon }, void 0) }, { children: children || '重新整理' }), void 0) }), void 0));
|
|
21
|
-
});
|
|
21
|
+
});
|
|
22
|
+
var TableRefresh$1 = TableRefresh;
|
|
22
23
|
|
|
23
|
-
export default
|
|
24
|
+
export { TableRefresh$1 as default };
|
|
@@ -81,6 +81,7 @@ const TableRowSelection = forwardRef(function TableRowSelection(props, ref) {
|
|
|
81
81
|
} }, { children: (dropdownRef) => (jsx(Icon, { ref: dropdownRef, className: cx(tableClasses.icon, {
|
|
82
82
|
[tableClasses.iconClickable]: isMenuAllowOpen,
|
|
83
83
|
}), color: isMenuAllowOpen ? 'primary' : 'disabled', icon: MoreVerticalIcon, onClick: onIconClicked }, void 0)) }), void 0)) : null }), void 0)] }), void 0));
|
|
84
|
-
});
|
|
84
|
+
});
|
|
85
|
+
var TableRowSelection$1 = TableRowSelection;
|
|
85
86
|
|
|
86
|
-
export default
|
|
87
|
+
export { TableRowSelection$1 as default };
|
|
@@ -23,6 +23,7 @@ const TableSortingIcon = forwardRef(function TableSortingIcon(props, ref) {
|
|
|
23
23
|
evt.stopPropagation();
|
|
24
24
|
(_a = sorting === null || sorting === void 0 ? void 0 : sorting.onSort) === null || _a === void 0 ? void 0 : _a.call(sorting, column);
|
|
25
25
|
}, style: currentIconStyle.style }), void 0));
|
|
26
|
-
});
|
|
26
|
+
});
|
|
27
|
+
var TableSortingIcon$1 = TableSortingIcon;
|
|
27
28
|
|
|
28
|
-
export default
|
|
29
|
+
export { TableSortingIcon$1 as default };
|
|
@@ -120,10 +120,10 @@ export default function useTableScroll(): readonly [{
|
|
|
120
120
|
onCompositionStartCapture?: ((event: import("react").CompositionEvent<HTMLDivElement>) => void) | undefined;
|
|
121
121
|
onCompositionUpdate?: ((event: import("react").CompositionEvent<HTMLDivElement>) => void) | undefined;
|
|
122
122
|
onCompositionUpdateCapture?: ((event: import("react").CompositionEvent<HTMLDivElement>) => void) | undefined;
|
|
123
|
-
onFocus?: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined;
|
|
124
|
-
onFocusCapture?: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined;
|
|
125
|
-
onBlur?: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined;
|
|
126
|
-
onBlurCapture?: ((event: import("react").FocusEvent<HTMLDivElement>) => void) | undefined;
|
|
123
|
+
onFocus?: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined;
|
|
124
|
+
onFocusCapture?: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined;
|
|
125
|
+
onBlur?: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined;
|
|
126
|
+
onBlurCapture?: ((event: import("react").FocusEvent<HTMLDivElement, Element>) => void) | undefined;
|
|
127
127
|
onChange?: ((event: import("react").FormEvent<HTMLDivElement>) => void) | undefined;
|
|
128
128
|
onChangeCapture?: ((event: import("react").FormEvent<HTMLDivElement>) => void) | undefined;
|
|
129
129
|
onBeforeInput?: ((event: import("react").FormEvent<HTMLDivElement>) => void) | undefined;
|
package/Table/useTableScroll.js
CHANGED
package/Tabs/Tab.js
CHANGED
|
@@ -11,6 +11,7 @@ const Tab = forwardRef(function Tab(props, ref) {
|
|
|
11
11
|
return (jsx("button", Object.assign({}, rest, { ref: ref, type: "button", "aria-disabled": disabled, className: cx(tabsClasses.tab, {
|
|
12
12
|
[tabsClasses.tabActive]: active,
|
|
13
13
|
}, className), disabled: disabled }, { children: children }), void 0));
|
|
14
|
-
});
|
|
14
|
+
});
|
|
15
|
+
var Tab$1 = Tab;
|
|
15
16
|
|
|
16
|
-
export default
|
|
17
|
+
export { Tab$1 as default };
|
package/Tabs/TabPane.js
CHANGED
|
@@ -13,6 +13,7 @@ const TabPane = forwardRef(function TabPane(props, ref) {
|
|
|
13
13
|
*/
|
|
14
14
|
tab, ...rest } = props;
|
|
15
15
|
return (jsx("div", Object.assign({}, rest, { ref: ref, className: cx(tabsClasses.pane, className) }, { children: children }), void 0));
|
|
16
|
-
});
|
|
16
|
+
});
|
|
17
|
+
var TabPane$1 = TabPane;
|
|
17
18
|
|
|
18
|
-
export default
|
|
19
|
+
export { TabPane$1 as default };
|
package/Tabs/Tabs.js
CHANGED
|
@@ -44,6 +44,7 @@ const Tabs = forwardRef(function Tabs(props, ref) {
|
|
|
44
44
|
return (jsxs("div", Object.assign({}, rest, { ref: ref, className: cx(tabsClasses.host, className) }, { children: [jsxs("div", Object.assign({ className: cx(tabsClasses.tabBar, tabBarClassName) }, { children: [jsxs("div", Object.assign({ className: tabsClasses.overflow }, { children: [isOverflowing && !isScrollToBegin && (jsx("button", Object.assign({ "aria-label": "scrollToLeft", className: tabsClasses.scrollBtn, onClick: () => scrollToLeft(), type: "button" }, { children: jsx(Icon, { icon: ChevronLeftIcon }, void 0) }), void 0)),
|
|
45
45
|
jsx("div", Object.assign({ ref: tabsRef, className: tabsClasses.tabs }, { children: tabs }), void 0),
|
|
46
46
|
isOverflowing && !isScrollToEnd && (jsx("button", Object.assign({ "aria-label": "scrollToRight", className: tabsClasses.scrollBtn, onClick: () => scrollToRight(), type: "button" }, { children: jsx(Icon, { icon: ChevronRightIcon }, void 0) }), void 0))] }), void 0), actions] }), void 0), pane] }), void 0));
|
|
47
|
-
});
|
|
47
|
+
});
|
|
48
|
+
var Tabs$1 = Tabs;
|
|
48
49
|
|
|
49
|
-
export default
|
|
50
|
+
export { Tabs$1 as default };
|
package/Tabs/useTabsOverflow.js
CHANGED