@mezzanine-ui/react 0.13.11 → 0.13.13
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.d.ts +0 -1
- package/Accordion/AccordionControlContext.d.ts +0 -1
- package/Accordion/AccordionDetails.d.ts +0 -1
- package/AppBar/AppBarBrand.d.ts +0 -1
- package/AppBar/AppBarMain.d.ts +0 -1
- package/AppBar/AppBarSupport.d.ts +0 -1
- package/Badge/Badge.d.ts +0 -1
- package/Badge/BadgeContainer.d.ts +0 -1
- package/Button/Button.d.ts +0 -1
- package/Button/Button.js +1 -2
- package/Button/IconButton.d.ts +1 -1
- package/Button/IconButton.js +1 -2
- package/Button/index.js +2 -2
- package/Calendar/Calendar.d.ts +0 -1
- package/Calendar/CalendarCell.d.ts +1 -2
- package/Calendar/CalendarContext.d.ts +1 -1
- package/Calendar/CalendarControls.d.ts +1 -2
- package/Calendar/CalendarDayOfWeek.d.ts +1 -2
- package/Calendar/CalendarDays.d.ts +1 -2
- package/Calendar/CalendarMonths.d.ts +1 -2
- package/Calendar/CalendarWeeks.d.ts +1 -2
- package/Calendar/CalendarYears.d.ts +1 -2
- package/Calendar/useCalendarControls.d.ts +0 -1
- package/Checkbox/CheckboxGroupContext.d.ts +0 -1
- package/DatePicker/DatePicker.d.ts +0 -1
- package/DateRangePicker/DateRangePicker.d.ts +0 -1
- package/DateRangePicker/useDateRangePickerValue.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.d.ts +0 -1
- package/DateTimePicker/DateTimePickerPanel.d.ts +0 -1
- package/Drawer/Drawer.d.ts +0 -1
- package/Form/FormControlContext.d.ts +0 -1
- package/Form/FormField.d.ts +0 -1
- package/Form/FormMessage.d.ts +0 -1
- package/Form/useAutoCompleteValueControl.js +4 -1
- package/Form/useCheckboxControlValue.d.ts +1 -1
- package/Form/useControlValueState.d.ts +0 -1
- package/Form/useCustomControlValue.d.ts +1 -1
- package/Form/useInputControlValue.d.ts +1 -1
- package/Form/useInputWithClearControlValue.d.ts +1 -1
- package/Form/useRadioControlValue.d.ts +1 -1
- package/Form/useSwitchControlValue.d.ts +1 -1
- package/Icon/Icon.d.ts +0 -1
- package/Loading/Loading.d.ts +0 -1
- package/Menu/Menu.d.ts +0 -1
- package/Menu/MenuDivider.d.ts +0 -1
- package/Menu/MenuItem.d.ts +0 -1
- package/Modal/Modal.d.ts +0 -1
- package/Modal/ModalActions.d.ts +0 -1
- package/Modal/ModalBody.d.ts +0 -1
- package/Modal/ModalControl.d.ts +0 -1
- package/Modal/ModalFooter.d.ts +0 -1
- package/Modal/ModalHeader.d.ts +0 -1
- package/Modal/useModalContainer.d.ts +1 -2
- package/Navigation/NavigationContext.d.ts +0 -1
- package/Notifier/NotifierManager.d.ts +1 -1
- package/Pagination/Pagination.d.ts +1 -1
- package/Pagination/PaginationJumper.d.ts +1 -1
- package/Pagination/PaginationPageSize.d.ts +1 -1
- package/Progress/Progress.d.ts +0 -1
- package/Provider/context.d.ts +0 -1
- package/Radio/RadioGroupContext.d.ts +0 -1
- package/Select/AutoComplete.d.ts +0 -1
- package/Select/Option.d.ts +0 -1
- package/Select/Select.d.ts +0 -1
- package/Select/SelectControlContext.d.ts +0 -1
- package/Select/TreeSelect.d.ts +0 -1
- package/Skeleton/Skeleton.d.ts +0 -1
- package/Slider/useSlider.js +1 -1
- package/Stepper/Step.d.ts +0 -1
- package/Table/TableBody.d.ts +0 -1
- package/Table/TableBody.js +1 -2
- package/Table/TableBodyRow.d.ts +0 -1
- package/Table/TableBodyRow.js +1 -2
- package/Table/TableCell.d.ts +0 -1
- package/Table/TableExpandedTable.d.ts +0 -1
- package/Table/TableExpandedTable.js +1 -2
- package/Table/TableHeader.d.ts +0 -1
- package/Table/TableHeader.js +1 -2
- package/Table/editable/TableEditRenderWrapper.d.ts +1 -2
- package/Table/expandable/TableExpandable.d.ts +0 -1
- package/Table/expandable/TableExpandable.js +1 -2
- package/Table/pagination/TablePagination.js +1 -2
- package/Table/pagination/useTablePagination.d.ts +1 -1
- package/Table/rowSelection/TableRowSelection.d.ts +0 -1
- package/Table/rowSelection/TableRowSelection.js +1 -2
- package/Table/rowSelection/useTableRowSelection.d.ts +1 -1
- package/Table/sorting/TableSortingIcon.d.ts +0 -1
- package/Table/sorting/TableSortingIcon.js +1 -2
- package/Table/sorting/useTableSorting.d.ts +1 -2
- package/Table/useTableFetchMore.d.ts +1 -1
- package/Table/useTableLoading.d.ts +1 -1
- package/Table/useTableScroll.d.ts +126 -114
- package/Tabs/Tab.d.ts +0 -1
- package/TimePicker/TimePicker.d.ts +0 -1
- package/TimePicker/TimePickerPanel.d.ts +0 -1
- package/Tooltip/useDelayMouseEnterLeave.d.ts +0 -1
- package/Transition/Collapse.d.ts +0 -1
- package/Transition/Fade.d.ts +0 -1
- package/Transition/Grow.d.ts +0 -1
- package/Transition/SlideFade.d.ts +0 -1
- package/Transition/Transition.d.ts +1 -1
- package/Transition/Zoom.d.ts +0 -1
- package/Transition/useAutoTransitionDuration.d.ts +0 -1
- package/Tree/TreeNode.d.ts +0 -1
- package/Tree/TreeNodeList.d.ts +0 -1
- package/Tree/useTreeExpandedValue.d.ts +0 -1
- package/Typography/Typography.js +1 -2
- package/Upload/UploadButton.d.ts +0 -1
- package/Upload/UploadInput.d.ts +0 -1
- package/Upload/UploadInput.js +1 -2
- package/Upload/UploadPictureWallItem.d.ts +1 -1
- package/Upload/UploadPictureWallItem.js +1 -2
- package/_internal/InputTriggerPopper/InputTriggerPopper.d.ts +0 -1
- package/_internal/SlideFadeOverlay/SlideFadeOverlay.d.ts +0 -1
- package/index.d.ts +1 -0
- package/package.json +4 -4
- package/utils/get-scrollbar-width.d.ts +1 -0
- package/utils/get-scrollbar-width.js +22 -0
- package/utils/scroll-lock.js +6 -2
package/Tree/TreeNodeList.d.ts
CHANGED
package/Typography/Typography.js
CHANGED
|
@@ -34,6 +34,5 @@ const Typography = forwardRef(function Typography(props, ref) {
|
|
|
34
34
|
[typographyClasses.noWrap]: noWrap,
|
|
35
35
|
}, className), style: style, title: title, children: children }));
|
|
36
36
|
});
|
|
37
|
-
var Typography$1 = Typography;
|
|
38
37
|
|
|
39
|
-
export { Typography
|
|
38
|
+
export { Typography as default };
|
package/Upload/UploadButton.d.ts
CHANGED
package/Upload/UploadInput.d.ts
CHANGED
package/Upload/UploadInput.js
CHANGED
|
@@ -11,5 +11,5 @@ export interface UploadPictureWallItemProps extends Pick<UploadPictureBlockProps
|
|
|
11
11
|
onDelete?: MouseEventHandler;
|
|
12
12
|
onUpload?: (files: File[]) => void;
|
|
13
13
|
}
|
|
14
|
-
declare const UploadPictureWallItem: (props: UploadPictureWallItemProps) => JSX.Element;
|
|
14
|
+
declare const UploadPictureWallItem: (props: UploadPictureWallItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export default UploadPictureWallItem;
|
|
@@ -14,6 +14,5 @@ const UploadPictureWallItem = (props) => {
|
|
|
14
14
|
}, []);
|
|
15
15
|
return (jsx("div", { className: cx(uploadPictureWallClasses.item), children: jsx(UploadPictureBlock, { accept: accept, defaultUploadErrorLabel: defaultUploadErrorLabel, defaultUploadingLabel: defaultUploadingLabel, defaultUploadLabel: defaultUploadLabel, disabled: disabled, imageLoader: loader.current, multiple: multiple, onDelete: onDelete, onUpload: onUpload, fileHost: fileHost }) }));
|
|
16
16
|
};
|
|
17
|
-
var UploadPictureWallItem$1 = UploadPictureWallItem;
|
|
18
17
|
|
|
19
|
-
export { UploadPictureWallItem
|
|
18
|
+
export { UploadPictureWallItem as default };
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './utils/jsx-types';
|
|
|
5
5
|
export * from './utils/general';
|
|
6
6
|
export * from './utils/scroll-lock';
|
|
7
7
|
export * from './utils/array-move';
|
|
8
|
+
export * from './utils/get-scrollbar-width';
|
|
8
9
|
export * from './hooks/useClickAway';
|
|
9
10
|
export * from './hooks/useComposeRefs';
|
|
10
11
|
export * from './hooks/useDocumentEscapeKeyDown';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mezzanine-ui/react",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.13",
|
|
4
4
|
"description": "React components for mezzanine-ui",
|
|
5
5
|
"author": "Mezzanine",
|
|
6
6
|
"repository": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"react-dom": "^18.2.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@mezzanine-ui/core": "^0.13.
|
|
32
|
-
"@mezzanine-ui/icons": "^0.13.
|
|
33
|
-
"@mezzanine-ui/system": "^0.13.
|
|
31
|
+
"@mezzanine-ui/core": "^0.13.13",
|
|
32
|
+
"@mezzanine-ui/icons": "^0.13.13",
|
|
33
|
+
"@mezzanine-ui/system": "^0.13.13",
|
|
34
34
|
"@popperjs/core": "^2.11.6",
|
|
35
35
|
"@types/react-transition-group": "^4.4.8",
|
|
36
36
|
"clsx": "^2.0.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getScrollbarWidth(): number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function getScrollbarWidth() {
|
|
2
|
+
// Create a temporary div container and append it into the body
|
|
3
|
+
const container = document.createElement('div');
|
|
4
|
+
// Append the element into the body
|
|
5
|
+
document.body.appendChild(container);
|
|
6
|
+
// Force scrollbar on the temporary div element
|
|
7
|
+
container.style.overflow = 'scroll';
|
|
8
|
+
container.style.width = '100px';
|
|
9
|
+
container.style.height = '100px';
|
|
10
|
+
// Add a fake inner element to get the scrollbar width
|
|
11
|
+
const inner = document.createElement('div');
|
|
12
|
+
inner.style.width = '100%';
|
|
13
|
+
inner.style.height = '100%';
|
|
14
|
+
container.appendChild(inner);
|
|
15
|
+
// Calculate the width based on the container width minus its child width
|
|
16
|
+
const scrollbarWidth = container.offsetWidth - inner.offsetWidth;
|
|
17
|
+
// Remove the temporary elements from the DOM
|
|
18
|
+
document.body.removeChild(container);
|
|
19
|
+
return scrollbarWidth;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { getScrollbarWidth as default };
|
package/utils/scroll-lock.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import getScrollbarWidth from './get-scrollbar-width.js';
|
|
2
|
+
|
|
1
3
|
function lockBodyScroll() {
|
|
2
4
|
const { scrollY, } = window;
|
|
3
5
|
document.body.style.position = 'fixed';
|
|
4
6
|
document.body.style.top = `-${scrollY}px`;
|
|
7
|
+
// Calculate scroll bar width and use padding-right to remain layout width.
|
|
8
|
+
const scrollbarWidth = getScrollbarWidth();
|
|
9
|
+
document.body.style.paddingRight = `${scrollbarWidth}px`;
|
|
5
10
|
document.body.style.overflow = 'hidden';
|
|
6
|
-
/** @NOTE workaround for layout breaking (need refactor) */
|
|
7
|
-
document.body.style.width = '100vw';
|
|
8
11
|
}
|
|
9
12
|
function allowBodyScroll() {
|
|
10
13
|
var _a, _b;
|
|
@@ -12,6 +15,7 @@ function allowBodyScroll() {
|
|
|
12
15
|
if (document.body.style.position === 'fixed') {
|
|
13
16
|
document.body.style.position = '';
|
|
14
17
|
document.body.style.top = '';
|
|
18
|
+
document.body.style.paddingRight = '';
|
|
15
19
|
document.body.style.overflow = '';
|
|
16
20
|
window.scrollTo(0, (scrollY || 0) * -1);
|
|
17
21
|
}
|