From 2f4317a9c1e51693aea8b637d9ec79ae8eac49ad Mon Sep 17 00:00:00 2001 From: "josh.bagwell" Date: Mon, 15 Jun 2026 14:59:20 -0600 Subject: [PATCH 01/40] chore: Updated Buttons with new styling --- modules/react/button/lib/BaseButton.tsx | 47 ++++++++--------- modules/react/button/lib/DeleteButton.tsx | 52 +++++++++++++++++-- modules/react/button/lib/SecondaryButton.tsx | 16 ++---- modules/react/button/lib/TertiaryButton.tsx | 33 +++--------- .../react/button/stories/button/Button.mdx | 6 +++ .../button/stories/button/Button.stories.tsx | 4 ++ .../stories/button/examples/DeleteInverse.tsx | 26 ++++++++++ .../visual-testing/DeleteButton.stories.tsx | 4 ++ 8 files changed, 120 insertions(+), 68 deletions(-) create mode 100644 modules/react/button/stories/button/examples/DeleteInverse.tsx diff --git a/modules/react/button/lib/BaseButton.tsx b/modules/react/button/lib/BaseButton.tsx index 2b0ff54a63..eb225cef62 100644 --- a/modules/react/button/lib/BaseButton.tsx +++ b/modules/react/button/lib/BaseButton.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import {GrowthBehavior, createComponent} from '@workday/canvas-kit-react/common'; import {SystemIconProps, systemIconStencil} from '@workday/canvas-kit-react/icon'; import {mergeStyles} from '@workday/canvas-kit-react/layout'; -import {createStencil, createVars, cssVar, px2rem} from '@workday/canvas-kit-styling'; +import {calc, createStencil, createVars, cssVar, px2rem} from '@workday/canvas-kit-styling'; import {CanvasSystemIcon} from '@workday/canvas-system-icons-web'; import {base, system} from '@workday/canvas-tokens-web'; @@ -253,24 +253,22 @@ export const buttonStencil = createStencil({ lineHeight: system.legacy.lineHeight.body.sm, letterSpacing: system.legacy.letterSpacing.body.sm, height: system.legacy.size.lg, - paddingInline: system.legacy.padding.xxl, - minWidth: base.legacy.size1400, + paddingInline: system.legacy.padding.lg, }, medium: { fontSize: system.legacy.fontSize.subtext.lg, lineHeight: system.legacy.lineHeight.subtext.lg, letterSpacing: system.legacy.letterSpacing.subtext.lg, - minWidth: base.legacy.size1200, - paddingInline: system.legacy.padding.xl, + paddingInline: system.legacy.padding.md, height: system.legacy.size.md, + gap: base.size75, }, small: { fontSize: system.legacy.fontSize.subtext.lg, lineHeight: system.legacy.lineHeight.subtext.lg, letterSpacing: system.legacy.letterSpacing.subtext.lg, height: system.legacy.size.sm, - minWidth: base.legacy.size1000, - paddingInline: system.legacy.padding.md, + paddingInline: system.legacy.padding.sm, gap: system.legacy.gap.xs, }, extraSmall: { @@ -278,8 +276,7 @@ export const buttonStencil = createStencil({ lineHeight: system.legacy.lineHeight.subtext.md, letterSpacing: system.legacy.letterSpacing.subtext.md, height: system.legacy.size.xs, - minWidth: 'auto', - paddingInline: system.legacy.padding.sm, + paddingInline: system.legacy.padding.xs, gap: system.legacy.gap.xs, }, }, @@ -307,15 +304,15 @@ export const buttonStencil = createStencil({ { modifiers: {size: 'large', iconPosition: 'start'}, styles: { - paddingInlineStart: system.legacy.padding.xl, - paddingInlineEnd: system.legacy.padding.xxl, + paddingInlineStart: system.legacy.padding.md, + paddingInlineEnd: system.legacy.padding.lg, }, }, { modifiers: {size: 'large', iconPosition: 'end'}, styles: { - paddingInlineStart: system.legacy.padding.xxl, - paddingInlineEnd: system.legacy.padding.xl, + paddingInlineStart: system.legacy.padding.lg, + paddingInlineEnd: system.legacy.padding.md, }, }, { @@ -327,15 +324,15 @@ export const buttonStencil = createStencil({ { modifiers: {size: 'medium', iconPosition: 'start'}, styles: { - paddingInlineStart: system.legacy.padding.lg, - paddingInlineEnd: system.legacy.padding.xl, + paddingInlineStart: system.legacy.padding.sm, + paddingInlineEnd: system.legacy.padding.md, }, }, { modifiers: {size: 'medium', iconPosition: 'end'}, styles: { - paddingInlineStart: system.legacy.padding.xl, - paddingInlineEnd: system.legacy.padding.lg, + paddingInlineStart: system.legacy.padding.md, + paddingInlineEnd: system.legacy.padding.sm, }, }, { @@ -347,15 +344,15 @@ export const buttonStencil = createStencil({ { modifiers: {size: 'small', iconPosition: 'start'}, styles: { - paddingInlineStart: system.legacy.padding.sm, - paddingInlineEnd: system.legacy.padding.md, + paddingInlineStart: system.legacy.padding.xs, + paddingInlineEnd: system.legacy.padding.sm, }, }, { modifiers: {size: 'small', iconPosition: 'end'}, styles: { - paddingInlineStart: system.legacy.padding.md, - paddingInlineEnd: system.legacy.padding.sm, + paddingInlineStart: system.legacy.padding.sm, + paddingInlineEnd: system.legacy.padding.xs, }, }, { @@ -367,15 +364,15 @@ export const buttonStencil = createStencil({ { modifiers: {size: 'extraSmall', iconPosition: 'start'}, styles: { - paddingInlineStart: system.legacy.padding.xs, - paddingInlineEnd: system.legacy.padding.sm, + paddingInlineStart: calc.add(system.legacy.padding.xxs, '0.125rem'), + paddingInlineEnd: system.legacy.padding.xs, }, }, { modifiers: {size: 'extraSmall', iconPosition: 'end'}, styles: { - paddingInlineStart: system.legacy.padding.sm, - paddingInlineEnd: system.legacy.padding.xs, + paddingInlineStart: system.legacy.padding.xs, + paddingInlineEnd: calc.add(system.legacy.padding.xxs, '0.125rem'), }, }, ], diff --git a/modules/react/button/lib/DeleteButton.tsx b/modules/react/button/lib/DeleteButton.tsx index 81bf6f696b..efc60d7fc8 100644 --- a/modules/react/button/lib/DeleteButton.tsx +++ b/modules/react/button/lib/DeleteButton.tsx @@ -11,7 +11,12 @@ import {Button, ButtonProps} from './Button'; * We omit `ref` since all of our buttons use `createComponent` and already give access to `ref`. * Use this type to extend and customize any one off buttons that you want full control over styling. */ -export interface DeleteButtonProps extends ButtonProps {} +export interface DeleteButtonProps extends ButtonProps { + /** + * Variant has an option for `inverse` which will inverse the styling + */ + variant?: 'inverse'; +} const deleteButtonStencil = createStencil({ extends: buttonStencil, @@ -72,6 +77,47 @@ const deleteButtonStencil = createStencil({ [buttonStencil.vars.label]: system.color.fg.inverse, }, }, + modifiers: { + variant: { + inverse: { + // Default Styles + [buttonStencil.vars.background]: system.legacy.color.surface.transparent, + [buttonStencil.vars.border]: system.color.border.transparent, + [buttonStencil.vars.label]: system.legacy.color.brand.fg.critical.default, + [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), + // Hover Styles + '&:hover, &.hover': { + [buttonStencil.vars.background]: system.legacy.color.surface.transparent, + [buttonStencil.vars.border]: system.legacy.color.brand.border.critical, + [buttonStencil.vars.label]: system.legacy.color.brand.fg.critical.default, + [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, 'currentColor'), + }, + // Focus Styles + '&:focus-visible, &.focus': { + [buttonStencil.vars.background]: system.legacy.color.surface.default, + [buttonStencil.vars.border]: system.legacy.color.brand.border.critical, + [buttonStencil.vars.label]: system.legacy.color.brand.fg.critical.default, + [buttonStencil.vars.boxShadowInner]: system.color.focus.inverse, + [buttonStencil.vars.boxShadowOuter]: system.legacy.color.brand.focus.primary, + [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, 'currentColor'), + }, + // Active Styles + '&:active, &.active': { + [buttonStencil.vars.background]: system.legacy.color.surface.transparent, + [buttonStencil.vars.border]: system.legacy.color.brand.border.critical, + [buttonStencil.vars.label]: system.legacy.color.brand.fg.critical.default, + [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, 'currentColor'), + }, + // Disabled Styles + '&:disabled, &.disabled': { + [buttonStencil.vars.opacity]: system.opacity.disabled, + [buttonStencil.vars.background]: system.legacy.color.surface.transparent, + [buttonStencil.vars.label]: system.legacy.color.brand.fg.critical.default, + [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), + }, + }, + }, + }, }); /** @@ -82,7 +128,7 @@ const deleteButtonStencil = createStencil({ export const DeleteButton = createComponent('button')({ displayName: 'DeleteButton', Component: ( - {children, size, iconPosition, grow, cs, ...elemProps}: DeleteButtonProps, + {children, size, iconPosition, grow, variant, cs, ...elemProps}: DeleteButtonProps, ref, Element ) => { @@ -93,7 +139,7 @@ export const DeleteButton = createComponent('button')({ size={size} grow={grow} iconPosition={iconPosition} - cs={[deleteButtonStencil({size, iconPosition}), cs]} + cs={[deleteButtonStencil({variant, size, iconPosition}), cs]} {...elemProps} > {children} diff --git a/modules/react/button/lib/SecondaryButton.tsx b/modules/react/button/lib/SecondaryButton.tsx index 59f235e4e0..d10fa155ce 100644 --- a/modules/react/button/lib/SecondaryButton.tsx +++ b/modules/react/button/lib/SecondaryButton.tsx @@ -24,35 +24,25 @@ const secondaryButtonStencil = createStencil({ // Base Styles [buttonStencil.vars.background]: system.legacy.color.surface.transparent, [buttonStencil.vars.borderRadius]: system.legacy.shape.full, - [buttonStencil.vars.border]: system.color.border.input.default, - [buttonStencil.vars.label]: system.color.fg.default, + [buttonStencil.vars.border]: system.color.border.transparent, + [buttonStencil.vars.label]: system.color.fg.strong, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), // Focus Styles '&:focus-visible, &.focus': { - [buttonStencil.vars.background]: system.legacy.color.surface.default, [buttonStencil.vars.label]: system.color.fg.strong, + [buttonStencil.vars.border]: system.color.border.input.hover, [buttonStencil.vars.boxShadowInner]: system.legacy.color.focus.inverse, [buttonStencil.vars.boxShadowOuter]: system.legacy.color.brand.focus.primary, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, 'currentColor'), }, // Hover Styles '&:hover, &.hover': { - [buttonStencil.vars.background]: colorSpace.darken({ - color: system.legacy.color.surface.transparent, - mixinColor: system.legacy.color.surface.overlay.mixin, - mixinValue: system.legacy.opacity.surface.hover, - }), [buttonStencil.vars.label]: system.color.fg.strong, [buttonStencil.vars.border]: system.legacy.color.border.input.hover, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, 'currentColor'), }, // Active Styles '&:active, &.active': { - [buttonStencil.vars.background]: colorSpace.darken({ - color: system.legacy.color.surface.transparent, - mixinColor: system.legacy.color.surface.overlay.mixin, - mixinValue: system.legacy.opacity.surface.pressed, - }), [buttonStencil.vars.label]: system.color.fg.strong, [buttonStencil.vars.border]: system.legacy.color.border.input.hover, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, 'currentColor'), diff --git a/modules/react/button/lib/TertiaryButton.tsx b/modules/react/button/lib/TertiaryButton.tsx index a4ccefecbb..6e36c1299d 100644 --- a/modules/react/button/lib/TertiaryButton.tsx +++ b/modules/react/button/lib/TertiaryButton.tsx @@ -28,13 +28,11 @@ const tertiaryButtonStencil = createStencil({ [buttonStencil.vars.borderRadius]: system.legacy.shape.full, [buttonStencil.vars.background]: system.legacy.color.surface.transparent, - [buttonStencil.vars.label]: system.color.fg.default, + [buttonStencil.vars.label]: system.color.fg.strong, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), // Focus Styles '&:focus-visible, &.focus': { - [buttonStencil.vars.background]: system.legacy.color.surface.transparent, - - [buttonStencil.vars.label]: system.color.fg.default, + [buttonStencil.vars.background]: system.legacy.color.surface.default, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, 'currentColor'), [buttonStencil.vars.border]: system.color.border.transparent, [buttonStencil.vars.label]: system.color.fg.contrast.default, @@ -48,23 +46,13 @@ const tertiaryButtonStencil = createStencil({ }, // Hover Styles '&:hover, &.hover': { - [buttonStencil.vars.background]: colorSpace.darken({ - color: system.legacy.color.surface.transparent, - mixinColor: system.legacy.color.surface.overlay.mixin, - mixinValue: system.legacy.opacity.surface.hover, - }), - [buttonStencil.vars.label]: system.color.fg.strong, + [buttonStencil.vars.background]: system.legacy.color.surface.overlay.hover.default, [systemIconStencil.vars.color]: system.color.fg.strong, textDecoration: 'underline', }, // Active Styles '&:active, &.active': { - [buttonStencil.vars.background]: colorSpace.darken({ - color: system.legacy.color.surface.transparent, - mixinColor: system.legacy.color.surface.overlay.mixin, - mixinValue: system.legacy.opacity.surface.pressed, - }), - [buttonStencil.vars.label]: system.color.fg.strong, + [buttonStencil.vars.background]: system.legacy.color.surface.overlay.pressed.default, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, 'currentColor'), textDecoration: 'underline', }, @@ -73,7 +61,6 @@ const tertiaryButtonStencil = createStencil({ textDecoration: 'none', [buttonStencil.vars.opacity]: system.opacity.disabled, [buttonStencil.vars.background]: system.legacy.color.surface.transparent, - [buttonStencil.vars.label]: system.color.fg.default, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), }, }, @@ -123,11 +110,7 @@ const tertiaryButtonStencil = createStencil({ [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), // Hover Styles '&:hover, &.hover': { - [buttonStencil.vars.background]: colorSpace.darken({ - color: system.legacy.color.surface.transparent, - mixinColor: system.legacy.color.surface.overlay.mixin, - mixinValue: system.legacy.opacity.surface.hover, - }), + [buttonStencil.vars.background]: system.legacy.color.surface.overlay.hover.inverse, [buttonStencil.vars.label]: system.color.fg.inverse, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, 'currentColor'), }, @@ -146,11 +129,7 @@ const tertiaryButtonStencil = createStencil({ }, // Active Styles '&:active, &.active': { - [buttonStencil.vars.background]: colorSpace.darken({ - color: system.legacy.color.surface.transparent, - mixinColor: system.legacy.color.surface.overlay.mixin, - mixinValue: system.legacy.opacity.surface.pressed, - }), + [buttonStencil.vars.background]: system.legacy.color.surface.overlay.pressed.inverse, [buttonStencil.vars.label]: system.color.fg.inverse, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, 'currentColor'), }, diff --git a/modules/react/button/stories/button/Button.mdx b/modules/react/button/stories/button/Button.mdx index 14181c1bca..e8a1acce79 100644 --- a/modules/react/button/stories/button/Button.mdx +++ b/modules/react/button/stories/button/Button.mdx @@ -9,6 +9,7 @@ import { import {CustomStyles} from './examples/CustomStyles'; import {Delete} from './examples/Delete'; +import {DeleteInverse} from './examples/DeleteInverse'; import {Grow} from './examples/Grow'; import {Primary} from './examples/Primary'; import {PrimaryInverse} from './examples/PrimaryInverse'; @@ -82,6 +83,11 @@ on a dark or colorful background such as `blueberry400`. +Delete Buttons also have an `inverse` variant. Use this when you need to place a Delete Button on a +dark or colorful background such as `blueberry400`. + + + ### Grow Prop The example below shows the use of the `grow` prop on different variants of buttons. This will set diff --git a/modules/react/button/stories/button/Button.stories.tsx b/modules/react/button/stories/button/Button.stories.tsx index 84d374c423..677b456f5e 100644 --- a/modules/react/button/stories/button/Button.stories.tsx +++ b/modules/react/button/stories/button/Button.stories.tsx @@ -3,6 +3,7 @@ import {Meta} from '@storybook/react'; import mdxDoc from './Button.mdx'; import {CustomStyles as CustomStylesExample} from './examples/CustomStyles'; import {Delete as DeleteExample} from './examples/Delete'; +import {DeleteInverse as DeleteInverseExample} from './examples/DeleteInverse'; import {Primary as PrimaryExample} from './examples/Primary'; import {PrimaryInverse as PrimaryInverseExample} from './examples/PrimaryInverse'; import {Secondary as SecondaryExample} from './examples/Secondary'; @@ -42,6 +43,9 @@ export const TertiaryInverse = { export const Delete = { render: DeleteExample, }; +export const DeleteInverse = { + render: DeleteInverseExample, +}; export const CustomStyles = { render: CustomStylesExample, }; diff --git a/modules/react/button/stories/button/examples/DeleteInverse.tsx b/modules/react/button/stories/button/examples/DeleteInverse.tsx new file mode 100644 index 0000000000..16ccbf3802 --- /dev/null +++ b/modules/react/button/stories/button/examples/DeleteInverse.tsx @@ -0,0 +1,26 @@ +import {DeleteButton} from '@workday/canvas-kit-react/button'; +import {Flex} from '@workday/canvas-kit-react/layout'; +import {Tooltip} from '@workday/canvas-kit-react/tooltip'; +import {createStyles} from '@workday/canvas-kit-styling'; +import {trashIcon} from '@workday/canvas-system-icons-web'; +import {system} from '@workday/canvas-tokens-web'; + +const parentContainerStyles = createStyles({ + gap: system.gap.md, + padding: system.padding.md, +}); + +export const DeleteInverse = () => ( + + Delete + + Delete + + + Delete + + + + + +); diff --git a/modules/react/button/stories/visual-testing/DeleteButton.stories.tsx b/modules/react/button/stories/visual-testing/DeleteButton.stories.tsx index 2927de7bd7..83121c9d49 100644 --- a/modules/react/button/stories/visual-testing/DeleteButton.stories.tsx +++ b/modules/react/button/stories/visual-testing/DeleteButton.stories.tsx @@ -27,6 +27,10 @@ const DeleteButtonTest = (props: {theme?: PartialEmotionCanvasTheme}) => ( Date: Mon, 15 Jun 2026 17:34:34 -0600 Subject: [PATCH 02/40] chore: Updated styles for Secondary and Tertiary --- modules/react/button/lib/BaseButton.tsx | 1 + modules/react/button/lib/SecondaryButton.tsx | 7 +- modules/react/button/lib/TertiaryButton.tsx | 67 ++------------------ 3 files changed, 9 insertions(+), 66 deletions(-) diff --git a/modules/react/button/lib/BaseButton.tsx b/modules/react/button/lib/BaseButton.tsx index eb225cef62..73d06b840c 100644 --- a/modules/react/button/lib/BaseButton.tsx +++ b/modules/react/button/lib/BaseButton.tsx @@ -144,6 +144,7 @@ export const buttonStencil = createStencil({ whiteSpace: 'nowrap', WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale', + minWidth: 'min-content', borderRadius: cssVar( buttonColorPropVars.default.borderRadius, cssVar(borderRadius, system.legacy.shape.full) diff --git a/modules/react/button/lib/SecondaryButton.tsx b/modules/react/button/lib/SecondaryButton.tsx index d10fa155ce..ab81bd0315 100644 --- a/modules/react/button/lib/SecondaryButton.tsx +++ b/modules/react/button/lib/SecondaryButton.tsx @@ -24,13 +24,13 @@ const secondaryButtonStencil = createStencil({ // Base Styles [buttonStencil.vars.background]: system.legacy.color.surface.transparent, [buttonStencil.vars.borderRadius]: system.legacy.shape.full, - [buttonStencil.vars.border]: system.color.border.transparent, + [buttonStencil.vars.border]: system.legacy.color.border.default, [buttonStencil.vars.label]: system.color.fg.strong, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), // Focus Styles '&:focus-visible, &.focus': { [buttonStencil.vars.label]: system.color.fg.strong, - [buttonStencil.vars.border]: system.color.border.input.hover, + [buttonStencil.vars.border]: system.legacy.color.border.default, [buttonStencil.vars.boxShadowInner]: system.legacy.color.focus.inverse, [buttonStencil.vars.boxShadowOuter]: system.legacy.color.brand.focus.primary, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, 'currentColor'), @@ -51,8 +51,7 @@ const secondaryButtonStencil = createStencil({ '&:disabled, &.disabled': { [buttonStencil.vars.opacity]: system.opacity.disabled, [buttonStencil.vars.background]: system.legacy.color.surface.transparent, - - [buttonStencil.vars.label]: system.color.fg.default, + [buttonStencil.vars.label]: system.color.fg.strong, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), }, }, diff --git a/modules/react/button/lib/TertiaryButton.tsx b/modules/react/button/lib/TertiaryButton.tsx index 6e36c1299d..fe5aa57a6f 100644 --- a/modules/react/button/lib/TertiaryButton.tsx +++ b/modules/react/button/lib/TertiaryButton.tsx @@ -1,6 +1,6 @@ import {createComponent, focusRing} from '@workday/canvas-kit-react/common'; import {systemIconStencil} from '@workday/canvas-kit-react/icon'; -import {colorSpace, createStencil, cssVar, px2rem} from '@workday/canvas-kit-styling'; +import {createStencil, cssVar, px2rem} from '@workday/canvas-kit-styling'; import {system} from '@workday/canvas-tokens-web'; import {buttonColorPropVars, buttonStencil} from './BaseButton'; @@ -22,86 +22,37 @@ const tertiaryButtonStencil = createStencil({ extends: buttonStencil, // Base Styles base: { - paddingInline: system.legacy.padding.xs, - minWidth: 'auto', - borderWidth: px2rem(2), [buttonStencil.vars.borderRadius]: system.legacy.shape.full, [buttonStencil.vars.background]: system.legacy.color.surface.transparent, - [buttonStencil.vars.label]: system.color.fg.strong, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), + [buttonStencil.vars.border]: system.color.border.transparent, // Focus Styles '&:focus-visible, &.focus': { [buttonStencil.vars.background]: system.legacy.color.surface.default, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, 'currentColor'), - [buttonStencil.vars.border]: system.color.border.transparent, [buttonStencil.vars.label]: system.color.fg.contrast.default, - ...focusRing({ - width: 2, - separation: 0, - innerColor: system.legacy.color.focus.inverse, - - outerColor: system.legacy.color.brand.focus.primary, - }), + [buttonStencil.vars.boxShadowInner]: system.legacy.color.focus.inverse, + [buttonStencil.vars.boxShadowOuter]: system.legacy.color.brand.focus.primary, }, // Hover Styles '&:hover, &.hover': { [buttonStencil.vars.background]: system.legacy.color.surface.overlay.hover.default, [systemIconStencil.vars.color]: system.color.fg.strong, - textDecoration: 'underline', }, // Active Styles '&:active, &.active': { [buttonStencil.vars.background]: system.legacy.color.surface.overlay.pressed.default, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, 'currentColor'), - textDecoration: 'underline', }, // Disabled Styles '&:disabled, &.disabled': { - textDecoration: 'none', [buttonStencil.vars.opacity]: system.opacity.disabled, [buttonStencil.vars.background]: system.legacy.color.surface.transparent, [systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, 'currentColor'), }, }, modifiers: { - // IconPosition Styles - iconPosition: { - only: { - padding: 0, - [systemIconStencil.vars.color]: cssVar( - buttonColorPropVars.default.icon, - system.color.fg.default - ), - '&:focus-visible, &.focus': { - [systemIconStencil.vars.color]: cssVar( - buttonColorPropVars.focus.icon, - system.color.fg.strong - ), - }, - '&:hover, &.hover': { - [systemIconStencil.vars.color]: cssVar( - buttonColorPropVars.hover.icon, - system.color.fg.strong - ), - }, - '&:active, &.active': { - [systemIconStencil.vars.color]: cssVar( - buttonColorPropVars.active.icon, - system.color.fg.strong - ), - }, - '&:disabled, &.disabled': { - [buttonStencil.vars.opacity]: system.opacity.disabled, - [systemIconStencil.vars.color]: cssVar( - buttonColorPropVars.disabled.icon, - system.color.fg.default - ), - }, - }, - start: {}, - end: {}, - }, variant: { // Inverse Styles inverse: { @@ -244,14 +195,6 @@ export const TertiaryButton = createComponent('button')({ ref, Element ) => { - const baseIconPosition = iconPosition - ? iconPosition - : icon - ? children - ? 'start' - : 'only' - : undefined; - return (