@instructure/ui-text 8.10.1 → 8.10.3-snapshot.3

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.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-text
9
+
6
10
  ## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-text
package/LICENSE.md ADDED
@@ -0,0 +1,27 @@
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.
package/es/Text/index.js CHANGED
@@ -56,13 +56,11 @@ let Text = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
56
56
 
57
57
  const children = this.props.children;
58
58
  const ElementType = getElementType(Text, this.props);
59
- return (// @ts-expect-error TODO: AsElementType is not compatible for ref
60
- jsx(ElementType // @ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
61
- , Object.assign({}, passthroughProps(this.props), {
62
- css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.text,
63
- ref: this.props.elementRef
64
- }), children)
65
- );
59
+ return jsx(ElementType // @ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
60
+ , Object.assign({}, passthroughProps(this.props), {
61
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.text,
62
+ ref: this.props.elementRef
63
+ }), children);
66
64
  }
67
65
 
68
66
  }, _class2.displayName = "Text", _class2.componentId = 'Text', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
package/lib/Text/index.js CHANGED
@@ -47,13 +47,11 @@ let Text = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
47
47
 
48
48
  const children = this.props.children;
49
49
  const ElementType = (0, _getElementType.getElementType)(Text, this.props);
50
- return (// @ts-expect-error TODO: AsElementType is not compatible for ref
51
- (0, _emotion.jsx)(ElementType // @ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
52
- , Object.assign({}, (0, _passthroughProps.passthroughProps)(this.props), {
53
- css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.text,
54
- ref: this.props.elementRef
55
- }), children)
56
- );
50
+ return (0, _emotion.jsx)(ElementType // @ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
51
+ , Object.assign({}, (0, _passthroughProps.passthroughProps)(this.props), {
52
+ css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.text,
53
+ ref: this.props.elementRef
54
+ }), children);
57
55
  }
58
56
 
59
57
  }, _class2.displayName = "Text", _class2.componentId = 'Text', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-text",
3
- "version": "8.10.1",
3
+ "version": "8.10.3-snapshot.3+2ee813492",
4
4
  "description": "A component for styling textual content",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,16 +25,16 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.10.1",
29
- "@instructure/emotion": "8.10.1",
30
- "@instructure/shared-types": "8.10.1",
31
- "@instructure/ui-react-utils": "8.10.1",
28
+ "@instructure/console": "8.10.3-snapshot.3+2ee813492",
29
+ "@instructure/emotion": "8.10.3-snapshot.3+2ee813492",
30
+ "@instructure/shared-types": "8.10.3-snapshot.3+2ee813492",
31
+ "@instructure/ui-react-utils": "8.10.3-snapshot.3+2ee813492",
32
32
  "prop-types": "^15"
33
33
  },
34
34
  "devDependencies": {
35
- "@instructure/ui-babel-preset": "8.10.1",
36
- "@instructure/ui-test-utils": "8.10.1",
37
- "@instructure/ui-themes": "8.10.1"
35
+ "@instructure/ui-babel-preset": "8.10.3-snapshot.3+2ee813492",
36
+ "@instructure/ui-test-utils": "8.10.3-snapshot.3+2ee813492",
37
+ "@instructure/ui-themes": "8.10.3-snapshot.3+2ee813492"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=16.8 <=17"
@@ -42,5 +42,6 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "sideEffects": false
45
+ "sideEffects": false,
46
+ "gitHead": "2ee8134925b02efbc5d39662a8b1edb2c83a420d"
46
47
  }
@@ -68,7 +68,6 @@ class Text extends Component<TextProps> {
68
68
  const ElementType = getElementType(Text, this.props)
69
69
 
70
70
  return (
71
- // @ts-expect-error TODO: AsElementType is not compatible for ref
72
71
  <ElementType
73
72
  // @ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
74
73
  {...passthroughProps(this.props)}
package/src/Text/props.ts CHANGED
@@ -53,7 +53,7 @@ type TextOwnProps = {
53
53
  /**
54
54
  * Provides a reference to the underlying HTML element
55
55
  */
56
- elementRef?: (element: HTMLElement | null) => void
56
+ elementRef?: (element: Element | null) => void
57
57
  fontStyle?: 'italic' | 'normal'
58
58
  letterSpacing?: 'normal' | 'condensed' | 'expanded'
59
59
  lineHeight?: 'default' | 'fit' | 'condensed' | 'double'
@@ -13,7 +13,7 @@ declare class Text extends Component<TextProps> {
13
13
  static allowedProps: readonly (keyof {
14
14
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
15
15
  color?: "primary" | "secondary" | "brand" | "success" | "warning" | "danger" | "alert" | "primary-inverse" | "secondary-inverse" | undefined;
16
- elementRef?: ((element: HTMLElement | null) => void) | undefined;
16
+ elementRef?: ((element: Element | null) => void) | undefined;
17
17
  fontStyle?: "italic" | "normal" | undefined;
18
18
  letterSpacing?: "normal" | "condensed" | "expanded" | undefined;
19
19
  lineHeight?: "condensed" | "default" | "fit" | "double" | undefined;
@@ -26,7 +26,7 @@ declare class Text extends Component<TextProps> {
26
26
  static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
27
27
  as?: import("@instructure/shared-types/types/CommonProps").AsElementType | undefined;
28
28
  color?: "primary" | "secondary" | "brand" | "success" | "warning" | "danger" | "alert" | "primary-inverse" | "secondary-inverse" | undefined;
29
- elementRef?: ((element: HTMLElement | null) => void) | undefined;
29
+ elementRef?: ((element: Element | null) => void) | undefined;
30
30
  fontStyle?: "italic" | "normal" | undefined;
31
31
  letterSpacing?: "normal" | "condensed" | "expanded" | undefined;
32
32
  lineHeight?: "condensed" | "default" | "fit" | "double" | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Text/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGxC;;;;;GAKG;AACH,cACM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;IAEpC,MAAM,CAAC,YAAY;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;MAMT;IAEV,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAiBP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Text/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGxC;;;;;GAKG;AACH,cACM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,QAAQ,CAAC,WAAW,UAAS;IAEpC,MAAM,CAAC,YAAY;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;MAMT;IAEV,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAgBP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -13,7 +13,7 @@ declare type TextOwnProps = {
13
13
  /**
14
14
  * Provides a reference to the underlying HTML element
15
15
  */
16
- elementRef?: (element: HTMLElement | null) => void;
16
+ elementRef?: (element: Element | null) => void;
17
17
  fontStyle?: 'italic' | 'normal';
18
18
  letterSpacing?: 'normal' | 'condensed' | 'expanded';
19
19
  lineHeight?: 'default' | 'fit' | 'condensed' | 'double';
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Text/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,aAAK,YAAY,GAAG;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EACF,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,GACT,SAAS,GACT,QAAQ,GACR,OAAO,GACP,iBAAiB,GACjB,mBAAmB,CAAA;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAClD,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC/B,aAAa,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAA;IACnD,UAAU,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,WAAW,GAAG,QAAQ,CAAA;IACvD,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAA;IACxE,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,CAAA;IAC7D,MAAM,CAAC,EAAE,QAAQ,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