@fluentui/react-button 9.1.12 → 9.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. package/CHANGELOG.json +81 -1
  2. package/CHANGELOG.md +26 -2
  3. package/lib/components/Button/Button.js +3 -2
  4. package/lib/components/Button/Button.js.map +1 -1
  5. package/lib/components/Button/renderButton.js +6 -4
  6. package/lib/components/Button/renderButton.js.map +1 -1
  7. package/lib/components/Button/useButton.js +0 -1
  8. package/lib/components/Button/useButton.js.map +1 -1
  9. package/lib/components/Button/useButtonStyles.js +309 -315
  10. package/lib/components/Button/useButtonStyles.js.map +1 -1
  11. package/lib/components/CompoundButton/CompoundButton.js +3 -2
  12. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  13. package/lib/components/CompoundButton/renderCompoundButton.js +10 -6
  14. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  15. package/lib/components/CompoundButton/useCompoundButton.js +4 -5
  16. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  17. package/lib/components/CompoundButton/useCompoundButtonStyles.js +124 -129
  18. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  19. package/lib/components/MenuButton/MenuButton.js +3 -2
  20. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  21. package/lib/components/MenuButton/renderMenuButton.js +6 -4
  22. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  23. package/lib/components/MenuButton/useMenuButton.js +2 -3
  24. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  25. package/lib/components/MenuButton/useMenuButtonStyles.js +61 -67
  26. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  27. package/lib/components/SplitButton/SplitButton.js +3 -2
  28. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  29. package/lib/components/SplitButton/renderSplitButton.js +6 -4
  30. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  31. package/lib/components/SplitButton/useSplitButton.js +2 -4
  32. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  33. package/lib/components/SplitButton/useSplitButtonStyles.js +56 -62
  34. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  35. package/lib/components/ToggleButton/ToggleButton.js +3 -2
  36. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  37. package/lib/components/ToggleButton/useToggleButton.js +0 -1
  38. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  39. package/lib/components/ToggleButton/useToggleButtonStyles.js +246 -249
  40. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  41. package/lib/index.js.map +1 -1
  42. package/lib/utils/useToggleState.js +4 -3
  43. package/lib/utils/useToggleState.js.map +1 -1
  44. package/lib-commonjs/Button.js +0 -2
  45. package/lib-commonjs/Button.js.map +1 -1
  46. package/lib-commonjs/CompoundButton.js +0 -2
  47. package/lib-commonjs/CompoundButton.js.map +1 -1
  48. package/lib-commonjs/MenuButton.js +0 -2
  49. package/lib-commonjs/MenuButton.js.map +1 -1
  50. package/lib-commonjs/SplitButton.js +0 -2
  51. package/lib-commonjs/SplitButton.js.map +1 -1
  52. package/lib-commonjs/ToggleButton.js +0 -2
  53. package/lib-commonjs/ToggleButton.js.map +1 -1
  54. package/lib-commonjs/components/Button/Button.js +3 -7
  55. package/lib-commonjs/components/Button/Button.js.map +1 -1
  56. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  57. package/lib-commonjs/components/Button/index.js +0 -6
  58. package/lib-commonjs/components/Button/index.js.map +1 -1
  59. package/lib-commonjs/components/Button/renderButton.js +6 -8
  60. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  61. package/lib-commonjs/components/Button/useButton.js +0 -5
  62. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  63. package/lib-commonjs/components/Button/useButtonStyles.js +309 -321
  64. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  65. package/lib-commonjs/components/CompoundButton/CompoundButton.js +3 -7
  66. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  67. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  68. package/lib-commonjs/components/CompoundButton/index.js +0 -7
  69. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  70. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +10 -10
  71. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  72. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +4 -9
  73. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  74. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +124 -134
  75. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  76. package/lib-commonjs/components/MenuButton/MenuButton.js +3 -7
  77. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  78. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  79. package/lib-commonjs/components/MenuButton/index.js +0 -7
  80. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  81. package/lib-commonjs/components/MenuButton/renderMenuButton.js +6 -8
  82. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  83. package/lib-commonjs/components/MenuButton/useMenuButton.js +2 -9
  84. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  85. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +61 -73
  86. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  87. package/lib-commonjs/components/SplitButton/SplitButton.js +3 -7
  88. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  89. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  90. package/lib-commonjs/components/SplitButton/index.js +0 -7
  91. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  92. package/lib-commonjs/components/SplitButton/renderSplitButton.js +6 -8
  93. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  94. package/lib-commonjs/components/SplitButton/useSplitButton.js +2 -9
  95. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  96. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +56 -67
  97. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  98. package/lib-commonjs/components/ToggleButton/ToggleButton.js +3 -7
  99. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  100. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  101. package/lib-commonjs/components/ToggleButton/index.js +0 -7
  102. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  103. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +0 -2
  104. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  105. package/lib-commonjs/components/ToggleButton/useToggleButton.js +0 -5
  106. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  107. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +246 -256
  108. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  109. package/lib-commonjs/index.js +0 -12
  110. package/lib-commonjs/index.js.map +1 -1
  111. package/lib-commonjs/utils/index.js +0 -2
  112. package/lib-commonjs/utils/index.js.map +1 -1
  113. package/lib-commonjs/utils/useToggleState.js +4 -7
  114. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  115. package/package.json +7 -7
@@ -4,19 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useSplitButton_unstable = void 0;
7
-
8
7
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
-
10
8
  const Button_1 = /*#__PURE__*/require("../Button/Button");
11
-
12
9
  const MenuButton_1 = /*#__PURE__*/require("../MenuButton/MenuButton");
13
10
  /**
14
11
  * Given user props, defines default props for the SplitButton and returns processed state.
15
12
  * @param props - User provided props to the SplitButton component.
16
13
  * @param ref - User provided ref to be passed to the SplitButton component.
17
14
  */
18
-
19
-
20
15
  const useSplitButton_unstable = (props, ref) => {
21
16
  const {
22
17
  appearance = 'secondary',
@@ -56,13 +51,12 @@ const useSplitButton_unstable = (props, ref) => {
56
51
  size
57
52
  },
58
53
  required: true
59
- }); // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided
54
+ });
55
+ // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided
60
56
  // by the user.
61
-
62
57
  if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {
63
58
  menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;
64
59
  }
65
-
66
60
  return {
67
61
  // Props passed at the top-level
68
62
  appearance,
@@ -85,6 +79,5 @@ const useSplitButton_unstable = (props, ref) => {
85
79
  primaryActionButton: primaryActionButtonShorthand
86
80
  };
87
81
  };
88
-
89
82
  exports.useSplitButton_unstable = useSplitButton_unstable;
90
83
  //# sourceMappingURL=useSplitButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/SplitButton/useSplitButton.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,QAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,uBAAuB,GAAG,CACrC,KADqC,EAErC,GAFqC,KAGjB;EACpB,MAAM;IACJ,UAAU,GAAG,WADT;IAEJ,QAFI;IAGJ,QAAQ,GAAG,KAHP;IAIJ,iBAAiB,GAAG,KAJhB;IAKJ,IALI;IAMJ,YAAY,GAAG,QANX;IAOJ,UAPI;IAQJ,QARI;IASJ,mBATI;IAUJ,KAAK,GAAG,SAVJ;IAWJ,IAAI,GAAG;EAXH,IAYF,KAZJ;EAcA,MAAM,MAAM,GAAG,iBAAA,CAAA,KAAA,CAAM,cAAN,CAAf;EAEA,MAAM,mBAAmB,GAAG,iBAAA,CAAA,gBAAA,CAAiB,UAAjB,EAA6B;IACvD,YAAY,EAAE;MACZ,UADY;MAEZ,QAFY;MAGZ,iBAHY;MAIZ,QAJY;MAKZ,KALY;MAMZ;IANY,CADyC;IASvD,QAAQ,EAAE;EAT6C,CAA7B,CAA5B;EAYA,MAAM,4BAA4B,GAAG,iBAAA,CAAA,gBAAA,CAAiB,mBAAjB,EAAsC;IACzE,YAAY,EAAE;MACZ,UADY;MAEZ,QAFY;MAGZ,QAHY;MAIZ,iBAJY;MAKZ,IALY;MAMZ,YANY;MAOZ,EAAE,EAAE,MAAM,GAAG,uBAPD;MAQZ,KARY;MASZ;IATY,CAD2D;IAYzE,QAAQ,EAAE;EAZ+D,CAAtC,CAArC,CA7BoB,CA4CpB;EACA;;EACA,IACE,mBAAmB,IACnB,4BADA,IAEA,CAAC,mBAAmB,CAAC,YAAD,CAFpB,IAGA,CAAC,mBAAmB,CAAC,iBAAD,CAJtB,EAKE;IACA,mBAAmB,CAAC,iBAAD,CAAnB,GAAyC,4BAA4B,CAAC,EAAtE;EACD;;EAED,OAAO;IACL;IACA,UAFK;IAGL,QAHK;IAIL,iBAJK;IAKL,YALK;IAML,KANK;IAOL,IAPK;IASL;IACA,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,UAAU,EAAE,YAAA,CAAA,UAFF;MAGV,mBAAmB,EAAE,QAAA,CAAA;IAHX,CAVP;IAgBL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MAAE,GAAF;MAAO,GAAG;IAAV,CAA7B,CAhBD;IAiBL,UAAU,EAAE,mBAjBP;IAkBL,mBAAmB,EAAE;EAlBhB,CAAP;AAoBD,CA9EM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } from './SplitButton.types';\n\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 = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonState => {\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\n const baseId = useId('splitButton-');\n\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\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\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 (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n\n // Slots definition\n components: {\n root: 'div',\n menuButton: MenuButton,\n primaryActionButton: Button,\n },\n\n root: getNativeElementProps('div', { ref, ...props }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AACA;AACA;AAGA;;;;;AAKO,MAAMA,uBAAuB,GAAG,CACrCC,KAAuB,EACvBC,GAAqD,KACjC;EACpB,MAAM;IACJC,UAAU,GAAG,WAAW;IACxBC,QAAQ;IACRC,QAAQ,GAAG,KAAK;IAChBC,iBAAiB,GAAG,KAAK;IACzBC,IAAI;IACJC,YAAY,GAAG,QAAQ;IACvBC,UAAU;IACVC,QAAQ;IACRC,mBAAmB;IACnBC,KAAK,GAAG,SAAS;IACjBC,IAAI,GAAG;EAAQ,CAChB,GAAGZ,KAAK;EAET,MAAMa,MAAM,GAAGC,uBAAK,CAAC,cAAc,CAAC;EAEpC,MAAMC,mBAAmB,GAAGD,kCAAgB,CAACN,UAAU,EAAE;IACvDQ,YAAY,EAAE;MACZd,UAAU;MACVE,QAAQ;MACRC,iBAAiB;MACjBI,QAAQ;MACRE,KAAK;MACLC;KACD;IACDK,QAAQ,EAAE;GACX,CAAC;EAEF,MAAMC,4BAA4B,GAAGJ,kCAAgB,CAACJ,mBAAmB,EAAE;IACzEM,YAAY,EAAE;MACZd,UAAU;MACVC,QAAQ;MACRC,QAAQ;MACRC,iBAAiB;MACjBC,IAAI;MACJC,YAAY;MACZY,EAAE,EAAEN,MAAM,GAAG,uBAAuB;MACpCF,KAAK;MACLC;KACD;IACDK,QAAQ,EAAE;GACX,CAAC;EAEF;EACA;EACA,IACEF,mBAAmB,IACnBG,4BAA4B,IAC5B,CAACH,mBAAmB,CAAC,YAAY,CAAC,IAClC,CAACA,mBAAmB,CAAC,iBAAiB,CAAC,EACvC;IACAA,mBAAmB,CAAC,iBAAiB,CAAC,GAAGG,4BAA4B,CAACC,EAAE;;EAG1E,OAAO;IACL;IACAjB,UAAU;IACVE,QAAQ;IACRC,iBAAiB;IACjBE,YAAY;IACZI,KAAK;IACLC,IAAI;IAEJ;IACAQ,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXb,UAAU,EAAEc,uBAAU;MACtBZ,mBAAmB,EAAEa;KACtB;IAEDF,IAAI,EAAEP,uCAAqB,CAAC,KAAK,EAAE;MAAEb,GAAG;MAAE,GAAGD;IAAK,CAAE,CAAC;IACrDQ,UAAU,EAAEO,mBAAmB;IAC/BL,mBAAmB,EAAEQ;GACtB;AACH,CAAC;AA9EYM,+BAAuB","names":["useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","react_utilities_1","menuButtonShorthand","defaultProps","required","primaryActionButtonShorthand","id","components","root","MenuButton_1","Button_1","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/SplitButton/useSplitButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } from './SplitButton.types';\n\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 = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonState => {\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\n const baseId = useId('splitButton-');\n\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\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\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 (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n\n // Slots definition\n components: {\n root: 'div',\n menuButton: MenuButton,\n primaryActionButton: Button,\n },\n\n root: getNativeElementProps('div', { ref, ...props }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"]}
@@ -4,94 +4,87 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useSplitButtonStyles_unstable = exports.splitButtonClassNames = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
-
12
9
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
-
14
10
  exports.splitButtonClassNames = {
15
11
  root: 'fui-SplitButton',
16
12
  menuButton: 'fui-SplitButton__menuButton',
17
13
  primaryActionButton: 'fui-SplitButton__primaryActionButton'
18
14
  };
19
-
20
15
  const useFocusStyles = /*#__PURE__*/react_1.__styles({
21
- "primaryActionButton": {
22
- "Brovlpu": "ftqa4ok",
23
- "B486eqv": "f2hkw1w",
24
- "B6xbmo0": ["f1x37qnr", "f1um7c6d"],
25
- "kdpuga": ["fn4c73s", "f6pwzcr"]
16
+ primaryActionButton: {
17
+ Brovlpu: "ftqa4ok",
18
+ B486eqv: "f2hkw1w",
19
+ B6xbmo0: ["f1x37qnr", "f1um7c6d"],
20
+ kdpuga: ["fn4c73s", "f6pwzcr"]
26
21
  },
27
- "menuButton": {
28
- "Brovlpu": "ftqa4ok",
29
- "B486eqv": "f2hkw1w",
30
- "lbo84a": ["frrbwxo", "f1rgcpbv"],
31
- "dm238s": ["f1um7c6d", "f1x37qnr"],
32
- "Bw81rd7": ["f6pwzcr", "fn4c73s"]
22
+ menuButton: {
23
+ Brovlpu: "ftqa4ok",
24
+ B486eqv: "f2hkw1w",
25
+ lbo84a: ["frrbwxo", "f1rgcpbv"],
26
+ dm238s: ["f1um7c6d", "f1x37qnr"],
27
+ Bw81rd7: ["f6pwzcr", "fn4c73s"]
33
28
  }
34
29
  }, {
35
- "f": [".ftqa4ok:focus{outline-style:none;}"],
36
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"],
37
- "d": [".f1x37qnr[data-fui-focus-visible]{border-top-right-radius:0;}", ".f1um7c6d[data-fui-focus-visible]{border-top-left-radius:0;}", ".fn4c73s[data-fui-focus-visible]{border-bottom-right-radius:0;}", ".f6pwzcr[data-fui-focus-visible]{border-bottom-left-radius:0;}", ".frrbwxo[data-fui-focus-visible]{border-left-width:0;}", ".f1rgcpbv[data-fui-focus-visible]{border-right-width:0;}"]
30
+ f: [".ftqa4ok:focus{outline-style:none;}"],
31
+ i: [".f2hkw1w:focus-visible{outline-style:none;}"],
32
+ d: [".f1x37qnr[data-fui-focus-visible]{border-top-right-radius:0;}", ".f1um7c6d[data-fui-focus-visible]{border-top-left-radius:0;}", ".fn4c73s[data-fui-focus-visible]{border-bottom-right-radius:0;}", ".f6pwzcr[data-fui-focus-visible]{border-bottom-left-radius:0;}", ".frrbwxo[data-fui-focus-visible]{border-left-width:0;}", ".f1rgcpbv[data-fui-focus-visible]{border-right-width:0;}"]
38
33
  });
39
-
40
34
  const useRootStyles = /*#__PURE__*/react_1.__styles({
41
- "base": {
42
- "mc9l5x": "ftuwxu6",
43
- "Brf1p80": "fsxf2b5",
44
- "qhf8xq": "f10pi13n",
45
- "ha4doy": "fmrv4ls",
46
- "kn2xc0": ["f14uur2j", "fc1btbj"],
47
- "Bs76p8a": ["fye5tvs", "fc597qq"],
48
- "cuxpm9": ["f1e8brtx", "fr36rk3"],
49
- "Biffepf": ["fxp12j1", "f1m6nt2y"],
50
- "Defnvf": ["fr7y8no", "f1dn0c6m"],
51
- "z0pv9t": "f1hvqvul"
35
+ base: {
36
+ mc9l5x: "ftuwxu6",
37
+ Brf1p80: "fsxf2b5",
38
+ qhf8xq: "f10pi13n",
39
+ ha4doy: "fmrv4ls",
40
+ kn2xc0: ["f14uur2j", "fc1btbj"],
41
+ Bs76p8a: ["fye5tvs", "fc597qq"],
42
+ cuxpm9: ["f1e8brtx", "fr36rk3"],
43
+ Biffepf: ["fxp12j1", "f1m6nt2y"],
44
+ Defnvf: ["fr7y8no", "f1dn0c6m"],
45
+ z0pv9t: "f1hvqvul"
52
46
  },
53
- "outline": {},
54
- "primary": {
55
- "B1l9wao": ["f117mkrt", "f6ic349"],
56
- "lcnrd8": ["f10mpf6u", "f1bt8jlh"],
57
- "Brbpp8k": ["f1c28ih9", "fku5vw4"]
47
+ outline: {},
48
+ primary: {
49
+ B1l9wao: ["f117mkrt", "f6ic349"],
50
+ lcnrd8: ["f10mpf6u", "f1bt8jlh"],
51
+ Brbpp8k: ["f1c28ih9", "fku5vw4"]
58
52
  },
59
- "secondary": {},
60
- "subtle": {
61
- "B1l9wao": ["fbw67pg", "fcas6k2"],
62
- "lcnrd8": ["fn44ryq", "fwhhltr"],
63
- "Brbpp8k": ["f1xppm0p", "fkfp127"]
53
+ secondary: {},
54
+ subtle: {
55
+ B1l9wao: ["fbw67pg", "fcas6k2"],
56
+ lcnrd8: ["fn44ryq", "fwhhltr"],
57
+ Brbpp8k: ["f1xppm0p", "fkfp127"]
64
58
  },
65
- "transparent": {
66
- "B1l9wao": ["fbw67pg", "fcas6k2"],
67
- "lcnrd8": ["fn44ryq", "fwhhltr"],
68
- "Brbpp8k": ["f1xppm0p", "fkfp127"]
59
+ transparent: {
60
+ B1l9wao: ["fbw67pg", "fcas6k2"],
61
+ lcnrd8: ["fn44ryq", "fwhhltr"],
62
+ Brbpp8k: ["f1xppm0p", "fkfp127"]
69
63
  },
70
- "circular": {},
71
- "rounded": {},
72
- "square": {},
73
- "disabled": {
74
- "B1l9wao": ["f10xrnr8", "f15nylwb"],
75
- "lcnrd8": ["f11fwhjz", "f18vtcsx"],
76
- "Brbpp8k": ["f31btwb", "fzgm9gq"]
64
+ circular: {},
65
+ rounded: {},
66
+ square: {},
67
+ disabled: {
68
+ B1l9wao: ["f10xrnr8", "f15nylwb"],
69
+ lcnrd8: ["f11fwhjz", "f18vtcsx"],
70
+ Brbpp8k: ["f31btwb", "fzgm9gq"]
77
71
  },
78
- "disabledHighContrast": {
79
- "Bcsxniv": ["fj2q5vi", "f13tct40"],
80
- "tl7e51": ["fb2mzc7", "f179dhpp"],
81
- "mba178": ["f1ma39qa", "f1nzpdru"]
72
+ disabledHighContrast: {
73
+ Bcsxniv: ["fj2q5vi", "f13tct40"],
74
+ tl7e51: ["fb2mzc7", "f179dhpp"],
75
+ mba178: ["f1ma39qa", "f1nzpdru"]
82
76
  }
83
77
  }, {
84
- "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fsxf2b5{-webkit-box-pack:stretch;-ms-flex-pack:stretch;-webkit-justify-content:stretch;justify-content:stretch;}", ".f10pi13n{position:relative;}", ".fmrv4ls{vertical-align:middle;}", ".f14uur2j .fui-SplitButton__primaryActionButton{border-top-right-radius:0;}", ".fc1btbj .fui-SplitButton__primaryActionButton{border-top-left-radius:0;}", ".fye5tvs .fui-SplitButton__primaryActionButton{border-bottom-right-radius:0;}", ".fc597qq .fui-SplitButton__primaryActionButton{border-bottom-left-radius:0;}", ".f1e8brtx .fui-SplitButton__menuButton{border-left-width:0;}", ".fr36rk3 .fui-SplitButton__menuButton{border-right-width:0;}", ".fxp12j1 .fui-SplitButton__menuButton{border-top-left-radius:0;}", ".f1m6nt2y .fui-SplitButton__menuButton{border-top-right-radius:0;}", ".fr7y8no .fui-SplitButton__menuButton{border-bottom-left-radius:0;}", ".f1dn0c6m .fui-SplitButton__menuButton{border-bottom-right-radius:0;}", ".f1hvqvul .fui-SplitButton__menuButton{min-width:0;}", ".f117mkrt .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundOnBrand);}", ".f6ic349 .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundOnBrand);}", ".fbw67pg .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1);}", ".fcas6k2 .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1);}", ".f10xrnr8 .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f15nylwb .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
85
- "h": [".f10mpf6u:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundOnBrand);}", ".f1bt8jlh:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundOnBrand);}", ".f1c28ih9:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundOnBrand);}", ".fku5vw4:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundOnBrand);}", ".fn44ryq:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".fwhhltr:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1xppm0p:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1Pressed);}", ".fkfp127:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f11fwhjz:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f18vtcsx:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f31btwb:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fzgm9gq:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
86
- "m": [["@media (forced-colors: active){.fj2q5vi .fui-SplitButton__primaryActionButton{border-right-color:GrayText;}.f13tct40 .fui-SplitButton__primaryActionButton{border-left-color:GrayText;}}", {
87
- "m": "(forced-colors: active)"
78
+ d: [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fsxf2b5{-webkit-box-pack:stretch;-ms-flex-pack:stretch;-webkit-justify-content:stretch;justify-content:stretch;}", ".f10pi13n{position:relative;}", ".fmrv4ls{vertical-align:middle;}", ".f14uur2j .fui-SplitButton__primaryActionButton{border-top-right-radius:0;}", ".fc1btbj .fui-SplitButton__primaryActionButton{border-top-left-radius:0;}", ".fye5tvs .fui-SplitButton__primaryActionButton{border-bottom-right-radius:0;}", ".fc597qq .fui-SplitButton__primaryActionButton{border-bottom-left-radius:0;}", ".f1e8brtx .fui-SplitButton__menuButton{border-left-width:0;}", ".fr36rk3 .fui-SplitButton__menuButton{border-right-width:0;}", ".fxp12j1 .fui-SplitButton__menuButton{border-top-left-radius:0;}", ".f1m6nt2y .fui-SplitButton__menuButton{border-top-right-radius:0;}", ".fr7y8no .fui-SplitButton__menuButton{border-bottom-left-radius:0;}", ".f1dn0c6m .fui-SplitButton__menuButton{border-bottom-right-radius:0;}", ".f1hvqvul .fui-SplitButton__menuButton{min-width:0;}", ".f117mkrt .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundOnBrand);}", ".f6ic349 .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundOnBrand);}", ".fbw67pg .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1);}", ".fcas6k2 .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1);}", ".f10xrnr8 .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f15nylwb .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
79
+ h: [".f10mpf6u:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundOnBrand);}", ".f1bt8jlh:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundOnBrand);}", ".f1c28ih9:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundOnBrand);}", ".fku5vw4:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundOnBrand);}", ".fn44ryq:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".fwhhltr:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1xppm0p:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1Pressed);}", ".fkfp127:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f11fwhjz:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f18vtcsx:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f31btwb:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fzgm9gq:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
80
+ m: [["@media (forced-colors: active){.fj2q5vi .fui-SplitButton__primaryActionButton{border-right-color:GrayText;}.f13tct40 .fui-SplitButton__primaryActionButton{border-left-color:GrayText;}}", {
81
+ m: "(forced-colors: active)"
88
82
  }], ["@media (forced-colors: active){.fb2mzc7:hover .fui-SplitButton__primaryActionButton{border-right-color:GrayText;}.f179dhpp:hover .fui-SplitButton__primaryActionButton{border-left-color:GrayText;}}", {
89
- "m": "(forced-colors: active)"
83
+ m: "(forced-colors: active)"
90
84
  }], ["@media (forced-colors: active){.f1ma39qa:hover:active .fui-SplitButton__primaryActionButton{border-right-color:GrayText;}.f1nzpdru:hover:active .fui-SplitButton__primaryActionButton{border-left-color:GrayText;}}", {
91
- "m": "(forced-colors: active)"
85
+ m: "(forced-colors: active)"
92
86
  }]]
93
87
  });
94
-
95
88
  const useSplitButtonStyles_unstable = state => {
96
89
  const rootStyles = useRootStyles();
97
90
  const focusStyles = useFocusStyles();
@@ -101,17 +94,13 @@ const useSplitButtonStyles_unstable = state => {
101
94
  disabledFocusable
102
95
  } = state;
103
96
  state.root.className = react_1.mergeClasses(exports.splitButtonClassNames.root, rootStyles.base, appearance && rootStyles[appearance], (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast, state.root.className);
104
-
105
97
  if (state.menuButton) {
106
98
  state.menuButton.className = react_1.mergeClasses(exports.splitButtonClassNames.menuButton, focusStyles.menuButton, state.menuButton.className);
107
99
  }
108
-
109
100
  if (state.primaryActionButton) {
110
101
  state.primaryActionButton.className = react_1.mergeClasses(exports.splitButtonClassNames.primaryActionButton, focusStyles.primaryActionButton, state.primaryActionButton.className);
111
102
  }
112
-
113
103
  return state;
114
104
  };
115
-
116
105
  exports.useSplitButtonStyles_unstable = useSplitButtonStyles_unstable;
117
106
  //# sourceMappingURL=useSplitButtonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE,iBAD+D;EAErE,UAAU,EAAE,6BAFyD;EAGrE,mBAAmB,EAAE;AAHgD,CAA1D;;AAMb,MAAM,cAAc,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAAvB;;AAaA,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAAtB;;AA8HO,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,MAAM,UAAU,GAAG,aAAa,EAAhC;EACA,MAAM,WAAW,GAAG,cAAc,EAAlC;EAEA,MAAM;IAAE,UAAF;IAAc,QAAd;IAAwB;EAAxB,IAA8C,KAApD;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,qBAAA,CAAsB,IADD,EAErB,UAAU,CAAC,IAFU,EAGrB,UAAU,IAAI,UAAU,CAAC,UAAD,CAHH,EAIrB,CAAC,QAAQ,IAAI,iBAAb,KAAmC,UAAU,CAAC,QAJzB,EAKrB,CAAC,QAAQ,IAAI,iBAAb,KAAmC,UAAU,CAAC,oBALzB,EAMrB,KAAK,CAAC,IAAN,CAAW,SANU,CAAvB;;EASA,IAAI,KAAK,CAAC,UAAV,EAAsB;IACpB,KAAK,CAAC,UAAN,CAAiB,SAAjB,GAA6B,OAAA,CAAA,YAAA,CAC3B,OAAA,CAAA,qBAAA,CAAsB,UADK,EAE3B,WAAW,CAAC,UAFe,EAG3B,KAAK,CAAC,UAAN,CAAiB,SAHU,CAA7B;EAKD;;EAED,IAAI,KAAK,CAAC,mBAAV,EAA+B;IAC7B,KAAK,CAAC,mBAAN,CAA0B,SAA1B,GAAsC,OAAA,CAAA,YAAA,CACpC,OAAA,CAAA,qBAAA,CAAsB,mBADc,EAEpC,WAAW,CAAC,mBAFwB,EAGpC,KAAK,CAAC,mBAAN,CAA0B,SAHU,CAAtC;EAKD;;EAED,OAAO,KAAP;AACD,CAhCM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SplitButtonSlots, SplitButtonState } from './SplitButton.types';\n\nexport const splitButtonClassNames: SlotClassNames<SplitButtonSlots> = {\n root: 'fui-SplitButton',\n menuButton: 'fui-SplitButton__menuButton',\n primaryActionButton: 'fui-SplitButton__primaryActionButton',\n};\n\nconst useFocusStyles = makeStyles({\n primaryActionButton: createCustomFocusIndicatorStyle({\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }),\n\n menuButton: createCustomFocusIndicatorStyle({\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n }),\n});\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n display: 'inline-flex',\n justifyContent: 'stretch',\n position: 'relative',\n verticalAlign: 'middle',\n\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n\n [`& .${splitButtonClassNames.menuButton}`]: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n minWidth: 0,\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundOnBrand,\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Pressed,\n },\n },\n },\n transparent: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Pressed,\n },\n },\n },\n\n // Shape variations\n circular: {},\n rounded: {},\n square: {},\n\n // Disabled styles\n disabled: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n },\n },\n});\n\nexport const useSplitButtonStyles_unstable = (state: SplitButtonState): SplitButtonState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n\n const { appearance, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n splitButtonClassNames.root,\n rootStyles.base,\n appearance && rootStyles[appearance],\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n state.root.className,\n );\n\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(\n splitButtonClassNames.menuButton,\n focusStyles.menuButton,\n state.menuButton.className,\n );\n }\n\n if (state.primaryActionButton) {\n state.primaryActionButton.className = mergeClasses(\n splitButtonClassNames.primaryActionButton,\n focusStyles.primaryActionButton,\n state.primaryActionButton.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAIaA,6BAAqB,GAAqC;EACrEC,IAAI,EAAE,iBAAiB;EACvBC,UAAU,EAAE,6BAA6B;EACzCC,mBAAmB,EAAE;CACtB;AAED,MAAMC,cAAc,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAW/B;AAEF,MAAMC,aAAa,gBAAGD,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EA4H9B;AAEK,MAAME,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAMC,UAAU,GAAGH,aAAa,EAAE;EAClC,MAAMI,WAAW,GAAGN,cAAc,EAAE;EAEpC,MAAM;IAAEO,UAAU;IAAEC,QAAQ;IAAEC;EAAiB,CAAE,GAAGL,KAAK;EAEzDA,KAAK,CAACP,IAAI,CAACa,SAAS,GAAGT,oBAAY,CACjCL,6BAAqB,CAACC,IAAI,EAC1BQ,UAAU,CAACM,IAAI,EACfJ,UAAU,IAAIF,UAAU,CAACE,UAAU,CAAC,EACpC,CAACC,QAAQ,IAAIC,iBAAiB,KAAKJ,UAAU,CAACG,QAAQ,EACtD,CAACA,QAAQ,IAAIC,iBAAiB,KAAKJ,UAAU,CAACO,oBAAoB,EAClER,KAAK,CAACP,IAAI,CAACa,SAAS,CACrB;EAED,IAAIN,KAAK,CAACN,UAAU,EAAE;IACpBM,KAAK,CAACN,UAAU,CAACY,SAAS,GAAGT,oBAAY,CACvCL,6BAAqB,CAACE,UAAU,EAChCQ,WAAW,CAACR,UAAU,EACtBM,KAAK,CAACN,UAAU,CAACY,SAAS,CAC3B;;EAGH,IAAIN,KAAK,CAACL,mBAAmB,EAAE;IAC7BK,KAAK,CAACL,mBAAmB,CAACW,SAAS,GAAGT,oBAAY,CAChDL,6BAAqB,CAACG,mBAAmB,EACzCO,WAAW,CAACP,mBAAmB,EAC/BK,KAAK,CAACL,mBAAmB,CAACW,SAAS,CACpC;;EAGH,OAAON,KAAK;AACd,CAAC;AAhCYR,qCAA6B","names":["exports","root","menuButton","primaryActionButton","useFocusStyles","react_1","useRootStyles","useSplitButtonStyles_unstable","state","rootStyles","focusStyles","appearance","disabled","disabledFocusable","className","base","disabledHighContrast"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/SplitButton/useSplitButtonStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SplitButtonSlots, SplitButtonState } from './SplitButton.types';\n\nexport const splitButtonClassNames: SlotClassNames<SplitButtonSlots> = {\n root: 'fui-SplitButton',\n menuButton: 'fui-SplitButton__menuButton',\n primaryActionButton: 'fui-SplitButton__primaryActionButton',\n};\n\nconst useFocusStyles = makeStyles({\n primaryActionButton: createCustomFocusIndicatorStyle({\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }),\n\n menuButton: createCustomFocusIndicatorStyle({\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n }),\n});\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n display: 'inline-flex',\n justifyContent: 'stretch',\n position: 'relative',\n verticalAlign: 'middle',\n\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n\n [`& .${splitButtonClassNames.menuButton}`]: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n minWidth: 0,\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundOnBrand,\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Pressed,\n },\n },\n },\n transparent: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Pressed,\n },\n },\n },\n\n // Shape variations\n circular: {},\n rounded: {},\n square: {},\n\n // Disabled styles\n disabled: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n },\n },\n});\n\nexport const useSplitButtonStyles_unstable = (state: SplitButtonState): SplitButtonState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n\n const { appearance, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n splitButtonClassNames.root,\n rootStyles.base,\n appearance && rootStyles[appearance],\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n state.root.className,\n );\n\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(\n splitButtonClassNames.menuButton,\n focusStyles.menuButton,\n state.menuButton.className,\n );\n }\n\n if (state.primaryActionButton) {\n state.primaryActionButton.className = mergeClasses(\n splitButtonClassNames.primaryActionButton,\n focusStyles.primaryActionButton,\n state.primaryActionButton.className,\n );\n }\n\n return state;\n};\n"]}
@@ -4,23 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ToggleButton = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const renderToggleButton_1 = /*#__PURE__*/require("./renderToggleButton");
11
-
12
9
  const useToggleButton_1 = /*#__PURE__*/require("./useToggleButton");
13
-
14
10
  const useToggleButtonStyles_1 = /*#__PURE__*/require("./useToggleButtonStyles");
15
11
  /**
16
12
  * ToggleButtons are buttons that toggle between two defined states when triggered.
17
13
  */
18
-
19
-
20
14
  exports.ToggleButton = /*#__PURE__*/React.forwardRef((props, ref) => {
21
15
  const state = useToggleButton_1.useToggleButton_unstable(props, ref);
22
16
  useToggleButtonStyles_1.useToggleButtonStyles_unstable(state);
23
- return renderToggleButton_1.renderToggleButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
17
+ return renderToggleButton_1.renderToggleButton_unstable(state);
18
+ // Casting is required due to lack of distributive union to support unions on @types/react
24
19
  });
20
+
25
21
  exports.ToggleButton.displayName = 'ToggleButton';
26
22
  //# sourceMappingURL=ToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAClG,MAAM,KAAK,GAAG,iBAAA,CAAA,wBAAA,CAAyB,KAAzB,EAAgC,GAAhC,CAAd;EAEA,uBAAA,CAAA,8BAAA,CAA+B,KAA/B;EAEA,OAAO,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,CAAP,CALkG,CAMlG;AACD,CAPmE,CAAvD;AASb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n return renderToggleButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,oBAAY,gBAA2CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClG,MAAMC,KAAK,GAAGC,0CAAwB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAElDG,sDAA8B,CAACF,KAAK,CAAC;EAErC,OAAOG,gDAA2B,CAACH,KAAK,CAAC;EACzC;AACF,CAAC,CAA2C;;AAE5CL,oBAAY,CAACS,WAAW,GAAG,cAAc","names":["exports","React","forwardRef","props","ref","state","useToggleButton_1","useToggleButtonStyles_1","renderToggleButton_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/ToggleButton/ToggleButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n return renderToggleButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useToggleButtonStyles_unstable = exports.toggleButtonClassNames = void 0;
7
-
8
7
  const tslib_1 = /*#__PURE__*/require("tslib");
9
-
10
8
  tslib_1.__exportStar(require("./ToggleButton"), exports);
11
-
12
9
  tslib_1.__exportStar(require("./ToggleButton.types"), exports);
13
-
14
10
  tslib_1.__exportStar(require("./renderToggleButton"), exports);
15
-
16
11
  tslib_1.__exportStar(require("./useToggleButton"), exports);
17
-
18
12
  var useToggleButtonStyles_1 = /*#__PURE__*/require("./useToggleButtonStyles");
19
-
20
13
  Object.defineProperty(exports, "toggleButtonClassNames", {
21
14
  enumerable: true,
22
15
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/ToggleButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,wBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,uBAAA,CAAA,sBAAA;EAAsB;AAAtB,CAAA;AAAwB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,uBAAA,CAAA,8BAAA;EAA8B;AAA9B,CAAA","sourcesContent":["export * from './ToggleButton';\nexport * from './ToggleButton.types';\nexport * from './renderToggleButton';\nexport * from './useToggleButton';\nexport { toggleButtonClassNames, useToggleButtonStyles_unstable } from './useToggleButtonStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;;AAAAA;AACAA;AACAA;AACAA;AACA;AAASC;EAAAC;EAAAC;IAAA,qDAAsB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,6DAA8B;EAAA;AAAA","names":["tslib_1","Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/ToggleButton/index.ts"],"sourcesContent":["export * from './ToggleButton';\nexport * from './ToggleButton.types';\nexport * from './renderToggleButton';\nexport * from './useToggleButton';\nexport { toggleButtonClassNames, useToggleButtonStyles_unstable } from './useToggleButtonStyles';\n"]}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderToggleButton_unstable = void 0;
7
-
8
7
  var renderButton_1 = /*#__PURE__*/require("../Button/renderButton");
9
-
10
8
  Object.defineProperty(exports, "renderToggleButton_unstable", {
11
9
  enumerable: true,
12
10
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,6BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,cAAA,CAAA,qBAAA;EAAqB;AAArB,CAAA","sourcesContent":["export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,2CAAqB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/ToggleButton/renderToggleButton.tsx"],"sourcesContent":["export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';\n"]}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useToggleButton_unstable = void 0;
7
-
8
7
  const useToggleState_1 = /*#__PURE__*/require("../../utils/useToggleState");
9
-
10
8
  const useButton_1 = /*#__PURE__*/require("../Button/useButton");
11
9
  /**
12
10
  * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
@@ -14,12 +12,9 @@ const useButton_1 = /*#__PURE__*/require("../Button/useButton");
14
12
  * @param props - User provided props to the ToggleButton component.
15
13
  * @param ref - User provided ref to be passed to the ToggleButton component.
16
14
  */
17
-
18
-
19
15
  const useToggleButton_unstable = (props, ref) => {
20
16
  const buttonState = useButton_1.useButton_unstable(props, ref);
21
17
  return useToggleState_1.useToggleState(props, buttonState);
22
18
  };
23
-
24
19
  exports.useToggleButton_unstable = useToggleButton_unstable;
25
20
  //# sourceMappingURL=useToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;;;;AAKG;;;AACI,MAAM,wBAAwB,GAAG,CACtC,KADsC,EAEtC,GAFsC,KAGjB;EACrB,MAAM,WAAW,GAAG,WAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,GAA1B,CAApB;EAEA,OAAO,gBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,WAAtB,CAAP;AACD,CAPM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButton_unstable } from '../Button/useButton';\nimport type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton_unstable = (\n props: ToggleButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToggleButtonState => {\n const buttonState = useButton_unstable(props, ref);\n\n return useToggleState(props, buttonState);\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AACA;AAGA;;;;;;AAMO,MAAMA,wBAAwB,GAAG,CACtCC,KAAwB,EACxBC,GAAqD,KAChC;EACrB,MAAMC,WAAW,GAAGC,8BAAkB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAElD,OAAOG,+BAAc,CAACJ,KAAK,EAAEE,WAAW,CAAC;AAC3C,CAAC;AAPYG,gCAAwB","names":["useToggleButton_unstable","props","ref","buttonState","useButton_1","useToggleState_1","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/ToggleButton/useToggleButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButton_unstable } from '../Button/useButton';\nimport type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton_unstable = (\n props: ToggleButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToggleButtonState => {\n const buttonState = useButton_unstable(props, ref);\n\n return useToggleState(props, buttonState);\n};\n"]}