@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
package/dist/react-button.d.ts
CHANGED
@@ -1,457 +1,232 @@
|
|
1
|
-
import {
|
2
|
-
import { ComponentProps } from '@fluentui/react-
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import
|
1
|
+
import { ARIAButtonShorthandProps } from '@fluentui/react-aria';
|
2
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
3
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
4
|
+
import { ForwardRefComponent } from '@fluentui/react-utilities';
|
5
|
+
import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
6
|
+
import type { MenuTriggerChildProps } from '@fluentui/react-menu';
|
7
|
+
import type { ObjectShorthandProps } from '@fluentui/react-utilities';
|
8
|
+
import * as React_2 from 'react';
|
9
9
|
|
10
10
|
/**
|
11
|
-
*
|
12
|
-
* {@docCategory Button}
|
11
|
+
* Buttons give people a way to trigger an action.
|
13
12
|
*/
|
14
|
-
export declare const Button:
|
13
|
+
export declare const Button: ForwardRefComponent<ButtonProps>;
|
15
14
|
|
16
|
-
|
17
|
-
* {@docCategory Button}
|
18
|
-
*/
|
19
|
-
export declare type ButtonProps = ComponentProps & React.HTMLAttributes<HTMLElement> & {
|
15
|
+
export declare type ButtonCommons = {
|
20
16
|
/**
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
17
|
+
* A button can have its content and borders styled for greater emphasis or to be subtle.
|
18
|
+
* - 'primary': Emphasizes the button as a primary action.
|
19
|
+
* - 'outline': Removes background styling.
|
20
|
+
* - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.
|
21
|
+
* - 'transparent': Removes background and border styling.
|
24
22
|
*/
|
25
|
-
|
23
|
+
appearance?: 'primary' | 'outline' | 'subtle' | 'transparent';
|
26
24
|
/**
|
27
|
-
*
|
25
|
+
* A button can fill the width of its container.
|
26
|
+
* @default false
|
28
27
|
*/
|
29
|
-
|
28
|
+
block: boolean;
|
30
29
|
/**
|
31
|
-
*
|
30
|
+
* When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it
|
31
|
+
* is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this
|
32
|
+
* pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.
|
33
|
+
* @default false
|
32
34
|
*/
|
33
|
-
|
35
|
+
disabledFocusable: boolean;
|
34
36
|
/**
|
35
|
-
*
|
36
|
-
*
|
37
|
-
* and a non-anchor as the render type will prevent the Button from behaving like a
|
38
|
-
* hyperlink and opening the href on click.
|
37
|
+
* A button can show that it cannot be interacted with.
|
38
|
+
* @default false
|
39
39
|
*/
|
40
|
-
|
40
|
+
disabled: boolean;
|
41
41
|
/**
|
42
|
-
*
|
43
|
-
*
|
42
|
+
* A button can format its icon to appear before or after its content.
|
43
|
+
* @default 'before'
|
44
44
|
*/
|
45
|
-
|
46
|
-
/** A button can appear circular. */
|
47
|
-
circular?: boolean;
|
48
|
-
/** A button can show that it cannot be interacted with. */
|
49
|
-
disabled?: boolean;
|
50
|
-
/** A button can fill the width of its container. */
|
51
|
-
block?: boolean;
|
52
|
-
/** A button can contain only an icon. */
|
53
|
-
iconOnly?: boolean;
|
54
|
-
/** An icon button can format its icon to appear before or after its content. */
|
55
|
-
iconPosition?: 'before' | 'after';
|
56
|
-
/** A button that inherits its background and has a subtle appearance. */
|
57
|
-
inverted?: boolean;
|
58
|
-
/** Opt in to a named variant which can be supplied by a theme. */
|
59
|
-
variant?: string;
|
60
|
-
/** A button can show a loading indicator. */
|
61
|
-
loading?: boolean;
|
45
|
+
iconPosition: 'before' | 'after';
|
62
46
|
/**
|
63
|
-
*
|
64
|
-
* @
|
65
|
-
* @param data - All props.
|
47
|
+
* A button can be rounded, circular, or square.
|
48
|
+
* @default 'rounded'
|
66
49
|
*/
|
50
|
+
shape: 'rounded' | 'circular' | 'square';
|
67
51
|
/**
|
68
|
-
*
|
69
|
-
* @
|
70
|
-
* @param data - All props.
|
52
|
+
* A button supports different sizes.
|
53
|
+
* @default 'medium'
|
71
54
|
*/
|
72
|
-
|
73
|
-
primary?: boolean;
|
74
|
-
/** A button can emphasize that it represents an alternative action. */
|
75
|
-
secondary?: boolean;
|
76
|
-
/** A button can blend into its background to become less emphasized. */
|
77
|
-
ghost?: boolean;
|
78
|
-
/** A button can have no background styling and just be emphasized through its content styling. */
|
79
|
-
transparent?: boolean;
|
80
|
-
/** A button can be sized. */
|
81
|
-
size?: SizeValue;
|
82
|
-
/** A button can be formatted to show only text in order to indicate a less-pronounced action. */
|
83
|
-
tokens?: RecursivePartial<ButtonTokens>;
|
55
|
+
size: 'small' | 'medium' | 'large';
|
84
56
|
};
|
85
57
|
|
86
|
-
|
87
|
-
* Consts listing which props are shorthand props.
|
88
|
-
*/
|
89
|
-
export declare const buttonShorthandProps: string[];
|
90
|
-
|
91
|
-
export declare const ButtonSizeVariants: {
|
92
|
-
size_smallest: {
|
93
|
-
height: string;
|
94
|
-
minHeight: string;
|
95
|
-
};
|
96
|
-
size_smaller: {
|
97
|
-
height: string;
|
98
|
-
minHeight: string;
|
99
|
-
};
|
100
|
-
size_small: {
|
101
|
-
height: string;
|
102
|
-
minHeight: string;
|
103
|
-
};
|
104
|
-
size_large: {
|
105
|
-
height: string;
|
106
|
-
minHeight: string;
|
107
|
-
};
|
108
|
-
size_larger: {
|
109
|
-
height: string;
|
110
|
-
minHeight: string;
|
111
|
-
};
|
112
|
-
size_largest: {
|
113
|
-
height: string;
|
114
|
-
minHeight: string;
|
115
|
-
};
|
116
|
-
};
|
58
|
+
export declare type ButtonProps = ComponentProps<ButtonSlots> & Partial<ButtonCommons>;
|
117
59
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
*/
|
128
|
-
export declare type ButtonTokens = ColorTokens & FontTokens & {
|
129
|
-
paddingLeft?: string;
|
130
|
-
paddingRight?: string;
|
131
|
-
paddingTop?: string;
|
132
|
-
paddingBottom?: string;
|
133
|
-
margin?: string;
|
134
|
-
height?: string;
|
135
|
-
minWidth?: string;
|
136
|
-
maxWidth?: string;
|
137
|
-
minHeight?: string;
|
138
|
-
contentGap?: string;
|
139
|
-
iconSize?: string;
|
140
|
-
borderRadius?: string;
|
141
|
-
borderTopLeftRadius?: string;
|
142
|
-
borderTopRightRadius?: string;
|
143
|
-
borderBottomLeftRadius?: string;
|
144
|
-
borderBottomRightRadius?: string;
|
145
|
-
borderWidth?: string;
|
146
|
-
boxShadow?: string;
|
147
|
-
width?: string;
|
148
|
-
forcedColorAdjust?: string;
|
149
|
-
transform?: string;
|
150
|
-
transition?: string;
|
151
|
-
size?: {
|
152
|
-
smallest?: string;
|
153
|
-
smaller?: string;
|
154
|
-
small?: string;
|
155
|
-
regular?: string;
|
156
|
-
large?: string;
|
157
|
-
larger?: string;
|
158
|
-
largest?: string;
|
159
|
-
};
|
160
|
-
pressed?: {
|
161
|
-
transform?: string;
|
162
|
-
transition?: string;
|
163
|
-
};
|
60
|
+
export declare type ButtonSlots = {
|
61
|
+
/**
|
62
|
+
* Root of the component that renders as either a <button> tag.
|
63
|
+
*/
|
64
|
+
root: ARIAButtonShorthandProps;
|
65
|
+
/**
|
66
|
+
* Icon that renders either before or after the `children` as specified by the `iconPosition` prop.
|
67
|
+
*/
|
68
|
+
icon?: IntrinsicShorthandProps<'span'>;
|
164
69
|
};
|
165
70
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
circular?: TTokens;
|
173
|
-
iconOnly?: TTokens;
|
174
|
-
ghost?: TTokens;
|
175
|
-
primary?: TTokens;
|
176
|
-
transparent?: TTokens;
|
71
|
+
export declare type ButtonState = ComponentState<ButtonSlots> & ButtonCommons & {
|
72
|
+
/**
|
73
|
+
* A button can contain only an icon.
|
74
|
+
* @default false
|
75
|
+
*/
|
76
|
+
iconOnly: boolean;
|
177
77
|
};
|
178
78
|
|
179
|
-
export declare interface CheckedState {
|
180
|
-
checked?: boolean;
|
181
|
-
defaultChecked?: boolean;
|
182
|
-
onClick?: React.DOMAttributes<HTMLElement>['onClick'];
|
183
|
-
role?: string;
|
184
|
-
'aria-checked'?: React.AriaAttributes['aria-pressed'];
|
185
|
-
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
186
|
-
}
|
187
|
-
|
188
79
|
/**
|
189
|
-
*
|
190
|
-
* {@docCategory Button}
|
80
|
+
* CompoundButtons are buttons that can have secondary content that adds extra information to the user.
|
191
81
|
*/
|
192
|
-
export declare const CompoundButton:
|
82
|
+
export declare const CompoundButton: ForwardRefComponent<CompoundButtonProps>;
|
193
83
|
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
export declare interface CompoundButtonProps extends ButtonProps {
|
84
|
+
export declare type CompoundButtonProps = ComponentProps<CompoundButtonSlots> & Partial<ButtonCommons>;
|
85
|
+
|
86
|
+
export declare type CompoundButtonSlots = ButtonSlots & {
|
198
87
|
/**
|
199
88
|
* Second line of text that describes the action this button takes.
|
200
89
|
*/
|
201
|
-
secondaryContent?:
|
90
|
+
secondaryContent?: IntrinsicShorthandProps<'span'>;
|
202
91
|
/**
|
203
|
-
* Container that wraps the children and secondaryContent
|
92
|
+
* Container that wraps the children and the secondaryContent slot.
|
204
93
|
*/
|
205
|
-
contentContainer
|
206
|
-
}
|
207
|
-
|
208
|
-
/**
|
209
|
-
* Consts listing which props are shorthand props.
|
210
|
-
*/
|
211
|
-
export declare const compoundButtonShorthandProps: string[];
|
212
|
-
|
213
|
-
/**
|
214
|
-
* {@docCategory Button}
|
215
|
-
*/
|
216
|
-
export declare interface CompoundButtonState extends CompoundButtonProps {
|
217
|
-
}
|
218
|
-
|
219
|
-
/**
|
220
|
-
* {@docCategory Button}
|
221
|
-
*/
|
222
|
-
export declare type CompoundButtonTokens = ButtonTokens & {
|
223
|
-
secondaryContentColor?: string;
|
224
|
-
secondaryContentFontSize?: string;
|
225
|
-
secondaryContentFontWeight?: string;
|
226
|
-
secondaryContentGap?: string;
|
94
|
+
contentContainer: IntrinsicShorthandProps<'span'>;
|
227
95
|
};
|
228
96
|
|
229
|
-
|
230
|
-
* {@docCategory Button}
|
231
|
-
*/
|
232
|
-
export declare type CompoundButtonVariants = ButtonVariants<CompoundButtonTokens>;
|
233
|
-
|
234
|
-
export declare type ExpandedState = {
|
235
|
-
ref?: React.Ref<unknown>;
|
236
|
-
expanded?: boolean;
|
237
|
-
defaultExpanded?: boolean;
|
238
|
-
onClick?: (ev: React.MouseEvent) => void;
|
239
|
-
onMenuDismiss?: () => void;
|
240
|
-
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
241
|
-
'aria-expanded'?: React.HTMLAttributes<HTMLElement>['aria-expanded'];
|
242
|
-
'aria-haspopup'?: React.HTMLAttributes<HTMLElement>['aria-haspopup'];
|
243
|
-
menu?: MenuButtonState['menu'];
|
244
|
-
};
|
97
|
+
export declare type CompoundButtonState = ComponentState<CompoundButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components'>;
|
245
98
|
|
246
99
|
/**
|
247
|
-
*
|
248
|
-
* {@docCategory Button}
|
100
|
+
* MenuButtons are buttons that handle opening and closing a menu when they are triggered.
|
249
101
|
*/
|
250
|
-
export declare const MenuButton:
|
102
|
+
export declare const MenuButton: ForwardRefComponent<MenuButtonProps>;
|
251
103
|
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
export declare type MenuButtonProps = Omit<ButtonProps, 'iconPosition' | 'loader'> & {
|
256
|
-
/**
|
257
|
-
* Menu that is displayed when the button is pressed.
|
258
|
-
*/
|
259
|
-
menu?: ShorthandProps;
|
104
|
+
export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Partial<Omit<ButtonCommons, 'iconPosition'>> & Partial<MenuTriggerChildProps>;
|
105
|
+
|
106
|
+
export declare type MenuButtonSlots = ButtonSlots & {
|
260
107
|
/**
|
261
108
|
* Menu icon that indicates that this button has a menu that can be expanded.
|
262
109
|
*/
|
263
|
-
menuIcon?:
|
264
|
-
/**
|
265
|
-
* Defines the inital expanded state of the MenuButton. Use this if you want the MenuButton to maintain its own state.
|
266
|
-
* Mutually exclusive with `expanded`.
|
267
|
-
* @defaultvalue false
|
268
|
-
*/
|
269
|
-
defaultExpanded?: boolean;
|
270
|
-
/**
|
271
|
-
* Defines whether the MenuButton is in an expanded state. Use this if you wish to have the expanded state of the
|
272
|
-
* MenuButton be controlled. Mutually exclusive with `defaultExpanded`.
|
273
|
-
* @defaultvalue defaultExpanded
|
274
|
-
*/
|
275
|
-
expanded?: boolean;
|
276
|
-
/**
|
277
|
-
* Defines a callback that runs after the MenuButton's contextual menu has been dismissed.
|
278
|
-
*/
|
279
|
-
onMenuDismiss?: () => void;
|
110
|
+
menuIcon?: IntrinsicShorthandProps<'span'>;
|
280
111
|
};
|
281
112
|
|
282
|
-
export declare
|
283
|
-
|
284
|
-
export declare interface MenuButtonState extends Omit<MenuButtonProps, 'menu'>, Omit<ButtonState, 'iconPosition' | 'loader'> {
|
285
|
-
menu?: React.PropsWithChildren<MinimalMenuProps>;
|
286
|
-
}
|
113
|
+
export declare type MenuButtonState = ComponentState<MenuButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;
|
287
114
|
|
288
115
|
/**
|
289
|
-
*
|
116
|
+
* Renders a Button component by passing the state defined props to the appropriate slots.
|
290
117
|
*/
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
};
|
118
|
+
declare const renderButton: (state: ButtonState) => JSX.Element;
|
119
|
+
export { renderButton }
|
120
|
+
export { renderButton as renderToggleButton }
|
295
121
|
|
296
122
|
/**
|
297
|
-
*
|
123
|
+
* Renders a CompoundButton component by passing the state defined props to the appropriate slots.
|
298
124
|
*/
|
299
|
-
export declare
|
125
|
+
export declare const renderCompoundButton: (state: CompoundButtonState) => JSX.Element;
|
300
126
|
|
301
127
|
/**
|
302
|
-
*
|
128
|
+
* Renders a MenuButton component by passing the state defined props to the appropriate slots.
|
303
129
|
*/
|
304
|
-
export declare
|
305
|
-
hidden?: boolean;
|
306
|
-
onDismiss?: () => void;
|
307
|
-
target?: React.Ref<HTMLElement | undefined>;
|
308
|
-
};
|
130
|
+
export declare const renderMenuButton: (state: MenuButtonState) => JSX.Element;
|
309
131
|
|
310
132
|
/**
|
311
|
-
*
|
312
|
-
* {@docCategory Button}
|
133
|
+
* Renders a SplitButton component by passing the state defined props to the appropriate slots.
|
313
134
|
*/
|
314
|
-
export declare const
|
135
|
+
export declare const renderSplitButton: (state: SplitButtonState) => JSX.Element;
|
315
136
|
|
316
137
|
/**
|
317
|
-
*
|
138
|
+
* SplitButtons are a grouping of two interactive surfaces where the interacting with the first one triggers a primary
|
139
|
+
* action, while interacting with the second one opens a menu with secondary actions.
|
318
140
|
*/
|
319
|
-
export declare
|
141
|
+
export declare const SplitButton: ForwardRefComponent<SplitButtonProps>;
|
142
|
+
|
143
|
+
export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & Omit<ButtonProps, 'root'> & Omit<MenuButtonProps, 'root'>;
|
144
|
+
|
145
|
+
export declare type SplitButtonSlots = {
|
320
146
|
/**
|
321
|
-
*
|
147
|
+
* Root of the component that wraps the primary action button and menu button.
|
322
148
|
*/
|
323
|
-
|
149
|
+
root: IntrinsicShorthandProps<'div'>;
|
324
150
|
/**
|
325
|
-
*
|
151
|
+
* Button that opens menu with secondary actions in SplitButton.
|
326
152
|
*/
|
327
|
-
|
153
|
+
menuButton?: ObjectShorthandProps<MenuButtonProps>;
|
328
154
|
/**
|
329
|
-
* Button
|
155
|
+
* Button to perform primary action in SplitButton.
|
330
156
|
*/
|
331
|
-
|
332
|
-
}
|
333
|
-
|
334
|
-
export declare const splitButtonShorthandProps: string[];
|
335
|
-
|
336
|
-
export declare interface SplitButtonState extends Omit<SplitButtonProps, 'menu'>, MenuButtonState {
|
337
|
-
menuButtonRef?: React.RefObject<HTMLButtonElement>;
|
338
|
-
}
|
339
|
-
|
340
|
-
/**
|
341
|
-
* {@docCategory Button}
|
342
|
-
*/
|
343
|
-
export declare type SplitButtonTokens = MenuButtonTokens & {
|
344
|
-
dividerColor?: string;
|
345
|
-
dividerThickness?: string;
|
157
|
+
primaryActionButton?: ObjectShorthandProps<ButtonProps>;
|
346
158
|
};
|
347
159
|
|
348
|
-
|
349
|
-
* {@docCategory Button}
|
350
|
-
*/
|
351
|
-
export declare type SplitButtonVariants = ButtonVariants<SplitButtonTokens>;
|
160
|
+
export declare type SplitButtonState = ComponentState<SplitButtonSlots> & Omit<ButtonState, 'components' | 'iconOnly' | 'root'> & Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;
|
352
161
|
|
353
162
|
/**
|
354
|
-
*
|
355
|
-
* {@docCategory Button}
|
163
|
+
* ToggleButtons are buttons that toggle between two defined states when triggered.
|
356
164
|
*/
|
357
|
-
export declare const ToggleButton:
|
165
|
+
export declare const ToggleButton: ForwardRefComponent<ToggleButtonProps>;
|
358
166
|
|
359
|
-
|
360
|
-
* {@docCategory Button}
|
361
|
-
*/
|
362
|
-
export declare interface ToggleButtonProps extends ButtonProps {
|
167
|
+
export declare type ToggleButtonCommons = {
|
363
168
|
/**
|
364
169
|
* Defines the controlled checked state of the `ToggleButton`.
|
365
|
-
*
|
170
|
+
* If passed, `ToggleButton` ignores the `defaultChecked` property.
|
366
171
|
* 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
|
367
172
|
* correct value based on handling `onClick` events and re-rendering.
|
173
|
+
* @default false
|
368
174
|
*/
|
369
|
-
checked
|
175
|
+
checked: boolean;
|
176
|
+
};
|
177
|
+
|
178
|
+
export declare type ToggleButtonProps = ButtonProps & Partial<ToggleButtonCommons> & {
|
370
179
|
/**
|
371
|
-
* Defines whether the `ToggleButton` is
|
372
|
-
*
|
180
|
+
* Defines whether the `ToggleButton` is initially in a checked state or not when rendered.
|
181
|
+
* @default false
|
373
182
|
*/
|
374
183
|
defaultChecked?: boolean;
|
375
|
-
}
|
376
|
-
|
377
|
-
/**
|
378
|
-
* {@docCategory Button}
|
379
|
-
*/
|
380
|
-
export declare interface ToggleButtonState extends ToggleButtonProps {
|
381
|
-
}
|
382
|
-
|
383
|
-
export declare type ToggleButtonTokens = ButtonTokens;
|
384
|
-
|
385
|
-
export declare type ToggleButtonVariants = ButtonVariants<ToggleButtonTokens>;
|
386
|
-
|
387
|
-
/**
|
388
|
-
* Given user props, returns state and render function for a Button.
|
389
|
-
*/
|
390
|
-
export declare const useButton: (props: ButtonProps, ref: React.Ref<HTMLElement>, defaultProps?: ButtonProps | undefined) => {
|
391
|
-
state: Record<string, any>;
|
392
|
-
render: (state: import("./Button.types").ButtonState) => JSX.Element;
|
393
184
|
};
|
394
185
|
|
395
|
-
export declare
|
186
|
+
export declare type ToggleButtonState = ButtonState & ToggleButtonCommons;
|
396
187
|
|
397
188
|
/**
|
398
|
-
*
|
399
|
-
* @param
|
189
|
+
* Given user props, defines default props for the Button, calls useButtonState, and returns processed state.
|
190
|
+
* @param props - User provided props to the Button component.
|
191
|
+
* @param ref - User provided ref to be passed to the Button component.
|
400
192
|
*/
|
401
|
-
export declare const
|
193
|
+
export declare const useButton: (props: ButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => ButtonState;
|
402
194
|
|
403
|
-
|
404
|
-
* The useToggle hook processes adds the correct toggled state and acccessibility as needed.
|
405
|
-
* @param draftState - state to read and augment.
|
406
|
-
*/
|
407
|
-
export declare const useChecked: <TDraftState extends CheckedState>(draftState: TDraftState) => void;
|
408
|
-
|
409
|
-
export declare const useClasses: (state: CompoundButtonState, theme?: Theme | undefined, renderer?: import("@fluentui/react-theme-provider").StyleRenderer | undefined) => void;
|
195
|
+
export declare const useButtonStyles: (state: ButtonState) => ButtonState;
|
410
196
|
|
411
197
|
/**
|
412
|
-
* Given user props,
|
198
|
+
* Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.
|
199
|
+
* @param props - User provided props to the CompoundButton component.
|
200
|
+
* @param ref - User provided ref to be passed to the CompoundButton component.
|
413
201
|
*/
|
414
|
-
export declare const useCompoundButton: (props: CompoundButtonProps, ref:
|
415
|
-
state: Record<string, any>;
|
416
|
-
render: (state: import("./CompoundButton.types").CompoundButtonState) => JSX.Element;
|
417
|
-
};
|
202
|
+
export declare const useCompoundButton: ({ contentContainer, secondaryContent, ...props }: CompoundButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => CompoundButtonState;
|
418
203
|
|
419
|
-
export declare const
|
204
|
+
export declare const useCompoundButtonStyles: (state: CompoundButtonState) => CompoundButtonState;
|
420
205
|
|
421
206
|
/**
|
422
|
-
*
|
207
|
+
* Given user props, returns the final state for a MenuButton.
|
423
208
|
*/
|
424
|
-
export declare const
|
209
|
+
export declare const useMenuButton: ({ menuIcon, ...props }: MenuButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => MenuButtonState;
|
210
|
+
|
211
|
+
export declare const useMenuButtonStyles: (state: MenuButtonState) => MenuButtonState;
|
425
212
|
|
426
213
|
/**
|
427
|
-
*
|
214
|
+
* Given user props, defines default props for the SplitButton and returns processed state.
|
215
|
+
* @param props - User provided props to the SplitButton component.
|
216
|
+
* @param ref - User provided ref to be passed to the SplitButton component.
|
428
217
|
*/
|
429
|
-
export declare const
|
430
|
-
state: MenuButtonState;
|
431
|
-
render: (state: MenuButtonState) => JSX.Element;
|
432
|
-
};
|
433
|
-
|
434
|
-
export declare const useMenuButtonClasses: (state: MenuButtonState, theme?: Theme | undefined, renderer?: import("@fluentui/react-theme-provider").StyleRenderer | undefined) => void;
|
218
|
+
export declare const useSplitButton: (props: SplitButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => SplitButtonState;
|
435
219
|
|
436
|
-
export declare const
|
437
|
-
|
438
|
-
export declare const useMenuContext: () => MinimalMenuProps;
|
220
|
+
export declare const useSplitButtonStyles: (state: SplitButtonState) => SplitButtonState;
|
439
221
|
|
440
222
|
/**
|
441
|
-
*
|
223
|
+
* Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
|
224
|
+
* processed state.
|
225
|
+
* @param props - User provided props to the ToggleButton component.
|
226
|
+
* @param ref - User provided ref to be passed to the ToggleButton component.
|
442
227
|
*/
|
443
|
-
export declare const
|
444
|
-
state: SplitButtonState;
|
445
|
-
render: (state: SplitButtonState) => JSX.Element;
|
446
|
-
};
|
447
|
-
|
448
|
-
export declare const useSplitButtonClasses: (state: SplitButtonState, theme?: Theme | undefined, renderer?: import("@fluentui/react-theme-provider").StyleRenderer | undefined) => void;
|
449
|
-
|
450
|
-
export declare const useToggleButton: (props: ToggleButtonProps, ref: React.Ref<HTMLElement>, defaultProps?: ToggleButtonProps | undefined) => {
|
451
|
-
state: Record<string, any>;
|
452
|
-
render: (state: import("../Button").ButtonState) => JSX.Element;
|
453
|
-
};
|
228
|
+
export declare const useToggleButton: ({ checked, defaultChecked, ...props }: ToggleButtonProps, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => ToggleButtonState;
|
454
229
|
|
455
|
-
export declare const
|
230
|
+
export declare const useToggleButtonStyles: (state: ToggleButtonState) => ToggleButtonState;
|
456
231
|
|
457
232
|
export { }
|
package/lib/Button.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CompoundButton.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"CompoundButton.js","sourceRoot":"","sources":["../src/CompoundButton.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
|
package/lib/MenuButton.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuButton.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../src/MenuButton.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
package/lib/SplitButton.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SplitButton.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../src/SplitButton.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
|
package/lib/ToggleButton.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ToggleButton.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../src/ToggleButton.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|
@@ -1,2 +1,4 @@
|
|
1
|
-
import { IsConformantOptions } from '@fluentui/react-conformance';
|
2
|
-
export declare function isConformant(testInfo: Omit<IsConformantOptions
|
1
|
+
import type { IsConformantOptions } from '@fluentui/react-conformance';
|
2
|
+
export declare function isConformant<TProps = {}>(testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & {
|
3
|
+
componentPath?: string;
|
4
|
+
}): void;
|
@@ -1,9 +1,13 @@
|
|
1
1
|
import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
|
2
|
+
import makeStylesTests from '@fluentui/react-conformance-make-styles';
|
2
3
|
export function isConformant(testInfo) {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
var defaultOptions = {
|
5
|
+
asPropHandlesRef: true,
|
6
|
+
componentPath: module.parent.filename.replace('.test', ''),
|
7
|
+
disabledTests: ['has-docblock', 'kebab-aria-attributes'],
|
8
|
+
extraTests: makeStylesTests,
|
9
|
+
skipAsPropTests: true
|
10
|
+
};
|
11
|
+
baseIsConformant(defaultOptions, testInfo);
|
8
12
|
}
|
9
13
|
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,aAAa,EAAE,CAAC,cAAD,EAAiB,uBAAjB,CAH4C;AAI3D,IAAA,UAAU,EAAE,eAJ+C;AAK3D,IAAA,eAAe,EAAE;AAL0C,GAA7D;AAQA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
|