@wix/editor-react-components 1.2906.0 → 1.2907.0
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.
|
@@ -4069,6 +4069,7 @@ const calendarHeader = "calendarHeader__h7CtJ";
|
|
|
4069
4069
|
const calendarHeading = "calendarHeading__JLdsJ";
|
|
4070
4070
|
const calendarGrid = "calendarGrid__7hp87";
|
|
4071
4071
|
const calendarCell = "calendarCell__Pjcxr";
|
|
4072
|
+
const pageScrollable = "pageScrollable__JiNN-";
|
|
4072
4073
|
const styles = {
|
|
4073
4074
|
root,
|
|
4074
4075
|
datePicker,
|
|
@@ -4088,7 +4089,8 @@ const styles = {
|
|
|
4088
4089
|
calendarHeader,
|
|
4089
4090
|
calendarHeading,
|
|
4090
4091
|
calendarGrid,
|
|
4091
|
-
calendarCell
|
|
4092
|
+
calendarCell,
|
|
4093
|
+
pageScrollable
|
|
4092
4094
|
};
|
|
4093
4095
|
const toCalendarDate = (value) => {
|
|
4094
4096
|
if (typeof value !== "string" || !value) {
|
|
@@ -4156,6 +4158,22 @@ const DatePickerField = ({
|
|
|
4156
4158
|
] });
|
|
4157
4159
|
};
|
|
4158
4160
|
const keepOpen = () => false;
|
|
4161
|
+
const PAGE_PADDING_VAR = "--date-picker-page-padding-right";
|
|
4162
|
+
const KeepPageScrollable = () => {
|
|
4163
|
+
React__default.useLayoutEffect(() => {
|
|
4164
|
+
const html = document.documentElement;
|
|
4165
|
+
html.style.setProperty(
|
|
4166
|
+
PAGE_PADDING_VAR,
|
|
4167
|
+
getComputedStyle(html).paddingRight
|
|
4168
|
+
);
|
|
4169
|
+
html.classList.add(styles.pageScrollable);
|
|
4170
|
+
return () => {
|
|
4171
|
+
html.classList.remove(styles.pageScrollable);
|
|
4172
|
+
html.style.removeProperty(PAGE_PADDING_VAR);
|
|
4173
|
+
};
|
|
4174
|
+
}, []);
|
|
4175
|
+
return null;
|
|
4176
|
+
};
|
|
4159
4177
|
const DatePickerCalendar = ({
|
|
4160
4178
|
portalContainer,
|
|
4161
4179
|
popoverRef,
|
|
@@ -4254,7 +4272,10 @@ const DatePickerCalendar = ({
|
|
|
4254
4272
|
UNSTABLE_portalContainer: portalContainer ?? void 0,
|
|
4255
4273
|
isNonModal: isPreviewOpen,
|
|
4256
4274
|
shouldCloseOnInteractOutside: isPreviewOpen ? keepOpen : void 0,
|
|
4257
|
-
children: isPreviewOpen ? /* @__PURE__ */ jsx("div", { className: boxClassName, children: calendar2 }) : /* @__PURE__ */
|
|
4275
|
+
children: isPreviewOpen ? /* @__PURE__ */ jsx("div", { className: boxClassName, children: calendar2 }) : /* @__PURE__ */ jsxs($de32f1b87079253c$export$3ddf2d174ce01153, { className: boxClassName, children: [
|
|
4276
|
+
/* @__PURE__ */ jsx(KeepPageScrollable, {}),
|
|
4277
|
+
calendar2
|
|
4278
|
+
] })
|
|
4258
4279
|
}
|
|
4259
4280
|
)
|
|
4260
4281
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DatePickerElementProps } from '../DatePicker.types';
|
|
3
|
+
export declare const PAGE_PADDING_VAR = "--date-picker-page-padding-right";
|
|
3
4
|
export declare const DatePickerCalendar: ({ portalContainer, popoverRef, isPreviewOpen, elementProps, }: {
|
|
4
5
|
portalContainer: HTMLElement | null;
|
|
5
6
|
popoverRef?: React.Ref<HTMLElement>;
|
|
@@ -190,6 +190,11 @@
|
|
|
190
190
|
outline-offset: -2px !important;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
html.pageScrollable__JiNN- {
|
|
194
|
+
overflow: visible !important;
|
|
195
|
+
scrollbar-gutter: auto !important;
|
|
196
|
+
padding-right: var(--date-picker-page-padding-right) !important;
|
|
197
|
+
}
|
|
193
198
|
.fallbackDirection__HeRgn:not([dir]) {
|
|
194
199
|
direction: var(--wix-opt-in-direction);
|
|
195
200
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2907.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -226,5 +226,5 @@
|
|
|
226
226
|
"registry": "https://registry.npmjs.org/",
|
|
227
227
|
"access": "public"
|
|
228
228
|
},
|
|
229
|
-
"falconPackageHash": "
|
|
229
|
+
"falconPackageHash": "48a819aebdae45afd622deac84b045f22dec870136bad6e4a6972c5a"
|
|
230
230
|
}
|