@fluentui/react-button 9.0.0-alpha.87 → 9.0.0-alpha.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/CHANGELOG.json +30 -1
  2. package/CHANGELOG.md +12 -2
  3. package/dist/react-button.d.ts +52 -0
  4. package/lib/SplitButton.d.ts +1 -0
  5. package/lib/SplitButton.js +2 -0
  6. package/lib/SplitButton.js.map +1 -0
  7. package/lib/components/Button/renderButton.js.map +1 -1
  8. package/lib/components/Button/useButtonStyles.js.map +1 -1
  9. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  10. package/lib/components/CompoundButton/useCompoundButtonStyles.js +1 -1
  11. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  12. package/lib/components/MenuButton/renderMenuButton.js +2 -1
  13. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  14. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  15. package/lib/components/MenuButton/useMenuButtonState.js +3 -1
  16. package/lib/components/MenuButton/useMenuButtonState.js.map +1 -1
  17. package/lib/components/MenuButton/useMenuButtonStyles.js +1 -1
  18. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  19. package/lib/components/SplitButton/SplitButton.d.ts +7 -0
  20. package/lib/components/SplitButton/SplitButton.js +25 -0
  21. package/lib/components/SplitButton/SplitButton.js.map +1 -0
  22. package/lib/components/SplitButton/SplitButton.types.d.ts +30 -0
  23. package/lib/components/SplitButton/SplitButton.types.js +2 -0
  24. package/lib/components/SplitButton/SplitButton.types.js.map +1 -0
  25. package/lib/components/SplitButton/index.d.ts +5 -0
  26. package/lib/components/SplitButton/index.js +6 -0
  27. package/lib/components/SplitButton/index.js.map +1 -0
  28. package/lib/components/SplitButton/renderSplitButton.d.ts +5 -0
  29. package/lib/components/SplitButton/renderSplitButton.js +16 -0
  30. package/lib/components/SplitButton/renderSplitButton.js.map +1 -0
  31. package/lib/components/SplitButton/useSplitButton.d.ts +9 -0
  32. package/lib/components/SplitButton/useSplitButton.js +72 -0
  33. package/lib/components/SplitButton/useSplitButton.js.map +1 -0
  34. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
  35. package/lib/components/SplitButton/useSplitButtonStyles.js +61 -0
  36. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -0
  37. package/lib/components/ToggleButton/useToggleButtonStyles.js +1 -1
  38. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  39. package/lib/index.d.ts +1 -0
  40. package/lib/index.js +1 -0
  41. package/lib/index.js.map +1 -1
  42. package/lib-amd/SplitButton.d.ts +1 -0
  43. package/lib-amd/SplitButton.js +6 -0
  44. package/lib-amd/SplitButton.js.map +1 -0
  45. package/lib-amd/components/Button/renderButton.js.map +1 -1
  46. package/lib-amd/components/Button/useButtonStyles.js +1 -0
  47. package/lib-amd/components/Button/useButtonStyles.js.map +1 -1
  48. package/lib-amd/components/CompoundButton/renderCompoundButton.js.map +1 -1
  49. package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  50. package/lib-amd/components/MenuButton/renderMenuButton.js +2 -2
  51. package/lib-amd/components/MenuButton/renderMenuButton.js.map +1 -1
  52. package/lib-amd/components/MenuButton/useMenuButton.js.map +1 -1
  53. package/lib-amd/components/MenuButton/useMenuButtonState.js +2 -1
  54. package/lib-amd/components/MenuButton/useMenuButtonState.js.map +1 -1
  55. package/lib-amd/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  56. package/lib-amd/components/SplitButton/SplitButton.d.ts +7 -0
  57. package/lib-amd/components/SplitButton/SplitButton.js +19 -0
  58. package/lib-amd/components/SplitButton/SplitButton.js.map +1 -0
  59. package/lib-amd/components/SplitButton/SplitButton.types.d.ts +30 -0
  60. package/lib-amd/components/SplitButton/SplitButton.types.js +5 -0
  61. package/lib-amd/components/SplitButton/SplitButton.types.js.map +1 -0
  62. package/lib-amd/components/SplitButton/index.d.ts +5 -0
  63. package/lib-amd/components/SplitButton/index.js +11 -0
  64. package/lib-amd/components/SplitButton/index.js.map +1 -0
  65. package/lib-amd/components/SplitButton/renderSplitButton.d.ts +5 -0
  66. package/lib-amd/components/SplitButton/renderSplitButton.js +16 -0
  67. package/lib-amd/components/SplitButton/renderSplitButton.js.map +1 -0
  68. package/lib-amd/components/SplitButton/useSplitButton.d.ts +9 -0
  69. package/lib-amd/components/SplitButton/useSplitButton.js +55 -0
  70. package/lib-amd/components/SplitButton/useSplitButton.js.map +1 -0
  71. package/lib-amd/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
  72. package/lib-amd/components/SplitButton/useSplitButtonStyles.js +123 -0
  73. package/lib-amd/components/SplitButton/useSplitButtonStyles.js.map +1 -0
  74. package/lib-amd/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  75. package/lib-amd/index.d.ts +1 -0
  76. package/lib-amd/index.js +2 -1
  77. package/lib-amd/index.js.map +1 -1
  78. package/lib-commonjs/SplitButton.d.ts +1 -0
  79. package/lib-commonjs/SplitButton.js +10 -0
  80. package/lib-commonjs/SplitButton.js.map +1 -0
  81. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  82. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  83. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  84. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  85. package/lib-commonjs/components/MenuButton/renderMenuButton.js +2 -1
  86. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  87. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  88. package/lib-commonjs/components/MenuButton/useMenuButtonState.js +3 -1
  89. package/lib-commonjs/components/MenuButton/useMenuButtonState.js.map +1 -1
  90. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  91. package/lib-commonjs/components/SplitButton/SplitButton.d.ts +7 -0
  92. package/lib-commonjs/components/SplitButton/SplitButton.js +38 -0
  93. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -0
  94. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +30 -0
  95. package/lib-commonjs/components/SplitButton/SplitButton.types.js +6 -0
  96. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -0
  97. package/lib-commonjs/components/SplitButton/index.d.ts +5 -0
  98. package/lib-commonjs/components/SplitButton/index.js +26 -0
  99. package/lib-commonjs/components/SplitButton/index.js.map +1 -0
  100. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +5 -0
  101. package/lib-commonjs/components/SplitButton/renderSplitButton.js +29 -0
  102. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -0
  103. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +9 -0
  104. package/lib-commonjs/components/SplitButton/useSplitButton.js +83 -0
  105. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -0
  106. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
  107. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +71 -0
  108. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -0
  109. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  110. package/lib-commonjs/index.d.ts +1 -0
  111. package/lib-commonjs/index.js +2 -0
  112. package/lib-commonjs/index.js.map +1 -1
  113. package/package.json +9 -9
@@ -0,0 +1,55 @@
1
+ define(["require", "exports", "tslib", "@fluentui/react-utilities"], function (require, exports, tslib_1, react_utilities_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useSplitButton = exports.splitButtonShorthandProps = void 0;
5
+ exports.splitButtonShorthandProps = ['button', 'menuButton'];
6
+ var mergeProps = react_utilities_1.makeMergeProps({ deepMerge: exports.splitButtonShorthandProps });
7
+ /**
8
+ * Given user props, defines default props for the SplitButton and returns processed state.
9
+ * @param props - User provided props to the SplitButton component.
10
+ * @param ref - User provided ref to be passed to the SplitButton component.
11
+ */
12
+ var useSplitButton = function (props, ref, defaultProps) {
13
+ var resolvedShorthandProps = react_utilities_1.resolveShorthandProps(props, exports.splitButtonShorthandProps);
14
+ var className = props.className;
15
+ var button = resolvedShorthandProps.button, buttonRef = resolvedShorthandProps.buttonRef, circular = resolvedShorthandProps.circular, disabled = resolvedShorthandProps.disabled, disabledFocusable = resolvedShorthandProps.disabledFocusable, menuButton = resolvedShorthandProps.menuButton, menuButtonRef = resolvedShorthandProps.menuButtonRef, outline = resolvedShorthandProps.outline, primary = resolvedShorthandProps.primary, _a = resolvedShorthandProps.size, size = _a === void 0 ? 'medium' : _a, subtle = resolvedShorthandProps.subtle, transparent = resolvedShorthandProps.transparent, userProps = tslib_1.__rest(resolvedShorthandProps, ["button", "buttonRef", "circular", "disabled", "disabledFocusable", "menuButton", "menuButtonRef", "outline", "primary", "size", "subtle", "transparent"]);
16
+ // TODO: To be resolved when moving to simplified prop merging
17
+ // const buttonInternalRef = React.useRef<HTMLElement | null>(null);
18
+ // const menuButtonInternalRef = React.useRef<HTMLElement | null>(null);
19
+ var state = mergeProps({
20
+ 'aria-disabled': disabled,
21
+ as: 'div',
22
+ className: className,
23
+ ref: ref,
24
+ size: size,
25
+ button: tslib_1.__assign(tslib_1.__assign({ as: 'button',
26
+ // TODO: To be resolved when moving to simplified prop merging
27
+ // ref: useMergedRefs(buttonRef, buttonInternalRef),
28
+ circular: circular,
29
+ disabled: disabled,
30
+ disabledFocusable: disabledFocusable,
31
+ outline: outline,
32
+ primary: primary,
33
+ size: size,
34
+ subtle: subtle,
35
+ transparent: transparent }, userProps), button),
36
+ menuButton: tslib_1.__assign({ as: 'button',
37
+ // TODO: To be resolved when moving to simplified prop merging
38
+ // ref: useMergedRefs(menuButtonRef, menuButtonInternalRef),
39
+ circular: circular,
40
+ disabled: disabled,
41
+ disabledFocusable: disabledFocusable,
42
+ outline: outline,
43
+ primary: primary,
44
+ size: size,
45
+ subtle: subtle,
46
+ transparent: transparent }, menuButton),
47
+ },
48
+ // TODO: To be resolved when moving to simplified prop merging
49
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
+ defaultProps, resolvedShorthandProps);
51
+ return state;
52
+ };
53
+ exports.useSplitButton = useSplitButton;
54
+ });
55
+ //# sourceMappingURL=useSplitButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSplitButton.js","sourceRoot":"../src/","sources":["components/SplitButton/useSplitButton.ts"],"names":[],"mappings":";;;;IAIa,QAAA,yBAAyB,GAAsC,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAErG,IAAM,UAAU,GAAG,gCAAc,CAAmB,EAAE,SAAS,EAAE,iCAAyB,EAAE,CAAC,CAAC;IAE9F;;;;OAIG;IACI,IAAM,cAAc,GAAG,UAC5B,KAAuB,EACvB,GAA2B,EAC3B,YAA+B;QAE/B,IAAM,sBAAsB,GAAG,uCAAqB,CAAC,KAAK,EAAE,iCAAyB,CAAC,CAAC;QAC/E,IAAA,SAAS,GAAK,KAAK,UAAV,CAAW;QAE1B,IAAA,MAAM,GAaJ,sBAAsB,OAblB,EACN,SAAS,GAYP,sBAAsB,UAZf,EACT,QAAQ,GAWN,sBAAsB,SAXhB,EACR,QAAQ,GAUN,sBAAsB,SAVhB,EACR,iBAAiB,GASf,sBAAsB,kBATP,EACjB,UAAU,GAQR,sBAAsB,WARd,EACV,aAAa,GAOX,sBAAsB,cAPX,EACb,OAAO,GAML,sBAAsB,QANjB,EACP,OAAO,GAKL,sBAAsB,QALjB,EACP,KAIE,sBAAsB,KAJT,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,MAAM,GAGJ,sBAAsB,OAHlB,EACN,WAAW,GAET,sBAAsB,YAFb,EACR,SAAS,kBACV,sBAAsB,EAdpB,0JAcL,CADa,CACa;QAE3B,8DAA8D;QAC9D,oEAAoE;QACpE,wEAAwE;QAExE,IAAM,KAAK,GAAG,UAAU,CACtB;YACE,eAAe,EAAE,QAAQ;YACzB,EAAE,EAAE,KAAK;YACT,SAAS,WAAA;YACT,GAAG,KAAA;YACH,IAAI,MAAA;YAEJ,MAAM,sCACJ,EAAE,EAAE,QAAQ;gBACZ,8DAA8D;gBAC9D,oDAAoD;gBACpD,QAAQ,UAAA;gBACR,QAAQ,UAAA;gBACR,iBAAiB,mBAAA;gBACjB,OAAO,SAAA;gBACP,OAAO,SAAA;gBACP,IAAI,MAAA;gBACJ,MAAM,QAAA;gBACN,WAAW,aAAA,IACR,SAAS,GACT,MAAM,CACV;YAED,UAAU,qBACR,EAAE,EAAE,QAAQ;gBACZ,8DAA8D;gBAC9D,4DAA4D;gBAC5D,QAAQ,UAAA;gBACR,QAAQ,UAAA;gBACR,iBAAiB,mBAAA;gBACjB,OAAO,SAAA;gBACP,OAAO,SAAA;gBACP,IAAI,MAAA;gBACJ,MAAM,QAAA;gBACN,WAAW,aAAA,IACR,UAAU,CACd;SACF;QACD,8DAA8D;QAC9D,8DAA8D;QAC9D,YAAmB,EACnB,sBAAsB,CACvB,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAzEW,QAAA,cAAc,kBAyEzB","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport type { SplitButtonProps, SplitButtonShorthandPropsCompat, SplitButtonState } from './SplitButton.types';\n\nexport const splitButtonShorthandProps: SplitButtonShorthandPropsCompat[] = ['button', 'menuButton'];\n\nconst mergeProps = makeMergeProps<SplitButtonState>({ deepMerge: splitButtonShorthandProps });\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 = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: SplitButtonProps,\n): SplitButtonState => {\n const resolvedShorthandProps = resolveShorthandProps(props, splitButtonShorthandProps);\n const { className } = props;\n const {\n button,\n buttonRef,\n circular,\n disabled,\n disabledFocusable,\n menuButton,\n menuButtonRef,\n outline,\n primary,\n size = 'medium',\n subtle,\n transparent,\n ...userProps\n } = resolvedShorthandProps;\n\n // TODO: To be resolved when moving to simplified prop merging\n // const buttonInternalRef = React.useRef<HTMLElement | null>(null);\n // const menuButtonInternalRef = React.useRef<HTMLElement | null>(null);\n\n const state = mergeProps(\n {\n 'aria-disabled': disabled,\n as: 'div',\n className,\n ref,\n size,\n\n button: {\n as: 'button',\n // TODO: To be resolved when moving to simplified prop merging\n // ref: useMergedRefs(buttonRef, buttonInternalRef),\n circular,\n disabled,\n disabledFocusable,\n outline,\n primary,\n size,\n subtle,\n transparent,\n ...userProps,\n ...button,\n },\n\n menuButton: {\n as: 'button',\n // TODO: To be resolved when moving to simplified prop merging\n // ref: useMergedRefs(menuButtonRef, menuButtonInternalRef),\n circular,\n disabled,\n disabledFocusable,\n outline,\n primary,\n size,\n subtle,\n transparent,\n ...menuButton,\n },\n },\n // TODO: To be resolved when moving to simplified prop merging\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n defaultProps as any,\n resolvedShorthandProps,\n );\n\n return state;\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import type { SplitButtonState } from './SplitButton.types';
2
+ export declare const useSplitButtonStyles: (state: SplitButtonState) => SplitButtonState;
@@ -0,0 +1,123 @@
1
+ define(["require", "exports", "@fluentui/react-make-styles"], function (require, exports, react_make_styles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useSplitButtonStyles = void 0;
5
+ var SplitButtonClassNames = {
6
+ button: 'SplitButton-button',
7
+ menuButton: 'SplitButton-menuButton',
8
+ };
9
+ var useStyles = react_make_styles_1.makeStyles({
10
+ root: function (theme) {
11
+ var _a;
12
+ return (_a = {
13
+ display: 'inline-flex',
14
+ justifyContent: 'stretch',
15
+ position: 'relative'
16
+ },
17
+ // Use classnames to increase specificy of styles and avoid collisions.
18
+ _a["& ." + SplitButtonClassNames.button] = {
19
+ borderTopRightRadius: 0,
20
+ borderBottomRightRadius: 0,
21
+ },
22
+ // Use classnames to increase specificy of styles and avoid collisions.
23
+ _a["& ." + SplitButtonClassNames.menuButton] = {
24
+ borderLeftWidth: 0,
25
+ borderTopLeftRadius: 0,
26
+ borderBottomLeftRadius: 0,
27
+ },
28
+ _a);
29
+ },
30
+ rootBlock: {
31
+ width: '100%',
32
+ },
33
+ rootPrimary: function (theme) {
34
+ var _a, _b, _c;
35
+ return (_a = {},
36
+ // Use classnames to increase specificy of styles and avoid collisions.
37
+ _a["& ." + SplitButtonClassNames.button] = {
38
+ borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,
39
+ },
40
+ _a[':hover'] = (_b = {},
41
+ _b["& ." + SplitButtonClassNames.button] = {
42
+ borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,
43
+ },
44
+ _b),
45
+ _a[':active'] = (_c = {},
46
+ _c["& ." + SplitButtonClassNames.button] = {
47
+ borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,
48
+ },
49
+ _c),
50
+ _a);
51
+ },
52
+ rootSubtle: function (theme) {
53
+ var _a, _b, _c;
54
+ return (_a = {},
55
+ // Use classnames to increase specificy of styles and avoid collisions.
56
+ _a["& ." + SplitButtonClassNames.button] = {
57
+ borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,
58
+ },
59
+ _a[':hover'] = (_b = {},
60
+ _b["& ." + SplitButtonClassNames.button] = {
61
+ borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,
62
+ },
63
+ _b),
64
+ _a[':active'] = (_c = {},
65
+ _c["& ." + SplitButtonClassNames.button] = {
66
+ borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,
67
+ },
68
+ _c),
69
+ _a);
70
+ },
71
+ rootTransparent: function (theme) {
72
+ var _a, _b, _c;
73
+ return (_a = {},
74
+ // Use classnames to increase specificy of styles and avoid collisions.
75
+ _a["& ." + SplitButtonClassNames.button] = {
76
+ borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,
77
+ },
78
+ _a[':hover'] = (_b = {},
79
+ _b["& ." + SplitButtonClassNames.button] = {
80
+ borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,
81
+ },
82
+ _b),
83
+ _a[':active'] = (_c = {},
84
+ _c["& ." + SplitButtonClassNames.button] = {
85
+ borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,
86
+ },
87
+ _c),
88
+ _a);
89
+ },
90
+ rootDisabled: function (theme) {
91
+ var _a, _b, _c;
92
+ return (_a = {},
93
+ // Use classnames to increase specificy of styles and avoid collisions.
94
+ _a["& ." + SplitButtonClassNames.button] = {
95
+ borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,
96
+ },
97
+ _a[':hover'] = (_b = {},
98
+ _b["& ." + SplitButtonClassNames.button] = {
99
+ borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,
100
+ },
101
+ _b),
102
+ _a[':active'] = (_c = {},
103
+ _c["& ." + SplitButtonClassNames.button] = {
104
+ borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,
105
+ },
106
+ _c),
107
+ _a);
108
+ },
109
+ });
110
+ var useSplitButtonStyles = function (state) {
111
+ var styles = useStyles();
112
+ state.className = react_make_styles_1.mergeClasses(styles.root, state.block && styles.rootBlock, state.primary && styles.rootPrimary, state.subtle && styles.rootSubtle, state.transparent && styles.rootTransparent, state.disabled && styles.rootDisabled, state.className);
113
+ if (state.button) {
114
+ state.button.className = react_make_styles_1.mergeClasses(SplitButtonClassNames.button, state.button.className);
115
+ }
116
+ if (state.menuButton) {
117
+ state.menuButton.className = react_make_styles_1.mergeClasses(SplitButtonClassNames.menuButton, state.menuButton.className);
118
+ }
119
+ return state;
120
+ };
121
+ exports.useSplitButtonStyles = useSplitButtonStyles;
122
+ });
123
+ //# sourceMappingURL=useSplitButtonStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSplitButtonStyles.js","sourceRoot":"../src/","sources":["components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":";;;;IAGA,IAAM,qBAAqB,GAAG;QAC5B,MAAM,EAAE,oBAAoB;QAC5B,UAAU,EAAE,wBAAwB;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,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,qBAAqB;qBAClE;uBACF;mBACD;QAjBqB,CAiBrB;KACH,CAAC,CAAC;IAEI,IAAM,oBAAoB,GAAG,UAAC,KAAuB;QAC1D,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,KAAK,CAAC,SAAS,GAAG,gCAAY,CAC5B,MAAM,CAAC,IAAI,EACX,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,SAAS,EAC/B,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,WAAW,EACnC,KAAK,CAAC,MAAM,IAAI,MAAM,CAAC,UAAU,EACjC,KAAK,CAAC,WAAW,IAAI,MAAM,CAAC,eAAe,EAC3C,KAAK,CAAC,QAAQ,IAAI,MAAM,CAAC,YAAY,EACrC,KAAK,CAAC,SAAS,CAChB,CAAC;QAEF,IAAI,KAAK,CAAC,MAAM,EAAE;YAChB,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,gCAAY,CAAC,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SAC7F;QAED,IAAI,KAAK,CAAC,UAAU,EAAE;YACpB,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,gCAAY,CAAC,qBAAqB,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SACzG;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAtBW,QAAA,oBAAoB,wBAsB/B","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport type { SplitButtonState } from './SplitButton.types';\n\nconst SplitButtonClassNames = {\n button: 'SplitButton-button',\n menuButton: 'SplitButton-menuButton',\n};\n\nconst useStyles = makeStyles({\n root: theme => ({\n display: 'inline-flex',\n justifyContent: 'stretch',\n position: 'relative',\n\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.menuButton}`]: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n },\n }),\n rootBlock: {\n width: '100%',\n },\n rootPrimary: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,\n },\n },\n }),\n rootSubtle: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n }),\n rootTransparent: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n }),\n rootDisabled: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,\n },\n },\n }),\n});\n\nexport const useSplitButtonStyles = (state: SplitButtonState): SplitButtonState => {\n const styles = useStyles();\n\n state.className = mergeClasses(\n styles.root,\n state.block && styles.rootBlock,\n state.primary && styles.rootPrimary,\n state.subtle && styles.rootSubtle,\n state.transparent && styles.rootTransparent,\n state.disabled && styles.rootDisabled,\n state.className,\n );\n\n if (state.button) {\n state.button.className = mergeClasses(SplitButtonClassNames.button, state.button.className);\n }\n\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(SplitButtonClassNames.menuButton, state.menuButton.className);\n }\n\n return state;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useToggleButtonStyles.js","sourceRoot":"../src/","sources":["components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":";;;;IAIA,IAAM,aAAa,GAAG,8BAAU,CAAC;QAC/B,OAAO,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;YACjB,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,0BAA0B;YAChE,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc;YACrD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB;YAEnD,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI;YAE1C,QAAQ,EAAE;gBACR,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,uBAAuB;gBAC7D,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB;gBAC1D,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB;aACpD;YAED,SAAS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;QAEF,iCAAe,CAAC,KAAK,CAAC,CAAC;QAEvB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAnBW,QAAA,qBAAqB,yBAmBhC","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { useButtonStyles } from '../Button/useButtonStyles';\nimport type { ToggleButtonState } from './ToggleButton.types';\n\nconst useRootStyles = makeStyles({\n checked: theme => ({\n background: theme.alias.color.neutral.neutralBackground1Selected,\n borderColor: theme.alias.color.neutral.neutralStroke1,\n color: theme.alias.color.neutral.neutralForeground1,\n\n borderWidth: theme.global.strokeWidth.thin,\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackground1Hover,\n borderColor: theme.alias.color.neutral.neutralStroke1Hover,\n color: theme.alias.color.neutral.neutralForeground1,\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackground1Pressed,\n borderColor: theme.alias.color.neutral.neutralStroke1Pressed,\n color: theme.alias.color.neutral.neutralForeground1,\n },\n }),\n checkedOutline: theme => ({\n background: theme.alias.color.neutral.transparentBackgroundSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n },\n }),\n checkedPrimary: theme => ({\n background: theme.alias.color.neutral.brandBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n\n ':hover': {\n background: theme.alias.color.neutral.brandBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n\n ':active': {\n background: theme.alias.color.neutral.brandBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n }),\n checkedSubtle: theme => ({\n background: theme.alias.color.neutral.subtleBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.subtleBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.subtleBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n checkedTransparent: theme => ({\n background: theme.alias.color.neutral.transparentBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n disabled: theme => ({\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n }),\n disabledPrimary: {\n borderColor: 'transparent',\n\n ':hover': {\n borderColor: 'transparent',\n },\n\n ':active': {\n borderColor: 'transparent',\n },\n },\n disabledSubtle: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n disabledTransparent: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n});\n\nexport const useToggleButtonStyles = (state: ToggleButtonState): ToggleButtonState => {\n const rootStyles = useRootStyles();\n\n state.className = mergeClasses(\n state.checked && rootStyles.checked,\n state.checked && state.outline && rootStyles.checkedOutline,\n state.checked && state.primary && rootStyles.checkedPrimary,\n state.checked && state.subtle && rootStyles.checkedSubtle,\n state.checked && state.transparent && rootStyles.checkedTransparent,\n (state.disabled || state.disabledFocusable) && rootStyles.disabled,\n (state.disabled || state.disabledFocusable) && state.primary && rootStyles.disabledPrimary,\n (state.disabled || state.disabledFocusable) && state.subtle && rootStyles.disabledSubtle,\n (state.disabled || state.disabledFocusable) && state.transparent && rootStyles.disabledTransparent,\n state.className,\n );\n\n useButtonStyles(state);\n\n return state;\n};\n"]}
1
+ {"version":3,"file":"useToggleButtonStyles.js","sourceRoot":"../src/","sources":["components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":";;;;IAIA,IAAM,aAAa,GAAG,8BAAU,CAAC;QAC/B,OAAO,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;YACjB,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,0BAA0B;YAChE,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc;YACrD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB;YAEnD,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI;YAE1C,QAAQ,EAAE;gBACR,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,uBAAuB;gBAC7D,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB;gBAC1D,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB;aACpD;YAED,SAAS,EAAE;gBACT,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,yBAAyB;gBAC/D,WAAW,EAAE,KAAK,CAAC,KAAK,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["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport { useButtonStyles } from '../Button/useButtonStyles';\nimport type { ToggleButtonState } from './ToggleButton.types';\n\nconst useRootStyles = makeStyles({\n checked: theme => ({\n background: theme.alias.color.neutral.neutralBackground1Selected,\n borderColor: theme.alias.color.neutral.neutralStroke1,\n color: theme.alias.color.neutral.neutralForeground1,\n\n borderWidth: theme.global.strokeWidth.thin,\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackground1Hover,\n borderColor: theme.alias.color.neutral.neutralStroke1Hover,\n color: theme.alias.color.neutral.neutralForeground1,\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackground1Pressed,\n borderColor: theme.alias.color.neutral.neutralStroke1Pressed,\n color: theme.alias.color.neutral.neutralForeground1,\n },\n }),\n checkedOutline: theme => ({\n background: theme.alias.color.neutral.transparentBackgroundSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n },\n }),\n checkedPrimary: theme => ({\n background: theme.alias.color.neutral.brandBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n\n ':hover': {\n background: theme.alias.color.neutral.brandBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n\n ':active': {\n background: theme.alias.color.neutral.brandBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n }),\n checkedSubtle: theme => ({\n background: theme.alias.color.neutral.subtleBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.subtleBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.subtleBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n checkedTransparent: theme => ({\n background: theme.alias.color.neutral.transparentBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n disabled: theme => ({\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n }),\n disabledPrimary: {\n borderColor: 'transparent',\n\n ':hover': {\n borderColor: 'transparent',\n },\n\n ':active': {\n borderColor: 'transparent',\n },\n },\n disabledSubtle: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n disabledTransparent: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n});\n\nexport const useToggleButtonStyles = (state: ToggleButtonState): ToggleButtonState => {\n const rootStyles = useRootStyles();\n\n state.className = mergeClasses(\n state.checked && rootStyles.checked,\n state.checked && state.outline && rootStyles.checkedOutline,\n state.checked && state.primary && rootStyles.checkedPrimary,\n state.checked && state.subtle && rootStyles.checkedSubtle,\n state.checked && state.transparent && rootStyles.checkedTransparent,\n (state.disabled || state.disabledFocusable) && rootStyles.disabled,\n (state.disabled || state.disabledFocusable) && state.primary && rootStyles.disabledPrimary,\n (state.disabled || state.disabledFocusable) && state.subtle && rootStyles.disabledSubtle,\n (state.disabled || state.disabledFocusable) && state.transparent && rootStyles.disabledTransparent,\n state.className,\n );\n\n useButtonStyles(state);\n\n return state;\n};\n"]}
@@ -1,4 +1,5 @@
1
1
  export * from './Button';
2
2
  export * from './CompoundButton';
3
3
  export * from './MenuButton';
4
+ export * from './SplitButton';
4
5
  export * from './ToggleButton';
package/lib-amd/index.js CHANGED
@@ -1,9 +1,10 @@
1
- define(["require", "exports", "tslib", "./Button", "./CompoundButton", "./MenuButton", "./ToggleButton"], function (require, exports, tslib_1, Button_1, CompoundButton_1, MenuButton_1, ToggleButton_1) {
1
+ define(["require", "exports", "tslib", "./Button", "./CompoundButton", "./MenuButton", "./SplitButton", "./ToggleButton"], function (require, exports, tslib_1, Button_1, CompoundButton_1, MenuButton_1, SplitButton_1, ToggleButton_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  tslib_1.__exportStar(Button_1, exports);
5
5
  tslib_1.__exportStar(CompoundButton_1, exports);
6
6
  tslib_1.__exportStar(MenuButton_1, exports);
7
+ tslib_1.__exportStar(SplitButton_1, exports);
7
8
  tslib_1.__exportStar(ToggleButton_1, exports);
8
9
  });
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;IAAA,wCAAyB;IACzB,gDAAiC;IACjC,4CAA6B;IAC7B,8CAA+B","sourcesContent":["export * from './Button';\nexport * from './CompoundButton';\nexport * from './MenuButton';\nexport * from './ToggleButton';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;IAAA,wCAAyB;IACzB,gDAAiC;IACjC,4CAA6B;IAC7B,6CAA8B;IAC9B,8CAA+B","sourcesContent":["export * from './Button';\nexport * from './CompoundButton';\nexport * from './MenuButton';\nexport * from './SplitButton';\nexport * from './ToggleButton';\n"]}
@@ -0,0 +1 @@
1
+ export * from './components/SplitButton/index';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/SplitButton/index"), exports);
10
+ //# sourceMappingURL=SplitButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["SplitButton.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/SplitButton/index';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Button/renderButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,YAAY,GAAG,UAAC,KAAD,EAAmB;AACvC,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,WAAA,CAAA,0BAAtB,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,QAAQ,GAA6B,KAAK,CAAlC,QAAR;AAAA,MAAU,QAAQ,GAAmB,KAAK,CAAxB,QAAlB;AAAA,MAAoB,YAAY,GAAK,KAAK,CAAV,YAAhC;AAER,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EAEG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAF/B,EAGG,CAAC,QAAD,IAAa,QAHhB,EAIG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAJ/B,CADF;AAQD,CAZM;;AAAM,OAAA,CAAA,YAAA,GAAY,YAAZ","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { buttonShorthandPropsCompat } from './useButton';\nimport type { ButtonState } from './Button.types';\n\n/**\n * Renders a Button component by passing the state defined props to the appropriate slots.\n */\nexport const renderButton = (state: ButtonState) => {\n const { slots, slotProps } = getSlotsCompat(state, buttonShorthandPropsCompat);\n const { children, iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {/*{loading && <slots.loader {...slotProps.loader} />}*/}\n {iconPosition !== 'after' && <slots.icon {...slotProps.icon} />}\n {!iconOnly && children}\n {iconPosition === 'after' && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Button/renderButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,YAAY,GAAG,UAAC,KAAD,EAAmB;AACvC,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,WAAA,CAAA,0BAAtB,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,QAAQ,GAA6B,KAAK,CAAlC,QAAR;AAAA,MAAU,QAAQ,GAAmB,KAAK,CAAxB,QAAlB;AAAA,MAAoB,YAAY,GAAK,KAAK,CAAV,YAAhC;AAER,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAD/B,EAEG,CAAC,QAAD,IAAa,QAFhB,EAGG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAH/B,CADF;AAOD,CAXM;;AAAM,OAAA,CAAA,YAAA,GAAY,YAAZ","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { buttonShorthandPropsCompat } from './useButton';\nimport type { ButtonState } from './Button.types';\n\n/**\n * Renders a Button component by passing the state defined props to the appropriate slots.\n */\nexport const renderButton = (state: ButtonState) => {\n const { slots, slotProps } = getSlotsCompat(state, buttonShorthandPropsCompat);\n const { children, iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && <slots.icon {...slotProps.icon} />}\n {!iconOnly && children}\n {iconPosition === 'after' && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Button/useButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;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Aa,UAAU,CAAC,IAAxB,EAA8B,UAAU,CAAC,KAAK,CAAC,IAAP,CAAxC,EAAsD,KAAK,CAAC,IAAN,CAAW,SAAjE,CAAvB;AAEA,SAAO,KAAP;AACD,CA9BM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport { createFocusIndicatorStyleRule } from '@fluentui/react-tabster';\nimport type { ButtonState } from './Button.types';\n\n// TODO: These are named in design specs but not hoisted to global/alias yet.\n// We're tracking these here to determine how we can hoist them.\nexport const buttonSpacing = {\n smallest: '2px',\n smaller: '4px',\n small: '6px',\n medium: '8px',\n large: '12px',\n larger: '16px',\n};\n\nconst useRootStyles = makeStyles({\n base: theme => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n verticalAlign: 'middle',\n\n margin: 0,\n\n maxWidth: '280px',\n\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n background: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.neutral.neutralForeground1,\n\n borderColor: theme.alias.color.neutral.neutralStroke1,\n borderStyle: 'solid',\n borderWidth: theme.global.strokeWidth.thin,\n\n fontFamily: theme.global.type.fontFamilies.base,\n\n outline: 'none',\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackground1Hover,\n borderColor: theme.alias.color.neutral.neutralStroke1Hover,\n color: theme.alias.color.neutral.neutralForeground1,\n\n cursor: 'pointer',\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackground1Pressed,\n borderColor: theme.alias.color.neutral.neutralStroke1Pressed,\n color: theme.alias.color.neutral.neutralForeground1,\n\n outline: 'none',\n },\n }),\n small: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.smaller,\n padding: `0 ${buttonSpacing.medium}`,\n\n height: '24px',\n minWidth: '64px',\n\n borderRadius: theme.global.borderRadius.small,\n\n fontSize: theme.global.type.fontSizes.base[200],\n fontWeight: theme.global.type.fontWeights.regular,\n lineHeight: theme.global.type.lineHeights.base[200],\n }),\n medium: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.small,\n padding: `0 ${buttonSpacing.large}`,\n\n height: '32px',\n minWidth: '96px',\n\n borderRadius: theme.global.borderRadius.medium,\n\n fontSize: theme.global.type.fontSizes.base[300],\n fontWeight: theme.global.type.fontWeights.semibold,\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n large: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.small,\n padding: `0 ${buttonSpacing.larger}`,\n\n height: '40px',\n minWidth: '96px',\n\n borderRadius: theme.global.borderRadius.medium,\n\n fontSize: theme.global.type.fontSizes.base[400],\n fontWeight: theme.global.type.fontWeights.semibold,\n lineHeight: theme.global.type.lineHeights.base[400],\n }),\n block: {\n maxWidth: '100%',\n width: '100%',\n },\n circular: theme => ({\n borderRadius: theme.global.borderRadius.circular,\n }),\n outline: theme => ({\n background: theme.alias.color.neutral.transparentBackground,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n },\n }),\n primary: theme => ({\n background: theme.alias.color.neutral.brandBackground,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n\n ':hover': {\n background: theme.alias.color.neutral.brandBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n\n ':active': {\n background: theme.alias.color.neutral.brandBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n }),\n subtle: theme => ({\n background: theme.alias.color.neutral.subtleBackground,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2,\n\n ':hover': {\n background: theme.alias.color.neutral.subtleBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.subtleBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n transparent: theme => ({\n background: theme.alias.color.neutral.transparentBackground,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n disabled: theme => ({\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n cursor: 'not-allowed',\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n cursor: 'not-allowed',\n },\n }),\n disabledOutline: theme => ({\n background: theme.alias.color.neutral.transparentBackground,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n },\n }),\n disabledPrimary: {\n borderColor: 'transparent',\n\n ':hover': {\n borderColor: 'transparent',\n },\n\n ':active': {\n borderColor: 'transparent',\n },\n },\n disabledSubtle: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n disabledTransparent: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n});\n\nconst useRootFocusStyles = makeStyles({\n base: createFocusIndicatorStyleRule(theme => ({\n borderColor: 'transparent',\n boxShadow: `\n ${theme.alias.shadow.shadow4},\n 0 0 0 2px ${theme.alias.color.neutral.strokeFocus2}\n `,\n })),\n circular: createFocusIndicatorStyleRule(theme => ({\n borderRadius: theme.global.borderRadius.circular,\n })),\n primary: createFocusIndicatorStyleRule(theme => ({\n borderColor: theme.alias.color.neutral.neutralForegroundOnBrand,\n boxShadow: `${theme.alias.shadow.shadow2}, 0 0 0 2px ${theme.alias.color.neutral.strokeFocus2}`,\n })),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n small: {\n padding: buttonSpacing.smaller,\n\n minWidth: '28px',\n maxWidth: '28px',\n },\n medium: {\n padding: buttonSpacing.smaller,\n\n minWidth: '32px',\n maxWidth: '32px',\n },\n large: {\n padding: buttonSpacing.small,\n\n minWidth: '40px',\n maxWidth: '40px',\n },\n});\n\nconst useIconStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n },\n});\n\nexport const useButtonStyles = (state: ButtonState): ButtonState => {\n const rootStyles = useRootStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n\n state.className = mergeClasses(\n rootStyles.base,\n rootFocusStyles.base,\n rootStyles[state.size],\n state.block && rootStyles.block,\n state.circular && rootStyles.circular,\n state.circular && rootFocusStyles.circular,\n state.outline && rootStyles.outline,\n state.primary && rootStyles.primary,\n state.primary && rootFocusStyles.primary,\n state.subtle && rootStyles.subtle,\n state.transparent && rootStyles.transparent,\n (state.disabled || state.disabledFocusable) && rootStyles.disabled,\n (state.disabled || state.disabledFocusable) && state.outline && rootStyles.disabledOutline,\n (state.disabled || state.disabledFocusable) && state.primary && rootStyles.disabledPrimary,\n (state.disabled || state.disabledFocusable) && state.subtle && rootStyles.disabledSubtle,\n (state.disabled || state.disabledFocusable) && state.transparent && rootStyles.disabledTransparent,\n state.iconOnly && rootIconOnlyStyles[state.size],\n state.className,\n );\n\n state.icon.className = mergeClasses(iconStyles.base, iconStyles[state.size], state.icon.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Button/useButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA,C,CAGA;AACA;;;AACa,OAAA,CAAA,aAAA,GAAgB;AAC3B,EAAA,QAAQ,EAAE,KADiB;AAE3B,EAAA,OAAO,EAAE,KAFkB;AAG3B,EAAA,KAAK,EAAE,KAHoB;AAI3B,EAAA,MAAM,EAAE,KAJmB;AAK3B,EAAA,KAAK,EAAE,MALoB;AAM3B,EAAA,MAAM,EAAE;AANmB,CAAhB;;AASb,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,KAA+C,KAAK,CAAC,OAArD,IAAgE,UAAU,CAAC,eAd3D,EAehB,CAAC,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,iBAAzB,KAA+C,KAAK,CAAC,MAArD,IAA+D,UAAU,CAAC,cAf1D,EAgBhB,CAAC,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,iBAAzB,KAA+C,KAAK,CAAC,WAArD,IAAoE,UAAU,CAAC,mBAhB/D,EAiBhB,KAAK,CAAC,QAAN,IAAkB,kBAAkB,CAAC,KAAK,CAAC,IAAP,CAjBpB,EAkBhB,KAAK,CAAC,SAlBU,CAAlB;AAqBA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,UAAU,CAAC,IAAxB,EAA8B,UAAU,CAAC,KAAK,CAAC,IAAP,CAAxC,EAAsD,KAAK,CAAC,IAAN,CAAW,SAAjE,CAAvB;AAEA,SAAO,KAAP;AACD,CA9BM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport { createFocusIndicatorStyleRule } from '@fluentui/react-tabster';\nimport type { ButtonState } from './Button.types';\n\n// TODO: These are named in design specs but not hoisted to global/alias yet.\n// We're tracking these here to determine how we can hoist them.\nexport const buttonSpacing = {\n smallest: '2px',\n smaller: '4px',\n small: '6px',\n medium: '8px',\n large: '12px',\n larger: '16px',\n};\n\nconst useRootStyles = makeStyles({\n base: theme => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n verticalAlign: 'middle',\n\n margin: 0,\n\n maxWidth: '280px',\n\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n\n background: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.neutral.neutralForeground1,\n\n borderColor: theme.alias.color.neutral.neutralStroke1,\n borderStyle: 'solid',\n borderWidth: theme.global.strokeWidth.thin,\n\n fontFamily: theme.global.type.fontFamilies.base,\n\n outline: 'none',\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackground1Hover,\n borderColor: theme.alias.color.neutral.neutralStroke1Hover,\n color: theme.alias.color.neutral.neutralForeground1,\n\n cursor: 'pointer',\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackground1Pressed,\n borderColor: theme.alias.color.neutral.neutralStroke1Pressed,\n color: theme.alias.color.neutral.neutralForeground1,\n\n outline: 'none',\n },\n }),\n small: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.smaller,\n padding: `0 ${buttonSpacing.medium}`,\n\n height: '24px',\n minWidth: '64px',\n\n borderRadius: theme.global.borderRadius.small,\n\n fontSize: theme.global.type.fontSizes.base[200],\n fontWeight: theme.global.type.fontWeights.regular,\n lineHeight: theme.global.type.lineHeights.base[200],\n }),\n medium: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.small,\n padding: `0 ${buttonSpacing.large}`,\n\n height: '32px',\n minWidth: '96px',\n\n borderRadius: theme.global.borderRadius.medium,\n\n fontSize: theme.global.type.fontSizes.base[300],\n fontWeight: theme.global.type.fontWeights.semibold,\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n large: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.small,\n padding: `0 ${buttonSpacing.larger}`,\n\n height: '40px',\n minWidth: '96px',\n\n borderRadius: theme.global.borderRadius.medium,\n\n fontSize: theme.global.type.fontSizes.base[400],\n fontWeight: theme.global.type.fontWeights.semibold,\n lineHeight: theme.global.type.lineHeights.base[400],\n }),\n block: {\n maxWidth: '100%',\n width: '100%',\n },\n circular: theme => ({\n borderRadius: theme.global.borderRadius.circular,\n }),\n outline: theme => ({\n background: theme.alias.color.neutral.transparentBackground,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n },\n }),\n primary: theme => ({\n background: theme.alias.color.neutral.brandBackground,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n\n ':hover': {\n background: theme.alias.color.neutral.brandBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n\n ':active': {\n background: theme.alias.color.neutral.brandBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n }),\n subtle: theme => ({\n background: theme.alias.color.neutral.subtleBackground,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2,\n\n ':hover': {\n background: theme.alias.color.neutral.subtleBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.subtleBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n transparent: theme => ({\n background: theme.alias.color.neutral.transparentBackground,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n disabled: theme => ({\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n cursor: 'not-allowed',\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n cursor: 'not-allowed',\n },\n }),\n disabledOutline: theme => ({\n background: theme.alias.color.neutral.transparentBackground,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n },\n }),\n disabledPrimary: {\n borderColor: 'transparent',\n\n ':hover': {\n borderColor: 'transparent',\n },\n\n ':active': {\n borderColor: 'transparent',\n },\n },\n disabledSubtle: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n disabledTransparent: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n});\n\nconst useRootFocusStyles = makeStyles({\n base: createFocusIndicatorStyleRule(theme => ({\n borderColor: 'transparent',\n boxShadow: `\n ${theme.alias.shadow.shadow4},\n 0 0 0 2px ${theme.alias.color.neutral.strokeFocus2}\n `,\n zIndex: 1,\n })),\n circular: createFocusIndicatorStyleRule(theme => ({\n borderRadius: theme.global.borderRadius.circular,\n })),\n primary: createFocusIndicatorStyleRule(theme => ({\n borderColor: theme.alias.color.neutral.neutralForegroundOnBrand,\n boxShadow: `${theme.alias.shadow.shadow2}, 0 0 0 2px ${theme.alias.color.neutral.strokeFocus2}`,\n })),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n small: {\n padding: buttonSpacing.smaller,\n\n minWidth: '28px',\n maxWidth: '28px',\n },\n medium: {\n padding: buttonSpacing.smaller,\n\n minWidth: '32px',\n maxWidth: '32px',\n },\n large: {\n padding: buttonSpacing.small,\n\n minWidth: '40px',\n maxWidth: '40px',\n },\n});\n\nconst useIconStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n },\n});\n\nexport const useButtonStyles = (state: ButtonState): ButtonState => {\n const rootStyles = useRootStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n\n state.className = mergeClasses(\n rootStyles.base,\n rootFocusStyles.base,\n rootStyles[state.size],\n state.block && rootStyles.block,\n state.circular && rootStyles.circular,\n state.circular && rootFocusStyles.circular,\n state.outline && rootStyles.outline,\n state.primary && rootStyles.primary,\n state.primary && rootFocusStyles.primary,\n state.subtle && rootStyles.subtle,\n state.transparent && rootStyles.transparent,\n (state.disabled || state.disabledFocusable) && rootStyles.disabled,\n (state.disabled || state.disabledFocusable) && state.outline && rootStyles.disabledOutline,\n (state.disabled || state.disabledFocusable) && state.primary && rootStyles.disabledPrimary,\n (state.disabled || state.disabledFocusable) && state.subtle && rootStyles.disabledSubtle,\n (state.disabled || state.disabledFocusable) && state.transparent && rootStyles.disabledTransparent,\n state.iconOnly && rootIconOnlyStyles[state.size],\n state.className,\n );\n\n state.icon.className = mergeClasses(iconStyles.base, iconStyles[state.size], state.icon.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/CompoundButton/renderCompoundButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,oBAAoB,GAAG,UAAC,KAAD,EAA2B;AACvD,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,mBAAA,CAAA,kCAAtB,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,QAAQ,GAA6B,KAAK,CAAlC,QAAR;AAAA,MAAU,QAAQ,GAAmB,KAAK,CAAxB,QAAlB;AAAA,MAAoB,YAAY,GAAK,KAAK,CAAV,YAAhC;AAER,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EAEG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAF/B,EAGG,CAAC,QAAD,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,EACG,QADH,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,CAFF,CAJJ,EASG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAT/B,CADF;AAaD,CAjBM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { compoundButtonShorthandPropsCompat } from './useCompoundButton';\nimport type { CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton = (state: CompoundButtonState) => {\n const { slots, slotProps } = getSlotsCompat(state, compoundButtonShorthandPropsCompat);\n const { children, iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {/*loading && <slots.loader {...slotProps.loader} />*/}\n {iconPosition !== 'after' && <slots.icon {...slotProps.icon} />}\n {!iconOnly && (\n <slots.contentContainer {...slotProps.contentContainer}>\n {children}\n <slots.secondaryContent {...slotProps.secondaryContent} />\n </slots.contentContainer>\n )}\n {iconPosition === 'after' && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/CompoundButton/renderCompoundButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,oBAAoB,GAAG,UAAC,KAAD,EAA2B;AACvD,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,mBAAA,CAAA,kCAAtB,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,QAAQ,GAA6B,KAAK,CAAlC,QAAR;AAAA,MAAU,QAAQ,GAAmB,KAAK,CAAxB,QAAlB;AAAA,MAAoB,YAAY,GAAK,KAAK,CAAV,YAAhC;AAER,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAD/B,EAEG,CAAC,QAAD,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,EACG,QADH,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,gBAAf,CAAvB,CAFF,CAHJ,EAQG,YAAY,KAAK,OAAjB,IAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAR/B,CADF;AAYD,CAhBM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { compoundButtonShorthandPropsCompat } from './useCompoundButton';\nimport type { CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton = (state: CompoundButtonState) => {\n const { slots, slotProps } = getSlotsCompat(state, compoundButtonShorthandPropsCompat);\n const { children, iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && <slots.icon {...slotProps.icon} />}\n {!iconOnly && (\n <slots.contentContainer {...slotProps.contentContainer}>\n {children}\n <slots.secondaryContent {...slotProps.secondaryContent} />\n </slots.contentContainer>\n )}\n {iconPosition === 'after' && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["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;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,IAAP,CAFM,EAGhB,KAAK,CAAC,OAAN,IAAiB,UAAU,CAAC,OAHZ,EAIhB,KAAK,CAAC,MAAN,IAAgB,UAAU,CAAC,MAJX,EAKhB,KAAK,CAAC,WAAN,IAAqB,UAAU,CAAC,WALhB,EAMhB,CAAC,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,iBAAzB,KAA+C,UAAU,CAAC,QAN1C,EAOhB,KAAK,CAAC,QAAN,IAAkB,kBAAkB,CAAC,KAAK,CAAC,IAAP,CAPpB,EAQhB,KAAK,CAAC,SARU,CAAlB;AAWA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,UAAU,CAAC,IAAxB,EAA8B,KAAK,CAAC,IAAN,CAAW,SAAzC,CAAvB;AAEA,EAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,mBAAA,CAAA,YAAA,CAAa,sBAAsB,CAAC,IAApC,EAA0C,KAAK,CAAC,gBAAN,CAAuB,SAAjE,CAAnC;AAEA,EAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,mBAAA,CAAA,YAAA,CACjC,wBAAwB,CAAC,gBADQ,EAEjC,sBAAsB,CAAC,IAFU,EAGjC,sBAAsB,CAAC,KAAK,CAAC,IAAP,CAHW,EAIjC,KAAK,CAAC,gBAAN,CAAuB,SAJU,CAAnC;AAOA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,KAAP;AACD,CAhCM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { buttonSpacing, useButtonStyles } from '../Button/useButtonStyles';\nimport type { CompoundButtonState } from './CompoundButton.types';\n\nconst CompoundButtonClassNames = {\n secondaryContent: 'CompoundButton-secondaryContent',\n};\n\nconst useRootStyles = makeStyles({\n base: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.large,\n\n height: 'auto',\n\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2Hover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2Pressed,\n },\n },\n }),\n small: theme => ({\n padding: buttonSpacing.medium,\n\n fontSize: theme.global.type.fontSizes.base[300],\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n medium: theme => ({\n padding: buttonSpacing.large,\n\n fontSize: theme.global.type.fontSizes.base[300],\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n large: theme => ({\n padding: buttonSpacing.larger,\n\n fontSize: theme.global.type.fontSizes.base[400],\n lineHeight: theme.global.type.lineHeights.base[400],\n }),\n primary: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n },\n }),\n subtle: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n },\n }),\n transparent: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n },\n }),\n disabled: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n },\n }),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n small: {\n padding: buttonSpacing.smaller,\n\n maxWidth: '48px',\n minWidth: '48px',\n },\n medium: {\n padding: buttonSpacing.small,\n\n maxWidth: '52px',\n minWidth: '52px',\n },\n large: {\n padding: buttonSpacing.medium,\n\n maxWidth: '56px',\n minWidth: '56px',\n },\n});\n\nconst useIconStyles = makeStyles({\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px',\n },\n});\n\nconst useContentContainerStyles = makeStyles({\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left',\n },\n});\n\nconst useSecondaryContentStyles = makeStyles({\n base: theme => ({\n lineHeight: '100%',\n marginTop: '4px',\n fontWeight: theme.global.type.fontWeights.regular,\n }),\n small: theme => ({\n fontSize: theme.global.type.fontSizes.base[200],\n }),\n medium: theme => ({\n fontSize: theme.global.type.fontSizes.base[200],\n }),\n large: theme => ({\n fontSize: theme.global.type.fontSizes.base[300],\n }),\n});\n\nexport const useCompoundButtonStyles = (state: CompoundButtonState): CompoundButtonState => {\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n\n state.className = mergeClasses(\n rootStyles.base,\n rootStyles[state.size],\n state.primary && rootStyles.primary,\n state.subtle && rootStyles.subtle,\n state.transparent && rootStyles.transparent,\n (state.disabled || state.disabledFocusable) && rootStyles.disabled,\n state.iconOnly && rootIconOnlyStyles[state.size],\n state.className,\n );\n\n state.icon.className = mergeClasses(iconStyles.base, state.icon.className);\n\n state.contentContainer.className = mergeClasses(contentContainerStyles.base, state.contentContainer.className);\n\n state.secondaryContent.className = mergeClasses(\n CompoundButtonClassNames.secondaryContent,\n secondaryContentStyles.base,\n secondaryContentStyles[state.size],\n state.secondaryContent.className,\n );\n\n useButtonStyles(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["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,EAAtB;;AA+GA,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;;AAqBA,I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AmC,mBAAA,CAAA,YAAA,CAAa,sBAAsB,CAAC,IAApC,EAA0C,KAAK,CAAC,gBAAN,CAAuB,SAAjE,CAAnC;AAEA,EAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,mBAAA,CAAA,YAAA,CACjC,wBAAwB,CAAC,gBADQ,EAEjC,sBAAsB,CAAC,IAFU,EAGjC,sBAAsB,CAAC,KAAK,CAAC,IAAP,CAHW,EAIjC,KAAK,CAAC,gBAAN,CAAuB,SAJU,CAAnC;AAOA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,KAAP;AACD,CAhCM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport { buttonSpacing, useButtonStyles } from '../Button/useButtonStyles';\nimport type { CompoundButtonState } from './CompoundButton.types';\n\nconst CompoundButtonClassNames = {\n secondaryContent: 'CompoundButton-secondaryContent',\n};\n\nconst useRootStyles = makeStyles({\n base: theme => ({\n // TODO: remove unsafe property: https://caniuse.com/?search=gap\n gap: buttonSpacing.large,\n\n height: 'auto',\n\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2Hover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2Pressed,\n },\n },\n }),\n small: theme => ({\n padding: buttonSpacing.medium,\n\n fontSize: theme.global.type.fontSizes.base[300],\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n medium: theme => ({\n padding: buttonSpacing.large,\n\n fontSize: theme.global.type.fontSizes.base[300],\n lineHeight: theme.global.type.lineHeights.base[300],\n }),\n large: theme => ({\n padding: buttonSpacing.larger,\n\n fontSize: theme.global.type.fontSizes.base[400],\n lineHeight: theme.global.type.lineHeights.base[400],\n }),\n primary: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n },\n }),\n subtle: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n },\n }),\n transparent: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n },\n }),\n disabled: theme => ({\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n\n ':hover': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n },\n\n ':active': {\n [`& .${CompoundButtonClassNames.secondaryContent}`]: {\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n },\n }),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n small: {\n padding: buttonSpacing.smaller,\n\n maxWidth: '48px',\n minWidth: '48px',\n },\n medium: {\n padding: buttonSpacing.small,\n\n maxWidth: '52px',\n minWidth: '52px',\n },\n large: {\n padding: buttonSpacing.medium,\n\n maxWidth: '56px',\n minWidth: '56px',\n },\n});\n\nconst useIconStyles = makeStyles({\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px',\n },\n});\n\nconst useContentContainerStyles = makeStyles({\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left',\n },\n});\n\nconst useSecondaryContentStyles = makeStyles({\n base: theme => ({\n lineHeight: '100%',\n marginTop: '4px',\n fontWeight: theme.global.type.fontWeights.regular,\n }),\n small: theme => ({\n fontSize: theme.global.type.fontSizes.base[200],\n }),\n medium: theme => ({\n fontSize: theme.global.type.fontSizes.base[200],\n }),\n large: theme => ({\n fontSize: theme.global.type.fontSizes.base[300],\n }),\n});\n\nexport const useCompoundButtonStyles = (state: CompoundButtonState): CompoundButtonState => {\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n\n state.className = mergeClasses(\n rootStyles.base,\n rootStyles[state.size],\n state.primary && rootStyles.primary,\n state.subtle && rootStyles.subtle,\n state.transparent && rootStyles.transparent,\n (state.disabled || state.disabledFocusable) && rootStyles.disabled,\n state.iconOnly && rootIconOnlyStyles[state.size],\n state.className,\n );\n\n state.icon.className = mergeClasses(iconStyles.base, state.icon.className);\n\n state.contentContainer.className = mergeClasses(contentContainerStyles.base, state.contentContainer.className);\n\n state.secondaryContent.className = mergeClasses(\n CompoundButtonClassNames.secondaryContent,\n secondaryContentStyles.base,\n secondaryContentStyles[state.size],\n state.secondaryContent.className,\n );\n\n useButtonStyles(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -23,8 +23,9 @@ var renderMenuButton = function (state) {
23
23
  slotProps = _a.slotProps;
24
24
 
25
25
  var children = state.children,
26
+ icon = state.icon,
26
27
  iconOnly = state.iconOnly;
27
- return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)), !iconOnly && children, !iconOnly && React.createElement(slots.menuIcon, tslib_1.__assign({}, slotProps.menuIcon)));
28
+ return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)), !iconOnly && children, (!iconOnly || !icon.children) && React.createElement(slots.menuIcon, tslib_1.__assign({}, slotProps.menuIcon)));
28
29
  };
29
30
 
30
31
  exports.renderMenuButton = renderMenuButton;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/MenuButton/renderMenuButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,gBAAgB,GAAG,UAAC,KAAD,EAAuB;AAC/C,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,eAAA,CAAA,8BAAtB,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,QAAQ,GAAe,KAAK,CAApB,QAAR;AAAA,MAAU,QAAQ,GAAK,KAAK,CAAV,QAAlB;AAER,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADF,EAEG,CAAC,QAAD,IAAa,QAFhB,EAGG,CAAC,QAAD,IAAa,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAHhB,CADF;AAOD,CAXM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { menuButtonShorthandPropsCompat } from './useMenuButton';\nimport type { MenuButtonState } from './MenuButton.types';\n\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderMenuButton = (state: MenuButtonState) => {\n const { slots, slotProps } = getSlotsCompat(state, menuButtonShorthandPropsCompat);\n const { children, iconOnly } = state;\n\n return (\n <slots.root {...slotProps.root}>\n <slots.icon {...slotProps.icon} />\n {!iconOnly && children}\n {!iconOnly && <slots.menuIcon {...slotProps.menuIcon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/MenuButton/renderMenuButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,gBAAgB,GAAG,UAAC,KAAD,EAAuB;AAC/C,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,eAAA,CAAA,8BAAtB,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,QAAQ,GAAqB,KAAK,CAA1B,QAAR;AAAA,MAAU,IAAI,GAAe,KAAK,CAApB,IAAd;AAAA,MAAgB,QAAQ,GAAK,KAAK,CAAV,QAAxB;AAER,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADF,EAEG,CAAC,QAAD,IAAa,QAFhB,EAGG,CAAC,CAAC,QAAD,IAAa,CAAC,IAAI,CAAC,QAApB,KAAiC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAHpC,CADF;AAOD,CAXM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { menuButtonShorthandPropsCompat } from './useMenuButton';\nimport type { MenuButtonState } from './MenuButton.types';\n\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderMenuButton = (state: MenuButtonState) => {\n const { slots, slotProps } = getSlotsCompat(state, menuButtonShorthandPropsCompat);\n const { children, icon, iconOnly } = state;\n\n return (\n <slots.root {...slotProps.root}>\n <slots.icon {...slotProps.icon} />\n {!iconOnly && children}\n {(!iconOnly || !icon.children) && <slots.menuIcon {...slotProps.menuIcon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/MenuButton/useMenuButton.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,8BAAA,GAAmE,CAAC,MAAD,EAAS,UAAT,CAAnE;AAEb,IAAM,UAAU,gBAAG,iBAAA,CAAA,cAAA,CAAgC;AAAE,EAAA,SAAS,EAAE,OAAA,CAAA;AAAb,CAAhC,CAAnB;AAEA;;;;AAIG;;AACI,IAAM,aAAa,GAAG,UAAC,KAAD,EAAyB,GAAzB,EAAsD,YAAtD,EAAoF;AAC/G,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAA,GADL;AAEE,IAAA,EAAE,EAAE,QAFN;AAGE;AACA,IAAA,IAAI,EAAE;AAAE,MAAA,EAAE,EAAE;AAAN,KAJR;AAKE;AACA,IAAA,QAAQ,EAAE;AAAE,MAAA,EAAE,EAAE;AAAN,KANZ;AAOE;AACA,IAAA,IAAI,EAAE,QARR;AASE,IAAA,IAAI,EAAE;AATR,GADsB,EAYtB,YAAY,IAAI,iBAAA,CAAA,qBAAA,CAAsB,YAAtB,EAAoC,OAAA,CAAA,8BAApC,CAZM,EAatB,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,OAAA,CAAA,8BAA7B,CAbsB,CAAxB;AAgBA,EAAA,oBAAA,CAAA,kBAAA,CAAmB,KAAnB;AAEA,SAAO,KAAP;AACD,CApBM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport { useMenuButtonState } from './useMenuButtonState';\nimport type { MenuButtonProps, MenuButtonShorthandPropsCompat, MenuButtonState } from './MenuButton.types';\n\n/**\n * Consts listing which props are shorthand props.\n */\nexport const menuButtonShorthandPropsCompat: MenuButtonShorthandPropsCompat[] = ['icon', 'menuIcon'];\n\nconst mergeProps = makeMergeProps<MenuButtonState>({ deepMerge: menuButtonShorthandPropsCompat });\n\n/**\n * Given user props, defines default props for the MenuButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the MenuButton component.\n * @param ref - User provided ref to be passed to the MenuButton component.\n */\nexport const useMenuButton = (props: MenuButtonProps, ref: React.Ref<HTMLElement>, defaultProps?: MenuButtonProps) => {\n const state = mergeProps(\n {\n ref,\n as: 'button',\n // Button slots\n icon: { as: 'span' },\n // MenuButton slots\n menuIcon: { as: 'span' },\n // Non-slot props\n size: 'medium',\n type: 'button', // This is added because the default for type is 'submit'\n },\n defaultProps && resolveShorthandProps(defaultProps, menuButtonShorthandPropsCompat),\n resolveShorthandProps(props, menuButtonShorthandPropsCompat),\n ) as MenuButtonState;\n\n useMenuButtonState(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/MenuButton/useMenuButton.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,8BAAA,GAAmE,CAAC,MAAD,EAAS,UAAT,CAAnE;AAEb,IAAM,UAAU,gBAAG,iBAAA,CAAA,cAAA,CAAgC;AAAE,EAAA,SAAS,EAAE,OAAA,CAAA;AAAb,CAAhC,CAAnB;AAEA;;;;AAIG;;AACI,IAAM,aAAa,GAAG,UAAC,KAAD,EAAyB,GAAzB,EAAsD,YAAtD,EAAoF;AAC/G,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAA,GADL;AAEE,IAAA,EAAE,EAAE,QAFN;AAGE;AACA,IAAA,IAAI,EAAE;AAAE,MAAA,EAAE,EAAE;AAAN,KAJR;AAKE;AACA,IAAA,QAAQ,EAAE;AAAE,MAAA,EAAE,EAAE;AAAN,KANZ;AAOE;AACA,IAAA,IAAI,EAAE,QARR;AASE,IAAA,IAAI,EAAE;AATR,GADsB,EAYtB,YAAY,IAAI,iBAAA,CAAA,qBAAA,CAAsB,YAAtB,EAAoC,OAAA,CAAA,8BAApC,CAZM,EAatB,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,OAAA,CAAA,8BAA7B,CAbsB,CAAxB;AAgBA,EAAA,oBAAA,CAAA,kBAAA,CAAmB,KAAnB;AAEA,SAAO,KAAP;AACD,CApBM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport { useMenuButtonState } from './useMenuButtonState';\nimport type { MenuButtonProps, MenuButtonShorthandPropsCompat, MenuButtonState } from './MenuButton.types';\n\n/**\n * Consts listing which props are shorthand props.\n */\nexport const menuButtonShorthandPropsCompat: MenuButtonShorthandPropsCompat[] = ['icon', 'menuIcon'];\n\nconst mergeProps = makeMergeProps<MenuButtonState>({ deepMerge: menuButtonShorthandPropsCompat });\n\n/**\n * Given user props, defines default props for the MenuButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the MenuButton component.\n * @param ref - User provided ref to be passed to the MenuButton component.\n */\nexport const useMenuButton = (props: MenuButtonProps, ref: React.Ref<HTMLElement>, defaultProps?: MenuButtonProps) => {\n const state = mergeProps(\n {\n ref,\n as: 'button',\n // Button slots\n icon: { as: 'span' },\n // MenuButton slots\n menuIcon: { as: 'span' },\n // Non-slot props\n size: 'medium',\n type: 'button', // This is added because the default for type is 'submit'\n },\n defaultProps && resolveShorthandProps(defaultProps, menuButtonShorthandPropsCompat),\n resolveShorthandProps(props, menuButtonShorthandPropsCompat),\n );\n\n useMenuButtonState(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -20,8 +20,10 @@ var useButtonState_1 = /*#__PURE__*/require("../Button/useButtonState");
20
20
  var useMenuButtonState = function (state) {
21
21
  // It behaves like a button.
22
22
  useButtonState_1.useButtonState(state);
23
- var menuIcon = state.menuIcon,
23
+ var children = state.children,
24
+ menuIcon = state.menuIcon,
24
25
  size = state.size;
26
+ state.iconOnly = !children;
25
27
 
26
28
  if (!menuIcon.children) {
27
29
  if (size === 'large') {
@@ -1 +1 @@
1
- {"version":3,"sources":["components/MenuButton/useMenuButtonState.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAGA;;;;AAIG;;;AACI,IAAM,kBAAkB,GAAG,UAAC,KAAD,EAAuB;AACvD;AACA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AAEQ,MAAA,QAAQ,GAAW,KAAK,CAAhB,QAAR;AAAA,MAAU,IAAI,GAAK,KAAK,CAAV,IAAd;;AACR,MAAI,CAAC,QAAQ,CAAC,QAAd,EAAwB;AACtB,QAAI,IAAI,KAAK,OAAb,EAAsB;AACpB,MAAA,QAAQ,CAAC,QAAT,GAAoB,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,oBAAD,EAAqB,IAArB,CAApB;AACD,KAFD,MAEO;AACL,MAAA,QAAQ,CAAC,QAAT,GAAoB,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,oBAAD,EAAqB,IAArB,CAApB;AACD;AACF;;AAED,SAAO,KAAP;AACD,CAdM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourcesContent":["import * as React from 'react';\nimport { ChevronDown20Regular, ChevronDown24Regular } from '@fluentui/react-icons';\nimport { useButtonState } from '../Button/useButtonState';\nimport type { MenuButtonState } from './MenuButton.types';\n\n/**\n * The useMenuButtonState hook processes the MenuButton state, first calling useButtonState, and then adding any\n * additional MenuButton specific processing.\n * @param state - MenuButtonButton state to mutate.\n */\nexport const useMenuButtonState = (state: MenuButtonState): MenuButtonState => {\n // It behaves like a button.\n useButtonState(state);\n\n const { menuIcon, size } = state;\n if (!menuIcon.children) {\n if (size === 'large') {\n menuIcon.children = <ChevronDown24Regular />;\n } else {\n menuIcon.children = <ChevronDown20Regular />;\n }\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/MenuButton/useMenuButtonState.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;AAGA;;;;AAIG;;;AACI,IAAM,kBAAkB,GAAG,UAAC,KAAD,EAAuB;AACvD;AACA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AAEQ,MAAA,QAAQ,GAAqB,KAAK,CAA1B,QAAR;AAAA,MAAU,QAAQ,GAAW,KAAK,CAAhB,QAAlB;AAAA,MAAoB,IAAI,GAAK,KAAK,CAAV,IAAxB;AACR,EAAA,KAAK,CAAC,QAAN,GAAiB,CAAC,QAAlB;;AACA,MAAI,CAAC,QAAQ,CAAC,QAAd,EAAwB;AACtB,QAAI,IAAI,KAAK,OAAb,EAAsB;AACpB,MAAA,QAAQ,CAAC,QAAT,GAAoB,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,oBAAD,EAAqB,IAArB,CAApB;AACD,KAFD,MAEO;AACL,MAAA,QAAQ,CAAC,QAAT,GAAoB,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,oBAAD,EAAqB,IAArB,CAApB;AACD;AACF;;AAED,SAAO,KAAP;AACD,CAfM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourcesContent":["import * as React from 'react';\nimport { ChevronDown20Regular, ChevronDown24Regular } from '@fluentui/react-icons';\nimport { useButtonState } from '../Button/useButtonState';\nimport type { MenuButtonState } from './MenuButton.types';\n\n/**\n * The useMenuButtonState hook processes the MenuButton state, first calling useButtonState, and then adding any\n * additional MenuButton specific processing.\n * @param state - MenuButtonButton state to mutate.\n */\nexport const useMenuButtonState = (state: MenuButtonState): MenuButtonState => {\n // It behaves like a button.\n useButtonState(state);\n\n const { children, menuIcon, size } = state;\n state.iconOnly = !children;\n if (!menuIcon.children) {\n if (size === 'large') {\n menuIcon.children = <ChevronDown24Regular />;\n } else {\n menuIcon.children = <ChevronDown20Regular />;\n }\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/MenuButton/useMenuButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,IAAM,iBAAiB,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA1B;;AAkBO,IAAM,mBAAmB,GAAG,UAAC,KAAD,EAAuB;AACxD,MAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEA,EAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,mBAAA,CAAA,YAAA,CAAa,cAAc,CAAC,KAAK,CAAC,IAAP,CAA3B,EAAyC,KAAK,CAAC,QAAN,CAAe,SAAxD,CAA3B;AAEA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,KAAP;AACD,CARM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { useButtonStyles } from '../Button/useButtonStyles';\nimport type { MenuButtonState } from './MenuButton.types';\n\nconst useMenuIconStyles = makeStyles({\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n },\n});\n\nexport const useMenuButtonStyles = (state: MenuButtonState): MenuButtonState => {\n const menuIconStyles = useMenuIconStyles();\n\n state.menuIcon.className = mergeClasses(menuIconStyles[state.size], state.menuIcon.className);\n\n useButtonStyles(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/MenuButton/useMenuButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,IAAM,iBAAiB,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA1B;;AAkBO,IAAM,mBAAmB,GAAG,UAAC,KAAD,EAAuB;AACxD,MAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEA,EAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,mBAAA,CAAA,YAAA,CAAa,cAAc,CAAC,KAAK,CAAC,IAAP,CAA3B,EAAyC,KAAK,CAAC,QAAN,CAAe,SAAxD,CAA3B;AAEA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,KAAP;AACD,CARM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport { useButtonStyles } from '../Button/useButtonStyles';\nimport type { MenuButtonState } from './MenuButton.types';\n\nconst useMenuIconStyles = makeStyles({\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n },\n});\n\nexport const useMenuButtonStyles = (state: MenuButtonState): MenuButtonState => {\n const menuIconStyles = useMenuIconStyles();\n\n state.menuIcon.className = mergeClasses(menuIconStyles[state.size], state.menuIcon.className);\n\n useButtonStyles(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import type { SplitButtonProps } from './SplitButton.types';
3
+ /**
4
+ * SplitButtons are a grouping of two interactive surfaces where the interacting with the first one triggers a primary
5
+ * action, while interacting with the second one opens a menu with secondary actions.
6
+ */
7
+ export declare const SplitButton: React.ForwardRefExoticComponent<SplitButtonProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SplitButton = void 0;
7
+
8
+ var React = /*#__PURE__*/require("react");
9
+
10
+ var index_1 = /*#__PURE__*/require("../Button/index");
11
+
12
+ var index_2 = /*#__PURE__*/require("../MenuButton/index");
13
+
14
+ var renderSplitButton_1 = /*#__PURE__*/require("./renderSplitButton");
15
+
16
+ var useSplitButton_1 = /*#__PURE__*/require("./useSplitButton");
17
+
18
+ var useSplitButtonStyles_1 = /*#__PURE__*/require("./useSplitButtonStyles");
19
+ /**
20
+ * SplitButtons are a grouping of two interactive surfaces where the interacting with the first one triggers a primary
21
+ * action, while interacting with the second one opens a menu with secondary actions.
22
+ */
23
+
24
+
25
+ exports.SplitButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
26
+ var state = useSplitButton_1.useSplitButton(props, ref, {
27
+ button: {
28
+ as: index_1.Button
29
+ },
30
+ menuButton: {
31
+ as: index_2.MenuButton
32
+ }
33
+ });
34
+ useSplitButtonStyles_1.useSplitButtonStyles(state);
35
+ return renderSplitButton_1.renderSplitButton(state);
36
+ });
37
+ exports.SplitButton.displayName = 'SplitButton';
38
+ //# sourceMappingURL=SplitButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/SplitButton/SplitButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,IAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,IAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAGA;;;AAGG;;;AACU,OAAA,CAAA,WAAA,gBAAc,KAAK,CAAC,UAAN,CAAgD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACpF,MAAM,KAAK,GAAG,gBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,GAAtB,EAA2B;AACvC,IAAA,MAAM,EAAE;AAAE,MAAA,EAAE,EAAE,OAAA,CAAA;AAAN,KAD+B;AAEvC,IAAA,UAAU,EAAE;AAAE,MAAA,EAAE,EAAE,OAAA,CAAA;AAAN;AAF2B,GAA3B,CAAd;AAKA,EAAA,sBAAA,CAAA,oBAAA,CAAqB,KAArB;AAEA,SAAO,mBAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAP;AACD,CAT0B,CAAd;AAWb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { Button } from '../Button/index';\nimport { MenuButton } from '../MenuButton/index';\nimport { renderSplitButton } from './renderSplitButton';\nimport { useSplitButton } from './useSplitButton';\nimport { useSplitButtonStyles } from './useSplitButtonStyles';\nimport type { SplitButtonProps } from './SplitButton.types';\n\n/**\n * SplitButtons are a grouping of two interactive surfaces where the interacting with the first one triggers a primary\n * action, while interacting with the second one opens a menu with secondary actions.\n */\nexport const SplitButton = React.forwardRef<HTMLElement, SplitButtonProps>((props, ref) => {\n const state = useSplitButton(props, ref, {\n button: { as: Button },\n menuButton: { as: MenuButton },\n });\n\n useSplitButtonStyles(state);\n\n return renderSplitButton(state);\n});\n\nSplitButton.displayName = 'SplitButton';\n"],"sourceRoot":"../src/"}