From 0b7ef82fec2099d164a5e33c745007c270e6ec6d Mon Sep 17 00:00:00 2001 From: Kamil Emeleev Date: Mon, 8 Jun 2026 21:36:55 +0300 Subject: [PATCH] fix(ActionsPanel): correct styling of internal subcomponents (divider, badge, buttons) --- .../ActionsPanelAction.module.css | 31 ++++++++++++------ .../ActionsPanelAction/ActionsPanelAction.tsx | 1 + .../ActionsPanelClearButton.module.css | 17 ++++++++-- .../ActionsPanelClearButton.tsx | 2 ++ .../ActionsPanelCounter.module.css | 12 +++---- .../ActionsPanelCounter.tsx | 2 +- .../ActionsPanelDivider.module.css | 3 +- .../ActionsPanelDivider.tsx | 1 + .../ActionsPanelMoreAction.module.css | 32 +++++++++++++------ .../ActionsPanelMoreAction.tsx | 1 + 10 files changed, 74 insertions(+), 28 deletions(-) diff --git a/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.module.css b/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.module.css index 17a54279c..e796b5a9d 100644 --- a/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.module.css +++ b/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.module.css @@ -1,15 +1,28 @@ -.base { +/* [data-slot] bumps specificity over Button's own rules */ +.base[data-slot='action'] { flex-shrink: 0; margin-inline-start: var(--kbq-size-xxs); background-color: var(--kbq-background-transparent); -} -.base:first-child { - margin-inline-start: unset; -} + &[data-hovered='true']:not([data-loading='true']) { + background-color: var(--kbq-states-background-contrast-hover); + } + + &[data-pressed='true']:not([data-loading='true']) { + background-color: var(--kbq-states-background-contrast-active); + } + + &[data-disabled='true'] { + background-color: var(--kbq-states-background-disabled); + } + + &:first-child { + margin-inline-start: unset; + } -.base[aria-hidden='true'] { - visibility: hidden; - position: absolute; - inset-inline-start: -300vw; + &[aria-hidden='true'] { + visibility: hidden; + position: absolute; + inset-inline-start: -300vw; + } } diff --git a/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.tsx b/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.tsx index 2c783a842..46ebe0a13 100644 --- a/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.tsx +++ b/packages/components/src/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.tsx @@ -15,6 +15,7 @@ export const ActionsPanelAction = (props: ActionsPanelActionProps) => { ref={ref} data-slot="action" startIcon={icon} + variant="contrast-filled" className={clsx(s.base, className)} {...other} > diff --git a/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.module.css b/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.module.css index 0c52a0762..1c73ad9b6 100644 --- a/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.module.css +++ b/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.module.css @@ -1,9 +1,22 @@ .base { display: flex; - margin-inline-start: auto; align-items: center; + margin-inline-start: auto; } -.clearButton { +/* [data-slot] bumps specificity over Button's own rules */ +.clearButton[data-slot='clear-button'] { background-color: var(--kbq-background-transparent); + + &[data-hovered='true']:not([data-loading='true']) { + background-color: var(--kbq-states-background-contrast-hover); + } + + &[data-pressed='true']:not([data-loading='true']) { + background-color: var(--kbq-states-background-contrast-active); + } + + &[data-disabled='true'] { + background-color: var(--kbq-states-background-disabled); + } } diff --git a/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.tsx b/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.tsx index b5388aae0..0002809c7 100644 --- a/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.tsx +++ b/packages/components/src/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.tsx @@ -26,7 +26,9 @@ export const ActionsPanelClearButton = ({