@fluentui/react-button 0.0.0-nightlyfe9829e48120211112.1 → 0.0.0-nightlyff78d1e27a20220217.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/CHANGELOG.json +337 -26
  2. package/CHANGELOG.md +80 -14
  3. package/dist/react-button.d.ts +31 -33
  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 +6 -3
  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 +3 -2
  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 +97 -72
  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 +8 -3
  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 +14 -13
  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 -4
  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 +6 -3
  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 +6 -3
  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 +35 -34
  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 +8 -5
  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 +5 -4
  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 +106 -80
  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 +10 -5
  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 +25 -23
  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 -4
  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 +8 -5
  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 +8 -5
  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 +40 -38
  174. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  175. package/lib-commonjs/index.js.map +1 -1
  176. package/package.json +12 -15
  177. package/lib/common/isConformant.d.ts +0 -4
  178. package/lib/common/isConformant.js +0 -13
  179. package/lib/common/isConformant.js.map +0 -1
  180. package/lib-commonjs/common/isConformant.d.ts +0 -4
  181. package/lib-commonjs/common/isConformant.js +0 -24
  182. package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AACA,SAAS,+BAAT,QAAgD,yBAAhD;AAGA,OA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ArB;AAA+B,IAAA;AAA/B,MAAqD,KAA3D;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,oBADiC,EAEjC,UAAU,CAAC,IAFsB,EAGjC,KAAK,IAAI,UAAU,CAAC,KAHa,EAIjC,UAAU,IAAI,UAAU,CAAC,UAAD,CAJS,EAKjC,CAAC,QAAQ,IAAI,iBAAb,KAAmC,UAAU,CAAC,QALb,EAMjC,KAAK,CAAC,IAAN,CAAW,SANsB,CAAnC;;AASA,MAAI,KAAK,CAAC,UAAV,EAAsB;AACpB,IAAA,KAAK,CAAC,UAAN,CAAiB,SAAjB,GAA6B,YAAY,CACvC,qBAAqB,CAAC,UADiB,EAEvC,WAAW,CAAC,UAF2B,EAGvC,KAAK,CAAC,UAAN,CAAiB,SAHsB,CAAzC;AAKD;;AAED,MAAI,KAAK,CAAC,mBAAV,EAA+B;AAC7B,IAAA,KAAK,CAAC,mBAAN,CAA0B,SAA1B,GAAsC,YAAY,CAChD,qBAAqB,CAAC,mBAD0B,EAEhD,WAAW,CAAC,mBAFoC,EAGhD,KAAK,CAAC,mBAAN,CAA0B,SAHsB,CAAlD;AAKD;;AAED,SAAO,KAAP;AACD,CAhCM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SplitButtonState } from './SplitButton.types';\n\nexport const splitButtonClassName = 'fui-SplitButton';\n\nconst SplitButtonClassNames = {\n primaryActionButton: `${splitButtonClassName}-primaryActionButton`,\n menuButton: `${splitButtonClassName}-menuButton`,\n};\n\nconst useFocusStyles = makeStyles({\n primaryActionButton: createCustomFocusIndicatorStyle({\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }),\n\n menuButton: createCustomFocusIndicatorStyle({\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n }),\n});\n\nconst useRootStyles = makeStyles({\n // Base rootStyles\n base: {\n display: 'inline-flex',\n justifyContent: 'stretch',\n position: 'relative',\n verticalAlign: 'middle',\n\n // Use classnames to increase specificy of rootStyles and avoid collisions.\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n\n // Use classnames to increase specificy of rootStyles and avoid collisions.\n [`& .${SplitButtonClassNames.menuButton}`]: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n },\n },\n\n // Block rootStyles\n block: {\n width: '100%',\n },\n\n // Appearance variations\n outline: {\n /* No rootStyles */\n },\n primary: {\n // Use classnames to increase specificy of rootStyles and avoid collisions.\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundInverted,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundInverted,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundInverted,\n },\n },\n },\n subtle: {\n // Use classnames to increase specificy of rootStyles and avoid collisions.\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n },\n transparent: {\n // Use classnames to increase specificy of rootStyles and avoid collisions.\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n },\n\n // Shape variations\n circular: {},\n rounded: {},\n square: {},\n\n // Disabled rootStyles\n disabled: {\n // Use classnames to increase specificy of rootStyles and avoid collisions.\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n },\n});\n\nexport const useSplitButtonStyles_unstable = (state: SplitButtonState): SplitButtonState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n\n const { appearance, block, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n splitButtonClassName,\n rootStyles.base,\n block && rootStyles.block,\n appearance && rootStyles[appearance],\n (disabled || disabledFocusable) && rootStyles.disabled,\n state.root.className,\n );\n\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(\n SplitButtonClassNames.menuButton,\n focusStyles.menuButton,\n state.menuButton.className,\n );\n }\n\n if (state.primaryActionButton) {\n state.primaryActionButton.className = mergeClasses(\n SplitButtonClassNames.primaryActionButton,\n focusStyles.primaryActionButton,\n state.primaryActionButton.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { renderToggleButton } from './renderToggleButton';
3
- import { useToggleButton } from './useToggleButton';
4
- import { useToggleButtonStyles } from './useToggleButtonStyles';
2
+ import { renderToggleButton_unstable } from './renderToggleButton';
3
+ import { useToggleButton_unstable } from './useToggleButton';
4
+ import { useToggleButtonStyles_unstable } from './useToggleButtonStyles';
5
5
  /**
6
6
  * ToggleButtons are buttons that toggle between two defined states when triggered.
7
7
  */
8
8
 
9
9
  export const ToggleButton = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useToggleButton(props, ref);
11
- useToggleButtonStyles(state);
12
- return renderToggleButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
10
+ const state = useToggleButton_unstable(props, ref);
11
+ useToggleButtonStyles_unstable(state);
12
+ return renderToggleButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
13
13
  });
14
14
  ToggleButton.displayName = 'ToggleButton';
15
15
  //# sourceMappingURL=ToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,eAAT,QAAgC,mBAAhC;AACA,SAAS,qBAAT,QAAsC,yBAAtC;AAIA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,eAAe,CAAC,KAAD,EAAQ,GAAR,CAA7B;AAEA,EAAA,qBAAqB,CAAC,KAAD,CAArB;AAEA,SAAO,kBAAkB,CAAC,KAAD,CAAzB,CALkG,CAMlG;AACD,CAPmE,CAA7D;AASP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourceRoot":""}
1
+ {"version":3,"sources":["components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AAIA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,wBAAwB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AAEA,EAAA,8BAA8B,CAAC,KAAD,CAA9B;AAEA,SAAO,2BAA2B,CAAC,KAAD,CAAlC,CALkG,CAMlG;AACD,CAPmE,CAA7D;AASP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n return renderToggleButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"],"sourceRoot":"../src/"}
@@ -1,5 +1,5 @@
1
1
  import type { ButtonProps, ButtonState } from '../Button/Button.types';
2
- export declare type ToggleButtonCommons = {
2
+ declare type ToggleButtonCommons = {
3
3
  /**
4
4
  * Defines the controlled checked state of the `ToggleButton`.
5
5
  * If passed, `ToggleButton` ignores the `defaultChecked` property.
@@ -17,3 +17,4 @@ export declare type ToggleButtonProps = ButtonProps & Partial<ToggleButtonCommon
17
17
  defaultChecked?: boolean;
18
18
  };
19
19
  export declare type ToggleButtonState = ButtonState & ToggleButtonCommons;
20
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.types.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/ToggleButton.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ToggleButton.types.js","sourceRoot":"../src/","sources":["components/ToggleButton/ToggleButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonProps, ButtonState } from '../Button/Button.types';\n\ntype ToggleButtonCommons = {\n /**\n * Defines the controlled checked state of the `ToggleButton`.\n * If passed, `ToggleButton` ignores the `defaultChecked` property.\n * 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\n * correct value based on handling `onClick` events and re-rendering.\n * @default false\n */\n checked: boolean;\n};\n\nexport type ToggleButtonProps = ButtonProps &\n Partial<ToggleButtonCommons> & {\n /**\n * Defines whether the `ToggleButton` is initially in a checked state or not when rendered.\n * @default false\n */\n defaultChecked?: boolean;\n };\n\nexport type ToggleButtonState = ButtonState & ToggleButtonCommons;\n"]}
@@ -2,4 +2,4 @@ export * from './ToggleButton';
2
2
  export * from './ToggleButton.types';
3
3
  export * from './renderToggleButton';
4
4
  export * from './useToggleButton';
5
- export { toggleButtonClassName, useToggleButtonStyles } from './useToggleButtonStyles';
5
+ export { toggleButtonClassName, useToggleButtonStyles_unstable } from './useToggleButtonStyles';
@@ -2,5 +2,5 @@ export * from './ToggleButton';
2
2
  export * from './ToggleButton.types';
3
3
  export * from './renderToggleButton';
4
4
  export * from './useToggleButton';
5
- export { toggleButtonClassName, useToggleButtonStyles } from './useToggleButtonStyles';
5
+ export { toggleButtonClassName, useToggleButtonStyles_unstable } from './useToggleButtonStyles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ToggleButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export * from './ToggleButton';\nexport * from './ToggleButton.types';\nexport * from './renderToggleButton';\nexport * from './useToggleButton';\nexport { toggleButtonClassName, useToggleButtonStyles_unstable } from './useToggleButtonStyles';\n"]}
@@ -1 +1 @@
1
- export { renderButton as renderToggleButton } from '../Button/renderButton';
1
+ export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';
@@ -1,2 +1,2 @@
1
- export { renderButton as renderToggleButton } from '../Button/renderButton';
1
+ export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';
2
2
  //# sourceMappingURL=renderToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderToggleButton.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"renderToggleButton.js","sourceRoot":"../src/","sources":["components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';\n"]}
@@ -6,4 +6,4 @@ import type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types'
6
6
  * @param props - User provided props to the ToggleButton component.
7
7
  * @param ref - User provided ref to be passed to the ToggleButton component.
8
8
  */
9
- export declare const useToggleButton: ({ checked, defaultChecked, ...props }: ToggleButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => ToggleButtonState;
9
+ export declare const useToggleButton_unstable: ({ checked, defaultChecked, ...props }: ToggleButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => ToggleButtonState;
@@ -1,6 +1,6 @@
1
1
  import { useControllableState } from '@fluentui/react-utilities';
2
2
  import * as React from 'react';
3
- import { useButton } from '../Button/useButton';
3
+ import { useButton_unstable } from '../Button/useButton';
4
4
  /**
5
5
  * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
6
6
  * processed state.
@@ -8,12 +8,16 @@ import { useButton } from '../Button/useButton';
8
8
  * @param ref - User provided ref to be passed to the ToggleButton component.
9
9
  */
10
10
 
11
- export const useToggleButton = ({
11
+ export const useToggleButton_unstable = ({
12
12
  checked,
13
13
  defaultChecked,
14
14
  ...props
15
15
  }, ref) => {
16
- const buttonState = useButton(props, ref);
16
+ const {
17
+ disabled,
18
+ disabledFocusable
19
+ } = props;
20
+ const buttonState = useButton_unstable(props, ref);
17
21
  const {
18
22
  role,
19
23
  onClick
@@ -30,18 +34,18 @@ export const useToggleButton = ({
30
34
  checked: checkedValue,
31
35
  // Slots definition
32
36
  root: { ...buttonState.root,
33
- [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: !!checkedValue,
37
+ [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,
34
38
  onClick: React.useCallback(ev => {
35
- if (onClick) {
36
- onClick(ev);
39
+ if (!disabled && !disabledFocusable) {
40
+ onClick === null || onClick === void 0 ? void 0 : onClick(ev);
37
41
 
38
42
  if (ev.defaultPrevented) {
39
43
  return;
40
44
  }
41
- }
42
45
 
43
- setCheckedValue(!checkedValue);
44
- }, [checkedValue, setCheckedValue, onClick])
46
+ setCheckedValue(!checkedValue);
47
+ }
48
+ }, [checkedValue, disabled, disabledFocusable, setCheckedValue, onClick])
45
49
  }
46
50
  };
47
51
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":"AAAA,SAAS,oBAAT,QAAqC,2BAArC;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,SAAT,QAA0B,qBAA1B;AAGA;;;;;AAKG;;AACH,OAAO,MAAM,eAAe,GAAG,CAC7B;AAAE,EAAA,OAAF;AAAW,EAAA,cAAX;AAA2B,KAAG;AAA9B,CAD6B,EAE7B,GAF6B,KAGR;AACrB,QAAM,WAAW,GAAG,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KAAxC;AACA,QAAM,WAAW,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AACA,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA;AAAR,MAAoB,WAAW,CAAC,IAAtC;AAEA,QAAM,CAAC,YAAD,EAAe,eAAf,IAAkC,oBAAoB,CAAC;AAC3D,IAAA,KAAK,EAAE,OADoD;AAE3D,IAAA,YAAY,EAAE,cAF6C;AAG3D,IAAA,YAAY,EAAE;AAH6C,GAAD,CAA5D;AAMA,QAAM,kBAAkB,GAAG,IAAI,KAAK,kBAAT,IAA+B,IAAI,KAAK,UAAnE;AAEA,SAAO,EACL;AACA,OAAG,WAFE;AAIL;AACA,IAAA,OAAO,EAAE,YALJ;AAOL;AACA,IAAA,IAAI,EAAE,EACJ,GAAG,WAAW,CAAC,IADX;AAEJ,OAAC,kBAAkB,GAAG,cAAH,GAAoB,cAAvC,GAAwD,YAFpD;AAGJ,MAAA,OAAO,EAAE,KAAK,CAAC,WAAN,CACP,EAAE,IAAG;AACH,YAAI,CAAC,QAAD,IAAa,CAAC,iBAAlB,EAAqC;AACnC,UAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAG,EAAH,CAAP;;AAEA,cAAI,EAAE,CAAC,gBAAP,EAAyB;AACvB;AACD;;AAED,UAAA,eAAe,CAAC,CAAC,YAAF,CAAf;AACD;AACF,OAXM,EAYP,CAAC,YAAD,EAAe,QAAf,EAAyB,iBAAzB,EAA4C,eAA5C,EAA6D,OAA7D,CAZO;AAHL;AARD,GAAP;AA2BD,CA3CM","sourcesContent":["import { useControllableState } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useButton_unstable } from '../Button/useButton';\nimport type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton_unstable = (\n { checked, defaultChecked, ...props }: ToggleButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToggleButtonState => {\n const { disabled, disabledFocusable } = props;\n const buttonState = useButton_unstable(props, ref);\n const { role, onClick } = buttonState.root;\n\n const [checkedValue, setCheckedValue] = useControllableState({\n state: checked,\n defaultState: defaultChecked,\n initialState: false,\n });\n\n const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';\n\n return {\n // Button state\n ...buttonState,\n\n // State calculated from a set of props\n checked: checkedValue,\n\n // Slots definition\n root: {\n ...buttonState.root,\n [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,\n onClick: React.useCallback(\n ev => {\n if (!disabled && !disabledFocusable) {\n onClick?.(ev);\n\n if (ev.defaultPrevented) {\n return;\n }\n\n setCheckedValue(!checkedValue);\n }\n },\n [checkedValue, disabled, disabledFocusable, setCheckedValue, onClick],\n ),\n },\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1,3 +1,3 @@
1
1
  import type { ToggleButtonState } from './ToggleButton.types';
2
2
  export declare const toggleButtonClassName = "fui-ToggleButton";
3
- export declare const useToggleButtonStyles: (state: ToggleButtonState) => ToggleButtonState;
3
+ export declare const useToggleButtonStyles_unstable: (state: ToggleButtonState) => ToggleButtonState;
@@ -1,10 +1,11 @@
1
- import { mergeClasses, __styles } from '@fluentui/react-make-styles';
2
- import { 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 toggleButtonClassName = 'fui-ToggleButton';
4
5
 
5
6
  const useCheckedStyles = /*#__PURE__*/__styles({
6
7
  "base": {
7
- "ayd6f0": "fg85c1j",
8
+ "De3pzq": "f1nfm20t",
8
9
  "g2u3we": "fj3muxo",
9
10
  "h3c5rm": ["f1akhkt", "f1lxtadh"],
10
11
  "B9xav0g": "f1aperda",
@@ -14,13 +15,13 @@ const useCheckedStyles = /*#__PURE__*/__styles({
14
15
  "Bekrc4i": ["f5tn483", "f1ojsxk5"],
15
16
  "Bn0qgzm": "f1vxd6vx",
16
17
  "ibv6hh": ["f1ojsxk5", "f5tn483"],
17
- "v4pbla": "f56u8ty",
18
+ "Jwef8y": "f1knas48",
18
19
  "Bgoe8wy": "fvcxoqz",
19
20
  "Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
20
21
  "oetu4i": "f1xlaoq0",
21
22
  "gg5e9n": ["f1m52nbi", "f1ub3y4t"],
22
23
  "Bi91k9c": "fax3udt",
23
- "vv34bc": "fzgy25m",
24
+ "ecr2s2": "fb40n2d",
24
25
  "B6oc9vd": "fvs00aa",
25
26
  "ak43y8": ["f1assf6x", "f4ruux4"],
26
27
  "wmxk5l": "fumykes",
@@ -28,24 +29,24 @@ const useCheckedStyles = /*#__PURE__*/__styles({
28
29
  "lj723h": "f1r2dosr"
29
30
  },
30
31
  "outline": {
31
- "ayd6f0": "f6r4cvw",
32
- "v4pbla": "f62j56f",
33
- "vv34bc": "flt377r"
32
+ "De3pzq": "f1q9pm1r",
33
+ "Jwef8y": "fjxutwb",
34
+ "ecr2s2": "fophhak"
34
35
  },
35
36
  "primary": {
36
- "ayd6f0": "fvinvdn",
37
+ "De3pzq": "f8w4g0q",
37
38
  "g2u3we": "f1p3nwhy",
38
39
  "h3c5rm": ["f11589ue", "f1pdflbu"],
39
40
  "B9xav0g": "f1q5o8ev",
40
41
  "zhjwy3": ["f1pdflbu", "f11589ue"],
41
42
  "sj55zd": "f1phragk",
42
- "v4pbla": "f1fitrdm",
43
+ "Jwef8y": "f15wkkf3",
43
44
  "Bgoe8wy": "f1s2uweq",
44
45
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
45
46
  "oetu4i": "f1ukrpxl",
46
47
  "gg5e9n": ["fecsdlb", "fr80ssc"],
47
48
  "Bi91k9c": "f1rq72xc",
48
- "vv34bc": "f4ihffn",
49
+ "ecr2s2": "fsp1bjw",
49
50
  "B6oc9vd": "ff472gp",
50
51
  "ak43y8": ["f4yyc7m", "ft2aflc"],
51
52
  "wmxk5l": "fggejwh",
@@ -53,19 +54,19 @@ const useCheckedStyles = /*#__PURE__*/__styles({
53
54
  "lj723h": "f18otbis"
54
55
  },
55
56
  "subtle": {
56
- "ayd6f0": "f1n839y3",
57
+ "De3pzq": "fq5gl1p",
57
58
  "g2u3we": "f1p3nwhy",
58
59
  "h3c5rm": ["f11589ue", "f1pdflbu"],
59
60
  "B9xav0g": "f1q5o8ev",
60
61
  "zhjwy3": ["f1pdflbu", "f11589ue"],
61
62
  "sj55zd": "f1qj7y59",
62
- "v4pbla": "f4wzgrt",
63
+ "Jwef8y": "f1t94bn6",
63
64
  "Bgoe8wy": "f1s2uweq",
64
65
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
65
66
  "oetu4i": "f1ukrpxl",
66
67
  "gg5e9n": ["fecsdlb", "fr80ssc"],
67
68
  "Bi91k9c": "f139oj5f",
68
- "vv34bc": "f1be4e1d",
69
+ "ecr2s2": "f1wfn5kd",
69
70
  "B6oc9vd": "ff472gp",
70
71
  "ak43y8": ["f4yyc7m", "ft2aflc"],
71
72
  "wmxk5l": "fggejwh",
@@ -73,19 +74,19 @@ const useCheckedStyles = /*#__PURE__*/__styles({
73
74
  "lj723h": "f19au66r"
74
75
  },
75
76
  "transparent": {
76
- "ayd6f0": "f6r4cvw",
77
+ "De3pzq": "f1q9pm1r",
77
78
  "g2u3we": "f1p3nwhy",
78
79
  "h3c5rm": ["f11589ue", "f1pdflbu"],
79
80
  "B9xav0g": "f1q5o8ev",
80
81
  "zhjwy3": ["f1pdflbu", "f11589ue"],
81
82
  "sj55zd": "f1qj7y59",
82
- "v4pbla": "f62j56f",
83
+ "Jwef8y": "fjxutwb",
83
84
  "Bgoe8wy": "f1s2uweq",
84
85
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
85
86
  "oetu4i": "f1ukrpxl",
86
87
  "gg5e9n": ["fecsdlb", "fr80ssc"],
87
88
  "Bi91k9c": "f139oj5f",
88
- "vv34bc": "flt377r",
89
+ "ecr2s2": "fophhak",
89
90
  "B6oc9vd": "ff472gp",
90
91
  "ak43y8": ["f4yyc7m", "ft2aflc"],
91
92
  "wmxk5l": "fggejwh",
@@ -93,26 +94,26 @@ const useCheckedStyles = /*#__PURE__*/__styles({
93
94
  "lj723h": "f19au66r"
94
95
  }
95
96
  }, {
96
- "d": [".fg85c1j{background:var(--colorNeutralBackground1Selected);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".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);}", ".f6r4cvw{background:var(--colorTransparentBackgroundSelected);}", ".fvinvdn{background:var(--colorBrandBackgroundSelected);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".f1n839y3{background:var(--colorSubtleBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}"],
97
- "h": [".f56u8ty:hover{background: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);}", ".f62j56f:hover{background:var(--colorTransparentBackgroundHover);}", ".f1fitrdm:hover{background: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);}", ".f4wzgrt:hover{background:var(--colorSubtleBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}"],
98
- "a": [".fzgy25m:active{background: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);}", ".flt377r:active{background:var(--colorTransparentBackgroundPressed);}", ".f4ihffn:active{background: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);}", ".f1be4e1d:active{background:var(--colorSubtleBackgroundPressed);}", ".f19au66r:active{color:var(--colorNeutralForeground2BrandPressed);}"]
97
+ "d": [".f1nfm20t{background-color:var(--colorNeutralBackground1Selected);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".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);}", ".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}", ".f8w4g0q{background-color:var(--colorBrandBackgroundSelected);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}"],
98
+ "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);}", ".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);}"],
99
+ "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);}", ".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);}"]
99
100
  });
100
101
 
101
102
  const useDisabledStyles = /*#__PURE__*/__styles({
102
103
  "base": {
103
- "ayd6f0": "fqst6tg",
104
+ "De3pzq": "f1bg9a2p",
104
105
  "g2u3we": "f1jj8ep1",
105
106
  "h3c5rm": ["f15xbau", "fy0fskl"],
106
107
  "B9xav0g": "f4ikngz",
107
108
  "zhjwy3": ["fy0fskl", "f15xbau"],
108
109
  "sj55zd": "f1s2aq7o",
109
- "v4pbla": "f1nil5o8",
110
+ "Jwef8y": "f1falr9n",
110
111
  "Bgoe8wy": "f12mpcsy",
111
112
  "Bwzppfd": ["f1gwvigk", "f18rmfxp"],
112
113
  "oetu4i": "f1jnshp0",
113
114
  "gg5e9n": ["f18rmfxp", "f1gwvigk"],
114
115
  "Bi91k9c": "fvgxktp",
115
- "vv34bc": "fkqx3al",
116
+ "ecr2s2": "f1ryyzvn",
116
117
  "B6oc9vd": "fdi4vxw",
117
118
  "ak43y8": ["f4ryxzl", "fkdgpbx"],
118
119
  "wmxk5l": "fcmhn06",
@@ -135,46 +136,46 @@ const useDisabledStyles = /*#__PURE__*/__styles({
135
136
  "B50zh58": ["ft2aflc", "f4yyc7m"]
136
137
  },
137
138
  "subtle": {
138
- "ayd6f0": "f1k2sg7s",
139
+ "De3pzq": "f3rmtva",
139
140
  "g2u3we": "f1p3nwhy",
140
141
  "h3c5rm": ["f11589ue", "f1pdflbu"],
141
142
  "B9xav0g": "f1q5o8ev",
142
143
  "zhjwy3": ["f1pdflbu", "f11589ue"],
143
- "v4pbla": "f1vc35iv",
144
+ "Jwef8y": "f1cio4g9",
144
145
  "Bgoe8wy": "f1s2uweq",
145
146
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
146
147
  "oetu4i": "f1ukrpxl",
147
148
  "gg5e9n": ["fecsdlb", "fr80ssc"],
148
- "vv34bc": "f17oliv9",
149
+ "ecr2s2": "f1rot6hk",
149
150
  "B6oc9vd": "ff472gp",
150
151
  "ak43y8": ["f4yyc7m", "ft2aflc"],
151
152
  "wmxk5l": "fggejwh",
152
153
  "B50zh58": ["ft2aflc", "f4yyc7m"]
153
154
  },
154
155
  "transparent": {
155
- "ayd6f0": "f1k2sg7s",
156
+ "De3pzq": "f3rmtva",
156
157
  "g2u3we": "f1p3nwhy",
157
158
  "h3c5rm": ["f11589ue", "f1pdflbu"],
158
159
  "B9xav0g": "f1q5o8ev",
159
160
  "zhjwy3": ["f1pdflbu", "f11589ue"],
160
- "v4pbla": "f1vc35iv",
161
+ "Jwef8y": "f1cio4g9",
161
162
  "Bgoe8wy": "f1s2uweq",
162
163
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
163
164
  "oetu4i": "f1ukrpxl",
164
165
  "gg5e9n": ["fecsdlb", "fr80ssc"],
165
- "vv34bc": "f17oliv9",
166
+ "ecr2s2": "f1rot6hk",
166
167
  "B6oc9vd": "ff472gp",
167
168
  "ak43y8": ["f4yyc7m", "ft2aflc"],
168
169
  "wmxk5l": "fggejwh",
169
170
  "B50zh58": ["ft2aflc", "f4yyc7m"]
170
171
  }
171
172
  }, {
172
- "d": [".fqst6tg{background:var(--colorNeutralBackgroundDisabled);}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1k2sg7s{background:none;}"],
173
- "h": [".f1nil5o8:hover{background:var(--colorNeutralBackgroundDisabled);}", ".f12mpcsy:hover{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1gwvigk:hover{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f18rmfxp:hover{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f1jnshp0:hover{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1vc35iv:hover{background:none;}"],
174
- "a": [".fkqx3al:active{background:var(--colorNeutralBackgroundDisabled);}", ".fdi4vxw:active{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f4ryxzl:active{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fkdgpbx:active{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fcmhn06:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}", ".ff472gp:active{border-top-color:transparent;}", ".f4yyc7m:active{border-right-color:transparent;}", ".ft2aflc:active{border-left-color:transparent;}", ".fggejwh:active{border-bottom-color:transparent;}", ".f17oliv9:active{background:none;}"]
173
+ "d": [".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f3rmtva{background-color:transparent;}"],
174
+ "h": [".f1falr9n:hover{background-color:var(--colorNeutralBackgroundDisabled);}", ".f12mpcsy:hover{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1gwvigk:hover{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f18rmfxp:hover{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f1jnshp0:hover{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1cio4g9:hover{background-color:transparent;}"],
175
+ "a": [".f1ryyzvn:active{background-color:var(--colorNeutralBackgroundDisabled);}", ".fdi4vxw:active{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f4ryxzl:active{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fkdgpbx:active{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fcmhn06:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}", ".ff472gp:active{border-top-color:transparent;}", ".f4yyc7m:active{border-right-color:transparent;}", ".ft2aflc:active{border-left-color:transparent;}", ".fggejwh:active{border-bottom-color:transparent;}", ".f1rot6hk:active{background-color:transparent;}"]
175
176
  });
176
177
 
177
- export const useToggleButtonStyles = state => {
178
+ export const useToggleButtonStyles_unstable = state => {
178
179
  const checkedStyles = useCheckedStyles();
179
180
  const disabledStyles = useDisabledStyles();
180
181
  const {
@@ -187,7 +188,7 @@ export const useToggleButtonStyles = state => {
187
188
  checked && checkedStyles.base, appearance && checked && checkedStyles[appearance], // Disabled styles
188
189
  (disabled || disabledFocusable) && disabledStyles.base, appearance && (disabled || disabledFocusable) && disabledStyles[appearance], // User provided class name
189
190
  state.root.className);
190
- useButtonStyles(state);
191
+ useButtonStyles_unstable(state);
191
192
  return state;
192
193
  };
193
194
  //# sourceMappingURL=useToggleButtonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,eAAT,QAAgC,2BAAhC;AAGA,OAAO,MAAM,qBAAqB,GAAG,kBAA9B;;AAEP,MAAM,gBAAgB,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;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,EAAzB;;AAuFA,MAAM,iBAAiB,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;AA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K,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,qBADiC,EAGjC;AACA,EAAA,OAAO,IAAI,aAAa,CAAC,IAJQ,EAKjC,UAAU,IAAI,OAAd,IAAyB,aAAa,CAAC,UAAD,CALL,EAOjC;AACA,GAAC,QAAQ,IAAI,iBAAb,KAAmC,cAAc,CAAC,IARjB,EASjC,UAAU,KAAK,QAAQ,IAAI,iBAAjB,CAAV,IAAiD,cAAc,CAAC,UAAD,CAT9B,EAWjC;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAZsB,CAAnC;AAeA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,KAAP;AACD,CAxBM","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nimport type { ToggleButtonState } from './ToggleButton.types';\n\nexport const toggleButtonClassName = 'fui-ToggleButton';\n\nconst useCheckedStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n color: tokens.colorNeutralForeground1,\n\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n color: tokens.colorNeutralForeground1,\n },\n\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n color: tokens.colorNeutralForeground1,\n },\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n primary: {\n backgroundColor: tokens.colorBrandBackgroundSelected,\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.colorSubtleBackgroundSelected,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandSelected,\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.colorTransparentBackgroundSelected,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandSelected,\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\nconst useDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\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\nexport const useToggleButtonStyles_unstable = (state: ToggleButtonState): ToggleButtonState => {\n const checkedStyles = useCheckedStyles();\n const disabledStyles = useDisabledStyles();\n\n const { appearance, checked, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n toggleButtonClassName,\n\n // Checked styles\n checked && checkedStyles.base,\n appearance && checked && checkedStyles[appearance],\n\n // Disabled styles\n (disabled || disabledFocusable) && disabledStyles.base,\n appearance && (disabled || disabledFocusable) && disabledStyles[appearance],\n\n // User provided class name\n state.root.className,\n );\n\n useButtonStyles_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './Button';\nexport * from './CompoundButton';\nexport * from './MenuButton';\nexport * from './SplitButton';\nexport * from './ToggleButton';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Button.tsx"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["Button.tsx"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Button/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/CompoundButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["CompoundButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/CompoundButton/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MenuButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["MenuButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/MenuButton/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SplitButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["SplitButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/SplitButton/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ToggleButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["ToggleButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/ToggleButton/index';\n"],"sourceRoot":"../src/"}
@@ -18,9 +18,9 @@ const useButtonStyles_1 = /*#__PURE__*/require("./useButtonStyles");
18
18
 
19
19
 
20
20
  exports.Button = /*#__PURE__*/React.forwardRef((props, ref) => {
21
- const state = useButton_1.useButton(props, ref);
22
- useButtonStyles_1.useButtonStyles(state);
23
- return renderButton_1.renderButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
21
+ const state = useButton_1.useButton_unstable(props, ref);
22
+ useButtonStyles_1.useButtonStyles_unstable(state);
23
+ return renderButton_1.renderButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
24
24
  });
25
25
  exports.Button.displayName = 'Button';
26
26
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,WAAA,CAAA,SAAA,CAAU,KAAV,EAAiB,GAAjB,CAAd;AAEA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,cAAA,CAAA,YAAA,CAAa,KAAb,CAAP,CALsF,CAMtF;AACD,CAPuD,CAA3C;AASb,OAAA,CAAA,MAAA,CAAO,WAAP,GAAqB,QAArB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Button/Button.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,WAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,GAA1B,CAAd;AAEA,EAAA,iBAAA,CAAA,wBAAA,CAAyB,KAAzB;AAEA,SAAO,cAAA,CAAA,qBAAA,CAAsB,KAAtB,CAAP,CALsF,CAMtF;AACD,CAPuD,CAA3C;AASb,OAAA,CAAA,MAAA,CAAO,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,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -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';
@@ -3,14 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useButtonStyles = exports.buttonClassName = void 0;
6
+ exports.useButtonStyles_unstable = exports.buttonClassName = void 0;
7
7
 
8
8
  const tslib_1 = /*#__PURE__*/require("tslib");
9
9
 
10
10
  tslib_1.__exportStar(require("./Button"), exports);
11
11
 
12
- tslib_1.__exportStar(require("./Button.types"), exports);
13
-
14
12
  tslib_1.__exportStar(require("./renderButton"), exports);
15
13
 
16
14
  tslib_1.__exportStar(require("./useButton"), exports);
@@ -23,10 +21,10 @@ Object.defineProperty(exports, "buttonClassName", {
23
21
  return useButtonStyles_1.buttonClassName;
24
22
  }
25
23
  });
26
- Object.defineProperty(exports, "useButtonStyles", {
24
+ Object.defineProperty(exports, "useButtonStyles_unstable", {
27
25
  enumerable: true,
28
26
  get: function () {
29
- return useButtonStyles_1.useButtonStyles;
27
+ return useButtonStyles_1.useButtonStyles_unstable;
30
28
  }
31
29
  });
32
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,iBAAA,CAAA,eAAA;AAAe;AAAf,CAAA;AAAiB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,iBAAA,CAAA,eAAA;AAAe;AAAf,CAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/Button/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AAGA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,aAAA,CAAA,EAAA,OAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,iBAAA,CAAA,eAAA;AAAe;AAAf,CAAA;AAAiB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,0BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,iBAAA,CAAA,wBAAA;AAAwB;AAAxB,CAAA","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"],"sourceRoot":"../src/"}
@@ -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;