Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1b7023c
feat(theme): expose web theme context
comfrt1k Aug 25, 2026
36acf2c
feat(button): update web button
comfrt1k Aug 25, 2026
788a964
fix(theme): align disabled action colors
comfrt1k Aug 27, 2026
17bd19d
feat(theme): load Science Gothic assets
comfrt1k Aug 27, 2026
0e6809c
refactor(button): simplify web button structure
comfrt1k Aug 27, 2026
69e0bfd
fix(button): attenuate translucent elevations
comfrt1k Aug 27, 2026
3ad8473
refactor(button): extract addons module
comfrt1k Aug 27, 2026
3f61ab4
feat(button): add component stories
comfrt1k Aug 27, 2026
8615e27
fix(atls-ui-parts): align button story variants
comfrt1k Aug 27, 2026
193922f
fix(button): remove obsolete stories
comfrt1k Aug 27, 2026
4808b10
fix(atls-ui-admin): migrate button shape styles
comfrt1k Aug 27, 2026
2b89cbd
fix(button): preserve elevation opacity
comfrt1k Aug 27, 2026
d89f947
fix(button): shadow visible content
comfrt1k Aug 27, 2026
a947b88
fix(button): restore container elevation rendering
comfrt1k Aug 27, 2026
e3edcc5
fix(button): hide elevation without visible paint
comfrt1k Aug 27, 2026
c0a3cef
Merge branch 'master' into feat/web-button
comfrt1k Aug 27, 2026
b3897ad
fix(button): preserve class shape styles
comfrt1k Aug 27, 2026
d14d544
fix(button): preserve addon layout for class shapes
comfrt1k Aug 27, 2026
6862f69
refactor(button): simplify shape styles
comfrt1k Aug 28, 2026
ee6cde5
fix(button): center icon-only content
comfrt1k Aug 28, 2026
bae0926
fix(button): reset block padding
comfrt1k Aug 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 11 additions & 63 deletions .pnp.cjs

Large diffs are not rendered by default.

170 changes: 77 additions & 93 deletions ui-admin/button/src/styles/appearance.css.ts
Original file line number Diff line number Diff line change
@@ -1,103 +1,87 @@
import type { ButtonAppearance } from '@atls-ui-parts/button'
import type { ButtonAppearance } from '@atls-ui-parts/button'

import { vars } from '@atls-ui-admin/theme'
import { createAppearanceStyles } from '@atls-ui-parts/button'

const appearanceBlueDefaultStyles = createAppearanceStyles({
fontColor: vars.colors['button.blue.default.font'],
backgroundColor: vars.colors['button.blue.default.background'],
borderColor: vars.colors['button.blue.default.border'],
})

const appearanceBlueHoverStyles = createAppearanceStyles({
fontColor: vars.colors['button.blue.hover.font'],
backgroundColor: vars.colors['button.blue.hover.background'],
borderColor: vars.colors['button.blue.hover.border'],
})

const appearanceBluePressedStyles = createAppearanceStyles({
fontColor: vars.colors['button.blue.pressed.font'],
backgroundColor: vars.colors['button.blue.pressed.background'],
borderColor: vars.colors['button.blue.pressed.border'],
})

const appearanceBlueDisabledStyles = createAppearanceStyles({
fontColor: vars.colors['button.blue.disabled.font'],
backgroundColor: vars.colors['button.blue.disabled.background'],
borderColor: vars.colors['button.blue.disabled.border'],
})

const appearanceLightBlueDefaultStyles = createAppearanceStyles({
fontColor: vars.colors['button.lightBlue.default.font'],
backgroundColor: vars.colors['button.lightBlue.default.background'],
borderColor: vars.colors['button.lightBlue.default.border'],
})

const appearanceLightBlueHoverStyles = createAppearanceStyles({
fontColor: vars.colors['button.lightBlue.hover.font'],
backgroundColor: vars.colors['button.lightBlue.hover.background'],
borderColor: vars.colors['button.lightBlue.hover.border'],
})

const appearanceLightBluePressedStyles = createAppearanceStyles({
fontColor: vars.colors['button.lightBlue.pressed.font'],
backgroundColor: vars.colors['button.lightBlue.pressed.background'],
borderColor: vars.colors['button.lightBlue.pressed.border'],
})

const appearanceLightBlueDisabledStyles = createAppearanceStyles({
fontColor: vars.colors['button.lightBlue.disabled.font'],
backgroundColor: vars.colors['button.lightBlue.disabled.background'],
borderColor: vars.colors['button.lightBlue.disabled.border'],
})

const appearanceGhostStyles = createAppearanceStyles({
fontColor: 'inherit',
backgroundColor: 'transparent',
border: 'none',
})

export const appearanceVariant = {
blue: appearanceBlueDefaultStyles,
lightBlue: appearanceLightBlueDefaultStyles,
ghost: appearanceGhostStyles,
}

export const appearanceHover = {
blueHover: appearanceBlueHoverStyles,
lightBlueHover: appearanceLightBlueHoverStyles,
ghostHover: appearanceGhostStyles,
}

export const appearancePressed = {
bluePressed: appearanceBluePressedStyles,
lightBluePressed: appearanceLightBluePressedStyles,
ghostPressed: appearanceGhostStyles,
}

export const appearanceDisabled = {
blueDisabled: appearanceBlueDisabledStyles,
lightBlueDisabled: appearanceLightBlueDisabledStyles,
ghostDisabled: appearanceGhostStyles,
}
import { vars } from '@atls-ui-admin/theme'

export const buttonAppearances: Record<'blue' | 'ghost' | 'lightBlue', ButtonAppearance> = {
blue: {
default: appearanceVariant.blue,
hover: appearanceHover.blueHover,
pressed: appearancePressed.bluePressed,
disabled: appearanceDisabled.blueDisabled,
default: {
background: vars.colors['button.blue.default.background'],
content: vars.colors['button.blue.default.font'],
border: vars.colors['button.blue.default.border'],
},
hover: {
background: vars.colors['button.blue.hover.background'],
content: vars.colors['button.blue.hover.font'],
border: vars.colors['button.blue.hover.border'],
},
pressed: {
background: vars.colors['button.blue.pressed.background'],
content: vars.colors['button.blue.pressed.font'],
border: vars.colors['button.blue.pressed.border'],
},
disabled: {
background: vars.colors['button.blue.disabled.background'],
content: vars.colors['button.blue.disabled.font'],
border: vars.colors['button.blue.disabled.border'],
},
focused: {
background: vars.colors['button.blue.default.background'],
content: vars.colors['button.blue.default.font'],
border: vars.colors['button.blue.default.border'],
},
},
lightBlue: {
default: appearanceVariant.lightBlue,
hover: appearanceHover.lightBlueHover,
pressed: appearancePressed.lightBluePressed,
disabled: appearanceDisabled.lightBlueDisabled,
default: {
background: vars.colors['button.lightBlue.default.background'],
content: vars.colors['button.lightBlue.default.font'],
border: vars.colors['button.lightBlue.default.border'],
},
hover: {
background: vars.colors['button.lightBlue.hover.background'],
content: vars.colors['button.lightBlue.hover.font'],
border: vars.colors['button.lightBlue.hover.border'],
},
pressed: {
background: vars.colors['button.lightBlue.pressed.background'],
content: vars.colors['button.lightBlue.pressed.font'],
border: vars.colors['button.lightBlue.pressed.border'],
},
disabled: {
background: vars.colors['button.lightBlue.disabled.background'],
content: vars.colors['button.lightBlue.disabled.font'],
border: vars.colors['button.lightBlue.disabled.border'],
},
focused: {
background: vars.colors['button.lightBlue.default.background'],
content: vars.colors['button.lightBlue.default.font'],
border: vars.colors['button.lightBlue.default.border'],
},
},
ghost: {
default: appearanceVariant.ghost,
hover: appearanceHover.ghostHover,
pressed: appearancePressed.ghostPressed,
disabled: appearanceDisabled.ghostDisabled,
default: {
background: 'transparent',
content: 'inherit',
border: 'transparent',
},
hover: {
background: 'transparent',
content: 'inherit',
border: 'transparent',
},
pressed: {
background: 'transparent',
content: 'inherit',
border: 'transparent',
},
disabled: {
background: 'transparent',
content: 'inherit',
border: 'transparent',
},
focused: {
background: 'transparent',
content: 'inherit',
border: 'transparent',
},
},
}
30 changes: 28 additions & 2 deletions ui-admin/button/src/styles/shape.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
import { vars } from '@atls-ui-admin/theme'
import { createShapeStyles } from '@atls-ui-parts/button'
import type { CSSProperties } from 'react'

import { style } from '@vanilla-extract/css'

import { vars } from '@atls-ui-admin/theme'

interface ButtonShapeStyles {
size: number | string
rounding?: CSSProperties['borderRadius']
paddingLeft?: CSSProperties['paddingLeft']
paddingRight?: CSSProperties['paddingRight']
}

const getDefaultPadding = (size: number | string): number =>
typeof size === 'number' ? size * 0.5 : 0

const createShapeStyles = ({
size,
rounding = 0,
paddingLeft,
paddingRight,
}: ButtonShapeStyles): string =>
style({
height: size,
paddingLeft: paddingLeft ?? getDefaultPadding(size),
paddingRight: paddingRight ?? getDefaultPadding(size),
borderRadius: rounding,
})

const hugeStyles = createShapeStyles({
size: 56,
Expand Down
3 changes: 1 addition & 2 deletions ui-parts/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
},
"dependencies": {
"@atls-ui-parts/theme": "workspace:*",
"@atls-utils/use-hover": "workspace:*",
"@atls-ui/theme": "workspace:*",
"clsx": "2.1.1",
"rainbow-sprinkles": "1.0.0"
},
"devDependencies": {
"@atls-ui-generators/appearance": "workspace:*",
"@atls-ui-parts/layout": "workspace:*",
"@storybook/react": "10.4.6",
"@types/react": "19.1.2",
Expand Down
33 changes: 33 additions & 0 deletions ui-parts/button/src/addons/component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import type { ReactNode } from 'react'

import type { AddonsProps } from './interfaces.js'

import { Children } from 'react'
import { clsx } from 'clsx'

import { addonStyles } from '../styles/layout/addons.css.js'
import { addonsStyles } from '../styles/layout/addons.css.js'
import { leadingAddonStyles } from '../styles/layout/addons.css.js'
import { trailingAddonStyles } from '../styles/layout/addons.css.js'

export const Addons = ({ children, position, reserveSpace }: AddonsProps): ReactNode => {
const addons = Children.toArray(children)

if (!reserveSpace && addons.length === 0) {
return null
}

return (
<span
aria-hidden={addons.length > 0 ? undefined : true}
className={clsx(
addonsStyles,
position === 'leading' ? leadingAddonStyles : trailingAddonStyles
)}
>
{Children.map(addons, (addon) => (
<span className={addonStyles}>{addon}</span>
))}
</span>
)
}
2 changes: 2 additions & 0 deletions ui-parts/button/src/addons/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './component.js'
export type * from './interfaces.js'
7 changes: 7 additions & 0 deletions ui-parts/button/src/addons/interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { ReactNode } from 'react'

export interface AddonsProps {
children?: ReactNode
position: 'leading' | 'trailing'
reserveSpace: boolean
}
59 changes: 0 additions & 59 deletions ui-parts/button/src/button.component.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions ui-parts/button/src/button.interfaces.ts

This file was deleted.

Loading