@fluentui/react-badge 0.0.0-nightly-20220518-0420.1 → 0.0.0-nightly-20220523-0424.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.json +35 -23
  2. package/CHANGELOG.md +10 -8
  3. package/{lib → dist}/tsdoc-metadata.json +0 -0
  4. package/package.json +7 -7
  5. package/lib/Badge.d.ts +0 -1
  6. package/lib/CounterBadge.d.ts +0 -1
  7. package/lib/PresenceBadge.d.ts +0 -1
  8. package/lib/components/Badge/Badge.d.ts +0 -6
  9. package/lib/components/Badge/Badge.types.d.ts +0 -33
  10. package/lib/components/Badge/index.d.ts +0 -5
  11. package/lib/components/Badge/renderBadge.d.ts +0 -2
  12. package/lib/components/Badge/useBadge.d.ts +0 -6
  13. package/lib/components/Badge/useBadgeStyles.d.ts +0 -11
  14. package/lib/components/CounterBadge/CounterBadge.d.ts +0 -6
  15. package/lib/components/CounterBadge/CounterBadge.types.d.ts +0 -42
  16. package/lib/components/CounterBadge/index.d.ts +0 -4
  17. package/lib/components/CounterBadge/useCounterBadge.d.ts +0 -6
  18. package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -12
  19. package/lib/components/PresenceBadge/PresenceBadge.d.ts +0 -6
  20. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +0 -17
  21. package/lib/components/PresenceBadge/index.d.ts +0 -4
  22. package/lib/components/PresenceBadge/presenceIcons.d.ts +0 -11
  23. package/lib/components/PresenceBadge/usePresenceBadge.d.ts +0 -6
  24. package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -12
  25. package/lib/index.d.ts +0 -6
  26. package/lib-commonjs/Badge.d.ts +0 -1
  27. package/lib-commonjs/CounterBadge.d.ts +0 -1
  28. package/lib-commonjs/PresenceBadge.d.ts +0 -1
  29. package/lib-commonjs/components/Badge/Badge.d.ts +0 -6
  30. package/lib-commonjs/components/Badge/Badge.types.d.ts +0 -33
  31. package/lib-commonjs/components/Badge/index.d.ts +0 -5
  32. package/lib-commonjs/components/Badge/renderBadge.d.ts +0 -2
  33. package/lib-commonjs/components/Badge/useBadge.d.ts +0 -6
  34. package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +0 -11
  35. package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +0 -6
  36. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +0 -42
  37. package/lib-commonjs/components/CounterBadge/index.d.ts +0 -4
  38. package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +0 -6
  39. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -12
  40. package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +0 -6
  41. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +0 -17
  42. package/lib-commonjs/components/PresenceBadge/index.d.ts +0 -4
  43. package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +0 -11
  44. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +0 -6
  45. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -12
  46. package/lib-commonjs/index.d.ts +0 -6
package/CHANGELOG.json CHANGED
@@ -2,25 +2,11 @@
2
2
  "name": "@fluentui/react-badge",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 18 May 2022 04:34:29 GMT",
6
- "tag": "@fluentui/react-badge_v0.0.0-nightly-20220518-0420.1",
7
- "version": "0.0.0-nightly-20220518-0420.1",
5
+ "date": "Mon, 23 May 2022 04:37:18 GMT",
6
+ "tag": "@fluentui/react-badge_v0.0.0-nightly-20220523-0424.1",
7
+ "version": "0.0.0-nightly-20220523-0424.1",
8
8
  "comments": {
9
- "none": [
10
- {
11
- "author": "tristan.watanabe@gmail.com",
12
- "package": "@fluentui/react-badge",
13
- "commit": "2769e4b68c65eb8e06cf15384f51059e819b1fc5",
14
- "comment": "react-badge: Move to new common folder."
15
- }
16
- ],
17
9
  "prerelease": [
18
- {
19
- "author": "sarah.higley@microsoft.com",
20
- "package": "@fluentui/react-badge",
21
- "commit": "3c97b3754e1f5f77672c3ceb9886de43a462ccb6",
22
- "comment": "remove commons types from badges"
23
- },
24
10
  {
25
11
  "author": "mgodbolt@microsoft.com",
26
12
  "package": "@fluentui/react-badge",
@@ -33,23 +19,49 @@
33
19
  "commit": "f120fe9160ad7311a87af0cfacd8d2fb26275e34",
34
20
  "comment": "chore: Update Griffel to latest version"
35
21
  },
22
+ {
23
+ "author": "olfedias@microsoft.com",
24
+ "package": "@fluentui/react-badge",
25
+ "commit": "60804cec07a495b8a5d1fc66338bf0443b212144",
26
+ "comment": "chore: Update Griffel to latest version"
27
+ },
28
+ {
29
+ "author": "tristan.watanabe@gmail.com",
30
+ "package": "@fluentui/react-badge",
31
+ "commit": "2e5bf6decb7ac952a490a1cb626f0c6d0a064e4b",
32
+ "comment": "react-badge: ship rolluped only dts."
33
+ },
34
+ {
35
+ "author": "sarah.higley@microsoft.com",
36
+ "package": "@fluentui/react-badge",
37
+ "commit": "3c97b3754e1f5f77672c3ceb9886de43a462ccb6",
38
+ "comment": "remove commons types from badges"
39
+ },
36
40
  {
37
41
  "author": "beachball",
38
42
  "package": "@fluentui/react-badge",
39
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220518-0420.1",
40
- "commit": "c740a24cded647abf63433112cb9a07ed03d161a"
43
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220523-0424.1",
44
+ "commit": "38c77f1ec2382f1d63ab33ac977ca1bd5a6b2d21"
41
45
  },
42
46
  {
43
47
  "author": "beachball",
44
48
  "package": "@fluentui/react-badge",
45
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220518-0420.1",
46
- "commit": "c740a24cded647abf63433112cb9a07ed03d161a"
49
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220523-0424.1",
50
+ "commit": "38c77f1ec2382f1d63ab33ac977ca1bd5a6b2d21"
47
51
  },
48
52
  {
49
53
  "author": "beachball",
50
54
  "package": "@fluentui/react-badge",
51
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220518-0420.1",
52
- "commit": "c740a24cded647abf63433112cb9a07ed03d161a"
55
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220523-0424.1",
56
+ "commit": "38c77f1ec2382f1d63ab33ac977ca1bd5a6b2d21"
57
+ }
58
+ ],
59
+ "none": [
60
+ {
61
+ "author": "tristan.watanabe@gmail.com",
62
+ "package": "@fluentui/react-badge",
63
+ "commit": "2769e4b68c65eb8e06cf15384f51059e819b1fc5",
64
+ "comment": "react-badge: Move to new common folder."
53
65
  }
54
66
  ]
55
67
  }
package/CHANGELOG.md CHANGED
@@ -1,22 +1,24 @@
1
1
  # Change Log - @fluentui/react-badge
2
2
 
3
- This log was last generated on Wed, 18 May 2022 04:34:29 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 23 May 2022 04:37:18 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20220518-0420.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightly-20220518-0420.1)
7
+ ## [0.0.0-nightly-20220523-0424.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightly-20220523-0424.1)
8
8
 
9
- Wed, 18 May 2022 04:34:29 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-rc.8..@fluentui/react-badge_v0.0.0-nightly-20220518-0420.1)
9
+ Mon, 23 May 2022 04:37:18 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-rc.8..@fluentui/react-badge_v0.0.0-nightly-20220523-0424.1)
11
11
 
12
12
  ### Changes
13
13
 
14
- - remove commons types from badges ([PR #22868](https://github.com/microsoft/fluentui/pull/22868) by sarah.higley@microsoft.com)
15
14
  - pass in icon props to presence badge icon slot, and use default strings ([PR #22901](https://github.com/microsoft/fluentui/pull/22901) by mgodbolt@microsoft.com)
16
15
  - chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
17
- - Bump @fluentui/react-theme to v0.0.0-nightly-20220518-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/c740a24cded647abf63433112cb9a07ed03d161a) by beachball)
18
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20220518-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/c740a24cded647abf63433112cb9a07ed03d161a) by beachball)
19
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220518-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/c740a24cded647abf63433112cb9a07ed03d161a) by beachball)
16
+ - chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
17
+ - react-badge: ship rolluped only dts. ([PR #23053](https://github.com/microsoft/fluentui/pull/23053) by tristan.watanabe@gmail.com)
18
+ - remove commons types from badges ([PR #22868](https://github.com/microsoft/fluentui/pull/22868) by sarah.higley@microsoft.com)
19
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20220523-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/38c77f1ec2382f1d63ab33ac977ca1bd5a6b2d21) by beachball)
20
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20220523-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/38c77f1ec2382f1d63ab33ac977ca1bd5a6b2d21) by beachball)
21
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220523-0424.1 ([commit](https://github.com/microsoft/fluentui/commit/38c77f1ec2382f1d63ab33ac977ca1bd5a6b2d21) by beachball)
20
22
 
21
23
  ## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-rc.8)
22
24
 
File without changes
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/react-badge",
3
- "version": "0.0.0-nightly-20220518-0420.1",
3
+ "version": "0.0.0-nightly-20220523-0424.1",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
7
- "typings": "lib/index.d.ts",
7
+ "typings": "dist/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
@@ -21,21 +21,21 @@
21
21
  "start": "yarn storybook",
22
22
  "test": "jest --passWithNoTests",
23
23
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
24
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-badge/src && yarn docs",
24
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-badge/src && yarn docs",
25
25
  "storybook": "node ../../../scripts/storybook/runner",
26
26
  "type-check": "tsc -b tsconfig.json"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220518-0420.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220523-0424.1",
32
32
  "@fluentui/scripts": "^1.0.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "@fluentui/react-icons": "^2.0.166-rc.3",
36
- "@griffel/react": "1.0.4",
37
- "@fluentui/react-theme": "0.0.0-nightly-20220518-0420.1",
38
- "@fluentui/react-utilities": "0.0.0-nightly-20220518-0420.1",
36
+ "@griffel/react": "1.0.5",
37
+ "@fluentui/react-theme": "0.0.0-nightly-20220523-0424.1",
38
+ "@fluentui/react-utilities": "0.0.0-nightly-20220523-0424.1",
39
39
  "tslib": "^2.1.0"
40
40
  },
41
41
  "peerDependencies": {
package/lib/Badge.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/Badge/index';
@@ -1 +0,0 @@
1
- export * from './components/CounterBadge/index';
@@ -1 +0,0 @@
1
- export * from './components/PresenceBadge/index';
@@ -1,6 +0,0 @@
1
- import type { BadgeProps } from './Badge.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled Badge, using the `useBadge_unstable` hook.
5
- */
6
- export declare const Badge: ForwardRefComponent<BadgeProps>;
@@ -1,33 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type BadgeSlots = {
3
- root: Slot<'div'>;
4
- icon?: Slot<'span'>;
5
- };
6
- export declare type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & {
7
- /**
8
- * A Badge can be filled, outline, ghost, inverted
9
- * @defaultvalue filled
10
- */
11
- appearance?: 'filled' | 'ghost' | 'outline' | 'tint';
12
- /**
13
- * A Badge can be one of preset colors
14
- * @defaultvalue brand
15
- */
16
- color?: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';
17
- /**
18
- * A Badge can position the icon before or after the content.
19
- * @defaultvalue before
20
- */
21
- iconPosition?: 'before' | 'after';
22
- /**
23
- * A Badge can be square, circular or rounded.
24
- * @defaultvalue circular
25
- */
26
- shape?: 'circular' | 'rounded' | 'square';
27
- /**
28
- * A Badge can be on of several preset sizes.
29
- * @defaultvalue medium
30
- */
31
- size?: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
32
- };
33
- export declare type BadgeState = ComponentState<BadgeSlots> & Required<Pick<BadgeProps, 'appearance' | 'color' | 'iconPosition' | 'shape' | 'size'>>;
@@ -1,5 +0,0 @@
1
- export * from './Badge';
2
- export type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';
3
- export * from './renderBadge';
4
- export * from './useBadge';
5
- export * from './useBadgeStyles';
@@ -1,2 +0,0 @@
1
- import type { BadgeState } from './Badge.types';
2
- export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { BadgeProps, BadgeState } from './Badge.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const useBadge_unstable: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
@@ -1,11 +0,0 @@
1
- import type { BadgeSlots, BadgeState } from './Badge.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `badgeClassNames.root` instead.
5
- */
6
- export declare const badgeClassName = "fui-Badge";
7
- export declare const badgeClassNames: SlotClassNames<BadgeSlots>;
8
- /**
9
- * Applies style classnames to slots
10
- */
11
- export declare const useBadgeStyles_unstable: (state: BadgeState) => BadgeState;
@@ -1,6 +0,0 @@
1
- import type { CounterBadgeProps } from './CounterBadge.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
5
- */
6
- export declare const CounterBadge: ForwardRefComponent<CounterBadgeProps>;
@@ -1,42 +0,0 @@
1
- import type { BadgeProps, BadgeState } from '../Badge/index';
2
- export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape'> & {
3
- /**
4
- * A Badge can have different appearances that emphasize certain parts of it:
5
- * - filled: The default appearance if one is not specified.
6
- * The badge background is filled with color with a contrasting foreground text to match.
7
- * - ghost: The badge background is transparent, with the foreground text taking color to emphasize it.
8
- * @default filled
9
- */
10
- appearance?: 'filled' | 'ghost';
11
- /**
12
- * Semantic colors for a counter badge
13
- * @default brand
14
- */
15
- color?: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;
16
- /**
17
- * Value displayed by the Badge
18
- * @default 0
19
- */
20
- count?: number;
21
- /**
22
- * If a dot should be displayed without the count
23
- * @default false
24
- */
25
- dot?: boolean;
26
- /**
27
- * Max number to be displayed
28
- * @default 99
29
- */
30
- overflowCount?: number;
31
- /**
32
- * A Badge can be circular or rounded
33
- * @default circular
34
- */
35
- shape?: 'circular' | 'rounded';
36
- /**
37
- * If the badge should be shown when count is 0
38
- * @default false
39
- */
40
- showZero?: boolean;
41
- };
42
- export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'color' | 'shape'> & Required<Pick<CounterBadgeProps, 'appearance' | 'color' | 'count' | 'dot' | 'shape' | 'showZero'>>;
@@ -1,4 +0,0 @@
1
- export * from './CounterBadge';
2
- export * from './CounterBadge.types';
3
- export * from './useCounterBadge';
4
- export * from './useCounterBadgeStyles';
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const useCounterBadge_unstable: (props: CounterBadgeProps, ref: React.Ref<HTMLElement>) => CounterBadgeState;
@@ -1,12 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { BadgeSlots } from '../Badge/Badge.types';
3
- import type { CounterBadgeState } from './CounterBadge.types';
4
- /**
5
- * @deprecated Use `counterBadgeClassNames.root` instead.
6
- */
7
- export declare const counterBadgeClassName = "fui-CounterBadge";
8
- export declare const counterBadgeClassNames: SlotClassNames<BadgeSlots>;
9
- /**
10
- * Applies style classnames to slots
11
- */
12
- export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState) => CounterBadgeState;
@@ -1,6 +0,0 @@
1
- import type { PresenceBadgeProps } from './PresenceBadge.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled Badge, using the `useBadge_unstable` hook.
5
- */
6
- export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
@@ -1,17 +0,0 @@
1
- import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';
2
- import type { BadgeProps, BadgeState, BadgeSlots } from '../Badge/Badge.types';
3
- export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb' | 'unknown';
4
- export declare type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root' | 'icon'>>, 'color'> & Pick<BadgeProps, 'size'> & {
5
- /**
6
- * Represents several status
7
- * @default available
8
- */
9
- status?: PresenceBadgeStatus;
10
- /**
11
- * Modifies the display to indicate that the user is out of office.
12
- * This can be combined with any status to display an out-of-office version of that status
13
- * @default false
14
- */
15
- outOfOffice?: boolean;
16
- };
17
- export declare type PresenceBadgeState = ComponentState<BadgeSlots> & BadgeState & Required<Pick<PresenceBadgeProps, 'status' | 'outOfOffice'>>;
@@ -1,4 +0,0 @@
1
- export * from './PresenceBadge';
2
- export * from './PresenceBadge.types';
3
- export * from './usePresenceBadge';
4
- export * from './usePresenceBadgeStyles';
@@ -1,11 +0,0 @@
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>;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const usePresenceBadge_unstable: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>) => PresenceBadgeState;
@@ -1,12 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { BadgeSlots } from '../Badge/Badge.types';
3
- import type { PresenceBadgeState } from './PresenceBadge.types';
4
- /**
5
- * @deprecated Use `presenceBadgeClassNames.root` instead.
6
- */
7
- export declare const presenceBadgeClassName = "fui-PresenceBadge";
8
- export declare const presenceBadgeClassNames: SlotClassNames<BadgeSlots>;
9
- /**
10
- * Applies style classnames to slots
11
- */
12
- export declare const usePresenceBadgeStyles_unstable: (state: PresenceBadgeState) => PresenceBadgeState;
package/lib/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export { Badge, badgeClassName, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable, } from './Badge';
2
- export type { BadgeProps, BadgeSlots, BadgeState } from './Badge';
3
- export { PresenceBadge, presenceBadgeClassName, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable, } from './PresenceBadge';
4
- export type { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge';
5
- export { CounterBadge, counterBadgeClassName, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable, } from './CounterBadge';
6
- export type { CounterBadgeProps, CounterBadgeState } from './CounterBadge';
@@ -1 +0,0 @@
1
- export * from './components/Badge/index';
@@ -1 +0,0 @@
1
- export * from './components/CounterBadge/index';
@@ -1 +0,0 @@
1
- export * from './components/PresenceBadge/index';
@@ -1,6 +0,0 @@
1
- import type { BadgeProps } from './Badge.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled Badge, using the `useBadge_unstable` hook.
5
- */
6
- export declare const Badge: ForwardRefComponent<BadgeProps>;
@@ -1,33 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- export declare type BadgeSlots = {
3
- root: Slot<'div'>;
4
- icon?: Slot<'span'>;
5
- };
6
- export declare type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & {
7
- /**
8
- * A Badge can be filled, outline, ghost, inverted
9
- * @defaultvalue filled
10
- */
11
- appearance?: 'filled' | 'ghost' | 'outline' | 'tint';
12
- /**
13
- * A Badge can be one of preset colors
14
- * @defaultvalue brand
15
- */
16
- color?: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';
17
- /**
18
- * A Badge can position the icon before or after the content.
19
- * @defaultvalue before
20
- */
21
- iconPosition?: 'before' | 'after';
22
- /**
23
- * A Badge can be square, circular or rounded.
24
- * @defaultvalue circular
25
- */
26
- shape?: 'circular' | 'rounded' | 'square';
27
- /**
28
- * A Badge can be on of several preset sizes.
29
- * @defaultvalue medium
30
- */
31
- size?: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
32
- };
33
- export declare type BadgeState = ComponentState<BadgeSlots> & Required<Pick<BadgeProps, 'appearance' | 'color' | 'iconPosition' | 'shape' | 'size'>>;
@@ -1,5 +0,0 @@
1
- export * from './Badge';
2
- export type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';
3
- export * from './renderBadge';
4
- export * from './useBadge';
5
- export * from './useBadgeStyles';
@@ -1,2 +0,0 @@
1
- import type { BadgeState } from './Badge.types';
2
- export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { BadgeProps, BadgeState } from './Badge.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const useBadge_unstable: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
@@ -1,11 +0,0 @@
1
- import type { BadgeSlots, BadgeState } from './Badge.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `badgeClassNames.root` instead.
5
- */
6
- export declare const badgeClassName = "fui-Badge";
7
- export declare const badgeClassNames: SlotClassNames<BadgeSlots>;
8
- /**
9
- * Applies style classnames to slots
10
- */
11
- export declare const useBadgeStyles_unstable: (state: BadgeState) => BadgeState;
@@ -1,6 +0,0 @@
1
- import type { CounterBadgeProps } from './CounterBadge.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
5
- */
6
- export declare const CounterBadge: ForwardRefComponent<CounterBadgeProps>;
@@ -1,42 +0,0 @@
1
- import type { BadgeProps, BadgeState } from '../Badge/index';
2
- export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape'> & {
3
- /**
4
- * A Badge can have different appearances that emphasize certain parts of it:
5
- * - filled: The default appearance if one is not specified.
6
- * The badge background is filled with color with a contrasting foreground text to match.
7
- * - ghost: The badge background is transparent, with the foreground text taking color to emphasize it.
8
- * @default filled
9
- */
10
- appearance?: 'filled' | 'ghost';
11
- /**
12
- * Semantic colors for a counter badge
13
- * @default brand
14
- */
15
- color?: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;
16
- /**
17
- * Value displayed by the Badge
18
- * @default 0
19
- */
20
- count?: number;
21
- /**
22
- * If a dot should be displayed without the count
23
- * @default false
24
- */
25
- dot?: boolean;
26
- /**
27
- * Max number to be displayed
28
- * @default 99
29
- */
30
- overflowCount?: number;
31
- /**
32
- * A Badge can be circular or rounded
33
- * @default circular
34
- */
35
- shape?: 'circular' | 'rounded';
36
- /**
37
- * If the badge should be shown when count is 0
38
- * @default false
39
- */
40
- showZero?: boolean;
41
- };
42
- export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'color' | 'shape'> & Required<Pick<CounterBadgeProps, 'appearance' | 'color' | 'count' | 'dot' | 'shape' | 'showZero'>>;
@@ -1,4 +0,0 @@
1
- export * from './CounterBadge';
2
- export * from './CounterBadge.types';
3
- export * from './useCounterBadge';
4
- export * from './useCounterBadgeStyles';
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const useCounterBadge_unstable: (props: CounterBadgeProps, ref: React.Ref<HTMLElement>) => CounterBadgeState;
@@ -1,12 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { BadgeSlots } from '../Badge/Badge.types';
3
- import type { CounterBadgeState } from './CounterBadge.types';
4
- /**
5
- * @deprecated Use `counterBadgeClassNames.root` instead.
6
- */
7
- export declare const counterBadgeClassName = "fui-CounterBadge";
8
- export declare const counterBadgeClassNames: SlotClassNames<BadgeSlots>;
9
- /**
10
- * Applies style classnames to slots
11
- */
12
- export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState) => CounterBadgeState;
@@ -1,6 +0,0 @@
1
- import type { PresenceBadgeProps } from './PresenceBadge.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * Define a styled Badge, using the `useBadge_unstable` hook.
5
- */
6
- export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
@@ -1,17 +0,0 @@
1
- import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';
2
- import type { BadgeProps, BadgeState, BadgeSlots } from '../Badge/Badge.types';
3
- export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb' | 'unknown';
4
- export declare type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root' | 'icon'>>, 'color'> & Pick<BadgeProps, 'size'> & {
5
- /**
6
- * Represents several status
7
- * @default available
8
- */
9
- status?: PresenceBadgeStatus;
10
- /**
11
- * Modifies the display to indicate that the user is out of office.
12
- * This can be combined with any status to display an out-of-office version of that status
13
- * @default false
14
- */
15
- outOfOffice?: boolean;
16
- };
17
- export declare type PresenceBadgeState = ComponentState<BadgeSlots> & BadgeState & Required<Pick<PresenceBadgeProps, 'status' | 'outOfOffice'>>;
@@ -1,4 +0,0 @@
1
- export * from './PresenceBadge';
2
- export * from './PresenceBadge.types';
3
- export * from './usePresenceBadge';
4
- export * from './usePresenceBadgeStyles';
@@ -1,11 +0,0 @@
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>;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';
3
- /**
4
- * Returns the props and state required to render the component
5
- */
6
- export declare const usePresenceBadge_unstable: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>) => PresenceBadgeState;
@@ -1,12 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { BadgeSlots } from '../Badge/Badge.types';
3
- import type { PresenceBadgeState } from './PresenceBadge.types';
4
- /**
5
- * @deprecated Use `presenceBadgeClassNames.root` instead.
6
- */
7
- export declare const presenceBadgeClassName = "fui-PresenceBadge";
8
- export declare const presenceBadgeClassNames: SlotClassNames<BadgeSlots>;
9
- /**
10
- * Applies style classnames to slots
11
- */
12
- export declare const usePresenceBadgeStyles_unstable: (state: PresenceBadgeState) => PresenceBadgeState;
@@ -1,6 +0,0 @@
1
- export { Badge, badgeClassName, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable, } from './Badge';
2
- export type { BadgeProps, BadgeSlots, BadgeState } from './Badge';
3
- export { PresenceBadge, presenceBadgeClassName, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable, } from './PresenceBadge';
4
- export type { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge';
5
- export { CounterBadge, counterBadgeClassName, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable, } from './CounterBadge';
6
- export type { CounterBadgeProps, CounterBadgeState } from './CounterBadge';