@fluentui/react-menu 9.75.2-experimental.css-modules.20261113-ba13c87438.0 → 9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.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 +17 -17
- package/README.md +0 -8
- package/dist/css-modules.d.cts +2 -0
- package/dist/css-modules.d.ts +2 -0
- package/lib/components/MenuItem/MenuItem.module.css +147 -124
- package/lib/components/MenuItem/useMenuItemStyles.styles.js +4 -4
- package/lib/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.styles.raw.js +4 -4
- package/lib/components/MenuItem/useMenuItemStyles.styles.raw.js.map +1 -1
- package/lib/components/MenuItemSwitch/MenuItemSwitch.module.css +2 -2
- package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js +1 -1
- package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js.map +1 -1
- package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.js +1 -1
- package/lib/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.js.map +1 -1
- package/lib/css-modules/Menu.js +1 -0
- package/lib/css-modules/Menu.js.map +1 -0
- package/lib/css-modules/MenuDivider.js +1 -0
- package/lib/css-modules/MenuDivider.js.map +1 -0
- package/lib/css-modules/MenuGroup.js +1 -0
- package/lib/css-modules/MenuGroup.js.map +1 -0
- package/lib/css-modules/MenuGroupHeader.js +1 -0
- package/lib/css-modules/MenuGroupHeader.js.map +1 -0
- package/lib/css-modules/MenuItem.js +1 -0
- package/lib/css-modules/MenuItem.js.map +1 -0
- package/lib/css-modules/MenuItemCheckbox.js +1 -0
- package/lib/css-modules/MenuItemCheckbox.js.map +1 -0
- package/lib/css-modules/MenuItemLink.js +1 -0
- package/lib/css-modules/MenuItemLink.js.map +1 -0
- package/lib/css-modules/MenuItemRadio.js +1 -0
- package/lib/css-modules/MenuItemRadio.js.map +1 -0
- package/lib/css-modules/MenuItemSwitch.js +1 -0
- package/lib/css-modules/MenuItemSwitch.js.map +1 -0
- package/lib/css-modules/MenuList.js +1 -0
- package/lib/css-modules/MenuList.js.map +1 -0
- package/lib/css-modules/MenuPopover.js +1 -0
- package/lib/css-modules/MenuPopover.js.map +1 -0
- package/lib/css-modules/MenuSplitGroup.js +1 -0
- package/lib/css-modules/MenuSplitGroup.js.map +1 -0
- package/lib/css-modules/components/Menu/Menu.js +12 -0
- package/lib/css-modules/components/Menu/Menu.js.map +1 -0
- package/lib/css-modules/components/Menu/MenuSurfaceMotion.js +40 -0
- package/lib/css-modules/components/Menu/MenuSurfaceMotion.js.map +1 -0
- package/lib/css-modules/components/Menu/index.js +4 -0
- package/lib/css-modules/components/Menu/index.js.map +1 -0
- package/lib/css-modules/components/Menu/useMenu.js +355 -0
- package/lib/css-modules/components/Menu/useMenu.js.map +1 -0
- package/lib/css-modules/components/MenuDivider/MenuDivider.js +15 -0
- package/lib/css-modules/components/MenuDivider/MenuDivider.js.map +1 -0
- package/lib/css-modules/components/MenuDivider/index.js +4 -0
- package/lib/css-modules/components/MenuDivider/index.js.map +1 -0
- package/lib/css-modules/components/MenuGroup/MenuGroup.js +17 -0
- package/lib/css-modules/components/MenuGroup/MenuGroup.js.map +1 -0
- package/lib/css-modules/components/MenuGroup/index.js +5 -0
- package/lib/css-modules/components/MenuGroup/index.js.map +1 -0
- package/lib/css-modules/components/MenuGroupHeader/MenuGroupHeader.js +15 -0
- package/lib/css-modules/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -0
- package/lib/css-modules/components/MenuGroupHeader/index.js +4 -0
- package/lib/css-modules/components/MenuGroupHeader/index.js.map +1 -0
- package/lib/css-modules/components/MenuItem/MenuItem.js +15 -0
- package/lib/css-modules/components/MenuItem/MenuItem.js.map +1 -0
- package/lib/css-modules/components/MenuItem/index.js +5 -0
- package/lib/css-modules/components/MenuItem/index.js.map +1 -0
- package/lib/css-modules/components/MenuItemCheckbox/MenuItemCheckbox.js +15 -0
- package/lib/css-modules/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -0
- package/lib/css-modules/components/MenuItemCheckbox/index.js +4 -0
- package/lib/css-modules/components/MenuItemCheckbox/index.js.map +1 -0
- package/lib/css-modules/components/MenuItemLink/MenuItemLink.js +15 -0
- package/lib/css-modules/components/MenuItemLink/MenuItemLink.js.map +1 -0
- package/lib/css-modules/components/MenuItemLink/index.js +4 -0
- package/lib/css-modules/components/MenuItemLink/index.js.map +1 -0
- package/lib/css-modules/components/MenuItemRadio/MenuItemRadio.js +15 -0
- package/lib/css-modules/components/MenuItemRadio/MenuItemRadio.js.map +1 -0
- package/lib/css-modules/components/MenuItemRadio/index.js +4 -0
- package/lib/css-modules/components/MenuItemRadio/index.js.map +1 -0
- package/lib/css-modules/components/MenuItemSwitch/MenuItemSwitch.js +13 -0
- package/lib/css-modules/components/MenuItemSwitch/MenuItemSwitch.js.map +1 -0
- package/lib/css-modules/components/MenuItemSwitch/index.js +4 -0
- package/lib/css-modules/components/MenuItemSwitch/index.js.map +1 -0
- package/lib/css-modules/components/MenuItemSwitch/useMenuItemSwitch.js +46 -0
- package/lib/css-modules/components/MenuItemSwitch/useMenuItemSwitch.js.map +1 -0
- package/lib/css-modules/components/MenuList/MenuList.js +17 -0
- package/lib/css-modules/components/MenuList/MenuList.js.map +1 -0
- package/lib/css-modules/components/MenuList/index.js +5 -0
- package/lib/css-modules/components/MenuList/index.js.map +1 -0
- package/lib/css-modules/components/MenuPopover/MenuPopover.js +15 -0
- package/lib/css-modules/components/MenuPopover/MenuPopover.js.map +1 -0
- package/lib/css-modules/components/MenuPopover/index.js +4 -0
- package/lib/css-modules/components/MenuPopover/index.js.map +1 -0
- package/lib/css-modules/components/MenuPopover/renderMenuPopover.js +23 -0
- package/lib/css-modules/components/MenuPopover/renderMenuPopover.js.map +1 -0
- package/lib/css-modules/components/MenuSplitGroup/MenuSplitGroup.js +16 -0
- package/lib/css-modules/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -0
- package/lib/css-modules/components/MenuSplitGroup/index.js +4 -0
- package/lib/css-modules/components/MenuSplitGroup/index.js.map +1 -0
- package/lib/css-modules/components/MenuSplitGroup/useMenuSplitGroup.js +96 -0
- package/lib/css-modules/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -0
- package/lib/css-modules/components/index.js +2 -0
- package/lib/css-modules/components/index.js.map +1 -0
- package/lib/css-modules/index.js +19 -0
- package/lib/css-modules/index.js.map +1 -0
- package/lib/css-modules/selectable/index.js +1 -0
- package/lib/css-modules/selectable/index.js.map +1 -0
- package/lib-commonjs/components/MenuItem/MenuItem.module.css +147 -124
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.cjs +4 -4
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.raw.cjs +4 -4
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/MenuItemSwitch.module.css +2 -2
- package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.cjs +1 -1
- package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.cjs +1 -1
- package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/css-modules/Menu.cjs +28 -0
- package/lib-commonjs/css-modules/Menu.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuDivider.cjs +28 -0
- package/lib-commonjs/css-modules/MenuDivider.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuGroup.cjs +31 -0
- package/lib-commonjs/css-modules/MenuGroup.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuGroupHeader.cjs +28 -0
- package/lib-commonjs/css-modules/MenuGroupHeader.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuItem.cjs +31 -0
- package/lib-commonjs/css-modules/MenuItem.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuItemCheckbox.cjs +31 -0
- package/lib-commonjs/css-modules/MenuItemCheckbox.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuItemLink.cjs +31 -0
- package/lib-commonjs/css-modules/MenuItemLink.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuItemRadio.cjs +31 -0
- package/lib-commonjs/css-modules/MenuItemRadio.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuItemSwitch.cjs +34 -0
- package/lib-commonjs/css-modules/MenuItemSwitch.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuList.cjs +34 -0
- package/lib-commonjs/css-modules/MenuList.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuPopover.cjs +31 -0
- package/lib-commonjs/css-modules/MenuPopover.cjs.map +1 -0
- package/lib-commonjs/css-modules/MenuSplitGroup.cjs +28 -0
- package/lib-commonjs/css-modules/MenuSplitGroup.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Menu/Menu.cjs +20 -0
- package/lib-commonjs/css-modules/components/Menu/Menu.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Menu/MenuSurfaceMotion.cjs +42 -0
- package/lib-commonjs/css-modules/components/Menu/MenuSurfaceMotion.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Menu/index.cjs +31 -0
- package/lib-commonjs/css-modules/components/Menu/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Menu/useMenu.cjs +359 -0
- package/lib-commonjs/css-modules/components/Menu/useMenu.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuDivider/MenuDivider.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuDivider/MenuDivider.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuDivider/index.cjs +31 -0
- package/lib-commonjs/css-modules/components/MenuDivider/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuGroup/MenuGroup.cjs +26 -0
- package/lib-commonjs/css-modules/components/MenuGroup/MenuGroup.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuGroup/index.cjs +35 -0
- package/lib-commonjs/css-modules/components/MenuGroup/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuGroupHeader/MenuGroupHeader.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuGroupHeader/MenuGroupHeader.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuGroupHeader/index.cjs +31 -0
- package/lib-commonjs/css-modules/components/MenuGroupHeader/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItem/MenuItem.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuItem/MenuItem.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItem/index.cjs +35 -0
- package/lib-commonjs/css-modules/components/MenuItem/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemCheckbox/MenuItemCheckbox.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuItemCheckbox/MenuItemCheckbox.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemCheckbox/index.cjs +34 -0
- package/lib-commonjs/css-modules/components/MenuItemCheckbox/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemLink/MenuItemLink.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuItemLink/MenuItemLink.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemLink/index.cjs +34 -0
- package/lib-commonjs/css-modules/components/MenuItemLink/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemRadio/MenuItemRadio.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuItemRadio/MenuItemRadio.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemRadio/index.cjs +34 -0
- package/lib-commonjs/css-modules/components/MenuItemRadio/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemSwitch/MenuItemSwitch.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuItemSwitch/MenuItemSwitch.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemSwitch/index.cjs +37 -0
- package/lib-commonjs/css-modules/components/MenuItemSwitch/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuItemSwitch/useMenuItemSwitch.cjs +51 -0
- package/lib-commonjs/css-modules/components/MenuItemSwitch/useMenuItemSwitch.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuList/MenuList.cjs +26 -0
- package/lib-commonjs/css-modules/components/MenuList/MenuList.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuList/index.cjs +38 -0
- package/lib-commonjs/css-modules/components/MenuList/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuPopover/MenuPopover.cjs +24 -0
- package/lib-commonjs/css-modules/components/MenuPopover/MenuPopover.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuPopover/index.cjs +34 -0
- package/lib-commonjs/css-modules/components/MenuPopover/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuPopover/renderMenuPopover.cjs +31 -0
- package/lib-commonjs/css-modules/components/MenuPopover/renderMenuPopover.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuSplitGroup/MenuSplitGroup.cjs +25 -0
- package/lib-commonjs/css-modules/components/MenuSplitGroup/MenuSplitGroup.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuSplitGroup/index.cjs +31 -0
- package/lib-commonjs/css-modules/components/MenuSplitGroup/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/MenuSplitGroup/useMenuSplitGroup.cjs +98 -0
- package/lib-commonjs/css-modules/components/MenuSplitGroup/useMenuSplitGroup.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/index.cjs +47 -0
- package/lib-commonjs/css-modules/components/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/index.cjs +286 -0
- package/lib-commonjs/css-modules/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/selectable/index.cjs +11 -0
- package/lib-commonjs/css-modules/selectable/index.cjs.map +1 -0
- package/package.json +23 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-menu
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Fri,
|
|
3
|
+
<!-- This log was last generated on Fri, 20 Nov 2026 10:33:49 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.75.2-experimental.css-modules.
|
|
7
|
+
## [9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0)
|
|
8
8
|
|
|
9
|
-
Fri,
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.25.9..@fluentui/react-menu_v9.75.2-experimental.css-modules.
|
|
9
|
+
Fri, 20 Nov 2026 10:33:49 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-menu_v9.25.9..@fluentui/react-menu_v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
- Release 9.75.2-experimental.css-modules.
|
|
15
|
-
- Bump @fluentui/keyboard-keys to v9.75.2-experimental.css-modules.
|
|
16
|
-
- Bump @fluentui/react-aria to v9.75.2-experimental.css-modules.
|
|
17
|
-
- Bump @fluentui/react-context-selector to v9.75.2-experimental.css-modules.
|
|
18
|
-
- Bump @fluentui/react-jsx-runtime to v9.75.2-experimental.css-modules.
|
|
19
|
-
- Bump @fluentui/react-motion to v9.75.2-experimental.css-modules.
|
|
20
|
-
- Bump @fluentui/react-motion-components-preview to v9.75.2-experimental.css-modules.
|
|
21
|
-
- Bump @fluentui/react-portal to v9.75.2-experimental.css-modules.
|
|
22
|
-
- Bump @fluentui/react-positioning to v9.75.2-experimental.css-modules.
|
|
23
|
-
- Bump @fluentui/react-shared-contexts to v9.75.2-experimental.css-modules.
|
|
24
|
-
- Bump @fluentui/react-tabster to v9.75.2-experimental.css-modules.
|
|
25
|
-
- Bump @fluentui/react-theme to v9.75.2-experimental.css-modules.
|
|
26
|
-
- Bump @fluentui/react-utilities to v9.75.2-experimental.css-modules.
|
|
14
|
+
- Release 9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
|
|
15
|
+
- Bump @fluentui/keyboard-keys to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-aria to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-context-selector to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-motion to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-motion-components-preview to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-portal to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-positioning to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
|
+
- Bump @fluentui/react-shared-contexts to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
24
|
+
- Bump @fluentui/react-tabster to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
25
|
+
- Bump @fluentui/react-theme to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
26
|
+
- Bump @fluentui/react-utilities to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
27
27
|
|
|
28
28
|
## [9.25.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-menu_v9.25.9)
|
|
29
29
|
|
package/README.md
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
# @fluentui/react-menu
|
|
2
2
|
|
|
3
3
|
**React Menu components for [Fluent UI React](https://react.fluentui.dev)**
|
|
4
|
-
|
|
5
|
-
## Opt-in CSS Modules styles
|
|
6
|
-
|
|
7
|
-
Menu items, selectable checkmarks, groups, lists, and popovers have CSS Modules alternatives beside their Griffel style hooks.
|
|
8
|
-
Resolve the relevant `.styles.js` imports to `.styles.css.js` (and source `.styles`
|
|
9
|
-
imports to `.styles.css.ts`) only in an explicitly opted-in bundler configuration.
|
|
10
|
-
Keep CSS assets; the headless icon defaults are imported into the low-priority `fluent` layer.
|
|
11
|
-
The default component imports and Griffel implementations are unchanged.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* @griffel-buckets reset: .root, .content, .secondaryContent, .icon, .submenuIndicator, .subText */
|
|
2
1
|
@import url('@fluentui/react-icons/headless/styles.css') layer(fluent);
|
|
3
2
|
|
|
4
3
|
.root {
|
|
@@ -66,59 +65,6 @@
|
|
|
66
65
|
bottom: calc(-1 * var(--strokeWidthThick));
|
|
67
66
|
inset-inline-start: calc(-1 * var(--strokeWidthThick));
|
|
68
67
|
}
|
|
69
|
-
@media (forced-colors: active) {
|
|
70
|
-
&::after {
|
|
71
|
-
border-top-color: Highlight;
|
|
72
|
-
border-inline-end-color: Highlight;
|
|
73
|
-
border-bottom-color: Highlight;
|
|
74
|
-
border-inline-start-color: Highlight;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
@media (forced-colors: active) {
|
|
79
|
-
&:hover {
|
|
80
|
-
forced-color-adjust: none;
|
|
81
|
-
background-color: Highlight;
|
|
82
|
-
color: HighlightText;
|
|
83
|
-
& :global(.fui-MenuItem__icon),
|
|
84
|
-
& :global(.fui-MenuItem__checkmark),
|
|
85
|
-
& :global(.fui-MenuItem__subText),
|
|
86
|
-
& :global(.fui-MenuItem__secondaryContent) {
|
|
87
|
-
color: HighlightText;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
&:focus {
|
|
91
|
-
outline-style: none;
|
|
92
|
-
}
|
|
93
|
-
&:focus-visible {
|
|
94
|
-
outline-style: none;
|
|
95
|
-
}
|
|
96
|
-
&[data-fui-focus-visible] {
|
|
97
|
-
border-top-color: var(--colorTransparentBackground);
|
|
98
|
-
border-inline-end-color: var(--colorTransparentBackground);
|
|
99
|
-
border-bottom-color: var(--colorTransparentBackground);
|
|
100
|
-
border-inline-start-color: var(--colorTransparentBackground);
|
|
101
|
-
&::after {
|
|
102
|
-
content: '';
|
|
103
|
-
position: absolute;
|
|
104
|
-
pointer-events: none;
|
|
105
|
-
z-index: 1;
|
|
106
|
-
border: var(--strokeWidthThick) solid Highlight;
|
|
107
|
-
border-radius: var(--borderRadiusMedium);
|
|
108
|
-
top: calc(-1 * var(--strokeWidthThick));
|
|
109
|
-
inset-inline-end: calc(-1 * var(--strokeWidthThick));
|
|
110
|
-
bottom: calc(-1 * var(--strokeWidthThick));
|
|
111
|
-
inset-inline-start: calc(-1 * var(--strokeWidthThick));
|
|
112
|
-
}
|
|
113
|
-
@media (forced-colors: active) {
|
|
114
|
-
&::after {
|
|
115
|
-
border-top-color: Highlight;
|
|
116
|
-
border-inline-end-color: Highlight;
|
|
117
|
-
border-bottom-color: Highlight;
|
|
118
|
-
border-inline-start-color: Highlight;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
68
|
}
|
|
123
69
|
}
|
|
124
70
|
|
|
@@ -193,17 +139,6 @@
|
|
|
193
139
|
& :global(.fui-MenuItem__subText) {
|
|
194
140
|
color: var(--colorNeutralForeground3Hover);
|
|
195
141
|
}
|
|
196
|
-
@media (forced-colors: active) {
|
|
197
|
-
forced-color-adjust: none;
|
|
198
|
-
background-color: Highlight;
|
|
199
|
-
color: HighlightText;
|
|
200
|
-
& :global(.fui-MenuItem__icon),
|
|
201
|
-
& :global(.fui-MenuItem__checkmark),
|
|
202
|
-
& :global(.fui-MenuItem__subText),
|
|
203
|
-
& :global(.fui-MenuItem__secondaryContent) {
|
|
204
|
-
color: HighlightText;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
142
|
}
|
|
208
143
|
|
|
209
144
|
.disabled {
|
|
@@ -235,42 +170,10 @@
|
|
|
235
170
|
&:focus {
|
|
236
171
|
color: var(--colorNeutralForegroundDisabled);
|
|
237
172
|
}
|
|
238
|
-
@media (forced-colors: active) {
|
|
239
|
-
color: GrayText;
|
|
240
|
-
&:hover {
|
|
241
|
-
forced-color-adjust: auto;
|
|
242
|
-
color: GrayText;
|
|
243
|
-
background-color: Canvas;
|
|
244
|
-
& :global(.fui-MenuItem__icon) {
|
|
245
|
-
color: GrayText;
|
|
246
|
-
background-color: Canvas;
|
|
247
|
-
}
|
|
248
|
-
& :global(.fui-MenuItem__icon),
|
|
249
|
-
& :global(.fui-MenuItem__checkmark),
|
|
250
|
-
& :global(.fui-MenuItem__subText),
|
|
251
|
-
& :global(.fui-MenuItem__secondaryContent) {
|
|
252
|
-
color: GrayText;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
&:hover:active {
|
|
256
|
-
color: GrayText;
|
|
257
|
-
background-color: Canvas;
|
|
258
|
-
& :global(.fui-MenuItem__subText) {
|
|
259
|
-
color: GrayText;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
&:focus {
|
|
263
|
-
color: GrayText;
|
|
264
|
-
background-color: Canvas;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
173
|
}
|
|
268
174
|
|
|
269
175
|
:where(.disabled) > :where(.content) > .subText {
|
|
270
176
|
color: var(--colorNeutralForegroundDisabled);
|
|
271
|
-
@media (forced-colors: active) {
|
|
272
|
-
color: GrayText;
|
|
273
|
-
}
|
|
274
177
|
}
|
|
275
178
|
|
|
276
179
|
:where(.multiline) > .content {
|
|
@@ -315,33 +218,153 @@
|
|
|
315
218
|
&:focus {
|
|
316
219
|
color: var(--colorNeutralForegroundDisabled);
|
|
317
220
|
}
|
|
318
|
-
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Forced colors rules: last and with one more type selector, so they win over rules and app overrides of equal
|
|
224
|
+
specificity but lose to state rules with one more class, like Griffel, which sorted @media rules after all other rules. */
|
|
225
|
+
|
|
226
|
+
@media (forced-colors: active) {
|
|
227
|
+
.root:not(html)[data-fui-focus-visible]::after {
|
|
228
|
+
border-top-color: Highlight;
|
|
229
|
+
border-inline-end-color: Highlight;
|
|
230
|
+
border-bottom-color: Highlight;
|
|
231
|
+
border-inline-start-color: Highlight;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.root:not(html):hover {
|
|
235
|
+
forced-color-adjust: none;
|
|
236
|
+
background-color: Highlight;
|
|
237
|
+
color: HighlightText;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.root:not(html):hover :global(.fui-MenuItem__icon),
|
|
241
|
+
.root:not(html):hover :global(.fui-MenuItem__checkmark),
|
|
242
|
+
.root:not(html):hover :global(.fui-MenuItem__subText),
|
|
243
|
+
.root:not(html):hover :global(.fui-MenuItem__secondaryContent) {
|
|
244
|
+
color: HighlightText;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.root:not(html):focus {
|
|
248
|
+
outline-style: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.root:not(html):focus-visible {
|
|
252
|
+
outline-style: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.root:not(html)[data-fui-focus-visible] {
|
|
256
|
+
border-top-color: var(--colorTransparentBackground);
|
|
257
|
+
border-inline-end-color: var(--colorTransparentBackground);
|
|
258
|
+
border-bottom-color: var(--colorTransparentBackground);
|
|
259
|
+
border-inline-start-color: var(--colorTransparentBackground);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.root:not(html)[data-fui-focus-visible]::after {
|
|
263
|
+
content: '';
|
|
264
|
+
position: absolute;
|
|
265
|
+
pointer-events: none;
|
|
266
|
+
z-index: 1;
|
|
267
|
+
border: var(--strokeWidthThick) solid Highlight;
|
|
268
|
+
border-radius: var(--borderRadiusMedium);
|
|
269
|
+
top: calc(-1 * var(--strokeWidthThick));
|
|
270
|
+
inset-inline-end: calc(-1 * var(--strokeWidthThick));
|
|
271
|
+
bottom: calc(-1 * var(--strokeWidthThick));
|
|
272
|
+
inset-inline-start: calc(-1 * var(--strokeWidthThick));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.root:not(html)[data-fui-focus-visible]::after {
|
|
276
|
+
border-top-color: Highlight;
|
|
277
|
+
border-inline-end-color: Highlight;
|
|
278
|
+
border-bottom-color: Highlight;
|
|
279
|
+
border-inline-start-color: Highlight;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.submenuOpen:not(html) {
|
|
283
|
+
forced-color-adjust: none;
|
|
284
|
+
background-color: Highlight;
|
|
285
|
+
color: HighlightText;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.submenuOpen:not(html) :global(.fui-MenuItem__icon),
|
|
289
|
+
.submenuOpen:not(html) :global(.fui-MenuItem__checkmark),
|
|
290
|
+
.submenuOpen:not(html) :global(.fui-MenuItem__subText),
|
|
291
|
+
.submenuOpen:not(html) :global(.fui-MenuItem__secondaryContent) {
|
|
292
|
+
color: HighlightText;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.disabled:not(html) {
|
|
319
296
|
color: GrayText;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.disabled:not(html):hover {
|
|
300
|
+
forced-color-adjust: auto;
|
|
301
|
+
color: GrayText;
|
|
302
|
+
background-color: Canvas;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.disabled:not(html):hover :global(.fui-MenuItem__icon) {
|
|
306
|
+
color: GrayText;
|
|
307
|
+
background-color: Canvas;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.disabled:not(html):hover :global(.fui-MenuItem__icon),
|
|
311
|
+
.disabled:not(html):hover :global(.fui-MenuItem__checkmark),
|
|
312
|
+
.disabled:not(html):hover :global(.fui-MenuItem__subText),
|
|
313
|
+
.disabled:not(html):hover :global(.fui-MenuItem__secondaryContent) {
|
|
314
|
+
color: GrayText;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.disabled:not(html):hover:active {
|
|
318
|
+
color: GrayText;
|
|
319
|
+
background-color: Canvas;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.disabled:not(html):hover:active :global(.fui-MenuItem__subText) {
|
|
323
|
+
color: GrayText;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.disabled:not(html):focus {
|
|
327
|
+
color: GrayText;
|
|
328
|
+
background-color: Canvas;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
:where(.disabled) > :where(.content) > .subText:not(html) {
|
|
332
|
+
color: GrayText;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
:where(.disabled) > .secondaryContent:not(html) {
|
|
336
|
+
color: GrayText;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
:where(.disabled) > .secondaryContent:not(html):hover {
|
|
340
|
+
forced-color-adjust: auto;
|
|
341
|
+
color: GrayText;
|
|
342
|
+
background-color: Canvas;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
:where(.disabled) > .secondaryContent:not(html):hover :global(.fui-MenuItem__icon) {
|
|
346
|
+
color: GrayText;
|
|
347
|
+
background-color: Canvas;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
:where(.disabled) > .secondaryContent:not(html):hover :global(.fui-MenuItem__icon),
|
|
351
|
+
:where(.disabled) > .secondaryContent:not(html):hover :global(.fui-MenuItem__checkmark),
|
|
352
|
+
:where(.disabled) > .secondaryContent:not(html):hover :global(.fui-MenuItem__subText),
|
|
353
|
+
:where(.disabled) > .secondaryContent:not(html):hover :global(.fui-MenuItem__secondaryContent) {
|
|
354
|
+
color: GrayText;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
:where(.disabled) > .secondaryContent:not(html):hover:active {
|
|
358
|
+
color: GrayText;
|
|
359
|
+
background-color: Canvas;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
:where(.disabled) > .secondaryContent:not(html):hover:active :global(.fui-MenuItem__subText) {
|
|
363
|
+
color: GrayText;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
:where(.disabled) > .secondaryContent:not(html):focus {
|
|
367
|
+
color: GrayText;
|
|
368
|
+
background-color: Canvas;
|
|
346
369
|
}
|
|
347
370
|
}
|
|
@@ -157,7 +157,7 @@ export const useMenuItemStyles_unstable = state => {
|
|
|
157
157
|
state.root.className = mergeClasses(menuItemClassNames.root, rootBaseStyles, state.submenuOpen && styles.submenuOpen, state.disabled && styles.disabled, state.root.className);
|
|
158
158
|
if (state.content) {
|
|
159
159
|
// eslint-disable-next-line react-hooks/immutability
|
|
160
|
-
state.content.className = mergeClasses(menuItemClassNames.content, contentBaseStyles,
|
|
160
|
+
state.content.className = mergeClasses(menuItemClassNames.content, contentBaseStyles, multiline && multilineStyles.content, state.content.className);
|
|
161
161
|
}
|
|
162
162
|
if (state.checkmark) {
|
|
163
163
|
// eslint-disable-next-line react-hooks/immutability
|
|
@@ -165,7 +165,7 @@ export const useMenuItemStyles_unstable = state => {
|
|
|
165
165
|
}
|
|
166
166
|
if (state.secondaryContent) {
|
|
167
167
|
// eslint-disable-next-line react-hooks/immutability
|
|
168
|
-
state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, secondaryContentBaseStyles, state.disabled && styles.disabled,
|
|
168
|
+
state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, secondaryContentBaseStyles, state.disabled && styles.disabled, multiline && multilineStyles.secondaryContent, state.secondaryContent.className);
|
|
169
169
|
}
|
|
170
170
|
if (state.icon) {
|
|
171
171
|
// eslint-disable-next-line react-hooks/immutability
|
|
@@ -173,11 +173,11 @@ export const useMenuItemStyles_unstable = state => {
|
|
|
173
173
|
}
|
|
174
174
|
if (state.submenuIndicator) {
|
|
175
175
|
// eslint-disable-next-line react-hooks/immutability
|
|
176
|
-
state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, submenuIndicatorBaseStyles,
|
|
176
|
+
state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, submenuIndicatorBaseStyles, multiline && multilineStyles.submenuIndicator, state.submenuIndicator.className);
|
|
177
177
|
}
|
|
178
178
|
if (state.subText) {
|
|
179
179
|
// eslint-disable-next-line react-hooks/immutability
|
|
180
|
-
state.subText.className = mergeClasses(menuItemClassNames.subText, state.disabled && subTextStyles.disabled, state.subText.className
|
|
180
|
+
state.subText.className = mergeClasses(menuItemClassNames.subText, subtextBaseStyles, state.disabled && subTextStyles.disabled, state.subText.className);
|
|
181
181
|
}
|
|
182
182
|
useCheckmarkStyles_unstable(state);
|
|
183
183
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mergeClasses","__styles","__resetStyles","iconFilledClassName","iconRegularClassName","createFocusOutlineStyle","tokens","typographyStyles","useCheckmarkStyles_unstable","menuItemClassNames","root","icon","checkmark","submenuIndicator","content","secondaryContent","subText","slotsSelector","useRootBaseStyles","r","s","useContentBaseStyles","useSecondaryContentBaseStyles","useIconBaseStyles","useSubmenuIndicatorBaseStyles","useSubtextBaseStyles","useStyles","B6of3ja","splitItemMain","Bh6795r","splitItemTrigger","Btl43ni","Beyfa6y","uwmqm3","Ftih45","Ccq8qp","Baz25je","cmx5o7","submenuOpen","De3pzq","sj55zd","D0sxk3","t6yez3","B3y4be1","B2i6fwv","B8gzw0y","By8wz76","B7iucu3","uq8m91","disabled","Bi91k9c","Jwef8y","eoavqd","Bk3fhr4","Bmfj8id","Bg7n49j","c7f7en","B2d53fq","iro3zm","Bumww26","t0hwav","fmph8g","Bahaeuw","Bbkh6qg","B3ejlan","B41git9","Iiu1i","Dcq74g","rxnm8d","wxluhh","idgcvv","j9xr24","d","m","h","f","useSubTextStyles","useMultilineStyles","mc9l5x","Beiy3e4","qb2dma","useMenuItemStyles_unstable","state","styles","rootBaseStyles","contentBaseStyles","secondaryContentBaseStyles","iconBaseStyles","submenuIndicatorBaseStyles","multilineStyles","subtextBaseStyles","subTextStyles","multiline","className"],"sources":["useMenuItemStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses, makeStyles, makeResetStyles } from \"@griffel/react\";\nimport { iconFilledClassName, iconRegularClassName } from \"@fluentui/react-icons\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nimport { tokens, typographyStyles } from \"@fluentui/react-theme\";\nimport { useCheckmarkStyles_unstable } from \"../../selectable/index.js\";\nexport const menuItemClassNames = {\n root: 'fui-MenuItem',\n icon: 'fui-MenuItem__icon',\n checkmark: 'fui-MenuItem__checkmark',\n submenuIndicator: 'fui-MenuItem__submenuIndicator',\n content: 'fui-MenuItem__content',\n secondaryContent: 'fui-MenuItem__secondaryContent',\n subText: 'fui-MenuItem__subText'\n};\nconst slotsSelector = `& .${menuItemClassNames.icon}, & .${menuItemClassNames.checkmark}, & .${menuItemClassNames.subText}, & .${menuItemClassNames.secondaryContent}`;\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n paddingRight: tokens.spacingVerticalSNudge,\n paddingLeft: tokens.spacingVerticalSNudge,\n paddingTop: tokens.spacingVerticalSNudge,\n paddingBottom: tokens.spacingVerticalSNudge,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover\n }\n },\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Pressed\n }\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [slotsSelector]: {\n color: 'HighlightText'\n }\n },\n ...createFocusOutlineStyle({\n style: {\n outlineColor: 'Highlight'\n }\n })\n },\n userSelect: 'none',\n ...createFocusOutlineStyle()\n});\nconst useContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n backgroundColor: 'transparent',\n flexGrow: 1\n});\nconst useSecondaryContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n ...typographyStyles.caption1,\n lineHeight: tokens.lineHeightBase300,\n color: tokens.colorNeutralForeground3,\n ':hover': {\n color: tokens.colorNeutralForeground3Hover\n },\n ':focus': {\n color: tokens.colorNeutralForeground3Hover\n }\n});\nconst useIconBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n flexShrink: 0\n});\nconst useSubmenuIndicatorBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center'\n});\nconst useSubtextBaseStyles = makeResetStyles({\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground3\n});\nconst useStyles = makeStyles({\n checkmark: {\n marginTop: '2px'\n },\n splitItemMain: {\n flexGrow: 1\n },\n splitItemTrigger: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n paddingLeft: 0,\n '::before': {\n content: '\"\"',\n width: tokens.strokeWidthThin,\n height: '24px',\n backgroundColor: tokens.colorNeutralStroke1\n }\n },\n submenuOpen: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover\n },\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [slotsSelector]: {\n color: 'HighlightText'\n }\n }\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n ':hover': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n cursor: 'not-allowed',\n [`& .${iconFilledClassName}`]: {\n display: 'none'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline'\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n },\n ':hover:active': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n },\n ':focus': {\n color: tokens.colorNeutralForegroundDisabled\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n ':hover': {\n forcedColorAdjust: 'auto',\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.icon}`]: {\n color: 'GrayText',\n backgroundColor: 'Canvas'\n },\n [slotsSelector]: {\n color: 'GrayText'\n }\n },\n ':hover:active': {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.subText}`]: {\n color: 'GrayText'\n }\n },\n ':focus': {\n color: 'GrayText',\n backgroundColor: 'Canvas'\n }\n }\n }\n});\nconst useSubTextStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText'\n }\n }\n});\nconst useMultilineStyles = makeStyles({\n content: {\n display: 'flex',\n flexDirection: 'column'\n },\n secondaryContent: {\n alignSelf: 'center'\n },\n submenuIndicator: {\n alignSelf: 'center'\n }\n});\n/** Applies style classnames to slots */ export const useMenuItemStyles_unstable = (state)=>{\n const styles = useStyles();\n const rootBaseStyles = useRootBaseStyles();\n const contentBaseStyles = useContentBaseStyles();\n const secondaryContentBaseStyles = useSecondaryContentBaseStyles();\n const iconBaseStyles = useIconBaseStyles();\n const submenuIndicatorBaseStyles = useSubmenuIndicatorBaseStyles();\n const multilineStyles = useMultilineStyles();\n const subtextBaseStyles = useSubtextBaseStyles();\n const subTextStyles = useSubTextStyles();\n const multiline = !!state.subText;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemClassNames.root, rootBaseStyles, state.submenuOpen && styles.submenuOpen, state.disabled && styles.disabled, state.root.className);\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemClassNames.content, contentBaseStyles, state.content.className, multiline && multilineStyles.content);\n }\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, styles.checkmark, state.checkmark.className);\n }\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, secondaryContentBaseStyles, state.disabled && styles.disabled, state.secondaryContent.className, multiline && multilineStyles.secondaryContent);\n }\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemClassNames.icon, iconBaseStyles, state.icon.className);\n }\n if (state.submenuIndicator) {\n // eslint-disable-next-line react-hooks/immutability\n state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, submenuIndicatorBaseStyles, state.submenuIndicator.className, multiline && multilineStyles.submenuIndicator);\n }\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(menuItemClassNames.subText, state.disabled && subTextStyles.disabled, state.subText.className, subtextBaseStyles);\n }\n useCheckmarkStyles_unstable(state);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,YAAY,E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AAK,CAACnE,gBAAgB,CAAC8E,SAAS,GAAG7F,YAAY,CAACS,kBAAkB,CAACM,gBAAgB,EAAEuE,0BAA0B,EAAEJ,KAAK,CAACjC,QAAQ,IAAIkC,MAAM,CAAClC,QAAQ,EAAEiC,KAAK,CAACnE,gBAAgB,CAAC8E,SAAS,EAAED,SAAS,IAAIH,eAAe,CAAC1E,gBAAgB,CAAC;EACxO;EACA,IAAImE,KAAK,CAACvE,IAAI,EAAE;IACZ;IACAuE,KAAK,CAACvE,IAAI,CAACkF,SAAS,GAAG7F,YAAY,CAACS,kBAAkB,CAACE,IAAI,EAAE4E,cAAc,EAAEL,KAAK,CAACvE,IAAI,CAACkF,SAAS,CAAC;EACtG;EACA,IAAIX,KAAK,CAACrE,gBAAgB,EAAE;IACxB;IACAqE,KAAK,CAACrE,gBAAgB,CAACgF,SAAS,GAAG7F,YAAY,CAACS,kBAAkB,CAACI,gBAAgB,EAAE2E,0BAA0B,EAAEN,KAAK,CAACrE,gBAAgB,CAACgF,SAAS,EAAED,SAAS,IAAIH,eAAe,CAAC5E,gBAAgB,CAAC;EACrM;EACA,IAAIqE,KAAK,CAAClE,OAAO,EAAE;IACf;IACAkE,KAAK,CAAClE,OAAO,CAAC6E,SAAS,GAAG7F,YAAY,CAACS,kBAAkB,CAACO,OAAO,EAAEkE,KAAK,CAACjC,QAAQ,IAAI0C,aAAa,CAAC1C,QAAQ,EAAEiC,KAAK,CAAClE,OAAO,CAAC6E,SAAS,EAAEH,iBAAiB,CAAC;EAC5J;EACAlF,2BAA2B,CAAC0E,KAAK,CAAC;EAClC,OAAOA,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["mergeClasses","__styles","__resetStyles","iconFilledClassName","iconRegularClassName","createFocusOutlineStyle","tokens","typographyStyles","useCheckmarkStyles_unstable","menuItemClassNames","root","icon","checkmark","submenuIndicator","content","secondaryContent","subText","slotsSelector","useRootBaseStyles","r","s","useContentBaseStyles","useSecondaryContentBaseStyles","useIconBaseStyles","useSubmenuIndicatorBaseStyles","useSubtextBaseStyles","useStyles","B6of3ja","splitItemMain","Bh6795r","splitItemTrigger","Btl43ni","Beyfa6y","uwmqm3","Ftih45","Ccq8qp","Baz25je","cmx5o7","submenuOpen","De3pzq","sj55zd","D0sxk3","t6yez3","B3y4be1","B2i6fwv","B8gzw0y","By8wz76","B7iucu3","uq8m91","disabled","Bi91k9c","Jwef8y","eoavqd","Bk3fhr4","Bmfj8id","Bg7n49j","c7f7en","B2d53fq","iro3zm","Bumww26","t0hwav","fmph8g","Bahaeuw","Bbkh6qg","B3ejlan","B41git9","Iiu1i","Dcq74g","rxnm8d","wxluhh","idgcvv","j9xr24","d","m","h","f","useSubTextStyles","useMultilineStyles","mc9l5x","Beiy3e4","qb2dma","useMenuItemStyles_unstable","state","styles","rootBaseStyles","contentBaseStyles","secondaryContentBaseStyles","iconBaseStyles","submenuIndicatorBaseStyles","multilineStyles","subtextBaseStyles","subTextStyles","multiline","className"],"sources":["useMenuItemStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses, makeStyles, makeResetStyles } from \"@griffel/react\";\nimport { iconFilledClassName, iconRegularClassName } from \"@fluentui/react-icons\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nimport { tokens, typographyStyles } from \"@fluentui/react-theme\";\nimport { useCheckmarkStyles_unstable } from \"../../selectable/index.js\";\nexport const menuItemClassNames = {\n root: 'fui-MenuItem',\n icon: 'fui-MenuItem__icon',\n checkmark: 'fui-MenuItem__checkmark',\n submenuIndicator: 'fui-MenuItem__submenuIndicator',\n content: 'fui-MenuItem__content',\n secondaryContent: 'fui-MenuItem__secondaryContent',\n subText: 'fui-MenuItem__subText'\n};\nconst slotsSelector = `& .${menuItemClassNames.icon}, & .${menuItemClassNames.checkmark}, & .${menuItemClassNames.subText}, & .${menuItemClassNames.secondaryContent}`;\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n paddingRight: tokens.spacingVerticalSNudge,\n paddingLeft: tokens.spacingVerticalSNudge,\n paddingTop: tokens.spacingVerticalSNudge,\n paddingBottom: tokens.spacingVerticalSNudge,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover\n }\n },\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Pressed\n }\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [slotsSelector]: {\n color: 'HighlightText'\n }\n },\n ...createFocusOutlineStyle({\n style: {\n outlineColor: 'Highlight'\n }\n })\n },\n userSelect: 'none',\n ...createFocusOutlineStyle()\n});\nconst useContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n backgroundColor: 'transparent',\n flexGrow: 1\n});\nconst useSecondaryContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n ...typographyStyles.caption1,\n lineHeight: tokens.lineHeightBase300,\n color: tokens.colorNeutralForeground3,\n ':hover': {\n color: tokens.colorNeutralForeground3Hover\n },\n ':focus': {\n color: tokens.colorNeutralForeground3Hover\n }\n});\nconst useIconBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n flexShrink: 0\n});\nconst useSubmenuIndicatorBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center'\n});\nconst useSubtextBaseStyles = makeResetStyles({\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground3\n});\nconst useStyles = makeStyles({\n checkmark: {\n marginTop: '2px'\n },\n splitItemMain: {\n flexGrow: 1\n },\n splitItemTrigger: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n paddingLeft: 0,\n '::before': {\n content: '\"\"',\n width: tokens.strokeWidthThin,\n height: '24px',\n backgroundColor: tokens.colorNeutralStroke1\n }\n },\n submenuOpen: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover\n },\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n [slotsSelector]: {\n color: 'HighlightText'\n }\n }\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n ':hover': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n cursor: 'not-allowed',\n [`& .${iconFilledClassName}`]: {\n display: 'none'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline'\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n },\n ':hover:active': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled\n }\n },\n ':focus': {\n color: tokens.colorNeutralForegroundDisabled\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n ':hover': {\n forcedColorAdjust: 'auto',\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.icon}`]: {\n color: 'GrayText',\n backgroundColor: 'Canvas'\n },\n [slotsSelector]: {\n color: 'GrayText'\n }\n },\n ':hover:active': {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.subText}`]: {\n color: 'GrayText'\n }\n },\n ':focus': {\n color: 'GrayText',\n backgroundColor: 'Canvas'\n }\n }\n }\n});\nconst useSubTextStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText'\n }\n }\n});\nconst useMultilineStyles = makeStyles({\n content: {\n display: 'flex',\n flexDirection: 'column'\n },\n secondaryContent: {\n alignSelf: 'center'\n },\n submenuIndicator: {\n alignSelf: 'center'\n }\n});\n/** Applies style classnames to slots */ export const useMenuItemStyles_unstable = (state)=>{\n const styles = useStyles();\n const rootBaseStyles = useRootBaseStyles();\n const contentBaseStyles = useContentBaseStyles();\n const secondaryContentBaseStyles = useSecondaryContentBaseStyles();\n const iconBaseStyles = useIconBaseStyles();\n const submenuIndicatorBaseStyles = useSubmenuIndicatorBaseStyles();\n const multilineStyles = useMultilineStyles();\n const subtextBaseStyles = useSubtextBaseStyles();\n const subTextStyles = useSubTextStyles();\n const multiline = !!state.subText;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(menuItemClassNames.root, rootBaseStyles, state.submenuOpen && styles.submenuOpen, state.disabled && styles.disabled, state.root.className);\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(menuItemClassNames.content, contentBaseStyles, multiline && multilineStyles.content, state.content.className);\n }\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, styles.checkmark, state.checkmark.className);\n }\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, secondaryContentBaseStyles, state.disabled && styles.disabled, multiline && multilineStyles.secondaryContent, state.secondaryContent.className);\n }\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemClassNames.icon, iconBaseStyles, state.icon.className);\n }\n if (state.submenuIndicator) {\n // eslint-disable-next-line react-hooks/immutability\n state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, submenuIndicatorBaseStyles, multiline && multilineStyles.submenuIndicator, state.submenuIndicator.className);\n }\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(menuItemClassNames.subText, subtextBaseStyles, state.disabled && subTextStyles.disabled, state.subText.className);\n }\n useCheckmarkStyles_unstable(state);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,YAAY,EAAAC,QAAA,EAAAC,aAAA,QAAqC,gBAAgB;AAC1E,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,uBAAuB;AACjF,SAASC,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,IAAI,EAAE,cAAc;EACpBC,IAAI,EAAE,oBAAoB;EAC1BC,SAAS,EAAE,yBAAyB;EACpCC,gBAAgB,EAAE,gCAAgC;EAClDC,OAAO,EAAE,uBAAuB;EAChCC,gBAAgB,EAAE,gCAAgC;EAClDC,OAAO,EAAE;AACb,CAAC;AACD,MAAMC,aAAa,GAAG,MAAMR,kBAAkB,CAACE,IAAI,QA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CAACrE,gBAAgB,CAACgF,SAAS,GAAG7F,YAAY,CAACS,kBAAkB,CAACI,gBAAgB,EAAE2E,0BAA0B,EAAEI,SAAS,IAAIH,eAAe,CAAC5E,gBAAgB,EAAEqE,KAAK,CAACrE,gBAAgB,CAACgF,SAAS,CAAC;EACrM;EACA,IAAIX,KAAK,CAAClE,OAAO,EAAE;IACf;IACAkE,KAAK,CAAClE,OAAO,CAAC6E,SAAS,GAAG7F,YAAY,CAACS,kBAAkB,CAACO,OAAO,EAAE0E,iBAAiB,EAAER,KAAK,CAACjC,QAAQ,IAAI0C,aAAa,CAAC1C,QAAQ,EAAEiC,KAAK,CAAClE,OAAO,CAAC6E,SAAS,CAAC;EAC5J;EACArF,2BAA2B,CAAC0E,KAAK,CAAC;EAClC,OAAOA,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -250,7 +250,7 @@ const useMultilineStyles = makeStyles({
|
|
|
250
250
|
state.root.className = mergeClasses(menuItemClassNames.root, rootBaseStyles, state.submenuOpen && styles.submenuOpen, state.disabled && styles.disabled, state.root.className);
|
|
251
251
|
if (state.content) {
|
|
252
252
|
// eslint-disable-next-line react-hooks/immutability
|
|
253
|
-
state.content.className = mergeClasses(menuItemClassNames.content, contentBaseStyles,
|
|
253
|
+
state.content.className = mergeClasses(menuItemClassNames.content, contentBaseStyles, multiline && multilineStyles.content, state.content.className);
|
|
254
254
|
}
|
|
255
255
|
if (state.checkmark) {
|
|
256
256
|
// eslint-disable-next-line react-hooks/immutability
|
|
@@ -258,7 +258,7 @@ const useMultilineStyles = makeStyles({
|
|
|
258
258
|
}
|
|
259
259
|
if (state.secondaryContent) {
|
|
260
260
|
// eslint-disable-next-line react-hooks/immutability
|
|
261
|
-
state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, secondaryContentBaseStyles, state.disabled && styles.disabled,
|
|
261
|
+
state.secondaryContent.className = mergeClasses(menuItemClassNames.secondaryContent, secondaryContentBaseStyles, state.disabled && styles.disabled, multiline && multilineStyles.secondaryContent, state.secondaryContent.className);
|
|
262
262
|
}
|
|
263
263
|
if (state.icon) {
|
|
264
264
|
// eslint-disable-next-line react-hooks/immutability
|
|
@@ -266,11 +266,11 @@ const useMultilineStyles = makeStyles({
|
|
|
266
266
|
}
|
|
267
267
|
if (state.submenuIndicator) {
|
|
268
268
|
// eslint-disable-next-line react-hooks/immutability
|
|
269
|
-
state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, submenuIndicatorBaseStyles,
|
|
269
|
+
state.submenuIndicator.className = mergeClasses(menuItemClassNames.submenuIndicator, submenuIndicatorBaseStyles, multiline && multilineStyles.submenuIndicator, state.submenuIndicator.className);
|
|
270
270
|
}
|
|
271
271
|
if (state.subText) {
|
|
272
272
|
// eslint-disable-next-line react-hooks/immutability
|
|
273
|
-
state.subText.className = mergeClasses(menuItemClassNames.subText, state.disabled && subTextStyles.disabled, state.subText.className
|
|
273
|
+
state.subText.className = mergeClasses(menuItemClassNames.subText, subtextBaseStyles, state.disabled && subTextStyles.disabled, state.subText.className);
|
|
274
274
|
}
|
|
275
275
|
useCheckmarkStyles_unstable(state);
|
|
276
276
|
return state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { mergeClasses, makeStyles, makeResetStyles } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport type { MenuItemCheckboxState } from '../MenuItemCheckbox/index';\nimport type { MenuItemSlots, MenuItemState } from './MenuItem.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuItemClassNames: SlotClassNames<MenuItemSlots> = {\n root: 'fui-MenuItem',\n icon: 'fui-MenuItem__icon',\n checkmark: 'fui-MenuItem__checkmark',\n submenuIndicator: 'fui-MenuItem__submenuIndicator',\n content: 'fui-MenuItem__content',\n secondaryContent: 'fui-MenuItem__secondaryContent',\n subText: 'fui-MenuItem__subText',\n};\n\nconst slotsSelector = `& .${menuItemClassNames.icon}, & .${menuItemClassNames.checkmark}, & .${menuItemClassNames.subText}, & .${menuItemClassNames.secondaryContent}`;\n\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n paddingRight: tokens.spacingVerticalSNudge, // 6px\n paddingLeft: tokens.spacingVerticalSNudge,\n paddingTop: tokens.spacingVerticalSNudge,\n paddingBottom: tokens.spacingVerticalSNudge,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover,\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Pressed,\n },\n },\n\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n\n [slotsSelector]: {\n color: 'HighlightText',\n },\n },\n ...createFocusOutlineStyle({ style: { outlineColor: 'Highlight' } }),\n },\n\n userSelect: 'none',\n ...createFocusOutlineStyle(),\n});\n\nconst useContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n backgroundColor: 'transparent',\n flexGrow: 1,\n});\n\nconst useSecondaryContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n ...typographyStyles.caption1,\n lineHeight: tokens.lineHeightBase300,\n color: tokens.colorNeutralForeground3,\n ':hover': {\n color: tokens.colorNeutralForeground3Hover,\n },\n ':focus': {\n color: tokens.colorNeutralForeground3Hover,\n },\n});\n\nconst useIconBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n flexShrink: 0,\n});\n\nconst useSubmenuIndicatorBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n});\n\nconst useSubtextBaseStyles = makeResetStyles({\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground3,\n});\n\nconst useStyles = makeStyles({\n checkmark: {\n marginTop: '2px',\n },\n\n splitItemMain: {\n flexGrow: 1,\n },\n\n splitItemTrigger: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n paddingLeft: 0,\n '::before': {\n content: '\"\"',\n width: tokens.strokeWidthThin,\n height: '24px',\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n submenuOpen: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover,\n },\n\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n\n [slotsSelector]: {\n color: 'HighlightText',\n },\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n ':hover': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n cursor: 'not-allowed',\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':hover:active': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':focus': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n ':hover': {\n forcedColorAdjust: 'auto',\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.icon}`]: {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n },\n [slotsSelector]: {\n color: 'GrayText',\n },\n },\n ':hover:active': {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.subText}`]: {\n color: 'GrayText',\n },\n },\n ':focus': {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n },\n },\n },\n});\n\nconst useSubTextStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useMultilineStyles = makeStyles({\n content: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n secondaryContent: {\n alignSelf: 'center',\n },\n\n submenuIndicator: {\n alignSelf: 'center',\n },\n});\n\n/** Applies style classnames to slots */\nexport const useMenuItemStyles_unstable = (state: MenuItemState): MenuItemState => {\n const styles = useStyles();\n const rootBaseStyles = useRootBaseStyles();\n const contentBaseStyles = useContentBaseStyles();\n const secondaryContentBaseStyles = useSecondaryContentBaseStyles();\n const iconBaseStyles = useIconBaseStyles();\n const submenuIndicatorBaseStyles = useSubmenuIndicatorBaseStyles();\n const multilineStyles = useMultilineStyles();\n const subtextBaseStyles = useSubtextBaseStyles();\n const subTextStyles = useSubTextStyles();\n const multiline = !!state.subText;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n menuItemClassNames.root,\n rootBaseStyles,\n state.submenuOpen && styles.submenuOpen,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(\n menuItemClassNames.content,\n contentBaseStyles,\n state.content.className,\n multiline && multilineStyles.content,\n );\n }\n\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, styles.checkmark, state.checkmark.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemClassNames.secondaryContent,\n secondaryContentBaseStyles,\n state.disabled && styles.disabled,\n state.secondaryContent.className,\n multiline && multilineStyles.secondaryContent,\n );\n }\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemClassNames.icon, iconBaseStyles, state.icon.className);\n }\n\n if (state.submenuIndicator) {\n // eslint-disable-next-line react-hooks/immutability\n state.submenuIndicator.className = mergeClasses(\n menuItemClassNames.submenuIndicator,\n submenuIndicatorBaseStyles,\n state.submenuIndicator.className,\n multiline && multilineStyles.submenuIndicator,\n );\n }\n\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(\n menuItemClassNames.subText,\n state.disabled && subTextStyles.disabled,\n state.subText.className,\n subtextBaseStyles,\n );\n }\n\n useCheckmarkStyles_unstable(state as MenuItemCheckboxState);\n\n return state;\n};\n"],"names":["mergeClasses","makeStyles","makeResetStyles","iconFilledClassName","iconRegularClassName","createFocusOutlineStyle","tokens","typographyStyles","useCheckmarkStyles_unstable","menuItemClassNames","root","icon","checkmark","submenuIndicator","content","secondaryContent","subText","slotsSelector","useRootBaseStyles","borderRadius","borderRadiusMedium","position","color","colorNeutralForeground2","backgroundColor","colorNeutralBackground1","paddingRight","spacingVerticalSNudge","paddingLeft","paddingTop","paddingBottom","boxSizing","maxWidth","minHeight","flexShrink","display","alignItems","fontSize","fontSizeBase300","cursor","gap","colorNeutralBackground1Hover","colorNeutralForeground2Hover","colorNeutralForeground2BrandSelected","colorNeutralForeground3Hover","colorNeutralBackground1Pressed","colorNeutralForeground2Pressed","colorNeutralForeground3Pressed","forcedColorAdjust","style","outlineColor","userSelect","useContentBaseStyles","flexGrow","useSecondaryContentBaseStyles","caption1","lineHeight","lineHeightBase300","colorNeutralForeground3","useIconBaseStyles","width","height","justifyContent","useSubmenuIndicatorBaseStyles","useSubtextBaseStyles","caption2","useStyles","marginTop","splitItemMain","splitItemTrigger","borderTopLeftRadius","borderBottomLeftRadius","strokeWidthThin","colorNeutralStroke1","submenuOpen","disabled","colorNeutralForegroundDisabled","useSubTextStyles","useMultilineStyles","flexDirection","alignSelf","useMenuItemStyles_unstable","state","styles","rootBaseStyles","contentBaseStyles","secondaryContentBaseStyles","iconBaseStyles","submenuIndicatorBaseStyles","multilineStyles","subtextBaseStyles","subTextStyles","multiline","className"],"mappings":"AAAA;AAEA,SAASA,YAAY,EAAEC,UAAU,EAAEC,eAAe,QAAQ,iBAAiB;AAC3E,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,wBAAwB;AAClF,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,2BAA2B,QAAQ,4BAAyB;AAKrE,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,kBAAkB;IAClBC,SAAS;IACTC,kBAAkB;IAClBC,SAAS;AACX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C1BkE,MAAMP,QAAQ,IAAIgB,cAAchB,QAAQ,EACxCO,MAAMlE,OAAO,CAAC6E,SAAS,EACvBH;IAEJ;IAEAlF,4BAA4B0E;IAE5B,OAAOA;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/MenuItem/useMenuItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { mergeClasses, makeStyles, makeResetStyles } from '@griffel/react';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useCheckmarkStyles_unstable } from '../../selectable/index';\nimport type { MenuItemCheckboxState } from '../MenuItemCheckbox/index';\nimport type { MenuItemSlots, MenuItemState } from './MenuItem.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const menuItemClassNames: SlotClassNames<MenuItemSlots> = {\n root: 'fui-MenuItem',\n icon: 'fui-MenuItem__icon',\n checkmark: 'fui-MenuItem__checkmark',\n submenuIndicator: 'fui-MenuItem__submenuIndicator',\n content: 'fui-MenuItem__content',\n secondaryContent: 'fui-MenuItem__secondaryContent',\n subText: 'fui-MenuItem__subText',\n};\n\nconst slotsSelector = `& .${menuItemClassNames.icon}, & .${menuItemClassNames.checkmark}, & .${menuItemClassNames.subText}, & .${menuItemClassNames.secondaryContent}`;\n\nconst useRootBaseStyles = makeResetStyles({\n borderRadius: tokens.borderRadiusMedium,\n position: 'relative',\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground1,\n paddingRight: tokens.spacingVerticalSNudge, // 6px\n paddingLeft: tokens.spacingVerticalSNudge,\n paddingTop: tokens.spacingVerticalSNudge,\n paddingBottom: tokens.spacingVerticalSNudge,\n boxSizing: 'border-box',\n maxWidth: '290px',\n minHeight: '32px',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'start',\n fontSize: tokens.fontSizeBase300,\n cursor: 'pointer',\n gap: '4px',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover,\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Pressed,\n },\n },\n\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n\n [slotsSelector]: {\n color: 'HighlightText',\n },\n },\n ...createFocusOutlineStyle({ style: { outlineColor: 'Highlight' } }),\n },\n\n userSelect: 'none',\n ...createFocusOutlineStyle(),\n});\n\nconst useContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n backgroundColor: 'transparent',\n flexGrow: 1,\n});\n\nconst useSecondaryContentBaseStyles = makeResetStyles({\n paddingLeft: '2px',\n paddingRight: '2px',\n ...typographyStyles.caption1,\n lineHeight: tokens.lineHeightBase300,\n color: tokens.colorNeutralForeground3,\n ':hover': {\n color: tokens.colorNeutralForeground3Hover,\n },\n ':focus': {\n color: tokens.colorNeutralForeground3Hover,\n },\n});\n\nconst useIconBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n flexShrink: 0,\n});\n\nconst useSubmenuIndicatorBaseStyles = makeResetStyles({\n width: '20px',\n height: '20px',\n fontSize: '20px',\n lineHeight: 0,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n});\n\nconst useSubtextBaseStyles = makeResetStyles({\n ...typographyStyles.caption2,\n color: tokens.colorNeutralForeground3,\n});\n\nconst useStyles = makeStyles({\n checkmark: {\n marginTop: '2px',\n },\n\n splitItemMain: {\n flexGrow: 1,\n },\n\n splitItemTrigger: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n paddingLeft: 0,\n '::before': {\n content: '\"\"',\n width: tokens.strokeWidthThin,\n height: '24px',\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n submenuOpen: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForeground3Hover,\n },\n\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n\n [slotsSelector]: {\n color: 'HighlightText',\n },\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n ':hover': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n cursor: 'not-allowed',\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n [`& .${menuItemClassNames.icon}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':hover:active': {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorNeutralBackground1,\n\n [`& .${menuItemClassNames.subText}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':focus': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n ':hover': {\n forcedColorAdjust: 'auto',\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.icon}`]: {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n },\n [slotsSelector]: {\n color: 'GrayText',\n },\n },\n ':hover:active': {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n [`& .${menuItemClassNames.subText}`]: {\n color: 'GrayText',\n },\n },\n ':focus': {\n color: 'GrayText',\n backgroundColor: 'Canvas',\n },\n },\n },\n});\n\nconst useSubTextStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\nconst useMultilineStyles = makeStyles({\n content: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n secondaryContent: {\n alignSelf: 'center',\n },\n\n submenuIndicator: {\n alignSelf: 'center',\n },\n});\n\n/** Applies style classnames to slots */\nexport const useMenuItemStyles_unstable = (state: MenuItemState): MenuItemState => {\n const styles = useStyles();\n const rootBaseStyles = useRootBaseStyles();\n const contentBaseStyles = useContentBaseStyles();\n const secondaryContentBaseStyles = useSecondaryContentBaseStyles();\n const iconBaseStyles = useIconBaseStyles();\n const submenuIndicatorBaseStyles = useSubmenuIndicatorBaseStyles();\n const multilineStyles = useMultilineStyles();\n const subtextBaseStyles = useSubtextBaseStyles();\n const subTextStyles = useSubTextStyles();\n const multiline = !!state.subText;\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n menuItemClassNames.root,\n rootBaseStyles,\n state.submenuOpen && styles.submenuOpen,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.content) {\n // eslint-disable-next-line react-hooks/immutability\n state.content.className = mergeClasses(\n menuItemClassNames.content,\n contentBaseStyles,\n multiline && multilineStyles.content,\n state.content.className,\n );\n }\n\n if (state.checkmark) {\n // eslint-disable-next-line react-hooks/immutability\n state.checkmark.className = mergeClasses(menuItemClassNames.checkmark, styles.checkmark, state.checkmark.className);\n }\n\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(\n menuItemClassNames.secondaryContent,\n secondaryContentBaseStyles,\n state.disabled && styles.disabled,\n multiline && multilineStyles.secondaryContent,\n state.secondaryContent.className,\n );\n }\n\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(menuItemClassNames.icon, iconBaseStyles, state.icon.className);\n }\n\n if (state.submenuIndicator) {\n // eslint-disable-next-line react-hooks/immutability\n state.submenuIndicator.className = mergeClasses(\n menuItemClassNames.submenuIndicator,\n submenuIndicatorBaseStyles,\n multiline && multilineStyles.submenuIndicator,\n state.submenuIndicator.className,\n );\n }\n\n if (state.subText) {\n // eslint-disable-next-line react-hooks/immutability\n state.subText.className = mergeClasses(\n menuItemClassNames.subText,\n subtextBaseStyles,\n state.disabled && subTextStyles.disabled,\n state.subText.className,\n );\n }\n\n useCheckmarkStyles_unstable(state as MenuItemCheckboxState);\n\n return state;\n};\n"],"names":["mergeClasses","makeStyles","makeResetStyles","iconFilledClassName","iconRegularClassName","createFocusOutlineStyle","tokens","typographyStyles","useCheckmarkStyles_unstable","menuItemClassNames","root","icon","checkmark","submenuIndicator","content","secondaryContent","subText","slotsSelector","useRootBaseStyles","borderRadius","borderRadiusMedium","position","color","colorNeutralForeground2","backgroundColor","colorNeutralBackground1","paddingRight","spacingVerticalSNudge","paddingLeft","paddingTop","paddingBottom","boxSizing","maxWidth","minHeight","flexShrink","display","alignItems","fontSize","fontSizeBase300","cursor","gap","colorNeutralBackground1Hover","colorNeutralForeground2Hover","colorNeutralForeground2BrandSelected","colorNeutralForeground3Hover","colorNeutralBackground1Pressed","colorNeutralForeground2Pressed","colorNeutralForeground3Pressed","forcedColorAdjust","style","outlineColor","userSelect","useContentBaseStyles","flexGrow","useSecondaryContentBaseStyles","caption1","lineHeight","lineHeightBase300","colorNeutralForeground3","useIconBaseStyles","width","height","justifyContent","useSubmenuIndicatorBaseStyles","useSubtextBaseStyles","caption2","useStyles","marginTop","splitItemMain","splitItemTrigger","borderTopLeftRadius","borderBottomLeftRadius","strokeWidthThin","colorNeutralStroke1","submenuOpen","disabled","colorNeutralForegroundDisabled","useSubTextStyles","useMultilineStyles","flexDirection","alignSelf","useMenuItemStyles_unstable","state","styles","rootBaseStyles","contentBaseStyles","secondaryContentBaseStyles","iconBaseStyles","submenuIndicatorBaseStyles","multilineStyles","subtextBaseStyles","subTextStyles","multiline","className"],"mappings":"AAAA;AAEA,SAASA,YAAY,EAAEC,UAAU,EAAEC,eAAe,QAAQ,iBAAiB;AAC3E,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,wBAAwB;AAClF,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,2BAA2B,QAAQ,4BAAyB;AAKrE,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,MAAM;IACNC,WAAW;IACXC,kBAAkB;IAClBC,SAAS;IACTC,kBAAkB;IAClBC,SAAS;AACX,EAAE;AAEF,MAAMC,gBAAgB,CAAC,GAAG,EAAER,mBAAmBE,IAAI,CAAC,KAAK,EAAEF,mBAAmBG,SAAS,CAAC,KAAK,EAAEH,mBAAmBO,OAAO,CAAC,KAAK,EAAEP,mBAAmBM,gBAAgB,EAAE;AAEtK,MAAMG,oBAAoBhB,gBAAgB;IACxCiB,cAAcb,OAAOc,kBAAkB;IACvCC,UAAU;IACVC,OAAOhB,OAAOiB,uBAAuB;IACrCC,iBAAiBlB,OAAOmB,uBAAuB;IAC/CC,cAAcpB,OAAOqB,qBAAqB;IAC1CC,aAAatB,OAAOqB,qBAAqB;IACzCE,YAAYvB,OAAOqB,qBAAqB;IACxCG,eAAexB,OAAOqB,qBAAqB;IAC3CI,WAAW;IACXC,UAAU;IACVC,WAAW;IACXC,YAAY;IACZC,SAAS;IACTC,YAAY;IACZC,UAAU/B,OAAOgC,eAAe;IAChCC,QAAQ;IACRC,KAAK;IAEL,UAAU;QAC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gBAAgB,EACnCuE,4BACAJ,MAAMP,QAAQ,IAAIQ,OAAOR,QAAQ,EACjCiB,aAAaH,gBAAgB1E,gBAAgB,EAC7CmE,MAAMnE,gBAAgB,CAAC8E,SAAS;IAEpC;IAEA,IAAIX,MAAMvE,IAAI,EAAE;QACd,oDAAoD;QACpDuE,MAAMvE,IAAI,CAACkF,SAAS,GAAG7F,aAAaS,mBAAmBE,IAAI,EAAE4E,gBAAgBL,MAAMvE,IAAI,CAACkF,SAAS;IACnG;IAEA,IAAIX,MAAMrE,gBAAgB,EAAE;QAC1B,oDAAoD;QACpDqE,MAAMrE,gBAAgB,CAACgF,SAAS,GAAG7F,aACjCS,mBAAmBI,gBAAgB,EACnC2E,4BACAI,aAAaH,gBAAgB5E,gBAAgB,EAC7CqE,MAAMrE,gBAAgB,CAACgF,SAAS;IAEpC;IAEA,IAAIX,MAAMlE,OAAO,EAAE;QACjB,oDAAoD;QACpDkE,MAAMlE,OAAO,CAAC6E,SAAS,GAAG7F,aACxBS,mBAAmBO,OAAO,EAC1B0E,mBACAR,MAAMP,QAAQ,IAAIgB,cAAchB,QAAQ,EACxCO,MAAMlE,OAAO,CAAC6E,SAAS;IAE3B;IAEArF,4BAA4B0E;IAE5B,OAAOA;AACT,EAAE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* @griffel-buckets reset: .switchIndicator */
|
|
2
1
|
.switchIndicator {
|
|
3
2
|
border-radius: var(--borderRadiusCircular);
|
|
4
3
|
border: var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);
|
|
@@ -64,6 +63,7 @@
|
|
|
64
63
|
:where(.multiline) > .switchIndicator {
|
|
65
64
|
align-self: center;
|
|
66
65
|
}
|
|
67
|
-
|
|
66
|
+
/* `:dir()` follows the nearest `dir` (each FluentProvider sets one), like Griffel's direction from context. */
|
|
67
|
+
:where(.checked):dir(rtl) > .switchIndicator :global(.fui-MenuItemSwitch__switchIndicator__circleFilled) {
|
|
68
68
|
transform: translateX(calc(-1 * var(--spacingHorizontalXL)));
|
|
69
69
|
}
|