@itcase/ui 1.8.163 → 1.8.165
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.
|
@@ -22,14 +22,16 @@ require('../hooks/useStyles/styleAttributes.js');
|
|
|
22
22
|
require('lodash/maxBy');
|
|
23
23
|
|
|
24
24
|
function ScrollOnDrag(props) {
|
|
25
|
-
const { className, scrollContainerProps,
|
|
25
|
+
const { className, scrollContainerProps, isScrollbar, children } = props;
|
|
26
26
|
const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
27
27
|
const { ref } = ScrollContainer.useScrollContainer();
|
|
28
28
|
const { fillClass, fillHoverClass, borderColorClass, borderTypeClass, borderWidthClass, elevationClass, heightClass, widthClass = 'fill', } = propsGenerator;
|
|
29
29
|
// @ts-expect-error
|
|
30
30
|
const { scrollContainer: scrollContainerStyles, styles: styles } = useStyles.useStyles(props);
|
|
31
31
|
const ScrollOnDragWrapper = isScrollbar ? SimpleBar : React.Fragment;
|
|
32
|
-
|
|
32
|
+
// fix to error 'Invalid prop `scrollableNodeProps` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.'
|
|
33
|
+
const fixedProps = isScrollbar ? { scrollableNodeProps: { ref } } : {};
|
|
34
|
+
return (jsxRuntime.jsx(ScrollOnDragWrapper, { ...fixedProps, children: jsxRuntime.jsx("div", { className: clsx('scroll-on-drag', className, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderWidthClass && `border-width_${borderWidthClass}`, elevationClass && `elevation_${elevationClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, heightClass && `height_${heightClass}`, widthClass && `width_${widthClass}`), style: styles, children: jsxRuntime.jsx(ScrollContainer, { className: clsx(!isScrollbar && 'scroll-on-drag__wrapper'), ref: ref, ...scrollContainerProps, style: scrollContainerStyles, children: children }) }) }));
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
exports.ScrollOnDrag = ScrollOnDrag;
|
|
@@ -20,14 +20,16 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
20
20
|
import 'lodash/maxBy';
|
|
21
21
|
|
|
22
22
|
function ScrollOnDrag(props) {
|
|
23
|
-
const { className, scrollContainerProps,
|
|
23
|
+
const { className, scrollContainerProps, isScrollbar, children } = props;
|
|
24
24
|
const propsGenerator = useDevicePropsGenerator(props);
|
|
25
25
|
const { ref } = useScrollContainer();
|
|
26
26
|
const { fillClass, fillHoverClass, borderColorClass, borderTypeClass, borderWidthClass, elevationClass, heightClass, widthClass = 'fill', } = propsGenerator;
|
|
27
27
|
// @ts-expect-error
|
|
28
28
|
const { scrollContainer: scrollContainerStyles, styles: styles } = useStyles(props);
|
|
29
29
|
const ScrollOnDragWrapper = isScrollbar ? SimpleBar : React.Fragment;
|
|
30
|
-
|
|
30
|
+
// fix to error 'Invalid prop `scrollableNodeProps` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.'
|
|
31
|
+
const fixedProps = isScrollbar ? { scrollableNodeProps: { ref } } : {};
|
|
32
|
+
return (jsx(ScrollOnDragWrapper, { ...fixedProps, children: jsx("div", { className: clsx('scroll-on-drag', className, borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, borderWidthClass && `border-width_${borderWidthClass}`, elevationClass && `elevation_${elevationClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, heightClass && `height_${heightClass}`, widthClass && `width_${widthClass}`), style: styles, children: jsx(ScrollContainer, { className: clsx(!isScrollbar && 'scroll-on-drag__wrapper'), ref: ref, ...scrollContainerProps, style: scrollContainerStyles, children: children }) }) }));
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
export { ScrollOnDrag };
|
|
@@ -51,11 +51,11 @@ interface PaginationProps extends PaginationThemeColor, StyleAttributes {
|
|
|
51
51
|
className?: string;
|
|
52
52
|
marginPagesDisplayed?: number;
|
|
53
53
|
nextLabel?: ReactNode;
|
|
54
|
-
pageCountArray?: number[];
|
|
55
54
|
pageCountDropdownItemDividerDirection?: DirectionProps;
|
|
56
55
|
pageCountDropdownItemLabelWrap?: TextWrapProps;
|
|
57
56
|
pageCountInputIcon?: ReactNode;
|
|
58
57
|
pageCountInputIconSrc?: ReactNode;
|
|
58
|
+
pageCountList?: number[];
|
|
59
59
|
pageNumber: string | string;
|
|
60
60
|
pageRangeDisplayed?: number;
|
|
61
61
|
perPageCount?: number;
|