@fluentui/react-button 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. package/CHANGELOG.json +393 -24
  2. package/CHANGELOG.md +88 -18
  3. package/dist/react-button.d.ts +42 -34
  4. package/lib/components/Button/Button.js +7 -7
  5. package/lib/components/Button/Button.js.map +1 -1
  6. package/lib/components/Button/Button.types.d.ts +6 -6
  7. package/lib/components/Button/index.d.ts +2 -2
  8. package/lib/components/Button/index.js +1 -2
  9. package/lib/components/Button/index.js.map +1 -1
  10. package/lib/components/Button/renderButton.d.ts +1 -1
  11. package/lib/components/Button/renderButton.js +13 -9
  12. package/lib/components/Button/renderButton.js.map +1 -1
  13. package/lib/components/Button/useButton.d.ts +1 -1
  14. package/lib/components/Button/useButton.js +22 -25
  15. package/lib/components/Button/useButton.js.map +1 -1
  16. package/lib/components/Button/useButtonStyles.d.ts +2 -9
  17. package/lib/components/Button/useButtonStyles.js +118 -90
  18. package/lib/components/Button/useButtonStyles.js.map +1 -1
  19. package/lib/components/CompoundButton/CompoundButton.js +7 -7
  20. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  21. package/lib/components/CompoundButton/CompoundButton.types.d.ts +4 -4
  22. package/lib/components/CompoundButton/index.d.ts +1 -1
  23. package/lib/components/CompoundButton/index.js +1 -1
  24. package/lib/components/CompoundButton/index.js.map +1 -1
  25. package/lib/components/CompoundButton/renderCompoundButton.d.ts +1 -1
  26. package/lib/components/CompoundButton/renderCompoundButton.js +15 -9
  27. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  28. package/lib/components/CompoundButton/useCompoundButton.d.ts +1 -1
  29. package/lib/components/CompoundButton/useCompoundButton.js +9 -9
  30. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  31. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -1
  32. package/lib/components/CompoundButton/useCompoundButtonStyles.js +52 -48
  33. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  34. package/lib/components/MenuButton/MenuButton.js +7 -7
  35. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  36. package/lib/components/MenuButton/MenuButton.types.d.ts +3 -4
  37. package/lib/components/MenuButton/index.d.ts +1 -1
  38. package/lib/components/MenuButton/index.js +1 -1
  39. package/lib/components/MenuButton/index.js.map +1 -1
  40. package/lib/components/MenuButton/renderMenuButton.d.ts +1 -1
  41. package/lib/components/MenuButton/renderMenuButton.js +13 -9
  42. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  43. package/lib/components/MenuButton/useMenuButton.d.ts +1 -1
  44. package/lib/components/MenuButton/useMenuButton.js +11 -11
  45. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  46. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +2 -1
  47. package/lib/components/MenuButton/useMenuButtonStyles.js +8 -6
  48. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  49. package/lib/components/SplitButton/SplitButton.js +7 -7
  50. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  51. package/lib/components/SplitButton/SplitButton.types.d.ts +6 -4
  52. package/lib/components/SplitButton/index.d.ts +1 -1
  53. package/lib/components/SplitButton/index.js +1 -1
  54. package/lib/components/SplitButton/index.js.map +1 -1
  55. package/lib/components/SplitButton/renderSplitButton.d.ts +1 -1
  56. package/lib/components/SplitButton/renderSplitButton.js +9 -7
  57. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  58. package/lib/components/SplitButton/useSplitButton.d.ts +1 -1
  59. package/lib/components/SplitButton/useSplitButton.js +41 -45
  60. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  61. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +2 -1
  62. package/lib/components/SplitButton/useSplitButtonStyles.js +38 -34
  63. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  64. package/lib/components/ToggleButton/ToggleButton.js +7 -7
  65. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  66. package/lib/components/ToggleButton/ToggleButton.types.d.ts +2 -1
  67. package/lib/components/ToggleButton/index.d.ts +1 -1
  68. package/lib/components/ToggleButton/index.js +1 -1
  69. package/lib/components/ToggleButton/index.js.map +1 -1
  70. package/lib/components/ToggleButton/renderToggleButton.d.ts +1 -1
  71. package/lib/components/ToggleButton/renderToggleButton.js +1 -1
  72. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  73. package/lib/components/ToggleButton/useToggleButton.d.ts +1 -1
  74. package/lib/components/ToggleButton/useToggleButton.js +32 -30
  75. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  76. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +2 -1
  77. package/lib/components/ToggleButton/useToggleButtonStyles.js +47 -43
  78. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  79. package/lib-commonjs/Button.js +1 -1
  80. package/lib-commonjs/CompoundButton.js +1 -1
  81. package/lib-commonjs/MenuButton.js +1 -1
  82. package/lib-commonjs/SplitButton.js +1 -1
  83. package/lib-commonjs/ToggleButton.js +1 -1
  84. package/lib-commonjs/components/Button/Button.js +8 -8
  85. package/lib-commonjs/components/Button/Button.js.map +1 -1
  86. package/lib-commonjs/components/Button/Button.types.d.ts +6 -6
  87. package/lib-commonjs/components/Button/index.d.ts +2 -2
  88. package/lib-commonjs/components/Button/index.js +10 -6
  89. package/lib-commonjs/components/Button/index.js.map +1 -1
  90. package/lib-commonjs/components/Button/renderButton.d.ts +1 -1
  91. package/lib-commonjs/components/Button/renderButton.js +17 -14
  92. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  93. package/lib-commonjs/components/Button/useButton.d.ts +1 -1
  94. package/lib-commonjs/components/Button/useButton.js +26 -29
  95. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  96. package/lib-commonjs/components/Button/useButtonStyles.d.ts +2 -9
  97. package/lib-commonjs/components/Button/useButtonStyles.js +121 -92
  98. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  99. package/lib-commonjs/components/CompoundButton/CompoundButton.js +8 -8
  100. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  101. package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +4 -4
  102. package/lib-commonjs/components/CompoundButton/index.d.ts +1 -1
  103. package/lib-commonjs/components/CompoundButton/index.js +10 -4
  104. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  105. package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +1 -1
  106. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +19 -14
  107. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  108. package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +1 -1
  109. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +12 -13
  110. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  111. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -1
  112. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +58 -53
  113. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  114. package/lib-commonjs/components/MenuButton/MenuButton.js +8 -8
  115. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  116. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +3 -4
  117. package/lib-commonjs/components/MenuButton/index.d.ts +1 -1
  118. package/lib-commonjs/components/MenuButton/index.js +10 -4
  119. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  120. package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +1 -1
  121. package/lib-commonjs/components/MenuButton/renderMenuButton.js +17 -14
  122. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  123. package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +1 -1
  124. package/lib-commonjs/components/MenuButton/useMenuButton.js +15 -16
  125. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  126. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +2 -1
  127. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +12 -9
  128. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  129. package/lib-commonjs/components/SplitButton/SplitButton.js +8 -8
  130. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  131. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +6 -4
  132. package/lib-commonjs/components/SplitButton/index.d.ts +1 -1
  133. package/lib-commonjs/components/SplitButton/index.js +10 -4
  134. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  135. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +1 -1
  136. package/lib-commonjs/components/SplitButton/renderSplitButton.js +13 -12
  137. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  138. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +1 -1
  139. package/lib-commonjs/components/SplitButton/useSplitButton.js +46 -51
  140. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  141. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +2 -1
  142. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +44 -39
  143. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  144. package/lib-commonjs/components/ToggleButton/ToggleButton.js +8 -8
  145. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  146. package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +2 -1
  147. package/lib-commonjs/components/ToggleButton/index.d.ts +1 -1
  148. package/lib-commonjs/components/ToggleButton/index.js +10 -4
  149. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  150. package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +1 -1
  151. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +3 -3
  152. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  153. package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +1 -1
  154. package/lib-commonjs/components/ToggleButton/useToggleButton.js +36 -35
  155. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  156. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +2 -1
  157. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +51 -45
  158. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  159. package/lib-commonjs/index.js +1 -1
  160. package/package.json +12 -15
  161. package/lib/common/isConformant.d.ts +0 -4
  162. package/lib/common/isConformant.js +0 -13
  163. package/lib/common/isConformant.js.map +0 -1
  164. package/lib-commonjs/common/isConformant.d.ts +0 -4
  165. package/lib-commonjs/common/isConformant.js +0 -24
  166. package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,yBAAA,CAAA,uBAAA;AAAuB;AAAvB,CAAA","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/CompoundButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,yBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,yBAAA,CAAA,uBAAA;AAAuB;AAAvB,CAAA;AAAyB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kCAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,yBAAA,CAAA,gCAAA;AAAgC;AAAhC,CAAA","sourceRoot":""}
@@ -2,4 +2,4 @@ import type { CompoundButtonState } from './CompoundButton.types';
2
2
  /**
3
3
  * Renders a CompoundButton component by passing the state defined props to the appropriate slots.
4
4
  */
5
- export declare const renderCompoundButton: (state: CompoundButtonState) => JSX.Element;
5
+ export declare const renderCompoundButton_unstable: (state: CompoundButtonState) => JSX.Element;
@@ -3,27 +3,32 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderCompoundButton = void 0;
6
+ exports.renderCompoundButton_unstable = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var React = /*#__PURE__*/require("react");
11
-
12
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
11
  /**
14
12
  * Renders a CompoundButton component by passing the state defined props to the appropriate slots.
15
13
  */
16
14
 
17
15
 
18
- var renderCompoundButton = function (state) {
19
- var _a = react_utilities_1.getSlots(state, ['root', 'contentContainer', 'icon', 'secondaryContent']),
20
- slots = _a.slots,
21
- slotProps = _a.slotProps;
22
-
23
- var iconOnly = state.iconOnly,
24
- iconPosition = state.iconPosition;
25
- return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), iconPosition !== 'after' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)), !iconOnly && React.createElement(slots.contentContainer, tslib_1.__assign({}, slotProps.contentContainer), slotProps.root.children, React.createElement(slots.secondaryContent, tslib_1.__assign({}, slotProps.secondaryContent))), iconPosition === 'after' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)));
16
+ const renderCompoundButton_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state);
21
+ const {
22
+ iconOnly,
23
+ iconPosition
24
+ } = state;
25
+ return React.createElement(slots.root, { ...slotProps.root
26
+ }, iconPosition !== 'after' && slots.icon && React.createElement(slots.icon, { ...slotProps.icon
27
+ }), !iconOnly && React.createElement(slots.contentContainer, { ...slotProps.contentContainer
28
+ }, slotProps.root.children, slots.secondaryContent && React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
29
+ })), iconPosition === 'after' && slots.icon && React.createElement(slots.icon, { ...slotProps.icon
30
+ }));
26
31
  };
27
32
 
28
- exports.renderCompoundButton = renderCompoundButton;
33
+ exports.renderCompoundButton_unstable = renderCompoundButton_unstable;
29
34
  //# sourceMappingURL=renderCompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/renderCompoundButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,oBAAoB,GAAG,UAAC,KAAD,EAA2B;AACvD,MAAA,EAAA,GAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,EAAqC,CAChE,MADgE,EAEhE,kBAFgE,EAGhE,MAHgE,EAIhE,kB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KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,CAA7B;AACA,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAA6B,KAAnC;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,IAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAD7C,EAEG,CAAC,QAAD,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAvB,CAF7B,CAHJ,EAQG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,IAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAR7C,CADF;AAYD,CAhBM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourceRoot":""}
@@ -5,4 +5,4 @@ import type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.
5
5
  * @param props - User provided props to the CompoundButton component.
6
6
  * @param ref - User provided ref to be passed to the CompoundButton component.
7
7
  */
8
- export declare const useCompoundButton: ({ contentContainer, secondaryContent, ...props }: CompoundButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => CompoundButtonState;
8
+ export declare const useCompoundButton_unstable: ({ contentContainer, secondaryContent, ...props }: CompoundButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => CompoundButtonState;
@@ -3,13 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useCompoundButton = void 0;
6
+ exports.useCompoundButton_unstable = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
9
 
10
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
- var index_1 = /*#__PURE__*/require("../Button/index");
10
+ const index_1 = /*#__PURE__*/require("../Button/index");
13
11
  /**
14
12
  * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.
15
13
  * @param props - User provided props to the CompoundButton component.
@@ -17,12 +15,13 @@ var index_1 = /*#__PURE__*/require("../Button/index");
17
15
  */
18
16
 
19
17
 
20
- var useCompoundButton = function (_a, ref) {
21
- var contentContainer = _a.contentContainer,
22
- secondaryContent = _a.secondaryContent,
23
- props = tslib_1.__rest(_a, ["contentContainer", "secondaryContent"]);
24
-
25
- return tslib_1.__assign(tslib_1.__assign({}, index_1.useButton(props, ref)), {
18
+ const useCompoundButton_unstable = ({
19
+ contentContainer,
20
+ secondaryContent,
21
+ ...props
22
+ }, ref) => {
23
+ return { // Button state
24
+ ...index_1.useButton_unstable(props, ref),
26
25
  // Slots definition
27
26
  components: {
28
27
  root: 'button',
@@ -34,8 +33,8 @@ var useCompoundButton = function (_a, ref) {
34
33
  required: true
35
34
  }),
36
35
  secondaryContent: react_utilities_1.resolveShorthand(secondaryContent)
37
- });
36
+ };
38
37
  };
39
38
 
40
- exports.useCompoundButton = useCompoundButton;
39
+ exports.useCompoundButton_unstable = useCompoundButton_unstable;
41
40
  //# sourceMappingURL=useCompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/useCompoundButton.ts"],"names":[],"mappings":";;;;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,IAAA,OAAA,gBAAA,OAAA,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,GAA1B,CAFE;AAIL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE,MAFI;AAGV,MAAA,gBAAgB,EAAE,MAHR;AAIV,MAAA,gBAAgB,EAAE;AAJR,KALP;AAWL,IAAA,gBAAgB,EAAE,iBAAA,CAAA,gBAAA,CAAiB,gBAAjB,EAAmC;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAnC,CAXb;AAYL,IAAA,gBAAgB,EAAE,iBAAA,CAAA,gBAAA,CAAiB,gBAAjB;AAZb,GAAP;AAcD,CAlBM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourceRoot":""}
@@ -1,2 +1,3 @@
1
1
  import type { CompoundButtonState } from './CompoundButton.types';
2
- export declare const useCompoundButtonStyles: (state: CompoundButtonState) => CompoundButtonState;
2
+ export declare const compoundButtonClassName = "fui-CompoundButton";
3
+ export declare const useCompoundButtonStyles_unstable: (state: CompoundButtonState) => CompoundButtonState;
@@ -3,76 +3,80 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useCompoundButtonStyles = void 0;
6
+ exports.useCompoundButtonStyles_unstable = exports.compoundButtonClassName = void 0;
7
7
 
8
- var react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
- var useButtonStyles_1 = /*#__PURE__*/require("../Button/useButtonStyles");
10
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
11
 
12
- var CompoundButtonClassNames = {
13
- secondaryContent: 'CompoundButton-secondaryContent'
12
+ const useButtonStyles_1 = /*#__PURE__*/require("../Button/useButtonStyles");
13
+
14
+ exports.compoundButtonClassName = 'fui-CompoundButton';
15
+ const CompoundButtonClassNames = {
16
+ secondaryContent: `${exports.compoundButtonClassName}-secondaryContent`
14
17
  };
15
18
 
16
- var useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
19
+ const useRootStyles = /*#__PURE__*/react_1.__styles({
17
20
  "base": {
18
- "rmohyg": "fsbu5mz",
21
+ "i8kkvl": "f4akndk",
22
+ "Belr9w4": "fe5j3v",
19
23
  "Bqenvij": "f11ysow2",
20
- "Bekya5a": "f1smw4j4",
21
- "Bi863bl": "f1b73140",
22
- "B7j81dy": "f19sbf7w"
24
+ "Bma4kx5": "f900oq5",
25
+ "l15nfm": "f8rpug0",
26
+ "n4n7rj": "fre7xro"
23
27
  },
24
28
  "outline": {},
25
29
  "primary": {
26
- "Bekya5a": "f1wrmfx5",
27
- "Bi863bl": "fl6im4w",
28
- "B7j81dy": "f1y0ndy"
30
+ "Bma4kx5": "f1ur7rb7",
31
+ "l15nfm": "f1itoici",
32
+ "n4n7rj": "f1uen3ov"
29
33
  },
30
34
  "subtle": {
31
- "Bekya5a": "f1smw4j4",
32
- "Bi863bl": "f182e9fe",
33
- "B7j81dy": "fdrkfd0"
35
+ "Bma4kx5": "f900oq5",
36
+ "l15nfm": "f1l9nom2",
37
+ "n4n7rj": "fvjq8kx"
34
38
  },
35
39
  "transparent": {
36
- "Bekya5a": "f1smw4j4",
37
- "Bi863bl": "f182e9fe",
38
- "B7j81dy": "fdrkfd0"
40
+ "Bma4kx5": "f900oq5",
41
+ "l15nfm": "f1l9nom2",
42
+ "n4n7rj": "fvjq8kx"
39
43
  },
40
44
  "small": {
41
45
  "z8tnut": "fp9bwmr",
42
46
  "z189sj": ["f19lj068", "f177v4lu"],
43
- "Byoj8tv": "f150uoa4",
47
+ "Byoj8tv": "f1fow5ox",
44
48
  "uwmqm3": ["f177v4lu", "f19lj068"],
45
49
  "Be2twd7": "fkhj508",
46
50
  "Bg96gwp": "f1i3iumi"
47
51
  },
48
52
  "medium": {
49
- "z8tnut": "f1kcqot9",
53
+ "z8tnut": "fbtff6s",
50
54
  "z189sj": ["f11qrl6u", "fjlbh76"],
51
- "Byoj8tv": "fpe6lb7",
55
+ "Byoj8tv": "fp67ikv",
52
56
  "uwmqm3": ["fjlbh76", "f11qrl6u"],
53
57
  "Be2twd7": "fkhj508",
54
58
  "Bg96gwp": "f1i3iumi"
55
59
  },
56
60
  "large": {
57
- "z8tnut": "fqag9an",
61
+ "z8tnut": "fm4bm3s",
58
62
  "z189sj": ["f1gbmcue", "f1rh9g5y"],
59
- "Byoj8tv": "fp67ikv",
63
+ "Byoj8tv": "fe2my4m",
60
64
  "uwmqm3": ["f1rh9g5y", "f1gbmcue"],
61
65
  "Be2twd7": "fod5ikn",
62
66
  "Bg96gwp": "faaz57k"
63
67
  },
64
68
  "disabled": {
65
- "Bekya5a": "f1ygg8x6",
66
- "Bi863bl": "fhtktt2",
67
- "B7j81dy": "f1v2jbe6"
69
+ "Bma4kx5": "fj9njph",
70
+ "l15nfm": "fr13fpv",
71
+ "n4n7rj": "f1xrf5v0"
68
72
  }
69
73
  }, {
70
- "d": [".fsbu5mz{gap:12px;}", ".f11ysow2{height:auto;}", ".f1smw4j4 .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2);}", ".f1wrmfx5 .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1kcqot9{padding-top:12px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fpe6lb7{padding-bottom:12px;}", ".fqag9an{padding-top:16px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fp67ikv{padding-bottom:16px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1ygg8x6 .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
71
- "h": [".f1b73140:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".fl6im4w:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f182e9fe:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".fhtktt2:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
72
- "a": [".f19sbf7w:active .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".f1y0ndy:active .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fdrkfd0:active .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".f1v2jbe6:active .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"]
74
+ "d": [".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".f11ysow2{height:auto;}", ".f900oq5 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2);}", ".f1ur7rb7 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1fow5ox{padding-bottom:10px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbtff6s{padding-top:14px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fp67ikv{padding-bottom:16px;}", ".fm4bm3s{padding-top:18px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fe2my4m{padding-bottom:20px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fj9njph .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
75
+ "h": [".f8rpug0:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".f1itoici:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1l9nom2:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".fr13fpv:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
76
+ "a": [".fre7xro:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".f1uen3ov:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fvjq8kx:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".f1xrf5v0:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"]
73
77
  });
74
78
 
75
- var useRootIconOnlyStyles = /*#__PURE__*/react_make_styles_1.__styles({
79
+ const useRootIconOnlyStyles = /*#__PURE__*/react_1.__styles({
76
80
  "small": {
77
81
  "z8tnut": "f10ra9hq",
78
82
  "z189sj": ["f8wuabp", "fycuoez"],
@@ -101,7 +105,7 @@ var useRootIconOnlyStyles = /*#__PURE__*/react_make_styles_1.__styles({
101
105
  "d": [".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".ft5vyj6{max-width:48px;}", ".f17suaiq{min-width:48px;}", ".f1xp5gbu{padding-top:6px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".fdczgix{max-width:52px;}", ".fjdcg9m{min-width:52px;}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".fww51uw{max-width:56px;}", ".f1qhsl2h{min-width:56px;}"]
102
106
  });
103
107
 
104
- var useIconStyles = /*#__PURE__*/react_make_styles_1.__styles({
108
+ const useIconStyles = /*#__PURE__*/react_1.__styles({
105
109
  "base": {
106
110
  "Be2twd7": "fndrnj9",
107
111
  "Bqenvij": "fbhnoac",
@@ -111,7 +115,7 @@ var useIconStyles = /*#__PURE__*/react_make_styles_1.__styles({
111
115
  "d": [".fndrnj9{font-size:40px;}", ".fbhnoac{height:40px;}", ".feqmc2u{width:40px;}"]
112
116
  });
113
117
 
114
- var useContentContainerStyles = /*#__PURE__*/react_make_styles_1.__styles({
118
+ const useContentContainerStyles = /*#__PURE__*/react_1.__styles({
115
119
  "base": {
116
120
  "mc9l5x": "f22iagw",
117
121
  "Beiy3e4": "f1vx9l62",
@@ -121,10 +125,9 @@ var useContentContainerStyles = /*#__PURE__*/react_make_styles_1.__styles({
121
125
  "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}"]
122
126
  });
123
127
 
124
- var useSecondaryContentStyles = /*#__PURE__*/react_make_styles_1.__styles({
128
+ const useSecondaryContentStyles = /*#__PURE__*/react_1.__styles({
125
129
  "base": {
126
130
  "Bg96gwp": "flkuc6h",
127
- "B6of3ja": "fvjh0tl",
128
131
  "Bhrd7zp": "figsok6"
129
132
  },
130
133
  "small": {
@@ -137,39 +140,41 @@ var useSecondaryContentStyles = /*#__PURE__*/react_make_styles_1.__styles({
137
140
  "Be2twd7": "fkhj508"
138
141
  }
139
142
  }, {
140
- "d": [".flkuc6h{line-height:100%;}", ".fvjh0tl{margin-top:4px;}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}"]
143
+ "d": [".flkuc6h{line-height:100%;}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}"]
141
144
  });
142
145
 
143
- var useCompoundButtonStyles = function (state) {
144
- var rootStyles = useRootStyles();
145
- var rootIconOnlyStyles = useRootIconOnlyStyles();
146
- var iconStyles = useIconStyles();
147
- var contentContainerStyles = useContentContainerStyles();
148
- var secondaryContentStyles = useSecondaryContentStyles();
149
- var appearance = state.appearance,
150
- disabled = state.disabled,
151
- disabledFocusable = state.disabledFocusable,
152
- iconOnly = state.iconOnly,
153
- size = state.size;
154
- state.root.className = react_make_styles_1.mergeClasses( // Root styles
146
+ const useCompoundButtonStyles_unstable = state => {
147
+ const rootStyles = useRootStyles();
148
+ const rootIconOnlyStyles = useRootIconOnlyStyles();
149
+ const iconStyles = useIconStyles();
150
+ const contentContainerStyles = useContentContainerStyles();
151
+ const secondaryContentStyles = useSecondaryContentStyles();
152
+ const {
153
+ appearance,
154
+ disabled,
155
+ disabledFocusable,
156
+ iconOnly,
157
+ size
158
+ } = state;
159
+ state.root.className = react_1.mergeClasses(exports.compoundButtonClassName, // Root styles
155
160
  rootStyles.base, appearance && rootStyles[appearance], rootStyles[size], // Disabled styles
156
161
  (disabled || disabledFocusable) && rootStyles.disabled, // Icon-only styles
157
162
  iconOnly && rootIconOnlyStyles[size], // User provided class name
158
163
  state.root.className);
159
164
 
160
165
  if (state.icon) {
161
- state.icon.className = react_make_styles_1.mergeClasses(iconStyles.base, state.icon.className);
166
+ state.icon.className = react_1.mergeClasses(iconStyles.base, state.icon.className);
162
167
  }
163
168
 
164
- state.contentContainer.className = react_make_styles_1.mergeClasses(contentContainerStyles.base, state.contentContainer.className);
169
+ state.contentContainer.className = react_1.mergeClasses(contentContainerStyles.base, state.contentContainer.className);
165
170
 
166
171
  if (state.secondaryContent) {
167
- state.secondaryContent.className = react_make_styles_1.mergeClasses(CompoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
172
+ state.secondaryContent.className = react_1.mergeClasses(CompoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
168
173
  }
169
174
 
170
- useButtonStyles_1.useButtonStyles(state);
175
+ useButtonStyles_1.useButtonStyles_unstable(state);
171
176
  return state;
172
177
  };
173
178
 
174
- exports.useCompoundButtonStyles = useCompoundButtonStyles;
179
+ exports.useCompoundButtonStyles_unstable = useCompoundButtonStyles_unstable;
175
180
  //# sourceMappingURL=useCompoundButtonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/useCompoundButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,IAAM,wBAAwB,GAAG;AAC/B,EAAA,gBAAgB,EAAE;AADa,CAAjC;;AAIA,IAAM,aAAa,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;;AAwHA,IAAM,qBAAqB,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA9B;;AAsBA,IAAM,aAAa,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;;AASA,IAAM,yBAAyB,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlC;;AASA,IAAM,yBAAyB,gBAAG,mBAAA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CAAvB;;AAkBA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,UAAU,CAAC,IAAxB,EAA8B,KAAK,CAAC,IAAN,CAAW,SAAzC,CAAvB;AACD;;AAED,EAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,OAAA,CAAA,YAAA,CAAa,sBAAsB,CAAC,IAApC,EAA0C,KAAK,CAAC,gBAAN,CAAuB,SAAjE,CAAnC;;AAEA,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,OAAA,CAAA,YAAA,CACjC,wBAAwB,CAAC,gBADQ,EAEjC,sBAAsB,CAAC,IAFU,EAGjC,sBAAsB,CAAC,IAAD,CAHW,EAIjC,KAAK,CAAC,gBAAN,CAAuB,SAJU,CAAnC;AAMD;;AAED,EAAA,iBAAA,CAAA,wBAAA,CAAyB,KAAzB;AAEA,SAAO,KAAP;AACD,CA7CM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","sourceRoot":""}
@@ -5,22 +5,22 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.MenuButton = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var renderMenuButton_1 = /*#__PURE__*/require("./renderMenuButton");
10
+ const renderMenuButton_1 = /*#__PURE__*/require("./renderMenuButton");
11
11
 
12
- var useMenuButton_1 = /*#__PURE__*/require("./useMenuButton");
12
+ const useMenuButton_1 = /*#__PURE__*/require("./useMenuButton");
13
13
 
14
- var useMenuButtonStyles_1 = /*#__PURE__*/require("./useMenuButtonStyles");
14
+ const useMenuButtonStyles_1 = /*#__PURE__*/require("./useMenuButtonStyles");
15
15
  /**
16
16
  * MenuButtons are buttons that handle opening and closing a menu when they are triggered.
17
17
  */
18
18
 
19
19
 
20
- exports.MenuButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
- var state = useMenuButton_1.useMenuButton(props, ref);
22
- useMenuButtonStyles_1.useMenuButtonStyles(state);
23
- return renderMenuButton_1.renderMenuButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
20
+ exports.MenuButton = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = useMenuButton_1.useMenuButton_unstable(props, ref);
22
+ useMenuButtonStyles_1.useMenuButtonStyles_unstable(state);
23
+ return renderMenuButton_1.renderMenuButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
24
24
  });
25
25
  exports.MenuButton.displayName = 'MenuButton';
26
26
  //# sourceMappingURL=MenuButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,UAAA,gBAAmD,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAC1F,MAAM,KAAK,GAAG,eAAA,CAAA,aAAA,CAAc,KAAd,EAAqB,GAArB,CAAd;AAEA,EAAA,qBAAA,CAAA,mBAAA,CAAoB,KAApB;AAEA,SAAO,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,CAAP,CAL0F,CAM1F;AACD,CAP+D,CAAnD;AASb,OAAA,CAAA,UAAA,CAAW,WAAX,GAAyB,YAAzB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,UAAA,gBAAmD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC9F,QAAM,KAAK,GAAG,eAAA,CAAA,sBAAA,CAAuB,KAAvB,EAA8B,GAA9B,CAAd;AAEA,EAAA,qBAAA,CAAA,4BAAA,CAA6B,KAA7B;AAEA,SAAO,kBAAA,CAAA,yBAAA,CAA0B,KAA1B,CAAP,CAL8F,CAM9F;AACD,CAP+D,CAAnD;AASb,OAAA,CAAA,UAAA,CAAW,WAAX,GAAyB,YAAzB","sourceRoot":""}
@@ -1,11 +1,10 @@
1
- import type { MenuTriggerChildProps } from '@fluentui/react-menu';
2
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
2
  import type { ButtonCommons, ButtonSlots, ButtonState } from '../Button/Button.types';
4
3
  export declare type MenuButtonSlots = ButtonSlots & {
5
4
  /**
6
5
  * Menu icon that indicates that this button has a menu that can be expanded.
7
6
  */
8
- menuIcon?: IntrinsicShorthandProps<'span'>;
7
+ menuIcon?: Slot<'span'>;
9
8
  };
10
- export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Partial<Omit<ButtonCommons, 'iconPosition'>> & Partial<MenuTriggerChildProps>;
9
+ export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Partial<Omit<ButtonCommons, 'iconPosition'>>;
11
10
  export declare type MenuButtonState = ComponentState<MenuButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;
@@ -2,4 +2,4 @@ export * from './MenuButton.types';
2
2
  export * from './MenuButton';
3
3
  export * from './renderMenuButton';
4
4
  export * from './useMenuButton';
5
- export { useMenuButtonStyles } from './useMenuButtonStyles';
5
+ export { menuButtonClassName, useMenuButtonStyles_unstable } from './useMenuButtonStyles';
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuButtonStyles = void 0;
6
+ exports.useMenuButtonStyles_unstable = exports.menuButtonClassName = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const tslib_1 = /*#__PURE__*/require("tslib");
9
9
 
10
10
  tslib_1.__exportStar(require("./MenuButton.types"), exports);
11
11
 
@@ -17,10 +17,16 @@ tslib_1.__exportStar(require("./useMenuButton"), exports);
17
17
 
18
18
  var useMenuButtonStyles_1 = /*#__PURE__*/require("./useMenuButtonStyles");
19
19
 
20
- Object.defineProperty(exports, "useMenuButtonStyles", {
20
+ Object.defineProperty(exports, "menuButtonClassName", {
21
21
  enumerable: true,
22
22
  get: function () {
23
- return useMenuButtonStyles_1.useMenuButtonStyles;
23
+ return useMenuButtonStyles_1.menuButtonClassName;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "useMenuButtonStyles_unstable", {
27
+ enumerable: true,
28
+ get: function () {
29
+ return useMenuButtonStyles_1.useMenuButtonStyles_unstable;
24
30
  }
25
31
  });
26
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,qBAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/MenuButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,qBAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA;AAAqB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,8BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,qBAAA,CAAA,4BAAA;AAA4B;AAA5B,CAAA","sourceRoot":""}
@@ -2,4 +2,4 @@ import type { MenuButtonState } from './MenuButton.types';
2
2
  /**
3
3
  * Renders a MenuButton component by passing the state defined props to the appropriate slots.
4
4
  */
5
- export declare const renderMenuButton: (state: MenuButtonState) => JSX.Element;
5
+ export declare const renderMenuButton_unstable: (state: MenuButtonState) => JSX.Element;
@@ -3,27 +3,30 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderMenuButton = void 0;
6
+ exports.renderMenuButton_unstable = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var React = /*#__PURE__*/require("react");
11
-
12
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
11
  /**
14
12
  * Renders a MenuButton component by passing the state defined props to the appropriate slots.
15
13
  */
16
14
 
17
15
 
18
- var renderMenuButton = function (state) {
19
- var _a = react_utilities_1.getSlots(state, ['root', 'icon', 'menuIcon']),
20
- slots = _a.slots,
21
- slotProps = _a.slotProps;
22
-
23
- var icon = state.icon,
24
- iconOnly = state.iconOnly;
25
- return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)), !iconOnly && slotProps.root.children, (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && React.createElement(slots.menuIcon, tslib_1.__assign({}, slotProps.menuIcon)));
16
+ const renderMenuButton_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state);
21
+ const {
22
+ icon,
23
+ iconOnly
24
+ } = state;
25
+ return React.createElement(slots.root, { ...slotProps.root
26
+ }, slots.icon && React.createElement(slots.icon, { ...slotProps.icon
27
+ }), !iconOnly && slotProps.root.children, (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && slots.menuIcon && React.createElement(slots.menuIcon, { ...slotProps.menuIcon
28
+ }));
26
29
  };
27
30
 
28
- exports.renderMenuButton = renderMenuButton;
31
+ exports.renderMenuButton_unstable = renderMenuButton_unstable;
29
32
  //# sourceMappingURL=renderMenuButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/renderMenuButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,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,iBAAA,CAAA,QAAA,CAA0B,KAA1B,CAA7B;AACA,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA;AAAR,MAAqB,KAA3B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,IAAN,IAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADjB,EAEG,CAAC,QAAD,IAAa,SAAS,CAAC,IAAV,CAAe,QAF/B,EAGG,CAAC,CAAC,QAAD,IAAa,EAAC,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAI,KAAA,CAAJ,GAAA,IAAI,CAAE,QAAP,CAAd,KAAkC,KAAK,CAAC,QAAxC,IAAoD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;AAAf,GAAf,CAHvD,CADF;AAOD,CAXM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourceRoot":""}
@@ -3,4 +3,4 @@ import type { MenuButtonProps, MenuButtonState } from './MenuButton.types';
3
3
  /**
4
4
  * Given user props, returns the final state for a MenuButton.
5
5
  */
6
- export declare const useMenuButton: ({ menuIcon, ...props }: MenuButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => MenuButtonState;
6
+ export declare const useMenuButton_unstable: ({ menuIcon, ...props }: MenuButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => MenuButtonState;
@@ -3,28 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useMenuButton = void 0;
6
+ exports.useMenuButton_unstable = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var React = /*#__PURE__*/require("react");
10
+ const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
11
11
 
12
- var react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
12
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
13
 
14
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
15
-
16
- var index_1 = /*#__PURE__*/require("../Button/index");
14
+ const index_1 = /*#__PURE__*/require("../Button/index");
17
15
  /**
18
16
  * Given user props, returns the final state for a MenuButton.
19
17
  */
20
18
 
21
19
 
22
- var useMenuButton = function (_a, ref) {
23
- var menuIcon = _a.menuIcon,
24
- props = tslib_1.__rest(_a, ["menuIcon"]);
25
-
26
- var buttonState = index_1.useButton(props, ref);
27
- return tslib_1.__assign(tslib_1.__assign({}, buttonState), {
20
+ const useMenuButton_unstable = ({
21
+ menuIcon,
22
+ ...props
23
+ }, ref) => {
24
+ const buttonState = index_1.useButton_unstable(props, ref);
25
+ return { // Button state
26
+ ...buttonState,
28
27
  // State calculated from a set of props
29
28
  iconOnly: Boolean(!props.children),
30
29
  // Slots definition
@@ -35,12 +34,12 @@ var useMenuButton = function (_a, ref) {
35
34
  },
36
35
  menuIcon: react_utilities_1.resolveShorthand(menuIcon, {
37
36
  defaultProps: {
38
- children: buttonState.size === 'large' ? React.createElement(react_icons_1.ChevronDown24Regular, null) : React.createElement(react_icons_1.ChevronDown20Regular, null)
37
+ children: React.createElement(react_icons_1.ChevronDownRegular, null)
39
38
  },
40
39
  required: true
41
40
  })
42
- });
41
+ };
43
42
  };
44
43
 
45
- exports.useMenuButton = useMenuButton;
44
+ exports.useMenuButton_unstable = useMenuButton_unstable;
46
45
  //# sourceMappingURL=useMenuButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/useMenuButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,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AA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,sBAAsB,GAAG,CACpC;AAAE,EAAA,QAAF;AAAY,KAAG;AAAf,CADoC,EAEpC,GAFoC,KAGjB;AACnB,QAAM,WAAW,GAAG,OAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,GAA1B,CAApB;AACA,SAAO,EACL;AACA,OAAG,WAFE;AAIL;AACA,IAAA,QAAQ,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,QAAR,CALZ;AAOL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE,MAFI;AAGV,MAAA,QAAQ,EAAE;AAHA,KARP;AAcL,IAAA,QAAQ,EAAE,iBAAA,CAAA,gBAAA,CAAiB,QAAjB,EAA2B;AACnC,MAAA,YAAY,EAAE;AACZ,QAAA,QAAQ,EAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,kBAAD,EAAmB,IAAnB;AADE,OADqB;AAInC,MAAA,QAAQ,EAAE;AAJyB,KAA3B;AAdL,GAAP;AAqBD,CA1BM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
@@ -1,2 +1,3 @@
1
1
  import type { MenuButtonState } from './MenuButton.types';
2
- export declare const useMenuButtonStyles: (state: MenuButtonState) => MenuButtonState;
2
+ export declare const menuButtonClassName = "fui-MenuButton";
3
+ export declare const useMenuButtonStyles_unstable: (state: MenuButtonState) => MenuButtonState;