@atlaskit/navigation-system 0.182.0 → 1.0.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 +29 -0
- package/dist/cjs/components/skip-links/skip-links-container.js +25 -17
- package/dist/cjs/context/skip-links/skip-links-data-context.js +28 -10
- package/dist/cjs/context/skip-links/skip-links-provider.js +17 -6
- package/dist/cjs/ui/menu-item/menu-item.js +1 -1
- package/dist/cjs/ui/page-layout/root.js +11 -1
- package/dist/es2019/components/skip-links/skip-links-container.js +24 -16
- package/dist/es2019/context/skip-links/skip-links-data-context.js +25 -8
- package/dist/es2019/context/skip-links/skip-links-provider.js +17 -6
- package/dist/es2019/ui/menu-item/menu-item.js +1 -1
- package/dist/es2019/ui/page-layout/root.js +11 -1
- package/dist/esm/components/skip-links/skip-links-container.js +23 -15
- package/dist/esm/context/skip-links/skip-links-data-context.js +26 -9
- package/dist/esm/context/skip-links/skip-links-provider.js +16 -5
- package/dist/esm/ui/menu-item/menu-item.js +1 -1
- package/dist/esm/ui/page-layout/root.js +11 -1
- package/dist/types/components/skip-links/skip-links-container.d.ts +13 -8
- package/dist/types/context/skip-links/skip-links-data-context.d.ts +15 -1
- package/dist/types/context/skip-links/skip-links-provider.d.ts +9 -4
- package/dist/types-ts4.5/components/skip-links/skip-links-container.d.ts +13 -8
- package/dist/types-ts4.5/context/skip-links/skip-links-data-context.d.ts +15 -1
- package/dist/types-ts4.5/context/skip-links/skip-links-provider.d.ts +9 -4
- package/package.json +9 -10
- package/afm-cc/tsconfig.json +0 -78
- package/afm-dev-agents/tsconfig.json +0 -78
- package/afm-jira/tsconfig.json +0 -78
- package/afm-passionfruit/tsconfig.json +0 -78
- package/afm-post-office/tsconfig.json +0 -78
- package/afm-rovo-extension/tsconfig.json +0 -78
- package/afm-townsquare/tsconfig.json +0 -78
- package/afm-volt/tsconfig.json +0 -78
- package/build/tsconfig.json +0 -23
- package/docs/00-intro.tsx +0 -14
- package/examples/advanced-layout.tsx +0 -144
- package/examples/button-menu-item.tsx +0 -426
- package/examples/company-hub-mock.tsx +0 -219
- package/examples/composition.tsx +0 -424
- package/examples/confluence-mock.tsx +0 -381
- package/examples/constellation/common/mock-content.tsx +0 -39
- package/examples/constellation/common/mock-top-bar.tsx +0 -20
- package/examples/constellation/layout/custom-skip-links.tsx +0 -12
- package/examples/constellation/layout/custom-theming--parse-hex.tsx +0 -19
- package/examples/constellation/layout/custom-theming--parse-hsl.tsx +0 -22
- package/examples/constellation/layout/custom-theming--parse-rgb.tsx +0 -22
- package/examples/constellation/layout/custom-theming--parse-user-color.tsx +0 -22
- package/examples/constellation/layout/custom-theming--rgb-object.tsx +0 -21
- package/examples/constellation/layout/expand-side-nav.tsx +0 -17
- package/examples/constellation/layout/toggle-side-nav-keyboard-shortcut.tsx +0 -25
- package/examples/constellation/side-nav-items/actions-and-actions-on-hover.tsx +0 -153
- package/examples/constellation/side-nav-items/button-menu-item.tsx +0 -133
- package/examples/constellation/side-nav-items/common/global-app-icon-tile.tsx +0 -43
- package/examples/constellation/side-nav-items/common/mock-side-nav.tsx +0 -18
- package/examples/constellation/side-nav-items/container-avatar.tsx +0 -32
- package/examples/constellation/side-nav-items/elem-after.tsx +0 -60
- package/examples/constellation/side-nav-items/elem-before.tsx +0 -116
- package/examples/constellation/side-nav-items/expandable-menu-item-default-variant.tsx +0 -219
- package/examples/constellation/side-nav-items/expandable-menu-item-link-variant.tsx +0 -278
- package/examples/constellation/side-nav-items/flyout-menu-item.tsx +0 -156
- package/examples/constellation/side-nav-items/link-menu-item.tsx +0 -161
- package/examples/constellation/side-nav-items/menu-divider.tsx +0 -114
- package/examples/constellation/side-nav-items/menu-section.tsx +0 -177
- package/examples/constellation/side-nav-items/right-to-left.tsx +0 -144
- package/examples/constellation/side-nav-items/top-level-spacer.tsx +0 -82
- package/examples/constellation/side-nav-items/truncation.tsx +0 -58
- package/examples/constellation/top-nav-items/app-logo.tsx +0 -19
- package/examples/constellation/top-nav-items/custom-logo.tsx +0 -28
- package/examples/constellation/top-nav-items/custom-theming--buttons.tsx +0 -27
- package/examples/constellation/top-nav-items/custom-theming--logo.tsx +0 -27
- package/examples/constellation/top-nav-items/custom-theming--search.tsx +0 -28
- package/examples/constellation/top-nav-items/custom-title.tsx +0 -20
- package/examples/constellation/top-nav-items/end-item.tsx +0 -23
- package/examples/constellation/top-nav-items/top-nav-button.tsx +0 -34
- package/examples/constellation/top-nav-items/top-nav-end.tsx +0 -25
- package/examples/constellation/top-nav-items/top-nav-middle.tsx +0 -19
- package/examples/constellation/top-nav-items/top-nav-start.tsx +0 -31
- package/examples/drag-and-drop/jira/data.tsx +0 -320
- package/examples/drag-and-drop/jira/entry.tsx +0 -89
- package/examples/drag-and-drop/jira/filters/filter-move-modal.tsx +0 -171
- package/examples/drag-and-drop/jira/filters/filter-tree-utils.tsx +0 -134
- package/examples/drag-and-drop/jira/filters/filters-menu-item.tsx +0 -470
- package/examples/drag-and-drop/jira/for-you/for-you-menu-item.tsx +0 -74
- package/examples/drag-and-drop/jira/projects/project-tile.tsx +0 -37
- package/examples/drag-and-drop/jira/projects/project.tsx +0 -257
- package/examples/drag-and-drop/jira/projects/projects-menu-item.tsx +0 -120
- package/examples/drag-and-drop/jira/recent/recent-menu-item.tsx +0 -30
- package/examples/drag-and-drop/jira/reducer.tsx +0 -78
- package/examples/drag-and-drop/jira/registry.tsx +0 -52
- package/examples/drag-and-drop/jira/reorder-actions.tsx +0 -75
- package/examples/drag-and-drop/jira/shared-top-level-flyout.tsx +0 -144
- package/examples/drag-and-drop/jira/sidebar.tsx +0 -361
- package/examples/drag-and-drop/jira/starred/starred-menu-item.tsx +0 -29
- package/examples/drag-and-drop/jira/state-context.tsx +0 -34
- package/examples/drag-and-drop/jira/top-level-shared-more-menu.tsx +0 -99
- package/examples/drag-and-drop/sidebar-example-container.tsx +0 -38
- package/examples/drag-and-drop/simple.tsx +0 -653
- package/examples/drag-and-drop/standalone-jira-sidebar-centered.tsx +0 -27
- package/examples/drag-and-drop/standalone-jira-sidebar.tsx +0 -18
- package/examples/drag-and-drop-in-the-sidebar-flyout.tsx +0 -161
- package/examples/drag-and-drop-jira-scaling-vr.tsx +0 -25
- package/examples/drag-and-drop-jira-sidebar-centered.tsx +0 -1
- package/examples/drag-and-drop-jira-sidebar-standalone.tsx +0 -1
- package/examples/drag-and-drop-jira.tsx +0 -1
- package/examples/drag-and-drop.tsx +0 -1
- package/examples/expandable-menu-item.tsx +0 -775
- package/examples/flyout-menu-item-async-content.tsx +0 -118
- package/examples/flyout-menu-item-multiple.tsx +0 -180
- package/examples/flyout-menu-item.tsx +0 -269
- package/examples/images/200x20.png +0 -0
- package/examples/images/200x200.png +0 -0
- package/examples/images/20x20.png +0 -0
- package/examples/images/20x200.png +0 -0
- package/examples/images/cd.svg +0 -9
- package/examples/images/koala.png +0 -0
- package/examples/images/koala.svg +0 -9
- package/examples/images/money.svg +0 -9
- package/examples/images/science.svg +0 -20
- package/examples/interactive-layout.tsx +0 -286
- package/examples/layers-in-main.tsx +0 -294
- package/examples/legacy-var-testing.tsx +0 -173
- package/examples/link-menu-item.tsx +0 -383
- package/examples/main-content-border.tsx +0 -148
- package/examples/menu-item-avatar.tsx +0 -41
- package/examples/menu-item-conditional-tooltip.tsx +0 -304
- package/examples/menu-item-focus-ring-bleed.tsx +0 -50
- package/examples/menu-item-integration.tsx +0 -207
- package/examples/menu-item-narrow.tsx +0 -290
- package/examples/menu-item-scroll-into-view.tsx +0 -283
- package/examples/menu-items-deeply-nested.tsx +0 -330
- package/examples/menu-list.tsx +0 -62
- package/examples/menu-section.tsx +0 -78
- package/examples/page-layout-all-slots-banner-height-zero.tsx +0 -3
- package/examples/page-layout-all-slots-custom-sizes.tsx +0 -3
- package/examples/page-layout-all-slots-rtl.tsx +0 -3
- package/examples/page-layout-all-slots-scrollable.tsx +0 -3
- package/examples/page-layout-all-slots.tsx +0 -3
- package/examples/page-layout-aside-border.tsx +0 -149
- package/examples/page-layout-content-is-iframes.tsx +0 -3
- package/examples/page-layout-edge-case-absolute-positioned-collapsed-custom-sizes.tsx +0 -3
- package/examples/page-layout-edge-case-absolute-positioned-collapsed.tsx +0 -3
- package/examples/page-layout-edge-case-absolute-positioned-panel-visible.tsx +0 -3
- package/examples/page-layout-edge-case-absolute-positioned-resizable.tsx +0 -3
- package/examples/page-layout-edge-case-absolute-positioned.tsx +0 -3
- package/examples/page-layout-edge-case-using-legacy-vars.tsx +0 -3
- package/examples/page-layout-full-screen.tsx +0 -251
- package/examples/page-layout-implicit-rows.tsx +0 -33
- package/examples/page-layout-main-aside-scrollable.tsx +0 -3
- package/examples/page-layout-main-aside.tsx +0 -3
- package/examples/page-layout-panel-aside-default-widths.tsx +0 -241
- package/examples/page-layout-resizable-rtl.tsx +0 -3
- package/examples/page-layout-resizable.tsx +0 -3
- package/examples/page-layout-side-nav-collapse-shortcut.tsx +0 -47
- package/examples/page-layout-side-nav-content-scroll-with-sticky.tsx +0 -135
- package/examples/page-layout-side-nav-custom-width-greater-than-max.tsx +0 -3
- package/examples/page-layout-side-nav-custom-width-smaller-than-min.tsx +0 -3
- package/examples/page-layout-side-nav-main-aside-scrollable.tsx +0 -3
- package/examples/page-layout-side-nav-main-aside.tsx +0 -3
- package/examples/page-layout-side-nav-onboarding.tsx +0 -155
- package/examples/page-layout-side-nav-overflowing-children.tsx +0 -3
- package/examples/page-layout-side-nav-slots.tsx +0 -173
- package/examples/page-layout-side-nav-with-menu-items.tsx +0 -3
- package/examples/page-layout-top-bar-side-nav-main-aside-scrollable.tsx +0 -3
- package/examples/page-layout-top-bar-side-nav-main-aside.tsx +0 -3
- package/examples/page-layout-top-bar-side-nav-main-scrollable.tsx +0 -3
- package/examples/page-layout-top-bar-side-nav-main.tsx +0 -3
- package/examples/page-layout.tsx +0 -941
- package/examples/panel-splitter.tsx +0 -199
- package/examples/resizable-slots.tsx +0 -357
- package/examples/side-nav-flyout.tsx +0 -256
- package/examples/stand-alone-iframe.tsx +0 -23
- package/examples/temp-icons/app-switcher-legacy.tsx +0 -14
- package/examples/temp-icons/atlassian-intelligence.tsx +0 -14
- package/examples/temp-icons/help.tsx +0 -18
- package/examples/temp-icons/menu.tsx +0 -14
- package/examples/temp-icons/settings.tsx +0 -14
- package/examples/top-level-spacer.tsx +0 -55
- package/examples/top-nav-custom-profile-image.tsx +0 -71
- package/examples/top-nav-side-nav-collapsed.tsx +0 -74
- package/examples/top-nav-with-long-name.tsx +0 -63
- package/examples/top-nav-with-temp-nav-app-icon-app-logo.tsx +0 -65
- package/examples/top-nav-with-temp-nav-app-icon-custom-logo.tsx +0 -63
- package/examples/top-navigation-custom-logo.tsx +0 -108
- package/examples/top-navigation-stress.tsx +0 -244
- package/examples/top-navigation-themed-buttons.tsx +0 -63
- package/examples/top-navigation-theming-logged-out.tsx +0 -75
- package/examples/top-navigation-theming-with-picker.tsx +0 -128
- package/examples/top-navigation-theming.tsx +0 -197
- package/examples/top-navigation.tsx +0 -126
- package/examples/utils/example-utils.tsx +0 -14
- package/examples/utils/long-placeholder-content.tsx +0 -161
- package/examples/utils/mock-root.tsx +0 -19
- package/examples/utils/mock-search.tsx +0 -67
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/layers-in-main-slot--desktop--platform-dst-nav4-layering-in-main-slot-fixes-false.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/layers-in-main-slot--desktop--platform-dst-nav4-layering-in-main-slot-fixes-true.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/layers-in-main-slot-short-viewport--desktop--platform-dst-nav4-layering-in-main-slot-fixes-false.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/layers-in-main-slot-short-viewport--desktop--platform-dst-nav4-layering-in-main-slot-fixes-true.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/side-nav-expanded-on-mobile--mobile.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/side-nav-expanded-on-mobile-without-panel--mobile.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/menu-items-deeply-nested/side-nav-with-deeply-nested-menu-items---nested-menu-item-selected--default.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/menu-items-deeply-nested/side-nav-with-deeply-nested-menu-items---scrolled-to-the-end--default.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/menu-items-deeply-nested/side-nav-with-deeply-nested-menu-items--default.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/sidebar-drag-and-drop/sidebar-drag-and-drop---hover-bug--desktop-chrome.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/sidebar-drag-and-drop/sidebar-drag-and-drop---hover-bug--desktop-firefox.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/sidebar-drag-and-drop/sidebar-drag-and-drop---hover-bug--desktop-webkit.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/sidebar-drag-and-drop/sidebar-drag-and-drop--desktop-chrome.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/sidebar-drag-and-drop/sidebar-drag-and-drop--desktop-firefox.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/sidebar-drag-and-drop/sidebar-drag-and-drop--desktop-webkit.png +0 -0
- package/src/__tests__/informational-vr-tests/layering.vr.tsx +0 -76
- package/src/__tests__/informational-vr-tests/menu-items-deeply-nested.vr.tsx +0 -33
- package/src/__tests__/informational-vr-tests/sidebar-drag-and-drop.vr.tsx +0 -100
- package/src/__tests__/playwright/drag-and-drop-in-the-sidebar-flyout.spec.tsx +0 -235
- package/src/__tests__/playwright/expandable-menu-item.spec.tsx +0 -20
- package/src/__tests__/playwright/flyout-menu-item.spec.tsx +0 -22
- package/src/__tests__/playwright/legacy-vars.spec.tsx +0 -298
- package/src/__tests__/playwright/menu-item-in-sidebar-drag-and-drop.spec.tsx +0 -70
- package/src/__tests__/playwright/page-layout.spec.tsx +0 -23
- package/src/__tests__/playwright/panel.spec.tsx +0 -241
- package/src/__tests__/playwright/resizing.spec.tsx +0 -541
- package/src/__tests__/playwright/side-nav-flyout.spec.tsx +0 -223
- package/src/__tests__/playwright/side-nav-responsiveness.spec.tsx +0 -208
- package/src/__tests__/playwright/skip-links.spec.tsx +0 -111
- package/src/__tests__/playwright/top-nav-end.spec.tsx +0 -96
- package/src/__tests__/vr-tests/__snapshots__/a11y-scaling/app--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-no-panel-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-no-panel-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-no-panel-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-scrolled-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-vr--desktop-large-splitter.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/scrollable-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-no-panel-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-vr--desktop-large.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-vr--desktop.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/layering/unscrollable-vr--mobile.png +0 -0
- package/src/__tests__/vr-tests/__snapshots__/skip-links/skip-links--light-mode.png +0 -0
- package/src/__tests__/vr-tests/a11y-scaling.vr.tsx +0 -12
- package/src/__tests__/vr-tests/layering.vr.tsx +0 -82
- package/src/__tests__/vr-tests/skip-links.vr.tsx +0 -14
- package/src/components/__tests__/unit/badge-container.test.tsx +0 -62
- package/src/components/__tests__/unit/list.test.tsx +0 -74
- package/src/components/badge-container.tsx +0 -72
- package/src/components/forward-ref-with-generic.tsx +0 -8
- package/src/components/list-item.tsx +0 -39
- package/src/components/list.tsx +0 -44
- package/src/components/skip-links/__tests__/unit/skip-links-container.test.tsx +0 -411
- package/src/components/skip-links/skip-link.tsx +0 -140
- package/src/components/skip-links/skip-links-container.tsx +0 -112
- package/src/context/skip-links/skip-links-context.tsx +0 -74
- package/src/context/skip-links/skip-links-data-context.tsx +0 -41
- package/src/context/skip-links/skip-links-provider.tsx +0 -74
- package/src/context/skip-links/types.tsx +0 -29
- package/src/context/top-nav-start/top-nav-start-context-provider.tsx +0 -26
- package/src/context/top-nav-start/top-nav-start-context.tsx +0 -21
- package/src/entry-points/experimental/color-utils/parse-hex.tsx +0 -1
- package/src/entry-points/experimental/color-utils/parse-hsl.tsx +0 -1
- package/src/entry-points/experimental/color-utils/parse-rgb.tsx +0 -1
- package/src/entry-points/experimental/color-utils/parse-user-color.tsx +0 -1
- package/src/entry-points/experimental/top-nav-button.tsx +0 -6
- package/src/entry-points/experimental/use-has-custom-theme.tsx +0 -1
- package/src/entry-points/experimental/use-legacy-search-theme.tsx +0 -1
- package/src/entry-points/layout/aside.tsx +0 -1
- package/src/entry-points/layout/banner.tsx +0 -1
- package/src/entry-points/layout/main.tsx +0 -7
- package/src/entry-points/layout/panel-splitter.tsx +0 -3
- package/src/entry-points/layout/panel.tsx +0 -1
- package/src/entry-points/layout/root.tsx +0 -1
- package/src/entry-points/layout/side-nav.tsx +0 -7
- package/src/entry-points/layout/skip-links.tsx +0 -2
- package/src/entry-points/layout/top-nav.tsx +0 -4
- package/src/entry-points/side-nav-items/button-menu-item.tsx +0 -3
- package/src/entry-points/side-nav-items/container-avatar.tsx +0 -1
- package/src/entry-points/side-nav-items/drag-and-drop/drag-preview.tsx +0 -1
- package/src/entry-points/side-nav-items/drag-and-drop/drop-indicator.tsx +0 -5
- package/src/entry-points/side-nav-items/drag-and-drop/group-drop-indicator.tsx +0 -1
- package/src/entry-points/side-nav-items/drag-and-drop/hitbox.tsx +0 -7
- package/src/entry-points/side-nav-items/drag-and-drop/use-menu-item-drag-and-drop.tsx +0 -4
- package/src/entry-points/side-nav-items/expandable-menu-item.tsx +0 -13
- package/src/entry-points/side-nav-items/flyout-menu-item.tsx +0 -13
- package/src/entry-points/side-nav-items/link-menu-item.tsx +0 -3
- package/src/entry-points/side-nav-items/menu-list-item.tsx +0 -1
- package/src/entry-points/side-nav-items/menu-list.tsx +0 -1
- package/src/entry-points/side-nav-items/menu-section.tsx +0 -3
- package/src/entry-points/side-nav-items/top-level-spacer.tsx +0 -1
- package/src/entry-points/top-nav-items/create-button.tsx +0 -1
- package/src/entry-points/top-nav-items/custom-title.tsx +0 -1
- package/src/entry-points/top-nav-items/help.tsx +0 -1
- package/src/entry-points/top-nav-items/index.tsx +0 -14
- package/src/entry-points/top-nav-items/log-in.tsx +0 -1
- package/src/entry-points/top-nav-items/notifications.tsx +0 -1
- package/src/entry-points/top-nav-items/profile.tsx +0 -1
- package/src/entry-points/top-nav-items/settings.tsx +0 -1
- package/src/index.tsx +0 -74
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/flyout-menu-item-async-content/long-content-after-short-skeleton--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/flyout-menu-item-async-content/long-skeleton--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/flyout-menu-item-async-content/short-content-after-long-skeleton--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/flyout-menu-item-async-content/short-skeleton--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/button-menu-item---disabled---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/button-menu-item---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/expandable-menu-item---not-selectable---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/expandable-menu-item---selectable---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/expandable-menu-item---selected---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/flyout-menu-item---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/flyout-menu-item---selected---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/link-menu-item---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/link-menu-item---scroll-into-view-behavior--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/link-menu-item---scroll-into-view-behavior--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/link-menu-item---scroll-into-view-behavior--desktop-safari.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item/link-menu-item---selected---pressed--default.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-click-target---desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-click-target---desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-click-target---desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-hover---desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-hover---desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-hover---desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-too-far-back---desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-too-far-back---desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/__snapshots__/menu-item-increased-hitbox/increasing-hitbox-for-nested-items-too-far-back---desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/informational-vr-tests/flyout-menu-item-async-content.vr.tsx +0 -33
- package/src/ui/menu-item/__tests__/informational-vr-tests/menu-item-increased-hitbox.vr.tsx +0 -79
- package/src/ui/menu-item/__tests__/informational-vr-tests/menu-item.vr.tsx +0 -151
- package/src/ui/menu-item/__tests__/playwright/flyout-menu-item.spec.tsx +0 -38
- package/src/ui/menu-item/__tests__/playwright/scroll-into-view.spec.tsx +0 -91
- package/src/ui/menu-item/__tests__/unit/_util.tsx +0 -40
- package/src/ui/menu-item/__tests__/unit/expandable-menu-item.test.tsx +0 -1119
- package/src/ui/menu-item/__tests__/unit/flyout-menu-item.test.tsx +0 -545
- package/src/ui/menu-item/__tests__/unit/menu-item.test.tsx +0 -649
- package/src/ui/menu-item/__tests__/unit/top-level-spacer.test.tsx +0 -94
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item-combine--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item-combine--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item-reorder-after--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item-reorder-after--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item-reorder-before--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/button-menu-item-reorder-before--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-combine--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-combine--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-reorder-after--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-reorder-after--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-reorder-before--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-reorder-before--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-trigger--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/expandable-menu-item-trigger--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-combine--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-combine--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-reorder-after--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-reorder-after--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-reorder-before--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-reorder-before--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-trigger--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/flyout-menu-item-trigger--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-combine--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-combine--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-combine-blocked--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-combine-blocked--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-after--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-after--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-after-blocked--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-after-blocked--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-before--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-before--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-before-blocked--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/drag-and-drop/link-menu-item-reorder-before-blocked--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---custom-elembefore---action-focused--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---custom-elembefore---action-hovered--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---custom-elembefore---default-state--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---custom-elembefore---elembefore-focused--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---custom-elembefore---elembefore-hovered--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---custom-elembefore---menu-item-focused--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---custom-elembefore---menu-item-hovered--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---selected-with-dropdown-action-open--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---with-dropdown-action-open--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item---with-dropdown-action-open-and-hovered--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-collapsed-with-selected-child--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-expanded-with-actions-on-hover--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-expanded-with-actions-on-hover-and-elem-after--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-expanded-with-elem-after--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-nested--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-nested-rtl--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-selected--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-selected-with-icon--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-with-actions--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-with-actions-on-hover---hovered--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-with-actions-on-hover---selected-and-hovered--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-with-actions-on-hover--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-with-actions-on-hover-and-elem-after---hovered--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/expandable/expandable-menu-item-with-actions-on-hover-and-elem-after--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/flyout-menu-item/a-flyout-menu-with-a-nested-popup-using-shouldrendertoparent---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/flyout-menu-item/flyout-menu-item-default-open-example--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/flyout-menu-item/flyout-menu-item-default-open-rtl--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/flyout-menu-item/flyout-menu-item-default-open-selected-vr--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/flyout-menu-item/flyout-menu-item-example--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/flyout-menu-item/flyout-menu-item-rtl--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled---hovered--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled---hovered--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled---hovered--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled-with-actions--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled-with-actions--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---disabled-with-actions--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---with-dropdown-action-open--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---with-dropdown-action-open--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item---with-dropdown-action-open--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-example--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-example--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-example--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-rtlexample--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-rtlexample--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-rtlexample--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-actions-on-hover-appearing-on-focus--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-actions-on-hover-appearing-on-focus--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-actions-on-hover-appearing-on-focus--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-actions-on-hover-appearing-on-hover--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-actions-on-hover-appearing-on-hover--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-actions-on-hover-appearing-on-hover--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-elem-after-and-hovered--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-elem-after-and-hovered--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-elem-after-and-hovered--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-popup--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-popup--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-with-popup--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item---with-dropdown-action-open--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item---with-dropdown-action-open--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item---with-dropdown-action-open--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-bleed--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-bleed--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-bleed--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-example--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-example--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-example--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-rtlexample--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-rtlexample--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-rtlexample--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-actions-on-hover-appearing-on-focus--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-actions-on-hover-appearing-on-focus--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-actions-on-hover-appearing-on-focus--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-actions-on-hover-appearing-on-hover--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-actions-on-hover-appearing-on-hover--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-actions-on-hover-appearing-on-hover--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-elem-after-and-hovered--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-elem-after-and-hovered--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-with-elem-after-and-hovered--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/menu-item-avatar-example--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/menu-item-avatar-example--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/menu-item-avatar-example--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/menu-items-in-a-narrow-container--desktop-chrome.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/menu-items-in-a-narrow-container--desktop-firefox.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/menu-items-in-a-narrow-container--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item--content-long---description-long---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item--content-long---description-none---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item--content-long---description-short---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item--content-short---description-long---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item--content-short---description-none---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item--content-short---description-short---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item-add-action-button--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/button-menu-item-with-tooltip-disabled--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/expandable-menu-item--content-long---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/expandable-menu-item--content-short---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/expandable-menu-item-with-tooltip-disabled--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/flyout-menu-item--content-long---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/flyout-menu-item--content-short---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/flyout-menu-item-with-tooltip-disabled--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/link-menu-item--content-long---description-long---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/link-menu-item--content-long---description-none---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/link-menu-item--content-long---description-short---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/link-menu-item--content-short---description-long---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/link-menu-item--content-short---description-none---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/link-menu-item--content-short---description-short---default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/link-menu-item-with-tooltip-disabled--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item-conditional-tooltip/menu-item-button-with-nested-children--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/top-level-spacer/top-level-spacer-example--default.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/drag-and-drop.vr.tsx +0 -172
- package/src/ui/menu-item/__tests__/vr-tests/expandable.vr.tsx +0 -248
- package/src/ui/menu-item/__tests__/vr-tests/flyout-menu-item.vr.tsx +0 -46
- package/src/ui/menu-item/__tests__/vr-tests/menu-item-conditional-tooltip.vr.tsx +0 -312
- package/src/ui/menu-item/__tests__/vr-tests/menu-item.vr.tsx +0 -210
- package/src/ui/menu-item/__tests__/vr-tests/top-level-spacer.vr.tsx +0 -17
- package/src/ui/menu-item/button-menu-item.tsx +0 -87
- package/src/ui/menu-item/constants.tsx +0 -15
- package/src/ui/menu-item/container-avatar.tsx +0 -39
- package/src/ui/menu-item/drag-and-drop/drag-preview.tsx +0 -98
- package/src/ui/menu-item/drag-and-drop/drop-indicator.tsx +0 -11
- package/src/ui/menu-item/drag-and-drop/group-drop-indicator.tsx +0 -7
- package/src/ui/menu-item/drag-and-drop/hitbox.tsx +0 -13
- package/src/ui/menu-item/drag-and-drop/use-menu-item-drag-and-drop.tsx +0 -243
- package/src/ui/menu-item/drag-handle.tsx +0 -42
- package/src/ui/menu-item/expandable-menu-item/expandable-menu-item-content.tsx +0 -84
- package/src/ui/menu-item/expandable-menu-item/expandable-menu-item-context.tsx +0 -61
- package/src/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.tsx +0 -9
- package/src/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.tsx +0 -334
- package/src/ui/menu-item/expandable-menu-item/expandable-menu-item.tsx +0 -114
- package/src/ui/menu-item/flyout-menu-item/flyout-menu-item-content.tsx +0 -188
- package/src/ui/menu-item/flyout-menu-item/flyout-menu-item-context.tsx +0 -19
- package/src/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.tsx +0 -124
- package/src/ui/menu-item/flyout-menu-item/flyout-menu-item.tsx +0 -98
- package/src/ui/menu-item/link-menu-item.tsx +0 -119
- package/src/ui/menu-item/menu-item-signals.tsx +0 -6
- package/src/ui/menu-item/menu-item.tsx +0 -848
- package/src/ui/menu-item/menu-list-item.tsx +0 -12
- package/src/ui/menu-item/menu-list.tsx +0 -12
- package/src/ui/menu-item/top-level-spacer.tsx +0 -49
- package/src/ui/menu-item/types.tsx +0 -181
- package/src/ui/menu-item/use-scroll-menu-item-into-view.tsx +0 -78
- package/src/ui/menu-section/__tests__/unit/menu-section.test.tsx +0 -96
- package/src/ui/menu-section/__tests__/vr-tests/__snapshots__/divider/divider--default.png +0 -0
- package/src/ui/menu-section/__tests__/vr-tests/__snapshots__/menu-section/menu-section-example--default.png +0 -0
- package/src/ui/menu-section/__tests__/vr-tests/divider.vr.tsx +0 -14
- package/src/ui/menu-section/__tests__/vr-tests/menu-section.vr.tsx +0 -14
- package/src/ui/menu-section/divider.tsx +0 -33
- package/src/ui/menu-section/menu-section-context.tsx +0 -15
- package/src/ui/menu-section/menu-section-heading.tsx +0 -43
- package/src/ui/menu-section/menu-section.tsx +0 -70
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/page-layout/large-panel-default-width-on-mobile--desktop--platform-design-system-nav4-panel-mobile-width-fix-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/page-layout/large-panel-default-width-on-mobile--desktop--platform-design-system-nav4-panel-mobile-width-fix-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/page-layout/small-panel-default-width-on-mobile--desktop--platform-design-system-nav4-panel-mobile-width-fix-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/page-layout/small-panel-default-width-on-mobile--desktop--platform-design-system-nav4-panel-mobile-width-fix-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-false-platform-design-system-nav4-sidenav-border-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-false-platform-design-system-nav4-sidenav-border-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-true-platform-design-system-nav4-sidenav-border-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-true-platform-design-system-nav4-sidenav-border-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-flyout--default--platform-design-system-nav4-panel-default-border-false-platform-design-system-nav4-sidenav-border-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-flyout--default--platform-design-system-nav4-panel-default-border-false-platform-design-system-nav4-sidenav-border-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-flyout--default--platform-design-system-nav4-panel-default-border-true-platform-design-system-nav4-sidenav-border-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/above-md-breakpoint---side-nav-flyout--default--platform-design-system-nav4-panel-default-border-true-platform-design-system-nav4-sidenav-border-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/below-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-false-platform-design-system-nav4-sidenav-border-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/below-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-false-platform-design-system-nav4-sidenav-border-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/below-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-true-platform-design-system-nav4-sidenav-border-false.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/slot-borders/below-md-breakpoint---side-nav-expanded--default--platform-design-system-nav4-panel-default-border-true-platform-design-system-nav4-sidenav-border-true.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-lg---composition--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-lg---with-min-widths--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-lg--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-md---composition--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-md---with-min-widths--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-md--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-sm---with-min-widths--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-sm--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-xl---composition--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-xl---with-min-widths--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-xl--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-xs---with-min-widths--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/__snapshots__/top-nav/breakpoint-xs--firefox.png +0 -0
- package/src/ui/page-layout/__tests__/informational-vr-tests/page-layout.vr.tsx +0 -53
- package/src/ui/page-layout/__tests__/informational-vr-tests/slot-borders.vr.tsx +0 -54
- package/src/ui/page-layout/__tests__/informational-vr-tests/top-nav.vr.tsx +0 -170
- package/src/ui/page-layout/__tests__/unit/_test-utils.tsx +0 -185
- package/src/ui/page-layout/__tests__/unit/aside.test.tsx +0 -21
- package/src/ui/page-layout/__tests__/unit/banner.test.tsx +0 -31
- package/src/ui/page-layout/__tests__/unit/get-width.test.tsx +0 -12
- package/src/ui/page-layout/__tests__/unit/hoist-utils.test.tsx +0 -85
- package/src/ui/page-layout/__tests__/unit/page-layout.test.tsx +0 -300
- package/src/ui/page-layout/__tests__/unit/panel-splitter-and-suspense.test.tsx +0 -43
- package/src/ui/page-layout/__tests__/unit/panel-splitter.test.tsx +0 -885
- package/src/ui/page-layout/__tests__/unit/panel.test.tsx +0 -63
- package/src/ui/page-layout/__tests__/unit/react-safety.test.tsx +0 -30
- package/src/ui/page-layout/__tests__/unit/resizing.test.tsx +0 -714
- package/src/ui/page-layout/__tests__/unit/side-nav-flyout.test.tsx +0 -1154
- package/src/ui/page-layout/__tests__/unit/side-nav.test.tsx +0 -771
- package/src/ui/page-layout/__tests__/unit/sticky-header.test.tsx +0 -43
- package/src/ui/page-layout/__tests__/unit/top-nav-end.test.tsx +0 -132
- package/src/ui/page-layout/__tests__/unit/top-nav.test.tsx +0 -28
- package/src/ui/page-layout/__tests__/unit/use-expand-side-nav.test.tsx +0 -278
- package/src/ui/page-layout/__tests__/unit/use-toggle-side-nav.test.tsx +0 -233
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-disabled--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-disabled--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-disabled-side-nav-collapsed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-disabled-side-nav-collapsed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-enabled--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-enabled--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-enabled-full-screen-mode--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-enabled-full-screen-mode--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-enabled-side-nav-collapsed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/main-content-border/main-content-border---theming-enabled-side-nav-collapsed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-banner-height-zero--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-banner-height-zero--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-custom-sizes--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-custom-sizes--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-rtl--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-rtl--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-scrollable--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/all-slots-scrollable--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/aside-composed-with-border--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/aside-composed-with-border--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-collapsed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-collapsed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-custom-sizes--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-custom-sizes--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-panel-visible--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-panel-visible--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-resizable--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-sibling-absolute-positioned-resizable--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-using-legacy-vars--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/edge-case-using-legacy-vars--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/main-aside--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/main-aside--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/main-aside-scrollable--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/main-aside-scrollable--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/page-layout-implicit-rows--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/page-layout-implicit-rows--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/panel-and-aside---default-widths--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/panel-and-aside---default-widths--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/panel-and-aside---zero-widths--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/panel-and-aside---zero-widths--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/panel-default-background-color--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/panel-default-background-color--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/panel-should-have-correct-width-when-there-is-no-sidenav-mounted--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/resizable--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-content-slot---scroll-with-sticky-child--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-custom-width-greater-than-max-width--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-custom-width-smaller-than-min-width--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-main-aside--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-main-aside--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-main-aside-scrollable--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-main-aside-scrollable--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-overflowing-children--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-slots--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-with-menu-items--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/side-nav-with-menu-items--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-aside--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-aside--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-aside-scrollable--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-aside-scrollable--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-scrollable--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/page-layout/top-bar-side-nav-main-scrollable--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/panel-splitter/focused-panel-splitter-with-position-end--default.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/panel-splitter/focused-panel-splitter-with-position-start--default.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/panel-splitter/hovered-panel-splitter-with-position-end--default--platform-nav4-panel-splitter-keyboard-a11y-false.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/panel-splitter/hovered-panel-splitter-with-position-end--default--platform-nav4-panel-splitter-keyboard-a11y-true.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/panel-splitter/hovered-panel-splitter-with-position-start--default--platform-nav4-panel-splitter-keyboard-a11y-false.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/panel-splitter/hovered-panel-splitter-with-position-start--default--platform-nav4-panel-splitter-keyboard-a11y-true.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed-toggle-button-hovered--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed-toggle-button-hovered--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed-with-open-child-layer--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed-with-open-child-layer--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed-with-open-child-layer-toggle-button-hovered--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-collapsed-with-open-child-layer-toggle-button-hovered--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded-toggle-button-hovered--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded-toggle-button-hovered--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded-with-open-child-layer--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded-with-open-child-layer--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded-with-open-child-layer-toggle-button-hovered--desktop.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/__snapshots__/side-nav-flyout/side-nav-default-expanded-with-open-child-layer-toggle-button-hovered--mobile.png +0 -0
- package/src/ui/page-layout/__tests__/vr-tests/main-content-border.vr.tsx +0 -47
- package/src/ui/page-layout/__tests__/vr-tests/page-layout.vr.tsx +0 -266
- package/src/ui/page-layout/__tests__/vr-tests/panel-splitter.vr.tsx +0 -72
- package/src/ui/page-layout/__tests__/vr-tests/side-nav-flyout.vr.tsx +0 -170
- package/src/ui/page-layout/aside.tsx +0 -210
- package/src/ui/page-layout/banner.tsx +0 -91
- package/src/ui/page-layout/constants.tsx +0 -56
- package/src/ui/page-layout/hoist-slot-sizes-context.tsx +0 -7
- package/src/ui/page-layout/hoist-utils.tsx +0 -64
- package/src/ui/page-layout/id-utils.tsx +0 -33
- package/src/ui/page-layout/main/main-sticky-header.tsx +0 -45
- package/src/ui/page-layout/main/main.tsx +0 -93
- package/src/ui/page-layout/panel-splitter/context.tsx +0 -60
- package/src/ui/page-layout/panel-splitter/convert-resize-bound-to-pixels.tsx +0 -20
- package/src/ui/page-layout/panel-splitter/get-percentage-within-pixel-bounds.tsx +0 -35
- package/src/ui/page-layout/panel-splitter/get-width.tsx +0 -33
- package/src/ui/page-layout/panel-splitter/keyboard-resize-manager.tsx +0 -89
- package/src/ui/page-layout/panel-splitter/panel-splitter.tsx +0 -560
- package/src/ui/page-layout/panel-splitter/provider.tsx +0 -66
- package/src/ui/page-layout/panel-splitter/types.tsx +0 -25
- package/src/ui/page-layout/panel.tsx +0 -308
- package/src/ui/page-layout/root.tsx +0 -162
- package/src/ui/page-layout/side-nav/element-context.tsx +0 -18
- package/src/ui/page-layout/side-nav/flyout-close-delay-ms.tsx +0 -12
- package/src/ui/page-layout/side-nav/side-nav-content.tsx +0 -57
- package/src/ui/page-layout/side-nav/side-nav-footer.tsx +0 -48
- package/src/ui/page-layout/side-nav/side-nav-header.tsx +0 -32
- package/src/ui/page-layout/side-nav/side-nav.tsx +0 -876
- package/src/ui/page-layout/side-nav/toggle-button-context.tsx +0 -21
- package/src/ui/page-layout/side-nav/toggle-button-provider.tsx +0 -28
- package/src/ui/page-layout/side-nav/toggle-button.tsx +0 -166
- package/src/ui/page-layout/side-nav/types.tsx +0 -18
- package/src/ui/page-layout/side-nav/use-expand-side-nav.tsx +0 -57
- package/src/ui/page-layout/side-nav/use-side-nav-visibility-callbacks.tsx +0 -75
- package/src/ui/page-layout/side-nav/use-side-nav-visibility.tsx +0 -43
- package/src/ui/page-layout/side-nav/use-toggle-side-nav.tsx +0 -47
- package/src/ui/page-layout/side-nav/visibility-context.tsx +0 -17
- package/src/ui/page-layout/side-nav/visibility-provider.tsx +0 -20
- package/src/ui/page-layout/top-nav/top-nav-end.tsx +0 -155
- package/src/ui/page-layout/top-nav/top-nav-middle.tsx +0 -90
- package/src/ui/page-layout/top-nav/top-nav-start.tsx +0 -82
- package/src/ui/page-layout/top-nav/top-nav.tsx +0 -127
- package/src/ui/page-layout/types.tsx +0 -20
- package/src/ui/page-layout/use-resizing-width-css-var-on-root-element.tsx +0 -70
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/long-product-name-tooltip--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-hover---custom-theming--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-hover---custom-theming--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-hover--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-hover--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-pressed---custom-theming--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-pressed---custom-theming--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-pressed--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/nav-logo-pressed--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/responsive-menu-items--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/__snapshots__/top-navigation/responsive-menu-items-on-click--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/informational-vr-tests/top-navigation.vr.tsx +0 -120
- package/src/ui/top-nav-items/__tests__/playwright/theming.spec.tsx +0 -21
- package/src/ui/top-nav-items/__tests__/unit/chat-button.test.tsx +0 -40
- package/src/ui/top-nav-items/__tests__/unit/create-button.test.tsx +0 -34
- package/src/ui/top-nav-items/__tests__/unit/end-item.test.tsx +0 -43
- package/src/ui/top-nav-items/__tests__/unit/help.test.tsx +0 -101
- package/src/ui/top-nav-items/__tests__/unit/notifications.test.tsx +0 -63
- package/src/ui/top-nav-items/__tests__/unit/profile.test.tsx +0 -65
- package/src/ui/top-nav-items/__tests__/unit/settings.test.tsx +0 -51
- package/src/ui/top-nav-items/__tests__/unit/theming.test.tsx +0 -76
- package/src/ui/top-nav-items/__tests__/unit/top-nav-items.test.tsx +0 -181
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/log-in-button--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/search-right-elem--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/theme-is-applied-with-an-hsl-color--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/theme-is-applied-with-an-rgb-color--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/theme-is-applied-with-customlogo--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/themed-button-focus-state--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/themed-button-hover-state--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/themed-create-button-hover-state--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/themed-link-button-focus-state--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/themed-link-button-hover-state--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/themed-search-focus-state--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/theming-is-enabled--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-nav-custom-profile-image--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-nav-side-nav-collapsed--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-nav-side-nav-collapsed--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-example--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-example--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image200x200example--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image200x200example--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image200x20example--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image200x20example--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image20x200example--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image20x200example--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image20x20example--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-custom-logo-image20x20example--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-example--desktop.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-example--mobile.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/__snapshots__/top-navigation/top-navigation-with-a-large-search-input-in-focus-state--default.png +0 -0
- package/src/ui/top-nav-items/__tests__/vr-tests/top-navigation.vr.tsx +0 -160
- package/src/ui/top-nav-items/app-switcher.tsx +0 -81
- package/src/ui/top-nav-items/chat-button.tsx +0 -49
- package/src/ui/top-nav-items/create-button.tsx +0 -51
- package/src/ui/top-nav-items/custom-title.tsx +0 -83
- package/src/ui/top-nav-items/end-item.tsx +0 -120
- package/src/ui/top-nav-items/help.tsx +0 -69
- package/src/ui/top-nav-items/log-in.tsx +0 -66
- package/src/ui/top-nav-items/nav-logo/app-logo.tsx +0 -203
- package/src/ui/top-nav-items/nav-logo/custom-logo.tsx +0 -252
- package/src/ui/top-nav-items/nav-logo/logo-renderer.tsx +0 -66
- package/src/ui/top-nav-items/notifications.tsx +0 -67
- package/src/ui/top-nav-items/profile.tsx +0 -26
- package/src/ui/top-nav-items/search.tsx +0 -124
- package/src/ui/top-nav-items/settings.tsx +0 -16
- package/src/ui/top-nav-items/themed/__tests__/unit/button.test.tsx +0 -57
- package/src/ui/top-nav-items/themed/__tests__/unit/use-custom-theme.test.tsx +0 -43
- package/src/ui/top-nav-items/themed/button.tsx +0 -576
- package/src/ui/top-nav-items/themed/color-utils/__tests__/unit/hex.test.tsx +0 -131
- package/src/ui/top-nav-items/themed/color-utils/__tests__/unit/hsl.test.tsx +0 -117
- package/src/ui/top-nav-items/themed/color-utils/__tests__/unit/rgb.test.tsx +0 -88
- package/src/ui/top-nav-items/themed/color-utils/__tests__/unit/try-parse-user-color.test.tsx +0 -35
- package/src/ui/top-nav-items/themed/color-utils/formats/hex.tsx +0 -47
- package/src/ui/top-nav-items/themed/color-utils/formats/hsl.tsx +0 -112
- package/src/ui/top-nav-items/themed/color-utils/formats/rgb.tsx +0 -41
- package/src/ui/top-nav-items/themed/color-utils/index.tsx +0 -111
- package/src/ui/top-nav-items/themed/color-utils/parse-user-color.tsx +0 -31
- package/src/ui/top-nav-items/themed/color-utils/types.tsx +0 -6
- package/src/ui/top-nav-items/themed/get-custom-theme-styles.tsx +0 -186
- package/src/ui/top-nav-items/themed/has-custom-theme-context.tsx +0 -13
- package/src/ui/top-nav-items/themed/migration.tsx +0 -70
- package/src/ui/top-nav-items/themed/palette.tsx +0 -53
- package/src/ui/top-nav-items/themed/search.tsx +0 -70
- package/src/ui/top-nav-items/themed/use-custom-theme.tsx +0 -51
- package/tsconfig.app.json +0 -91
- package/tsconfig.dev.json +0 -175
- package/tsconfig.json +0 -20
|
@@ -1,848 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxFrag
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import React, { forwardRef, lazy, Suspense, useCallback, useRef } from 'react';
|
|
7
|
-
|
|
8
|
-
import { cssMap, cx, jsx, keyframes } from '@compiled/react';
|
|
9
|
-
|
|
10
|
-
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
11
|
-
import { AvatarContext, type AvatarContextProps } from '@atlaskit/avatar';
|
|
12
|
-
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
13
|
-
import { Anchor, Pressable, Text, type TextColor } from '@atlaskit/primitives/compiled';
|
|
14
|
-
import { token } from '@atlaskit/tokens';
|
|
15
|
-
import Tooltip, {
|
|
16
|
-
TooltipPrimitive,
|
|
17
|
-
type TooltipPrimitiveProps,
|
|
18
|
-
type TooltipProps,
|
|
19
|
-
} from '@atlaskit/tooltip';
|
|
20
|
-
|
|
21
|
-
import { forwardRefWithGeneric } from '../../components/forward-ref-with-generic';
|
|
22
|
-
|
|
23
|
-
import { expandableMenuItemIndentation } from './constants';
|
|
24
|
-
import { useLevel } from './expandable-menu-item/expandable-menu-item-context';
|
|
25
|
-
import {
|
|
26
|
-
useFlyoutMenuOpen,
|
|
27
|
-
useSetFlyoutMenuOpen,
|
|
28
|
-
} from './flyout-menu-item/flyout-menu-item-context';
|
|
29
|
-
import { COLLAPSE_ELEM_BEFORE } from './menu-item-signals';
|
|
30
|
-
import type { MenuItemLinkOrButtonCommonProps, MenuItemOnClick } from './types';
|
|
31
|
-
|
|
32
|
-
// Using `lazy` so that only consumers who want drag and drop
|
|
33
|
-
// need to include code for the drag handle.
|
|
34
|
-
const LazyDragHandle = lazy(
|
|
35
|
-
() =>
|
|
36
|
-
import(
|
|
37
|
-
/* webpackChunkName: "@atlaskit-internal_nav4-menu-item-drag-handle" */
|
|
38
|
-
'./drag-handle'
|
|
39
|
-
),
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
const tooltipStyles = cssMap({
|
|
43
|
-
root: {
|
|
44
|
-
// Unique styles for our tooltip
|
|
45
|
-
display: 'flex',
|
|
46
|
-
flexDirection: 'column',
|
|
47
|
-
justifyContent: 'center',
|
|
48
|
-
// matching the height of standard items
|
|
49
|
-
minHeight: '32px',
|
|
50
|
-
// increased max width from standard tooltip
|
|
51
|
-
maxWidth: '420px',
|
|
52
|
-
|
|
53
|
-
// Mostly copied styles from `tooltip/src/tooltip-container.tsx`
|
|
54
|
-
// Could likely use `TooltipContainer` from Tooltip and override styles,
|
|
55
|
-
// but that could lead to some unexpected results as Tooltip is styled
|
|
56
|
-
// using emotion.
|
|
57
|
-
boxSizing: 'border-box',
|
|
58
|
-
paddingBlockStart: token('space.025'),
|
|
59
|
-
paddingInlineEnd: token('space.075'),
|
|
60
|
-
paddingBlockEnd: token('space.025'),
|
|
61
|
-
paddingInlineStart: token('space.075'),
|
|
62
|
-
backgroundColor: token('color.background.neutral.bold'),
|
|
63
|
-
borderRadius: token('border.radius'),
|
|
64
|
-
color: token('color.text.inverse'),
|
|
65
|
-
font: token('font.body.UNSAFE_small'),
|
|
66
|
-
insetBlockStart: token('space.0'),
|
|
67
|
-
insetInlineStart: token('space.0'),
|
|
68
|
-
overflowWrap: 'break-word',
|
|
69
|
-
wordWrap: 'break-word',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const MenuItemTooltip = forwardRef<HTMLDivElement, TooltipPrimitiveProps>(function MenuItemTooltip(
|
|
74
|
-
{ children, className, ...rest },
|
|
75
|
-
ref,
|
|
76
|
-
) {
|
|
77
|
-
return (
|
|
78
|
-
<TooltipPrimitive
|
|
79
|
-
{...rest}
|
|
80
|
-
// Manually passing on `className` so it gets merged correctly in the build output.
|
|
81
|
-
// The passed classname is mostly used for integration testing (`.Tooltip`)
|
|
82
|
-
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-classname-prop
|
|
83
|
-
className={className}
|
|
84
|
-
// "css" does not "exist" - it gets transformed into "className" by compiled
|
|
85
|
-
css={tooltipStyles.root}
|
|
86
|
-
ref={ref}
|
|
87
|
-
>
|
|
88
|
-
{children}
|
|
89
|
-
</TooltipPrimitive>
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
function isTextClamped(element: HTMLElement): boolean {
|
|
94
|
-
// Checking for vertical height rather than horizontal height.
|
|
95
|
-
// When text is "clamped", it's technically being clamped vertically! 🤯
|
|
96
|
-
return element.scrollHeight > element.clientHeight;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const defaultAvatarValues: AvatarContextProps = {
|
|
100
|
-
size: 'small',
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const elemAfterDisplayVar = '--elem-after-display';
|
|
104
|
-
const actionsOnHoverDisplayVar = '--actions-on-hover-display';
|
|
105
|
-
const notchColorVar = '--notch-color';
|
|
106
|
-
|
|
107
|
-
// Note: this is also used in `drag-handle.tsx`
|
|
108
|
-
const dragHandleDisplayVar = '--drag-handle-display';
|
|
109
|
-
|
|
110
|
-
const dragCursorAnimation = keyframes({
|
|
111
|
-
to: {
|
|
112
|
-
cursor: 'grab',
|
|
113
|
-
},
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* ## 🤹 `position:relative`
|
|
118
|
-
*
|
|
119
|
-
* We need `position:relative` on an element that takes
|
|
120
|
-
* up the full size of the interactive element so we
|
|
121
|
-
* can correctly use `position:absolute` to place:
|
|
122
|
-
* 1. the notch for links
|
|
123
|
-
* 2. drop indicators for drag and drop
|
|
124
|
-
* 3. a child of button / anchor to stretch it out to
|
|
125
|
-
* increase it's pressable area.
|
|
126
|
-
*
|
|
127
|
-
* ⛔️ We cannot add `position:relative` _only_ on the
|
|
128
|
-
* button / anchor as that will cause sibling elements
|
|
129
|
-
* to be rendered under the button / anchor when setting
|
|
130
|
-
* a background color on the button / anchor.
|
|
131
|
-
*
|
|
132
|
-
* 📖 Note: `position:relative` elements are painted after
|
|
133
|
-
* elements with `position:static` (the default)
|
|
134
|
-
* https://drafts.csswg.org/css-position-4/#painting-order
|
|
135
|
-
*
|
|
136
|
-
* ⛔️ We cannot add `position:relative` to the container
|
|
137
|
-
* element, as then the `:focus` ring styles on the
|
|
138
|
-
* button / anchor can be cut off by the next sibling if it has
|
|
139
|
-
* has a background color set (eg when selected)
|
|
140
|
-
*
|
|
141
|
-
* ✅ Add `position:relative` to all first level descendants
|
|
142
|
-
* of the container element so that we don't impact DOM ordered
|
|
143
|
-
* paint ordering within the item and the button / anchor focus
|
|
144
|
-
* ring can still bleed over siblings
|
|
145
|
-
*
|
|
146
|
-
* 📖 We could use `> * { position: relative; }` on the container,
|
|
147
|
-
* but that would violate our styling standard.
|
|
148
|
-
*/
|
|
149
|
-
const topLevelSiblingStyles = cssMap({
|
|
150
|
-
root: {
|
|
151
|
-
position: 'relative',
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* All slots on the menu item (eg `elemBefore`) are rendered as siblings
|
|
157
|
-
* of our main button / anchor element and they are visually placed on
|
|
158
|
-
* top of the main button / anchor.
|
|
159
|
-
*
|
|
160
|
-
* 📖 This is done so that we don't nest interactive elements in our markup.
|
|
161
|
-
*
|
|
162
|
-
* ✅ This is great when element in the slot is an interactive element
|
|
163
|
-
* as we don't want the main menu item button / anchor to be triggered
|
|
164
|
-
* when interacting with the element in the slot.
|
|
165
|
-
*
|
|
166
|
-
* ⛔️ When the element in the slot is static content (eg an `<Icon>`) it will
|
|
167
|
-
* prevent the main button / anchor (that is visually behind the element in
|
|
168
|
-
* the slot) from being clicked. The element in the slot is a sibling of our
|
|
169
|
-
* main button / anchor (not a child of it) so clicking on the element in the
|
|
170
|
-
* slot will not bubble up to the button / anchor.
|
|
171
|
-
*
|
|
172
|
-
* 🚀 We set `pointer-events:none` on a slot if it does not contain and interactive
|
|
173
|
-
* element so that static content in a slot does not prevent clicking on the main
|
|
174
|
-
* button / anchor.
|
|
175
|
-
*/
|
|
176
|
-
const onTopOfButtonOrAnchorStyles = cssMap({
|
|
177
|
-
root: {
|
|
178
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
179
|
-
'&:not(:has(button,a))': {
|
|
180
|
-
pointerEvents: 'none',
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* This is being _internally_ exported so it can be used in other menu item wrapper components, like
|
|
187
|
-
* ExpandableMenuItemTrigger.
|
|
188
|
-
*
|
|
189
|
-
* This selector is used to apply hover styling on the menu item if it contains an open nested popup.
|
|
190
|
-
* It's looking for a popup trigger with `aria-hasexpanded` and `aria-haspopup` attributes. The
|
|
191
|
-
* reason for targeting the _trigger_ instead of the popup itself, is the popup might be rendered
|
|
192
|
-
* outside the menu item, e.g. if rendered in a portal.
|
|
193
|
-
*
|
|
194
|
-
* An alternative solution might involve wrapping it with a popup context and listening to the popup
|
|
195
|
-
* events through it (and applying the hover style when the popup is open). Exploring this has been
|
|
196
|
-
* captured in [BLU-3354](https://jplat.atlassian.net/browse/BLU-3354).
|
|
197
|
-
*/
|
|
198
|
-
export const nestedOpenPopupCSSSelector = '&:has([aria-expanded="true"][aria-haspopup="true"])';
|
|
199
|
-
|
|
200
|
-
const containerStyles = cssMap({
|
|
201
|
-
root: {
|
|
202
|
-
boxSizing: 'border-box',
|
|
203
|
-
display: 'grid',
|
|
204
|
-
/**
|
|
205
|
-
* Slot 1: elemBefore (collapse last)
|
|
206
|
-
* Slot 2: interactive element content (collapse first)
|
|
207
|
-
* Slot 3: elemAfter (collapse last) [also for actionsOnHover]
|
|
208
|
-
* Slot 4: actions (collapse last)
|
|
209
|
-
*/
|
|
210
|
-
gridTemplateColumns: 'minmax(0, auto) 1fr minmax(0, auto) minmax(0, auto)',
|
|
211
|
-
gridTemplateRows: '1fr', // a single row grid
|
|
212
|
-
gridTemplateAreas: '"elem-before interactive elem-after actions"',
|
|
213
|
-
/**
|
|
214
|
-
* A min-width is set to ensure that the menu items do not completely collapse when deeply nested.
|
|
215
|
-
* Otherwise, the menu items progressively shrink as they get into deeper levels of expandable menu items, until they
|
|
216
|
-
* are unusable.
|
|
217
|
-
*/
|
|
218
|
-
minWidth: '72px',
|
|
219
|
-
// Using rem so it scales with browser font size and rem-based spacing/typography
|
|
220
|
-
height: '2rem',
|
|
221
|
-
alignItems: 'center',
|
|
222
|
-
userSelect: 'none',
|
|
223
|
-
borderRadius: token('border.radius'),
|
|
224
|
-
color: token('color.text.subtle'),
|
|
225
|
-
[actionsOnHoverDisplayVar]: 'none',
|
|
226
|
-
[notchColorVar]: 'transparent',
|
|
227
|
-
[elemAfterDisplayVar]: 'flex',
|
|
228
|
-
// Applying :hover styles on the container rather than on
|
|
229
|
-
// just the button / anchor so that we will still trigger the
|
|
230
|
-
// :hover styles when over action buttons
|
|
231
|
-
'&:hover': {
|
|
232
|
-
backgroundColor: token('elevation.surface.hovered'),
|
|
233
|
-
},
|
|
234
|
-
'&:hover, &:focus-within': {
|
|
235
|
-
[actionsOnHoverDisplayVar]: 'flex',
|
|
236
|
-
},
|
|
237
|
-
// If there is a nested open popup, we want to apply hover styling, and display the `actionsOnHover` slot.
|
|
238
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
239
|
-
[nestedOpenPopupCSSSelector]: {
|
|
240
|
-
backgroundColor: token('elevation.surface.hovered'),
|
|
241
|
-
[actionsOnHoverDisplayVar]: 'flex',
|
|
242
|
-
},
|
|
243
|
-
},
|
|
244
|
-
removeElemAfter: {
|
|
245
|
-
[elemAfterDisplayVar]: 'none',
|
|
246
|
-
},
|
|
247
|
-
showHoverActions: {
|
|
248
|
-
[actionsOnHoverDisplayVar]: 'flex',
|
|
249
|
-
},
|
|
250
|
-
removeElemAfterOnHoverOrOpenNestedPopup: {
|
|
251
|
-
// On hover of the menu item, remove the elemAfter
|
|
252
|
-
'&:hover, &:focus-within': {
|
|
253
|
-
[elemAfterDisplayVar]: 'none',
|
|
254
|
-
},
|
|
255
|
-
// If there is a nested open popup, and both `actionsOnHover` and `elemAfter` exist, we want to hide the `elemAfter`.
|
|
256
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
257
|
-
[nestedOpenPopupCSSSelector]: {
|
|
258
|
-
[elemAfterDisplayVar]: 'none',
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
selected: {
|
|
262
|
-
backgroundColor: token('color.background.selected'),
|
|
263
|
-
color: token('color.text.selected'),
|
|
264
|
-
[notchColorVar]: token('color.background.selected.bold'),
|
|
265
|
-
'&:hover': {
|
|
266
|
-
color: token('color.text.selected'),
|
|
267
|
-
backgroundColor: token('color.background.selected.hovered'),
|
|
268
|
-
},
|
|
269
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
270
|
-
[nestedOpenPopupCSSSelector]: {
|
|
271
|
-
backgroundColor: token('color.background.selected.hovered'),
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
disabled: {
|
|
275
|
-
// Setting the color here to allow icons with "currentColor" to inherit the disabled color.
|
|
276
|
-
color: token('color.text.disabled'),
|
|
277
|
-
'&:hover': {
|
|
278
|
-
// Removing the background color that gets applied on hover
|
|
279
|
-
backgroundColor: 'unset',
|
|
280
|
-
},
|
|
281
|
-
},
|
|
282
|
-
hasDescription: {
|
|
283
|
-
/* Standard 32px + another 16px for the description */
|
|
284
|
-
height: '3rem',
|
|
285
|
-
},
|
|
286
|
-
dragging: {
|
|
287
|
-
opacity: 0.4,
|
|
288
|
-
},
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
const buttonOrAnchorStyles = cssMap({
|
|
292
|
-
// This button / anchor is positioned to produce the visual appearance of nested
|
|
293
|
-
// buttons whilst the elements are actually siblings in the DOM structure.
|
|
294
|
-
root: {
|
|
295
|
-
display: 'grid',
|
|
296
|
-
// Extend the button to the full width of container
|
|
297
|
-
gridColumn: '1 / -1',
|
|
298
|
-
// Each grid item is placed on the same row and stacks on top of each other.
|
|
299
|
-
gridRow: '1',
|
|
300
|
-
gridTemplateColumns: 'subgrid',
|
|
301
|
-
gridTemplateRows: 'subgrid',
|
|
302
|
-
paddingInlineEnd: token('space.050'),
|
|
303
|
-
paddingInlineStart: token('space.050'),
|
|
304
|
-
// Notes:
|
|
305
|
-
// - block padding is not strictly needed.
|
|
306
|
-
// - it does cause some issues with "combine" styling on firefox@125; but not
|
|
307
|
-
// on firefox@137
|
|
308
|
-
paddingBlockStart: token('space.050'),
|
|
309
|
-
paddingBlockEnd: token('space.050'),
|
|
310
|
-
backgroundColor: 'transparent',
|
|
311
|
-
borderRadius: token('border.radius'),
|
|
312
|
-
color: token('color.text.subtle'),
|
|
313
|
-
alignItems: 'center',
|
|
314
|
-
textAlign: 'start',
|
|
315
|
-
// :active styles are applied on the button / anchor rather
|
|
316
|
-
// than on the container so that pressing on actions does not
|
|
317
|
-
// trigger the :active styles on the whole element.
|
|
318
|
-
// We are excluding the disabled state, so we don't respond to
|
|
319
|
-
// presses when disabled.
|
|
320
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
321
|
-
'&:active:not(:disabled)': {
|
|
322
|
-
backgroundColor: token('elevation.surface.pressed'),
|
|
323
|
-
},
|
|
324
|
-
},
|
|
325
|
-
selected: {
|
|
326
|
-
color: token('color.text.selected'),
|
|
327
|
-
// We are excluding the disabled state, so we don't respond to
|
|
328
|
-
// presses when disabled.
|
|
329
|
-
// We also need to match the :active selector in the non-selected styles
|
|
330
|
-
// to ensure it doesn't have a higher specificity
|
|
331
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
332
|
-
'&:active:not(:disabled)': {
|
|
333
|
-
backgroundColor: token('color.background.selected.pressed'),
|
|
334
|
-
},
|
|
335
|
-
},
|
|
336
|
-
// Only applying on interactive element as we are not enabling
|
|
337
|
-
// dragging from nested interactive elements
|
|
338
|
-
hasDragIndicator: {
|
|
339
|
-
/**
|
|
340
|
-
* Opting out of long press actions on iOS as they don't work well with drag and drop.
|
|
341
|
-
*
|
|
342
|
-
* If you don't opt out, anchors can get a context menu including a link preview and actions
|
|
343
|
-
* (eg "open in new tab"). While it's still possible to do drag and drop operations with this
|
|
344
|
-
* context menu, it's a pain as you need to close the context menu while keeping your dragging
|
|
345
|
-
* finger depressed, then you can continue with the drag operation.
|
|
346
|
-
*
|
|
347
|
-
* TODO: could consider adding this to all menu items for a consistent experience.
|
|
348
|
-
*/
|
|
349
|
-
'-webkit-touch-callout': 'none',
|
|
350
|
-
// change cursor on hover
|
|
351
|
-
[dragHandleDisplayVar]: 'none',
|
|
352
|
-
'&:hover': {
|
|
353
|
-
[dragHandleDisplayVar]: 'flex',
|
|
354
|
-
animationDuration: '0s',
|
|
355
|
-
animationName: dragCursorAnimation,
|
|
356
|
-
// 800ms taken from drag and drop guidelines
|
|
357
|
-
animationDelay: '800ms',
|
|
358
|
-
animationFillMode: 'forwards',
|
|
359
|
-
},
|
|
360
|
-
},
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
const extendButtonOrAnchorStyles = cssMap({
|
|
364
|
-
root: {
|
|
365
|
-
position: 'absolute',
|
|
366
|
-
inset: token('space.0'),
|
|
367
|
-
},
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
const notchStyles = cssMap({
|
|
371
|
-
root: {
|
|
372
|
-
position: 'absolute',
|
|
373
|
-
insetBlockStart: '50%',
|
|
374
|
-
insetInlineStart: token('space.0'),
|
|
375
|
-
width: '2px',
|
|
376
|
-
height: '12px',
|
|
377
|
-
transform: 'translateY(-50%)',
|
|
378
|
-
backgroundColor: `var(${notchColorVar})`,
|
|
379
|
-
},
|
|
380
|
-
});
|
|
381
|
-
|
|
382
|
-
const actionStyles = cssMap({
|
|
383
|
-
root: {
|
|
384
|
-
display: 'flex',
|
|
385
|
-
alignItems: 'center',
|
|
386
|
-
gap: token('space.050'),
|
|
387
|
-
gridArea: 'actions',
|
|
388
|
-
paddingInlineEnd: token('space.050'),
|
|
389
|
-
// Hiding overflowing slot content to prevent content from adjacent slots overlapping when the menu item is constrained to a narrow width.
|
|
390
|
-
overflow: 'hidden',
|
|
391
|
-
'&:focus-within': {
|
|
392
|
-
// To prevent the focus ring from being clipped, we are allowing content to overflow while focus is within the slot.
|
|
393
|
-
overflow: 'initial',
|
|
394
|
-
},
|
|
395
|
-
},
|
|
396
|
-
});
|
|
397
|
-
|
|
398
|
-
const actionsOnHoverStyles = cssMap({
|
|
399
|
-
root: {
|
|
400
|
-
display: `var(${actionsOnHoverDisplayVar})`,
|
|
401
|
-
// When actionsOnHover are displayed, the elemAfter is hidden
|
|
402
|
-
// and these actions are rendered in it's place.
|
|
403
|
-
gridArea: 'elem-after',
|
|
404
|
-
alignItems: 'center',
|
|
405
|
-
gap: token('space.050'),
|
|
406
|
-
paddingInlineEnd: token('space.050'),
|
|
407
|
-
// Hiding overflowing slot content to prevent content from adjacent slots overlapping when the menu item is constrained to a narrow width.
|
|
408
|
-
overflow: 'hidden',
|
|
409
|
-
'&:focus-within': {
|
|
410
|
-
// To prevent the focus ring from being clipped, we are allowing content to overflow while focus is within the slot.
|
|
411
|
-
overflow: 'initial',
|
|
412
|
-
},
|
|
413
|
-
},
|
|
414
|
-
});
|
|
415
|
-
|
|
416
|
-
const textStyles = cssMap({
|
|
417
|
-
root: {
|
|
418
|
-
paddingInlineEnd: token('space.050'),
|
|
419
|
-
paddingInlineStart: token('space.050'),
|
|
420
|
-
display: 'flex',
|
|
421
|
-
flexDirection: 'column',
|
|
422
|
-
gap: token('space.025'),
|
|
423
|
-
// Allowing at least one character to be seen at all times, even when the menu item has been shrunk down
|
|
424
|
-
minWidth: '1ch',
|
|
425
|
-
// Hiding overflowing slot content to prevent content from adjacent slots overlapping when the menu item is constrained to a narrow width.
|
|
426
|
-
overflow: 'hidden',
|
|
427
|
-
'&:focus-within': {
|
|
428
|
-
// To prevent the focus ring from being clipped, we are allowing content to overflow while focus is within the slot.
|
|
429
|
-
overflow: 'initial',
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
noElemBeforeIndent: {
|
|
433
|
-
paddingInlineStart: token('space.075'),
|
|
434
|
-
},
|
|
435
|
-
});
|
|
436
|
-
|
|
437
|
-
const elemBeforeStyles = cssMap({
|
|
438
|
-
root: {
|
|
439
|
-
gridArea: 'elem-before',
|
|
440
|
-
display: 'flex',
|
|
441
|
-
flexShrink: 0,
|
|
442
|
-
width: '24px',
|
|
443
|
-
height: '24px',
|
|
444
|
-
alignItems: 'center',
|
|
445
|
-
justifyContent: 'center',
|
|
446
|
-
paddingInlineStart: token('space.050'),
|
|
447
|
-
// Box sizing must be explicit because we set a size AND padding on the same axis
|
|
448
|
-
// Otherwise the resulting size can be inconsistent depending on the global reset used
|
|
449
|
-
boxSizing: 'content-box',
|
|
450
|
-
// Hiding overflowing slot content to prevent content from adjacent slots overlapping when the menu item is constrained to a narrow width.
|
|
451
|
-
overflow: 'hidden',
|
|
452
|
-
'&:focus-within': {
|
|
453
|
-
// To prevent the focus ring from being clipped, we are allowing content to overflow while focus is within the slot.
|
|
454
|
-
overflow: 'initial',
|
|
455
|
-
},
|
|
456
|
-
},
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
const elemAfterStyles = cssMap({
|
|
460
|
-
root: {
|
|
461
|
-
display: `var(${elemAfterDisplayVar})`,
|
|
462
|
-
gridArea: 'elem-after',
|
|
463
|
-
flexShrink: 0,
|
|
464
|
-
height: '24px',
|
|
465
|
-
alignItems: 'center',
|
|
466
|
-
paddingInlineEnd: token('space.050'),
|
|
467
|
-
// Hiding overflowing slot content to prevent content from adjacent slots overlapping when the menu item is constrained to a narrow width.
|
|
468
|
-
overflow: 'hidden',
|
|
469
|
-
'&:focus-within': {
|
|
470
|
-
// To prevent the focus ring from being clipped, we are allowing content to overflow while focus is within the slot.
|
|
471
|
-
overflow: 'initial',
|
|
472
|
-
},
|
|
473
|
-
},
|
|
474
|
-
});
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* We are using a wrapping element for our interactive content
|
|
478
|
-
* even though only the `Text` element is the only thing not using `position:absolute`
|
|
479
|
-
*
|
|
480
|
-
* Rationale:
|
|
481
|
-
* - Super clear that everything inside the interactive content should be in a specific slot in the grid
|
|
482
|
-
* - To work around a browser bug in Safari where it does not work well with `position:absolute`
|
|
483
|
-
* on a subgrid child.
|
|
484
|
-
* Safari bug: https://bugs.webkit.org/show_bug.cgi?id=292516
|
|
485
|
-
*/
|
|
486
|
-
const interactiveContentStyles = cssMap({
|
|
487
|
-
root: {
|
|
488
|
-
gridArea: 'interactive',
|
|
489
|
-
// Make content full height
|
|
490
|
-
display: 'flex',
|
|
491
|
-
flexDirection: 'column',
|
|
492
|
-
alignContent: 'center',
|
|
493
|
-
},
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
function getTextColor({
|
|
497
|
-
isDisabled,
|
|
498
|
-
isSelected,
|
|
499
|
-
}: {
|
|
500
|
-
isDisabled?: boolean;
|
|
501
|
-
isSelected?: boolean;
|
|
502
|
-
}): TextColor {
|
|
503
|
-
if (isDisabled) {
|
|
504
|
-
return 'color.text.disabled';
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
if (isSelected) {
|
|
508
|
-
return 'color.text.selected';
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
return 'color.text.subtle';
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Includes all props that are used by any menu item, as MenuItembase is the base component for all menu item components.
|
|
516
|
-
*
|
|
517
|
-
* We also include additional `aria` props to support the menu item being a trigger for the FlyoutMenuItem popup and for the
|
|
518
|
-
* expanded content for ExpandableMenuItem.
|
|
519
|
-
*/
|
|
520
|
-
type MenuItemBaseProps<T extends HTMLAnchorElement | HTMLButtonElement> =
|
|
521
|
-
MenuItemLinkOrButtonCommonProps & {
|
|
522
|
-
/**
|
|
523
|
-
* ID attribute, passed to the interactive element (anchor/button). This is not publicly exposed, and is currently only
|
|
524
|
-
* used internally by `ExpandableMenuItemTrigger` for the `aria-labelledby` attribute.
|
|
525
|
-
*/
|
|
526
|
-
id?: string;
|
|
527
|
-
href?: string | Record<string, any>;
|
|
528
|
-
target?: HTMLAnchorElement['target'];
|
|
529
|
-
isDisabled?: boolean;
|
|
530
|
-
isSelected?: boolean;
|
|
531
|
-
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
532
|
-
ariaControls?: string;
|
|
533
|
-
// eslint-disable-next-line @repo/internal/react/boolean-prop-naming-convention, @repo/internal/react/consistent-props-definitions
|
|
534
|
-
ariaExpanded?: boolean;
|
|
535
|
-
// eslint-disable-next-line @repo/internal/react/consistent-props-definitions
|
|
536
|
-
ariaHasPopup?: boolean | 'dialog';
|
|
537
|
-
onClick?: MenuItemOnClick<T>;
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* This is the internal version of the component, to be passed into `forwardRef`.
|
|
542
|
-
*
|
|
543
|
-
* It contains a type argument `<T>`, to specify the type of the interactive element (`button` or `a`).
|
|
544
|
-
* This can be inferred from the type of the `onClick` prop.
|
|
545
|
-
*/
|
|
546
|
-
const MenuItemBaseNoRef = <T extends HTMLAnchorElement | HTMLButtonElement>(
|
|
547
|
-
{
|
|
548
|
-
id,
|
|
549
|
-
testId,
|
|
550
|
-
actions,
|
|
551
|
-
actionsOnHover,
|
|
552
|
-
children,
|
|
553
|
-
description,
|
|
554
|
-
elemAfter,
|
|
555
|
-
elemBefore,
|
|
556
|
-
href,
|
|
557
|
-
target,
|
|
558
|
-
isDisabled,
|
|
559
|
-
isSelected,
|
|
560
|
-
onClick,
|
|
561
|
-
ariaControls,
|
|
562
|
-
ariaExpanded,
|
|
563
|
-
ariaHasPopup,
|
|
564
|
-
interactionName,
|
|
565
|
-
isContentTooltipDisabled,
|
|
566
|
-
visualContentRef,
|
|
567
|
-
isDragging,
|
|
568
|
-
hasDragIndicator,
|
|
569
|
-
dropIndicator,
|
|
570
|
-
}: MenuItemBaseProps<T>,
|
|
571
|
-
forwardedRef: React.ForwardedRef<T>,
|
|
572
|
-
) => {
|
|
573
|
-
const level = useLevel();
|
|
574
|
-
const setFlyoutMenuOpen = useSetFlyoutMenuOpen();
|
|
575
|
-
const isFlyoutMenuOpen = useFlyoutMenuOpen();
|
|
576
|
-
const isLink = typeof href !== 'undefined';
|
|
577
|
-
const labelRef = useRef<T | null>(null);
|
|
578
|
-
const descriptionRef = useRef<T | null>(null);
|
|
579
|
-
const tooltipOnClick = useRef<React.MouseEventHandler<HTMLElement> | null>(null);
|
|
580
|
-
|
|
581
|
-
const handleClick = useCallback(
|
|
582
|
-
(event: React.MouseEvent<T>, analyticsEvent: UIAnalyticsEvent) => {
|
|
583
|
-
onClick?.(event, analyticsEvent);
|
|
584
|
-
// Toggle flyout menu open state when inside a flyout context provider
|
|
585
|
-
setFlyoutMenuOpen(!isFlyoutMenuOpen);
|
|
586
|
-
|
|
587
|
-
tooltipOnClick.current?.(event);
|
|
588
|
-
},
|
|
589
|
-
[onClick, setFlyoutMenuOpen, isFlyoutMenuOpen],
|
|
590
|
-
);
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* Show the tooltip if _either_ label or description is truncated
|
|
594
|
-
*/
|
|
595
|
-
const canTooltipAppear = useCallback((): boolean => {
|
|
596
|
-
if (isContentTooltipDisabled) {
|
|
597
|
-
return false;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
// Show tooltip if _either_ label or description are clamped
|
|
601
|
-
|
|
602
|
-
const label = labelRef.current;
|
|
603
|
-
const description = descriptionRef.current;
|
|
604
|
-
|
|
605
|
-
if (label && isTextClamped(label)) {
|
|
606
|
-
return true;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
return Boolean(description && isTextClamped(description));
|
|
610
|
-
}, [isContentTooltipDisabled]);
|
|
611
|
-
|
|
612
|
-
// By default provide the spacing for `elemBefore` to have good
|
|
613
|
-
// vertical alignment of labels and to give clear indentation between levels
|
|
614
|
-
// in the side navigation (even when items don't use elemBefore).
|
|
615
|
-
const showElemBefore = elemBefore !== COLLAPSE_ELEM_BEFORE;
|
|
616
|
-
|
|
617
|
-
const interactiveElemContent = (
|
|
618
|
-
<div css={interactiveContentStyles.root}>
|
|
619
|
-
{/**
|
|
620
|
-
* We are creating a hidden element to increase the interactive area of our menu items.
|
|
621
|
-
* This enables users to only need to move their pointers vertically to be able to access
|
|
622
|
-
* nested menu items.
|
|
623
|
-
*
|
|
624
|
-
* 📺 More context: https://www.youtube.com/watch?v=zVFJAwrCQCM
|
|
625
|
-
*
|
|
626
|
-
* Notes:
|
|
627
|
-
*
|
|
628
|
-
* - We cannot use `::before` on the interactive element itself as you
|
|
629
|
-
* cannot drag a `button` element from `::before` in Firefox
|
|
630
|
-
* https://bugzilla.mozilla.org/show_bug.cgi?id=1967645
|
|
631
|
-
* - The hidden element uses `position:absolute` so it won't impact layout
|
|
632
|
-
*
|
|
633
|
-
*/}
|
|
634
|
-
<div
|
|
635
|
-
css={extendButtonOrAnchorStyles.root}
|
|
636
|
-
// This extends the clickable area of nested menu items to the width
|
|
637
|
-
// of the root level menu items, while being visually indented.
|
|
638
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
639
|
-
style={{ insetInlineStart: `calc(-1 * ${level} * ${expandableMenuItemIndentation})` }}
|
|
640
|
-
aria-hidden="true"
|
|
641
|
-
/>
|
|
642
|
-
<div css={[textStyles.root, !showElemBefore && textStyles.noElemBeforeIndent]}>
|
|
643
|
-
<Text
|
|
644
|
-
weight="medium"
|
|
645
|
-
maxLines={1}
|
|
646
|
-
color={getTextColor({ isDisabled, isSelected })}
|
|
647
|
-
ref={labelRef}
|
|
648
|
-
>
|
|
649
|
-
{children}
|
|
650
|
-
</Text>
|
|
651
|
-
{description && (
|
|
652
|
-
<Text
|
|
653
|
-
color={isDisabled ? 'color.text.disabled' : 'color.text.subtle'}
|
|
654
|
-
size="small"
|
|
655
|
-
maxLines={1}
|
|
656
|
-
ref={descriptionRef}
|
|
657
|
-
>
|
|
658
|
-
{description}
|
|
659
|
-
</Text>
|
|
660
|
-
)}
|
|
661
|
-
</div>
|
|
662
|
-
{/**
|
|
663
|
-
* Both the drop indicator and drag handle use `position:absolute`
|
|
664
|
-
* Both rely on `position:relative` on a parent for positioning.
|
|
665
|
-
*/}
|
|
666
|
-
|
|
667
|
-
{/**
|
|
668
|
-
* Wrapping `LazyDragHandle` in it's own `Suspense` boundary, so that it's loading won't block
|
|
669
|
-
* the rendering of the rest of the menu item.
|
|
670
|
-
* We put the `Suspense` in the conditional branch to avoid putting a `Suspense` in the react
|
|
671
|
-
* tree for consumers who don't need it
|
|
672
|
-
*/}
|
|
673
|
-
{hasDragIndicator ? (
|
|
674
|
-
<Suspense fallback={null}>
|
|
675
|
-
<LazyDragHandle />
|
|
676
|
-
</Suspense>
|
|
677
|
-
) : null}
|
|
678
|
-
|
|
679
|
-
{dropIndicator}
|
|
680
|
-
</div>
|
|
681
|
-
);
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* If the [expandable] menu item is expanded, show hover actions even when *not* hovered.
|
|
685
|
-
*
|
|
686
|
-
* Note: we also remove the `elemAfter` when showing `actionsOnHover`
|
|
687
|
-
*/
|
|
688
|
-
const showHoverActionsWhenNotHovered = Boolean(ariaExpanded && actionsOnHover);
|
|
689
|
-
|
|
690
|
-
return (
|
|
691
|
-
<AvatarContext.Provider value={defaultAvatarValues}>
|
|
692
|
-
<div
|
|
693
|
-
ref={visualContentRef}
|
|
694
|
-
css={[
|
|
695
|
-
containerStyles.root,
|
|
696
|
-
isSelected && containerStyles.selected,
|
|
697
|
-
isDragging && containerStyles.dragging,
|
|
698
|
-
description && containerStyles.hasDescription,
|
|
699
|
-
// If the menu item has actionsOnHover and is expanded, show hover actions even when not hovered
|
|
700
|
-
showHoverActionsWhenNotHovered && containerStyles.showHoverActions,
|
|
701
|
-
// If the menu item has both actionsOnHover and elemAfter and is expanded, remove elemAfter to make more space for actionsOnHover.
|
|
702
|
-
showHoverActionsWhenNotHovered && elemAfter && containerStyles.removeElemAfter,
|
|
703
|
-
// If the menu item has both actionsOnHover and elemAfter, remove elemAfter to make more space for actionsOnHover, when:
|
|
704
|
-
// - menu item is hovered, or
|
|
705
|
-
// - there is an open nested popup (as we apply hover styles when there is an open nested popup)
|
|
706
|
-
actionsOnHover && elemAfter && containerStyles.removeElemAfterOnHoverOrOpenNestedPopup,
|
|
707
|
-
isDisabled && containerStyles.disabled,
|
|
708
|
-
]}
|
|
709
|
-
data-testid={testId ? `${testId}-container` : undefined}
|
|
710
|
-
data-selected={isSelected}
|
|
711
|
-
>
|
|
712
|
-
<Tooltip
|
|
713
|
-
content={() => (
|
|
714
|
-
<>
|
|
715
|
-
<div>{children}</div>
|
|
716
|
-
{description ? <div>{description}</div> : null}
|
|
717
|
-
</>
|
|
718
|
-
)}
|
|
719
|
-
position="right"
|
|
720
|
-
// NOTE: Types in React 18 have changed and `forwardRef(() => <TooltipPrimitive>)` no longer appears to match 100%
|
|
721
|
-
component={MenuItemTooltip as TooltipProps['component']}
|
|
722
|
-
ignoreTooltipPointerEvents
|
|
723
|
-
hideTooltipOnMouseDown
|
|
724
|
-
// We don't need a duplicate hidden element containing tooltip content
|
|
725
|
-
// as the content of the tooltip matches what is rendered for the menu item.
|
|
726
|
-
isScreenReaderAnnouncementDisabled
|
|
727
|
-
canAppear={canTooltipAppear}
|
|
728
|
-
>
|
|
729
|
-
{(tooltipProps) => {
|
|
730
|
-
// Putting the tooltip onClick into a ref.
|
|
731
|
-
// This way we don't need to create a new `onClick` function on each
|
|
732
|
-
// render (as we would need to merge `tooltipProps.onClick` and our `handleClick`)
|
|
733
|
-
tooltipOnClick.current = tooltipProps.onClick;
|
|
734
|
-
|
|
735
|
-
const sharedProps = {
|
|
736
|
-
...tooltipProps,
|
|
737
|
-
'aria-controls': ariaControls,
|
|
738
|
-
'aria-haspopup': ariaHasPopup,
|
|
739
|
-
ref: mergeRefs([forwardedRef, tooltipProps.ref]),
|
|
740
|
-
id,
|
|
741
|
-
testId,
|
|
742
|
-
interactionName,
|
|
743
|
-
};
|
|
744
|
-
|
|
745
|
-
return isLink ? (
|
|
746
|
-
<Anchor
|
|
747
|
-
{...sharedProps}
|
|
748
|
-
onClick={handleClick as MenuItemOnClick<HTMLAnchorElement>}
|
|
749
|
-
xcss={cx(
|
|
750
|
-
buttonOrAnchorStyles.root,
|
|
751
|
-
topLevelSiblingStyles.root,
|
|
752
|
-
isSelected && buttonOrAnchorStyles.selected,
|
|
753
|
-
hasDragIndicator && buttonOrAnchorStyles.hasDragIndicator,
|
|
754
|
-
)}
|
|
755
|
-
// Needed to override Anchor style due to a compiled/emotion conflict
|
|
756
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
757
|
-
style={{ textDecoration: 'none' }}
|
|
758
|
-
aria-current={isSelected ? 'page' : undefined}
|
|
759
|
-
href={href}
|
|
760
|
-
target={target}
|
|
761
|
-
/**
|
|
762
|
-
* For anchors we don't want to have the standard drag and drop behaviour.
|
|
763
|
-
*
|
|
764
|
-
* Thinking on the topic:
|
|
765
|
-
*
|
|
766
|
-
* - Anchors look visually similar to buttons in the sidenav
|
|
767
|
-
* - Why should some menu items be natively draggable, while others are not?
|
|
768
|
-
* - A user cannot know which menu items are "natively" draggable (ie anchors)
|
|
769
|
-
* - If you wire up an anchor to be draggable using our standard affordances
|
|
770
|
-
* it will have a different preview experience to native anchor dragging.
|
|
771
|
-
*
|
|
772
|
-
* To promote consistency, all elements need to use the same visual affordances.
|
|
773
|
-
*
|
|
774
|
-
* Anchor elements will automatically attach URL information
|
|
775
|
-
* to the native data store.
|
|
776
|
-
*
|
|
777
|
-
* When `hasDragIndicator` is `true` we are expecting consumers to register
|
|
778
|
-
* the element as draggable through the `draggable()` Pragmatic drag and drop function.
|
|
779
|
-
* The `draggable()` function will add `draggable="true"` to the element.
|
|
780
|
-
*/
|
|
781
|
-
draggable={hasDragIndicator ? undefined : false}
|
|
782
|
-
>
|
|
783
|
-
{/* Won't be a "grid child" */}
|
|
784
|
-
<div css={notchStyles.root} aria-hidden="true" />
|
|
785
|
-
{interactiveElemContent}
|
|
786
|
-
</Anchor>
|
|
787
|
-
) : (
|
|
788
|
-
<Pressable
|
|
789
|
-
{...sharedProps}
|
|
790
|
-
onClick={handleClick as MenuItemOnClick<HTMLButtonElement>}
|
|
791
|
-
xcss={cx(
|
|
792
|
-
buttonOrAnchorStyles.root,
|
|
793
|
-
topLevelSiblingStyles.root,
|
|
794
|
-
isSelected && buttonOrAnchorStyles.selected,
|
|
795
|
-
hasDragIndicator && buttonOrAnchorStyles.hasDragIndicator,
|
|
796
|
-
)}
|
|
797
|
-
aria-expanded={ariaExpanded}
|
|
798
|
-
isDisabled={isDisabled}
|
|
799
|
-
>
|
|
800
|
-
{interactiveElemContent}
|
|
801
|
-
</Pressable>
|
|
802
|
-
);
|
|
803
|
-
}}
|
|
804
|
-
</Tooltip>
|
|
805
|
-
{showElemBefore && (
|
|
806
|
-
<div
|
|
807
|
-
css={[
|
|
808
|
-
elemBeforeStyles.root,
|
|
809
|
-
topLevelSiblingStyles.root,
|
|
810
|
-
onTopOfButtonOrAnchorStyles.root,
|
|
811
|
-
]}
|
|
812
|
-
>
|
|
813
|
-
{elemBefore}
|
|
814
|
-
</div>
|
|
815
|
-
)}
|
|
816
|
-
{actionsOnHover && <div css={actionsOnHoverStyles.root}>{actionsOnHover}</div>}
|
|
817
|
-
{elemAfter && (
|
|
818
|
-
<div
|
|
819
|
-
css={[
|
|
820
|
-
elemAfterStyles.root,
|
|
821
|
-
topLevelSiblingStyles.root,
|
|
822
|
-
onTopOfButtonOrAnchorStyles.root,
|
|
823
|
-
]}
|
|
824
|
-
>
|
|
825
|
-
{elemAfter}
|
|
826
|
-
</div>
|
|
827
|
-
)}
|
|
828
|
-
{actions && (
|
|
829
|
-
<div
|
|
830
|
-
css={[actionStyles.root, topLevelSiblingStyles.root, onTopOfButtonOrAnchorStyles.root]}
|
|
831
|
-
>
|
|
832
|
-
{actions}
|
|
833
|
-
</div>
|
|
834
|
-
)}
|
|
835
|
-
</div>
|
|
836
|
-
</AvatarContext.Provider>
|
|
837
|
-
);
|
|
838
|
-
};
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* __MenuItemBase__
|
|
842
|
-
*
|
|
843
|
-
* The base menu item component used to compose ButtonMenuItem and LinkMenuItem.
|
|
844
|
-
*
|
|
845
|
-
* It contains a type argument `<T>`, to specify the type of the interactive element (`button` or `a`).
|
|
846
|
-
* This can be inferred from the type of the `onClick` prop.
|
|
847
|
-
*/
|
|
848
|
-
export const MenuItemBase = forwardRefWithGeneric(MenuItemBaseNoRef);
|