@instructure/ui-date-input 8.22.1-snapshot.4 → 8.23.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/CHANGELOG.md +4 -0
- package/es/DateInput/index.js +4 -8
- package/lib/DateInput/index.js +4 -8
- package/package.json +17 -18
- package/src/DateInput/index.tsx +4 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DateInput/index.d.ts +0 -1
- package/types/DateInput/index.d.ts.map +1 -1
- package/LICENSE.md +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
# [8.23.0](https://github.com/instructure/instructure-ui/compare/v8.22.0...v8.23.0) (2022-04-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-date-input
|
|
9
|
+
|
|
6
10
|
# [8.22.0](https://github.com/instructure/instructure-ui/compare/v8.21.0...v8.22.0) (2022-03-31)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-date-input
|
package/es/DateInput/index.js
CHANGED
|
@@ -59,10 +59,6 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
59
59
|
this._input = void 0;
|
|
60
60
|
this.ref = null;
|
|
61
61
|
|
|
62
|
-
this.handleRef = el => {
|
|
63
|
-
this.ref = el;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
62
|
this.formatDateId = date => {
|
|
67
63
|
// ISO8601 strings may contain a space. Remove any spaces before using the
|
|
68
64
|
// date as the id.
|
|
@@ -245,9 +241,7 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
245
241
|
renderAfterInput: _IconCalendarMonthLin || (_IconCalendarMonthLin = jsx(IconCalendarMonthLine, {
|
|
246
242
|
inline: false
|
|
247
243
|
}))
|
|
248
|
-
})
|
|
249
|
-
elementRef: this.handleRef
|
|
250
|
-
}));
|
|
244
|
+
})));
|
|
251
245
|
}
|
|
252
246
|
|
|
253
247
|
render() {
|
|
@@ -271,8 +265,10 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
271
265
|
getListProps = _ref4.getListProps,
|
|
272
266
|
getOptionProps = _ref4.getOptionProps,
|
|
273
267
|
getDescriptionProps = _ref4.getDescriptionProps;
|
|
274
|
-
return jsx("span", getRootProps({
|
|
268
|
+
return jsx("span", Object.assign({}, getRootProps({
|
|
275
269
|
css: styles === null || styles === void 0 ? void 0 : styles.dateInput
|
|
270
|
+
}), {
|
|
271
|
+
ref: el => this.ref = el
|
|
276
272
|
}), this.renderInput({
|
|
277
273
|
getInputProps,
|
|
278
274
|
getTriggerProps
|
package/lib/DateInput/index.js
CHANGED
|
@@ -63,10 +63,6 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
63
63
|
this._input = void 0;
|
|
64
64
|
this.ref = null;
|
|
65
65
|
|
|
66
|
-
this.handleRef = el => {
|
|
67
|
-
this.ref = el;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
66
|
this.formatDateId = date => {
|
|
71
67
|
// ISO8601 strings may contain a space. Remove any spaces before using the
|
|
72
68
|
// date as the id.
|
|
@@ -249,9 +245,7 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
249
245
|
renderAfterInput: _IconCalendarMonthLin || (_IconCalendarMonthLin = (0, _emotion.jsx)(_IconCalendarMonthLine.IconCalendarMonthLine, {
|
|
250
246
|
inline: false
|
|
251
247
|
}))
|
|
252
|
-
})
|
|
253
|
-
elementRef: this.handleRef
|
|
254
|
-
}));
|
|
248
|
+
})));
|
|
255
249
|
}
|
|
256
250
|
|
|
257
251
|
render() {
|
|
@@ -275,8 +269,10 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
275
269
|
getListProps = _ref4.getListProps,
|
|
276
270
|
getOptionProps = _ref4.getOptionProps,
|
|
277
271
|
getDescriptionProps = _ref4.getDescriptionProps;
|
|
278
|
-
return (0, _emotion.jsx)("span", getRootProps({
|
|
272
|
+
return (0, _emotion.jsx)("span", Object.assign({}, getRootProps({
|
|
279
273
|
css: styles === null || styles === void 0 ? void 0 : styles.dateInput
|
|
274
|
+
}), {
|
|
275
|
+
ref: el => this.ref = el
|
|
280
276
|
}), this.renderInput({
|
|
281
277
|
getInputProps,
|
|
282
278
|
getTriggerProps
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-date-input",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.23.0",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,24 +23,24 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.
|
|
27
|
-
"@instructure/ui-test-locator": "8.
|
|
28
|
-
"@instructure/ui-test-utils": "8.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.23.0",
|
|
27
|
+
"@instructure/ui-test-locator": "8.23.0",
|
|
28
|
+
"@instructure/ui-test-utils": "8.23.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.13.10",
|
|
32
|
-
"@instructure/emotion": "8.
|
|
33
|
-
"@instructure/ui-calendar": "8.
|
|
34
|
-
"@instructure/ui-form-field": "8.
|
|
35
|
-
"@instructure/ui-icons": "8.
|
|
36
|
-
"@instructure/ui-popover": "8.
|
|
37
|
-
"@instructure/ui-position": "8.
|
|
38
|
-
"@instructure/ui-prop-types": "8.
|
|
39
|
-
"@instructure/ui-react-utils": "8.
|
|
40
|
-
"@instructure/ui-selectable": "8.
|
|
41
|
-
"@instructure/ui-testable": "8.
|
|
42
|
-
"@instructure/ui-text-input": "8.
|
|
43
|
-
"@instructure/ui-utils": "8.
|
|
32
|
+
"@instructure/emotion": "8.23.0",
|
|
33
|
+
"@instructure/ui-calendar": "8.23.0",
|
|
34
|
+
"@instructure/ui-form-field": "8.23.0",
|
|
35
|
+
"@instructure/ui-icons": "8.23.0",
|
|
36
|
+
"@instructure/ui-popover": "8.23.0",
|
|
37
|
+
"@instructure/ui-position": "8.23.0",
|
|
38
|
+
"@instructure/ui-prop-types": "8.23.0",
|
|
39
|
+
"@instructure/ui-react-utils": "8.23.0",
|
|
40
|
+
"@instructure/ui-selectable": "8.23.0",
|
|
41
|
+
"@instructure/ui-testable": "8.23.0",
|
|
42
|
+
"@instructure/ui-text-input": "8.23.0",
|
|
43
|
+
"@instructure/ui-utils": "8.23.0",
|
|
44
44
|
"prop-types": "^15"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
@@ -49,6 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"sideEffects": false
|
|
53
|
-
"gitHead": "5809c01bc3fc6e7b468d18d44c22f364304561ed"
|
|
52
|
+
"sideEffects": false
|
|
54
53
|
}
|
package/src/DateInput/index.tsx
CHANGED
|
@@ -91,10 +91,6 @@ class DateInput extends Component<DateInputProps> {
|
|
|
91
91
|
this.props.makeStyles?.()
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
handleRef = (el: Element | null) => {
|
|
95
|
-
this.ref = el
|
|
96
|
-
}
|
|
97
|
-
|
|
98
94
|
get selectedDateId() {
|
|
99
95
|
let selectedDateId: string | undefined
|
|
100
96
|
Children.toArray(this.props.children).forEach((day) => {
|
|
@@ -262,7 +258,6 @@ class DateInput extends Component<DateInputProps> {
|
|
|
262
258
|
display: isInline ? 'inline-block' : 'block',
|
|
263
259
|
renderAfterInput: <IconCalendarMonthLine inline={false} />
|
|
264
260
|
})}
|
|
265
|
-
elementRef={this.handleRef}
|
|
266
261
|
/>
|
|
267
262
|
)
|
|
268
263
|
}
|
|
@@ -288,7 +283,10 @@ class DateInput extends Component<DateInputProps> {
|
|
|
288
283
|
getOptionProps,
|
|
289
284
|
getDescriptionProps
|
|
290
285
|
}) => (
|
|
291
|
-
<span
|
|
286
|
+
<span
|
|
287
|
+
{...getRootProps({ css: styles?.dateInput })}
|
|
288
|
+
ref={(el) => (this.ref = el)}
|
|
289
|
+
>
|
|
292
290
|
{this.renderInput({ getInputProps, getTriggerProps })}
|
|
293
291
|
<span {...getDescriptionProps()} css={styles?.assistiveText}>
|
|
294
292
|
{assistiveText}
|