@instructure/ui-tag 8.14.1-snapshot.12 → 8.14.1-snapshot.21
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/es/Tag/index.js +2 -2
- package/es/Tag/styles.js +2 -3
- package/es/Tag/theme.js +1 -1
- package/lib/Tag/index.js +2 -2
- package/lib/Tag/styles.js +2 -3
- package/lib/Tag/theme.js +1 -1
- package/package.json +15 -15
- package/src/Tag/index.tsx +2 -2
- package/src/Tag/styles.ts +2 -3
- package/src/Tag/theme.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Tag/TagLocator.d.ts +4 -4
- package/types/Tag/styles.d.ts.map +1 -1
package/es/Tag/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var _dec, _dec2, _class, _class2, _temp;
|
|
|
26
26
|
|
|
27
27
|
/** @jsx jsx */
|
|
28
28
|
import React, { Component } from 'react';
|
|
29
|
-
import {
|
|
29
|
+
import { IconXLine } from '@instructure/ui-icons';
|
|
30
30
|
import { View } from '@instructure/ui-view';
|
|
31
31
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
32
32
|
import { isActiveElement } from '@instructure/ui-dom-utils';
|
|
@@ -115,7 +115,7 @@ let Tag = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = test
|
|
|
115
115
|
title: title || (typeof text === 'string' ? text : void 0)
|
|
116
116
|
}), jsx("span", {
|
|
117
117
|
css: styles === null || styles === void 0 ? void 0 : styles.text
|
|
118
|
-
}, text), onClick && dismissible ? jsx(
|
|
118
|
+
}, text), onClick && dismissible ? jsx(IconXLine, {
|
|
119
119
|
css: styles === null || styles === void 0 ? void 0 : styles.icon
|
|
120
120
|
}) : null);
|
|
121
121
|
}
|
package/es/Tag/styles.js
CHANGED
|
@@ -61,7 +61,7 @@ const generateStyle = (componentTheme, props) => {
|
|
|
61
61
|
lineHeight: `calc(${componentTheme.heightMedium} - (${componentTheme.defaultBorderWidth} * 2))`
|
|
62
62
|
},
|
|
63
63
|
icon: {
|
|
64
|
-
fontSize: '0.
|
|
64
|
+
fontSize: '0.875rem'
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
large: {
|
|
@@ -73,7 +73,7 @@ const generateStyle = (componentTheme, props) => {
|
|
|
73
73
|
lineHeight: `calc(${componentTheme.heightLarge} - (${componentTheme.defaultBorderWidth} * 2))`
|
|
74
74
|
},
|
|
75
75
|
icon: {
|
|
76
|
-
fontSize: '
|
|
76
|
+
fontSize: '1rem'
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
};
|
|
@@ -209,7 +209,6 @@ const generateStyle = (componentTheme, props) => {
|
|
|
209
209
|
label: 'tag__icon',
|
|
210
210
|
marginInlineStart: componentTheme.iconMargin,
|
|
211
211
|
marginInlineEnd: 0,
|
|
212
|
-
transform: 'translateY(0.0625rem)',
|
|
213
212
|
transition: `all ${componentTheme.transitionTiming}`,
|
|
214
213
|
cursor: 'pointer',
|
|
215
214
|
...sizeVariants[size].icon,
|
package/es/Tag/theme.js
CHANGED
|
@@ -88,7 +88,7 @@ const generateComponentTheme = theme => {
|
|
|
88
88
|
focusOutlineWidth: borders.widthMedium,
|
|
89
89
|
focusOutlineStyle: borders.style,
|
|
90
90
|
maxWidth: '10rem',
|
|
91
|
-
iconMargin: spacing.
|
|
91
|
+
iconMargin: spacing.xSmall,
|
|
92
92
|
transitionTiming: '0.2s',
|
|
93
93
|
...tagVariant('default', {
|
|
94
94
|
borderColor: colors.borderMedium,
|
package/lib/Tag/index.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.default = exports.Tag = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _IconXLine = require("@instructure/ui-icons/lib/IconXLine.js");
|
|
15
15
|
|
|
16
16
|
var _View = require("@instructure/ui-view/lib/View");
|
|
17
17
|
|
|
@@ -112,7 +112,7 @@ let Tag = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
|
|
|
112
112
|
title: title || (typeof text === 'string' ? text : void 0)
|
|
113
113
|
}), (0, _emotion.jsx)("span", {
|
|
114
114
|
css: styles === null || styles === void 0 ? void 0 : styles.text
|
|
115
|
-
}, text), onClick && dismissible ? (0, _emotion.jsx)(
|
|
115
|
+
}, text), onClick && dismissible ? (0, _emotion.jsx)(_IconXLine.IconXLine, {
|
|
116
116
|
css: styles === null || styles === void 0 ? void 0 : styles.icon
|
|
117
117
|
}) : null);
|
|
118
118
|
}
|
package/lib/Tag/styles.js
CHANGED
|
@@ -68,7 +68,7 @@ const generateStyle = (componentTheme, props) => {
|
|
|
68
68
|
lineHeight: `calc(${componentTheme.heightMedium} - (${componentTheme.defaultBorderWidth} * 2))`
|
|
69
69
|
},
|
|
70
70
|
icon: {
|
|
71
|
-
fontSize: '0.
|
|
71
|
+
fontSize: '0.875rem'
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
large: {
|
|
@@ -80,7 +80,7 @@ const generateStyle = (componentTheme, props) => {
|
|
|
80
80
|
lineHeight: `calc(${componentTheme.heightLarge} - (${componentTheme.defaultBorderWidth} * 2))`
|
|
81
81
|
},
|
|
82
82
|
icon: {
|
|
83
|
-
fontSize: '
|
|
83
|
+
fontSize: '1rem'
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
};
|
|
@@ -216,7 +216,6 @@ const generateStyle = (componentTheme, props) => {
|
|
|
216
216
|
label: 'tag__icon',
|
|
217
217
|
marginInlineStart: componentTheme.iconMargin,
|
|
218
218
|
marginInlineEnd: 0,
|
|
219
|
-
transform: 'translateY(0.0625rem)',
|
|
220
219
|
transition: `all ${componentTheme.transitionTiming}`,
|
|
221
220
|
cursor: 'pointer',
|
|
222
221
|
...sizeVariants[size].icon,
|
package/lib/Tag/theme.js
CHANGED
|
@@ -96,7 +96,7 @@ const generateComponentTheme = theme => {
|
|
|
96
96
|
focusOutlineWidth: borders.widthMedium,
|
|
97
97
|
focusOutlineStyle: borders.style,
|
|
98
98
|
maxWidth: '10rem',
|
|
99
|
-
iconMargin: spacing.
|
|
99
|
+
iconMargin: spacing.xSmall,
|
|
100
100
|
transitionTiming: '0.2s',
|
|
101
101
|
...tagVariant('default', {
|
|
102
102
|
borderColor: colors.borderMedium,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-tag",
|
|
3
|
-
"version": "8.14.1-snapshot.
|
|
3
|
+
"version": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
4
4
|
"description": "A tag component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.14.1-snapshot.
|
|
29
|
-
"@instructure/emotion": "8.14.1-snapshot.
|
|
30
|
-
"@instructure/shared-types": "8.14.1-snapshot.
|
|
31
|
-
"@instructure/ui-color-utils": "8.14.1-snapshot.
|
|
32
|
-
"@instructure/ui-dom-utils": "8.14.1-snapshot.
|
|
33
|
-
"@instructure/ui-icons": "8.14.1-snapshot.
|
|
34
|
-
"@instructure/ui-react-utils": "8.14.1-snapshot.
|
|
35
|
-
"@instructure/ui-testable": "8.14.1-snapshot.
|
|
36
|
-
"@instructure/ui-view": "8.14.1-snapshot.
|
|
28
|
+
"@instructure/console": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
29
|
+
"@instructure/emotion": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
30
|
+
"@instructure/shared-types": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
31
|
+
"@instructure/ui-color-utils": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
33
|
+
"@instructure/ui-icons": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
34
|
+
"@instructure/ui-react-utils": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
35
|
+
"@instructure/ui-testable": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
36
|
+
"@instructure/ui-view": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.14.1-snapshot.
|
|
41
|
-
"@instructure/ui-test-locator": "8.14.1-snapshot.
|
|
42
|
-
"@instructure/ui-test-utils": "8.14.1-snapshot.
|
|
43
|
-
"@instructure/ui-themes": "8.14.1-snapshot.
|
|
40
|
+
"@instructure/ui-babel-preset": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
41
|
+
"@instructure/ui-test-locator": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
42
|
+
"@instructure/ui-test-utils": "8.14.1-snapshot.21+5c3aa5fb0",
|
|
43
|
+
"@instructure/ui-themes": "8.14.1-snapshot.21+5c3aa5fb0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=16.8 <=17"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "5c3aa5fb00e4d8d49a26dde239dad1e9d40ea729"
|
|
53
53
|
}
|
package/src/Tag/index.tsx
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
/** @jsx jsx */
|
|
25
25
|
import React, { Component } from 'react'
|
|
26
26
|
|
|
27
|
-
import {
|
|
27
|
+
import { IconXLine } from '@instructure/ui-icons'
|
|
28
28
|
import { View } from '@instructure/ui-view'
|
|
29
29
|
import type { ViewProps } from '@instructure/ui-view'
|
|
30
30
|
import { omitProps } from '@instructure/ui-react-utils'
|
|
@@ -129,7 +129,7 @@ class Tag extends Component<TagProps> {
|
|
|
129
129
|
title={title || (typeof text === 'string' ? text : undefined)}
|
|
130
130
|
>
|
|
131
131
|
<span css={styles?.text}>{text}</span>
|
|
132
|
-
{onClick && dismissible ? <
|
|
132
|
+
{onClick && dismissible ? <IconXLine css={styles?.icon} /> : null}
|
|
133
133
|
</View>
|
|
134
134
|
)
|
|
135
135
|
}
|
package/src/Tag/styles.ts
CHANGED
|
@@ -59,7 +59,7 @@ const generateStyle = (componentTheme: TagTheme, props: TagProps): TagStyle => {
|
|
|
59
59
|
text: {
|
|
60
60
|
lineHeight: `calc(${componentTheme.heightMedium} - (${componentTheme.defaultBorderWidth} * 2))`
|
|
61
61
|
},
|
|
62
|
-
icon: { fontSize: '0.
|
|
62
|
+
icon: { fontSize: '0.875rem' }
|
|
63
63
|
},
|
|
64
64
|
large: {
|
|
65
65
|
tag: {
|
|
@@ -69,7 +69,7 @@ const generateStyle = (componentTheme: TagTheme, props: TagProps): TagStyle => {
|
|
|
69
69
|
text: {
|
|
70
70
|
lineHeight: `calc(${componentTheme.heightLarge} - (${componentTheme.defaultBorderWidth} * 2))`
|
|
71
71
|
},
|
|
72
|
-
icon: { fontSize: '
|
|
72
|
+
icon: { fontSize: '1rem' }
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -213,7 +213,6 @@ const generateStyle = (componentTheme: TagTheme, props: TagProps): TagStyle => {
|
|
|
213
213
|
label: 'tag__icon',
|
|
214
214
|
marginInlineStart: componentTheme.iconMargin,
|
|
215
215
|
marginInlineEnd: 0,
|
|
216
|
-
transform: 'translateY(0.0625rem)',
|
|
217
216
|
transition: `all ${componentTheme.transitionTiming}`,
|
|
218
217
|
cursor: 'pointer',
|
|
219
218
|
...sizeVariants[size!].icon,
|
package/src/Tag/theme.ts
CHANGED
|
@@ -118,7 +118,7 @@ const generateComponentTheme = (theme: Theme): TagTheme => {
|
|
|
118
118
|
focusOutlineWidth: borders.widthMedium,
|
|
119
119
|
focusOutlineStyle: borders.style,
|
|
120
120
|
maxWidth: '10rem',
|
|
121
|
-
iconMargin: spacing.
|
|
121
|
+
iconMargin: spacing.xSmall,
|
|
122
122
|
transitionTiming: '0.2s',
|
|
123
123
|
|
|
124
124
|
...tagVariant('default', {
|