From 8dcf472ad06d6523880b1d3685d1a8d626c6abd4 Mon Sep 17 00:00:00 2001 From: Cee Chen <549407+cee-chen@users.noreply.github.com> Date: Mon, 7 Aug 2023 07:50:36 -0700 Subject: [PATCH] [EuiCollapsibleNavBeta] Final collapsed/docked icon & popover behavior (#7034) --- .../collapsible_nav_beta.test.tsx.snap | 14 +- .../collapsible_nav_beta.styles.ts | 32 +- .../collapsible_nav_beta.tsx | 53 ++-- .../collapsible_nav_button.test.tsx.snap | 82 +++-- .../collapsible_nav_button.styles.ts | 5 + .../collapsible_nav_button.test.tsx | 76 +++-- .../collapsible_nav_button.tsx | 27 +- .../collapsible_nav_accordion.test.tsx.snap | 4 +- .../collapsible_nav_item.test.tsx.snap | 23 +- .../collapsible_nav_link.test.tsx.snap | 2 +- .../collapsed_nav_button.test.tsx.snap | 71 +++++ .../collapsed_nav_item.test.tsx.snap | 51 ++++ .../collapsed_nav_popover.test.tsx.snap | 122 ++++++++ .../collapsed/collapsed_nav_button.styles.ts | 54 ++++ .../collapsed/collapsed_nav_button.test.tsx | 52 ++++ .../collapsed/collapsed_nav_button.tsx | 90 ++++++ .../collapsed/collapsed_nav_item.stories.tsx | 41 +++ .../collapsed/collapsed_nav_item.test.tsx | 42 +++ .../collapsed/collapsed_nav_item.tsx | 36 +++ .../collapsed/collapsed_nav_popover.styles.ts | 70 +++++ .../collapsed/collapsed_nav_popover.test.tsx | 86 ++++++ .../collapsed/collapsed_nav_popover.tsx | 127 ++++++++ .../collapsible_nav_item/collapsed/index.ts | 9 + .../collapsible_nav_accordion.styles.ts | 4 +- .../collapsible_nav_item.stories.tsx | 286 +++++++++--------- .../collapsible_nav_item.test.tsx | 14 + .../collapsible_nav_item.tsx | 39 ++- .../collapsible_nav_link.test.tsx | 15 +- .../collapsible_nav_link.tsx | 10 +- .../collapsible_nav_beta/context.ts | 24 ++ 30 files changed, 1286 insertions(+), 275 deletions(-) create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_button.test.tsx.snap create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_item.test.tsx.snap create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/__snapshots__/collapsed_nav_popover.test.tsx.snap create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.styles.ts create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.test.tsx create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.tsx create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.stories.tsx create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.test.tsx create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.tsx create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.ts create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.test.tsx create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.tsx create mode 100644 src/components/collapsible_nav_beta/collapsible_nav_item/collapsed/index.ts create mode 100644 src/components/collapsible_nav_beta/context.ts diff --git a/src/components/collapsible_nav_beta/__snapshots__/collapsible_nav_beta.test.tsx.snap b/src/components/collapsible_nav_beta/__snapshots__/collapsible_nav_beta.test.tsx.snap index aca056d98d6..68649e2973f 100644 --- a/src/components/collapsible_nav_beta/__snapshots__/collapsible_nav_beta.test.tsx.snap +++ b/src/components/collapsible_nav_beta/__snapshots__/collapsible_nav_beta.test.tsx.snap @@ -14,7 +14,7 @@ exports[`EuiCollapsibleNavBeta renders 1`] = ` aria-expanded="true" aria-label="Toggle navigation closed" aria-pressed="true" - class="euiButtonIcon euiCollapsibleNavButton emotion-euiButtonIcon-s-empty-text" + class="euiButtonIcon euiCollapsibleNavButton emotion-euiButtonIcon-s-empty-text-euiCollapsibleNavButton" data-test-subj="euiCollapsibleNavButton" type="button" > @@ -36,7 +36,7 @@ exports[`EuiCollapsibleNavBeta renders 1`] = ` >