@fluentui/react-badge 9.0.0-nightly.b5b7401007.0 → 9.0.0-rc.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +382 -28
- package/CHANGELOG.md +88 -13
- package/dist/react-badge.d.ts +33 -28
- package/lib/Badge.js.map +1 -1
- package/lib/CounterBadge.js.map +1 -1
- package/lib/PresenceBadge.js.map +1 -1
- package/lib/components/Badge/Badge.d.ts +1 -1
- package/lib/components/Badge/Badge.js +8 -8
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Badge/Badge.types.d.ts +4 -5
- package/lib/components/Badge/Badge.types.js.map +1 -1
- package/lib/components/Badge/index.d.ts +1 -1
- package/lib/components/Badge/index.js +0 -1
- package/lib/components/Badge/index.js.map +1 -1
- package/lib/components/Badge/renderBadge.d.ts +1 -1
- package/lib/components/Badge/renderBadge.js +9 -7
- package/lib/components/Badge/renderBadge.js.map +1 -1
- package/lib/components/Badge/useBadge.d.ts +1 -1
- package/lib/components/Badge/useBadge.js +19 -22
- package/lib/components/Badge/useBadge.js.map +1 -1
- package/lib/components/Badge/useBadgeStyles.d.ts +2 -1
- package/lib/components/Badge/useBadgeStyles.js +210 -203
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.d.ts +1 -1
- package/lib/components/CounterBadge/CounterBadge.js +8 -8
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +9 -9
- package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib/components/CounterBadge/index.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -1
- package/lib/components/CounterBadge/useCounterBadge.js +19 -25
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +2 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +10 -40
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.d.ts +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.js +8 -8
- package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +7 -5
- package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib/components/PresenceBadge/index.js.map +1 -1
- 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.d.ts +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.js +36 -25
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +2 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +43 -46
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Badge.js +1 -1
- package/lib-commonjs/Badge.js.map +1 -1
- package/lib-commonjs/CounterBadge.js +1 -1
- package/lib-commonjs/CounterBadge.js.map +1 -1
- package/lib-commonjs/PresenceBadge.js +1 -1
- package/lib-commonjs/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.d.ts +1 -1
- package/lib-commonjs/components/Badge/Badge.js +9 -9
- package/lib-commonjs/components/Badge/Badge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.d.ts +4 -5
- package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
- package/lib-commonjs/components/Badge/index.d.ts +1 -1
- package/lib-commonjs/components/Badge/index.js +1 -3
- package/lib-commonjs/components/Badge/index.js.map +1 -1
- package/lib-commonjs/components/Badge/renderBadge.d.ts +1 -1
- package/lib-commonjs/components/Badge/renderBadge.js +13 -12
- package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadge.d.ts +1 -1
- package/lib-commonjs/components/Badge/useBadge.js +22 -26
- package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +2 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.js +214 -205
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.js +9 -9
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +9 -9
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/index.js +1 -1
- package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js +21 -28
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +2 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +13 -42
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +9 -9
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +7 -5
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/index.js +1 -1
- package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
- 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.d.ts +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +38 -28
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +2 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +46 -48
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +14 -15
- 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 -111
- 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 -127
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
@@ -5,22 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.CounterBadge = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
|
10
|
+
const useCounterBadge_1 = /*#__PURE__*/require("./useCounterBadge");
|
11
11
|
|
12
|
-
|
12
|
+
const useCounterBadgeStyles_1 = /*#__PURE__*/require("./useCounterBadgeStyles");
|
13
13
|
|
14
|
-
|
14
|
+
const index_1 = /*#__PURE__*/require("../Badge/index");
|
15
15
|
/**
|
16
|
-
* Define a styled CounterBadge, using the `
|
16
|
+
* Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
exports.CounterBadge = /*#__PURE__*/React.forwardRef(
|
21
|
-
|
22
|
-
useCounterBadgeStyles_1.
|
23
|
-
return index_1.
|
20
|
+
exports.CounterBadge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
+
const state = useCounterBadge_1.useCounterBadge_unstable(props, ref);
|
22
|
+
useCounterBadgeStyles_1.useCounterBadgeStyles_unstable(state);
|
23
|
+
return index_1.renderBadge_unstable(state);
|
24
24
|
});
|
25
25
|
exports.CounterBadge.displayName = 'CounterBadge';
|
26
26
|
//# sourceMappingURL=CounterBadge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,iBAAA,CAAA,wBAAA,CAAyB,KAAzB,EAAgC,GAAhC,CAAd;AACA,EAAA,uBAAA,CAAA,8BAAA,CAA+B,KAA/B;AAEA,SAAO,OAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALmE,CAAvD;AAOb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport { useCounterBadge_unstable } from './useCounterBadge';\nimport { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles';\nimport { renderBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps } from './CounterBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.\n */\nexport const CounterBadge: ForwardRefComponent<CounterBadgeProps> = React.forwardRef((props, ref) => {\n const state = useCounterBadge_unstable(props, ref);\n useCounterBadgeStyles_unstable(state);\n\n return renderBadge_unstable(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"sourceRoot":"../src/"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { BadgeProps, BadgeState } from '../Badge/index';
|
2
|
-
|
2
|
+
declare type CounterBadgeCommons = {
|
3
3
|
/**
|
4
4
|
* Max number to be displayed
|
5
5
|
* @default 99
|
@@ -30,12 +30,12 @@ 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;
|
41
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CounterBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './CounterBadge';\nexport * from './CounterBadge.types';\nexport * from './useCounterBadge';\nexport * from './useCounterBadgeStyles';\n"],"sourceRoot":"../src/"}
|
@@ -3,4 +3,4 @@ import type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types'
|
|
3
3
|
/**
|
4
4
|
* Returns the props and state required to render the component
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useCounterBadge_unstable: (props: CounterBadgeProps, ref: React.Ref<HTMLElement>) => CounterBadgeState;
|
@@ -3,45 +3,38 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCounterBadge_unstable = void 0;
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
var index_1 = /*#__PURE__*/require("../Badge/index");
|
8
|
+
const index_1 = /*#__PURE__*/require("../Badge/index");
|
11
9
|
/**
|
12
10
|
* Returns the props and state required to render the component
|
13
11
|
*/
|
14
12
|
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
showZero: showZero,
|
34
|
-
overflowCount: overflowCount,
|
35
|
-
count: count,
|
36
|
-
dot: dot
|
37
|
-
});
|
14
|
+
const useCounterBadge_unstable = (props, ref) => {
|
15
|
+
const {
|
16
|
+
shape = 'circular',
|
17
|
+
appearance = 'filled',
|
18
|
+
showZero = false,
|
19
|
+
overflowCount = 99,
|
20
|
+
count = 0,
|
21
|
+
dot = false
|
22
|
+
} = props;
|
23
|
+
const state = { ...index_1.useBadge_unstable(props, ref),
|
24
|
+
shape,
|
25
|
+
appearance,
|
26
|
+
showZero,
|
27
|
+
overflowCount,
|
28
|
+
count,
|
29
|
+
dot
|
30
|
+
};
|
38
31
|
|
39
32
|
if (!state.dot && !state.root.children) {
|
40
|
-
state.root.children = state.count > state.overflowCount ? state.overflowCount
|
33
|
+
state.root.children = state.count > state.overflowCount ? `${state.overflowCount}+` : `${state.count}`;
|
41
34
|
}
|
42
35
|
|
43
36
|
return state;
|
44
37
|
};
|
45
38
|
|
46
|
-
exports.
|
39
|
+
exports.useCounterBadge_unstable = useCounterBadge_unstable;
|
47
40
|
//# sourceMappingURL=useCounterBadge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,wBAAwB,GAAG,CAAC,KAAD,EAA2B,GAA3B,KAA6E;AACnH,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,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,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,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useCounterBadge_unstable = (props: CounterBadgeProps, ref: React.Ref<HTMLElement>): CounterBadgeState => {\n const {\n shape = 'circular',\n appearance = 'filled',\n showZero = false,\n overflowCount = 99,\n count = 0,\n dot = false,\n } = props;\n\n const state: CounterBadgeState = {\n ...(useBadge_unstable(props, ref) as CounterBadgeState),\n shape,\n appearance,\n showZero,\n overflowCount,\n count,\n dot,\n };\n\n if (!state.dot && !state.root.children) {\n state.root.children = state.count > state.overflowCount ? `${state.overflowCount}+` : `${state.count}`;\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CounterBadgeState } from './CounterBadge.types';
|
2
|
+
export declare const counterBadgeClassName = "fui-CounterBadge";
|
2
3
|
/**
|
3
4
|
* Applies style classnames to slots
|
4
5
|
*/
|
5
|
-
export declare const
|
6
|
+
export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState) => CounterBadgeState;
|
@@ -3,46 +3,17 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCounterBadgeStyles_unstable = exports.counterBadgeClassName = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
|
-
|
10
|
+
const useBadgeStyles_1 = /*#__PURE__*/require("../Badge/useBadgeStyles");
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
},
|
16
|
-
"warning": {
|
17
|
-
"De3pzq": "fic4z9l",
|
18
|
-
"g2u3we": "f1g6aqbb",
|
19
|
-
"h3c5rm": ["f1xc4egn", "f1y13pv"],
|
20
|
-
"B9xav0g": "f12f05r9",
|
21
|
-
"zhjwy3": ["f1y13pv", "f1xc4egn"]
|
22
|
-
},
|
23
|
-
"important": {
|
24
|
-
"De3pzq": "f1y11cvn",
|
25
|
-
"g2u3we": "f9ag23u",
|
26
|
-
"h3c5rm": ["fzlvby", "fj2uge6"],
|
27
|
-
"B9xav0g": "fk41dq4",
|
28
|
-
"zhjwy3": ["fj2uge6", "fzlvby"]
|
29
|
-
},
|
30
|
-
"severe": {
|
31
|
-
"De3pzq": "ftpr1dl",
|
32
|
-
"g2u3we": "fx7g4rx",
|
33
|
-
"h3c5rm": ["f1edxl4n", "f5hlgd2"],
|
34
|
-
"B9xav0g": "f5ppncr",
|
35
|
-
"zhjwy3": ["f5hlgd2", "f1edxl4n"]
|
36
|
-
},
|
37
|
-
"informative": {
|
38
|
-
"De3pzq": "f6zwqgc",
|
39
|
-
"g2u3we": "f1pdtvjr",
|
40
|
-
"h3c5rm": ["f1ctwv29", "f1m7luuw"],
|
41
|
-
"B9xav0g": "f1ijpqjr",
|
42
|
-
"zhjwy3": ["f1m7luuw", "f1ctwv29"],
|
43
|
-
"sj55zd": "f11d4kpn"
|
44
|
-
},
|
12
|
+
exports.counterBadgeClassName = 'fui-CounterBadge';
|
13
|
+
|
14
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
45
15
|
"dot": {
|
16
|
+
"Bf4jedk": "fgfkb25",
|
46
17
|
"a9b677": "f16dn6v3",
|
47
18
|
"Bqenvij": "f3mu39s",
|
48
19
|
"z8tnut": "f1g0x7ka",
|
@@ -54,18 +25,18 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
54
25
|
"mc9l5x": "fjseox"
|
55
26
|
}
|
56
27
|
}, {
|
57
|
-
"d": [".fgfkb25{min-width:auto;}", ".
|
28
|
+
"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;}"]
|
58
29
|
});
|
59
30
|
/**
|
60
31
|
* Applies style classnames to slots
|
61
32
|
*/
|
62
33
|
|
63
34
|
|
64
|
-
|
65
|
-
|
66
|
-
state.root.className =
|
67
|
-
return useBadgeStyles_1.
|
35
|
+
const useCounterBadgeStyles_unstable = state => {
|
36
|
+
const styles = useStyles();
|
37
|
+
state.root.className = react_1.mergeClasses(exports.counterBadgeClassName, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
|
38
|
+
return useBadgeStyles_1.useBadgeStyles_unstable(state);
|
68
39
|
};
|
69
40
|
|
70
|
-
exports.
|
41
|
+
exports.useCounterBadgeStyles_unstable = useCounterBadgeStyles_unstable;
|
71
42
|
//# sourceMappingURL=useCounterBadgeStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGa,OAAA,CAAA,qBAAA,GAAwB,kBAAxB;;AAEb,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAYA;;AAEG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAAgD;AAC5F,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,qBADqB,EAErB,KAAK,CAAC,GAAN,IAAa,MAAM,CAAC,GAFC,EAGrB,CAAC,KAAK,CAAC,QAAP,IAAmB,KAAK,CAAC,KAAN,KAAgB,CAAnC,IAAwC,CAAC,KAAK,CAAC,GAA/C,IAAsD,MAAM,CAAC,IAHxC,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;AAMA,SAAO,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAP;AACD,CATM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { useBadgeStyles_unstable } from '../Badge/useBadgeStyles';\nimport type { CounterBadgeState } from './CounterBadge.types';\n\nexport const counterBadgeClassName = 'fui-CounterBadge';\n\nconst useStyles = makeStyles({\n dot: {\n minWidth: 'auto',\n width: '6px',\n height: '6px',\n ...shorthands.padding('0'),\n },\n hide: {\n display: 'none',\n },\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const useCounterBadgeStyles_unstable = (state: CounterBadgeState): CounterBadgeState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n counterBadgeClassName,\n state.dot && styles.dot,\n !state.showZero && state.count === 0 && !state.dot && styles.hide,\n state.root.className,\n );\n return useBadgeStyles_unstable(state) as CounterBadgeState;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { PresenceBadgeProps } from './PresenceBadge.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
* Define a styled Badge, using the `
|
4
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
5
5
|
*/
|
6
6
|
export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
|
@@ -5,22 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.PresenceBadge = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
|
10
|
+
const usePresenceBadge_1 = /*#__PURE__*/require("./usePresenceBadge");
|
11
11
|
|
12
|
-
|
12
|
+
const usePresenceBadgeStyles_1 = /*#__PURE__*/require("./usePresenceBadgeStyles");
|
13
13
|
|
14
|
-
|
14
|
+
const Badge_1 = /*#__PURE__*/require("../../Badge");
|
15
15
|
/**
|
16
|
-
* Define a styled Badge, using the `
|
16
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
exports.PresenceBadge = /*#__PURE__*/React.forwardRef(
|
21
|
-
|
22
|
-
usePresenceBadgeStyles_1.
|
23
|
-
return Badge_1.
|
20
|
+
exports.PresenceBadge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
+
const state = usePresenceBadge_1.usePresenceBadge_unstable(props, ref);
|
22
|
+
usePresenceBadgeStyles_1.usePresenceBadgeStyles_unstable(state);
|
23
|
+
return Badge_1.renderBadge_unstable(state);
|
24
24
|
});
|
25
25
|
exports.PresenceBadge.displayName = 'PresenceBadge';
|
26
26
|
//# sourceMappingURL=PresenceBadge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,aAAA,gBAAyD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,kBAAA,CAAA,yBAAA,CAA0B,KAA1B,EAAiC,GAAjC,CAAd;AACA,EAAA,wBAAA,CAAA,+BAAA,CAAgC,KAAhC;AAEA,SAAO,OAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALqE,CAAzD;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge_unstable } from './usePresenceBadge';\nimport { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles';\nimport { renderBadge_unstable } from '../../Badge';\nimport type { PresenceBadgeProps } from './PresenceBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const PresenceBadge: ForwardRefComponent<PresenceBadgeProps> = React.forwardRef((props, ref) => {\n const state = usePresenceBadge_unstable(props, ref);\n usePresenceBadgeStyles_unstable(state);\n\n return renderBadge_unstable(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';
|
2
|
+
import type { BadgeCommons, BadgeSlots } from '../Badge/Badge.types';
|
2
3
|
export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
|
3
|
-
|
4
|
+
declare type PresenceBadgeCommons = {
|
4
5
|
/**
|
5
6
|
* Represents several status
|
6
7
|
* @default available
|
@@ -12,6 +13,7 @@ export interface PresenceBadgeCommons {
|
|
12
13
|
* @default false
|
13
14
|
*/
|
14
15
|
outOfOffice: boolean;
|
15
|
-
}
|
16
|
-
export declare type PresenceBadgeProps =
|
17
|
-
export declare type PresenceBadgeState =
|
16
|
+
} & BadgeCommons;
|
17
|
+
export declare type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root'>>, 'color'> & Partial<Pick<PresenceBadgeCommons, 'status' | 'outOfOffice' | 'size'>>;
|
18
|
+
export declare type PresenceBadgeState = PresenceBadgeCommons & ComponentState<BadgeSlots>;
|
19
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/PresenceBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { PresenceBadgeState } from './PresenceBadge.types';
|
3
|
+
export declare const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
4
|
+
export declare const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
5
|
+
export declare const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
6
|
+
export declare const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
7
|
+
export declare const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
8
|
+
export declare const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
9
|
+
export declare const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
10
|
+
export declare const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
11
|
+
export declare const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
@@ -0,0 +1,136 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.presenceUnknownRegular = exports.presenceOfflineRegular = exports.presenceOofRegular = exports.presenceDndRegular = exports.presenceDndFilled = exports.presenceBusyFilled = exports.presenceAvailableFilled = exports.presenceAvailableRegular = exports.presenceAwayFilled = void 0;
|
7
|
+
|
8
|
+
const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
|
9
|
+
|
10
|
+
exports.presenceAwayFilled = {
|
11
|
+
// FIXME not all presence icon sizes are available
|
12
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
13
|
+
tiny: react_icons_1.PresenceAway10Filled,
|
14
|
+
'extra-small': react_icons_1.PresenceAway10Filled,
|
15
|
+
small: react_icons_1.PresenceAway12Filled,
|
16
|
+
medium: react_icons_1.PresenceAway16Filled,
|
17
|
+
// FIXME not all presence icon sizes are available
|
18
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
19
|
+
large: react_icons_1.PresenceAway16Filled,
|
20
|
+
// FIXME not all presence icon sizes are available
|
21
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
22
|
+
'extra-large': react_icons_1.PresenceAway16Filled
|
23
|
+
};
|
24
|
+
exports.presenceAvailableRegular = {
|
25
|
+
// FIXME not all presence icon sizes are available
|
26
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
27
|
+
tiny: react_icons_1.PresenceAvailable10Regular,
|
28
|
+
'extra-small': react_icons_1.PresenceAvailable10Regular,
|
29
|
+
small: react_icons_1.PresenceAvailable12Regular,
|
30
|
+
medium: react_icons_1.PresenceAvailable16Regular,
|
31
|
+
// FIXME not all presence icon sizes are available
|
32
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
33
|
+
large: react_icons_1.PresenceAvailable16Regular,
|
34
|
+
// FIXME not all presence icon sizes are available
|
35
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
36
|
+
'extra-large': react_icons_1.PresenceAvailable16Regular
|
37
|
+
};
|
38
|
+
exports.presenceAvailableFilled = {
|
39
|
+
// FIXME not all presence icon sizes are available
|
40
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
41
|
+
tiny: react_icons_1.PresenceAvailable10Filled,
|
42
|
+
'extra-small': react_icons_1.PresenceAvailable10Filled,
|
43
|
+
small: react_icons_1.PresenceAvailable12Filled,
|
44
|
+
medium: react_icons_1.PresenceAvailable16Filled,
|
45
|
+
// FIXME not all presence icon sizes are available
|
46
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
47
|
+
large: react_icons_1.PresenceAvailable16Filled,
|
48
|
+
// FIXME not all presence icon sizes are available
|
49
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
50
|
+
'extra-large': react_icons_1.PresenceAvailable16Filled
|
51
|
+
};
|
52
|
+
exports.presenceBusyFilled = {
|
53
|
+
// FIXME not all presence icon sizes are available
|
54
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
55
|
+
tiny: react_icons_1.PresenceBusy10Filled,
|
56
|
+
'extra-small': react_icons_1.PresenceBusy10Filled,
|
57
|
+
small: react_icons_1.PresenceBusy12Filled,
|
58
|
+
medium: react_icons_1.PresenceBusy16Filled,
|
59
|
+
// FIXME not all presence icon sizes are available
|
60
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
61
|
+
large: react_icons_1.PresenceBusy16Filled,
|
62
|
+
// FIXME not all presence icon sizes are available
|
63
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
64
|
+
'extra-large': react_icons_1.PresenceBusy16Filled
|
65
|
+
};
|
66
|
+
exports.presenceDndFilled = {
|
67
|
+
// FIXME not all presence icon sizes are available
|
68
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
69
|
+
tiny: react_icons_1.PresenceDnd10Filled,
|
70
|
+
'extra-small': react_icons_1.PresenceDnd10Filled,
|
71
|
+
small: react_icons_1.PresenceDnd12Filled,
|
72
|
+
medium: react_icons_1.PresenceDnd16Filled,
|
73
|
+
// FIXME not all presence icon sizes are available
|
74
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
75
|
+
large: react_icons_1.PresenceDnd16Filled,
|
76
|
+
// FIXME not all presence icon sizes are available
|
77
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
78
|
+
'extra-large': react_icons_1.PresenceDnd16Filled
|
79
|
+
};
|
80
|
+
exports.presenceDndRegular = {
|
81
|
+
// FIXME not all presence icon sizes are available
|
82
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
83
|
+
tiny: react_icons_1.PresenceDnd10Regular,
|
84
|
+
'extra-small': react_icons_1.PresenceDnd10Regular,
|
85
|
+
small: react_icons_1.PresenceDnd12Regular,
|
86
|
+
medium: react_icons_1.PresenceDnd16Regular,
|
87
|
+
// FIXME not all presence icon sizes are available
|
88
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
89
|
+
large: react_icons_1.PresenceDnd16Regular,
|
90
|
+
// FIXME not all presence icon sizes are available
|
91
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
92
|
+
'extra-large': react_icons_1.PresenceDnd16Regular
|
93
|
+
};
|
94
|
+
exports.presenceOofRegular = {
|
95
|
+
// FIXME not all presence icon sizes are available
|
96
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
97
|
+
tiny: react_icons_1.PresenceOof10Regular,
|
98
|
+
'extra-small': react_icons_1.PresenceOof10Regular,
|
99
|
+
small: react_icons_1.PresenceOof12Regular,
|
100
|
+
medium: react_icons_1.PresenceOof16Regular,
|
101
|
+
// FIXME not all presence icon sizes are available
|
102
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
103
|
+
large: react_icons_1.PresenceOof16Regular,
|
104
|
+
// FIXME not all presence icon sizes are available
|
105
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
106
|
+
'extra-large': react_icons_1.PresenceOof16Regular
|
107
|
+
};
|
108
|
+
exports.presenceOfflineRegular = {
|
109
|
+
// FIXME not all presence icon sizes are available
|
110
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
111
|
+
tiny: react_icons_1.PresenceOffline10Regular,
|
112
|
+
'extra-small': react_icons_1.PresenceOffline10Regular,
|
113
|
+
small: react_icons_1.PresenceOffline12Regular,
|
114
|
+
medium: react_icons_1.PresenceOffline16Regular,
|
115
|
+
// FIXME not all presence icon sizes are available
|
116
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
117
|
+
large: react_icons_1.PresenceOffline16Regular,
|
118
|
+
// FIXME not all presence icon sizes are available
|
119
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
120
|
+
'extra-large': react_icons_1.PresenceOffline16Regular
|
121
|
+
};
|
122
|
+
exports.presenceUnknownRegular = {
|
123
|
+
// FIXME not all presence icon sizes are available
|
124
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
125
|
+
tiny: react_icons_1.PresenceUnknown10Regular,
|
126
|
+
'extra-small': react_icons_1.PresenceUnknown10Regular,
|
127
|
+
small: react_icons_1.PresenceUnknown12Regular,
|
128
|
+
medium: react_icons_1.PresenceUnknown16Regular,
|
129
|
+
// FIXME not all presence icon sizes are available
|
130
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
131
|
+
large: react_icons_1.PresenceUnknown16Regular,
|
132
|
+
// FIXME not all presence icon sizes are available
|
133
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
134
|
+
'extra-large': react_icons_1.PresenceUnknown16Regular
|
135
|
+
};
|
136
|
+
//# sourceMappingURL=presenceIcons.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/PresenceBadge/presenceIcons.ts"],"names":[],"mappings":"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","sourcesContent":["import * as React from 'react';\nimport {\n PresenceAvailable10Regular,\n PresenceAvailable12Regular,\n PresenceAvailable16Regular,\n PresenceAvailable10Filled,\n PresenceAvailable12Filled,\n PresenceAvailable16Filled,\n PresenceAway10Filled,\n PresenceAway12Filled,\n PresenceAway16Filled,\n PresenceBusy10Filled,\n PresenceBusy12Filled,\n PresenceBusy16Filled,\n PresenceDnd10Regular,\n PresenceDnd12Regular,\n PresenceDnd16Regular,\n PresenceDnd10Filled,\n PresenceDnd12Filled,\n PresenceDnd16Filled,\n PresenceOof10Regular,\n PresenceOof12Regular,\n PresenceOof16Regular,\n PresenceOffline10Regular,\n PresenceOffline12Regular,\n PresenceOffline16Regular,\n PresenceUnknown10Regular,\n PresenceUnknown12Regular,\n PresenceUnknown16Regular,\n} from '@fluentui/react-icons';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nexport const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Filled,\n 'extra-small': PresenceAway10Filled,\n small: PresenceAway12Filled,\n medium: PresenceAway16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceAway16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway16Filled,\n};\n\nexport const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Regular,\n 'extra-small': PresenceAvailable10Regular,\n small: PresenceAvailable12Regular,\n medium: PresenceAvailable16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceAvailable16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable16Regular,\n};\n\nexport const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Filled,\n 'extra-small': PresenceAvailable10Filled,\n small: PresenceAvailable12Filled,\n medium: PresenceAvailable16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceAvailable16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable16Filled,\n};\n\nexport const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBusy10Filled,\n 'extra-small': PresenceBusy10Filled,\n small: PresenceBusy12Filled,\n medium: PresenceBusy16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceBusy16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBusy16Filled,\n};\n\nexport const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Filled,\n 'extra-small': PresenceDnd10Filled,\n small: PresenceDnd12Filled,\n medium: PresenceDnd16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceDnd16Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd16Filled,\n};\n\nexport const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Regular,\n 'extra-small': PresenceDnd10Regular,\n small: PresenceDnd12Regular,\n medium: PresenceDnd16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceDnd16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd16Regular,\n};\n\nexport const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOof10Regular,\n 'extra-small': PresenceOof10Regular,\n small: PresenceOof12Regular,\n medium: PresenceOof16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceOof16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOof16Regular,\n};\n\nexport const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOffline10Regular,\n 'extra-small': PresenceOffline10Regular,\n small: PresenceOffline12Regular,\n medium: PresenceOffline16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceOffline16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOffline16Regular,\n};\n\nexport const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceUnknown10Regular,\n 'extra-small': PresenceUnknown10Regular,\n small: PresenceUnknown12Regular,\n medium: PresenceUnknown16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n large: PresenceUnknown16Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceUnknown16Regular,\n};\n"],"sourceRoot":"../src/"}
|
@@ -3,4 +3,4 @@ import type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.typ
|
|
3
3
|
/**
|
4
4
|
* Returns the props and state required to render the component
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const usePresenceBadge_unstable: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>) => PresenceBadgeState;
|