@instructure/ui-tooltip 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-tooltip
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-tooltip
@@ -87,16 +87,15 @@ let Tooltip = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
87
87
 
88
88
  if (as) {
89
89
  const Trigger = getElementType(Tooltip, this.props);
90
- const props = omitProps(this.props, Tooltip.propTypes);
90
+ const props = omitProps(this.props, Tooltip.allowedProps);
91
91
  return jsx(Trigger, Object.assign({}, props, triggerProps), children);
92
92
  } else if (typeof children === 'function') {
93
+ // TODO: try to remove cast when typing Tooltip (React children types are badly calculated)
93
94
  return children({
94
95
  focused: hasFocus,
95
- getTriggerProps: props => {
96
- return { ...triggerProps,
97
- ...props
98
- };
99
- }
96
+ getTriggerProps: props => ({ ...triggerProps,
97
+ ...props
98
+ })
100
99
  });
101
100
  } else {
102
101
  return ensureSingleChild(this.props.children, triggerProps);
@@ -88,16 +88,15 @@ let Tooltip = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
88
88
 
89
89
  if (as) {
90
90
  const Trigger = (0, _getElementType.getElementType)(Tooltip, this.props);
91
- const props = (0, _omitProps.omitProps)(this.props, Tooltip.propTypes);
91
+ const props = (0, _omitProps.omitProps)(this.props, Tooltip.allowedProps);
92
92
  return (0, _emotion.jsx)(Trigger, Object.assign({}, props, triggerProps), children);
93
93
  } else if (typeof children === 'function') {
94
+ // TODO: try to remove cast when typing Tooltip (React children types are badly calculated)
94
95
  return children({
95
96
  focused: hasFocus,
96
- getTriggerProps: props => {
97
- return { ...triggerProps,
98
- ...props
99
- };
100
- }
97
+ getTriggerProps: props => ({ ...triggerProps,
98
+ ...props
99
+ })
101
100
  });
102
101
  } else {
103
102
  return (0, _ensureSingleChild.ensureSingleChild)(this.props.children, triggerProps);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tooltip",
3
- "version": "8.9.2-snapshot.4+bf1e82efc",
3
+ "version": "8.10.1-snapshot.4+6c5c9e653",
4
4
  "description": "A component for showing small text-only overlays on hover/focus.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,23 +25,23 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/emotion": "8.9.2-snapshot.4+bf1e82efc",
29
- "@instructure/shared-types": "8.9.2-snapshot.4+bf1e82efc",
30
- "@instructure/ui-popover": "8.9.2-snapshot.4+bf1e82efc",
31
- "@instructure/ui-position": "8.9.2-snapshot.4+bf1e82efc",
32
- "@instructure/ui-prop-types": "8.9.2-snapshot.4+bf1e82efc",
33
- "@instructure/ui-react-utils": "8.9.2-snapshot.4+bf1e82efc",
34
- "@instructure/ui-testable": "8.9.2-snapshot.4+bf1e82efc",
35
- "@instructure/uid": "8.9.2-snapshot.4+bf1e82efc",
28
+ "@instructure/emotion": "8.10.1-snapshot.4+6c5c9e653",
29
+ "@instructure/shared-types": "8.10.1-snapshot.4+6c5c9e653",
30
+ "@instructure/ui-popover": "8.10.1-snapshot.4+6c5c9e653",
31
+ "@instructure/ui-position": "8.10.1-snapshot.4+6c5c9e653",
32
+ "@instructure/ui-prop-types": "8.10.1-snapshot.4+6c5c9e653",
33
+ "@instructure/ui-react-utils": "8.10.1-snapshot.4+6c5c9e653",
34
+ "@instructure/ui-testable": "8.10.1-snapshot.4+6c5c9e653",
35
+ "@instructure/uid": "8.10.1-snapshot.4+6c5c9e653",
36
36
  "prop-types": "^15"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-babel-preset": "8.9.2-snapshot.4+bf1e82efc",
40
- "@instructure/ui-color-utils": "8.9.2-snapshot.4+bf1e82efc",
41
- "@instructure/ui-test-locator": "8.9.2-snapshot.4+bf1e82efc",
42
- "@instructure/ui-test-queries": "8.9.2-snapshot.4+bf1e82efc",
43
- "@instructure/ui-test-utils": "8.9.2-snapshot.4+bf1e82efc",
44
- "@instructure/ui-themes": "8.9.2-snapshot.4+bf1e82efc"
39
+ "@instructure/ui-babel-preset": "8.10.1-snapshot.4+6c5c9e653",
40
+ "@instructure/ui-color-utils": "8.10.1-snapshot.4+6c5c9e653",
41
+ "@instructure/ui-test-locator": "8.10.1-snapshot.4+6c5c9e653",
42
+ "@instructure/ui-test-queries": "8.10.1-snapshot.4+6c5c9e653",
43
+ "@instructure/ui-test-utils": "8.10.1-snapshot.4+6c5c9e653",
44
+ "@instructure/ui-themes": "8.10.1-snapshot.4+6c5c9e653"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=16.8 <=17"
@@ -50,5 +50,5 @@
50
50
  "access": "public"
51
51
  },
52
52
  "sideEffects": false,
53
- "gitHead": "bf1e82efccb682510708448efd369eddaa24f74b"
53
+ "gitHead": "6c5c9e653f7ce3d239296f4ed19c5679fdddcd5b"
54
54
  }
@@ -39,7 +39,8 @@ import { withStyle, jsx } from '@instructure/emotion'
39
39
 
40
40
  import generateStyle from './styles'
41
41
  import generateComponentTheme from './theme'
42
- import type { TooltipProps } from './props'
42
+
43
+ import type { TooltipProps, TooltipRenderChildren } from './props'
43
44
  import { allowedProps, propTypes } from './props'
44
45
 
45
46
  /**
@@ -100,23 +101,20 @@ class Tooltip extends Component<TooltipProps> {
100
101
 
101
102
  if (as) {
102
103
  const Trigger = getElementType(Tooltip, this.props)
103
- const props = omitProps(this.props, Tooltip.propTypes)
104
+ const props = omitProps(this.props, Tooltip.allowedProps)
104
105
  return (
105
106
  <Trigger {...props} {...triggerProps}>
106
107
  {children}
107
108
  </Trigger>
108
109
  )
109
110
  } else if (typeof children === 'function') {
110
- // @ts-expect-error FIXME: React children types are badly calculated
111
- return children({
111
+ // TODO: try to remove cast when typing Tooltip (React children types are badly calculated)
112
+ return (children as TooltipRenderChildren)({
112
113
  focused: hasFocus,
113
- // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type.
114
- getTriggerProps: (props) => {
115
- return {
116
- ...triggerProps,
117
- ...props
118
- }
119
- }
114
+ getTriggerProps: (props) => ({
115
+ ...triggerProps,
116
+ ...props
117
+ })
120
118
  })
121
119
  } else {
122
120
  return ensureSingleChild(this.props.children, triggerProps)
@@ -21,22 +21,39 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
+
25
+ import React from 'react'
24
26
  import PropTypes from 'prop-types'
27
+
25
28
  import { PositionPropTypes } from '@instructure/ui-position'
26
29
  import { element } from '@instructure/ui-prop-types'
27
30
 
28
- import type { PropValidators, AsElementType } from '@instructure/shared-types'
31
+ import type {
32
+ PropValidators,
33
+ AsElementType,
34
+ TooltipTheme
35
+ } from '@instructure/shared-types'
29
36
  import type {
30
37
  PlacementPropValues,
31
38
  PositionConstraint,
32
39
  PositionMountNode
33
40
  } from '@instructure/ui-position'
34
- import React from 'react'
35
- import type { WithStyleProps } from '@instructure/emotion'
41
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
42
+
43
+ type TooltipRenderChildrenArgs = {
44
+ focused: boolean
45
+ getTriggerProps: <P extends Record<string, any>>(
46
+ props: P
47
+ ) => { 'aria-describedby': string } & P
48
+ }
49
+
50
+ type TooltipRenderChildren = (
51
+ args: TooltipRenderChildrenArgs
52
+ ) => React.ReactNode
36
53
 
37
54
  type TooltipOwnProps = {
38
55
  renderTip: React.ReactNode | ((...args: any[]) => any)
39
- children: React.ReactNode | ((...args: any[]) => React.ReactNode)
56
+ children: React.ReactNode | TooltipRenderChildren
40
57
  isShowingContent?: boolean
41
58
  defaultIsShowingContent?: boolean
42
59
  as?: AsElementType
@@ -56,7 +73,9 @@ type PropKeys = keyof TooltipOwnProps
56
73
 
57
74
  type AllowedPropKeys = Readonly<Array<PropKeys>>
58
75
 
59
- type TooltipProps = TooltipOwnProps & WithStyleProps
76
+ type TooltipProps = TooltipOwnProps & WithStyleProps<TooltipTheme, TooltipStyle>
77
+
78
+ type TooltipStyle = ComponentStyle<'tooltip'>
60
79
 
61
80
  const propTypes: PropValidators<PropKeys> = {
62
81
  /**
@@ -152,5 +171,10 @@ const allowedProps: AllowedPropKeys = [
152
171
  'onHideContent'
153
172
  ]
154
173
 
155
- export type { TooltipProps }
174
+ export type {
175
+ TooltipProps,
176
+ TooltipStyle,
177
+ TooltipRenderChildren,
178
+ TooltipRenderChildrenArgs
179
+ }
156
180
  export { propTypes, allowedProps }
@@ -22,7 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { TooltipTheme } from '@instructure/shared-types'
25
+ import type { TooltipTheme } from '@instructure/shared-types'
26
+ import type { TooltipStyle } from './props'
26
27
 
27
28
  /**
28
29
  * ---
@@ -34,7 +35,7 @@ import { TooltipTheme } from '@instructure/shared-types'
34
35
  * @param {Object} state the state of the component, the style is applied to
35
36
  * @return {Object} The final style object, which will be used in the component
36
37
  */
37
- const generateStyle = (componentTheme: TooltipTheme) => {
38
+ const generateStyle = (componentTheme: TooltipTheme): TooltipStyle => {
38
39
  return {
39
40
  tooltip: {
40
41
  label: 'tooltip',
package/src/index.ts CHANGED
@@ -22,4 +22,4 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  export { Tooltip } from './Tooltip'
25
- export type { TooltipProps } from './Tooltip/props'
25
+ export type { TooltipProps, TooltipRenderChildrenArgs } from './Tooltip/props'
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
3
  import { jsx } from '@instructure/emotion';
4
- import type { TooltipProps } from './props';
4
+ import type { TooltipProps, TooltipRenderChildren } from './props';
5
5
  /**
6
6
  ---
7
7
  category: components
@@ -11,7 +11,7 @@ declare class Tooltip extends Component<TooltipProps> {
11
11
  static readonly componentId = "Tooltip";
12
12
  static allowedProps: readonly (keyof {
13
13
  renderTip: import("react").ReactNode | ((...args: any[]) => any);
14
- children: import("react").ReactNode | ((...args: any[]) => import("react").ReactNode);
14
+ children: import("react").ReactNode | TooltipRenderChildren;
15
15
  isShowingContent?: boolean | undefined;
16
16
  defaultIsShowingContent?: boolean | undefined;
17
17
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
@@ -28,7 +28,7 @@ declare class Tooltip extends Component<TooltipProps> {
28
28
  })[];
29
29
  static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
30
30
  renderTip: import("react").ReactNode | ((...args: any[]) => any);
31
- children: import("react").ReactNode | ((...args: any[]) => import("react").ReactNode);
31
+ children: import("react").ReactNode | TooltipRenderChildren;
32
32
  isShowingContent?: boolean | undefined;
33
33
  defaultIsShowingContent?: boolean | undefined;
34
34
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
@@ -64,7 +64,7 @@ declare class Tooltip extends Component<TooltipProps> {
64
64
  componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
65
65
  handleFocus: (event: any) => void;
66
66
  handleBlur: (event: any) => void;
67
- renderTrigger(): any;
67
+ renderTrigger(): import("react").ReactNode;
68
68
  render(): jsx.JSX.Element;
69
69
  }
70
70
  export default Tooltip;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Tooltip/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB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D,UAAU,uBAET;IAED,aAAa;IA6Bb,MAAM;CA+CP;AAED,eAAe,OAAO,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -1,10 +1,17 @@
1
- import type { PropValidators, AsElementType } from '@instructure/shared-types';
2
- import type { PlacementPropValues, PositionConstraint, PositionMountNode } from '@instructure/ui-position';
3
1
  import React from 'react';
4
- import type { WithStyleProps } from '@instructure/emotion';
2
+ import type { PropValidators, AsElementType, TooltipTheme } from '@instructure/shared-types';
3
+ import type { PlacementPropValues, PositionConstraint, PositionMountNode } from '@instructure/ui-position';
4
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
5
+ declare type TooltipRenderChildrenArgs = {
6
+ focused: boolean;
7
+ getTriggerProps: <P extends Record<string, any>>(props: P) => {
8
+ 'aria-describedby': string;
9
+ } & P;
10
+ };
11
+ declare type TooltipRenderChildren = (args: TooltipRenderChildrenArgs) => React.ReactNode;
5
12
  declare type TooltipOwnProps = {
6
13
  renderTip: React.ReactNode | ((...args: any[]) => any);
7
- children: React.ReactNode | ((...args: any[]) => React.ReactNode);
14
+ children: React.ReactNode | TooltipRenderChildren;
8
15
  isShowingContent?: boolean;
9
16
  defaultIsShowingContent?: boolean;
10
17
  as?: AsElementType;
@@ -21,9 +28,10 @@ declare type TooltipOwnProps = {
21
28
  };
22
29
  declare type PropKeys = keyof TooltipOwnProps;
23
30
  declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
24
- declare type TooltipProps = TooltipOwnProps & WithStyleProps;
31
+ declare type TooltipProps = TooltipOwnProps & WithStyleProps<TooltipTheme, TooltipStyle>;
32
+ declare type TooltipStyle = ComponentStyle<'tooltip'>;
25
33
  declare const propTypes: PropValidators<PropKeys>;
26
34
  declare const allowedProps: AllowedPropKeys;
27
- export type { TooltipProps };
35
+ export type { TooltipProps, TooltipStyle, TooltipRenderChildren, TooltipRenderChildrenArgs };
28
36
  export { propTypes, allowedProps };
29
37
  //# sourceMappingURL=props.d.ts.map
@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,EAAE,CAAA"}
@@ -1,4 +1,5 @@
1
- import { TooltipTheme } from '@instructure/shared-types';
1
+ import type { TooltipTheme } from '@instructure/shared-types';
2
+ import type { TooltipStyle } from './props';
2
3
  /**
3
4
  * ---
4
5
  * private: true
@@ -9,16 +10,6 @@ import { TooltipTheme } from '@instructure/shared-types';
9
10
  * @param {Object} state the state of the component, the style is applied to
10
11
  * @return {Object} The final style object, which will be used in the component
11
12
  */
12
- declare const generateStyle: (componentTheme: TooltipTheme) => {
13
- tooltip: {
14
- label: string;
15
- fontFamily: string;
16
- fontWeight: number;
17
- boxSizing: string;
18
- display: string;
19
- fontSize: string | 0;
20
- padding: string | 0;
21
- };
22
- };
13
+ declare const generateStyle: (componentTheme: TooltipTheme) => TooltipStyle;
23
14
  export default generateStyle;
24
15
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Tooltip/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBAAoB,YAAY;;;;;;;;;;CAYlD,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Tooltip/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBAAoB,YAAY,KAAG,YAYrD,CAAA;AAED,eAAe,aAAa,CAAA"}
package/types/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { Tooltip } from './Tooltip';
2
- export type { TooltipProps } from './Tooltip/props';
2
+ export type { TooltipProps, TooltipRenderChildrenArgs } from './Tooltip/props';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,YAAY,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAA"}