@fluentui/react-badge 9.0.0-alpha.83 → 9.0.0-alpha.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. package/CHANGELOG.json +182 -8
  2. package/CHANGELOG.md +63 -8
  3. package/Spec.md +3 -47
  4. package/dist/react-badge.d.ts +73 -123
  5. package/lib/Badge.js.map +1 -1
  6. package/lib/CounterBadge.js.map +1 -1
  7. package/lib/PresenceBadge.js.map +1 -1
  8. package/lib/common/isConformant.js +2 -0
  9. package/lib/common/isConformant.js.map +1 -1
  10. package/lib/components/Badge/Badge.d.ts +6 -2
  11. package/lib/components/Badge/Badge.js.map +1 -1
  12. package/lib/components/Badge/Badge.types.d.ts +20 -32
  13. package/lib/components/Badge/Badge.types.js.map +1 -1
  14. package/lib/components/Badge/index.js.map +1 -1
  15. package/lib/components/Badge/renderBadge.js +3 -4
  16. package/lib/components/Badge/renderBadge.js.map +1 -1
  17. package/lib/components/Badge/useBadge.d.ts +1 -5
  18. package/lib/components/Badge/useBadge.js +29 -18
  19. package/lib/components/Badge/useBadge.js.map +1 -1
  20. package/lib/components/Badge/useBadgeStyles.js +5 -5
  21. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  22. package/lib/components/CounterBadge/CounterBadge.d.ts +1 -8
  23. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  24. package/lib/components/CounterBadge/CounterBadge.types.d.ts +24 -38
  25. package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
  26. package/lib/components/CounterBadge/index.js.map +1 -1
  27. package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -5
  28. package/lib/components/CounterBadge/useCounterBadge.js +25 -19
  29. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  30. package/lib/components/CounterBadge/useCounterBadgeStyles.js +1 -1
  31. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  32. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
  33. package/lib/components/PresenceBadge/PresenceBadge.d.ts +6 -4
  34. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  35. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
  36. package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  37. package/lib/components/PresenceBadge/index.js.map +1 -1
  38. package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
  39. package/lib/components/PresenceBadge/usePresenceBadge.js +15 -21
  40. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  41. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
  42. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  43. package/lib/index.js.map +1 -1
  44. package/lib-commonjs/Badge.js.map +1 -1
  45. package/lib-commonjs/CounterBadge.js.map +1 -1
  46. package/lib-commonjs/PresenceBadge.js.map +1 -1
  47. package/lib-commonjs/common/isConformant.js +2 -0
  48. package/lib-commonjs/common/isConformant.js.map +1 -1
  49. package/lib-commonjs/components/Badge/Badge.d.ts +6 -2
  50. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  51. package/lib-commonjs/components/Badge/Badge.types.d.ts +20 -32
  52. package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
  53. package/lib-commonjs/components/Badge/index.js.map +1 -1
  54. package/lib-commonjs/components/Badge/renderBadge.js +2 -4
  55. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  56. package/lib-commonjs/components/Badge/useBadge.d.ts +1 -5
  57. package/lib-commonjs/components/Badge/useBadge.js +30 -19
  58. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  59. package/lib-commonjs/components/Badge/useBadgeStyles.js +5 -5
  60. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  61. package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +1 -8
  62. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  63. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +24 -38
  64. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
  65. package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
  66. package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -5
  67. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +27 -21
  68. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  69. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +1 -1
  70. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  71. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
  72. package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +6 -4
  73. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  74. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
  75. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  76. package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
  77. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
  78. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +16 -22
  79. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  80. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
  81. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  82. package/lib-commonjs/index.js.map +1 -1
  83. package/package.json +6 -6
  84. package/lib-amd/Badge.d.ts +0 -1
  85. package/lib-amd/Badge.js +0 -6
  86. package/lib-amd/Badge.js.map +0 -1
  87. package/lib-amd/CounterBadge.d.ts +0 -1
  88. package/lib-amd/CounterBadge.js +0 -6
  89. package/lib-amd/CounterBadge.js.map +0 -1
  90. package/lib-amd/PresenceBadge.d.ts +0 -1
  91. package/lib-amd/PresenceBadge.js +0 -6
  92. package/lib-amd/PresenceBadge.js.map +0 -1
  93. package/lib-amd/common/isConformant.d.ts +0 -4
  94. package/lib-amd/common/isConformant.js +0 -15
  95. package/lib-amd/common/isConformant.js.map +0 -1
  96. package/lib-amd/components/Badge/Badge.d.ts +0 -6
  97. package/lib-amd/components/Badge/Badge.js +0 -15
  98. package/lib-amd/components/Badge/Badge.js.map +0 -1
  99. package/lib-amd/components/Badge/Badge.types.d.ts +0 -47
  100. package/lib-amd/components/Badge/Badge.types.js +0 -5
  101. package/lib-amd/components/Badge/Badge.types.js.map +0 -1
  102. package/lib-amd/components/Badge/index.d.ts +0 -5
  103. package/lib-amd/components/Badge/index.js +0 -10
  104. package/lib-amd/components/Badge/index.js.map +0 -1
  105. package/lib-amd/components/Badge/renderBadge.d.ts +0 -2
  106. package/lib-amd/components/Badge/renderBadge.js +0 -14
  107. package/lib-amd/components/Badge/renderBadge.js.map +0 -1
  108. package/lib-amd/components/Badge/useBadge.d.ts +0 -10
  109. package/lib-amd/components/Badge/useBadge.js +0 -25
  110. package/lib-amd/components/Badge/useBadge.js.map +0 -1
  111. package/lib-amd/components/Badge/useBadgeStyles.d.ts +0 -5
  112. package/lib-amd/components/Badge/useBadgeStyles.js +0 -234
  113. package/lib-amd/components/Badge/useBadgeStyles.js.map +0 -1
  114. package/lib-amd/components/CounterBadge/CounterBadge.d.ts +0 -12
  115. package/lib-amd/components/CounterBadge/CounterBadge.js +0 -15
  116. package/lib-amd/components/CounterBadge/CounterBadge.js.map +0 -1
  117. package/lib-amd/components/CounterBadge/CounterBadge.types.d.ts +0 -55
  118. package/lib-amd/components/CounterBadge/CounterBadge.types.js +0 -5
  119. package/lib-amd/components/CounterBadge/CounterBadge.types.js.map +0 -1
  120. package/lib-amd/components/CounterBadge/index.d.ts +0 -4
  121. package/lib-amd/components/CounterBadge/index.js +0 -9
  122. package/lib-amd/components/CounterBadge/index.js.map +0 -1
  123. package/lib-amd/components/CounterBadge/useCounterBadge.d.ts +0 -10
  124. package/lib-amd/components/CounterBadge/useCounterBadge.js +0 -28
  125. package/lib-amd/components/CounterBadge/useCounterBadge.js.map +0 -1
  126. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -5
  127. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js +0 -46
  128. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js.map +0 -1
  129. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  130. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -64
  131. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
  132. package/lib-amd/components/PresenceBadge/PresenceBadge.d.ts +0 -8
  133. package/lib-amd/components/PresenceBadge/PresenceBadge.js +0 -15
  134. package/lib-amd/components/PresenceBadge/PresenceBadge.js.map +0 -1
  135. package/lib-amd/components/PresenceBadge/PresenceBadge.types.d.ts +0 -28
  136. package/lib-amd/components/PresenceBadge/PresenceBadge.types.js +0 -5
  137. package/lib-amd/components/PresenceBadge/PresenceBadge.types.js.map +0 -1
  138. package/lib-amd/components/PresenceBadge/index.d.ts +0 -4
  139. package/lib-amd/components/PresenceBadge/index.js +0 -9
  140. package/lib-amd/components/PresenceBadge/index.js.map +0 -1
  141. package/lib-amd/components/PresenceBadge/usePresenceBadge.d.ts +0 -10
  142. package/lib-amd/components/PresenceBadge/usePresenceBadge.js +0 -37
  143. package/lib-amd/components/PresenceBadge/usePresenceBadge.js.map +0 -1
  144. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -5
  145. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js +0 -58
  146. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js.map +0 -1
  147. package/lib-amd/index.d.ts +0 -5
  148. package/lib-amd/index.js +0 -10
  149. package/lib-amd/index.js.map +0 -1
@@ -1,182 +1,132 @@
1
- import type { ComponentPropsCompat } from '@fluentui/react-utilities';
2
- import type { ObjectShorthandPropsCompat } from '@fluentui/react-utilities';
1
+ import type { ComponentProps } from '@fluentui/react-utilities';
2
+ import type { ComponentState } from '@fluentui/react-utilities';
3
+ import { ObjectShorthandProps } from '@fluentui/react-utilities';
3
4
  import * as React_2 from 'react';
4
- import type { ShorthandPropsCompat } from '@fluentui/react-utilities';
5
+ import { ShorthandProps } from '@fluentui/react-utilities';
6
+ import { ShorthandRenderFunction } from '@fluentui/react-utilities';
5
7
 
6
8
  /**
7
9
  * Define a styled Badge, using the `useBadge` hook.
8
10
  */
9
- export declare const Badge: React_2.FunctionComponent<BadgeProps & React_2.RefAttributes<HTMLElement>>;
11
+ export declare const Badge: React_2.ForwardRefExoticComponent<Pick<{
12
+ root?: ShorthandProps<ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>>;
13
+ icon?: ShorthandProps<ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>>;
14
+ }, "icon"> & React_2.HTMLAttributes<HTMLElement> & {
15
+ children?: string | number | boolean | {} | React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | React_2.ReactNodeArray | React_2.ReactPortal | ShorthandRenderFunction<React_2.HTMLAttributes<HTMLElement>> | null | undefined;
16
+ } & Partial<BadgeCommons> & React_2.RefAttributes<HTMLElement>>;
10
17
 
11
- export declare type BadgeAppearance = 'filled' | 'outline' | 'ghost' | 'tint';
12
-
13
- export declare type BadgeColors = 'brand' | 'danger' | 'severe' | 'warning' | 'success' | 'important' | 'informative' | 'subtle';
14
-
15
- export declare type BadgeProps = ComponentPropsCompat & React_2.HTMLAttributes<HTMLElement> & {
16
- /**
17
- * A Badge can be sized.
18
- * @defaultvalue medium
19
- */
20
- size?: BadgeSize;
21
- /**
22
- * A Badge can be square, circular or rounded
23
- * @defaultvalue circular
24
- */
25
- shape?: BadgeShape;
18
+ export declare type BadgeCommons = {
26
19
  /**
27
20
  * A Badge can be filled, outline, ghost, inverted
28
21
  * @defaultvalue filled
29
22
  */
30
- appearance?: BadgeAppearance;
23
+ appearance: 'filled' | 'ghost' | 'outline' | 'tint';
31
24
  /**
32
- * A Badge has a preset of colors
33
- * @defaultvalue filled
25
+ * A Badge can be one of preset colors
26
+ * @defaultvalue brand
34
27
  */
35
- color?: BadgeColors;
28
+ color: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';
36
29
  /**
37
- * Icon slot
38
- */
39
- icon?: ShorthandPropsCompat<React_2.HTMLAttributes<HTMLElement>>;
40
- /**
41
- * Position for Icon to be rendered
30
+ * A Badge can position the icon before or after the content.
42
31
  * @defaultvalue before
43
32
  */
44
- iconPosition?: 'before' | 'after';
45
- };
46
-
47
- export declare type BadgeShape = 'rounded' | 'square' | 'circular';
48
-
49
- /**
50
- * Consts listing which props are shorthand props.
51
- */
52
- export declare const badgeShorthandPropsCompat: readonly ["icon"];
53
-
54
- export declare type BadgeSize = 'smallest' | 'smaller' | 'small' | 'medium' | 'large' | 'larger' | 'largest';
55
-
56
- export declare type BadgeState = BadgeProps & {
33
+ iconPosition: 'before' | 'after';
57
34
  /**
58
- * Ref to the root slot
35
+ * A Badge can be square, circular or rounded.
36
+ * @defaultvalue circular
59
37
  */
60
- ref: React_2.RefObject<HTMLElement>;
38
+ shape: 'circular' | 'rounded' | 'square';
61
39
  /**
62
- * Icon slot when processed by internal state
40
+ * A Badge can be on of several preset sizes.
41
+ * @defaultvalue medium
63
42
  */
64
- icon?: ObjectShorthandPropsCompat<React_2.HTMLAttributes<HTMLSpanElement>>;
43
+ size: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
65
44
  };
66
45
 
67
- /**
68
- * Define a styled CounterBadge, using the `useCounterBadge` hook.
69
- */
70
- export declare const CounterBadge: React_2.ForwardRefExoticComponent<Pick<BadgeProps, "children" | "as" | "className" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "size" | "iconPosition"> & {
71
- shape?: "rounded" | "circular" | undefined;
72
- appearance?: "filled" | "ghost" | undefined;
73
- overflowCount?: number | undefined;
74
- count?: number | undefined;
75
- showZero?: boolean | undefined;
76
- dot?: boolean | undefined;
77
- } & React_2.RefAttributes<HTMLElement>>;
78
-
79
- export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & {
80
- /**
81
- * A Badge can be circular or rounded
82
- * @defaultvalue circular
83
- */
84
- shape?: Extract<BadgeProps['shape'], 'rounded' | 'circular'>;
85
- /**
86
- * A Badge can be filled, ghost
87
- * @defaultvalue filled
88
- */
89
- appearance?: Extract<BadgeProps['appearance'], 'filled' | 'ghost'>;
90
- /**
91
- * Max number to be displayed
92
- * @defaultvalue 99
93
- */
94
- overflowCount?: number;
95
- /**
96
- * Value displayed by the Badge
97
- * @defaultvalue 0
98
- */
99
- count?: number;
100
- /**
101
- * If the badge should be shown when count is 0
102
- * @defaultvalue false
103
- */
104
- showZero?: boolean;
105
- /**
106
- * If a dot badge should be displayed
107
- * @defaultvalue false
108
- */
109
- dot?: boolean;
46
+ export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
47
+
48
+ export declare type BadgeSlots = {
49
+ root: ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>;
50
+ icon?: ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>;
110
51
  };
111
52
 
53
+ export declare type BadgeState = ComponentState<BadgeSlots> & BadgeCommons;
54
+
112
55
  /**
113
- * Consts listing which props are shorthand props.
56
+ * Define a styled CounterBadge, using the `useCounterBadge` hook.
114
57
  */
115
- export declare const counterBadgeShorthandPropsCompat: readonly ["icon"];
58
+ export declare const CounterBadge: React_2.ForwardRefExoticComponent<Pick<BadgeProps, "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "iconPosition" | "size"> & Partial<CounterBadgeCommons> & React_2.RefAttributes<HTMLElement>>;
116
59
 
117
- export declare type CounterBadgeState = BadgeState & {
60
+ export declare type CounterBadgeCommons = {
118
61
  /**
119
62
  * Max number to be displayed
120
- * @defaultvalue 99
63
+ * @default 99
121
64
  */
122
65
  overflowCount: number;
123
66
  /**
124
67
  * Value displayed by the Badge
125
- * @defaultvalue 0
68
+ * @default 0
126
69
  */
127
70
  count: number;
128
71
  /**
129
72
  * If the badge should be shown when count is 0
130
- * @defaultvalue false
73
+ * @default false
131
74
  */
132
75
  showZero: boolean;
133
76
  /**
134
- * If a dot badge should be displayed
135
- * @defaultvalue false
77
+ * If a dot should be displayed without the count
78
+ * @default false
136
79
  */
137
80
  dot: boolean;
138
- };
139
-
140
- /**
141
- * Define a styled Badge, using the `useBadge` hook.
142
- */
143
- export declare const PresenceBadge: React_2.ForwardRefExoticComponent<Pick<BadgeProps, "children" | "as" | "className" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "size" | "iconPosition"> & {
144
- status?: "available" | "busy" | "outOfOffice" | "away" | "offline" | "doNotDisturb" | undefined;
145
- outOfOffice?: boolean | undefined;
146
- } & React_2.RefAttributes<HTMLElement>>;
147
-
148
- export declare type PresenceBadgeProps = Omit<BadgeProps, 'shape' | 'appearance'> & {
149
81
  /**
150
- * Represents several status
151
- * @defaultvalue available
82
+ * A Badge can be circular or rounded
83
+ * @default circular
152
84
  */
153
- status?: PresenceBadgeStatus;
85
+ shape: 'circular' | 'rounded';
154
86
  /**
155
- * Modifies the display to indicate that the user is out of office.
156
- * This can be combined with any status to display an out-of-office version of that status
157
- * @defaultvalue false
87
+ * A Badge can be filled, ghost
88
+ * @default filled
158
89
  */
159
- outOfOffice?: boolean;
90
+ appearance: 'filled' | 'ghost';
160
91
  };
161
92
 
162
93
  /**
163
- * Consts listing which props are shorthand props.
94
+ * {@docCategory CounterBadge}
95
+ */
96
+ export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & Partial<CounterBadgeCommons>;
97
+
98
+ /**
99
+ * {@docCategory CounterBadge}
100
+ */
101
+ export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape'> & CounterBadgeCommons;
102
+
103
+ /**
104
+ * Define a styled Badge, using the `useBadge` hook.
164
105
  */
165
- export declare const presenceBadgeShorthandPropsCompat: (keyof PresenceBadgeProps)[];
106
+ export declare const PresenceBadge: React_2.ForwardRefExoticComponent<Pick<{
107
+ root?: ShorthandProps<ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>>;
108
+ icon?: ShorthandProps<ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>>;
109
+ }, "icon"> & React_2.HTMLAttributes<HTMLElement> & {
110
+ children?: string | number | boolean | {} | React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | React_2.ReactNodeArray | React_2.ReactPortal | ShorthandRenderFunction<React_2.HTMLAttributes<HTMLElement>> | null | undefined;
111
+ } & Partial<BadgeCommons> & Partial<PresenceBadgeCommons> & React_2.RefAttributes<HTMLElement>>;
166
112
 
167
- export declare type PresenceBadgeState = Omit<BadgeState, 'shape' | 'appearance'> & {
113
+ export declare interface PresenceBadgeCommons {
168
114
  /**
169
115
  * Represents several status
170
- * @defaultvalue available
116
+ * @default available
171
117
  */
172
118
  status: PresenceBadgeStatus;
173
119
  /**
174
120
  * Modifies the display to indicate that the user is out of office.
175
121
  * This can be combined with any status to display an out-of-office version of that status
176
- * @defaultvalue false
122
+ * @default false
177
123
  */
178
124
  outOfOffice: boolean;
179
- };
125
+ }
126
+
127
+ export declare type PresenceBadgeProps = BadgeProps & Partial<PresenceBadgeCommons>;
128
+
129
+ export declare type PresenceBadgeState = BadgeState & PresenceBadgeCommons;
180
130
 
181
131
  export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
182
132
 
@@ -185,7 +135,7 @@ export declare const renderBadge: (state: BadgeState) => JSX.Element;
185
135
  /**
186
136
  * Returns the props and state required to render the component
187
137
  */
188
- export declare const useBadge: (props: BadgeProps, ref: React_2.Ref<HTMLElement>, defaultProps?: BadgeProps | undefined) => BadgeState;
138
+ export declare const useBadge: (props: BadgeProps, ref: React_2.Ref<HTMLElement>) => BadgeState;
189
139
 
190
140
  /**
191
141
  * Applies style classnames to slots
@@ -195,7 +145,7 @@ export declare const useBadgeStyles: (state: BadgeState) => BadgeState;
195
145
  /**
196
146
  * Returns the props and state required to render the component
197
147
  */
198
- export declare const useCounterBadge: (props: CounterBadgeProps, ref: React_2.Ref<HTMLElement>, defaultProps?: CounterBadgeProps | undefined) => CounterBadgeState;
148
+ export declare const useCounterBadge: (props: CounterBadgeProps, ref: React_2.Ref<HTMLElement>) => CounterBadgeState;
199
149
 
200
150
  /**
201
151
  * Applies style classnames to slots
@@ -205,7 +155,7 @@ export declare const useCounterBadgeStyles: (state: CounterBadgeState) => Counte
205
155
  /**
206
156
  * Returns the props and state required to render the component
207
157
  */
208
- export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React_2.Ref<HTMLElement>, defaultProps?: PresenceBadgeProps | undefined) => PresenceBadgeState;
158
+ export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React_2.Ref<HTMLElement>) => PresenceBadgeState;
209
159
 
210
160
  /**
211
161
  * Applies style classnames to slots
package/lib/Badge.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"../src/","sources":["Badge.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Badge/index';\n"]}
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../src/Badge.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CounterBadge.js","sourceRoot":"../src/","sources":["CounterBadge.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './components/CounterBadge/index';\n"]}
1
+ {"version":3,"file":"CounterBadge.js","sourceRoot":"","sources":["../src/CounterBadge.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PresenceBadge.js","sourceRoot":"../src/","sources":["PresenceBadge.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './components/PresenceBadge/index';\n"]}
1
+ {"version":3,"file":"PresenceBadge.js","sourceRoot":"","sources":["../src/PresenceBadge.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
@@ -4,6 +4,8 @@ export function isConformant(testInfo) {
4
4
  var defaultOptions = {
5
5
  asPropHandlesRef: true,
6
6
  componentPath: module.parent.filename.replace('.test', ''),
7
+ // https://github.com/microsoft/fluentui/issues/19522
8
+ skipAsPropTests: true,
7
9
  extraTests: makeStylesTests
8
10
  };
9
11
  baseIsConformant(defaultOptions, testInfo);
@@ -1 +1 @@
1
- {"version":3,"sources":["common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AACA,OAAO,eAAP,MAA4B,yCAA5B;AAGA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,UAAU,EAAE;AAH+C,GAA7D;AAMA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n extraTests: makeStylesTests as TestObject<TProps>,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AACA,OAAO,eAAP,MAA4B,yCAA5B;AAGA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D;AACA,IAAA,eAAe,EAAE,IAJ0C;AAK3D,IAAA,UAAU,EAAE;AAL+C,GAA7D;AAQA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
- import type { BadgeProps } from './Badge.types';
3
2
  /**
4
3
  * Define a styled Badge, using the `useBadge` hook.
5
4
  */
6
- export declare const Badge: React.FunctionComponent<BadgeProps & React.RefAttributes<HTMLElement>>;
5
+ export declare const Badge: React.ForwardRefExoticComponent<Pick<{
6
+ root?: import("@fluentui/react-utilities").ShorthandProps<import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>>;
7
+ icon?: import("@fluentui/react-utilities").ShorthandProps<import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>>;
8
+ }, "icon"> & React.HTMLAttributes<HTMLElement> & {
9
+ children?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ShorthandRenderFunction<React.HTMLAttributes<HTMLElement>> | null | undefined;
10
+ } & Partial<import("./Badge.types").BadgeCommons> & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,YAAzB;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,WAAT,QAA4B,eAA5B;AAGA;;AAEG;;AACH,OAAO,IAAM,KAAK,gBAA2E,KAAK,CAAC,UAAN,CAG3F,UAAC,KAAD,EAAQ,GAAR,EAAW;AACX,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AACA,EAAA,cAAc,CAAC,KAAD,CAAd;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CAR4F,CAAtF;AAUP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useBadge } from './useBadge';\nimport { useBadgeStyles } from './useBadgeStyles';\nimport { renderBadge } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\n\n/**\n * Define a styled Badge, using the `useBadge` hook.\n */\nexport const Badge: React.FunctionComponent<BadgeProps & React.RefAttributes<HTMLElement>> = React.forwardRef<\n HTMLElement,\n BadgeProps\n>((props, ref) => {\n const state = useBadge(props, ref);\n useBadgeStyles(state);\n\n return renderBadge(state);\n});\n\nBadge.displayName = 'Badge';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,YAAzB;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,WAAT,QAA4B,eAA5B;AAGA;;AAEG;;AACH,OAAO,IAAM,KAAK,gBAAG,KAAK,CAAC,UAAN,CAA0C,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AACA,EAAA,cAAc,CAAC,KAAD,CAAd;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALoB,CAAd;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -1,47 +1,35 @@
1
1
  import * as React from 'react';
2
- import type { ComponentPropsCompat, ShorthandPropsCompat, ObjectShorthandPropsCompat } from '@fluentui/react-utilities';
3
- export declare type BadgeSize = 'smallest' | 'smaller' | 'small' | 'medium' | 'large' | 'larger' | 'largest';
4
- export declare type BadgeAppearance = 'filled' | 'outline' | 'ghost' | 'tint';
5
- export declare type BadgeShape = 'rounded' | 'square' | 'circular';
6
- export declare type BadgeColors = 'brand' | 'danger' | 'severe' | 'warning' | 'success' | 'important' | 'informative' | 'subtle';
7
- export declare type BadgeProps = ComponentPropsCompat & React.HTMLAttributes<HTMLElement> & {
8
- /**
9
- * A Badge can be sized.
10
- * @defaultvalue medium
11
- */
12
- size?: BadgeSize;
13
- /**
14
- * A Badge can be square, circular or rounded
15
- * @defaultvalue circular
16
- */
17
- shape?: BadgeShape;
2
+ import type { ComponentProps, ComponentState, ObjectShorthandProps } from '@fluentui/react-utilities';
3
+ export declare type BadgeSlots = {
4
+ root: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
5
+ icon?: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
6
+ };
7
+ export declare type BadgeCommons = {
18
8
  /**
19
9
  * A Badge can be filled, outline, ghost, inverted
20
10
  * @defaultvalue filled
21
11
  */
22
- appearance?: BadgeAppearance;
12
+ appearance: 'filled' | 'ghost' | 'outline' | 'tint';
23
13
  /**
24
- * A Badge has a preset of colors
25
- * @defaultvalue filled
26
- */
27
- color?: BadgeColors;
28
- /**
29
- * Icon slot
14
+ * A Badge can be one of preset colors
15
+ * @defaultvalue brand
30
16
  */
31
- icon?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
17
+ color: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';
32
18
  /**
33
- * Position for Icon to be rendered
19
+ * A Badge can position the icon before or after the content.
34
20
  * @defaultvalue before
35
21
  */
36
- iconPosition?: 'before' | 'after';
37
- };
38
- export declare type BadgeState = BadgeProps & {
22
+ iconPosition: 'before' | 'after';
39
23
  /**
40
- * Ref to the root slot
24
+ * A Badge can be square, circular or rounded.
25
+ * @defaultvalue circular
41
26
  */
42
- ref: React.RefObject<HTMLElement>;
27
+ shape: 'circular' | 'rounded' | 'square';
43
28
  /**
44
- * Icon slot when processed by internal state
29
+ * A Badge can be on of several preset sizes.
30
+ * @defaultvalue medium
45
31
  */
46
- icon?: ObjectShorthandPropsCompat<React.HTMLAttributes<HTMLSpanElement>>;
32
+ size: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
47
33
  };
34
+ export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
35
+ export declare type BadgeState = ComponentState<BadgeSlots> & BadgeCommons;
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.types.js","sourceRoot":"../src/","sources":["components/Badge/Badge.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentPropsCompat, ShorthandPropsCompat, ObjectShorthandPropsCompat } from '@fluentui/react-utilities';\n\nexport type BadgeSize = 'smallest' | 'smaller' | 'small' | 'medium' | 'large' | 'larger' | 'largest';\n\nexport type BadgeAppearance = 'filled' | 'outline' | 'ghost' | 'tint';\n\nexport type BadgeShape = 'rounded' | 'square' | 'circular';\n\nexport type BadgeColors =\n | 'brand'\n | 'danger'\n | 'severe'\n | 'warning'\n | 'success'\n | 'important'\n | 'informative'\n | 'subtle';\n\nexport type BadgeProps = ComponentPropsCompat &\n React.HTMLAttributes<HTMLElement> & {\n /**\n * A Badge can be sized.\n * @defaultvalue medium\n */\n size?: BadgeSize;\n\n /**\n * A Badge can be square, circular or rounded\n * @defaultvalue circular\n */\n shape?: BadgeShape;\n\n /**\n * A Badge can be filled, outline, ghost, inverted\n * @defaultvalue filled\n */\n appearance?: BadgeAppearance;\n\n /**\n * A Badge has a preset of colors\n * @defaultvalue filled\n */\n color?: BadgeColors;\n\n /**\n * Icon slot\n */\n icon?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n\n /**\n * Position for Icon to be rendered\n * @defaultvalue before\n */\n iconPosition?: 'before' | 'after';\n };\n\nexport type BadgeState = BadgeProps & {\n /**\n * Ref to the root slot\n */\n ref: React.RefObject<HTMLElement>;\n /**\n * Icon slot when processed by internal state\n */\n icon?: ObjectShorthandPropsCompat<React.HTMLAttributes<HTMLSpanElement>>;\n};\n"]}
1
+ {"version":3,"file":"Badge.types.js","sourceRoot":"","sources":["../../../src/components/Badge/Badge.types.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Badge/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './Badge';\nexport * from './Badge.types';\nexport * from './renderBadge';\nexport * from './useBadge';\nexport * from './useBadgeStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Badge/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import { __assign } from "tslib";
2
2
  import * as React from 'react';
3
- import { getSlotsCompat } from '@fluentui/react-utilities';
4
- import { badgeShorthandPropsCompat } from './useBadge';
3
+ import { getSlots } from '@fluentui/react-utilities';
5
4
  export var renderBadge = function (state) {
6
- var _a = getSlotsCompat(state, badgeShorthandPropsCompat),
5
+ var _a = getSlots(state, ['icon', 'root']),
7
6
  slots = _a.slots,
8
7
  slotProps = _a.slotProps;
9
8
 
10
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.iconPosition === 'before' && /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)), state.children, state.iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)));
9
+ return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.iconPosition === 'before' && /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)), state.root.children, state.iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)));
11
10
  };
12
11
  //# sourceMappingURL=renderBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Badge/renderBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,yBAAT,QAA0C,YAA1C;AAGA,OAAO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,cAAc,CAAC,KAAD,EAAQ,yBAAR,CAArC;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,iBAAmC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADtC,EAEG,KAAK,CAAC,QAFT,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,iBAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAHrC,CADF;AAOD,CAVM","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { badgeShorthandPropsCompat } from './useBadge';\nimport type { BadgeState } from './Badge.types';\n\nexport const renderBadge = (state: BadgeState) => {\n const { slots, slotProps } = getSlotsCompat(state, badgeShorthandPropsCompat);\n\n return (\n <slots.root {...slotProps.root}>\n {state.iconPosition === 'before' && <slots.icon {...slotProps.icon} />}\n {state.children}\n {state.iconPosition === 'after' && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,QAAQ,CAAa,KAAb,EAAoB,CAAC,MAAD,EAAS,MAAT,CAApB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,iBAAmC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADtC,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,iBAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAHrC,CADF;AAOD,CAVM","sourceRoot":""}
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { BadgeProps, BadgeState } from './Badge.types';
3
- /**
4
- * Consts listing which props are shorthand props.
5
- */
6
- export declare const badgeShorthandPropsCompat: readonly ["icon"];
7
3
  /**
8
4
  * Returns the props and state required to render the component
9
5
  */
10
- export declare const useBadge: (props: BadgeProps, ref: React.Ref<HTMLElement>, defaultProps?: BadgeProps | undefined) => BadgeState;
6
+ export declare const useBadge: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
@@ -1,25 +1,36 @@
1
- import * as React from 'react';
2
- import { makeMergeProps, resolveShorthandProps, useMergedRefs } from '@fluentui/react-utilities';
3
- /**
4
- * Consts listing which props are shorthand props.
5
- */
6
-
7
- export var badgeShorthandPropsCompat = ['icon'];
8
- var mergeProps = /*#__PURE__*/makeMergeProps({
9
- deepMerge: badgeShorthandPropsCompat
10
- });
1
+ import { __assign } from "tslib";
2
+ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
11
3
  /**
12
4
  * Returns the props and state required to render the component
13
5
  */
14
6
 
15
- export var useBadge = function (props, ref, defaultProps) {
16
- var state = mergeProps({
17
- ref: useMergedRefs(ref, React.useRef(null)),
18
- shape: 'circular',
19
- size: 'medium',
20
- iconPosition: 'before',
21
- 'aria-hidden': true
22
- }, defaultProps && resolveShorthandProps(defaultProps, badgeShorthandPropsCompat), resolveShorthandProps(props, badgeShorthandPropsCompat));
7
+ export var useBadge = function (props, ref) {
8
+ var _a = props.shape,
9
+ shape = _a === void 0 ? 'circular' : _a,
10
+ _b = props.size,
11
+ size = _b === void 0 ? 'medium' : _b,
12
+ _c = props.iconPosition,
13
+ iconPosition = _c === void 0 ? 'before' : _c,
14
+ _d = props.appearance,
15
+ appearance = _d === void 0 ? 'filled' : _d,
16
+ _e = props.color,
17
+ color = _e === void 0 ? 'brand' : _e;
18
+ var state = {
19
+ shape: shape,
20
+ size: size,
21
+ iconPosition: iconPosition,
22
+ appearance: appearance,
23
+ color: color,
24
+ components: {
25
+ root: 'div',
26
+ icon: 'span'
27
+ },
28
+ root: getNativeElementProps('div', __assign({
29
+ ref: ref,
30
+ 'aria-hidden': true
31
+ }, props)),
32
+ icon: resolveShorthand(props.icon)
33
+ };
23
34
  return state;
24
35
  };
25
36
  //# sourceMappingURL=useBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Badge/useBadge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,EAAyB,qBAAzB,EAAgD,aAAhD,QAAqE,2BAArE;AAGA;;AAEG;;AACH,OAAO,IAAM,yBAAyB,GAAG,CAAC,MAAD,CAAlC;AAEP,IAAM,UAAU,gBAAG,cAAc,CAAa;AAAE,EAAA,SAAS,EAAE;AAAb,CAAb,CAAjC;AAEA;;AAEG;;AACH,OAAO,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAAiD,YAAjD,EAA0E;AAChG,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,KAAK,CAAC,MAAN,CAAa,IAAb,CAAN,CADpB;AAEE,IAAA,KAAK,EAAE,UAFT;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,YAAY,EAAE,QAJhB;AAKE,mBAAe;AALjB,GADsB,EAQtB,YAAY,IAAI,qBAAqB,CAAC,YAAD,EAAe,yBAAf,CARf,EAStB,qBAAqB,CAAC,KAAD,EAAQ,yBAAR,CATC,CAAxB;AAYA,SAAO,KAAP;AACD,CAdM","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps, useMergedRefs } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState } from './Badge.types';\n\n/**\n * Consts listing which props are shorthand props.\n */\nexport const badgeShorthandPropsCompat = ['icon'] as const;\n\nconst mergeProps = makeMergeProps<BadgeState>({ deepMerge: badgeShorthandPropsCompat });\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useBadge = (props: BadgeProps, ref: React.Ref<HTMLElement>, defaultProps?: BadgeProps): BadgeState => {\n const state = mergeProps(\n {\n ref: useMergedRefs(ref, React.useRef(null)),\n shape: 'circular',\n size: 'medium',\n iconPosition: 'before',\n 'aria-hidden': true,\n },\n defaultProps && resolveShorthandProps(defaultProps, badgeShorthandPropsCompat),\n resolveShorthandProps(props, badgeShorthandPropsCompat),\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Badge/useBadge.ts"],"names":[],"mappings":";AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAA+C;AAEnE,MAAA,EAAA,GAKE,KAAK,CALW,KAAlB;AAAA,MAAA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,UAAH,GAAa,EAAlB;AAAA,MACA,EAAA,GAIE,KAAK,CAJQ,IADf;AAAA,MACA,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EADf;AAAA,MAEA,EAAA,GAGE,KAAK,CAHgB,YAFvB;AAAA,MAEA,YAAY,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EAFvB;AAAA,MAGA,EAAA,GAEE,KAAK,CAFc,UAHrB;AAAA,MAGA,UAAU,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EAHrB;AAAA,MAIA,EAAA,GACE,KAAK,CADQ,KAJf;AAAA,MAIA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,OAAH,GAAU,EAJf;AAOF,MAAM,KAAK,GAAe;AACxB,IAAA,KAAK,EAAA,KADmB;AAExB,IAAA,IAAI,EAAA,IAFoB;AAGxB,IAAA,YAAY,EAAA,YAHY;AAIxB,IAAA,UAAU,EAAA,UAJc;AAKxB,IAAA,KAAK,EAAA,KALmB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KANY;AAUxB,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAM,QAAA,CAAA;AAC/B,MAAA,GAAG,EAAA,GAD4B;AAE/B,qBAAe;AAFgB,KAAA,EAG5B,KAH4B,CAAN,CAVH;AAexB,IAAA,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP;AAfE,GAA1B;AAkBA,SAAO,KAAP;AACD,CA5BM","sourceRoot":""}
@@ -24,12 +24,12 @@ var useStyles = /*#__PURE__*/__styles({
24
24
  "Bahqtrf": "f1kx028l",
25
25
  "qhf8xq": "f10pi13n"
26
26
  },
27
- "rootSmallest": {
27
+ "rootTiny": {
28
28
  "a9b677": "f16dn6v3",
29
29
  "Bqenvij": "f3mu39s",
30
30
  "Be2twd7": "f130uwy9"
31
31
  },
32
- "rootSmaller": {
32
+ "rootExtraSmall": {
33
33
  "a9b677": "fpd43o0",
34
34
  "Bqenvij": "f30q22z",
35
35
  "Be2twd7": "f1tccstq"
@@ -58,7 +58,7 @@ var useStyles = /*#__PURE__*/__styles({
58
58
  "Be2twd7": "f1ugzwwg",
59
59
  "rmohyg": "f19jf40t"
60
60
  },
61
- "rootLargerLargest": {
61
+ "rootExtraLarge": {
62
62
  "Bf4jedk": "fwbmr0d",
63
63
  "Bqenvij": "f1d2rq10",
64
64
  "z189sj": ["f11qrl6u", "fjlbh76"],
@@ -73,7 +73,7 @@ var useStyles = /*#__PURE__*/__styles({
73
73
  "rootRounded": {
74
74
  "Dimara": "fnpfh4l"
75
75
  },
76
- "rootRoundedSmallSmallerSmallest": {
76
+ "rootRoundedSmallToTiny": {
77
77
  "Dimara": "f1mhewp8"
78
78
  },
79
79
  "rootCircular": {
@@ -313,7 +313,7 @@ export var useBadgeStyles = function (state) {
313
313
  var isImportant = state.color === 'important';
314
314
  var isInformative = state.color === 'informative';
315
315
  var isSubtle = state.color === 'subtle';
316
- state.className = mergeClasses(styles.root, state.size === 'smallest' && styles.rootSmallest, state.size === 'smaller' && styles.rootSmaller, state.size === 'small' && styles.rootSmall, state.size === 'medium' && styles.rootMedium, state.size === 'large' && styles.rootLarge, (state.size === 'larger' || state.size === 'largest') && styles.rootLargerLargest, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shape === 'rounded' && (state.size === 'small' || state.size === 'smaller' || state.size === 'smallest') && styles.rootRoundedSmallSmallerSmallest, isGhost && styles.rootGhost, isOutline && styles.rootOutline, isTint && styles.rootTint, isFilled && isDanger && styles.rootFilledDanger, isOutline && isDanger && styles.rootOutlineDanger, isTint && isDanger && styles.rootTintDanger, isGhost && isDanger && styles.rootGhostDanger, isFilled && isSevere && styles.rootFilledSevere, isOutline && isSevere && styles.rootOutlineSevere, isTint && isSevere && styles.rootTintSevere, isGhost && isSevere && styles.rootGhostSevere, isFilled && isWarning && styles.rootFilledWarning, isOutline && isWarning && styles.rootOutlineWarning, isTint && isWarning && styles.rootTintWarning, isGhost && isWarning && styles.rootGhostWarning, isFilled && isSuccess && styles.rootFilledSuccess, isOutline && isSuccess && styles.rootOutlineSuccess, isTint && isSuccess && styles.rootTintSuccess, isGhost && isSuccess && styles.rootGhostSuccess, isFilled && isImportant && styles.rootFilledImportant, isOutline && isImportant && styles.rootOutlineImportant, isTint && isImportant && styles.rootTintImportant, isGhost && isImportant && styles.rootGhostImportant, isFilled && isInformative && styles.rootFilledInformative, isOutline && isInformative && styles.rootOutlineInformative, isTint && isInformative && styles.rootTintInformative, isGhost && isInformative && styles.rootGhostInformative, isFilled && isSubtle && styles.rootFilledSubtle, isOutline && isSubtle && styles.rootOutlineSubtle, isTint && isSubtle && styles.rootTintSubtle, isGhost && isSubtle && styles.rootGhostSubtle, state.className);
316
+ state.root.className = mergeClasses(styles.root, state.size === 'tiny' && styles.rootTiny, state.size === 'extra-small' && styles.rootExtraSmall, state.size === 'small' && styles.rootSmall, state.size === 'medium' && styles.rootMedium, state.size === 'large' && styles.rootLarge, state.size === 'extra-large' && styles.rootExtraLarge, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shape === 'rounded' && (state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny') && styles.rootRoundedSmallToTiny, isGhost && styles.rootGhost, isOutline && styles.rootOutline, isTint && styles.rootTint, isFilled && isDanger && styles.rootFilledDanger, isOutline && isDanger && styles.rootOutlineDanger, isTint && isDanger && styles.rootTintDanger, isGhost && isDanger && styles.rootGhostDanger, isFilled && isSevere && styles.rootFilledSevere, isOutline && isSevere && styles.rootOutlineSevere, isTint && isSevere && styles.rootTintSevere, isGhost && isSevere && styles.rootGhostSevere, isFilled && isWarning && styles.rootFilledWarning, isOutline && isWarning && styles.rootOutlineWarning, isTint && isWarning && styles.rootTintWarning, isGhost && isWarning && styles.rootGhostWarning, isFilled && isSuccess && styles.rootFilledSuccess, isOutline && isSuccess && styles.rootOutlineSuccess, isTint && isSuccess && styles.rootTintSuccess, isGhost && isSuccess && styles.rootGhostSuccess, isFilled && isImportant && styles.rootFilledImportant, isOutline && isImportant && styles.rootOutlineImportant, isTint && isImportant && styles.rootTintImportant, isGhost && isImportant && styles.rootGhostImportant, isFilled && isInformative && styles.rootFilledInformative, isOutline && isInformative && styles.rootOutlineInformative, isTint && isInformative && styles.rootTintInformative, isGhost && isInformative && styles.rootGhostInformative, isFilled && isSubtle && styles.rootFilledSubtle, isOutline && isSubtle && styles.rootOutlineSubtle, isTint && isSubtle && styles.rootTintSubtle, isGhost && isSubtle && styles.rootGhostSubtle, state.root.className);
317
317
 
318
318
  if (state.icon) {
319
319
  state.icon.className = mergeClasses(styles.icon, state.icon.className);