@instructure/ui-time-select 8.12.1-snapshot.7 → 8.13.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 CHANGED
@@ -3,6 +3,12 @@
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.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
7
+
8
+ ### Features
9
+
10
+ - **ui-form-field:** make FormField messages accept `ReactNode` text, not just `string` ([4d36973](https://github.com/instructure/instructure-ui/commit/4d369733414715a70bae0628378e8d82214eab3e))
11
+
6
12
  # [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
7
13
 
8
14
  ### Bug Fixes
@@ -107,9 +107,8 @@ let TimeSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Time
107
107
  (_this$props$onHideOpt = (_this$props4 = this.props).onHideOptions) === null || _this$props$onHideOpt === void 0 ? void 0 : _this$props$onHideOpt.call(_this$props4, event);
108
108
  };
109
109
 
110
- this.handleHighlightOption = (event, {
111
- id
112
- }) => {
110
+ this.handleHighlightOption = (event, _ref) => {
111
+ let id = _ref.id;
113
112
  if (id === this._emptyOptionId) return;
114
113
  const type = event.type;
115
114
  const option = this.getOption('id', id).label;
@@ -119,11 +118,11 @@ let TimeSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Time
119
118
  }));
120
119
  };
121
120
 
122
- this.handleSelectOption = (event, {
123
- id
124
- }) => {
121
+ this.handleSelectOption = (event, _ref2) => {
125
122
  var _this$props$onHideOpt2, _this$props6;
126
123
 
124
+ let id = _ref2.id;
125
+
127
126
  if (id === this._emptyOptionId) {
128
127
  this.setState({
129
128
  isShowingOptions: false
@@ -288,7 +287,8 @@ let TimeSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Time
288
287
  return void 0;
289
288
  }
290
289
 
291
- getOption(field, value, options = this.state.options) {
290
+ getOption(field, value) {
291
+ let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.state.options;
292
292
  return options.find(option => option[field] === value);
293
293
  }
294
294
 
@@ -111,7 +111,7 @@ const propTypes = {
111
111
  * Displays messages and validation for the input. It should be an object
112
112
  * with the following shape:
113
113
  * `{
114
- * text: PropTypes.string,
114
+ * text: PropTypes.node,
115
115
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
116
116
  * }`
117
117
  */
@@ -111,9 +111,8 @@ let TimeSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
111
111
  (_this$props$onHideOpt = (_this$props4 = this.props).onHideOptions) === null || _this$props$onHideOpt === void 0 ? void 0 : _this$props$onHideOpt.call(_this$props4, event);
112
112
  };
113
113
 
114
- this.handleHighlightOption = (event, {
115
- id
116
- }) => {
114
+ this.handleHighlightOption = (event, _ref) => {
115
+ let id = _ref.id;
117
116
  if (id === this._emptyOptionId) return;
118
117
  const type = event.type;
119
118
  const option = this.getOption('id', id).label;
@@ -123,11 +122,11 @@ let TimeSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
123
122
  }));
124
123
  };
125
124
 
126
- this.handleSelectOption = (event, {
127
- id
128
- }) => {
125
+ this.handleSelectOption = (event, _ref2) => {
129
126
  var _this$props$onHideOpt2, _this$props6;
130
127
 
128
+ let id = _ref2.id;
129
+
131
130
  if (id === this._emptyOptionId) {
132
131
  this.setState({
133
132
  isShowingOptions: false
@@ -293,7 +292,8 @@ let TimeSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _clas
293
292
  return void 0;
294
293
  }
295
294
 
296
- getOption(field, value, options = this.state.options) {
295
+ getOption(field, value) {
296
+ let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.state.options;
297
297
  return options.find(option => option[field] === value);
298
298
  }
299
299
 
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -125,7 +125,7 @@ const propTypes = {
125
125
  * Displays messages and validation for the input. It should be an object
126
126
  * with the following shape:
127
127
  * `{
128
- * text: PropTypes.string,
128
+ * text: PropTypes.node,
129
129
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
130
130
  * }`
131
131
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-time-select",
3
- "version": "8.12.1-snapshot.7+1e7ac8219",
3
+ "version": "8.13.0",
4
4
  "description": "A component for selecting time values.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,21 +25,21 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.12.1-snapshot.7+1e7ac8219",
29
- "@instructure/ui-form-field": "8.12.1-snapshot.7+1e7ac8219",
30
- "@instructure/ui-i18n": "8.12.1-snapshot.7+1e7ac8219",
31
- "@instructure/ui-position": "8.12.1-snapshot.7+1e7ac8219",
32
- "@instructure/ui-prop-types": "8.12.1-snapshot.7+1e7ac8219",
33
- "@instructure/ui-react-utils": "8.12.1-snapshot.7+1e7ac8219",
34
- "@instructure/ui-select": "8.12.1-snapshot.7+1e7ac8219",
35
- "@instructure/ui-test-locator": "8.12.1-snapshot.7+1e7ac8219",
36
- "@instructure/ui-testable": "8.12.1-snapshot.7+1e7ac8219",
37
- "@instructure/uid": "8.12.1-snapshot.7+1e7ac8219",
28
+ "@instructure/console": "8.13.0",
29
+ "@instructure/ui-form-field": "8.13.0",
30
+ "@instructure/ui-i18n": "8.13.0",
31
+ "@instructure/ui-position": "8.13.0",
32
+ "@instructure/ui-prop-types": "8.13.0",
33
+ "@instructure/ui-react-utils": "8.13.0",
34
+ "@instructure/ui-select": "8.13.0",
35
+ "@instructure/ui-test-locator": "8.13.0",
36
+ "@instructure/ui-testable": "8.13.0",
37
+ "@instructure/uid": "8.13.0",
38
38
  "prop-types": "^15"
39
39
  },
40
40
  "devDependencies": {
41
- "@instructure/ui-babel-preset": "8.12.1-snapshot.7+1e7ac8219",
42
- "@instructure/ui-test-utils": "8.12.1-snapshot.7+1e7ac8219",
41
+ "@instructure/ui-babel-preset": "8.13.0",
42
+ "@instructure/ui-test-utils": "8.13.0",
43
43
  "moment-timezone": "^0.5.33"
44
44
  },
45
45
  "peerDependencies": {
@@ -48,6 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "sideEffects": false,
52
- "gitHead": "1e7ac821932a91fe9ef761c96f747c7ea1f3925a"
51
+ "sideEffects": false
53
52
  }
@@ -153,7 +153,7 @@ const propTypes: PropValidators<PropKeys> = {
153
153
  * Displays messages and validation for the input. It should be an object
154
154
  * with the following shape:
155
155
  * `{
156
- * text: PropTypes.string,
156
+ * text: PropTypes.node,
157
157
  * type: PropTypes.oneOf(['error', 'hint', 'success', 'screenreader-only'])
158
158
  * }`
159
159
  */
@@ -36,7 +36,7 @@ declare class TimeSelect extends Component<TimeSelectProps, TimeSelectState> {
36
36
  width?: string | undefined;
37
37
  optionsMaxWidth?: string | undefined;
38
38
  visibleOptionsCount?: number | undefined;
39
- messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
39
+ messages?: import("@instructure/ui-form-field/types/FormPropTypes").FormMessage[] | undefined;
40
40
  placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
41
41
  constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
42
42
  onChange?: ((...args: any[]) => any) | undefined;
@@ -67,7 +67,7 @@ declare class TimeSelect extends Component<TimeSelectProps, TimeSelectState> {
67
67
  width?: string | undefined;
68
68
  optionsMaxWidth?: string | undefined;
69
69
  visibleOptionsCount?: number | undefined;
70
- messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
70
+ messages?: import("@instructure/ui-form-field/types/FormPropTypes").FormMessage[] | undefined;
71
71
  placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
72
72
  constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
73
73
  onChange?: ((...args: any[]) => any) | undefined;
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
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.