@instructure/ui-text 7.12.0 → 7.15.0
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 +18 -0
- package/es/Text/index.js +38 -38
- package/es/Text/theme.js +2 -1
- package/lib/Text/index.js +38 -38
- package/lib/Text/theme.js +2 -1
- package/package.json +6 -6
- package/src/Text/README.md +2 -2
- package/src/Text/index.js +3 -3
- package/src/Text/styles.css +1 -0
- package/src/Text/theme.js +1 -1
- package/types/index.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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
|
+
# [7.15.0](https://github.com/instructure/instructure-ui/compare/v7.14.1...v7.15.0) (2022-02-03)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **ui-text:** deprecate the `warning` color variant for Text ([e1093ab](https://github.com/instructure/instructure-ui/commit/e1093ab)), backports [#856](https://github.com/instructure/instructure-ui/issues/856)
|
|
11
|
+
|
|
12
|
+
## [7.14.1](https://github.com/instructure/instructure-ui/compare/v7.14.0...v7.14.1) (2021-12-06)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @instructure/ui-text
|
|
15
|
+
|
|
16
|
+
# [7.14.0](https://github.com/instructure/instructure-ui/compare/v7.13.0...v7.14.0) (2021-12-01)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @instructure/ui-text
|
|
19
|
+
|
|
20
|
+
# [7.13.0](https://github.com/instructure/instructure-ui/compare/v7.12.0...v7.13.0) (2021-11-18)
|
|
21
|
+
|
|
22
|
+
**Note:** Version bump only for package @instructure/ui-text
|
|
23
|
+
|
|
6
24
|
# [7.12.0](https://github.com/instructure/instructure-ui/compare/v7.11.0...v7.12.0) (2021-10-15)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @instructure/ui-text
|
package/es/Text/index.js
CHANGED
|
@@ -36,44 +36,44 @@ import classnames from 'classnames';
|
|
|
36
36
|
import { themeable } from '@instructure/ui-themeable';
|
|
37
37
|
import { passthroughProps, getElementType, deprecated } from '@instructure/ui-react-utils';
|
|
38
38
|
var styles = {
|
|
39
|
-
componentId: '
|
|
39
|
+
componentId: 'bEQNl',
|
|
40
40
|
template: function template(theme) {
|
|
41
|
-
return "\n\n.
|
|
41
|
+
return "\n\n.bEQNl_bGBk{font-family:".concat(theme.fontFamily || 'inherit', "}\n\n.bEQNl_bGBk sub,.bEQNl_bGBk sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}\n\n.bEQNl_bGBk sup{top:-0.4em}\n\n.bEQNl_bGBk sub{bottom:-0.4em}\n\n.bEQNl_bGBk code,.bEQNl_bGBk pre{all:initial;animation:none 0s ease 0s 1 normal none running;backface-visibility:visible;background:transparent none repeat 0 0/auto auto padding-box border-box scroll;border:medium none currentColor;border-collapse:separate;border-image:none;border-radius:0;border-spacing:0;bottom:auto;box-shadow:none;box-sizing:content-box;caption-side:top;clear:none;clip:auto;color:#000;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-span:1;column-width:auto;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:serif;font-family:").concat(theme.fontFamilyMonospace || 'inherit', ";font-size:medium;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:disc outside none;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:50% 50% 0;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:2;width:auto;word-spacing:normal;z-index:auto}\n\n.bEQNl_bGBk em,.bEQNl_bGBk i{font-style:italic}\n\n.bEQNl_bGBk b,.bEQNl_bGBk strong{font-weight:").concat(theme.fontWeightBold || 'inherit', "}\n\n.bEQNl_bGBk p{display:block;margin:").concat(theme.paragraphMargin || 'inherit', ";padding:0}\n\ninput.bEQNl_bGBk[type]{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:none;border:none;border-radius:0;box-shadow:none;box-sizing:border-box;color:inherit;display:block;height:auto;line-height:inherit;margin:0;outline:0;padding:0;text-align:start;width:100%}\n\n[dir=ltr] input.bEQNl_bGBk[type]{text-align:left}\n\n[dir=rtl] input.bEQNl_bGBk[type]{text-align:right}\n\n.bEQNl_bGBk:focus,input.bEQNl_bGBk[type]:focus{outline:none}\n\n.bEQNl_bGBk.bEQNl_qFsi,input.bEQNl_bGBk[type].bEQNl_qFsi{color:").concat(theme.primaryColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bLsb,input.bEQNl_bGBk[type].bEQNl_bLsb{color:").concat(theme.secondaryColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_ezBQ,input.bEQNl_bGBk[type].bEQNl_ezBQ{color:").concat(theme.primaryInverseColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_dlnd,input.bEQNl_bGBk[type].bEQNl_dlnd{color:").concat(theme.secondaryInverseColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_cJLh,input.bEQNl_bGBk[type].bEQNl_cJLh{color:").concat(theme.successColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fpfC,input.bEQNl_bGBk[type].bEQNl_fpfC{color:").concat(theme.brandColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eHcp,input.bEQNl_bGBk[type].bEQNl_eHcp{color:").concat(theme.warningColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_dwua,input.bEQNl_bGBk[type].bEQNl_dwua{color:").concat(theme.errorColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_NQMb,input.bEQNl_bGBk[type].bEQNl_NQMb{color:").concat(theme.dangerColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eZgl,input.bEQNl_bGBk[type].bEQNl_eZgl{color:").concat(theme.alertColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fbNi,input.bEQNl_bGBk[type].bEQNl_fbNi{-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;word-break:break-word}\n\n.bEQNl_bGBk.bEQNl_drST,input.bEQNl_bGBk[type].bEQNl_drST{font-weight:").concat(theme.fontWeightNormal || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_pEgL,input.bEQNl_bGBk[type].bEQNl_pEgL{font-weight:").concat(theme.fontWeightLight || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bdMA,input.bEQNl_bGBk[type].bEQNl_bdMA{font-weight:").concat(theme.fontWeightBold || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_ijuF,input.bEQNl_bGBk[type].bEQNl_ijuF{font-style:normal}\n\n.bEQNl_bGBk.bEQNl_fetN,input.bEQNl_bGBk[type].bEQNl_fetN{font-style:italic}\n\n.bEQNl_bGBk.bEQNl_dfBC,input.bEQNl_bGBk[type].bEQNl_dfBC{font-size:").concat(theme.fontSizeXSmall || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_doqw,input.bEQNl_bGBk[type].bEQNl_doqw{font-size:").concat(theme.fontSizeSmall || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_ycrn,input.bEQNl_bGBk[type].bEQNl_ycrn{font-size:").concat(theme.fontSizeMedium || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_cMDj,input.bEQNl_bGBk[type].bEQNl_cMDj{font-size:").concat(theme.fontSizeLarge || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eoMd,input.bEQNl_bGBk[type].bEQNl_eoMd{font-size:").concat(theme.fontSizeXLarge || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fdca,input.bEQNl_bGBk[type].bEQNl_fdca{font-size:").concat(theme.fontSizeXXLarge || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fEWX,input.bEQNl_bGBk[type].bEQNl_fEWX{line-height:").concat(theme.lineHeight || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fNIu,input.bEQNl_bGBk[type].bEQNl_fNIu{line-height:").concat(theme.lineHeightFit || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_dfDs,input.bEQNl_bGBk[type].bEQNl_dfDs{line-height:").concat(theme.lineHeightCondensed || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bDjL,input.bEQNl_bGBk[type].bEQNl_bDjL{line-height:").concat(theme.lineHeightDouble || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eQnG,input.bEQNl_bGBk[type].bEQNl_eQnG{letter-spacing:").concat(theme.letterSpacingNormal || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bbUA,input.bEQNl_bGBk[type].bEQNl_bbUA{letter-spacing:").concat(theme.letterSpacingCondensed || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bRWU,input.bEQNl_bGBk[type].bEQNl_bRWU{letter-spacing:").concat(theme.letterSpacingExpanded || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_wZsr,input.bEQNl_bGBk[type].bEQNl_wZsr{text-transform:none}\n\n.bEQNl_bGBk.bEQNl_fCZK,input.bEQNl_bGBk[type].bEQNl_fCZK{text-transform:capitalize}\n\n.bEQNl_bGBk.bEQNl_dsRi,input.bEQNl_bGBk[type].bEQNl_dsRi{text-transform:uppercase}\n\n.bEQNl_bGBk.bEQNl_bLtD,input.bEQNl_bGBk[type].bEQNl_bLtD{text-transform:lowercase}");
|
|
42
42
|
},
|
|
43
|
-
'root': '
|
|
44
|
-
'color-primary': '
|
|
45
|
-
'color-secondary': '
|
|
46
|
-
'color-primary-inverse': '
|
|
47
|
-
'color-secondary-inverse': '
|
|
48
|
-
'color-success': '
|
|
49
|
-
'color-brand': '
|
|
50
|
-
'color-warning': '
|
|
51
|
-
'color-error': '
|
|
52
|
-
'color-danger': '
|
|
53
|
-
'color-alert': '
|
|
54
|
-
'wrap-break-word': '
|
|
55
|
-
'weight-normal': '
|
|
56
|
-
'weight-light': '
|
|
57
|
-
'weight-bold': '
|
|
58
|
-
'style-normal': '
|
|
59
|
-
'style-italic': '
|
|
60
|
-
'x-small': '
|
|
61
|
-
'small': '
|
|
62
|
-
'medium': '
|
|
63
|
-
'large': '
|
|
64
|
-
'x-large': '
|
|
65
|
-
'xx-large': '
|
|
66
|
-
'lineHeight-default': '
|
|
67
|
-
'lineHeight-fit': '
|
|
68
|
-
'lineHeight-condensed': '
|
|
69
|
-
'lineHeight-double': '
|
|
70
|
-
'letterSpacing-normal': '
|
|
71
|
-
'letterSpacing-condensed': '
|
|
72
|
-
'letterSpacing-expanded': '
|
|
73
|
-
'transform-none': '
|
|
74
|
-
'transform-capitalize': '
|
|
75
|
-
'transform-uppercase': '
|
|
76
|
-
'transform-lowercase': '
|
|
43
|
+
'root': 'bEQNl_bGBk',
|
|
44
|
+
'color-primary': 'bEQNl_qFsi',
|
|
45
|
+
'color-secondary': 'bEQNl_bLsb',
|
|
46
|
+
'color-primary-inverse': 'bEQNl_ezBQ',
|
|
47
|
+
'color-secondary-inverse': 'bEQNl_dlnd',
|
|
48
|
+
'color-success': 'bEQNl_cJLh',
|
|
49
|
+
'color-brand': 'bEQNl_fpfC',
|
|
50
|
+
'color-warning': 'bEQNl_eHcp',
|
|
51
|
+
'color-error': 'bEQNl_dwua',
|
|
52
|
+
'color-danger': 'bEQNl_NQMb',
|
|
53
|
+
'color-alert': 'bEQNl_eZgl',
|
|
54
|
+
'wrap-break-word': 'bEQNl_fbNi',
|
|
55
|
+
'weight-normal': 'bEQNl_drST',
|
|
56
|
+
'weight-light': 'bEQNl_pEgL',
|
|
57
|
+
'weight-bold': 'bEQNl_bdMA',
|
|
58
|
+
'style-normal': 'bEQNl_ijuF',
|
|
59
|
+
'style-italic': 'bEQNl_fetN',
|
|
60
|
+
'x-small': 'bEQNl_dfBC',
|
|
61
|
+
'small': 'bEQNl_doqw',
|
|
62
|
+
'medium': 'bEQNl_ycrn',
|
|
63
|
+
'large': 'bEQNl_cMDj',
|
|
64
|
+
'x-large': 'bEQNl_eoMd',
|
|
65
|
+
'xx-large': 'bEQNl_fdca',
|
|
66
|
+
'lineHeight-default': 'bEQNl_fEWX',
|
|
67
|
+
'lineHeight-fit': 'bEQNl_fNIu',
|
|
68
|
+
'lineHeight-condensed': 'bEQNl_dfDs',
|
|
69
|
+
'lineHeight-double': 'bEQNl_bDjL',
|
|
70
|
+
'letterSpacing-normal': 'bEQNl_eQnG',
|
|
71
|
+
'letterSpacing-condensed': 'bEQNl_bbUA',
|
|
72
|
+
'letterSpacing-expanded': 'bEQNl_bRWU',
|
|
73
|
+
'transform-none': 'bEQNl_wZsr',
|
|
74
|
+
'transform-capitalize': 'bEQNl_fCZK',
|
|
75
|
+
'transform-uppercase': 'bEQNl_dsRi',
|
|
76
|
+
'transform-lowercase': 'bEQNl_bLtD'
|
|
77
77
|
};
|
|
78
78
|
import theme from "./theme.js";
|
|
79
79
|
/**
|
|
@@ -126,9 +126,9 @@ var Text = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*
|
|
|
126
126
|
children: PropTypes.node,
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
* One of: primary, secondary, brand, success,
|
|
129
|
+
* One of: primary, secondary, brand, success, danger, alert, primary-inverse, secondary-inverse
|
|
130
130
|
*/
|
|
131
|
-
color: deprecated.deprecatePropValues(PropTypes.oneOf(['primary', 'secondary', 'brand', 'success', 'warning', 'error', 'danger', 'alert', 'primary-inverse', 'secondary-inverse']), ['error'
|
|
131
|
+
color: deprecated.deprecatePropValues(PropTypes.oneOf(['primary', 'secondary', 'brand', 'success', 'warning', 'error', 'danger', 'alert', 'primary-inverse', 'secondary-inverse']), ['error', 'warning'], "The `error` value will be removed in version 8.0.0. Use `danger` instead. The `warning` value will be removed in version 9.0.0, because it doesn't have sufficient color contrast with the background (4.5:1) required for text."),
|
|
132
132
|
elementRef: PropTypes.func,
|
|
133
133
|
fontStyle: PropTypes.oneOf(['italic', 'normal']),
|
|
134
134
|
letterSpacing: PropTypes.oneOf(['normal', 'condensed', 'expanded']),
|
package/es/Text/theme.js
CHANGED
|
@@ -33,12 +33,13 @@ export default function generator(_ref) {
|
|
|
33
33
|
primaryColor: colors.textDarkest,
|
|
34
34
|
secondaryColor: colors.textDark,
|
|
35
35
|
secondaryInverseColor: colors.textLight,
|
|
36
|
-
warningColor: colors.textWarning,
|
|
37
36
|
brandColor: colors.textBrand,
|
|
38
37
|
errorColor: colors.textDanger,
|
|
39
38
|
dangerColor: colors.textDanger,
|
|
40
39
|
successColor: colors.textSuccess,
|
|
41
40
|
alertColor: colors.textAlert,
|
|
41
|
+
warningColor: colors.textWarning,
|
|
42
|
+
// deprecated, will be removed in v9.
|
|
42
43
|
paragraphMargin: "".concat(spacing.medium, " 0")
|
|
43
44
|
});
|
|
44
45
|
}
|
package/lib/Text/index.js
CHANGED
|
@@ -38,44 +38,44 @@ var _theme = _interopRequireDefault(require("./theme.js"));
|
|
|
38
38
|
var _dec, _class, _class2, _temp;
|
|
39
39
|
|
|
40
40
|
var styles = {
|
|
41
|
-
componentId: '
|
|
41
|
+
componentId: 'bEQNl',
|
|
42
42
|
template: function template(theme) {
|
|
43
|
-
return "\n\n.
|
|
43
|
+
return "\n\n.bEQNl_bGBk{font-family:".concat(theme.fontFamily || 'inherit', "}\n\n.bEQNl_bGBk sub,.bEQNl_bGBk sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}\n\n.bEQNl_bGBk sup{top:-0.4em}\n\n.bEQNl_bGBk sub{bottom:-0.4em}\n\n.bEQNl_bGBk code,.bEQNl_bGBk pre{all:initial;animation:none 0s ease 0s 1 normal none running;backface-visibility:visible;background:transparent none repeat 0 0/auto auto padding-box border-box scroll;border:medium none currentColor;border-collapse:separate;border-image:none;border-radius:0;border-spacing:0;bottom:auto;box-shadow:none;box-sizing:content-box;caption-side:top;clear:none;clip:auto;color:#000;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-span:1;column-width:auto;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:serif;font-family:").concat(theme.fontFamilyMonospace || 'inherit', ";font-size:medium;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:400;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:disc outside none;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:50% 50% 0;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:2;width:auto;word-spacing:normal;z-index:auto}\n\n.bEQNl_bGBk em,.bEQNl_bGBk i{font-style:italic}\n\n.bEQNl_bGBk b,.bEQNl_bGBk strong{font-weight:").concat(theme.fontWeightBold || 'inherit', "}\n\n.bEQNl_bGBk p{display:block;margin:").concat(theme.paragraphMargin || 'inherit', ";padding:0}\n\ninput.bEQNl_bGBk[type]{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:none;border:none;border-radius:0;box-shadow:none;box-sizing:border-box;color:inherit;display:block;height:auto;line-height:inherit;margin:0;outline:0;padding:0;text-align:start;width:100%}\n\n[dir=ltr] input.bEQNl_bGBk[type]{text-align:left}\n\n[dir=rtl] input.bEQNl_bGBk[type]{text-align:right}\n\n.bEQNl_bGBk:focus,input.bEQNl_bGBk[type]:focus{outline:none}\n\n.bEQNl_bGBk.bEQNl_qFsi,input.bEQNl_bGBk[type].bEQNl_qFsi{color:").concat(theme.primaryColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bLsb,input.bEQNl_bGBk[type].bEQNl_bLsb{color:").concat(theme.secondaryColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_ezBQ,input.bEQNl_bGBk[type].bEQNl_ezBQ{color:").concat(theme.primaryInverseColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_dlnd,input.bEQNl_bGBk[type].bEQNl_dlnd{color:").concat(theme.secondaryInverseColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_cJLh,input.bEQNl_bGBk[type].bEQNl_cJLh{color:").concat(theme.successColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fpfC,input.bEQNl_bGBk[type].bEQNl_fpfC{color:").concat(theme.brandColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eHcp,input.bEQNl_bGBk[type].bEQNl_eHcp{color:").concat(theme.warningColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_dwua,input.bEQNl_bGBk[type].bEQNl_dwua{color:").concat(theme.errorColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_NQMb,input.bEQNl_bGBk[type].bEQNl_NQMb{color:").concat(theme.dangerColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eZgl,input.bEQNl_bGBk[type].bEQNl_eZgl{color:").concat(theme.alertColor || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fbNi,input.bEQNl_bGBk[type].bEQNl_fbNi{-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;word-break:break-word}\n\n.bEQNl_bGBk.bEQNl_drST,input.bEQNl_bGBk[type].bEQNl_drST{font-weight:").concat(theme.fontWeightNormal || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_pEgL,input.bEQNl_bGBk[type].bEQNl_pEgL{font-weight:").concat(theme.fontWeightLight || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bdMA,input.bEQNl_bGBk[type].bEQNl_bdMA{font-weight:").concat(theme.fontWeightBold || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_ijuF,input.bEQNl_bGBk[type].bEQNl_ijuF{font-style:normal}\n\n.bEQNl_bGBk.bEQNl_fetN,input.bEQNl_bGBk[type].bEQNl_fetN{font-style:italic}\n\n.bEQNl_bGBk.bEQNl_dfBC,input.bEQNl_bGBk[type].bEQNl_dfBC{font-size:").concat(theme.fontSizeXSmall || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_doqw,input.bEQNl_bGBk[type].bEQNl_doqw{font-size:").concat(theme.fontSizeSmall || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_ycrn,input.bEQNl_bGBk[type].bEQNl_ycrn{font-size:").concat(theme.fontSizeMedium || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_cMDj,input.bEQNl_bGBk[type].bEQNl_cMDj{font-size:").concat(theme.fontSizeLarge || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eoMd,input.bEQNl_bGBk[type].bEQNl_eoMd{font-size:").concat(theme.fontSizeXLarge || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fdca,input.bEQNl_bGBk[type].bEQNl_fdca{font-size:").concat(theme.fontSizeXXLarge || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fEWX,input.bEQNl_bGBk[type].bEQNl_fEWX{line-height:").concat(theme.lineHeight || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_fNIu,input.bEQNl_bGBk[type].bEQNl_fNIu{line-height:").concat(theme.lineHeightFit || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_dfDs,input.bEQNl_bGBk[type].bEQNl_dfDs{line-height:").concat(theme.lineHeightCondensed || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bDjL,input.bEQNl_bGBk[type].bEQNl_bDjL{line-height:").concat(theme.lineHeightDouble || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_eQnG,input.bEQNl_bGBk[type].bEQNl_eQnG{letter-spacing:").concat(theme.letterSpacingNormal || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bbUA,input.bEQNl_bGBk[type].bEQNl_bbUA{letter-spacing:").concat(theme.letterSpacingCondensed || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_bRWU,input.bEQNl_bGBk[type].bEQNl_bRWU{letter-spacing:").concat(theme.letterSpacingExpanded || 'inherit', "}\n\n.bEQNl_bGBk.bEQNl_wZsr,input.bEQNl_bGBk[type].bEQNl_wZsr{text-transform:none}\n\n.bEQNl_bGBk.bEQNl_fCZK,input.bEQNl_bGBk[type].bEQNl_fCZK{text-transform:capitalize}\n\n.bEQNl_bGBk.bEQNl_dsRi,input.bEQNl_bGBk[type].bEQNl_dsRi{text-transform:uppercase}\n\n.bEQNl_bGBk.bEQNl_bLtD,input.bEQNl_bGBk[type].bEQNl_bLtD{text-transform:lowercase}");
|
|
44
44
|
},
|
|
45
|
-
'root': '
|
|
46
|
-
'color-primary': '
|
|
47
|
-
'color-secondary': '
|
|
48
|
-
'color-primary-inverse': '
|
|
49
|
-
'color-secondary-inverse': '
|
|
50
|
-
'color-success': '
|
|
51
|
-
'color-brand': '
|
|
52
|
-
'color-warning': '
|
|
53
|
-
'color-error': '
|
|
54
|
-
'color-danger': '
|
|
55
|
-
'color-alert': '
|
|
56
|
-
'wrap-break-word': '
|
|
57
|
-
'weight-normal': '
|
|
58
|
-
'weight-light': '
|
|
59
|
-
'weight-bold': '
|
|
60
|
-
'style-normal': '
|
|
61
|
-
'style-italic': '
|
|
62
|
-
'x-small': '
|
|
63
|
-
'small': '
|
|
64
|
-
'medium': '
|
|
65
|
-
'large': '
|
|
66
|
-
'x-large': '
|
|
67
|
-
'xx-large': '
|
|
68
|
-
'lineHeight-default': '
|
|
69
|
-
'lineHeight-fit': '
|
|
70
|
-
'lineHeight-condensed': '
|
|
71
|
-
'lineHeight-double': '
|
|
72
|
-
'letterSpacing-normal': '
|
|
73
|
-
'letterSpacing-condensed': '
|
|
74
|
-
'letterSpacing-expanded': '
|
|
75
|
-
'transform-none': '
|
|
76
|
-
'transform-capitalize': '
|
|
77
|
-
'transform-uppercase': '
|
|
78
|
-
'transform-lowercase': '
|
|
45
|
+
'root': 'bEQNl_bGBk',
|
|
46
|
+
'color-primary': 'bEQNl_qFsi',
|
|
47
|
+
'color-secondary': 'bEQNl_bLsb',
|
|
48
|
+
'color-primary-inverse': 'bEQNl_ezBQ',
|
|
49
|
+
'color-secondary-inverse': 'bEQNl_dlnd',
|
|
50
|
+
'color-success': 'bEQNl_cJLh',
|
|
51
|
+
'color-brand': 'bEQNl_fpfC',
|
|
52
|
+
'color-warning': 'bEQNl_eHcp',
|
|
53
|
+
'color-error': 'bEQNl_dwua',
|
|
54
|
+
'color-danger': 'bEQNl_NQMb',
|
|
55
|
+
'color-alert': 'bEQNl_eZgl',
|
|
56
|
+
'wrap-break-word': 'bEQNl_fbNi',
|
|
57
|
+
'weight-normal': 'bEQNl_drST',
|
|
58
|
+
'weight-light': 'bEQNl_pEgL',
|
|
59
|
+
'weight-bold': 'bEQNl_bdMA',
|
|
60
|
+
'style-normal': 'bEQNl_ijuF',
|
|
61
|
+
'style-italic': 'bEQNl_fetN',
|
|
62
|
+
'x-small': 'bEQNl_dfBC',
|
|
63
|
+
'small': 'bEQNl_doqw',
|
|
64
|
+
'medium': 'bEQNl_ycrn',
|
|
65
|
+
'large': 'bEQNl_cMDj',
|
|
66
|
+
'x-large': 'bEQNl_eoMd',
|
|
67
|
+
'xx-large': 'bEQNl_fdca',
|
|
68
|
+
'lineHeight-default': 'bEQNl_fEWX',
|
|
69
|
+
'lineHeight-fit': 'bEQNl_fNIu',
|
|
70
|
+
'lineHeight-condensed': 'bEQNl_dfDs',
|
|
71
|
+
'lineHeight-double': 'bEQNl_bDjL',
|
|
72
|
+
'letterSpacing-normal': 'bEQNl_eQnG',
|
|
73
|
+
'letterSpacing-condensed': 'bEQNl_bbUA',
|
|
74
|
+
'letterSpacing-expanded': 'bEQNl_bRWU',
|
|
75
|
+
'transform-none': 'bEQNl_wZsr',
|
|
76
|
+
'transform-capitalize': 'bEQNl_fCZK',
|
|
77
|
+
'transform-uppercase': 'bEQNl_dsRi',
|
|
78
|
+
'transform-lowercase': 'bEQNl_bLtD'
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
/**
|
|
@@ -125,9 +125,9 @@ var Text = (_dec = (0, _themeable.themeable)(_theme.default, styles), _dec(_clas
|
|
|
125
125
|
children: _propTypes.default.node,
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* One of: primary, secondary, brand, success,
|
|
128
|
+
* One of: primary, secondary, brand, success, danger, alert, primary-inverse, secondary-inverse
|
|
129
129
|
*/
|
|
130
|
-
color: _deprecated.deprecated.deprecatePropValues(_propTypes.default.oneOf(['primary', 'secondary', 'brand', 'success', 'warning', 'error', 'danger', 'alert', 'primary-inverse', 'secondary-inverse']), ['error'
|
|
130
|
+
color: _deprecated.deprecated.deprecatePropValues(_propTypes.default.oneOf(['primary', 'secondary', 'brand', 'success', 'warning', 'error', 'danger', 'alert', 'primary-inverse', 'secondary-inverse']), ['error', 'warning'], "The `error` value will be removed in version 8.0.0. Use `danger` instead. The `warning` value will be removed in version 9.0.0, because it doesn't have sufficient color contrast with the background (4.5:1) required for text."),
|
|
131
131
|
elementRef: _propTypes.default.func,
|
|
132
132
|
fontStyle: _propTypes.default.oneOf(['italic', 'normal']),
|
|
133
133
|
letterSpacing: _propTypes.default.oneOf(['normal', 'condensed', 'expanded']),
|
package/lib/Text/theme.js
CHANGED
|
@@ -42,12 +42,13 @@ function generator(_ref) {
|
|
|
42
42
|
primaryColor: colors.textDarkest,
|
|
43
43
|
secondaryColor: colors.textDark,
|
|
44
44
|
secondaryInverseColor: colors.textLight,
|
|
45
|
-
warningColor: colors.textWarning,
|
|
46
45
|
brandColor: colors.textBrand,
|
|
47
46
|
errorColor: colors.textDanger,
|
|
48
47
|
dangerColor: colors.textDanger,
|
|
49
48
|
successColor: colors.textSuccess,
|
|
50
49
|
alertColor: colors.textAlert,
|
|
50
|
+
warningColor: colors.textWarning,
|
|
51
|
+
// deprecated, will be removed in v9.
|
|
51
52
|
paragraphMargin: "".concat(spacing.medium, " 0")
|
|
52
53
|
});
|
|
53
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-text",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.15.0",
|
|
4
4
|
"description": "A component for styling textual content",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.9.2",
|
|
27
|
-
"@instructure/console": "^7.
|
|
28
|
-
"@instructure/ui-react-utils": "^7.
|
|
29
|
-
"@instructure/ui-themeable": "^7.
|
|
27
|
+
"@instructure/console": "^7.15.0",
|
|
28
|
+
"@instructure/ui-react-utils": "^7.15.0",
|
|
29
|
+
"@instructure/ui-themeable": "^7.15.0",
|
|
30
30
|
"classnames": "^2",
|
|
31
31
|
"prop-types": "^15"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@instructure/ui-babel-preset": "^7.
|
|
35
|
-
"@instructure/ui-test-utils": "^7.
|
|
34
|
+
"@instructure/ui-babel-preset": "^7.15.0",
|
|
35
|
+
"@instructure/ui-test-utils": "^7.15.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "^16.8"
|
package/src/Text/README.md
CHANGED
|
@@ -9,9 +9,10 @@ guidelines: true
|
|
|
9
9
|
<Guidelines>
|
|
10
10
|
<Figure title="Upgrade Notes for v8.0.0" recommendation="none">
|
|
11
11
|
<Figure.Item>The color prop <code>error</code> has been updated to <code>danger</code> for component consistency</Figure.Item>
|
|
12
|
+
<Figure.Item>The color prop <code>warning</code> is deprecated and will be removed in version 9.0.0, because it doesn't have sufficient color contrast with the background (4.5:1) required for text.</Figure.Item>
|
|
12
13
|
</Figure>
|
|
13
14
|
</Guidelines>
|
|
14
|
-
|
|
15
|
+
```
|
|
15
16
|
|
|
16
17
|
A component for styling textual content
|
|
17
18
|
|
|
@@ -138,7 +139,6 @@ example: true
|
|
|
138
139
|
<Text color="secondary">I'm secondary text</Text><br/>
|
|
139
140
|
<Text color="brand">I'm brand text</Text><br />
|
|
140
141
|
<Text color="success">I'm success text</Text><br/>
|
|
141
|
-
<Text color="warning">I'm warning text</Text><br/>
|
|
142
142
|
<Text color="danger">I'm danger text</Text><br />
|
|
143
143
|
<Text color="alert">I'm alert text</Text>
|
|
144
144
|
</div>
|
package/src/Text/index.js
CHANGED
|
@@ -53,7 +53,7 @@ class Text extends Component {
|
|
|
53
53
|
as: PropTypes.elementType,
|
|
54
54
|
children: PropTypes.node,
|
|
55
55
|
/**
|
|
56
|
-
* One of: primary, secondary, brand, success,
|
|
56
|
+
* One of: primary, secondary, brand, success, danger, alert, primary-inverse, secondary-inverse
|
|
57
57
|
*/
|
|
58
58
|
color: deprecated.deprecatePropValues(
|
|
59
59
|
PropTypes.oneOf([
|
|
@@ -68,8 +68,8 @@ class Text extends Component {
|
|
|
68
68
|
'primary-inverse',
|
|
69
69
|
'secondary-inverse'
|
|
70
70
|
]),
|
|
71
|
-
['error'],
|
|
72
|
-
|
|
71
|
+
['error', 'warning'],
|
|
72
|
+
"The `error` value will be removed in version 8.0.0. Use `danger` instead. The `warning` value will be removed in version 9.0.0, because it doesn't have sufficient color contrast with the background (4.5:1) required for text."
|
|
73
73
|
),
|
|
74
74
|
elementRef: PropTypes.func,
|
|
75
75
|
fontStyle: PropTypes.oneOf(['italic', 'normal']),
|
package/src/Text/styles.css
CHANGED
package/src/Text/theme.js
CHANGED
|
@@ -34,12 +34,12 @@ export default function generator({ typography, colors, spacing }) {
|
|
|
34
34
|
secondaryColor: colors.textDark,
|
|
35
35
|
secondaryInverseColor: colors.textLight,
|
|
36
36
|
|
|
37
|
-
warningColor: colors.textWarning,
|
|
38
37
|
brandColor: colors.textBrand,
|
|
39
38
|
errorColor: colors.textDanger,
|
|
40
39
|
dangerColor: colors.textDanger,
|
|
41
40
|
successColor: colors.textSuccess,
|
|
42
41
|
alertColor: colors.textAlert,
|
|
42
|
+
warningColor: colors.textWarning, // deprecated, will be removed in v9.
|
|
43
43
|
|
|
44
44
|
paragraphMargin: `${spacing.medium} 0`
|
|
45
45
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface TextProps {
|
|
|
21
21
|
as?: any;
|
|
22
22
|
children?: React.ReactNode;
|
|
23
23
|
/**
|
|
24
|
-
* One of: primary, secondary, brand, success,
|
|
24
|
+
* One of: primary, secondary, brand, success, danger, alert, primary-inverse, secondary-inverse
|
|
25
25
|
*/
|
|
26
26
|
color?: any;
|
|
27
27
|
elementRef?: (...args: any[])=>any;
|