@instructure/ui-tray 8.9.2-snapshot.4 → 8.10.1-snapshot.4

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,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.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-tray
9
+
6
10
  ## [8.9.1](https://github.com/instructure/instructure-ui/compare/v8.9.0...v8.9.1) (2021-09-16)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-tray
package/es/Tray/index.js CHANGED
@@ -175,7 +175,7 @@ let Tray = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = bid
175
175
  transitionOnMount: true,
176
176
  transitionEnter: true,
177
177
  transitionExit: true
178
- }, jsx("span", Object.assign({}, omitProps(props, Tray.propTypes), {
178
+ }, jsx("span", Object.assign({}, omitProps(props, Tray.allowedProps), {
179
179
  css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.tray,
180
180
  ref: contentRef
181
181
  }), this.state.transitioning ? children : jsx(Dialog, {
package/lib/Tray/index.js CHANGED
@@ -171,7 +171,7 @@ let Tray = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
171
171
  transitionOnMount: true,
172
172
  transitionEnter: true,
173
173
  transitionExit: true
174
- }, (0, _emotion.jsx)("span", Object.assign({}, (0, _omitProps.omitProps)(props, Tray.propTypes), {
174
+ }, (0, _emotion.jsx)("span", Object.assign({}, (0, _omitProps.omitProps)(props, Tray.allowedProps), {
175
175
  css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.tray,
176
176
  ref: contentRef
177
177
  }), this.state.transitioning ? children : (0, _emotion.jsx)(_Dialog.Dialog, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tray",
3
- "version": "8.9.2-snapshot.4+bf1e82efc",
3
+ "version": "8.10.1-snapshot.4+6c5c9e653",
4
4
  "description": "Tray component for secondary/menu content",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,25 +25,25 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.9.2-snapshot.4+bf1e82efc",
29
- "@instructure/emotion": "8.9.2-snapshot.4+bf1e82efc",
30
- "@instructure/shared-types": "8.9.2-snapshot.4+bf1e82efc",
31
- "@instructure/ui-dialog": "8.9.2-snapshot.4+bf1e82efc",
32
- "@instructure/ui-i18n": "8.9.2-snapshot.4+bf1e82efc",
33
- "@instructure/ui-motion": "8.9.2-snapshot.4+bf1e82efc",
34
- "@instructure/ui-portal": "8.9.2-snapshot.4+bf1e82efc",
35
- "@instructure/ui-position": "8.9.2-snapshot.4+bf1e82efc",
36
- "@instructure/ui-prop-types": "8.9.2-snapshot.4+bf1e82efc",
37
- "@instructure/ui-react-utils": "8.9.2-snapshot.4+bf1e82efc",
38
- "@instructure/ui-testable": "8.9.2-snapshot.4+bf1e82efc",
39
- "@instructure/ui-utils": "8.9.2-snapshot.4+bf1e82efc",
28
+ "@instructure/console": "8.10.1-snapshot.4+6c5c9e653",
29
+ "@instructure/emotion": "8.10.1-snapshot.4+6c5c9e653",
30
+ "@instructure/shared-types": "8.10.1-snapshot.4+6c5c9e653",
31
+ "@instructure/ui-dialog": "8.10.1-snapshot.4+6c5c9e653",
32
+ "@instructure/ui-i18n": "8.10.1-snapshot.4+6c5c9e653",
33
+ "@instructure/ui-motion": "8.10.1-snapshot.4+6c5c9e653",
34
+ "@instructure/ui-portal": "8.10.1-snapshot.4+6c5c9e653",
35
+ "@instructure/ui-position": "8.10.1-snapshot.4+6c5c9e653",
36
+ "@instructure/ui-prop-types": "8.10.1-snapshot.4+6c5c9e653",
37
+ "@instructure/ui-react-utils": "8.10.1-snapshot.4+6c5c9e653",
38
+ "@instructure/ui-testable": "8.10.1-snapshot.4+6c5c9e653",
39
+ "@instructure/ui-utils": "8.10.1-snapshot.4+6c5c9e653",
40
40
  "prop-types": "^15"
41
41
  },
42
42
  "devDependencies": {
43
- "@instructure/ui-babel-preset": "8.9.2-snapshot.4+bf1e82efc",
44
- "@instructure/ui-test-locator": "8.9.2-snapshot.4+bf1e82efc",
45
- "@instructure/ui-test-utils": "8.9.2-snapshot.4+bf1e82efc",
46
- "@instructure/ui-themes": "8.9.2-snapshot.4+bf1e82efc"
43
+ "@instructure/ui-babel-preset": "8.10.1-snapshot.4+6c5c9e653",
44
+ "@instructure/ui-test-locator": "8.10.1-snapshot.4+6c5c9e653",
45
+ "@instructure/ui-test-utils": "8.10.1-snapshot.4+6c5c9e653",
46
+ "@instructure/ui-themes": "8.10.1-snapshot.4+6c5c9e653"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": ">=16.8 <=17"
@@ -52,5 +52,5 @@
52
52
  "access": "public"
53
53
  },
54
54
  "sideEffects": false,
55
- "gitHead": "bf1e82efccb682510708448efd369eddaa24f74b"
55
+ "gitHead": "6c5c9e653f7ce3d239296f4ed19c5679fdddcd5b"
56
56
  }
@@ -211,7 +211,7 @@ class Tray extends Component<TrayProps> {
211
211
  transitionExit
212
212
  >
213
213
  <span
214
- {...omitProps(props, Tray.propTypes)}
214
+ {...omitProps(props, Tray.allowedProps)}
215
215
  css={this.props.styles?.tray}
216
216
  ref={contentRef}
217
217
  >
package/src/Tray/props.ts CHANGED
@@ -21,13 +21,14 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
+
24
25
  import React from 'react'
25
26
  import PropTypes from 'prop-types'
26
27
 
27
28
  import { element } from '@instructure/ui-prop-types'
28
29
 
29
- import type { WithStyleProps } from '@instructure/emotion'
30
- import type { PropValidators } from '@instructure/shared-types'
30
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
31
+ import type { PropValidators, TrayTheme } from '@instructure/shared-types'
31
32
  import type { BidirectionalProps } from '@instructure/ui-i18n'
32
33
 
33
34
  type TrayOwnProps = {
@@ -64,7 +65,12 @@ type TrayOwnProps = {
64
65
  type PropKeys = keyof TrayOwnProps
65
66
 
66
67
  type AllowedPropKeys = Readonly<Array<PropKeys>>
67
- type TrayProps = TrayOwnProps & BidirectionalProps & WithStyleProps
68
+
69
+ type TrayProps = TrayOwnProps &
70
+ BidirectionalProps &
71
+ WithStyleProps<TrayTheme, TrayStyle>
72
+
73
+ type TrayStyle = ComponentStyle<'tray' | 'content'>
68
74
 
69
75
  const propTypes: PropValidators<PropKeys> = {
70
76
  label: PropTypes.string.isRequired,
@@ -215,5 +221,5 @@ const allowedProps: AllowedPropKeys = [
215
221
  'shadow'
216
222
  ]
217
223
 
218
- export type { TrayProps }
224
+ export type { TrayProps, TrayStyle }
219
225
  export { propTypes, allowedProps }
@@ -22,8 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { TrayTheme } from '@instructure/shared-types'
26
- import { TrayProps } from './props'
25
+ import type { TrayTheme } from '@instructure/shared-types'
26
+ import type { TrayProps, TrayStyle } from './props'
27
27
 
28
28
  /**
29
29
  * ---
@@ -35,7 +35,10 @@ import { TrayProps } from './props'
35
35
  * @param {Object} state the state of the component, the style is applied to
36
36
  * @return {Object} The final style object, which will be used in the component
37
37
  */
38
- const generateStyle = (componentTheme: TrayTheme, props: TrayProps) => {
38
+ const generateStyle = (
39
+ componentTheme: TrayTheme,
40
+ props: TrayProps
41
+ ): TrayStyle => {
39
42
  const { border, shadow, size, placement } = props
40
43
 
41
44
  const borderStyle = {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { WithStyleProps } from '@instructure/emotion';
3
- import type { PropValidators } from '@instructure/shared-types';
2
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
3
+ import type { PropValidators, TrayTheme } from '@instructure/shared-types';
4
4
  import type { BidirectionalProps } from '@instructure/ui-i18n';
5
5
  declare type TrayOwnProps = {
6
6
  label: string;
@@ -31,9 +31,10 @@ declare type TrayOwnProps = {
31
31
  };
32
32
  declare type PropKeys = keyof TrayOwnProps;
33
33
  declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
34
- declare type TrayProps = TrayOwnProps & BidirectionalProps & WithStyleProps;
34
+ declare type TrayProps = TrayOwnProps & BidirectionalProps & WithStyleProps<TrayTheme, TrayStyle>;
35
+ declare type TrayStyle = ComponentStyle<'tray' | 'content'>;
35
36
  declare const propTypes: PropValidators<PropKeys>;
36
37
  declare const allowedProps: AllowedPropKeys;
37
- export type { TrayProps };
38
+ export type { TrayProps, TrayStyle };
38
39
  export { propTypes, allowedProps };
39
40
  //# sourceMappingURL=props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Tray/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,aAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;IAC3D,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IACzD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,mBAAmB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK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