@synerise/ds-date-picker 0.10.7 → 0.10.9
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/CHANGELOG.md +19 -0
- package/dist/Elements/Navbar/Navbar.js +7 -1
- package/dist/Elements/Navbar/Navbar.types.d.ts +2 -0
- package/dist/Elements/TimePicker/TimePicker.js +4 -0
- package/dist/Elements/TimePicker/TimePicker.types.d.ts +2 -0
- package/dist/RawDatePicker/RawDatePicker.js +10 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.10.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.8...@synerise/ds-date-picker@0.10.9) (2023-08-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-date-picker
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.10.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.7...@synerise/ds-date-picker@0.10.8) (2023-08-09)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **date-picker:** added styles for inactive arrows in nav ([225722c](https://github.com/Synerise/synerise-design/commit/225722cd546060114ecf5d3136e5b07eb1df2c61))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.10.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.6...@synerise/ds-date-picker@0.10.7) (2023-08-03)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-date-picker
|
|
@@ -11,10 +11,13 @@ var Navbar = function Navbar(props) {
|
|
|
11
11
|
onLongPrev = props.onLongPrev,
|
|
12
12
|
onLongNext = props.onLongNext,
|
|
13
13
|
onShortPrev = props.onShortPrev,
|
|
14
|
-
onShortNext = props.onShortNext
|
|
14
|
+
onShortNext = props.onShortNext,
|
|
15
|
+
inactivePrev = props.inactivePrev,
|
|
16
|
+
inactiveNext = props.inactiveNext;
|
|
15
17
|
return /*#__PURE__*/React.createElement(S.Container, {
|
|
16
18
|
className: "ds-date-picker-nav"
|
|
17
19
|
}, /*#__PURE__*/React.createElement(S.ArrowContainer, null, onLongPrev && !hidePrev ? /*#__PURE__*/React.createElement(S.NavButton, {
|
|
20
|
+
disabled: inactivePrev,
|
|
18
21
|
key: uuid(),
|
|
19
22
|
mode: "single-icon",
|
|
20
23
|
role: "button",
|
|
@@ -25,6 +28,7 @@ var Navbar = function Navbar(props) {
|
|
|
25
28
|
})) : /*#__PURE__*/React.createElement(S.ArrowPlaceholder, {
|
|
26
29
|
className: "arrow-placeholder long-prev"
|
|
27
30
|
}), onShortPrev && !hidePrev ? /*#__PURE__*/React.createElement(S.NavButton, {
|
|
31
|
+
disabled: inactivePrev,
|
|
28
32
|
key: uuid(),
|
|
29
33
|
mode: "single-icon",
|
|
30
34
|
role: "button",
|
|
@@ -37,6 +41,7 @@ var Navbar = function Navbar(props) {
|
|
|
37
41
|
})), /*#__PURE__*/React.createElement(S.Text, null, onTitleClick ? /*#__PURE__*/React.createElement(S.Link, {
|
|
38
42
|
onClick: onTitleClick
|
|
39
43
|
}, title) : title), /*#__PURE__*/React.createElement(S.ArrowContainer, null, onShortNext && !hideNext ? /*#__PURE__*/React.createElement(S.NavButton, {
|
|
44
|
+
disabled: inactiveNext,
|
|
40
45
|
key: uuid(),
|
|
41
46
|
mode: "single-icon",
|
|
42
47
|
role: "button",
|
|
@@ -47,6 +52,7 @@ var Navbar = function Navbar(props) {
|
|
|
47
52
|
})) : /*#__PURE__*/React.createElement(S.ArrowPlaceholder, {
|
|
48
53
|
className: "arrow-placeholder short-next"
|
|
49
54
|
}), onLongNext && !hideNext ? /*#__PURE__*/React.createElement(S.NavButton, {
|
|
55
|
+
disabled: inactiveNext,
|
|
50
56
|
key: uuid(),
|
|
51
57
|
mode: "single-icon",
|
|
52
58
|
role: "button",
|
|
@@ -14,6 +14,8 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
14
14
|
disabledMinutes = _ref$disabledMinutes === void 0 ? [] : _ref$disabledMinutes,
|
|
15
15
|
_ref$disabledSeconds = _ref.disabledSeconds,
|
|
16
16
|
disabledSeconds = _ref$disabledSeconds === void 0 ? [] : _ref$disabledSeconds,
|
|
17
|
+
inactivePrev = _ref.inactivePrev,
|
|
18
|
+
inactiveNext = _ref.inactiveNext,
|
|
17
19
|
onChange = _ref.onChange,
|
|
18
20
|
onShortNext = _ref.onShortNext,
|
|
19
21
|
onShortPrev = _ref.onShortPrev;
|
|
@@ -25,6 +27,8 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
25
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !!value && /*#__PURE__*/React.createElement(Navbar, {
|
|
26
28
|
title: fnsFormat(value, 'iii d, yyyy', intl.locale),
|
|
27
29
|
key: "head",
|
|
30
|
+
inactivePrev: inactivePrev,
|
|
31
|
+
inactiveNext: inactiveNext,
|
|
28
32
|
onShortNext: onShortNext,
|
|
29
33
|
onShortPrev: onShortPrev
|
|
30
34
|
}), /*#__PURE__*/React.createElement(S.Container, {
|
|
@@ -199,18 +199,25 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
199
199
|
var _this$props2 = _this.props,
|
|
200
200
|
disabledHours = _this$props2.disabledHours,
|
|
201
201
|
disabledMinutes = _this$props2.disabledMinutes,
|
|
202
|
-
disabledSeconds = _this$props2.disabledSeconds
|
|
202
|
+
disabledSeconds = _this$props2.disabledSeconds,
|
|
203
|
+
disabledDates = _this$props2.disabledDates;
|
|
204
|
+
var prevDay = fnsAddDays(legacyParse(value), -1);
|
|
205
|
+
var nextDay = fnsAddDays(legacyParse(value), 1);
|
|
206
|
+
var inactivePrev = disabledDates ? disabledDates(prevDay) : false;
|
|
207
|
+
var inactiveNext = disabledDates ? disabledDates(nextDay) : false;
|
|
203
208
|
return /*#__PURE__*/React.createElement(TimePicker, {
|
|
204
209
|
value: value,
|
|
205
210
|
onChange: _this.handleChange,
|
|
206
211
|
disabledHours: disabledHours,
|
|
207
212
|
disabledMinutes: disabledMinutes,
|
|
208
213
|
disabledSeconds: disabledSeconds,
|
|
214
|
+
inactiveNext: inactiveNext,
|
|
215
|
+
inactivePrev: inactivePrev,
|
|
209
216
|
onShortNext: function onShortNext() {
|
|
210
|
-
return _this.handleDaySwitch(
|
|
217
|
+
return _this.handleDaySwitch(nextDay);
|
|
211
218
|
},
|
|
212
219
|
onShortPrev: function onShortPrev() {
|
|
213
|
-
return _this.handleDaySwitch(
|
|
220
|
+
return _this.handleDaySwitch(prevDay);
|
|
214
221
|
}
|
|
215
222
|
});
|
|
216
223
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-date-picker",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.9",
|
|
4
4
|
"description": "DatePicker UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@date-fns/upgrade": "^1.0.3",
|
|
36
|
-
"@synerise/ds-button": "^0.
|
|
37
|
-
"@synerise/ds-core": "^0.39.
|
|
36
|
+
"@synerise/ds-button": "^0.18.0",
|
|
37
|
+
"@synerise/ds-core": "^0.39.12",
|
|
38
38
|
"@synerise/ds-icon": "^0.58.0",
|
|
39
|
-
"@synerise/ds-time-picker": "^0.
|
|
40
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
39
|
+
"@synerise/ds-time-picker": "^0.8.0",
|
|
40
|
+
"@synerise/ds-tooltip": "^0.14.1",
|
|
41
41
|
"classnames": "^2.2.6",
|
|
42
42
|
"date-fns": "2.16.1",
|
|
43
43
|
"lodash": "^4.17.20",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"@synerise/ds-core": "*",
|
|
49
49
|
"react": ">=16.9.0 < 17.0.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "0795eb5071d9160e429731ba8f8807c1ae509085"
|
|
52
52
|
}
|