@fluentui/react-badge 0.0.0-nightlydd0f007b3f20220119.1 → 0.0.0-nightlye0b8e1fa6920220128.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +45 -27
- package/CHANGELOG.md +13 -12
- package/dist/react-badge.d.ts +13 -13
- package/lib/components/Badge/Badge.d.ts +1 -1
- package/lib/components/Badge/Badge.js +7 -7
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Badge/Badge.types.d.ts +3 -4
- package/lib/components/Badge/renderBadge.d.ts +1 -1
- package/lib/components/Badge/renderBadge.js +1 -1
- package/lib/components/Badge/renderBadge.js.map +1 -1
- package/lib/components/Badge/useBadge.d.ts +1 -1
- package/lib/components/Badge/useBadge.js +1 -1
- package/lib/components/Badge/useBadge.js.map +1 -1
- package/lib/components/Badge/useBadgeStyles.d.ts +1 -1
- package/lib/components/Badge/useBadgeStyles.js +2 -2
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.d.ts +1 -1
- package/lib/components/CounterBadge/CounterBadge.js +7 -7
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -1
- package/lib/components/CounterBadge/useCounterBadge.js +3 -3
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +4 -4
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.d.ts +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.js +7 -7
- package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.js +3 -3
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +2 -2
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.d.ts +1 -1
- package/lib-commonjs/components/Badge/Badge.js +4 -4
- package/lib-commonjs/components/Badge/Badge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.d.ts +3 -4
- package/lib-commonjs/components/Badge/renderBadge.d.ts +1 -1
- package/lib-commonjs/components/Badge/renderBadge.js +3 -3
- 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 +3 -3
- package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.js +7 -7
- 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 +4 -4
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js +4 -4
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +7 -7
- 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 +4 -4
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +4 -4
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +6 -6
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/package.json +5 -7
package/CHANGELOG.json
CHANGED
@@ -2,23 +2,17 @@
|
|
2
2
|
"name": "@fluentui/react-badge",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-badge_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Fri, 28 Jan 2022 04:13:24 GMT",
|
6
|
+
"tag": "@fluentui/react-badge_v0.0.0-nightlye0b8e1fa6920220128.1",
|
7
|
+
"version": "0.0.0-nightlye0b8e1fa6920220128.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-badge",
|
13
|
-
"commit": "
|
13
|
+
"commit": "90d10ec8c2d159575962c4d3d913317633b44a7a",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
-
{
|
17
|
-
"author": "lingfangao@hotmail.com",
|
18
|
-
"package": "@fluentui/react-badge",
|
19
|
-
"commit": "4e7acd7ff3c437663de70206416d3c19b6a87cfa",
|
20
|
-
"comment": "fix: Add uniform padding and modify gaps"
|
21
|
-
},
|
22
16
|
{
|
23
17
|
"author": "ololubek@microsoft.com",
|
24
18
|
"package": "@fluentui/react-badge",
|
@@ -31,6 +25,12 @@
|
|
31
25
|
"commit": "3bc0517363984081469903ee137a06543f825f1c",
|
32
26
|
"comment": "Add fontSize styling to icon slot, to automatically size user-provided icons"
|
33
27
|
},
|
28
|
+
{
|
29
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
30
|
+
"package": "@fluentui/react-badge",
|
31
|
+
"commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
|
32
|
+
"comment": "Updating based on changes to composition types."
|
33
|
+
},
|
34
34
|
{
|
35
35
|
"author": "olfedias@microsoft.com",
|
36
36
|
"package": "@fluentui/react-badge",
|
@@ -64,44 +64,50 @@
|
|
64
64
|
{
|
65
65
|
"author": "Humberto.Morimoto@microsoft.com",
|
66
66
|
"package": "@fluentui/react-badge",
|
67
|
-
"commit": "
|
68
|
-
"comment": "
|
67
|
+
"commit": "0bc161458eae5ae8d387172430496ce9829b1bb1",
|
68
|
+
"comment": "Using ComponentSlotProps instead of ObjectShorthandProps."
|
69
69
|
},
|
70
70
|
{
|
71
|
-
"author": "
|
71
|
+
"author": "olfedias@microsoft.com",
|
72
72
|
"package": "@fluentui/react-badge",
|
73
|
-
"
|
74
|
-
"
|
73
|
+
"commit": "8c75114e82b205810c9ac3692af71f6f7748225c",
|
74
|
+
"comment": "use Griffel packages"
|
75
75
|
},
|
76
76
|
{
|
77
|
-
"author": "
|
77
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
78
|
+
"package": "@fluentui/react-badge",
|
79
|
+
"commit": "2c54271f07c30f65718e085084c2e5b213268dfd",
|
80
|
+
"comment": "react-badge: Replacing use of functions in makeStyles with direct use of tokens."
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"author": "behowell@microsoft.com",
|
78
84
|
"package": "@fluentui/react-badge",
|
79
|
-
"
|
80
|
-
"
|
85
|
+
"commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
|
86
|
+
"comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
|
81
87
|
},
|
82
88
|
{
|
83
|
-
"author": "
|
89
|
+
"author": "lingfangao@hotmail.com",
|
84
90
|
"package": "@fluentui/react-badge",
|
85
|
-
"
|
86
|
-
"
|
91
|
+
"commit": "4e7acd7ff3c437663de70206416d3c19b6a87cfa",
|
92
|
+
"comment": "fix: Add uniform padding and modify gaps"
|
87
93
|
},
|
88
94
|
{
|
89
95
|
"author": "beachball",
|
90
96
|
"package": "@fluentui/react-badge",
|
91
|
-
"comment": "Bump @fluentui/
|
92
|
-
"commit": "
|
97
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightlye0b8e1fa6920220128.1",
|
98
|
+
"commit": "90d10ec8c2d159575962c4d3d913317633b44a7a"
|
93
99
|
},
|
94
100
|
{
|
95
101
|
"author": "beachball",
|
96
102
|
"package": "@fluentui/react-badge",
|
97
|
-
"comment": "Bump @fluentui/
|
98
|
-
"commit": "
|
103
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlye0b8e1fa6920220128.1",
|
104
|
+
"commit": "90d10ec8c2d159575962c4d3d913317633b44a7a"
|
99
105
|
},
|
100
106
|
{
|
101
107
|
"author": "beachball",
|
102
108
|
"package": "@fluentui/react-badge",
|
103
|
-
"comment": "Bump @fluentui/react-conformance-
|
104
|
-
"commit": "
|
109
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightlye0b8e1fa6920220128.1",
|
110
|
+
"commit": "90d10ec8c2d159575962c4d3d913317633b44a7a"
|
105
111
|
}
|
106
112
|
],
|
107
113
|
"none": [
|
@@ -116,6 +122,18 @@
|
|
116
122
|
"package": "@fluentui/react-badge",
|
117
123
|
"commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
|
118
124
|
"comment": "chore: use storybook runner for all vNext packages"
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"author": "olfedias@microsoft.com",
|
128
|
+
"package": "@fluentui/react-badge",
|
129
|
+
"commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
|
130
|
+
"comment": "remove inline-style-expand-shorthand from tsconfigs"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"author": "tkrasniqi@microsoft.com",
|
134
|
+
"package": "@fluentui/react-badge",
|
135
|
+
"commit": "87e12a2e3a9d90b4ff95d3ed333739756d190f6c",
|
136
|
+
"comment": "Updated best practices for long text"
|
119
137
|
}
|
120
138
|
]
|
121
139
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,32 +1,33 @@
|
|
1
1
|
# Change Log - @fluentui/react-badge
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 28 Jan 2022 04:13:24 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlye0b8e1fa6920220128.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightlye0b8e1fa6920220128.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.4..@fluentui/react-badge_v0.0.0-
|
9
|
+
Fri, 28 Jan 2022 04:13:24 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.4..@fluentui/react-badge_v0.0.0-nightlye0b8e1fa6920220128.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
15
|
-
- fix: Add uniform padding and modify gaps ([PR #20974](https://github.com/microsoft/fluentui/pull/20974) by lingfangao@hotmail.com)
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by email not defined)
|
16
15
|
- (fix): Update react-icons dependency to latest version ([PR #20943](https://github.com/microsoft/fluentui/pull/20943) by ololubek@microsoft.com)
|
17
16
|
- Add fontSize styling to icon slot, to automatically size user-provided icons ([PR #21219](https://github.com/microsoft/fluentui/pull/21219) by behowell@microsoft.com)
|
17
|
+
- Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
|
18
18
|
- update styles to not use CSS shorthands ([PR #20802](https://github.com/microsoft/fluentui/pull/20802) by olfedias@microsoft.com)
|
19
19
|
- fix: use updated tokens for ghost and outline variants ([PR #20893](https://github.com/microsoft/fluentui/pull/20893) by lingfangao@hotmail.com)
|
20
20
|
- Updating use of tokens.fontWeight now that we don't need to use casting. ([PR #21217](https://github.com/microsoft/fluentui/pull/21217) by Humberto.Morimoto@microsoft.com)
|
21
21
|
- Update react-icons usage to resizable icons ([PR #21074](https://github.com/microsoft/fluentui/pull/21074) by ololubek@microsoft.com)
|
22
22
|
- Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
|
23
|
+
- Using ComponentSlotProps instead of ObjectShorthandProps. ([PR #20890](https://github.com/microsoft/fluentui/pull/20890) by Humberto.Morimoto@microsoft.com)
|
24
|
+
- use Griffel packages ([PR #21437](https://github.com/microsoft/fluentui/pull/21437) by olfedias@microsoft.com)
|
23
25
|
- react-badge: Replacing use of functions in makeStyles with direct use of tokens. ([PR #21038](https://github.com/microsoft/fluentui/pull/21038) by Humberto.Morimoto@microsoft.com)
|
24
|
-
-
|
25
|
-
-
|
26
|
-
- Bump @fluentui/react-
|
27
|
-
- Bump @fluentui/
|
28
|
-
- Bump @fluentui/
|
29
|
-
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlydd0f007b3f20220119.1 ([commit](https://github.com/microsoft/fluentui/commit/6044506cc626a9a155e0df40645426ddcc080c55) by beachball)
|
26
|
+
- BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
|
27
|
+
- fix: Add uniform padding and modify gaps ([PR #20974](https://github.com/microsoft/fluentui/pull/20974) by lingfangao@hotmail.com)
|
28
|
+
- Bump @fluentui/react-theme to v0.0.0-nightlye0b8e1fa6920220128.1 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by beachball)
|
29
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlye0b8e1fa6920220128.1 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by beachball)
|
30
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightlye0b8e1fa6920220128.1 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by beachball)
|
30
31
|
|
31
32
|
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-beta.4)
|
32
33
|
|
package/dist/react-badge.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
2
2
|
import type { ComponentState } from '@fluentui/react-utilities';
|
3
3
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
4
|
-
import type {
|
4
|
+
import type { IntrinsicSlotProps } from '@fluentui/react-utilities';
|
5
5
|
import * as React_2 from 'react';
|
6
6
|
|
7
7
|
/**
|
8
|
-
* Define a styled Badge, using the `
|
8
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
9
9
|
*/
|
10
10
|
export declare const Badge: ForwardRefComponent<BadgeProps>;
|
11
11
|
|
@@ -42,14 +42,14 @@ export declare type BadgeCommons = {
|
|
42
42
|
export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
|
43
43
|
|
44
44
|
export declare type BadgeSlots = {
|
45
|
-
root:
|
46
|
-
icon?:
|
45
|
+
root: Omit<IntrinsicSlotProps<'div'>, 'color'>;
|
46
|
+
icon?: IntrinsicSlotProps<'span'>;
|
47
47
|
};
|
48
48
|
|
49
49
|
export declare type BadgeState = ComponentState<BadgeSlots> & BadgeCommons;
|
50
50
|
|
51
51
|
/**
|
52
|
-
* Define a styled CounterBadge, using the `
|
52
|
+
* Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
|
53
53
|
*/
|
54
54
|
export declare const CounterBadge: ForwardRefComponent<CounterBadgeProps>;
|
55
55
|
|
@@ -98,7 +98,7 @@ export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'
|
|
98
98
|
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;
|
99
99
|
|
100
100
|
/**
|
101
|
-
* Define a styled Badge, using the `
|
101
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
102
102
|
*/
|
103
103
|
export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
|
104
104
|
|
@@ -124,36 +124,36 @@ export declare type PresenceBadgeState = PresenceBadgeCommons & ComponentState<B
|
|
124
124
|
|
125
125
|
export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
|
126
126
|
|
127
|
-
export declare const
|
127
|
+
export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
|
128
128
|
|
129
129
|
/**
|
130
130
|
* Returns the props and state required to render the component
|
131
131
|
*/
|
132
|
-
export declare const
|
132
|
+
export declare const useBadge_unstable: (props: BadgeProps, ref: React_2.Ref<HTMLElement>) => BadgeState;
|
133
133
|
|
134
134
|
/**
|
135
135
|
* Applies style classnames to slots
|
136
136
|
*/
|
137
|
-
export declare const
|
137
|
+
export declare const useBadgeStyles_unstable: (state: BadgeState) => BadgeState;
|
138
138
|
|
139
139
|
/**
|
140
140
|
* Returns the props and state required to render the component
|
141
141
|
*/
|
142
|
-
export declare const
|
142
|
+
export declare const useCounterBadge_unstable: (props: CounterBadgeProps, ref: React_2.Ref<HTMLElement>) => CounterBadgeState;
|
143
143
|
|
144
144
|
/**
|
145
145
|
* Applies style classnames to slots
|
146
146
|
*/
|
147
|
-
export declare const
|
147
|
+
export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState) => CounterBadgeState;
|
148
148
|
|
149
149
|
/**
|
150
150
|
* Returns the props and state required to render the component
|
151
151
|
*/
|
152
|
-
export declare const
|
152
|
+
export declare const usePresenceBadge_unstable: (props: PresenceBadgeProps, ref: React_2.Ref<HTMLElement>) => PresenceBadgeState;
|
153
153
|
|
154
154
|
/**
|
155
155
|
* Applies style classnames to slots
|
156
156
|
*/
|
157
|
-
export declare const
|
157
|
+
export declare const usePresenceBadgeStyles_unstable: (state: PresenceBadgeState) => PresenceBadgeState;
|
158
158
|
|
159
159
|
export { }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { BadgeProps } from './Badge.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 Badge: ForwardRefComponent<BadgeProps>;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useBadge_unstable } from './useBadge';
|
3
|
+
import { useBadgeStyles_unstable } from './useBadgeStyles';
|
4
|
+
import { renderBadge_unstable } from './renderBadge';
|
5
5
|
/**
|
6
|
-
* Define a styled Badge, using the `
|
6
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
7
7
|
*/
|
8
8
|
|
9
9
|
export const Badge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
-
const state =
|
11
|
-
|
12
|
-
return
|
10
|
+
const state = useBadge_unstable(props, ref);
|
11
|
+
useBadgeStyles_unstable(state);
|
12
|
+
return renderBadge_unstable(state);
|
13
13
|
});
|
14
14
|
Badge.displayName = 'Badge';
|
15
15
|
//# sourceMappingURL=Badge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,YAAlC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,oBAAT,QAAqC,eAArC;AAIA;;AAEG;;AACH,OAAO,MAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;AACA,EAAA,uBAAuB,CAAC,KAAD,CAAvB;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import type { ComponentProps, ComponentState, ObjectShorthandProps } from '@fluentui/react-utilities';
|
1
|
+
import type { ComponentProps, ComponentState, IntrinsicSlotProps } from '@fluentui/react-utilities';
|
3
2
|
export declare type BadgeSlots = {
|
4
|
-
root:
|
5
|
-
icon?:
|
3
|
+
root: Omit<IntrinsicSlotProps<'div'>, 'color'>;
|
4
|
+
icon?: IntrinsicSlotProps<'span'>;
|
6
5
|
};
|
7
6
|
export declare type BadgeCommons = {
|
8
7
|
/**
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { BadgeState } from './Badge.types';
|
2
|
-
export declare const
|
2
|
+
export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAAsB;AACxD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAa,KAAb,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,iBAAmC,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,iBAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAHrC,CADF;AAOD,CAVM","sourceRoot":""}
|
@@ -3,4 +3,4 @@ import type { BadgeProps, BadgeState } from './Badge.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 useBadge_unstable: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
|
@@ -3,7 +3,7 @@ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utiliti
|
|
3
3
|
* Returns the props and state required to render the component
|
4
4
|
*/
|
5
5
|
|
6
|
-
export const
|
6
|
+
export const useBadge_unstable = (props, ref) => {
|
7
7
|
const {
|
8
8
|
shape = 'circular',
|
9
9
|
size = 'medium',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/useBadge.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,MAAM,
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/useBadge.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;AAC9F,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,IAAI,GAAG,QAFH;AAGJ,IAAA,YAAY,GAAG,QAHX;AAIJ,IAAA,UAAU,GAAG,QAJT;AAKJ,IAAA,KAAK,GAAG;AALJ,MAMF,KANJ;AAQA,QAAM,KAAK,GAAe;AACxB,IAAA,KADwB;AAExB,IAAA,IAFwB;AAGxB,IAAA,YAHwB;AAIxB,IAAA,UAJwB;AAKxB,IAAA,KALwB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KANY;AAUxB,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,qBAAe,IAFkB;AAGjC,SAAG;AAH8B,KAAR,CAVH;AAexB,IAAA,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP;AAfE,GAA1B;AAkBA,SAAO,KAAP;AACD,CA5BM","sourceRoot":""}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { shorthands, mergeClasses, __styles } from '@
|
1
|
+
import { shorthands, mergeClasses, __styles } from '@griffel/react';
|
2
2
|
import { tokens } from '@fluentui/react-theme';
|
3
3
|
export const badgeClassName = 'fui-Badge';
|
4
4
|
|
@@ -340,7 +340,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
340
340
|
*/
|
341
341
|
|
342
342
|
|
343
|
-
export const
|
343
|
+
export const useBadgeStyles_unstable = state => {
|
344
344
|
const styles = useStyles();
|
345
345
|
const isGhost = state.appearance === 'ghost';
|
346
346
|
const isOutline = state.appearance === 'outline';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/useBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/useBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,cAAc,GAAG,WAAvB;;AA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CjC,QAAQ,IAAI,QAAZ,IAAwB,MAAM,CAAC,gBAzCE,EA0CjC,SAAS,IAAI,QAAb,IAAyB,MAAM,CAAC,iBA1CC,EA2CjC,MAAM,IAAI,QAAV,IAAsB,MAAM,CAAC,cA3CI,EA4CjC,OAAO,IAAI,QAAX,IAAuB,MAAM,CAAC,eA5CG,EA6CjC,KAAK,CAAC,IAAN,CAAW,SA7CsB,CAAnC;;AAgDA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,MAAM,CAAC,IAD0B,EAEjC,KAAK,CAAC,IAAN,KAAe,MAAf,IAAyB,MAAM,CAAC,QAFC,EAGjC,KAAK,CAAC,IAAN,KAAe,aAAf,IAAgC,MAAM,CAAC,cAHN,EAIjC,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,SAJA,EAKjC,KAAK,CAAC,IAAN,KAAe,QAAf,IAA2B,MAAM,CAAC,UALD,EAMjC,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,SANA,EAOjC,KAAK,CAAC,IAAN,KAAe,aAAf,IAAgC,MAAM,CAAC,cAPN,EAQjC,KAAK,CAAC,IAAN,CAAW,SARsB,CAAnC;AAUD;;AAED,SAAO,KAAP;AACD,CA5EM","sourceRoot":""}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { CounterBadgeProps } from './CounterBadge.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
* Define a styled CounterBadge, using the `
|
4
|
+
* Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
|
5
5
|
*/
|
6
6
|
export declare const CounterBadge: ForwardRefComponent<CounterBadgeProps>;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useCounterBadge_unstable } from './useCounterBadge';
|
3
|
+
import { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles';
|
4
|
+
import { renderBadge_unstable } from '../Badge/index';
|
5
5
|
/**
|
6
|
-
* Define a styled CounterBadge, using the `
|
6
|
+
* Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
|
7
7
|
*/
|
8
8
|
|
9
9
|
export const CounterBadge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
-
const state =
|
11
|
-
|
12
|
-
return
|
10
|
+
const state = useCounterBadge_unstable(props, ref);
|
11
|
+
useCounterBadgeStyles_unstable(state);
|
12
|
+
return renderBadge_unstable(state);
|
13
13
|
});
|
14
14
|
CounterBadge.displayName = 'CounterBadge';
|
15
15
|
//# sourceMappingURL=CounterBadge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,oBAAT,QAAqC,gBAArC;AAIA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,wBAAwB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AACA,EAAA,8BAA8B,CAAC,KAAD,CAA9B;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALmE,CAA7D;AAOP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourceRoot":""}
|
@@ -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;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { useBadge_unstable } from '../Badge/index';
|
2
2
|
/**
|
3
3
|
* Returns the props and state required to render the component
|
4
4
|
*/
|
5
5
|
|
6
|
-
export const
|
6
|
+
export const useCounterBadge_unstable = (props, ref) => {
|
7
7
|
const {
|
8
8
|
shape = 'circular',
|
9
9
|
appearance = 'filled',
|
@@ -12,7 +12,7 @@ export const useCounterBadge = (props, ref) => {
|
|
12
12
|
count = 0,
|
13
13
|
dot = false
|
14
14
|
} = props;
|
15
|
-
const state = { ...
|
15
|
+
const state = { ...useBadge_unstable(props, ref),
|
16
16
|
shape,
|
17
17
|
appearance,
|
18
18
|
showZero,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":"AACA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":"AACA,SAAS,iBAAT,QAAkC,gBAAlC;AAGA;;AAEG;;AACH,OAAO,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,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CADU;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":""}
|
@@ -3,4 +3,4 @@ export declare const counterBadgeClassName = "fui-CounterBadge";
|
|
3
3
|
/**
|
4
4
|
* Applies style classnames to slots
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState) => CounterBadgeState;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { shorthands, mergeClasses, __styles } from '@
|
2
|
-
import {
|
1
|
+
import { shorthands, mergeClasses, __styles } from '@griffel/react';
|
2
|
+
import { useBadgeStyles_unstable } from '../Badge/useBadgeStyles';
|
3
3
|
export const counterBadgeClassName = 'fui-CounterBadge';
|
4
4
|
|
5
5
|
const useStyles = /*#__PURE__*/__styles({
|
@@ -23,9 +23,9 @@ const useStyles = /*#__PURE__*/__styles({
|
|
23
23
|
*/
|
24
24
|
|
25
25
|
|
26
|
-
export const
|
26
|
+
export const useCounterBadgeStyles_unstable = state => {
|
27
27
|
const styles = useStyles();
|
28
28
|
state.root.className = mergeClasses(counterBadgeClassName, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
|
29
|
-
return
|
29
|
+
return useBadgeStyles_unstable(state);
|
30
30
|
};
|
31
31
|
//# sourceMappingURL=useCounterBadgeStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;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,EAAlB;AAYA;;AAEG;;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAAgD;AAC5F,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,qBADiC,EAEjC,KAAK,CAAC,GAAN,IAAa,MAAM,CAAC,GAFa,EAGjC,CAAC,KAAK,CAAC,QAAP,IAAmB,KAAK,CAAC,KAAN,KAAgB,CAAnC,IAAwC,CAAC,KAAK,CAAC,GAA/C,IAAsD,MAAM,CAAC,IAH5B,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;AAMA,SAAO,uBAAuB,CAAC,KAAD,CAA9B;AACD,CATM","sourceRoot":""}
|
@@ -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>;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { usePresenceBadge_unstable } from './usePresenceBadge';
|
3
|
+
import { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles';
|
4
|
+
import { renderBadge_unstable } from '../../Badge';
|
5
5
|
/**
|
6
|
-
* Define a styled Badge, using the `
|
6
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
7
7
|
*/
|
8
8
|
|
9
9
|
export const PresenceBadge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
-
const state =
|
11
|
-
|
12
|
-
return
|
10
|
+
const state = usePresenceBadge_unstable(props, ref);
|
11
|
+
usePresenceBadgeStyles_unstable(state);
|
12
|
+
return renderBadge_unstable(state);
|
13
13
|
});
|
14
14
|
PresenceBadge.displayName = 'PresenceBadge';
|
15
15
|
//# sourceMappingURL=PresenceBadge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,+BAAT,QAAgD,0BAAhD;AACA,SAAS,oBAAT,QAAqC,aAArC;AAIA;;AAEG;;AACH,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,yBAAyB,CAAC,KAAD,EAAQ,GAAR,CAAvC;AACA,EAAA,+BAA+B,CAAC,KAAD,CAA/B;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALqE,CAA/D;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourceRoot":""}
|
@@ -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;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { resolveShorthand } from '@fluentui/react-utilities';
|
3
3
|
import { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';
|
4
|
-
import {
|
4
|
+
import { useBadge_unstable } from '../Badge/index';
|
5
5
|
|
6
6
|
const iconMap = (status, outOfOffice, size) => {
|
7
7
|
switch (status) {
|
@@ -29,10 +29,10 @@ const iconMap = (status, outOfOffice, size) => {
|
|
29
29
|
*/
|
30
30
|
|
31
31
|
|
32
|
-
export const
|
32
|
+
export const usePresenceBadge_unstable = (props, ref) => {
|
33
33
|
var _a, _b;
|
34
34
|
|
35
|
-
const state = { ...
|
35
|
+
const state = { ...useBadge_unstable({
|
36
36
|
size: 'medium',
|
37
37
|
...props,
|
38
38
|
icon: resolveShorthand(undefined, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SACE,uBADF,EAEE,wBAFF,EAGE,kBAHF,EAIE,kBAJF,EAKE,iBALF,EAME,kBANF,EAOE,sBAPF,EAQE,kBARF,EASE,sBATF,QAUO,iBAVP;AAWA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SACE,uBADF,EAEE,wBAFF,EAGE,kBAHF,EAIE,kBAJF,EAKE,iBALF,EAME,kBANF,EAOE,sBAPF,EAQE,kBARF,EASE,sBATF,QAUO,iBAVP;AAWA,SAAS,iBAAT,QAA8C,gBAA9C;;AAGA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AO,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,CAzBM","sourceRoot":""}
|
@@ -3,4 +3,4 @@ export declare const presenceBadgeClassName = "fui-PresenceBadge";
|
|
3
3
|
/**
|
4
4
|
* Applies style classnames to slots
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const usePresenceBadgeStyles_unstable: (state: PresenceBadgeState) => PresenceBadgeState;
|