@atlaskit/editor-plugin-date 1.0.11 → 1.0.12
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-date
|
|
2
2
|
|
|
3
|
+
## 1.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#90781](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90781) [`566fba222315`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/566fba222315) - Accessible name for datepicker's input field
|
|
8
|
+
|
|
3
9
|
## 1.0.11
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -12,7 +12,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
16
15
|
var _react = _interopRequireDefault(require("react"));
|
|
17
16
|
var _react2 = require("@emotion/react");
|
|
18
17
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -22,12 +21,14 @@ var _form = require("@atlaskit/form");
|
|
|
22
21
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
23
22
|
var _formatParse = require("../../utils/formatParse");
|
|
24
23
|
var _internal = require("../../utils/internal");
|
|
25
|
-
var _templateObject;
|
|
26
|
-
/** @jsx jsx */
|
|
27
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
29
26
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
30
|
-
var dateTextFieldWrapper = (0, _react2.css)(
|
|
27
|
+
var dateTextFieldWrapper = (0, _react2.css)({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
29
|
+
padding: '22px',
|
|
30
|
+
paddingBottom: "var(--ds-space-150, 12px)"
|
|
31
|
+
});
|
|
31
32
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
32
33
|
var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
33
34
|
(0, _inherits2.default)(DatePickerInput, _React$Component);
|
|
@@ -212,7 +213,8 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
212
213
|
onKeyDown: this.handleKeyDown,
|
|
213
214
|
spellCheck: false,
|
|
214
215
|
autoComplete: "off",
|
|
215
|
-
isInvalid: displayError
|
|
216
|
+
isInvalid: displayError,
|
|
217
|
+
"aria-label": formatMessage(_messages.dateMessages.onKeyUpDownText)
|
|
216
218
|
}), displayError && (0, _react2.jsx)(_form.ErrorMessage, null, formatMessage(_messages.dateMessages.invalidDateError)));
|
|
217
219
|
}
|
|
218
220
|
}, {
|
|
@@ -11,10 +11,11 @@ import { formatDateType, parseDateType } from '../../utils/formatParse';
|
|
|
11
11
|
import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from '../../utils/internal';
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
14
|
-
const dateTextFieldWrapper = css
|
|
15
|
-
|
|
16
|
-
padding
|
|
17
|
-
|
|
14
|
+
const dateTextFieldWrapper = css({
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
16
|
+
padding: '22px',
|
|
17
|
+
paddingBottom: "var(--ds-space-150, 12px)"
|
|
18
|
+
});
|
|
18
19
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
19
20
|
class DatePickerInput extends React.Component {
|
|
20
21
|
constructor(props) {
|
|
@@ -206,7 +207,8 @@ class DatePickerInput extends React.Component {
|
|
|
206
207
|
onKeyDown: this.handleKeyDown,
|
|
207
208
|
spellCheck: false,
|
|
208
209
|
autoComplete: "off",
|
|
209
|
-
isInvalid: displayError
|
|
210
|
+
isInvalid: displayError,
|
|
211
|
+
"aria-label": formatMessage(messages.onKeyUpDownText)
|
|
210
212
|
}), displayError && jsx(ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
211
213
|
}
|
|
212
214
|
componentDidUpdate() {
|
|
@@ -5,8 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
9
|
-
var _templateObject;
|
|
10
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
10
|
/** @jsx jsx */
|
|
@@ -21,7 +19,11 @@ import { formatDateType, parseDateType } from '../../utils/formatParse';
|
|
|
21
19
|
import { adjustDate, findDateSegmentByPosition, isDatePossiblyValid } from '../../utils/internal';
|
|
22
20
|
|
|
23
21
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
24
|
-
var dateTextFieldWrapper = css(
|
|
22
|
+
var dateTextFieldWrapper = css({
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
24
|
+
padding: '22px',
|
|
25
|
+
paddingBottom: "var(--ds-space-150, 12px)"
|
|
26
|
+
});
|
|
25
27
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
26
28
|
var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
27
29
|
_inherits(DatePickerInput, _React$Component);
|
|
@@ -206,7 +208,8 @@ var DatePickerInput = /*#__PURE__*/function (_React$Component) {
|
|
|
206
208
|
onKeyDown: this.handleKeyDown,
|
|
207
209
|
spellCheck: false,
|
|
208
210
|
autoComplete: "off",
|
|
209
|
-
isInvalid: displayError
|
|
211
|
+
isInvalid: displayError,
|
|
212
|
+
"aria-label": formatMessage(messages.onKeyUpDownText)
|
|
210
213
|
}), displayError && jsx(ErrorMessage, null, formatMessage(messages.invalidDateError)));
|
|
211
214
|
}
|
|
212
215
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-date",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "Date plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/adf-schema": "^35.9.0",
|
|
36
36
|
"@atlaskit/calendar": "^14.2.0",
|
|
37
37
|
"@atlaskit/date": "^0.10.0",
|
|
38
|
-
"@atlaskit/editor-common": "^78.
|
|
38
|
+
"@atlaskit/editor-common": "^78.29.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.0.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "3.0.0",
|