@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,13 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { CompoundButtonProps } from './CompoundButton.types';
|
2
|
+
import type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.types';
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.
|
5
|
+
* @param props - User provided props to the CompoundButton component.
|
6
|
+
* @param ref - User provided ref to be passed to the CompoundButton component.
|
5
7
|
*/
|
6
|
-
export declare const
|
7
|
-
/**
|
8
|
-
* Given user props, returns state and render function for a Button.
|
9
|
-
*/
|
10
|
-
export declare const useCompoundButton: (props: CompoundButtonProps, ref: React.Ref<HTMLElement>, defaultProps?: CompoundButtonProps | undefined) => {
|
11
|
-
state: Record<string, any>;
|
12
|
-
render: (state: import("./CompoundButton.types").CompoundButtonState) => JSX.Element;
|
13
|
-
};
|
8
|
+
export declare const useCompoundButton: ({ contentContainer, secondaryContent, ...props }: CompoundButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => CompoundButtonState;
|
@@ -1,34 +1,41 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
var useButtonState_1 = require("../Button/useButtonState");
|
6
|
-
var renderCompoundButton_1 = require("./renderCompoundButton");
|
7
|
-
/**
|
8
|
-
* Consts listing which props are shorthand props.
|
9
|
-
*/
|
10
|
-
exports.compoundButtonShorthandProps = ['icon', 'loader', 'content', 'contentContainer', 'secondaryContent'];
|
11
|
-
var mergeProps = index_1.makeMergeProps({
|
12
|
-
deepMerge: exports.compoundButtonShorthandProps,
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
13
5
|
});
|
6
|
+
exports.useCompoundButton = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
+
|
12
|
+
var index_1 = /*#__PURE__*/require("../Button/index");
|
14
13
|
/**
|
15
|
-
* Given user props,
|
14
|
+
* Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.
|
15
|
+
* @param props - User provided props to the CompoundButton component.
|
16
|
+
* @param ref - User provided ref to be passed to the CompoundButton component.
|
16
17
|
*/
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
|
19
|
+
|
20
|
+
var useCompoundButton = function (_a, ref) {
|
21
|
+
var contentContainer = _a.contentContainer,
|
22
|
+
secondaryContent = _a.secondaryContent,
|
23
|
+
props = tslib_1.__rest(_a, ["contentContainer", "secondaryContent"]);
|
24
|
+
|
25
|
+
return tslib_1.__assign(tslib_1.__assign({}, index_1.useButton(props, ref)), {
|
26
|
+
// Slots definition
|
27
|
+
components: {
|
28
|
+
root: 'button',
|
29
|
+
icon: 'span',
|
30
|
+
contentContainer: 'span',
|
31
|
+
secondaryContent: 'span'
|
32
|
+
},
|
33
|
+
contentContainer: react_utilities_1.resolveShorthand(contentContainer, {
|
34
|
+
required: true
|
35
|
+
}),
|
36
|
+
secondaryContent: react_utilities_1.resolveShorthand(secondaryContent)
|
37
|
+
});
|
33
38
|
};
|
39
|
+
|
40
|
+
exports.useCompoundButton = useCompoundButton;
|
34
41
|
//# sourceMappingURL=useCompoundButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/CompoundButton/useCompoundButton.ts"],"names":[],"mappings":";;;;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,IAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAEA;;;;AAIG;;;AACI,IAAM,iBAAiB,GAAG,UAC/B,EAD+B,EAE/B,GAF+B,EAEsB;AADnD,MAAA,gBAAgB,GAAA,EAAA,CAAA,gBAAhB;AAAA,MAAkB,gBAAgB,GAAA,EAAA,CAAA,gBAAlC;AAAA,MAAuC,KAAK,GAAA,OAAA,CAAA,MAAA,CAAA,EAAA,EAA9C,CAAA,kBAAA,EAAA,kBAAA,CAA8C,CAA5C;;AAGF,SAAA,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EAEK,OAAA,CAAA,SAAA,CAAU,KAAV,EAAiB,GAAjB,CAFL,CAAA,EAE0B;AAExB;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE,MAFI;AAGV,MAAA,gBAAgB,EAAE,MAHR;AAIV,MAAA,gBAAgB,EAAE;AAJR,KAHY;AASxB,IAAA,gBAAgB,EAAE,iBAAA,CAAA,gBAAA,CAAiB,gBAAjB,EAAmC;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAnC,CATM;AAUxB,IAAA,gBAAgB,EAAE,iBAAA,CAAA,gBAAA,CAAiB,gBAAjB;AAVM,GAF1B,CAAA;AAcD,CAlBM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourceRoot":""}
|
@@ -0,0 +1,175 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.useCompoundButtonStyles = void 0;
|
7
|
+
|
8
|
+
var react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
|
9
|
+
|
10
|
+
var useButtonStyles_1 = /*#__PURE__*/require("../Button/useButtonStyles");
|
11
|
+
|
12
|
+
var CompoundButtonClassNames = {
|
13
|
+
secondaryContent: 'CompoundButton-secondaryContent'
|
14
|
+
};
|
15
|
+
|
16
|
+
var useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
17
|
+
"base": {
|
18
|
+
"rmohyg": "fsbu5mz",
|
19
|
+
"Bqenvij": "f11ysow2",
|
20
|
+
"Bekya5a": "f1smw4j4",
|
21
|
+
"Bi863bl": "f1b73140",
|
22
|
+
"B7j81dy": "f19sbf7w"
|
23
|
+
},
|
24
|
+
"outline": {},
|
25
|
+
"primary": {
|
26
|
+
"Bekya5a": "f1wrmfx5",
|
27
|
+
"Bi863bl": "fl6im4w",
|
28
|
+
"B7j81dy": "f1y0ndy"
|
29
|
+
},
|
30
|
+
"subtle": {
|
31
|
+
"Bekya5a": "f1smw4j4",
|
32
|
+
"Bi863bl": "f182e9fe",
|
33
|
+
"B7j81dy": "fdrkfd0"
|
34
|
+
},
|
35
|
+
"transparent": {
|
36
|
+
"Bekya5a": "f1smw4j4",
|
37
|
+
"Bi863bl": "f182e9fe",
|
38
|
+
"B7j81dy": "fdrkfd0"
|
39
|
+
},
|
40
|
+
"small": {
|
41
|
+
"z8tnut": "fp9bwmr",
|
42
|
+
"z189sj": ["f19lj068", "f177v4lu"],
|
43
|
+
"Byoj8tv": "f150uoa4",
|
44
|
+
"uwmqm3": ["f177v4lu", "f19lj068"],
|
45
|
+
"Be2twd7": "fkhj508",
|
46
|
+
"Bg96gwp": "f1i3iumi"
|
47
|
+
},
|
48
|
+
"medium": {
|
49
|
+
"z8tnut": "f1kcqot9",
|
50
|
+
"z189sj": ["f11qrl6u", "fjlbh76"],
|
51
|
+
"Byoj8tv": "fpe6lb7",
|
52
|
+
"uwmqm3": ["fjlbh76", "f11qrl6u"],
|
53
|
+
"Be2twd7": "fkhj508",
|
54
|
+
"Bg96gwp": "f1i3iumi"
|
55
|
+
},
|
56
|
+
"large": {
|
57
|
+
"z8tnut": "fqag9an",
|
58
|
+
"z189sj": ["f1gbmcue", "f1rh9g5y"],
|
59
|
+
"Byoj8tv": "fp67ikv",
|
60
|
+
"uwmqm3": ["f1rh9g5y", "f1gbmcue"],
|
61
|
+
"Be2twd7": "fod5ikn",
|
62
|
+
"Bg96gwp": "faaz57k"
|
63
|
+
},
|
64
|
+
"disabled": {
|
65
|
+
"Bekya5a": "f1ygg8x6",
|
66
|
+
"Bi863bl": "fhtktt2",
|
67
|
+
"B7j81dy": "f1v2jbe6"
|
68
|
+
}
|
69
|
+
}, {
|
70
|
+
"d": [".fsbu5mz{gap:12px;}", ".f11ysow2{height:auto;}", ".f1smw4j4 .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2);}", ".f1wrmfx5 .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1kcqot9{padding-top:12px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fpe6lb7{padding-bottom:12px;}", ".fqag9an{padding-top:16px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fp67ikv{padding-bottom:16px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1ygg8x6 .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
|
71
|
+
"h": [".f1b73140:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".fl6im4w:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f182e9fe:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".fhtktt2:hover .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
|
72
|
+
"a": [".f19sbf7w:active .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".f1y0ndy:active .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fdrkfd0:active .CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".f1v2jbe6:active .CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"]
|
73
|
+
});
|
74
|
+
|
75
|
+
var useRootIconOnlyStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
76
|
+
"small": {
|
77
|
+
"z8tnut": "f10ra9hq",
|
78
|
+
"z189sj": ["f8wuabp", "fycuoez"],
|
79
|
+
"Byoj8tv": "f1y2xyjm",
|
80
|
+
"uwmqm3": ["fycuoez", "f8wuabp"],
|
81
|
+
"B2u0y6b": "ft5vyj6",
|
82
|
+
"Bf4jedk": "f17suaiq"
|
83
|
+
},
|
84
|
+
"medium": {
|
85
|
+
"z8tnut": "f1xp5gbu",
|
86
|
+
"z189sj": ["f1sgzk6v", "f1bg5zqg"],
|
87
|
+
"Byoj8tv": "f1d7kygh",
|
88
|
+
"uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
|
89
|
+
"B2u0y6b": "fdczgix",
|
90
|
+
"Bf4jedk": "fjdcg9m"
|
91
|
+
},
|
92
|
+
"large": {
|
93
|
+
"z8tnut": "fp9bwmr",
|
94
|
+
"z189sj": ["f19lj068", "f177v4lu"],
|
95
|
+
"Byoj8tv": "f150uoa4",
|
96
|
+
"uwmqm3": ["f177v4lu", "f19lj068"],
|
97
|
+
"B2u0y6b": "fww51uw",
|
98
|
+
"Bf4jedk": "f1qhsl2h"
|
99
|
+
}
|
100
|
+
}, {
|
101
|
+
"d": [".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".ft5vyj6{max-width:48px;}", ".f17suaiq{min-width:48px;}", ".f1xp5gbu{padding-top:6px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".fdczgix{max-width:52px;}", ".fjdcg9m{min-width:52px;}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".fww51uw{max-width:56px;}", ".f1qhsl2h{min-width:56px;}"]
|
102
|
+
});
|
103
|
+
|
104
|
+
var useIconStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
105
|
+
"base": {
|
106
|
+
"Be2twd7": "fndrnj9",
|
107
|
+
"Bqenvij": "fbhnoac",
|
108
|
+
"a9b677": "feqmc2u"
|
109
|
+
}
|
110
|
+
}, {
|
111
|
+
"d": [".fndrnj9{font-size:40px;}", ".fbhnoac{height:40px;}", ".feqmc2u{width:40px;}"]
|
112
|
+
});
|
113
|
+
|
114
|
+
var useContentContainerStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
115
|
+
"base": {
|
116
|
+
"mc9l5x": "f22iagw",
|
117
|
+
"Beiy3e4": "f1vx9l62",
|
118
|
+
"fsow6f": ["f1o700av", "fes3tcz"]
|
119
|
+
}
|
120
|
+
}, {
|
121
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}"]
|
122
|
+
});
|
123
|
+
|
124
|
+
var useSecondaryContentStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
125
|
+
"base": {
|
126
|
+
"Bg96gwp": "flkuc6h",
|
127
|
+
"B6of3ja": "fvjh0tl",
|
128
|
+
"Bhrd7zp": "figsok6"
|
129
|
+
},
|
130
|
+
"small": {
|
131
|
+
"Be2twd7": "fy9rknc"
|
132
|
+
},
|
133
|
+
"medium": {
|
134
|
+
"Be2twd7": "fy9rknc"
|
135
|
+
},
|
136
|
+
"large": {
|
137
|
+
"Be2twd7": "fkhj508"
|
138
|
+
}
|
139
|
+
}, {
|
140
|
+
"d": [".flkuc6h{line-height:100%;}", ".fvjh0tl{margin-top:4px;}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}"]
|
141
|
+
});
|
142
|
+
|
143
|
+
var useCompoundButtonStyles = function (state) {
|
144
|
+
var rootStyles = useRootStyles();
|
145
|
+
var rootIconOnlyStyles = useRootIconOnlyStyles();
|
146
|
+
var iconStyles = useIconStyles();
|
147
|
+
var contentContainerStyles = useContentContainerStyles();
|
148
|
+
var secondaryContentStyles = useSecondaryContentStyles();
|
149
|
+
var appearance = state.appearance,
|
150
|
+
disabled = state.disabled,
|
151
|
+
disabledFocusable = state.disabledFocusable,
|
152
|
+
iconOnly = state.iconOnly,
|
153
|
+
size = state.size;
|
154
|
+
state.root.className = react_make_styles_1.mergeClasses( // Root styles
|
155
|
+
rootStyles.base, appearance && rootStyles[appearance], rootStyles[size], // Disabled styles
|
156
|
+
(disabled || disabledFocusable) && rootStyles.disabled, // Icon-only styles
|
157
|
+
iconOnly && rootIconOnlyStyles[size], // User provided class name
|
158
|
+
state.root.className);
|
159
|
+
|
160
|
+
if (state.icon) {
|
161
|
+
state.icon.className = react_make_styles_1.mergeClasses(iconStyles.base, state.icon.className);
|
162
|
+
}
|
163
|
+
|
164
|
+
state.contentContainer.className = react_make_styles_1.mergeClasses(contentContainerStyles.base, state.contentContainer.className);
|
165
|
+
|
166
|
+
if (state.secondaryContent) {
|
167
|
+
state.secondaryContent.className = react_make_styles_1.mergeClasses(CompoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
|
168
|
+
}
|
169
|
+
|
170
|
+
useButtonStyles_1.useButtonStyles(state);
|
171
|
+
return state;
|
172
|
+
};
|
173
|
+
|
174
|
+
exports.useCompoundButtonStyles = useCompoundButtonStyles;
|
175
|
+
//# sourceMappingURL=useCompoundButtonStyles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/CompoundButton/useCompoundButtonStyles.ts"],"names":[],"mappings":"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","sourceRoot":""}
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import
|
2
|
-
import {
|
1
|
+
import type { MenuButtonProps } from './MenuButton.types';
|
2
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
*
|
5
|
-
* {@docCategory Button}
|
4
|
+
* MenuButtons are buttons that handle opening and closing a menu when they are triggered.
|
6
5
|
*/
|
7
|
-
export declare const MenuButton:
|
6
|
+
export declare const MenuButton: ForwardRefComponent<MenuButtonProps>;
|
@@ -1,30 +1,26 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
var
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.MenuButton = void 0;
|
7
|
+
|
8
|
+
var React = /*#__PURE__*/require("react");
|
9
|
+
|
10
|
+
var renderMenuButton_1 = /*#__PURE__*/require("./renderMenuButton");
|
11
|
+
|
12
|
+
var useMenuButton_1 = /*#__PURE__*/require("./useMenuButton");
|
13
|
+
|
14
|
+
var useMenuButtonStyles_1 = /*#__PURE__*/require("./useMenuButtonStyles");
|
9
15
|
/**
|
10
|
-
*
|
11
|
-
* {@docCategory Button}
|
16
|
+
* MenuButtons are buttons that handle opening and closing a menu when they are triggered.
|
12
17
|
*/
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
// TODO remove any
|
20
|
-
/**
|
21
|
-
* Type 'MenuButtonState' has no properties in common with type '{
|
22
|
-
* style?: CSSProperties | undefined; tokens?: string | { [key: string]: any; }
|
23
|
-
* | undefined; }
|
24
|
-
*/
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
26
|
-
react_theme_provider_1.useInlineTokens(state, '--button');
|
27
|
-
return render(state);
|
18
|
+
|
19
|
+
|
20
|
+
exports.MenuButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
21
|
+
var state = useMenuButton_1.useMenuButton(props, ref);
|
22
|
+
useMenuButtonStyles_1.useMenuButtonStyles(state);
|
23
|
+
return renderMenuButton_1.renderMenuButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
|
28
24
|
});
|
29
25
|
exports.MenuButton.displayName = 'MenuButton';
|
30
26
|
//# sourceMappingURL=MenuButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,UAAA,gBAAmD,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAC1F,MAAM,KAAK,GAAG,eAAA,CAAA,aAAA,CAAc,KAAd,EAAqB,GAArB,CAAd;AAEA,EAAA,qBAAA,CAAA,mBAAA,CAAoB,KAApB;AAEA,SAAO,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,CAAP,CAL0F,CAM1F;AACD,CAP+D,CAAnD;AASb,OAAA,CAAA,UAAA,CAAW,WAAX,GAAyB,YAAzB","sourceRoot":""}
|
@@ -1,54 +1,11 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
|
5
|
-
* {@docCategory Button}
|
6
|
-
*/
|
7
|
-
export declare type MinimalMenuProps = {
|
8
|
-
hidden?: boolean;
|
9
|
-
onDismiss?: () => void;
|
10
|
-
target?: React.Ref<HTMLElement | undefined>;
|
11
|
-
};
|
12
|
-
/**
|
13
|
-
* {@docCategory Button}
|
14
|
-
*/
|
15
|
-
export declare type MenuButtonProps = Omit<ButtonProps, 'iconPosition' | 'loader'> & {
|
16
|
-
/**
|
17
|
-
* Menu that is displayed when the button is pressed.
|
18
|
-
*/
|
19
|
-
menu?: ShorthandProps;
|
1
|
+
import type { MenuTriggerChildProps } from '@fluentui/react-menu';
|
2
|
+
import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
3
|
+
import type { ButtonCommons, ButtonSlots, ButtonState } from '../Button/Button.types';
|
4
|
+
export declare type MenuButtonSlots = ButtonSlots & {
|
20
5
|
/**
|
21
6
|
* Menu icon that indicates that this button has a menu that can be expanded.
|
22
7
|
*/
|
23
|
-
menuIcon?:
|
24
|
-
/**
|
25
|
-
* Defines the inital expanded state of the MenuButton. Use this if you want the MenuButton to maintain its own state.
|
26
|
-
* Mutually exclusive with `expanded`.
|
27
|
-
* @defaultvalue false
|
28
|
-
*/
|
29
|
-
defaultExpanded?: boolean;
|
30
|
-
/**
|
31
|
-
* Defines whether the MenuButton is in an expanded state. Use this if you wish to have the expanded state of the
|
32
|
-
* MenuButton be controlled. Mutually exclusive with `defaultExpanded`.
|
33
|
-
* @defaultvalue defaultExpanded
|
34
|
-
*/
|
35
|
-
expanded?: boolean;
|
36
|
-
/**
|
37
|
-
* Defines a callback that runs after the MenuButton's contextual menu has been dismissed.
|
38
|
-
*/
|
39
|
-
onMenuDismiss?: () => void;
|
40
|
-
};
|
41
|
-
export interface MenuButtonState extends Omit<MenuButtonProps, 'menu'>, Omit<ButtonState, 'iconPosition' | 'loader'> {
|
42
|
-
menu?: React.PropsWithChildren<MinimalMenuProps>;
|
43
|
-
}
|
44
|
-
/**
|
45
|
-
* {@docCategory Button}
|
46
|
-
*/
|
47
|
-
export declare type MenuButtonTokens = ButtonTokens & {
|
48
|
-
menuIconColor?: string;
|
49
|
-
menuIconSize?: string;
|
8
|
+
menuIcon?: IntrinsicShorthandProps<'span'>;
|
50
9
|
};
|
51
|
-
|
52
|
-
|
53
|
-
*/
|
54
|
-
export declare type MenuButtonVariants = ButtonVariants<MenuButtonTokens>;
|
10
|
+
export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Partial<Omit<ButtonCommons, 'iconPosition'>> & Partial<MenuTriggerChildProps>;
|
11
|
+
export declare type MenuButtonState = ComponentState<MenuButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
export * from './MenuButton.types';
|
2
2
|
export * from './MenuButton';
|
3
|
+
export * from './renderMenuButton';
|
3
4
|
export * from './useMenuButton';
|
4
|
-
export
|
5
|
-
export * from './useExpanded';
|
6
|
-
export * from './useMenuButtonClasses';
|
5
|
+
export { useMenuButtonStyles } from './useMenuButtonStyles';
|
@@ -1,9 +1,26 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.useMenuButtonStyles = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
tslib_1.__exportStar(require("./MenuButton.types"), exports);
|
11
|
+
|
4
12
|
tslib_1.__exportStar(require("./MenuButton"), exports);
|
13
|
+
|
14
|
+
tslib_1.__exportStar(require("./renderMenuButton"), exports);
|
15
|
+
|
5
16
|
tslib_1.__exportStar(require("./useMenuButton"), exports);
|
6
|
-
|
7
|
-
|
8
|
-
|
17
|
+
|
18
|
+
var useMenuButtonStyles_1 = /*#__PURE__*/require("./useMenuButtonStyles");
|
19
|
+
|
20
|
+
Object.defineProperty(exports, "useMenuButtonStyles", {
|
21
|
+
enumerable: true,
|
22
|
+
get: function () {
|
23
|
+
return useMenuButtonStyles_1.useMenuButtonStyles;
|
24
|
+
}
|
25
|
+
});
|
9
26
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,qBAAA,CAAA,mBAAA;AAAmB;AAAnB,CAAA","sourceRoot":""}
|
@@ -1,7 +1,5 @@
|
|
1
|
-
import { MenuButtonState } from './MenuButton.types';
|
1
|
+
import type { MenuButtonState } from './MenuButton.types';
|
2
2
|
/**
|
3
|
-
*
|
4
|
-
* slots to children.
|
5
|
-
* @param state
|
3
|
+
* Renders a MenuButton component by passing the state defined props to the appropriate slots.
|
6
4
|
*/
|
7
5
|
export declare const renderMenuButton: (state: MenuButtonState) => JSX.Element;
|
@@ -1,23 +1,29 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.renderMenuButton = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
var React = /*#__PURE__*/require("react");
|
11
|
+
|
12
|
+
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
7
13
|
/**
|
8
|
-
*
|
9
|
-
* slots to children.
|
10
|
-
* @param state
|
14
|
+
* Renders a MenuButton component by passing the state defined props to the appropriate slots.
|
11
15
|
*/
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
|
17
|
+
|
18
|
+
var renderMenuButton = function (state) {
|
19
|
+
var _a = react_utilities_1.getSlots(state, ['root', 'icon', 'menuIcon']),
|
20
|
+
slots = _a.slots,
|
21
|
+
slotProps = _a.slotProps;
|
22
|
+
|
23
|
+
var icon = state.icon,
|
24
|
+
iconOnly = state.iconOnly;
|
25
|
+
return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)), !iconOnly && slotProps.root.children, (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && React.createElement(slots.menuIcon, tslib_1.__assign({}, slotProps.menuIcon)));
|
22
26
|
};
|
27
|
+
|
28
|
+
exports.renderMenuButton = renderMenuButton;
|
23
29
|
//# sourceMappingURL=renderMenuButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuButton/renderMenuButton.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,gBAAgB,GAAG,UAAC,KAAD,EAAuB;AAC/C,MAAA,EAAA,GAAuB,iBAAA,CAAA,QAAA,CAA0B,KAA1B,EAAiC,CAAC,MAAD,EAAS,MAAT,EAAiB,UAAjB,CAAjC,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,IAAI,GAAe,KAAK,CAApB,IAAJ;AAAA,MAAM,QAAQ,GAAK,KAAK,CAAV,QAAd;AAER,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADF,EAEG,CAAC,QAAD,IAAa,SAAS,CAAC,IAAV,CAAe,QAF/B,EAGG,CAAC,CAAC,QAAD,IAAa,EAAC,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAI,KAAA,CAAJ,GAAA,IAAI,CAAE,QAAP,CAAd,KAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAHrC,CADF;AAOD,CAXM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourceRoot":""}
|
@@ -1,10 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { MenuButtonProps, MenuButtonState } from './MenuButton.types';
|
3
|
-
export declare const menuButtonShorthandProps: string[];
|
2
|
+
import type { MenuButtonProps, MenuButtonState } from './MenuButton.types';
|
4
3
|
/**
|
5
|
-
*
|
4
|
+
* Given user props, returns the final state for a MenuButton.
|
6
5
|
*/
|
7
|
-
export declare const useMenuButton: (props: MenuButtonProps, ref: React.Ref<
|
8
|
-
state: MenuButtonState;
|
9
|
-
render: (state: MenuButtonState) => JSX.Element;
|
10
|
-
};
|
6
|
+
export declare const useMenuButton: ({ menuIcon, ...props }: MenuButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => MenuButtonState;
|