@fluentui/react-button 1.0.0-beta.8 → 9.0.0-alpha.100
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +3258 -1
- package/CHANGELOG.md +1247 -2
- package/README.md +19 -108
- package/dist/demo/index.html +71 -0
- package/dist/demo/react-dom.development.js +21413 -0
- package/dist/demo/react.development.js +3155 -0
- package/dist/react-button.d.ts +130 -355
- package/lib/Button.js.map +1 -1
- package/lib/CompoundButton.js.map +1 -1
- package/lib/MenuButton.js.map +1 -1
- package/lib/SplitButton.js.map +1 -1
- package/lib/ToggleButton.js.map +1 -1
- package/lib/common/isConformant.d.ts +4 -2
- package/lib/common/isConformant.js +9 -5
- package/lib/common/isConformant.js.map +1 -1
- package/lib/components/Button/Button.d.ts +4 -5
- package/lib/components/Button/Button.js +8 -9
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.types.d.ts +46 -114
- package/lib/components/Button/Button.types.js +1 -0
- package/lib/components/Button/Button.types.js.map +1 -1
- package/lib/components/Button/index.d.ts +3 -3
- package/lib/components/Button/index.js +4 -3
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/renderButton.d.ts +2 -2
- package/lib/components/Button/renderButton.js +10 -10
- package/lib/components/Button/renderButton.js.map +1 -1
- package/lib/components/Button/useButton.d.ts +5 -10
- package/lib/components/Button/useButton.js +49 -24
- package/lib/components/Button/useButton.js.map +1 -1
- package/lib/components/Button/useButtonStyles.d.ts +10 -0
- package/lib/components/Button/useButtonStyles.js +354 -0
- package/lib/components/Button/useButtonStyles.js.map +1 -0
- package/lib/components/CompoundButton/CompoundButton.d.ts +4 -5
- package/lib/components/CompoundButton/CompoundButton.js +8 -11
- package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.types.d.ts +8 -27
- package/lib/components/CompoundButton/CompoundButton.types.js +1 -0
- package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib/components/CompoundButton/index.d.ts +2 -1
- package/lib/components/CompoundButton/index.js +3 -1
- package/lib/components/CompoundButton/index.js.map +1 -1
- package/lib/components/CompoundButton/renderCompoundButton.d.ts +2 -2
- package/lib/components/CompoundButton/renderCompoundButton.js +10 -12
- package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButton.d.ts +5 -10
- package/lib/components/CompoundButton/useCompoundButton.js +25 -28
- package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -0
- package/lib/components/CompoundButton/useCompoundButtonStyles.js +164 -0
- package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -0
- package/lib/components/MenuButton/MenuButton.d.ts +4 -5
- package/lib/components/MenuButton/MenuButton.js +8 -21
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.types.d.ts +7 -50
- package/lib/components/MenuButton/MenuButton.types.js +1 -0
- package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib/components/MenuButton/index.d.ts +2 -3
- package/lib/components/MenuButton/index.js +3 -3
- package/lib/components/MenuButton/index.js.map +1 -1
- package/lib/components/MenuButton/renderMenuButton.d.ts +2 -4
- package/lib/components/MenuButton/renderMenuButton.js +10 -14
- package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButton.d.ts +3 -7
- package/lib/components/MenuButton/useMenuButton.js +28 -22
- package/lib/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.d.ts +2 -0
- package/lib/components/MenuButton/useMenuButtonStyles.js +34 -0
- package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -0
- package/lib/components/SplitButton/SplitButton.d.ts +5 -5
- package/lib/components/SplitButton/SplitButton.js +9 -22
- package/lib/components/SplitButton/SplitButton.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.types.d.ts +12 -28
- package/lib/components/SplitButton/SplitButton.types.js +1 -0
- package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
- package/lib/components/SplitButton/index.d.ts +3 -2
- package/lib/components/SplitButton/index.js +3 -1
- package/lib/components/SplitButton/index.js.map +1 -1
- package/lib/components/SplitButton/renderSplitButton.d.ts +2 -4
- package/lib/components/SplitButton/renderSplitButton.js +8 -10
- package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButton.d.ts +5 -7
- package/lib/components/SplitButton/useSplitButton.js +69 -47
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
- package/lib/components/SplitButton/useSplitButtonStyles.js +77 -0
- package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -0
- package/lib/components/ToggleButton/ToggleButton.d.ts +4 -5
- package/lib/components/ToggleButton/ToggleButton.js +8 -11
- package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.types.d.ts +11 -17
- package/lib/components/ToggleButton/ToggleButton.types.js +1 -0
- package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
- package/lib/components/ToggleButton/index.d.ts +3 -3
- package/lib/components/ToggleButton/index.js +4 -3
- package/lib/components/ToggleButton/index.js.map +1 -1
- package/lib/components/ToggleButton/renderToggleButton.d.ts +1 -0
- package/lib/components/ToggleButton/renderToggleButton.js +2 -0
- package/lib/components/ToggleButton/renderToggleButton.js.map +1 -0
- package/lib/components/ToggleButton/useToggleButton.d.ts +8 -5
- package/lib/components/ToggleButton/useToggleButton.js +47 -5
- package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +2 -0
- package/lib/components/ToggleButton/useToggleButtonStyles.js +190 -0
- package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib-commonjs/Button.js +7 -2
- package/lib-commonjs/Button.js.map +1 -1
- package/lib-commonjs/CompoundButton.js +7 -2
- package/lib-commonjs/CompoundButton.js.map +1 -1
- package/lib-commonjs/MenuButton.js +7 -2
- package/lib-commonjs/MenuButton.js.map +1 -1
- package/lib-commonjs/SplitButton.js +7 -2
- package/lib-commonjs/SplitButton.js.map +1 -1
- package/lib-commonjs/ToggleButton.js +7 -2
- package/lib-commonjs/ToggleButton.js.map +1 -1
- package/lib-commonjs/common/isConformant.d.ts +4 -2
- package/lib-commonjs/common/isConformant.js +19 -7
- package/lib-commonjs/common/isConformant.js.map +1 -1
- package/lib-commonjs/components/Button/Button.d.ts +4 -5
- package/lib-commonjs/components/Button/Button.js +20 -12
- package/lib-commonjs/components/Button/Button.js.map +1 -1
- package/lib-commonjs/components/Button/Button.types.d.ts +46 -114
- package/lib-commonjs/components/Button/Button.types.js +4 -1
- package/lib-commonjs/components/Button/Button.types.js.map +1 -1
- package/lib-commonjs/components/Button/index.d.ts +3 -3
- package/lib-commonjs/components/Button/index.js +23 -5
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/renderButton.d.ts +2 -2
- package/lib-commonjs/components/Button/renderButton.js +24 -14
- package/lib-commonjs/components/Button/renderButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButton.d.ts +5 -10
- package/lib-commonjs/components/Button/useButton.js +59 -25
- package/lib-commonjs/components/Button/useButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButtonStyles.d.ts +10 -0
- package/lib-commonjs/components/Button/useButtonStyles.js +365 -0
- package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -0
- package/lib-commonjs/components/CompoundButton/CompoundButton.d.ts +4 -5
- package/lib-commonjs/components/CompoundButton/CompoundButton.js +20 -14
- package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +8 -27
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +4 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/index.d.ts +2 -1
- package/lib-commonjs/components/CompoundButton/index.js +22 -3
- package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +2 -2
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +24 -16
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +5 -10
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js +35 -28
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -0
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +175 -0
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -0
- package/lib-commonjs/components/MenuButton/MenuButton.d.ts +4 -5
- package/lib-commonjs/components/MenuButton/MenuButton.js +20 -24
- package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +7 -50
- package/lib-commonjs/components/MenuButton/MenuButton.types.js +4 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
- package/lib-commonjs/components/MenuButton/index.d.ts +2 -3
- package/lib-commonjs/components/MenuButton/index.js +22 -5
- package/lib-commonjs/components/MenuButton/index.js.map +1 -1
- package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +2 -4
- package/lib-commonjs/components/MenuButton/renderMenuButton.js +24 -18
- package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +3 -7
- package/lib-commonjs/components/MenuButton/useMenuButton.js +41 -23
- package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +2 -0
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +44 -0
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -0
- package/lib-commonjs/components/SplitButton/SplitButton.d.ts +5 -5
- package/lib-commonjs/components/SplitButton/SplitButton.js +21 -25
- package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +12 -28
- package/lib-commonjs/components/SplitButton/SplitButton.types.js +4 -1
- package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
- package/lib-commonjs/components/SplitButton/index.d.ts +3 -2
- package/lib-commonjs/components/SplitButton/index.js +22 -3
- package/lib-commonjs/components/SplitButton/index.js.map +1 -1
- package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +2 -4
- package/lib-commonjs/components/SplitButton/renderSplitButton.js +22 -14
- package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +5 -7
- package/lib-commonjs/components/SplitButton/useSplitButton.js +81 -48
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +88 -0
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -0
- package/lib-commonjs/components/ToggleButton/ToggleButton.d.ts +4 -5
- package/lib-commonjs/components/ToggleButton/ToggleButton.js +20 -14
- package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +11 -17
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +4 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/index.d.ts +3 -3
- package/lib-commonjs/components/ToggleButton/index.js +23 -5
- package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +1 -0
- package/lib-commonjs/components/ToggleButton/renderToggleButton.js +16 -0
- package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -0
- package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +8 -5
- package/lib-commonjs/components/ToggleButton/useToggleButton.js +60 -7
- package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +2 -0
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +200 -0
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -0
- package/lib-commonjs/index.d.ts +0 -1
- package/lib-commonjs/index.js +11 -3
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +37 -35
- package/config/api-extractor.json +0 -3
- package/config/pre-copy.json +0 -9
- package/config/tests.js +0 -11
- package/etc/react-button.api.md +0 -335
- package/just.config.ts +0 -3
- package/lib/components/Button/useButtonClasses.d.ts +0 -29
- package/lib/components/Button/useButtonClasses.js +0 -417
- package/lib/components/Button/useButtonClasses.js.map +0 -1
- package/lib/components/Button/useButtonState.d.ts +0 -6
- package/lib/components/Button/useButtonState.js +0 -28
- package/lib/components/Button/useButtonState.js.map +0 -1
- package/lib/components/CompoundButton/useCompoundButtonClasses.d.ts +0 -4
- package/lib/components/CompoundButton/useCompoundButtonClasses.js +0 -180
- package/lib/components/CompoundButton/useCompoundButtonClasses.js.map +0 -1
- package/lib/components/MenuButton/useExpanded.d.ts +0 -18
- package/lib/components/MenuButton/useExpanded.js +0 -61
- package/lib/components/MenuButton/useExpanded.js.map +0 -1
- package/lib/components/MenuButton/useMenuButtonClasses.d.ts +0 -3
- package/lib/components/MenuButton/useMenuButtonClasses.js +0 -78
- package/lib/components/MenuButton/useMenuButtonClasses.js.map +0 -1
- package/lib/components/MenuButton/useMenuButtonState.d.ts +0 -2
- package/lib/components/MenuButton/useMenuButtonState.js +0 -9
- package/lib/components/MenuButton/useMenuButtonState.js.map +0 -1
- package/lib/components/SplitButton/useSplitButtonClasses.d.ts +0 -3
- package/lib/components/SplitButton/useSplitButtonClasses.js +0 -123
- package/lib/components/SplitButton/useSplitButtonClasses.js.map +0 -1
- package/lib/components/ToggleButton/useChecked.d.ts +0 -14
- package/lib/components/ToggleButton/useChecked.js +0 -25
- package/lib/components/ToggleButton/useChecked.js.map +0 -1
- package/lib/components/ToggleButton/useToggleButtonClasses.d.ts +0 -3
- package/lib/components/ToggleButton/useToggleButtonClasses.js +0 -130
- package/lib/components/ToggleButton/useToggleButtonClasses.js.map +0 -1
- package/lib/utils/tempTypes.d.ts +0 -33
- package/lib/utils/tempTypes.js +0 -4
- package/lib/utils/tempTypes.js.map +0 -1
- package/lib/version.d.ts +0 -1
- package/lib/version.js +0 -5
- package/lib/version.js.map +0 -1
- package/lib-amd/Button.d.ts +0 -1
- package/lib-amd/Button.js +0 -6
- package/lib-amd/Button.js.map +0 -1
- package/lib-amd/CompoundButton.d.ts +0 -1
- package/lib-amd/CompoundButton.js +0 -6
- package/lib-amd/CompoundButton.js.map +0 -1
- package/lib-amd/MenuButton.d.ts +0 -1
- package/lib-amd/MenuButton.js +0 -6
- package/lib-amd/MenuButton.js.map +0 -1
- package/lib-amd/SplitButton.d.ts +0 -1
- package/lib-amd/SplitButton.js +0 -6
- package/lib-amd/SplitButton.js.map +0 -1
- package/lib-amd/ToggleButton.d.ts +0 -1
- package/lib-amd/ToggleButton.js +0 -6
- package/lib-amd/ToggleButton.js.map +0 -1
- package/lib-amd/common/isConformant.d.ts +0 -2
- package/lib-amd/common/isConformant.js +0 -13
- package/lib-amd/common/isConformant.js.map +0 -1
- package/lib-amd/components/Button/Button.d.ts +0 -7
- package/lib-amd/components/Button/Button.js +0 -16
- package/lib-amd/components/Button/Button.js.map +0 -1
- package/lib-amd/components/Button/Button.types.d.ts +0 -130
- package/lib-amd/components/Button/Button.types.js +0 -5
- package/lib-amd/components/Button/Button.types.js.map +0 -1
- package/lib-amd/components/Button/index.d.ts +0 -5
- package/lib-amd/components/Button/index.js +0 -9
- package/lib-amd/components/Button/index.js.map +0 -1
- package/lib-amd/components/Button/renderButton.d.ts +0 -5
- package/lib-amd/components/Button/renderButton.js +0 -17
- package/lib-amd/components/Button/renderButton.js.map +0 -1
- package/lib-amd/components/Button/useButton.d.ts +0 -13
- package/lib-amd/components/Button/useButton.js +0 -28
- package/lib-amd/components/Button/useButton.js.map +0 -1
- package/lib-amd/components/Button/useButtonClasses.d.ts +0 -29
- package/lib-amd/components/Button/useButtonClasses.js +0 -417
- package/lib-amd/components/Button/useButtonClasses.js.map +0 -1
- package/lib-amd/components/Button/useButtonState.d.ts +0 -6
- package/lib-amd/components/Button/useButtonState.js +0 -32
- package/lib-amd/components/Button/useButtonState.js.map +0 -1
- package/lib-amd/components/CompoundButton/CompoundButton.d.ts +0 -7
- package/lib-amd/components/CompoundButton/CompoundButton.js +0 -17
- package/lib-amd/components/CompoundButton/CompoundButton.js.map +0 -1
- package/lib-amd/components/CompoundButton/CompoundButton.types.d.ts +0 -33
- package/lib-amd/components/CompoundButton/CompoundButton.types.js +0 -5
- package/lib-amd/components/CompoundButton/CompoundButton.types.js.map +0 -1
- package/lib-amd/components/CompoundButton/index.d.ts +0 -4
- package/lib-amd/components/CompoundButton/index.js +0 -8
- package/lib-amd/components/CompoundButton/index.js.map +0 -1
- package/lib-amd/components/CompoundButton/renderCompoundButton.d.ts +0 -5
- package/lib-amd/components/CompoundButton/renderCompoundButton.js +0 -19
- package/lib-amd/components/CompoundButton/renderCompoundButton.js.map +0 -1
- package/lib-amd/components/CompoundButton/useCompoundButton.d.ts +0 -13
- package/lib-amd/components/CompoundButton/useCompoundButton.js +0 -32
- package/lib-amd/components/CompoundButton/useCompoundButton.js.map +0 -1
- package/lib-amd/components/CompoundButton/useCompoundButtonClasses.d.ts +0 -4
- package/lib-amd/components/CompoundButton/useCompoundButtonClasses.js +0 -182
- package/lib-amd/components/CompoundButton/useCompoundButtonClasses.js.map +0 -1
- package/lib-amd/components/MenuButton/MenuButton.d.ts +0 -7
- package/lib-amd/components/MenuButton/MenuButton.js +0 -26
- package/lib-amd/components/MenuButton/MenuButton.js.map +0 -1
- package/lib-amd/components/MenuButton/MenuButton.types.d.ts +0 -54
- package/lib-amd/components/MenuButton/MenuButton.types.js +0 -5
- package/lib-amd/components/MenuButton/MenuButton.types.js.map +0 -1
- package/lib-amd/components/MenuButton/index.d.ts +0 -6
- package/lib-amd/components/MenuButton/index.js +0 -10
- package/lib-amd/components/MenuButton/index.js.map +0 -1
- package/lib-amd/components/MenuButton/renderMenuButton.d.ts +0 -7
- package/lib-amd/components/MenuButton/renderMenuButton.js +0 -21
- package/lib-amd/components/MenuButton/renderMenuButton.js.map +0 -1
- package/lib-amd/components/MenuButton/useExpanded.d.ts +0 -18
- package/lib-amd/components/MenuButton/useExpanded.js +0 -62
- package/lib-amd/components/MenuButton/useExpanded.js.map +0 -1
- package/lib-amd/components/MenuButton/useMenuButton.d.ts +0 -10
- package/lib-amd/components/MenuButton/useMenuButton.js +0 -27
- package/lib-amd/components/MenuButton/useMenuButton.js.map +0 -1
- package/lib-amd/components/MenuButton/useMenuButtonClasses.d.ts +0 -3
- package/lib-amd/components/MenuButton/useMenuButtonClasses.js +0 -81
- package/lib-amd/components/MenuButton/useMenuButtonClasses.js.map +0 -1
- package/lib-amd/components/MenuButton/useMenuButtonState.d.ts +0 -2
- package/lib-amd/components/MenuButton/useMenuButtonState.js +0 -11
- package/lib-amd/components/MenuButton/useMenuButtonState.js.map +0 -1
- package/lib-amd/components/SplitButton/SplitButton.d.ts +0 -7
- package/lib-amd/components/SplitButton/SplitButton.js +0 -26
- package/lib-amd/components/SplitButton/SplitButton.js.map +0 -1
- package/lib-amd/components/SplitButton/SplitButton.types.d.ts +0 -35
- package/lib-amd/components/SplitButton/SplitButton.types.js +0 -5
- package/lib-amd/components/SplitButton/SplitButton.types.js.map +0 -1
- package/lib-amd/components/SplitButton/index.d.ts +0 -4
- package/lib-amd/components/SplitButton/index.js +0 -8
- package/lib-amd/components/SplitButton/index.js.map +0 -1
- package/lib-amd/components/SplitButton/renderSplitButton.d.ts +0 -7
- package/lib-amd/components/SplitButton/renderSplitButton.js +0 -17
- package/lib-amd/components/SplitButton/renderSplitButton.js.map +0 -1
- package/lib-amd/components/SplitButton/useSplitButton.d.ts +0 -10
- package/lib-amd/components/SplitButton/useSplitButton.js +0 -50
- package/lib-amd/components/SplitButton/useSplitButton.js.map +0 -1
- package/lib-amd/components/SplitButton/useSplitButtonClasses.d.ts +0 -3
- package/lib-amd/components/SplitButton/useSplitButtonClasses.js +0 -123
- package/lib-amd/components/SplitButton/useSplitButtonClasses.js.map +0 -1
- package/lib-amd/components/ToggleButton/ToggleButton.d.ts +0 -7
- package/lib-amd/components/ToggleButton/ToggleButton.js +0 -17
- package/lib-amd/components/ToggleButton/ToggleButton.js.map +0 -1
- package/lib-amd/components/ToggleButton/ToggleButton.types.d.ts +0 -25
- package/lib-amd/components/ToggleButton/ToggleButton.types.js +0 -5
- package/lib-amd/components/ToggleButton/ToggleButton.types.js.map +0 -1
- package/lib-amd/components/ToggleButton/index.d.ts +0 -5
- package/lib-amd/components/ToggleButton/index.js +0 -9
- package/lib-amd/components/ToggleButton/index.js.map +0 -1
- package/lib-amd/components/ToggleButton/useChecked.d.ts +0 -14
- package/lib-amd/components/ToggleButton/useChecked.js +0 -27
- package/lib-amd/components/ToggleButton/useChecked.js.map +0 -1
- package/lib-amd/components/ToggleButton/useToggleButton.d.ts +0 -6
- package/lib-amd/components/ToggleButton/useToggleButton.js +0 -10
- package/lib-amd/components/ToggleButton/useToggleButton.js.map +0 -1
- package/lib-amd/components/ToggleButton/useToggleButtonClasses.d.ts +0 -3
- package/lib-amd/components/ToggleButton/useToggleButtonClasses.js +0 -132
- package/lib-amd/components/ToggleButton/useToggleButtonClasses.js.map +0 -1
- package/lib-amd/index.d.ts +0 -6
- package/lib-amd/index.js +0 -10
- package/lib-amd/index.js.map +0 -1
- package/lib-amd/utils/tempTypes.d.ts +0 -33
- package/lib-amd/utils/tempTypes.js +0 -8
- package/lib-amd/utils/tempTypes.js.map +0 -1
- package/lib-amd/version.d.ts +0 -1
- package/lib-amd/version.js +0 -6
- package/lib-amd/version.js.map +0 -1
- package/lib-commonjs/components/Button/useButtonClasses.d.ts +0 -29
- package/lib-commonjs/components/Button/useButtonClasses.js +0 -419
- package/lib-commonjs/components/Button/useButtonClasses.js.map +0 -1
- package/lib-commonjs/components/Button/useButtonState.d.ts +0 -6
- package/lib-commonjs/components/Button/useButtonState.js +0 -30
- package/lib-commonjs/components/Button/useButtonState.js.map +0 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonClasses.d.ts +0 -4
- package/lib-commonjs/components/CompoundButton/useCompoundButtonClasses.js +0 -182
- package/lib-commonjs/components/CompoundButton/useCompoundButtonClasses.js.map +0 -1
- package/lib-commonjs/components/MenuButton/useExpanded.d.ts +0 -18
- package/lib-commonjs/components/MenuButton/useExpanded.js +0 -63
- package/lib-commonjs/components/MenuButton/useExpanded.js.map +0 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonClasses.d.ts +0 -3
- package/lib-commonjs/components/MenuButton/useMenuButtonClasses.js +0 -80
- package/lib-commonjs/components/MenuButton/useMenuButtonClasses.js.map +0 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonState.d.ts +0 -2
- package/lib-commonjs/components/MenuButton/useMenuButtonState.js +0 -11
- package/lib-commonjs/components/MenuButton/useMenuButtonState.js.map +0 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonClasses.d.ts +0 -3
- package/lib-commonjs/components/SplitButton/useSplitButtonClasses.js +0 -125
- package/lib-commonjs/components/SplitButton/useSplitButtonClasses.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/useChecked.d.ts +0 -14
- package/lib-commonjs/components/ToggleButton/useChecked.js +0 -27
- package/lib-commonjs/components/ToggleButton/useChecked.js.map +0 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonClasses.d.ts +0 -3
- package/lib-commonjs/components/ToggleButton/useToggleButtonClasses.js +0 -132
- package/lib-commonjs/components/ToggleButton/useToggleButtonClasses.js.map +0 -1
- package/lib-commonjs/utils/tempTypes.d.ts +0 -33
- package/lib-commonjs/utils/tempTypes.js +0 -6
- package/lib-commonjs/utils/tempTypes.js.map +0 -1
- package/lib-commonjs/version.d.ts +0 -1
- package/lib-commonjs/version.js +0 -7
- package/lib-commonjs/version.js.map +0 -1
- package/src/components/Button/Button.types.ts +0 -166
- package/src/components/CompoundButton/CompoundButton.types.ts +0 -37
- package/src/components/MenuButton/MenuButton.types.ts +0 -63
- package/src/components/SplitButton/SplitButton.types.ts +0 -41
- package/src/components/ToggleButton/ToggleButton.types.ts +0 -29
@@ -1,132 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var _a, _b, _c;
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
var style_utilities_1 = require("@fluentui/style-utilities");
|
5
|
-
var react_theme_provider_1 = require("@fluentui/react-theme-provider");
|
6
|
-
exports.useToggleButtonClasses = react_theme_provider_1.makeVariantClasses({
|
7
|
-
name: 'ToggleButton',
|
8
|
-
prefix: '--button',
|
9
|
-
styles: {
|
10
|
-
// When checked is applied, apply the right tokens to the right css properties.
|
11
|
-
_checked: (_a = {
|
12
|
-
background: 'var(--button-checked-background)',
|
13
|
-
color: 'var(--button-checked-contentColor)',
|
14
|
-
'.ms-Button-icon': {
|
15
|
-
color: 'var(--button-checked-iconColor)',
|
16
|
-
}
|
17
|
-
},
|
18
|
-
_a[style_utilities_1.EdgeChromiumHighContrastSelector] = {
|
19
|
-
background: 'var(--button-highContrast-checked-background)',
|
20
|
-
color: 'var(--button-highContrast-checked-contentColor)',
|
21
|
-
'.ms-Button-icon': {
|
22
|
-
color: 'var(--button-highContrast-checked-iconColor)',
|
23
|
-
},
|
24
|
-
},
|
25
|
-
_a[':hover'] = (_b = {
|
26
|
-
background: 'var(--button-checkedHovered-background)',
|
27
|
-
color: 'var(--button-checkedHovered-contentColor)',
|
28
|
-
'.ms-Button-icon': {
|
29
|
-
color: 'var(--button-checkedHovered-iconColor)',
|
30
|
-
}
|
31
|
-
},
|
32
|
-
_b[style_utilities_1.EdgeChromiumHighContrastSelector] = {
|
33
|
-
background: 'var(--button-highContrast-checkedHovered-background, var(--button-highContrast-checked-background))',
|
34
|
-
color: 'var(--button-highContrast-checkedHovered-contentColor, var(--button-highContrast-checked-contentColor))',
|
35
|
-
'.ms-Button-icon': {
|
36
|
-
color: 'var(--button-highContrast-checkedHovered-iconColor, var(--button-highContrast-checked-iconColor))',
|
37
|
-
},
|
38
|
-
},
|
39
|
-
_b),
|
40
|
-
_a[':active'] = (_c = {
|
41
|
-
background: 'var(--button-checkedPressed-background, var(--button-checkedHovered-background))',
|
42
|
-
color: 'var(--button-checkedPressed-contentColor, var(--button-checkedHovered-contentColor))',
|
43
|
-
'.ms-Button-icon': {
|
44
|
-
color: 'var(--button-checkedPressed-iconColor, var(--button-checkedHovered-iconColor))',
|
45
|
-
}
|
46
|
-
},
|
47
|
-
_c[style_utilities_1.EdgeChromiumHighContrastSelector] = {
|
48
|
-
background: 'var(--button-highContrast-checkedPressed-background, ' +
|
49
|
-
'var(--button-highContrast-checkedHovered-background, ' +
|
50
|
-
'var(--button-highContrast-checked-background)))',
|
51
|
-
color: 'var(--button-highContrast-checked--pressed-contentColor, ' +
|
52
|
-
'var(--button-highContrast-checked--hovered-contentColor, ' +
|
53
|
-
'var(--button-highContrast-checked-contentColor)))',
|
54
|
-
'.ms-Button-icon': {
|
55
|
-
color: 'var(--button-highContrast-checkedPressed-iconColor, ' +
|
56
|
-
'var(--button-highContrast-checkedHovered-iconColor, ' +
|
57
|
-
'--button-highContrast-checked-iconColor)))',
|
58
|
-
},
|
59
|
-
},
|
60
|
-
_c),
|
61
|
-
_a),
|
62
|
-
},
|
63
|
-
variants: function (theme) {
|
64
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
65
|
-
var palette = theme.palette, semanticColors = theme.semanticColors;
|
66
|
-
return {
|
67
|
-
root: {
|
68
|
-
checked: {
|
69
|
-
background: (_a = semanticColors) === null || _a === void 0 ? void 0 : _a.buttonBackgroundPressed,
|
70
|
-
contentColor: (_b = semanticColors) === null || _b === void 0 ? void 0 : _b.buttonTextChecked,
|
71
|
-
},
|
72
|
-
checkedHovered: {
|
73
|
-
background: (_c = semanticColors) === null || _c === void 0 ? void 0 : _c.buttonBackgroundPressed,
|
74
|
-
contentColor: (_d = semanticColors) === null || _d === void 0 ? void 0 : _d.buttonTextCheckedHovered,
|
75
|
-
},
|
76
|
-
highContrast: {
|
77
|
-
checked: {
|
78
|
-
background: 'Window',
|
79
|
-
contentColor: 'Highlight',
|
80
|
-
iconColor: 'Highlight',
|
81
|
-
},
|
82
|
-
},
|
83
|
-
},
|
84
|
-
primary: {
|
85
|
-
checked: {
|
86
|
-
background: 'var(--color-brand-checked-background)',
|
87
|
-
contentColor: 'var(--color-brand-checked-contentColor)',
|
88
|
-
},
|
89
|
-
checkedHovered: {
|
90
|
-
background: 'var(--color-brand-checkedHovered-background)',
|
91
|
-
contentColor: 'var(--color-brand-checkedHovered-contentColor)',
|
92
|
-
},
|
93
|
-
checkedPressed: {
|
94
|
-
background: 'var(--color-brand-checkedPressed-background)',
|
95
|
-
contentColor: 'var(--color-brand-checkedPressed-contentColor)',
|
96
|
-
},
|
97
|
-
highContrast: {
|
98
|
-
checked: {
|
99
|
-
background: 'Highlight',
|
100
|
-
contentColor: 'Window',
|
101
|
-
iconColor: 'Window',
|
102
|
-
},
|
103
|
-
},
|
104
|
-
},
|
105
|
-
ghost: {
|
106
|
-
checked: {
|
107
|
-
background: (_e = palette) === null || _e === void 0 ? void 0 : _e.neutralLight,
|
108
|
-
contentColor: (_f = palette) === null || _f === void 0 ? void 0 : _f.neutralDark,
|
109
|
-
iconColor: (_g = palette) === null || _g === void 0 ? void 0 : _g.themeDark,
|
110
|
-
},
|
111
|
-
checkedHovered: {
|
112
|
-
background: (_h = palette) === null || _h === void 0 ? void 0 : _h.neutralQuaternaryAlt,
|
113
|
-
contentColor: (_j = palette) === null || _j === void 0 ? void 0 : _j.neutralDark,
|
114
|
-
iconColor: (_k = palette) === null || _k === void 0 ? void 0 : _k.themeDark,
|
115
|
-
},
|
116
|
-
},
|
117
|
-
transparent: {
|
118
|
-
checked: {
|
119
|
-
background: 'transparent',
|
120
|
-
contentColor: (_l = palette) === null || _l === void 0 ? void 0 : _l.themePrimary,
|
121
|
-
iconColor: (_m = palette) === null || _m === void 0 ? void 0 : _m.themePrimary,
|
122
|
-
},
|
123
|
-
checkedHovered: {
|
124
|
-
background: 'transparent',
|
125
|
-
contentColor: (_o = palette) === null || _o === void 0 ? void 0 : _o.black,
|
126
|
-
iconColor: (_p = palette) === null || _p === void 0 ? void 0 : _p.themeDarker,
|
127
|
-
},
|
128
|
-
},
|
129
|
-
};
|
130
|
-
},
|
131
|
-
});
|
132
|
-
//# sourceMappingURL=useToggleButtonClasses.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useToggleButtonClasses.js","sourceRoot":"../src/","sources":["components/ToggleButton/useToggleButtonClasses.tsx"],"names":[],"mappings":"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","sourcesContent":["import { EdgeChromiumHighContrastSelector } from '@fluentui/style-utilities';\nimport { makeVariantClasses, Theme } from '@fluentui/react-theme-provider';\nimport { ToggleButtonState, ToggleButtonVariants } from './ToggleButton.types';\n\nexport const useToggleButtonClasses = makeVariantClasses<ToggleButtonState, ToggleButtonVariants>({\n name: 'ToggleButton',\n prefix: '--button',\n\n styles: {\n // When checked is applied, apply the right tokens to the right css properties.\n _checked: {\n background: 'var(--button-checked-background)',\n color: 'var(--button-checked-contentColor)',\n '.ms-Button-icon': {\n color: 'var(--button-checked-iconColor)',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background: 'var(--button-highContrast-checked-background)',\n color: 'var(--button-highContrast-checked-contentColor)',\n '.ms-Button-icon': {\n color: 'var(--button-highContrast-checked-iconColor)',\n },\n },\n\n ':hover': {\n background: 'var(--button-checkedHovered-background)',\n color: 'var(--button-checkedHovered-contentColor)',\n '.ms-Button-icon': {\n color: 'var(--button-checkedHovered-iconColor)',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background:\n 'var(--button-highContrast-checkedHovered-background, var(--button-highContrast-checked-background))',\n color:\n 'var(--button-highContrast-checkedHovered-contentColor, var(--button-highContrast-checked-contentColor))',\n '.ms-Button-icon': {\n color: 'var(--button-highContrast-checkedHovered-iconColor, var(--button-highContrast-checked-iconColor))',\n },\n },\n },\n\n ':active': {\n background: 'var(--button-checkedPressed-background, var(--button-checkedHovered-background))',\n color: 'var(--button-checkedPressed-contentColor, var(--button-checkedHovered-contentColor))',\n '.ms-Button-icon': {\n color: 'var(--button-checkedPressed-iconColor, var(--button-checkedHovered-iconColor))',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background:\n 'var(--button-highContrast-checkedPressed-background, ' +\n 'var(--button-highContrast-checkedHovered-background, ' +\n 'var(--button-highContrast-checked-background)))',\n color:\n 'var(--button-highContrast-checked--pressed-contentColor, ' +\n 'var(--button-highContrast-checked--hovered-contentColor, ' +\n 'var(--button-highContrast-checked-contentColor)))',\n '.ms-Button-icon': {\n color:\n 'var(--button-highContrast-checkedPressed-iconColor, ' +\n 'var(--button-highContrast-checkedHovered-iconColor, ' +\n '--button-highContrast-checked-iconColor)))',\n },\n },\n },\n },\n },\n\n variants: (theme: Theme): ToggleButtonVariants => {\n const { palette, semanticColors } = theme;\n\n return {\n root: {\n checked: {\n background: semanticColors?.buttonBackgroundPressed,\n contentColor: semanticColors?.buttonTextChecked,\n },\n\n checkedHovered: {\n background: semanticColors?.buttonBackgroundPressed,\n contentColor: semanticColors?.buttonTextCheckedHovered,\n },\n\n highContrast: {\n checked: {\n background: 'Window',\n contentColor: 'Highlight',\n iconColor: 'Highlight',\n },\n },\n },\n\n primary: {\n checked: {\n background: 'var(--color-brand-checked-background)',\n contentColor: 'var(--color-brand-checked-contentColor)',\n },\n\n checkedHovered: {\n background: 'var(--color-brand-checkedHovered-background)',\n contentColor: 'var(--color-brand-checkedHovered-contentColor)',\n },\n\n checkedPressed: {\n background: 'var(--color-brand-checkedPressed-background)',\n contentColor: 'var(--color-brand-checkedPressed-contentColor)',\n },\n\n highContrast: {\n checked: {\n background: 'Highlight',\n contentColor: 'Window',\n iconColor: 'Window',\n },\n },\n },\n\n ghost: {\n checked: {\n background: palette?.neutralLight,\n contentColor: palette?.neutralDark,\n iconColor: palette?.themeDark,\n },\n\n checkedHovered: {\n background: palette?.neutralQuaternaryAlt,\n contentColor: palette?.neutralDark,\n iconColor: palette?.themeDark,\n },\n },\n\n transparent: {\n checked: {\n background: 'transparent',\n contentColor: palette?.themePrimary,\n iconColor: palette?.themePrimary,\n },\n\n checkedHovered: {\n background: 'transparent',\n contentColor: palette?.black,\n iconColor: palette?.themeDarker,\n },\n },\n };\n },\n});\n"]}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* NOTE! THIS FILE IS TEMPORARY AND SHOULD BE DELETED ONCE IT HAS MOVED TO `@fluentui/react-compose`.
|
3
|
-
*/
|
4
|
-
import * as React from 'react';
|
5
|
-
export declare type ComponentClasses<TClasses, TState> = Partial<TClasses> | ((state: TState) => Partial<TClasses>);
|
6
|
-
export interface ComponentProps {
|
7
|
-
as?: React.ElementType;
|
8
|
-
className?: string;
|
9
|
-
}
|
10
|
-
export declare type ShorthandValue<TProps> = string | boolean | number | null | undefined | TProps | JSX.Element;
|
11
|
-
export declare type ComposeRender<TProps, TOptions> = (props: TProps, ref?: React.RefObject<HTMLElement>, options?: TOptions) => JSX.Element;
|
12
|
-
export declare type ClassDictionary = any;
|
13
|
-
export declare type GenericDictionary = Record<string, any>;
|
14
|
-
export interface ComposeOptions<TProps, TSlots, TSlotProps, TStatics> {
|
15
|
-
render: ComposeRender<TProps, ComposeOptions<TProps, TSlots, TSlotProps, TStatics>>;
|
16
|
-
defaultProps: TProps;
|
17
|
-
classes: ClassDictionary;
|
18
|
-
stylesheet: string;
|
19
|
-
slots: {
|
20
|
-
[key in keyof TSlots]?: TSlots[key] | null;
|
21
|
-
};
|
22
|
-
slotProps: TSlotProps;
|
23
|
-
statics: TStatics;
|
24
|
-
}
|
25
|
-
export declare type ComposedComponent<TProps = {}, TOptions = ComposeOptions<any, any, any, any>> = React.ForwardRefExoticComponent<TProps> & {
|
26
|
-
options: TOptions;
|
27
|
-
parent: ComposedComponent;
|
28
|
-
} & ComposeStandardStatics;
|
29
|
-
export interface ComposeStandardStatics {
|
30
|
-
displayName?: string;
|
31
|
-
mappedProp?: string;
|
32
|
-
stylesheets?: string[];
|
33
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"tempTypes.js","sourceRoot":"../src/","sources":["utils/tempTypes.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * NOTE! THIS FILE IS TEMPORARY AND SHOULD BE DELETED ONCE IT HAS MOVED TO `@fluentui/react-compose`.\n */\n\nimport * as React from 'react';\n\nexport type ComponentClasses<TClasses, TState> = Partial<TClasses> | ((state: TState) => Partial<TClasses>);\n\nexport interface ComponentProps {\n // Removing these props:\n // design - use style or className instead\n\n as?: React.ElementType;\n\n className?: string;\n}\n\nexport type ShorthandValue<TProps> = string | boolean | number | null | undefined | TProps | JSX.Element;\n\nexport type ComposeRender<TProps, TOptions> = (\n props: TProps,\n ref?: React.RefObject<HTMLElement>,\n options?: TOptions,\n) => JSX.Element;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ClassDictionary = any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type GenericDictionary = Record<string, any>;\n\nexport interface ComposeOptions<TProps, TSlots, TSlotProps, TStatics> {\n render: ComposeRender<TProps, ComposeOptions<TProps, TSlots, TSlotProps, TStatics>>;\n defaultProps: TProps;\n classes: ClassDictionary;\n stylesheet: string;\n slots: { [key in keyof TSlots]?: TSlots[key] | null };\n slotProps: TSlotProps;\n statics: TStatics;\n}\n\nexport type ComposedComponent<\n TProps = {},\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n TOptions = ComposeOptions<any, any, any, any>\n> = React.ForwardRefExoticComponent<TProps> & {\n options: TOptions;\n parent: ComposedComponent;\n} & ComposeStandardStatics;\n\nexport interface ComposeStandardStatics {\n displayName?: string;\n mappedProp?: string;\n stylesheets?: string[];\n}\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/lib-commonjs/version.js
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
// Do not modify this file; it is generated as part of publish.
|
4
|
-
// The checked in version is a placeholder only and will not be updated.
|
5
|
-
var set_version_1 = require("@fluentui/set-version");
|
6
|
-
set_version_1.setVersion('@fluentui/react-button', '1.0.0-beta.8');
|
7
|
-
//# sourceMappingURL=version.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,qDAAmD;AACnD,wBAAU,CAAC,wBAAwB,EAAE,cAAc,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-button', '1.0.0-beta.8');"]}
|
@@ -1,166 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { ComponentProps, ShorthandProps } from '@fluentui/react-compose/lib/next/index';
|
3
|
-
import { ColorTokens, RecursivePartial, SizeValue, FontTokens } from '@fluentui/theme';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* {@docCategory Button}
|
7
|
-
*/
|
8
|
-
export type ButtonProps = ComponentProps &
|
9
|
-
React.HTMLAttributes<HTMLElement> & {
|
10
|
-
/**
|
11
|
-
* Shorthand icon. A shorthand prop can be a literal, object, or
|
12
|
-
* JSX. The `children` prop of the object can be a render function,
|
13
|
-
* taking in the original slot component and props.
|
14
|
-
*/
|
15
|
-
icon?: ShorthandProps;
|
16
|
-
|
17
|
-
/**
|
18
|
-
* Shorthand loader content within the button.
|
19
|
-
*/
|
20
|
-
loader?: ShorthandProps;
|
21
|
-
|
22
|
-
/**
|
23
|
-
* Shorthand children content within the button.
|
24
|
-
*/
|
25
|
-
content?: ShorthandProps;
|
26
|
-
|
27
|
-
/**
|
28
|
-
* Defines the href to navigate to. If applied, will render the button as an anchor
|
29
|
-
* element by default, unless `as` specifies otherwise. Note that specifying an href
|
30
|
-
* and a non-anchor as the render type will prevent the Button from behaving like a
|
31
|
-
* hyperlink and opening the href on click.
|
32
|
-
*/
|
33
|
-
href?: string;
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Defines the target window to open the href in. Only is applied if the button renders
|
37
|
-
* as an anchor tag, which is the default behavior if href is provided.
|
38
|
-
*/
|
39
|
-
target?: string;
|
40
|
-
|
41
|
-
/** A button can appear circular. */
|
42
|
-
circular?: boolean;
|
43
|
-
|
44
|
-
/** A button can show that it cannot be interacted with. */
|
45
|
-
disabled?: boolean;
|
46
|
-
|
47
|
-
/** A button can fill the width of its container. */
|
48
|
-
block?: boolean;
|
49
|
-
|
50
|
-
/** A button can contain only an icon. */
|
51
|
-
iconOnly?: boolean;
|
52
|
-
|
53
|
-
/** An icon button can format its icon to appear before or after its content. */
|
54
|
-
iconPosition?: 'before' | 'after';
|
55
|
-
|
56
|
-
/** A button that inherits its background and has a subtle appearance. */
|
57
|
-
inverted?: boolean;
|
58
|
-
|
59
|
-
/** Opt in to a named variant which can be supplied by a theme. */
|
60
|
-
variant?: string;
|
61
|
-
|
62
|
-
/** A button can show a loading indicator. */
|
63
|
-
loading?: boolean;
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Called after a user clicks the button.
|
67
|
-
* @param event - React's original SyntheticEvent.
|
68
|
-
* @param data - All props.
|
69
|
-
*/
|
70
|
-
// onClick?: ComponentEventHandler<ButtonProps>;
|
71
|
-
|
72
|
-
/**
|
73
|
-
* Called after a user focuses the button.
|
74
|
-
* @param event - React's original SyntheticEvent.
|
75
|
-
* @param data - All props.
|
76
|
-
*/
|
77
|
-
// onFocus?: ComponentEventHandler<ButtonProps>;
|
78
|
-
|
79
|
-
/** A button can emphasize that it represents the primary action. */
|
80
|
-
primary?: boolean;
|
81
|
-
|
82
|
-
/** A button can emphasize that it represents an alternative action. */
|
83
|
-
secondary?: boolean;
|
84
|
-
|
85
|
-
/** A button can blend into its background to become less emphasized. */
|
86
|
-
ghost?: boolean;
|
87
|
-
|
88
|
-
/** A button can have no background styling and just be emphasized through its content styling. */
|
89
|
-
transparent?: boolean;
|
90
|
-
|
91
|
-
/** A button can be sized. */
|
92
|
-
size?: SizeValue;
|
93
|
-
|
94
|
-
// TODO: Deprecate or rename to textOnly for alignment with iconOnly?
|
95
|
-
/** A button can be formatted to show only text in order to indicate a less-pronounced action. */
|
96
|
-
// text?: boolean;
|
97
|
-
|
98
|
-
tokens?: RecursivePartial<ButtonTokens>;
|
99
|
-
};
|
100
|
-
|
101
|
-
/**
|
102
|
-
* {@docCategory Button}
|
103
|
-
*/
|
104
|
-
export interface ButtonState extends ButtonProps {
|
105
|
-
buttonRef?: React.RefObject<HTMLButtonElement>;
|
106
|
-
}
|
107
|
-
|
108
|
-
/**
|
109
|
-
* {@docCategory Button}
|
110
|
-
*/
|
111
|
-
export type ButtonTokens = ColorTokens &
|
112
|
-
FontTokens & {
|
113
|
-
/* sizing */
|
114
|
-
paddingLeft?: string;
|
115
|
-
paddingRight?: string;
|
116
|
-
paddingTop?: string;
|
117
|
-
paddingBottom?: string;
|
118
|
-
margin?: string;
|
119
|
-
height?: string;
|
120
|
-
minWidth?: string;
|
121
|
-
maxWidth?: string;
|
122
|
-
minHeight?: string;
|
123
|
-
contentGap?: string;
|
124
|
-
iconSize?: string;
|
125
|
-
borderRadius?: string;
|
126
|
-
borderTopLeftRadius?: string;
|
127
|
-
borderTopRightRadius?: string;
|
128
|
-
borderBottomLeftRadius?: string;
|
129
|
-
borderBottomRightRadius?: string;
|
130
|
-
borderWidth?: string;
|
131
|
-
boxShadow?: string;
|
132
|
-
width?: string;
|
133
|
-
|
134
|
-
forcedColorAdjust?: string;
|
135
|
-
|
136
|
-
transform?: string;
|
137
|
-
transition?: string;
|
138
|
-
|
139
|
-
size?: {
|
140
|
-
smallest?: string;
|
141
|
-
smaller?: string;
|
142
|
-
small?: string;
|
143
|
-
regular?: string;
|
144
|
-
large?: string;
|
145
|
-
larger?: string;
|
146
|
-
largest?: string;
|
147
|
-
};
|
148
|
-
|
149
|
-
pressed?: {
|
150
|
-
transform?: string;
|
151
|
-
transition?: string;
|
152
|
-
};
|
153
|
-
};
|
154
|
-
|
155
|
-
/**
|
156
|
-
* {@docCategory Button}
|
157
|
-
*/
|
158
|
-
export type ButtonVariants<TTokens = ButtonTokens> = {
|
159
|
-
root?: TTokens;
|
160
|
-
block?: TTokens;
|
161
|
-
circular?: TTokens;
|
162
|
-
iconOnly?: TTokens;
|
163
|
-
ghost?: TTokens;
|
164
|
-
primary?: TTokens;
|
165
|
-
transparent?: TTokens;
|
166
|
-
};
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { ShorthandProps } from '@fluentui/react-compose/lib/next/index';
|
2
|
-
import { ButtonProps, ButtonTokens, ButtonVariants } from '../Button/Button.types';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* {@docCategory Button}
|
6
|
-
*/
|
7
|
-
export interface CompoundButtonProps extends ButtonProps {
|
8
|
-
/**
|
9
|
-
* Second line of text that describes the action this button takes.
|
10
|
-
*/
|
11
|
-
secondaryContent?: ShorthandProps;
|
12
|
-
|
13
|
-
/**
|
14
|
-
* Container that wraps the children and secondaryContent slots.
|
15
|
-
*/
|
16
|
-
contentContainer?: ShorthandProps;
|
17
|
-
}
|
18
|
-
|
19
|
-
/**
|
20
|
-
* {@docCategory Button}
|
21
|
-
*/
|
22
|
-
export interface CompoundButtonState extends CompoundButtonProps {}
|
23
|
-
|
24
|
-
/**
|
25
|
-
* {@docCategory Button}
|
26
|
-
*/
|
27
|
-
export type CompoundButtonTokens = ButtonTokens & {
|
28
|
-
secondaryContentColor?: string;
|
29
|
-
secondaryContentFontSize?: string;
|
30
|
-
secondaryContentFontWeight?: string;
|
31
|
-
secondaryContentGap?: string;
|
32
|
-
};
|
33
|
-
|
34
|
-
/**
|
35
|
-
* {@docCategory Button}
|
36
|
-
*/
|
37
|
-
export type CompoundButtonVariants = ButtonVariants<CompoundButtonTokens>;
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { ShorthandProps } from '@fluentui/react-compose/lib/next/index';
|
3
|
-
import { ButtonProps, ButtonState, ButtonTokens, ButtonVariants } from '../Button/Button.types';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* {@docCategory Button}
|
7
|
-
*/
|
8
|
-
export type MinimalMenuProps = {
|
9
|
-
hidden?: boolean;
|
10
|
-
onDismiss?: () => void;
|
11
|
-
target?: React.Ref<HTMLElement | undefined>;
|
12
|
-
};
|
13
|
-
|
14
|
-
/**
|
15
|
-
* {@docCategory Button}
|
16
|
-
*/
|
17
|
-
export type MenuButtonProps = Omit<ButtonProps, 'iconPosition' | 'loader'> & {
|
18
|
-
/**
|
19
|
-
* Menu that is displayed when the button is pressed.
|
20
|
-
*/
|
21
|
-
menu?: ShorthandProps;
|
22
|
-
|
23
|
-
/**
|
24
|
-
* Menu icon that indicates that this button has a menu that can be expanded.
|
25
|
-
*/
|
26
|
-
menuIcon?: ShorthandProps;
|
27
|
-
|
28
|
-
/**
|
29
|
-
* Defines the inital expanded state of the MenuButton. Use this if you want the MenuButton to maintain its own state.
|
30
|
-
* Mutually exclusive with `expanded`.
|
31
|
-
* @defaultvalue false
|
32
|
-
*/
|
33
|
-
defaultExpanded?: boolean;
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Defines whether the MenuButton is in an expanded state. Use this if you wish to have the expanded state of the
|
37
|
-
* MenuButton be controlled. Mutually exclusive with `defaultExpanded`.
|
38
|
-
* @defaultvalue defaultExpanded
|
39
|
-
*/
|
40
|
-
expanded?: boolean;
|
41
|
-
|
42
|
-
/**
|
43
|
-
* Defines a callback that runs after the MenuButton's contextual menu has been dismissed.
|
44
|
-
*/
|
45
|
-
onMenuDismiss?: () => void;
|
46
|
-
};
|
47
|
-
|
48
|
-
export interface MenuButtonState extends Omit<MenuButtonProps, 'menu'>, Omit<ButtonState, 'iconPosition' | 'loader'> {
|
49
|
-
menu?: React.PropsWithChildren<MinimalMenuProps>;
|
50
|
-
}
|
51
|
-
|
52
|
-
/**
|
53
|
-
* {@docCategory Button}
|
54
|
-
*/
|
55
|
-
export type MenuButtonTokens = ButtonTokens & {
|
56
|
-
menuIconColor?: string;
|
57
|
-
menuIconSize?: string;
|
58
|
-
};
|
59
|
-
|
60
|
-
/**
|
61
|
-
* {@docCategory Button}
|
62
|
-
*/
|
63
|
-
export type MenuButtonVariants = ButtonVariants<MenuButtonTokens>;
|
@@ -1,41 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { ShorthandProps } from '@fluentui/react-compose/lib/next/index';
|
3
|
-
import { ButtonProps, ButtonVariants } from '../Button/Button.types';
|
4
|
-
import { MenuButtonProps, MenuButtonState, MenuButtonTokens } from '../MenuButton/MenuButton.types';
|
5
|
-
|
6
|
-
/**
|
7
|
-
* {@docCategory Button}
|
8
|
-
*/
|
9
|
-
export interface SplitButtonProps extends ButtonProps, MenuButtonProps {
|
10
|
-
/**
|
11
|
-
* Button to perform primary action in SplitButton.
|
12
|
-
*/
|
13
|
-
button?: ShorthandProps;
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Divider that separates the primary action button and the menu button parts of the SplitButton
|
17
|
-
*/
|
18
|
-
divider?: ShorthandProps;
|
19
|
-
|
20
|
-
/**
|
21
|
-
* Button that opens menu with secondary actions in SplitButton.
|
22
|
-
*/
|
23
|
-
menuButton?: ShorthandProps;
|
24
|
-
}
|
25
|
-
|
26
|
-
export interface SplitButtonState extends Omit<SplitButtonProps, 'menu'>, MenuButtonState {
|
27
|
-
menuButtonRef?: React.RefObject<HTMLButtonElement>;
|
28
|
-
}
|
29
|
-
|
30
|
-
/**
|
31
|
-
* {@docCategory Button}
|
32
|
-
*/
|
33
|
-
export type SplitButtonTokens = MenuButtonTokens & {
|
34
|
-
dividerColor?: string;
|
35
|
-
dividerThickness?: string;
|
36
|
-
};
|
37
|
-
|
38
|
-
/**
|
39
|
-
* {@docCategory Button}
|
40
|
-
*/
|
41
|
-
export type SplitButtonVariants = ButtonVariants<SplitButtonTokens>;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import { ButtonProps, ButtonTokens, ButtonVariants } from '../Button/Button.types';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* {@docCategory Button}
|
5
|
-
*/
|
6
|
-
export interface ToggleButtonProps extends ButtonProps {
|
7
|
-
/**
|
8
|
-
* Defines the controlled checked state of the `ToggleButton`.
|
9
|
-
* Mutually exclusive to `defaultChecked`.
|
10
|
-
* This should only be used if the checked state is to be controlled at a higher level and there is a plan to pass the
|
11
|
-
* correct value based on handling `onClick` events and re-rendering.
|
12
|
-
*/
|
13
|
-
checked?: boolean;
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Defines whether the `ToggleButton` is inititally in a checked state or not when rendered.
|
17
|
-
* Mutually exclusive to `checked`.
|
18
|
-
*/
|
19
|
-
defaultChecked?: boolean;
|
20
|
-
}
|
21
|
-
|
22
|
-
/**
|
23
|
-
* {@docCategory Button}
|
24
|
-
*/
|
25
|
-
export interface ToggleButtonState extends ToggleButtonProps {}
|
26
|
-
|
27
|
-
export type ToggleButtonTokens = ButtonTokens;
|
28
|
-
|
29
|
-
export type ToggleButtonVariants = ButtonVariants<ToggleButtonTokens>;
|