@fluentui/react-button 9.3.15 → 9.3.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. package/CHANGELOG.json +46 -1
  2. package/CHANGELOG.md +16 -2
  3. package/lib/Button.js +0 -1
  4. package/lib/Button.js.map +1 -1
  5. package/lib/CompoundButton.js +0 -1
  6. package/lib/CompoundButton.js.map +1 -1
  7. package/lib/MenuButton.js +0 -1
  8. package/lib/MenuButton.js.map +1 -1
  9. package/lib/SplitButton.js +0 -1
  10. package/lib/SplitButton.js.map +1 -1
  11. package/lib/ToggleButton.js +0 -1
  12. package/lib/ToggleButton.js.map +1 -1
  13. package/lib/components/Button/Button.js +6 -9
  14. package/lib/components/Button/Button.js.map +1 -1
  15. package/lib/components/Button/Button.types.js +1 -2
  16. package/lib/components/Button/Button.types.js.map +1 -1
  17. package/lib/components/Button/index.js +0 -1
  18. package/lib/components/Button/index.js.map +1 -1
  19. package/lib/components/Button/renderButton.js +5 -13
  20. package/lib/components/Button/renderButton.js.map +1 -1
  21. package/lib/components/Button/useButton.js +28 -41
  22. package/lib/components/Button/useButton.js.map +1 -1
  23. package/lib/components/Button/useButtonStyles.styles.js.map +1 -1
  24. package/lib/components/CompoundButton/CompoundButton.js +6 -9
  25. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  26. package/lib/components/CompoundButton/CompoundButton.types.js +1 -2
  27. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  28. package/lib/components/CompoundButton/index.js +0 -1
  29. package/lib/components/CompoundButton/index.js.map +1 -1
  30. package/lib/components/CompoundButton/renderCompoundButton.js +5 -13
  31. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  32. package/lib/components/CompoundButton/useCompoundButton.js +20 -26
  33. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  34. package/lib/components/CompoundButton/useCompoundButtonStyles.styles.js.map +1 -1
  35. package/lib/components/MenuButton/MenuButton.js +6 -9
  36. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  37. package/lib/components/MenuButton/MenuButton.types.js +1 -2
  38. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  39. package/lib/components/MenuButton/index.js +0 -1
  40. package/lib/components/MenuButton/index.js.map +1 -1
  41. package/lib/components/MenuButton/renderMenuButton.js +5 -13
  42. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  43. package/lib/components/MenuButton/useMenuButton.js +22 -27
  44. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  45. package/lib/components/MenuButton/useMenuButtonStyles.styles.js.map +1 -1
  46. package/lib/components/SplitButton/SplitButton.js +6 -9
  47. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  48. package/lib/components/SplitButton/SplitButton.types.js +1 -2
  49. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  50. package/lib/components/SplitButton/index.js +0 -1
  51. package/lib/components/SplitButton/index.js.map +1 -1
  52. package/lib/components/SplitButton/renderSplitButton.js +4 -9
  53. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  54. package/lib/components/SplitButton/useSplitButton.js +54 -68
  55. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  56. package/lib/components/SplitButton/useSplitButtonStyles.styles.js.map +1 -1
  57. package/lib/components/ToggleButton/ToggleButton.js +6 -9
  58. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  59. package/lib/components/ToggleButton/ToggleButton.types.js +1 -2
  60. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  61. package/lib/components/ToggleButton/index.js +0 -1
  62. package/lib/components/ToggleButton/index.js.map +1 -1
  63. package/lib/components/ToggleButton/renderToggleButton.js +0 -1
  64. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  65. package/lib/components/ToggleButton/useToggleButton.js +3 -5
  66. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  67. package/lib/components/ToggleButton/useToggleButtonStyles.styles.js.map +1 -1
  68. package/lib/contexts/ButtonContext.js +3 -6
  69. package/lib/contexts/ButtonContext.js.map +1 -1
  70. package/lib/contexts/index.js +0 -1
  71. package/lib/contexts/index.js.map +1 -1
  72. package/lib/index.js +0 -1
  73. package/lib/index.js.map +1 -1
  74. package/lib/utils/index.js +0 -1
  75. package/lib/utils/index.js.map +1 -1
  76. package/lib/utils/useToggleState.js +30 -34
  77. package/lib/utils/useToggleState.js.map +1 -1
  78. package/lib-commonjs/Button.js +0 -3
  79. package/lib-commonjs/Button.js.map +1 -1
  80. package/lib-commonjs/CompoundButton.js +0 -3
  81. package/lib-commonjs/CompoundButton.js.map +1 -1
  82. package/lib-commonjs/MenuButton.js +0 -3
  83. package/lib-commonjs/MenuButton.js.map +1 -1
  84. package/lib-commonjs/SplitButton.js +0 -3
  85. package/lib-commonjs/SplitButton.js.map +1 -1
  86. package/lib-commonjs/ToggleButton.js +0 -3
  87. package/lib-commonjs/ToggleButton.js.map +1 -1
  88. package/lib-commonjs/components/Button/Button.js +1 -3
  89. package/lib-commonjs/components/Button/Button.js.map +1 -1
  90. package/lib-commonjs/components/Button/Button.types.js +0 -3
  91. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  92. package/lib-commonjs/components/Button/index.js +0 -3
  93. package/lib-commonjs/components/Button/index.js.map +1 -1
  94. package/lib-commonjs/components/Button/renderButton.js +1 -3
  95. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  96. package/lib-commonjs/components/Button/useButton.js +1 -3
  97. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  98. package/lib-commonjs/components/Button/useButtonStyles.styles.js +0 -2
  99. package/lib-commonjs/components/Button/useButtonStyles.styles.js.map +1 -1
  100. package/lib-commonjs/components/CompoundButton/CompoundButton.js +1 -3
  101. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  102. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +0 -3
  103. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  104. package/lib-commonjs/components/CompoundButton/index.js +0 -3
  105. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  106. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +1 -3
  107. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  108. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +1 -3
  109. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  110. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.js +0 -2
  111. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.js.map +1 -1
  112. package/lib-commonjs/components/MenuButton/MenuButton.js +1 -3
  113. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  114. package/lib-commonjs/components/MenuButton/MenuButton.types.js +0 -3
  115. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  116. package/lib-commonjs/components/MenuButton/index.js +0 -3
  117. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  118. package/lib-commonjs/components/MenuButton/renderMenuButton.js +1 -3
  119. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  120. package/lib-commonjs/components/MenuButton/useMenuButton.js +1 -3
  121. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  122. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.js +0 -2
  123. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.js.map +1 -1
  124. package/lib-commonjs/components/SplitButton/SplitButton.js +1 -3
  125. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  126. package/lib-commonjs/components/SplitButton/SplitButton.types.js +0 -3
  127. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  128. package/lib-commonjs/components/SplitButton/index.js +0 -3
  129. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  130. package/lib-commonjs/components/SplitButton/renderSplitButton.js +1 -3
  131. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  132. package/lib-commonjs/components/SplitButton/useSplitButton.js +1 -3
  133. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  134. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.js +0 -2
  135. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.js.map +1 -1
  136. package/lib-commonjs/components/ToggleButton/ToggleButton.js +1 -3
  137. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  138. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +0 -3
  139. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  140. package/lib-commonjs/components/ToggleButton/index.js +0 -3
  141. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  142. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +0 -3
  143. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  144. package/lib-commonjs/components/ToggleButton/useToggleButton.js +1 -3
  145. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  146. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.js +0 -2
  147. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.js.map +1 -1
  148. package/lib-commonjs/contexts/ButtonContext.js +1 -3
  149. package/lib-commonjs/contexts/ButtonContext.js.map +1 -1
  150. package/lib-commonjs/contexts/index.js +0 -3
  151. package/lib-commonjs/contexts/index.js.map +1 -1
  152. package/lib-commonjs/index.js +0 -3
  153. package/lib-commonjs/index.js.map +1 -1
  154. package/lib-commonjs/utils/index.js +0 -3
  155. package/lib-commonjs/utils/index.js.map +1 -1
  156. package/lib-commonjs/utils/useToggleState.js +1 -3
  157. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  158. package/package.json +7 -7
@@ -1 +1 @@
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"}
1
+ {"version":3,"sources":["useToggleState.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nexport function useToggleState(props, state) {\n const { checked , defaultChecked , disabled , disabledFocusable } = props;\n const { onClick , role } = 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 }, [\n checkedValue,\n disabled,\n disabledFocusable,\n setCheckedValue\n ]);\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"],"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;IACzC,MAAM,EAAEC,QAAO,EAAGC,eAAc,EAAGC,SAAQ,EAAGC,kBAAiB,EAAG,GAAGL;IACrE,MAAM,EAAEM,QAAO,EAAGC,KAAI,EAAG,GAAGN,MAAMO,IAAI;IACtC,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,IAAAA,oCAAoB,EAAC;QACzDV,OAAOC;QACPU,cAAcT;QACdU,cAAc,KAAK;IACvB;IACA,MAAMC,qBAAqBP,SAAS,sBAAsBA,SAAS;IACnE,MAAMQ,gBAAgBC,OAAMC,WAAW,CAAC,CAACC,KAAK;QAC1C,IAAI,CAACd,YAAY,CAACC,mBAAmB;YACjC,IAAIa,GAAGC,gBAAgB,EAAE;gBACrB;YACJ,CAAC;YACDT,gBAAgB,CAACD;QACrB,CAAC;IACL,GAAG;QACCA;QACAL;QACAC;QACAK;KACH;IACD,OAAO;QACH,GAAGT,KAAK;QACRC,SAASO;QACTD,MAAM;YACF,GAAGP,MAAMO,IAAI;YACb,CAACM,qBAAqB,iBAAiB,cAAc,CAAC,EAAEL;YACxDH,SAASc,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACf,SAASS;QACtD;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-button",
3
- "version": "9.3.15",
3
+ "version": "9.3.16",
4
4
  "description": "Fluent UI React Button component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -29,20 +29,20 @@
29
29
  "@fluentui/a11y-testing": "^0.1.0",
30
30
  "@fluentui/eslint-plugin": "*",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.21",
32
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.22",
33
33
  "@fluentui/scripts-api-extractor": "*",
34
34
  "@fluentui/scripts-tasks": "*"
35
35
  },
36
36
  "dependencies": {
37
37
  "@fluentui/keyboard-keys": "^9.0.3",
38
- "@fluentui/react-aria": "^9.3.21",
38
+ "@fluentui/react-aria": "^9.3.22",
39
39
  "@fluentui/react-icons": "^2.0.196",
40
- "@fluentui/react-jsx-runtime": "9.0.0-alpha.5",
40
+ "@fluentui/react-jsx-runtime": "9.0.0-alpha.6",
41
41
  "@fluentui/react-shared-contexts": "^9.5.0",
42
- "@fluentui/react-tabster": "^9.7.4",
42
+ "@fluentui/react-tabster": "^9.7.5",
43
43
  "@fluentui/react-theme": "^9.1.8",
44
- "@fluentui/react-utilities": "^9.9.1",
45
- "@griffel/react": "^1.5.2",
44
+ "@fluentui/react-utilities": "^9.9.2",
45
+ "@griffel/react": "^1.5.7",
46
46
  "@swc/helpers": "^0.4.14"
47
47
  },
48
48
  "peerDependencies": {