From c14334320f6869a4302be94c14774a6165dca43a Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Wed, 14 Aug 2024 15:03:00 +1000 Subject: [PATCH 1/3] refactor(@dpc-sdp/ripple-ui-core): :recycle: rework breadcrumbs for 4+ terms --- .../components/breadcrumbs/RplBreadcrumbs.css | 24 +++++++-- .../components/breadcrumbs/RplBreadcrumbs.vue | 52 +++++++++++++++---- 2 files changed, 64 insertions(+), 12 deletions(-) diff --git a/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.css b/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.css index fb376e9268..8a63c2c561 100644 --- a/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.css +++ b/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.css @@ -10,9 +10,9 @@ display: inline-block; margin-left: var(--local-horizontal-offset); padding-top: calc(var(--rpl-sp-3) - var(--rpl-border-1)); - padding-right: calc(var(--rpl-sp-5) - var(--rpl-border-1)); + padding-right: calc(var(--rpl-sp-4) - var(--rpl-border-1)); padding-bottom: calc(var(--rpl-sp-3) - var(--rpl-border-1)); - padding-left: calc(var(--rpl-sp-5) - var(--rpl-border-1)); + padding-left: calc(var(--rpl-sp-4) - var(--rpl-border-1)); max-width: calc(100% - var(--local-horizontal-offset) * 2); overflow: hidden; text-overflow: ellipsis; @@ -21,6 +21,8 @@ @media (--rpl-bp-m) { --local-horizontal-offset: var(--rpl-sp-4); + padding-right: calc(var(--rpl-sp-5) - var(--rpl-border-1)); + padding-left: calc(var(--rpl-sp-5) - var(--rpl-border-1)); height: auto; overflow: visible; white-space: normal; @@ -84,6 +86,22 @@ &--beside-exit { --local-width-spacer: 124px; - max-width: calc(100% - var(--local-horizontal-offset) * 3 - var(--local-width-spacer)); + max-width: calc( + 100% - var(--local-horizontal-offset) * 3 - var(--local-width-spacer) + ); } } + +.rpl-breadcrumbs__collapse-link::before { + content: '>'; + display: inline; + padding: 0 var(--rpl-sp-2); +} + +.rpl-breadcrumbs__collapse-link-trigger:hover { + text-decoration: underline; +} + +.rpl-breadcrumbs__item--collapsed { + display: none; +} diff --git a/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.vue b/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.vue index c226cbcb0f..b1f0ce968e 100644 --- a/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.vue +++ b/packages/ripple-ui-core/src/components/breadcrumbs/RplBreadcrumbs.vue @@ -1,4 +1,5 @@