@fluentui/react-badge 0.0.0-nightlybc5ff01fb020211104.1 → 0.0.0-nightlyc9ccb6f37d20211122.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +79 -16
- package/CHANGELOG.md +26 -11
- package/dist/react-badge.d.ts +7 -2
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +7 -2
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +2 -31
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +7 -2
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +2 -31
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/package.json +7 -8
package/CHANGELOG.json
CHANGED
@@ -2,17 +2,68 @@
|
|
2
2
|
"name": "@fluentui/react-badge",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-badge_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Mon, 22 Nov 2021 04:15:12 GMT",
|
6
|
+
"tag": "@fluentui/react-badge_v0.0.0-nightlyc9ccb6f37d20211122.1",
|
7
|
+
"version": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-badge",
|
13
|
-
"commit": "
|
13
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "lingfangao@hotmail.com",
|
18
|
+
"package": "@fluentui/react-badge",
|
19
|
+
"commit": "c5c66cb39e6906f506bf30c9e56c0839f10e2d51",
|
20
|
+
"comment": "Reduce colour set and align with base badge colours"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-badge",
|
25
|
+
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
26
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-badge",
|
31
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
32
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-badge",
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
38
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-badge",
|
43
|
+
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
44
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"author": "beachball",
|
48
|
+
"package": "@fluentui/react-badge",
|
49
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
50
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"author": "beachball",
|
54
|
+
"package": "@fluentui/react-badge",
|
55
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
|
56
|
+
"commit": "485cdebc9d90401363f72f87d647689444cdaba4"
|
57
|
+
}
|
58
|
+
]
|
59
|
+
}
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"date": "Fri, 12 Nov 2021 13:25:15 GMT",
|
63
|
+
"tag": "@fluentui/react-badge_v9.0.0-beta.3",
|
64
|
+
"version": "9.0.0-beta.3",
|
65
|
+
"comments": {
|
66
|
+
"prerelease": [
|
16
67
|
{
|
17
68
|
"author": "olfedias@microsoft.com",
|
18
69
|
"package": "@fluentui/react-badge",
|
@@ -28,38 +79,38 @@
|
|
28
79
|
{
|
29
80
|
"author": "beachball",
|
30
81
|
"package": "@fluentui/react-badge",
|
31
|
-
"comment": "Bump @fluentui/react-make-styles to
|
32
|
-
"commit": "
|
82
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
|
83
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
33
84
|
},
|
34
85
|
{
|
35
86
|
"author": "beachball",
|
36
87
|
"package": "@fluentui/react-badge",
|
37
|
-
"comment": "Bump @fluentui/react-theme to
|
38
|
-
"commit": "
|
88
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-beta.3",
|
89
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
39
90
|
},
|
40
91
|
{
|
41
92
|
"author": "beachball",
|
42
93
|
"package": "@fluentui/react-badge",
|
43
|
-
"comment": "Bump @fluentui/react-utilities to
|
44
|
-
"commit": "
|
94
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
|
95
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
45
96
|
},
|
46
97
|
{
|
47
98
|
"author": "beachball",
|
48
99
|
"package": "@fluentui/react-badge",
|
49
|
-
"comment": "Bump @fluentui/babel-make-styles to
|
50
|
-
"commit": "
|
100
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.3",
|
101
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
51
102
|
},
|
52
103
|
{
|
53
104
|
"author": "beachball",
|
54
105
|
"package": "@fluentui/react-badge",
|
55
|
-
"comment": "Bump @fluentui/jest-serializer-make-styles to
|
56
|
-
"commit": "
|
106
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
|
107
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
57
108
|
},
|
58
109
|
{
|
59
110
|
"author": "beachball",
|
60
111
|
"package": "@fluentui/react-badge",
|
61
|
-
"comment": "Bump @fluentui/react-conformance-make-styles to
|
62
|
-
"commit": "
|
112
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3",
|
113
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
63
114
|
}
|
64
115
|
],
|
65
116
|
"none": [
|
@@ -68,6 +119,18 @@
|
|
68
119
|
"package": "@fluentui/react-badge",
|
69
120
|
"commit": "7fafe76eb2c09f9d17a03c11ba73729d91ef411e",
|
70
121
|
"comment": "update docs descriptions"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"author": "lingfangao@hotmail.com",
|
125
|
+
"package": "@fluentui/react-badge",
|
126
|
+
"commit": "00f70581480b536e723fb69edf0ae617beac4807",
|
127
|
+
"comment": "Remove beta release tag"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"author": "me@levithomason.com",
|
131
|
+
"package": "@fluentui/react-badge",
|
132
|
+
"commit": "cdbe0769d2a6ee91a98a3e62c6ac9329a714355c",
|
133
|
+
"comment": "Docs update"
|
71
134
|
}
|
72
135
|
]
|
73
136
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,25 +1,40 @@
|
|
1
1
|
# Change Log - @fluentui/react-badge
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 22 Nov 2021 04:15:12 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlyc9ccb6f37d20211122.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightlyc9ccb6f37d20211122.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.
|
9
|
+
Mon, 22 Nov 2021 04:15:12 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.3..@fluentui/react-badge_v0.0.0-nightlyc9ccb6f37d20211122.1)
|
11
|
+
|
12
|
+
### Changes
|
13
|
+
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by email not defined)
|
15
|
+
- Reduce colour set and align with base badge colours ([PR #20596](https://github.com/microsoft/fluentui/pull/20596) by lingfangao@hotmail.com)
|
16
|
+
- Bump @fluentui/react-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
19
|
+
- Bump @fluentui/babel-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
20
|
+
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
21
|
+
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1 ([commit](https://github.com/microsoft/fluentui/commit/485cdebc9d90401363f72f87d647689444cdaba4) by beachball)
|
22
|
+
|
23
|
+
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-beta.3)
|
24
|
+
|
25
|
+
Fri, 12 Nov 2021 13:25:15 GMT
|
26
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.2..@fluentui/react-badge_v9.0.0-beta.3)
|
11
27
|
|
12
28
|
### Changes
|
13
29
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/112d5b8815c25532184ed7c1407ba9a777e2f48d) by email not defined)
|
15
30
|
- export static classes for components ([PR #20453](https://github.com/microsoft/fluentui/pull/20453) by olfedias@microsoft.com)
|
16
31
|
- Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
|
17
|
-
- Bump @fluentui/react-make-styles to
|
18
|
-
- Bump @fluentui/react-theme to
|
19
|
-
- Bump @fluentui/react-utilities to
|
20
|
-
- Bump @fluentui/babel-make-styles to
|
21
|
-
- Bump @fluentui/jest-serializer-make-styles to
|
22
|
-
- Bump @fluentui/react-conformance-make-styles to
|
32
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
33
|
+
- Bump @fluentui/react-theme to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
34
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
35
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
36
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
37
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
23
38
|
|
24
39
|
## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-beta.2)
|
25
40
|
|
package/dist/react-badge.d.ts
CHANGED
@@ -86,17 +86,22 @@ export declare type CounterBadgeCommons = {
|
|
86
86
|
* @default filled
|
87
87
|
*/
|
88
88
|
appearance: 'filled' | 'ghost';
|
89
|
+
/**
|
90
|
+
* Semantic colors for a counter badge
|
91
|
+
* @default brand
|
92
|
+
*/
|
93
|
+
color: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;
|
89
94
|
};
|
90
95
|
|
91
96
|
/**
|
92
97
|
* {@docCategory CounterBadge}
|
93
98
|
*/
|
94
|
-
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & Partial<CounterBadgeCommons>;
|
99
|
+
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape' | 'color'> & Partial<CounterBadgeCommons>;
|
95
100
|
|
96
101
|
/**
|
97
102
|
* {@docCategory CounterBadge}
|
98
103
|
*/
|
99
|
-
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape'> & CounterBadgeCommons;
|
104
|
+
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;
|
100
105
|
|
101
106
|
/**
|
102
107
|
* Define a styled Badge, using the `useBadge` hook.
|
@@ -30,12 +30,17 @@ export declare type CounterBadgeCommons = {
|
|
30
30
|
* @default filled
|
31
31
|
*/
|
32
32
|
appearance: 'filled' | 'ghost';
|
33
|
+
/**
|
34
|
+
* Semantic colors for a counter badge
|
35
|
+
* @default brand
|
36
|
+
*/
|
37
|
+
color: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;
|
33
38
|
};
|
34
39
|
/**
|
35
40
|
* {@docCategory CounterBadge}
|
36
41
|
*/
|
37
|
-
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & Partial<CounterBadgeCommons>;
|
42
|
+
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape' | 'color'> & Partial<CounterBadgeCommons>;
|
38
43
|
/**
|
39
44
|
* {@docCategory CounterBadge}
|
40
45
|
*/
|
41
|
-
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape'> & CounterBadgeCommons;
|
46
|
+
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":"AACA,SAAS,QAAT,QAAyB,gBAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,eAAe,GAAG,CAAC,KAAD,EAA2B,GAA3B,KAA6E;AAC1G,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,UAAU,GAAG,QAFT;AAGJ,IAAA,QAAQ,GAAG,KAHP;AAIJ,IAAA,aAAa,GAAG,EAJZ;AAKJ,IAAA,KAAK,GAAG,CALJ;AAMJ,IAAA,GAAG,GAAG;AANF,MAOF,KAPJ;AASA,QAAM,KAAK,GAAsB,EAC/B,
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":"AACA,SAAS,QAAT,QAAyB,gBAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,eAAe,GAAG,CAAC,KAAD,EAA2B,GAA3B,KAA6E;AAC1G,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,UAAU,GAAG,QAFT;AAGJ,IAAA,QAAQ,GAAG,KAHP;AAIJ,IAAA,aAAa,GAAG,EAJZ;AAKJ,IAAA,KAAK,GAAG,CALJ;AAMJ,IAAA,GAAG,GAAG;AANF,MAOF,KAPJ;AASA,QAAM,KAAK,GAAsB,EAC/B,GAAI,QAAQ,CAAC,KAAD,EAAQ,GAAR,CADmB;AAE/B,IAAA,KAF+B;AAG/B,IAAA,UAH+B;AAI/B,IAAA,QAJ+B;AAK/B,IAAA,aAL+B;AAM/B,IAAA,KAN+B;AAO/B,IAAA;AAP+B,GAAjC;;AAUA,MAAI,CAAC,KAAK,CAAC,GAAP,IAAc,CAAC,KAAK,CAAC,IAAN,CAAW,QAA9B,EAAwC;AACtC,IAAA,KAAK,CAAC,IAAN,CAAW,QAAX,GAAsB,KAAK,CAAC,KAAN,GAAc,KAAK,CAAC,aAApB,GAAoC,GAAG,KAAK,CAAC,aAAa,GAA1D,GAAgE,GAAG,KAAK,CAAC,KAAK,EAApG;AACD;;AAED,SAAO,KAAP;AACD,CAzBM","sourceRoot":""}
|
@@ -6,35 +6,6 @@ const useStyles = /*#__PURE__*/__styles({
|
|
6
6
|
"root": {
|
7
7
|
"Bf4jedk": "fgfkb25"
|
8
8
|
},
|
9
|
-
"warning": {
|
10
|
-
"De3pzq": "fic4z9l",
|
11
|
-
"g2u3we": "f1g6aqbb",
|
12
|
-
"h3c5rm": ["f1xc4egn", "f1y13pv"],
|
13
|
-
"B9xav0g": "f12f05r9",
|
14
|
-
"zhjwy3": ["f1y13pv", "f1xc4egn"]
|
15
|
-
},
|
16
|
-
"important": {
|
17
|
-
"De3pzq": "f1y11cvn",
|
18
|
-
"g2u3we": "f9ag23u",
|
19
|
-
"h3c5rm": ["fzlvby", "fj2uge6"],
|
20
|
-
"B9xav0g": "fk41dq4",
|
21
|
-
"zhjwy3": ["fj2uge6", "fzlvby"]
|
22
|
-
},
|
23
|
-
"severe": {
|
24
|
-
"De3pzq": "ftpr1dl",
|
25
|
-
"g2u3we": "fx7g4rx",
|
26
|
-
"h3c5rm": ["f1edxl4n", "f5hlgd2"],
|
27
|
-
"B9xav0g": "f5ppncr",
|
28
|
-
"zhjwy3": ["f5hlgd2", "f1edxl4n"]
|
29
|
-
},
|
30
|
-
"informative": {
|
31
|
-
"De3pzq": "f6zwqgc",
|
32
|
-
"g2u3we": "f1pdtvjr",
|
33
|
-
"h3c5rm": ["f1ctwv29", "f1m7luuw"],
|
34
|
-
"B9xav0g": "f1ijpqjr",
|
35
|
-
"zhjwy3": ["f1m7luuw", "f1ctwv29"],
|
36
|
-
"sj55zd": "f11d4kpn"
|
37
|
-
},
|
38
9
|
"dot": {
|
39
10
|
"a9b677": "f16dn6v3",
|
40
11
|
"Bqenvij": "f3mu39s",
|
@@ -47,7 +18,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
47
18
|
"mc9l5x": "fjseox"
|
48
19
|
}
|
49
20
|
}, {
|
50
|
-
"d": [".fgfkb25{min-width:auto;}", ".
|
21
|
+
"d": [".fgfkb25{min-width:auto;}", ".f16dn6v3{width:6px;}", ".f3mu39s{height:6px;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fjseox{display:none;}"]
|
51
22
|
});
|
52
23
|
/**
|
53
24
|
* Applies style classnames to slots
|
@@ -56,7 +27,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
56
27
|
|
57
28
|
export const useCounterBadgeStyles = state => {
|
58
29
|
const styles = useStyles();
|
59
|
-
state.root.className = mergeClasses(counterBadgeClassName, styles.root, state.
|
30
|
+
state.root.className = mergeClasses(counterBadgeClassName, styles.root, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
|
60
31
|
return useBadgeStyles(state);
|
61
32
|
};
|
62
33
|
//# sourceMappingURL=useCounterBadgeStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA,OAAO,MAAM,qBAAqB,GAAG,kBAA9B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA,OAAO,MAAM,qBAAqB,GAAG,kBAA9B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAcA;;AAEG;;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAgD;AACnF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,qBADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,GAAN,IAAa,MAAM,CAAC,GAHa,EAIjC,CAAC,KAAK,CAAC,QAAP,IAAmB,KAAK,CAAC,KAAN,KAAgB,CAAnC,IAAwC,CAAC,KAAK,CAAC,GAA/C,IAAsD,MAAM,CAAC,IAJ5B,EAKjC,KAAK,CAAC,IAAN,CAAW,SALsB,CAAnC;AAOA,SAAO,cAAc,CAAC,KAAD,CAArB;AACD,CAVM","sourceRoot":""}
|
@@ -30,12 +30,17 @@ export declare type CounterBadgeCommons = {
|
|
30
30
|
* @default filled
|
31
31
|
*/
|
32
32
|
appearance: 'filled' | 'ghost';
|
33
|
+
/**
|
34
|
+
* Semantic colors for a counter badge
|
35
|
+
* @default brand
|
36
|
+
*/
|
37
|
+
color: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;
|
33
38
|
};
|
34
39
|
/**
|
35
40
|
* {@docCategory CounterBadge}
|
36
41
|
*/
|
37
|
-
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & Partial<CounterBadgeCommons>;
|
42
|
+
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape' | 'color'> & Partial<CounterBadgeCommons>;
|
38
43
|
/**
|
39
44
|
* {@docCategory CounterBadge}
|
40
45
|
*/
|
41
|
-
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape'> & CounterBadgeCommons;
|
46
|
+
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,eAAe,GAAG,CAAC,KAAD,EAA2B,GAA3B,KAA6E;AAC1G,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,UAAU,GAAG,QAFT;AAGJ,IAAA,QAAQ,GAAG,KAHP;AAIJ,IAAA,aAAa,GAAG,EAJZ;AAKJ,IAAA,KAAK,GAAG,CALJ;AAMJ,IAAA,GAAG,GAAG;AANF,MAOF,KAPJ;AASA,QAAM,KAAK,GAAsB,EAC/B,
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,eAAe,GAAG,CAAC,KAAD,EAA2B,GAA3B,KAA6E;AAC1G,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,UAAU,GAAG,QAFT;AAGJ,IAAA,QAAQ,GAAG,KAHP;AAIJ,IAAA,aAAa,GAAG,EAJZ;AAKJ,IAAA,KAAK,GAAG,CALJ;AAMJ,IAAA,GAAG,GAAG;AANF,MAOF,KAPJ;AASA,QAAM,KAAK,GAAsB,EAC/B,GAAI,OAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAD2B;AAE/B,IAAA,KAF+B;AAG/B,IAAA,UAH+B;AAI/B,IAAA,QAJ+B;AAK/B,IAAA,aAL+B;AAM/B,IAAA,KAN+B;AAO/B,IAAA;AAP+B,GAAjC;;AAUA,MAAI,CAAC,KAAK,CAAC,GAAP,IAAc,CAAC,KAAK,CAAC,IAAN,CAAW,QAA9B,EAAwC;AACtC,IAAA,KAAK,CAAC,IAAN,CAAW,QAAX,GAAsB,KAAK,CAAC,KAAN,GAAc,KAAK,CAAC,aAApB,GAAoC,GAAG,KAAK,CAAC,aAAa,GAA1D,GAAgE,GAAG,KAAK,CAAC,KAAK,EAApG;AACD;;AAED,SAAO,KAAP;AACD,CAzBM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourceRoot":""}
|
@@ -15,35 +15,6 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
15
15
|
"root": {
|
16
16
|
"Bf4jedk": "fgfkb25"
|
17
17
|
},
|
18
|
-
"warning": {
|
19
|
-
"De3pzq": "fic4z9l",
|
20
|
-
"g2u3we": "f1g6aqbb",
|
21
|
-
"h3c5rm": ["f1xc4egn", "f1y13pv"],
|
22
|
-
"B9xav0g": "f12f05r9",
|
23
|
-
"zhjwy3": ["f1y13pv", "f1xc4egn"]
|
24
|
-
},
|
25
|
-
"important": {
|
26
|
-
"De3pzq": "f1y11cvn",
|
27
|
-
"g2u3we": "f9ag23u",
|
28
|
-
"h3c5rm": ["fzlvby", "fj2uge6"],
|
29
|
-
"B9xav0g": "fk41dq4",
|
30
|
-
"zhjwy3": ["fj2uge6", "fzlvby"]
|
31
|
-
},
|
32
|
-
"severe": {
|
33
|
-
"De3pzq": "ftpr1dl",
|
34
|
-
"g2u3we": "fx7g4rx",
|
35
|
-
"h3c5rm": ["f1edxl4n", "f5hlgd2"],
|
36
|
-
"B9xav0g": "f5ppncr",
|
37
|
-
"zhjwy3": ["f5hlgd2", "f1edxl4n"]
|
38
|
-
},
|
39
|
-
"informative": {
|
40
|
-
"De3pzq": "f6zwqgc",
|
41
|
-
"g2u3we": "f1pdtvjr",
|
42
|
-
"h3c5rm": ["f1ctwv29", "f1m7luuw"],
|
43
|
-
"B9xav0g": "f1ijpqjr",
|
44
|
-
"zhjwy3": ["f1m7luuw", "f1ctwv29"],
|
45
|
-
"sj55zd": "f11d4kpn"
|
46
|
-
},
|
47
18
|
"dot": {
|
48
19
|
"a9b677": "f16dn6v3",
|
49
20
|
"Bqenvij": "f3mu39s",
|
@@ -56,7 +27,7 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
56
27
|
"mc9l5x": "fjseox"
|
57
28
|
}
|
58
29
|
}, {
|
59
|
-
"d": [".fgfkb25{min-width:auto;}", ".
|
30
|
+
"d": [".fgfkb25{min-width:auto;}", ".f16dn6v3{width:6px;}", ".f3mu39s{height:6px;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fjseox{display:none;}"]
|
60
31
|
});
|
61
32
|
/**
|
62
33
|
* Applies style classnames to slots
|
@@ -65,7 +36,7 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
65
36
|
|
66
37
|
const useCounterBadgeStyles = state => {
|
67
38
|
const styles = useStyles();
|
68
|
-
state.root.className = react_make_styles_1.mergeClasses(exports.counterBadgeClassName, styles.root, state.
|
39
|
+
state.root.className = react_make_styles_1.mergeClasses(exports.counterBadgeClassName, styles.root, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
|
69
40
|
return useBadgeStyles_1.useBadgeStyles(state);
|
70
41
|
};
|
71
42
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGa,OAAA,CAAA,qBAAA,GAAwB,kBAAxB;;AAEb,MAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGa,OAAA,CAAA,qBAAA,GAAwB,kBAAxB;;AAEb,MAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAcA;;AAEG;;;AACI,MAAM,qBAAqB,GAAI,KAAD,IAAgD;AACnF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CACrB,OAAA,CAAA,qBADqB,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,GAAN,IAAa,MAAM,CAAC,GAHC,EAIrB,CAAC,KAAK,CAAC,QAAP,IAAmB,KAAK,CAAC,KAAN,KAAgB,CAAnC,IAAwC,CAAC,KAAK,CAAC,GAA/C,IAAsD,MAAM,CAAC,IAJxC,EAKrB,KAAK,CAAC,IAAN,CAAW,SALU,CAAvB;AAOA,SAAO,gBAAA,CAAA,cAAA,CAAe,KAAf,CAAP;AACD,CAVM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-badge",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -25,11 +25,11 @@
|
|
25
25
|
"storybook": "start-storybook"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
|
-
"@fluentui/babel-make-styles": "0.0.0-
|
28
|
+
"@fluentui/babel-make-styles": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-
|
30
|
+
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
31
31
|
"@fluentui/react-conformance": "*",
|
32
|
-
"@fluentui/react-conformance-make-styles": "0.0.0-
|
32
|
+
"@fluentui/react-conformance-make-styles": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
33
33
|
"@fluentui/scripts": "^1.0.0",
|
34
34
|
"@types/enzyme": "3.10.3",
|
35
35
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -43,9 +43,9 @@
|
|
43
43
|
"react-test-renderer": "^16.3.0"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@fluentui/react-make-styles": "0.0.0-
|
47
|
-
"@fluentui/react-theme": "0.0.0-
|
48
|
-
"@fluentui/react-utilities": "0.0.0-
|
46
|
+
"@fluentui/react-make-styles": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
47
|
+
"@fluentui/react-theme": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
48
|
+
"@fluentui/react-utilities": "0.0.0-nightlyc9ccb6f37d20211122.1",
|
49
49
|
"tslib": "^2.1.0"
|
50
50
|
},
|
51
51
|
"peerDependencies": {
|
@@ -55,7 +55,6 @@
|
|
55
55
|
"react-dom": ">=16.8.0 <17.0.0"
|
56
56
|
},
|
57
57
|
"beachball": {
|
58
|
-
"tag": "beta",
|
59
58
|
"disallowedChangeTypes": [
|
60
59
|
"major",
|
61
60
|
"minor",
|