@fluentui/react-badge 0.0.0-nightly906d31cfa320211115.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 CHANGED
@@ -2,52 +2,58 @@
2
2
  "name": "@fluentui/react-badge",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 15 Nov 2021 04:16:24 GMT",
6
- "tag": "@fluentui/react-badge_v0.0.0-nightly906d31cfa320211115.1",
7
- "version": "0.0.0-nightly906d31cfa320211115.1",
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": "05edacbae8d85aa6b3d4164f9cd7d1465b47f246",
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
+ },
16
22
  {
17
23
  "author": "beachball",
18
24
  "package": "@fluentui/react-badge",
19
- "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightly906d31cfa320211115.1",
20
- "commit": "05edacbae8d85aa6b3d4164f9cd7d1465b47f246"
25
+ "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
26
+ "commit": "485cdebc9d90401363f72f87d647689444cdaba4"
21
27
  },
22
28
  {
23
29
  "author": "beachball",
24
30
  "package": "@fluentui/react-badge",
25
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly906d31cfa320211115.1",
26
- "commit": "05edacbae8d85aa6b3d4164f9cd7d1465b47f246"
31
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightlyc9ccb6f37d20211122.1",
32
+ "commit": "485cdebc9d90401363f72f87d647689444cdaba4"
27
33
  },
28
34
  {
29
35
  "author": "beachball",
30
36
  "package": "@fluentui/react-badge",
31
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly906d31cfa320211115.1",
32
- "commit": "05edacbae8d85aa6b3d4164f9cd7d1465b47f246"
37
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyc9ccb6f37d20211122.1",
38
+ "commit": "485cdebc9d90401363f72f87d647689444cdaba4"
33
39
  },
34
40
  {
35
41
  "author": "beachball",
36
42
  "package": "@fluentui/react-badge",
37
- "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightly906d31cfa320211115.1",
38
- "commit": "05edacbae8d85aa6b3d4164f9cd7d1465b47f246"
43
+ "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
44
+ "commit": "485cdebc9d90401363f72f87d647689444cdaba4"
39
45
  },
40
46
  {
41
47
  "author": "beachball",
42
48
  "package": "@fluentui/react-badge",
43
- "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly906d31cfa320211115.1",
44
- "commit": "05edacbae8d85aa6b3d4164f9cd7d1465b47f246"
49
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
50
+ "commit": "485cdebc9d90401363f72f87d647689444cdaba4"
45
51
  },
46
52
  {
47
53
  "author": "beachball",
48
54
  "package": "@fluentui/react-badge",
49
- "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly906d31cfa320211115.1",
50
- "commit": "05edacbae8d85aa6b3d4164f9cd7d1465b47f246"
55
+ "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyc9ccb6f37d20211122.1",
56
+ "commit": "485cdebc9d90401363f72f87d647689444cdaba4"
51
57
  }
52
58
  ]
53
59
  }
package/CHANGELOG.md CHANGED
@@ -1,23 +1,24 @@
1
1
  # Change Log - @fluentui/react-badge
2
2
 
3
- This log was last generated on Mon, 15 Nov 2021 04:16:24 GMT and should not be manually modified.
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-nightly906d31cfa320211115.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightly906d31cfa320211115.1)
7
+ ## [0.0.0-nightlyc9ccb6f37d20211122.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightlyc9ccb6f37d20211122.1)
8
8
 
9
- Mon, 15 Nov 2021 04:16:24 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.3..@fluentui/react-badge_v0.0.0-nightly906d31cfa320211115.1)
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
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/05edacbae8d85aa6b3d4164f9cd7d1465b47f246) by email not defined)
15
- - Bump @fluentui/react-make-styles to v0.0.0-nightly906d31cfa320211115.1 ([commit](https://github.com/microsoft/fluentui/commit/05edacbae8d85aa6b3d4164f9cd7d1465b47f246) by beachball)
16
- - Bump @fluentui/react-theme to v0.0.0-nightly906d31cfa320211115.1 ([commit](https://github.com/microsoft/fluentui/commit/05edacbae8d85aa6b3d4164f9cd7d1465b47f246) by beachball)
17
- - Bump @fluentui/react-utilities to v0.0.0-nightly906d31cfa320211115.1 ([commit](https://github.com/microsoft/fluentui/commit/05edacbae8d85aa6b3d4164f9cd7d1465b47f246) by beachball)
18
- - Bump @fluentui/babel-make-styles to v0.0.0-nightly906d31cfa320211115.1 ([commit](https://github.com/microsoft/fluentui/commit/05edacbae8d85aa6b3d4164f9cd7d1465b47f246) by beachball)
19
- - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly906d31cfa320211115.1 ([commit](https://github.com/microsoft/fluentui/commit/05edacbae8d85aa6b3d4164f9cd7d1465b47f246) by beachball)
20
- - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly906d31cfa320211115.1 ([commit](https://github.com/microsoft/fluentui/commit/05edacbae8d85aa6b3d4164f9cd7d1465b47f246) by beachball)
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)
21
22
 
22
23
  ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-beta.3)
23
24
 
@@ -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,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CADoB;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":""}
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;}", ".fic4z9l{background-color:#c50f1f;}", ".f1g6aqbb{border-top-color:#c50f1f;}", ".f1xc4egn{border-right-color:#c50f1f;}", ".f1y13pv{border-left-color:#c50f1f;}", ".f12f05r9{border-bottom-color:#c50f1f;}", ".f1y11cvn{background-color:#242424;}", ".f9ag23u{border-top-color:#242424;}", ".fzlvby{border-right-color:#242424;}", ".fj2uge6{border-left-color:#242424;}", ".fk41dq4{border-bottom-color:#242424;}", ".ftpr1dl{background-color:#d13438;}", ".fx7g4rx{border-top-color:#d13438;}", ".f1edxl4n{border-right-color:#d13438;}", ".f5hlgd2{border-left-color:#d13438;}", ".f5ppncr{border-bottom-color:#d13438;}", ".f6zwqgc{background-color:#ebebeb;}", ".f1pdtvjr{border-top-color:#ebebeb;}", ".f1ctwv29{border-right-color:#ebebeb;}", ".f1m7luuw{border-left-color:#ebebeb;}", ".f1ijpqjr{border-bottom-color:#ebebeb;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".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;}"]
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.color === 'warning' && styles.warning, state.color === 'important' && styles.important, state.color === 'severe' && styles.severe, state.color === 'informative' && styles.informative, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAgCA;;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,KAAN,KAAgB,SAAhB,IAA6B,MAAM,CAAC,OAHH,EAIjC,KAAK,CAAC,KAAN,KAAgB,WAAh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 +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,GAAG,OAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAD4B;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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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;}", ".fic4z9l{background-color:#c50f1f;}", ".f1g6aqbb{border-top-color:#c50f1f;}", ".f1xc4egn{border-right-color:#c50f1f;}", ".f1y13pv{border-left-color:#c50f1f;}", ".f12f05r9{border-bottom-color:#c50f1f;}", ".f1y11cvn{background-color:#242424;}", ".f9ag23u{border-top-color:#242424;}", ".fzlvby{border-right-color:#242424;}", ".fj2uge6{border-left-color:#242424;}", ".fk41dq4{border-bottom-color:#242424;}", ".ftpr1dl{background-color:#d13438;}", ".fx7g4rx{border-top-color:#d13438;}", ".f1edxl4n{border-right-color:#d13438;}", ".f5hlgd2{border-left-color:#d13438;}", ".f5ppncr{border-bottom-color:#d13438;}", ".f6zwqgc{background-color:#ebebeb;}", ".f1pdtvjr{border-top-color:#ebebeb;}", ".f1ctwv29{border-right-color:#ebebeb;}", ".f1m7luuw{border-left-color:#ebebeb;}", ".f1ijpqjr{border-bottom-color:#ebebeb;}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".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;}"]
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.color === 'warning' && styles.warning, state.color === 'important' && styles.important, state.color === 'severe' && styles.severe, state.color === 'informative' && styles.informative, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
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/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cAAA,CAAe,KAAf,CAAP;AACD,CAdM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourceRoot":""}
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-nightly906d31cfa320211115.1",
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-nightly906d31cfa320211115.1",
28
+ "@fluentui/babel-make-styles": "0.0.0-nightlyc9ccb6f37d20211122.1",
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/jest-serializer-make-styles": "0.0.0-nightly906d31cfa320211115.1",
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-nightly906d31cfa320211115.1",
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-nightly906d31cfa320211115.1",
47
- "@fluentui/react-theme": "0.0.0-nightly906d31cfa320211115.1",
48
- "@fluentui/react-utilities": "0.0.0-nightly906d31cfa320211115.1",
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": {