@instructure/ui-date-input 8.22.0 → 8.22.1-snapshot.23

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/LICENSE.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: The MIT License (MIT)
3
+ category: Getting Started
4
+ order: 9
5
+ ---
6
+
7
+ # The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Instructure, Inc.
10
+
11
+ **Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions.**
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -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
@@ -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.22.0",
3
+ "version": "8.22.1-snapshot.23+23720451b",
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.22.0",
27
- "@instructure/ui-test-locator": "8.22.0",
28
- "@instructure/ui-test-utils": "8.22.0"
26
+ "@instructure/ui-babel-preset": "8.22.1-snapshot.23+23720451b",
27
+ "@instructure/ui-test-locator": "8.22.1-snapshot.23+23720451b",
28
+ "@instructure/ui-test-utils": "8.22.1-snapshot.23+23720451b"
29
29
  },
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.13.10",
32
- "@instructure/emotion": "8.22.0",
33
- "@instructure/ui-calendar": "8.22.0",
34
- "@instructure/ui-form-field": "8.22.0",
35
- "@instructure/ui-icons": "8.22.0",
36
- "@instructure/ui-popover": "8.22.0",
37
- "@instructure/ui-position": "8.22.0",
38
- "@instructure/ui-prop-types": "8.22.0",
39
- "@instructure/ui-react-utils": "8.22.0",
40
- "@instructure/ui-selectable": "8.22.0",
41
- "@instructure/ui-testable": "8.22.0",
42
- "@instructure/ui-text-input": "8.22.0",
43
- "@instructure/ui-utils": "8.22.0",
32
+ "@instructure/emotion": "8.22.1-snapshot.23+23720451b",
33
+ "@instructure/ui-calendar": "8.22.1-snapshot.23+23720451b",
34
+ "@instructure/ui-form-field": "8.22.1-snapshot.23+23720451b",
35
+ "@instructure/ui-icons": "8.22.1-snapshot.23+23720451b",
36
+ "@instructure/ui-popover": "8.22.1-snapshot.23+23720451b",
37
+ "@instructure/ui-position": "8.22.1-snapshot.23+23720451b",
38
+ "@instructure/ui-prop-types": "8.22.1-snapshot.23+23720451b",
39
+ "@instructure/ui-react-utils": "8.22.1-snapshot.23+23720451b",
40
+ "@instructure/ui-selectable": "8.22.1-snapshot.23+23720451b",
41
+ "@instructure/ui-testable": "8.22.1-snapshot.23+23720451b",
42
+ "@instructure/ui-text-input": "8.22.1-snapshot.23+23720451b",
43
+ "@instructure/ui-utils": "8.22.1-snapshot.23+23720451b",
44
44
  "prop-types": "^15"
45
45
  },
46
46
  "peerDependencies": {
@@ -49,5 +49,6 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "sideEffects": false
52
+ "sideEffects": false,
53
+ "gitHead": "23720451b9e91fc1ba0b31b4f22fff32669a4d59"
53
54
  }
@@ -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 {...getRootProps({ css: styles?.dateInput })}>
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}