feat(SW-375): new tokens

new asset generation logic

BREAKING CHANGE: New tokens.
This commit is contained in:
Michael Zetterberg
2025-01-20 14:46:25 +01:00
parent 7ce2ee2922
commit 56973888c9
189 changed files with 34368 additions and 10344 deletions

View File

@@ -0,0 +1,33 @@
import type { Meta, StoryObj } from '@storybook/react'
import { fn } from '@storybook/test'
import { ChipButton } from './ChipButton.tsx'
import ChevronRightSmallIcon from '../Icons/ChevronRightSmall.tsx'
const meta: Meta<typeof ChipButton> = {
title: 'Components/Chip/ChipButton 🚧',
component: ChipButton,
argTypes: {
onPress: {
table: {
disable: true,
},
},
},
}
export default meta
type Story = StoryObj<typeof ChipButton>
export const Default: Story = {
args: {
onPress: fn(),
children: (
<>
Button Chip <ChevronRightSmallIcon width={20} height={20} />
</>
),
},
}

View File

@@ -0,0 +1,21 @@
import { Button as ButtonRAC } from 'react-aria-components'
import { Typography } from '../Typography'
import styles from './chip-button.module.css'
import type { ComponentPropsWithRef } from 'react'
export function ChipButton({
children,
className,
...props
}: ComponentPropsWithRef<typeof ButtonRAC>) {
return (
<Typography variant="Body/Supporting text (caption)/smBold">
<ButtonRAC {...props} className={[styles.chip, className].join(' ')}>
{children}
</ButtonRAC>
</Typography>
)
}

View File

@@ -0,0 +1,19 @@
.chip {
background-color: var(--Component-Button-Inverted-Default);
border-color: var(--Component-Button-Inverted-Border-Default);
border-style: solid;
border-width: 1px;
border-radius: var(--Corner-radius-sm);
padding: var(--Space-x1) var(--Space-x15);
color: var(--Text-Interactive-Default);
display: inline-flex;
align-items: center;
cursor: pointer;
}
.chip:hover {
/* TODO: change to proper Component-variable once it is available */
background-color: var(--Scandic-Peach-10);
/* TODO: change to proper Component-variable once it is available */
color: var(--Scandic-Red-100);
}

View File

@@ -0,0 +1 @@
export { ChipButton } from './ChipButton'