@fluentui/react-toolbar 9.0.0-beta.11 → 9.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +170 -1
- package/CHANGELOG.md +36 -2
- package/dist/index.d.ts +12 -36
- package/lib/ToolbarRadioButton.js +2 -0
- package/lib/ToolbarRadioButton.js.map +1 -0
- package/lib/components/Toolbar/Toolbar.types.js.map +1 -1
- package/lib/components/Toolbar/ToolbarContext.js +1 -0
- package/lib/components/Toolbar/ToolbarContext.js.map +1 -1
- package/lib/components/Toolbar/useToolbar.js +49 -11
- package/lib/components/Toolbar/useToolbar.js.map +1 -1
- package/lib/components/Toolbar/useToolbarContextValues.js +3 -1
- package/lib/components/Toolbar/useToolbarContextValues.js.map +1 -1
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.js +15 -0
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.js.map +1 -0
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.types.js +2 -0
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.types.js.map +1 -0
- package/lib/components/ToolbarRadioButton/index.js +3 -0
- package/lib/components/ToolbarRadioButton/index.js.map +1 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButton.js +38 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.js +22 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.js.map +1 -0
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib-commonjs/{ToolbarRadio.js → ToolbarRadioButton.js} +2 -2
- package/lib-commonjs/ToolbarRadioButton.js.map +1 -0
- package/lib-commonjs/components/Toolbar/ToolbarContext.js +1 -0
- package/lib-commonjs/components/Toolbar/ToolbarContext.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbar.js +49 -11
- package/lib-commonjs/components/Toolbar/useToolbar.js.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarContextValues.js +3 -1
- package/lib-commonjs/components/Toolbar/useToolbarContextValues.js.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.js +26 -0
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.js.map +1 -0
- package/lib-commonjs/components/{ToolbarRadio/ToolbarRadio.types.js → ToolbarRadioButton/ToolbarRadioButton.types.js} +1 -1
- package/lib-commonjs/components/{ToolbarRadio/ToolbarRadio.types.js.map → ToolbarRadioButton/ToolbarRadioButton.types.js.map} +0 -0
- package/lib-commonjs/components/ToolbarRadioButton/index.js +12 -0
- package/lib-commonjs/components/ToolbarRadioButton/index.js.map +1 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.js +50 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.js +33 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.js.map +1 -0
- package/lib-commonjs/index.js +4 -13
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +19 -11
- package/lib/ToolbarRadio.js +0 -2
- package/lib/ToolbarRadio.js.map +0 -1
- package/lib/ToolbarRadioGroup.js +0 -2
- package/lib/ToolbarRadioGroup.js.map +0 -1
- package/lib/components/ToolbarRadio/ToolbarRadio.js +0 -19
- package/lib/components/ToolbarRadio/ToolbarRadio.js.map +0 -1
- package/lib/components/ToolbarRadio/ToolbarRadio.types.js +0 -2
- package/lib/components/ToolbarRadio/ToolbarRadio.types.js.map +0 -1
- package/lib/components/ToolbarRadio/index.js +0 -3
- package/lib/components/ToolbarRadio/index.js.map +0 -1
- package/lib/components/ToolbarRadio/useToolbarRadioStyles.js +0 -41
- package/lib/components/ToolbarRadio/useToolbarRadioStyles.js.map +0 -1
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.js +0 -20
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +0 -1
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js +0 -2
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +0 -1
- package/lib/components/ToolbarRadioGroup/contexts/useRadioGroupContextValues.js +0 -22
- package/lib/components/ToolbarRadioGroup/contexts/useRadioGroupContextValues.js.map +0 -1
- package/lib/components/ToolbarRadioGroup/index.js +0 -3
- package/lib/components/ToolbarRadioGroup/index.js.map +0 -1
- package/lib/components/ToolbarRadioGroup/useToolbarRadioGroupStyles.js +0 -29
- package/lib/components/ToolbarRadioGroup/useToolbarRadioGroupStyles.js.map +0 -1
- package/lib-commonjs/ToolbarRadio.js.map +0 -1
- package/lib-commonjs/ToolbarRadioGroup.js +0 -10
- package/lib-commonjs/ToolbarRadioGroup.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadio/ToolbarRadio.js +0 -30
- package/lib-commonjs/components/ToolbarRadio/ToolbarRadio.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadio/index.js +0 -12
- package/lib-commonjs/components/ToolbarRadio/index.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadio/useToolbarRadioStyles.js +0 -51
- package/lib-commonjs/components/ToolbarRadio/useToolbarRadioStyles.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.js +0 -31
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js +0 -6
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadioGroup/contexts/useRadioGroupContextValues.js +0 -31
- package/lib-commonjs/components/ToolbarRadioGroup/contexts/useRadioGroupContextValues.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadioGroup/index.js +0 -12
- package/lib-commonjs/components/ToolbarRadioGroup/index.js.map +0 -1
- package/lib-commonjs/components/ToolbarRadioGroup/useToolbarRadioGroupStyles.js +0 -39
- package/lib-commonjs/components/ToolbarRadioGroup/useToolbarRadioGroupStyles.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadioGroup/contexts/useRadioGroupContextValues.ts"],"names":[],"mappings":"AAMA,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA2D;EACnG,MAAM;IAAE,IAAF;IAAQ,KAAR;IAAe,YAAf;IAA6B,QAA7B;IAAuC,MAAvC;IAA+C;EAA/C,IAA4D,KAAlE;EAEA,MAAM,UAAU,GAA2B;IACzC,IADyC;IAEzC,KAFyC;IAGzC,YAHyC;IAIzC,QAJyC;IAKzC,MALyC;IAMzC;EANyC,CAA3C;EASA,OAAO;IAAE;EAAF,CAAP;AACD,CAbM","sourcesContent":["import type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n ToolbarRadioGroupState,\n} from '../ToolbarRadioGroup.types';\n\nexport const useRadioGroupContextValues = (state: ToolbarRadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n\n const radioGroup: RadioGroupContextValue = {\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n };\n\n return { radioGroup };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ToolbarRadioGroup/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './ToolbarRadioGroup';\nexport * from './ToolbarRadioGroup.types';\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
2
|
-
import { useRadioGroupStyles_unstable } from '@fluentui/react-radio';
|
|
3
|
-
|
|
4
|
-
const useBaseStyles = /*#__PURE__*/__styles({
|
|
5
|
-
"root": {
|
|
6
|
-
"mc9l5x": "f22iagw",
|
|
7
|
-
"Bt984gj": "f122n59",
|
|
8
|
-
"i8kkvl": "f4px1ci",
|
|
9
|
-
"Belr9w4": "fn67r4l"
|
|
10
|
-
}
|
|
11
|
-
}, {
|
|
12
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}"]
|
|
13
|
-
}); // const useSmallStyles = makeStyles({
|
|
14
|
-
// label: {
|
|
15
|
-
// fontSize: 'var(--fontSizeBase200)',
|
|
16
|
-
// },
|
|
17
|
-
// });
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Apply styling to the ToolbarRadio slots based on the state
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export const useToolbarRadioGroupStyles_unstable = state => {
|
|
25
|
-
useRadioGroupStyles_unstable(state);
|
|
26
|
-
const baseToolbarRadioStyles = useBaseStyles();
|
|
27
|
-
state.root.className = mergeClasses(state.root.className, baseToolbarRadioStyles.root);
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=useToolbarRadioGroupStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadioGroup/useToolbarRadioGroupStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,4BAAT,QAA6C,uBAA7C;;AAGA,MAAM,aAAa,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB,C,CAQA;AACA;AACA;AACA;AACA;;AAEA;;AAEG;;;AACH,OAAO,MAAM,mCAAmC,GAAI,KAAD,IAAkC;EACnF,4BAA4B,CAAC,KAAD,CAA5B;EACA,MAAM,sBAAsB,GAAG,aAAa,EAA5C;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,KAAK,CAAC,IAAN,CAAW,SAAZ,EAAuB,sBAAsB,CAAC,IAA9C,CAAnC;AACD,CALM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { useRadioGroupStyles_unstable } from '@fluentui/react-radio';\nimport { ToolbarRadioGroupState } from './ToolbarRadioGroup.types';\n\nconst useBaseStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap('8px'),\n },\n});\n\n// const useSmallStyles = makeStyles({\n// label: {\n// fontSize: 'var(--fontSizeBase200)',\n// },\n// });\n\n/**\n * Apply styling to the ToolbarRadio slots based on the state\n */\nexport const useToolbarRadioGroupStyles_unstable = (state: ToolbarRadioGroupState) => {\n useRadioGroupStyles_unstable(state);\n const baseToolbarRadioStyles = useBaseStyles();\n\n state.root.className = mergeClasses(state.root.className, baseToolbarRadioStyles.root);\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ToolbarRadio.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/ToolbarRadio/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
|
-
tslib_1.__exportStar(require("./components/ToolbarRadioGroup/index"), exports);
|
|
10
|
-
//# sourceMappingURL=ToolbarRadioGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["ToolbarRadioGroup.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/ToolbarRadioGroup/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ToolbarRadio = void 0;
|
|
7
|
-
|
|
8
|
-
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
|
-
const react_radio_1 = /*#__PURE__*/require("@fluentui/react-radio");
|
|
11
|
-
|
|
12
|
-
const useToolbarRadioStyles_1 = /*#__PURE__*/require("./useToolbarRadioStyles");
|
|
13
|
-
|
|
14
|
-
const ToolbarContext_1 = /*#__PURE__*/require("../Toolbar/ToolbarContext");
|
|
15
|
-
/**
|
|
16
|
-
* ToolbarRadio component is a Radio to be used inside Toolbar
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.ToolbarRadio = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
|
-
const size = ToolbarContext_1.useToolbarContext_unstable(ctx => ctx.size);
|
|
22
|
-
const state = react_radio_1.useRadio_unstable(props, ref);
|
|
23
|
-
useToolbarRadioStyles_1.useToolbarRadioStyles_unstable({
|
|
24
|
-
size,
|
|
25
|
-
...state
|
|
26
|
-
});
|
|
27
|
-
return react_radio_1.renderRadio_unstable(state);
|
|
28
|
-
});
|
|
29
|
-
exports.ToolbarRadio.displayName = 'ToolbarRadio';
|
|
30
|
-
//# sourceMappingURL=ToolbarRadio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadio/ToolbarRadio.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAClG,MAAM,IAAI,GAAG,gBAAA,CAAA,0BAAA,CAA2B,GAAG,IAAI,GAAG,CAAC,IAAtC,CAAb;EACA,MAAM,KAAK,GAAG,aAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;EACA,uBAAA,CAAA,8BAAA,CAA+B;IAAE,IAAF;IAAQ,GAAG;EAAX,CAA/B;EACA,OAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALmE,CAAvD;AAOb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport type { ToolbarRadioProps } from './ToolbarRadio.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRadio_unstable, renderRadio_unstable } from '@fluentui/react-radio';\nimport { useToolbarRadioStyles_unstable } from './useToolbarRadioStyles';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * ToolbarRadio component is a Radio to be used inside Toolbar\n */\nexport const ToolbarRadio: ForwardRefComponent<ToolbarRadioProps> = React.forwardRef((props, ref) => {\n const size = useToolbarContext_unstable(ctx => ctx.size);\n const state = useRadio_unstable(props, ref);\n useToolbarRadioStyles_unstable({ size, ...state });\n return renderRadio_unstable(state);\n}) as ForwardRefComponent<ToolbarRadioProps>;\n\nToolbarRadio.displayName = 'ToolbarRadio';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
|
-
tslib_1.__exportStar(require("./ToolbarRadio"), exports);
|
|
10
|
-
|
|
11
|
-
tslib_1.__exportStar(require("./ToolbarRadio.types"), exports);
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadio/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","sourcesContent":["export * from './ToolbarRadio';\nexport * from './ToolbarRadio.types';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useToolbarRadioStyles_unstable = void 0;
|
|
7
|
-
|
|
8
|
-
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
-
|
|
10
|
-
const react_radio_1 = /*#__PURE__*/require("@fluentui/react-radio");
|
|
11
|
-
|
|
12
|
-
const useBaseStyles = /*#__PURE__*/react_1.__styles({
|
|
13
|
-
"root": {
|
|
14
|
-
"z8tnut": "f1nbblvp",
|
|
15
|
-
"z189sj": ["fifp7yv", "f1asdtw4"],
|
|
16
|
-
"Byoj8tv": "f1ov4xf1",
|
|
17
|
-
"uwmqm3": ["f1asdtw4", "fifp7yv"]
|
|
18
|
-
}
|
|
19
|
-
}, {
|
|
20
|
-
"d": [".f1nbblvp{padding-top:0px;}", ".fifp7yv{padding-right:0px;}", ".f1asdtw4{padding-left:0px;}", ".f1ov4xf1{padding-bottom:0px;}"]
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const useSmallStyles = /*#__PURE__*/react_1.__styles({
|
|
24
|
-
"label": {
|
|
25
|
-
"Be2twd7": "fy9rknc"
|
|
26
|
-
},
|
|
27
|
-
"root": {
|
|
28
|
-
"i8kkvl": "f4px1ci"
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
"d": [".fy9rknc{font-size:var(--fontSizeBase200);}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}"]
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* Apply styling to the ToolbarRadio slots based on the state
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const useToolbarRadioStyles_unstable = state => {
|
|
39
|
-
react_radio_1.useRadioStyles_unstable(state);
|
|
40
|
-
const baseToolbarRadioStyles = useBaseStyles();
|
|
41
|
-
const toolbarRadioSmallStyles = useSmallStyles();
|
|
42
|
-
|
|
43
|
-
if (state.label) {
|
|
44
|
-
state.label.className = react_1.mergeClasses(state.label.className, state.size === 'small' && toolbarRadioSmallStyles.label);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
state.root.className = react_1.mergeClasses(state.root.className, baseToolbarRadioStyles.root, state.size === 'small' && toolbarRadioSmallStyles.root);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
exports.useToolbarRadioStyles_unstable = useToolbarRadioStyles_unstable;
|
|
51
|
-
//# sourceMappingURL=useToolbarRadioStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadio/useToolbarRadioStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGA,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;;AAMA,MAAM,cAAc,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAvB;AASA;;AAEG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAA6B;EACzE,aAAA,CAAA,uBAAA,CAAwB,KAAxB;EACA,MAAM,sBAAsB,GAAG,aAAa,EAA5C;EACA,MAAM,uBAAuB,GAAG,cAAc,EAA9C;;EACA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,OAAA,CAAA,YAAA,CACtB,KAAK,CAAC,KAAN,CAAY,SADU,EAEtB,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,uBAAuB,CAAC,KAF5B,CAAxB;EAID;;EACD,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,KAAK,CAAC,IAAN,CAAW,SADU,EAErB,sBAAsB,CAAC,IAFF,EAGrB,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,uBAAuB,CAAC,IAH7B,CAAvB;AAKD,CAfM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { useRadioStyles_unstable } from '@fluentui/react-radio';\nimport { ToolbarRadioState } from './ToolbarRadio.types';\n\nconst useBaseStyles = makeStyles({\n root: {\n ...shorthands.padding('0px'),\n },\n});\n\nconst useSmallStyles = makeStyles({\n label: {\n fontSize: 'var(--fontSizeBase200)',\n },\n root: {\n columnGap: '8px',\n },\n});\n\n/**\n * Apply styling to the ToolbarRadio slots based on the state\n */\nexport const useToolbarRadioStyles_unstable = (state: ToolbarRadioState) => {\n useRadioStyles_unstable(state);\n const baseToolbarRadioStyles = useBaseStyles();\n const toolbarRadioSmallStyles = useSmallStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n state.label.className,\n state.size === 'small' && toolbarRadioSmallStyles.label,\n );\n }\n state.root.className = mergeClasses(\n state.root.className,\n baseToolbarRadioStyles.root,\n state.size === 'small' && toolbarRadioSmallStyles.root,\n );\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ToolbarRadioGroup = void 0;
|
|
7
|
-
|
|
8
|
-
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
|
-
const react_radio_1 = /*#__PURE__*/require("@fluentui/react-radio");
|
|
11
|
-
|
|
12
|
-
const useToolbarRadioGroupStyles_1 = /*#__PURE__*/require("./useToolbarRadioGroupStyles");
|
|
13
|
-
|
|
14
|
-
const useRadioGroupContextValues_1 = /*#__PURE__*/require("./contexts/useRadioGroupContextValues");
|
|
15
|
-
/**
|
|
16
|
-
* ToolbarRadioGroup component is a RadioGroup to be used inside Toolbar
|
|
17
|
-
* which will keep always horizontal layout
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
exports.ToolbarRadioGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
22
|
-
const state = react_radio_1.useRadioGroup_unstable({
|
|
23
|
-
layout: 'horizontal',
|
|
24
|
-
...props
|
|
25
|
-
}, ref);
|
|
26
|
-
const contextValues = useRadioGroupContextValues_1.useRadioGroupContextValues(state);
|
|
27
|
-
useToolbarRadioGroupStyles_1.useToolbarRadioGroupStyles_unstable(state);
|
|
28
|
-
return react_radio_1.renderRadioGroup_unstable(state, contextValues);
|
|
29
|
-
});
|
|
30
|
-
exports.ToolbarRadioGroup.displayName = 'ToolbarRadioGroup';
|
|
31
|
-
//# sourceMappingURL=ToolbarRadioGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadioGroup/ToolbarRadioGroup.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,4BAAA,gBAAA,OAAA,CAAA,8BAAA,CAAA;;AACA,MAAA,4BAAA,gBAAA,OAAA,CAAA,uCAAA,CAAA;AAEA;;;AAGG;;;AACU,OAAA,CAAA,iBAAA,gBAAiE,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5G,MAAM,KAAK,GAAG,aAAA,CAAA,sBAAA,CAAuB;IAAE,MAAM,EAAE,YAAV;IAAwB,GAAG;EAA3B,CAAvB,EAA2D,GAA3D,CAAd;EACA,MAAM,aAAa,GAAG,4BAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAtB;EACA,4BAAA,CAAA,mCAAA,CAAoC,KAApC;EACA,OAAO,aAAA,CAAA,yBAAA,CAA0B,KAA1B,EAAiC,aAAjC,CAAP;AACD,CAL6E,CAAjE;AAOb,OAAA,CAAA,iBAAA,CAAkB,WAAlB,GAAgC,mBAAhC","sourcesContent":["import * as React from 'react';\nimport type { ToolbarRadioGroupProps } from './ToolbarRadioGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRadioGroup_unstable, renderRadioGroup_unstable } from '@fluentui/react-radio';\nimport { useToolbarRadioGroupStyles_unstable } from './useToolbarRadioGroupStyles';\nimport { useRadioGroupContextValues } from './contexts/useRadioGroupContextValues';\n\n/**\n * ToolbarRadioGroup component is a RadioGroup to be used inside Toolbar\n * which will keep always horizontal layout\n */\nexport const ToolbarRadioGroup: ForwardRefComponent<ToolbarRadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable({ layout: 'horizontal', ...props }, ref);\n const contextValues = useRadioGroupContextValues(state);\n useToolbarRadioGroupStyles_unstable(state);\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nToolbarRadioGroup.displayName = 'ToolbarRadioGroup';\n"],"sourceRoot":"../src/"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useRadioGroupContextValues = void 0;
|
|
7
|
-
|
|
8
|
-
const useRadioGroupContextValues = state => {
|
|
9
|
-
const {
|
|
10
|
-
name,
|
|
11
|
-
value,
|
|
12
|
-
defaultValue,
|
|
13
|
-
disabled,
|
|
14
|
-
layout,
|
|
15
|
-
required
|
|
16
|
-
} = state;
|
|
17
|
-
const radioGroup = {
|
|
18
|
-
name,
|
|
19
|
-
value,
|
|
20
|
-
defaultValue,
|
|
21
|
-
disabled,
|
|
22
|
-
layout,
|
|
23
|
-
required
|
|
24
|
-
};
|
|
25
|
-
return {
|
|
26
|
-
radioGroup
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
exports.useRadioGroupContextValues = useRadioGroupContextValues;
|
|
31
|
-
//# sourceMappingURL=useRadioGroupContextValues.js.map
|
package/lib-commonjs/components/ToolbarRadioGroup/contexts/useRadioGroupContextValues.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadioGroup/contexts/useRadioGroupContextValues.ts"],"names":[],"mappings":";;;;;;;AAMO,MAAM,0BAA0B,GAAI,KAAD,IAA2D;EACnG,MAAM;IAAE,IAAF;IAAQ,KAAR;IAAe,YAAf;IAA6B,QAA7B;IAAuC,MAAvC;IAA+C;EAA/C,IAA4D,KAAlE;EAEA,MAAM,UAAU,GAA2B;IACzC,IADyC;IAEzC,KAFyC;IAGzC,YAHyC;IAIzC,QAJyC;IAKzC,MALyC;IAMzC;EANyC,CAA3C;EASA,OAAO;IAAE;EAAF,CAAP;AACD,CAbM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n ToolbarRadioGroupState,\n} from '../ToolbarRadioGroup.types';\n\nexport const useRadioGroupContextValues = (state: ToolbarRadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n\n const radioGroup: RadioGroupContextValue = {\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n };\n\n return { radioGroup };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
|
-
tslib_1.__exportStar(require("./ToolbarRadioGroup"), exports);
|
|
10
|
-
|
|
11
|
-
tslib_1.__exportStar(require("./ToolbarRadioGroup.types"), exports);
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadioGroup/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './ToolbarRadioGroup';\nexport * from './ToolbarRadioGroup.types';\n"],"sourceRoot":"../src/"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useToolbarRadioGroupStyles_unstable = void 0;
|
|
7
|
-
|
|
8
|
-
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
-
|
|
10
|
-
const react_radio_1 = /*#__PURE__*/require("@fluentui/react-radio");
|
|
11
|
-
|
|
12
|
-
const useBaseStyles = /*#__PURE__*/react_1.__styles({
|
|
13
|
-
"root": {
|
|
14
|
-
"mc9l5x": "f22iagw",
|
|
15
|
-
"Bt984gj": "f122n59",
|
|
16
|
-
"i8kkvl": "f4px1ci",
|
|
17
|
-
"Belr9w4": "fn67r4l"
|
|
18
|
-
}
|
|
19
|
-
}, {
|
|
20
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4px1ci{-webkit-column-gap:8px;column-gap:8px;}", ".fn67r4l{row-gap:8px;}"]
|
|
21
|
-
}); // const useSmallStyles = makeStyles({
|
|
22
|
-
// label: {
|
|
23
|
-
// fontSize: 'var(--fontSizeBase200)',
|
|
24
|
-
// },
|
|
25
|
-
// });
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Apply styling to the ToolbarRadio slots based on the state
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const useToolbarRadioGroupStyles_unstable = state => {
|
|
33
|
-
react_radio_1.useRadioGroupStyles_unstable(state);
|
|
34
|
-
const baseToolbarRadioStyles = useBaseStyles();
|
|
35
|
-
state.root.className = react_1.mergeClasses(state.root.className, baseToolbarRadioStyles.root);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
exports.useToolbarRadioGroupStyles_unstable = useToolbarRadioGroupStyles_unstable;
|
|
39
|
-
//# sourceMappingURL=useToolbarRadioGroupStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["components/ToolbarRadioGroup/useToolbarRadioGroupStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGA,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB,C,CAQA;AACA;AACA;AACA;AACA;;AAEA;;AAEG;;;AACI,MAAM,mCAAmC,GAAI,KAAD,IAAkC;EACnF,aAAA,CAAA,4BAAA,CAA6B,KAA7B;EACA,MAAM,sBAAsB,GAAG,aAAa,EAA5C;EAEA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,KAAK,CAAC,IAAN,CAAW,SAAxB,EAAmC,sBAAsB,CAAC,IAA1D,CAAvB;AACD,CALM;;AAAM,OAAA,CAAA,mCAAA,GAAmC,mCAAnC","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { useRadioGroupStyles_unstable } from '@fluentui/react-radio';\nimport { ToolbarRadioGroupState } from './ToolbarRadioGroup.types';\n\nconst useBaseStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap('8px'),\n },\n});\n\n// const useSmallStyles = makeStyles({\n// label: {\n// fontSize: 'var(--fontSizeBase200)',\n// },\n// });\n\n/**\n * Apply styling to the ToolbarRadio slots based on the state\n */\nexport const useToolbarRadioGroupStyles_unstable = (state: ToolbarRadioGroupState) => {\n useRadioGroupStyles_unstable(state);\n const baseToolbarRadioStyles = useBaseStyles();\n\n state.root.className = mergeClasses(state.root.className, baseToolbarRadioStyles.root);\n};\n"],"sourceRoot":"../src/"}
|