@fluentui/react-button 0.0.0-nightlyf1be0a972820211214.1 → 0.0.0-nightlyf3017f159620220222.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. package/CHANGELOG.json +239 -23
  2. package/CHANGELOG.md +59 -13
  3. package/dist/react-button.d.ts +31 -36
  4. package/lib/Button.js.map +1 -1
  5. package/lib/CompoundButton.js.map +1 -1
  6. package/lib/MenuButton.js.map +1 -1
  7. package/lib/SplitButton.js.map +1 -1
  8. package/lib/ToggleButton.js.map +1 -1
  9. package/lib/components/Button/Button.js +6 -6
  10. package/lib/components/Button/Button.js.map +1 -1
  11. package/lib/components/Button/Button.types.d.ts +5 -5
  12. package/lib/components/Button/Button.types.js.map +1 -1
  13. package/lib/components/Button/index.d.ts +2 -2
  14. package/lib/components/Button/index.js +1 -2
  15. package/lib/components/Button/index.js.map +1 -1
  16. package/lib/components/Button/renderButton.d.ts +1 -1
  17. package/lib/components/Button/renderButton.js +4 -4
  18. package/lib/components/Button/renderButton.js.map +1 -1
  19. package/lib/components/Button/useButton.d.ts +1 -1
  20. package/lib/components/Button/useButton.js +1 -1
  21. package/lib/components/Button/useButton.js.map +1 -1
  22. package/lib/components/Button/useButtonStyles.d.ts +1 -9
  23. package/lib/components/Button/useButtonStyles.js +9 -18
  24. package/lib/components/Button/useButtonStyles.js.map +1 -1
  25. package/lib/components/CompoundButton/CompoundButton.js +6 -6
  26. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  27. package/lib/components/CompoundButton/CompoundButton.types.d.ts +4 -4
  28. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  29. package/lib/components/CompoundButton/index.d.ts +1 -1
  30. package/lib/components/CompoundButton/index.js +1 -1
  31. package/lib/components/CompoundButton/index.js.map +1 -1
  32. package/lib/components/CompoundButton/renderCompoundButton.d.ts +1 -1
  33. package/lib/components/CompoundButton/renderCompoundButton.js +5 -5
  34. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  35. package/lib/components/CompoundButton/useCompoundButton.d.ts +1 -1
  36. package/lib/components/CompoundButton/useCompoundButton.js +3 -3
  37. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  38. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +1 -1
  39. package/lib/components/CompoundButton/useCompoundButtonStyles.js +12 -12
  40. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  41. package/lib/components/MenuButton/MenuButton.js +6 -6
  42. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  43. package/lib/components/MenuButton/MenuButton.types.d.ts +3 -8
  44. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  45. package/lib/components/MenuButton/index.d.ts +1 -1
  46. package/lib/components/MenuButton/index.js +1 -1
  47. package/lib/components/MenuButton/index.js.map +1 -1
  48. package/lib/components/MenuButton/renderMenuButton.d.ts +1 -1
  49. package/lib/components/MenuButton/renderMenuButton.js +4 -4
  50. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  51. package/lib/components/MenuButton/useMenuButton.d.ts +1 -1
  52. package/lib/components/MenuButton/useMenuButton.js +5 -5
  53. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  54. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +1 -1
  55. package/lib/components/MenuButton/useMenuButtonStyles.js +4 -4
  56. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  57. package/lib/components/SplitButton/SplitButton.js +6 -6
  58. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  59. package/lib/components/SplitButton/SplitButton.types.d.ts +6 -4
  60. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  61. package/lib/components/SplitButton/index.d.ts +1 -1
  62. package/lib/components/SplitButton/index.js +1 -1
  63. package/lib/components/SplitButton/index.js.map +1 -1
  64. package/lib/components/SplitButton/renderSplitButton.d.ts +1 -1
  65. package/lib/components/SplitButton/renderSplitButton.js +4 -4
  66. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  67. package/lib/components/SplitButton/useSplitButton.d.ts +1 -1
  68. package/lib/components/SplitButton/useSplitButton.js +17 -5
  69. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  70. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +1 -1
  71. package/lib/components/SplitButton/useSplitButtonStyles.js +3 -2
  72. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  73. package/lib/components/ToggleButton/ToggleButton.js +6 -6
  74. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  75. package/lib/components/ToggleButton/ToggleButton.types.d.ts +2 -1
  76. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  77. package/lib/components/ToggleButton/index.d.ts +1 -1
  78. package/lib/components/ToggleButton/index.js +1 -1
  79. package/lib/components/ToggleButton/index.js.map +1 -1
  80. package/lib/components/ToggleButton/renderToggleButton.d.ts +1 -1
  81. package/lib/components/ToggleButton/renderToggleButton.js +1 -1
  82. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  83. package/lib/components/ToggleButton/useToggleButton.d.ts +1 -1
  84. package/lib/components/ToggleButton/useToggleButton.js +13 -9
  85. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  86. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +1 -1
  87. package/lib/components/ToggleButton/useToggleButtonStyles.js +5 -4
  88. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  89. package/lib/index.js.map +1 -1
  90. package/lib-commonjs/Button.js.map +1 -1
  91. package/lib-commonjs/CompoundButton.js.map +1 -1
  92. package/lib-commonjs/MenuButton.js.map +1 -1
  93. package/lib-commonjs/SplitButton.js.map +1 -1
  94. package/lib-commonjs/ToggleButton.js.map +1 -1
  95. package/lib-commonjs/components/Button/Button.js +3 -3
  96. package/lib-commonjs/components/Button/Button.js.map +1 -1
  97. package/lib-commonjs/components/Button/Button.types.d.ts +5 -5
  98. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  99. package/lib-commonjs/components/Button/index.d.ts +2 -2
  100. package/lib-commonjs/components/Button/index.js +3 -5
  101. package/lib-commonjs/components/Button/index.js.map +1 -1
  102. package/lib-commonjs/components/Button/renderButton.d.ts +1 -1
  103. package/lib-commonjs/components/Button/renderButton.js +6 -6
  104. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  105. package/lib-commonjs/components/Button/useButton.d.ts +1 -1
  106. package/lib-commonjs/components/Button/useButton.js +3 -3
  107. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  108. package/lib-commonjs/components/Button/useButtonStyles.d.ts +1 -9
  109. package/lib-commonjs/components/Button/useButtonStyles.js +18 -26
  110. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  111. package/lib-commonjs/components/CompoundButton/CompoundButton.js +3 -3
  112. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  113. package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +4 -4
  114. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  115. package/lib-commonjs/components/CompoundButton/index.d.ts +1 -1
  116. package/lib-commonjs/components/CompoundButton/index.js +3 -3
  117. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  118. package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +1 -1
  119. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +7 -7
  120. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  121. package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +1 -1
  122. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +4 -4
  123. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  124. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +1 -1
  125. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +23 -22
  126. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  127. package/lib-commonjs/components/MenuButton/MenuButton.js +3 -3
  128. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  129. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +3 -8
  130. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  131. package/lib-commonjs/components/MenuButton/index.d.ts +1 -1
  132. package/lib-commonjs/components/MenuButton/index.js +3 -3
  133. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  134. package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +1 -1
  135. package/lib-commonjs/components/MenuButton/renderMenuButton.js +6 -6
  136. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  137. package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +1 -1
  138. package/lib-commonjs/components/MenuButton/useMenuButton.js +5 -5
  139. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  140. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +1 -1
  141. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +8 -8
  142. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  143. package/lib-commonjs/components/SplitButton/SplitButton.js +3 -3
  144. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  145. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +6 -4
  146. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  147. package/lib-commonjs/components/SplitButton/index.d.ts +1 -1
  148. package/lib-commonjs/components/SplitButton/index.js +3 -3
  149. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  150. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +1 -1
  151. package/lib-commonjs/components/SplitButton/renderSplitButton.js +6 -6
  152. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  153. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +1 -1
  154. package/lib-commonjs/components/SplitButton/useSplitButton.js +18 -6
  155. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  156. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +1 -1
  157. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +11 -9
  158. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  159. package/lib-commonjs/components/ToggleButton/ToggleButton.js +3 -3
  160. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  161. package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +2 -1
  162. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  163. package/lib-commonjs/components/ToggleButton/index.d.ts +1 -1
  164. package/lib-commonjs/components/ToggleButton/index.js +3 -3
  165. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  166. package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +1 -1
  167. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +3 -3
  168. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  169. package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +1 -1
  170. package/lib-commonjs/components/ToggleButton/useToggleButton.js +14 -10
  171. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  172. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +1 -1
  173. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +10 -8
  174. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  175. package/lib-commonjs/index.js.map +1 -1
  176. package/package.json +9 -11
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../src/ToggleButton.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"ToggleButton.js","sourceRoot":"../src/","sources":["ToggleButton.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './components/ToggleButton/index';\n"]}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { renderButton } from './renderButton';
3
- import { useButton } from './useButton';
4
- import { useButtonStyles } from './useButtonStyles';
2
+ import { renderButton_unstable } from './renderButton';
3
+ import { useButton_unstable } from './useButton';
4
+ import { useButtonStyles_unstable } from './useButtonStyles';
5
5
  /**
6
6
  * Buttons give people a way to trigger an action.
7
7
  */
8
8
 
9
9
  export const Button = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useButton(props, ref);
11
- useButtonStyles(state);
12
- return renderButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
10
+ const state = useButton_unstable(props, ref);
11
+ useButtonStyles_unstable(state);
12
+ return renderButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
13
13
  });
14
14
  Button.displayName = 'Button';
15
15
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,SAAT,QAA0B,aAA1B;AACA,SAAS,eAAT,QAAgC,mBAAhC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,SAAS,CAAC,KAAD,EAAQ,GAAR,CAAvB;AAEA,EAAA,eAAe,CAAC,KAAD,CAAf;AAEA,SAAO,YAAY,CAAC,KAAD,CAAnB,CALsF,CAMtF;AACD,CAPuD,CAAjD;AASP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;AAEA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B,CALsF,CAMtF;AACD,CAPuD,CAAjD;AASP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { renderButton_unstable } from './renderButton';\nimport { useButton_unstable } from './useButton';\nimport { useButtonStyles_unstable } from './useButtonStyles';\nimport type { ButtonProps } from './Button.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Buttons give people a way to trigger an action.\n */\nexport const Button: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n\n useButtonStyles_unstable(state);\n\n return renderButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ButtonProps>;\n\nButton.displayName = 'Button';\n"],"sourceRoot":"../src/"}
@@ -1,14 +1,14 @@
1
- import { ARIAButtonShorthandProps } from '@fluentui/react-aria';
2
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ARIAButtonSlotProps } from '@fluentui/react-aria';
2
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
3
  export declare type ButtonSlots = {
4
4
  /**
5
5
  * Root of the component that renders as either a `<button>` tag or an `<a>` tag.
6
6
  */
7
- root: ARIAButtonShorthandProps;
7
+ root: Slot<ARIAButtonSlotProps>;
8
8
  /**
9
9
  * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.
10
10
  */
11
- icon?: IntrinsicShorthandProps<'span'>;
11
+ icon?: Slot<'span'>;
12
12
  };
13
13
  export declare type ButtonCommons = {
14
14
  /**
@@ -40,7 +40,7 @@ export declare type ButtonCommons = {
40
40
  * A button can format its icon to appear before or after its content.
41
41
  * @default 'before'
42
42
  */
43
- iconPosition: 'before' | 'after';
43
+ iconPosition?: 'before' | 'after';
44
44
  /**
45
45
  * A button can be rounded, circular, or square.
46
46
  * @default 'rounded'
@@ -1 +1 @@
1
- {"version":3,"file":"Button.types.js","sourceRoot":"","sources":["../../../src/components/Button/Button.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Button.types.js","sourceRoot":"../src/","sources":["components/Button/Button.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: Slot<ARIAButtonSlotProps>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\nexport type ButtonCommons = {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n */\n appearance?: 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * A button can fill the width of its container.\n * @default false\n */\n block: boolean;\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n * @default false\n */\n disabledFocusable: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n * @default false\n */\n disabled: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n * @default 'rounded'\n */\n shape: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n * @default 'medium'\n */\n size: 'small' | 'medium' | 'large';\n};\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & Partial<ButtonCommons>;\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n ButtonCommons & {\n /**\n * A button can contain only an icon.\n * @default false\n */\n iconOnly: boolean;\n };\n"]}
@@ -1,5 +1,5 @@
1
1
  export * from './Button';
2
- export * from './Button.types';
2
+ export type { ButtonProps, ButtonSlots, ButtonState } from './Button.types';
3
3
  export * from './renderButton';
4
4
  export * from './useButton';
5
- export { buttonClassName, useButtonStyles } from './useButtonStyles';
5
+ export { buttonClassName, useButtonStyles_unstable } from './useButtonStyles';
@@ -1,6 +1,5 @@
1
1
  export * from './Button';
2
- export * from './Button.types';
3
2
  export * from './renderButton';
4
3
  export * from './useButton';
5
- export { buttonClassName, useButtonStyles } from './useButtonStyles';
4
+ export { buttonClassName, useButtonStyles_unstable } from './useButtonStyles';
6
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export * from './Button';\n// Explicit exports to omit ButtonCommons\nexport type { ButtonProps, ButtonSlots, ButtonState } from './Button.types';\nexport * from './renderButton';\nexport * from './useButton';\nexport { buttonClassName, useButtonStyles_unstable } from './useButtonStyles';\n"]}
@@ -2,4 +2,4 @@ import type { ButtonState } from './Button.types';
2
2
  /**
3
3
  * Renders a Button component by passing the state defined props to the appropriate slots.
4
4
  */
5
- export declare const renderButton: (state: ButtonState) => JSX.Element;
5
+ export declare const renderButton_unstable: (state: ButtonState) => JSX.Element;
@@ -4,18 +4,18 @@ import { getSlots } from '@fluentui/react-utilities';
4
4
  * Renders a Button component by passing the state defined props to the appropriate slots.
5
5
  */
6
6
 
7
- export const renderButton = state => {
7
+ export const renderButton_unstable = state => {
8
8
  const {
9
9
  slots,
10
10
  slotProps
11
- } = getSlots(state, ['root', 'icon']);
11
+ } = getSlots(state);
12
12
  const {
13
13
  iconOnly,
14
14
  iconPosition
15
15
  } = state;
16
16
  return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
17
- }, iconPosition !== 'after' && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
18
- }), !iconOnly && state.root.children, iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
17
+ }, iconPosition !== 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
18
+ }), !iconOnly && state.root.children, iconPosition === 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
19
19
  }));
20
20
  };
21
21
  //# sourceMappingURL=renderButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/renderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,YAAY,GAAI,KAAD,IAAuB;AACjD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAc,KAAd,EAAqB,CAAC,MAAD,EAAS,MAAT,CAArB,CAArC;AACA,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAA6B,KAAnC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,YAAY,KAAK,OAAjB,iBAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAD/B,EAEG,CAAC,QAAD,IAAa,KAAK,CAAC,IAAN,CAAW,QAF3B,EAGG,YAAY,KAAK,OAAjB,iBAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAH/B,CADF;AAOD,CAXM","sourceRoot":""}
1
+ {"version":3,"sources":["components/Button/renderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;AAC1D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAc,KAAd,CAArC;AACA,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAA6B,KAAnC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,iBAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAD7C,EAEG,CAAC,QAAD,IAAa,KAAK,CAAC,IAAN,CAAW,QAF3B,EAGG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,iBAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAH7C,CADF;AAOD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\n/**\n * Renders a Button component by passing the state defined props to the appropriate slots.\n */\nexport const renderButton_unstable = (state: ButtonState) => {\n const { slots, slotProps } = getSlots<ButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && state.root.children}\n {iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -5,4 +5,4 @@ import type { ButtonProps, ButtonState } from './Button.types';
5
5
  * @param props - User provided props to the Button component.
6
6
  * @param ref - User provided ref to be passed to the Button component.
7
7
  */
8
- export declare const useButton: (props: ButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => ButtonState;
8
+ export declare const useButton_unstable: (props: ButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => ButtonState;
@@ -6,7 +6,7 @@ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utiliti
6
6
  * @param ref - User provided ref to be passed to the Button component.
7
7
  */
8
8
 
9
- export const useButton = (props, ref) => {
9
+ export const useButton_unstable = (props, ref) => {
10
10
  const {
11
11
  appearance,
12
12
  as,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/useButton.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,QAA8B,sBAA9B;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;AAIG;;AACH,OAAO,MAAM,SAAS,GAAG,CAAC,KAAD,EAAqB,GAArB,KAA2F;AAClH,QAAM;AACJ,IAAA,UADI;AAEJ,IAAA,EAFI;AAGJ,IAAA,KAAK,GAAG,KAHJ;AAIJ,IAAA,QAAQ,GAAG,KAJP;AAKJ,IAAA,iBAAiB,GAAG,KALhB;AAMJ,IAAA,IANI;AAOJ,IAAA,YAAY,GAAG,QAPX;AAQJ,IAAA,KAAK,GAAG,SARJ;AASJ,IAAA,IAAI,GAAG;AATH,MAUF,KAVJ;AAWA,QAAM,aAAa,GAAG,gBAAgB,CAAC,IAAD,CAAtC;AAEA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B,CAAC,IAAD,CAAtC;AAEA,SAAO;AACL;AACA,IAAA,UAFK;AAGL,IAAA,KAHK;AAIL,IAAA,QAJK;AAKL,IAAA,iBALK;AAML,IAAA,YANK;AAOL,IAAA,KAPK;AAQL,IAAA,IARK;AAUL;AACA,IAAA,QAAQ,EAAE,OAAO,CAAC,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAE,QAAf,KAA2B,CAAC,KAAK,CAAC,QAAnC,CAXZ;AAaL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE;AAFI,KAdP;AAmBL,IAAA,IAAI,EAAE,qBAAqB,CACzB,EAAE,IAAI,QADmB,EAEzB,aAAa,CAAsB,KAAtB,EAA6B;AACxC,MAAA,QAAQ,EAAE,IAD8B;AAExC,MAAA,YAAY,EAAE;AACZ;AACA,QAAA,GAAG,EAAE,GAFO;AAGZ,QAAA,IAAI,EAAE,QAHM,CAGI;;AAHJ;AAF0B,KAA7B,CAFY,CAnBtB;AA8BL,IAAA,IAAI,EAAE;AA9BD,GAAP;AAgCD,CAjDM","sourcesContent":["import * as React from 'react';\nimport { useARIAButton } from '@fluentui/react-aria';\nimport type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonState } from './Button.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonState => {\n const {\n appearance,\n as,\n block = false,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = 'medium',\n } = props;\n const iconShorthand = resolveShorthand(icon);\n\n return {\n // Props passed at the top-level\n appearance,\n block,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n\n // State calculated from a set of props\n iconOnly: Boolean(iconShorthand?.children && !props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n },\n\n root: getNativeElementProps(\n as || 'button',\n useARIAButton<ARIAButtonSlotProps>(props, {\n required: true,\n defaultProps: {\n // useARIAButton isn't working with React.Ref<HTMLButtonElement | HTMLAnchorElement>\n ref: ref as React.Ref<HTMLButtonElement>,\n type: 'button', // This is added because the default for type is 'submit'\n },\n }),\n ),\n icon: iconShorthand,\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1,11 +1,3 @@
1
1
  import type { ButtonState } from './Button.types';
2
2
  export declare const buttonClassName = "fui-Button";
3
- export declare const buttonSpacing: {
4
- smallest: string;
5
- smaller: string;
6
- small: string;
7
- medium: string;
8
- large: string;
9
- larger: string;
10
- };
11
- export declare const useButtonStyles: (state: ButtonState) => ButtonState;
3
+ export declare const useButtonStyles_unstable: (state: ButtonState) => ButtonState;
@@ -1,16 +1,7 @@
1
- import { shorthands, __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { shorthands, __styles, mergeClasses } from '@griffel/react';
2
2
  import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
3
- export const buttonClassName = 'fui-Button'; // TODO: These are named in design specs but not hoisted to global/alias yet.
4
- // We're tracking these here to determine how we can hoist them.
5
-
6
- export const buttonSpacing = {
7
- smallest: '2px',
8
- smaller: '4px',
9
- small: '6px',
10
- medium: '8px',
11
- large: '12px',
12
- larger: '16px'
13
- };
3
+ import { tokens } from '@fluentui/react-theme';
4
+ export const buttonClassName = 'fui-Button';
14
5
 
15
6
  const useRootStyles = /*#__PURE__*/__styles({
16
7
  "base": {
@@ -149,10 +140,10 @@ const useRootStyles = /*#__PURE__*/__styles({
149
140
  "uwmqm3": ["f177v4lu", "f19lj068"],
150
141
  "Bqenvij": "frvgh55",
151
142
  "Bf4jedk": "fh7ncta",
152
- "Bbmb7ep": ["f1g3puop", "fi2rrw2"],
153
- "Beyfa6y": ["fi2rrw2", "f1g3puop"],
154
- "B7oj6ja": ["f1rstyi9", "f1s4nn1u"],
155
- "Btl43ni": ["f1s4nn1u", "f1rstyi9"],
143
+ "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
144
+ "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
145
+ "B7oj6ja": ["f1jar5jt", "fyu767a"],
146
+ "Btl43ni": ["fyu767a", "f1jar5jt"],
156
147
  "Be2twd7": "fy9rknc",
157
148
  "Bhrd7zp": "figsok6",
158
149
  "Bg96gwp": "fwrc4pm"
@@ -192,7 +183,7 @@ const useRootStyles = /*#__PURE__*/__styles({
192
183
  "Bg96gwp": "faaz57k"
193
184
  }
194
185
  }, {
195
- "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fmrv4ls{vertical-align:middle;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1n52uh2{max-width:280px;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".fz5stix{white-space:nowrap;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1s6fcnf{outline-style:none;}", ".f6dzj5z{max-width:100%;}", ".fly5x3f{width:100%;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fhovq9v{background-color:var(--colorSubtleBackground);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}", ".f1ma2n7n{row-gap:4px;}", ".f1g0x7ka{padding-top:0;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1qch9an{padding-bottom:0;}", ".frvgh55{height:24px;}", ".fh7ncta{min-width:64px;}", ".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}", ".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}", ".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f1y3hx6l{row-gap:6px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".f1d2rq10{height:32px;}", ".f14es27b{min-width:96px;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fbhnoac{height:40px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}"],
186
+ "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fmrv4ls{vertical-align:middle;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1n52uh2{max-width:280px;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".fz5stix{white-space:nowrap;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1s6fcnf{outline-style:none;}", ".f6dzj5z{max-width:100%;}", ".fly5x3f{width:100%;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fhovq9v{background-color:var(--colorSubtleBackground);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}", ".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}", ".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}", ".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}", ".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}", ".f1ma2n7n{row-gap:4px;}", ".f1g0x7ka{padding-top:0;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1qch9an{padding-bottom:0;}", ".frvgh55{height:24px;}", ".fh7ncta{min-width:64px;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f1y3hx6l{row-gap:6px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".f1d2rq10{height:32px;}", ".f14es27b{min-width:96px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fbhnoac{height:40px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}"],
196
187
  "h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1xlaoq0:hover{border-bottom-color:var(--colorNeutralStroke1Hover);}", ".fax3udt:hover{color:var(--colorNeutralForeground1);}", ".f8491dx:hover{cursor:pointer;}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f15wkkf3:hover{background-color:var(--colorBrandBackgroundHover);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1rq72xc:hover{color:var(--colorNeutralForegroundOnBrand);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}"],
197
188
  "a": [".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}", ".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fumykes:active{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f1r2dosr:active{color:var(--colorNeutralForeground1);}", ".fb0xa7e:active{outline-style:none;}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".fsp1bjw:active{background-color:var(--colorBrandBackgroundPressed);}", ".ff472gp:active{border-top-color:transparent;}", ".f4yyc7m:active{border-right-color:transparent;}", ".ft2aflc:active{border-left-color:transparent;}", ".fggejwh:active{border-bottom-color:transparent;}", ".f18otbis:active{color:var(--colorNeutralForegroundOnBrand);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f19au66r:active{color:var(--colorNeutralForeground2BrandPressed);}"]
198
189
  });
@@ -396,7 +387,7 @@ const useIconStyles = /*#__PURE__*/__styles({
396
387
  "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}", ".f1rt2boy{font-size:24px;}", ".frvgh55{height:24px;}", ".fq4mcun{width:24px;}"]
397
388
  });
398
389
 
399
- export const useButtonStyles = state => {
390
+ export const useButtonStyles_unstable = state => {
400
391
  const rootStyles = useRootStyles();
401
392
  const rootDisabledStyles = useRootDisabledStyles();
402
393
  const rootFocusStyles = useRootFocusStyles();
@@ -1 +1 @@
1
- {"version":3,"sources":["../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,IAAD,CAPuB,EAQjC,UAAU,CAAC,KAAD,CARuB,EAUjC;AACA,GAAC,QAAQ,IAAI,iBAAb,KAAmC,kBAAkB,CAAC,IAXrB,EAYjC,UAAU,KAAK,QAAQ,IAAI,iBAAjB,CAAV,IAAiD,kBAAkB,CAAC,UAAD,CAZlC,EAcjC;AACA,EAAA,eAAe,CAAC,IAfiB,EAgBjC,UAAU,KAAK,SAAf,IAA4B,eAAe,CAAC,OAhBX,EAiBjC,eAAe,CAAC,IAAD,CAjBkB,EAkBjC,eAAe,CAAC,KAAD,CAlBkB,EAoBjC;AACA,EAAA,QAAQ,IAAI,kBAAkB,CAAC,IAAD,CArBG,EAuBjC;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAxBsB,CAAnC;;AA2BA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,UAAU,CAAC,IAAZ,EAAkB,UAAU,CAAC,IAAD,CAA5B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AACD;;AAED,SAAO,KAAP;AACD,CAzCM","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ButtonState } from './Button.types';\n\nexport const buttonClassName = 'fui-Button';\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n verticalAlign: 'middle',\n\n ...shorthands.margin(0),\n\n maxWidth: '280px',\n\n ...shorthands.overflow('hidden'),\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\n\n fontFamily: tokens.fontFamilyBase,\n\n outlineStyle: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n color: tokens.colorNeutralForeground1,\n\n cursor: 'pointer',\n },\n\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n color: tokens.colorNeutralForeground1,\n\n outlineStyle: 'none',\n },\n },\n\n // Block styles\n block: {\n maxWidth: '100%',\n width: '100%',\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n primary: {\n backgroundColor: tokens.colorBrandBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandHover,\n },\n\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandHover,\n },\n\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n // Shape variations\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rounded: {\n /* The borderRadius rounded styles are handled in the size variations */\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n\n // Size variations\n small: {\n ...shorthands.gap('4px'),\n ...shorthands.padding('0', '8px'),\n\n height: '24px',\n minWidth: '64px',\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200,\n },\n medium: {\n ...shorthands.gap('6px'),\n ...shorthands.padding('0', '12px'),\n\n height: '32px',\n minWidth: '96px',\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase300,\n },\n large: {\n ...shorthands.gap('6px'),\n ...shorthands.padding('0', '16px'),\n\n height: '40px',\n minWidth: '96px',\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n fontSize: tokens.fontSizeBase400,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase400,\n },\n});\n\nconst useRootDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n },\n\n ':active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n },\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n primary: {\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n ...shorthands.borderColor('transparent'),\n },\n\n ':active': {\n ...shorthands.borderColor('transparent'),\n },\n },\n subtle: {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n\n ':active': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n },\n transparent: {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n\n ':active': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n },\n});\n\nconst useRootFocusStyles = makeStyles({\n // TODO: `overflow: 'hidden'` on the root does not pay well with `position: absolute`\n // used by the outline pseudo-element. Need to introduce a text container for children and set\n // overflow there so that default focus outline can work\n //\n // base: createFocusOutlineStyle(),\n // circular: createFocusOutlineStyle({ style: { outlineRadius: tokens.global.borderRadius.circular } }),\n // primary: createFocusOutlineStyle({ style: { outlineOffset: '2px' } }),\n // square: createFocusOutlineStyle({ style: { outlineRadius: tokens.global.borderRadius.none } }),\n\n base: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor('transparent'),\n outlineColor: 'transparent',\n outlineWidth: '2px',\n outlineStyle: 'solid',\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 2px ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n\n circular: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n }),\n rounded: {},\n // Primary styles\n primary: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n boxShadow: `${tokens.shadow2}, 0 0 0 2px ${tokens.colorStrokeFocus2}`,\n }),\n square: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n }),\n\n // Size variations\n small: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n }),\n medium: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n }),\n large: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\n }),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding('4px'),\n\n minWidth: '28px',\n maxWidth: '28px',\n },\n medium: {\n ...shorthands.padding('4px'),\n\n minWidth: '32px',\n maxWidth: '32px',\n },\n large: {\n ...shorthands.padding('6px'),\n\n minWidth: '40px',\n maxWidth: '40px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Base styles\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n\n // Size variations\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n },\n});\n\nexport const useButtonStyles_unstable = (state: ButtonState): ButtonState => {\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n\n const { appearance, block, disabled, disabledFocusable, iconOnly, shape, size } = state;\n\n state.root.className = mergeClasses(\n buttonClassName,\n\n // Root styles\n rootStyles.base,\n block && rootStyles.block,\n appearance && rootStyles[appearance],\n rootStyles[size],\n rootStyles[shape],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base,\n appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],\n\n // Focus styles\n rootFocusStyles.base,\n appearance === 'primary' && rootFocusStyles.primary,\n rootFocusStyles[size],\n rootFocusStyles[shape],\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(iconStyles.base, iconStyles[size], state.icon.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { renderCompoundButton } from './renderCompoundButton';
3
- import { useCompoundButton } from './useCompoundButton';
4
- import { useCompoundButtonStyles } from './useCompoundButtonStyles';
2
+ import { renderCompoundButton_unstable } from './renderCompoundButton';
3
+ import { useCompoundButton_unstable } from './useCompoundButton';
4
+ import { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';
5
5
  /**
6
6
  * CompoundButtons are buttons that can have secondary content that adds extra information to the user.
7
7
  */
8
8
 
9
9
  export const CompoundButton = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useCompoundButton(props, ref);
11
- useCompoundButtonStyles(state);
12
- return renderCompoundButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
10
+ const state = useCompoundButton_unstable(props, ref);
11
+ useCompoundButtonStyles_unstable(state);
12
+ return renderCompoundButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
13
13
  });
14
14
  CompoundButton.displayName = 'CompoundButton';
15
15
  //# sourceMappingURL=CompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/CompoundButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,wBAArC;AACA,SAAS,iBAAT,QAAkC,qBAAlC;AACA,SAAS,uBAAT,QAAwC,2BAAxC;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtG,QAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;AAEA,EAAA,uBAAuB,CAAC,KAAD,CAAvB;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B,CALsG,CAMtG;AACD,CAPuE,CAAjE;AASP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourceRoot":""}
1
+ {"version":3,"sources":["components/CompoundButton/CompoundButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtG,QAAM,KAAK,GAAG,0BAA0B,CAAC,KAAD,EAAQ,GAAR,CAAxC;AAEA,EAAA,gCAAgC,CAAC,KAAD,CAAhC;AAEA,SAAO,6BAA6B,CAAC,KAAD,CAApC,CALsG,CAMtG;AACD,CAPuE,CAAjE;AASP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\nimport type { CompoundButtonProps } from './CompoundButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"sourceRoot":"../src/"}
@@ -1,14 +1,14 @@
1
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
2
  import type { ButtonCommons, ButtonSlots, ButtonState } from '../Button/Button.types';
3
3
  export declare type CompoundButtonSlots = ButtonSlots & {
4
4
  /**
5
5
  * Second line of text that describes the action this button takes.
6
6
  */
7
- secondaryContent?: IntrinsicShorthandProps<'span'>;
7
+ secondaryContent?: Slot<'span'>;
8
8
  /**
9
9
  * Container that wraps the children and the secondaryContent slot.
10
10
  */
11
- contentContainer: IntrinsicShorthandProps<'span'>;
11
+ contentContainer: NonNullable<Slot<'span'>>;
12
12
  };
13
- export declare type CompoundButtonProps = ComponentProps<CompoundButtonSlots> & Partial<ButtonCommons>;
13
+ export declare type CompoundButtonProps = ComponentProps<Partial<CompoundButtonSlots>> & Partial<ButtonCommons>;
14
14
  export declare type CompoundButtonState = ComponentState<CompoundButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components'>;
@@ -1 +1 @@
1
- {"version":3,"file":"CompoundButton.types.js","sourceRoot":"","sources":["../../../src/components/CompoundButton/CompoundButton.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CompoundButton.types.js","sourceRoot":"../src/","sources":["components/CompoundButton/CompoundButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonCommons, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type CompoundButtonSlots = ButtonSlots & {\n /**\n * Second line of text that describes the action this button takes.\n */\n secondaryContent?: Slot<'span'>;\n\n /**\n * Container that wraps the children and the secondaryContent slot.\n */\n contentContainer: NonNullable<Slot<'span'>>;\n};\n\nexport type CompoundButtonProps = ComponentProps<Partial<CompoundButtonSlots>> & Partial<ButtonCommons>;\n\nexport type CompoundButtonState = ComponentState<CompoundButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'>;\n"]}
@@ -2,4 +2,4 @@ export * from './CompoundButton';
2
2
  export * from './CompoundButton.types';
3
3
  export * from './renderCompoundButton';
4
4
  export * from './useCompoundButton';
5
- export { compoundButtonClassName, useCompoundButtonStyles } from './useCompoundButtonStyles';
5
+ export { compoundButtonClassName, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';
@@ -2,5 +2,5 @@ export * from './CompoundButton';
2
2
  export * from './CompoundButton.types';
3
3
  export * from './renderCompoundButton';
4
4
  export * from './useCompoundButton';
5
- export { compoundButtonClassName, useCompoundButtonStyles } from './useCompoundButtonStyles';
5
+ export { compoundButtonClassName, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CompoundButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/CompoundButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export * from './CompoundButton';\nexport * from './CompoundButton.types';\nexport * from './renderCompoundButton';\nexport * from './useCompoundButton';\nexport { compoundButtonClassName, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\n"]}
@@ -2,4 +2,4 @@ import type { CompoundButtonState } from './CompoundButton.types';
2
2
  /**
3
3
  * Renders a CompoundButton component by passing the state defined props to the appropriate slots.
4
4
  */
5
- export declare const renderCompoundButton: (state: CompoundButtonState) => JSX.Element;
5
+ export declare const renderCompoundButton_unstable: (state: CompoundButtonState) => JSX.Element;
@@ -4,20 +4,20 @@ import { getSlots } from '@fluentui/react-utilities';
4
4
  * Renders a CompoundButton component by passing the state defined props to the appropriate slots.
5
5
  */
6
6
 
7
- export const renderCompoundButton = state => {
7
+ export const renderCompoundButton_unstable = state => {
8
8
  const {
9
9
  slots,
10
10
  slotProps
11
- } = getSlots(state, ['root', 'contentContainer', 'icon', 'secondaryContent']);
11
+ } = getSlots(state);
12
12
  const {
13
13
  iconOnly,
14
14
  iconPosition
15
15
  } = state;
16
16
  return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
17
- }, iconPosition !== 'after' && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
17
+ }, iconPosition !== 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
18
18
  }), !iconOnly && /*#__PURE__*/React.createElement(slots.contentContainer, { ...slotProps.contentContainer
19
- }, slotProps.root.children, /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
20
- })), iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
19
+ }, slotProps.root.children, slots.secondaryContent && /*#__PURE__*/React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
20
+ })), iconPosition === 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
21
21
  }));
22
22
  };
23
23
  //# sourceMappingURL=renderCompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/renderCompoundButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAA+B;AACjE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAsB,KAAtB,EAA6B,CAChE,MADgE,EAEhE,kBAFgE,EAGhE,MAHgE,EAIhE,kBAJg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AC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAD7C,EAEG,CAAC,QAAD,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,gBAAN,iBAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAF7B,CAHJ,EAQG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,iBAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAR7C,CADF;AAYD,CAhBM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton_unstable = (state: CompoundButtonState) => {\n const { slots, slotProps } = getSlots<CompoundButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && (\n <slots.contentContainer {...slotProps.contentContainer}>\n {slotProps.root.children}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n </slots.contentContainer>\n )}\n {iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -5,4 +5,4 @@ import type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.
5
5
  * @param props - User provided props to the CompoundButton component.
6
6
  * @param ref - User provided ref to be passed to the CompoundButton component.
7
7
  */
8
- export declare const useCompoundButton: ({ contentContainer, secondaryContent, ...props }: CompoundButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => CompoundButtonState;
8
+ export declare const useCompoundButton_unstable: ({ contentContainer, secondaryContent, ...props }: CompoundButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => CompoundButtonState;
@@ -1,18 +1,18 @@
1
1
  import { resolveShorthand } from '@fluentui/react-utilities';
2
- import { useButton } from '../Button/index';
2
+ import { useButton_unstable } from '../Button/index';
3
3
  /**
4
4
  * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.
5
5
  * @param props - User provided props to the CompoundButton component.
6
6
  * @param ref - User provided ref to be passed to the CompoundButton component.
7
7
  */
8
8
 
9
- export const useCompoundButton = ({
9
+ export const useCompoundButton_unstable = ({
10
10
  contentContainer,
11
11
  secondaryContent,
12
12
  ...props
13
13
  }, ref) => {
14
14
  return { // Button state
15
- ...useButton(props, ref),
15
+ ...useButton_unstable(props, ref),
16
16
  // Slots definition
17
17
  components: {
18
18
  root: 'button',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/useCompoundButton.ts"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,2BAAjC;AAEA,SAAS,SAAT,QAA0B,iBAA1B;AAEA;;;;AAIG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAC/B;AAAE,EAAA,gBAAF;AAAoB,EAAA,gBAApB;AAAsC,KAAG;AAAzC,CAD+B,EAE/B,GAF+B,KAGR;AACvB,SAAO,EACL;AACA,OAAG,SAAS,CAAC,KAAD,EAAQ,GAAR,CAFP;AAIL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE,MAFI;AAGV,MAAA,gBAAgB,EAAE,MAHR;AAIV,MAAA,gBAAgB,EAAE;AAJR,KALP;AAWL,IAAA,gBAAgB,EAAE,gBAAgB,CAAC,gBAAD,EAAmB;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAnB,CAX7B;AAYL,IAAA,gBAAgB,EAAE,gBAAgB,CAAC,gBAAD;AAZ7B,GAAP;AAcD,CAlBM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CompoundButton/useCompoundButton.ts"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,2BAAjC;AAEA,SAAS,kBAAT,QAAmC,iBAAnC;AAEA;;;;AAIG;;AACH,OAAO,MAAM,0BAA0B,GAAG,CACxC;AAAE,EAAA,gBAAF;AAAoB,EAAA,gBAApB;AAAsC,KAAG;AAAzC,CADwC,EAExC,GAFwC,KAGjB;AACvB,SAAO,EACL;AACA,OAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAFhB;AAIL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE,MAFI;AAGV,MAAA,gBAAgB,EAAE,MAHR;AAIV,MAAA,gBAAgB,EAAE;AAJR,KALP;AAWL,IAAA,gBAAgB,EAAE,gBAAgB,CAAC,gBAAD,EAAmB;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAnB,CAX7B;AAYL,IAAA,gBAAgB,EAAE,gBAAgB,CAAC,gBAAD;AAZ7B,GAAP;AAcD,CAlBM","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.types';\nimport { useButton_unstable } from '../Button/index';\n\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButton_unstable = (\n { contentContainer, secondaryContent, ...props }: CompoundButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonState => {\n return {\n // Button state\n ...useButton_unstable(props, ref),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span',\n },\n contentContainer: resolveShorthand(contentContainer, { required: true }),\n secondaryContent: resolveShorthand(secondaryContent),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1,3 +1,3 @@
1
1
  import type { CompoundButtonState } from './CompoundButton.types';
2
2
  export declare const compoundButtonClassName = "fui-CompoundButton";
3
- export declare const useCompoundButtonStyles: (state: CompoundButtonState) => CompoundButtonState;
3
+ export declare const useCompoundButtonStyles_unstable: (state: CompoundButtonState) => CompoundButtonState;
@@ -1,5 +1,6 @@
1
- import { shorthands, mergeClasses, __styles } from '@fluentui/react-make-styles';
2
- import { buttonSpacing, useButtonStyles } from '../Button/useButtonStyles';
1
+ import { shorthands, mergeClasses, __styles } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ import { useButtonStyles_unstable } from '../Button/useButtonStyles';
3
4
  export const compoundButtonClassName = 'fui-CompoundButton';
4
5
  const CompoundButtonClassNames = {
5
6
  secondaryContent: `${compoundButtonClassName}-secondaryContent`
@@ -33,23 +34,23 @@ const useRootStyles = /*#__PURE__*/__styles({
33
34
  "small": {
34
35
  "z8tnut": "fp9bwmr",
35
36
  "z189sj": ["f19lj068", "f177v4lu"],
36
- "Byoj8tv": "f150uoa4",
37
+ "Byoj8tv": "f1fow5ox",
37
38
  "uwmqm3": ["f177v4lu", "f19lj068"],
38
39
  "Be2twd7": "fkhj508",
39
40
  "Bg96gwp": "f1i3iumi"
40
41
  },
41
42
  "medium": {
42
- "z8tnut": "f1kcqot9",
43
+ "z8tnut": "fbtff6s",
43
44
  "z189sj": ["f11qrl6u", "fjlbh76"],
44
- "Byoj8tv": "fpe6lb7",
45
+ "Byoj8tv": "fp67ikv",
45
46
  "uwmqm3": ["fjlbh76", "f11qrl6u"],
46
47
  "Be2twd7": "fkhj508",
47
48
  "Bg96gwp": "f1i3iumi"
48
49
  },
49
50
  "large": {
50
- "z8tnut": "fqag9an",
51
+ "z8tnut": "fm4bm3s",
51
52
  "z189sj": ["f1gbmcue", "f1rh9g5y"],
52
- "Byoj8tv": "fp67ikv",
53
+ "Byoj8tv": "fe2my4m",
53
54
  "uwmqm3": ["f1rh9g5y", "f1gbmcue"],
54
55
  "Be2twd7": "fod5ikn",
55
56
  "Bg96gwp": "faaz57k"
@@ -60,7 +61,7 @@ const useRootStyles = /*#__PURE__*/__styles({
60
61
  "n4n7rj": "f1xrf5v0"
61
62
  }
62
63
  }, {
63
- "d": [".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".f11ysow2{height:auto;}", ".f900oq5 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2);}", ".f1ur7rb7 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1kcqot9{padding-top:12px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fpe6lb7{padding-bottom:12px;}", ".fqag9an{padding-top:16px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fp67ikv{padding-bottom:16px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fj9njph .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
64
+ "d": [".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".f11ysow2{height:auto;}", ".f900oq5 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2);}", ".f1ur7rb7 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1fow5ox{padding-bottom:10px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbtff6s{padding-top:14px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fp67ikv{padding-bottom:16px;}", ".fm4bm3s{padding-top:18px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fe2my4m{padding-bottom:20px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fj9njph .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
64
65
  "h": [".f8rpug0:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".f1itoici:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1l9nom2:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".fr13fpv:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
65
66
  "a": [".fre7xro:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".f1uen3ov:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fvjq8kx:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".f1xrf5v0:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"]
66
67
  });
@@ -117,7 +118,6 @@ const useContentContainerStyles = /*#__PURE__*/__styles({
117
118
  const useSecondaryContentStyles = /*#__PURE__*/__styles({
118
119
  "base": {
119
120
  "Bg96gwp": "flkuc6h",
120
- "B6of3ja": "fvjh0tl",
121
121
  "Bhrd7zp": "figsok6"
122
122
  },
123
123
  "small": {
@@ -130,10 +130,10 @@ const useSecondaryContentStyles = /*#__PURE__*/__styles({
130
130
  "Be2twd7": "fkhj508"
131
131
  }
132
132
  }, {
133
- "d": [".flkuc6h{line-height:100%;}", ".fvjh0tl{margin-top:4px;}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}"]
133
+ "d": [".flkuc6h{line-height:100%;}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}"]
134
134
  });
135
135
 
136
- export const useCompoundButtonStyles = state => {
136
+ export const useCompoundButtonStyles_unstable = state => {
137
137
  const rootStyles = useRootStyles();
138
138
  const rootIconOnlyStyles = useRootIconOnlyStyles();
139
139
  const iconStyles = useIconStyles();
@@ -162,7 +162,7 @@ export const useCompoundButtonStyles = state => {
162
162
  state.secondaryContent.className = mergeClasses(CompoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
163
163
  }
164
164
 
165
- useButtonStyles(state);
165
+ useButtonStyles_unstable(state);
166
166
  return state;
167
167
  };
168
168
  //# sourceMappingURL=useCompoundButtonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/useCompoundButtonStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,6BAArD;AACA,SAAS,aAAT,EAAwB,eAAxB,QAA+C,2BAA/C;AAGA,OAAO,MAAM,uBAAuB,GAAG,oBAAhC;AAEP,MAAM,wBAAwB,GAAG;AAC/B,EAAA,gBAAgB,EAAE,GAAG,uBAAuB;AADb,CAAjC;;AAIA,MAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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EAAA,QAAQ,IAAI,kBAAkB,CAAC,IAAD,CAZG,EAcjC;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAfsB,CAAnC;;AAkBA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,UAAU,CAAC,IAAZ,EAAkB,KAAK,CAAC,IAAN,CAAW,SAA7B,CAAnC;AACD;;AAED,EAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAAC,sBAAsB,CAAC,IAAxB,EAA8B,KAAK,CAAC,gBAAN,CAAuB,SAArD,CAA/C;;AAEA,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAC7C,wBAAwB,CAAC,gBADoB,EAE7C,sBAAsB,CAAC,IAFsB,EAG7C,sBAAsB,CAAC,IAAD,CAHuB,EAI7C,KAAK,CAAC,gBAAN,CAAuB,SAJsB,CAA/C;AAMD;;AAED,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,KAAP;AACD,CA7CM","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nimport type { CompoundButtonState } from './CompoundButton.types';\n\nexport const compoundButtonClassName = 'fui-CompoundButton';\n\nconst CompoundButtonClassNames = {\n secondaryContent: `${compoundButtonClassName}-secondaryContent`,\n};\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n ...shorthands.gap('12px'),\n\n height: 'auto',\n\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n },\n subtle: {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n transparent: {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n\n // Size variations\n small: {\n ...shorthands.padding('8px', '8px', '10px', '8px'),\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n medium: {\n ...shorthands.padding('14px', '12px', '16px', '12px'),\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n large: {\n ...shorthands.padding('18px', '16px', '20px', '16px'),\n\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n\n // Disabled styles\n disabled: {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding('4px'),\n\n maxWidth: '48px',\n minWidth: '48px',\n },\n medium: {\n ...shorthands.padding('6px'),\n\n maxWidth: '52px',\n minWidth: '52px',\n },\n large: {\n ...shorthands.padding('8px'),\n\n maxWidth: '56px',\n minWidth: '56px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Base styles\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px',\n },\n});\n\nconst useContentContainerStyles = makeStyles({\n // Base styles\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left',\n },\n});\n\nconst useSecondaryContentStyles = makeStyles({\n // Base styles\n base: {\n lineHeight: '100%',\n fontWeight: tokens.fontWeightRegular,\n },\n\n // Size variations\n small: {\n fontSize: tokens.fontSizeBase200,\n },\n medium: {\n fontSize: tokens.fontSizeBase200,\n },\n large: {\n fontSize: tokens.fontSizeBase300,\n },\n});\n\nexport const useCompoundButtonStyles_unstable = (state: CompoundButtonState): CompoundButtonState => {\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n\n const { appearance, disabled, disabledFocusable, iconOnly, size } = state;\n\n state.root.className = mergeClasses(\n compoundButtonClassName,\n\n // Root styles\n rootStyles.base,\n appearance && rootStyles[appearance],\n rootStyles[size],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootStyles.disabled,\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(iconStyles.base, state.icon.className);\n }\n\n state.contentContainer.className = mergeClasses(contentContainerStyles.base, state.contentContainer.className);\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n CompoundButtonClassNames.secondaryContent,\n secondaryContentStyles.base,\n secondaryContentStyles[size],\n state.secondaryContent.className,\n );\n }\n\n useButtonStyles_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}