@instructure/ui-pill 8.9.1-snapshot.0 → 8.9.2-snapshot.12
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 +4 -0
- package/README.md +0 -1
- package/package.json +17 -17
- package/src/Pill/props.ts +14 -4
- package/src/Pill/styles.ts +6 -3
- package/types/Pill/props.d.ts +5 -4
- package/types/Pill/props.d.ts.map +1 -1
- package/types/Pill/styles.d.ts +3 -92
- package/types/Pill/styles.d.ts.map +1 -1
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.9.1](https://github.com/instructure/instructure-ui/compare/v8.9.0...v8.9.1) (2021-09-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-pill
|
|
9
|
+
|
|
6
10
|
# [8.9.0](https://github.com/instructure/instructure-ui/compare/v8.8.0...v8.9.0) (2021-09-15)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pill",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.2-snapshot.12+6231ada93",
|
|
4
4
|
"description": "A UI component to communicate concise status.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.9.
|
|
29
|
-
"@instructure/emotion": "8.9.
|
|
30
|
-
"@instructure/shared-types": "8.9.
|
|
31
|
-
"@instructure/ui-react-utils": "8.9.
|
|
32
|
-
"@instructure/ui-testable": "8.9.
|
|
33
|
-
"@instructure/ui-tooltip": "8.9.
|
|
34
|
-
"@instructure/ui-truncate-text": "8.9.
|
|
35
|
-
"@instructure/ui-utils": "8.9.
|
|
36
|
-
"@instructure/ui-view": "8.9.
|
|
28
|
+
"@instructure/console": "8.9.2-snapshot.12+6231ada93",
|
|
29
|
+
"@instructure/emotion": "8.9.2-snapshot.12+6231ada93",
|
|
30
|
+
"@instructure/shared-types": "8.9.2-snapshot.12+6231ada93",
|
|
31
|
+
"@instructure/ui-react-utils": "8.9.2-snapshot.12+6231ada93",
|
|
32
|
+
"@instructure/ui-testable": "8.9.2-snapshot.12+6231ada93",
|
|
33
|
+
"@instructure/ui-tooltip": "8.9.2-snapshot.12+6231ada93",
|
|
34
|
+
"@instructure/ui-truncate-text": "8.9.2-snapshot.12+6231ada93",
|
|
35
|
+
"@instructure/ui-utils": "8.9.2-snapshot.12+6231ada93",
|
|
36
|
+
"@instructure/ui-view": "8.9.2-snapshot.12+6231ada93",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.9.
|
|
41
|
-
"@instructure/ui-color-utils": "8.9.
|
|
42
|
-
"@instructure/ui-test-locator": "8.9.
|
|
43
|
-
"@instructure/ui-test-queries": "8.9.
|
|
44
|
-
"@instructure/ui-test-utils": "8.9.
|
|
45
|
-
"@instructure/ui-themes": "8.9.
|
|
40
|
+
"@instructure/ui-babel-preset": "8.9.2-snapshot.12+6231ada93",
|
|
41
|
+
"@instructure/ui-color-utils": "8.9.2-snapshot.12+6231ada93",
|
|
42
|
+
"@instructure/ui-test-locator": "8.9.2-snapshot.12+6231ada93",
|
|
43
|
+
"@instructure/ui-test-queries": "8.9.2-snapshot.12+6231ada93",
|
|
44
|
+
"@instructure/ui-test-utils": "8.9.2-snapshot.12+6231ada93",
|
|
45
|
+
"@instructure/ui-themes": "8.9.2-snapshot.12+6231ada93"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": ">=16.8 <=17"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false,
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "6231ada93bd4299d640b5d39d7e44b0f54852b2a"
|
|
55
55
|
}
|
package/src/Pill/props.ts
CHANGED
|
@@ -26,8 +26,16 @@ import PropTypes from 'prop-types'
|
|
|
26
26
|
|
|
27
27
|
import { ThemeablePropTypes } from '@instructure/emotion'
|
|
28
28
|
|
|
29
|
-
import type {
|
|
30
|
-
|
|
29
|
+
import type {
|
|
30
|
+
Spacing,
|
|
31
|
+
WithStyleProps,
|
|
32
|
+
ComponentStyle
|
|
33
|
+
} from '@instructure/emotion'
|
|
34
|
+
import type {
|
|
35
|
+
PropValidators,
|
|
36
|
+
AsElementType,
|
|
37
|
+
PillTheme
|
|
38
|
+
} from '@instructure/shared-types'
|
|
31
39
|
|
|
32
40
|
type PillOwnProps = {
|
|
33
41
|
as?: AsElementType
|
|
@@ -40,7 +48,9 @@ type PropKeys = keyof PillOwnProps
|
|
|
40
48
|
|
|
41
49
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
42
50
|
|
|
43
|
-
type PillProps = PillOwnProps & WithStyleProps
|
|
51
|
+
type PillProps = PillOwnProps & WithStyleProps<PillTheme, PillStyle>
|
|
52
|
+
|
|
53
|
+
type PillStyle = ComponentStyle<'pill' | 'text' | 'maxWidth'>
|
|
44
54
|
|
|
45
55
|
const propTypes: PropValidators<PropKeys> = {
|
|
46
56
|
as: PropTypes.elementType, // eslint-disable-line react/require-default-props
|
|
@@ -70,5 +80,5 @@ const allowedProps: AllowedPropKeys = [
|
|
|
70
80
|
'margin'
|
|
71
81
|
]
|
|
72
82
|
|
|
73
|
-
export type { PillProps }
|
|
83
|
+
export type { PillProps, PillStyle }
|
|
74
84
|
export { propTypes, allowedProps }
|
package/src/Pill/styles.ts
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import { PillTheme } from '@instructure/shared-types'
|
|
26
|
-
import { PillProps } from './props'
|
|
25
|
+
import type { PillTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { PillProps, PillStyle } from './props'
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* ---
|
|
@@ -35,7 +35,10 @@ import { PillProps } 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 = (
|
|
38
|
+
const generateStyle = (
|
|
39
|
+
componentTheme: PillTheme,
|
|
40
|
+
props: PillProps
|
|
41
|
+
): PillStyle => {
|
|
39
42
|
const { color } = props
|
|
40
43
|
|
|
41
44
|
const pillColorVariants = {
|
package/types/Pill/props.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Spacing, WithStyleProps } from '@instructure/emotion';
|
|
3
|
-
import type { PropValidators, AsElementType } from '@instructure/shared-types';
|
|
2
|
+
import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
+
import type { PropValidators, AsElementType, PillTheme } from '@instructure/shared-types';
|
|
4
4
|
declare type PillOwnProps = {
|
|
5
5
|
as?: AsElementType;
|
|
6
6
|
color?: 'primary' | 'success' | 'danger' | 'info' | 'warning' | 'alert';
|
|
@@ -10,9 +10,10 @@ declare type PillOwnProps = {
|
|
|
10
10
|
};
|
|
11
11
|
declare type PropKeys = keyof PillOwnProps;
|
|
12
12
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
13
|
-
declare type PillProps = PillOwnProps & WithStyleProps
|
|
13
|
+
declare type PillProps = PillOwnProps & WithStyleProps<PillTheme, PillStyle>;
|
|
14
|
+
declare type PillStyle = ComponentStyle<'pill' | 'text' | 'maxWidth'>;
|
|
14
15
|
declare const propTypes: PropValidators<PropKeys>;
|
|
15
16
|
declare const allowedProps: AllowedPropKeys;
|
|
16
|
-
export type { PillProps };
|
|
17
|
+
export type { PillProps, PillStyle };
|
|
17
18
|
export { propTypes, allowedProps };
|
|
18
19
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Pill/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Pill/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACf,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,SAAS,EACV,MAAM,2BAA2B,CAAA;AAElC,aAAK,YAAY,GAAG;IAClB,EAAE,CAAC,EAAE,aAAa,CAAA;IAClB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;IACvE,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AACD,aAAK,QAAQ,GAAG,MAAM,YAAY,CAAA;AAElC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAEpE,aAAK,SAAS,GAAG,cAAc,CAAC,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,CAAA;AAE7D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAkBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAMnB,CAAA;AAED,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
package/types/Pill/styles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PillTheme } from '@instructure/shared-types';
|
|
2
|
-
import { PillProps } from './props';
|
|
1
|
+
import type { PillTheme } from '@instructure/shared-types';
|
|
2
|
+
import type { PillProps, PillStyle } from './props';
|
|
3
3
|
/**
|
|
4
4
|
* ---
|
|
5
5
|
* private: true
|
|
@@ -10,95 +10,6 @@ import { PillProps } from './props';
|
|
|
10
10
|
* @param {Object} state the state of the component, the style is applied to
|
|
11
11
|
* @return {Object} The final style object, which will be used in the component
|
|
12
12
|
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: PillTheme, props: PillProps) =>
|
|
14
|
-
pill: {
|
|
15
|
-
color: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
label: string;
|
|
18
|
-
display: string;
|
|
19
|
-
fontFamily: string;
|
|
20
|
-
boxSizing: string;
|
|
21
|
-
padding: string | 0;
|
|
22
|
-
background: string;
|
|
23
|
-
borderWidth: string | 0;
|
|
24
|
-
borderStyle: string;
|
|
25
|
-
borderRadius: string | 0;
|
|
26
|
-
lineHeight: string;
|
|
27
|
-
} | {
|
|
28
|
-
color: string;
|
|
29
|
-
borderColor: string;
|
|
30
|
-
label: string;
|
|
31
|
-
display: string;
|
|
32
|
-
fontFamily: string;
|
|
33
|
-
boxSizing: string;
|
|
34
|
-
padding: string | 0;
|
|
35
|
-
background: string;
|
|
36
|
-
borderWidth: string | 0;
|
|
37
|
-
borderStyle: string;
|
|
38
|
-
borderRadius: string | 0;
|
|
39
|
-
lineHeight: string;
|
|
40
|
-
} | {
|
|
41
|
-
color: string;
|
|
42
|
-
borderColor: string;
|
|
43
|
-
label: string;
|
|
44
|
-
display: string;
|
|
45
|
-
fontFamily: string;
|
|
46
|
-
boxSizing: string;
|
|
47
|
-
padding: string | 0;
|
|
48
|
-
background: string;
|
|
49
|
-
borderWidth: string | 0;
|
|
50
|
-
borderStyle: string;
|
|
51
|
-
borderRadius: string | 0;
|
|
52
|
-
lineHeight: string;
|
|
53
|
-
} | {
|
|
54
|
-
color: string;
|
|
55
|
-
borderColor: string;
|
|
56
|
-
label: string;
|
|
57
|
-
display: string;
|
|
58
|
-
fontFamily: string;
|
|
59
|
-
boxSizing: string;
|
|
60
|
-
padding: string | 0;
|
|
61
|
-
background: string;
|
|
62
|
-
borderWidth: string | 0;
|
|
63
|
-
borderStyle: string;
|
|
64
|
-
borderRadius: string | 0;
|
|
65
|
-
lineHeight: string;
|
|
66
|
-
} | {
|
|
67
|
-
color: string;
|
|
68
|
-
borderColor: string;
|
|
69
|
-
label: string;
|
|
70
|
-
display: string;
|
|
71
|
-
fontFamily: string;
|
|
72
|
-
boxSizing: string;
|
|
73
|
-
padding: string | 0;
|
|
74
|
-
background: string;
|
|
75
|
-
borderWidth: string | 0;
|
|
76
|
-
borderStyle: string;
|
|
77
|
-
borderRadius: string | 0;
|
|
78
|
-
lineHeight: string;
|
|
79
|
-
} | {
|
|
80
|
-
color: string;
|
|
81
|
-
borderColor: string;
|
|
82
|
-
label: string;
|
|
83
|
-
display: string;
|
|
84
|
-
fontFamily: string;
|
|
85
|
-
boxSizing: string;
|
|
86
|
-
padding: string | 0;
|
|
87
|
-
background: string;
|
|
88
|
-
borderWidth: string | 0;
|
|
89
|
-
borderStyle: string;
|
|
90
|
-
borderRadius: string | 0;
|
|
91
|
-
lineHeight: string;
|
|
92
|
-
};
|
|
93
|
-
text: {
|
|
94
|
-
label: string;
|
|
95
|
-
boxSizing: string;
|
|
96
|
-
textTransform: string;
|
|
97
|
-
fontSize: string | 0;
|
|
98
|
-
fontWeight: number;
|
|
99
|
-
letterSpacing: string;
|
|
100
|
-
};
|
|
101
|
-
maxWidth: string | 0;
|
|
102
|
-
};
|
|
13
|
+
declare const generateStyle: (componentTheme: PillTheme, props: PillProps) => PillStyle;
|
|
103
14
|
export default generateStyle;
|
|
104
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Pill/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Pill/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,SAAS,SAClB,SAAS,KACf,SAuDF,CAAA;AAED,eAAe,aAAa,CAAA"}
|