From 8ab9fa1154c89e516444755d9eb15fbb02243879 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Fri, 10 May 2024 09:51:21 +0300 Subject: [PATCH] Tokens for breadcrumb --- .../lib/breadcrumb/style/BreadcrumbStyle.js | 22 +++++++------------ .../lib/themes/aura/breadcrumb/index.js | 14 ++++++++++-- components/lib/themes/aura/index.js | 4 ++-- .../lib/themes/lara/breadcrumb/index.js | 14 ++++++++++-- components/lib/themes/lara/index.js | 4 ++-- 5 files changed, 36 insertions(+), 22 deletions(-) diff --git a/components/lib/breadcrumb/style/BreadcrumbStyle.js b/components/lib/breadcrumb/style/BreadcrumbStyle.js index c31964971..f7ce39fdb 100644 --- a/components/lib/breadcrumb/style/BreadcrumbStyle.js +++ b/components/lib/breadcrumb/style/BreadcrumbStyle.js @@ -3,9 +3,7 @@ import BaseStyle from 'primevue/base/style'; const theme = ({ dt }) => ` .p-breadcrumb { background: ${dt('breadcrumb.background')}; - border: 0 none; - border-radius: ${dt('border.radius.md')}; - padding: 1rem; + padding: ${dt('breadcrumb.padding')}; overflow-x: auto; } @@ -16,12 +14,12 @@ const theme = ({ dt }) => ` display: flex; align-items: center; flex-wrap: nowrap; + gap: ${dt('breadcrumb.gap')}; } .p-breadcrumb-separator { display: flex; align-items: center; - margin: 0 0.5rem 0 0.5rem; color: ${dt('breadcrumb.separator.color')}; } @@ -33,20 +31,16 @@ const theme = ({ dt }) => ` text-decoration: none; display: flex; align-items: center; - transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}; - border-radius: ${dt('border.radius.md')}; + transition: background ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}; + border-radius: ${dt('breadcrumb.item.border.radius')}; outline-color: transparent; + color: ${dt('breadcrumb.item.color')}; } .p-breadcrumb-item-link:focus-visible { - outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')}; - outline-offset: ${dt('focus.ring.offset')}; -} - -.p-breadcrumb-item-link { - color: ${dt('breadcrumb.item.color')}; - transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}; - line-height: 1; + box-shadow: ${dt('breadcrumb.item.focus.ring.shadow')}; + outline: ${dt('breadcrumb.item.focus.ring.width')} ${dt('breadcrumb.item.focus.ring.style')} ${dt('breadcrumb.item.focus.ring.color')}; + outline-offset: ${dt('breadcrumb.item.focus.ring.offset')}; } .p-breadcrumb-item-label:hover { diff --git a/components/lib/themes/aura/breadcrumb/index.js b/components/lib/themes/aura/breadcrumb/index.js index 10ebb783b..fb8cb628a 100644 --- a/components/lib/themes/aura/breadcrumb/index.js +++ b/components/lib/themes/aura/breadcrumb/index.js @@ -1,11 +1,21 @@ export default { root: { - background: '{content.background}' + padding: '1rem', + background: '{content.background}', + gap: '0.5rem' }, item: { color: '{text.muted.color}', hoverColor: '{text.color}', - iconColor: '{navigation.item.icon.color}' + iconColor: '{navigation.item.icon.color}', + borderRadius: '{content.border.radius}', + focusRing: { + width: '{focus.ring.width}', + style: '{focus.ring.style}', + color: '{focus.ring.color}', + offset: '{focus.ring.offset}', + shadow: '{focus.ring.shadow}' + } }, separator: { color: '{navigation.item.icon.color}' diff --git a/components/lib/themes/aura/index.js b/components/lib/themes/aura/index.js index 025f35bd1..21164c728 100644 --- a/components/lib/themes/aura/index.js +++ b/components/lib/themes/aura/index.js @@ -287,7 +287,7 @@ export default { item: { focusBackground: '{surface.100}', color: '{text.color}', - hoverColor: '{text.hover.color}', + focusColor: '{text.hover.color}', icon: { color: '{surface.400}', focusColor: '{surface.500}' @@ -397,7 +397,7 @@ export default { item: { focusBackground: '{surface.800}', color: '{text.color}', - hoverColor: '{text.hover.color}', + focusColor: '{text.hover.color}', icon: { color: '{surface.500}', focusColor: '{surface.400}' diff --git a/components/lib/themes/lara/breadcrumb/index.js b/components/lib/themes/lara/breadcrumb/index.js index 10ebb783b..883cf91de 100644 --- a/components/lib/themes/lara/breadcrumb/index.js +++ b/components/lib/themes/lara/breadcrumb/index.js @@ -1,11 +1,21 @@ export default { root: { - background: '{content.background}' + padding: '1.25rem', + background: '{content.background}', + gap: '0.5rem' }, item: { color: '{text.muted.color}', hoverColor: '{text.color}', - iconColor: '{navigation.item.icon.color}' + iconColor: '{navigation.item.icon.color}', + borderRadius: '{content.border.radius}', + focusRing: { + width: '{focus.ring.width}', + style: '{focus.ring.style}', + color: '{focus.ring.color}', + offset: '{focus.ring.offset}', + shadow: '{focus.ring.shadow}' + } }, separator: { color: '{navigation.item.icon.color}' diff --git a/components/lib/themes/lara/index.js b/components/lib/themes/lara/index.js index 77ccdf59a..431b84b74 100644 --- a/components/lib/themes/lara/index.js +++ b/components/lib/themes/lara/index.js @@ -289,7 +289,7 @@ export default { item: { focusBackground: '{surface.100}', color: '{text.color}', - hoverColor: '{text.hover.color}', + focusColor: '{text.hover.color}', icon: { color: '{surface.400}', focusColor: '{surface.500}' @@ -402,7 +402,7 @@ export default { item: { focusBackground: '{surface.800}', color: '{text.color}', - hoverColor: '{text.hover.color}', + focusColor: '{text.hover.color}', icon: { color: '{surface.500}', focusColor: '{surface.400}'