@fluentui/react-button 9.0.0-nightly.46b9ea7036.0 → 9.0.0-rc.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +380 -31
- package/CHANGELOG.md +88 -20
- package/dist/react-button.d.ts +42 -34
- package/lib/components/Button/Button.js +7 -7
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.types.d.ts +6 -6
- package/lib/components/Button/index.d.ts +2 -2
- package/lib/components/Button/index.js +1 -2
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/renderButton.d.ts +1 -1
- package/lib/components/Button/renderButton.js +13 -9
- package/lib/components/Button/renderButton.js.map +1 -1
- package/lib/components/Button/useButton.d.ts +1 -1
- package/lib/components/Button/useButton.js +22 -25
- package/lib/components/Button/useButton.js.map +1 -1
- package/lib/components/Button/useButtonStyles.d.ts +2 -9
- package/lib/components/Button/useButtonStyles.js +118 -90
- package/lib/components/Button/useButtonStyles.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.js +7 -7
- package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.types.d.ts +4 -4
- package/lib/components/CompoundButton/index.d.ts +1 -1
- package/lib/components/CompoundButton/index.js +1 -1
- package/lib/components/CompoundButton/index.js.map +1 -1
- package/lib/components/CompoundButton/renderCompoundButton.d.ts +1 -1
- package/lib/components/CompoundButton/renderCompoundButton.js +15 -9
- package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButton.d.ts +1 -1
- package/lib/components/CompoundButton/useCompoundButton.js +9 -9
- package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.js +52 -48
- package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +7 -7
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.types.d.ts +3 -4
- package/lib/components/MenuButton/index.d.ts +1 -1
- package/lib/components/MenuButton/index.js +1 -1
- package/lib/components/MenuButton/index.js.map +1 -1
- package/lib/components/MenuButton/renderMenuButton.d.ts +1 -1
- package/lib/components/MenuButton/renderMenuButton.js +13 -9
- package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButton.d.ts +1 -1
- package/lib/components/MenuButton/useMenuButton.js +11 -11
- package/lib/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.d.ts +2 -1
- package/lib/components/MenuButton/useMenuButtonStyles.js +8 -6
- package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.js +7 -7
- package/lib/components/SplitButton/SplitButton.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.types.d.ts +6 -4
- package/lib/components/SplitButton/index.d.ts +1 -1
- package/lib/components/SplitButton/index.js +1 -1
- package/lib/components/SplitButton/index.js.map +1 -1
- package/lib/components/SplitButton/renderSplitButton.d.ts +1 -1
- package/lib/components/SplitButton/renderSplitButton.js +9 -7
- package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButton.d.ts +1 -1
- package/lib/components/SplitButton/useSplitButton.js +41 -45
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.d.ts +2 -1
- package/lib/components/SplitButton/useSplitButtonStyles.js +38 -34
- package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.js +7 -7
- package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.types.d.ts +2 -1
- package/lib/components/ToggleButton/index.d.ts +1 -1
- package/lib/components/ToggleButton/index.js +1 -1
- package/lib/components/ToggleButton/index.js.map +1 -1
- package/lib/components/ToggleButton/renderToggleButton.d.ts +1 -1
- package/lib/components/ToggleButton/renderToggleButton.js +1 -1
- package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButton.d.ts +1 -1
- package/lib/components/ToggleButton/useToggleButton.js +32 -30
- package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +2 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.js +47 -43
- package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib-commonjs/Button.js +1 -1
- package/lib-commonjs/CompoundButton.js +1 -1
- package/lib-commonjs/MenuButton.js +1 -1
- package/lib-commonjs/SplitButton.js +1 -1
- package/lib-commonjs/ToggleButton.js +1 -1
- package/lib-commonjs/components/Button/Button.js +8 -8
- package/lib-commonjs/components/Button/Button.js.map +1 -1
- package/lib-commonjs/components/Button/Button.types.d.ts +6 -6
- package/lib-commonjs/components/Button/index.d.ts +2 -2
- package/lib-commonjs/components/Button/index.js +10 -6
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/renderButton.d.ts +1 -1
- package/lib-commonjs/components/Button/renderButton.js +17 -14
- package/lib-commonjs/components/Button/renderButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButton.d.ts +1 -1
- package/lib-commonjs/components/Button/useButton.js +26 -29
- package/lib-commonjs/components/Button/useButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButtonStyles.d.ts +2 -9
- package/lib-commonjs/components/Button/useButtonStyles.js +121 -92
- package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.js +8 -8
- package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +4 -4
- package/lib-commonjs/components/CompoundButton/index.d.ts +1 -1
- package/lib-commonjs/components/CompoundButton/index.js +10 -4
- package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +1 -1
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +19 -14
- package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js +12 -13
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +58 -53
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.js +8 -8
- package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +3 -4
- package/lib-commonjs/components/MenuButton/index.d.ts +1 -1
- package/lib-commonjs/components/MenuButton/index.js +10 -4
- package/lib-commonjs/components/MenuButton/index.js.map +1 -1
- package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +1 -1
- package/lib-commonjs/components/MenuButton/renderMenuButton.js +17 -14
- package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButton.js +15 -16
- package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +2 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +12 -9
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.js +8 -8
- package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +6 -4
- package/lib-commonjs/components/SplitButton/index.d.ts +1 -1
- package/lib-commonjs/components/SplitButton/index.js +10 -4
- package/lib-commonjs/components/SplitButton/index.js.map +1 -1
- package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +1 -1
- package/lib-commonjs/components/SplitButton/renderSplitButton.js +13 -12
- package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.js +46 -51
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +2 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +44 -39
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.js +8 -8
- package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +2 -1
- package/lib-commonjs/components/ToggleButton/index.d.ts +1 -1
- package/lib-commonjs/components/ToggleButton/index.js +10 -4
- package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +1 -1
- package/lib-commonjs/components/ToggleButton/renderToggleButton.js +3 -3
- package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButton.js +36 -35
- package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +2 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +51 -45
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/package.json +12 -15
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -13
- package/lib/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -24
- package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -3,9 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useToggleButtonStyles_unstable = exports.toggleButtonClassName = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
9
9
|
|
10
10
|
tslib_1.__exportStar(require("./ToggleButton"), exports);
|
11
11
|
|
@@ -17,10 +17,16 @@ tslib_1.__exportStar(require("./useToggleButton"), exports);
|
|
17
17
|
|
18
18
|
var useToggleButtonStyles_1 = /*#__PURE__*/require("./useToggleButtonStyles");
|
19
19
|
|
20
|
-
Object.defineProperty(exports, "
|
20
|
+
Object.defineProperty(exports, "toggleButtonClassName", {
|
21
21
|
enumerable: true,
|
22
22
|
get: function () {
|
23
|
-
return useToggleButtonStyles_1.
|
23
|
+
return useToggleButtonStyles_1.toggleButtonClassName;
|
24
|
+
}
|
25
|
+
});
|
26
|
+
Object.defineProperty(exports, "useToggleButtonStyles_unstable", {
|
27
|
+
enumerable: true,
|
28
|
+
get: function () {
|
29
|
+
return useToggleButtonStyles_1.useToggleButtonStyles_unstable;
|
24
30
|
}
|
25
31
|
});
|
26
32
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ToggleButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,uBAAA,CAAA,qBAAA;AAAqB;AAArB,CAAA","sourceRoot":""}
|
1
|
+
{"version":3,"sources":["../../../src/components/ToggleButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,uBAAA,CAAA,qBAAA;AAAqB;AAArB,CAAA;AAAuB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gCAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,uBAAA,CAAA,8BAAA;AAA8B;AAA9B,CAAA","sourceRoot":""}
|
@@ -1 +1 @@
|
|
1
|
-
export {
|
1
|
+
export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';
|
@@ -3,14 +3,14 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderToggleButton_unstable = void 0;
|
7
7
|
|
8
8
|
var renderButton_1 = /*#__PURE__*/require("../Button/renderButton");
|
9
9
|
|
10
|
-
Object.defineProperty(exports, "
|
10
|
+
Object.defineProperty(exports, "renderToggleButton_unstable", {
|
11
11
|
enumerable: true,
|
12
12
|
get: function () {
|
13
|
-
return renderButton_1.
|
13
|
+
return renderButton_1.renderButton_unstable;
|
14
14
|
}
|
15
15
|
});
|
16
16
|
//# sourceMappingURL=renderToggleButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,6BAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,cAAA,CAAA,qBAAA;AAAqB;AAArB,CAAA","sourceRoot":""}
|
@@ -6,4 +6,4 @@ import type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types'
|
|
6
6
|
* @param props - User provided props to the ToggleButton component.
|
7
7
|
* @param ref - User provided ref to be passed to the ToggleButton component.
|
8
8
|
*/
|
9
|
-
export declare const
|
9
|
+
export declare const useToggleButton_unstable: ({ checked, defaultChecked, ...props }: ToggleButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => ToggleButtonState;
|
@@ -3,15 +3,13 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useToggleButton_unstable = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
9
|
|
10
|
-
|
10
|
+
const React = /*#__PURE__*/require("react");
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
var useButton_1 = /*#__PURE__*/require("../Button/useButton");
|
12
|
+
const useButton_1 = /*#__PURE__*/require("../Button/useButton");
|
15
13
|
/**
|
16
14
|
* Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
|
17
15
|
* processed state.
|
@@ -20,44 +18,47 @@ var useButton_1 = /*#__PURE__*/require("../Button/useButton");
|
|
20
18
|
*/
|
21
19
|
|
22
20
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
21
|
+
const useToggleButton_unstable = ({
|
22
|
+
checked,
|
23
|
+
defaultChecked,
|
24
|
+
...props
|
25
|
+
}, ref) => {
|
26
|
+
const {
|
27
|
+
disabled,
|
28
|
+
disabledFocusable
|
29
|
+
} = props;
|
30
|
+
const buttonState = useButton_1.useButton_unstable(props, ref);
|
31
|
+
const {
|
32
|
+
role,
|
33
|
+
onClick
|
34
|
+
} = buttonState.root;
|
35
|
+
const [checkedValue, setCheckedValue] = react_utilities_1.useControllableState({
|
36
36
|
state: checked,
|
37
37
|
defaultState: defaultChecked,
|
38
38
|
initialState: false
|
39
|
-
})
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
var isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';
|
44
|
-
return tslib_1.__assign(tslib_1.__assign({}, buttonState), {
|
39
|
+
});
|
40
|
+
const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';
|
41
|
+
return { // Button state
|
42
|
+
...buttonState,
|
45
43
|
// State calculated from a set of props
|
46
44
|
checked: checkedValue,
|
47
45
|
// Slots definition
|
48
|
-
root:
|
49
|
-
|
50
|
-
|
46
|
+
root: { ...buttonState.root,
|
47
|
+
[isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: !disabled && !disabledFocusable && checkedValue,
|
48
|
+
onClick: React.useCallback(ev => {
|
49
|
+
if (onClick) {
|
50
|
+
onClick(ev);
|
51
51
|
|
52
|
-
|
53
|
-
|
52
|
+
if (ev.defaultPrevented) {
|
53
|
+
return;
|
54
|
+
}
|
54
55
|
}
|
55
|
-
}
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
setCheckedValue(!checkedValue);
|
58
|
+
}, [checkedValue, setCheckedValue, onClick])
|
59
|
+
}
|
60
|
+
};
|
60
61
|
};
|
61
62
|
|
62
|
-
exports.
|
63
|
+
exports.useToggleButton_unstable = useToggleButton_unstable;
|
63
64
|
//# sourceMappingURL=useToggleButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;;;;AAKG;;;AACI,MAAM,wBAAwB,GAAG,CACtC;AAAE,EAAA,OAAF;AAAW,EAAA,cAAX;AAA2B,KAAG;AAA9B,CADsC,EAEtC,GAFsC,KAGjB;AACrB,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAAkC,KAAxC;AACA,QAAM,WAAW,GAAG,WAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,GAA1B,CAApB;AACA,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA;AAAR,MAAoB,WAAW,CAAC,IAAtC;AAEA,QAAM,CAAC,YAAD,EAAe,eAAf,IAAkC,iBAAA,CAAA,oBAAA,CAAqB;AAC3D,IAAA,KAAK,EAAE,OADoD;AAE3D,IAAA,YAAY,EAAE,cAF6C;AAG3D,IAAA,YAAY,EAAE;AAH6C,GAArB,CAAxC;AAMA,QAAM,kBAAkB,GAAG,IAAI,KAAK,kBAAT,IAA+B,IAAI,KAAK,UAAnE;AAEA,SAAO,EACL;AACA,OAAG,WAFE;AAIL;AACA,IAAA,OAAO,EAAE,YALJ;AAOL;AACA,IAAA,IAAI,EAAE,EACJ,GAAG,WAAW,CAAC,IADX;AAEJ,OAAC,kBAAkB,GAAG,cAAH,GAAoB,cAAvC,GAAwD,CAAC,QAAD,IAAa,CAAC,iBAAd,IAAmC,YAFvF;AAGJ,MAAA,OAAO,EAAE,KAAK,CAAC,WAAN,CACP,EAAE,IAAG;AACH,YAAI,OAAJ,EAAa;AACX,UAAA,OAAO,CAAC,EAAD,CAAP;;AAEA,cAAI,EAAE,CAAC,gBAAP,EAAyB;AACvB;AACD;AACF;;AAED,QAAA,eAAe,CAAC,CAAC,YAAF,CAAf;AACD,OAXM,EAYP,CAAC,YAAD,EAAe,eAAf,EAAgC,OAAhC,CAZO;AAHL;AARD,GAAP;AA2BD,CA3CM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourceRoot":""}
|
@@ -1,2 +1,3 @@
|
|
1
1
|
import type { ToggleButtonState } from './ToggleButton.types';
|
2
|
-
export declare const
|
2
|
+
export declare const toggleButtonClassName = "fui-ToggleButton";
|
3
|
+
export declare const useToggleButtonStyles_unstable: (state: ToggleButtonState) => ToggleButtonState;
|
@@ -3,15 +3,19 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useToggleButtonStyles_unstable = exports.toggleButtonClassName = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
|
-
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
11
11
|
|
12
|
-
|
12
|
+
const useButtonStyles_1 = /*#__PURE__*/require("../Button/useButtonStyles");
|
13
|
+
|
14
|
+
exports.toggleButtonClassName = 'fui-ToggleButton';
|
15
|
+
|
16
|
+
const useCheckedStyles = /*#__PURE__*/react_1.__styles({
|
13
17
|
"base": {
|
14
|
-
"
|
18
|
+
"De3pzq": "f1nfm20t",
|
15
19
|
"g2u3we": "fj3muxo",
|
16
20
|
"h3c5rm": ["f1akhkt", "f1lxtadh"],
|
17
21
|
"B9xav0g": "f1aperda",
|
@@ -21,13 +25,13 @@ var useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
21
25
|
"Bekrc4i": ["f5tn483", "f1ojsxk5"],
|
22
26
|
"Bn0qgzm": "f1vxd6vx",
|
23
27
|
"ibv6hh": ["f1ojsxk5", "f5tn483"],
|
24
|
-
"
|
28
|
+
"Jwef8y": "f1knas48",
|
25
29
|
"Bgoe8wy": "fvcxoqz",
|
26
30
|
"Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
|
27
31
|
"oetu4i": "f1xlaoq0",
|
28
32
|
"gg5e9n": ["f1m52nbi", "f1ub3y4t"],
|
29
33
|
"Bi91k9c": "fax3udt",
|
30
|
-
"
|
34
|
+
"ecr2s2": "fb40n2d",
|
31
35
|
"B6oc9vd": "fvs00aa",
|
32
36
|
"ak43y8": ["f1assf6x", "f4ruux4"],
|
33
37
|
"wmxk5l": "fumykes",
|
@@ -35,24 +39,24 @@ var useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
35
39
|
"lj723h": "f1r2dosr"
|
36
40
|
},
|
37
41
|
"outline": {
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
42
|
+
"De3pzq": "f1q9pm1r",
|
43
|
+
"Jwef8y": "fjxutwb",
|
44
|
+
"ecr2s2": "fophhak"
|
41
45
|
},
|
42
46
|
"primary": {
|
43
|
-
"
|
47
|
+
"De3pzq": "f8w4g0q",
|
44
48
|
"g2u3we": "f1p3nwhy",
|
45
49
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
46
50
|
"B9xav0g": "f1q5o8ev",
|
47
51
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
48
52
|
"sj55zd": "f1phragk",
|
49
|
-
"
|
53
|
+
"Jwef8y": "f15wkkf3",
|
50
54
|
"Bgoe8wy": "f1s2uweq",
|
51
55
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
52
56
|
"oetu4i": "f1ukrpxl",
|
53
57
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
54
58
|
"Bi91k9c": "f1rq72xc",
|
55
|
-
"
|
59
|
+
"ecr2s2": "fsp1bjw",
|
56
60
|
"B6oc9vd": "ff472gp",
|
57
61
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
58
62
|
"wmxk5l": "fggejwh",
|
@@ -60,19 +64,19 @@ var useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
60
64
|
"lj723h": "f18otbis"
|
61
65
|
},
|
62
66
|
"subtle": {
|
63
|
-
"
|
67
|
+
"De3pzq": "fq5gl1p",
|
64
68
|
"g2u3we": "f1p3nwhy",
|
65
69
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
66
70
|
"B9xav0g": "f1q5o8ev",
|
67
71
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
68
72
|
"sj55zd": "f1qj7y59",
|
69
|
-
"
|
73
|
+
"Jwef8y": "f1t94bn6",
|
70
74
|
"Bgoe8wy": "f1s2uweq",
|
71
75
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
72
76
|
"oetu4i": "f1ukrpxl",
|
73
77
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
74
78
|
"Bi91k9c": "f139oj5f",
|
75
|
-
"
|
79
|
+
"ecr2s2": "f1wfn5kd",
|
76
80
|
"B6oc9vd": "ff472gp",
|
77
81
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
78
82
|
"wmxk5l": "fggejwh",
|
@@ -80,19 +84,19 @@ var useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
80
84
|
"lj723h": "f19au66r"
|
81
85
|
},
|
82
86
|
"transparent": {
|
83
|
-
"
|
87
|
+
"De3pzq": "f1q9pm1r",
|
84
88
|
"g2u3we": "f1p3nwhy",
|
85
89
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
86
90
|
"B9xav0g": "f1q5o8ev",
|
87
91
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
88
92
|
"sj55zd": "f1qj7y59",
|
89
|
-
"
|
93
|
+
"Jwef8y": "fjxutwb",
|
90
94
|
"Bgoe8wy": "f1s2uweq",
|
91
95
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
92
96
|
"oetu4i": "f1ukrpxl",
|
93
97
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
94
98
|
"Bi91k9c": "f139oj5f",
|
95
|
-
"
|
99
|
+
"ecr2s2": "fophhak",
|
96
100
|
"B6oc9vd": "ff472gp",
|
97
101
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
98
102
|
"wmxk5l": "fggejwh",
|
@@ -100,26 +104,26 @@ var useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
100
104
|
"lj723h": "f19au66r"
|
101
105
|
}
|
102
106
|
}, {
|
103
|
-
"d": [".
|
104
|
-
"h": [".
|
105
|
-
"a": [".
|
107
|
+
"d": [".f1nfm20t{background-color:var(--colorNeutralBackground1Selected);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}", ".f8w4g0q{background-color:var(--colorBrandBackgroundSelected);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}"],
|
108
|
+
"h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1xlaoq0:hover{border-bottom-color:var(--colorNeutralStroke1Hover);}", ".fax3udt:hover{color:var(--colorNeutralForeground1);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f15wkkf3:hover{background-color:var(--colorBrandBackgroundHover);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1rq72xc:hover{color:var(--colorNeutralForegroundOnBrand);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}"],
|
109
|
+
"a": [".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}", ".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fumykes:active{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f1r2dosr:active{color:var(--colorNeutralForeground1);}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".fsp1bjw:active{background-color:var(--colorBrandBackgroundPressed);}", ".ff472gp:active{border-top-color:transparent;}", ".f4yyc7m:active{border-right-color:transparent;}", ".ft2aflc:active{border-left-color:transparent;}", ".fggejwh:active{border-bottom-color:transparent;}", ".f18otbis:active{color:var(--colorNeutralForegroundOnBrand);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f19au66r:active{color:var(--colorNeutralForeground2BrandPressed);}"]
|
106
110
|
});
|
107
111
|
|
108
|
-
|
112
|
+
const useDisabledStyles = /*#__PURE__*/react_1.__styles({
|
109
113
|
"base": {
|
110
|
-
"
|
114
|
+
"De3pzq": "f1bg9a2p",
|
111
115
|
"g2u3we": "f1jj8ep1",
|
112
116
|
"h3c5rm": ["f15xbau", "fy0fskl"],
|
113
117
|
"B9xav0g": "f4ikngz",
|
114
118
|
"zhjwy3": ["fy0fskl", "f15xbau"],
|
115
119
|
"sj55zd": "f1s2aq7o",
|
116
|
-
"
|
120
|
+
"Jwef8y": "f1falr9n",
|
117
121
|
"Bgoe8wy": "f12mpcsy",
|
118
122
|
"Bwzppfd": ["f1gwvigk", "f18rmfxp"],
|
119
123
|
"oetu4i": "f1jnshp0",
|
120
124
|
"gg5e9n": ["f18rmfxp", "f1gwvigk"],
|
121
125
|
"Bi91k9c": "fvgxktp",
|
122
|
-
"
|
126
|
+
"ecr2s2": "f1ryyzvn",
|
123
127
|
"B6oc9vd": "fdi4vxw",
|
124
128
|
"ak43y8": ["f4ryxzl", "fkdgpbx"],
|
125
129
|
"wmxk5l": "fcmhn06",
|
@@ -142,59 +146,61 @@ var useDisabledStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
142
146
|
"B50zh58": ["ft2aflc", "f4yyc7m"]
|
143
147
|
},
|
144
148
|
"subtle": {
|
145
|
-
"
|
149
|
+
"De3pzq": "f3rmtva",
|
146
150
|
"g2u3we": "f1p3nwhy",
|
147
151
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
148
152
|
"B9xav0g": "f1q5o8ev",
|
149
153
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
150
|
-
"
|
154
|
+
"Jwef8y": "f1cio4g9",
|
151
155
|
"Bgoe8wy": "f1s2uweq",
|
152
156
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
153
157
|
"oetu4i": "f1ukrpxl",
|
154
158
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
155
|
-
"
|
159
|
+
"ecr2s2": "f1rot6hk",
|
156
160
|
"B6oc9vd": "ff472gp",
|
157
161
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
158
162
|
"wmxk5l": "fggejwh",
|
159
163
|
"B50zh58": ["ft2aflc", "f4yyc7m"]
|
160
164
|
},
|
161
165
|
"transparent": {
|
162
|
-
"
|
166
|
+
"De3pzq": "f3rmtva",
|
163
167
|
"g2u3we": "f1p3nwhy",
|
164
168
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
165
169
|
"B9xav0g": "f1q5o8ev",
|
166
170
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
167
|
-
"
|
171
|
+
"Jwef8y": "f1cio4g9",
|
168
172
|
"Bgoe8wy": "f1s2uweq",
|
169
173
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
170
174
|
"oetu4i": "f1ukrpxl",
|
171
175
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
172
|
-
"
|
176
|
+
"ecr2s2": "f1rot6hk",
|
173
177
|
"B6oc9vd": "ff472gp",
|
174
178
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
175
179
|
"wmxk5l": "fggejwh",
|
176
180
|
"B50zh58": ["ft2aflc", "f4yyc7m"]
|
177
181
|
}
|
178
182
|
}, {
|
179
|
-
"d": [".
|
180
|
-
"h": [".
|
181
|
-
"a": [".
|
183
|
+
"d": [".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f3rmtva{background-color:transparent;}"],
|
184
|
+
"h": [".f1falr9n:hover{background-color:var(--colorNeutralBackgroundDisabled);}", ".f12mpcsy:hover{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1gwvigk:hover{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f18rmfxp:hover{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f1jnshp0:hover{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1cio4g9:hover{background-color:transparent;}"],
|
185
|
+
"a": [".f1ryyzvn:active{background-color:var(--colorNeutralBackgroundDisabled);}", ".fdi4vxw:active{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f4ryxzl:active{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fkdgpbx:active{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fcmhn06:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}", ".ff472gp:active{border-top-color:transparent;}", ".f4yyc7m:active{border-right-color:transparent;}", ".ft2aflc:active{border-left-color:transparent;}", ".fggejwh:active{border-bottom-color:transparent;}", ".f1rot6hk:active{background-color:transparent;}"]
|
182
186
|
});
|
183
187
|
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
188
|
+
const useToggleButtonStyles_unstable = state => {
|
189
|
+
const checkedStyles = useCheckedStyles();
|
190
|
+
const disabledStyles = useDisabledStyles();
|
191
|
+
const {
|
192
|
+
appearance,
|
193
|
+
checked,
|
194
|
+
disabled,
|
195
|
+
disabledFocusable
|
196
|
+
} = state;
|
197
|
+
state.root.className = react_1.mergeClasses(exports.toggleButtonClassName, // Checked styles
|
192
198
|
checked && checkedStyles.base, appearance && checked && checkedStyles[appearance], // Disabled styles
|
193
199
|
(disabled || disabledFocusable) && disabledStyles.base, appearance && (disabled || disabledFocusable) && disabledStyles[appearance], // User provided class name
|
194
200
|
state.root.className);
|
195
|
-
useButtonStyles_1.
|
201
|
+
useButtonStyles_1.useButtonStyles_unstable(state);
|
196
202
|
return state;
|
197
203
|
};
|
198
204
|
|
199
|
-
exports.
|
205
|
+
exports.useToggleButtonStyles_unstable = useToggleButtonStyles_unstable;
|
200
206
|
//# sourceMappingURL=useToggleButtonStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGa,OAAA,CAAA,qBAAA,GAAwB,kBAAxB;;AAEb,MAAM,gBAAgB,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAzB;;AAuFA,MAAM,iBAAiB,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA1B;;AAiEO,MAAM,8BAA8B,GAAI,KAAD,IAAgD;AAC5F,QAAM,aAAa,GAAG,gBAAgB,EAAtC;AACA,QAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEA,QAAM;AAAE,IAAA,UAAF;AAAc,IAAA,OAAd;AAAuB,IAAA,QAAvB;AAAiC,IAAA;AAAjC,MAAuD,KAA7D;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,qBADqB,EAGrB;AACA,EAAA,OAAO,IAAI,aAAa,CAAC,IAJJ,EAKrB,UAAU,IAAI,OAAd,IAAyB,aAAa,CAAC,UAAD,CALjB,EAOrB;AACA,GAAC,QAAQ,IAAI,iBAAb,KAAmC,cAAc,CAAC,IAR7B,EASrB,UAAU,KAAK,QAAQ,IAAI,iBAAjB,CAAV,IAAiD,cAAc,CAAC,UAAD,CAT1C,EAWrB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAZU,CAAvB;AAeA,EAAA,iBAAA,CAAA,wBAAA,CAAyB,KAAzB;AAEA,SAAO,KAAP;AACD,CAxBM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourceRoot":""}
|
package/lib-commonjs/index.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-button",
|
3
|
-
"version": "9.0.0-
|
3
|
+
"version": "9.0.0-rc.1",
|
4
4
|
"description": "Fluent UI React Button component.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -19,19 +19,17 @@
|
|
19
19
|
"just": "just-scripts",
|
20
20
|
"lint": "just-scripts lint",
|
21
21
|
"start": "yarn storybook",
|
22
|
-
"test": "jest",
|
22
|
+
"test": "jest --passWithNoTests",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
|
-
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/packages/react-button/src && yarn docs",
|
25
|
-
"storybook": "
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-button/src && yarn docs",
|
25
|
+
"storybook": "node ../../scripts/storybook/runner",
|
26
|
+
"type-check": "tsc -b tsconfig.json"
|
26
27
|
},
|
27
28
|
"devDependencies": {
|
28
29
|
"@fluentui/a11y-testing": "^0.1.0",
|
29
|
-
"@fluentui/babel-make-styles": "9.0.0-nightly.46b9ea7036.0",
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
31
|
-
"@fluentui/jest-serializer-make-styles": "9.0.0-nightly.46b9ea7036.0",
|
32
31
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-
|
34
|
-
"@fluentui/react-menu": "9.0.0-nightly.46b9ea7036.0",
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.1",
|
35
33
|
"@fluentui/scripts": "^1.0.0",
|
36
34
|
"@types/enzyme": "3.10.3",
|
37
35
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -45,12 +43,12 @@
|
|
45
43
|
"react-test-renderer": "^16.3.0"
|
46
44
|
},
|
47
45
|
"dependencies": {
|
48
|
-
"@fluentui/keyboard-keys": "9.0.0-
|
49
|
-
"@fluentui/react-aria": "9.0.0-
|
50
|
-
"@fluentui/react-icons": "^
|
51
|
-
"@fluentui/react-
|
52
|
-
"@fluentui/react-
|
53
|
-
"@
|
46
|
+
"@fluentui/keyboard-keys": "9.0.0-rc.1",
|
47
|
+
"@fluentui/react-aria": "9.0.0-rc.1",
|
48
|
+
"@fluentui/react-icons": "^2.0.159-beta.10",
|
49
|
+
"@fluentui/react-tabster": "9.0.0-rc.1",
|
50
|
+
"@fluentui/react-utilities": "9.0.0-rc.1",
|
51
|
+
"@griffel/react": "1.0.0",
|
54
52
|
"tslib": "^2.1.0"
|
55
53
|
},
|
56
54
|
"peerDependencies": {
|
@@ -60,7 +58,6 @@
|
|
60
58
|
"react-dom": ">=16.8.0 <18.0.0"
|
61
59
|
},
|
62
60
|
"beachball": {
|
63
|
-
"tag": "beta",
|
64
61
|
"disallowedChangeTypes": [
|
65
62
|
"major",
|
66
63
|
"minor",
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
|
2
|
-
import makeStylesTests from '@fluentui/react-conformance-make-styles';
|
3
|
-
export function isConformant(testInfo) {
|
4
|
-
var defaultOptions = {
|
5
|
-
asPropHandlesRef: true,
|
6
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
7
|
-
disabledTests: ['has-docblock', 'kebab-aria-attributes'],
|
8
|
-
extraTests: makeStylesTests,
|
9
|
-
skipAsPropTests: true
|
10
|
-
};
|
11
|
-
baseIsConformant(defaultOptions, testInfo);
|
12
|
-
}
|
13
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,aAAa,EAAE,CAAC,cAAD,EAAiB,uBAAjB,CAH4C;AAI3D,IAAA,UAAU,EAAE,eAJ+C;AAK3D,IAAA,eAAe,EAAE;AAL0C,GAA7D;AAQA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.isConformant = void 0;
|
7
|
-
|
8
|
-
var react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
|
9
|
-
|
10
|
-
var react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
|
11
|
-
|
12
|
-
function isConformant(testInfo) {
|
13
|
-
var defaultOptions = {
|
14
|
-
asPropHandlesRef: true,
|
15
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
16
|
-
disabledTests: ['has-docblock', 'kebab-aria-attributes'],
|
17
|
-
extraTests: react_conformance_make_styles_1.default,
|
18
|
-
skipAsPropTests: true
|
19
|
-
};
|
20
|
-
react_conformance_1.isConformant(defaultOptions, testInfo);
|
21
|
-
}
|
22
|
-
|
23
|
-
exports.isConformant = isConformant;
|
24
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,aAAa,EAAE,CAAC,cAAD,EAAiB,uBAAjB,CAH4C;AAI3D,IAAA,UAAU,EAAE,+BAAA,CAAA,OAJ+C;AAK3D,IAAA,eAAe,EAAE;AAL0C,GAA7D;AAQA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAZD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
|