@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,419 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
var tslib_1 = require("tslib");
|
5
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
6
|
-
var react_theme_provider_1 = require("@fluentui/react-theme-provider");
|
7
|
-
var style_utilities_1 = require("@fluentui/style-utilities");
|
8
|
-
var GlobalClassNames = {
|
9
|
-
root: 'ms-Button',
|
10
|
-
icon: 'ms-Button-icon',
|
11
|
-
};
|
12
|
-
exports.ButtonSizeVariants = {
|
13
|
-
size_smallest: {
|
14
|
-
height: 'var(--button-size-smallest)',
|
15
|
-
minHeight: 'var(--button-size-smallest)',
|
16
|
-
},
|
17
|
-
size_smaller: {
|
18
|
-
height: 'var(--button-size-smaller)',
|
19
|
-
minHeight: 'var(--button-size-smaller)',
|
20
|
-
},
|
21
|
-
size_small: {
|
22
|
-
height: 'var(--button-size-small)',
|
23
|
-
minHeight: 'var(--button-size-small)',
|
24
|
-
},
|
25
|
-
size_large: {
|
26
|
-
height: 'var(--button-size-large)',
|
27
|
-
minHeight: 'var(--button-size-large)',
|
28
|
-
},
|
29
|
-
size_larger: {
|
30
|
-
height: 'var(--button-size-larger)',
|
31
|
-
minHeight: 'var(--button-size-larger)',
|
32
|
-
},
|
33
|
-
size_largest: {
|
34
|
-
height: 'var(--button-size-largest)',
|
35
|
-
minHeight: 'var(--button-size-largest)',
|
36
|
-
},
|
37
|
-
};
|
38
|
-
exports.useButtonClasses = react_theme_provider_1.makeVariantClasses({
|
39
|
-
name: 'Button',
|
40
|
-
prefix: '--button',
|
41
|
-
styles: {
|
42
|
-
root: [
|
43
|
-
GlobalClassNames.root,
|
44
|
-
(_a = {
|
45
|
-
cursor: 'pointer',
|
46
|
-
alignItems: 'center',
|
47
|
-
borderStyle: 'solid',
|
48
|
-
display: 'inline-flex',
|
49
|
-
justifyContent: 'center',
|
50
|
-
outline: 'none',
|
51
|
-
position: 'relative',
|
52
|
-
userSelect: 'none',
|
53
|
-
boxSizing: 'border-box',
|
54
|
-
verticalAlign: 'middle',
|
55
|
-
textDecoration: 'none',
|
56
|
-
background: 'var(--button-background)',
|
57
|
-
color: 'var(--button-contentColor)',
|
58
|
-
borderColor: 'var(--button-borderColor)',
|
59
|
-
borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',
|
60
|
-
borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',
|
61
|
-
borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',
|
62
|
-
borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',
|
63
|
-
borderLeftWidth: 'var(--button-borderLeftWidth, var(--button-borderWidth))',
|
64
|
-
borderRightWidth: 'var(--button-borderRightWidth, var(--button-borderWidth))',
|
65
|
-
borderTopWidth: 'var(--button-borderTopWidth, var(--button-borderWidth))',
|
66
|
-
borderBottomWidth: 'var(--button-borderBottomWidth, var(--button-borderWidth))',
|
67
|
-
boxShadow: 'var(--button-boxShadow)',
|
68
|
-
width: 'var(--button-width)',
|
69
|
-
maxWidth: 'var(--button-maxWidth)',
|
70
|
-
minWidth: 'var(--button-minWidth)',
|
71
|
-
height: 'var(--button-height)',
|
72
|
-
minHeight: 'var(--button-minHeight)',
|
73
|
-
paddingLeft: 'var(--button-paddingLeft)',
|
74
|
-
paddingRight: 'var(--button-paddingRight)',
|
75
|
-
paddingTop: 'var(--button-paddingTop)',
|
76
|
-
paddingBottom: 'var(--button-paddingBottom)',
|
77
|
-
transition: 'var(--button-transition)',
|
78
|
-
whiteSpace: 'var(--button-whiteSpace)',
|
79
|
-
fontFamily: 'var(--button-fontFamily)',
|
80
|
-
fontSize: 'var(--button-fontSize)',
|
81
|
-
fontWeight: 'var(--button-fontWeight)',
|
82
|
-
WebkitFontSmoothing: 'antialiased',
|
83
|
-
MozOsxFontSmoothing: 'grayscale',
|
84
|
-
':global(.ms-Fabric--isFocusVisible) &:focus::after': (_b = {
|
85
|
-
content: '""',
|
86
|
-
position: 'absolute',
|
87
|
-
left: -1,
|
88
|
-
right: -1,
|
89
|
-
top: -1,
|
90
|
-
bottom: -1,
|
91
|
-
borderWidth: 'var(--button-focusWidth, 2px)',
|
92
|
-
borderStyle: 'solid',
|
93
|
-
borderColor: 'var(--button-focusColor, black)',
|
94
|
-
borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',
|
95
|
-
borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',
|
96
|
-
borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',
|
97
|
-
borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',
|
98
|
-
boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-focusInnerColor, white) inset',
|
99
|
-
zIndex: 1
|
100
|
-
},
|
101
|
-
_b[style_utilities_1.EdgeChromiumHighContrastSelector] = {
|
102
|
-
borderColor: 'var(--button-highContrast-focusColor)',
|
103
|
-
boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-highContrast-focusInnerColor) inset',
|
104
|
-
},
|
105
|
-
_b)
|
106
|
-
},
|
107
|
-
_a['& > *:not(:first-child)'] = {
|
108
|
-
marginLeft: 'var(--button-contentGap)',
|
109
|
-
},
|
110
|
-
_a[style_utilities_1.EdgeChromiumHighContrastSelector] = (_c = {
|
111
|
-
forcedColorAdjust: 'var(--button-forcedColorAdjust)',
|
112
|
-
background: 'var(--button-highContrast-background)',
|
113
|
-
borderColor: 'var(--button-highContrast-borderColor)',
|
114
|
-
color: 'var(--button-highContrast-contentColor)'
|
115
|
-
},
|
116
|
-
_c["." + GlobalClassNames.icon] = {
|
117
|
-
color: 'var(--button-highContrast-iconColor)',
|
118
|
-
},
|
119
|
-
_c),
|
120
|
-
_a['&:hover'] = (_d = {
|
121
|
-
background: 'var(--button-hovered-background, var(--button-background))',
|
122
|
-
color: 'var(--button-hovered-contentColor, var(--button-contentColor))',
|
123
|
-
borderColor: 'var(--button-hovered-borderColor, var(--button-borderColor))',
|
124
|
-
boxShadow: 'var(--button-hovered-boxShadow, var(--button-boxShadow))'
|
125
|
-
},
|
126
|
-
_d["." + GlobalClassNames.icon] = {
|
127
|
-
color: 'var(--button-hovered-iconColor, var(--button-iconColor))',
|
128
|
-
},
|
129
|
-
_d[style_utilities_1.EdgeChromiumHighContrastSelector] = (_e = {
|
130
|
-
background: 'var(--button-highContrast-hovered-background, var(--button-highContrast-background))',
|
131
|
-
borderColor: 'var(--button-highContrast-hovered-borderColor, var(--button-highContrast-borderColor))',
|
132
|
-
color: 'var(--button-highContrast-hovered-contentColor, var(--button-highContrast-contentColor))'
|
133
|
-
},
|
134
|
-
_e["." + GlobalClassNames.icon] = {
|
135
|
-
color: 'var(--button-highContrast-hovered-iconColor, --button-highContrast-iconColor)',
|
136
|
-
},
|
137
|
-
_e),
|
138
|
-
_d),
|
139
|
-
_a['&:active'] = (_f = {
|
140
|
-
background: 'var(--button-pressed-background, var(--button-hovered-background))',
|
141
|
-
color: 'var(--button-pressed-contentColor, var(--button-hovered-contentColor, var(--button-contentColor)))',
|
142
|
-
borderColor: 'var(--button-pressed-borderColor, var(--button-hovered-borderColor, var(--button-borderColor)))',
|
143
|
-
boxShadow: 'var(--button-pressed-boxShadow, var(--button-hovered-boxShadow, var(--button-boxShadow)))',
|
144
|
-
transform: 'var(--button-pressed-transform)',
|
145
|
-
transition: 'var(--button-pressed-transition)'
|
146
|
-
},
|
147
|
-
_f["." + GlobalClassNames.icon] = {
|
148
|
-
color: 'var(--button-pressed-iconColor, var(--button-iconColor))',
|
149
|
-
},
|
150
|
-
_f[style_utilities_1.EdgeChromiumHighContrastSelector] = (_g = {
|
151
|
-
background: 'var(--button-highContrast-pressed-background, ' +
|
152
|
-
'var(--button-highContrast-hovered-background, ' +
|
153
|
-
'var(--button-highContrast-background)))',
|
154
|
-
borderColor: 'var(--button-highContrast-pressed-borderColor, ' +
|
155
|
-
'var(--button-highContrast-hovered-borderColor, ' +
|
156
|
-
'var(--button-highContrast-borderColor)))',
|
157
|
-
color: 'var(--button-highContrast-pressed-contentColor, ' +
|
158
|
-
'var(--button-highContrast-hovered-contentColor, ' +
|
159
|
-
'var(--button-highContarst-contentColor)))'
|
160
|
-
},
|
161
|
-
_g["." + GlobalClassNames.icon] = {
|
162
|
-
color: 'var(--button-highContrast-pressed-iconColor, ' +
|
163
|
-
'var(--button-highContrast-hovered-iconColor, ' +
|
164
|
-
'var(--button-highContrast-iconColor)))',
|
165
|
-
},
|
166
|
-
_g),
|
167
|
-
_f),
|
168
|
-
_a['&[aria-disabled=true]'] = (_h = {
|
169
|
-
pointerEvents: 'none',
|
170
|
-
opacity: 'var(--button-disabled-opacity)',
|
171
|
-
backgroundColor: 'var(--button-disabled-background)',
|
172
|
-
color: 'var(--button-disabled-contentColor)',
|
173
|
-
borderColor: 'var(--button-disabled-borderColor)',
|
174
|
-
boxShadow: 'var(--button-disabled-boxShadow)'
|
175
|
-
},
|
176
|
-
_h["." + GlobalClassNames.icon] = {
|
177
|
-
color: 'var(--button-disabled-iconColor)',
|
178
|
-
},
|
179
|
-
_h[style_utilities_1.EdgeChromiumHighContrastSelector] = (_j = {
|
180
|
-
background: 'var(--button-highContrast-disabled-background, var(--button-highContrast-background))',
|
181
|
-
borderColor: 'var(--button-highContrast-disabled-borderColor, var(--button-highContrast-borderColor))',
|
182
|
-
color: 'var(--button-highContrast-disabled-contentColor, var(--button-highContrast-contentColor))'
|
183
|
-
},
|
184
|
-
_j["." + GlobalClassNames.icon] = {
|
185
|
-
color: 'var(--button-highContrast-disabled-iconColor, --button-highContrast-iconColor)',
|
186
|
-
},
|
187
|
-
_j),
|
188
|
-
_h),
|
189
|
-
_a),
|
190
|
-
],
|
191
|
-
icon: [
|
192
|
-
GlobalClassNames.icon,
|
193
|
-
{
|
194
|
-
color: 'var(--button-iconColor)',
|
195
|
-
display: 'flex',
|
196
|
-
flexShrink: 0,
|
197
|
-
alignItems: 'center',
|
198
|
-
justifyContent: 'center',
|
199
|
-
width: 'var(--button-iconSize)',
|
200
|
-
height: 'var(--button-iconSize)',
|
201
|
-
fontSize: 'var(--button-iconSize, inherit)',
|
202
|
-
fontWeight: 'normal',
|
203
|
-
lineHeight: '1',
|
204
|
-
},
|
205
|
-
],
|
206
|
-
content: {
|
207
|
-
lineHeight: '1',
|
208
|
-
},
|
209
|
-
},
|
210
|
-
variants: function (theme) {
|
211
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
212
|
-
var fonts = theme.fonts, effects = theme.effects, palette = theme.palette, semanticColors = theme.semanticColors;
|
213
|
-
return tslib_1.__assign({ root: {
|
214
|
-
size: {
|
215
|
-
smallest: '24px',
|
216
|
-
smaller: '24px',
|
217
|
-
small: '24px',
|
218
|
-
regular: '32px',
|
219
|
-
large: '40px',
|
220
|
-
larger: '48px',
|
221
|
-
largest: '64px',
|
222
|
-
},
|
223
|
-
// Sizing tokens
|
224
|
-
iconSize: (_b = (_a = fonts) === null || _a === void 0 ? void 0 : _a.mediumPlus) === null || _b === void 0 ? void 0 : _b.fontSize,
|
225
|
-
borderWidth: '1px',
|
226
|
-
boxShadow: 'none',
|
227
|
-
borderRadius: (_c = effects) === null || _c === void 0 ? void 0 : _c.roundedCorner2,
|
228
|
-
paddingLeft: '20px',
|
229
|
-
paddingRight: '20px',
|
230
|
-
paddingTop: '0',
|
231
|
-
paddingBottom: '0',
|
232
|
-
margin: '0',
|
233
|
-
width: 'auto',
|
234
|
-
minWidth: '96px',
|
235
|
-
maxWidth: '280px',
|
236
|
-
minHeight: 'var(--button-size-regular)',
|
237
|
-
contentGap: '8px',
|
238
|
-
// Font tokens
|
239
|
-
fontWeight: '600',
|
240
|
-
fontSize: (_e = (_d = fonts) === null || _d === void 0 ? void 0 : _d.medium) === null || _e === void 0 ? void 0 : _e.fontSize,
|
241
|
-
fontFamily: (_g = (_f = fonts) === null || _f === void 0 ? void 0 : _f.medium) === null || _g === void 0 ? void 0 : _g.fontFamily,
|
242
|
-
// Color tokens
|
243
|
-
focusColor: (_h = palette) === null || _h === void 0 ? void 0 : _h.black,
|
244
|
-
focusInnerColor: (_j = palette) === null || _j === void 0 ? void 0 : _j.white,
|
245
|
-
background: (_k = semanticColors) === null || _k === void 0 ? void 0 : _k.buttonBackground,
|
246
|
-
borderColor: (_l = semanticColors) === null || _l === void 0 ? void 0 : _l.buttonBorder,
|
247
|
-
contentColor: (_m = semanticColors) === null || _m === void 0 ? void 0 : _m.buttonText,
|
248
|
-
iconColor: 'inherit',
|
249
|
-
hovered: {
|
250
|
-
background: (_o = semanticColors) === null || _o === void 0 ? void 0 : _o.buttonBackgroundHovered,
|
251
|
-
contentColor: (_p = semanticColors) === null || _p === void 0 ? void 0 : _p.buttonTextHovered,
|
252
|
-
},
|
253
|
-
pressed: {
|
254
|
-
background: (_q = semanticColors) === null || _q === void 0 ? void 0 : _q.buttonBackgroundPressed,
|
255
|
-
contentColor: (_r = semanticColors) === null || _r === void 0 ? void 0 : _r.buttonTextPressed,
|
256
|
-
},
|
257
|
-
disabled: {
|
258
|
-
background: (_s = semanticColors) === null || _s === void 0 ? void 0 : _s.buttonBackgroundDisabled,
|
259
|
-
borderColor: (_t = semanticColors) === null || _t === void 0 ? void 0 : _t.buttonBorderDisabled,
|
260
|
-
contentColor: (_u = semanticColors) === null || _u === void 0 ? void 0 : _u.buttonTextDisabled,
|
261
|
-
},
|
262
|
-
highContrast: {
|
263
|
-
borderColor: 'WindowText',
|
264
|
-
contentColor: 'WindowText',
|
265
|
-
iconColor: 'WindowText',
|
266
|
-
hovered: {
|
267
|
-
borderColor: 'Highlight',
|
268
|
-
contentColor: 'Highlight',
|
269
|
-
iconColor: 'Highlight',
|
270
|
-
},
|
271
|
-
pressed: {
|
272
|
-
borderColor: 'Highlight',
|
273
|
-
contentColor: 'WindowText',
|
274
|
-
iconColor: 'WindowText',
|
275
|
-
},
|
276
|
-
disabled: {
|
277
|
-
background: 'Window',
|
278
|
-
borderColor: 'GrayText',
|
279
|
-
contentColor: 'GrayText',
|
280
|
-
iconColor: 'GrayText',
|
281
|
-
},
|
282
|
-
},
|
283
|
-
}, circular: {
|
284
|
-
borderRadius: '50000px',
|
285
|
-
}, block: {
|
286
|
-
width: '100%',
|
287
|
-
maxWidth: 'none',
|
288
|
-
}, iconOnly: {
|
289
|
-
minWidth: 'var(--button-height)',
|
290
|
-
width: 'var(--button-height, var(--button-minHeight))',
|
291
|
-
paddingTop: '0',
|
292
|
-
paddingBottom: '0',
|
293
|
-
paddingLeft: '0',
|
294
|
-
paddingRight: '0',
|
295
|
-
}, primary: {
|
296
|
-
background: 'var(--color-brand-background)',
|
297
|
-
borderColor: 'var(--color-brand-borderColor)',
|
298
|
-
contentColor: 'var(--color-brand-contentColor)',
|
299
|
-
iconColor: 'inherit',
|
300
|
-
forcedColorAdjust: 'none',
|
301
|
-
hovered: {
|
302
|
-
background: 'var(--color-brand-hovered-background)',
|
303
|
-
borderColor: 'var(--color-brand-hovered-borderColor)',
|
304
|
-
contentColor: 'var(--color-brand-hovered-contentColor)',
|
305
|
-
},
|
306
|
-
pressed: {
|
307
|
-
background: 'var(--color-brand-pressed-background)',
|
308
|
-
borderColor: 'var(--color-brand-pressed-borderColor)',
|
309
|
-
contentColor: 'var(--color-brand-pressed-contentColor)',
|
310
|
-
},
|
311
|
-
highContrast: {
|
312
|
-
background: 'WindowText',
|
313
|
-
borderColor: 'WindowText',
|
314
|
-
contentColor: 'Window',
|
315
|
-
focusColor: 'WindowText',
|
316
|
-
focusInnerColor: 'Window',
|
317
|
-
iconColor: 'Window',
|
318
|
-
hovered: {
|
319
|
-
background: 'Highlight',
|
320
|
-
borderColor: 'Highlight',
|
321
|
-
contentColor: 'Window',
|
322
|
-
iconColor: 'Window',
|
323
|
-
},
|
324
|
-
pressed: {
|
325
|
-
background: 'WindowText',
|
326
|
-
borderColor: 'WindowText',
|
327
|
-
contentColor: 'Window',
|
328
|
-
iconColor: 'Window',
|
329
|
-
},
|
330
|
-
disabled: {
|
331
|
-
background: 'Window',
|
332
|
-
borderColor: 'GrayText',
|
333
|
-
contentColor: 'GrayText',
|
334
|
-
iconColor: 'GrayText',
|
335
|
-
},
|
336
|
-
},
|
337
|
-
},
|
338
|
-
// TODO: no references to palette.
|
339
|
-
ghost: {
|
340
|
-
background: 'transparent',
|
341
|
-
borderColor: 'transparent',
|
342
|
-
contentColor: (_v = palette) === null || _v === void 0 ? void 0 : _v.neutralPrimary,
|
343
|
-
fontWeight: 'normal',
|
344
|
-
iconColor: (_w = palette) === null || _w === void 0 ? void 0 : _w.themeDarkAlt,
|
345
|
-
forcedColorAdjust: 'none',
|
346
|
-
disabled: {
|
347
|
-
background: (_x = semanticColors) === null || _x === void 0 ? void 0 : _x.disabledBackground,
|
348
|
-
contentColor: (_y = palette) === null || _y === void 0 ? void 0 : _y.neutralTertiary,
|
349
|
-
iconColor: 'inherit',
|
350
|
-
},
|
351
|
-
expanded: {
|
352
|
-
contentColor: (_z = palette) === null || _z === void 0 ? void 0 : _z.themePrimary,
|
353
|
-
},
|
354
|
-
focused: {
|
355
|
-
contentColor: (_0 = palette) === null || _0 === void 0 ? void 0 : _0.neutralPrimary,
|
356
|
-
iconColor: (_1 = palette) === null || _1 === void 0 ? void 0 : _1.themeDarkAlt,
|
357
|
-
},
|
358
|
-
hovered: {
|
359
|
-
background: (_2 = palette) === null || _2 === void 0 ? void 0 : _2.neutralLighter,
|
360
|
-
contentColor: (_3 = palette) === null || _3 === void 0 ? void 0 : _3.themePrimary,
|
361
|
-
iconColor: (_4 = palette) === null || _4 === void 0 ? void 0 : _4.themePrimary,
|
362
|
-
},
|
363
|
-
pressed: {
|
364
|
-
background: (_5 = palette) === null || _5 === void 0 ? void 0 : _5.neutralLight,
|
365
|
-
contentColor: (_6 = palette) === null || _6 === void 0 ? void 0 : _6.black,
|
366
|
-
iconColor: (_7 = palette) === null || _7 === void 0 ? void 0 : _7.themeDarker,
|
367
|
-
},
|
368
|
-
highContrast: {
|
369
|
-
background: 'Window',
|
370
|
-
borderColor: 'transparent',
|
371
|
-
contentColor: 'WindowText',
|
372
|
-
iconColor: 'WindowText',
|
373
|
-
hovered: {
|
374
|
-
background: 'Window',
|
375
|
-
borderColor: 'transparent',
|
376
|
-
contentColor: 'Highlight',
|
377
|
-
iconColor: 'Highlight',
|
378
|
-
},
|
379
|
-
pressed: {
|
380
|
-
background: 'Window',
|
381
|
-
borderColor: 'transparent',
|
382
|
-
contentColor: 'Highlight',
|
383
|
-
iconColor: 'Highlight',
|
384
|
-
},
|
385
|
-
disabled: {
|
386
|
-
background: 'Window',
|
387
|
-
borderColor: 'transparent',
|
388
|
-
contentColor: 'GrayText',
|
389
|
-
iconColor: 'GrayText',
|
390
|
-
},
|
391
|
-
},
|
392
|
-
},
|
393
|
-
// TODO: no references to palette.
|
394
|
-
transparent: {
|
395
|
-
background: 'transparent',
|
396
|
-
borderColor: 'transparent',
|
397
|
-
contentColor: (_8 = palette) === null || _8 === void 0 ? void 0 : _8.neutralPrimary,
|
398
|
-
fontWeight: 'normal',
|
399
|
-
iconColor: (_9 = palette) === null || _9 === void 0 ? void 0 : _9.themeDarkAlt,
|
400
|
-
disabled: {
|
401
|
-
background: 'transparent',
|
402
|
-
borderColor: 'transparent',
|
403
|
-
contentColor: palette.neutralTertiary,
|
404
|
-
iconColor: 'inherit',
|
405
|
-
},
|
406
|
-
hovered: {
|
407
|
-
background: 'transparent',
|
408
|
-
contentColor: (_10 = palette) === null || _10 === void 0 ? void 0 : _10.themePrimary,
|
409
|
-
iconColor: (_11 = palette) === null || _11 === void 0 ? void 0 : _11.themePrimary,
|
410
|
-
},
|
411
|
-
pressed: {
|
412
|
-
background: 'transparent',
|
413
|
-
contentColor: (_12 = palette) === null || _12 === void 0 ? void 0 : _12.black,
|
414
|
-
iconColor: (_13 = palette) === null || _13 === void 0 ? void 0 : _13.themeDarker,
|
415
|
-
},
|
416
|
-
} }, exports.ButtonSizeVariants);
|
417
|
-
},
|
418
|
-
});
|
419
|
-
//# sourceMappingURL=useButtonClasses.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useButtonClasses.js","sourceRoot":"../src/","sources":["components/Button/useButtonClasses.ts"],"names":[],"mappings":";;;;AAAA,yDAAyD;AACzD,uEAA2E;AAC3E,6DAA6E;AAG7E,IAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAEW,QAAA,kBAAkB,GAAG;IAChC,aAAa,EAAE;QACb,MAAM,EAAE,6BAA6B;QACrC,SAAS,EAAE,6BAA6B;KACzC;IAED,YAAY,EAAE;QACZ,MAAM,EAAE,4BAA4B;QACpC,SAAS,EAAE,4BAA4B;KACxC;IAED,UAAU,EAAE;QACV,MAAM,EAAE,0BAA0B;QAClC,SAAS,EAAE,0BAA0B;KACtC;IAED,UAAU,EAAE;QACV,MAAM,EAAE,0BAA0B;QAClC,SAAS,EAAE,0BAA0B;KACtC;IAED,WAAW,EAAE;QACX,MAAM,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AAY,QAAE,OAAO,0CAAE,cAAc;gBACrC,UAAU,EAAE,QAAQ;gBACpB,SAAS,QAAE,OAAO,0CAAE,YAAY;gBAEhC,QAAQ,EAAE;oBACR,UAAU,EAAE,aAAa;oBACzB,WAAW,EAAE,aAAa;oBAC1B,YAAY,EAAE,OAAO,CAAC,eAAe;oBACrC,SAAS,EAAE,SAAS;iBACrB;gBAED,OAAO,EAAE;oBACP,UAAU,EAAE,aAAa;oBACzB,YAAY,SAAE,OAAO,4CAAE,YAAY;oBACnC,SAAS,SAAE,OAAO,4CAAE,YAAY;iBACjC;gBAED,OAAO,EAAE;oBACP,UAAU,EAAE,aAAa;oBACzB,YAAY,SAAE,OAAO,4CAAE,KAAK;oBAC5B,SAAS,SAAE,OAAO,4CAAE,WAAW;iBAChC;aACF,IAEE,0BAAkB,EACrB;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { makeVariantClasses, Theme } from '@fluentui/react-theme-provider';\nimport { EdgeChromiumHighContrastSelector } from '@fluentui/style-utilities';\nimport { ButtonState, ButtonVariants } from './Button.types';\n\nconst GlobalClassNames = {\n root: 'ms-Button',\n icon: 'ms-Button-icon',\n};\n\nexport const ButtonSizeVariants = {\n size_smallest: {\n height: 'var(--button-size-smallest)',\n minHeight: 'var(--button-size-smallest)',\n },\n\n size_smaller: {\n height: 'var(--button-size-smaller)',\n minHeight: 'var(--button-size-smaller)',\n },\n\n size_small: {\n height: 'var(--button-size-small)',\n minHeight: 'var(--button-size-small)',\n },\n\n size_large: {\n height: 'var(--button-size-large)',\n minHeight: 'var(--button-size-large)',\n },\n\n size_larger: {\n height: 'var(--button-size-larger)',\n minHeight: 'var(--button-size-larger)',\n },\n\n size_largest: {\n height: 'var(--button-size-largest)',\n minHeight: 'var(--button-size-largest)',\n },\n};\n\nexport const useButtonClasses = makeVariantClasses<ButtonState, ButtonVariants>({\n name: 'Button',\n prefix: '--button',\n\n styles: {\n root: [\n GlobalClassNames.root,\n {\n cursor: 'pointer',\n alignItems: 'center',\n borderStyle: 'solid',\n display: 'inline-flex',\n justifyContent: 'center',\n outline: 'none',\n position: 'relative',\n userSelect: 'none',\n boxSizing: 'border-box',\n verticalAlign: 'middle',\n textDecoration: 'none',\n background: 'var(--button-background)',\n color: 'var(--button-contentColor)',\n\n borderColor: 'var(--button-borderColor)',\n borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',\n borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',\n borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',\n borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',\n borderLeftWidth: 'var(--button-borderLeftWidth, var(--button-borderWidth))',\n borderRightWidth: 'var(--button-borderRightWidth, var(--button-borderWidth))',\n borderTopWidth: 'var(--button-borderTopWidth, var(--button-borderWidth))',\n borderBottomWidth: 'var(--button-borderBottomWidth, var(--button-borderWidth))',\n boxShadow: 'var(--button-boxShadow)',\n\n width: 'var(--button-width)',\n maxWidth: 'var(--button-maxWidth)',\n minWidth: 'var(--button-minWidth)',\n height: 'var(--button-height)',\n minHeight: 'var(--button-minHeight)',\n\n paddingLeft: 'var(--button-paddingLeft)',\n paddingRight: 'var(--button-paddingRight)',\n paddingTop: 'var(--button-paddingTop)',\n paddingBottom: 'var(--button-paddingBottom)',\n\n transition: 'var(--button-transition)',\n whiteSpace: 'var(--button-whiteSpace)',\n\n fontFamily: 'var(--button-fontFamily)',\n fontSize: 'var(--button-fontSize)',\n fontWeight: 'var(--button-fontWeight)',\n WebkitFontSmoothing: 'antialiased',\n MozOsxFontSmoothing: 'grayscale',\n\n ':global(.ms-Fabric--isFocusVisible) &:focus::after': {\n content: '\"\"',\n position: 'absolute',\n left: -1,\n right: -1,\n top: -1,\n bottom: -1,\n borderWidth: 'var(--button-focusWidth, 2px)',\n borderStyle: 'solid',\n borderColor: 'var(--button-focusColor, black)',\n borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',\n borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',\n borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',\n borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',\n boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-focusInnerColor, white) inset',\n zIndex: 1,\n\n [EdgeChromiumHighContrastSelector]: {\n borderColor: 'var(--button-highContrast-focusColor)',\n boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-highContrast-focusInnerColor) inset',\n },\n },\n\n ['& > *:not(:first-child)']: {\n marginLeft: 'var(--button-contentGap)',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n forcedColorAdjust: 'var(--button-forcedColorAdjust)',\n\n background: 'var(--button-highContrast-background)',\n borderColor: 'var(--button-highContrast-borderColor)',\n color: 'var(--button-highContrast-contentColor)',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-highContrast-iconColor)',\n },\n },\n\n '&:hover': {\n background: 'var(--button-hovered-background, var(--button-background))',\n color: 'var(--button-hovered-contentColor, var(--button-contentColor))',\n borderColor: 'var(--button-hovered-borderColor, var(--button-borderColor))',\n boxShadow: 'var(--button-hovered-boxShadow, var(--button-boxShadow))',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-hovered-iconColor, var(--button-iconColor))',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background: 'var(--button-highContrast-hovered-background, var(--button-highContrast-background))',\n borderColor: 'var(--button-highContrast-hovered-borderColor, var(--button-highContrast-borderColor))',\n color: 'var(--button-highContrast-hovered-contentColor, var(--button-highContrast-contentColor))',\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-highContrast-hovered-iconColor, --button-highContrast-iconColor)',\n },\n },\n },\n\n '&:active': {\n background: 'var(--button-pressed-background, var(--button-hovered-background))',\n color: 'var(--button-pressed-contentColor, var(--button-hovered-contentColor, var(--button-contentColor)))',\n borderColor:\n 'var(--button-pressed-borderColor, var(--button-hovered-borderColor, var(--button-borderColor)))',\n boxShadow: 'var(--button-pressed-boxShadow, var(--button-hovered-boxShadow, var(--button-boxShadow)))',\n\n transform: 'var(--button-pressed-transform)',\n transition: 'var(--button-pressed-transition)',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-pressed-iconColor, var(--button-iconColor))',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background:\n 'var(--button-highContrast-pressed-background, ' +\n 'var(--button-highContrast-hovered-background, ' +\n 'var(--button-highContrast-background)))',\n borderColor:\n 'var(--button-highContrast-pressed-borderColor, ' +\n 'var(--button-highContrast-hovered-borderColor, ' +\n 'var(--button-highContrast-borderColor)))',\n color:\n 'var(--button-highContrast-pressed-contentColor, ' +\n 'var(--button-highContrast-hovered-contentColor, ' +\n 'var(--button-highContarst-contentColor)))',\n [`.${GlobalClassNames.icon}`]: {\n color:\n 'var(--button-highContrast-pressed-iconColor, ' +\n 'var(--button-highContrast-hovered-iconColor, ' +\n 'var(--button-highContrast-iconColor)))',\n },\n },\n },\n\n '&[aria-disabled=true]': {\n pointerEvents: 'none',\n opacity: 'var(--button-disabled-opacity)',\n backgroundColor: 'var(--button-disabled-background)',\n color: 'var(--button-disabled-contentColor)',\n borderColor: 'var(--button-disabled-borderColor)',\n boxShadow: 'var(--button-disabled-boxShadow)',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-disabled-iconColor)',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background: 'var(--button-highContrast-disabled-background, var(--button-highContrast-background))',\n borderColor: 'var(--button-highContrast-disabled-borderColor, var(--button-highContrast-borderColor))',\n color: 'var(--button-highContrast-disabled-contentColor, var(--button-highContrast-contentColor))',\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-highContrast-disabled-iconColor, --button-highContrast-iconColor)',\n },\n },\n },\n },\n ],\n\n icon: [\n GlobalClassNames.icon,\n {\n color: 'var(--button-iconColor)',\n display: 'flex',\n flexShrink: 0,\n alignItems: 'center',\n justifyContent: 'center',\n width: 'var(--button-iconSize)',\n height: 'var(--button-iconSize)',\n fontSize: 'var(--button-iconSize, inherit)',\n fontWeight: 'normal',\n lineHeight: '1',\n },\n ],\n\n content: {\n lineHeight: '1',\n },\n },\n\n variants: (theme: Theme): ButtonVariants => {\n const { fonts, effects, palette, semanticColors } = theme;\n\n return {\n root: {\n size: {\n smallest: '24px',\n smaller: '24px',\n small: '24px',\n regular: '32px',\n large: '40px',\n larger: '48px',\n largest: '64px',\n },\n\n // Sizing tokens\n iconSize: fonts?.mediumPlus?.fontSize as string,\n borderWidth: '1px',\n boxShadow: 'none',\n borderRadius: effects?.roundedCorner2,\n paddingLeft: '20px',\n paddingRight: '20px',\n paddingTop: '0',\n paddingBottom: '0',\n margin: '0',\n width: 'auto',\n minWidth: '96px',\n maxWidth: '280px',\n minHeight: 'var(--button-size-regular)',\n contentGap: '8px',\n\n // Font tokens\n fontWeight: '600',\n fontSize: fonts?.medium?.fontSize as string,\n fontFamily: fonts?.medium?.fontFamily,\n\n // Color tokens\n focusColor: palette?.black,\n focusInnerColor: palette?.white,\n background: semanticColors?.buttonBackground,\n borderColor: semanticColors?.buttonBorder,\n contentColor: semanticColors?.buttonText,\n iconColor: 'inherit',\n\n hovered: {\n background: semanticColors?.buttonBackgroundHovered,\n contentColor: semanticColors?.buttonTextHovered,\n },\n\n pressed: {\n background: semanticColors?.buttonBackgroundPressed,\n contentColor: semanticColors?.buttonTextPressed,\n },\n\n disabled: {\n background: semanticColors?.buttonBackgroundDisabled,\n borderColor: semanticColors?.buttonBorderDisabled,\n contentColor: semanticColors?.buttonTextDisabled,\n },\n\n highContrast: {\n borderColor: 'WindowText',\n contentColor: 'WindowText',\n iconColor: 'WindowText',\n\n hovered: {\n borderColor: 'Highlight',\n contentColor: 'Highlight',\n iconColor: 'Highlight',\n },\n\n pressed: {\n borderColor: 'Highlight',\n contentColor: 'WindowText',\n iconColor: 'WindowText',\n },\n\n disabled: {\n background: 'Window',\n borderColor: 'GrayText',\n contentColor: 'GrayText',\n iconColor: 'GrayText',\n },\n },\n },\n\n circular: {\n borderRadius: '50000px',\n },\n\n block: {\n width: '100%',\n maxWidth: 'none',\n },\n\n iconOnly: {\n minWidth: 'var(--button-height)',\n width: 'var(--button-height, var(--button-minHeight))',\n paddingTop: '0',\n paddingBottom: '0',\n paddingLeft: '0',\n paddingRight: '0',\n },\n\n primary: {\n background: 'var(--color-brand-background)',\n borderColor: 'var(--color-brand-borderColor)',\n contentColor: 'var(--color-brand-contentColor)',\n iconColor: 'inherit',\n forcedColorAdjust: 'none',\n\n hovered: {\n background: 'var(--color-brand-hovered-background)',\n borderColor: 'var(--color-brand-hovered-borderColor)',\n contentColor: 'var(--color-brand-hovered-contentColor)',\n },\n\n pressed: {\n background: 'var(--color-brand-pressed-background)',\n borderColor: 'var(--color-brand-pressed-borderColor)',\n contentColor: 'var(--color-brand-pressed-contentColor)',\n },\n\n highContrast: {\n background: 'WindowText',\n borderColor: 'WindowText',\n contentColor: 'Window',\n focusColor: 'WindowText',\n focusInnerColor: 'Window',\n iconColor: 'Window',\n\n hovered: {\n background: 'Highlight',\n borderColor: 'Highlight',\n contentColor: 'Window',\n iconColor: 'Window',\n },\n\n pressed: {\n background: 'WindowText',\n borderColor: 'WindowText',\n contentColor: 'Window',\n iconColor: 'Window',\n },\n\n disabled: {\n background: 'Window',\n borderColor: 'GrayText',\n contentColor: 'GrayText',\n iconColor: 'GrayText',\n },\n },\n },\n\n // TODO: no references to palette.\n ghost: {\n background: 'transparent',\n borderColor: 'transparent',\n contentColor: palette?.neutralPrimary,\n fontWeight: 'normal',\n iconColor: palette?.themeDarkAlt,\n forcedColorAdjust: 'none',\n\n disabled: {\n background: semanticColors?.disabledBackground,\n contentColor: palette?.neutralTertiary,\n iconColor: 'inherit',\n },\n\n expanded: {\n contentColor: palette?.themePrimary,\n },\n\n focused: {\n contentColor: palette?.neutralPrimary,\n iconColor: palette?.themeDarkAlt,\n },\n\n hovered: {\n background: palette?.neutralLighter,\n contentColor: palette?.themePrimary,\n iconColor: palette?.themePrimary,\n },\n\n pressed: {\n background: palette?.neutralLight,\n contentColor: palette?.black,\n iconColor: palette?.themeDarker,\n },\n\n highContrast: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'WindowText',\n iconColor: 'WindowText',\n\n hovered: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'Highlight',\n iconColor: 'Highlight',\n },\n\n pressed: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'Highlight',\n iconColor: 'Highlight',\n },\n\n disabled: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'GrayText',\n iconColor: 'GrayText',\n },\n },\n },\n\n // TODO: no references to palette.\n transparent: {\n background: 'transparent',\n borderColor: 'transparent',\n contentColor: palette?.neutralPrimary,\n fontWeight: 'normal',\n iconColor: palette?.themeDarkAlt,\n\n disabled: {\n background: 'transparent',\n borderColor: 'transparent',\n contentColor: palette.neutralTertiary,\n iconColor: 'inherit',\n },\n\n hovered: {\n background: 'transparent',\n contentColor: palette?.themePrimary,\n iconColor: palette?.themePrimary,\n },\n\n pressed: {\n background: 'transparent',\n contentColor: palette?.black,\n iconColor: palette?.themeDarker,\n },\n },\n\n ...ButtonSizeVariants,\n };\n },\n});\n"]}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
/**
|
4
|
-
* The useButton hook processes the Button draft state.
|
5
|
-
* @param draftState - Button draft state to mutate.
|
6
|
-
*/
|
7
|
-
exports.useButtonState = function (draftState) {
|
8
|
-
// Update the button's tab-index, keyboard handling, and aria attributes.
|
9
|
-
if (draftState.as !== 'button') {
|
10
|
-
draftState.role = 'button';
|
11
|
-
if (draftState.as !== 'a') {
|
12
|
-
var onKeyDown_1 = draftState.onKeyDown, onClick_1 = draftState.onClick;
|
13
|
-
draftState['data-isFocusable'] = true;
|
14
|
-
draftState.tabIndex = 0;
|
15
|
-
draftState.onKeyDown = function (ev) {
|
16
|
-
if (onKeyDown_1) {
|
17
|
-
onKeyDown_1(ev);
|
18
|
-
}
|
19
|
-
if (!ev.defaultPrevented && onClick_1 && (ev.which === 20 || ev.which === 13)) {
|
20
|
-
// Translate the keydown enter/space to a click.
|
21
|
-
ev.preventDefault();
|
22
|
-
ev.stopPropagation();
|
23
|
-
ev.target.click();
|
24
|
-
}
|
25
|
-
};
|
26
|
-
}
|
27
|
-
}
|
28
|
-
draftState.disabled = draftState['aria-disabled'] = draftState.disabled || draftState.loading;
|
29
|
-
};
|
30
|
-
//# sourceMappingURL=useButtonState.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useButtonState.js","sourceRoot":"../src/","sources":["components/Button/useButtonState.ts"],"names":[],"mappings":";;AAGA;;;GAGG;AACU,QAAA,cAAc,GAAG,UAAC,UAAuB;IACpD,yEAAyE;IACzE,IAAI,UAAU,CAAC,EAAE,KAAK,QAAQ,EAAE;QAC9B,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC;QAE3B,IAAI,UAAU,CAAC,EAAE,KAAK,GAAG,EAAE;YACjB,IAAA,kCAAS,EAAE,8BAAO,CAAgB;YAE1C,UAAU,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;YACtC,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC;YAExB,UAAU,CAAC,SAAS,GAAG,UAAC,EAAoC;gBAC1D,IAAI,WAAS,EAAE;oBACb,WAAS,CAAC,EAAE,CAAC,CAAC;iBACf;gBAED,IAAI,CAAC,EAAE,CAAC,gBAAgB,IAAI,SAAO,IAAI,CAAC,EAAE,CAAC,KAAK,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,EAAE;oBAC3E,gDAAgD;oBAChD,EAAE,CAAC,cAAc,EAAE,CAAC;oBACpB,EAAE,CAAC,eAAe,EAAE,CAAC;oBAEpB,EAAE,CAAC,MAAsB,CAAC,KAAK,EAAE,CAAC;iBACpC;YACH,CAAC,CAAC;SACH;KACF;IAED,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,OAAO,CAAC;AAChG,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { ButtonState } from './Button.types';\n\n/**\n * The useButton hook processes the Button draft state.\n * @param draftState - Button draft state to mutate.\n */\nexport const useButtonState = (draftState: ButtonState) => {\n // Update the button's tab-index, keyboard handling, and aria attributes.\n if (draftState.as !== 'button') {\n draftState.role = 'button';\n\n if (draftState.as !== 'a') {\n const { onKeyDown, onClick } = draftState;\n\n draftState['data-isFocusable'] = true;\n draftState.tabIndex = 0;\n\n draftState.onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (onKeyDown) {\n onKeyDown(ev);\n }\n\n if (!ev.defaultPrevented && onClick && (ev.which === 20 || ev.which === 13)) {\n // Translate the keydown enter/space to a click.\n ev.preventDefault();\n ev.stopPropagation();\n\n (ev.target as HTMLElement).click();\n }\n };\n }\n }\n\n draftState.disabled = draftState['aria-disabled'] = draftState.disabled || draftState.loading;\n};\n"]}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { Theme } from '@fluentui/react-theme-provider';
|
2
|
-
import { CompoundButtonState } from './CompoundButton.types';
|
3
|
-
export declare const useClasses: (state: CompoundButtonState, theme?: Theme | undefined, renderer?: import("@fluentui/react-theme-provider").StyleRenderer | undefined) => void;
|
4
|
-
export declare const useCompoundButtonClasses: (state: CompoundButtonState) => void;
|