@fluentui/react-toolbar 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0
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.md +54 -14
- package/README.md +12 -0
- package/lib/components/Toolbar/Toolbar.js.map +1 -1
- package/lib/components/Toolbar/Toolbar.module.css +24 -0
- package/lib/components/Toolbar/Toolbar.types.js.map +1 -1
- package/lib/components/Toolbar/ToolbarContext.js.map +1 -1
- package/lib/components/Toolbar/index.js.map +1 -1
- package/lib/components/Toolbar/renderToolbar.js +2 -2
- package/lib/components/Toolbar/renderToolbar.js.map +1 -1
- package/lib/components/Toolbar/useToolbar.js.map +1 -1
- package/lib/components/Toolbar/useToolbarContextValues.js.map +1 -1
- package/lib/components/Toolbar/useToolbarStyles.styles.css.js +9 -0
- package/lib/components/Toolbar/useToolbarStyles.styles.css.js.map +1 -0
- package/lib/components/Toolbar/useToolbarStyles.styles.raw.css.js +9 -0
- package/lib/components/Toolbar/useToolbarStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Toolbar/useToolbarStyles.styles.raw.js.map +1 -1
- package/lib/components/ToolbarButton/ToolbarButton.js.map +1 -1
- package/lib/components/ToolbarButton/ToolbarButton.module.css +10 -0
- package/lib/components/ToolbarButton/ToolbarButton.types.js.map +1 -1
- package/lib/components/ToolbarButton/index.js.map +1 -1
- package/lib/components/ToolbarButton/useToolbarButton.js.map +1 -1
- package/lib/components/ToolbarButton/useToolbarButtonStyles.styles.css.js +13 -0
- package/lib/components/ToolbarButton/useToolbarButtonStyles.styles.css.js.map +1 -0
- package/lib/components/ToolbarButton/useToolbarButtonStyles.styles.raw.css.js +13 -0
- package/lib/components/ToolbarButton/useToolbarButtonStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToolbarButton/useToolbarButtonStyles.styles.raw.js.map +1 -1
- package/lib/components/ToolbarDivider/ToolbarDivider.js.map +1 -1
- package/lib/components/ToolbarDivider/ToolbarDivider.module.css +12 -0
- package/lib/components/ToolbarDivider/ToolbarDivider.types.js.map +1 -1
- package/lib/components/ToolbarDivider/index.js.map +1 -1
- package/lib/components/ToolbarDivider/useToolbarDivider.js.map +1 -1
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.styles.css.js +10 -0
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.styles.css.js.map +1 -0
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.styles.raw.css.js +10 -0
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToolbarDivider/useToolbarDividerStyles.styles.raw.js.map +1 -1
- package/lib/components/ToolbarGroup/ToolbarGroup.js.map +1 -1
- package/lib/components/ToolbarGroup/ToolbarGroup.module.css +11 -0
- package/lib/components/ToolbarGroup/ToolbarGroup.types.js.map +1 -1
- package/lib/components/ToolbarGroup/index.js.map +1 -1
- package/lib/components/ToolbarGroup/renderToolbarGroup.js +2 -2
- package/lib/components/ToolbarGroup/renderToolbarGroup.js.map +1 -1
- package/lib/components/ToolbarGroup/useToolbarGroup.js.map +1 -1
- package/lib/components/ToolbarGroup/useToolbarGroupStyles.styles.css.js +9 -0
- package/lib/components/ToolbarGroup/useToolbarGroupStyles.styles.css.js.map +1 -0
- package/lib/components/ToolbarGroup/useToolbarGroupStyles.styles.raw.css.js +9 -0
- package/lib/components/ToolbarGroup/useToolbarGroupStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToolbarGroup/useToolbarGroupStyles.styles.raw.js.map +1 -1
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.js.map +1 -1
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.module.css +10 -0
- package/lib/components/ToolbarRadioButton/ToolbarRadioButton.types.js.map +1 -1
- package/lib/components/ToolbarRadioButton/index.js.map +1 -1
- package/lib/components/ToolbarRadioButton/useToolbarRadioButton.js.map +1 -1
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.css.js +14 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.css.js.map +1 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.css.js +14 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.js.map +1 -1
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.js.map +1 -1
- package/lib/components/ToolbarRadioGroup/ToolbarRadioGroup.types.js.map +1 -1
- package/lib/components/ToolbarRadioGroup/index.js.map +1 -1
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.js.map +1 -1
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.module.css +10 -0
- package/lib/components/ToolbarToggleButton/ToolbarToggleButton.types.js.map +1 -1
- package/lib/components/ToolbarToggleButton/index.js.map +1 -1
- package/lib/components/ToolbarToggleButton/useToolbarToggleButton.js.map +1 -1
- package/lib/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.css.js +14 -0
- package/lib/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.css.js.map +1 -0
- package/lib/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.raw.css.js +14 -0
- package/lib/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/Toolbar.cjs +9 -9
- package/lib-commonjs/Toolbar.cjs.map +1 -1
- package/lib-commonjs/ToolbarButton.cjs +5 -5
- package/lib-commonjs/ToolbarDivider.cjs +5 -5
- package/lib-commonjs/ToolbarGroup.cjs +6 -6
- package/lib-commonjs/ToolbarRadioButton.cjs +5 -5
- package/lib-commonjs/ToolbarToggleButton.cjs +5 -5
- package/lib-commonjs/components/Toolbar/Toolbar.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/Toolbar.module.css +24 -0
- package/lib-commonjs/components/Toolbar/Toolbar.types.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/ToolbarContext.cjs +3 -3
- package/lib-commonjs/components/Toolbar/ToolbarContext.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/index.cjs +9 -9
- package/lib-commonjs/components/Toolbar/index.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/renderToolbar.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbar.cjs +4 -4
- package/lib-commonjs/components/Toolbar/useToolbar.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarContextValues.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/Toolbar/useToolbarStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarButton/ToolbarButton.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarButton/ToolbarButton.module.css +10 -0
- package/lib-commonjs/components/ToolbarButton/ToolbarButton.types.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarButton/index.cjs +5 -5
- package/lib-commonjs/components/ToolbarButton/index.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarButton/useToolbarButton.cjs +3 -3
- package/lib-commonjs/components/ToolbarButton/useToolbarButton.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarButton/useToolbarButtonStyles.styles.css.cjs +24 -0
- package/lib-commonjs/components/ToolbarButton/useToolbarButtonStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarButton/useToolbarButtonStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarButton/useToolbarButtonStyles.styles.raw.css.cjs +24 -0
- package/lib-commonjs/components/ToolbarButton/useToolbarButtonStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.module.css +12 -0
- package/lib-commonjs/components/ToolbarDivider/ToolbarDivider.types.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/index.cjs +5 -5
- package/lib-commonjs/components/ToolbarDivider/index.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/useToolbarDivider.cjs +3 -3
- package/lib-commonjs/components/ToolbarDivider/useToolbarDivider.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.styles.css.cjs +21 -0
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.styles.raw.css.cjs +21 -0
- package/lib-commonjs/components/ToolbarDivider/useToolbarDividerStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarGroup/ToolbarGroup.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/ToolbarGroup.module.css +11 -0
- package/lib-commonjs/components/ToolbarGroup/ToolbarGroup.types.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/index.cjs +7 -7
- package/lib-commonjs/components/ToolbarGroup/index.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/renderToolbarGroup.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroup.cjs +3 -3
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroup.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/ToolbarGroup/useToolbarGroupStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.module.css +10 -0
- package/lib-commonjs/components/ToolbarRadioButton/ToolbarRadioButton.types.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/index.cjs +5 -5
- package/lib-commonjs/components/ToolbarRadioButton/index.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.cjs +3 -3
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButton.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.css.cjs +25 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.css.cjs +25 -0
- package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarRadioGroup/ToolbarRadioGroup.types.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarRadioGroup/index.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/ToolbarToggleButton.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/ToolbarToggleButton.module.css +10 -0
- package/lib-commonjs/components/ToolbarToggleButton/ToolbarToggleButton.types.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/index.cjs +5 -5
- package/lib-commonjs/components/ToolbarToggleButton/index.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButton.cjs +3 -3
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButton.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.css.cjs +25 -0
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.raw.css.cjs +25 -0
- package/lib-commonjs/components/ToolbarToggleButton/useToolbarToggleButtonStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/index.cjs +31 -31
- package/lib-commonjs/index.cjs.map +1 -1
- package/package.json +17 -17
- package/dist/metadata/api/api-root.json +0 -1
- package/dist/metadata/index.json +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useToolbarDividerStyles_unstable", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return useToolbarDividerStyles_unstable;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
13
|
+
const _clsx = require("clsx");
|
|
14
|
+
const _reactdivider = require("@fluentui/react-divider");
|
|
15
|
+
const _ToolbarDividermodulecss = /*#__PURE__*/ _interop_require_default._(require("./ToolbarDivider.module.css"));
|
|
16
|
+
const useToolbarDividerStyles_unstable = (state)=>{
|
|
17
|
+
(0, _reactdivider.useDividerStyles_unstable)(state);
|
|
18
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
19
|
+
state.root.className = (0, _clsx.clsx)(_ToolbarDividermodulecss.default.root, !state.vertical && _ToolbarDividermodulecss.default.horizontal, state.root.className);
|
|
20
|
+
return state;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarDivider/useToolbarDividerStyles.styles.css.ts"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport { useDividerStyles_unstable } from '@fluentui/react-divider';\nimport type { ToolbarDividerState } from './ToolbarDivider.types';\nimport styles from './ToolbarDivider.module.css';\n\nexport const useToolbarDividerStyles_unstable = (state: ToolbarDividerState): ToolbarDividerState => {\n useDividerStyles_unstable(state);\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(styles.root, !state.vertical && styles.horizontal, state.root.className);\n return state;\n};\n"],"names":["clsx","useDividerStyles_unstable","styles","useToolbarDividerStyles_unstable","state","root","className","vertical","horizontal"],"mappings":"AAAA;;;;;;;;;;;;sBAEqB,OAAO;8BACc,0BAA0B;kFAEjD,8BAA8B;AAE1C,MAAMG,mCAAmC,CAACC;QAC/CH,uCAAAA,EAA0BG;IAC1B,oDAAoD;IACpDA,MAAMC,IAAI,CAACC,SAAS,OAAGN,UAAAA,EAAKE,gCAAAA,CAAOG,IAAI,EAAE,CAACD,MAAMG,QAAQ,IAAIL,gCAAAA,CAAOM,UAAU,EAAEJ,MAAMC,IAAI,CAACC,SAAS;IACnG,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarDivider/useToolbarDividerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { useDividerStyles_unstable } from '@fluentui/react-divider';\nimport type { ToolbarDividerState } from './ToolbarDivider.types';\n\nconst useBaseStyles = makeStyles({\n // Base styles\n root: {\n display: 'inline-flex',\n maxWidth: '1px',\n padding: '0 12px',\n },\n vertical: {\n maxWidth: 'initial',\n },\n});\n\n/**\n * Apply styling to the ToolbarDivider slots based on the state\n */\nexport const useToolbarDividerStyles_unstable = (state: ToolbarDividerState): ToolbarDividerState => {\n useDividerStyles_unstable(state);\n const { vertical } = state;\n const toolbarDividerStyles = useBaseStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n toolbarDividerStyles.root,\n !vertical && toolbarDividerStyles.vertical,\n state.root.className,\n );\n return state;\n};\n"],"names":["makeStyles","mergeClasses","useDividerStyles_unstable","useBaseStyles","root","display","maxWidth","padding","vertical","useToolbarDividerStyles_unstable","state","toolbarDividerStyles","className"],"mappings":"AAAA;;;;;+BAqBaS;;;;;;uBAnB4B,iBAAiB;8BAChB,0BAA0B;AAGpE,MAAMN,oBAAgBH,iBAAAA,EAAW;IAC/B,cAAc;IACdI,MAAM;QACJC,SAAS;QACTC,UAAU;QACVC,SAAS;IACX;IACAC,UAAU;QACRF,UAAU;IACZ;AACF;AAKO,yCAAyC,CAACI;QAC/CR,uCAAAA,EAA0BQ;IAC1B,MAAM,EAAEF,QAAQ,EAAE,GAAGE;IACrB,MAAMC,uBAAuBR;IAC7B,oDAAoD;IACpDO,MAAMN,IAAI,CAACQ,SAAS,GAAGX,uBAAAA,EACrBU,qBAAqBP,IAAI,EACzB,CAACI,YAAYG,qBAAqBH,QAAQ,EAC1CE,MAAMN,IAAI,CAACQ,SAAS;IAEtB,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useToolbarDividerStyles_unstable", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return useToolbarDividerStyles_unstable;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
13
|
+
const _clsx = require("clsx");
|
|
14
|
+
const _reactdivider = require("@fluentui/react-divider");
|
|
15
|
+
const _ToolbarDividermodulecss = /*#__PURE__*/ _interop_require_default._(require("./ToolbarDivider.module.css"));
|
|
16
|
+
const useToolbarDividerStyles_unstable = (state)=>{
|
|
17
|
+
(0, _reactdivider.useDividerStyles_unstable)(state);
|
|
18
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
19
|
+
state.root.className = (0, _clsx.clsx)(_ToolbarDividermodulecss.default.root, !state.vertical && _ToolbarDividermodulecss.default.horizontal, state.root.className);
|
|
20
|
+
return state;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarDivider/useToolbarDividerStyles.styles.css.ts"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport { useDividerStyles_unstable } from '@fluentui/react-divider';\nimport type { ToolbarDividerState } from './ToolbarDivider.types';\nimport styles from './ToolbarDivider.module.css';\n\nexport const useToolbarDividerStyles_unstable = (state: ToolbarDividerState): ToolbarDividerState => {\n useDividerStyles_unstable(state);\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(styles.root, !state.vertical && styles.horizontal, state.root.className);\n return state;\n};\n"],"names":["clsx","useDividerStyles_unstable","styles","useToolbarDividerStyles_unstable","state","root","className","vertical","horizontal"],"mappings":"AAAA;;;;;;;;;;;;sBAEqB,OAAO;8BACc,0BAA0B;kFAEjD,8BAA8B;AAE1C,MAAMG,mCAAmC,CAACC;QAC/CH,uCAAAA,EAA0BG;IAC1B,oDAAoD;IACpDA,MAAMC,IAAI,CAACC,SAAS,OAAGN,UAAAA,EAAKE,gCAAAA,CAAOG,IAAI,EAAE,CAACD,MAAMG,QAAQ,IAAIL,gCAAAA,CAAOM,UAAU,EAAEJ,MAAMC,IAAI,CAACC,SAAS;IACnG,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/ToolbarGroup.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ToolbarGroupProps } from './ToolbarGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToolbarGroup_unstable } from './useToolbarGroup';\nimport { useToolbarGroupStyles_unstable } from './useToolbarGroupStyles.styles';\nimport { renderToolbarGroup_unstable } from './renderToolbarGroup';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToolbarGroup component is a Button to be used inside Toolbar\n * which will respect toolbar props such as `size`\n */\nexport const ToolbarGroup: ForwardRefComponent<ToolbarGroupProps> = React.forwardRef((props, ref) => {\n const state = useToolbarGroup_unstable(props, ref);\n\n useToolbarGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToolbarGroupStyles_unstable')(state);\n\n return renderToolbarGroup_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToolbarGroupProps>;\n\nToolbarGroup.displayName = 'ToolbarGroup';\n"],"names":["React","useToolbarGroup_unstable","useToolbarGroupStyles_unstable","renderToolbarGroup_unstable","useCustomStyleHook_unstable","ToolbarGroup","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;iCAGU,uBAAoB;6CACd,oCAAiC;oCACpC,0BAAuB;qCACvB,kCAAkC;AAMvE,MAAMK,eAAAA,WAAAA,GAAuDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,YAAQR,yCAAAA,EAAyBM,OAAOC;QAE9CN,2DAAAA,EAA+BO;QAE/BL,gDAAAA,EAA4B,kCAAkCK;IAE9D,WAAON,+CAAAA,EAA4BM;AACnC,0FAA0F;AAC5F,GAA6C;AAE7CJ,aAAaK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/ToolbarGroup.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ToolbarGroupSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * ToolbarButton Props\n */\nexport type ToolbarGroupProps = ComponentProps<ToolbarGroupSlots>;\n\n/**\n * State used in rendering ToolbarButton\n */\nexport type ToolbarGroupState = ComponentState<ToolbarGroupSlots> & {\n vertical?: boolean;\n};\n"],"names":[],"mappings":"AAWA;;CAEC,GACD,WAEE"}
|
|
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
ToolbarGroup
|
|
12
|
+
get ToolbarGroup () {
|
|
13
13
|
return _ToolbarGroup.ToolbarGroup;
|
|
14
14
|
},
|
|
15
|
-
renderToolbarGroup_unstable
|
|
15
|
+
get renderToolbarGroup_unstable () {
|
|
16
16
|
return _renderToolbarGroup.renderToolbarGroup_unstable;
|
|
17
17
|
},
|
|
18
|
-
toolbarGroupClassNames
|
|
18
|
+
get toolbarGroupClassNames () {
|
|
19
19
|
return _useToolbarGroupStylesstyles.toolbarGroupClassNames;
|
|
20
20
|
},
|
|
21
|
-
useToolbarGroupBase_unstable
|
|
21
|
+
get useToolbarGroupBase_unstable () {
|
|
22
22
|
return _useToolbarGroup.useToolbarGroupBase_unstable;
|
|
23
23
|
},
|
|
24
|
-
useToolbarGroupStyles_unstable
|
|
24
|
+
get useToolbarGroupStyles_unstable () {
|
|
25
25
|
return _useToolbarGroupStylesstyles.useToolbarGroupStyles_unstable;
|
|
26
26
|
},
|
|
27
|
-
useToolbarGroup_unstable
|
|
27
|
+
get useToolbarGroup_unstable () {
|
|
28
28
|
return _useToolbarGroup.useToolbarGroup_unstable;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/index.ts"],"sourcesContent":["export { ToolbarGroup } from './ToolbarGroup';\nexport type { ToolbarGroupProps, ToolbarGroupSlots, ToolbarGroupState } from './ToolbarGroup.types';\nexport { useToolbarGroup_unstable, useToolbarGroupBase_unstable } from './useToolbarGroup';\nexport { toolbarGroupClassNames, useToolbarGroupStyles_unstable } from './useToolbarGroupStyles.styles';\nexport { renderToolbarGroup_unstable } from './renderToolbarGroup';\n"],"names":["ToolbarGroup","useToolbarGroup_unstable","useToolbarGroupBase_unstable","toolbarGroupClassNames","useToolbarGroupStyles_unstable","renderToolbarGroup_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;eAIZK,+CAA2B;;;eAD3BF,mDAAsB;;;eADID,6CAA4B;;;eAC9BE,2DAA8B;;;eADtDH,yCAAwB;;;8BAFJ,oBAAiB;iCAEyB,uBAAoB;6CACpB,oCAAiC;oCAC5D,0BAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/renderToolbarGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ToolbarGroupState, ToolbarGroupSlots } from './ToolbarGroup.types';\n\n/**\n * Render the final JSX of ToolbarGroup\n */\nexport const renderToolbarGroup_unstable = (state: ToolbarGroupState): JSXElement => {\n assertSlots<ToolbarGroupSlots>(state);\n\n return <state.root>{state.root.children}</state.root>;\n};\n"],"names":["assertSlots","renderToolbarGroup_unstable","state","root","children"],"mappings":";;;;;;;;;;;gCACA,gDAAiD,GACjD,SAASA,WAAW,QAAQ,4BAA4B;AAOjD,MAAMC,8BAA8B,CAACC;QAC1CF,2BAAAA,EAA+BE;IAE/B,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA;kBAAED,MAAMC,IAAI,CAACC,QAAQ;;AACzC,EAAE"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
useToolbarGroupBase_unstable
|
|
13
|
+
get useToolbarGroupBase_unstable () {
|
|
14
14
|
return useToolbarGroupBase_unstable;
|
|
15
15
|
},
|
|
16
|
-
useToolbarGroup_unstable
|
|
16
|
+
get useToolbarGroup_unstable () {
|
|
17
17
|
return useToolbarGroup_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/useToolbarGroup.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\n\nimport type { ToolbarGroupProps, ToolbarGroupState } from './ToolbarGroup.types';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\n\n/**\n * Given user props, defines default props for the Group\n * @param props - User provided props to the Group component.\n * @param ref - User provided ref to be passed to the Group component.\n */\nexport const useToolbarGroup_unstable = (\n props: ToolbarGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): ToolbarGroupState => {\n return useToolbarGroupBase_unstable(props, ref);\n};\n\n/**\n * Base hook that builds Toolbar Group state for behavior and structure only.\n * It does not provide any design-related defaults.\n *\n * @internal\n * @param props - User provided props to the Group component.\n * @param ref - User provided ref to be passed to the Group component.\n */\nexport const useToolbarGroupBase_unstable = (\n props: ToolbarGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): ToolbarGroupState => {\n const vertical = useToolbarContext_unstable(ctx => ctx.vertical);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps<React.HTMLAttributes<HTMLDivElement>>('div', {\n ref,\n role: 'presentation',\n ...props,\n }),\n { elementType: 'div' },\n ),\n vertical,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useToolbarContext_unstable","useToolbarGroup_unstable","props","ref","useToolbarGroupBase_unstable","vertical","ctx","components","root","always","role","elementType"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;gCAK+C,4BAA4B;gCAChC,+BAA4B;AAOhE,MAAMG,2BAA2B,CACtCC,OACAC;IAEA,OAAOC,6BAA6BF,OAAOC;AAC7C,EAAE;AAUK,MAAMC,+BAA+B,CAC1CF,OACAC;IAEA,MAAME,eAAWL,0CAAAA,EAA2BM,CAAAA,MAAOA,IAAID,QAAQ;IAE/D,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAMT,oBAAAA,CAAKU,MAAM,CACfX,4CAAAA,EAA+D,OAAO;YACpEK;YACAO,MAAM;YACN,GAAGR,KAAK;QACV,IACA;YAAES,aAAa;QAAM;QAEvBN;IACF;AACF,EAAE"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
toolbarGroupClassNames
|
|
13
|
+
get toolbarGroupClassNames () {
|
|
14
14
|
return toolbarGroupClassNames;
|
|
15
15
|
},
|
|
16
|
-
useToolbarGroupStyles_unstable
|
|
16
|
+
get useToolbarGroupStyles_unstable () {
|
|
17
17
|
return useToolbarGroupStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useToolbarGroupStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nexport const toolbarGroupClassNames = {\n root: 'fui-ToolbarGroup'\n};\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center'\n },\n vertical: {\n flexDirection: 'column',\n width: 'fit-content'\n }\n});\n/**\n * Apply styling to the Toolbar slots based on the state\n */ export const useToolbarGroupStyles_unstable = (state)=>{\n const { vertical } = state;\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(toolbarGroupClassNames.root, styles.root, vertical && styles.vertical, state.root.className);\n return state;\n};\n"],"names":["__styles","mergeClasses","toolbarGroupClassNames","root","useStyles","mc9l5x","Bt984gj","vertical","Beiy3e4","a9b677","d","useToolbarGroupStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["useToolbarGroupStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nexport const toolbarGroupClassNames = {\n root: 'fui-ToolbarGroup'\n};\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center'\n },\n vertical: {\n flexDirection: 'column',\n width: 'fit-content'\n }\n});\n/**\n * Apply styling to the Toolbar slots based on the state\n */ export const useToolbarGroupStyles_unstable = (state)=>{\n const { vertical } = state;\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(toolbarGroupClassNames.root, styles.root, vertical && styles.vertical, state.root.className);\n return state;\n};\n"],"names":["__styles","mergeClasses","toolbarGroupClassNames","root","useStyles","mc9l5x","Bt984gj","vertical","Beiy3e4","a9b677","d","useToolbarGroupStyles_unstable","state","styles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;QAECE,sBAAsB;;;QAelBS,8BAA8B;;;;uBAhBN,gBAAgB;AAClD,+BAA+B;IAClCR,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGJ,eAAA,EAAA;IAAAG,IAAA,EAAA;QAAAE,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,QAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CASjB,CAAC;AAGS,wCAAwCE,KAAK,IAAG;IACvD,MAAM,EAAEL,QAAAA,EAAU,GAAGK,KAAK;IAC1B,MAAMC,MAAM,GAAGT,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAQ,KAAK,CAACT,IAAI,CAACW,SAAS,OAAGb,mBAAY,EAACC,sBAAsB,CAACC,IAAI,EAAEU,MAAM,CAACV,IAAI,EAAEI,QAAQ,IAAIM,MAAM,CAACN,QAAQ,EAAEK,KAAK,CAACT,IAAI,CAACW,SAAS,CAAC;IAChI,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get toolbarGroupClassNames () {
|
|
13
|
+
return toolbarGroupClassNames;
|
|
14
|
+
},
|
|
15
|
+
get useToolbarGroupStyles_unstable () {
|
|
16
|
+
return useToolbarGroupStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _clsx = require("clsx");
|
|
21
|
+
const _ToolbarGroupmodulecss = /*#__PURE__*/ _interop_require_default._(require("./ToolbarGroup.module.css"));
|
|
22
|
+
const toolbarGroupClassNames = {
|
|
23
|
+
root: 'fui-ToolbarGroup'
|
|
24
|
+
};
|
|
25
|
+
const useToolbarGroupStyles_unstable = (state)=>{
|
|
26
|
+
state.root.className = (0, _clsx.clsx)(toolbarGroupClassNames.root, _ToolbarGroupmodulecss.default.root, state.vertical && _ToolbarGroupmodulecss.default.vertical, state.root.className);
|
|
27
|
+
return state;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/useToolbarGroupStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToolbarGroupState, ToolbarGroupSlots } from './ToolbarGroup.types';\nimport styles from './ToolbarGroup.module.css';\n\nexport const toolbarGroupClassNames: SlotClassNames<ToolbarGroupSlots> = {\n root: 'fui-ToolbarGroup',\n};\n\nexport const useToolbarGroupStyles_unstable = (state: ToolbarGroupState): ToolbarGroupState => {\n state.root.className = clsx(\n toolbarGroupClassNames.root,\n styles.root,\n state.vertical && styles.vertical,\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","toolbarGroupClassNames","root","useToolbarGroupStyles_unstable","state","className","vertical"],"mappings":";;;;;;;;;;;QAKaE;;;;;;;;sBALQ,OAAO;gFAGT,4BAA4B;AAExC,+BAAkE;IACvEC,MAAM;AACR,EAAE;AAEK,MAAMC,iCAAiC,CAACC;IAC7CA,MAAMF,IAAI,CAACG,SAAS,OAAGN,UAAAA,EACrBE,uBAAuBC,IAAI,EAC3BF,8BAAAA,CAAOE,IAAI,EACXE,MAAME,QAAQ,IAAIN,8BAAAA,CAAOM,QAAQ,EACjCF,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
toolbarGroupClassNames
|
|
13
|
+
get toolbarGroupClassNames () {
|
|
14
14
|
return toolbarGroupClassNames;
|
|
15
15
|
},
|
|
16
|
-
useToolbarGroupStyles_unstable
|
|
16
|
+
get useToolbarGroupStyles_unstable () {
|
|
17
17
|
return useToolbarGroupStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/useToolbarGroupStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\n\nimport type { ToolbarGroupSlots, ToolbarGroupState } from './ToolbarGroup.types';\n\nexport const toolbarGroupClassNames: SlotClassNames<ToolbarGroupSlots> = {\n root: 'fui-ToolbarGroup',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n },\n vertical: {\n flexDirection: 'column',\n width: 'fit-content',\n },\n});\n\n/**\n * Apply styling to the Toolbar slots based on the state\n */\nexport const useToolbarGroupStyles_unstable = (state: ToolbarGroupState): ToolbarGroupState => {\n const { vertical } = state;\n const styles = useStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n toolbarGroupClassNames.root,\n styles.root,\n vertical && styles.vertical,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","toolbarGroupClassNames","root","useStyles","display","alignItems","vertical","flexDirection","width","useToolbarGroupStyles_unstable","state","styles","className"],"mappings":"AAAA;;;;;;;;;;;;QAOaE;;;;eAkBAQ;;;uBAtB4B,iBAAiB;AAInD,+BAAkE;IACvEP,MAAM;AACR,EAAE;AAEF,MAAMC,gBAAYJ,iBAAAA,EAAW;IAC3BG,MAAM;QACJE,SAAS;QACTC,YAAY;IACd;IACAC,UAAU;QACRC,eAAe;QACfC,OAAO;IACT;AACF;AAKO,uCAAuC,CAACE;IAC7C,MAAM,EAAEJ,QAAQ,EAAE,GAAGI;IACrB,MAAMC,SAASR;IAEf,oDAAoD;IACpDO,MAAMR,IAAI,CAACU,SAAS,OAAGZ,mBAAAA,EACrBC,uBAAuBC,IAAI,EAC3BS,OAAOT,IAAI,EACXI,YAAYK,OAAOL,QAAQ,EAC3BI,MAAMR,IAAI,CAACU,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get toolbarGroupClassNames () {
|
|
13
|
+
return toolbarGroupClassNames;
|
|
14
|
+
},
|
|
15
|
+
get useToolbarGroupStyles_unstable () {
|
|
16
|
+
return useToolbarGroupStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _clsx = require("clsx");
|
|
21
|
+
const _ToolbarGroupmodulecss = /*#__PURE__*/ _interop_require_default._(require("./ToolbarGroup.module.css"));
|
|
22
|
+
const toolbarGroupClassNames = {
|
|
23
|
+
root: 'fui-ToolbarGroup'
|
|
24
|
+
};
|
|
25
|
+
const useToolbarGroupStyles_unstable = (state)=>{
|
|
26
|
+
state.root.className = (0, _clsx.clsx)(toolbarGroupClassNames.root, _ToolbarGroupmodulecss.default.root, state.vertical && _ToolbarGroupmodulecss.default.vertical, state.root.className);
|
|
27
|
+
return state;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarGroup/useToolbarGroupStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToolbarGroupState, ToolbarGroupSlots } from './ToolbarGroup.types';\nimport styles from './ToolbarGroup.module.css';\n\nexport const toolbarGroupClassNames: SlotClassNames<ToolbarGroupSlots> = {\n root: 'fui-ToolbarGroup',\n};\n\nexport const useToolbarGroupStyles_unstable = (state: ToolbarGroupState): ToolbarGroupState => {\n state.root.className = clsx(\n toolbarGroupClassNames.root,\n styles.root,\n state.vertical && styles.vertical,\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","toolbarGroupClassNames","root","useToolbarGroupStyles_unstable","state","className","vertical"],"mappings":";;;;;;;;;;;QAKaE;;;;;;;;sBALQ,OAAO;gFAGT,4BAA4B;AAExC,+BAAkE;IACvEC,MAAM;AACR,EAAE;AAEK,MAAMC,iCAAiC,CAACC;IAC7CA,MAAMF,IAAI,CAACG,SAAS,OAAGN,UAAAA,EACrBE,uBAAuBC,IAAI,EAC3BF,8BAAAA,CAAOE,IAAI,EACXE,MAAME,QAAQ,IAAIN,8BAAAA,CAAOM,QAAQ,EACjCF,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioButton/ToolbarRadioButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ToolbarRadioButtonProps } from './ToolbarRadioButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderToggleButton_unstable } from '@fluentui/react-button';\nimport { useToolbarRadioButton_unstable } from './useToolbarRadioButton';\nimport { useToolbarRadioButtonStyles_unstable } from './useToolbarRadioButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToolbarRadioButton component\n */\nexport const ToolbarRadioButton: ForwardRefComponent<ToolbarRadioButtonProps> = React.forwardRef((props, ref) => {\n const state = useToolbarRadioButton_unstable(props, ref);\n\n useToolbarRadioButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToolbarRadioButtonStyles_unstable')(state);\n\n return renderToggleButton_unstable(state);\n}) as ForwardRefComponent<ToolbarRadioButtonProps>;\n\nToolbarRadioButton.displayName = 'ToolbarRadioButton';\n"],"names":["React","renderToggleButton_unstable","useToolbarRadioButton_unstable","useToolbarRadioButtonStyles_unstable","useCustomStyleHook_unstable","ToolbarRadioButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BAGa,yBAAyB;uCACtB,6BAA0B;mDACpB,0CAAuC;qCAChD,kCAAkC;AAKvE,MAAMK,qBAAAA,WAAAA,GAAmEL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,YAAQP,qDAAAA,EAA+BK,OAAOC;QAEpDL,uEAAAA,EAAqCM;QAErCL,gDAAAA,EAA4B,wCAAwCK;IAEpE,WAAOR,wCAAAA,EAA4BQ;AACrC,GAAmD;AAEnDJ,mBAAmBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioButton/ToolbarRadioButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit } from '@fluentui/react-utilities';\nimport type { ToggleButtonProps, ButtonSlots, ToggleButtonState } from '@fluentui/react-button';\n\n/**\n * ToolbarRadioButton Props\n */\nexport type ToolbarRadioButtonProps = ComponentProps<ButtonSlots> &\n Partial<Pick<ToggleButtonProps, 'disabled' | 'disabledFocusable' | 'size'>> & {\n appearance?: 'primary' | 'subtle' | 'transparent';\n name: string;\n value: string;\n };\n\nexport type ToolbarRadioButtonBaseProps = DistributiveOmit<ToolbarRadioButtonProps, 'appearance'>;\n\n/**\n * State used in rendering ToolbarRadioButton\n */\nexport type ToolbarRadioButtonState = ComponentState<Partial<ButtonSlots>> &\n ToggleButtonState &\n Required<Pick<ToggleButtonProps, 'checked'>> &\n Pick<ToolbarRadioButtonProps, 'name' | 'value'>;\n\nexport type ToolbarRadioButtonBaseState = DistributiveOmit<ToolbarRadioButtonState, 'appearance' | 'size' | 'shape'>;\n"],"names":[],"mappings":""}
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
ToolbarRadioButton
|
|
12
|
+
get ToolbarRadioButton () {
|
|
13
13
|
return _ToolbarRadioButton.ToolbarRadioButton;
|
|
14
14
|
},
|
|
15
|
-
useToolbarRadioButtonBase_unstable
|
|
15
|
+
get useToolbarRadioButtonBase_unstable () {
|
|
16
16
|
return _useToolbarRadioButton.useToolbarRadioButtonBase_unstable;
|
|
17
17
|
},
|
|
18
|
-
useToolbarRadioButtonStyles_unstable
|
|
18
|
+
get useToolbarRadioButtonStyles_unstable () {
|
|
19
19
|
return _useToolbarRadioButtonStylesstyles.useToolbarRadioButtonStyles_unstable;
|
|
20
20
|
},
|
|
21
|
-
useToolbarRadioButton_unstable
|
|
21
|
+
get useToolbarRadioButton_unstable () {
|
|
22
22
|
return _useToolbarRadioButton.useToolbarRadioButton_unstable;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioButton/index.ts"],"sourcesContent":["export { ToolbarRadioButton } from './ToolbarRadioButton';\nexport type {\n ToolbarRadioButtonBaseProps,\n ToolbarRadioButtonProps,\n ToolbarRadioButtonBaseState,\n ToolbarRadioButtonState,\n} from './ToolbarRadioButton.types';\nexport { useToolbarRadioButton_unstable, useToolbarRadioButtonBase_unstable } from './useToolbarRadioButton';\nexport { useToolbarRadioButtonStyles_unstable } from './useToolbarRadioButtonStyles.styles';\n"],"names":["ToolbarRadioButton","useToolbarRadioButton_unstable","useToolbarRadioButtonBase_unstable","useToolbarRadioButtonStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,sCAAkB;;;eAOcE,yDAAkC;;;eAClEC,uEAAoC;;;eADpCF,qDAA8B;;;oCAPJ,0BAAuB;uCAOyB,6BAA0B;mDACxD,0CAAuC"}
|
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
useToolbarRadioButtonBase_unstable
|
|
13
|
+
get useToolbarRadioButtonBase_unstable () {
|
|
14
14
|
return useToolbarRadioButtonBase_unstable;
|
|
15
15
|
},
|
|
16
|
-
useToolbarRadioButton_unstable
|
|
16
|
+
get useToolbarRadioButton_unstable () {
|
|
17
17
|
return useToolbarRadioButton_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioButton/useToolbarRadioButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useToggleButtonBase_unstable } from '@fluentui/react-button';\nimport { useToolbarContext_unstable } from '../Toolbar/ToolbarContext';\nimport type {\n ToolbarRadioButtonProps,\n ToolbarRadioButtonState,\n ToolbarRadioButtonBaseProps,\n ToolbarRadioButtonBaseState,\n} from './ToolbarRadioButton.types';\n\n/**\n * Given user props, defines default props for the RadioButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the RadioButton component.\n * @param ref - User provided ref to be passed to the RadioButton component.\n */\nexport const useToolbarRadioButton_unstable = (\n props: ToolbarRadioButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToolbarRadioButtonState => {\n const contextSize = useToolbarContext_unstable(ctx => ctx.size);\n const { appearance = 'subtle', size = contextSize, ...baseProps } = props;\n const state = useToolbarRadioButtonBase_unstable(baseProps, ref);\n\n return {\n ...state,\n appearance,\n size,\n shape: 'rounded',\n };\n};\n\n/**\n * Base hook that builds Toolbar RadioButton state for behavior and structure only.\n * It does not provide any design-related defaults.\n *\n * @internal\n * @param props - User provided props to the RadioButton component.\n * @param ref - User provided ref to be passed to the RadioButton component.\n */\nexport const useToolbarRadioButtonBase_unstable = (\n props: ToolbarRadioButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToolbarRadioButtonBaseState => {\n const handleRadio = useToolbarContext_unstable(ctx => ctx.handleRadio);\n const checked = useToolbarContext_unstable(ctx => !!ctx.checkedValues[props.name]?.includes(props.value));\n\n const { onClick: onClickOriginal } = props;\n const toggleButtonState = useToggleButtonBase_unstable(\n { checked, role: 'radio', 'aria-checked': checked, ...props },\n ref,\n );\n const state: ToolbarRadioButtonBaseState = {\n ...toggleButtonState,\n name: props.name,\n value: props.value,\n };\n\n const handleOnClick = useEventCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent> & React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {\n handleRadio?.(e, state.name, state.value, state.checked);\n onClickOriginal?.(e);\n },\n );\n // eslint-disable-next-line react-hooks/immutability\n state.root['aria-pressed'] = undefined;\n // eslint-disable-next-line react-hooks/immutability\n state.root.onClick = handleOnClick;\n\n return state;\n};\n"],"names":["useEventCallback","useToggleButtonBase_unstable","useToolbarContext_unstable","useToolbarRadioButton_unstable","props","ref","contextSize","ctx","size","appearance","baseProps","state","useToolbarRadioButtonBase_unstable","shape","handleRadio","checked","checkedValues","name","includes","value","onClick","onClickOriginal","toggleButtonState","role","handleOnClick","e","root","undefined"],"mappings":"AAAA;;;;;;;;;;;;;eA2CaY;;QAxBAT;;;;gCAhBoB,4BAA4B;6BAChB,yBAAyB;gCAC3B,+BAA4B;AAchE,uCAAuC,CAC5CC,OACAC;IAEA,MAAMC,kBAAcJ,0CAAAA,EAA2BK,CAAAA,MAAOA,IAAIC,IAAI;IAC9D,MAAM,EAAEC,aAAa,QAAQ,EAAED,OAAOF,WAAW,EAAE,GAAGI,WAAW,GAAGN;IACpE,MAAMO,QAAQC,mCAAmCF,WAAWL;IAE5D,OAAO;QACL,GAAGM,KAAK;QACRF;QACAD;QACAK,OAAO;IACT;AACF,EAAE;AAUK,2CAA2C,CAChDT,OACAC;IAEA,MAAMS,cAAcZ,8CAAAA,EAA2BK,CAAAA,MAAOA,IAAIO,WAAW;IACrE,MAAMC,cAAUb,0CAAAA,EAA2BK,CAAAA;YAASA;eAAF,CAAC,CAAA,CAAA,CAACA,gCAAAA,IAAIS,aAAa,CAACZ,MAAMa,KAAI,AAAC,MAAA,QAA7BV,kCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,8BAA+BW,QAAQ,CAACd,MAAMe,MAAK;;IAEvG,MAAM,EAAEC,SAASC,eAAe,EAAE,GAAGjB;IACrC,MAAMkB,wBAAoBrB,yCAAAA,EACxB;QAAEc;QAASQ,MAAM;QAAS,gBAAgBR;QAAS,GAAGX,KAAK;IAAC,GAC5DC;IAEF,MAAMM,QAAqC;QACzC,GAAGW,iBAAiB;QACpBL,MAAMb,MAAMa,IAAI;QAChBE,OAAOf,MAAMe,KAAK;IACpB;IAEA,MAAMK,oBAAgBxB,gCAAAA,EACpB,CAACyB;QACCX,gBAAAA,QAAAA,gBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,YAAcW,GAAGd,MAAMM,IAAI,EAAEN,MAAMQ,KAAK,EAAER,MAAMI,OAAO;QACvDM,oBAAAA,QAAAA,oBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,gBAAkBI;IACpB;IAEF,oDAAoD;IACpDd,MAAMe,IAAI,CAAC,eAAe,GAAGC;IAC7B,oDAAoD;IACpDhB,MAAMe,IAAI,CAACN,OAAO,GAAGI;IAErB,OAAOb;AACT,EAAE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useToolbarRadioButtonStyles_unstable", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return useToolbarRadioButtonStyles_unstable;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
13
|
+
const _clsx = require("clsx");
|
|
14
|
+
const _reactbutton = require("@fluentui/react-button");
|
|
15
|
+
const _ToolbarRadioButtonmodulecss = /*#__PURE__*/ _interop_require_default._(require("./ToolbarRadioButton.module.css"));
|
|
16
|
+
const useToolbarRadioButtonStyles_unstable = (state)=>{
|
|
17
|
+
(0, _reactbutton.useToggleButtonStyles_unstable)(state);
|
|
18
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
19
|
+
state.root.className = (0, _clsx.clsx)(state.checked && _ToolbarRadioButtonmodulecss.default.checked, state.root.className);
|
|
20
|
+
if (state.icon) {
|
|
21
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
22
|
+
state.icon.className = (0, _clsx.clsx)(state.checked && _ToolbarRadioButtonmodulecss.default.checkedIcon, state.icon.className);
|
|
23
|
+
}
|
|
24
|
+
return state;
|
|
25
|
+
};
|
package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.css.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.css.ts"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport { useToggleButtonStyles_unstable } from '@fluentui/react-button';\nimport type { ToolbarRadioButtonState } from './ToolbarRadioButton.types';\nimport styles from './ToolbarRadioButton.module.css';\n\nexport const useToolbarRadioButtonStyles_unstable = (state: ToolbarRadioButtonState): ToolbarRadioButtonState => {\n useToggleButtonStyles_unstable(state);\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(state.checked && styles.checked, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = clsx(state.checked && styles.checkedIcon, state.icon.className);\n }\n\n return state;\n};\n"],"names":["clsx","useToggleButtonStyles_unstable","styles","useToolbarRadioButtonStyles_unstable","state","root","className","checked","icon","checkedIcon"],"mappings":"AAAA;;;;;+BAOaG;;;;;;;sBALQ,OAAO;6BACmB,yBAAyB;sFAErD,kCAAkC;AAE9C,6CAA6C,CAACC;QACnDH,2CAAAA,EAA+BG;IAC/B,oDAAoD;IACpDA,MAAMC,IAAI,CAACC,SAAS,OAAGN,UAAAA,EAAKI,MAAMG,OAAO,IAAIL,oCAAAA,CAAOK,OAAO,EAAEH,MAAMC,IAAI,CAACC,SAAS;IAEjF,IAAIF,MAAMI,IAAI,EAAE;QACd,oDAAoD;QACpDJ,MAAMI,IAAI,CAACF,SAAS,OAAGN,UAAAA,EAAKI,MAAMG,OAAO,IAAIL,oCAAAA,CAAOO,WAAW,EAAEL,MAAMI,IAAI,CAACF,SAAS;IACvF;IAEA,OAAOF;AACT,EAAE"}
|
package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { useToggleButtonStyles_unstable } from '@fluentui/react-button';\nimport type { ToolbarRadioButtonState } from './ToolbarRadioButton.types';\n\nconst useBaseStyles = makeStyles({\n /* use subtle ToggleButton selected styles for Toolbar Radio selected state */\n selected: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground2Selected,\n },\n\n iconSelected: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n});\n\n/**\n * Apply styling to the ToolbarRadioButton slots based on the state\n */\nexport const useToolbarRadioButtonStyles_unstable = (state: ToolbarRadioButtonState): ToolbarRadioButtonState => {\n const toggleButtonStyles = useBaseStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(state.checked && toggleButtonStyles.selected, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(state.checked && toggleButtonStyles.iconSelected, state.icon.className);\n }\n\n useToggleButtonStyles_unstable(state);\n\n return state;\n};\n"],"names":["tokens","makeStyles","mergeClasses","useToggleButtonStyles_unstable","useBaseStyles","selected","backgroundColor","colorSubtleBackgroundSelected","color","colorNeutralForeground2Selected","iconSelected","colorNeutralForeground2BrandSelected","useToolbarRadioButtonStyles_unstable","state","toggleButtonStyles","root","className","checked","icon"],"mappings":"AAAA;;;;;;;;;;;4BAEuB,wBAAwB;uBACN,iBAAiB;6BACX,yBAAyB;AAGxE,MAAMI,oBAAgBH,iBAAAA,EAAW;IAC/B,4EAA4E,GAC5EI,UAAU;QACRC,iBAAiBN,kBAAAA,CAAOO,6BAA6B;QACrDC,OAAOR,kBAAAA,CAAOS,+BAA+B;IAC/C;IAEAC,cAAc;QACZF,OAAOR,kBAAAA,CAAOW,oCAAoC;IACpD;AACF;AAKO,MAAMC,uCAAuC,CAACC;IACnD,MAAMC,qBAAqBV;IAE3B,oDAAoD;IACpDS,MAAME,IAAI,CAACC,SAAS,OAAGd,mBAAAA,EAAaW,MAAMI,OAAO,IAAIH,mBAAmBT,QAAQ,EAAEQ,MAAME,IAAI,CAACC,SAAS;IAEtG,IAAIH,MAAMK,IAAI,EAAE;QACd,oDAAoD;QACpDL,MAAMK,IAAI,CAACF,SAAS,OAAGd,mBAAAA,EAAaW,MAAMI,OAAO,IAAIH,mBAAmBJ,YAAY,EAAEG,MAAMK,IAAI,CAACF,SAAS;IAC5G;QAEAb,2CAAAA,EAA+BU;IAE/B,OAAOA;AACT,EAAE"}
|
package/lib-commonjs/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.raw.css.cjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useToolbarRadioButtonStyles_unstable", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return useToolbarRadioButtonStyles_unstable;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
13
|
+
const _clsx = require("clsx");
|
|
14
|
+
const _reactbutton = require("@fluentui/react-button");
|
|
15
|
+
const _ToolbarRadioButtonmodulecss = /*#__PURE__*/ _interop_require_default._(require("./ToolbarRadioButton.module.css"));
|
|
16
|
+
const useToolbarRadioButtonStyles_unstable = (state)=>{
|
|
17
|
+
(0, _reactbutton.useToggleButtonStyles_unstable)(state);
|
|
18
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
19
|
+
state.root.className = (0, _clsx.clsx)(state.checked && _ToolbarRadioButtonmodulecss.default.checked, state.root.className);
|
|
20
|
+
if (state.icon) {
|
|
21
|
+
// eslint-disable-next-line react-hooks/immutability
|
|
22
|
+
state.icon.className = (0, _clsx.clsx)(state.checked && _ToolbarRadioButtonmodulecss.default.checkedIcon, state.icon.className);
|
|
23
|
+
}
|
|
24
|
+
return state;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioButton/useToolbarRadioButtonStyles.styles.css.ts"],"sourcesContent":["'use client';\n\nimport { clsx } from 'clsx';\nimport { useToggleButtonStyles_unstable } from '@fluentui/react-button';\nimport type { ToolbarRadioButtonState } from './ToolbarRadioButton.types';\nimport styles from './ToolbarRadioButton.module.css';\n\nexport const useToolbarRadioButtonStyles_unstable = (state: ToolbarRadioButtonState): ToolbarRadioButtonState => {\n useToggleButtonStyles_unstable(state);\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = clsx(state.checked && styles.checked, state.root.className);\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = clsx(state.checked && styles.checkedIcon, state.icon.className);\n }\n\n return state;\n};\n"],"names":["clsx","useToggleButtonStyles_unstable","styles","useToolbarRadioButtonStyles_unstable","state","root","className","checked","icon","checkedIcon"],"mappings":"AAAA;;;;;+BAOaG;;;;;;;sBALQ,OAAO;6BACmB,yBAAyB;sFAErD,kCAAkC;AAE9C,6CAA6C,CAACC;QACnDH,2CAAAA,EAA+BG;IAC/B,oDAAoD;IACpDA,MAAMC,IAAI,CAACC,SAAS,OAAGN,UAAAA,EAAKI,MAAMG,OAAO,IAAIL,oCAAAA,CAAOK,OAAO,EAAEH,MAAMC,IAAI,CAACC,SAAS;IAEjF,IAAIF,MAAMI,IAAI,EAAE;QACd,oDAAoD;QACpDJ,MAAMI,IAAI,CAACF,SAAS,OAAGN,UAAAA,EAAKI,MAAMG,OAAO,IAAIL,oCAAAA,CAAOO,WAAW,EAAEL,MAAMI,IAAI,CAACF,SAAS;IACvF;IAEA,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioGroup/ToolbarRadioGroup.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ToolbarRadioGroupProps } from './ToolbarRadioGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport {\n renderToolbarGroup_unstable,\n useToolbarGroupStyles_unstable,\n useToolbarGroup_unstable,\n} from '../../ToolbarGroup';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToolbarRadioGroup component is a Button to be used inside Toolbar\n * which will respect toolbar props such as `size`\n */\nexport const ToolbarRadioGroup: ForwardRefComponent<ToolbarRadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useToolbarGroup_unstable({ role: 'radiogroup', ...props }, ref);\n\n useToolbarGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToolbarGroupStyles_unstable')(state);\n\n return renderToolbarGroup_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToolbarRadioGroupProps>;\n\nToolbarRadioGroup.displayName = 'ToolbarRadioGroup';\n"],"names":["React","renderToolbarGroup_unstable","useToolbarGroupStyles_unstable","useToolbarGroup_unstable","useCustomStyleHook_unstable","ToolbarRadioGroup","forwardRef","props","ref","state","role","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;8BAOxB,wBAAqB;qCACgB,kCAAkC;AAMvE,MAAMK,oBAAAA,WAAAA,GAAiEL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,YAAQN,sCAAAA,EAAyB;QAAEO,MAAM;QAAc,GAAGH,KAAK;IAAC,GAAGC;QAEzEN,4CAAAA,EAA+BO;QAE/BL,gDAAAA,EAA4B,kCAAkCK;IAE9D,WAAOR,yCAAAA,EAA4BQ;AACnC,0FAA0F;AAC5F,GAAkD;AAElDJ,kBAAkBM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioGroup/ToolbarRadioGroup.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ToolbarRadioGroupSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * ToolbarButton Props\n */\nexport type ToolbarRadioGroupProps = ComponentProps<ToolbarRadioGroupSlots>;\n\n/**\n * State used in rendering ToolbarButton\n */\nexport type ToolbarRadioGroupState = ComponentState<ToolbarRadioGroupSlots>;\n"],"names":[],"mappings":"AAWA;;CAEC,GACD,WAA4E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarRadioGroup/index.ts"],"sourcesContent":["export { ToolbarRadioGroup } from './ToolbarRadioGroup';\nexport type { ToolbarRadioGroupProps, ToolbarRadioGroupSlots, ToolbarRadioGroupState } from './ToolbarRadioGroup.types';\n"],"names":["ToolbarRadioGroup"],"mappings":";;;;;;;eAASA,oCAAiB;;;mCAAQ,yBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarToggleButton/ToolbarToggleButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ToolbarToggleButtonProps } from './ToolbarToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderToggleButton_unstable } from '@fluentui/react-button';\nimport { useToolbarToggleButton_unstable } from './useToolbarToggleButton';\nimport { useToolbarToggleButtonStyles_unstable } from './useToolbarToggleButtonStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToolbarToggleButton component\n */\nexport const ToolbarToggleButton: ForwardRefComponent<ToolbarToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToolbarToggleButton_unstable(props, ref);\n\n useToolbarToggleButtonStyles_unstable(state);\n\n useCustomStyleHook_unstable('useToolbarToggleButtonStyles_unstable')(state);\n\n return renderToggleButton_unstable(state);\n}) as ForwardRefComponent<ToolbarToggleButtonProps>;\n\nToolbarToggleButton.displayName = 'ToolbarToggleButton';\n"],"names":["React","renderToggleButton_unstable","useToolbarToggleButton_unstable","useToolbarToggleButtonStyles_unstable","useCustomStyleHook_unstable","ToolbarToggleButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BAGa,yBAAyB;wCACrB,8BAA2B;oDACrB,2CAAwC;qCAClD,kCAAkC;AAKvE,MAAMK,sBAAAA,WAAAA,GAAqEL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzG,MAAMC,YAAQP,uDAAAA,EAAgCK,OAAOC;QAErDL,yEAAAA,EAAsCM;QAEtCL,gDAAAA,EAA4B,yCAAyCK;IAErE,WAAOR,wCAAAA,EAA4BQ;AACrC,GAAoD;AAEpDJ,oBAAoBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToolbarToggleButton/ToolbarToggleButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit } from '@fluentui/react-utilities';\nimport type { ToggleButtonProps, ButtonSlots, ToggleButtonState } from '@fluentui/react-button';\n\n/**\n * ToolbarToggleButton Props\n */\nexport type ToolbarToggleButtonProps = ComponentProps<ButtonSlots> &\n Partial<Pick<ToggleButtonProps, 'disabled' | 'disabledFocusable' | 'size'>> & {\n appearance?: 'primary' | 'subtle' | 'transparent';\n name: string;\n value: string;\n };\n\nexport type ToolbarToggleButtonBaseProps = DistributiveOmit<ToolbarToggleButtonProps, 'appearance'>;\n\n/**\n * State used in rendering ToolbarToggleButton\n */\nexport type ToolbarToggleButtonState = ComponentState<Partial<ButtonSlots>> &\n ToggleButtonState &\n Required<Pick<ToggleButtonProps, 'checked'>> &\n Pick<ToolbarToggleButtonProps, 'name' | 'value'>;\n\nexport type ToolbarToggleButtonBaseState = DistributiveOmit<ToolbarToggleButtonState, 'appearance' | 'size' | 'shape'>;\n"],"names":[],"mappings":""}
|