@instructure/ui-options 8.16.1-snapshot.2 → 8.17.1-snapshot.14

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.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
7
+
8
+ ### Bug Fixes
9
+
10
+ - remove type:"commonjs" from package.json files ([0b243be](https://github.com/instructure/instructure-ui/commit/0b243bee389ee14493e6b3dbb30a8b660c295d3d))
11
+
6
12
  # [8.16.0](https://github.com/instructure/instructure-ui/compare/v8.15.0...v8.16.0) (2022-02-03)
7
13
 
8
14
  **Note:** Version bump only for package @instructure/ui-options
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class, _class2, _temp;
1
+ var _dec, _dec2, _dec3, _class, _class2, _temp;
2
2
 
3
3
  /*
4
4
  * The MIT License (MIT)
@@ -26,9 +26,8 @@ var _dec, _dec2, _class, _class2, _temp;
26
26
 
27
27
  /** @jsx jsx */
28
28
  import React, { Component, Children } from 'react';
29
- import { omitProps, matchComponentTypes, callRenderProp, safeCloneElement } from '@instructure/ui-react-utils';
29
+ import { omitProps, matchComponentTypes, callRenderProp, safeCloneElement, withDeterministicId } from '@instructure/ui-react-utils';
30
30
  import { testable } from '@instructure/ui-testable';
31
- import { uid } from '@instructure/uid';
32
31
  import { View } from '@instructure/ui-view';
33
32
  import { withStyle, jsx } from '@instructure/emotion';
34
33
  import generateStyles from './styles';
@@ -43,7 +42,7 @@ category: components
43
42
  ---
44
43
  @tsProps
45
44
  **/
46
- let Options = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class Options extends Component {
45
+ let Options = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyles, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class Options extends Component {
47
46
  constructor() {
48
47
  super(...arguments);
49
48
  this.ref = null;
@@ -52,7 +51,7 @@ let Options = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 =
52
51
  this.ref = el;
53
52
  };
54
53
 
55
- this._labelId = uid('Options-label');
54
+ this._labelId = this.props.deterministicId('Options-label');
56
55
  }
57
56
 
58
57
  componentDidMount() {
@@ -146,6 +145,6 @@ let Options = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 =
146
145
  elementRef: () => {},
147
146
  renderLabel: null,
148
147
  children: null
149
- }, _class2.Item = Item, _class2.Separator = Separator, _temp)) || _class) || _class);
148
+ }, _class2.Item = Item, _class2.Separator = Separator, _temp)) || _class) || _class) || _class);
150
149
  export default Options;
151
150
  export { Options };
@@ -15,8 +15,6 @@ var _uiReactUtils = require("@instructure/ui-react-utils");
15
15
 
16
16
  var _uiTestable = require("@instructure/ui-testable");
17
17
 
18
- var _uid = require("@instructure/uid");
19
-
20
18
  var _uiView = require("@instructure/ui-view");
21
19
 
22
20
  var _emotion = require("@instructure/emotion");
@@ -31,7 +29,7 @@ var _Separator = require("./Separator");
31
29
 
32
30
  var _props = require("./props");
33
31
 
34
- var _dec, _dec2, _class, _class2, _temp;
32
+ var _dec, _dec2, _dec3, _class, _class2, _temp;
35
33
 
36
34
  /**
37
35
  ---
@@ -39,7 +37,7 @@ category: components
39
37
  ---
40
38
  @tsProps
41
39
  **/
42
- let Options = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class Options extends _react.Component {
40
+ let Options = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class Options extends _react.Component {
43
41
  constructor() {
44
42
  super(...arguments);
45
43
  this.ref = null;
@@ -48,7 +46,7 @@ let Options = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
48
46
  this.ref = el;
49
47
  };
50
48
 
51
- this._labelId = (0, _uid.uid)('Options-label');
49
+ this._labelId = this.props.deterministicId('Options-label');
52
50
  }
53
51
 
54
52
  componentDidMount() {
@@ -143,7 +141,7 @@ let Options = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
143
141
  elementRef: () => {},
144
142
  renderLabel: null,
145
143
  children: null
146
- }, _class2.Item = _Item.Item, _class2.Separator = _Separator.Separator, _temp)) || _class) || _class);
144
+ }, _class2.Item = _Item.Item, _class2.Separator = _Separator.Separator, _temp)) || _class) || _class) || _class);
147
145
  exports.Options = Options;
148
146
  var _default = Options;
149
147
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-options",
3
- "version": "8.16.1-snapshot.2+25359e770",
3
+ "version": "8.17.1-snapshot.14+f0b03679c",
4
4
  "description": "A view-only component for composing interactive lists and menus.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,22 +23,21 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.16.1-snapshot.2+25359e770",
27
- "@instructure/ui-color-utils": "8.16.1-snapshot.2+25359e770",
28
- "@instructure/ui-test-locator": "8.16.1-snapshot.2+25359e770",
29
- "@instructure/ui-test-utils": "8.16.1-snapshot.2+25359e770",
30
- "@instructure/ui-themes": "8.16.1-snapshot.2+25359e770"
26
+ "@instructure/ui-babel-preset": "8.17.1-snapshot.14+f0b03679c",
27
+ "@instructure/ui-color-utils": "8.17.1-snapshot.14+f0b03679c",
28
+ "@instructure/ui-test-locator": "8.17.1-snapshot.14+f0b03679c",
29
+ "@instructure/ui-test-utils": "8.17.1-snapshot.14+f0b03679c",
30
+ "@instructure/ui-themes": "8.17.1-snapshot.14+f0b03679c"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@instructure/emotion": "8.16.1-snapshot.2+25359e770",
35
- "@instructure/shared-types": "8.16.1-snapshot.2+25359e770",
36
- "@instructure/ui-icons": "8.16.1-snapshot.2+25359e770",
37
- "@instructure/ui-prop-types": "8.16.1-snapshot.2+25359e770",
38
- "@instructure/ui-react-utils": "8.16.1-snapshot.2+25359e770",
39
- "@instructure/ui-testable": "8.16.1-snapshot.2+25359e770",
40
- "@instructure/ui-view": "8.16.1-snapshot.2+25359e770",
41
- "@instructure/uid": "8.16.1-snapshot.2+25359e770",
34
+ "@instructure/emotion": "8.17.1-snapshot.14+f0b03679c",
35
+ "@instructure/shared-types": "8.17.1-snapshot.14+f0b03679c",
36
+ "@instructure/ui-icons": "8.17.1-snapshot.14+f0b03679c",
37
+ "@instructure/ui-prop-types": "8.17.1-snapshot.14+f0b03679c",
38
+ "@instructure/ui-react-utils": "8.17.1-snapshot.14+f0b03679c",
39
+ "@instructure/ui-testable": "8.17.1-snapshot.14+f0b03679c",
40
+ "@instructure/ui-view": "8.17.1-snapshot.14+f0b03679c",
42
41
  "prop-types": "^15"
43
42
  },
44
43
  "peerDependencies": {
@@ -48,5 +47,5 @@
48
47
  "access": "public"
49
48
  },
50
49
  "sideEffects": false,
51
- "gitHead": "25359e77043270cf26e92b14f396b498f1540c62"
50
+ "gitHead": "f0b03679c4c4d05d4d650d22646ac1dc6791e935"
52
51
  }
@@ -29,10 +29,10 @@ import {
29
29
  omitProps,
30
30
  matchComponentTypes,
31
31
  callRenderProp,
32
- safeCloneElement
32
+ safeCloneElement,
33
+ withDeterministicId
33
34
  } from '@instructure/ui-react-utils'
34
35
  import { testable } from '@instructure/ui-testable'
35
- import { uid } from '@instructure/uid'
36
36
 
37
37
  import { View } from '@instructure/ui-view'
38
38
 
@@ -60,6 +60,7 @@ category: components
60
60
  ---
61
61
  @tsProps
62
62
  **/
63
+ @withDeterministicId()
63
64
  @withStyle(generateStyles, generateComponentTheme)
64
65
  @testable()
65
66
  class Options extends Component<OptionsProps> {
@@ -92,8 +93,7 @@ class Options extends Component<OptionsProps> {
92
93
  componentDidUpdate() {
93
94
  this.props.makeStyles?.()
94
95
  }
95
-
96
- _labelId = uid('Options-label')
96
+ _labelId = this.props.deterministicId!('Options-label')
97
97
 
98
98
  get childAs() {
99
99
  const { as } = this.props
@@ -33,6 +33,7 @@ import type {
33
33
  OtherHTMLAttributes
34
34
  } from '@instructure/shared-types'
35
35
  import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
36
+ import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
36
37
 
37
38
  type OptionsOwnProps = {
38
39
  /**
@@ -62,7 +63,7 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
62
63
 
63
64
  type OptionsProps = OptionsOwnProps &
64
65
  WithStyleProps<OptionsTheme, OptionsStyle> &
65
- OtherHTMLAttributes<OptionsOwnProps>
66
+ OtherHTMLAttributes<OptionsOwnProps> & WithDeterministicIdProps
66
67
 
67
68
  type OptionsStyle = ComponentStyle<'options' | 'list' | 'label'>
68
69