@instructure/ui-color-picker 8.40.0 → 8.40.1

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,17 @@
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.40.1](https://github.com/instructure/instructure-ui/compare/v8.40.0...v8.40.1) (2023-08-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-color-picker:** add id as allowed prop for color-picker ([2ced2b2](https://github.com/instructure/instructure-ui/commit/2ced2b2b16e3996d67a4e957ff6e2ed02e3db669))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.40.0](https://github.com/instructure/instructure-ui/compare/v8.39.0...v8.40.0) (2023-08-17)
7
18
 
8
19
  ### Bug Fixes
@@ -382,11 +382,13 @@ let ColorPicker = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
382
382
  disabled = _this$props10.disabled,
383
383
  isRequired = _this$props10.isRequired,
384
384
  placeholderText = _this$props10.placeholderText,
385
- width = _this$props10.width;
385
+ width = _this$props10.width,
386
+ id = _this$props10.id;
386
387
  return jsx("div", Object.assign({}, omitProps(this.props, ColorPicker.allowedProps), {
387
388
  css: (_this$props$styles6 = this.props.styles) === null || _this$props$styles6 === void 0 ? void 0 : _this$props$styles6.colorPicker,
388
389
  ref: this.handleRef
389
390
  }), jsx(TextInput, {
391
+ id: id,
390
392
  isRequired: isRequired,
391
393
  disabled: disabled,
392
394
  renderLabel: () => this.renderLabel(),
@@ -74,9 +74,10 @@ const propTypes = {
74
74
  renderIsRequiredMessage: PropTypes.func,
75
75
  renderMessages: PropTypes.func,
76
76
  tooltip: PropTypes.node,
77
+ id: PropTypes.string,
77
78
  value: PropTypes.string,
78
79
  width: PropTypes.string,
79
80
  withAlpha: PropTypes.bool
80
81
  };
81
- const allowedProps = ['checkContrast', 'colorMixerSettings', 'children', 'disabled', 'elementRef', 'isRequired', 'label', 'onChange', 'placeholderText', 'popoverScreenReaderLabel', 'popoverButtonScreenReaderLabel', 'popoverMaxHeight', 'renderInvalidColorMessage', 'renderIsRequiredMessage', 'renderMessages', 'tooltip', 'value', 'width', 'withAlpha'];
82
+ const allowedProps = ['id', 'checkContrast', 'colorMixerSettings', 'children', 'disabled', 'elementRef', 'isRequired', 'label', 'onChange', 'placeholderText', 'popoverScreenReaderLabel', 'popoverButtonScreenReaderLabel', 'popoverMaxHeight', 'renderInvalidColorMessage', 'renderIsRequiredMessage', 'renderMessages', 'tooltip', 'value', 'width', 'withAlpha'];
82
83
  export { propTypes, allowedProps };
@@ -394,11 +394,13 @@ let ColorPicker = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
394
394
  disabled = _this$props10.disabled,
395
395
  isRequired = _this$props10.isRequired,
396
396
  placeholderText = _this$props10.placeholderText,
397
- width = _this$props10.width;
397
+ width = _this$props10.width,
398
+ id = _this$props10.id;
398
399
  return (0, _emotion.jsx)("div", Object.assign({}, (0, _omitProps.omitProps)(this.props, ColorPicker.allowedProps), {
399
400
  css: (_this$props$styles6 = this.props.styles) === null || _this$props$styles6 === void 0 ? void 0 : _this$props$styles6.colorPicker,
400
401
  ref: this.handleRef
401
402
  }), (0, _emotion.jsx)(_TextInput.TextInput, {
403
+ id: id,
402
404
  isRequired: isRequired,
403
405
  disabled: disabled,
404
406
  renderLabel: () => this.renderLabel(),
@@ -81,10 +81,11 @@ const propTypes = {
81
81
  renderIsRequiredMessage: _propTypes.default.func,
82
82
  renderMessages: _propTypes.default.func,
83
83
  tooltip: _propTypes.default.node,
84
+ id: _propTypes.default.string,
84
85
  value: _propTypes.default.string,
85
86
  width: _propTypes.default.string,
86
87
  withAlpha: _propTypes.default.bool
87
88
  };
88
89
  exports.propTypes = propTypes;
89
- const allowedProps = ['checkContrast', 'colorMixerSettings', 'children', 'disabled', 'elementRef', 'isRequired', 'label', 'onChange', 'placeholderText', 'popoverScreenReaderLabel', 'popoverButtonScreenReaderLabel', 'popoverMaxHeight', 'renderInvalidColorMessage', 'renderIsRequiredMessage', 'renderMessages', 'tooltip', 'value', 'width', 'withAlpha'];
90
+ const allowedProps = ['id', 'checkContrast', 'colorMixerSettings', 'children', 'disabled', 'elementRef', 'isRequired', 'label', 'onChange', 'placeholderText', 'popoverScreenReaderLabel', 'popoverButtonScreenReaderLabel', 'popoverMaxHeight', 'renderInvalidColorMessage', 'renderIsRequiredMessage', 'renderMessages', 'tooltip', 'value', 'width', 'withAlpha'];
90
91
  exports.allowedProps = allowedProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-color-picker",
3
- "version": "8.40.0",
3
+ "version": "8.40.1",
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",
@@ -24,33 +24,33 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.22.6",
27
- "@instructure/console": "8.40.0",
28
- "@instructure/emotion": "8.40.0",
29
- "@instructure/shared-types": "8.40.0",
30
- "@instructure/ui-a11y-content": "8.40.0",
31
- "@instructure/ui-buttons": "8.40.0",
32
- "@instructure/ui-color-utils": "8.40.0",
33
- "@instructure/ui-dom-utils": "8.40.0",
34
- "@instructure/ui-drilldown": "8.40.0",
35
- "@instructure/ui-form-field": "8.40.0",
36
- "@instructure/ui-icons": "8.40.0",
37
- "@instructure/ui-pill": "8.40.0",
38
- "@instructure/ui-popover": "8.40.0",
39
- "@instructure/ui-react-utils": "8.40.0",
40
- "@instructure/ui-testable": "8.40.0",
41
- "@instructure/ui-text": "8.40.0",
42
- "@instructure/ui-text-input": "8.40.0",
43
- "@instructure/ui-themes": "8.40.0",
44
- "@instructure/ui-tooltip": "8.40.0",
45
- "@instructure/ui-utils": "8.40.0",
46
- "@instructure/ui-view": "8.40.0",
27
+ "@instructure/console": "8.40.1",
28
+ "@instructure/emotion": "8.40.1",
29
+ "@instructure/shared-types": "8.40.1",
30
+ "@instructure/ui-a11y-content": "8.40.1",
31
+ "@instructure/ui-buttons": "8.40.1",
32
+ "@instructure/ui-color-utils": "8.40.1",
33
+ "@instructure/ui-dom-utils": "8.40.1",
34
+ "@instructure/ui-drilldown": "8.40.1",
35
+ "@instructure/ui-form-field": "8.40.1",
36
+ "@instructure/ui-icons": "8.40.1",
37
+ "@instructure/ui-pill": "8.40.1",
38
+ "@instructure/ui-popover": "8.40.1",
39
+ "@instructure/ui-react-utils": "8.40.1",
40
+ "@instructure/ui-testable": "8.40.1",
41
+ "@instructure/ui-text": "8.40.1",
42
+ "@instructure/ui-text-input": "8.40.1",
43
+ "@instructure/ui-themes": "8.40.1",
44
+ "@instructure/ui-tooltip": "8.40.1",
45
+ "@instructure/ui-utils": "8.40.1",
46
+ "@instructure/ui-view": "8.40.1",
47
47
  "prop-types": "^15.8.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@instructure/ui-babel-preset": "8.40.0",
51
- "@instructure/ui-test-locator": "8.40.0",
52
- "@instructure/ui-test-queries": "8.40.0",
53
- "@instructure/ui-test-utils": "8.40.0"
50
+ "@instructure/ui-babel-preset": "8.40.1",
51
+ "@instructure/ui-test-locator": "8.40.1",
52
+ "@instructure/ui-test-queries": "8.40.1",
53
+ "@instructure/ui-test-utils": "8.40.1"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": ">=16.8 <=18"
@@ -572,7 +572,7 @@ class ColorPicker extends Component<ColorPickerProps, ColorPickerState> {
572
572
  )
573
573
 
574
574
  render() {
575
- const { disabled, isRequired, placeholderText, width } = this.props
575
+ const { disabled, isRequired, placeholderText, width, id } = this.props
576
576
 
577
577
  return (
578
578
  <div
@@ -581,6 +581,7 @@ class ColorPicker extends Component<ColorPickerProps, ColorPickerState> {
581
581
  ref={this.handleRef}
582
582
  >
583
583
  <TextInput
584
+ id={id}
584
585
  isRequired={isRequired}
585
586
  disabled={disabled}
586
587
  renderLabel={() => this.renderLabel()}
@@ -199,6 +199,11 @@ type ColorPickerOwnProps = {
199
199
  */
200
200
  tooltip?: React.ReactNode
201
201
 
202
+ /**
203
+ * The id of the text input. One is generated if not supplied.
204
+ */
205
+ id?: string
206
+
202
207
  /**
203
208
  * If set, the component will behave as controlled
204
209
  */
@@ -299,12 +304,14 @@ const propTypes: PropValidators<PropKeys> = {
299
304
  renderIsRequiredMessage: PropTypes.func,
300
305
  renderMessages: PropTypes.func,
301
306
  tooltip: PropTypes.node,
307
+ id: PropTypes.string,
302
308
  value: PropTypes.string,
303
309
  width: PropTypes.string,
304
310
  withAlpha: PropTypes.bool
305
311
  }
306
312
 
307
313
  const allowedProps: AllowedPropKeys = [
314
+ 'id',
308
315
  'checkContrast',
309
316
  'colorMixerSettings',
310
317
  'children',