@fluentui/react-badge 9.0.0-rc.7 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/CHANGELOG.json +262 -1
  2. package/CHANGELOG.md +190 -102
  3. package/MIGRATION.md +59 -0
  4. package/README.md +40 -2
  5. package/Spec.md +11 -74
  6. package/dist/index.d.ts +38 -54
  7. package/{lib → dist}/tsdoc-metadata.json +0 -0
  8. package/lib/components/Badge/Badge.js.map +1 -1
  9. package/lib/components/Badge/Badge.types.js.map +1 -1
  10. package/lib/components/Badge/renderBadge.js.map +1 -1
  11. package/lib/components/Badge/useBadge.js +0 -1
  12. package/lib/components/Badge/useBadge.js.map +1 -1
  13. package/lib/components/Badge/useBadgeStyles.js +0 -5
  14. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  15. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  16. package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
  17. package/lib/components/CounterBadge/useCounterBadge.js +1 -2
  18. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  19. package/lib/components/CounterBadge/useCounterBadgeStyles.js +0 -5
  20. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  21. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  22. package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  23. package/lib/components/PresenceBadge/presenceIcons.js.map +1 -1
  24. package/lib/components/PresenceBadge/usePresenceBadge.js +20 -7
  25. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  26. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +10 -6
  27. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  28. package/lib/index.js +3 -6
  29. package/lib/index.js.map +1 -1
  30. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  31. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  32. package/lib-commonjs/components/Badge/useBadge.js +0 -1
  33. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  34. package/lib-commonjs/components/Badge/useBadgeStyles.js +1 -6
  35. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  36. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  37. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +1 -2
  38. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  39. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +1 -6
  40. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  41. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  42. package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -1
  43. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +20 -7
  44. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  45. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +11 -7
  46. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  47. package/lib-commonjs/index.js +1 -22
  48. package/lib-commonjs/index.js.map +1 -1
  49. package/package.json +10 -12
  50. package/lib/Badge.d.ts +0 -1
  51. package/lib/CounterBadge.d.ts +0 -1
  52. package/lib/PresenceBadge.d.ts +0 -1
  53. package/lib/components/Badge/Badge.d.ts +0 -6
  54. package/lib/components/Badge/Badge.types.d.ts +0 -34
  55. package/lib/components/Badge/index.d.ts +0 -5
  56. package/lib/components/Badge/renderBadge.d.ts +0 -2
  57. package/lib/components/Badge/useBadge.d.ts +0 -6
  58. package/lib/components/Badge/useBadgeStyles.d.ts +0 -11
  59. package/lib/components/CounterBadge/CounterBadge.d.ts +0 -6
  60. package/lib/components/CounterBadge/CounterBadge.types.d.ts +0 -41
  61. package/lib/components/CounterBadge/index.d.ts +0 -4
  62. package/lib/components/CounterBadge/useCounterBadge.d.ts +0 -6
  63. package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -12
  64. package/lib/components/PresenceBadge/PresenceBadge.d.ts +0 -6
  65. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +0 -19
  66. package/lib/components/PresenceBadge/index.d.ts +0 -4
  67. package/lib/components/PresenceBadge/presenceIcons.d.ts +0 -11
  68. package/lib/components/PresenceBadge/usePresenceBadge.d.ts +0 -6
  69. package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -12
  70. package/lib/index.d.ts +0 -6
  71. package/lib-commonjs/Badge.d.ts +0 -1
  72. package/lib-commonjs/CounterBadge.d.ts +0 -1
  73. package/lib-commonjs/PresenceBadge.d.ts +0 -1
  74. package/lib-commonjs/components/Badge/Badge.d.ts +0 -6
  75. package/lib-commonjs/components/Badge/Badge.types.d.ts +0 -34
  76. package/lib-commonjs/components/Badge/index.d.ts +0 -5
  77. package/lib-commonjs/components/Badge/renderBadge.d.ts +0 -2
  78. package/lib-commonjs/components/Badge/useBadge.d.ts +0 -6
  79. package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +0 -11
  80. package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +0 -6
  81. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +0 -41
  82. package/lib-commonjs/components/CounterBadge/index.d.ts +0 -4
  83. package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +0 -6
  84. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -12
  85. package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +0 -6
  86. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +0 -19
  87. package/lib-commonjs/components/PresenceBadge/index.d.ts +0 -4
  88. package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +0 -11
  89. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +0 -6
  90. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -12
  91. package/lib-commonjs/index.d.ts +0 -6
@@ -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,19 +0,0 @@
1
- import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';
2
- import type { BadgeCommons, BadgeSlots } from '../Badge/Badge.types';
3
- export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb' | 'unknown';
4
- declare type PresenceBadgeCommons = {
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
- } & 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,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';