@fluentui/react-button 9.3.4 → 9.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +70 -1
  3. package/CHANGELOG.md +20 -2
  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.map +1 -1
  10. package/lib/components/Button/Button.types.js.map +1 -1
  11. package/lib/components/Button/index.js.map +1 -1
  12. package/lib/components/Button/renderButton.js +1 -7
  13. package/lib/components/Button/renderButton.js.map +1 -1
  14. package/lib/components/Button/useButton.js +1 -0
  15. package/lib/components/Button/useButton.js.map +1 -1
  16. package/lib/components/Button/useButtonStyles.js.map +1 -1
  17. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  18. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  19. package/lib/components/CompoundButton/index.js.map +1 -1
  20. package/lib/components/CompoundButton/renderCompoundButton.js +1 -11
  21. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  22. package/lib/components/CompoundButton/useCompoundButton.js +3 -2
  23. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  24. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  25. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  26. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  27. package/lib/components/MenuButton/index.js.map +1 -1
  28. package/lib/components/MenuButton/renderMenuButton.js +1 -7
  29. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  30. package/lib/components/MenuButton/useMenuButton.js +2 -2
  31. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  32. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  33. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  34. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  35. package/lib/components/SplitButton/index.js.map +1 -1
  36. package/lib/components/SplitButton/renderSplitButton.js +1 -7
  37. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  38. package/lib/components/SplitButton/useSplitButton.js +1 -0
  39. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  40. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  41. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  42. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  43. package/lib/components/ToggleButton/index.js.map +1 -1
  44. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  45. package/lib/components/ToggleButton/useToggleButton.js +1 -0
  46. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  47. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  48. package/lib/contexts/ButtonContext.js +2 -4
  49. package/lib/contexts/ButtonContext.js.map +1 -1
  50. package/lib/contexts/index.js.map +1 -1
  51. package/lib/index.js.map +1 -1
  52. package/lib/utils/index.js.map +1 -1
  53. package/lib/utils/useToggleState.js.map +1 -1
  54. package/lib-commonjs/Button.js +5 -4
  55. package/lib-commonjs/Button.js.map +1 -1
  56. package/lib-commonjs/CompoundButton.js +5 -4
  57. package/lib-commonjs/CompoundButton.js.map +1 -1
  58. package/lib-commonjs/MenuButton.js +5 -4
  59. package/lib-commonjs/MenuButton.js.map +1 -1
  60. package/lib-commonjs/SplitButton.js +5 -4
  61. package/lib-commonjs/SplitButton.js.map +1 -1
  62. package/lib-commonjs/ToggleButton.js +5 -4
  63. package/lib-commonjs/ToggleButton.js.map +1 -1
  64. package/lib-commonjs/components/Button/Button.js +19 -21
  65. package/lib-commonjs/components/Button/Button.js.map +1 -1
  66. package/lib-commonjs/components/Button/Button.types.js +3 -2
  67. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  68. package/lib-commonjs/components/Button/index.js +17 -19
  69. package/lib-commonjs/components/Button/index.js.map +1 -1
  70. package/lib-commonjs/components/Button/renderButton.js +14 -26
  71. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  72. package/lib-commonjs/components/Button/useButton.js +40 -52
  73. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  74. package/lib-commonjs/components/Button/useButtonStyles.js +1129 -471
  75. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  76. package/lib-commonjs/components/CompoundButton/CompoundButton.js +19 -21
  77. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  78. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +3 -2
  79. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  80. package/lib-commonjs/components/CompoundButton/index.js +18 -20
  81. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  82. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +14 -30
  83. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  84. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +31 -36
  85. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  86. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +315 -184
  87. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  88. package/lib-commonjs/components/MenuButton/MenuButton.js +19 -22
  89. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  90. package/lib-commonjs/components/MenuButton/MenuButton.types.js +3 -2
  91. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  92. package/lib-commonjs/components/MenuButton/index.js +18 -20
  93. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  94. package/lib-commonjs/components/MenuButton/renderMenuButton.js +14 -26
  95. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  96. package/lib-commonjs/components/MenuButton/useMenuButton.js +34 -37
  97. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  98. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +166 -106
  99. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  100. package/lib-commonjs/components/SplitButton/SplitButton.js +19 -22
  101. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  102. package/lib-commonjs/components/SplitButton/SplitButton.types.js +3 -2
  103. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  104. package/lib-commonjs/components/SplitButton/index.js +18 -20
  105. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  106. package/lib-commonjs/components/SplitButton/renderSplitButton.js +13 -22
  107. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  108. package/lib-commonjs/components/SplitButton/useSplitButton.js +66 -79
  109. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  110. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +263 -106
  111. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  112. package/lib-commonjs/components/ToggleButton/ToggleButton.js +19 -21
  113. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  114. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +3 -2
  115. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  116. package/lib-commonjs/components/ToggleButton/index.js +18 -20
  117. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  118. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +6 -8
  119. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  120. package/lib-commonjs/components/ToggleButton/useToggleButton.js +14 -16
  121. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  122. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +897 -380
  123. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  124. package/lib-commonjs/contexts/ButtonContext.js +18 -19
  125. package/lib-commonjs/contexts/ButtonContext.js.map +1 -1
  126. package/lib-commonjs/contexts/index.js +5 -4
  127. package/lib-commonjs/contexts/index.js.map +1 -1
  128. package/lib-commonjs/index.js +47 -179
  129. package/lib-commonjs/index.js.map +1 -1
  130. package/lib-commonjs/utils/index.js +5 -4
  131. package/lib-commonjs/utils/index.js.map +1 -1
  132. package/lib-commonjs/utils/useToggleState.js +40 -40
  133. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  134. package/package.json +12 -11
  135. package/lib-amd/Button.js +0 -6
  136. package/lib-amd/Button.js.map +0 -1
  137. package/lib-amd/CompoundButton.js +0 -6
  138. package/lib-amd/CompoundButton.js.map +0 -1
  139. package/lib-amd/MenuButton.js +0 -6
  140. package/lib-amd/MenuButton.js.map +0 -1
  141. package/lib-amd/SplitButton.js +0 -6
  142. package/lib-amd/SplitButton.js.map +0 -1
  143. package/lib-amd/ToggleButton.js +0 -6
  144. package/lib-amd/ToggleButton.js.map +0 -1
  145. package/lib-amd/components/Button/Button.js +0 -18
  146. package/lib-amd/components/Button/Button.js.map +0 -1
  147. package/lib-amd/components/Button/Button.types.js +0 -5
  148. package/lib-amd/components/Button/Button.types.js.map +0 -1
  149. package/lib-amd/components/Button/index.js +0 -11
  150. package/lib-amd/components/Button/index.js.map +0 -1
  151. package/lib-amd/components/Button/renderButton.js +0 -18
  152. package/lib-amd/components/Button/renderButton.js.map +0 -1
  153. package/lib-amd/components/Button/useButton.js +0 -41
  154. package/lib-amd/components/Button/useButton.js.map +0 -1
  155. package/lib-amd/components/Button/useButtonStyles.js +0 -227
  156. package/lib-amd/components/Button/useButtonStyles.js.map +0 -1
  157. package/lib-amd/components/CompoundButton/CompoundButton.js +0 -18
  158. package/lib-amd/components/CompoundButton/CompoundButton.js.map +0 -1
  159. package/lib-amd/components/CompoundButton/CompoundButton.types.js +0 -5
  160. package/lib-amd/components/CompoundButton/CompoundButton.types.js.map +0 -1
  161. package/lib-amd/components/CompoundButton/index.js +0 -12
  162. package/lib-amd/components/CompoundButton/index.js.map +0 -1
  163. package/lib-amd/components/CompoundButton/renderCompoundButton.js +0 -20
  164. package/lib-amd/components/CompoundButton/renderCompoundButton.js.map +0 -1
  165. package/lib-amd/components/CompoundButton/useCompoundButton.js +0 -27
  166. package/lib-amd/components/CompoundButton/useCompoundButton.js.map +0 -1
  167. package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js +0 -216
  168. package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js.map +0 -1
  169. package/lib-amd/components/MenuButton/MenuButton.js +0 -19
  170. package/lib-amd/components/MenuButton/MenuButton.js.map +0 -1
  171. package/lib-amd/components/MenuButton/MenuButton.types.js +0 -5
  172. package/lib-amd/components/MenuButton/MenuButton.types.js.map +0 -1
  173. package/lib-amd/components/MenuButton/index.js +0 -12
  174. package/lib-amd/components/MenuButton/index.js.map +0 -1
  175. package/lib-amd/components/MenuButton/renderMenuButton.js +0 -18
  176. package/lib-amd/components/MenuButton/renderMenuButton.js.map +0 -1
  177. package/lib-amd/components/MenuButton/useMenuButton.js +0 -30
  178. package/lib-amd/components/MenuButton/useMenuButton.js.map +0 -1
  179. package/lib-amd/components/MenuButton/useMenuButtonStyles.js +0 -97
  180. package/lib-amd/components/MenuButton/useMenuButtonStyles.js.map +0 -1
  181. package/lib-amd/components/SplitButton/SplitButton.js +0 -19
  182. package/lib-amd/components/SplitButton/SplitButton.js.map +0 -1
  183. package/lib-amd/components/SplitButton/SplitButton.types.js +0 -5
  184. package/lib-amd/components/SplitButton/SplitButton.types.js.map +0 -1
  185. package/lib-amd/components/SplitButton/index.js +0 -12
  186. package/lib-amd/components/SplitButton/index.js.map +0 -1
  187. package/lib-amd/components/SplitButton/renderSplitButton.js +0 -16
  188. package/lib-amd/components/SplitButton/renderSplitButton.js.map +0 -1
  189. package/lib-amd/components/SplitButton/useSplitButton.js +0 -67
  190. package/lib-amd/components/SplitButton/useSplitButton.js.map +0 -1
  191. package/lib-amd/components/SplitButton/useSplitButtonStyles.js +0 -162
  192. package/lib-amd/components/SplitButton/useSplitButtonStyles.js.map +0 -1
  193. package/lib-amd/components/ToggleButton/ToggleButton.js +0 -18
  194. package/lib-amd/components/ToggleButton/ToggleButton.js.map +0 -1
  195. package/lib-amd/components/ToggleButton/ToggleButton.types.js +0 -5
  196. package/lib-amd/components/ToggleButton/ToggleButton.types.js.map +0 -1
  197. package/lib-amd/components/ToggleButton/index.js +0 -12
  198. package/lib-amd/components/ToggleButton/index.js.map +0 -1
  199. package/lib-amd/components/ToggleButton/renderToggleButton.js +0 -7
  200. package/lib-amd/components/ToggleButton/renderToggleButton.js.map +0 -1
  201. package/lib-amd/components/ToggleButton/useToggleButton.js +0 -17
  202. package/lib-amd/components/ToggleButton/useToggleButton.js.map +0 -1
  203. package/lib-amd/components/ToggleButton/useToggleButtonStyles.js +0 -87
  204. package/lib-amd/components/ToggleButton/useToggleButtonStyles.js.map +0 -1
  205. package/lib-amd/contexts/ButtonContext.js +0 -19
  206. package/lib-amd/contexts/ButtonContext.js.map +0 -1
  207. package/lib-amd/contexts/index.js +0 -6
  208. package/lib-amd/contexts/index.js.map +0 -1
  209. package/lib-amd/index.js +0 -34
  210. package/lib-amd/index.js.map +0 -1
  211. package/lib-amd/utils/index.js +0 -6
  212. package/lib-amd/utils/index.js.map +0 -1
  213. package/lib-amd/utils/useToggleState.js +0 -27
  214. package/lib-amd/utils/useToggleState.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["react_icons_1","require","react_tabster_1","react_theme_1","react_1","useButtonStyles_1","exports","toggleButtonClassNames","root","icon","useRootCheckedStyles","__styles","base","De3pzq","g2u3we","h3c5rm","B9xav0g","zhjwy3","sj55zd","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","D0sxk3","t6yez3","Jwef8y","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","Bi91k9c","iro3zm","b661bw","Bk6r4ia","B9zn80p","Bpld233","B2d53fq","highContrast","Bsw6fvg","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","Bbusuzp","ycbfsm","Bqrx1nm","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","ze5xyy","g2kj27","Bf756sw","Bow2dr7","Bvhedfk","Gye4lf","pc6evw","Btyszwp","B8jyv7h","l9kbep","By5cl00","abbn9y","Bw5jppy","B0tp99d","B55dcl7","G867l3","gdbnj","mxns5l","o3nasb","B7d2ofm","outline","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","primary","secondary","subtle","transparent","d","h","m","f","i","useRootDisabledStyles","useIconCheckedStyles","subtleOrTransparent","usePrimaryHighContrastStyles","disabled","useToggleButtonStyles_unstable","state","rootCheckedStyles","rootDisabledStyles","iconCheckedStyles","primaryHighContrastStyles","appearance","checked","disabledFocusable","className","mergeClasses","useButtonStyles_unstable"],"sources":["../src/packages/react-components/react-button/src/components/ToggleButton/useToggleButtonStyles.ts"],"sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ButtonSlots } from '../Button/Button.types';\nimport type { ToggleButtonState } from './ToggleButton.types';\n\nexport const toggleButtonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-ToggleButton',\n icon: 'fui-ToggleButton__icon',\n};\n\nconst useRootCheckedStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n color: tokens.colorNeutralForeground1Selected,\n\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n color: tokens.colorNeutralForeground1Hover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n color: tokens.colorNeutralForeground1Pressed,\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n\n ':hover': {\n backgroundColor: 'HighlightText',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n\n ':hover:active': {\n backgroundColor: 'HighlightText',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n\n ':focus': {\n ...shorthands.border('1px', 'solid', 'HighlightText'),\n outlineColor: 'Highlight',\n },\n },\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ...shorthands.borderWidth(tokens.strokeWidthThicker),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n\n ...createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\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 ':hover:active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Selected,\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Hover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Pressed,\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 ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n },\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 ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':hover: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 ':hover:active': {\n ...shorthands.borderColor('transparent'),\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n },\n },\n});\n\nconst useIconCheckedStyles = makeStyles({\n // Appearance variations\n subtleOrTransparent: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n});\n\nconst usePrimaryHighContrastStyles = makeStyles({\n // Do not use primary variant high contrast styles for toggle buttons\n // otherwise there isn't enough difference between on/off states\n base: {\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('ButtonBorder'),\n color: 'ButtonText',\n forcedColorAdjust: 'auto',\n },\n },\n\n disabled: {\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n\n ':focus': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n },\n});\n\nexport const useToggleButtonStyles_unstable = (state: ToggleButtonState): ToggleButtonState => {\n const rootCheckedStyles = useRootCheckedStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const iconCheckedStyles = useIconCheckedStyles();\n const primaryHighContrastStyles = usePrimaryHighContrastStyles();\n\n const { appearance, checked, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n toggleButtonClassNames.root,\n\n // Primary high contrast styles\n appearance === 'primary' && primaryHighContrastStyles.base,\n appearance === 'primary' && (disabled || disabledFocusable) && primaryHighContrastStyles.disabled,\n\n // Checked styles\n checked && rootCheckedStyles.base,\n checked && rootCheckedStyles.highContrast,\n appearance && checked && rootCheckedStyles[appearance],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base,\n appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n toggleButtonClassNames.icon,\n (appearance === 'subtle' || appearance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E,MAAM;IAAEQ,UAAU;IAAEC,OAAO;IAAER,QAAQ;IAAES;EAAiB,CAAE,GAAGP,KAAK;EAElEA,KAAK,CAACpF,IAAI,CAAC4F,SAAS,GAAGhG,OAAA,CAAAiG,YAAY,CACjC/F,OAAA,CAAAC,sBAAsB,CAACC,IAAI;EAE3B;EACAyF,UAAU,KAAK,SAAS,IAAID,yBAAyB,CAACpF,IAAI,EAC1DqF,UAAU,KAAK,SAAS,KAAKP,QAAQ,IAAIS,iBAAiB,CAAC,IAAIH,yBAAyB,CAACN,QAAQ;EAEjG;EACAQ,OAAO,IAAIL,iBAAiB,CAACjF,IAAI,EACjCsF,OAAO,IAAIL,iBAAiB,CAACxD,YAAY,EACzC4D,UAAU,IAAIC,OAAO,IAAIL,iBAAiB,CAACI,UAAU,CAAC;EAEtD;EACA,CAACP,QAAQ,IAAIS,iBAAiB,KAAKL,kBAAkB,CAAClF,IAAI,EAC1DqF,UAAU,KAAKP,QAAQ,IAAIS,iBAAiB,CAAC,IAAIL,kBAAkB,CAACG,UAAU,CAAC;EAE/E;EACAL,KAAK,CAACpF,IAAI,CAAC4F,SAAS,CACrB;EAED,IAAIR,KAAK,CAACnF,IAAI,EAAE;IACdmF,KAAK,CAACnF,IAAI,CAAC2F,SAAS,GAAGhG,OAAA,CAAAiG,YAAY,CACjC/F,OAAA,CAAAC,sBAAsB,CAACE,IAAI,EAC3B,CAACwF,UAAU,KAAK,QAAQ,IAAIA,UAAU,KAAK,aAAa,KAAKF,iBAAiB,CAACP,mBAAmB,EAClGI,KAAK,CAACnF,IAAI,CAAC2F,SAAS,CACrB;;EAGH/F,iBAAA,CAAAiG,wBAAwB,CAACV,KAAK,CAAC;EAE/B,OAAOA,KAAK;AACd,CAAC;AAvCYtF,OAAA,CAAAqF,8BAA8B,GAAAA,8BAAA"}
1
+ {"version":3,"sources":["../../../lib/components/ToggleButton/useToggleButtonStyles.js"],"sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, mergeClasses, __styles } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nexport const toggleButtonClassNames = {\n root: 'fui-ToggleButton',\n icon: 'fui-ToggleButton__icon'\n};\nconst useRootCheckedStyles = /*#__PURE__*/__styles({\n base: {\n De3pzq: \"f1nfm20t\",\n g2u3we: \"fj3muxo\",\n h3c5rm: [\"f1akhkt\", \"f1lxtadh\"],\n B9xav0g: \"f1aperda\",\n zhjwy3: [\"f1lxtadh\", \"f1akhkt\"],\n sj55zd: \"f14nttnl\",\n B4j52fo: \"f192inf7\",\n Bekrc4i: [\"f5tn483\", \"f1ojsxk5\"],\n Bn0qgzm: \"f1vxd6vx\",\n ibv6hh: [\"f1ojsxk5\", \"f5tn483\"],\n D0sxk3: \"fxoiby5\",\n t6yez3: \"f15q0o9g\",\n Jwef8y: \"f1knas48\",\n Bgoe8wy: \"fvcxoqz\",\n Bwzppfd: [\"f1ub3y4t\", \"f1m52nbi\"],\n oetu4i: \"f1xlaoq0\",\n gg5e9n: [\"f1m52nbi\", \"f1ub3y4t\"],\n Bi91k9c: \"feu1g3u\",\n iro3zm: \"f141de4g\",\n b661bw: \"f11v6sdu\",\n Bk6r4ia: [\"f9yn8i4\", \"f1ajwf28\"],\n B9zn80p: \"f1uwu36w\",\n Bpld233: [\"f1ajwf28\", \"f9yn8i4\"],\n B2d53fq: \"f9olfzr\"\n },\n highContrast: {\n Bsw6fvg: \"f1rirnrt\",\n Bjwas2f: \"f132fbg1\",\n Bn1d65q: [\"f1ene5x0\", \"fzbc999\"],\n Bxeuatn: \"f6jgcol\",\n n51gp8: [\"fzbc999\", \"f1ene5x0\"],\n Bbusuzp: \"f1lkg8j3\",\n ycbfsm: \"fkc42ay\",\n Bqrx1nm: \"fq7113v\",\n pgvf35: \"ff1wgvm\",\n Bh7lczh: [\"fiob0tu\", \"f1x4h75k\"],\n dpv3f4: \"f1j6scgf\",\n Bpnjhaq: [\"f1x4h75k\", \"fiob0tu\"],\n ze5xyy: \"f4xjyn1\",\n g2kj27: \"fbgcvur\",\n Bf756sw: \"f1ks1yx8\",\n Bow2dr7: [\"f1o6qegi\", \"fmxjhhp\"],\n Bvhedfk: \"fcnxywj\",\n Gye4lf: [\"fmxjhhp\", \"f1o6qegi\"],\n pc6evw: \"f9ddjv3\",\n Btyszwp: \"f1j4zkqc\",\n B8jyv7h: [\"f1ug3svw\", \"f10xfdm4\"],\n l9kbep: \"f4xlnbu\",\n By5cl00: [\"f10xfdm4\", \"f1ug3svw\"],\n abbn9y: \"f1jhcl7q\",\n Bw5jppy: [\"fokje0w\", \"fpctg2v\"],\n B0tp99d: \"f1yfuj62\",\n B55dcl7: [\"fpctg2v\", \"fokje0w\"],\n G867l3: \"fk75khc\",\n gdbnj: [\"f90nk7n\", \"f16eiqta\"],\n mxns5l: \"fnz8tm1\",\n o3nasb: [\"f16eiqta\", \"f90nk7n\"],\n B7d2ofm: \"fkom8lu\"\n },\n outline: {\n De3pzq: \"f1q9pm1r\",\n g2u3we: \"fj3muxo\",\n h3c5rm: [\"f1akhkt\", \"f1lxtadh\"],\n B9xav0g: \"f1aperda\",\n zhjwy3: [\"f1lxtadh\", \"f1akhkt\"],\n B4j52fo: \"fgx37oo\",\n Bekrc4i: [\"f130t4y6\", \"f1efpmoh\"],\n Bn0qgzm: \"fv51ejd\",\n ibv6hh: [\"f1efpmoh\", \"f130t4y6\"],\n Jwef8y: \"fjxutwb\",\n iro3zm: \"fwiml72\",\n Brovlpu: \"ftqa4ok\",\n B486eqv: \"f2hkw1w\",\n B8q5s1w: \"fcaw57c\",\n Bci5o5g: [\"fpwd27e\", \"f1999bjr\"],\n n8qw10: \"f1hi52o4\",\n Bdrgwmp: [\"f1999bjr\", \"fpwd27e\"]\n },\n primary: {\n De3pzq: \"f8w4g0q\",\n g2u3we: \"f1p3nwhy\",\n h3c5rm: [\"f11589ue\", \"f1pdflbu\"],\n B9xav0g: \"f1q5o8ev\",\n zhjwy3: [\"f1pdflbu\", \"f11589ue\"],\n sj55zd: \"f1phragk\",\n Jwef8y: \"f15wkkf3\",\n Bgoe8wy: \"f1s2uweq\",\n Bwzppfd: [\"fr80ssc\", \"fecsdlb\"],\n oetu4i: \"f1ukrpxl\",\n gg5e9n: [\"fecsdlb\", \"fr80ssc\"],\n Bi91k9c: \"f1rq72xc\",\n iro3zm: \"fnp9lpt\",\n b661bw: \"f1h0usnq\",\n Bk6r4ia: [\"fs4ktlq\", \"fx2bmrt\"],\n B9zn80p: \"f16h9ulv\",\n Bpld233: [\"fx2bmrt\", \"fs4ktlq\"],\n B2d53fq: \"f1d6v5y2\"\n },\n secondary: {},\n subtle: {\n De3pzq: \"fq5gl1p\",\n g2u3we: \"f1p3nwhy\",\n h3c5rm: [\"f11589ue\", \"f1pdflbu\"],\n B9xav0g: \"f1q5o8ev\",\n zhjwy3: [\"f1pdflbu\", \"f11589ue\"],\n sj55zd: \"f1eryozh\",\n Jwef8y: \"f1t94bn6\",\n Bgoe8wy: \"f1s2uweq\",\n Bwzppfd: [\"fr80ssc\", \"fecsdlb\"],\n oetu4i: \"f1ukrpxl\",\n gg5e9n: [\"fecsdlb\", \"fr80ssc\"],\n Bi91k9c: \"fnwyq0v\",\n iro3zm: \"fsv2rcd\",\n b661bw: \"f1h0usnq\",\n Bk6r4ia: [\"fs4ktlq\", \"fx2bmrt\"],\n B9zn80p: \"f16h9ulv\",\n Bpld233: [\"fx2bmrt\", \"fs4ktlq\"],\n B2d53fq: \"f1omzyqd\"\n },\n transparent: {\n De3pzq: \"f1q9pm1r\",\n g2u3we: \"f1p3nwhy\",\n h3c5rm: [\"f11589ue\", \"f1pdflbu\"],\n B9xav0g: \"f1q5o8ev\",\n zhjwy3: [\"f1pdflbu\", \"f11589ue\"],\n sj55zd: \"f1qj7y59\",\n Jwef8y: \"fjxutwb\",\n Bgoe8wy: \"f1s2uweq\",\n Bwzppfd: [\"fr80ssc\", \"fecsdlb\"],\n oetu4i: \"f1ukrpxl\",\n gg5e9n: [\"fecsdlb\", \"fr80ssc\"],\n Bi91k9c: \"f139oj5f\",\n iro3zm: \"fwiml72\",\n b661bw: \"f1h0usnq\",\n Bk6r4ia: [\"fs4ktlq\", \"fx2bmrt\"],\n B9zn80p: \"f16h9ulv\",\n Bpld233: [\"fx2bmrt\", \"fs4ktlq\"],\n B2d53fq: \"f1fg1p5m\"\n }\n}, {\n 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);}\", \".f14nttnl{color:var(--colorNeutralForeground1Selected);}\", \".f192inf7{border-top-width:var(--strokeWidthThin);}\", \".f5tn483{border-right-width:var(--strokeWidthThin);}\", \".f1ojsxk5{border-left-width:var(--strokeWidthThin);}\", \".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}\", \".fxoiby5 .fui-Icon-filled{display:inline;}\", \".f15q0o9g .fui-Icon-regular{display:none;}\", \".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}\", \".fgx37oo{border-top-width:var(--strokeWidthThicker);}\", \".f130t4y6{border-right-width:var(--strokeWidthThicker);}\", \".f1efpmoh{border-left-width:var(--strokeWidthThicker);}\", \".fv51ejd{border-bottom-width:var(--strokeWidthThicker);}\", \".fcaw57c[data-fui-focus-visible]{border-top-color:var(--colorNeutralStroke1);}\", \".fpwd27e[data-fui-focus-visible]{border-right-color:var(--colorNeutralStroke1);}\", \".f1999bjr[data-fui-focus-visible]{border-left-color:var(--colorNeutralStroke1);}\", \".f1hi52o4[data-fui-focus-visible]{border-bottom-color:var(--colorNeutralStroke1);}\", \".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);}\", \".f1eryozh{color:var(--colorNeutralForeground2Selected);}\", \".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}\"],\n 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);}\", \".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}\", \".f141de4g:hover:active{background-color:var(--colorNeutralBackground1Pressed);}\", \".f11v6sdu:hover:active{border-top-color:var(--colorNeutralStroke1Pressed);}\", \".f9yn8i4:hover:active{border-right-color:var(--colorNeutralStroke1Pressed);}\", \".f1ajwf28:hover:active{border-left-color:var(--colorNeutralStroke1Pressed);}\", \".f1uwu36w:hover:active{border-bottom-color:var(--colorNeutralStroke1Pressed);}\", \".f9olfzr:hover:active{color:var(--colorNeutralForeground1Pressed);}\", \".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}\", \".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}\", \".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);}\", \".fnp9lpt:hover:active{background-color:var(--colorBrandBackgroundPressed);}\", \".f1h0usnq:hover:active{border-top-color:transparent;}\", \".fs4ktlq:hover:active{border-right-color:transparent;}\", \".fx2bmrt:hover:active{border-left-color:transparent;}\", \".f16h9ulv:hover:active{border-bottom-color:transparent;}\", \".f1d6v5y2:hover:active{color:var(--colorNeutralForegroundOnBrand);}\", \".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}\", \".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}\", \".fsv2rcd:hover:active{background-color:var(--colorSubtleBackgroundPressed);}\", \".f1omzyqd:hover:active{color:var(--colorNeutralForeground2Pressed);}\", \".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}\", \".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}\"],\n m: [[\"@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f132fbg1{border-top-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1ene5x0{border-right-color:Highlight;}.fzbc999{border-left-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f6jgcol{border-bottom-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fzbc999{border-left-color:Highlight;}.f1ene5x0{border-right-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1lkg8j3{color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.ff1wgvm:hover{border-top-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fiob0tu:hover{border-right-color:Highlight;}.f1x4h75k:hover{border-left-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1j6scgf:hover{border-bottom-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1x4h75k:hover{border-left-color:Highlight;}.fiob0tu:hover{border-right-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f4xjyn1:hover{color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fbgcvur:hover:active{background-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1ks1yx8:hover:active{border-top-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1o6qegi:hover:active{border-right-color:Highlight;}.fmxjhhp:hover:active{border-left-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fcnxywj:hover:active{border-bottom-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fmxjhhp:hover:active{border-left-color:Highlight;}.f1o6qegi:hover:active{border-right-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f9ddjv3:hover:active{color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1j4zkqc:focus{border-top-width:1px;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1ug3svw:focus{border-right-width:1px;}.f10xfdm4:focus{border-left-width:1px;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f4xlnbu:focus{border-bottom-width:1px;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f10xfdm4:focus{border-left-width:1px;}.f1ug3svw:focus{border-right-width:1px;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1jhcl7q:focus{border-top-style:solid;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fokje0w:focus{border-right-style:solid;}.fpctg2v:focus{border-left-style:solid;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1yfuj62:focus{border-bottom-style:solid;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fpctg2v:focus{border-left-style:solid;}.fokje0w:focus{border-right-style:solid;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fk75khc:focus{border-top-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f90nk7n:focus{border-right-color:HighlightText;}.f16eiqta:focus{border-left-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fnz8tm1:focus{border-bottom-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f16eiqta:focus{border-left-color:HighlightText;}.f90nk7n:focus{border-right-color:HighlightText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fkom8lu:focus{outline-color:Highlight;}}\", {\n m: \"(forced-colors: active)\"\n }]],\n f: [\".ftqa4ok:focus{outline-style:none;}\"],\n i: [\".f2hkw1w:focus-visible{outline-style:none;}\"]\n});\nconst useRootDisabledStyles = /*#__PURE__*/__styles({\n base: {\n De3pzq: \"f1bg9a2p\",\n g2u3we: \"f1jj8ep1\",\n h3c5rm: [\"f15xbau\", \"fy0fskl\"],\n B9xav0g: \"f4ikngz\",\n zhjwy3: [\"fy0fskl\", \"f15xbau\"],\n sj55zd: \"f1s2aq7o\",\n Jwef8y: \"f1falr9n\",\n Bgoe8wy: \"f12mpcsy\",\n Bwzppfd: [\"f1gwvigk\", \"f18rmfxp\"],\n oetu4i: \"f1jnshp0\",\n gg5e9n: [\"f18rmfxp\", \"f1gwvigk\"],\n Bi91k9c: \"fvgxktp\",\n iro3zm: \"f1t6o4dc\",\n b661bw: \"f10ztigi\",\n Bk6r4ia: [\"f1ft5sdu\", \"f1gzf82w\"],\n B9zn80p: \"f12zbtn2\",\n Bpld233: [\"f1gzf82w\", \"f1ft5sdu\"],\n B2d53fq: \"fcvwxyo\"\n },\n outline: {},\n primary: {\n g2u3we: \"f1p3nwhy\",\n h3c5rm: [\"f11589ue\", \"f1pdflbu\"],\n B9xav0g: \"f1q5o8ev\",\n zhjwy3: [\"f1pdflbu\", \"f11589ue\"],\n Bgoe8wy: \"f1s2uweq\",\n Bwzppfd: [\"fr80ssc\", \"fecsdlb\"],\n oetu4i: \"f1ukrpxl\",\n gg5e9n: [\"fecsdlb\", \"fr80ssc\"],\n b661bw: \"f1h0usnq\",\n Bk6r4ia: [\"fs4ktlq\", \"fx2bmrt\"],\n B9zn80p: \"f16h9ulv\",\n Bpld233: [\"fx2bmrt\", \"fs4ktlq\"]\n },\n secondary: {},\n subtle: {\n De3pzq: \"f1c21dwh\",\n g2u3we: \"f1p3nwhy\",\n h3c5rm: [\"f11589ue\", \"f1pdflbu\"],\n B9xav0g: \"f1q5o8ev\",\n zhjwy3: [\"f1pdflbu\", \"f11589ue\"],\n Jwef8y: \"fjxutwb\",\n Bgoe8wy: \"f1s2uweq\",\n Bwzppfd: [\"fr80ssc\", \"fecsdlb\"],\n oetu4i: \"f1ukrpxl\",\n gg5e9n: [\"fecsdlb\", \"fr80ssc\"],\n iro3zm: \"fwiml72\",\n b661bw: \"f1h0usnq\",\n Bk6r4ia: [\"fs4ktlq\", \"fx2bmrt\"],\n B9zn80p: \"f16h9ulv\",\n Bpld233: [\"fx2bmrt\", \"fs4ktlq\"]\n },\n transparent: {\n De3pzq: \"f1c21dwh\",\n g2u3we: \"f1p3nwhy\",\n h3c5rm: [\"f11589ue\", \"f1pdflbu\"],\n B9xav0g: \"f1q5o8ev\",\n zhjwy3: [\"f1pdflbu\", \"f11589ue\"],\n Jwef8y: \"fjxutwb\",\n Bgoe8wy: \"f1s2uweq\",\n Bwzppfd: [\"fr80ssc\", \"fecsdlb\"],\n oetu4i: \"f1ukrpxl\",\n gg5e9n: [\"fecsdlb\", \"fr80ssc\"],\n iro3zm: \"fwiml72\",\n b661bw: \"f1h0usnq\",\n Bk6r4ia: [\"fs4ktlq\", \"fx2bmrt\"],\n B9zn80p: \"f16h9ulv\",\n Bpld233: [\"fx2bmrt\", \"fs4ktlq\"]\n }\n}, {\n 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;}\", \".f1c21dwh{background-color:var(--colorTransparentBackground);}\"],\n 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);}\", \".f1t6o4dc:hover:active{background-color:var(--colorNeutralBackgroundDisabled);}\", \".f10ztigi:hover:active{border-top-color:var(--colorNeutralStrokeDisabled);}\", \".f1ft5sdu:hover:active{border-right-color:var(--colorNeutralStrokeDisabled);}\", \".f1gzf82w:hover:active{border-left-color:var(--colorNeutralStrokeDisabled);}\", \".f12zbtn2:hover:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}\", \".fcvwxyo:hover:active{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;}\", \".f1h0usnq:hover:active{border-top-color:transparent;}\", \".fs4ktlq:hover:active{border-right-color:transparent;}\", \".fx2bmrt:hover:active{border-left-color:transparent;}\", \".f16h9ulv:hover:active{border-bottom-color:transparent;}\", \".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}\", \".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}\"]\n});\nconst useIconCheckedStyles = /*#__PURE__*/__styles({\n subtleOrTransparent: {\n sj55zd: \"f1qj7y59\"\n }\n}, {\n d: [\".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}\"]\n});\nconst usePrimaryHighContrastStyles = /*#__PURE__*/__styles({\n base: {\n Bsw6fvg: \"f4lkoma\",\n Bjwas2f: \"f1bauw5b\",\n Bn1d65q: [\"fbpknfk\", \"fedl69w\"],\n Bxeuatn: \"f15s25nd\",\n n51gp8: [\"fedl69w\", \"fbpknfk\"],\n Bbusuzp: \"f1e4kh5\",\n ycbfsm: \"fg4l7m0\"\n },\n disabled: {\n Bjwas2f: \"fg455y9\",\n Bn1d65q: [\"f1rvyvqg\", \"f14g86mu\"],\n Bxeuatn: \"f1cwzwz\",\n n51gp8: [\"f14g86mu\", \"f1rvyvqg\"],\n Bbusuzp: \"f1dcs8yz\",\n G867l3: \"fjwq6ea\",\n gdbnj: [\"f1lr3nhc\", \"f1mbxvi6\"],\n mxns5l: \"fn5gmvv\",\n o3nasb: [\"f1mbxvi6\", \"f1lr3nhc\"]\n }\n}, {\n m: [[\"@media (forced-colors: active){.f4lkoma{background-color:ButtonFace;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1bauw5b{border-top-color:ButtonBorder;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fbpknfk{border-right-color:ButtonBorder;}.fedl69w{border-left-color:ButtonBorder;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f15s25nd{border-bottom-color:ButtonBorder;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fedl69w{border-left-color:ButtonBorder;}.fbpknfk{border-right-color:ButtonBorder;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1e4kh5{color:ButtonText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fg4l7m0{forced-color-adjust:auto;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1rvyvqg{border-right-color:GrayText;}.f14g86mu{border-left-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fjwq6ea:focus{border-top-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1lr3nhc:focus{border-right-color:GrayText;}.f1mbxvi6:focus{border-left-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.fn5gmvv:focus{border-bottom-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1mbxvi6:focus{border-left-color:GrayText;}.f1lr3nhc:focus{border-right-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\nexport const useToggleButtonStyles_unstable = state => {\n const rootCheckedStyles = useRootCheckedStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const iconCheckedStyles = useIconCheckedStyles();\n const primaryHighContrastStyles = usePrimaryHighContrastStyles();\n const {\n appearance,\n checked,\n disabled,\n disabledFocusable\n } = state;\n state.root.className = mergeClasses(toggleButtonClassNames.root,\n // Primary high contrast styles\n appearance === 'primary' && primaryHighContrastStyles.base, appearance === 'primary' && (disabled || disabledFocusable) && primaryHighContrastStyles.disabled,\n // Checked styles\n checked && rootCheckedStyles.base, checked && rootCheckedStyles.highContrast, appearance && checked && rootCheckedStyles[appearance],\n // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base, appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],\n // User provided class name\n state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(toggleButtonClassNames.icon, (appearance === 'subtle' || appearance === 'transparent') && iconCheckedStyles.subtleOrTransparent, state.icon.className);\n }\n useButtonStyles_unstable(state);\n return state;\n};\n//# sourceMappingURL=useToggleButtonStyles.js.map"],"names":["toggleButtonClassNames","useToggleButtonStyles_unstable","root","icon","useRootCheckedStyles","__styles","base","De3pzq","g2u3we","h3c5rm","B9xav0g","zhjwy3","sj55zd","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","D0sxk3","t6yez3","Jwef8y","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","Bi91k9c","iro3zm","b661bw","Bk6r4ia","B9zn80p","Bpld233","B2d53fq","highContrast","Bsw6fvg","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","Bbusuzp","ycbfsm","Bqrx1nm","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","ze5xyy","g2kj27","Bf756sw","Bow2dr7","Bvhedfk","Gye4lf","pc6evw","Btyszwp","B8jyv7h","l9kbep","By5cl00","abbn9y","Bw5jppy","B0tp99d","B55dcl7","G867l3","gdbnj","mxns5l","o3nasb","B7d2ofm","outline","Brovlpu","B486eqv","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","primary","secondary","subtle","transparent","d","h","m","f","i","useRootDisabledStyles","useIconCheckedStyles","subtleOrTransparent","usePrimaryHighContrastStyles","disabled","state","rootCheckedStyles","rootDisabledStyles","iconCheckedStyles","primaryHighContrastStyles","appearance","checked","disabledFocusable","className","mergeClasses","useButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAKaA,sBAAsB,MAAtBA;IAkWAC,8BAA8B,MAA9BA;;uBApWsC;iCACV;AAClC,MAAMD,yBAAyB;IACpCE,MAAM;IACNC,MAAM;AACR;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACjDC,MAAM;QACJC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,SAAS;QACTC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAW;QACjCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;IACX;IACAC,cAAc;QACZC,SAAS;QACTC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;YAAC;YAAW;SAAW;QAChCC,QAAQ;QACRC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,QAAQ;QACRC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAW;QACjCC,QAAQ;QACRC,SAAS;YAAC;YAAY;SAAW;QACjCC,QAAQ;QACRC,SAAS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MAAMnF,IAAI,CAAC2F,SAAS;IACpB,IAAIR,MAAMlF,IAAI,EAAE;QACdkF,MAAMlF,IAAI,CAAC0F,SAAS,GAAGC,IAAAA,mBAAY,EAAC9F,uBAAuBG,IAAI,EAAE,AAACuF,CAAAA,eAAe,YAAYA,eAAe,aAAY,KAAMF,kBAAkBN,mBAAmB,EAAEG,MAAMlF,IAAI,CAAC0F,SAAS;IAC3L,CAAC;IACDE,IAAAA,yCAAwB,EAACV;IACzB,OAAOA;AACT,GACA,iDAAiD"}
@@ -1,24 +1,23 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ ButtonContextProvider: ()=>ButtonContextProvider,
13
+ useButtonContext: ()=>useButtonContext
5
14
  });
6
- exports.useButtonContext = exports.ButtonContextProvider = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const buttonContext = /*#__PURE__*/React.createContext(undefined);
15
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
16
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
17
+ const buttonContext = /*#__PURE__*/ _react.createContext(undefined);
9
18
  const buttonContextDefaultValue = {};
10
- /**
11
- * @internal
12
- * Internal context provider used to update default values between internal components
13
- */
14
- exports.ButtonContextProvider = buttonContext.Provider;
15
- /**
16
- * @internal
17
- * Internal context hook used to update default values between internal components
18
- */
19
- const useButtonContext = () => {
20
- var _a;
21
- return (_a = React.useContext(buttonContext)) !== null && _a !== void 0 ? _a : buttonContextDefaultValue;
22
- };
23
- exports.useButtonContext = useButtonContext;
19
+ const ButtonContextProvider = buttonContext.Provider;
20
+ var _React_useContext;
21
+ const useButtonContext = ()=>(_React_useContext = _react.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue; //# sourceMappingURL=ButtonContext.js.map
22
+
24
23
  //# sourceMappingURL=ButtonContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","buttonContext","createContext","undefined","buttonContextDefaultValue","exports","ButtonContextProvider","Provider","useButtonContext","_a","useContext"],"sources":["../src/packages/react-components/react-button/src/contexts/ButtonContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { ButtonSize } from '../components/Button/Button.types';\n\nconst buttonContext = React.createContext<ButtonContextValue | undefined>(undefined);\n\n/**\n * @internal\n * Internal context value used to update default values between internal components\n */\nexport interface ButtonContextValue {\n size?: ButtonSize;\n}\n\nconst buttonContextDefaultValue: ButtonContextValue = {};\n\n/**\n * @internal\n * Internal context provider used to update default values between internal components\n */\nexport const ButtonContextProvider = buttonContext.Provider;\n\n/**\n * @internal\n * Internal context hook used to update default values between internal components\n */\nexport const useButtonContext = () => React.useContext(buttonContext) ?? buttonContextDefaultValue;\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAGA,MAAMC,aAAa,gBAAGF,KAAK,CAACG,aAAa,CAAiCC,SAAS,CAAC;AAUpF,MAAMC,yBAAyB,GAAuB,EAAE;AAExD;;;;AAIaC,OAAA,CAAAC,qBAAqB,GAAGL,aAAa,CAACM,QAAQ;AAE3D;;;;AAIO,MAAMC,gBAAgB,GAAGA,CAAA,KAAK;EAAA,IAAAC,EAAA;EAAC,QAAAA,EAAA,GAAAV,KAAK,CAACW,UAAU,CAACT,aAAa,CAAC,cAAAQ,EAAA,cAAAA,EAAA,GAAIL,yBAAyB;AAAA;AAArFC,OAAA,CAAAG,gBAAgB,GAAAA,gBAAA"}
1
+ {"version":3,"sources":["../../lib/contexts/ButtonContext.js"],"sourcesContent":["import * as React from 'react';\nconst buttonContext = /*#__PURE__*/React.createContext(undefined);\nconst buttonContextDefaultValue = {};\n/**\n * @internal\n * Internal context provider used to update default values between internal components\n */\nexport const ButtonContextProvider = buttonContext.Provider;\nvar _React_useContext;\n/**\n * @internal\n * Internal context hook used to update default values between internal components\n */\nexport const useButtonContext = () => (_React_useContext = React.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;\n//# sourceMappingURL=ButtonContext.js.map"],"names":["ButtonContextProvider","useButtonContext","buttonContext","React","createContext","undefined","buttonContextDefaultValue","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAOaA,qBAAqB,MAArBA;IAMAC,gBAAgB,MAAhBA;;;6DAbU;AACvB,MAAMC,gBAAgB,WAAW,GAAEC,OAAMC,aAAa,CAACC;AACvD,MAAMC,4BAA4B,CAAC;AAK5B,MAAMN,wBAAwBE,cAAcK,QAAQ;AAC3D,IAAIC;AAKG,MAAMP,mBAAmB,IAAM,AAACO,CAAAA,oBAAoBL,OAAMM,UAAU,CAACP,cAAa,MAAO,IAAI,IAAIM,sBAAsB,KAAK,IAAIA,oBAAoBF,yBAAyB,EACpL,yCAAyC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./ButtonContext"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./ButtonContext"), exports);
7
+ //# sourceMappingURL=index.js.map
8
+
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-button/src/contexts/index.ts"],"sourcesContent":["export * from './ButtonContext';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../lib/contexts/index.js"],"sourcesContent":["export * from './ButtonContext';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
@@ -1,182 +1,50 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useButtonContext = exports.ButtonContextProvider = exports.useToggleState = exports.useToggleButton_unstable = exports.useToggleButtonStyles_unstable = exports.toggleButtonClassNames = exports.renderToggleButton_unstable = exports.ToggleButton = exports.useSplitButton_unstable = exports.useSplitButtonStyles_unstable = exports.splitButtonClassNames = exports.renderSplitButton_unstable = exports.SplitButton = exports.useMenuButton_unstable = exports.useMenuButtonStyles_unstable = exports.renderMenuButton_unstable = exports.menuButtonClassNames = exports.MenuButton = exports.useCompoundButton_unstable = exports.useCompoundButtonStyles_unstable = exports.renderCompoundButton_unstable = exports.compoundButtonClassNames = exports.CompoundButton = exports.useButton_unstable = exports.useButtonStyles_unstable = exports.renderButton_unstable = exports.buttonClassNames = exports.Button = void 0;
7
- var Button_1 = /*#__PURE__*/require("./Button");
8
- Object.defineProperty(exports, "Button", {
9
- enumerable: true,
10
- get: function () {
11
- return Button_1.Button;
12
- }
13
- });
14
- Object.defineProperty(exports, "buttonClassNames", {
15
- enumerable: true,
16
- get: function () {
17
- return Button_1.buttonClassNames;
18
- }
19
- });
20
- Object.defineProperty(exports, "renderButton_unstable", {
21
- enumerable: true,
22
- get: function () {
23
- return Button_1.renderButton_unstable;
24
- }
25
- });
26
- Object.defineProperty(exports, "useButtonStyles_unstable", {
27
- enumerable: true,
28
- get: function () {
29
- return Button_1.useButtonStyles_unstable;
30
- }
31
- });
32
- Object.defineProperty(exports, "useButton_unstable", {
33
- enumerable: true,
34
- get: function () {
35
- return Button_1.useButton_unstable;
36
- }
37
- });
38
- var CompoundButton_1 = /*#__PURE__*/require("./CompoundButton");
39
- Object.defineProperty(exports, "CompoundButton", {
40
- enumerable: true,
41
- get: function () {
42
- return CompoundButton_1.CompoundButton;
43
- }
44
- });
45
- Object.defineProperty(exports, "compoundButtonClassNames", {
46
- enumerable: true,
47
- get: function () {
48
- return CompoundButton_1.compoundButtonClassNames;
49
- }
50
- });
51
- Object.defineProperty(exports, "renderCompoundButton_unstable", {
52
- enumerable: true,
53
- get: function () {
54
- return CompoundButton_1.renderCompoundButton_unstable;
55
- }
56
- });
57
- Object.defineProperty(exports, "useCompoundButtonStyles_unstable", {
58
- enumerable: true,
59
- get: function () {
60
- return CompoundButton_1.useCompoundButtonStyles_unstable;
61
- }
62
- });
63
- Object.defineProperty(exports, "useCompoundButton_unstable", {
64
- enumerable: true,
65
- get: function () {
66
- return CompoundButton_1.useCompoundButton_unstable;
67
- }
68
- });
69
- var MenuButton_1 = /*#__PURE__*/require("./MenuButton");
70
- Object.defineProperty(exports, "MenuButton", {
71
- enumerable: true,
72
- get: function () {
73
- return MenuButton_1.MenuButton;
74
- }
75
- });
76
- Object.defineProperty(exports, "menuButtonClassNames", {
77
- enumerable: true,
78
- get: function () {
79
- return MenuButton_1.menuButtonClassNames;
80
- }
81
- });
82
- Object.defineProperty(exports, "renderMenuButton_unstable", {
83
- enumerable: true,
84
- get: function () {
85
- return MenuButton_1.renderMenuButton_unstable;
86
- }
87
- });
88
- Object.defineProperty(exports, "useMenuButtonStyles_unstable", {
89
- enumerable: true,
90
- get: function () {
91
- return MenuButton_1.useMenuButtonStyles_unstable;
92
- }
93
- });
94
- Object.defineProperty(exports, "useMenuButton_unstable", {
95
- enumerable: true,
96
- get: function () {
97
- return MenuButton_1.useMenuButton_unstable;
98
- }
99
- });
100
- var SplitButton_1 = /*#__PURE__*/require("./SplitButton");
101
- Object.defineProperty(exports, "SplitButton", {
102
- enumerable: true,
103
- get: function () {
104
- return SplitButton_1.SplitButton;
105
- }
106
- });
107
- Object.defineProperty(exports, "renderSplitButton_unstable", {
108
- enumerable: true,
109
- get: function () {
110
- return SplitButton_1.renderSplitButton_unstable;
111
- }
112
- });
113
- Object.defineProperty(exports, "splitButtonClassNames", {
114
- enumerable: true,
115
- get: function () {
116
- return SplitButton_1.splitButtonClassNames;
117
- }
118
- });
119
- Object.defineProperty(exports, "useSplitButtonStyles_unstable", {
120
- enumerable: true,
121
- get: function () {
122
- return SplitButton_1.useSplitButtonStyles_unstable;
123
- }
124
- });
125
- Object.defineProperty(exports, "useSplitButton_unstable", {
126
- enumerable: true,
127
- get: function () {
128
- return SplitButton_1.useSplitButton_unstable;
129
- }
130
- });
131
- var ToggleButton_1 = /*#__PURE__*/require("./ToggleButton");
132
- Object.defineProperty(exports, "ToggleButton", {
133
- enumerable: true,
134
- get: function () {
135
- return ToggleButton_1.ToggleButton;
136
- }
137
- });
138
- Object.defineProperty(exports, "renderToggleButton_unstable", {
139
- enumerable: true,
140
- get: function () {
141
- return ToggleButton_1.renderToggleButton_unstable;
142
- }
143
- });
144
- Object.defineProperty(exports, "toggleButtonClassNames", {
145
- enumerable: true,
146
- get: function () {
147
- return ToggleButton_1.toggleButtonClassNames;
148
- }
149
- });
150
- Object.defineProperty(exports, "useToggleButtonStyles_unstable", {
151
- enumerable: true,
152
- get: function () {
153
- return ToggleButton_1.useToggleButtonStyles_unstable;
154
- }
155
- });
156
- Object.defineProperty(exports, "useToggleButton_unstable", {
157
- enumerable: true,
158
- get: function () {
159
- return ToggleButton_1.useToggleButton_unstable;
160
- }
161
- });
162
- var index_1 = /*#__PURE__*/require("./utils/index");
163
- Object.defineProperty(exports, "useToggleState", {
164
- enumerable: true,
165
- get: function () {
166
- return index_1.useToggleState;
167
- }
168
- });
169
- var index_2 = /*#__PURE__*/require("./contexts/index");
170
- Object.defineProperty(exports, "ButtonContextProvider", {
171
- enumerable: true,
172
- get: function () {
173
- return index_2.ButtonContextProvider;
174
- }
175
- });
176
- Object.defineProperty(exports, "useButtonContext", {
177
- enumerable: true,
178
- get: function () {
179
- return index_2.useButtonContext;
180
- }
181
- });
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Button: ()=>_button.Button,
13
+ buttonClassNames: ()=>_button.buttonClassNames,
14
+ renderButton_unstable: ()=>_button.renderButton_unstable,
15
+ useButtonStyles_unstable: ()=>_button.useButtonStyles_unstable,
16
+ useButton_unstable: ()=>_button.useButton_unstable,
17
+ CompoundButton: ()=>_compoundButton.CompoundButton,
18
+ compoundButtonClassNames: ()=>_compoundButton.compoundButtonClassNames,
19
+ renderCompoundButton_unstable: ()=>_compoundButton.renderCompoundButton_unstable,
20
+ useCompoundButtonStyles_unstable: ()=>_compoundButton.useCompoundButtonStyles_unstable,
21
+ useCompoundButton_unstable: ()=>_compoundButton.useCompoundButton_unstable,
22
+ MenuButton: ()=>_menuButton.MenuButton,
23
+ menuButtonClassNames: ()=>_menuButton.menuButtonClassNames,
24
+ renderMenuButton_unstable: ()=>_menuButton.renderMenuButton_unstable,
25
+ useMenuButtonStyles_unstable: ()=>_menuButton.useMenuButtonStyles_unstable,
26
+ useMenuButton_unstable: ()=>_menuButton.useMenuButton_unstable,
27
+ SplitButton: ()=>_splitButton.SplitButton,
28
+ renderSplitButton_unstable: ()=>_splitButton.renderSplitButton_unstable,
29
+ splitButtonClassNames: ()=>_splitButton.splitButtonClassNames,
30
+ useSplitButtonStyles_unstable: ()=>_splitButton.useSplitButtonStyles_unstable,
31
+ useSplitButton_unstable: ()=>_splitButton.useSplitButton_unstable,
32
+ ToggleButton: ()=>_toggleButton.ToggleButton,
33
+ renderToggleButton_unstable: ()=>_toggleButton.renderToggleButton_unstable,
34
+ toggleButtonClassNames: ()=>_toggleButton.toggleButtonClassNames,
35
+ useToggleButtonStyles_unstable: ()=>_toggleButton.useToggleButtonStyles_unstable,
36
+ useToggleButton_unstable: ()=>_toggleButton.useToggleButton_unstable,
37
+ useToggleState: ()=>_index.useToggleState,
38
+ ButtonContextProvider: ()=>_index1.ButtonContextProvider,
39
+ useButtonContext: ()=>_index1.useButtonContext
40
+ });
41
+ const _button = require("./Button");
42
+ const _compoundButton = require("./CompoundButton");
43
+ const _menuButton = require("./MenuButton");
44
+ const _splitButton = require("./SplitButton");
45
+ const _toggleButton = require("./ToggleButton");
46
+ const _index = require("./utils/index");
47
+ const _index1 = require("./contexts/index");
48
+ //# sourceMappingURL=index.js.map
49
+
182
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Button_1","require","Object","defineProperty","exports","enumerable","get","Button","buttonClassNames","renderButton_unstable","useButtonStyles_unstable","useButton_unstable","CompoundButton_1","CompoundButton","compoundButtonClassNames","renderCompoundButton_unstable","useCompoundButtonStyles_unstable","useCompoundButton_unstable","MenuButton_1","MenuButton","menuButtonClassNames","renderMenuButton_unstable","useMenuButtonStyles_unstable","useMenuButton_unstable","SplitButton_1","SplitButton","renderSplitButton_unstable","splitButtonClassNames","useSplitButtonStyles_unstable","useSplitButton_unstable","ToggleButton_1","ToggleButton","renderToggleButton_unstable","toggleButtonClassNames","useToggleButtonStyles_unstable","useToggleButton_unstable","index_1","useToggleState","index_2","ButtonContextProvider","useButtonContext"],"sources":["../src/packages/react-components/react-button/src/index.ts"],"sourcesContent":["export {\n Button,\n buttonClassNames,\n renderButton_unstable,\n useButtonStyles_unstable,\n useButton_unstable,\n} from './Button';\nexport type { ButtonProps, ButtonSlots, ButtonState } from './Button';\nexport {\n CompoundButton,\n compoundButtonClassNames,\n renderCompoundButton_unstable,\n useCompoundButtonStyles_unstable,\n useCompoundButton_unstable,\n} from './CompoundButton';\nexport type { CompoundButtonProps, CompoundButtonSlots, CompoundButtonState } from './CompoundButton';\nexport {\n MenuButton,\n menuButtonClassNames,\n renderMenuButton_unstable,\n useMenuButtonStyles_unstable,\n useMenuButton_unstable,\n} from './MenuButton';\nexport type { MenuButtonProps, MenuButtonSlots, MenuButtonState } from './MenuButton';\nexport {\n SplitButton,\n renderSplitButton_unstable,\n splitButtonClassNames,\n useSplitButtonStyles_unstable,\n useSplitButton_unstable,\n} from './SplitButton';\nexport type { SplitButtonProps, SplitButtonSlots, SplitButtonState } from './SplitButton';\nexport {\n ToggleButton,\n renderToggleButton_unstable,\n toggleButtonClassNames,\n useToggleButtonStyles_unstable,\n useToggleButton_unstable,\n} from './ToggleButton';\nexport type { ToggleButtonProps, ToggleButtonState } from './ToggleButton';\n\nexport { useToggleState } from './utils/index';\n\nexport { ButtonContextProvider, useButtonContext } from './contexts/index';\nexport type { ButtonContextValue } from './contexts/index';\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,gBAAAC,OAAA;AACEC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,QAAA,CAAAO,MAAM;EAAA;AAAA;AACNL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,QAAA,CAAAQ,gBAAgB;EAAA;AAAA;AAChBN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,QAAA,CAAAS,qBAAqB;EAAA;AAAA;AACrBP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,QAAA,CAAAU,wBAAwB;EAAA;AAAA;AACxBR,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,QAAA,CAAAW,kBAAkB;EAAA;AAAA;AAGpB,IAAAC,gBAAA,gBAAAX,OAAA;AACEC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,gBAAA,CAAAC,cAAc;EAAA;AAAA;AACdX,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,gBAAA,CAAAE,wBAAwB;EAAA;AAAA;AACxBZ,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,gBAAA,CAAAG,6BAA6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AAC,OAAA,gBAAArC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAgC,OAAA,CAAAC,qBAAqB;EAAA;AAAA;AAAErC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAgC,OAAA,CAAAE,gBAAgB;EAAA;AAAA"}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Button, buttonClassNames, renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from './Button';\nexport { CompoundButton, compoundButtonClassNames, renderCompoundButton_unstable, useCompoundButtonStyles_unstable, useCompoundButton_unstable } from './CompoundButton';\nexport { MenuButton, menuButtonClassNames, renderMenuButton_unstable, useMenuButtonStyles_unstable, useMenuButton_unstable } from './MenuButton';\nexport { SplitButton, renderSplitButton_unstable, splitButtonClassNames, useSplitButtonStyles_unstable, useSplitButton_unstable } from './SplitButton';\nexport { ToggleButton, renderToggleButton_unstable, toggleButtonClassNames, useToggleButtonStyles_unstable, useToggleButton_unstable } from './ToggleButton';\nexport { useToggleState } from './utils/index';\nexport { ButtonContextProvider, useButtonContext } from './contexts/index';\n//# sourceMappingURL=index.js.map"],"names":["Button","buttonClassNames","renderButton_unstable","useButtonStyles_unstable","useButton_unstable","CompoundButton","compoundButtonClassNames","renderCompoundButton_unstable","useCompoundButtonStyles_unstable","useCompoundButton_unstable","MenuButton","menuButtonClassNames","renderMenuButton_unstable","useMenuButtonStyles_unstable","useMenuButton_unstable","SplitButton","renderSplitButton_unstable","splitButtonClassNames","useSplitButtonStyles_unstable","useSplitButton_unstable","ToggleButton","renderToggleButton_unstable","toggleButtonClassNames","useToggleButtonStyles_unstable","useToggleButton_unstable","useToggleState","ButtonContextProvider","useButtonContext"],"mappings":";;;;;;;;;;;IAASA,MAAM,MAANA,cAAM;IAAEC,gBAAgB,MAAhBA,wBAAgB;IAAEC,qBAAqB,MAArBA,6BAAqB;IAAEC,wBAAwB,MAAxBA,gCAAwB;IAAEC,kBAAkB,MAAlBA,0BAAkB;IAC7FC,cAAc,MAAdA,8BAAc;IAAEC,wBAAwB,MAAxBA,wCAAwB;IAAEC,6BAA6B,MAA7BA,6CAA6B;IAAEC,gCAAgC,MAAhCA,gDAAgC;IAAEC,0BAA0B,MAA1BA,0CAA0B;IACrIC,UAAU,MAAVA,sBAAU;IAAEC,oBAAoB,MAApBA,gCAAoB;IAAEC,yBAAyB,MAAzBA,qCAAyB;IAAEC,4BAA4B,MAA5BA,wCAA4B;IAAEC,sBAAsB,MAAtBA,kCAAsB;IACjHC,WAAW,MAAXA,wBAAW;IAAEC,0BAA0B,MAA1BA,uCAA0B;IAAEC,qBAAqB,MAArBA,kCAAqB;IAAEC,6BAA6B,MAA7BA,0CAA6B;IAAEC,uBAAuB,MAAvBA,oCAAuB;IACtHC,YAAY,MAAZA,0BAAY;IAAEC,2BAA2B,MAA3BA,yCAA2B;IAAEC,sBAAsB,MAAtBA,oCAAsB;IAAEC,8BAA8B,MAA9BA,4CAA8B;IAAEC,wBAAwB,MAAxBA,sCAAwB;IAC3HC,cAAc,MAAdA,qBAAc;IACdC,qBAAqB,MAArBA,6BAAqB;IAAEC,gBAAgB,MAAhBA,wBAAgB;;wBAN8D;gCACwC;4BACpB;6BACK;8BACK;uBAC7G;wBACyB;CACxD,iCAAiC"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./useToggleState"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./useToggleState"), exports);
7
+ //# sourceMappingURL=index.js.map
8
+
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-button/src/utils/index.ts"],"sourcesContent":["export * from './useToggleState';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,sBAAAC,OAAA"}
1
+ {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './useToggleState';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
@@ -1,45 +1,45 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useToggleState", {
6
+ enumerable: true,
7
+ get: ()=>useToggleState
5
8
  });
6
- exports.useToggleState = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
9
12
  function useToggleState(props, state) {
10
- const {
11
- checked,
12
- defaultChecked,
13
- disabled,
14
- disabledFocusable
15
- } = props;
16
- const {
17
- onClick,
18
- role
19
- } = state.root;
20
- const [checkedValue, setCheckedValue] = react_utilities_1.useControllableState({
21
- state: checked,
22
- defaultState: defaultChecked,
23
- initialState: false
24
- });
25
- const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';
26
- const onToggleClick = React.useCallback(ev => {
27
- if (!disabled && !disabledFocusable) {
28
- if (ev.defaultPrevented) {
29
- return;
30
- }
31
- setCheckedValue(!checkedValue);
32
- }
33
- }, [checkedValue, disabled, disabledFocusable, setCheckedValue]);
34
- return {
35
- ...state,
36
- checked: checkedValue,
37
- root: {
38
- ...state.root,
39
- [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,
40
- onClick: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(onClick, onToggleClick))
41
- }
42
- };
43
- }
44
- exports.useToggleState = useToggleState;
13
+ const { checked , defaultChecked , disabled , disabledFocusable } = props;
14
+ const { onClick , role } = state.root;
15
+ const [checkedValue, setCheckedValue] = (0, _reactUtilities.useControllableState)({
16
+ state: checked,
17
+ defaultState: defaultChecked,
18
+ initialState: false
19
+ });
20
+ const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';
21
+ const onToggleClick = _react.useCallback((ev)=>{
22
+ if (!disabled && !disabledFocusable) {
23
+ if (ev.defaultPrevented) {
24
+ return;
25
+ }
26
+ setCheckedValue(!checkedValue);
27
+ }
28
+ }, [
29
+ checkedValue,
30
+ disabled,
31
+ disabledFocusable,
32
+ setCheckedValue
33
+ ]);
34
+ return {
35
+ ...state,
36
+ checked: checkedValue,
37
+ root: {
38
+ ...state.root,
39
+ [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,
40
+ onClick: (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(onClick, onToggleClick))
41
+ }
42
+ };
43
+ } //# sourceMappingURL=useToggleState.js.map
44
+
45
45
  //# sourceMappingURL=useToggleState.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","useToggleState","props","state","checked","defaultChecked","disabled","disabledFocusable","onClick","role","root","checkedValue","setCheckedValue","useControllableState","defaultState","initialState","isCheckboxTypeRole","onToggleClick","useCallback","ev","defaultPrevented","useEventCallback","mergeCallbacks","exports"],"sources":["../src/packages/react-components/react-button/src/utils/useToggleState.ts"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nimport type { ButtonState } from '../Button';\nimport type { ToggleButtonProps, ToggleButtonState } from '../ToggleButton';\n\nexport function useToggleState<\n TToggleButtonProps extends Pick<ToggleButtonProps, 'checked' | 'defaultChecked' | 'disabled' | 'disabledFocusable'>,\n TButtonState extends Pick<ButtonState, 'root'>,\n TToggleButtonState extends Pick<ToggleButtonState, 'checked' | 'root'>,\n>(props: TToggleButtonProps, state: TButtonState): TToggleButtonState {\n const { checked, defaultChecked, disabled, disabledFocusable } = props;\n const { onClick, role } = state.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 const onToggleClick = React.useCallback(\n ev => {\n if (!disabled && !disabledFocusable) {\n if (ev.defaultPrevented) {\n return;\n }\n\n setCheckedValue(!checkedValue);\n }\n },\n [checkedValue, disabled, disabledFocusable, setCheckedValue],\n );\n\n return {\n ...state,\n\n checked: checkedValue,\n\n root: {\n ...state.root,\n [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,\n onClick: useEventCallback(\n mergeCallbacks(onClick as React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>, onToggleClick),\n ),\n },\n } as TToggleButtonState;\n}\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAIA,SAAgBE,cAAcA,CAI5BC,KAAyB,EAAEC,KAAmB;EAC9C,MAAM;IAAEC,OAAO;IAAEC,cAAc;IAAEC,QAAQ;IAAEC;EAAiB,CAAE,GAAGL,KAAK;EACtE,MAAM;IAAEM,OAAO;IAAEC;EAAI,CAAE,GAAGN,KAAK,CAACO,IAAI;EAEpC,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGZ,iBAAA,CAAAa,oBAAoB,CAAC;IAC3DV,KAAK,EAAEC,OAAO;IACdU,YAAY,EAAET,cAAc;IAC5BU,YAAY,EAAE;GACf,CAAC;EAEF,MAAMC,kBAAkB,GAAGP,IAAI,KAAK,kBAAkB,IAAIA,IAAI,KAAK,UAAU;EAE7E,MAAMQ,aAAa,GAAGnB,KAAK,CAACoB,WAAW,CACrCC,EAAE,IAAG;IACH,IAAI,CAACb,QAAQ,IAAI,CAACC,iBAAiB,EAAE;MACnC,IAAIY,EAAE,CAACC,gBAAgB,EAAE;QACvB;;MAGFR,eAAe,CAAC,CAACD,YAAY,CAAC;;EAElC,CAAC,EACD,CAACA,YAAY,EAAEL,QAAQ,EAAEC,iBAAiB,EAAEK,eAAe,CAAC,CAC7D;EAED,OAAO;IACL,GAAGT,KAAK;IAERC,OAAO,EAAEO,YAAY;IAErBD,IAAI,EAAE;MACJ,GAAGP,KAAK,CAACO,IAAI;MACb,CAACM,kBAAkB,GAAG,cAAc,GAAG,cAAc,GAAGL,YAAY;MACpEH,OAAO,EAAER,iBAAA,CAAAqB,gBAAgB,CACvBrB,iBAAA,CAAAsB,cAAc,CAACd,OAAyE,EAAES,aAAa,CAAC;;GAGvF;AACzB;AA1CAM,OAAA,CAAAtB,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"sources":["../../lib/utils/useToggleState.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nexport function useToggleState(props, state) {\n const {\n checked,\n defaultChecked,\n disabled,\n disabledFocusable\n } = props;\n const {\n onClick,\n role\n } = state.root;\n const [checkedValue, setCheckedValue] = useControllableState({\n state: checked,\n defaultState: defaultChecked,\n initialState: false\n });\n const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';\n const onToggleClick = React.useCallback(ev => {\n if (!disabled && !disabledFocusable) {\n if (ev.defaultPrevented) {\n return;\n }\n setCheckedValue(!checkedValue);\n }\n }, [checkedValue, disabled, disabledFocusable, setCheckedValue]);\n return {\n ...state,\n checked: checkedValue,\n root: {\n ...state.root,\n [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,\n onClick: useEventCallback(mergeCallbacks(onClick, onToggleClick))\n }\n };\n}\n//# sourceMappingURL=useToggleState.js.map"],"names":["useToggleState","props","state","checked","defaultChecked","disabled","disabledFocusable","onClick","role","root","checkedValue","setCheckedValue","useControllableState","defaultState","initialState","isCheckboxTypeRole","onToggleClick","React","useCallback","ev","defaultPrevented","useEventCallback","mergeCallbacks"],"mappings":";;;;+BAEgBA;;aAAAA;;;6DAFO;gCACgD;AAChE,SAASA,eAAeC,KAAK,EAAEC,KAAK,EAAE;IAC3C,MAAM,EACJC,QAAO,EACPC,eAAc,EACdC,SAAQ,EACRC,kBAAiB,EAClB,GAAGL;IACJ,MAAM,EACJM,QAAO,EACPC,KAAI,EACL,GAAGN,MAAMO,IAAI;IACd,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,IAAAA,oCAAoB,EAAC;QAC3DV,OAAOC;QACPU,cAAcT;QACdU,cAAc,KAAK;IACrB;IACA,MAAMC,qBAAqBP,SAAS,sBAAsBA,SAAS;IACnE,MAAMQ,gBAAgBC,OAAMC,WAAW,CAACC,CAAAA,KAAM;QAC5C,IAAI,CAACd,YAAY,CAACC,mBAAmB;YACnC,IAAIa,GAAGC,gBAAgB,EAAE;gBACvB;YACF,CAAC;YACDT,gBAAgB,CAACD;QACnB,CAAC;IACH,GAAG;QAACA;QAAcL;QAAUC;QAAmBK;KAAgB;IAC/D,OAAO;QACL,GAAGT,KAAK;QACRC,SAASO;QACTD,MAAM;YACJ,GAAGP,MAAMO,IAAI;YACb,CAACM,qBAAqB,iBAAiB,cAAc,CAAC,EAAEL;YACxDH,SAASc,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACf,SAASS;QACpD;IACF;AACF,EACA,0CAA0C"}