@pushwoosh/dumb-components 1.1.51 → 1.1.53
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.
|
@@ -11,6 +11,6 @@ export const DropdownRoot = styled(Horizontal).attrs({
|
|
|
11
11
|
export const PopoverContent = styled.div.withConfig({
|
|
12
12
|
displayName: "PopoverContent",
|
|
13
13
|
componentId: "sc-h6jz87-1"
|
|
14
|
-
})(["position:fixed;border-radius:", ";border:1px solid ", ";overflow:hidden;box-shadow:", ";background:", ";z-index:
|
|
14
|
+
})(["position:fixed;border-radius:", ";border:1px solid ", ";overflow:hidden;box-shadow:", ";background:", ";z-index:10010;", ""], ShapeRadius.CONTROL, Color.FORM, Shadow.REGULAR, Color.CLEAR, ({
|
|
15
15
|
$isShaking
|
|
16
16
|
}) => $isShaking && css(["animation:", " 0.4s ease-in-out;"], shakeAnimation));
|
package/Calendar/helpers.js
CHANGED
|
@@ -124,8 +124,7 @@ export const getPeriodEnd = (date, period) => {
|
|
|
124
124
|
return utcDateToStruct(dateObj);
|
|
125
125
|
};
|
|
126
126
|
export const dateToStruct = (date, tzOffsetMinutes) => {
|
|
127
|
-
const
|
|
128
|
-
const localTime = new Date(utcTime + tzOffsetMinutes * 60_000);
|
|
127
|
+
const localTime = new Date(date.getTime() + tzOffsetMinutes * 60_000);
|
|
129
128
|
return utcDateToStruct(localTime);
|
|
130
129
|
};
|
|
131
130
|
export const structToDate = (ds, tzOffsetMinutes) => {
|
|
@@ -159,7 +158,8 @@ export const dateToStructTz = (date, tzName) => {
|
|
|
159
158
|
return dateToStruct(date, tzOffsetMinutes);
|
|
160
159
|
};
|
|
161
160
|
export const structToDateTz = (ds, tzName) => {
|
|
162
|
-
const
|
|
161
|
+
const utcTime = Date.UTC(ds.year, ds.month - 1, ds.day, ds.hour, ds.minute, ds.second, ds.millisecond);
|
|
162
|
+
const tentativeDate = new Date(utcTime);
|
|
163
163
|
const tzOffsetMinutes = getTimezoneOffset(tzName, tentativeDate);
|
|
164
|
-
return
|
|
164
|
+
return new Date(utcTime - tzOffsetMinutes * 60_000);
|
|
165
165
|
};
|