@fluentui/react-button 9.0.0-alpha.85 → 9.0.0-alpha.89
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +123 -1
- package/CHANGELOG.md +47 -2
- package/dist/react-button.d.ts +118 -25
- package/lib/SplitButton.d.ts +1 -0
- package/lib/SplitButton.js +2 -0
- package/lib/SplitButton.js.map +1 -0
- package/lib/components/Button/Button.types.d.ts +2 -2
- package/lib/components/Button/Button.types.js.map +1 -1
- package/lib/components/Button/renderButton.js.map +1 -1
- package/lib/components/Button/useButton.d.ts +3 -1
- package/lib/components/Button/useButton.js +3 -1
- package/lib/components/Button/useButton.js.map +1 -1
- package/lib/components/Button/useButtonState.d.ts +2 -2
- package/lib/components/Button/useButtonState.js +2 -2
- package/lib/components/Button/useButtonState.js.map +1 -1
- package/lib/components/Button/useButtonStyles.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.d.ts +16 -2
- package/lib/components/CompoundButton/CompoundButton.types.d.ts +3 -4
- package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButton.d.ts +3 -1
- package/lib/components/CompoundButton/useCompoundButton.js +3 -1
- package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.js +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.types.d.ts +2 -3
- package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib/components/MenuButton/renderMenuButton.js +2 -1
- package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButton.d.ts +3 -1
- package/lib/components/MenuButton/useMenuButton.js +3 -3
- package/lib/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonState.d.ts +5 -0
- package/lib/components/MenuButton/useMenuButtonState.js +9 -1
- package/lib/components/MenuButton/useMenuButtonState.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.js +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.d.ts +7 -0
- package/lib/components/SplitButton/SplitButton.js +25 -0
- package/lib/components/SplitButton/SplitButton.js.map +1 -0
- package/lib/components/SplitButton/SplitButton.types.d.ts +30 -0
- package/lib/components/SplitButton/SplitButton.types.js +2 -0
- package/lib/components/SplitButton/SplitButton.types.js.map +1 -0
- package/lib/components/SplitButton/index.d.ts +5 -0
- package/lib/components/SplitButton/index.js +6 -0
- package/lib/components/SplitButton/index.js.map +1 -0
- package/lib/components/SplitButton/renderSplitButton.d.ts +5 -0
- package/lib/components/SplitButton/renderSplitButton.js +16 -0
- package/lib/components/SplitButton/renderSplitButton.js.map +1 -0
- package/lib/components/SplitButton/useSplitButton.d.ts +9 -0
- package/lib/components/SplitButton/useSplitButton.js +72 -0
- package/lib/components/SplitButton/useSplitButton.js.map +1 -0
- package/lib/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
- package/lib/components/SplitButton/useSplitButtonStyles.js +61 -0
- package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -0
- package/lib/components/ToggleButton/ToggleButton.d.ts +16 -2
- package/lib/components/ToggleButton/ToggleButton.types.d.ts +3 -4
- package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
- package/lib/components/ToggleButton/useChecked.d.ts +2 -2
- package/lib/components/ToggleButton/useChecked.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButton.d.ts +4 -1
- package/lib/components/ToggleButton/useToggleButton.js +4 -1
- package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.js +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-amd/SplitButton.d.ts +1 -0
- package/lib-amd/SplitButton.js +6 -0
- package/lib-amd/SplitButton.js.map +1 -0
- package/lib-amd/components/Button/Button.types.d.ts +2 -2
- package/lib-amd/components/Button/Button.types.js.map +1 -1
- package/lib-amd/components/Button/renderButton.js.map +1 -1
- package/lib-amd/components/Button/useButton.d.ts +3 -1
- package/lib-amd/components/Button/useButton.js +3 -1
- package/lib-amd/components/Button/useButton.js.map +1 -1
- package/lib-amd/components/Button/useButtonState.d.ts +2 -2
- package/lib-amd/components/Button/useButtonState.js +2 -2
- package/lib-amd/components/Button/useButtonState.js.map +1 -1
- package/lib-amd/components/Button/useButtonStyles.js +1 -0
- package/lib-amd/components/Button/useButtonStyles.js.map +1 -1
- package/lib-amd/components/CompoundButton/CompoundButton.d.ts +16 -2
- package/lib-amd/components/CompoundButton/CompoundButton.types.d.ts +3 -4
- package/lib-amd/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib-amd/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib-amd/components/CompoundButton/useCompoundButton.d.ts +3 -1
- package/lib-amd/components/CompoundButton/useCompoundButton.js +3 -1
- package/lib-amd/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib-amd/components/MenuButton/MenuButton.types.d.ts +2 -3
- package/lib-amd/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib-amd/components/MenuButton/renderMenuButton.js +2 -2
- package/lib-amd/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib-amd/components/MenuButton/useMenuButton.d.ts +3 -1
- package/lib-amd/components/MenuButton/useMenuButton.js +3 -3
- package/lib-amd/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib-amd/components/MenuButton/useMenuButtonState.d.ts +5 -0
- package/lib-amd/components/MenuButton/useMenuButtonState.js +7 -1
- package/lib-amd/components/MenuButton/useMenuButtonState.js.map +1 -1
- package/lib-amd/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib-amd/components/SplitButton/SplitButton.d.ts +7 -0
- package/lib-amd/components/SplitButton/SplitButton.js +19 -0
- package/lib-amd/components/SplitButton/SplitButton.js.map +1 -0
- package/lib-amd/components/SplitButton/SplitButton.types.d.ts +30 -0
- package/lib-amd/components/SplitButton/SplitButton.types.js +5 -0
- package/lib-amd/components/SplitButton/SplitButton.types.js.map +1 -0
- package/lib-amd/components/SplitButton/index.d.ts +5 -0
- package/lib-amd/components/SplitButton/index.js +11 -0
- package/lib-amd/components/SplitButton/index.js.map +1 -0
- package/lib-amd/components/SplitButton/renderSplitButton.d.ts +5 -0
- package/lib-amd/components/SplitButton/renderSplitButton.js +16 -0
- package/lib-amd/components/SplitButton/renderSplitButton.js.map +1 -0
- package/lib-amd/components/SplitButton/useSplitButton.d.ts +9 -0
- package/lib-amd/components/SplitButton/useSplitButton.js +55 -0
- package/lib-amd/components/SplitButton/useSplitButton.js.map +1 -0
- package/lib-amd/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
- package/lib-amd/components/SplitButton/useSplitButtonStyles.js +123 -0
- package/lib-amd/components/SplitButton/useSplitButtonStyles.js.map +1 -0
- package/lib-amd/components/ToggleButton/ToggleButton.d.ts +16 -2
- package/lib-amd/components/ToggleButton/ToggleButton.types.d.ts +3 -4
- package/lib-amd/components/ToggleButton/ToggleButton.types.js.map +1 -1
- package/lib-amd/components/ToggleButton/useChecked.d.ts +2 -2
- package/lib-amd/components/ToggleButton/useChecked.js.map +1 -1
- package/lib-amd/components/ToggleButton/useToggleButton.d.ts +4 -1
- package/lib-amd/components/ToggleButton/useToggleButton.js +4 -1
- package/lib-amd/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib-amd/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib-amd/index.d.ts +1 -0
- package/lib-amd/index.js +2 -1
- package/lib-amd/index.js.map +1 -1
- package/lib-commonjs/SplitButton.d.ts +1 -0
- package/lib-commonjs/SplitButton.js +10 -0
- package/lib-commonjs/SplitButton.js.map +1 -0
- package/lib-commonjs/components/Button/Button.types.d.ts +2 -2
- package/lib-commonjs/components/Button/renderButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButton.d.ts +3 -1
- package/lib-commonjs/components/Button/useButton.js +3 -1
- package/lib-commonjs/components/Button/useButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButtonState.d.ts +2 -2
- package/lib-commonjs/components/Button/useButtonState.js +2 -2
- package/lib-commonjs/components/Button/useButtonState.js.map +1 -1
- package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.d.ts +16 -2
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +3 -4
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +3 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js +3 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +2 -3
- package/lib-commonjs/components/MenuButton/renderMenuButton.js +2 -1
- package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +3 -1
- package/lib-commonjs/components/MenuButton/useMenuButton.js +3 -3
- package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonState.d.ts +5 -0
- package/lib-commonjs/components/MenuButton/useMenuButtonState.js +9 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonState.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.d.ts +7 -0
- package/lib-commonjs/components/SplitButton/SplitButton.js +38 -0
- package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -0
- package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +30 -0
- package/lib-commonjs/components/SplitButton/SplitButton.types.js +6 -0
- package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -0
- package/lib-commonjs/components/SplitButton/index.d.ts +5 -0
- package/lib-commonjs/components/SplitButton/index.js +26 -0
- package/lib-commonjs/components/SplitButton/index.js.map +1 -0
- package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +5 -0
- package/lib-commonjs/components/SplitButton/renderSplitButton.js +29 -0
- package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -0
- package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +9 -0
- package/lib-commonjs/components/SplitButton/useSplitButton.js +83 -0
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -0
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +71 -0
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -0
- package/lib-commonjs/components/ToggleButton/ToggleButton.d.ts +16 -2
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +3 -4
- package/lib-commonjs/components/ToggleButton/useChecked.d.ts +2 -2
- package/lib-commonjs/components/ToggleButton/useChecked.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +4 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.js +4 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib-commonjs/index.d.ts +1 -0
- package/lib-commonjs/index.js +2 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -10
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAGA,IAAM,qBAAqB,GAAG;AAC5B,EAAA,MAAM,EAAE,oBADoB;AAE5B,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fluentui/react-make-styles';\nimport type { SplitButtonState } from './SplitButton.types';\n\nconst SplitButtonClassNames = {\n button: 'SplitButton-button',\n menuButton: 'SplitButton-menuButton',\n};\n\nconst useStyles = makeStyles({\n root: theme => ({\n display: 'inline-flex',\n justifyContent: 'stretch',\n position: 'relative',\n\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.menuButton}`]: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n },\n }),\n rootBlock: {\n width: '100%',\n },\n rootPrimary: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralForegroundInverted,\n },\n },\n }),\n rootSubtle: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n }),\n rootTransparent: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStroke1Hover,\n },\n },\n }),\n rootDisabled: theme => ({\n // Use classnames to increase specificy of styles and avoid collisions.\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,\n },\n\n ':hover': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,\n },\n },\n\n ':active': {\n [`& .${SplitButtonClassNames.button}`]: {\n borderRightColor: theme.alias.color.neutral.neutralStrokeDisabled,\n },\n },\n }),\n});\n\nexport const useSplitButtonStyles = (state: SplitButtonState): SplitButtonState => {\n const styles = useStyles();\n\n state.className = mergeClasses(\n styles.root,\n state.block && styles.rootBlock,\n state.primary && styles.rootPrimary,\n state.subtle && styles.rootSubtle,\n state.transparent && styles.rootTransparent,\n state.disabled && styles.rootDisabled,\n state.className,\n );\n\n if (state.button) {\n state.button.className = mergeClasses(SplitButtonClassNames.button, state.button.className);\n }\n\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(SplitButtonClassNames.menuButton, state.menuButton.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,20 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { ToggleButtonProps } from './ToggleButton.types';
|
3
2
|
/**
|
4
3
|
* ToggleButtons are buttons that toggle between two defined states when triggered.
|
5
4
|
*/
|
6
|
-
export declare const ToggleButton: React.ForwardRefExoticComponent<
|
5
|
+
export declare const ToggleButton: React.ForwardRefExoticComponent<import("@fluentui/react-utilities").ComponentPropsCompat & React.ButtonHTMLAttributes<HTMLElement> & {
|
6
|
+
icon?: import("@fluentui/react-utilities").ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
|
7
|
+
block?: boolean | undefined;
|
8
|
+
circular?: boolean | undefined;
|
9
|
+
disabled?: boolean | undefined;
|
10
|
+
disabledFocusable?: boolean | undefined;
|
11
|
+
iconPosition?: "before" | "after" | undefined;
|
12
|
+
outline?: boolean | undefined;
|
13
|
+
primary?: boolean | undefined;
|
14
|
+
size?: "small" | "medium" | "large" | undefined;
|
15
|
+
subtle?: boolean | undefined;
|
16
|
+
transparent?: boolean | undefined;
|
17
|
+
} & {
|
18
|
+
checked?: boolean | undefined;
|
19
|
+
defaultChecked?: boolean | undefined;
|
20
|
+
} & React.RefAttributes<HTMLElement>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ComponentStateCompat } from '@fluentui/react-utilities';
|
2
2
|
import type { ButtonDefaultedProps, ButtonProps, ButtonShorthandPropsCompat, ButtonState } from '../Button/Button.types';
|
3
|
-
export
|
3
|
+
export declare type ToggleButtonProps = ButtonProps & {
|
4
4
|
/**
|
5
5
|
* Defines the controlled checked state of the `ToggleButton`.
|
6
6
|
* Mutually exclusive to `defaultChecked`.
|
@@ -15,8 +15,7 @@ export interface ToggleButtonProps extends ButtonProps {
|
|
15
15
|
* @default false
|
16
16
|
*/
|
17
17
|
defaultChecked?: boolean;
|
18
|
-
}
|
18
|
+
};
|
19
19
|
export declare type ToggleButtonShorthandPropsCompat = ButtonShorthandPropsCompat;
|
20
20
|
export declare type ToggleButtonDefaultedProps = ButtonDefaultedProps;
|
21
|
-
export
|
22
|
-
}
|
21
|
+
export declare type ToggleButtonState = ButtonState & ComponentStateCompat<ToggleButtonProps, ToggleButtonShorthandPropsCompat, ToggleButtonDefaultedProps>;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
export
|
2
|
+
export declare type CheckedState = {
|
3
3
|
checked?: boolean;
|
4
4
|
defaultChecked?: boolean;
|
5
5
|
onClick?: React.DOMAttributes<HTMLElement>['onClick'];
|
6
6
|
role?: string;
|
7
7
|
'aria-checked'?: React.AriaAttributes['aria-pressed'];
|
8
8
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
9
|
-
}
|
9
|
+
};
|
10
10
|
/**
|
11
11
|
* The useToggle hook processes adds the correct toggled state and acccessibility as needed.
|
12
12
|
* @param state - state to read and augment.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/ToggleButton/useChecked.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAYA;;;AAGG;;;AACI,IAAM,UAAU,GAAG,UAA8B,KAA9B,EAA2C;AAC3D,MAAA,OAAO,GAAoC,KAAK,CAAzC,OAAP;AAAA,MAAS,OAAO,GAA2B,KAAK,CAAhC,OAAhB;AAAA,MAAkB,cAAc,GAAW,KAAK,CAAhB,cAAhC;AAAA,MAAkC,IAAI,GAAK,KAAK,CAAV,IAAtC;;AACF,MAAA,EAAA,GAAkC,iBAAA,CAAA,oBAAA,CAAqB,OAArB,EAA8B,cAA9B,CAAlC;AAAA,MAAC,YAAY,GAAA,EAAA,CAAA,CAAA,CAAb;AAAA,MAAe,eAAe,GAAA,EAAA,CAAA,CAAA,CAA9B,CAF6D,CAInE;;;AACA,EAAA,KAAK,CAAC,OAAN,GAAgB,YAAhB,CALmE,CAOnE;;AACA,MAAM,kBAAkB,GAAG,IAAI,KAAK,kBAAT,IAA+B,IAAI,KAAK,UAAnE;AAEA,EAAA,KAAK,CAAC,kBAAkB,GAAG,cAAH,GAAoB,cAAvC,CAAL,GAA8D,CAAC,CAAC,YAAhE;AAEA,EAAA,KAAK,CAAC,OAAN,GAAgB,KAAK,CAAC,WAAN,CACd,UAAC,EAAD,EAAoD;AAClD,QAAI,OAAJ,EAAa;AACX,MAAA,OAAO,CAAC,EAAD,CAAP;;AAEA,UAAI,EAAE,CAAC,gBAAP,EAAyB;AACvB;AACD;AACF;;AAED,IAAA,eAAe,CAAC,CAAC,YAAF,CAAf;AACD,GAXa,EAYd,CAAC,YAAD,EAAe,eAAf,EAAgC,OAAhC,CAZc,CAAhB;AAcD,CA1BM;;AAAM,OAAA,CAAA,UAAA,GAAU,UAAV","sourcesContent":["import * as React from 'react';\nimport { useControllableValue } from '@fluentui/react-utilities';\n\nexport
|
1
|
+
{"version":3,"sources":["components/ToggleButton/useChecked.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAYA;;;AAGG;;;AACI,IAAM,UAAU,GAAG,UAA8B,KAA9B,EAA2C;AAC3D,MAAA,OAAO,GAAoC,KAAK,CAAzC,OAAP;AAAA,MAAS,OAAO,GAA2B,KAAK,CAAhC,OAAhB;AAAA,MAAkB,cAAc,GAAW,KAAK,CAAhB,cAAhC;AAAA,MAAkC,IAAI,GAAK,KAAK,CAAV,IAAtC;;AACF,MAAA,EAAA,GAAkC,iBAAA,CAAA,oBAAA,CAAqB,OAArB,EAA8B,cAA9B,CAAlC;AAAA,MAAC,YAAY,GAAA,EAAA,CAAA,CAAA,CAAb;AAAA,MAAe,eAAe,GAAA,EAAA,CAAA,CAAA,CAA9B,CAF6D,CAInE;;;AACA,EAAA,KAAK,CAAC,OAAN,GAAgB,YAAhB,CALmE,CAOnE;;AACA,MAAM,kBAAkB,GAAG,IAAI,KAAK,kBAAT,IAA+B,IAAI,KAAK,UAAnE;AAEA,EAAA,KAAK,CAAC,kBAAkB,GAAG,cAAH,GAAoB,cAAvC,CAAL,GAA8D,CAAC,CAAC,YAAhE;AAEA,EAAA,KAAK,CAAC,OAAN,GAAgB,KAAK,CAAC,WAAN,CACd,UAAC,EAAD,EAAoD;AAClD,QAAI,OAAJ,EAAa;AACX,MAAA,OAAO,CAAC,EAAD,CAAP;;AAEA,UAAI,EAAE,CAAC,gBAAP,EAAyB;AACvB;AACD;AACF;;AAED,IAAA,eAAe,CAAC,CAAC,YAAF,CAAf;AACD,GAXa,EAYd,CAAC,YAAD,EAAe,eAAf,EAAgC,OAAhC,CAZc,CAAhB;AAcD,CA1BM;;AAAM,OAAA,CAAA,UAAA,GAAU,UAAV","sourcesContent":["import * as React from 'react';\nimport { useControllableValue } from '@fluentui/react-utilities';\n\nexport type CheckedState = {\n checked?: boolean;\n defaultChecked?: boolean;\n onClick?: React.DOMAttributes<HTMLElement>['onClick'];\n\n role?: string;\n 'aria-checked'?: React.AriaAttributes['aria-pressed'];\n 'aria-pressed'?: React.AriaAttributes['aria-pressed'];\n};\n\n/**\n * The useToggle hook processes adds the correct toggled state and acccessibility as needed.\n * @param state - state to read and augment.\n */\nexport const useChecked = <TState extends CheckedState>(state: TState) => {\n const { onClick, checked, defaultChecked, role } = state;\n const [checkedValue, setCheckedValue] = useControllableValue(checked, defaultChecked);\n\n // Ensure the state is the correct controlled/uncontrolled value.\n state.checked = checkedValue;\n\n // Ensure the right aria value is set to represent the checked state.\n const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';\n\n state[isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed'] = !!checkedValue;\n\n state.onClick = React.useCallback(\n (ev: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n if (onClick) {\n onClick(ev);\n\n if (ev.defaultPrevented) {\n return;\n }\n }\n\n setCheckedValue(!checkedValue);\n },\n [checkedValue, setCheckedValue, onClick],\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';
|
3
3
|
/**
|
4
|
-
* Given user props,
|
4
|
+
* Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
|
5
|
+
* processed state.
|
6
|
+
* @param props - User provided props to the ToggleButton component.
|
7
|
+
* @param ref - User provided ref to be passed to the ToggleButton component.
|
5
8
|
*/
|
6
9
|
export declare const useToggleButton: (props: ToggleButtonProps, ref: React.Ref<HTMLElement>, defaultProps?: ToggleButtonProps | undefined) => ToggleButtonState;
|
@@ -9,7 +9,10 @@ var useButton_1 = /*#__PURE__*/require("../Button/useButton");
|
|
9
9
|
|
10
10
|
var useChecked_1 = /*#__PURE__*/require("./useChecked");
|
11
11
|
/**
|
12
|
-
* Given user props,
|
12
|
+
* Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
|
13
|
+
* processed state.
|
14
|
+
* @param props - User provided props to the ToggleButton component.
|
15
|
+
* @param ref - User provided ref to be passed to the ToggleButton component.
|
13
16
|
*/
|
14
17
|
|
15
18
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,WAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,IAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAGA
|
1
|
+
{"version":3,"sources":["components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,WAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,IAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAGA;;;;;AAKG;;;AACI,IAAM,eAAe,GAAG,UAC7B,KAD6B,EAE7B,GAF6B,EAG7B,YAH6B,EAGG;AAEhC,MAAM,KAAK,GAAG,WAAA,CAAA,SAAA,CAAU,KAAV,EAAiB,GAAjB,EAAsB,YAAtB,CAAd;AAEA,EAAA,YAAA,CAAA,UAAA,CAAW,KAAX;AAEA,SAAO,KAAP;AACD,CAVM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["import * as React from 'react';\nimport { useButton } from '../Button/useButton';\nimport { useChecked } from './useChecked';\nimport type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton = (\n props: ToggleButtonProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: ToggleButtonProps,\n) => {\n const state = useButton(props, ref, defaultProps);\n\n useChecked(state as ToggleButtonProps);\n\n return state as ToggleButtonState;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,IAAM,aAAa,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AAA,KAAK,CAAC,SAAN,GAAkB,mBAAA,CAAA,YAAA,CAChB,KAAK,CAAC,OAAN,IAAiB,UAAU,CAAC,OADZ,EAEhB,KAAK,CAAC,OAAN,IAAiB,KAAK,CAAC,OAAvB,IAAkC,UAAU,CAAC,cAF7B,EAGhB,KAAK,CAAC,OAAN,IAAiB,KAAK,CAAC,OAAvB,IAAkC,UAAU,CAAC,cAH7B,EAIhB,KAAK,CAAC,OAAN,IAAiB,KAAK,CAAC,MAAvB,IAAiC,UAAU,CAAC,aAJ5B,EAKhB,KAAK,CAAC,OAAN,IAAiB,KAAK,CAAC,WAAvB,IAAsC,UAAU,CAAC,kBALjC,EAMhB,CAAC,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,iBAAzB,KAA+C,UAAU,CAAC,QAN1C,EAOhB,CAAC,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,iBAAzB,KAA+C,KAAK,CAAC,OAArD,IAAgE,UAAU,CAAC,eAP3D,EAQhB,CAAC,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,iBAAzB,KAA+C,KAAK,CAAC,MAArD,IAA+D,UAAU,CAAC,cAR1D,EAShB,CAAC,KAAK,CAAC,QAAN,IAAkB,KAAK,CAAC,iBAAzB,KAA+C,KAAK,CAAC,WAArD,IAAoE,UAAU,CAAC,mBAT/D,EAUhB,KAAK,CAAC,SAVU,CAAlB;AAaA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,KAAP;AACD,CAnBM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport { useButtonStyles } from '../Button/useButtonStyles';\nimport type { ToggleButtonState } from './ToggleButton.types';\n\nconst useRootStyles = makeStyles({\n checked: theme => ({\n background: theme.alias.color.neutral.neutralBackground1Selected,\n borderColor: theme.alias.color.neutral.neutralStroke1,\n color: theme.alias.color.neutral.neutralForeground1,\n\n borderWidth: theme.global.strokeWidth.thin,\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackground1Hover,\n borderColor: theme.alias.color.neutral.neutralStroke1Hover,\n color: theme.alias.color.neutral.neutralForeground1,\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackground1Pressed,\n borderColor: theme.alias.color.neutral.neutralStroke1Pressed,\n color: theme.alias.color.neutral.neutralForeground1,\n },\n }),\n checkedOutline: theme => ({\n background: theme.alias.color.neutral.transparentBackgroundSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n },\n }),\n checkedPrimary: theme => ({\n background: theme.alias.color.neutral.brandBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n\n ':hover': {\n background: theme.alias.color.neutral.brandBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n\n ':active': {\n background: theme.alias.color.neutral.brandBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n },\n }),\n checkedSubtle: theme => ({\n background: theme.alias.color.neutral.subtleBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.subtleBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.subtleBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n checkedTransparent: theme => ({\n background: theme.alias.color.neutral.transparentBackgroundSelected,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandSelected,\n\n ':hover': {\n background: theme.alias.color.neutral.transparentBackgroundHover,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandHover,\n },\n\n ':active': {\n background: theme.alias.color.neutral.transparentBackgroundPressed,\n borderColor: 'transparent',\n color: theme.alias.color.neutral.neutralForeground2BrandPressed,\n },\n }),\n disabled: theme => ({\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n\n ':hover': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n\n ':active': {\n background: theme.alias.color.neutral.neutralBackgroundDisabled,\n borderColor: theme.alias.color.neutral.neutralStrokeDisabled,\n color: theme.alias.color.neutral.neutralForegroundDisabled,\n },\n }),\n disabledPrimary: {\n borderColor: 'transparent',\n\n ':hover': {\n borderColor: 'transparent',\n },\n\n ':active': {\n borderColor: 'transparent',\n },\n },\n disabledSubtle: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n disabledTransparent: {\n background: 'none',\n borderColor: 'transparent',\n\n ':hover': {\n background: 'none',\n borderColor: 'transparent',\n },\n\n ':active': {\n background: 'none',\n borderColor: 'transparent',\n },\n },\n});\n\nexport const useToggleButtonStyles = (state: ToggleButtonState): ToggleButtonState => {\n const rootStyles = useRootStyles();\n\n state.className = mergeClasses(\n state.checked && rootStyles.checked,\n state.checked && state.outline && rootStyles.checkedOutline,\n state.checked && state.primary && rootStyles.checkedPrimary,\n state.checked && state.subtle && rootStyles.checkedSubtle,\n state.checked && state.transparent && rootStyles.checkedTransparent,\n (state.disabled || state.disabledFocusable) && rootStyles.disabled,\n (state.disabled || state.disabledFocusable) && state.primary && rootStyles.disabledPrimary,\n (state.disabled || state.disabledFocusable) && state.subtle && rootStyles.disabledSubtle,\n (state.disabled || state.disabledFocusable) && state.transparent && rootStyles.disabledTransparent,\n state.className,\n );\n\n useButtonStyles(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/lib-commonjs/index.d.ts
CHANGED
package/lib-commonjs/index.js
CHANGED
@@ -12,5 +12,7 @@ tslib_1.__exportStar(require("./CompoundButton"), exports);
|
|
12
12
|
|
13
13
|
tslib_1.__exportStar(require("./MenuButton"), exports);
|
14
14
|
|
15
|
+
tslib_1.__exportStar(require("./SplitButton"), exports);
|
16
|
+
|
15
17
|
tslib_1.__exportStar(require("./ToggleButton"), exports);
|
16
18
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Button';\nexport * from './CompoundButton';\nexport * from './MenuButton';\nexport * from './ToggleButton';\n"],"sourceRoot":"../src/"}
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Button';\nexport * from './CompoundButton';\nexport * from './MenuButton';\nexport * from './SplitButton';\nexport * from './ToggleButton';\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-button",
|
3
|
-
"version": "9.0.0-alpha.
|
3
|
+
"version": "9.0.0-alpha.89",
|
4
4
|
"description": "Fluent UI React Button component.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -26,12 +26,12 @@
|
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/a11y-testing": "^0.1.0",
|
29
|
-
"@fluentui/babel-make-styles": "9.0.0-alpha.
|
30
|
-
"@fluentui/eslint-plugin": "
|
31
|
-
"@fluentui/jest-serializer-make-styles": "9.0.0-alpha.
|
32
|
-
"@fluentui/react-conformance": "
|
33
|
-
"@fluentui/react-conformance-make-styles": "9.0.0-alpha.
|
34
|
-
"@fluentui/react-menu": "9.0.0-alpha.
|
29
|
+
"@fluentui/babel-make-styles": "9.0.0-alpha.51",
|
30
|
+
"@fluentui/eslint-plugin": "*",
|
31
|
+
"@fluentui/jest-serializer-make-styles": "9.0.0-alpha.44",
|
32
|
+
"@fluentui/react-conformance": "*",
|
33
|
+
"@fluentui/react-conformance-make-styles": "9.0.0-alpha.13",
|
34
|
+
"@fluentui/react-menu": "9.0.0-alpha.80",
|
35
35
|
"@fluentui/scripts": "^1.0.0",
|
36
36
|
"@types/enzyme": "3.10.3",
|
37
37
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -47,9 +47,9 @@
|
|
47
47
|
"dependencies": {
|
48
48
|
"@fluentui/keyboard-keys": "9.0.0-alpha.3",
|
49
49
|
"@fluentui/react-icons": "^1.1.136",
|
50
|
-
"@fluentui/react-make-styles": "9.0.0-alpha.
|
51
|
-
"@fluentui/react-tabster": "9.0.0-alpha.
|
52
|
-
"@fluentui/react-utilities": "9.0.0-alpha.
|
50
|
+
"@fluentui/react-make-styles": "9.0.0-alpha.69",
|
51
|
+
"@fluentui/react-tabster": "9.0.0-alpha.63",
|
52
|
+
"@fluentui/react-utilities": "9.0.0-alpha.49",
|
53
53
|
"tslib": "^2.1.0"
|
54
54
|
},
|
55
55
|
"peerDependencies": {
|