@fluentui/react-button 0.0.0-nightly-20230526-0415.1 → 0.0.0-nightly-20230530-0415.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/CHANGELOG.json +19 -19
  2. package/CHANGELOG.md +12 -12
  3. package/lib/Button.js +1 -0
  4. package/lib/Button.js.map +1 -1
  5. package/lib/CompoundButton.js +1 -0
  6. package/lib/CompoundButton.js.map +1 -1
  7. package/lib/MenuButton.js +1 -0
  8. package/lib/MenuButton.js.map +1 -1
  9. package/lib/SplitButton.js +1 -0
  10. package/lib/SplitButton.js.map +1 -1
  11. package/lib/ToggleButton.js +1 -0
  12. package/lib/ToggleButton.js.map +1 -1
  13. package/lib/components/Button/Button.js +7 -8
  14. package/lib/components/Button/Button.js.map +1 -1
  15. package/lib/components/Button/Button.types.js +2 -1
  16. package/lib/components/Button/Button.types.js.map +1 -1
  17. package/lib/components/Button/index.js +1 -0
  18. package/lib/components/Button/index.js.map +1 -1
  19. package/lib/components/Button/renderButton.js +6 -12
  20. package/lib/components/Button/renderButton.js.map +1 -1
  21. package/lib/components/Button/useButton.js +29 -40
  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 +7 -8
  25. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  26. package/lib/components/CompoundButton/CompoundButton.types.js +2 -1
  27. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  28. package/lib/components/CompoundButton/index.js +1 -0
  29. package/lib/components/CompoundButton/index.js.map +1 -1
  30. package/lib/components/CompoundButton/renderCompoundButton.js +6 -12
  31. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  32. package/lib/components/CompoundButton/useCompoundButton.js +21 -25
  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 +7 -8
  36. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  37. package/lib/components/MenuButton/MenuButton.types.js +2 -1
  38. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  39. package/lib/components/MenuButton/index.js +1 -0
  40. package/lib/components/MenuButton/index.js.map +1 -1
  41. package/lib/components/MenuButton/renderMenuButton.js +6 -12
  42. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  43. package/lib/components/MenuButton/useMenuButton.js +23 -26
  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 +7 -8
  47. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  48. package/lib/components/SplitButton/SplitButton.types.js +2 -1
  49. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  50. package/lib/components/SplitButton/index.js +1 -0
  51. package/lib/components/SplitButton/index.js.map +1 -1
  52. package/lib/components/SplitButton/renderSplitButton.js +5 -8
  53. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  54. package/lib/components/SplitButton/useSplitButton.js +55 -67
  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 +7 -8
  58. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  59. package/lib/components/ToggleButton/ToggleButton.types.js +2 -1
  60. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  61. package/lib/components/ToggleButton/index.js +1 -0
  62. package/lib/components/ToggleButton/index.js.map +1 -1
  63. package/lib/components/ToggleButton/renderToggleButton.js +1 -0
  64. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  65. package/lib/components/ToggleButton/useToggleButton.js +4 -4
  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 +4 -5
  69. package/lib/contexts/ButtonContext.js.map +1 -1
  70. package/lib/contexts/index.js +1 -0
  71. package/lib/contexts/index.js.map +1 -1
  72. package/lib/index.js +1 -0
  73. package/lib/index.js.map +1 -1
  74. package/lib/utils/index.js +1 -0
  75. package/lib/utils/index.js.map +1 -1
  76. package/lib/utils/useToggleState.js +31 -33
  77. package/lib/utils/useToggleState.js.map +1 -1
  78. package/lib-commonjs/Button.js.map +1 -1
  79. package/lib-commonjs/CompoundButton.js.map +1 -1
  80. package/lib-commonjs/MenuButton.js.map +1 -1
  81. package/lib-commonjs/SplitButton.js.map +1 -1
  82. package/lib-commonjs/ToggleButton.js.map +1 -1
  83. package/lib-commonjs/components/Button/Button.js.map +1 -1
  84. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  85. package/lib-commonjs/components/Button/index.js.map +1 -1
  86. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  87. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  88. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  89. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  90. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  91. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  92. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  93. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  94. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  95. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  96. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  97. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  98. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  99. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  100. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  101. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  102. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  103. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  104. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  105. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  106. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  107. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  108. package/lib-commonjs/contexts/ButtonContext.js.map +1 -1
  109. package/lib-commonjs/contexts/index.js.map +1 -1
  110. package/lib-commonjs/index.js.map +1 -1
  111. package/lib-commonjs/utils/index.js.map +1 -1
  112. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  113. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Button/Button.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=Button.types.js.map"],"names":[],"mappings":";;;;CACA,wCAAwC"}
1
+ {"version":3,"sources":["../../../lib/components/Button/Button.types.js"],"sourcesContent":["export { };\n\n//# sourceMappingURL=Button.types.js.map"],"names":[],"mappings":";;;;CAEA,wCAAwC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Button/index.js"],"sourcesContent":["export * from './Button';\nexport * from './renderButton';\nexport * from './useButton';\nexport { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":["buttonClassNames","useButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAGSA,gBAAgB,MAAhBA,uCAAgB;IAAEC,wBAAwB,MAAxBA,+CAAwB;;;oBAHrC;oBACA;oBACA;uCAC6C;CAC3D,iCAAiC"}
1
+ {"version":3,"sources":["../../../lib/components/Button/index.js"],"sourcesContent":["export * from './Button';\nexport * from './renderButton';\nexport * from './useButton';\nexport { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles.styles';\n\n//# sourceMappingURL=index.js.map"],"names":["buttonClassNames","useButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAGSA,gBAAgB,MAAhBA,uCAAgB;IAAEC,wBAAwB,MAAxBA,+CAAwB;;;oBAHrC;oBACA;oBACA;uCAC6C;CAE3D,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Button/renderButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a Button component by passing the state defined props to the appropriate slots.\n */\nexport const renderButton_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n const {\n iconOnly,\n iconPosition\n } = state;\n return /*#__PURE__*/createElement(slots.root, slotProps.root, iconPosition !== 'after' && slots.icon && /*#__PURE__*/createElement(slots.icon, slotProps.icon), !iconOnly && state.root.children, iconPosition === 'after' && slots.icon && /*#__PURE__*/createElement(slots.icon, slotProps.icon));\n};\n//# sourceMappingURL=renderButton.js.map"],"names":["renderButton_unstable","state","slots","slotProps","getSlotsNext","iconOnly","iconPosition","createElement","root","icon","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,wBAAwBC,CAAAA,QAAS;IAC5C,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,MAAM,EACJI,SAAQ,EACRC,aAAY,EACb,GAAGL;IACJ,OAAO,WAAW,GAAEM,IAAAA,8BAAa,EAACL,MAAMM,IAAI,EAAEL,UAAUK,IAAI,EAAEF,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAEF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI,GAAG,CAACJ,YAAYJ,MAAMO,IAAI,CAACE,QAAQ,EAAEJ,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAEF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI;AACnS,GACA,wCAAwC"}
1
+ {"version":3,"sources":["../../../lib/components/Button/renderButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a Button component by passing the state defined props to the appropriate slots.\n */ export const renderButton_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n const { iconOnly , iconPosition } = state;\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, iconPosition !== 'after' && slots.icon && /*#__PURE__*/ createElement(slots.icon, slotProps.icon), !iconOnly && state.root.children, iconPosition === 'after' && slots.icon && /*#__PURE__*/ createElement(slots.icon, slotProps.icon));\n};\n\n//# sourceMappingURL=renderButton.js.map"],"names":["renderButton_unstable","state","slots","slotProps","getSlotsNext","iconOnly","iconPosition","createElement","root","icon","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,wBAAwB,CAACC,QAAQ;IAC9C,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,MAAM,EAAEI,SAAQ,EAAGC,aAAY,EAAG,GAAGL;IACrC,OAAO,WAAW,GAAGM,IAAAA,8BAAa,EAACL,MAAMM,IAAI,EAAEL,UAAUK,IAAI,EAAEF,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI,GAAG,CAACJ,YAAYJ,MAAMO,IAAI,CAACE,QAAQ,EAAEJ,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI;AACxS,GAEA,wCAAwC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Button/useButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (props, ref) => {\n const {\n size: contextSize\n } = useButtonContext();\n const {\n appearance = 'secondary',\n as = 'button',\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium'\n } = props;\n const iconShorthand = resolveShorthand(icon);\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n // State calculated from a set of props\n iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),\n // Slots definition\n components: {\n root: 'button',\n icon: 'span'\n },\n root: getNativeElementProps(as, useARIAButtonShorthand(props, {\n required: true,\n defaultProps: {\n ref: ref,\n type: 'button'\n }\n })),\n icon: iconShorthand\n };\n};\n//# sourceMappingURL=useButton.js.map"],"names":["useButton_unstable","props","ref","size","contextSize","useButtonContext","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","resolveShorthand","iconOnly","Boolean","children","components","root","getNativeElementProps","useARIAButtonShorthand","required","defaultProps","type"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;2BACgB;gCACiB;+BACvB;AAM1B,MAAMA,qBAAqB,CAACC,OAAOC,MAAQ;IAChD,MAAM,EACJC,MAAMC,YAAW,EAClB,GAAGC,IAAAA,+BAAgB;IACpB,MAAM,EACJC,YAAa,YAAW,EACxBC,IAAK,SAAQ,EACbC,UAAW,KAAK,CAAA,EAChBC,mBAAoB,KAAK,CAAA,EACzBC,KAAI,EACJC,cAAe,SAAQ,EACvBC,OAAQ,UAAS,EACjBT,MAAOC,gBAAgB,IAAI,IAAIA,gBAAgB,KAAK,IAAIA,cAAc,QAAQ,CAAA,EAC/E,GAAGH;IACJ,MAAMY,gBAAgBC,IAAAA,gCAAgB,EAACJ;IACvC,OAAO;QACL,gCAAgC;QAChCJ;QACAE;QACAC;QACAE;QACAC;QACAT;QACA,uCAAuC;QACvCY,UAAUC,QAAQ,AAACH,CAAAA,kBAAkB,IAAI,IAAIA,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAcI,QAAQ,AAAD,KAAM,CAAChB,MAAMgB,QAAQ;QAC3H,mBAAmB;QACnBC,YAAY;YACVC,MAAM;YACNT,MAAM;QACR;QACAS,MAAMC,IAAAA,qCAAqB,EAACb,IAAIc,IAAAA,iCAAsB,EAACpB,OAAO;YAC5DqB,UAAU,IAAI;YACdC,cAAc;gBACZrB,KAAKA;gBACLsB,MAAM;YACR;QACF;QACAd,MAAMG;IACR;AACF,GACA,qCAAqC"}
1
+ {"version":3,"sources":["../../../lib/components/Button/useButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */ export const useButton_unstable = (props, ref)=>{\n const { size: contextSize } = useButtonContext();\n const { appearance ='secondary' , as ='button' , disabled =false , disabledFocusable =false , icon , iconPosition ='before' , shape ='rounded' , size =contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;\n const iconShorthand = resolveShorthand(icon);\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n // State calculated from a set of props\n iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),\n // Slots definition\n components: {\n root: 'button',\n icon: 'span'\n },\n root: getNativeElementProps(as, useARIAButtonShorthand(props, {\n required: true,\n defaultProps: {\n ref: ref,\n type: 'button'\n }\n })),\n icon: iconShorthand\n };\n};\n\n//# sourceMappingURL=useButton.js.map"],"names":["useButton_unstable","props","ref","size","contextSize","useButtonContext","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","resolveShorthand","iconOnly","Boolean","children","components","root","getNativeElementProps","useARIAButtonShorthand","required","defaultProps","type"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;2BACgB;gCACiB;+BACvB;AAKtB,MAAMA,qBAAqB,CAACC,OAAOC,MAAM;IAChD,MAAM,EAAEC,MAAMC,YAAW,EAAG,GAAGC,IAAAA,+BAAgB;IAC/C,MAAM,EAAEC,YAAY,YAAW,EAAGC,IAAI,SAAQ,EAAGC,UAAU,KAAK,CAAA,EAAGC,mBAAmB,KAAK,CAAA,EAAGC,KAAI,EAAGC,cAAc,SAAQ,EAAGC,OAAO,UAAS,EAAGT,MAAMC,gBAAgB,IAAI,IAAIA,gBAAgB,KAAK,IAAIA,cAAc,QAAQ,CAAA,EAAG,GAAGH;IACpO,MAAMY,gBAAgBC,IAAAA,gCAAgB,EAACJ;IACvC,OAAO;QACH,gCAAgC;QAChCJ;QACAE;QACAC;QACAE;QACAC;QACAT;QACA,uCAAuC;QACvCY,UAAUC,QAAQ,AAACH,CAAAA,kBAAkB,IAAI,IAAIA,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAcI,QAAQ,AAAD,KAAM,CAAChB,MAAMgB,QAAQ;QAC3H,mBAAmB;QACnBC,YAAY;YACRC,MAAM;YACNT,MAAM;QACV;QACAS,MAAMC,IAAAA,qCAAqB,EAACb,IAAIc,IAAAA,iCAAsB,EAACpB,OAAO;YAC1DqB,UAAU,IAAI;YACdC,cAAc;gBACVrB,KAAKA;gBACLsB,MAAM;YACV;QACJ;QACAd,MAAMG;IACV;AACJ,GAEA,qCAAqC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/CompoundButton/CompoundButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n useCompoundButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useCompoundButtonStyles_unstable')(state);\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n});\n\nCompoundButton.displayName = 'CompoundButton';\n//# sourceMappingURL=CompoundButton.js.map"],"names":["CompoundButton","React","forwardRef","props","ref","state","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHook_unstable","renderCompoundButton_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;sCACuB;mCACH;+CACM;qCACL;AAIrC,MAAMA,iBAAiB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC1E,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjCG,IAAAA,gDAA2B,EAAC,oCAAoCH;IAChE,OAAOI,IAAAA,mDAA6B,EAACJ;AACrC,0FAA0F;AAC5F;AAEAL,eAAeU,WAAW,GAAG,kBAC7B,0CAA0C"}
1
+ {"version":3,"sources":["../../../lib/components/CompoundButton/CompoundButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */ export const CompoundButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useCompoundButton_unstable(props, ref);\n useCompoundButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useCompoundButtonStyles_unstable')(state);\n return renderCompoundButton_unstable(state);\n// Casting is required due to lack of distributive union to support unions on @types/react\n});\nCompoundButton.displayName = 'CompoundButton';\n\n//# sourceMappingURL=CompoundButton.js.map"],"names":["CompoundButton","React","forwardRef","props","ref","state","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHook_unstable","renderCompoundButton_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;sCACuB;mCACH;+CACM;qCACL;AAGjC,MAAMA,iBAAiB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC3E,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjCG,IAAAA,gDAA2B,EAAC,oCAAoCH;IAChE,OAAOI,IAAAA,mDAA6B,EAACJ;AACzC,0FAA0F;AAC1F;AACAL,eAAeU,WAAW,GAAG,kBAE7B,0CAA0C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/CompoundButton/CompoundButton.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=CompoundButton.types.js.map"],"names":[],"mappings":";;;;CACA,gDAAgD"}
1
+ {"version":3,"sources":["../../../lib/components/CompoundButton/CompoundButton.types.js"],"sourcesContent":["export { };\n\n//# sourceMappingURL=CompoundButton.types.js.map"],"names":[],"mappings":";;;;CAEA,gDAAgD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/CompoundButton/index.js"],"sourcesContent":["export * from './CompoundButton';\nexport * from './CompoundButton.types';\nexport * from './renderCompoundButton';\nexport * from './useCompoundButton';\nexport { compoundButtonClassNames, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":["compoundButtonClassNames","useCompoundButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,wBAAwB,MAAxBA,uDAAwB;IAAEC,gCAAgC,MAAhCA,+DAAgC;;;oBAJrD;oBACA;oBACA;oBACA;+CAC6D;CAC3E,iCAAiC"}
1
+ {"version":3,"sources":["../../../lib/components/CompoundButton/index.js"],"sourcesContent":["export * from './CompoundButton';\nexport * from './CompoundButton.types';\nexport * from './renderCompoundButton';\nexport * from './useCompoundButton';\nexport { compoundButtonClassNames, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\n\n//# sourceMappingURL=index.js.map"],"names":["compoundButtonClassNames","useCompoundButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,wBAAwB,MAAxBA,uDAAwB;IAAEC,gCAAgC,MAAhCA,+DAAgC;;;oBAJrD;oBACA;oBACA;oBACA;+CAC6D;CAE3E,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/CompoundButton/renderCompoundButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n const {\n iconOnly,\n iconPosition\n } = state;\n return /*#__PURE__*/createElement(slots.root, slotProps.root, iconPosition !== 'after' && slots.icon && /*#__PURE__*/createElement(slots.icon, slotProps.icon), !iconOnly && /*#__PURE__*/createElement(slots.contentContainer, slotProps.contentContainer, slotProps.root.children, slots.secondaryContent && /*#__PURE__*/createElement(slots.secondaryContent, slotProps.secondaryContent)), iconPosition === 'after' && slots.icon && /*#__PURE__*/createElement(slots.icon, slotProps.icon));\n};\n//# sourceMappingURL=renderCompoundButton.js.map"],"names":["renderCompoundButton_unstable","state","slots","slotProps","getSlotsNext","iconOnly","iconPosition","createElement","root","icon","contentContainer","children","secondaryContent"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,gCAAgCC,CAAAA,QAAS;IACpD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,MAAM,EACJI,SAAQ,EACRC,aAAY,EACb,GAAGL;IACJ,OAAO,WAAW,GAAEM,IAAAA,8BAAa,EAACL,MAAMM,IAAI,EAAEL,UAAUK,IAAI,EAAEF,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAEF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI,GAAG,CAACJ,YAAY,WAAW,GAAEE,IAAAA,8BAAa,EAACL,MAAMQ,gBAAgB,EAAEP,UAAUO,gBAAgB,EAAEP,UAAUK,IAAI,CAACG,QAAQ,EAAET,MAAMU,gBAAgB,IAAI,WAAW,GAAEL,IAAAA,8BAAa,EAACL,MAAMU,gBAAgB,EAAET,UAAUS,gBAAgB,IAAIN,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAEF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI;AACje,GACA,gDAAgD"}
1
+ {"version":3,"sources":["../../../lib/components/CompoundButton/renderCompoundButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */ export const renderCompoundButton_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n const { iconOnly , iconPosition } = state;\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, iconPosition !== 'after' && slots.icon && /*#__PURE__*/ createElement(slots.icon, slotProps.icon), !iconOnly && /*#__PURE__*/ createElement(slots.contentContainer, slotProps.contentContainer, slotProps.root.children, slots.secondaryContent && /*#__PURE__*/ createElement(slots.secondaryContent, slotProps.secondaryContent)), iconPosition === 'after' && slots.icon && /*#__PURE__*/ createElement(slots.icon, slotProps.icon));\n};\n\n//# sourceMappingURL=renderCompoundButton.js.map"],"names":["renderCompoundButton_unstable","state","slots","slotProps","getSlotsNext","iconOnly","iconPosition","createElement","root","icon","contentContainer","children","secondaryContent"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,gCAAgC,CAACC,QAAQ;IACtD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,MAAM,EAAEI,SAAQ,EAAGC,aAAY,EAAG,GAAGL;IACrC,OAAO,WAAW,GAAGM,IAAAA,8BAAa,EAACL,MAAMM,IAAI,EAAEL,UAAUK,IAAI,EAAEF,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI,GAAG,CAACJ,YAAY,WAAW,GAAGE,IAAAA,8BAAa,EAACL,MAAMQ,gBAAgB,EAAEP,UAAUO,gBAAgB,EAAEP,UAAUK,IAAI,CAACG,QAAQ,EAAET,MAAMU,gBAAgB,IAAI,WAAW,GAAGL,IAAAA,8BAAa,EAACL,MAAMU,gBAAgB,EAAET,UAAUS,gBAAgB,IAAIN,iBAAiB,WAAWJ,MAAMO,IAAI,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI;AACxe,GAEA,gDAAgD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/CompoundButton/useCompoundButton.js"],"sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButton_unstable = ({\n contentContainer,\n secondaryContent,\n ...props\n}, ref) => {\n var _state_icon, _state_secondaryContent;\n const state = {\n // Button state\n ...useButton_unstable(props, ref),\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span'\n },\n contentContainer: resolveShorthand(contentContainer, {\n required: true\n }),\n secondaryContent: resolveShorthand(secondaryContent)\n };\n // Recalculate iconOnly to take into account secondaryContent.\n state.iconOnly = Boolean(((_state_icon = state.icon) === null || _state_icon === void 0 ? void 0 : _state_icon.children) && !props.children && !((_state_secondaryContent = state.secondaryContent) === null || _state_secondaryContent === void 0 ? void 0 : _state_secondaryContent.children));\n return state;\n};\n//# sourceMappingURL=useCompoundButton.js.map"],"names":["useCompoundButton_unstable","contentContainer","secondaryContent","props","ref","_state_icon","_state_secondaryContent","state","useButton_unstable","components","root","icon","resolveShorthand","required","iconOnly","Boolean","children"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;gCACU;uBACE;AAM5B,MAAMA,6BAA6B,CAAC,EACzCC,iBAAgB,EAChBC,iBAAgB,EAChB,GAAGC,OACJ,EAAEC,MAAQ;IACT,IAAIC,aAAaC;IACjB,MAAMC,QAAQ;QACZ,eAAe;QACf,GAAGC,IAAAA,yBAAkB,EAACL,OAAOC,IAAI;QACjC,mBAAmB;QACnBK,YAAY;YACVC,MAAM;YACNC,MAAM;YACNV,kBAAkB;YAClBC,kBAAkB;QACpB;QACAD,kBAAkBW,IAAAA,gCAAgB,EAACX,kBAAkB;YACnDY,UAAU,IAAI;QAChB;QACAX,kBAAkBU,IAAAA,gCAAgB,EAACV;IACrC;IACA,8DAA8D;IAC9DK,MAAMO,QAAQ,GAAGC,QAAQ,AAAC,CAAA,AAACV,CAAAA,cAAcE,MAAMI,IAAI,AAAD,MAAO,IAAI,IAAIN,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYW,QAAQ,AAAD,KAAM,CAACb,MAAMa,QAAQ,IAAI,CAAE,CAAA,AAACV,CAAAA,0BAA0BC,MAAML,gBAAgB,AAAD,MAAO,IAAI,IAAII,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBU,QAAQ,AAAD;IAC7R,OAAOT;AACT,GACA,6CAA6C"}
1
+ {"version":3,"sources":["../../../lib/components/CompoundButton/useCompoundButton.js"],"sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */ export const useCompoundButton_unstable = ({ contentContainer , secondaryContent , ...props }, ref)=>{\n var _state_icon, _state_secondaryContent;\n const state = {\n // Button state\n ...useButton_unstable(props, ref),\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span'\n },\n contentContainer: resolveShorthand(contentContainer, {\n required: true\n }),\n secondaryContent: resolveShorthand(secondaryContent)\n };\n // Recalculate iconOnly to take into account secondaryContent.\n state.iconOnly = Boolean(((_state_icon = state.icon) === null || _state_icon === void 0 ? void 0 : _state_icon.children) && !props.children && !((_state_secondaryContent = state.secondaryContent) === null || _state_secondaryContent === void 0 ? void 0 : _state_secondaryContent.children));\n return state;\n};\n\n//# sourceMappingURL=useCompoundButton.js.map"],"names":["useCompoundButton_unstable","contentContainer","secondaryContent","props","ref","_state_icon","_state_secondaryContent","state","useButton_unstable","components","root","icon","resolveShorthand","required","iconOnly","Boolean","children"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;gCACU;uBACE;AAKxB,MAAMA,6BAA6B,CAAC,EAAEC,iBAAgB,EAAGC,iBAAgB,EAAG,GAAGC,OAAO,EAAEC,MAAM;IACrG,IAAIC,aAAaC;IACjB,MAAMC,QAAQ;QACV,eAAe;QACf,GAAGC,IAAAA,yBAAkB,EAACL,OAAOC,IAAI;QACjC,mBAAmB;QACnBK,YAAY;YACRC,MAAM;YACNC,MAAM;YACNV,kBAAkB;YAClBC,kBAAkB;QACtB;QACAD,kBAAkBW,IAAAA,gCAAgB,EAACX,kBAAkB;YACjDY,UAAU,IAAI;QAClB;QACAX,kBAAkBU,IAAAA,gCAAgB,EAACV;IACvC;IACA,8DAA8D;IAC9DK,MAAMO,QAAQ,GAAGC,QAAQ,AAAC,CAAA,AAACV,CAAAA,cAAcE,MAAMI,IAAI,AAAD,MAAO,IAAI,IAAIN,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYW,QAAQ,AAAD,KAAM,CAACb,MAAMa,QAAQ,IAAI,CAAE,CAAA,AAACV,CAAAA,0BAA0BC,MAAML,gBAAgB,AAAD,MAAO,IAAI,IAAII,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBU,QAAQ,AAAD;IAC7R,OAAOT;AACX,GAEA,6CAA6C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/MenuButton/MenuButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close\n * menus.\n */\nexport const MenuButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useMenuButton_unstable(props, ref);\n useMenuButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuButtonStyles_unstable')(state);\n return renderMenuButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n});\n\nMenuButton.displayName = 'MenuButton';\n//# sourceMappingURL=MenuButton.js.map"],"names":["MenuButton","React","forwardRef","props","ref","state","useMenuButton_unstable","useMenuButtonStyles_unstable","useCustomStyleHook_unstable","renderMenuButton_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;kCACmB;+BACH;2CACM;qCACD;AAKrC,MAAMA,aAAa,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACtE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5CG,IAAAA,uDAA4B,EAACF;IAC7BG,IAAAA,gDAA2B,EAAC,gCAAgCH;IAC5D,OAAOI,IAAAA,2CAAyB,EAACJ;AACjC,0FAA0F;AAC5F;AAEAL,WAAWU,WAAW,GAAG,cACzB,sCAAsC"}
1
+ {"version":3,"sources":["../../../lib/components/MenuButton/MenuButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * MenuButtons are buttons that have a chevron icon after the button contents and are usually clicked to open/close\n * menus.\n */ export const MenuButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useMenuButton_unstable(props, ref);\n useMenuButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useMenuButtonStyles_unstable')(state);\n return renderMenuButton_unstable(state);\n// Casting is required due to lack of distributive union to support unions on @types/react\n});\nMenuButton.displayName = 'MenuButton';\n\n//# sourceMappingURL=MenuButton.js.map"],"names":["MenuButton","React","forwardRef","props","ref","state","useMenuButton_unstable","useMenuButtonStyles_unstable","useCustomStyleHook_unstable","renderMenuButton_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;kCACmB;+BACH;2CACM;qCACD;AAIjC,MAAMA,aAAa,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACvE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5CG,IAAAA,uDAA4B,EAACF;IAC7BG,IAAAA,gDAA2B,EAAC,gCAAgCH;IAC5D,OAAOI,IAAAA,2CAAyB,EAACJ;AACrC,0FAA0F;AAC1F;AACAL,WAAWU,WAAW,GAAG,cAEzB,sCAAsC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/MenuButton/MenuButton.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=MenuButton.types.js.map"],"names":[],"mappings":";;;;CACA,4CAA4C"}
1
+ {"version":3,"sources":["../../../lib/components/MenuButton/MenuButton.types.js"],"sourcesContent":["export { };\n\n//# sourceMappingURL=MenuButton.types.js.map"],"names":[],"mappings":";;;;CAEA,4CAA4C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/MenuButton/index.js"],"sourcesContent":["export * from './MenuButton.types';\nexport * from './MenuButton';\nexport * from './renderMenuButton';\nexport * from './useMenuButton';\nexport { menuButtonClassNames, useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":["menuButtonClassNames","useMenuButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,oBAAoB,MAApBA,+CAAoB;IAAEC,4BAA4B,MAA5BA,uDAA4B;;;oBAJ7C;oBACA;oBACA;oBACA;2CACqD;CACnE,iCAAiC"}
1
+ {"version":3,"sources":["../../../lib/components/MenuButton/index.js"],"sourcesContent":["export * from './MenuButton.types';\nexport * from './MenuButton';\nexport * from './renderMenuButton';\nexport * from './useMenuButton';\nexport { menuButtonClassNames, useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\n\n//# sourceMappingURL=index.js.map"],"names":["menuButtonClassNames","useMenuButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,oBAAoB,MAApBA,+CAAoB;IAAEC,4BAA4B,MAA5BA,uDAA4B;;;oBAJ7C;oBACA;oBACA;oBACA;2CACqD;CAEnE,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/MenuButton/renderMenuButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderMenuButton_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n const {\n icon,\n iconOnly\n } = state;\n return /*#__PURE__*/createElement(slots.root, slotProps.root, slots.icon && /*#__PURE__*/createElement(slots.icon, slotProps.icon), !iconOnly && slotProps.root.children, (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && slots.menuIcon && /*#__PURE__*/createElement(slots.menuIcon, slotProps.menuIcon));\n};\n//# sourceMappingURL=renderMenuButton.js.map"],"names":["renderMenuButton_unstable","state","slots","slotProps","getSlotsNext","icon","iconOnly","createElement","root","children","menuIcon"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,4BAA4BC,CAAAA,QAAS;IAChD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,MAAM,EACJI,KAAI,EACJC,SAAQ,EACT,GAAGL;IACJ,OAAO,WAAW,GAAEM,IAAAA,8BAAa,EAACL,MAAMM,IAAI,EAAEL,UAAUK,IAAI,EAAEN,MAAMG,IAAI,IAAI,WAAW,GAAEE,IAAAA,8BAAa,EAACL,MAAMG,IAAI,EAAEF,UAAUE,IAAI,GAAG,CAACC,YAAYH,UAAUK,IAAI,CAACC,QAAQ,EAAE,AAAC,CAAA,CAACH,YAAY,CAAED,CAAAA,SAAS,IAAI,IAAIA,SAAS,KAAK,IAAI,KAAK,IAAIA,KAAKI,QAAQ,AAAD,CAAC,KAAMP,MAAMQ,QAAQ,IAAI,WAAW,GAAEH,IAAAA,8BAAa,EAACL,MAAMQ,QAAQ,EAAEP,UAAUO,QAAQ;AAC1U,GACA,4CAA4C"}
1
+ {"version":3,"sources":["../../../lib/components/MenuButton/renderMenuButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */ export const renderMenuButton_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n const { icon , iconOnly } = state;\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.icon && /*#__PURE__*/ createElement(slots.icon, slotProps.icon), !iconOnly && slotProps.root.children, (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && slots.menuIcon && /*#__PURE__*/ createElement(slots.menuIcon, slotProps.menuIcon));\n};\n\n//# sourceMappingURL=renderMenuButton.js.map"],"names":["renderMenuButton_unstable","state","slots","slotProps","getSlotsNext","icon","iconOnly","createElement","root","children","menuIcon"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,4BAA4B,CAACC,QAAQ;IAClD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,MAAM,EAAEI,KAAI,EAAGC,SAAQ,EAAG,GAAGL;IAC7B,OAAO,WAAW,GAAGM,IAAAA,8BAAa,EAACL,MAAMM,IAAI,EAAEL,UAAUK,IAAI,EAAEN,MAAMG,IAAI,IAAI,WAAW,GAAGE,IAAAA,8BAAa,EAACL,MAAMG,IAAI,EAAEF,UAAUE,IAAI,GAAG,CAACC,YAAYH,UAAUK,IAAI,CAACC,QAAQ,EAAE,AAAC,CAAA,CAACH,YAAY,CAAED,CAAAA,SAAS,IAAI,IAAIA,SAAS,KAAK,IAAI,KAAK,IAAIA,KAAKI,QAAQ,AAAD,CAAC,KAAMP,MAAMQ,QAAQ,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACL,MAAMQ,QAAQ,EAAEP,UAAUO,QAAQ;AAC/U,GAEA,4CAA4C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/MenuButton/useMenuButton.js"],"sourcesContent":["import * as React from 'react';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\n/**\n * Given user props, returns the final state for a MenuButton.\n */\nexport const useMenuButton_unstable = ({\n menuIcon,\n ...props\n}, ref) => {\n const buttonState = useButton_unstable(props, ref);\n var _props_ariaexpanded;\n buttonState.root['aria-expanded'] = (_props_ariaexpanded = props['aria-expanded']) !== null && _props_ariaexpanded !== void 0 ? _props_ariaexpanded : false;\n return {\n // Button state\n ...buttonState,\n // State calculated from a set of props\n iconOnly: Boolean(!props.children),\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n menuIcon: 'span'\n },\n menuIcon: resolveShorthand(menuIcon, {\n defaultProps: {\n children: /*#__PURE__*/React.createElement(ChevronDownRegular, null)\n },\n required: true\n })\n };\n};\n//# sourceMappingURL=useMenuButton.js.map"],"names":["useMenuButton_unstable","menuIcon","props","ref","buttonState","useButton_unstable","_props_ariaexpanded","root","iconOnly","Boolean","children","components","icon","resolveShorthand","defaultProps","React","createElement","ChevronDownRegular","required"],"mappings":";;;;+BAOaA;;aAAAA;;;6DAPU;4BACY;gCACF;uBACE;AAI5B,MAAMA,yBAAyB,CAAC,EACrCC,SAAQ,EACR,GAAGC,OACJ,EAAEC,MAAQ;IACT,MAAMC,cAAcC,IAAAA,yBAAkB,EAACH,OAAOC;IAC9C,IAAIG;IACJF,YAAYG,IAAI,CAAC,gBAAgB,GAAG,AAACD,CAAAA,sBAAsBJ,KAAK,CAAC,gBAAgB,AAAD,MAAO,IAAI,IAAII,wBAAwB,KAAK,IAAIA,sBAAsB,KAAK;IAC3J,OAAO;QACL,eAAe;QACf,GAAGF,WAAW;QACd,uCAAuC;QACvCI,UAAUC,QAAQ,CAACP,MAAMQ,QAAQ;QACjC,mBAAmB;QACnBC,YAAY;YACVJ,MAAM;YACNK,MAAM;YACNX,UAAU;QACZ;QACAA,UAAUY,IAAAA,gCAAgB,EAACZ,UAAU;YACnCa,cAAc;gBACZJ,UAAU,WAAW,GAAEK,OAAMC,aAAa,CAACC,8BAAkB,EAAE,IAAI;YACrE;YACAC,UAAU,IAAI;QAChB;IACF;AACF,GACA,yCAAyC"}
1
+ {"version":3,"sources":["../../../lib/components/MenuButton/useMenuButton.js"],"sourcesContent":["import * as React from 'react';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\n/**\n * Given user props, returns the final state for a MenuButton.\n */ export const useMenuButton_unstable = ({ menuIcon , ...props }, ref)=>{\n const buttonState = useButton_unstable(props, ref);\n var _props_ariaexpanded;\n buttonState.root['aria-expanded'] = (_props_ariaexpanded = props['aria-expanded']) !== null && _props_ariaexpanded !== void 0 ? _props_ariaexpanded : false;\n return {\n // Button state\n ...buttonState,\n // State calculated from a set of props\n iconOnly: Boolean(!props.children),\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n menuIcon: 'span'\n },\n menuIcon: resolveShorthand(menuIcon, {\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(ChevronDownRegular, null)\n },\n required: true\n })\n };\n};\n\n//# sourceMappingURL=useMenuButton.js.map"],"names":["useMenuButton_unstable","menuIcon","props","ref","buttonState","useButton_unstable","_props_ariaexpanded","root","iconOnly","Boolean","children","components","icon","resolveShorthand","defaultProps","React","createElement","ChevronDownRegular","required"],"mappings":";;;;+BAMiBA;;aAAAA;;;6DANM;4BACY;gCACF;uBACE;AAGxB,MAAMA,yBAAyB,CAAC,EAAEC,SAAQ,EAAG,GAAGC,OAAO,EAAEC,MAAM;IACtE,MAAMC,cAAcC,IAAAA,yBAAkB,EAACH,OAAOC;IAC9C,IAAIG;IACJF,YAAYG,IAAI,CAAC,gBAAgB,GAAG,AAACD,CAAAA,sBAAsBJ,KAAK,CAAC,gBAAgB,AAAD,MAAO,IAAI,IAAII,wBAAwB,KAAK,IAAIA,sBAAsB,KAAK;IAC3J,OAAO;QACH,eAAe;QACf,GAAGF,WAAW;QACd,uCAAuC;QACvCI,UAAUC,QAAQ,CAACP,MAAMQ,QAAQ;QACjC,mBAAmB;QACnBC,YAAY;YACRJ,MAAM;YACNK,MAAM;YACNX,UAAU;QACd;QACAA,UAAUY,IAAAA,gCAAgB,EAACZ,UAAU;YACjCa,cAAc;gBACVJ,UAAU,WAAW,GAAGK,OAAMC,aAAa,CAACC,8BAAkB,EAAE,IAAI;YACxE;YACAC,UAAU,IAAI;QAClB;IACJ;AACJ,GAEA,yCAAyC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/SplitButton/SplitButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderSplitButton_unstable } from './renderSplitButton';\nimport { useSplitButton_unstable } from './useSplitButton';\nimport { useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary\n * action, while interacting with the second one opens a menu with secondary actions.\n */\nexport const SplitButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useSplitButton_unstable(props, ref);\n useSplitButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useSplitButtonStyles_unstable')(state);\n return renderSplitButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n});\n\nSplitButton.displayName = 'SplitButton';\n//# sourceMappingURL=SplitButton.js.map"],"names":["SplitButton","React","forwardRef","props","ref","state","useSplitButton_unstable","useSplitButtonStyles_unstable","useCustomStyleHook_unstable","renderSplitButton_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;mCACoB;gCACH;4CACM;qCACF;AAKrC,MAAMA,cAAc,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACvE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AAClC,0FAA0F;AAC5F;AAEAL,YAAYU,WAAW,GAAG,eAC1B,uCAAuC"}
1
+ {"version":3,"sources":["../../../lib/components/SplitButton/SplitButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderSplitButton_unstable } from './renderSplitButton';\nimport { useSplitButton_unstable } from './useSplitButton';\nimport { useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * SplitButtons are a grouping of two interactive surfaces where interacting with the first one triggers a primary\n * action, while interacting with the second one opens a menu with secondary actions.\n */ export const SplitButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useSplitButton_unstable(props, ref);\n useSplitButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useSplitButtonStyles_unstable')(state);\n return renderSplitButton_unstable(state);\n// Casting is required due to lack of distributive union to support unions on @types/react\n});\nSplitButton.displayName = 'SplitButton';\n\n//# sourceMappingURL=SplitButton.js.map"],"names":["SplitButton","React","forwardRef","props","ref","state","useSplitButton_unstable","useSplitButtonStyles_unstable","useCustomStyleHook_unstable","renderSplitButton_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;mCACoB;gCACH;4CACM;qCACF;AAIjC,MAAMA,cAAc,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACxE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,iCAAiCH;IAC7D,OAAOI,IAAAA,6CAA0B,EAACJ;AACtC,0FAA0F;AAC1F;AACAL,YAAYU,WAAW,GAAG,eAE1B,uCAAuC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/SplitButton/SplitButton.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=SplitButton.types.js.map"],"names":[],"mappings":";;;;CACA,6CAA6C"}
1
+ {"version":3,"sources":["../../../lib/components/SplitButton/SplitButton.types.js"],"sourcesContent":["export { };\n\n//# sourceMappingURL=SplitButton.types.js.map"],"names":[],"mappings":";;;;CAEA,6CAA6C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/SplitButton/index.js"],"sourcesContent":["export * from './SplitButton';\nexport * from './SplitButton.types';\nexport * from './renderSplitButton';\nexport * from './useSplitButton';\nexport { splitButtonClassNames, useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":["splitButtonClassNames","useSplitButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,qBAAqB,MAArBA,iDAAqB;IAAEC,6BAA6B,MAA7BA,yDAA6B;;;oBAJ/C;oBACA;oBACA;oBACA;4CACuD;CACrE,iCAAiC"}
1
+ {"version":3,"sources":["../../../lib/components/SplitButton/index.js"],"sourcesContent":["export * from './SplitButton';\nexport * from './SplitButton.types';\nexport * from './renderSplitButton';\nexport * from './useSplitButton';\nexport { splitButtonClassNames, useSplitButtonStyles_unstable } from './useSplitButtonStyles.styles';\n\n//# sourceMappingURL=index.js.map"],"names":["splitButtonClassNames","useSplitButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,qBAAqB,MAArBA,iDAAqB;IAAEC,6BAA6B,MAA7BA,yDAA6B;;;oBAJ/C;oBACA;oBACA;oBACA;4CACuD;CAErE,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/SplitButton/renderSplitButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a SplitButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderSplitButton_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n return /*#__PURE__*/createElement(slots.root, slotProps.root, slots.primaryActionButton && /*#__PURE__*/createElement(slots.primaryActionButton, slotProps.primaryActionButton), slots.menuButton && /*#__PURE__*/createElement(slots.menuButton, slotProps.menuButton));\n};\n//# sourceMappingURL=renderSplitButton.js.map"],"names":["renderSplitButton_unstable","state","slots","slotProps","getSlotsNext","createElement","root","primaryActionButton","menuButton"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,6BAA6BC,CAAAA,QAAS;IACjD,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACH;IACjB,OAAO,WAAW,GAAEI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAEJ,MAAMK,mBAAmB,IAAI,WAAW,GAAEF,IAAAA,8BAAa,EAACH,MAAMK,mBAAmB,EAAEJ,UAAUI,mBAAmB,GAAGL,MAAMM,UAAU,IAAI,WAAW,GAAEH,IAAAA,8BAAa,EAACH,MAAMM,UAAU,EAAEL,UAAUK,UAAU;AACxQ,GACA,6CAA6C"}
1
+ {"version":3,"sources":["../../../lib/components/SplitButton/renderSplitButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Renders a SplitButton component by passing the state defined props to the appropriate slots.\n */ export const renderSplitButton_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.primaryActionButton && /*#__PURE__*/ createElement(slots.primaryActionButton, slotProps.primaryActionButton), slots.menuButton && /*#__PURE__*/ createElement(slots.menuButton, slotProps.menuButton));\n};\n\n//# sourceMappingURL=renderSplitButton.js.map"],"names":["renderSplitButton_unstable","state","slots","slotProps","getSlotsNext","createElement","root","primaryActionButton","menuButton"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,6BAA6B,CAACC,QAAQ;IACnD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAEJ,MAAMK,mBAAmB,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACH,MAAMK,mBAAmB,EAAEJ,UAAUI,mBAAmB,GAAGL,MAAMM,UAAU,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMM,UAAU,EAAEL,UAAUK,UAAU;AAC7Q,GAEA,6CAA6C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/SplitButton/useSplitButton.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */\nexport const useSplitButton_unstable = (props, ref) => {\n const {\n appearance = 'secondary',\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium'\n } = props;\n const baseId = useId('splitButton-');\n const menuButtonShorthand = resolveShorthand(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size\n },\n required: true\n });\n const primaryActionButtonShorthand = resolveShorthand(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size\n },\n required: true\n });\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided\n // by the user.\n if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n // Slots definition\n components: {\n root: 'div',\n menuButton: MenuButton,\n primaryActionButton: Button\n },\n root: getNativeElementProps('div', {\n ref,\n ...props\n }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand\n };\n};\n//# sourceMappingURL=useSplitButton.js.map"],"names":["useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","useId","menuButtonShorthand","resolveShorthand","defaultProps","required","primaryActionButtonShorthand","id","components","root","MenuButton","Button","getNativeElementProps"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;gCACwC;wBACxC;4BACI;AAMpB,MAAMA,0BAA0B,CAACC,OAAOC,MAAQ;IACrD,MAAM,EACJC,YAAa,YAAW,EACxBC,SAAQ,EACRC,UAAW,KAAK,CAAA,EAChBC,mBAAoB,KAAK,CAAA,EACzBC,KAAI,EACJC,cAAe,SAAQ,EACvBC,WAAU,EACVC,SAAQ,EACRC,oBAAmB,EACnBC,OAAQ,UAAS,EACjBC,MAAO,SAAQ,EAChB,GAAGZ;IACJ,MAAMa,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAMC,sBAAsBC,IAAAA,gCAAgB,EAACR,YAAY;QACvDS,cAAc;YACZf;YACAE;YACAC;YACAI;YACAE;YACAC;QACF;QACAM,UAAU,IAAI;IAChB;IACA,MAAMC,+BAA+BH,IAAAA,gCAAgB,EAACN,qBAAqB;QACzEO,cAAc;YACZf;YACAC;YACAC;YACAC;YACAC;YACAC;YACAa,IAAIP,SAAS;YACbF;YACAC;QACF;QACAM,UAAU,IAAI;IAChB;IACA,oHAAoH;IACpH,eAAe;IACf,IAAIH,uBAAuBI,gCAAgC,CAACJ,mBAAmB,CAAC,aAAa,IAAI,CAACA,mBAAmB,CAAC,kBAAkB,EAAE;QACxIA,mBAAmB,CAAC,kBAAkB,GAAGI,6BAA6BC,EAAE;IAC1E,CAAC;IACD,OAAO;QACL,gCAAgC;QAChClB;QACAE;QACAC;QACAE;QACAI;QACAC;QACA,mBAAmB;QACnBS,YAAY;YACVC,MAAM;YACNd,YAAYe,sBAAU;YACtBb,qBAAqBc,cAAM;QAC7B;QACAF,MAAMG,IAAAA,qCAAqB,EAAC,OAAO;YACjCxB;YACA,GAAGD,KAAK;QACV;QACAQ,YAAYO;QACZL,qBAAqBS;IACvB;AACF,GACA,0CAA0C"}
1
+ {"version":3,"sources":["../../../lib/components/SplitButton/useSplitButton.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */ export const useSplitButton_unstable = (props, ref)=>{\n const { appearance ='secondary' , children , disabled =false , disabledFocusable =false , icon , iconPosition ='before' , menuButton , menuIcon , primaryActionButton , shape ='rounded' , size ='medium' } = props;\n const baseId = useId('splitButton-');\n const menuButtonShorthand = resolveShorthand(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size\n },\n required: true\n });\n const primaryActionButtonShorthand = resolveShorthand(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size\n },\n required: true\n });\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided\n // by the user.\n if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n // Slots definition\n components: {\n root: 'div',\n menuButton: MenuButton,\n primaryActionButton: Button\n },\n root: getNativeElementProps('div', {\n ref,\n ...props\n }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand\n };\n};\n\n//# sourceMappingURL=useSplitButton.js.map"],"names":["useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","useId","menuButtonShorthand","resolveShorthand","defaultProps","required","primaryActionButtonShorthand","id","components","root","MenuButton","Button","getNativeElementProps"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;gCACwC;wBACxC;4BACI;AAKhB,MAAMA,0BAA0B,CAACC,OAAOC,MAAM;IACrD,MAAM,EAAEC,YAAY,YAAW,EAAGC,SAAQ,EAAGC,UAAU,KAAK,CAAA,EAAGC,mBAAmB,KAAK,CAAA,EAAGC,KAAI,EAAGC,cAAc,SAAQ,EAAGC,WAAU,EAAGC,SAAQ,EAAGC,oBAAmB,EAAGC,OAAO,UAAS,EAAGC,MAAM,SAAQ,EAAG,GAAGZ;IAC/M,MAAMa,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAMC,sBAAsBC,IAAAA,gCAAgB,EAACR,YAAY;QACrDS,cAAc;YACVf;YACAE;YACAC;YACAI;YACAE;YACAC;QACJ;QACAM,UAAU,IAAI;IAClB;IACA,MAAMC,+BAA+BH,IAAAA,gCAAgB,EAACN,qBAAqB;QACvEO,cAAc;YACVf;YACAC;YACAC;YACAC;YACAC;YACAC;YACAa,IAAIP,SAAS;YACbF;YACAC;QACJ;QACAM,UAAU,IAAI;IAClB;IACA,oHAAoH;IACpH,eAAe;IACf,IAAIH,uBAAuBI,gCAAgC,CAACJ,mBAAmB,CAAC,aAAa,IAAI,CAACA,mBAAmB,CAAC,kBAAkB,EAAE;QACtIA,mBAAmB,CAAC,kBAAkB,GAAGI,6BAA6BC,EAAE;IAC5E,CAAC;IACD,OAAO;QACH,gCAAgC;QAChClB;QACAE;QACAC;QACAE;QACAI;QACAC;QACA,mBAAmB;QACnBS,YAAY;YACRC,MAAM;YACNd,YAAYe,sBAAU;YACtBb,qBAAqBc,cAAM;QAC/B;QACAF,MAAMG,IAAAA,qCAAqB,EAAC,OAAO;YAC/BxB;YACA,GAAGD,KAAK;QACZ;QACAQ,YAAYO;QACZL,qBAAqBS;IACzB;AACJ,GAEA,0CAA0C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ToggleButton/ToggleButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\nexport const ToggleButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n useToggleButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useToggleButtonStyles_unstable')(state);\n return renderToggleButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n});\n\nToggleButton.displayName = 'ToggleButton';\n//# sourceMappingURL=ToggleButton.js.map"],"names":["ToggleButton","React","forwardRef","props","ref","state","useToggleButton_unstable","useToggleButtonStyles_unstable","useCustomStyleHook_unstable","renderToggleButton_unstable","displayName"],"mappings":";;;;+BAQaA;;aAAAA;;;6DARU;oCACqB;iCACH;6CACM;qCACH;AAIrC,MAAMA,eAAe,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACxE,MAAMC,QAAQC,IAAAA,yCAAwB,EAACH,OAAOC;IAC9CG,IAAAA,2DAA8B,EAACF;IAC/BG,IAAAA,gDAA2B,EAAC,kCAAkCH;IAC9D,OAAOI,IAAAA,+CAA2B,EAACJ;AACnC,0FAA0F;AAC5F;AAEAL,aAAaU,WAAW,GAAG,gBAC3B,wCAAwC"}
1
+ {"version":3,"sources":["../../../lib/components/ToggleButton/ToggleButton.js"],"sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */ export const ToggleButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToggleButton_unstable(props, ref);\n useToggleButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useToggleButtonStyles_unstable')(state);\n return renderToggleButton_unstable(state);\n// Casting is required due to lack of distributive union to support unions on @types/react\n});\nToggleButton.displayName = 'ToggleButton';\n\n//# sourceMappingURL=ToggleButton.js.map"],"names":["ToggleButton","React","forwardRef","props","ref","state","useToggleButton_unstable","useToggleButtonStyles_unstable","useCustomStyleHook_unstable","renderToggleButton_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;oCACqB;iCACH;6CACM;qCACH;AAGjC,MAAMA,eAAe,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACzE,MAAMC,QAAQC,IAAAA,yCAAwB,EAACH,OAAOC;IAC9CG,IAAAA,2DAA8B,EAACF;IAC/BG,IAAAA,gDAA2B,EAAC,kCAAkCH;IAC9D,OAAOI,IAAAA,+CAA2B,EAACJ;AACvC,0FAA0F;AAC1F;AACAL,aAAaU,WAAW,GAAG,gBAE3B,wCAAwC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ToggleButton/ToggleButton.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=ToggleButton.types.js.map"],"names":[],"mappings":";;;;CACA,8CAA8C"}
1
+ {"version":3,"sources":["../../../lib/components/ToggleButton/ToggleButton.types.js"],"sourcesContent":["export { };\n\n//# sourceMappingURL=ToggleButton.types.js.map"],"names":[],"mappings":";;;;CAEA,8CAA8C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ToggleButton/index.js"],"sourcesContent":["export * from './ToggleButton';\nexport * from './ToggleButton.types';\nexport * from './renderToggleButton';\nexport * from './useToggleButton';\nexport { toggleButtonClassNames, useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":["toggleButtonClassNames","useToggleButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,sBAAsB,MAAtBA,mDAAsB;IAAEC,8BAA8B,MAA9BA,2DAA8B;;;oBAJjD;oBACA;oBACA;oBACA;6CACyD;CACvE,iCAAiC"}
1
+ {"version":3,"sources":["../../../lib/components/ToggleButton/index.js"],"sourcesContent":["export * from './ToggleButton';\nexport * from './ToggleButton.types';\nexport * from './renderToggleButton';\nexport * from './useToggleButton';\nexport { toggleButtonClassNames, useToggleButtonStyles_unstable } from './useToggleButtonStyles.styles';\n\n//# sourceMappingURL=index.js.map"],"names":["toggleButtonClassNames","useToggleButtonStyles_unstable"],"mappings":";;;;;;;;;;;IAISA,sBAAsB,MAAtBA,mDAAsB;IAAEC,8BAA8B,MAA9BA,2DAA8B;;;oBAJjD;oBACA;oBACA;oBACA;6CACyD;CAEvE,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ToggleButton/renderToggleButton.js"],"sourcesContent":["export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';\n//# sourceMappingURL=renderToggleButton.js.map"],"names":["renderToggleButton_unstable","renderButton_unstable"],"mappings":";;;;+BAAkCA;;aAAzBC,mCAAqB;;8BAAuC;CACrE,8CAA8C"}
1
+ {"version":3,"sources":["../../../lib/components/ToggleButton/renderToggleButton.js"],"sourcesContent":["export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';\n\n//# sourceMappingURL=renderToggleButton.js.map"],"names":["renderToggleButton_unstable","renderButton_unstable"],"mappings":";;;;+BAAkCA;;aAAzBC,mCAAqB;;8BAAuC;CAErE,8CAA8C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/ToggleButton/useToggleButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButton_unstable } from '../Button/useButton';\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton_unstable = (props, ref) => {\n const buttonState = useButton_unstable(props, ref);\n return useToggleState(props, buttonState);\n};\n//# sourceMappingURL=useToggleButton.js.map"],"names":["useToggleButton_unstable","props","ref","buttonState","useButton_unstable","useToggleState"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;gCACQ;2BACI;AAO5B,MAAMA,2BAA2B,CAACC,OAAOC,MAAQ;IACtD,MAAMC,cAAcC,IAAAA,6BAAkB,EAACH,OAAOC;IAC9C,OAAOG,IAAAA,8BAAc,EAACJ,OAAOE;AAC/B,GACA,2CAA2C"}
1
+ {"version":3,"sources":["../../../lib/components/ToggleButton/useToggleButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButton_unstable } from '../Button/useButton';\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */ export const useToggleButton_unstable = (props, ref)=>{\n const buttonState = useButton_unstable(props, ref);\n return useToggleState(props, buttonState);\n};\n\n//# sourceMappingURL=useToggleButton.js.map"],"names":["useToggleButton_unstable","props","ref","buttonState","useButton_unstable","useToggleState"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;gCACQ;2BACI;AAMxB,MAAMA,2BAA2B,CAACC,OAAOC,MAAM;IACtD,MAAMC,cAAcC,IAAAA,6BAAkB,EAACH,OAAOC;IAC9C,OAAOG,IAAAA,8BAAc,EAACJ,OAAOE;AACjC,GAEA,2CAA2C"}
@@ -1 +1 @@
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
+ {"version":3,"sources":["../../lib/contexts/ButtonContext.js"],"sourcesContent":["import * as React from 'react';\nconst buttonContext = React.createContext(undefined);\nconst buttonContextDefaultValue = {};\n/**\n * @internal\n * Internal context provider used to update default values between internal components\n */ export const ButtonContextProvider = buttonContext.Provider;\nvar _React_useContext;\n/**\n * @internal\n * Internal context hook used to update default values between internal components\n */ export const useButtonContext = ()=>(_React_useContext = React.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;\n\n//# sourceMappingURL=ButtonContext.js.map"],"names":["ButtonContextProvider","useButtonContext","buttonContext","React","createContext","undefined","buttonContextDefaultValue","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAMiBA,qBAAqB,MAArBA;IAKAC,gBAAgB,MAAhBA;;;6DAXM;AACvB,MAAMC,8BAAgBC,OAAMC,aAAa,CAACC;AAC1C,MAAMC,4BAA4B,CAAC;AAIxB,MAAMN,wBAAwBE,cAAcK,QAAQ;AAC/D,IAAIC;AAIO,MAAMP,mBAAmB,IAAI,AAACO,CAAAA,oBAAoBL,OAAMM,UAAU,CAACP,cAAa,MAAO,IAAI,IAAIM,sBAAsB,KAAK,IAAIA,oBAAoBF,yBAAyB,EAEtL,yCAAyC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/contexts/index.js"],"sourcesContent":["export * from './ButtonContext';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
1
+ {"version":3,"sources":["../../lib/contexts/index.js"],"sourcesContent":["export * from './ButtonContext';\n\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CAEd,iCAAiC"}
@@ -1 +1 @@
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
+ {"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\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;CAExD,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './useToggleState';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,iCAAiC"}
1
+ {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './useToggleState';\n\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;CAEd,iCAAiC"}
@@ -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":["../../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 { 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\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;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,EAEA,0CAA0C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-button",
3
- "version": "0.0.0-nightly-20230526-0415.1",
3
+ "version": "0.0.0-nightly-20230530-0415.1",
4
4
  "description": "Fluent UI React Button component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -29,19 +29,19 @@
29
29
  "@fluentui/a11y-testing": "^0.1.0",
30
30
  "@fluentui/eslint-plugin": "*",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230526-0415.1",
32
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230530-0415.1",
33
33
  "@fluentui/scripts-api-extractor": "*",
34
34
  "@fluentui/scripts-tasks": "*"
35
35
  },
36
36
  "dependencies": {
37
- "@fluentui/keyboard-keys": "0.0.0-nightly-20230526-0415.1",
38
- "@fluentui/react-aria": "0.0.0-nightly-20230526-0415.1",
37
+ "@fluentui/keyboard-keys": "0.0.0-nightly-20230530-0415.1",
38
+ "@fluentui/react-aria": "0.0.0-nightly-20230530-0415.1",
39
39
  "@fluentui/react-icons": "^2.0.196",
40
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230526-0415.1",
41
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230526-0415.1",
42
- "@fluentui/react-tabster": "0.0.0-nightly-20230526-0415.1",
43
- "@fluentui/react-theme": "0.0.0-nightly-20230526-0415.1",
44
- "@fluentui/react-utilities": "0.0.0-nightly-20230526-0415.1",
40
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230530-0415.1",
41
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230530-0415.1",
42
+ "@fluentui/react-tabster": "0.0.0-nightly-20230530-0415.1",
43
+ "@fluentui/react-theme": "0.0.0-nightly-20230530-0415.1",
44
+ "@fluentui/react-utilities": "0.0.0-nightly-20230530-0415.1",
45
45
  "@griffel/react": "^1.5.2",
46
46
  "@swc/helpers": "^0.4.14"
47
47
  },