@spscommerce/ds-react 4.28.0 → 4.30.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.
- package/lib/index.cjs.js +54 -54
- package/lib/index.es.js +7 -4
- package/package.json +9 -9
package/lib/index.es.js
CHANGED
|
@@ -22799,7 +22799,7 @@ const SimpleDateUtils = Object.freeze({
|
|
|
22799
22799
|
nextMonth(date2) {
|
|
22800
22800
|
return Object.freeze({
|
|
22801
22801
|
year: date2.month === 12 ? date2.year + 1 : date2.year,
|
|
22802
|
-
month:
|
|
22802
|
+
month: date2.month + 1 > 12 ? 1 : date2.month + 1,
|
|
22803
22803
|
date: date2.date
|
|
22804
22804
|
});
|
|
22805
22805
|
}
|
|
@@ -36371,10 +36371,11 @@ function SpsDatepickerCalendar(props2) {
|
|
|
36371
36371
|
const cal = useCalendar(viewMonth);
|
|
36372
36372
|
const [mouseoverDate, setMouseoverDate] = React.useState();
|
|
36373
36373
|
function viewPreviousMonth() {
|
|
36374
|
-
|
|
36374
|
+
const newDate = SimpleDateUtils.prevMonth(__spreadProps(__spreadValues({}, viewMonth), { date: 15 }));
|
|
36375
|
+
setViewMonth(newDate);
|
|
36375
36376
|
}
|
|
36376
36377
|
function viewNextMonth() {
|
|
36377
|
-
setViewMonth(SimpleDateUtils.nextMonth(viewMonth));
|
|
36378
|
+
setViewMonth(SimpleDateUtils.nextMonth(__spreadProps(__spreadValues({}, viewMonth), { date: 15 })));
|
|
36378
36379
|
}
|
|
36379
36380
|
function handleMouseEnter(event) {
|
|
36380
36381
|
if (event.target && event.target.classList.contains(`${CSS_ELEMENT$1}-day`)) {
|
|
@@ -36711,7 +36712,9 @@ function SpsDateRangePickerV2(_Y) {
|
|
|
36711
36712
|
if (!value) {
|
|
36712
36713
|
clear();
|
|
36713
36714
|
} else if (Array.isArray(value)) {
|
|
36714
|
-
|
|
36715
|
+
if (value.every((v2) => SimpleDateUtils.isValid(v2))) {
|
|
36716
|
+
setStringValue(SimpleDateUtils.toStringRange(value));
|
|
36717
|
+
}
|
|
36715
36718
|
setDisplayRange(null);
|
|
36716
36719
|
} else if (typeof value.definition === "function") {
|
|
36717
36720
|
setDisplayRange(value.definition());
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/ds-react",
|
|
3
3
|
"description": "SPS Design System React components",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.30.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-react",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-stately/collections": "^3.3.3",
|
|
31
|
-
"@spscommerce/ds-colors": "4.
|
|
32
|
-
"@spscommerce/ds-shared": "4.
|
|
33
|
-
"@spscommerce/positioning": "4.
|
|
34
|
-
"@spscommerce/utils": "4.
|
|
31
|
+
"@spscommerce/ds-colors": "4.30.0",
|
|
32
|
+
"@spscommerce/ds-shared": "4.30.0",
|
|
33
|
+
"@spscommerce/positioning": "4.30.0",
|
|
34
|
+
"@spscommerce/utils": "4.30.0",
|
|
35
35
|
"moment": "^2.25.3",
|
|
36
36
|
"moment-timezone": "^0.5.28",
|
|
37
37
|
"react": "^16.9.0",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@react-stately/collections": "^3.3.3",
|
|
42
|
-
"@spscommerce/ds-colors": "4.
|
|
43
|
-
"@spscommerce/ds-shared": "4.
|
|
44
|
-
"@spscommerce/positioning": "4.
|
|
45
|
-
"@spscommerce/utils": "4.
|
|
42
|
+
"@spscommerce/ds-colors": "4.30.0",
|
|
43
|
+
"@spscommerce/ds-shared": "4.30.0",
|
|
44
|
+
"@spscommerce/positioning": "4.30.0",
|
|
45
|
+
"@spscommerce/utils": "4.30.0",
|
|
46
46
|
"@testing-library/jest-dom": "^4.2.4",
|
|
47
47
|
"@testing-library/react": "^9.3.2",
|
|
48
48
|
"@types/prop-types": "^15.7.1",
|