@fluentui/react-button 9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 → 9.74.3-experimental.esm.20260709-49ee7a20cf.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +116 -12
- package/dist/index.d.cts +331 -0
- package/dist/index.d.ts +50 -52
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/CompoundButton.js +1 -1
- package/lib/CompoundButton.js.map +1 -1
- package/lib/MenuButton.js +1 -1
- package/lib/MenuButton.js.map +1 -1
- package/lib/SplitButton.js +1 -1
- package/lib/SplitButton.js.map +1 -1
- package/lib/ToggleButton.js +1 -1
- package/lib/ToggleButton.js.map +1 -1
- package/lib/components/Button/Button.js +5 -5
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.types.js.map +1 -1
- package/lib/components/Button/index.js +4 -5
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/renderButton.js +1 -1
- package/lib/components/Button/renderButton.js.map +1 -1
- package/lib/components/Button/useButton.js +35 -6
- package/lib/components/Button/useButton.js.map +1 -1
- package/lib/components/Button/useButtonStyles.styles.js +6 -6
- package/lib/components/Button/useButtonStyles.styles.js.map +1 -1
- package/lib/components/Button/useButtonStyles.styles.raw.js +6 -5
- package/lib/components/Button/useButtonStyles.styles.raw.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.js +5 -5
- package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib/components/CompoundButton/index.js +4 -5
- package/lib/components/CompoundButton/index.js.map +1 -1
- package/lib/components/CompoundButton/renderCompoundButton.js +1 -1
- package/lib/components/CompoundButton/useCompoundButton.js +23 -11
- package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.styles.js +7 -5
- package/lib/components/CompoundButton/useCompoundButtonStyles.styles.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.styles.raw.js +7 -4
- package/lib/components/CompoundButton/useCompoundButtonStyles.styles.raw.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +5 -5
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.types.js +3 -1
- package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib/components/MenuButton/index.js +4 -5
- package/lib/components/MenuButton/index.js.map +1 -1
- package/lib/components/MenuButton/renderMenuButton.js +1 -1
- package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButton.js +52 -14
- package/lib/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.styles.js +7 -6
- package/lib/components/MenuButton/useMenuButtonStyles.styles.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.styles.raw.js +7 -5
- package/lib/components/MenuButton/useMenuButtonStyles.styles.raw.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.js +5 -5
- package/lib/components/SplitButton/SplitButton.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
- package/lib/components/SplitButton/index.js +4 -5
- package/lib/components/SplitButton/index.js.map +1 -1
- package/lib/components/SplitButton/renderSplitButton.js +1 -1
- package/lib/components/SplitButton/useSplitButton.js +53 -17
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.styles.js +6 -5
- package/lib/components/SplitButton/useSplitButtonStyles.styles.js.map +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.styles.raw.js +6 -4
- package/lib/components/SplitButton/useSplitButtonStyles.styles.raw.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.js +5 -5
- package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
- package/lib/components/ToggleButton/index.js +4 -5
- package/lib/components/ToggleButton/index.js.map +1 -1
- package/lib/components/ToggleButton/renderToggleButton.js +1 -1
- package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButton.js +16 -14
- package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.styles.js +65 -9
- package/lib/components/ToggleButton/useToggleButtonStyles.styles.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.styles.raw.js +58 -10
- package/lib/components/ToggleButton/useToggleButtonStyles.styles.raw.js.map +1 -1
- package/lib/contexts/ButtonContext.js +5 -3
- package/lib/contexts/ButtonContext.js.map +1 -1
- package/lib/contexts/index.js +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/index.js +7 -13
- package/lib/index.js.map +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/useToggleState.js +4 -3
- package/lib/utils/useToggleState.js.map +1 -1
- package/lib-commonjs/{Button.js → Button.cjs} +1 -1
- package/lib-commonjs/{Button.js.map → Button.cjs.map} +1 -1
- package/lib-commonjs/{CompoundButton.js → CompoundButton.cjs} +1 -4
- package/lib-commonjs/CompoundButton.cjs.map +1 -0
- package/lib-commonjs/{MenuButton.js → MenuButton.cjs} +1 -1
- package/lib-commonjs/{MenuButton.js.map → MenuButton.cjs.map} +1 -1
- package/lib-commonjs/{SplitButton.js → SplitButton.cjs} +1 -4
- package/lib-commonjs/SplitButton.cjs.map +1 -0
- package/lib-commonjs/{ToggleButton.js → ToggleButton.cjs} +1 -1
- package/lib-commonjs/{ToggleButton.js.map → ToggleButton.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{Button.js → Button.cjs} +3 -3
- package/lib-commonjs/components/Button/{Button.js.map → Button.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{Button.types.js.map → Button.types.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{index.js → index.cjs} +5 -6
- package/lib-commonjs/components/Button/index.cjs.map +1 -0
- package/lib-commonjs/components/Button/renderButton.cjs.map +1 -0
- package/lib-commonjs/components/Button/useButton.cjs +58 -0
- package/lib-commonjs/components/Button/useButton.cjs.map +1 -0
- package/lib-commonjs/components/Button/{useButtonStyles.styles.js → useButtonStyles.styles.cjs} +2 -1
- package/lib-commonjs/components/Button/useButtonStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/Button/{useButtonStyles.styles.raw.js → useButtonStyles.styles.raw.cjs} +2 -1
- package/lib-commonjs/components/Button/{useButtonStyles.styles.raw.js.map → useButtonStyles.styles.raw.cjs.map} +1 -1
- package/lib-commonjs/components/CompoundButton/{CompoundButton.js → CompoundButton.cjs} +3 -3
- package/lib-commonjs/components/CompoundButton/{CompoundButton.js.map → CompoundButton.cjs.map} +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.cjs.map +1 -0
- package/lib-commonjs/components/CompoundButton/{index.js → index.cjs} +4 -8
- package/lib-commonjs/components/CompoundButton/index.cjs.map +1 -0
- package/lib-commonjs/components/CompoundButton/{useCompoundButtonBase.js → useCompoundButton.cjs} +6 -7
- package/lib-commonjs/components/CompoundButton/useCompoundButton.cjs.map +1 -0
- package/lib-commonjs/components/CompoundButton/{useCompoundButtonStyles.styles.js → useCompoundButtonStyles.styles.cjs} +5 -2
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/CompoundButton/{useCompoundButtonStyles.styles.raw.js → useCompoundButtonStyles.styles.raw.cjs} +5 -2
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/components/MenuButton/{MenuButton.js → MenuButton.cjs} +3 -3
- package/lib-commonjs/components/MenuButton/{MenuButton.js.map → MenuButton.cjs.map} +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.cjs +6 -0
- package/lib-commonjs/components/MenuButton/MenuButton.types.cjs.map +1 -0
- package/lib-commonjs/components/MenuButton/{index.js → index.cjs} +5 -6
- package/lib-commonjs/components/MenuButton/index.cjs.map +1 -0
- package/lib-commonjs/components/MenuButton/renderMenuButton.cjs.map +1 -0
- package/lib-commonjs/components/MenuButton/useMenuButton.cjs +65 -0
- package/lib-commonjs/components/MenuButton/useMenuButton.cjs.map +1 -0
- package/lib-commonjs/components/MenuButton/{useMenuButtonStyles.styles.js → useMenuButtonStyles.styles.cjs} +4 -2
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/MenuButton/{useMenuButtonStyles.styles.raw.js → useMenuButtonStyles.styles.raw.cjs} +4 -2
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/components/SplitButton/{SplitButton.js → SplitButton.cjs} +3 -3
- package/lib-commonjs/components/SplitButton/SplitButton.cjs.map +1 -0
- package/lib-commonjs/components/SplitButton/SplitButton.types.cjs.map +1 -0
- package/lib-commonjs/components/SplitButton/{index.js → index.cjs} +4 -8
- package/lib-commonjs/components/SplitButton/index.cjs.map +1 -0
- package/lib-commonjs/components/SplitButton/{useSplitButtonBase.js → useSplitButton.cjs} +21 -14
- package/lib-commonjs/components/SplitButton/useSplitButton.cjs.map +1 -0
- package/lib-commonjs/components/SplitButton/{useSplitButtonStyles.styles.js → useSplitButtonStyles.styles.cjs} +3 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/SplitButton/{useSplitButtonStyles.styles.raw.js → useSplitButtonStyles.styles.raw.cjs} +3 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/components/ToggleButton/{ToggleButton.js → ToggleButton.cjs} +3 -3
- package/lib-commonjs/components/ToggleButton/{ToggleButton.js.map → ToggleButton.cjs.map} +1 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.cjs.map +1 -0
- package/lib-commonjs/components/ToggleButton/{index.js → index.cjs} +5 -6
- package/lib-commonjs/components/ToggleButton/index.cjs.map +1 -0
- package/lib-commonjs/components/ToggleButton/{renderToggleButton.js → renderToggleButton.cjs} +1 -1
- package/lib-commonjs/components/ToggleButton/{renderToggleButton.js.map → renderToggleButton.cjs.map} +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.cjs +31 -0
- package/lib-commonjs/components/ToggleButton/useToggleButton.cjs.map +1 -0
- package/lib-commonjs/components/ToggleButton/{useToggleButtonStyles.styles.js → useToggleButtonStyles.styles.cjs} +119 -5
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ToggleButton/{useToggleButtonStyles.styles.raw.js → useToggleButtonStyles.styles.raw.cjs} +51 -6
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.raw.cjs.map +1 -0
- package/lib-commonjs/contexts/ButtonContext.cjs.map +1 -0
- package/lib-commonjs/contexts/{index.js → index.cjs} +1 -1
- package/lib-commonjs/contexts/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/{index.js → index.cjs} +7 -13
- package/lib-commonjs/index.cjs.map +1 -0
- package/lib-commonjs/utils/{index.js → index.cjs} +1 -1
- package/lib-commonjs/utils/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/utils/{useToggleState.js → useToggleState.cjs} +2 -1
- package/lib-commonjs/utils/useToggleState.cjs.map +1 -0
- package/package.json +20 -14
- package/lib/components/Button/useButtonBase.js +0 -34
- package/lib/components/Button/useButtonBase.js.map +0 -1
- package/lib/components/CompoundButton/useCompoundButtonBase.js +0 -31
- package/lib/components/CompoundButton/useCompoundButtonBase.js.map +0 -1
- package/lib/components/MenuButton/useMenuButtonBase.js +0 -27
- package/lib/components/MenuButton/useMenuButtonBase.js.map +0 -1
- package/lib/components/SplitButton/useSplitButtonBase.js +0 -57
- package/lib/components/SplitButton/useSplitButtonBase.js.map +0 -1
- package/lib/components/ToggleButton/useToggleButtonBase.js +0 -13
- package/lib/components/ToggleButton/useToggleButtonBase.js.map +0 -1
- package/lib-commonjs/CompoundButton.js.map +0 -1
- package/lib-commonjs/SplitButton.js.map +0 -1
- package/lib-commonjs/components/Button/index.js.map +0 -1
- package/lib-commonjs/components/Button/renderButton.js.map +0 -1
- package/lib-commonjs/components/Button/useButton.js +0 -27
- package/lib-commonjs/components/Button/useButton.js.map +0 -1
- package/lib-commonjs/components/Button/useButtonBase.js +0 -41
- package/lib-commonjs/components/Button/useButtonBase.js.map +0 -1
- package/lib-commonjs/components/Button/useButtonStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +0 -1
- package/lib-commonjs/components/CompoundButton/index.js.map +0 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js +0 -26
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +0 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonBase.js.map +0 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.js.map +0 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +0 -1
- package/lib-commonjs/components/MenuButton/index.js.map +0 -1
- package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +0 -1
- package/lib-commonjs/components/MenuButton/useMenuButton.js +0 -32
- package/lib-commonjs/components/MenuButton/useMenuButton.js.map +0 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonBase.js +0 -36
- package/lib-commonjs/components/MenuButton/useMenuButtonBase.js.map +0 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.js.map +0 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/SplitButton/SplitButton.js.map +0 -1
- package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +0 -1
- package/lib-commonjs/components/SplitButton/index.js.map +0 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.js +0 -36
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +0 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonBase.js.map +0 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.js.map +0 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +0 -4
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/index.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.js +0 -27
- package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonBase.js +0 -19
- package/lib-commonjs/components/ToggleButton/useToggleButtonBase.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/contexts/ButtonContext.js.map +0 -1
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/utils/useToggleState.js.map +0 -1
- /package/lib-commonjs/components/Button/{Button.types.js → Button.types.cjs} +0 -0
- /package/lib-commonjs/components/Button/{renderButton.js → renderButton.cjs} +0 -0
- /package/lib-commonjs/components/CompoundButton/{CompoundButton.types.js → CompoundButton.types.cjs} +0 -0
- /package/lib-commonjs/components/CompoundButton/{renderCompoundButton.js → renderCompoundButton.cjs} +0 -0
- /package/lib-commonjs/components/CompoundButton/{renderCompoundButton.js.map → renderCompoundButton.cjs.map} +0 -0
- /package/lib-commonjs/components/MenuButton/{renderMenuButton.js → renderMenuButton.cjs} +0 -0
- /package/lib-commonjs/components/{MenuButton/MenuButton.types.js → SplitButton/SplitButton.types.cjs} +0 -0
- /package/lib-commonjs/components/SplitButton/{renderSplitButton.js → renderSplitButton.cjs} +0 -0
- /package/lib-commonjs/components/SplitButton/{renderSplitButton.js.map → renderSplitButton.cjs.map} +0 -0
- /package/lib-commonjs/components/{SplitButton/SplitButton.types.js → ToggleButton/ToggleButton.types.cjs} +0 -0
- /package/lib-commonjs/contexts/{ButtonContext.js → ButtonContext.cjs} +0 -0
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { slot } from '@fluentui/react-utilities';
|
|
4
|
-
import { useButtonBase_unstable } from '../Button/index';
|
|
5
|
-
/**
|
|
6
|
-
* Given user props, returns the final state for a MenuButton.
|
|
7
|
-
*/ export const useMenuButtonBase_unstable = ({ menuIcon, ...props }, ref)=>{
|
|
8
|
-
'use no memo';
|
|
9
|
-
const buttonState = useButtonBase_unstable(props, ref);
|
|
10
|
-
// force aria-expanded to be a boolean, not a string
|
|
11
|
-
buttonState.root['aria-expanded'] = props['aria-expanded'] ? props['aria-expanded'] === 'true' || props['aria-expanded'] === true : false;
|
|
12
|
-
return {
|
|
13
|
-
...buttonState,
|
|
14
|
-
// State calculated from a set of props
|
|
15
|
-
iconOnly: Boolean(!props.children),
|
|
16
|
-
// Slots definition
|
|
17
|
-
components: {
|
|
18
|
-
root: 'button',
|
|
19
|
-
icon: 'span',
|
|
20
|
-
menuIcon: 'span'
|
|
21
|
-
},
|
|
22
|
-
menuIcon: slot.optional(menuIcon, {
|
|
23
|
-
elementType: 'span',
|
|
24
|
-
renderByDefault: true
|
|
25
|
-
})
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuButton/useMenuButtonBase.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { useButtonBase_unstable } from '../Button/index';\nimport type { MenuButtonBaseProps, MenuButtonBaseState } from './MenuButton.types';\n\n/**\n * Given user props, returns the final state for a MenuButton.\n */\nexport const useMenuButtonBase_unstable = (\n { menuIcon, ...props }: MenuButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): MenuButtonBaseState => {\n 'use no memo';\n\n const buttonState = useButtonBase_unstable(props, ref);\n // force aria-expanded to be a boolean, not a string\n buttonState.root['aria-expanded'] = props['aria-expanded']\n ? props['aria-expanded'] === 'true' || props['aria-expanded'] === true\n : false;\n\n return {\n ...buttonState,\n\n // State calculated from a set of props\n iconOnly: Boolean(!props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n menuIcon: 'span',\n },\n\n menuIcon: slot.optional(menuIcon, {\n elementType: 'span',\n renderByDefault: true,\n }),\n };\n};\n"],"names":["React","slot","useButtonBase_unstable","useMenuButtonBase_unstable","menuIcon","props","ref","buttonState","root","iconOnly","Boolean","children","components","icon","optional","elementType","renderByDefault"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,QAAQ,4BAA4B;AACjD,SAASC,sBAAsB,QAAQ,kBAAkB;AAGzD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CACxC,EAAEC,QAAQ,EAAE,GAAGC,OAA4B,EAC3CC;IAEA;IAEA,MAAMC,cAAcL,uBAAuBG,OAAOC;IAClD,oDAAoD;IACpDC,YAAYC,IAAI,CAAC,gBAAgB,GAAGH,KAAK,CAAC,gBAAgB,GACtDA,KAAK,CAAC,gBAAgB,KAAK,UAAUA,KAAK,CAAC,gBAAgB,KAAK,OAChE;IAEJ,OAAO;QACL,GAAGE,WAAW;QAEd,uCAAuC;QACvCE,UAAUC,QAAQ,CAACL,MAAMM,QAAQ;QAEjC,mBAAmB;QACnBC,YAAY;YACVJ,MAAM;YACNK,MAAM;YACNT,UAAU;QACZ;QAEAA,UAAUH,KAAKa,QAAQ,CAACV,UAAU;YAChCW,aAAa;YACbC,iBAAiB;QACnB;IACF;AACF,EAAE"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';
|
|
3
|
-
import { Button } from '../Button/Button';
|
|
4
|
-
import { MenuButton } from '../MenuButton/MenuButton';
|
|
5
|
-
/**
|
|
6
|
-
* Given user props, defines default props for the SplitButton and returns processed state.
|
|
7
|
-
* @param props - User provided props to the SplitButton component.
|
|
8
|
-
* @param ref - User provided ref to be passed to the SplitButton component.
|
|
9
|
-
*/ export const useSplitButtonBase_unstable = (props, ref)=>{
|
|
10
|
-
const { children, disabled = false, disabledFocusable = false, icon, iconPosition = 'before', menuButton, menuIcon, primaryActionButton } = props;
|
|
11
|
-
const baseId = useId('splitButton-');
|
|
12
|
-
const menuButtonShorthand = slot.optional(menuButton, {
|
|
13
|
-
defaultProps: {
|
|
14
|
-
disabled,
|
|
15
|
-
disabledFocusable,
|
|
16
|
-
menuIcon
|
|
17
|
-
},
|
|
18
|
-
renderByDefault: true,
|
|
19
|
-
elementType: MenuButton
|
|
20
|
-
});
|
|
21
|
-
const primaryActionButtonShorthand = slot.optional(primaryActionButton, {
|
|
22
|
-
defaultProps: {
|
|
23
|
-
children,
|
|
24
|
-
disabled,
|
|
25
|
-
disabledFocusable,
|
|
26
|
-
icon,
|
|
27
|
-
iconPosition,
|
|
28
|
-
id: baseId + '__primaryActionButton'
|
|
29
|
-
},
|
|
30
|
-
renderByDefault: true,
|
|
31
|
-
elementType: Button
|
|
32
|
-
});
|
|
33
|
-
// Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the
|
|
34
|
-
// user.
|
|
35
|
-
if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {
|
|
36
|
-
menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
// Props passed at the top-level
|
|
40
|
-
disabled,
|
|
41
|
-
disabledFocusable,
|
|
42
|
-
iconPosition,
|
|
43
|
-
components: {
|
|
44
|
-
root: 'div',
|
|
45
|
-
menuButton: MenuButton,
|
|
46
|
-
primaryActionButton: Button
|
|
47
|
-
},
|
|
48
|
-
root: slot.always(getIntrinsicElementProps('div', {
|
|
49
|
-
ref,
|
|
50
|
-
...props
|
|
51
|
-
}), {
|
|
52
|
-
elementType: 'div'
|
|
53
|
-
}),
|
|
54
|
-
menuButton: menuButtonShorthand,
|
|
55
|
-
primaryActionButton: primaryActionButtonShorthand
|
|
56
|
-
};
|
|
57
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SplitButton/useSplitButtonBase.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonBaseProps, SplitButtonBaseState } from './SplitButton.types';\n\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */\nexport const useSplitButtonBase_unstable = (\n props: SplitButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonBaseState => {\n const {\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n } = props;\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n disabled,\n disabledFocusable,\n menuIcon,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n },\n renderByDefault: true,\n elementType: Button,\n });\n\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the\n // user.\n if (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n\n return {\n // Props passed at the top-level\n disabled,\n disabledFocusable,\n iconPosition,\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n root: slot.always(getIntrinsicElementProps('div', { ref, ...props }), { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useId","slot","Button","MenuButton","useSplitButtonBase_unstable","props","ref","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","baseId","menuButtonShorthand","optional","defaultProps","renderByDefault","elementType","primaryActionButtonShorthand","id","components","root","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAClF,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,UAAU,QAAQ,2BAA2B;AAGtD;;;;CAIC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EACJC,QAAQ,EACRC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACpB,GAAGT;IACJ,MAAMU,SAASf,MAAM;IAErB,MAAMgB,sBAAsBf,KAAKgB,QAAQ,CAACL,YAAY;QACpDM,cAAc;YACZV;YACAC;YACAI;QACF;QACAM,iBAAiB;QACjBC,aAAajB;IACf;IACA,MAAMkB,+BAA+BpB,KAAKgB,QAAQ,CAACH,qBAAqB;QACtEI,cAAc;YACZX;YACAC;YACAC;YACAC;YACAC;YACAW,IAAIP,SAAS;QACf;QACAI,iBAAiB;QACjBC,aAAalB;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACEc,uBACAK,gCACA,CAACL,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGK,6BAA6BC,EAAE;IAC1E;IAEA,OAAO;QACL,gCAAgC;QAChCd;QACAC;QACAE;QACAY,YAAY;YAAEC,MAAM;YAAOZ,YAAYT;YAAYW,qBAAqBZ;QAAO;QAC/EsB,MAAMvB,KAAKwB,MAAM,CAAC1B,yBAAyB,OAAO;YAAEO;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEe,aAAa;QAAM;QAC3FR,YAAYI;QACZF,qBAAqBO;IACvB;AACF,EAAE"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useToggleState } from '../../utils/useToggleState';
|
|
4
|
-
import { useButtonBase_unstable } from '../Button/index';
|
|
5
|
-
/**
|
|
6
|
-
* Given user props, defines base props (including behavioral and structural ones) for the ToggleButton returns
|
|
7
|
-
* processed state.
|
|
8
|
-
* @param props - User provided props to the ToggleButton component.
|
|
9
|
-
* @param ref - User provided ref to be passed to the ToggleButton component.
|
|
10
|
-
*/ export const useToggleButtonBase_unstable = (props, ref)=>{
|
|
11
|
-
const buttonState = useButtonBase_unstable(props, ref);
|
|
12
|
-
return useToggleState(props, buttonState);
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToggleButton/useToggleButtonBase.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButtonBase_unstable } from '../Button/index';\nimport type { ToggleButtonBaseProps, ToggleButtonBaseState } from './ToggleButton.types';\n\n/**\n * Given user props, defines base props (including behavioral and structural ones) for the ToggleButton returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButtonBase_unstable = (\n props: ToggleButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToggleButtonBaseState => {\n const buttonState = useButtonBase_unstable(props, ref);\n\n return useToggleState(props, buttonState);\n};\n"],"names":["React","useToggleState","useButtonBase_unstable","useToggleButtonBase_unstable","props","ref","buttonState"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,cAAc,QAAQ,6BAA6B;AAC5D,SAASC,sBAAsB,QAAQ,kBAAkB;AAGzD;;;;;CAKC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEA,MAAMC,cAAcJ,uBAAuBE,OAAOC;IAElD,OAAOJ,eAAeG,OAAOE;AAC/B,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/CompoundButton.ts"],"sourcesContent":["export type {\n CompoundButtonBaseProps,\n CompoundButtonProps,\n CompoundButtonSlots,\n CompoundButtonBaseState,\n CompoundButtonState,\n} from './components/CompoundButton/index';\nexport {\n CompoundButton,\n compoundButtonClassNames,\n renderCompoundButton_unstable,\n useCompoundButtonStyles_unstable,\n useCompoundButton_unstable,\n useCompoundButtonBase_unstable,\n} from './components/CompoundButton/index';\n"],"names":["CompoundButton","compoundButtonClassNames","renderCompoundButton_unstable","useCompoundButtonStyles_unstable","useCompoundButton_unstable","useCompoundButtonBase_unstable"],"mappings":";;;;;;;;;;;;eAQEA,qBAAc;;;eACdC,+BAAwB;;;eACxBC,oCAA6B;;;eAG7BG,qCAA8B;;;eAF9BF,uCAAgC;;;eAChCC,iCAA0B;;;uBAErB,oCAAoC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SplitButton.ts"],"sourcesContent":["export type {\n SplitButtonBaseProps,\n SplitButtonProps,\n SplitButtonSlots,\n SplitButtonBaseState,\n SplitButtonState,\n} from './components/SplitButton/index';\nexport {\n SplitButton,\n renderSplitButton_unstable,\n splitButtonClassNames,\n useSplitButtonStyles_unstable,\n useSplitButton_unstable,\n useSplitButtonBase_unstable,\n} from './components/SplitButton/index';\n"],"names":["SplitButton","renderSplitButton_unstable","splitButtonClassNames","useSplitButtonStyles_unstable","useSplitButton_unstable","useSplitButtonBase_unstable"],"mappings":";;;;;;;;;;;;eAQEA,kBAAW;;;eACXC,iCAA0B;;;eAC1BC,4BAAqB;;;eAGrBG,kCAA2B;;;eAF3BF,oCAA6B;;;eAC7BC,8BAAuB;;;uBAElB,iCAAiC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/index.ts"],"sourcesContent":["export { Button } from './Button';\n// Explicit exports to omit ButtonCommons\nexport type { ButtonBaseProps, ButtonProps, ButtonSlots, ButtonBaseState, ButtonState } from './Button.types';\nexport { renderButton_unstable } from './renderButton';\nexport { useButton_unstable } from './useButton';\nexport { useButtonBase_unstable } from './useButtonBase';\nexport { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles.styles';\n"],"names":["Button","renderButton_unstable","useButton_unstable","useButtonBase_unstable","buttonClassNames","useButtonStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,cAAM;;;eAMNI,uCAAgB;;;eAHhBH,mCAAqB;;;eAErBE,qCAAsB;;;eACJE,+CAAwB;;;eAF1CH,6BAAkB;;;wBAJJ,WAAW;8BAGI,iBAAiB;2BACpB,cAAc;+BACV,kBAAkB;uCACE,2BAA2B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/renderButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { ButtonSlots, 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_unstable = (state: ButtonState): JSXElement => {\n assertSlots<ButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <state.root>\n {iconPosition !== 'after' && state.icon && <state.icon />}\n {!iconOnly && state.root.children}\n {iconPosition === 'after' && state.icon && <state.icon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderButton_unstable","state","iconOnly","iconPosition","root","icon","children"],"mappings":";;;;+BAWaC;;;;;;4BAVb,iCAAiD;gCAErB,4BAA4B;AAQjD,8BAA8B,CAACC;QACpCF,2BAAAA,EAAyBE;IACzB,MAAM,EAAEC,QAAQ,EAAEC,YAAY,EAAE,GAAGF;IAEnC,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMG,IAAI,EAAA;;YACRD,iBAAiB,WAAWF,MAAMI,IAAI,IAAA,WAAA,GAAI,mBAAA,EAACJ,MAAMI,IAAI,EAAA,CAAA;YACrD,CAACH,YAAYD,MAAMG,IAAI,CAACE,QAAQ;YAChCH,iBAAiB,WAAWF,MAAMI,IAAI,IAAA,WAAA,OAAI,eAAA,EAACJ,MAAMI,IAAI,EAAA,CAAA;;;AAG5D,EAAE"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "useButton_unstable", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return useButton_unstable;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _ButtonContext = require("../../contexts/ButtonContext");
|
|
15
|
-
const _useButtonBase = require("./useButtonBase");
|
|
16
|
-
const useButton_unstable = (props, ref)=>{
|
|
17
|
-
const { size: contextSize } = (0, _ButtonContext.useButtonContext)();
|
|
18
|
-
const { appearance = 'secondary', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;
|
|
19
|
-
const state = (0, _useButtonBase.useButtonBase_unstable)(props, ref);
|
|
20
|
-
return {
|
|
21
|
-
// Props passed at the top-level
|
|
22
|
-
appearance,
|
|
23
|
-
shape,
|
|
24
|
-
size,
|
|
25
|
-
...state
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/useButton.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useButtonContext } from '../../contexts/ButtonContext';\nimport type { ButtonProps, ButtonState } from './Button.types';\nimport { useButtonBase_unstable } from './useButtonBase';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonState => {\n const { size: contextSize } = useButtonContext();\n const { appearance = 'secondary', shape = 'rounded', size = contextSize ?? 'medium' } = props;\n const state = useButtonBase_unstable(props, ref);\n\n return {\n // Props passed at the top-level\n appearance,\n shape,\n size,\n ...state,\n };\n};\n"],"names":["React","useButtonContext","useButtonBase_unstable","useButton_unstable","props","ref","size","contextSize","appearance","shape","state"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;+BACE,+BAA+B;+BAEzB,kBAAkB;AAOlD,MAAMG,qBAAqB,CAChCC,OACAC;IAEA,MAAM,EAAEC,MAAMC,WAAW,EAAE,OAAGN,+BAAAA;IAC9B,MAAM,EAAEO,aAAa,WAAW,EAAEC,QAAQ,SAAS,EAAEH,OAAOC,gBAAAA,QAAAA,gBAAAA,KAAAA,IAAAA,cAAe,QAAQ,EAAE,GAAGH;IACxF,MAAMM,YAAQR,qCAAAA,EAAuBE,OAAOC;IAE5C,OAAO;QACL,gCAAgC;QAChCG;QACAC;QACAH;QACA,GAAGI,KAAK;IACV;AACF,EAAE"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "useButtonBase_unstable", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return useButtonBase_unstable;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _reactaria = require("@fluentui/react-aria");
|
|
15
|
-
const _reactutilities = require("@fluentui/react-utilities");
|
|
16
|
-
const useButtonBase_unstable = (props, ref)=>{
|
|
17
|
-
const { as = 'button', disabled = false, disabledFocusable = false, icon, iconPosition = 'before' } = props;
|
|
18
|
-
const iconShorthand = _reactutilities.slot.optional(icon, {
|
|
19
|
-
elementType: 'span'
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
// Props passed at the top-level
|
|
23
|
-
disabled,
|
|
24
|
-
disabledFocusable,
|
|
25
|
-
iconPosition,
|
|
26
|
-
iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),
|
|
27
|
-
// Slots definition
|
|
28
|
-
components: {
|
|
29
|
-
root: 'button',
|
|
30
|
-
icon: 'span'
|
|
31
|
-
},
|
|
32
|
-
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(as, (0, _reactaria.useARIAButtonProps)(props.as, props)), {
|
|
33
|
-
elementType: 'button',
|
|
34
|
-
defaultProps: {
|
|
35
|
-
ref: ref,
|
|
36
|
-
type: as === 'button' ? 'button' : undefined
|
|
37
|
-
}
|
|
38
|
-
}),
|
|
39
|
-
icon: iconShorthand
|
|
40
|
-
};
|
|
41
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/useButtonBase.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ARIAButtonSlotProps, useARIAButtonProps } from '@fluentui/react-aria';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ButtonBaseProps, ButtonBaseState } from './Button.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButtonBase_unstable = (\n props: ButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonBaseState => {\n const { as = 'button', disabled = false, disabledFocusable = false, icon, iconPosition = 'before' } = props;\n const iconShorthand = slot.optional(icon, { elementType: 'span' });\n return {\n // Props passed at the top-level\n disabled,\n disabledFocusable,\n iconPosition,\n iconOnly: Boolean(iconShorthand?.children && !props.children),\n // Slots definition\n components: { root: 'button', icon: 'span' },\n root: slot.always<ARIAButtonSlotProps<'a'>>(getIntrinsicElementProps(as, useARIAButtonProps(props.as, props)), {\n elementType: 'button',\n defaultProps: {\n ref: ref as React.Ref<HTMLButtonElement & HTMLAnchorElement>,\n type: as === 'button' ? 'button' : undefined,\n },\n }),\n icon: iconShorthand,\n };\n};\n"],"names":["React","useARIAButtonProps","getIntrinsicElementProps","slot","useButtonBase_unstable","props","ref","as","disabled","disabledFocusable","icon","iconPosition","iconShorthand","optional","elementType","iconOnly","Boolean","children","components","root","always","defaultProps","type","undefined"],"mappings":"AAAA;;;;;+BAYaI;;;;;;;iEAVU,QAAQ;2BACyB,uBAAuB;gCAChC,4BAA4B;AAQpE,+BAA+B,CACpCC,OACAC;IAEA,MAAM,EAAEC,KAAK,QAAQ,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAEC,IAAI,EAAEC,eAAe,QAAQ,EAAE,GAAGN;IACtG,MAAMO,gBAAgBT,oBAAAA,CAAKU,QAAQ,CAACH,MAAM;QAAEI,aAAa;IAAO;IAChE,OAAO;QACL,gCAAgC;QAChCN;QACAC;QACAE;QACAI,UAAUC,QAAQJ,CAAAA,kBAAAA,QAAAA,kBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,cAAeK,QAAAA,AAAQ,KAAI,CAACZ,MAAMY,QAAQ;QAC5D,mBAAmB;QACnBC,YAAY;YAAEC,MAAM;YAAUT,MAAM;QAAO;QAC3CS,MAAMhB,oBAAAA,CAAKiB,MAAM,CAA2BlB,4CAAAA,EAAyBK,QAAIN,6BAAAA,EAAmBI,MAAME,EAAE,EAAEF,SAAS;YAC7GS,aAAa;YACbO,cAAc;gBACZf,KAAKA;gBACLgB,MAAMf,OAAO,WAAW,WAAWgB;YACrC;QACF;QACAb,MAAME;IACR;AACF,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useButtonStyles.styles.js"],"sourcesContent":["'use client';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nexport const buttonClassNames = {\n root: 'fui-Button',\n icon: 'fui-Button__icon'\n};\nconst iconSpacingVar = '--fui-Button__icon--spacing';\nconst buttonSpacingSmall = '3px';\nconst buttonSpacingSmallWithIcon = '1px';\nconst buttonSpacingMedium = '5px';\nconst buttonSpacingLarge = '8px';\nconst buttonSpacingLargeWithIcon = '7px';\n/* Firefox has box shadow sizing issue at some zoom levels\n * this will ensure the inset boxShadow is always uniform\n * without affecting other browser platforms\n */ const boxShadowStrokeWidthThinMoz = `calc(${tokens.strokeWidthThin} + 0.25px)`;\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n margin: 0,\n overflow: 'hidden',\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n fontFamily: tokens.fontFamilyBase,\n outlineStyle: 'none',\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n borderColor: tokens.colorNeutralStroke1Hover,\n color: tokens.colorNeutralForeground1Hover,\n cursor: 'pointer'\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n borderColor: tokens.colorNeutralStroke1Pressed,\n color: tokens.colorNeutralForeground1Pressed,\n outlineStyle: 'none'\n },\n padding: `${buttonSpacingMedium} ${tokens.spacingHorizontalM}`,\n minWidth: '96px',\n borderRadius: tokens.borderRadiusMedium,\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase300,\n // Transition styles\n transitionDuration: tokens.durationFaster,\n transitionProperty: 'background, border, color',\n transitionTimingFunction: tokens.curveEasyEase,\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms'\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':focus': {\n borderColor: 'ButtonText'\n },\n ':hover': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n },\n // Focus styles\n ...createCustomFocusIndicatorStyle({\n borderColor: tokens.colorStrokeFocus2,\n borderRadius: tokens.borderRadiusMedium,\n borderWidth: '1px',\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n boxShadow: `0 0 0 ${tokens.strokeWidthThin} ${tokens.colorStrokeFocus2}\n inset\n `,\n zIndex: 1\n }),\n // BUGFIX: Mozilla specific styles (Mozilla BugID: 1857642)\n '@supports (-moz-appearance:button)': {\n ...createCustomFocusIndicatorStyle({\n boxShadow: `0 0 0 ${boxShadowStrokeWidthThinMoz} ${tokens.colorStrokeFocus2}\n inset\n `\n })\n }\n});\nconst useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n fontSize: '20px',\n height: '20px',\n width: '20px',\n [iconSpacingVar]: tokens.spacingHorizontalSNudge\n});\nconst useRootStyles = makeStyles({\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorTransparentBackgroundPressed\n }\n },\n primary: {\n backgroundColor: tokens.colorBrandBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand\n },\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('HighlightText'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n ':hover': {\n backgroundColor: 'HighlightText',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight'\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: 'HighlightText',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight'\n }\n }\n },\n secondary: {\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Hover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n },\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover\n }\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Pressed,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n },\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed\n }\n },\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight',\n [`& .${buttonClassNames.icon}`]: {\n color: 'Highlight'\n }\n },\n ':hover:active,:active:focus-visible': {\n color: 'Highlight',\n [`& .${buttonClassNames.icon}`]: {\n color: 'Highlight'\n }\n }\n }\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n }\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n }\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n color: 'Highlight'\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorTransparentBackground,\n color: 'Highlight'\n }\n }\n },\n // Shape variations\n circular: {\n borderRadius: tokens.borderRadiusCircular\n },\n rounded: {\n },\n square: {\n borderRadius: tokens.borderRadiusNone\n },\n // Size variations\n small: {\n minWidth: '64px',\n padding: `${buttonSpacingSmall} ${tokens.spacingHorizontalS}`,\n borderRadius: tokens.borderRadiusMedium,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200\n },\n smallWithIcon: {\n paddingBottom: buttonSpacingSmallWithIcon,\n paddingTop: buttonSpacingSmallWithIcon\n },\n medium: {\n },\n large: {\n minWidth: '96px',\n padding: `${buttonSpacingLarge} ${tokens.spacingHorizontalL}`,\n borderRadius: tokens.borderRadiusMedium,\n fontSize: tokens.fontSizeBase400,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase400\n },\n largeWithIcon: {\n paddingBottom: buttonSpacingLargeWithIcon,\n paddingTop: buttonSpacingLargeWithIcon\n }\n});\nconst useRootDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled\n },\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n [`& .${iconFilledClassName}`]: {\n display: 'none'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline'\n },\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n [`& .${iconFilledClassName}`]: {\n display: 'none'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline'\n },\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n }\n },\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n [`& .${buttonClassNames.icon}`]: {\n color: 'GrayText'\n },\n ':focus': {\n ...shorthands.borderColor('GrayText')\n },\n ':hover': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n [`& .${buttonClassNames.icon}`]: {\n color: 'GrayText'\n }\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n [`& .${buttonClassNames.icon}`]: {\n color: 'GrayText'\n }\n }\n }\n },\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorTransparentBackground\n }\n },\n primary: {\n ...shorthands.borderColor('transparent'),\n ':hover': {\n ...shorthands.borderColor('transparent')\n },\n ':hover:active,:active:focus-visible': {\n ...shorthands.borderColor('transparent')\n }\n },\n secondary: {\n },\n subtle: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent')\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent')\n }\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent')\n },\n ':hover:active,:active:focus-visible': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent')\n }\n }\n});\nconst useRootFocusStyles = makeStyles({\n // Shape variations\n circular: createCustomFocusIndicatorStyle({\n borderRadius: tokens.borderRadiusCircular\n }),\n rounded: {\n },\n square: createCustomFocusIndicatorStyle({\n borderRadius: tokens.borderRadiusNone\n }),\n // Primary styles\n primary: {\n ...createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorStrokeFocus2),\n boxShadow: `${tokens.shadow2}, 0 0 0 ${tokens.strokeWidthThin} ${tokens.colorStrokeFocus2} inset, 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorNeutralForegroundOnBrand} inset`,\n ':hover': {\n boxShadow: `${tokens.shadow2}, 0 0 0 ${tokens.strokeWidthThin} ${tokens.colorStrokeFocus2} inset`,\n ...shorthands.borderColor(tokens.colorStrokeFocus2)\n }\n }),\n // BUGFIX: Mozilla specific styles (Mozilla BugID: 1857642)\n '@supports (-moz-appearance:button)': {\n ...createCustomFocusIndicatorStyle({\n boxShadow: `${tokens.shadow2}, 0 0 0 ${boxShadowStrokeWidthThinMoz} ${tokens.colorStrokeFocus2} inset, 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorNeutralForegroundOnBrand} inset`,\n ':hover': {\n boxShadow: `${tokens.shadow2}, 0 0 0 ${boxShadowStrokeWidthThinMoz} ${tokens.colorStrokeFocus2} inset`\n }\n })\n }\n },\n // Size variations\n small: createCustomFocusIndicatorStyle({\n borderRadius: tokens.borderRadiusSmall\n }),\n medium: {\n },\n large: createCustomFocusIndicatorStyle({\n borderRadius: tokens.borderRadiusLarge\n })\n});\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n padding: buttonSpacingSmallWithIcon,\n minWidth: '24px',\n maxWidth: '24px'\n },\n medium: {\n padding: buttonSpacingMedium,\n minWidth: '32px',\n maxWidth: '32px'\n },\n large: {\n padding: buttonSpacingLargeWithIcon,\n minWidth: '40px',\n maxWidth: '40px'\n }\n});\nconst useIconStyles = makeStyles({\n // Size variations\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n [iconSpacingVar]: tokens.spacingHorizontalXS\n },\n medium: {\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n [iconSpacingVar]: tokens.spacingHorizontalSNudge\n },\n // Icon position variations\n before: {\n marginRight: `var(${iconSpacingVar})`\n },\n after: {\n marginLeft: `var(${iconSpacingVar})`\n }\n});\nexport const useButtonStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseClassName = useRootBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const { appearance, disabled, disabledFocusable, icon, iconOnly, iconPosition, shape, size } = state;\n state.root.className = mergeClasses(buttonClassNames.root, rootBaseClassName, appearance && rootStyles[appearance], rootStyles[size], icon && size === 'small' && rootStyles.smallWithIcon, icon && size === 'large' && rootStyles.largeWithIcon, rootStyles[shape], // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base, (disabled || disabledFocusable) && rootDisabledStyles.highContrast, appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance], // Focus styles\n appearance === 'primary' && rootFocusStyles.primary, rootFocusStyles[size], rootFocusStyles[shape], // Icon-only styles\n iconOnly && rootIconOnlyStyles[size], // User provided class name\n state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(buttonClassNames.icon, iconBaseClassName, !!state.root.children && iconStyles[iconPosition], iconStyles[size], state.icon.className);\n }\n return state;\n};\n"],"names":["iconFilledClassName","iconRegularClassName","createCustomFocusIndicatorStyle","tokens","shorthands","__styles","__resetStyles","mergeClasses","buttonClassNames","root","icon","iconSpacingVar","buttonSpacingSmall","buttonSpacingSmallWithIcon","buttonSpacingMedium","buttonSpacingLarge","buttonSpacingLargeWithIcon","boxShadowStrokeWidthThinMoz","strokeWidthThin","useRootBaseClassName","r","s","useIconBaseClassName","useRootStyles","outline","De3pzq","Jwef8y","Bpjbzib","primary","g2u3we","h3c5rm","B9xav0g","zhjwy3","sj55zd","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","Bi91k9c","im15vp","Hjvxdg","Gpfmf1","ustxxc","Brsut9c","By8wz76","Bcq6wej","Jcjdmf","sc4o1m","Bosien3","B7iucu3","B8gzw0y","Bbkh6qg","F230oe","Bdw8ktp","Bj1xduy","Bhh2cfd","Bahaeuw","Bv2bamp","vxuvv6","Bli9q98","Bx2tt8t","yad0b3","j2fop7","secondary","subtle","Bk3fhr4","Bmfj8id","Bbdnnc7","Bqou3pl","Bsnehw8","wsxvnf","Buhizc3","Bqabnb4","transparent","circular","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","rounded","square","small","Bf4jedk","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Be2twd7","Bhrd7zp","Bg96gwp","smallWithIcon","medium","large","largeWithIcon","d","p","h","m","useRootDisabledStyles","base","Bceei9c","Bfinmwp","eoavqd","Bses4qk","highContrast","Grqk0h","h3ptyc","Buw724y","Buk7464","Hwei09","useRootFocusStyles","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","j6ew2k","he4mth","Byr4aka","lks7q5","Bnan3qt","k1dn9","Bqsb82s","jg1oma","t","useRootIconOnlyStyles","B2u0y6b","useIconStyles","Bqenvij","a9b677","Bqrlyyl","before","t21cq0","after","Frg6f3","useButtonStyles_unstable","state","rootBaseClassName","iconBaseClassName","rootStyles","rootDisabledStyles","rootFocusStyles","rootIconOnlyStyles","iconStyles","appearance","disabled","disabledFocusable","iconOnly","iconPosition","shape","size","className","children"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAKCQ,gBAAgB;;;IAgdhBqI,wBAAwB;;;;4BAldd,uBAAuB;uBACwB,gBAAgB;AAC/E,yBAAyB;IAC5BpI,IAAI,EAAE,YAAY;IAClBC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,cAAc,GAAG,6BAA6B;AACpD,MAAMC,kBAAkB,GAAG,KAAK;AAChC,MAAMC,0BAA0B,GAAG,KAAK;AACxC,MAAMC,mBAAmB,GAAG,KAAK;AACjC,MAAMC,kBAAkB,GAAG,KAAK;AAChC,MAAMC,0BAA0B,GAAG,KAAK;AACxC;;;CAGA,GAAI,MAAMC,2BAA2B,GAAG,CAAA,KAAA,EAAQd,kBAAM,CAACe,eAAe,CAAA,UAAA,CAAY;AAClF,MAAMC,oBAAoB,GAAA,WAAA,OAAGb,oBAAA,EAAA,YAAA,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C,EAAE,2BAAA;IACtCd,KAAK,CAACrI,IAAI,CAACoJ,SAAS,CAAC;IACrB,IAAIf,KAAK,CAACpI,IAAI,EAAE;QACZoI,KAAK,CAACpI,IAAI,CAACmJ,SAAS,OAAGtJ,mBAAY,EAACC,gBAAgB,CAACE,IAAI,EAAEsI,iBAAiB,EAAE,CAAC,CAACF,KAAK,CAACrI,IAAI,CAACqJ,QAAQ,IAAIT,UAAU,CAACK,YAAY,CAAC,EAAEL,UAAU,CAACO,IAAI,CAAC,EAAEd,KAAK,CAACpI,IAAI,CAACmJ,SAAS,CAAC;IAC5K;IACA,OAAOf,KAAK;AAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/CompoundButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { ButtonDesignPropNames, ButtonProps, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type CompoundButtonSlots = ButtonSlots & {\n /**\n * Second line of text that describes the action this button takes.\n */\n secondaryContent?: Slot<'span'>;\n\n /**\n * Container that wraps the children and the secondaryContent slot.\n */\n contentContainer: NonNullable<Slot<'span'>>;\n};\n\nexport type CompoundButtonProps = ComponentProps<Partial<CompoundButtonSlots>> &\n Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>;\n\nexport type CompoundButtonBaseProps = DistributiveOmit<CompoundButtonProps, ButtonDesignPropNames>;\n\nexport type CompoundButtonState = ComponentState<CompoundButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'>;\n\nexport type CompoundButtonBaseState = DistributiveOmit<CompoundButtonState, ButtonDesignPropNames>;\n"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/index.ts"],"sourcesContent":["export { CompoundButton } from './CompoundButton';\nexport type {\n CompoundButtonBaseProps,\n CompoundButtonProps,\n CompoundButtonSlots,\n CompoundButtonBaseState,\n CompoundButtonState,\n} from './CompoundButton.types';\nexport { renderCompoundButton_unstable } from './renderCompoundButton';\nexport { useCompoundButton_unstable } from './useCompoundButton';\nexport { useCompoundButtonBase_unstable } from './useCompoundButtonBase';\nexport { compoundButtonClassNames, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles.styles';\n"],"names":["CompoundButton","renderCompoundButton_unstable","useCompoundButton_unstable","useCompoundButtonBase_unstable","compoundButtonClassNames","useCompoundButtonStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,8BAAc;;;eAWdI,uDAAwB;;;eAHxBH,mDAA6B;;;eAE7BE,qDAA8B;;;eACJE,+DAAgC;;;eAF1DH,6CAA0B;;;gCATJ,mBAAmB;sCAQJ,yBAAyB;mCAC5B,sBAAsB;uCAClB,0BAA0B;+CACE,mCAAmC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "useCompoundButton_unstable", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return useCompoundButton_unstable;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _useCompoundButtonBase = require("./useCompoundButtonBase");
|
|
15
|
-
const _contexts = require("../../contexts");
|
|
16
|
-
const useCompoundButton_unstable = (props, ref)=>{
|
|
17
|
-
const { size: contextSize } = (0, _contexts.useButtonContext)();
|
|
18
|
-
const { appearance = 'secondary', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;
|
|
19
|
-
const state = (0, _useCompoundButtonBase.useCompoundButtonBase_unstable)(props, ref);
|
|
20
|
-
return {
|
|
21
|
-
appearance,
|
|
22
|
-
size,
|
|
23
|
-
shape,
|
|
24
|
-
...state
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/useCompoundButton.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.types';\nimport { useCompoundButtonBase_unstable } from './useCompoundButtonBase';\nimport { useButtonContext } from '../../contexts';\n\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButton_unstable = (\n props: CompoundButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonState => {\n const { size: contextSize } = useButtonContext();\n const { appearance = 'secondary', shape = 'rounded', size = contextSize ?? 'medium' } = props;\n const state = useCompoundButtonBase_unstable(props, ref);\n\n return {\n appearance,\n size,\n shape,\n ...state,\n };\n};\n"],"names":["React","useCompoundButtonBase_unstable","useButtonContext","useCompoundButton_unstable","props","ref","size","contextSize","appearance","shape","state"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;uCAEgB,0BAA0B;0BACxC,iBAAiB;AAO3C,MAAMG,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EAAEC,MAAMC,WAAW,EAAE,OAAGL,0BAAAA;IAC9B,MAAM,EAAEM,aAAa,WAAW,EAAEC,QAAQ,SAAS,EAAEH,OAAOC,gBAAAA,QAAAA,gBAAAA,KAAAA,IAAAA,cAAe,QAAQ,EAAE,GAAGH;IACxF,MAAMM,YAAQT,qDAAAA,EAA+BG,OAAOC;IAEpD,OAAO;QACLG;QACAF;QACAG;QACA,GAAGC,KAAK;IACV;AACF,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/useCompoundButtonBase.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { useButtonBase_unstable } from '../Button/index';\nimport type { CompoundButtonBaseProps, CompoundButtonBaseState } from './CompoundButton.types';\n\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButtonBase_unstable = (\n { contentContainer, secondaryContent, ...props }: CompoundButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonBaseState => {\n const state: CompoundButtonBaseState = {\n // Button state\n ...useButtonBase_unstable(props, ref),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span',\n },\n contentContainer: slot.always(contentContainer, { elementType: 'span' }),\n secondaryContent: slot.optional(secondaryContent, { elementType: 'span' }),\n };\n\n // Recalculate iconOnly to take into account secondaryContent.\n state.iconOnly = Boolean(state.icon?.children && !props.children && !state.secondaryContent?.children);\n\n return state;\n};\n"],"names":["React","slot","useButtonBase_unstable","useCompoundButtonBase_unstable","contentContainer","secondaryContent","props","ref","state","components","root","icon","always","elementType","optional","iconOnly","Boolean","children"],"mappings":"AAAA;;;;;+BAYaG;;;;;;;iEAVU,QAAQ;gCACV,4BAA4B;uBACV,kBAAkB;AAQlD,uCAAuC,CAC5C,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAE,GAAGC,OAAgC,EACzEC;QAkByBC,aAA4CA;IAhBrE,MAAMA,QAAiC;QACrC,eAAe;QACf,OAAGN,6BAAAA,EAAuBI,OAAOC,IAAI;QAErC,mBAAmB;QACnBE,YAAY;YACVC,MAAM;YACNC,MAAM;YACNP,kBAAkB;YAClBC,kBAAkB;QACpB;QACAD,kBAAkBH,oBAAAA,CAAKW,MAAM,CAACR,kBAAkB;YAAES,aAAa;QAAO;QACtER,kBAAkBJ,oBAAAA,CAAKa,QAAQ,CAACT,kBAAkB;YAAEQ,aAAa;QAAO;IAC1E;IAEA,8DAA8D;IAC9DL,MAAMO,QAAQ,GAAGC,QAAQR,CAAAA,CAAAA,cAAAA,MAAMG,IAAAA,AAAI,MAAA,QAAVH,gBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,YAAYS,QAAAA,AAAQ,KAAI,CAACX,MAAMW,QAAQ,IAAI,CAAA,CAAA,CAACT,0BAAAA,MAAMH,gBAAAA,AAAgB,MAAA,QAAtBG,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAwBS,QAAAA,AAAQ;IAErG,OAAOT;AACT,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useCompoundButtonStyles.styles.js"],"sourcesContent":["'use client';\nimport { tokens } from '@fluentui/react-theme';\nimport { mergeClasses, makeStyles } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles.styles';\nexport const compoundButtonClassNames = {\n root: 'fui-CompoundButton',\n icon: 'fui-CompoundButton__icon',\n contentContainer: 'fui-CompoundButton__contentContainer',\n secondaryContent: 'fui-CompoundButton__secondaryContent'\n};\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n height: 'auto',\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2\n },\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed\n }\n }\n },\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight'\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight'\n }\n }\n }\n },\n // Appearance variations\n outline: {\n },\n primary: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand\n },\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand\n }\n },\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'HighlightText'\n }\n }\n },\n secondary: {\n },\n subtle: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2\n },\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed\n }\n },\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Canvas'\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Canvas'\n }\n }\n }\n },\n transparent: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2\n },\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed\n }\n }\n },\n // Size variations\n small: {\n padding: `${tokens.spacingHorizontalS} ${tokens.spacingHorizontalS} ${tokens.spacingHorizontalMNudge} ${tokens.spacingHorizontalS}`,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300\n },\n medium: {\n padding: `14px ${tokens.spacingHorizontalM} ${tokens.spacingHorizontalL} ${tokens.spacingHorizontalM}`,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300\n },\n large: {\n padding: `18px ${tokens.spacingHorizontalL} ${tokens.spacingHorizontalXL} ${tokens.spacingHorizontalL}`,\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400\n },\n // Disabled styles\n disabled: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled\n },\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n }\n },\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText'\n },\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText'\n }\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText'\n }\n }\n }\n }\n});\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n padding: tokens.spacingHorizontalXS,\n maxWidth: '48px',\n minWidth: '48px'\n },\n medium: {\n padding: tokens.spacingHorizontalSNudge,\n maxWidth: '52px',\n minWidth: '52px'\n },\n large: {\n padding: tokens.spacingHorizontalS,\n maxWidth: '56px',\n minWidth: '56px'\n }\n});\nconst useIconStyles = makeStyles({\n // Base styles\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px'\n },\n // Icon position variations\n before: {\n marginRight: tokens.spacingHorizontalM\n },\n after: {\n marginLeft: tokens.spacingHorizontalM\n }\n});\nconst useContentContainerStyles = makeStyles({\n // Base styles\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left'\n }\n});\nconst useSecondaryContentStyles = makeStyles({\n // Base styles\n base: {\n lineHeight: '100%',\n fontWeight: tokens.fontWeightRegular\n },\n // Size variations\n small: {\n fontSize: tokens.fontSizeBase200\n },\n medium: {\n fontSize: tokens.fontSizeBase200\n },\n large: {\n fontSize: tokens.fontSizeBase300\n }\n});\nexport const useCompoundButtonStyles_unstable = (state)=>{\n 'use no memo';\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, size } = state;\n state.root.className = mergeClasses(compoundButtonClassNames.root, // Root styles\n rootStyles.base, rootStyles.highContrast, appearance && rootStyles[appearance], rootStyles[size], // Disabled styles\n (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast, // Icon-only styles\n iconOnly && rootIconOnlyStyles[size], // User provided class name\n state.root.className);\n state.contentContainer.className = mergeClasses(compoundButtonClassNames.contentContainer, contentContainerStyles.base, state.contentContainer.className);\n if (state.icon) {\n state.icon.className = mergeClasses(compoundButtonClassNames.icon, iconStyles.base, state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition], state.icon.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(compoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);\n }\n useButtonStyles_unstable(state);\n return state;\n};\n"],"names":["tokens","mergeClasses","__styles","useButtonStyles_unstable","compoundButtonClassNames","root","icon","contentContainer","secondaryContent","useRootStyles","base","Bqenvij","J657lq","Jlnjib","Bo7webf","highContrast","m3fafd","pus4l6","outline","primary","D126e9","secondary","subtle","transparent","small","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Be2twd7","Bg96gwp","medium","large","disabled","disabledHighContrast","d","p","h","m","useRootIconOnlyStyles","B2u0y6b","Bf4jedk","useIconStyles","a9b677","before","t21cq0","after","Frg6f3","useContentContainerStyles","mc9l5x","Beiy3e4","fsow6f","useSecondaryContentStyles","Bhrd7zp","useCompoundButtonStyles_unstable","state","rootStyles","rootIconOnlyStyles","iconStyles","contentContainerStyles","secondaryContentStyles","appearance","disabledFocusable","iconOnly","iconPosition","size","className","children","undefined"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICI,wBAAwB;;;IAuNxBmD,gCAAgC;;;;uBAzNJ,gBAAgB;uCAChB,kCAAkC;AACpE,iCAAiC;IACpClD,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,0BAA0B;IAChCC,gBAAgB,EAAE,sCAAsC;IACxDC,gBAAgB,EAAE;AACtB,CAAC;AACD,MAAMC,aAAa,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAQ,IAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,YAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,OAAA,EAAA,CAAA;IAAAC,OAAA,EAAA;QAAAP,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAM,MAAA,EAAA;IAAA;IAAAC,SAAA,EAAA,CAAA;IAAAC,MAAA,EAAA;QAAAV,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAE,MAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAM,WAAA,EAAA;QAAAX,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAU,KAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,MAAA,EAAA;QAAAP,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC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ACQ,IAAI,CAAC,EAAE,2BAAA;IACtCV,KAAK,CAACnD,IAAI,CAAC8D,SAAS,CAAC;IACrBX,KAAK,CAACjD,gBAAgB,CAAC4D,SAAS,OAAGlE,mBAAY,EAACG,wBAAwB,CAACG,gBAAgB,EAAEqD,sBAAsB,CAAClD,IAAI,EAAE8C,KAAK,CAACjD,gBAAgB,CAAC4D,SAAS,CAAC;IACzJ,IAAIX,KAAK,CAAClD,IAAI,EAAE;QACZkD,KAAK,CAAClD,IAAI,CAAC6D,SAAS,OAAGlE,mBAAY,EAACG,wBAAwB,CAACE,IAAI,EAAEqD,UAAU,CAACjD,IAAI,EAAE8C,KAAK,CAACnD,IAAI,CAAC+D,QAAQ,KAAKC,SAAS,IAAIb,KAAK,CAACnD,IAAI,CAAC+D,QAAQ,KAAK,IAAI,IAAIT,UAAU,CAACM,YAAY,CAAC,EAAET,KAAK,CAAClD,IAAI,CAAC6D,SAAS,CAAC;IAC5M;IACA,IAAIX,KAAK,CAAChD,gBAAgB,EAAE;QACxBgD,KAAK,CAAChD,gBAAgB,CAAC2D,SAAS,OAAGlE,mBAAY,EAACG,wBAAwB,CAACI,gBAAgB,EAAEqD,sBAAsB,CAACnD,IAAI,EAAEmD,sBAAsB,CAACK,IAAI,CAAC,EAAEV,KAAK,CAAChD,gBAAgB,CAAC2D,SAAS,CAAC;IAC3L;QACAhE,+CAAwB,EAACqD,KAAK,CAAC;IAC/B,OAAOA,KAAK;AAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CompoundButton/useCompoundButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { tokens } from '@fluentui/react-theme';\nimport { mergeClasses, makeStyles } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\nexport const compoundButtonClassNames: SlotClassNames<CompoundButtonSlots> = {\n root: 'fui-CompoundButton',\n icon: 'fui-CompoundButton__icon',\n contentContainer: 'fui-CompoundButton__contentContainer',\n secondaryContent: 'fui-CompoundButton__secondaryContent',\n};\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n height: 'auto',\n\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'HighlightText',\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Canvas',\n },\n },\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Canvas',\n },\n },\n },\n },\n transparent: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n\n // Size variations\n small: {\n padding: `${tokens.spacingHorizontalS} ${tokens.spacingHorizontalS} ${tokens.spacingHorizontalMNudge} ${tokens.spacingHorizontalS}`,\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n medium: {\n padding: `14px ${tokens.spacingHorizontalM} ${tokens.spacingHorizontalL} ${tokens.spacingHorizontalM}`,\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n large: {\n padding: `18px ${tokens.spacingHorizontalL} ${tokens.spacingHorizontalXL} ${tokens.spacingHorizontalL}`,\n\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n\n // Disabled styles\n disabled: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n\n ':hover:active,:active:focus-visible': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n },\n },\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n padding: tokens.spacingHorizontalXS,\n\n maxWidth: '48px',\n minWidth: '48px',\n },\n medium: {\n padding: tokens.spacingHorizontalSNudge,\n\n maxWidth: '52px',\n minWidth: '52px',\n },\n large: {\n padding: tokens.spacingHorizontalS,\n\n maxWidth: '56px',\n minWidth: '56px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Base styles\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px',\n },\n\n // Icon position variations\n before: {\n marginRight: tokens.spacingHorizontalM,\n },\n after: {\n marginLeft: tokens.spacingHorizontalM,\n },\n});\n\nconst useContentContainerStyles = makeStyles({\n // Base styles\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left',\n },\n});\n\nconst useSecondaryContentStyles = makeStyles({\n // Base styles\n base: {\n lineHeight: '100%',\n fontWeight: tokens.fontWeightRegular,\n },\n\n // Size variations\n small: {\n fontSize: tokens.fontSizeBase200,\n },\n medium: {\n fontSize: tokens.fontSizeBase200,\n },\n large: {\n fontSize: tokens.fontSizeBase300,\n },\n});\n\nexport const useCompoundButtonStyles_unstable = (state: CompoundButtonState): CompoundButtonState => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n\n const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, size } = state;\n\n state.root.className = mergeClasses(\n compoundButtonClassNames.root,\n\n // Root styles\n rootStyles.base,\n rootStyles.highContrast,\n appearance && rootStyles[appearance],\n rootStyles[size],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n state.contentContainer.className = mergeClasses(\n compoundButtonClassNames.contentContainer,\n contentContainerStyles.base,\n state.contentContainer.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n compoundButtonClassNames.icon,\n iconStyles.base,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n state.icon.className,\n );\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n compoundButtonClassNames.secondaryContent,\n secondaryContentStyles.base,\n secondaryContentStyles[size],\n state.secondaryContent.className,\n );\n }\n\n useButtonStyles_unstable(state);\n\n return state;\n};\n"],"names":["tokens","mergeClasses","makeStyles","useButtonStyles_unstable","compoundButtonClassNames","root","icon","contentContainer","secondaryContent","useRootStyles","base","height","color","colorNeutralForeground2","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","highContrast","outline","primary","colorNeutralForegroundOnBrand","secondary","subtle","transparent","colorNeutralForeground2BrandHover","colorNeutralForeground2BrandPressed","small","padding","spacingHorizontalS","spacingHorizontalMNudge","fontSize","fontSizeBase300","lineHeight","lineHeightBase300","medium","spacingHorizontalM","spacingHorizontalL","large","spacingHorizontalXL","fontSizeBase400","lineHeightBase400","disabled","colorNeutralForegroundDisabled","disabledHighContrast","useRootIconOnlyStyles","spacingHorizontalXS","maxWidth","minWidth","spacingHorizontalSNudge","useIconStyles","width","before","marginRight","after","marginLeft","useContentContainerStyles","display","flexDirection","textAlign","useSecondaryContentStyles","fontWeight","fontWeightRegular","fontSizeBase200","useCompoundButtonStyles_unstable","state","rootStyles","rootIconOnlyStyles","iconStyles","contentContainerStyles","secondaryContentStyles","appearance","disabledFocusable","iconOnly","iconPosition","size","className","children","undefined"],"mappings":"AAAA;;;;;;;;;;;;IAQaI,wBAAAA;;;oCA4PA0D;eAAAA;;;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,MAAMvD,gBAAgB,CAACkE,SAAS,OAAGzE,mBAAAA,EACjCG,yBAAyBI,gBAAgB,EACzC4D,uBAAuB1D,IAAI,EAC3B0D,sBAAsB,CAACK,KAAK,EAC5BV,MAAMvD,gBAAgB,CAACkE,SAAS;IAEpC;QAEAvE,+CAAAA,EAAyB4D;IAEzB,OAAOA;AACT,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuButton/MenuButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { ButtonDesignPropNames, ButtonProps, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type MenuButtonSlots = ButtonSlots & {\n /**\n * Menu icon that indicates that this button has a menu that can be expanded.\n */\n menuIcon?: Slot<'span'>;\n};\n\nexport type MenuButtonProps = ComponentProps<MenuButtonSlots> &\n Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'shape' | 'size'>;\n\nexport type MenuButtonBaseProps = DistributiveOmit<MenuButtonProps, ButtonDesignPropNames>;\nexport type MenuButtonState = ComponentState<MenuButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;\n\nexport type MenuButtonBaseState = DistributiveOmit<MenuButtonState, ButtonDesignPropNames>;\n"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuButton/index.ts"],"sourcesContent":["export type {\n MenuButtonBaseProps,\n MenuButtonProps,\n MenuButtonSlots,\n MenuButtonBaseState,\n MenuButtonState,\n} from './MenuButton.types';\nexport { MenuButton } from './MenuButton';\nexport { renderMenuButton_unstable } from './renderMenuButton';\nexport { useMenuButton_unstable } from './useMenuButton';\nexport { useMenuButtonBase_unstable } from './useMenuButtonBase';\nexport { menuButtonClassNames, useMenuButtonStyles_unstable } from './useMenuButtonStyles.styles';\n"],"names":["MenuButton","renderMenuButton_unstable","useMenuButton_unstable","useMenuButtonBase_unstable","menuButtonClassNames","useMenuButtonStyles_unstable"],"mappings":";;;;;;;;;;;;eAOSA,sBAAU;;;eAIVI,+CAAoB;;;eAHpBH,2CAAyB;;;eAEzBE,6CAA0B;;;eACJE,uDAA4B;;;eAFlDH,qCAAsB;;;4BAFJ,eAAe;kCACA,qBAAqB;+BACxB,kBAAkB;mCACd,sBAAsB;2CACE,+BAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuButton/renderMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { MenuButtonSlots, 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_unstable = (state: MenuButtonState): JSXElement => {\n assertSlots<MenuButtonSlots>(state);\n const { icon, iconOnly } = state;\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {!iconOnly && state.root.children}\n {(!iconOnly || !icon?.children) && state.menuIcon && <state.menuIcon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuButton_unstable","state","icon","iconOnly","root","children","menuIcon"],"mappings":";;;;+BAWaC;;;;;;4BAVb,iCAAiD;gCAErB,4BAA4B;AAQjD,kCAAkC,CAACC;QACxCF,2BAAAA,EAA6BE;IAC7B,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGF;IAE3B,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMG,IAAI,EAAA;;YACRH,MAAMC,IAAI,IAAA,WAAA,OAAI,eAAA,EAACD,MAAMC,IAAI,EAAA,CAAA;YACzB,CAACC,YAAYF,MAAMG,IAAI,CAACC,QAAQ;aAC/B,CAACF,YAAY,EAACD,SAAAA,QAAAA,SAAAA,KAAAA,IAAAA,KAAAA,IAAAA,KAAMG,QAAAA,CAAQ,CAAD,IAAMJ,MAAMK,QAAQ,IAAA,WAAA,OAAI,eAAA,EAACL,MAAMK,QAAQ,EAAA,CAAA;;;AAG1E,EAAE"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "useMenuButton_unstable", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return useMenuButton_unstable;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _reacticons = require("@fluentui/react-icons");
|
|
15
|
-
const _contexts = require("../../contexts");
|
|
16
|
-
const _useMenuButtonBase = require("./useMenuButtonBase");
|
|
17
|
-
const useMenuButton_unstable = (props, ref)=>{
|
|
18
|
-
'use no memo';
|
|
19
|
-
const { size: contextSize } = (0, _contexts.useButtonContext)();
|
|
20
|
-
const { appearance = 'secondary', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;
|
|
21
|
-
const state = (0, _useMenuButtonBase.useMenuButtonBase_unstable)(props, ref);
|
|
22
|
-
return {
|
|
23
|
-
appearance,
|
|
24
|
-
size,
|
|
25
|
-
shape,
|
|
26
|
-
...state,
|
|
27
|
-
menuIcon: {
|
|
28
|
-
children: /*#__PURE__*/ _react.createElement(_reacticons.ChevronDownRegular, null),
|
|
29
|
-
...state.menuIcon
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuButton/useMenuButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport type { MenuButtonProps, MenuButtonState } from './MenuButton.types';\nimport { useButtonContext } from '../../contexts';\nimport { useMenuButtonBase_unstable } from './useMenuButtonBase';\n\n/**\n * Given user props, returns the final state for a MenuButton.\n */\nexport const useMenuButton_unstable = (\n props: MenuButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): MenuButtonState => {\n 'use no memo';\n\n const { size: contextSize } = useButtonContext();\n const { appearance = 'secondary', shape = 'rounded', size = contextSize ?? 'medium' } = props;\n const state = useMenuButtonBase_unstable(props, ref);\n\n return {\n appearance,\n size,\n shape,\n ...state,\n menuIcon: {\n children: <ChevronDownRegular />,\n ...state.menuIcon,\n },\n };\n};\n"],"names":["React","ChevronDownRegular","useButtonContext","useMenuButtonBase_unstable","useMenuButton_unstable","props","ref","size","contextSize","appearance","shape","state","menuIcon","children"],"mappings":"AAAA;;;;;+BAWaI;;;;;;;iEATU,QAAQ;4BACI,wBAAwB;0BAE1B,iBAAiB;mCACP,sBAAsB;AAK1D,+BAA+B,CACpCC,OACAC;IAEA;IAEA,MAAM,EAAEC,MAAMC,WAAW,EAAE,OAAGN,0BAAAA;IAC9B,MAAM,EAAEO,aAAa,WAAW,EAAEC,QAAQ,SAAS,EAAEH,OAAOC,gBAAAA,QAAAA,gBAAAA,KAAAA,IAAAA,cAAe,QAAQ,EAAE,GAAGH;IACxF,MAAMM,YAAQR,6CAAAA,EAA2BE,OAAOC;IAEhD,OAAO;QACLG;QACAF;QACAG;QACA,GAAGC,KAAK;QACRC,UAAU;YACRC,UAAAA,WAAAA,GAAU,OAAA,aAAA,CAACZ,8BAAAA,EAAAA;YACX,GAAGU,MAAMC,QAAQ;QACnB;IACF;AACF,EAAE"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "useMenuButtonBase_unstable", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function() {
|
|
9
|
-
return useMenuButtonBase_unstable;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _reactutilities = require("@fluentui/react-utilities");
|
|
15
|
-
const _index = require("../Button/index");
|
|
16
|
-
const useMenuButtonBase_unstable = ({ menuIcon, ...props }, ref)=>{
|
|
17
|
-
'use no memo';
|
|
18
|
-
const buttonState = (0, _index.useButtonBase_unstable)(props, ref);
|
|
19
|
-
// force aria-expanded to be a boolean, not a string
|
|
20
|
-
buttonState.root['aria-expanded'] = props['aria-expanded'] ? props['aria-expanded'] === 'true' || props['aria-expanded'] === true : false;
|
|
21
|
-
return {
|
|
22
|
-
...buttonState,
|
|
23
|
-
// State calculated from a set of props
|
|
24
|
-
iconOnly: Boolean(!props.children),
|
|
25
|
-
// Slots definition
|
|
26
|
-
components: {
|
|
27
|
-
root: 'button',
|
|
28
|
-
icon: 'span',
|
|
29
|
-
menuIcon: 'span'
|
|
30
|
-
},
|
|
31
|
-
menuIcon: _reactutilities.slot.optional(menuIcon, {
|
|
32
|
-
elementType: 'span',
|
|
33
|
-
renderByDefault: true
|
|
34
|
-
})
|
|
35
|
-
};
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuButton/useMenuButtonBase.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { useButtonBase_unstable } from '../Button/index';\nimport type { MenuButtonBaseProps, MenuButtonBaseState } from './MenuButton.types';\n\n/**\n * Given user props, returns the final state for a MenuButton.\n */\nexport const useMenuButtonBase_unstable = (\n { menuIcon, ...props }: MenuButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): MenuButtonBaseState => {\n 'use no memo';\n\n const buttonState = useButtonBase_unstable(props, ref);\n // force aria-expanded to be a boolean, not a string\n buttonState.root['aria-expanded'] = props['aria-expanded']\n ? props['aria-expanded'] === 'true' || props['aria-expanded'] === true\n : false;\n\n return {\n ...buttonState,\n\n // State calculated from a set of props\n iconOnly: Boolean(!props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n menuIcon: 'span',\n },\n\n menuIcon: slot.optional(menuIcon, {\n elementType: 'span',\n renderByDefault: true,\n }),\n };\n};\n"],"names":["React","slot","useButtonBase_unstable","useMenuButtonBase_unstable","menuIcon","props","ref","buttonState","root","iconOnly","Boolean","children","components","icon","optional","elementType","renderByDefault"],"mappings":"AAAA;;;;;+BAUaG;;;;;;;iEARU,QAAQ;gCACV,4BAA4B;uBACV,kBAAkB;AAMlD,mCAAmC,CACxC,EAAEC,QAAQ,EAAE,GAAGC,OAA4B,EAC3CC;IAEA;IAEA,MAAMC,kBAAcL,6BAAAA,EAAuBG,OAAOC;IAClD,oDAAoD;IACpDC,YAAYC,IAAI,CAAC,gBAAgB,GAAGH,KAAK,CAAC,gBAAgB,GACtDA,KAAK,CAAC,gBAAgB,KAAK,UAAUA,KAAK,CAAC,gBAAgB,KAAK,OAChE;IAEJ,OAAO;QACL,GAAGE,WAAW;QAEd,uCAAuC;QACvCE,UAAUC,QAAQ,CAACL,MAAMM,QAAQ;QAEjC,mBAAmB;QACnBC,YAAY;YACVJ,MAAM;YACNK,MAAM;YACNT,UAAU;QACZ;QAEAA,UAAUH,oBAAAA,CAAKa,QAAQ,CAACV,UAAU;YAChCW,aAAa;YACbC,iBAAiB;QACnB;IACF;AACF,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useMenuButtonStyles.styles.js"],"sourcesContent":["'use client';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { tokens } from '@fluentui/react-theme';\nimport { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles.styles';\nexport const menuButtonClassNames = {\n root: 'fui-MenuButton',\n icon: 'fui-MenuButton__icon',\n menuIcon: 'fui-MenuButton__menuIcon'\n};\nconst useRootExpandedStyles = makeStyles({\n base: {\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n }\n },\n // Appearance variations\n outline: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n ...shorthands.borderWidth(tokens.strokeWidthThicker),\n color: tokens.colorNeutralForeground1Selected\n },\n primary: {\n backgroundColor: tokens.colorBrandBackgroundSelected\n },\n secondary: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n color: tokens.colorNeutralForeground1Selected\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground2Selected\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n color: tokens.colorNeutralForeground2BrandSelected\n }\n});\nconst useIconExpandedStyles = makeStyles({\n // Appearance variations\n outline: {\n color: tokens.colorNeutralForeground1Selected\n },\n primary: {\n },\n secondary: {\n color: tokens.colorNeutralForeground1Selected\n },\n subtle: {\n color: tokens.colorNeutralForeground2BrandSelected\n },\n transparent: {\n color: tokens.colorNeutralForeground2BrandSelected\n },\n highContrast: {\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight'\n }\n }\n }\n});\nconst useMenuIconStyles = makeStyles({\n base: {\n lineHeight: 0\n },\n // Size appearance\n small: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px'\n },\n medium: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px'\n },\n large: {\n fontSize: '16px',\n height: '16px',\n lineHeight: tokens.lineHeightBase400,\n width: '16px'\n },\n // Not-icon only\n notIconOnly: {\n marginLeft: tokens.spacingHorizontalXS\n }\n});\nexport const useMenuButtonStyles_unstable = (state)=>{\n 'use no memo';\n const rootExpandedStyles = useRootExpandedStyles();\n const iconExpandedStyles = useIconExpandedStyles();\n const menuIconStyles = useMenuIconStyles();\n state.root.className = mergeClasses(menuButtonClassNames.root, state.root['aria-expanded'] && rootExpandedStyles.base, state.root['aria-expanded'] && rootExpandedStyles[state.appearance], state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(menuButtonClassNames.icon, state.root['aria-expanded'] && iconExpandedStyles[state.appearance] && iconExpandedStyles.highContrast, state.icon.className);\n }\n if (state.menuIcon) {\n state.menuIcon.className = mergeClasses(menuButtonClassNames.menuIcon, menuIconStyles.base, menuIconStyles[state.size], !state.iconOnly && menuIconStyles.notIconOnly, state.menuIcon.className);\n }\n useButtonStyles_unstable({\n ...state,\n iconPosition: 'before'\n });\n return state;\n};\n"],"names":["iconFilledClassName","iconRegularClassName","tokens","mergeClasses","__styles","shorthands","useButtonStyles_unstable","menuButtonClassNames","root","icon","menuIcon","useRootExpandedStyles","base","D0sxk3","t6yez3","outline","g2u3we","h3c5rm","B9xav0g","zhjwy3","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","sj55zd","primary","De3pzq","secondary","subtle","transparent","d","useIconExpandedStyles","highContrast","Bahaeuw","m","useMenuIconStyles","Bg96gwp","small","Be2twd7","Bqenvij","a9b677","medium","large","notIconOnly","Frg6f3","useMenuButtonStyles_unstable","state","rootExpandedStyles","iconExpandedStyles","menuIconStyles","className","appearance","size","iconOnly","iconPosition"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAKCO,oBAAoB;;;IA0FpBsC,4BAA4B;;;;uBA5FY,gBAAgB;uCAC5B,kCAAkC;AACpE,6BAA6B;IAChCrC,IAAI,EAAE,gBAAgB;IACtBC,IAAI,EAAE,sBAAsB;IAC5BC,QAAQ,EAAE;AACd,CAAC;AACD,MAAMC,qBAAqB,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAQ,IAAA,E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AAoB,CAACE,IAAI,EAAEqC,KAAK,CAACtC,IAAI,CAAC,eAAe,CAAC,IAAIwC,kBAAkB,CAACF,KAAK,CAACK,UAAU,CAAC,IAAIH,kBAAkB,CAAChB,YAAY,EAAEc,KAAK,CAACrC,IAAI,CAACyC,SAAS,CAAC;IAChM;IACA,IAAIJ,KAAK,CAACpC,QAAQ,EAAE;QAChBoC,KAAK,CAACpC,QAAQ,CAACwC,SAAS,OAAG/C,mBAAY,EAACI,oBAAoB,CAACG,QAAQ,EAAEuC,cAAc,CAACrC,IAAI,EAAEqC,cAAc,CAACH,KAAK,CAACM,IAAI,CAAC,EAAE,CAACN,KAAK,CAACO,QAAQ,IAAIJ,cAAc,CAACN,WAAW,EAAEG,KAAK,CAACpC,QAAQ,CAACwC,SAAS,CAAC;IACpM;QACA5C,+CAAwB,EAAC;QACrB,GAAGwC,KAAK;QACRQ,YAAY,EAAE;IAClB,CAAC,CAAC;IACF,OAAOR,KAAK;AAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MenuButton/useMenuButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles.styles';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\nexport const menuButtonClassNames: SlotClassNames<MenuButtonSlots> = {\n root: 'fui-MenuButton',\n icon: 'fui-MenuButton__icon',\n menuIcon: 'fui-MenuButton__menuIcon',\n};\n\nconst useRootExpandedStyles = makeStyles({\n base: {\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n // Appearance variations\n outline: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n ...shorthands.borderWidth(tokens.strokeWidthThicker),\n color: tokens.colorNeutralForeground1Selected,\n },\n primary: {\n backgroundColor: tokens.colorBrandBackgroundSelected,\n },\n secondary: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n color: tokens.colorNeutralForeground1Selected,\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground2Selected,\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n});\n\nconst useIconExpandedStyles = makeStyles({\n // Appearance variations\n outline: {\n color: tokens.colorNeutralForeground1Selected,\n },\n primary: {\n /* The primary styles are exactly the same as the base styles. */\n },\n secondary: {\n color: tokens.colorNeutralForeground1Selected,\n },\n subtle: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n transparent: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n highContrast: {\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight',\n },\n },\n },\n});\n\nconst useMenuIconStyles = makeStyles({\n base: {\n lineHeight: 0,\n },\n\n // Size appearance\n small: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n medium: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n large: {\n fontSize: '16px',\n height: '16px',\n lineHeight: tokens.lineHeightBase400,\n width: '16px',\n },\n\n // Not-icon only\n notIconOnly: {\n marginLeft: tokens.spacingHorizontalXS,\n },\n});\n\nexport const useMenuButtonStyles_unstable = (state: MenuButtonState): MenuButtonState => {\n 'use no memo';\n\n const rootExpandedStyles = useRootExpandedStyles();\n const iconExpandedStyles = useIconExpandedStyles();\n const menuIconStyles = useMenuIconStyles();\n\n state.root.className = mergeClasses(\n menuButtonClassNames.root,\n state.root['aria-expanded'] && rootExpandedStyles.base,\n state.root['aria-expanded'] && rootExpandedStyles[state.appearance],\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n menuButtonClassNames.icon,\n state.root['aria-expanded'] && iconExpandedStyles[state.appearance] && iconExpandedStyles.highContrast,\n state.icon.className,\n );\n }\n\n if (state.menuIcon) {\n state.menuIcon.className = mergeClasses(\n menuButtonClassNames.menuIcon,\n menuIconStyles.base,\n menuIconStyles[state.size],\n !state.iconOnly && menuIconStyles.notIconOnly,\n state.menuIcon.className,\n );\n }\n\n useButtonStyles_unstable({ ...state, iconPosition: 'before' });\n\n return state;\n};\n"],"names":["iconFilledClassName","iconRegularClassName","tokens","mergeClasses","makeStyles","shorthands","useButtonStyles_unstable","menuButtonClassNames","root","icon","menuIcon","useRootExpandedStyles","base","display","outline","borderColor","colorNeutralStroke1Selected","borderWidth","strokeWidthThicker","color","colorNeutralForeground1Selected","primary","backgroundColor","colorBrandBackgroundSelected","secondary","colorNeutralBackground1Selected","subtle","colorSubtleBackgroundSelected","colorNeutralForeground2Selected","transparent","colorTransparentBackgroundSelected","colorNeutralForeground2BrandSelected","useIconExpandedStyles","highContrast","useMenuIconStyles","lineHeight","small","fontSize","height","lineHeightBase200","width","medium","large","lineHeightBase400","notIconOnly","marginLeft","spacingHorizontalXS","useMenuButtonStyles_unstable","state","rootExpandedStyles","iconExpandedStyles","menuIconStyles","className","appearance","size","iconOnly","iconPosition"],"mappings":"AAAA;;;;;;;;;;;;IASaO,oBAAAA;;;gCAkGAwC;eAAAA;;;4BAzG6C,wBAAwB;4BAC3D,wBAAwB;uBAEM,iBAAiB;uCAC7B,mCAAmC;AAGrE,6BAA8D;IACnEvC,MAAM;IACNC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,MAAMC,4BAAwBP,iBAAAA,EAAW;IACvCQ,MAAM;QACJ,CAAC,CAAC,GAAG,EAAEZ,+BAAAA,EAAqB,CAAC,EAAE;YAC7Ba,SAAS;QACX;QACA,CAAC,CAAC,GAAG,EAAEZ,gCAAAA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