@fluentui/react-button 0.0.0-nightlyc0273fdc6920211123.1 → 0.0.0-nightlyc49127232120220201.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +164 -21
- package/CHANGELOG.md +40 -13
- package/dist/react-button.d.ts +28 -28
- package/lib/components/Button/Button.js +6 -6
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.types.d.ts +5 -5
- package/lib/components/Button/index.d.ts +1 -1
- package/lib/components/Button/index.js +1 -1
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/renderButton.d.ts +1 -1
- package/lib/components/Button/renderButton.js +6 -3
- package/lib/components/Button/renderButton.js.map +1 -1
- package/lib/components/Button/useButton.d.ts +1 -1
- package/lib/components/Button/useButton.js +3 -2
- package/lib/components/Button/useButton.js.map +1 -1
- package/lib/components/Button/useButtonStyles.d.ts +1 -1
- package/lib/components/Button/useButtonStyles.js +94 -59
- package/lib/components/Button/useButtonStyles.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.js +6 -6
- package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/CompoundButton.types.d.ts +3 -3
- 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 +8 -3
- package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButton.d.ts +1 -1
- package/lib/components/CompoundButton/useCompoundButton.js +3 -3
- package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +1 -1
- package/lib/components/CompoundButton/useCompoundButtonStyles.js +8 -6
- package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +6 -6
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.types.d.ts +2 -2
- 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 +6 -3
- package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButton.d.ts +1 -1
- package/lib/components/MenuButton/useMenuButton.js +5 -5
- package/lib/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.d.ts +1 -1
- package/lib/components/MenuButton/useMenuButtonStyles.js +4 -4
- package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib/components/SplitButton/SplitButton.js +6 -6
- 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 +6 -3
- package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButton.d.ts +1 -1
- package/lib/components/SplitButton/useSplitButton.js +1 -1
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.d.ts +1 -1
- package/lib/components/SplitButton/useSplitButtonStyles.js +3 -2
- package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib/components/ToggleButton/ToggleButton.js +6 -6
- package/lib/components/ToggleButton/ToggleButton.js.map +1 -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 +8 -4
- package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +1 -1
- package/lib/components/ToggleButton/useToggleButtonStyles.js +35 -34
- package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/lib-commonjs/components/Button/Button.js +3 -3
- package/lib-commonjs/components/Button/Button.js.map +1 -1
- package/lib-commonjs/components/Button/Button.types.d.ts +5 -5
- package/lib-commonjs/components/Button/index.d.ts +1 -1
- package/lib-commonjs/components/Button/index.js +3 -3
- 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 +8 -5
- 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 +5 -4
- package/lib-commonjs/components/Button/useButton.js.map +1 -1
- package/lib-commonjs/components/Button/useButtonStyles.d.ts +1 -1
- package/lib-commonjs/components/Button/useButtonStyles.js +104 -68
- package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.js +3 -3
- package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +3 -3
- package/lib-commonjs/components/CompoundButton/index.d.ts +1 -1
- package/lib-commonjs/components/CompoundButton/index.js +3 -3
- 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 +10 -5
- 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 +4 -4
- package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +1 -1
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +19 -16
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.js +3 -3
- package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +2 -2
- package/lib-commonjs/components/MenuButton/index.d.ts +1 -1
- package/lib-commonjs/components/MenuButton/index.js +3 -3
- 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 +8 -5
- 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 +5 -5
- package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +8 -8
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
- package/lib-commonjs/components/SplitButton/SplitButton.js +3 -3
- 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 +3 -3
- 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 +8 -5
- 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 +3 -3
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +11 -9
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/ToggleButton.js +3 -3
- package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/index.d.ts +1 -1
- package/lib-commonjs/components/ToggleButton/index.js +3 -3
- 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 +9 -5
- package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +1 -1
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +40 -38
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
- package/package.json +12 -13
- 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,19 +3,21 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useSplitButtonStyles_unstable = exports.splitButtonClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
10
|
const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
11
11
|
|
12
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
13
|
+
|
12
14
|
exports.splitButtonClassName = 'fui-SplitButton';
|
13
15
|
const SplitButtonClassNames = {
|
14
16
|
primaryActionButton: `${exports.splitButtonClassName}-primaryActionButton`,
|
15
17
|
menuButton: `${exports.splitButtonClassName}-menuButton`
|
16
18
|
};
|
17
19
|
|
18
|
-
const useFocusStyles = /*#__PURE__*/
|
20
|
+
const useFocusStyles = /*#__PURE__*/react_1.__styles({
|
19
21
|
"primaryActionButton": {
|
20
22
|
"B486eqv": "f2hkw1w",
|
21
23
|
"Bmrpcm6": ["fub8a6s", "f1g41uvt"],
|
@@ -32,7 +34,7 @@ const useFocusStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
32
34
|
"d": ["[data-keyboard-nav] .fub8a6s:focus{border-top-right-radius:0;}", "[data-keyboard-nav] .f1g41uvt:focus{border-top-left-radius:0;}", "[data-keyboard-nav] .f58hr3h:focus{border-bottom-right-radius:0;}", "[data-keyboard-nav] .f1u1mnrj:focus{border-bottom-left-radius:0;}", "[data-keyboard-nav] .fy9hclh:focus{border-left-width:0;}", "[data-keyboard-nav] .f549e1y:focus{border-right-width:0;}"]
|
33
35
|
});
|
34
36
|
|
35
|
-
const useRootStyles = /*#__PURE__*/
|
37
|
+
const useRootStyles = /*#__PURE__*/react_1.__styles({
|
36
38
|
"base": {
|
37
39
|
"mc9l5x": "ftuwxu6",
|
38
40
|
"Brf1p80": "fsxf2b5",
|
@@ -77,7 +79,7 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
77
79
|
"a": [".fnmoi2n:active .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".f1l3povx:active .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".fjmcta:active .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".fm99moz:active .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1lpnjjp:active .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f8nirj0:active .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"]
|
78
80
|
});
|
79
81
|
|
80
|
-
const
|
82
|
+
const useSplitButtonStyles_unstable = state => {
|
81
83
|
const rootStyles = useRootStyles();
|
82
84
|
const focusStyles = useFocusStyles();
|
83
85
|
const {
|
@@ -86,18 +88,18 @@ const useSplitButtonStyles = state => {
|
|
86
88
|
disabled,
|
87
89
|
disabledFocusable
|
88
90
|
} = state;
|
89
|
-
state.root.className =
|
91
|
+
state.root.className = react_1.mergeClasses(exports.splitButtonClassName, rootStyles.base, block && rootStyles.block, appearance && rootStyles[appearance], (disabled || disabledFocusable) && rootStyles.disabled, state.root.className);
|
90
92
|
|
91
93
|
if (state.menuButton) {
|
92
|
-
state.menuButton.className =
|
94
|
+
state.menuButton.className = react_1.mergeClasses(SplitButtonClassNames.menuButton, focusStyles.menuButton, state.menuButton.className);
|
93
95
|
}
|
94
96
|
|
95
97
|
if (state.primaryActionButton) {
|
96
|
-
state.primaryActionButton.className =
|
98
|
+
state.primaryActionButton.className = react_1.mergeClasses(SplitButtonClassNames.primaryActionButton, focusStyles.primaryActionButton, state.primaryActionButton.className);
|
97
99
|
}
|
98
100
|
|
99
101
|
return state;
|
100
102
|
};
|
101
103
|
|
102
|
-
exports.
|
104
|
+
exports.useSplitButtonStyles_unstable = useSplitButtonStyles_unstable;
|
103
105
|
//# sourceMappingURL=useSplitButtonStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;AAEb,MAAM,qBAAqB,GAAG;AAC5B,EAAA,mBAAmB,EAAE,GAAG,OAAA,CAAA,oBAAoB,sBADhB;AAE5B,EAAA,UAAU,EAAE,GAAG,OAAA,CAAA,oBAAoB;AAFP,CAA9B;;AAKA,MAAM,cAAc,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAvB;;AAaA,MAAM,aAAa,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,EAAtB;;AAgHO,MAAM,6BAA6B,GAAI,KAAD,IAA8C;AACzF,QAAM,UAAU,GAAG,aAAa,EAAhC;AACA,QAAM,WAAW,GAAG,cAAc,EAAlC;AAEA,QAAM;AAAE,IAAA,UAAF;AAAc,IAAA,KAAd;AAAqB,IAAA,QAArB;AAA+B,IAAA;AAA/B,MAAqD,KAA3D;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,oBADqB,EAErB,UAAU,CAAC,IAFU,EAGrB,KAAK,IAAI,UAAU,CAAC,KAHC,EAIrB,UAAU,IAAI,UAAU,CAAC,UAAD,CAJH,EAKrB,CAAC,QAAQ,IAAI,iBAAb,KAAmC,UAAU,CAAC,QALzB,EAMrB,KAAK,CAAC,IAAN,CAAW,SANU,CAAvB;;AASA,MAAI,KAAK,CAAC,UAAV,EAAsB;AACpB,IAAA,KAAK,CAAC,UAAN,CAAiB,SAAjB,GAA6B,OAAA,CAAA,YAAA,CAC3B,qBAAqB,CAAC,UADK,EAE3B,WAAW,CAAC,UAFe,EAG3B,KAAK,CAAC,UAAN,CAAiB,SAHU,CAA7B;AAKD;;AAED,MAAI,KAAK,CAAC,mBAAV,EAA+B;AAC7B,IAAA,KAAK,CAAC,mBAAN,CAA0B,SAA1B,GAAsC,OAAA,CAAA,YAAA,CACpC,qBAAqB,CAAC,mBADc,EAEpC,WAAW,CAAC,mBAFwB,EAGpC,KAAK,CAAC,mBAAN,CAA0B,SAHU,CAAtC;AAKD;;AAED,SAAO,KAAP;AACD,CAhCM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourceRoot":""}
|
@@ -18,9 +18,9 @@ const useToggleButtonStyles_1 = /*#__PURE__*/require("./useToggleButtonStyles");
|
|
18
18
|
|
19
19
|
|
20
20
|
exports.ToggleButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
-
const state = useToggleButton_1.
|
22
|
-
useToggleButtonStyles_1.
|
23
|
-
return renderToggleButton_1.
|
21
|
+
const state = useToggleButton_1.useToggleButton_unstable(props, ref);
|
22
|
+
useToggleButtonStyles_1.useToggleButtonStyles_unstable(state);
|
23
|
+
return renderToggleButton_1.renderToggleButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
|
24
24
|
});
|
25
25
|
exports.ToggleButton.displayName = 'ToggleButton';
|
26
26
|
//# sourceMappingURL=ToggleButton.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,iBAAA,CAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,iBAAA,CAAA,wBAAA,CAAyB,KAAzB,EAAgC,GAAhC,CAAd;AAEA,EAAA,uBAAA,CAAA,8BAAA,CAA+B,KAA/B;AAEA,SAAO,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,CAAP,CALkG,CAMlG;AACD,CAPmE,CAAvD;AASb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourceRoot":""}
|
@@ -2,4 +2,4 @@ export * from './ToggleButton';
|
|
2
2
|
export * from './ToggleButton.types';
|
3
3
|
export * from './renderToggleButton';
|
4
4
|
export * from './useToggleButton';
|
5
|
-
export { toggleButtonClassName,
|
5
|
+
export { toggleButtonClassName, useToggleButtonStyles_unstable } from './useToggleButtonStyles';
|
@@ -3,7 +3,7 @@
|
|
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
|
|
@@ -23,10 +23,10 @@ Object.defineProperty(exports, "toggleButtonClassName", {
|
|
23
23
|
return useToggleButtonStyles_1.toggleButtonClassName;
|
24
24
|
}
|
25
25
|
});
|
26
|
-
Object.defineProperty(exports, "
|
26
|
+
Object.defineProperty(exports, "useToggleButtonStyles_unstable", {
|
27
27
|
enumerable: true,
|
28
28
|
get: function () {
|
29
|
-
return useToggleButtonStyles_1.
|
29
|
+
return useToggleButtonStyles_1.useToggleButtonStyles_unstable;
|
30
30
|
}
|
31
31
|
});
|
32
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;AAAuB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,
|
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,7 +3,7 @@
|
|
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
|
|
@@ -18,12 +18,16 @@ const useButton_1 = /*#__PURE__*/require("../Button/useButton");
|
|
18
18
|
*/
|
19
19
|
|
20
20
|
|
21
|
-
const
|
21
|
+
const useToggleButton_unstable = ({
|
22
22
|
checked,
|
23
23
|
defaultChecked,
|
24
24
|
...props
|
25
25
|
}, ref) => {
|
26
|
-
const
|
26
|
+
const {
|
27
|
+
disabled,
|
28
|
+
disabledFocusable
|
29
|
+
} = props;
|
30
|
+
const buttonState = useButton_1.useButton_unstable(props, ref);
|
27
31
|
const {
|
28
32
|
role,
|
29
33
|
onClick
|
@@ -40,7 +44,7 @@ const useToggleButton = ({
|
|
40
44
|
checked: checkedValue,
|
41
45
|
// Slots definition
|
42
46
|
root: { ...buttonState.root,
|
43
|
-
[isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']:
|
47
|
+
[isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: !disabled && !disabledFocusable && checkedValue,
|
44
48
|
onClick: React.useCallback(ev => {
|
45
49
|
if (onClick) {
|
46
50
|
onClick(ev);
|
@@ -56,5 +60,5 @@ const useToggleButton = ({
|
|
56
60
|
};
|
57
61
|
};
|
58
62
|
|
59
|
-
exports.
|
63
|
+
exports.useToggleButton_unstable = useToggleButton_unstable;
|
60
64
|
//# sourceMappingURL=useToggleButton.js.map
|
@@ -1 +1 @@
|
|
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,
|
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,3 +1,3 @@
|
|
1
1
|
import type { ToggleButtonState } from './ToggleButton.types';
|
2
2
|
export declare const toggleButtonClassName = "fui-ToggleButton";
|
3
|
-
export declare const
|
3
|
+
export declare const useToggleButtonStyles_unstable: (state: ToggleButtonState) => ToggleButtonState;
|
@@ -3,17 +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
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
11
|
|
10
12
|
const useButtonStyles_1 = /*#__PURE__*/require("../Button/useButtonStyles");
|
11
13
|
|
12
14
|
exports.toggleButtonClassName = 'fui-ToggleButton';
|
13
15
|
|
14
|
-
const useCheckedStyles = /*#__PURE__*/
|
16
|
+
const useCheckedStyles = /*#__PURE__*/react_1.__styles({
|
15
17
|
"base": {
|
16
|
-
"
|
18
|
+
"De3pzq": "f1nfm20t",
|
17
19
|
"g2u3we": "fj3muxo",
|
18
20
|
"h3c5rm": ["f1akhkt", "f1lxtadh"],
|
19
21
|
"B9xav0g": "f1aperda",
|
@@ -23,13 +25,13 @@ const useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
23
25
|
"Bekrc4i": ["f5tn483", "f1ojsxk5"],
|
24
26
|
"Bn0qgzm": "f1vxd6vx",
|
25
27
|
"ibv6hh": ["f1ojsxk5", "f5tn483"],
|
26
|
-
"
|
28
|
+
"Jwef8y": "f1knas48",
|
27
29
|
"Bgoe8wy": "fvcxoqz",
|
28
30
|
"Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
|
29
31
|
"oetu4i": "f1xlaoq0",
|
30
32
|
"gg5e9n": ["f1m52nbi", "f1ub3y4t"],
|
31
33
|
"Bi91k9c": "fax3udt",
|
32
|
-
"
|
34
|
+
"ecr2s2": "fb40n2d",
|
33
35
|
"B6oc9vd": "fvs00aa",
|
34
36
|
"ak43y8": ["f1assf6x", "f4ruux4"],
|
35
37
|
"wmxk5l": "fumykes",
|
@@ -37,24 +39,24 @@ const useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
37
39
|
"lj723h": "f1r2dosr"
|
38
40
|
},
|
39
41
|
"outline": {
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
42
|
+
"De3pzq": "f1q9pm1r",
|
43
|
+
"Jwef8y": "fjxutwb",
|
44
|
+
"ecr2s2": "fophhak"
|
43
45
|
},
|
44
46
|
"primary": {
|
45
|
-
"
|
47
|
+
"De3pzq": "f8w4g0q",
|
46
48
|
"g2u3we": "f1p3nwhy",
|
47
49
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
48
50
|
"B9xav0g": "f1q5o8ev",
|
49
51
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
50
52
|
"sj55zd": "f1phragk",
|
51
|
-
"
|
53
|
+
"Jwef8y": "f15wkkf3",
|
52
54
|
"Bgoe8wy": "f1s2uweq",
|
53
55
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
54
56
|
"oetu4i": "f1ukrpxl",
|
55
57
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
56
58
|
"Bi91k9c": "f1rq72xc",
|
57
|
-
"
|
59
|
+
"ecr2s2": "fsp1bjw",
|
58
60
|
"B6oc9vd": "ff472gp",
|
59
61
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
60
62
|
"wmxk5l": "fggejwh",
|
@@ -62,19 +64,19 @@ const useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
62
64
|
"lj723h": "f18otbis"
|
63
65
|
},
|
64
66
|
"subtle": {
|
65
|
-
"
|
67
|
+
"De3pzq": "fq5gl1p",
|
66
68
|
"g2u3we": "f1p3nwhy",
|
67
69
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
68
70
|
"B9xav0g": "f1q5o8ev",
|
69
71
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
70
72
|
"sj55zd": "f1qj7y59",
|
71
|
-
"
|
73
|
+
"Jwef8y": "f1t94bn6",
|
72
74
|
"Bgoe8wy": "f1s2uweq",
|
73
75
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
74
76
|
"oetu4i": "f1ukrpxl",
|
75
77
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
76
78
|
"Bi91k9c": "f139oj5f",
|
77
|
-
"
|
79
|
+
"ecr2s2": "f1wfn5kd",
|
78
80
|
"B6oc9vd": "ff472gp",
|
79
81
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
80
82
|
"wmxk5l": "fggejwh",
|
@@ -82,19 +84,19 @@ const useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
82
84
|
"lj723h": "f19au66r"
|
83
85
|
},
|
84
86
|
"transparent": {
|
85
|
-
"
|
87
|
+
"De3pzq": "f1q9pm1r",
|
86
88
|
"g2u3we": "f1p3nwhy",
|
87
89
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
88
90
|
"B9xav0g": "f1q5o8ev",
|
89
91
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
90
92
|
"sj55zd": "f1qj7y59",
|
91
|
-
"
|
93
|
+
"Jwef8y": "fjxutwb",
|
92
94
|
"Bgoe8wy": "f1s2uweq",
|
93
95
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
94
96
|
"oetu4i": "f1ukrpxl",
|
95
97
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
96
98
|
"Bi91k9c": "f139oj5f",
|
97
|
-
"
|
99
|
+
"ecr2s2": "fophhak",
|
98
100
|
"B6oc9vd": "ff472gp",
|
99
101
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
100
102
|
"wmxk5l": "fggejwh",
|
@@ -102,26 +104,26 @@ const useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
102
104
|
"lj723h": "f19au66r"
|
103
105
|
}
|
104
106
|
}, {
|
105
|
-
"d": [".
|
106
|
-
"h": [".
|
107
|
-
"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);}"]
|
108
110
|
});
|
109
111
|
|
110
|
-
const useDisabledStyles = /*#__PURE__*/
|
112
|
+
const useDisabledStyles = /*#__PURE__*/react_1.__styles({
|
111
113
|
"base": {
|
112
|
-
"
|
114
|
+
"De3pzq": "f1bg9a2p",
|
113
115
|
"g2u3we": "f1jj8ep1",
|
114
116
|
"h3c5rm": ["f15xbau", "fy0fskl"],
|
115
117
|
"B9xav0g": "f4ikngz",
|
116
118
|
"zhjwy3": ["fy0fskl", "f15xbau"],
|
117
119
|
"sj55zd": "f1s2aq7o",
|
118
|
-
"
|
120
|
+
"Jwef8y": "f1falr9n",
|
119
121
|
"Bgoe8wy": "f12mpcsy",
|
120
122
|
"Bwzppfd": ["f1gwvigk", "f18rmfxp"],
|
121
123
|
"oetu4i": "f1jnshp0",
|
122
124
|
"gg5e9n": ["f18rmfxp", "f1gwvigk"],
|
123
125
|
"Bi91k9c": "fvgxktp",
|
124
|
-
"
|
126
|
+
"ecr2s2": "f1ryyzvn",
|
125
127
|
"B6oc9vd": "fdi4vxw",
|
126
128
|
"ak43y8": ["f4ryxzl", "fkdgpbx"],
|
127
129
|
"wmxk5l": "fcmhn06",
|
@@ -144,46 +146,46 @@ const useDisabledStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
144
146
|
"B50zh58": ["ft2aflc", "f4yyc7m"]
|
145
147
|
},
|
146
148
|
"subtle": {
|
147
|
-
"
|
149
|
+
"De3pzq": "f3rmtva",
|
148
150
|
"g2u3we": "f1p3nwhy",
|
149
151
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
150
152
|
"B9xav0g": "f1q5o8ev",
|
151
153
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
152
|
-
"
|
154
|
+
"Jwef8y": "f1cio4g9",
|
153
155
|
"Bgoe8wy": "f1s2uweq",
|
154
156
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
155
157
|
"oetu4i": "f1ukrpxl",
|
156
158
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
157
|
-
"
|
159
|
+
"ecr2s2": "f1rot6hk",
|
158
160
|
"B6oc9vd": "ff472gp",
|
159
161
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
160
162
|
"wmxk5l": "fggejwh",
|
161
163
|
"B50zh58": ["ft2aflc", "f4yyc7m"]
|
162
164
|
},
|
163
165
|
"transparent": {
|
164
|
-
"
|
166
|
+
"De3pzq": "f3rmtva",
|
165
167
|
"g2u3we": "f1p3nwhy",
|
166
168
|
"h3c5rm": ["f11589ue", "f1pdflbu"],
|
167
169
|
"B9xav0g": "f1q5o8ev",
|
168
170
|
"zhjwy3": ["f1pdflbu", "f11589ue"],
|
169
|
-
"
|
171
|
+
"Jwef8y": "f1cio4g9",
|
170
172
|
"Bgoe8wy": "f1s2uweq",
|
171
173
|
"Bwzppfd": ["fr80ssc", "fecsdlb"],
|
172
174
|
"oetu4i": "f1ukrpxl",
|
173
175
|
"gg5e9n": ["fecsdlb", "fr80ssc"],
|
174
|
-
"
|
176
|
+
"ecr2s2": "f1rot6hk",
|
175
177
|
"B6oc9vd": "ff472gp",
|
176
178
|
"ak43y8": ["f4yyc7m", "ft2aflc"],
|
177
179
|
"wmxk5l": "fggejwh",
|
178
180
|
"B50zh58": ["ft2aflc", "f4yyc7m"]
|
179
181
|
}
|
180
182
|
}, {
|
181
|
-
"d": [".
|
182
|
-
"h": [".
|
183
|
-
"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;}"]
|
184
186
|
});
|
185
187
|
|
186
|
-
const
|
188
|
+
const useToggleButtonStyles_unstable = state => {
|
187
189
|
const checkedStyles = useCheckedStyles();
|
188
190
|
const disabledStyles = useDisabledStyles();
|
189
191
|
const {
|
@@ -192,13 +194,13 @@ const useToggleButtonStyles = state => {
|
|
192
194
|
disabled,
|
193
195
|
disabledFocusable
|
194
196
|
} = state;
|
195
|
-
state.root.className =
|
197
|
+
state.root.className = react_1.mergeClasses(exports.toggleButtonClassName, // Checked styles
|
196
198
|
checked && checkedStyles.base, appearance && checked && checkedStyles[appearance], // Disabled styles
|
197
199
|
(disabled || disabledFocusable) && disabledStyles.base, appearance && (disabled || disabledFocusable) && disabledStyles[appearance], // User provided class name
|
198
200
|
state.root.className);
|
199
|
-
useButtonStyles_1.
|
201
|
+
useButtonStyles_1.useButtonStyles_unstable(state);
|
200
202
|
return state;
|
201
203
|
};
|
202
204
|
|
203
|
-
exports.
|
205
|
+
exports.useToggleButtonStyles_unstable = useToggleButtonStyles_unstable;
|
204
206
|
//# sourceMappingURL=useToggleButtonStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,
|
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-button",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyc49127232120220201.1",
|
4
4
|
"description": "Fluent UI React Button component.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -19,18 +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": "0.0.0-nightlyc0273fdc6920211123.1",
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
31
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyc0273fdc6920211123.1",
|
32
31
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-
|
32
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightlyc49127232120220201.1",
|
34
33
|
"@fluentui/scripts": "^1.0.0",
|
35
34
|
"@types/enzyme": "3.10.3",
|
36
35
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -44,12 +43,12 @@
|
|
44
43
|
"react-test-renderer": "^16.3.0"
|
45
44
|
},
|
46
45
|
"dependencies": {
|
47
|
-
"@fluentui/keyboard-keys": "0.0.0-
|
48
|
-
"@fluentui/react-aria": "0.0.0-
|
49
|
-
"@fluentui/react-icons": "^
|
50
|
-
"@fluentui/react-
|
51
|
-
"@fluentui/react-
|
52
|
-
"@
|
46
|
+
"@fluentui/keyboard-keys": "0.0.0-nightlyc49127232120220201.1",
|
47
|
+
"@fluentui/react-aria": "0.0.0-nightlyc49127232120220201.1",
|
48
|
+
"@fluentui/react-icons": "^2.0.154-beta.5",
|
49
|
+
"@fluentui/react-tabster": "0.0.0-nightlyc49127232120220201.1",
|
50
|
+
"@fluentui/react-utilities": "0.0.0-nightlyc49127232120220201.1",
|
51
|
+
"@griffel/react": "1.0.0",
|
53
52
|
"tslib": "^2.1.0"
|
54
53
|
},
|
55
54
|
"peerDependencies": {
|
@@ -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
|
-
const 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,QAAM,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
|
-
const react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
|
9
|
-
|
10
|
-
const react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
|
11
|
-
|
12
|
-
function isConformant(testInfo) {
|
13
|
-
const 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,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,MAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,QAAM,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":""}
|