@fluentui/react-button 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 (169) hide show
  1. package/CHANGELOG.json +405 -1
  2. package/CHANGELOG.md +295 -177
  3. package/README.md +81 -19
  4. package/dist/{react-button.d.ts → index.d.ts} +32 -55
  5. package/{lib → dist}/tsdoc-metadata.json +0 -0
  6. package/lib/components/Button/Button.js.map +1 -1
  7. package/lib/components/Button/Button.types.js.map +1 -1
  8. package/lib/components/Button/index.js +1 -3
  9. package/lib/components/Button/index.js.map +1 -1
  10. package/lib/components/Button/renderButton.js.map +1 -1
  11. package/lib/components/Button/useButton.js +1 -4
  12. package/lib/components/Button/useButton.js.map +1 -1
  13. package/lib/components/Button/useButtonStyles.js +146 -68
  14. package/lib/components/Button/useButtonStyles.js.map +1 -1
  15. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  16. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  17. package/lib/components/CompoundButton/index.js +1 -3
  18. package/lib/components/CompoundButton/index.js.map +1 -1
  19. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  20. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  21. package/lib/components/CompoundButton/useCompoundButtonStyles.js +47 -35
  22. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  23. package/lib/components/MenuButton/MenuButton.js +2 -1
  24. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  25. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  26. package/lib/components/MenuButton/index.js +1 -3
  27. package/lib/components/MenuButton/index.js.map +1 -1
  28. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  29. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  30. package/lib/components/MenuButton/useMenuButtonStyles.js +24 -17
  31. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  32. package/lib/components/SplitButton/SplitButton.js +1 -1
  33. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  34. package/lib/components/SplitButton/index.js +1 -3
  35. package/lib/components/SplitButton/index.js.map +1 -1
  36. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  37. package/lib/components/SplitButton/useSplitButton.js +1 -5
  38. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  39. package/lib/components/SplitButton/useSplitButtonStyles.js +15 -17
  40. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  41. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  42. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  43. package/lib/components/ToggleButton/index.js +1 -3
  44. package/lib/components/ToggleButton/index.js.map +1 -1
  45. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  46. package/lib/components/ToggleButton/useToggleButtonStyles.js +93 -9
  47. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  48. package/lib/index.js +5 -10
  49. package/lib/index.js.map +1 -1
  50. package/lib/utils/useToggleState.js.map +1 -1
  51. package/lib-commonjs/components/Button/Button.js.map +1 -1
  52. package/lib-commonjs/components/Button/index.js +1 -9
  53. package/lib-commonjs/components/Button/index.js.map +1 -1
  54. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  55. package/lib-commonjs/components/Button/useButton.js +1 -4
  56. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  57. package/lib-commonjs/components/Button/useButtonStyles.js +147 -69
  58. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  59. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  60. package/lib-commonjs/components/CompoundButton/index.js +1 -9
  61. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  62. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  63. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  64. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +49 -37
  65. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  66. package/lib-commonjs/components/MenuButton/MenuButton.js +2 -1
  67. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  68. package/lib-commonjs/components/MenuButton/index.js +1 -9
  69. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  70. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  71. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  72. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +26 -18
  73. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  74. package/lib-commonjs/components/SplitButton/SplitButton.js +1 -1
  75. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  76. package/lib-commonjs/components/SplitButton/index.js +1 -9
  77. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  78. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  79. package/lib-commonjs/components/SplitButton/useSplitButton.js +1 -5
  80. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  81. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +16 -18
  82. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  83. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  84. package/lib-commonjs/components/ToggleButton/index.js +1 -9
  85. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  86. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  87. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  88. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +95 -10
  89. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  90. package/lib-commonjs/index.js +1 -36
  91. package/lib-commonjs/index.js.map +1 -1
  92. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  93. package/package.json +13 -15
  94. package/lib/Button.d.ts +0 -1
  95. package/lib/CompoundButton.d.ts +0 -1
  96. package/lib/MenuButton.d.ts +0 -1
  97. package/lib/SplitButton.d.ts +0 -1
  98. package/lib/ToggleButton.d.ts +0 -1
  99. package/lib/components/Button/Button.d.ts +0 -6
  100. package/lib/components/Button/Button.types.d.ts +0 -64
  101. package/lib/components/Button/index.d.ts +0 -5
  102. package/lib/components/Button/renderButton.d.ts +0 -5
  103. package/lib/components/Button/useButton.d.ts +0 -8
  104. package/lib/components/Button/useButtonStyles.d.ts +0 -8
  105. package/lib/components/CompoundButton/CompoundButton.d.ts +0 -6
  106. package/lib/components/CompoundButton/CompoundButton.types.d.ts +0 -14
  107. package/lib/components/CompoundButton/index.d.ts +0 -5
  108. package/lib/components/CompoundButton/renderCompoundButton.d.ts +0 -5
  109. package/lib/components/CompoundButton/useCompoundButton.d.ts +0 -8
  110. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +0 -8
  111. package/lib/components/MenuButton/MenuButton.d.ts +0 -6
  112. package/lib/components/MenuButton/MenuButton.types.d.ts +0 -10
  113. package/lib/components/MenuButton/index.d.ts +0 -5
  114. package/lib/components/MenuButton/renderMenuButton.d.ts +0 -5
  115. package/lib/components/MenuButton/useMenuButton.d.ts +0 -6
  116. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +0 -8
  117. package/lib/components/SplitButton/SplitButton.d.ts +0 -7
  118. package/lib/components/SplitButton/SplitButton.types.d.ts +0 -21
  119. package/lib/components/SplitButton/index.d.ts +0 -5
  120. package/lib/components/SplitButton/renderSplitButton.d.ts +0 -5
  121. package/lib/components/SplitButton/useSplitButton.d.ts +0 -8
  122. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +0 -8
  123. package/lib/components/ToggleButton/ToggleButton.d.ts +0 -6
  124. package/lib/components/ToggleButton/ToggleButton.types.d.ts +0 -20
  125. package/lib/components/ToggleButton/index.d.ts +0 -5
  126. package/lib/components/ToggleButton/renderToggleButton.d.ts +0 -1
  127. package/lib/components/ToggleButton/useToggleButton.d.ts +0 -9
  128. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +0 -11
  129. package/lib/index.d.ts +0 -11
  130. package/lib/utils/index.d.ts +0 -1
  131. package/lib/utils/useToggleState.d.ts +0 -3
  132. package/lib-commonjs/Button.d.ts +0 -1
  133. package/lib-commonjs/CompoundButton.d.ts +0 -1
  134. package/lib-commonjs/MenuButton.d.ts +0 -1
  135. package/lib-commonjs/SplitButton.d.ts +0 -1
  136. package/lib-commonjs/ToggleButton.d.ts +0 -1
  137. package/lib-commonjs/components/Button/Button.d.ts +0 -6
  138. package/lib-commonjs/components/Button/Button.types.d.ts +0 -64
  139. package/lib-commonjs/components/Button/index.d.ts +0 -5
  140. package/lib-commonjs/components/Button/renderButton.d.ts +0 -5
  141. package/lib-commonjs/components/Button/useButton.d.ts +0 -8
  142. package/lib-commonjs/components/Button/useButtonStyles.d.ts +0 -8
  143. package/lib-commonjs/components/CompoundButton/CompoundButton.d.ts +0 -6
  144. package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +0 -14
  145. package/lib-commonjs/components/CompoundButton/index.d.ts +0 -5
  146. package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +0 -5
  147. package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +0 -8
  148. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +0 -8
  149. package/lib-commonjs/components/MenuButton/MenuButton.d.ts +0 -6
  150. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +0 -10
  151. package/lib-commonjs/components/MenuButton/index.d.ts +0 -5
  152. package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +0 -5
  153. package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +0 -6
  154. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +0 -8
  155. package/lib-commonjs/components/SplitButton/SplitButton.d.ts +0 -7
  156. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +0 -21
  157. package/lib-commonjs/components/SplitButton/index.d.ts +0 -5
  158. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +0 -5
  159. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +0 -8
  160. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +0 -8
  161. package/lib-commonjs/components/ToggleButton/ToggleButton.d.ts +0 -6
  162. package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +0 -20
  163. package/lib-commonjs/components/ToggleButton/index.d.ts +0 -5
  164. package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +0 -1
  165. package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +0 -9
  166. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +0 -11
  167. package/lib-commonjs/index.d.ts +0 -11
  168. package/lib-commonjs/utils/index.d.ts +0 -1
  169. package/lib-commonjs/utils/useToggleState.d.ts +0 -3
@@ -1,8 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';
3
- export declare const compoundButtonClassNames: SlotClassNames<CompoundButtonSlots>;
4
- /**
5
- * @deprecated Use `compoundButtonClassName.root` instead.
6
- */
7
- export declare const compoundButtonClassName: string;
8
- export declare const useCompoundButtonStyles_unstable: (state: CompoundButtonState) => CompoundButtonState;
@@ -1,6 +0,0 @@
1
- import type { MenuButtonProps } from './MenuButton.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * MenuButtons are buttons that handle opening and closing a menu when they are triggered.
5
- */
6
- export declare const MenuButton: ForwardRefComponent<MenuButtonProps>;
@@ -1,10 +0,0 @@
1
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
- import type { ButtonCommons, ButtonSlots, ButtonState } from '../Button/Button.types';
3
- export declare type MenuButtonSlots = ButtonSlots & {
4
- /**
5
- * Menu icon that indicates that this button has a menu that can be expanded.
6
- */
7
- menuIcon?: Slot<'span'>;
8
- };
9
- export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Partial<Omit<ButtonCommons, 'iconPosition'>>;
10
- export declare type MenuButtonState = ComponentState<MenuButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;
@@ -1,5 +0,0 @@
1
- export * from './MenuButton.types';
2
- export * from './MenuButton';
3
- export * from './renderMenuButton';
4
- export * from './useMenuButton';
5
- export { menuButtonClassName, menuButtonClassNames, useMenuButtonStyles_unstable, } from './useMenuButtonStyles';
@@ -1,5 +0,0 @@
1
- import type { MenuButtonState } from './MenuButton.types';
2
- /**
3
- * Renders a MenuButton component by passing the state defined props to the appropriate slots.
4
- */
5
- export declare const renderMenuButton_unstable: (state: MenuButtonState) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { MenuButtonProps, MenuButtonState } from './MenuButton.types';
3
- /**
4
- * Given user props, returns the final state for a MenuButton.
5
- */
6
- export declare const useMenuButton_unstable: ({ menuIcon, ...props }: MenuButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => MenuButtonState;
@@ -1,8 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';
3
- export declare const menuButtonClassNames: SlotClassNames<MenuButtonSlots>;
4
- /**
5
- * @deprecated Use `menuButtonClassName.root` instead.
6
- */
7
- export declare const menuButtonClassName: string;
8
- export declare const useMenuButtonStyles_unstable: (state: MenuButtonState) => MenuButtonState;
@@ -1,7 +0,0 @@
1
- import type { SplitButtonProps } from './SplitButton.types';
2
- import { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * SplitButtons are a grouping of two interactive surfaces where the interacting with the first one triggers a primary
5
- * action, while interacting with the second one opens a menu with secondary actions.
6
- */
7
- export declare const SplitButton: ForwardRefComponent<SplitButtonProps>;
@@ -1,21 +0,0 @@
1
- import { Button } from '../Button/Button';
2
- import { MenuButton } from '../MenuButton/MenuButton';
3
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
4
- import type { ButtonProps, ButtonState } from '../Button/Button.types';
5
- import type { MenuButtonProps, MenuButtonState } from '../MenuButton/MenuButton.types';
6
- export declare type SplitButtonSlots = {
7
- /**
8
- * Root of the component that wraps the primary action button and menu button.
9
- */
10
- root: NonNullable<Slot<'div'>>;
11
- /**
12
- * Button that opens menu with secondary actions in SplitButton.
13
- */
14
- menuButton?: Slot<typeof MenuButton>;
15
- /**
16
- * Button to perform primary action in SplitButton.
17
- */
18
- primaryActionButton?: Slot<typeof Button>;
19
- };
20
- export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & Omit<ButtonProps, 'root'> & Omit<MenuButtonProps, 'root'>;
21
- export declare type SplitButtonState = ComponentState<SplitButtonSlots> & Omit<ButtonState, 'components' | 'iconOnly' | 'root'> & Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;
@@ -1,5 +0,0 @@
1
- export * from './SplitButton';
2
- export * from './SplitButton.types';
3
- export * from './renderSplitButton';
4
- export * from './useSplitButton';
5
- export { splitButtonClassName, splitButtonClassNames, useSplitButtonStyles_unstable, } from './useSplitButtonStyles';
@@ -1,5 +0,0 @@
1
- import type { SplitButtonState } from './SplitButton.types';
2
- /**
3
- * Renders a SplitButton component by passing the state defined props to the appropriate slots.
4
- */
5
- export declare const renderSplitButton_unstable: (state: SplitButtonState) => JSX.Element;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import type { SplitButtonProps, SplitButtonState } from './SplitButton.types';
3
- /**
4
- * Given user props, defines default props for the SplitButton and returns processed state.
5
- * @param props - User provided props to the SplitButton component.
6
- * @param ref - User provided ref to be passed to the SplitButton component.
7
- */
8
- export declare const useSplitButton_unstable: (props: SplitButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => SplitButtonState;
@@ -1,8 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { SplitButtonSlots, SplitButtonState } from './SplitButton.types';
3
- export declare const splitButtonClassNames: SlotClassNames<SplitButtonSlots>;
4
- /**
5
- * @deprecated Use `splitButtonClassName.root` instead.
6
- */
7
- export declare const splitButtonClassName: string;
8
- export declare const useSplitButtonStyles_unstable: (state: SplitButtonState) => SplitButtonState;
@@ -1,6 +0,0 @@
1
- import type { ToggleButtonProps } from './ToggleButton.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * ToggleButtons are buttons that toggle between two defined states when triggered.
5
- */
6
- export declare const ToggleButton: ForwardRefComponent<ToggleButtonProps>;
@@ -1,20 +0,0 @@
1
- import type { ButtonProps, ButtonState } from '../Button/Button.types';
2
- declare type ToggleButtonCommons = {
3
- /**
4
- * Defines the controlled checked state of the `ToggleButton`.
5
- * If passed, `ToggleButton` ignores the `defaultChecked` property.
6
- * This should only be used if the checked state is to be controlled at a higher level and there is a plan to pass the
7
- * correct value based on handling `onClick` events and re-rendering.
8
- * @default false
9
- */
10
- checked: boolean;
11
- };
12
- export declare type ToggleButtonProps = ButtonProps & Partial<ToggleButtonCommons> & {
13
- /**
14
- * Defines whether the `ToggleButton` is initially in a checked state or not when rendered.
15
- * @default false
16
- */
17
- defaultChecked?: boolean;
18
- };
19
- export declare type ToggleButtonState = ButtonState & ToggleButtonCommons;
20
- export {};
@@ -1,5 +0,0 @@
1
- export * from './ToggleButton';
2
- export * from './ToggleButton.types';
3
- export * from './renderToggleButton';
4
- export * from './useToggleButton';
5
- export { toggleButtonClassName, toggleButtonClassNames, useToggleButtonStyles_unstable, } from './useToggleButtonStyles';
@@ -1 +0,0 @@
1
- export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';
3
- /**
4
- * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
5
- * processed state.
6
- * @param props - User provided props to the ToggleButton component.
7
- * @param ref - User provided ref to be passed to the ToggleButton component.
8
- */
9
- export declare const useToggleButton_unstable: (props: ToggleButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => ToggleButtonState;
@@ -1,11 +0,0 @@
1
- import type { SlotClassNames } from '@fluentui/react-utilities';
2
- import type { ButtonSlots } from '../Button/Button.types';
3
- import type { ToggleButtonState } from './ToggleButton.types';
4
- export declare const toggleButtonClassNames: SlotClassNames<ButtonSlots>;
5
- /**
6
- * @deprecated Use `toggleButtonClassName.root` instead.
7
- */
8
- export declare const toggleButtonClassName: string;
9
- export declare const useCheckedStyles: () => Record<"base" | "primary" | "outline" | "subtle" | "transparent" | "highContrast", string>;
10
- export declare const useDisabledStyles: () => Record<"base" | "primary" | "outline" | "subtle" | "transparent", string>;
11
- export declare const useToggleButtonStyles_unstable: (state: ToggleButtonState) => ToggleButtonState;
@@ -1,11 +0,0 @@
1
- export { Button, buttonClassName, buttonClassNames, renderButton_unstable, useButtonStyles_unstable, useButton_unstable, } from './Button';
2
- export type { ButtonProps, ButtonSlots, ButtonState } from './Button';
3
- export { CompoundButton, compoundButtonClassName, compoundButtonClassNames, renderCompoundButton_unstable, useCompoundButtonStyles_unstable, useCompoundButton_unstable, } from './CompoundButton';
4
- export type { CompoundButtonProps, CompoundButtonSlots, CompoundButtonState } from './CompoundButton';
5
- export { MenuButton, menuButtonClassName, menuButtonClassNames, renderMenuButton_unstable, useMenuButtonStyles_unstable, useMenuButton_unstable, } from './MenuButton';
6
- export type { MenuButtonProps, MenuButtonSlots, MenuButtonState } from './MenuButton';
7
- export { SplitButton, renderSplitButton_unstable, splitButtonClassName, splitButtonClassNames, useSplitButtonStyles_unstable, useSplitButton_unstable, } from './SplitButton';
8
- export type { SplitButtonProps, SplitButtonSlots, SplitButtonState } from './SplitButton';
9
- export { ToggleButton, renderToggleButton_unstable, toggleButtonClassName, toggleButtonClassNames, useToggleButtonStyles_unstable, useToggleButton_unstable, } from './ToggleButton';
10
- export type { ToggleButtonProps, ToggleButtonState } from './ToggleButton';
11
- export { useToggleState } from './utils/index';
@@ -1 +0,0 @@
1
- export * from './useToggleState';
@@ -1,3 +0,0 @@
1
- import type { ButtonState } from '../Button';
2
- import type { ToggleButtonProps, ToggleButtonState } from '../ToggleButton';
3
- export declare function useToggleState<TToggleButtonProps extends Pick<ToggleButtonProps, 'checked' | 'defaultChecked' | 'disabled' | 'disabledFocusable'>, TButtonState extends Pick<ButtonState, 'root'>, TToggleButtonState extends Pick<ToggleButtonState, 'checked' | 'root'>>(props: TToggleButtonProps, state: TButtonState): TToggleButtonState;