@fluentui/react-badge 0.0.0-nightlyf3ce1fbe1d20211110.1 → 0.0.0-nightlyf8be6a7c6520220106.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +182 -16
- package/CHANGELOG.md +48 -11
- package/dist/react-badge.d.ts +12 -13
- package/lib/components/Badge/Badge.types.d.ts +1 -1
- package/lib/components/Badge/renderBadge.js +4 -1
- package/lib/components/Badge/renderBadge.js.map +1 -1
- package/lib/components/Badge/useBadgeStyles.js +74 -53
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +7 -8
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +4 -35
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
- package/lib/components/PresenceBadge/presenceIcons.d.ts +11 -0
- package/lib/components/PresenceBadge/presenceIcons.js +128 -0
- package/lib/components/PresenceBadge/presenceIcons.js.map +1 -0
- package/lib/components/PresenceBadge/usePresenceBadge.js +29 -15
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +39 -43
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.d.ts +1 -1
- package/lib-commonjs/components/Badge/renderBadge.js +4 -1
- package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.js +74 -52
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +7 -8
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +3 -34
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
- package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +11 -0
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js +136 -0
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +28 -14
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +38 -42
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/package.json +11 -10
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -13
- package/lib/common/isConformant.js.map +0 -1
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -98
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -24
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -113
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
@@ -1,37 +1,51 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { resolveShorthand } from '@fluentui/react-utilities';
|
3
|
+
import { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';
|
3
4
|
import { useBadge } from '../Badge/index';
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
|
6
|
+
const iconMap = (status, outOfOffice, size) => {
|
7
|
+
switch (status) {
|
8
|
+
case 'available':
|
9
|
+
return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];
|
10
|
+
|
11
|
+
case 'away':
|
12
|
+
return outOfOffice ? presenceOfflineRegular[size] : presenceAwayFilled[size];
|
13
|
+
|
14
|
+
case 'busy':
|
15
|
+
return outOfOffice ? presenceUnknownRegular[size] : presenceBusyFilled[size];
|
16
|
+
|
17
|
+
case 'doNotDisturb':
|
18
|
+
return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];
|
19
|
+
|
20
|
+
case 'offline':
|
21
|
+
return presenceOfflineRegular[size];
|
22
|
+
|
23
|
+
case 'outOfOffice':
|
24
|
+
return presenceOofRegular[size];
|
25
|
+
}
|
26
|
+
};
|
14
27
|
/**
|
15
28
|
* Returns the props and state required to render the component
|
16
29
|
*/
|
17
30
|
|
18
31
|
|
19
32
|
export const usePresenceBadge = (props, ref) => {
|
20
|
-
var _a, _b
|
33
|
+
var _a, _b;
|
21
34
|
|
22
35
|
const state = { ...useBadge({
|
23
|
-
size: '
|
36
|
+
size: 'medium',
|
24
37
|
...props,
|
25
|
-
icon: resolveShorthand(
|
38
|
+
icon: resolveShorthand(undefined, {
|
26
39
|
required: true
|
27
40
|
})
|
28
41
|
}, ref),
|
29
42
|
status: (_a = props.status) !== null && _a !== void 0 ? _a : 'available',
|
30
43
|
outOfOffice: (_b = props.outOfOffice) !== null && _b !== void 0 ? _b : false
|
31
44
|
};
|
45
|
+
const IconElement = iconMap(state.status, state.outOfOffice, state.size);
|
32
46
|
|
33
|
-
if (
|
34
|
-
state.icon.children =
|
47
|
+
if (IconElement) {
|
48
|
+
state.icon.children = /*#__PURE__*/React.createElement(IconElement, null);
|
35
49
|
}
|
36
50
|
|
37
51
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,O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EAAE;AADsB,OAAZ;AAHxB,KADS,EAQT,GARS,CADqB;AAWhC,IAAA,MAAM,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,MAAN,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,EAAZ,GAAgB,WAXQ;AAYhC,IAAA,WAAW,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,WAAN,MAAiB,IAAjB,IAAiB,EAAA,KAAA,KAAA,CAAjB,GAAiB,EAAjB,GAAqB;AAZF,GAAlC;AAeA,QAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAP,EAAe,KAAK,CAAC,WAArB,EAAkC,KAAK,CAAC,IAAxC,CAA3B;;AACA,MAAI,WAAJ,EAAiB;AACf,IAAA,KAAK,CAAC,IAAN,CAAY,QAAZ,gBAAuB,KAAA,CAAA,aAAA,CAAC,WAAD,EAAY,IAAZ,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CAtBM","sourceRoot":""}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { mergeClasses, __styles } from '@fluentui/react-make-styles';
|
2
|
-
import {
|
1
|
+
import { mergeClasses, __styles, shorthands } from '@fluentui/react-make-styles';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
3
|
export const presenceBadgeClassName = 'fui-PresenceBadge';
|
4
4
|
|
5
5
|
const useStyles = /*#__PURE__*/__styles({
|
@@ -8,56 +8,34 @@ const useStyles = /*#__PURE__*/__styles({
|
|
8
8
|
"z189sj": ["fhxju0i", "f1cnd47f"],
|
9
9
|
"Byoj8tv": "f1qch9an",
|
10
10
|
"uwmqm3": ["f1cnd47f", "fhxju0i"],
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"
|
15
|
-
|
16
|
-
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
11
|
+
"mc9l5x": "ftuwxu6",
|
12
|
+
"B7ck84d": "f1ewtqcl",
|
13
|
+
"Bt984gj": "f122n59",
|
14
|
+
"Brf1p80": "f4d9j23",
|
15
|
+
"Bhmb4qv": "fb8jth9",
|
16
|
+
"Bbmb7ep": ["fqgqgel", "fchfifz"],
|
17
|
+
"Beyfa6y": ["fchfifz", "fqgqgel"],
|
18
|
+
"B7oj6ja": ["fc7b1hi", "f1dpx5h9"],
|
19
|
+
"Btl43ni": ["f1dpx5h9", "fc7b1hi"],
|
20
|
+
"De3pzq": "fxugw4r"
|
21
21
|
},
|
22
22
|
"statusBusy": {
|
23
|
-
"
|
24
|
-
"g2u3we": "f11ttmz8",
|
25
|
-
"h3c5rm": ["f1ratw88", "f459ikj"],
|
26
|
-
"B9xav0g": "fvovscg",
|
27
|
-
"zhjwy3": ["f459ikj", "f1ratw88"]
|
23
|
+
"sj55zd": "fvi85wt"
|
28
24
|
},
|
29
25
|
"statusAway": {
|
30
|
-
"
|
31
|
-
"g2u3we": "f1skk3ns",
|
32
|
-
"h3c5rm": ["f766wml", "f1rnrfqa"],
|
33
|
-
"B9xav0g": "fb8zvtn",
|
34
|
-
"zhjwy3": ["f1rnrfqa", "f766wml"]
|
26
|
+
"sj55zd": "f14k8a89"
|
35
27
|
},
|
36
28
|
"statusAvailable": {
|
37
|
-
"
|
38
|
-
"g2u3we": "f1t9i9vy",
|
39
|
-
"h3c5rm": ["f1r5awo9", "fnfhfy0"],
|
40
|
-
"B9xav0g": "fgfkvtu",
|
41
|
-
"zhjwy3": ["fnfhfy0", "f1r5awo9"]
|
29
|
+
"sj55zd": "fqa5hgp"
|
42
30
|
},
|
43
31
|
"statusOffline": {
|
44
|
-
"
|
45
|
-
"sj55zd": "f11d4kpn",
|
46
|
-
"g2u3we": "fi2z7s6",
|
47
|
-
"h3c5rm": ["f1agc6it", "f1sit5hz"],
|
48
|
-
"B9xav0g": "f9pok3v",
|
49
|
-
"zhjwy3": ["f1sit5hz", "f1agc6it"]
|
32
|
+
"sj55zd": "f11d4kpn"
|
50
33
|
},
|
51
34
|
"statusOutOfOffice": {
|
52
|
-
"
|
53
|
-
"sj55zd": "fdce8r3",
|
54
|
-
"g2u3we": "f161shwc",
|
55
|
-
"h3c5rm": ["fbde6ui", "f7rrh46"],
|
56
|
-
"B9xav0g": "f1yt3bcc",
|
57
|
-
"zhjwy3": ["f7rrh46", "fbde6ui"]
|
35
|
+
"sj55zd": "fdce8r3"
|
58
36
|
},
|
59
37
|
"outOfOffice": {
|
60
|
-
"
|
38
|
+
"sj55zd": "fr0bkrk"
|
61
39
|
},
|
62
40
|
"outOfOfficeAvailable": {
|
63
41
|
"sj55zd": "fqa5hgp"
|
@@ -67,9 +45,27 @@ const useStyles = /*#__PURE__*/__styles({
|
|
67
45
|
},
|
68
46
|
"outOfOfficeAway": {
|
69
47
|
"sj55zd": "f14k8a89"
|
48
|
+
},
|
49
|
+
"tiny": {
|
50
|
+
"Bubjx69": "f9ikmtg",
|
51
|
+
"a9b677": "f16dn6v3",
|
52
|
+
"B5pe6w7": "fab5kbq",
|
53
|
+
"p4uzdd": "f1ms1d91"
|
54
|
+
},
|
55
|
+
"large": {
|
56
|
+
"Bubjx69": "f9ikmtg",
|
57
|
+
"a9b677": "f64fuq3",
|
58
|
+
"B5pe6w7": "f1vfi1yj",
|
59
|
+
"p4uzdd": "f15s34gz"
|
60
|
+
},
|
61
|
+
"extraLarge": {
|
62
|
+
"Bubjx69": "f9ikmtg",
|
63
|
+
"a9b677": "f1w9dchk",
|
64
|
+
"B5pe6w7": "f14efy9b",
|
65
|
+
"p4uzdd": "fhipgdu"
|
70
66
|
}
|
71
67
|
}, {
|
72
|
-
"d": [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".
|
68
|
+
"d": [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1ewtqcl{box-sizing:border-box;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fb8jth9 span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqgqgel{border-bottom-right-radius:50%;}", ".fchfifz{border-bottom-left-radius:50%;}", ".fc7b1hi{border-top-right-radius:50%;}", ".f1dpx5h9{border-top-left-radius:50%;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fvi85wt{color:var(--colorPaletteRedBackground3);}", ".f14k8a89{color:var(--colorPaletteMarigoldBackground3);}", ".fqa5hgp{color:var(--colorPaletteLightGreenForeground3);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fdce8r3{color:var(--colorPaletteBerryForeground3);}", ".fr0bkrk{color:var(--colorNeutralBackground1);}", ".f9ikmtg{aspect-ratio:1;}", ".f16dn6v3{width:6px;}", ".fab5kbq svg{width:6px!important;}", ".f1ms1d91 svg{height:6px!important;}", ".f64fuq3{width:20px;}", ".f1vfi1yj svg{width:20px!important;}", ".f15s34gz svg{height:20px!important;}", ".f1w9dchk{width:28px;}", ".f14efy9b svg{width:28px!important;}", ".fhipgdu svg{height:28px!important;}"]
|
73
69
|
});
|
74
70
|
/**
|
75
71
|
* Applies style classnames to slots
|
@@ -78,7 +74,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
78
74
|
|
79
75
|
export const usePresenceBadgeStyles = state => {
|
80
76
|
const styles = useStyles();
|
81
|
-
state.root.className = mergeClasses(presenceBadgeClassName, styles.root, (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'outOfOffice' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway,
|
82
|
-
return
|
77
|
+
state.root.className = mergeClasses(presenceBadgeClassName, styles.root, (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'outOfOffice' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'outOfOffice' && styles.statusOutOfOffice, state.size === 'tiny' && styles.tiny, state.size === 'large' && styles.large, state.size === 'extra-large' && styles.extraLarge, state.root.className);
|
78
|
+
return state;
|
83
79
|
};
|
84
80
|
//# sourceMappingURL=usePresenceBadgeStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,YAAmC,UAAnC,QAAqD,6BAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,sBAAsB,GAAG,mBAA/B;;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;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KAAiB,aAAtC,IAAuD,MAAM,CAAC,iBAb7B,EAcjC,KAAK,CAAC,IAAN,KAAe,MAAf,IAAyB,MAAM,CAAC,IAdC,EAejC,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,KAfA,EAgBjC,KAAK,CAAC,IAAN,KAAe,aAAf,IAAgC,MAAM,CAAC,UAhBN,EAiBjC,KAAK,CAAC,IAAN,CAAW,SAjBsB,CAAnC;AAoBA,SAAO,KAAP;AACD,CAvBM","sourceRoot":""}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import type { ComponentProps, ComponentState, ObjectShorthandProps } from '@fluentui/react-utilities';
|
3
3
|
export declare type BadgeSlots = {
|
4
|
-
root: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
|
4
|
+
root: ObjectShorthandProps<Omit<React.HTMLAttributes<HTMLElement>, 'color'>>;
|
5
5
|
icon?: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
|
6
6
|
};
|
7
7
|
export declare type BadgeCommons = {
|
@@ -14,7 +14,10 @@ const renderBadge = state => {
|
|
14
14
|
slots,
|
15
15
|
slotProps
|
16
16
|
} = react_utilities_1.getSlots(state, ['icon', 'root']);
|
17
|
-
return React.createElement(slots.root,
|
17
|
+
return React.createElement(slots.root, { ...slotProps.root
|
18
|
+
}, state.iconPosition === 'before' && React.createElement(slots.icon, { ...slotProps.icon
|
19
|
+
}), state.root.children, state.iconPosition === 'after' && React.createElement(slots.icon, { ...slotProps.icon
|
20
|
+
}));
|
18
21
|
};
|
19
22
|
|
20
23
|
exports.renderBadge = renderBadge;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,CAAC,MAAD,EAAS,MAAT,CAA5B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,CAAC,MAAD,EAAS,MAAT,CAA5B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,IAAmC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADtC,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,IAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAHrC,CADF;AAOD,CAVM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourceRoot":""}
|
@@ -7,6 +7,8 @@ exports.useBadgeStyles = exports.badgeClassName = void 0;
|
|
7
7
|
|
8
8
|
const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
|
9
9
|
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
11
|
+
|
10
12
|
exports.badgeClassName = 'fui-Badge';
|
11
13
|
|
12
14
|
const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
@@ -46,33 +48,45 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
46
48
|
"rootSmall": {
|
47
49
|
"Bf4jedk": "fq2vo04",
|
48
50
|
"Bqenvij": "fd461yt",
|
49
|
-
"
|
50
|
-
"
|
51
|
-
"
|
51
|
+
"z8tnut": "fq1loh5",
|
52
|
+
"z189sj": ["f12huiiw", "f161knb0"],
|
53
|
+
"Byoj8tv": "futqtb8",
|
54
|
+
"uwmqm3": ["f161knb0", "f12huiiw"],
|
55
|
+
"i8kkvl": "f1q8lukm",
|
56
|
+
"Belr9w4": "f1ma2n7n",
|
52
57
|
"Be2twd7": "f1n0apg3"
|
53
58
|
},
|
54
59
|
"rootMedium": {
|
55
60
|
"Bqenvij": "fjamq6b",
|
56
61
|
"Bf4jedk": "f11u7vat",
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
62
|
+
"i8kkvl": "f1q8lukm",
|
63
|
+
"Belr9w4": "f1ma2n7n",
|
64
|
+
"z8tnut": "f10ra9hq",
|
65
|
+
"z189sj": ["f8wuabp", "fycuoez"],
|
66
|
+
"Byoj8tv": "f1y2xyjm",
|
67
|
+
"uwmqm3": ["fycuoez", "f8wuabp"],
|
60
68
|
"Be2twd7": "fnmn6fi"
|
61
69
|
},
|
62
70
|
"rootLarge": {
|
63
71
|
"Bf4jedk": "f17fgpbq",
|
64
72
|
"Bqenvij": "frvgh55",
|
65
|
-
"
|
66
|
-
"
|
73
|
+
"z8tnut": "f10ra9hq",
|
74
|
+
"z189sj": ["f8wuabp", "fycuoez"],
|
75
|
+
"Byoj8tv": "f1y2xyjm",
|
76
|
+
"uwmqm3": ["fycuoez", "f8wuabp"],
|
67
77
|
"Be2twd7": "f1ugzwwg",
|
68
|
-
"
|
78
|
+
"i8kkvl": "f1q8lukm",
|
79
|
+
"Belr9w4": "f1ma2n7n"
|
69
80
|
},
|
70
81
|
"rootExtraLarge": {
|
71
82
|
"Bf4jedk": "fwbmr0d",
|
72
83
|
"Bqenvij": "f1d2rq10",
|
73
|
-
"
|
74
|
-
"
|
75
|
-
"
|
84
|
+
"z8tnut": "f1xp5gbu",
|
85
|
+
"z189sj": ["f1sgzk6v", "f1bg5zqg"],
|
86
|
+
"Byoj8tv": "f1d7kygh",
|
87
|
+
"uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
|
88
|
+
"i8kkvl": "fgfbwa2",
|
89
|
+
"Belr9w4": "f1y3hx6l",
|
76
90
|
"Be2twd7": "f1ugzwwg",
|
77
91
|
"B4j52fo": "f18zi460",
|
78
92
|
"Bekrc4i": ["f1wpluaz", "fsfsuhs"],
|
@@ -80,16 +94,25 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
80
94
|
"ibv6hh": ["fsfsuhs", "f1wpluaz"]
|
81
95
|
},
|
82
96
|
"rootRounded": {
|
83
|
-
"
|
97
|
+
"Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
|
98
|
+
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
99
|
+
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
100
|
+
"Btl43ni": ["fyu767a", "f1jar5jt"]
|
84
101
|
},
|
85
102
|
"rootRoundedSmallToTiny": {
|
86
|
-
"
|
103
|
+
"Bbmb7ep": ["f1g3puop", "fi2rrw2"],
|
104
|
+
"Beyfa6y": ["fi2rrw2", "f1g3puop"],
|
105
|
+
"B7oj6ja": ["f1rstyi9", "f1s4nn1u"],
|
106
|
+
"Btl43ni": ["f1s4nn1u", "f1rstyi9"]
|
87
107
|
},
|
88
108
|
"rootCircular": {
|
89
|
-
"
|
109
|
+
"Bbmb7ep": ["fxyqdnz", "fib3qew"],
|
110
|
+
"Beyfa6y": ["fib3qew", "fxyqdnz"],
|
111
|
+
"B7oj6ja": ["f14p2bvz", "fdqj3q4"],
|
112
|
+
"Btl43ni": ["fdqj3q4", "f14p2bvz"]
|
90
113
|
},
|
91
114
|
"rootGhost": {
|
92
|
-
"
|
115
|
+
"De3pzq": "f3rmtva",
|
93
116
|
"icvyot": "f1ern45e",
|
94
117
|
"vrafjx": ["f1n71otn", "f1deefiw"],
|
95
118
|
"oivjwe": "f1h8hb77",
|
@@ -97,7 +120,7 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
97
120
|
"sj55zd": "f1817uup"
|
98
121
|
},
|
99
122
|
"rootOutline": {
|
100
|
-
"
|
123
|
+
"De3pzq": "f3rmtva",
|
101
124
|
"g2u3we": "f1vp46cd",
|
102
125
|
"h3c5rm": ["f1lxz1cr", "ff8nh0i"],
|
103
126
|
"B9xav0g": "fe9j8it",
|
@@ -107,10 +130,10 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
107
130
|
"rootTint": {
|
108
131
|
"De3pzq": "f16xkysk",
|
109
132
|
"sj55zd": "faj9fo0",
|
110
|
-
"g2u3we": "
|
111
|
-
"h3c5rm": ["
|
112
|
-
"B9xav0g": "
|
113
|
-
"zhjwy3": ["
|
133
|
+
"g2u3we": "f161y7kd",
|
134
|
+
"h3c5rm": ["f1c8dzaj", "f1sl6hi9"],
|
135
|
+
"B9xav0g": "f1619yhw",
|
136
|
+
"zhjwy3": ["f1sl6hi9", "f1c8dzaj"]
|
114
137
|
},
|
115
138
|
"rootFilledDanger": {
|
116
139
|
"De3pzq": "fdl5y0r",
|
@@ -130,10 +153,10 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
130
153
|
"rootTintDanger": {
|
131
154
|
"De3pzq": "ff0poqj",
|
132
155
|
"sj55zd": "f1hcrxcs",
|
133
|
-
"g2u3we": "
|
134
|
-
"h3c5rm": ["
|
135
|
-
"B9xav0g": "
|
136
|
-
"zhjwy3": ["
|
156
|
+
"g2u3we": "f1oqjm8o",
|
157
|
+
"h3c5rm": ["fkgrb8g", "frb5wm0"],
|
158
|
+
"B9xav0g": "f1iai1ph",
|
159
|
+
"zhjwy3": ["frb5wm0", "fkgrb8g"]
|
137
160
|
},
|
138
161
|
"rootGhostDanger": {
|
139
162
|
"sj55zd": "f1whyuy6"
|
@@ -141,10 +164,10 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
141
164
|
"rootFilledSevere": {
|
142
165
|
"De3pzq": "f1s438gw",
|
143
166
|
"sj55zd": "f1phragk",
|
144
|
-
"g2u3we": "
|
145
|
-
"h3c5rm": ["
|
146
|
-
"B9xav0g": "
|
147
|
-
"zhjwy3": ["
|
167
|
+
"g2u3we": "fghlq4f",
|
168
|
+
"h3c5rm": ["f1gn591s", "fjscplz"],
|
169
|
+
"B9xav0g": "fb073pr",
|
170
|
+
"zhjwy3": ["fjscplz", "f1gn591s"]
|
148
171
|
},
|
149
172
|
"rootOutlineSevere": {
|
150
173
|
"sj55zd": "f1l8vj45",
|
@@ -193,10 +216,10 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
193
216
|
"rootFilledSuccess": {
|
194
217
|
"De3pzq": "flxk52p",
|
195
218
|
"sj55zd": "f1phragk",
|
196
|
-
"g2u3we": "
|
197
|
-
"h3c5rm": ["
|
198
|
-
"B9xav0g": "
|
199
|
-
"zhjwy3": ["
|
219
|
+
"g2u3we": "fghlq4f",
|
220
|
+
"h3c5rm": ["f1gn591s", "fjscplz"],
|
221
|
+
"B9xav0g": "fb073pr",
|
222
|
+
"zhjwy3": ["fjscplz", "f1gn591s"]
|
200
223
|
},
|
201
224
|
"rootOutlineSuccess": {
|
202
225
|
"sj55zd": "f1sms7z7",
|
@@ -225,11 +248,11 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
225
248
|
"zhjwy3": ["fjscplz", "f1gn591s"]
|
226
249
|
},
|
227
250
|
"rootOutlineImportant": {
|
228
|
-
"sj55zd": "
|
229
|
-
"g2u3we": "
|
230
|
-
"h3c5rm": ["
|
231
|
-
"B9xav0g": "
|
232
|
-
"zhjwy3": ["
|
251
|
+
"sj55zd": "f11d4kpn",
|
252
|
+
"g2u3we": "fq0vr37",
|
253
|
+
"h3c5rm": ["f1byw159", "f11cr0be"],
|
254
|
+
"B9xav0g": "f1c1zstj",
|
255
|
+
"zhjwy3": ["f11cr0be", "f1byw159"]
|
233
256
|
},
|
234
257
|
"rootTintImportant": {
|
235
258
|
"De3pzq": "f945g0u",
|
@@ -251,12 +274,11 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
251
274
|
"zhjwy3": ["fjscplz", "f1gn591s"]
|
252
275
|
},
|
253
276
|
"rootOutlineInformative": {
|
254
|
-
"
|
255
|
-
"
|
256
|
-
"
|
257
|
-
"
|
258
|
-
"
|
259
|
-
"zhjwy3": ["f6dh4jx", "fdav146"]
|
277
|
+
"sj55zd": "f11d4kpn",
|
278
|
+
"g2u3we": "f68mrw8",
|
279
|
+
"h3c5rm": ["f7pw515", "fw35ms5"],
|
280
|
+
"B9xav0g": "frpde29",
|
281
|
+
"zhjwy3": ["fw35ms5", "f7pw515"]
|
260
282
|
},
|
261
283
|
"rootTintInformative": {
|
262
284
|
"De3pzq": "f1ctqxl6",
|
@@ -267,7 +289,7 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
267
289
|
"zhjwy3": ["fw35ms5", "f7pw515"]
|
268
290
|
},
|
269
291
|
"rootGhostInformative": {
|
270
|
-
"sj55zd": "
|
292
|
+
"sj55zd": "f11d4kpn"
|
271
293
|
},
|
272
294
|
"rootFilledSubtle": {
|
273
295
|
"De3pzq": "fxugw4r",
|
@@ -278,11 +300,11 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
278
300
|
"zhjwy3": ["fjscplz", "f1gn591s"]
|
279
301
|
},
|
280
302
|
"rootOutlineSubtle": {
|
281
|
-
"sj55zd": "
|
282
|
-
"g2u3we": "
|
283
|
-
"h3c5rm": ["
|
284
|
-
"B9xav0g": "
|
285
|
-
"zhjwy3": ["
|
303
|
+
"sj55zd": "fqpbvvt",
|
304
|
+
"g2u3we": "fgtodeh",
|
305
|
+
"h3c5rm": ["fm9lria", "fvwj3xt"],
|
306
|
+
"B9xav0g": "f7asi1z",
|
307
|
+
"zhjwy3": ["fvwj3xt", "fm9lria"]
|
286
308
|
},
|
287
309
|
"rootTintSubtle": {
|
288
310
|
"De3pzq": "fxugw4r",
|
@@ -293,7 +315,7 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
293
315
|
"zhjwy3": ["fw35ms5", "f7pw515"]
|
294
316
|
},
|
295
317
|
"rootGhostSubtle": {
|
296
|
-
"sj55zd": "
|
318
|
+
"sj55zd": "fqpbvvt"
|
297
319
|
},
|
298
320
|
"icon": {
|
299
321
|
"mc9l5x": "f22iagw",
|
@@ -302,7 +324,7 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
302
324
|
"Bqenvij": "f1l02sjl"
|
303
325
|
}
|
304
326
|
}, {
|
305
|
-
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1ewtqcl{box-sizing:border-box;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1vp46cd{border-top-color:var(--colorBrandBackground);}", ".f1lxz1cr{border-right-color:var(--colorBrandBackground);}", ".ff8nh0i{border-left-color:var(--colorBrandBackground);}", ".fe9j8it{border-bottom-color:var(--colorBrandBackground);}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f10pi13n{position:relative;}", ".f16dn6v3{width:6px;}", ".f3mu39s{height:6px;}", ".f130uwy9{font-size:4px;}", ".fpd43o0{width:10px;}", ".f30q22z{height:10px;}", ".f1tccstq{font-size:6px;}", ".fq2vo04{min-width:16px;}", ".fd461yt{height:16px;}", ".
|
327
|
+
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1ewtqcl{box-sizing:border-box;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1vp46cd{border-top-color:var(--colorBrandBackground);}", ".f1lxz1cr{border-right-color:var(--colorBrandBackground);}", ".ff8nh0i{border-left-color:var(--colorBrandBackground);}", ".fe9j8it{border-bottom-color:var(--colorBrandBackground);}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f10pi13n{position:relative;}", ".f16dn6v3{width:6px;}", ".f3mu39s{height:6px;}", ".f130uwy9{font-size:4px;}", ".fpd43o0{width:10px;}", ".f30q22z{height:10px;}", ".f1tccstq{font-size:6px;}", ".fq2vo04{min-width:16px;}", ".fd461yt{height:16px;}", ".fq1loh5{padding-top:2px;}", ".f12huiiw{padding-right:2px;}", ".f161knb0{padding-left:2px;}", ".futqtb8{padding-bottom:2px;}", ".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}", ".f1ma2n7n{row-gap:4px;}", ".f1n0apg3{font-size:8px;}", ".fjamq6b{height:20px;}", ".f11u7vat{min-width:20px;}", ".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".fnmn6fi{font-size:10px;}", ".f17fgpbq{min-width:24px;}", ".frvgh55{height:24px;}", ".f1ugzwwg{font-size:12px;}", ".fwbmr0d{min-width:32px;}", ".f1d2rq10{height:32px;}", ".f1xp5gbu{padding-top:6px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f1y3hx6l{row-gap:6px;}", ".f18zi460{border-top-width:var(--strokeWidthThick);}", ".f1wpluaz{border-right-width:var(--strokeWidthThick);}", ".fsfsuhs{border-left-width:var(--strokeWidthThick);}", ".fmklw6v{border-bottom-width:var(--strokeWidthThick);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}", ".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}", ".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}", ".fxyqdnz{border-bottom-right-radius:99px;}", ".fib3qew{border-bottom-left-radius:99px;}", ".f14p2bvz{border-top-right-radius:99px;}", ".fdqj3q4{border-top-left-radius:99px;}", ".f3rmtva{background-color:transparent;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f1817uup{color:var(--colorBrandBackground);}", ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".faj9fo0{color:var(--colorBrandForeground2);}", ".f161y7kd{border-top-color:var(--colorBrandStroke2);}", ".f1c8dzaj{border-right-color:var(--colorBrandStroke2);}", ".f1sl6hi9{border-left-color:var(--colorBrandStroke2);}", ".f1619yhw{border-bottom-color:var(--colorBrandStroke2);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f11ttmz8{border-top-color:var(--colorPaletteRedBackground3);}", ".f1ratw88{border-right-color:var(--colorPaletteRedBackground3);}", ".f459ikj{border-left-color:var(--colorPaletteRedBackground3);}", ".fvovscg{border-bottom-color:var(--colorPaletteRedBackground3);}", ".f1whyuy6{color:var(--colorPaletteRedForeground3);}", ".f1tg094z{border-top-color:var(--colorPaletteRedForeground3);}", ".f19abfc5{border-right-color:var(--colorPaletteRedForeground3);}", ".f1cj97ds{border-left-color:var(--colorPaletteRedForeground3);}", ".f1i5u4jy{border-bottom-color:var(--colorPaletteRedForeground3);}", ".ff0poqj{background-color:var(--colorPaletteRedBackground1);}", ".f1hcrxcs{color:var(--colorPaletteRedForeground1);}", ".f1oqjm8o{border-top-color:var(--colorPaletteRedBorder1);}", ".fkgrb8g{border-right-color:var(--colorPaletteRedBorder1);}", ".frb5wm0{border-left-color:var(--colorPaletteRedBorder1);}", ".f1iai1ph{border-bottom-color:var(--colorPaletteRedBorder1);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f1l8vj45{color:var(--colorPaletteDarkOrangeForeground3);}", ".f1wahxdx{border-top-color:var(--colorPaletteDarkOrangeForeground3);}", ".fpbzgcg{border-right-color:var(--colorPaletteDarkOrangeForeground3);}", ".f1g7u8zt{border-left-color:var(--colorPaletteDarkOrangeForeground3);}", ".f1wrnc4t{border-bottom-color:var(--colorPaletteDarkOrangeForeground3);}", ".f1xzsg4{background-color:var(--colorPaletteDarkOrangeBackground1);}", ".f1k5f75o{color:var(--colorPaletteDarkOrangeForeground1);}", ".f18s257e{border-top-color:var(--colorPaletteDarkOrangeForeground2);}", ".f13ptu4t{border-right-color:var(--colorPaletteDarkOrangeForeground2);}", ".fiwx4jo{border-left-color:var(--colorPaletteDarkOrangeForeground2);}", ".f1geyuz0{border-bottom-color:var(--colorPaletteDarkOrangeForeground2);}", ".ffq97bm{background-color:var(--colorPaletteYellowBackground3);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1gyeiz5{border-top-color:var(--colorPaletteYellowBackground3);}", ".f1jnj1iq{border-right-color:var(--colorPaletteYellowBackground3);}", ".fd1epeu{border-left-color:var(--colorPaletteYellowBackground3);}", ".f102bkgo{border-bottom-color:var(--colorPaletteYellowBackground3);}", ".fpti2h4{color:var(--colorPaletteYellowForeground2);}", ".fbahunb{border-top-color:var(--colorPaletteYellowForeground2);}", ".fa2hcp6{border-right-color:var(--colorPaletteYellowForeground2);}", ".f1cr20yc{border-left-color:var(--colorPaletteYellowForeground2);}", ".f1fbl5g1{border-bottom-color:var(--colorPaletteYellowForeground2);}", ".f10s6hli{background-color:var(--colorPaletteYellowBackground1);}", ".f1e2bpek{border-top-color:var(--colorPaletteYellowBackground2);}", ".fnu3uvp{border-right-color:var(--colorPaletteYellowBackground2);}", ".fdpwmi9{border-left-color:var(--colorPaletteYellowBackground2);}", ".fk8fs0c{border-bottom-color:var(--colorPaletteYellowBackground2);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}", ".f1sms7z7{color:var(--colorPaletteGreenForeground2);}", ".f7obisw{border-top-color:var(--colorPaletteGreenForeground2);}", ".f108f34s{border-right-color:var(--colorPaletteGreenForeground2);}", ".f1chpoyh{border-left-color:var(--colorPaletteGreenForeground2);}", ".f1xtovf2{border-bottom-color:var(--colorPaletteGreenForeground2);}", ".f2vsrz6{background-color:var(--colorPaletteGreenBackground1);}", ".ffmvakt{color:var(--colorPaletteGreenForeground1);}", ".f3m3qtd{border-top-color:var(--colorPaletteGreenBackground2);}", ".f1bjyn17{border-right-color:var(--colorPaletteGreenBackground2);}", ".fksln3n{border-left-color:var(--colorPaletteGreenBackground2);}", ".frg4y0o{border-bottom-color:var(--colorPaletteGreenBackground2);}", ".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}", ".f1c73kur{background-color:var(--colorNeutralForeground1);}", ".fr0bkrk{color:var(--colorNeutralBackground1);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fq0vr37{border-top-color:var(--colorNeutralStrokeAccessible);}", ".f1byw159{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f11cr0be{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f945g0u{background-color:var(--colorNeutralForeground3);}", ".f3vzo32{background-color:var(--colorNeutralBackground5);}", ".f68mrw8{border-top-color:var(--colorNeutralStroke2);}", ".f7pw515{border-right-color:var(--colorNeutralStroke2);}", ".fw35ms5{border-left-color:var(--colorNeutralStroke2);}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".f1ctqxl6{background-color:var(--colorNeutralBackground4);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fqpbvvt{color:var(--colorNeutralForegroundInverted);}", ".fgtodeh{border-top-color:var(--colorNeutralForegroundInverted);}", ".fm9lria{border-right-color:var(--colorNeutralForegroundInverted);}", ".fvwj3xt{border-left-color:var(--colorNeutralForegroundInverted);}", ".f7asi1z{border-bottom-color:var(--colorNeutralForegroundInverted);}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fxe27oy{-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}", ".f1l02sjl{height:100%;}"]
|
306
328
|
});
|
307
329
|
/**
|
308
330
|
* Applies style classnames to slots
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/useBadgeStyles.ts"],"names":[],"mappings":";;;;;;;
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/useBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,cAAA,GAAiB,WAAjB;;AAEb,MAAM,SAAS,gBAAG,mBAAA,SAAA;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;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;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;AAA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AI,WAAV,IAAyB,MAAM,CAAC,iBAnCX,EAoCrB,OAAO,IAAI,WAAX,IAA0B,MAAM,CAAC,kBApCZ,EAqCrB,QAAQ,IAAI,aAAZ,IAA6B,MAAM,CAAC,qBArCf,EAsCrB,SAAS,IAAI,aAAb,IAA8B,MAAM,CAAC,sBAtChB,EAuCrB,MAAM,IAAI,aAAV,IAA2B,MAAM,CAAC,mBAvCb,EAwCrB,OAAO,IAAI,aAAX,IAA4B,MAAM,CAAC,oBAxCd,EAyCrB,QAAQ,IAAI,QAAZ,IAAwB,MAAM,CAAC,gBAzCV,EA0CrB,SAAS,IAAI,QAAb,IAAyB,MAAM,CAAC,iBA1CX,EA2CrB,MAAM,IAAI,QAAV,IAAsB,MAAM,CAAC,cA3CR,EA4CrB,OAAO,IAAI,QAAX,IAAuB,MAAM,CAAC,eA5CT,EA6CrB,KAAK,CAAC,IAAN,CAAW,SA7CU,CAAvB;;AAgDA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,MAAM,CAAC,IAApB,EAA0B,KAAK,CAAC,IAAN,CAAW,SAArC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CAnEM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourceRoot":""}
|
@@ -30,12 +30,11 @@ 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
|
-
|
35
|
-
|
36
|
-
*/
|
37
|
-
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & Partial<CounterBadgeCommons>;
|
38
|
-
/**
|
39
|
-
* {@docCategory CounterBadge}
|
40
|
-
*/
|
41
|
-
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape'> & CounterBadgeCommons;
|
39
|
+
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape' | 'color'> & Partial<CounterBadgeCommons>;
|
40
|
+
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,U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